@nocobase/plugin-async-task-manager 1.7.0-beta.17 → 1.7.0-beta.19
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.
- package/dist/client/index.js +1 -1
- package/dist/externalVersion.js +4 -4
- package/dist/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/dist/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/dist/node_modules/uuid/{lib/md5-browser.js → dist/esm-browser/md5.js} +80 -81
- package/dist/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/dist/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/dist/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/dist/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/dist/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/dist/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/dist/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/dist/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/dist/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/dist/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/dist/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/dist/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/dist/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/dist/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/dist/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/dist/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/dist/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/dist/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/dist/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/dist/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/dist/node_modules/uuid/dist/index.js +1 -0
- package/dist/node_modules/uuid/dist/md5-browser.js +223 -0
- package/dist/node_modules/uuid/dist/md5.js +23 -0
- package/dist/node_modules/uuid/dist/native-browser.js +11 -0
- package/dist/node_modules/uuid/dist/native.js +15 -0
- package/dist/node_modules/uuid/dist/nil.js +8 -0
- package/dist/node_modules/uuid/dist/parse.js +45 -0
- package/dist/node_modules/uuid/dist/regex.js +8 -0
- package/dist/node_modules/uuid/dist/rng-browser.js +25 -0
- package/dist/node_modules/uuid/dist/rng.js +24 -0
- package/dist/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/dist/node_modules/uuid/dist/sha1.js +23 -0
- package/dist/node_modules/uuid/dist/stringify.js +44 -0
- package/dist/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/dist/node_modules/uuid/dist/v1.js +107 -0
- package/dist/node_modules/uuid/dist/v3.js +16 -0
- package/dist/node_modules/uuid/dist/v35.js +80 -0
- package/dist/node_modules/uuid/dist/v4.js +43 -0
- package/dist/node_modules/uuid/dist/v5.js +16 -0
- package/dist/node_modules/uuid/dist/validate.js +17 -0
- package/dist/node_modules/uuid/dist/version.js +21 -0
- package/dist/node_modules/uuid/package.json +1 -1
- package/package.json +2 -2
- package/dist/node_modules/uuid/AUTHORS +0 -5
- package/dist/node_modules/uuid/bin/uuid +0 -65
- package/dist/node_modules/uuid/index.js +0 -1
- package/dist/node_modules/uuid/lib/bytesToUuid.js +0 -26
- package/dist/node_modules/uuid/lib/md5.js +0 -25
- package/dist/node_modules/uuid/lib/rng-browser.js +0 -34
- package/dist/node_modules/uuid/lib/rng.js +0 -8
- package/dist/node_modules/uuid/lib/sha1-browser.js +0 -89
- package/dist/node_modules/uuid/lib/sha1.js +0 -25
- package/dist/node_modules/uuid/lib/v35.js +0 -57
- package/dist/node_modules/uuid/v1.js +0 -109
- package/dist/node_modules/uuid/v3.js +0 -4
- package/dist/node_modules/uuid/v4.js +0 -29
- package/dist/node_modules/uuid/v5.js +0 -3
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _assert = _interopRequireDefault(require("assert"));
|
|
4
|
+
|
|
5
|
+
var _v = _interopRequireDefault(require("./v1.js"));
|
|
6
|
+
|
|
7
|
+
var _v2 = _interopRequireDefault(require("./v3.js"));
|
|
8
|
+
|
|
9
|
+
var _v3 = _interopRequireDefault(require("./v4.js"));
|
|
10
|
+
|
|
11
|
+
var _v4 = _interopRequireDefault(require("./v5.js"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function usage() {
|
|
16
|
+
console.log('Usage:');
|
|
17
|
+
console.log(' uuid');
|
|
18
|
+
console.log(' uuid v1');
|
|
19
|
+
console.log(' uuid v3 <name> <namespace uuid>');
|
|
20
|
+
console.log(' uuid v4');
|
|
21
|
+
console.log(' uuid v5 <name> <namespace uuid>');
|
|
22
|
+
console.log(' uuid --help');
|
|
23
|
+
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const args = process.argv.slice(2);
|
|
27
|
+
|
|
28
|
+
if (args.indexOf('--help') >= 0) {
|
|
29
|
+
usage();
|
|
30
|
+
process.exit(0);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const version = args.shift() || 'v4';
|
|
34
|
+
|
|
35
|
+
switch (version) {
|
|
36
|
+
case 'v1':
|
|
37
|
+
console.log((0, _v.default)());
|
|
38
|
+
break;
|
|
39
|
+
|
|
40
|
+
case 'v3':
|
|
41
|
+
{
|
|
42
|
+
const name = args.shift();
|
|
43
|
+
let namespace = args.shift();
|
|
44
|
+
(0, _assert.default)(name != null, 'v3 name not specified');
|
|
45
|
+
(0, _assert.default)(namespace != null, 'v3 namespace not specified');
|
|
46
|
+
|
|
47
|
+
if (namespace === 'URL') {
|
|
48
|
+
namespace = _v2.default.URL;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (namespace === 'DNS') {
|
|
52
|
+
namespace = _v2.default.DNS;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
console.log((0, _v2.default)(name, namespace));
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
case 'v4':
|
|
60
|
+
console.log((0, _v3.default)());
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
case 'v5':
|
|
64
|
+
{
|
|
65
|
+
const name = args.shift();
|
|
66
|
+
let namespace = args.shift();
|
|
67
|
+
(0, _assert.default)(name != null, 'v5 name not specified');
|
|
68
|
+
(0, _assert.default)(namespace != null, 'v5 namespace not specified');
|
|
69
|
+
|
|
70
|
+
if (namespace === 'URL') {
|
|
71
|
+
namespace = _v4.default.URL;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (namespace === 'DNS') {
|
|
75
|
+
namespace = _v4.default.DNS;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
console.log((0, _v4.default)(name, namespace));
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
default:
|
|
83
|
+
usage();
|
|
84
|
+
process.exit(1);
|
|
85
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _rng = _interopRequireDefault(require("./rng.js"));
|
|
9
|
+
|
|
10
|
+
var _stringify = require("./stringify.js");
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
// **`v1()` - Generate time-based UUID**
|
|
15
|
+
//
|
|
16
|
+
// Inspired by https://github.com/LiosK/UUID.js
|
|
17
|
+
// and http://docs.python.org/library/uuid.html
|
|
18
|
+
let _nodeId;
|
|
19
|
+
|
|
20
|
+
let _clockseq; // Previous uuid creation time
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
let _lastMSecs = 0;
|
|
24
|
+
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
25
|
+
|
|
26
|
+
function v1(options, buf, offset) {
|
|
27
|
+
let i = buf && offset || 0;
|
|
28
|
+
const b = buf || new Array(16);
|
|
29
|
+
options = options || {};
|
|
30
|
+
let node = options.node || _nodeId;
|
|
31
|
+
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
32
|
+
// specified. We do this lazily to minimize issues related to insufficient
|
|
33
|
+
// system entropy. See #189
|
|
34
|
+
|
|
35
|
+
if (node == null || clockseq == null) {
|
|
36
|
+
const seedBytes = options.random || (options.rng || _rng.default)();
|
|
37
|
+
|
|
38
|
+
if (node == null) {
|
|
39
|
+
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
40
|
+
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
if (clockseq == null) {
|
|
44
|
+
// Per 4.2.2, randomize (14 bit) clockseq
|
|
45
|
+
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
46
|
+
}
|
|
47
|
+
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
48
|
+
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
49
|
+
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
50
|
+
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
54
|
+
// cycle to simulate higher resolution clock
|
|
55
|
+
|
|
56
|
+
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
57
|
+
|
|
58
|
+
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
59
|
+
|
|
60
|
+
if (dt < 0 && options.clockseq === undefined) {
|
|
61
|
+
clockseq = clockseq + 1 & 0x3fff;
|
|
62
|
+
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
63
|
+
// time interval
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
67
|
+
nsecs = 0;
|
|
68
|
+
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if (nsecs >= 10000) {
|
|
72
|
+
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
_lastMSecs = msecs;
|
|
76
|
+
_lastNSecs = nsecs;
|
|
77
|
+
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
78
|
+
|
|
79
|
+
msecs += 12219292800000; // `time_low`
|
|
80
|
+
|
|
81
|
+
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
82
|
+
b[i++] = tl >>> 24 & 0xff;
|
|
83
|
+
b[i++] = tl >>> 16 & 0xff;
|
|
84
|
+
b[i++] = tl >>> 8 & 0xff;
|
|
85
|
+
b[i++] = tl & 0xff; // `time_mid`
|
|
86
|
+
|
|
87
|
+
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
88
|
+
b[i++] = tmh >>> 8 & 0xff;
|
|
89
|
+
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
90
|
+
|
|
91
|
+
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
92
|
+
|
|
93
|
+
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
94
|
+
|
|
95
|
+
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
|
96
|
+
|
|
97
|
+
b[i++] = clockseq & 0xff; // `node`
|
|
98
|
+
|
|
99
|
+
for (let n = 0; n < 6; ++n) {
|
|
100
|
+
b[i + n] = node[n];
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return buf || (0, _stringify.unsafeStringify)(b);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
var _default = v1;
|
|
107
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _v = _interopRequireDefault(require("./v35.js"));
|
|
9
|
+
|
|
10
|
+
var _md = _interopRequireDefault(require("./md5.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const v3 = (0, _v.default)('v3', 0x30, _md.default);
|
|
15
|
+
var _default = v3;
|
|
16
|
+
exports.default = _default;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.URL = exports.DNS = void 0;
|
|
7
|
+
exports.default = v35;
|
|
8
|
+
|
|
9
|
+
var _stringify = require("./stringify.js");
|
|
10
|
+
|
|
11
|
+
var _parse = _interopRequireDefault(require("./parse.js"));
|
|
12
|
+
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
|
|
15
|
+
function stringToBytes(str) {
|
|
16
|
+
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
17
|
+
|
|
18
|
+
const bytes = [];
|
|
19
|
+
|
|
20
|
+
for (let i = 0; i < str.length; ++i) {
|
|
21
|
+
bytes.push(str.charCodeAt(i));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return bytes;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
28
|
+
exports.DNS = DNS;
|
|
29
|
+
const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
30
|
+
exports.URL = URL;
|
|
31
|
+
|
|
32
|
+
function v35(name, version, hashfunc) {
|
|
33
|
+
function generateUUID(value, namespace, buf, offset) {
|
|
34
|
+
var _namespace;
|
|
35
|
+
|
|
36
|
+
if (typeof value === 'string') {
|
|
37
|
+
value = stringToBytes(value);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (typeof namespace === 'string') {
|
|
41
|
+
namespace = (0, _parse.default)(namespace);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
if (((_namespace = namespace) === null || _namespace === void 0 ? void 0 : _namespace.length) !== 16) {
|
|
45
|
+
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
46
|
+
} // Compute hash of namespace and value, Per 4.3
|
|
47
|
+
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
48
|
+
// hashfunc([...namespace, ... value])`
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
let bytes = new Uint8Array(16 + value.length);
|
|
52
|
+
bytes.set(namespace);
|
|
53
|
+
bytes.set(value, namespace.length);
|
|
54
|
+
bytes = hashfunc(bytes);
|
|
55
|
+
bytes[6] = bytes[6] & 0x0f | version;
|
|
56
|
+
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
57
|
+
|
|
58
|
+
if (buf) {
|
|
59
|
+
offset = offset || 0;
|
|
60
|
+
|
|
61
|
+
for (let i = 0; i < 16; ++i) {
|
|
62
|
+
buf[offset + i] = bytes[i];
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
return buf;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return (0, _stringify.unsafeStringify)(bytes);
|
|
69
|
+
} // Function#name is not settable on some platforms (#270)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
74
|
+
} catch (err) {} // For CommonJS default export support
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
generateUUID.DNS = DNS;
|
|
78
|
+
generateUUID.URL = URL;
|
|
79
|
+
return generateUUID;
|
|
80
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _native = _interopRequireDefault(require("./native.js"));
|
|
9
|
+
|
|
10
|
+
var _rng = _interopRequireDefault(require("./rng.js"));
|
|
11
|
+
|
|
12
|
+
var _stringify = require("./stringify.js");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
function v4(options, buf, offset) {
|
|
17
|
+
if (_native.default.randomUUID && !buf && !options) {
|
|
18
|
+
return _native.default.randomUUID();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
options = options || {};
|
|
22
|
+
|
|
23
|
+
const rnds = options.random || (options.rng || _rng.default)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
27
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
28
|
+
|
|
29
|
+
if (buf) {
|
|
30
|
+
offset = offset || 0;
|
|
31
|
+
|
|
32
|
+
for (let i = 0; i < 16; ++i) {
|
|
33
|
+
buf[offset + i] = rnds[i];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
return buf;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return (0, _stringify.unsafeStringify)(rnds);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
var _default = v4;
|
|
43
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _v = _interopRequireDefault(require("./v35.js"));
|
|
9
|
+
|
|
10
|
+
var _sha = _interopRequireDefault(require("./sha1.js"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
const v5 = (0, _v.default)('v5', 0x50, _sha.default);
|
|
15
|
+
var _default = v5;
|
|
16
|
+
exports.default = _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _regex = _interopRequireDefault(require("./regex.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function validate(uuid) {
|
|
13
|
+
return typeof uuid === 'string' && _regex.default.test(uuid);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
var _default = validate;
|
|
17
|
+
exports.default = _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function version(uuid) {
|
|
13
|
+
if (!(0, _validate.default)(uuid)) {
|
|
14
|
+
throw TypeError('Invalid UUID');
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return parseInt(uuid.slice(14, 15), 16);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
var _default = version;
|
|
21
|
+
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"uuid","version":"
|
|
1
|
+
{"name":"uuid","version":"9.0.1","description":"RFC4122 (v1, v4, and v5) UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122"],"license":"MIT","bin":{"uuid":"./dist/bin/uuid"},"sideEffects":false,"main":"./dist/index.js","exports":{".":{"node":{"module":"./dist/esm-node/index.js","require":"./dist/index.js","import":"./wrapper.mjs"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"module":"./dist/esm-node/index.js","browser":{"./dist/md5.js":"./dist/md5-browser.js","./dist/native.js":"./dist/native-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js","./dist/esm-node/index.js":"./dist/esm-browser/index.js"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.18.10","@babel/core":"7.18.10","@babel/eslint-parser":"7.18.9","@babel/preset-env":"7.18.10","@commitlint/cli":"17.0.3","@commitlint/config-conventional":"17.0.3","bundlewatch":"0.3.3","eslint":"8.21.0","eslint-config-prettier":"8.5.0","eslint-config-standard":"17.0.0","eslint-plugin-import":"2.26.0","eslint-plugin-node":"11.1.0","eslint-plugin-prettier":"4.2.1","eslint-plugin-promise":"6.0.0","husky":"8.0.1","jest":"28.1.3","lint-staged":"13.0.3","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"2.7.1","random-seed":"0.3.0","runmd":"1.3.9","standard-version":"9.5.0"},"optionalDevDependencies":{"@wdio/browserstack-service":"7.16.10","@wdio/cli":"7.16.10","@wdio/jasmine-framework":"7.16.6","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/static-server-service":"7.16.6"},"scripts":{"examples:browser:webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser:rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","prepare":"cd $( git rev-parse --show-toplevel ) && husky install","lint":"npm run eslint:check && npm run prettier:check","eslint:check":"eslint src/ test/ examples/ *.js","eslint:fix":"eslint --fix src/ test/ examples/ *.js","pretest":"[ -n $CI ] || npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","test:browser":"wdio run ./wdio.conf.js","pretest:node":"npm run build","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","pretest:benchmark":"npm run build","test:benchmark":"cd examples/benchmark && npm install && npm test","prettier:check":"prettier --check '**/*.{js,jsx,json,md}'","prettier:fix":"prettier --write '**/*.{js,jsx,json,md}'","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )","docs:diff":"npm run docs && git diff --quiet README.md","build":"./scripts/build.sh","prepack":"npm run build","release":"standard-version --no-verify"},"repository":{"type":"git","url":"https://github.com/uuidjs/uuid.git"},"lint-staged":{"*.{js,jsx,json,md}":["prettier --write"],"*.{js,jsx}":["eslint --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"_lastModified":"2025-04-17T08:25:16.562Z"}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "异步任务管理器",
|
|
5
5
|
"description": "Manage and monitor asynchronous tasks such as data import/export. Support task progress tracking and notification.",
|
|
6
6
|
"description.zh-CN": "管理和监控数据导入导出等异步任务。支持任务进度跟踪和通知。",
|
|
7
|
-
"version": "1.7.0-beta.
|
|
7
|
+
"version": "1.7.0-beta.19",
|
|
8
8
|
"main": "dist/server/index.js",
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"@nocobase/client": "1.x",
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"@nocobase/server": "1.x",
|
|
13
13
|
"@nocobase/test": "1.x"
|
|
14
14
|
},
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "1b828a2402d699654010f5b9fa3c706ee7f1539a"
|
|
16
16
|
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
var assert = require('assert');
|
|
3
|
-
|
|
4
|
-
function usage() {
|
|
5
|
-
console.log('Usage:');
|
|
6
|
-
console.log(' uuid');
|
|
7
|
-
console.log(' uuid v1');
|
|
8
|
-
console.log(' uuid v3 <name> <namespace uuid>');
|
|
9
|
-
console.log(' uuid v4');
|
|
10
|
-
console.log(' uuid v5 <name> <namespace uuid>');
|
|
11
|
-
console.log(' uuid --help');
|
|
12
|
-
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC4122');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
var args = process.argv.slice(2);
|
|
16
|
-
|
|
17
|
-
if (args.indexOf('--help') >= 0) {
|
|
18
|
-
usage();
|
|
19
|
-
process.exit(0);
|
|
20
|
-
}
|
|
21
|
-
var version = args.shift() || 'v4';
|
|
22
|
-
|
|
23
|
-
switch (version) {
|
|
24
|
-
case 'v1':
|
|
25
|
-
var uuidV1 = require('../v1');
|
|
26
|
-
console.log(uuidV1());
|
|
27
|
-
break;
|
|
28
|
-
|
|
29
|
-
case 'v3':
|
|
30
|
-
var uuidV3 = require('../v3');
|
|
31
|
-
|
|
32
|
-
var name = args.shift();
|
|
33
|
-
var namespace = args.shift();
|
|
34
|
-
assert(name != null, 'v3 name not specified');
|
|
35
|
-
assert(namespace != null, 'v3 namespace not specified');
|
|
36
|
-
|
|
37
|
-
if (namespace == 'URL') namespace = uuidV3.URL;
|
|
38
|
-
if (namespace == 'DNS') namespace = uuidV3.DNS;
|
|
39
|
-
|
|
40
|
-
console.log(uuidV3(name, namespace));
|
|
41
|
-
break;
|
|
42
|
-
|
|
43
|
-
case 'v4':
|
|
44
|
-
var uuidV4 = require('../v4');
|
|
45
|
-
console.log(uuidV4());
|
|
46
|
-
break;
|
|
47
|
-
|
|
48
|
-
case 'v5':
|
|
49
|
-
var uuidV5 = require('../v5');
|
|
50
|
-
|
|
51
|
-
var name = args.shift();
|
|
52
|
-
var namespace = args.shift();
|
|
53
|
-
assert(name != null, 'v5 name not specified');
|
|
54
|
-
assert(namespace != null, 'v5 namespace not specified');
|
|
55
|
-
|
|
56
|
-
if (namespace == 'URL') namespace = uuidV5.URL;
|
|
57
|
-
if (namespace == 'DNS') namespace = uuidV5.DNS;
|
|
58
|
-
|
|
59
|
-
console.log(uuidV5(name, namespace));
|
|
60
|
-
break;
|
|
61
|
-
|
|
62
|
-
default:
|
|
63
|
-
usage();
|
|
64
|
-
process.exit(1);
|
|
65
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(){var r={155:function(r,e,n){var a=n(749);var t=n(824);var i=t;i.v1=a;i.v4=t;r.exports=i},707:function(r){var e=[];for(var n=0;n<256;++n){e[n]=(n+256).toString(16).substr(1)}function bytesToUuid(r,n){var a=n||0;var t=e;return[t[r[a++]],t[r[a++]],t[r[a++]],t[r[a++]],"-",t[r[a++]],t[r[a++]],"-",t[r[a++]],t[r[a++]],"-",t[r[a++]],t[r[a++]],"-",t[r[a++]],t[r[a++]],t[r[a++]],t[r[a++]],t[r[a++]],t[r[a++]]].join("")}r.exports=bytesToUuid},859:function(r,e,n){var a=n(113);r.exports=function nodeRNG(){return a.randomBytes(16)}},749:function(r,e,n){var a=n(859);var t=n(707);var i;var u;var o=0;var v=0;function v1(r,e,n){var f=e&&n||0;var s=e||[];r=r||{};var c=r.node||i;var _=r.clockseq!==undefined?r.clockseq:u;if(c==null||_==null){var d=a();if(c==null){c=i=[d[0]|1,d[1],d[2],d[3],d[4],d[5]]}if(_==null){_=u=(d[6]<<8|d[7])&16383}}var l=r.msecs!==undefined?r.msecs:(new Date).getTime();var p=r.nsecs!==undefined?r.nsecs:v+1;var x=l-o+(p-v)/1e4;if(x<0&&r.clockseq===undefined){_=_+1&16383}if((x<0||l>o)&&r.nsecs===undefined){p=0}if(p>=1e4){throw new Error("uuid.v1(): Can't create more than 10M uuids/sec")}o=l;v=p;u=_;l+=122192928e5;var b=((l&268435455)*1e4+p)%4294967296;s[f++]=b>>>24&255;s[f++]=b>>>16&255;s[f++]=b>>>8&255;s[f++]=b&255;var y=l/4294967296*1e4&268435455;s[f++]=y>>>8&255;s[f++]=y&255;s[f++]=y>>>24&15|16;s[f++]=y>>>16&255;s[f++]=_>>>8|128;s[f++]=_&255;for(var q=0;q<6;++q){s[f+q]=c[q]}return e?e:t(s)}r.exports=v1},824:function(r,e,n){var a=n(859);var t=n(707);function v4(r,e,n){var i=e&&n||0;if(typeof r=="string"){e=r==="binary"?new Array(16):null;r=null}r=r||{};var u=r.random||(r.rng||a)();u[6]=u[6]&15|64;u[8]=u[8]&63|128;if(e){for(var o=0;o<16;++o){e[i+o]=u[o]}}return e||t(u)}r.exports=v4},113:function(r){"use strict";r.exports=require("crypto")}};var e={};function __nccwpck_require__(n){var a=e[n];if(a!==undefined){return a.exports}var t=e[n]={exports:{}};var i=true;try{r[n](t,t.exports,__nccwpck_require__);i=false}finally{if(i)delete e[n]}return t.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var n=__nccwpck_require__(155);module.exports=n})();
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
3
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
4
|
-
*/
|
|
5
|
-
var byteToHex = [];
|
|
6
|
-
for (var i = 0; i < 256; ++i) {
|
|
7
|
-
byteToHex[i] = (i + 0x100).toString(16).substr(1);
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function bytesToUuid(buf, offset) {
|
|
11
|
-
var i = offset || 0;
|
|
12
|
-
var bth = byteToHex;
|
|
13
|
-
// join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
|
|
14
|
-
return ([
|
|
15
|
-
bth[buf[i++]], bth[buf[i++]],
|
|
16
|
-
bth[buf[i++]], bth[buf[i++]], '-',
|
|
17
|
-
bth[buf[i++]], bth[buf[i++]], '-',
|
|
18
|
-
bth[buf[i++]], bth[buf[i++]], '-',
|
|
19
|
-
bth[buf[i++]], bth[buf[i++]], '-',
|
|
20
|
-
bth[buf[i++]], bth[buf[i++]],
|
|
21
|
-
bth[buf[i++]], bth[buf[i++]],
|
|
22
|
-
bth[buf[i++]], bth[buf[i++]]
|
|
23
|
-
]).join('');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = bytesToUuid;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var crypto = require('crypto');
|
|
4
|
-
|
|
5
|
-
function md5(bytes) {
|
|
6
|
-
if (typeof Buffer.from === 'function') {
|
|
7
|
-
// Modern Buffer API
|
|
8
|
-
if (Array.isArray(bytes)) {
|
|
9
|
-
bytes = Buffer.from(bytes);
|
|
10
|
-
} else if (typeof bytes === 'string') {
|
|
11
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
12
|
-
}
|
|
13
|
-
} else {
|
|
14
|
-
// Pre-v4 Buffer API
|
|
15
|
-
if (Array.isArray(bytes)) {
|
|
16
|
-
bytes = new Buffer(bytes);
|
|
17
|
-
} else if (typeof bytes === 'string') {
|
|
18
|
-
bytes = new Buffer(bytes, 'utf8');
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
return crypto.createHash('md5').update(bytes).digest();
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
module.exports = md5;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// Unique ID creation requires a high quality random # generator. In the
|
|
2
|
-
// browser this is a little complicated due to unknown quality of Math.random()
|
|
3
|
-
// and inconsistent support for the `crypto` API. We do the best we can via
|
|
4
|
-
// feature-detection
|
|
5
|
-
|
|
6
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto
|
|
7
|
-
// implementation. Also, find the complete implementation of crypto on IE11.
|
|
8
|
-
var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
|
|
9
|
-
(typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
|
|
10
|
-
|
|
11
|
-
if (getRandomValues) {
|
|
12
|
-
// WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
|
|
13
|
-
var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
|
|
14
|
-
|
|
15
|
-
module.exports = function whatwgRNG() {
|
|
16
|
-
getRandomValues(rnds8);
|
|
17
|
-
return rnds8;
|
|
18
|
-
};
|
|
19
|
-
} else {
|
|
20
|
-
// Math.random()-based (RNG)
|
|
21
|
-
//
|
|
22
|
-
// If all else fails, use Math.random(). It's fast, but is of unspecified
|
|
23
|
-
// quality.
|
|
24
|
-
var rnds = new Array(16);
|
|
25
|
-
|
|
26
|
-
module.exports = function mathRNG() {
|
|
27
|
-
for (var i = 0, r; i < 16; i++) {
|
|
28
|
-
if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
|
|
29
|
-
rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
return rnds;
|
|
33
|
-
};
|
|
34
|
-
}
|