@digipair/skill-basic 0.114.2 → 0.114.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.cjs.js +2 -52
  2. package/package.json +4 -2
package/dist/index.cjs.js CHANGED
@@ -1,57 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var engine = require('@digipair/engine');
4
-
5
- /**
6
- * Convert array of 16 byte values to UUID string format of the form:
7
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
8
- */ var byteToHex = [];
9
- for(var i = 0; i < 256; ++i){
10
- byteToHex.push((i + 0x100).toString(16).slice(1));
11
- }
12
- function unsafeStringify(arr) {
13
- var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
14
- // Note: Be careful editing this code! It's been tuned for performance
15
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
16
- //
17
- // Note to future-self: No, you can't remove the `toLowerCase()` call.
18
- // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
19
- return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
20
- }
21
-
22
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
23
- // require the crypto API and do not support built-in fallback to lower quality random number
24
- // generators (like Math.random()).
25
- var getRandomValues;
26
- var rnds8 = new Uint8Array(16);
27
- function rng() {
28
- // lazy load so that environments that need to polyfill have a chance to do so
29
- if (!getRandomValues) {
30
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
31
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
32
- if (!getRandomValues) {
33
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
34
- }
35
- }
36
- return getRandomValues(rnds8);
37
- }
38
-
39
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
40
- var native = {
41
- randomUUID: randomUUID
42
- };
43
-
44
- function v4(options, buf, offset) {
45
- if (native.randomUUID && true && !options) {
46
- return native.randomUUID();
47
- }
48
- options = options || {};
49
- var rnds = options.random || (options.rng || rng)();
50
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
51
- rnds[6] = rnds[6] & 0x0f | 0x40;
52
- rnds[8] = rnds[8] & 0x3f | 0x80;
53
- return unsafeStringify(rnds);
54
- }
4
+ var uuid$1 = require('uuid');
55
5
 
56
6
  let BasicService = class BasicService {
57
7
  async transform(params, _pinsSettingsList, context) {
@@ -116,7 +66,7 @@ let BasicService = class BasicService {
116
66
  }
117
67
  }
118
68
  async uuid(_params, _pinsSettingsList, _context) {
119
- const uuid = v4();
69
+ const uuid = uuid$1.v4();
120
70
  return uuid;
121
71
  }
122
72
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-basic",
3
- "version": "0.114.2",
3
+ "version": "0.114.6",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -30,5 +30,7 @@
30
30
  "nx": {
31
31
  "name": "skill-basic"
32
32
  },
33
- "dependencies": {}
33
+ "dependencies": {
34
+ "uuid": "^10.0.0"
35
+ }
34
36
  }