@digipair/skill-process 0.114.1 → 0.114.3

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 -51
  2. package/package.json +4 -2
package/dist/index.cjs.js CHANGED
@@ -1,59 +1,10 @@
1
1
  'use strict';
2
2
 
3
- /**
4
- * Convert array of 16 byte values to UUID string format of the form:
5
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
6
- */ var byteToHex = [];
7
- for(var i = 0; i < 256; ++i){
8
- byteToHex.push((i + 0x100).toString(16).slice(1));
9
- }
10
- function unsafeStringify(arr) {
11
- var offset = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
12
- // Note: Be careful editing this code! It's been tuned for performance
13
- // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
14
- //
15
- // Note to future-self: No, you can't remove the `toLowerCase()` call.
16
- // REF: https://github.com/uuidjs/uuid/pull/677#issuecomment-1757351351
17
- 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();
18
- }
19
-
20
- // Unique ID creation requires a high quality random # generator. In the browser we therefore
21
- // require the crypto API and do not support built-in fallback to lower quality random number
22
- // generators (like Math.random()).
23
- var getRandomValues;
24
- var rnds8 = new Uint8Array(16);
25
- function rng() {
26
- // lazy load so that environments that need to polyfill have a chance to do so
27
- if (!getRandomValues) {
28
- // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
29
- getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
30
- if (!getRandomValues) {
31
- throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
32
- }
33
- }
34
- return getRandomValues(rnds8);
35
- }
36
-
37
- var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
38
- var native = {
39
- randomUUID: randomUUID
40
- };
41
-
42
- function v4(options, buf, offset) {
43
- if (native.randomUUID && true && !options) {
44
- return native.randomUUID();
45
- }
46
- options = options || {};
47
- var rnds = options.random || (options.rng || rng)();
48
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
49
- rnds[6] = rnds[6] & 0x0f | 0x40;
50
- rnds[8] = rnds[8] & 0x3f | 0x80;
51
- return unsafeStringify(rnds);
52
- }
3
+ var uuid = require('uuid');
53
4
 
54
5
  let ProcessService = class ProcessService {
55
6
  add(digipair, reasoning, res) {
56
- const id = v4();
7
+ const id = uuid.v4();
57
8
  const abortController = new AbortController();
58
9
  const time = Date.now();
59
10
  this.processList.push({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digipair/skill-process",
3
- "version": "0.114.1",
3
+ "version": "0.114.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -29,5 +29,7 @@
29
29
  "nx": {
30
30
  "name": "skill-process"
31
31
  },
32
- "dependencies": {}
32
+ "dependencies": {
33
+ "uuid": "^10.0.0"
34
+ }
33
35
  }