postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.81k stars 839 forks source link

Add support for all UUID versions (v1|v3|v5) #7648

Open thirtified opened 4 years ago

thirtified commented 4 years ago

It doesn't seem to be possible to load other uuid generators than v4. Following the documentation for the uuid module linked in the Postman API Reference, it should be possible to load a uuid v1 generator by one of the following lines:

var uuidV1 = require('uuid/v1');
var uuidV1 = require('uuid').v1;

However, none of the above works: the first line will return an error "Cannot find module 'uuid/v1'", the second one will be undefined.

Is there a way to get access to the v1 generators, given that the uuid module seems to be actually included?

Thanks, - Julian

codenirvana commented 4 years ago

@thirtified As mentioned in the documentation, the uuid module available is a shim for the original module and currently only supports v4.

const uuid = require('uuid'); // Generate and return a v4 UUID.
const uuidv4 = require('uuid').v4; // Generate and return a v4 UUID.

Considering this as a feature request to support different UUID versions.

lkeijmel commented 2 years ago

@codenirvana any news on this? The documentation does not state it is a shim nor does it says it only has v4 support but you are linking to the complete uuid package.

tomasatisocco commented 2 years ago

@codenirvana any news on this? The documentation does not state it is a shim nor does it says it only has v4 support but you are linking to the complete uuid package.

Find any solution?

lkeijmel commented 1 year ago

@codenirvana or someone else like @akshaydeo who can answer this?

I saw in the postman-runtime repository for example the complete uuid package is loaded from NPM, so according to the documentation there is still no indication the desktop app is using a shim instead of the full uuid package.

codenirvana commented 1 year ago

@lkeijmel The issue is with the native crypto module to make UUID work in browserified sandbox.

So, this is the shim used in scripts. I will look at it and let you know if we can support UUID directly or update the shim to support different versions.

alexchiriac commented 4 months ago

Hi!

Any news on this?

venkatanaidum commented 2 months ago

any update on this ? is there any way to generate V5 UUID in postman pre-request scripts