@nocobase/plugin-notification-manager 2.2.0-beta.7 → 2.2.0-beta.9
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/{507.6b177256a5fdfe2f.js → 507.fdef14cca9c18c29.js} +1 -1
- package/dist/client/{89.4f9da72110fbe97a.js → 89.4305cb8d81323fe6.js} +1 -1
- package/dist/client/index.js +1 -1
- package/dist/client-v2/49.3feca41b2843a6b2.js +10 -0
- package/dist/client-v2/index.js +1 -1
- package/dist/collections/channel.js +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/locale/de-DE.json +1 -1
- package/dist/locale/en-US.json +1 -1
- package/dist/locale/es-ES.json +1 -1
- package/dist/locale/fr-FR.json +1 -1
- package/dist/locale/hu-HU.json +1 -1
- package/dist/locale/id-ID.json +1 -1
- package/dist/locale/it-IT.json +1 -1
- package/dist/locale/ja-JP.json +1 -1
- package/dist/locale/ko-KR.json +1 -1
- package/dist/locale/nl-NL.json +1 -1
- package/dist/locale/pt-BR.json +1 -1
- package/dist/locale/ru-RU.json +1 -1
- package/dist/locale/tr-TR.json +1 -1
- package/dist/locale/uk-UA.json +1 -1
- package/dist/locale/vi-VN.json +1 -1
- package/dist/locale/zh-CN.json +1 -1
- package/dist/locale/zh-TW.json +1 -1
- package/dist/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
- package/dist/node_modules/uuid/dist/esm-browser/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/max.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/md5.js +172 -113
- package/dist/node_modules/uuid/dist/esm-browser/native.js +4 -2
- package/dist/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/parse.js +34 -6
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +14 -8
- package/dist/node_modules/uuid/dist/esm-browser/sha1.js +68 -62
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +25 -29
- package/dist/node_modules/uuid/dist/esm-browser/v1.js +117 -75
- package/dist/node_modules/uuid/dist/esm-browser/v1ToV6.js +16 -6
- package/dist/node_modules/uuid/dist/esm-browser/v3.js +3 -8
- package/dist/node_modules/uuid/dist/esm-browser/v35.js +47 -31
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +19 -21
- package/dist/node_modules/uuid/dist/esm-browser/v5.js +3 -8
- package/dist/node_modules/uuid/dist/esm-browser/v6.js +32 -16
- package/dist/node_modules/uuid/dist/esm-browser/v6ToV1.js +15 -5
- package/dist/node_modules/uuid/dist/esm-browser/v7.js +139 -58
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +2 -2
- package/dist/node_modules/uuid/dist/esm-browser/version.js +5 -5
- package/dist/node_modules/uuid/dist/{esm → esm-node}/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/dist/node_modules/uuid/dist/esm-node/md5.js +10 -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 +37 -0
- package/dist/node_modules/uuid/dist/{esm → esm-node}/regex.js +1 -1
- package/dist/node_modules/uuid/dist/esm-node/rng.js +10 -0
- package/dist/node_modules/uuid/dist/esm-node/sha1.js +10 -0
- package/dist/node_modules/uuid/dist/esm-node/stringify.js +31 -0
- package/dist/node_modules/uuid/dist/esm-node/v1.js +125 -0
- package/dist/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/dist/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/v35.js +55 -0
- package/dist/node_modules/uuid/dist/esm-node/v4.js +25 -0
- package/dist/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/dist/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/dist/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/dist/node_modules/uuid/dist/esm-node/validate.js +5 -0
- package/dist/node_modules/uuid/dist/esm-node/version.js +8 -0
- package/dist/node_modules/uuid/dist/index.js +1 -0
- package/dist/node_modules/uuid/dist/max.js +7 -0
- package/dist/node_modules/uuid/dist/md5-browser.js +200 -0
- package/dist/node_modules/uuid/dist/md5.js +17 -0
- package/dist/node_modules/uuid/dist/native-browser.js +10 -0
- package/dist/node_modules/uuid/dist/native.js +11 -0
- package/dist/node_modules/uuid/dist/nil.js +7 -0
- package/dist/node_modules/uuid/dist/parse.js +44 -0
- package/dist/node_modules/uuid/dist/regex.js +7 -0
- package/dist/node_modules/uuid/dist/rng-browser.js +23 -0
- package/dist/node_modules/uuid/dist/rng.js +17 -0
- package/dist/node_modules/uuid/dist/sha1-browser.js +82 -0
- package/dist/node_modules/uuid/dist/sha1.js +17 -0
- package/dist/node_modules/uuid/dist/stringify.js +38 -0
- package/dist/node_modules/uuid/dist/uuid-bin.js +75 -0
- package/dist/node_modules/uuid/dist/v1.js +131 -0
- package/dist/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/dist/node_modules/uuid/dist/v3.js +11 -0
- package/dist/node_modules/uuid/dist/v35.js +63 -0
- package/dist/node_modules/uuid/dist/v4.js +32 -0
- package/dist/node_modules/uuid/dist/v5.js +11 -0
- package/dist/node_modules/uuid/dist/v6.js +38 -0
- package/dist/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/dist/node_modules/uuid/dist/v7.js +152 -0
- package/dist/node_modules/uuid/dist/validate.js +12 -0
- package/dist/node_modules/uuid/dist/version.js +15 -0
- package/dist/node_modules/uuid/package.json +1 -1
- package/package.json +2 -2
- package/dist/client-v2/49.83c515a7f909c364.js +0 -10
- package/dist/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/cjs/index.js +0 -1
- package/dist/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/max.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/dist/node_modules/uuid/dist/cjs/native.js +0 -4
- package/dist/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/package.json +0 -1
- package/dist/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/dist/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/dist/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/cjs/types.js +0 -2
- package/dist/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/dist/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/dist/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/dist/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/cjs/v35.js +0 -44
- package/dist/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/dist/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/dist/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/v6.js +0 -22
- package/dist/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/dist/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/dist/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/version.js +0 -10
- package/dist/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/dist/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/dist/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/dist/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/dist/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/dist/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/dist/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/dist/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/dist/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/cjs-browser/v35.js +0 -44
- package/dist/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/dist/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/v6.js +0 -22
- package/dist/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/dist/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/dist/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/dist/node_modules/uuid/dist/esm/bin/uuid +0 -2
- package/dist/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/max.js +0 -1
- package/dist/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/md5.js +0 -11
- package/dist/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/dist/node_modules/uuid/dist/esm/native.js +0 -2
- package/dist/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/nil.js +0 -1
- package/dist/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/parse.js +0 -9
- package/dist/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm/rng.js +0 -10
- package/dist/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/sha1.js +0 -11
- package/dist/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/esm/stringify.js +0 -35
- package/dist/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/esm/types.js +0 -1
- package/dist/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
- package/dist/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/esm/v1.js +0 -83
- package/dist/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
- package/dist/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v3.js +0 -9
- package/dist/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/esm/v35.js +0 -39
- package/dist/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/v4.js +0 -27
- package/dist/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v5.js +0 -9
- package/dist/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/v6.js +0 -20
- package/dist/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
- package/dist/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v7.js +0 -65
- package/dist/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/validate.js +0 -5
- package/dist/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/version.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/esm-browser/types.js +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
- package/dist/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"uuid","version":"
|
|
1
|
+
{"name":"uuid","version":"10.0.0","description":"RFC9562 UUIDs","funding":["https://github.com/sponsors/broofa","https://github.com/sponsors/ctavan"],"commitlint":{"extends":["@commitlint/config-conventional"]},"keywords":["uuid","guid","rfc4122","rfc9562"],"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/esm-node/index.js":"./dist/esm-browser/index.js","./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"},"files":["CHANGELOG.md","CONTRIBUTING.md","LICENSE.md","README.md","dist","wrapper.mjs"],"devDependencies":{"@babel/cli":"7.24.6","@babel/core":"7.24.6","@babel/eslint-parser":"7.24.6","@babel/plugin-syntax-import-attributes":"7.24.6","@babel/preset-env":"7.24.6","@commitlint/cli":"19.3.0","@commitlint/config-conventional":"19.2.2","@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","bundlewatch":"0.3.3","eslint":"9.4.0","eslint-plugin-prettier":"5.1.3","globals":"15.3.0","husky":"9.0.11","jest":"29.7.0","lint-staged":"15.2.5","neostandard":"0.5.1","npm-run-all":"4.1.5","optional-dev-dependency":"2.0.1","prettier":"3.3.0","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":"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":"npm run build","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","test:matching":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/ -t","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 && HUSKY=0 npm install && npm test","prettier:check":"prettier --check .","prettier:fix":"prettier --write .","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","md":"runmd --watch --output=README.md README_js.md","docs":"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":"git+https://github.com/uuidjs/uuid.git"},"lint-staged":{"*":["prettier --no-error-on-unmatched-pattern --write"],"*.{js,jsx}":["eslint --no-error-on-unmatched-pattern --fix"]},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"packageManager":"npm@10.8.1+sha256.b8807aebb9656758e2872fa6e7c564b506aa2faa9297439a478d471d2fe32483","_lastModified":"2026-07-06T02:56:52.157Z"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"description.ru-RU": "Предоставляет единый сервис управления, включающий конфигурирование каналов, логирование и другие функции, поддерживает настройку различных каналов уведомлений, включая внутренние сообщения и электронную почту.",
|
|
7
7
|
"displayName.zh-CN": "通知管理",
|
|
8
8
|
"description.zh-CN": "提供统一的管理服务,涵盖渠道配置、日志记录等功能,支持多种通知渠道的配置,包括站内信和电子邮件等。",
|
|
9
|
-
"version": "2.2.0-beta.
|
|
9
|
+
"version": "2.2.0-beta.9",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/notification-manager",
|
|
11
11
|
"homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/notification-manager",
|
|
12
12
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/notification-manager",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"Notification"
|
|
37
37
|
],
|
|
38
38
|
"license": "Apache-2.0",
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "60e3d7abbaa0c7cead76f71a4f3d5eedb6b8acdb"
|
|
40
40
|
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file is part of the NocoBase (R) project.
|
|
3
|
-
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
-
* Authors: NocoBase Team.
|
|
5
|
-
*
|
|
6
|
-
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
-
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
"use strict";(self.webpackChunk_nocobase_plugin_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).push([["49"],{624:function(e,t,n){n.r(t),n.d(t,{default:function(){return j}});var r=n(375),o=n(485),i=n(694),a=n(625),l=n(59),u=n(773),c=n(155),s=n.n(c),f=n(553),m={name:f.L.channels,dataCategory:"system",migrationRules:["overwrite","schema-only"],filterTargetKey:"name",autoGenId:!1,createdAt:!0,createdBy:!0,updatedAt:!0,updatedBy:!0,fields:[{name:"name",type:"uid",prefix:"s_",primaryKey:!0,interface:"input",uiSchema:{type:"string",title:'{{t("Channel name")}}',"x-component":"Input",required:!0,description:"{{t('Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter.')}}"}},{name:"title",type:"string",interface:"input",uiSchema:{type:"string","x-component":"Input",title:'{{t("Channel display name")}}',required:!0}},{name:"options",type:"json",interface:"json",uiSchema:{type:"object","x-component":"ConfigForm"}},{name:"meta",type:"json",interface:"json"},{interface:"input",type:"string",name:"notificationType",uiSchema:{type:"string",title:'{{t("Notification type")}}',"x-component":"Select",enum:"{{notificationTypeOptions}}",required:!0}},{name:"description",type:"text",interface:"textarea",uiSchema:{type:"string","x-component":"Input.TextArea",title:'{{t("Description")}}'}}]},p=n(488),d=n(667),y=n(705);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function g(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){h(i,r,o,a,l,"next",e)}function l(e){h(i,r,o,a,l,"throw",e)}a(void 0)})}}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function E(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}}(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function O(e){var t,n=(0,p.yr)().t,r=(0,i.useFlowContext)(),m=(0,c.useMemo)(function(){return r.api.resource(f.L.channels)},[r.api]),d=E(l.Form.useForm(),1)[0],y=E((0,c.useState)(!1),2),b=y[0],h=y[1],O=(0,c.useMemo)(function(){return"edit"===e.mode?(0,u.cloneDeep)(e.record||{}):{name:(0,i.randomId)("s_"),notificationType:e.notificationType,options:{}}},[e.mode,e.notificationType,e.record]);(0,c.useEffect)(function(){d.setFieldsValue(O)},[d,O]);var S=e.plugin.channelTypes.get(e.notificationType),j=null==S||null==(t=S.components)?void 0:t.ChannelConfigFormLoader,T=(0,c.useMemo)(function(){return j?(0,c.lazy)(j):null},[j]),A=(0,a.useMemoizedFn)(function(){return g(function(){var t,n,r;return w(this,function(o){switch(o.label){case 0:return[4,d.validateFields()];case 1:t=o.sent(),h(!0),o.label=2;case 2:if(o.trys.push([2,,8,9]),"create"!==e.mode)return[3,4];return[4,m.create({values:t})];case 3:case 5:return o.sent(),e.onSubmitted(),[3,7];case 4:var i,a;if((null==(n=e.record)?void 0:n.name)==null)return[3,6];return i=v({},(0,u.cloneDeep)(e.record),t),a=a={options:v({},e.record.options||{},t.options||{})},Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(a)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(a)).forEach(function(e){Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(a,e))}),r=i,[4,m.update({filterByTk:e.record.name,values:r})];case 6:throw Error("Edit mode requires record.name; got ".concat(JSON.stringify(e.record)));case 7:return[3,9];case 8:return h(!1),[7];case 9:return[2]}})})()});return s().createElement(o.DrawerFormLayout,{title:n("create"===e.mode?"Add new":"Edit"),onSubmit:A,submitting:b,submitText:n("Submit"),cancelText:n("Cancel")},s().createElement(l.Form,{form:d,layout:"vertical",initialValues:O},s().createElement(l.Form.Item,{name:"name",label:n("Channel name"),extra:n("Randomly generated and can not be modified. Support letters, numbers and underscores, must start with an letter."),rules:[{required:!0,message:n("The field value is required")}]},s().createElement(l.Input,{disabled:!0})),s().createElement(l.Form.Item,{name:"title",label:n("Channel display name"),rules:[{required:!0,message:n("The field value is required")}]},s().createElement(l.Input,null)),s().createElement(l.Form.Item,{name:"description",label:n("Description")},s().createElement(l.Input.TextArea,{autoSize:{minRows:2}})),s().createElement(l.Form.Item,{name:"notificationType",hidden:!0},s().createElement(l.Input,null)),T?s().createElement(c.Suspense,{fallback:s().createElement(l.Spin,null)},s().createElement(T,null)):null))}function S(){var e,t,n=(0,p.yr)().t,u=(0,p.kj)(),m=(0,i.useFlowContext)(),y=(0,i.useFlowEngine)(),b=l.theme.useToken().token,h=l.App.useApp(),S=h.modal,j=h.message,T=(0,c.useMemo)(function(){return m.api.resource(f.L.channels)},[m.api]),A=m.app.pm.get(d.A),k=(0,c.useMemo)(function(){var e,t,n,r;return null==(r=y.context.dataSourceManager)||null==(n=r.getDataSource)||null==(t=n.call(r,"main"))||null==(e=t.getCollection)?void 0:e.call(t,f.L.channels)},[y]),C=E((0,c.useState)(1),2),P=C[0],x=C[1],I=E((0,c.useState)(o.DEFAULT_PAGE_SIZE),2),F=I[0],D=I[1],_=E((0,c.useState)([]),2),M=_[0],z=_[1],q=E((0,c.useState)(void 0),2),N=q[0],R=q[1],B=(0,a.useRequest)(function(){return g(function(){return w(this,function(e){switch(e.label){case 0:return[4,T.list(v({page:P,pageSize:F,sort:["createdAt"]},N?{filter:N}:{}))];case 1:var t,n,r,o,i;return[2,{records:o=Array.isArray(r=null==(n=null==(t=e.sent())?void 0:t.data)?void 0:n.data)?r:Array.isArray(null==r?void 0:r.data)?r.data:[],total:(i=(null==n?void 0:n.meta)||(null==r?void 0:r.meta)||{}).count||i.total||o.length}]}})})()},{refreshDeps:[P,F,N]}),L=B.data,G=B.loading,K=B.refresh,U=(0,a.useMemoizedFn)(function(e,t){if(t!==F){D(t),x(1);return}x(e)}),V=(0,c.useMemo)(function(){return A?Array.from(A.channelTypes.getEntities()).map(function(e){return E(e,2)[1]}):[]},[A]),$=(0,a.useMemoizedFn)(function(e){if(!e)return"";var t=V.find(function(t){return t.type===e});return u((null==t?void 0:t.title)||e)}),J=(0,a.useMemoizedFn)(function(e,t,n){m.viewer.drawer({width:"50%",closable:!0,content:function(){return s().createElement(O,{mode:e,notificationType:t,plugin:A,record:n,onSubmitted:function(){return K()}})}})}),Z=(0,a.useMemoizedFn)(function(e){S.confirm({title:n("Delete"),content:n("Are you sure you want to delete it?"),onOk:function(){return g(function(){return w(this,function(t){switch(t.label){case 0:return[4,T.destroy({filterByTk:e})];case 1:return t.sent(),z([]),K(),[2]}})})()}})}),H=(null==(t=m.api)||null==(e=t.auth)?void 0:e.locale)==="zh-CN"?"https://docs-cn.nocobase.com/handbook/notification-manager":"https://docs.nocobase.com/handbook/notification-manager",Q=(0,c.useMemo)(function(){return V.filter(function(e){var t;return(null==(t=e.meta)?void 0:t.creatable)!==!1})},[V]),W=(0,c.useMemo)(function(){return 0===Q.length?{items:[{key:"__empty__",label:s().createElement(l.Empty,{image:l.Empty.PRESENTED_IMAGE_SIMPLE,description:s().createElement(s().Fragment,null,n("No channel enabled yet"),s().createElement("br",null),s().createElement("a",{target:"_blank",href:H,rel:"noreferrer"},n("View documentation")))})}]}:{items:Q.map(function(e){return{key:e.type,label:u(e.title),onClick:function(){return J("create",e.type)}}})}},[Q,u,H,J,n]),X=(0,c.useMemo)(function(){return[{title:n("Channel display name"),dataIndex:"title",ellipsis:!0,render:function(e){return e?u(e):""}},{title:n("Channel name"),dataIndex:"name",ellipsis:!0},{title:n("Description"),dataIndex:"description",ellipsis:!0,render:function(e){return e?u(e):""}},{title:n("Notification type"),dataIndex:"notificationType",render:function(e){return e?s().createElement(l.Tag,null,$(e)):null}},{title:n("Actions"),width:160,render:function(e,t){var r,o;return s().createElement(l.Space,null,(null==(r=t.meta)?void 0:r.editable)===!1?null:s().createElement("a",{onClick:function(){if(t.notificationType){if(!(null==A?void 0:A.channelTypes.get(t.notificationType)))return void j.error(n("Notification type {{type}} is not registered.").replace("{{type}}",t.notificationType));J("edit",t.notificationType,t)}}},n("Edit")),(null==(o=t.meta)?void 0:o.deletable)===!1?null:s().createElement("a",{onClick:function(){return Z(t.name)}},n("Delete")))}}]},[$,u,Z,j,J,A,n]);return s().createElement(l.Card,{variant:"borderless"},s().createElement(l.Flex,{justify:"space-between",style:{marginBottom:b.margin}},s().createElement(o.CollectionFilter,{collection:k,onChange:R,t:u}),s().createElement(l.Space,null,s().createElement(l.Button,{icon:s().createElement(r.ReloadOutlined,null),onClick:function(){return K()}},n("Refresh")),s().createElement(l.Button,{icon:s().createElement(r.DeleteOutlined,null),disabled:!M.length,onClick:function(){return Z(M)}},n("Delete")),s().createElement(l.Dropdown,{menu:W},s().createElement(l.Button,{type:"primary",icon:s().createElement(r.PlusOutlined,null)},n("Add new")," ",s().createElement(r.DownOutlined,null))))),s().createElement(o.Table,{rowKey:"name",loading:G,columns:X,dataSource:(null==L?void 0:L.records)||[],rowSelection:{selectedRowKeys:M,onChange:z},pagination:{current:P,pageSize:F,total:(null==L?void 0:L.total)||0,onChange:U}}))}function j(){var e=(0,i.useFlowContext)(),t=(0,p.kj)(),n=e.app.pm.get(d.A),r=(0,c.useMemo)(function(){var e=(0,y.k)(n,t);return[(0,y.N)(m,e)]},[n,t]);return s().createElement(o.ExtendCollectionsProvider,{collections:r},s().createElement(S,null))}},705:function(e,t,n){function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}function i(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function a(e,t){return e?Array.from(e.channelTypes.getEntities()).map(function(e){var n=(function(e){if(Array.isArray(e))return e}(e)||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(e)||function(e){if(e){if("string"==typeof e)return r(e,2);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(e,2)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];return{label:t(n.title),value:n.type}}):[]}function l(e,t){return i(o({},e),{fields:e.fields.map(function(e){return(null==e?void 0:e.name)==="notificationType"&&e.uiSchema?i(o({},e),{uiSchema:i(o({},e.uiSchema),{enum:t})}):e})})}n.d(t,{N:function(){return l},k:function(){return a}})}}]);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type * from './types.js';
|
|
2
|
-
export { default as MAX } from './max.js';
|
|
3
|
-
export { default as NIL } from './nil.js';
|
|
4
|
-
export { default as parse } from './parse.js';
|
|
5
|
-
export { default as stringify } from './stringify.js';
|
|
6
|
-
export { default as v1 } from './v1.js';
|
|
7
|
-
export { default as v1ToV6 } from './v1ToV6.js';
|
|
8
|
-
export { default as v3 } from './v3.js';
|
|
9
|
-
export { default as v4 } from './v4.js';
|
|
10
|
-
export { default as v5 } from './v5.js';
|
|
11
|
-
export { default as v6 } from './v6.js';
|
|
12
|
-
export { default as v6ToV1 } from './v6ToV1.js';
|
|
13
|
-
export { default as v7 } from './v7.js';
|
|
14
|
-
export { default as validate } from './validate.js';
|
|
15
|
-
export { default as version } from './version.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e={113:e=>{e.exports=require("crypto")},838:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]="ffffffff-ffff-ffff-ffff-ffffffffffff"},905:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(113);function md5(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return(0,n.createHash)("md5").update(e).digest()}t["default"]=md5},622:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(113);t["default"]={randomUUID:n.randomUUID}},578:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]="00000000-0000-0000-0000-000000000000"},526:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(53);function parse(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}t["default"]=parse},556:(e,t)=>{Object.defineProperty(t,"__esModule",{value:true});t["default"]=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i},186:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(113);const f=new Uint8Array(256);let u=f.length;function rng(){if(u>f.length-16){(0,n.randomFillSync)(f);u=0}return f.slice(u,u+=16)}t["default"]=rng},850:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(113);function sha1(e){if(Array.isArray(e)){e=Buffer.from(e)}else if(typeof e==="string"){e=Buffer.from(e,"utf8")}return(0,n.createHash)("sha1").update(e).digest()}t["default"]=sha1},428:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.unsafeStringify=void 0;const n=r(53);const f=[];for(let e=0;e<256;++e){f.push((e+256).toString(16).slice(1))}function unsafeStringify(e,t=0){return(f[e[t+0]]+f[e[t+1]]+f[e[t+2]]+f[e[t+3]]+"-"+f[e[t+4]]+f[e[t+5]]+"-"+f[e[t+6]]+f[e[t+7]]+"-"+f[e[t+8]]+f[e[t+9]]+"-"+f[e[t+10]]+f[e[t+11]]+f[e[t+12]]+f[e[t+13]]+f[e[t+14]]+f[e[t+15]]).toLowerCase()}t.unsafeStringify=unsafeStringify;function stringify(e,t=0){const r=unsafeStringify(e,t);if(!(0,n.default)(r)){throw TypeError("Stringified UUID is invalid")}return r}t["default"]=stringify},904:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.updateV1State=void 0;const n=r(186);const f=r(428);const u={};function v1(e,t,r){let o;const a=e?._v6??false;if(e){const t=Object.keys(e);if(t.length===1&&t[0]==="_v6"){e=undefined}}if(e){o=v1Bytes(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.nsecs,e.clockseq,e.node,t,r)}else{const e=Date.now();const f=(0,n.default)();updateV1State(u,e,f);o=v1Bytes(f,u.msecs,u.nsecs,a?undefined:u.clockseq,a?undefined:u.node,t,r)}return t??(0,f.unsafeStringify)(o)}function updateV1State(e,t,r){e.msecs??=-Infinity;e.nsecs??=0;if(t===e.msecs){e.nsecs++;if(e.nsecs>=1e4){e.node=undefined;e.nsecs=0}}else if(t>e.msecs){e.nsecs=0}else if(t<e.msecs){e.node=undefined}if(!e.node){e.node=r.slice(10,16);e.node[0]|=1;e.clockseq=(r[8]<<8|r[9])&16383}e.msecs=t;return e}t.updateV1State=updateV1State;function v1Bytes(e,t,r,n,f,u,o=0){if(e.length<16){throw new Error("Random bytes length must be >= 16")}if(!u){u=new Uint8Array(16);o=0}else{if(o<0||o+16>u.length){throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`)}}t??=Date.now();r??=0;n??=(e[8]<<8|e[9])&16383;f??=e.slice(10,16);t+=122192928e5;const a=((t&268435455)*1e4+r)%4294967296;u[o++]=a>>>24&255;u[o++]=a>>>16&255;u[o++]=a>>>8&255;u[o++]=a&255;const i=t/4294967296*1e4&268435455;u[o++]=i>>>8&255;u[o++]=i&255;u[o++]=i>>>24&15|16;u[o++]=i>>>16&255;u[o++]=n>>>8|128;u[o++]=n&255;for(let e=0;e<6;++e){u[o++]=f[e]}return u}t["default"]=v1},728:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(526);const f=r(428);function v1ToV6(e){const t=typeof e==="string"?(0,n.default)(e):e;const r=_v1ToV6(t);return typeof e==="string"?(0,f.unsafeStringify)(r):r}t["default"]=v1ToV6;function _v1ToV6(e){return Uint8Array.of((e[6]&15)<<4|e[7]>>4&15,(e[7]&15)<<4|(e[4]&240)>>4,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,(e[1]&15)<<4|(e[2]&240)>>4,96|e[2]&15,e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}},261:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;const n=r(905);const f=r(42);var u=r(42);Object.defineProperty(t,"DNS",{enumerable:true,get:function(){return u.DNS}});Object.defineProperty(t,"URL",{enumerable:true,get:function(){return u.URL}});function v3(e,t,r,u){return(0,f.default)(48,n.default,e,t,r,u)}v3.DNS=f.DNS;v3.URL=f.URL;t["default"]=v3},42:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=t.stringToBytes=void 0;const n=r(526);const f=r(428);function stringToBytes(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let r=0;r<e.length;++r){t[r]=e.charCodeAt(r)}return t}t.stringToBytes=stringToBytes;t.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8";t.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function v35(e,t,r,u,o,a){const i=typeof r==="string"?stringToBytes(r):r;const s=typeof u==="string"?(0,n.default)(u):u;if(typeof u==="string"){u=(0,n.default)(u)}if(u?.length!==16){throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)")}let c=new Uint8Array(16+i.length);c.set(s);c.set(i,s.length);c=t(c);c[6]=c[6]&15|e;c[8]=c[8]&63|128;if(o){a=a||0;if(a<0||a+16>o.length){throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}for(let e=0;e<16;++e){o[a+e]=c[e]}return o}return(0,f.unsafeStringify)(c)}t["default"]=v35},79:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(622);const f=r(186);const u=r(428);function v4(e,t,r){if(n.default.randomUUID&&!t&&!e){return n.default.randomUUID()}e=e||{};const o=e.random??e.rng?.()??(0,f.default)();if(o.length<16){throw new Error("Random bytes length must be >= 16")}o[6]=o[6]&15|64;o[8]=o[8]&63|128;if(t){r=r||0;if(r<0||r+16>t.length){throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`)}for(let e=0;e<16;++e){t[r+e]=o[e]}return t}return(0,u.unsafeStringify)(o)}t["default"]=v4},985:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.URL=t.DNS=void 0;const n=r(850);const f=r(42);var u=r(42);Object.defineProperty(t,"DNS",{enumerable:true,get:function(){return u.DNS}});Object.defineProperty(t,"URL",{enumerable:true,get:function(){return u.URL}});function v5(e,t,r,u){return(0,f.default)(80,n.default,e,t,r,u)}v5.DNS=f.DNS;v5.URL=f.URL;t["default"]=v5},952:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(428);const f=r(904);const u=r(728);function v6(e,t,r){e??={};r??=0;let o=(0,f.default)({...e,_v6:true},new Uint8Array(16));o=(0,u.default)(o);if(t){if(r<0||r+16>t.length){throw new RangeError(`UUID byte range ${r}:${r+15} is out of buffer bounds`)}for(let e=0;e<16;e++){t[r+e]=o[e]}return t}return(0,n.unsafeStringify)(o)}t["default"]=v6},112:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(526);const f=r(428);function v6ToV1(e){const t=typeof e==="string"?(0,n.default)(e):e;const r=_v6ToV1(t);return typeof e==="string"?(0,f.unsafeStringify)(r):r}t["default"]=v6ToV1;function _v6ToV1(e){return Uint8Array.of((e[3]&15)<<4|e[4]>>4&15,(e[4]&15)<<4|(e[5]&240)>>4,(e[5]&15)<<4|e[6]&15,e[7],(e[1]&15)<<4|(e[2]&240)>>4,(e[2]&15)<<4|(e[3]&240)>>4,16|(e[0]&240)>>4,(e[0]&15)<<4|(e[1]&240)>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}},598:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});t.updateV7State=void 0;const n=r(186);const f=r(428);const u={};function v7(e,t,r){let o;if(e){o=v7Bytes(e.random??e.rng?.()??(0,n.default)(),e.msecs,e.seq,t,r)}else{const e=Date.now();const f=(0,n.default)();updateV7State(u,e,f);o=v7Bytes(f,u.msecs,u.seq,t,r)}return t??(0,f.unsafeStringify)(o)}function updateV7State(e,t,r){e.msecs??=-Infinity;e.seq??=0;if(t>e.msecs){e.seq=r[6]<<23|r[7]<<16|r[8]<<8|r[9];e.msecs=t}else{e.seq=e.seq+1|0;if(e.seq===0){e.msecs++}}return e}t.updateV7State=updateV7State;function v7Bytes(e,t,r,n,f=0){if(e.length<16){throw new Error("Random bytes length must be >= 16")}if(!n){n=new Uint8Array(16);f=0}else{if(f<0||f+16>n.length){throw new RangeError(`UUID byte range ${f}:${f+15} is out of buffer bounds`)}}t??=Date.now();r??=e[6]*127<<24|e[7]<<16|e[8]<<8|e[9];n[f++]=t/1099511627776&255;n[f++]=t/4294967296&255;n[f++]=t/16777216&255;n[f++]=t/65536&255;n[f++]=t/256&255;n[f++]=t&255;n[f++]=112|r>>>28&15;n[f++]=r>>>20&255;n[f++]=128|r>>>14&63;n[f++]=r>>>6&255;n[f++]=r<<2&255|e[10]&3;n[f++]=e[11];n[f++]=e[12];n[f++]=e[13];n[f++]=e[14];n[f++]=e[15];return n}t["default"]=v7},53:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(556);function validate(e){return typeof e==="string"&&n.default.test(e)}t["default"]=validate},384:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:true});const n=r(53);function version(e){if(!(0,n.default)(e)){throw TypeError("Invalid UUID")}return parseInt(e.slice(14,15),16)}t["default"]=version}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var f=t[r]={exports:{}};var u=true;try{e[r](f,f.exports,__nccwpck_require__);u=false}finally{if(u)delete t[r]}return f.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.version=e.validate=e.v7=e.v6ToV1=e.v6=e.v5=e.v4=e.v3=e.v1ToV6=e.v1=e.stringify=e.parse=e.NIL=e.MAX=void 0;var t=__nccwpck_require__(838);Object.defineProperty(e,"MAX",{enumerable:true,get:function(){return t.default}});var n=__nccwpck_require__(578);Object.defineProperty(e,"NIL",{enumerable:true,get:function(){return n.default}});var f=__nccwpck_require__(526);Object.defineProperty(e,"parse",{enumerable:true,get:function(){return f.default}});var u=__nccwpck_require__(428);Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return u.default}});var o=__nccwpck_require__(904);Object.defineProperty(e,"v1",{enumerable:true,get:function(){return o.default}});var a=__nccwpck_require__(728);Object.defineProperty(e,"v1ToV6",{enumerable:true,get:function(){return a.default}});var i=__nccwpck_require__(261);Object.defineProperty(e,"v3",{enumerable:true,get:function(){return i.default}});var s=__nccwpck_require__(79);Object.defineProperty(e,"v4",{enumerable:true,get:function(){return s.default}});var c=__nccwpck_require__(985);Object.defineProperty(e,"v5",{enumerable:true,get:function(){return c.default}});var d=__nccwpck_require__(952);Object.defineProperty(e,"v6",{enumerable:true,get:function(){return d.default}});var l=__nccwpck_require__(112);Object.defineProperty(e,"v6ToV1",{enumerable:true,get:function(){return l.default}});var _=__nccwpck_require__(598);Object.defineProperty(e,"v7",{enumerable:true,get:function(){return _.default}});var v=__nccwpck_require__(53);Object.defineProperty(e,"validate",{enumerable:true,get:function(){return v.default}});var y=__nccwpck_require__(384);Object.defineProperty(e,"version",{enumerable:true,get:function(){return y.default}})})();module.exports=r})();
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const crypto_1 = require("crypto");
|
|
4
|
-
function md5(bytes) {
|
|
5
|
-
if (Array.isArray(bytes)) {
|
|
6
|
-
bytes = Buffer.from(bytes);
|
|
7
|
-
}
|
|
8
|
-
else if (typeof bytes === 'string') {
|
|
9
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
10
|
-
}
|
|
11
|
-
return (0, crypto_1.createHash)('md5').update(bytes).digest();
|
|
12
|
-
}
|
|
13
|
-
exports.default = md5;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"type":"commonjs"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const validate_js_1 = require("./validate.js");
|
|
4
|
-
function parse(uuid) {
|
|
5
|
-
if (!(0, validate_js_1.default)(uuid)) {
|
|
6
|
-
throw TypeError('Invalid UUID');
|
|
7
|
-
}
|
|
8
|
-
let v;
|
|
9
|
-
return Uint8Array.of((v = parseInt(uuid.slice(0, 8), 16)) >>> 24, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff, (v = parseInt(uuid.slice(9, 13), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(14, 18), 16)) >>> 8, v & 0xff, (v = parseInt(uuid.slice(19, 23), 16)) >>> 8, v & 0xff, ((v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000) & 0xff, (v / 0x100000000) & 0xff, (v >>> 24) & 0xff, (v >>> 16) & 0xff, (v >>> 8) & 0xff, v & 0xff);
|
|
10
|
-
}
|
|
11
|
-
exports.default = parse;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function rng(): Uint8Array;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const crypto_1 = require("crypto");
|
|
4
|
-
const rnds8Pool = new Uint8Array(256);
|
|
5
|
-
let poolPtr = rnds8Pool.length;
|
|
6
|
-
function rng() {
|
|
7
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
8
|
-
(0, crypto_1.randomFillSync)(rnds8Pool);
|
|
9
|
-
poolPtr = 0;
|
|
10
|
-
}
|
|
11
|
-
return rnds8Pool.slice(poolPtr, (poolPtr += 16));
|
|
12
|
-
}
|
|
13
|
-
exports.default = rng;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const crypto_1 = require("crypto");
|
|
4
|
-
function sha1(bytes) {
|
|
5
|
-
if (Array.isArray(bytes)) {
|
|
6
|
-
bytes = Buffer.from(bytes);
|
|
7
|
-
}
|
|
8
|
-
else if (typeof bytes === 'string') {
|
|
9
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
10
|
-
}
|
|
11
|
-
return (0, crypto_1.createHash)('sha1').update(bytes).digest();
|
|
12
|
-
}
|
|
13
|
-
exports.default = sha1;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.unsafeStringify = void 0;
|
|
4
|
-
const validate_js_1 = require("./validate.js");
|
|
5
|
-
const byteToHex = [];
|
|
6
|
-
for (let i = 0; i < 256; ++i) {
|
|
7
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
8
|
-
}
|
|
9
|
-
function unsafeStringify(arr, offset = 0) {
|
|
10
|
-
return (byteToHex[arr[offset + 0]] +
|
|
11
|
-
byteToHex[arr[offset + 1]] +
|
|
12
|
-
byteToHex[arr[offset + 2]] +
|
|
13
|
-
byteToHex[arr[offset + 3]] +
|
|
14
|
-
'-' +
|
|
15
|
-
byteToHex[arr[offset + 4]] +
|
|
16
|
-
byteToHex[arr[offset + 5]] +
|
|
17
|
-
'-' +
|
|
18
|
-
byteToHex[arr[offset + 6]] +
|
|
19
|
-
byteToHex[arr[offset + 7]] +
|
|
20
|
-
'-' +
|
|
21
|
-
byteToHex[arr[offset + 8]] +
|
|
22
|
-
byteToHex[arr[offset + 9]] +
|
|
23
|
-
'-' +
|
|
24
|
-
byteToHex[arr[offset + 10]] +
|
|
25
|
-
byteToHex[arr[offset + 11]] +
|
|
26
|
-
byteToHex[arr[offset + 12]] +
|
|
27
|
-
byteToHex[arr[offset + 13]] +
|
|
28
|
-
byteToHex[arr[offset + 14]] +
|
|
29
|
-
byteToHex[arr[offset + 15]]).toLowerCase();
|
|
30
|
-
}
|
|
31
|
-
exports.unsafeStringify = unsafeStringify;
|
|
32
|
-
function stringify(arr, offset = 0) {
|
|
33
|
-
const uuid = unsafeStringify(arr, offset);
|
|
34
|
-
if (!(0, validate_js_1.default)(uuid)) {
|
|
35
|
-
throw TypeError('Stringified UUID is invalid');
|
|
36
|
-
}
|
|
37
|
-
return uuid;
|
|
38
|
-
}
|
|
39
|
-
exports.default = stringify;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
export type UUIDTypes<TBuf extends Uint8Array = Uint8Array> = string | TBuf;
|
|
2
|
-
export type Version1Options = {
|
|
3
|
-
node?: Uint8Array;
|
|
4
|
-
clockseq?: number;
|
|
5
|
-
random?: Uint8Array;
|
|
6
|
-
rng?: () => Uint8Array;
|
|
7
|
-
msecs?: number;
|
|
8
|
-
nsecs?: number;
|
|
9
|
-
_v6?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export type Version4Options = {
|
|
12
|
-
random?: Uint8Array;
|
|
13
|
-
rng?: () => Uint8Array;
|
|
14
|
-
};
|
|
15
|
-
export type Version6Options = Version1Options;
|
|
16
|
-
export type Version7Options = {
|
|
17
|
-
random?: Uint8Array;
|
|
18
|
-
msecs?: number;
|
|
19
|
-
seq?: number;
|
|
20
|
-
rng?: () => Uint8Array;
|
|
21
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const assert = require("assert");
|
|
4
|
-
const v1_js_1 = require("./v1.js");
|
|
5
|
-
const v3_js_1 = require("./v3.js");
|
|
6
|
-
const v4_js_1 = require("./v4.js");
|
|
7
|
-
const v5_js_1 = require("./v5.js");
|
|
8
|
-
const v6_js_1 = require("./v6.js");
|
|
9
|
-
const v7_js_1 = require("./v7.js");
|
|
10
|
-
function usage() {
|
|
11
|
-
console.log('Usage:');
|
|
12
|
-
console.log(' uuid');
|
|
13
|
-
console.log(' uuid v1');
|
|
14
|
-
console.log(' uuid v3 <name> <namespace uuid>');
|
|
15
|
-
console.log(' uuid v4');
|
|
16
|
-
console.log(' uuid v5 <name> <namespace uuid>');
|
|
17
|
-
console.log(' uuid v6');
|
|
18
|
-
console.log(' uuid v7');
|
|
19
|
-
console.log(' uuid --help');
|
|
20
|
-
console.log('\nNote: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs defined by RFC9562');
|
|
21
|
-
}
|
|
22
|
-
const args = process.argv.slice(2);
|
|
23
|
-
if (args.indexOf('--help') >= 0) {
|
|
24
|
-
usage();
|
|
25
|
-
process.exit(0);
|
|
26
|
-
}
|
|
27
|
-
const version = args.shift() || 'v4';
|
|
28
|
-
switch (version) {
|
|
29
|
-
case 'v1':
|
|
30
|
-
console.log((0, v1_js_1.default)());
|
|
31
|
-
break;
|
|
32
|
-
case 'v3': {
|
|
33
|
-
const name = args.shift();
|
|
34
|
-
let namespace = args.shift();
|
|
35
|
-
assert.ok(name != null, 'v3 name not specified');
|
|
36
|
-
assert.ok(namespace != null, 'v3 namespace not specified');
|
|
37
|
-
if (namespace === 'URL') {
|
|
38
|
-
namespace = v3_js_1.default.URL;
|
|
39
|
-
}
|
|
40
|
-
if (namespace === 'DNS') {
|
|
41
|
-
namespace = v3_js_1.default.DNS;
|
|
42
|
-
}
|
|
43
|
-
console.log((0, v3_js_1.default)(name, namespace));
|
|
44
|
-
break;
|
|
45
|
-
}
|
|
46
|
-
case 'v4':
|
|
47
|
-
console.log((0, v4_js_1.default)());
|
|
48
|
-
break;
|
|
49
|
-
case 'v5': {
|
|
50
|
-
const name = args.shift();
|
|
51
|
-
let namespace = args.shift();
|
|
52
|
-
assert.ok(name != null, 'v5 name not specified');
|
|
53
|
-
assert.ok(namespace != null, 'v5 namespace not specified');
|
|
54
|
-
if (namespace === 'URL') {
|
|
55
|
-
namespace = v5_js_1.default.URL;
|
|
56
|
-
}
|
|
57
|
-
if (namespace === 'DNS') {
|
|
58
|
-
namespace = v5_js_1.default.DNS;
|
|
59
|
-
}
|
|
60
|
-
console.log((0, v5_js_1.default)(name, namespace));
|
|
61
|
-
break;
|
|
62
|
-
}
|
|
63
|
-
case 'v6':
|
|
64
|
-
console.log((0, v6_js_1.default)());
|
|
65
|
-
break;
|
|
66
|
-
case 'v7':
|
|
67
|
-
console.log((0, v7_js_1.default)());
|
|
68
|
-
break;
|
|
69
|
-
default:
|
|
70
|
-
usage();
|
|
71
|
-
process.exit(1);
|
|
72
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Version1Options } from './types.js';
|
|
2
|
-
type V1State = {
|
|
3
|
-
node?: Uint8Array;
|
|
4
|
-
clockseq?: number;
|
|
5
|
-
msecs?: number;
|
|
6
|
-
nsecs?: number;
|
|
7
|
-
};
|
|
8
|
-
declare function v1(options?: Version1Options, buf?: undefined, offset?: number): string;
|
|
9
|
-
declare function v1<Buf extends Uint8Array = Uint8Array>(options: Version1Options | undefined, buf: Buf, offset?: number): Buf;
|
|
10
|
-
export declare function updateV1State(state: V1State, now: number, rnds: Uint8Array): V1State;
|
|
11
|
-
export default v1;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateV1State = void 0;
|
|
4
|
-
const rng_js_1 = require("./rng.js");
|
|
5
|
-
const stringify_js_1 = require("./stringify.js");
|
|
6
|
-
const _state = {};
|
|
7
|
-
function v1(options, buf, offset) {
|
|
8
|
-
let bytes;
|
|
9
|
-
const isV6 = options?._v6 ?? false;
|
|
10
|
-
if (options) {
|
|
11
|
-
const optionsKeys = Object.keys(options);
|
|
12
|
-
if (optionsKeys.length === 1 && optionsKeys[0] === '_v6') {
|
|
13
|
-
options = undefined;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
if (options) {
|
|
17
|
-
bytes = v1Bytes(options.random ?? options.rng?.() ?? (0, rng_js_1.default)(), options.msecs, options.nsecs, options.clockseq, options.node, buf, offset);
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
const now = Date.now();
|
|
21
|
-
const rnds = (0, rng_js_1.default)();
|
|
22
|
-
updateV1State(_state, now, rnds);
|
|
23
|
-
bytes = v1Bytes(rnds, _state.msecs, _state.nsecs, isV6 ? undefined : _state.clockseq, isV6 ? undefined : _state.node, buf, offset);
|
|
24
|
-
}
|
|
25
|
-
return buf ?? (0, stringify_js_1.unsafeStringify)(bytes);
|
|
26
|
-
}
|
|
27
|
-
function updateV1State(state, now, rnds) {
|
|
28
|
-
state.msecs ??= -Infinity;
|
|
29
|
-
state.nsecs ??= 0;
|
|
30
|
-
if (now === state.msecs) {
|
|
31
|
-
state.nsecs++;
|
|
32
|
-
if (state.nsecs >= 10000) {
|
|
33
|
-
state.node = undefined;
|
|
34
|
-
state.nsecs = 0;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else if (now > state.msecs) {
|
|
38
|
-
state.nsecs = 0;
|
|
39
|
-
}
|
|
40
|
-
else if (now < state.msecs) {
|
|
41
|
-
state.node = undefined;
|
|
42
|
-
}
|
|
43
|
-
if (!state.node) {
|
|
44
|
-
state.node = rnds.slice(10, 16);
|
|
45
|
-
state.node[0] |= 0x01;
|
|
46
|
-
state.clockseq = ((rnds[8] << 8) | rnds[9]) & 0x3fff;
|
|
47
|
-
}
|
|
48
|
-
state.msecs = now;
|
|
49
|
-
return state;
|
|
50
|
-
}
|
|
51
|
-
exports.updateV1State = updateV1State;
|
|
52
|
-
function v1Bytes(rnds, msecs, nsecs, clockseq, node, buf, offset = 0) {
|
|
53
|
-
if (rnds.length < 16) {
|
|
54
|
-
throw new Error('Random bytes length must be >= 16');
|
|
55
|
-
}
|
|
56
|
-
if (!buf) {
|
|
57
|
-
buf = new Uint8Array(16);
|
|
58
|
-
offset = 0;
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
62
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
msecs ??= Date.now();
|
|
66
|
-
nsecs ??= 0;
|
|
67
|
-
clockseq ??= ((rnds[8] << 8) | rnds[9]) & 0x3fff;
|
|
68
|
-
node ??= rnds.slice(10, 16);
|
|
69
|
-
msecs += 12219292800000;
|
|
70
|
-
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
71
|
-
buf[offset++] = (tl >>> 24) & 0xff;
|
|
72
|
-
buf[offset++] = (tl >>> 16) & 0xff;
|
|
73
|
-
buf[offset++] = (tl >>> 8) & 0xff;
|
|
74
|
-
buf[offset++] = tl & 0xff;
|
|
75
|
-
const tmh = ((msecs / 0x100000000) * 10000) & 0xfffffff;
|
|
76
|
-
buf[offset++] = (tmh >>> 8) & 0xff;
|
|
77
|
-
buf[offset++] = tmh & 0xff;
|
|
78
|
-
buf[offset++] = ((tmh >>> 24) & 0xf) | 0x10;
|
|
79
|
-
buf[offset++] = (tmh >>> 16) & 0xff;
|
|
80
|
-
buf[offset++] = (clockseq >>> 8) | 0x80;
|
|
81
|
-
buf[offset++] = clockseq & 0xff;
|
|
82
|
-
for (let n = 0; n < 6; ++n) {
|
|
83
|
-
buf[offset++] = node[n];
|
|
84
|
-
}
|
|
85
|
-
return buf;
|
|
86
|
-
}
|
|
87
|
-
exports.default = v1;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const parse_js_1 = require("./parse.js");
|
|
4
|
-
const stringify_js_1 = require("./stringify.js");
|
|
5
|
-
function v1ToV6(uuid) {
|
|
6
|
-
const v1Bytes = typeof uuid === 'string' ? (0, parse_js_1.default)(uuid) : uuid;
|
|
7
|
-
const v6Bytes = _v1ToV6(v1Bytes);
|
|
8
|
-
return typeof uuid === 'string' ? (0, stringify_js_1.unsafeStringify)(v6Bytes) : v6Bytes;
|
|
9
|
-
}
|
|
10
|
-
exports.default = v1ToV6;
|
|
11
|
-
function _v1ToV6(v1Bytes) {
|
|
12
|
-
return Uint8Array.of(((v1Bytes[6] & 0x0f) << 4) | ((v1Bytes[7] >> 4) & 0x0f), ((v1Bytes[7] & 0x0f) << 4) | ((v1Bytes[4] & 0xf0) >> 4), ((v1Bytes[4] & 0x0f) << 4) | ((v1Bytes[5] & 0xf0) >> 4), ((v1Bytes[5] & 0x0f) << 4) | ((v1Bytes[0] & 0xf0) >> 4), ((v1Bytes[0] & 0x0f) << 4) | ((v1Bytes[1] & 0xf0) >> 4), ((v1Bytes[1] & 0x0f) << 4) | ((v1Bytes[2] & 0xf0) >> 4), 0x60 | (v1Bytes[2] & 0x0f), v1Bytes[3], v1Bytes[8], v1Bytes[9], v1Bytes[10], v1Bytes[11], v1Bytes[12], v1Bytes[13], v1Bytes[14], v1Bytes[15]);
|
|
13
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export { DNS, URL } from './v35.js';
|
|
3
|
-
declare function v3(value: string | Uint8Array, namespace: UUIDTypes, buf?: undefined, offset?: number): string;
|
|
4
|
-
declare function v3<TBuf extends Uint8Array = Uint8Array>(value: string | Uint8Array, namespace: UUIDTypes, buf: TBuf, offset?: number): TBuf;
|
|
5
|
-
declare namespace v3 {
|
|
6
|
-
var DNS: string;
|
|
7
|
-
var URL: string;
|
|
8
|
-
}
|
|
9
|
-
export default v3;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.URL = exports.DNS = void 0;
|
|
4
|
-
const md5_js_1 = require("./md5.js");
|
|
5
|
-
const v35_js_1 = require("./v35.js");
|
|
6
|
-
var v35_js_2 = require("./v35.js");
|
|
7
|
-
Object.defineProperty(exports, "DNS", { enumerable: true, get: function () { return v35_js_2.DNS; } });
|
|
8
|
-
Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return v35_js_2.URL; } });
|
|
9
|
-
function v3(value, namespace, buf, offset) {
|
|
10
|
-
return (0, v35_js_1.default)(0x30, md5_js_1.default, value, namespace, buf, offset);
|
|
11
|
-
}
|
|
12
|
-
v3.DNS = v35_js_1.DNS;
|
|
13
|
-
v3.URL = v35_js_1.URL;
|
|
14
|
-
exports.default = v3;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { UUIDTypes } from './types.js';
|
|
2
|
-
export declare function stringToBytes(str: string): Uint8Array;
|
|
3
|
-
export declare const DNS = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
|
|
4
|
-
export declare const URL = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
|
|
5
|
-
type HashFunction = (bytes: Uint8Array) => Uint8Array;
|
|
6
|
-
export default function v35<TBuf extends Uint8Array = Uint8Array>(version: 0x30 | 0x50, hash: HashFunction, value: string | Uint8Array, namespace: UUIDTypes, buf?: TBuf, offset?: number): UUIDTypes<TBuf>;
|
|
7
|
-
export {};
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.URL = exports.DNS = exports.stringToBytes = void 0;
|
|
4
|
-
const parse_js_1 = require("./parse.js");
|
|
5
|
-
const stringify_js_1 = require("./stringify.js");
|
|
6
|
-
function stringToBytes(str) {
|
|
7
|
-
str = unescape(encodeURIComponent(str));
|
|
8
|
-
const bytes = new Uint8Array(str.length);
|
|
9
|
-
for (let i = 0; i < str.length; ++i) {
|
|
10
|
-
bytes[i] = str.charCodeAt(i);
|
|
11
|
-
}
|
|
12
|
-
return bytes;
|
|
13
|
-
}
|
|
14
|
-
exports.stringToBytes = stringToBytes;
|
|
15
|
-
exports.DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
16
|
-
exports.URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
17
|
-
function v35(version, hash, value, namespace, buf, offset) {
|
|
18
|
-
const valueBytes = typeof value === 'string' ? stringToBytes(value) : value;
|
|
19
|
-
const namespaceBytes = typeof namespace === 'string' ? (0, parse_js_1.default)(namespace) : namespace;
|
|
20
|
-
if (typeof namespace === 'string') {
|
|
21
|
-
namespace = (0, parse_js_1.default)(namespace);
|
|
22
|
-
}
|
|
23
|
-
if (namespace?.length !== 16) {
|
|
24
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
25
|
-
}
|
|
26
|
-
let bytes = new Uint8Array(16 + valueBytes.length);
|
|
27
|
-
bytes.set(namespaceBytes);
|
|
28
|
-
bytes.set(valueBytes, namespaceBytes.length);
|
|
29
|
-
bytes = hash(bytes);
|
|
30
|
-
bytes[6] = (bytes[6] & 0x0f) | version;
|
|
31
|
-
bytes[8] = (bytes[8] & 0x3f) | 0x80;
|
|
32
|
-
if (buf) {
|
|
33
|
-
offset = offset || 0;
|
|
34
|
-
if (offset < 0 || offset + 16 > buf.length) {
|
|
35
|
-
throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);
|
|
36
|
-
}
|
|
37
|
-
for (let i = 0; i < 16; ++i) {
|
|
38
|
-
buf[offset + i] = bytes[i];
|
|
39
|
-
}
|
|
40
|
-
return buf;
|
|
41
|
-
}
|
|
42
|
-
return (0, stringify_js_1.unsafeStringify)(bytes);
|
|
43
|
-
}
|
|
44
|
-
exports.default = v35;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Version4Options } from './types.js';
|
|
2
|
-
declare function v4(options?: Version4Options, buf?: undefined, offset?: number): string;
|
|
3
|
-
declare function v4<TBuf extends Uint8Array = Uint8Array>(options: Version4Options | undefined, buf: TBuf, offset?: number): TBuf;
|
|
4
|
-
export default v4;
|