node-red-contrib-tak-registration 0.11.5 → 0.12.0
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/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/assert.d.ts +88 -44
- package/node_modules/@types/node/async_hooks.d.ts +17 -15
- package/node_modules/@types/node/buffer.d.ts +37 -36
- package/node_modules/@types/node/child_process.d.ts +38 -34
- package/node_modules/@types/node/cluster.d.ts +165 -19
- package/node_modules/@types/node/console.d.ts +64 -27
- package/node_modules/@types/node/crypto.d.ts +139 -72
- package/node_modules/@types/node/dgram.d.ts +24 -14
- package/node_modules/@types/node/diagnostics_channel.d.ts +365 -2
- package/node_modules/@types/node/dns/promises.d.ts +79 -28
- package/node_modules/@types/node/dns.d.ts +124 -69
- package/node_modules/@types/node/dom-events.d.ts +2 -0
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +115 -63
- package/node_modules/@types/node/fs/promises.d.ts +18 -12
- package/node_modules/@types/node/fs.d.ts +72 -46
- package/node_modules/@types/node/globals.d.ts +27 -0
- package/node_modules/@types/node/http.d.ts +75 -55
- package/node_modules/@types/node/http2.d.ts +83 -47
- package/node_modules/@types/node/https.d.ts +3 -3
- package/node_modules/@types/node/index.d.ts +1 -0
- package/node_modules/@types/node/inspector.d.ts +5 -6
- package/node_modules/@types/node/module.d.ts +14 -0
- package/node_modules/@types/node/net.d.ts +66 -16
- package/node_modules/@types/node/os.d.ts +29 -12
- package/node_modules/@types/node/package.json +3 -16
- package/node_modules/@types/node/path.d.ts +1 -1
- package/node_modules/@types/node/perf_hooks.d.ts +320 -54
- package/node_modules/@types/node/process.d.ts +265 -50
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +21 -9
- package/node_modules/@types/node/readline/promises.d.ts +9 -9
- package/node_modules/@types/node/readline.d.ts +21 -20
- package/node_modules/@types/node/repl.d.ts +10 -10
- package/node_modules/@types/node/sea.d.ts +153 -0
- package/node_modules/@types/node/stream/web.d.ts +18 -1
- package/node_modules/@types/node/stream.d.ts +62 -56
- package/node_modules/@types/node/string_decoder.d.ts +5 -5
- package/node_modules/@types/node/test.d.ts +445 -109
- package/node_modules/@types/node/timers/promises.d.ts +10 -6
- package/node_modules/@types/node/timers.d.ts +5 -5
- package/node_modules/@types/node/tls.d.ts +40 -33
- package/node_modules/@types/node/trace_events.d.ts +40 -25
- package/node_modules/@types/node/tty.d.ts +8 -8
- package/node_modules/@types/node/url.d.ts +73 -48
- package/node_modules/@types/node/util.d.ts +131 -22
- package/node_modules/@types/node/v8.d.ts +183 -10
- package/node_modules/@types/node/vm.d.ts +43 -22
- package/node_modules/@types/node/wasi.d.ts +38 -15
- package/node_modules/@types/node/worker_threads.d.ts +19 -16
- package/node_modules/@types/node/zlib.d.ts +16 -3
- package/node_modules/adm-zip/README.md +2 -1
- package/node_modules/adm-zip/adm-zip.js +46 -45
- package/node_modules/adm-zip/headers/entryHeader.js +14 -12
- package/node_modules/adm-zip/headers/mainHeader.js +1 -1
- package/node_modules/adm-zip/methods/inflater.js +6 -3
- package/node_modules/adm-zip/methods/zipcrypto.js +6 -2
- package/node_modules/adm-zip/package.json +2 -2
- package/node_modules/adm-zip/util/errors.js +1 -0
- package/node_modules/adm-zip/zipEntry.js +64 -43
- package/node_modules/adm-zip/zipFile.js +35 -35
- package/node_modules/axios/CHANGELOG.md +873 -711
- package/node_modules/axios/README.md +98 -8
- package/node_modules/axios/dist/axios.js +1461 -350
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +710 -306
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +710 -306
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +628 -250
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +6 -3
- package/node_modules/axios/index.d.ts +6 -3
- package/node_modules/axios/lib/adapters/adapters.js +3 -1
- package/node_modules/axios/lib/adapters/fetch.js +227 -0
- package/node_modules/axios/lib/adapters/http.js +7 -3
- package/node_modules/axios/lib/adapters/xhr.js +31 -101
- package/node_modules/axios/lib/core/Axios.js +28 -1
- package/node_modules/axios/lib/core/AxiosHeaders.js +4 -0
- package/node_modules/axios/lib/core/mergeConfig.js +1 -1
- package/node_modules/axios/lib/defaults/index.js +7 -5
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +9 -8
- package/node_modules/axios/lib/helpers/combineURLs.js +1 -1
- package/node_modules/axios/lib/helpers/composeSignals.js +46 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +3 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +32 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +57 -0
- package/node_modules/axios/lib/helpers/throttle.js +5 -3
- package/node_modules/axios/lib/helpers/trackStream.js +55 -0
- package/node_modules/axios/lib/platform/common/utils.js +4 -1
- package/node_modules/axios/lib/utils.js +7 -2
- package/node_modules/axios/package.json +27 -26
- package/node_modules/call-bind/CHANGELOG.md +16 -0
- package/node_modules/call-bind/index.js +2 -11
- package/node_modules/call-bind/package.json +11 -6
- package/node_modules/define-data-property/CHANGELOG.md +29 -0
- package/node_modules/define-data-property/index.d.ts +12 -3
- package/node_modules/define-data-property/index.js +4 -16
- package/node_modules/define-data-property/package.json +26 -33
- package/node_modules/define-data-property/test/index.js +10 -10
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +15 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +16 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +55 -0
- package/node_modules/es-define-property/tsconfig.json +50 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +17 -0
- package/node_modules/fast-xml-parser/README.md +9 -15
- package/node_modules/fast-xml-parser/package.json +4 -1
- package/node_modules/fast-xml-parser/src/fxp.d.ts +365 -71
- package/node_modules/fast-xml-parser/src/v5/CharsSymbol.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/OptionsBuilder.js +64 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/BaseOutputBuilder.js +71 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsArrBuilder.js +103 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsMinArrBuilder.js +102 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/JsObjBuilder.js +156 -0
- package/node_modules/fast-xml-parser/src/v5/OutputBuilders/ParserOptionsBuilder.js +96 -0
- package/node_modules/fast-xml-parser/src/v5/Report.js +0 -0
- package/node_modules/fast-xml-parser/src/v5/TagPath.js +81 -0
- package/node_modules/fast-xml-parser/src/v5/TagPathMatcher.js +15 -0
- package/node_modules/fast-xml-parser/src/v5/XMLParser.js +85 -0
- package/node_modules/fast-xml-parser/src/v5/Xml2JsParser.js +237 -0
- package/node_modules/fast-xml-parser/src/v5/XmlPartReader.js +212 -0
- package/node_modules/fast-xml-parser/src/v5/XmlSpecialTagsReader.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/BufferSource.js +118 -0
- package/node_modules/fast-xml-parser/src/v5/inputSource/StringSource.js +123 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/EntitiesParser.js +107 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParser.js +23 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/booleanParserExt.js +20 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/currency.js +31 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/join.js +14 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/number.js +16 -0
- package/node_modules/fast-xml-parser/src/v5/valueParsers/trim.js +8 -0
- package/node_modules/fast-xml-parser/src/validator.js +2 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +18 -9
- package/node_modules/follow-redirects/index.js +115 -76
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/get-intrinsic/CHANGELOG.md +18 -0
- package/node_modules/get-intrinsic/index.js +15 -7
- package/node_modules/get-intrinsic/package.json +12 -12
- package/node_modules/has-property-descriptors/CHANGELOG.md +8 -0
- package/node_modules/has-property-descriptors/index.js +3 -14
- package/node_modules/has-property-descriptors/package.json +5 -5
- package/node_modules/has-proto/CHANGELOG.md +15 -0
- package/node_modules/has-proto/index.d.ts +3 -0
- package/node_modules/has-proto/index.js +5 -1
- package/node_modules/has-proto/package.json +9 -5
- package/node_modules/has-proto/tsconfig.json +49 -0
- package/node_modules/has-tostringtag/.eslintrc +0 -6
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +1 -0
- package/node_modules/has-tostringtag/package.json +37 -13
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +1 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
- package/node_modules/has-tostringtag/test/tests.js +2 -1
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/index.d.ts +3 -3
- package/node_modules/hasown/index.js +1 -1
- package/node_modules/hasown/package.json +16 -15
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/polygon-clipping/README.md +29 -26
- package/node_modules/polygon-clipping/dist/polygon-clipping.cjs.js +1398 -1421
- package/node_modules/polygon-clipping/dist/polygon-clipping.d.ts +13 -10
- package/node_modules/polygon-clipping/dist/polygon-clipping.esm.js +1139 -1427
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.js +1770 -1831
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js +22 -8
- package/node_modules/polygon-clipping/dist/polygon-clipping.umd.min.js.map +1 -1
- package/node_modules/polygon-clipping/node_modules/robust-predicates/LICENSE +24 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/README.md +82 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/incircle.js +765 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/insphere.js +766 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient2d.js +184 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/orient3d.js +462 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/esm/util.js +138 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/index.d.ts +49 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/index.js +5 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/package.json +75 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.js +908 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/incircle.min.js +1 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.js +914 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/insphere.min.js +1 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.js +280 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient2d.min.js +1 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.js +601 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/orient3d.min.js +1 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.js +2328 -0
- package/node_modules/polygon-clipping/node_modules/robust-predicates/umd/predicates.min.js +1 -0
- package/node_modules/polygon-clipping/package.json +30 -25
- package/node_modules/protobufjs/LICENSE +39 -39
- package/node_modules/protobufjs/README.md +727 -740
- package/node_modules/protobufjs/dist/light/protobuf.js +6264 -6264
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +1928 -1928
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +2 -2
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +7978 -7961
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/ext/debug/README.md +4 -4
- package/node_modules/protobufjs/ext/debug/index.js +71 -71
- package/node_modules/protobufjs/ext/descriptor/README.md +72 -72
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +191 -191
- package/node_modules/protobufjs/ext/descriptor/index.js +1052 -1052
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -54
- package/node_modules/protobufjs/google/LICENSE +27 -27
- package/node_modules/protobufjs/google/README.md +1 -1
- package/node_modules/protobufjs/google/api/annotations.json +82 -82
- package/node_modules/protobufjs/google/api/annotations.proto +10 -10
- package/node_modules/protobufjs/google/api/http.json +85 -85
- package/node_modules/protobufjs/google/api/http.proto +30 -30
- package/node_modules/protobufjs/google/protobuf/api.json +117 -117
- package/node_modules/protobufjs/google/protobuf/api.proto +33 -33
- package/node_modules/protobufjs/google/protobuf/descriptor.json +738 -738
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +286 -286
- package/node_modules/protobufjs/google/protobuf/source_context.json +19 -19
- package/node_modules/protobufjs/google/protobuf/source_context.proto +7 -7
- package/node_modules/protobufjs/google/protobuf/type.json +201 -201
- package/node_modules/protobufjs/google/protobuf/type.proto +89 -89
- package/node_modules/protobufjs/index.d.ts +2741 -2741
- package/node_modules/protobufjs/index.js +4 -4
- package/node_modules/protobufjs/light.d.ts +2 -2
- package/node_modules/protobufjs/light.js +3 -3
- package/node_modules/protobufjs/minimal.d.ts +2 -2
- package/node_modules/protobufjs/minimal.js +4 -4
- package/node_modules/protobufjs/package.json +111 -111
- package/node_modules/protobufjs/scripts/postinstall.js +32 -32
- package/node_modules/protobufjs/src/common.js +399 -399
- package/node_modules/protobufjs/src/converter.js +301 -301
- package/node_modules/protobufjs/src/decoder.js +129 -129
- package/node_modules/protobufjs/src/encoder.js +100 -100
- package/node_modules/protobufjs/src/enum.js +198 -198
- package/node_modules/protobufjs/src/field.js +377 -377
- package/node_modules/protobufjs/src/index-light.js +104 -104
- package/node_modules/protobufjs/src/index-minimal.js +36 -36
- package/node_modules/protobufjs/src/index.js +12 -12
- package/node_modules/protobufjs/src/mapfield.js +126 -126
- package/node_modules/protobufjs/src/message.js +138 -138
- package/node_modules/protobufjs/src/method.js +160 -160
- package/node_modules/protobufjs/src/namespace.js +433 -433
- package/node_modules/protobufjs/src/object.js +243 -243
- package/node_modules/protobufjs/src/oneof.js +203 -203
- package/node_modules/protobufjs/src/parse.js +889 -872
- package/node_modules/protobufjs/src/reader.js +416 -416
- package/node_modules/protobufjs/src/reader_buffer.js +51 -51
- package/node_modules/protobufjs/src/root.js +368 -368
- package/node_modules/protobufjs/src/roots.js +18 -18
- package/node_modules/protobufjs/src/rpc/service.js +142 -142
- package/node_modules/protobufjs/src/rpc.js +36 -36
- package/node_modules/protobufjs/src/service.js +167 -167
- package/node_modules/protobufjs/src/tokenize.js +416 -416
- package/node_modules/protobufjs/src/type.js +589 -589
- package/node_modules/protobufjs/src/types.js +196 -196
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -15
- package/node_modules/protobufjs/src/util/longbits.js +200 -200
- package/node_modules/protobufjs/src/util/minimal.js +438 -438
- package/node_modules/protobufjs/src/util.js +212 -212
- package/node_modules/protobufjs/src/verifier.js +176 -176
- package/node_modules/protobufjs/src/wrappers.js +102 -102
- package/node_modules/protobufjs/src/writer.js +465 -465
- package/node_modules/protobufjs/src/writer_buffer.js +85 -85
- package/node_modules/protobufjs/tsconfig.json +7 -7
- package/node_modules/regexp.prototype.flags/CHANGELOG.md +13 -0
- package/node_modules/regexp.prototype.flags/implementation.js +2 -2
- package/node_modules/regexp.prototype.flags/package.json +11 -10
- package/node_modules/regexp.prototype.flags/test/tests.js +13 -13
- package/node_modules/set-function-length/CHANGELOG.md +29 -0
- package/node_modules/set-function-length/env.d.ts +9 -0
- package/node_modules/set-function-length/env.js +10 -4
- package/node_modules/set-function-length/index.d.ts +7 -0
- package/node_modules/set-function-length/index.js +4 -3
- package/node_modules/set-function-length/package.json +29 -11
- package/node_modules/set-function-length/tsconfig.json +9 -0
- package/node_modules/set-function-name/.eslintrc +1 -0
- package/node_modules/set-function-name/CHANGELOG.md +9 -0
- package/node_modules/set-function-name/index.d.ts +5 -0
- package/node_modules/set-function-name/index.js +4 -3
- package/node_modules/set-function-name/package.json +28 -9
- package/node_modules/set-function-name/tsconfig.json +59 -0
- package/node_modules/uuid/CHANGELOG.md +18 -0
- package/node_modules/uuid/README.md +134 -16
- package/node_modules/uuid/dist/commonjs-browser/index.js +40 -15
- package/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/node_modules/uuid/dist/commonjs-browser/md5.js +30 -53
- package/node_modules/uuid/dist/commonjs-browser/native.js +3 -4
- package/node_modules/uuid/dist/commonjs-browser/nil.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/parse.js +14 -15
- package/node_modules/uuid/dist/commonjs-browser/regex.js +1 -2
- package/node_modules/uuid/dist/commonjs-browser/rng.js +2 -4
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +27 -49
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +10 -16
- package/node_modules/uuid/dist/commonjs-browser/v1.js +73 -49
- package/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v3.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v35.js +15 -32
- package/node_modules/uuid/dist/commonjs-browser/v4.js +7 -18
- package/node_modules/uuid/dist/commonjs-browser/v5.js +3 -8
- package/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/node_modules/uuid/dist/commonjs-browser/validate.js +2 -7
- package/node_modules/uuid/dist/commonjs-browser/version.js +2 -8
- package/node_modules/uuid/dist/esm-browser/index.js +9 -4
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +29 -50
- package/node_modules/uuid/dist/esm-browser/native.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +12 -10
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +3 -4
- package/node_modules/uuid/dist/esm-browser/sha1.js +26 -46
- package/node_modules/uuid/dist/esm-browser/stringify.js +9 -11
- package/node_modules/uuid/dist/esm-browser/v1.js +74 -44
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v35.js +14 -25
- package/node_modules/uuid/dist/esm-browser/v4.js +5 -9
- package/node_modules/uuid/dist/esm-browser/v5.js +1 -1
- package/node_modules/uuid/dist/esm-browser/v6.js +36 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +146 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -2
- package/node_modules/uuid/dist/esm-browser/version.js +0 -3
- package/node_modules/uuid/dist/esm-node/index.js +9 -4
- package/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/node_modules/uuid/dist/esm-node/md5.js +1 -4
- package/node_modules/uuid/dist/esm-node/native.js +1 -1
- package/node_modules/uuid/dist/esm-node/parse.js +11 -9
- package/node_modules/uuid/dist/esm-node/regex.js +1 -1
- package/node_modules/uuid/dist/esm-node/rng.js +1 -3
- package/node_modules/uuid/dist/esm-node/sha1.js +1 -4
- package/node_modules/uuid/dist/esm-node/stringify.js +7 -9
- package/node_modules/uuid/dist/esm-node/v1.js +66 -36
- package/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/node_modules/uuid/dist/esm-node/v35.js +8 -19
- package/node_modules/uuid/dist/esm-node/v4.js +4 -8
- package/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/node_modules/uuid/dist/esm-node/validate.js +0 -2
- package/node_modules/uuid/dist/esm-node/version.js +0 -3
- package/node_modules/uuid/dist/index.js +40 -15
- package/node_modules/uuid/dist/max.js +7 -0
- package/node_modules/uuid/dist/md5-browser.js +8 -31
- package/node_modules/uuid/dist/md5.js +4 -10
- package/node_modules/uuid/dist/native-browser.js +2 -3
- package/node_modules/uuid/dist/native.js +5 -9
- package/node_modules/uuid/dist/nil.js +1 -2
- package/node_modules/uuid/dist/parse.js +13 -14
- package/node_modules/uuid/dist/regex.js +1 -2
- package/node_modules/uuid/dist/rng-browser.js +1 -3
- package/node_modules/uuid/dist/rng.js +3 -10
- package/node_modules/uuid/dist/sha1-browser.js +1 -23
- package/node_modules/uuid/dist/sha1.js +4 -10
- package/node_modules/uuid/dist/stringify.js +8 -14
- package/node_modules/uuid/dist/uuid-bin.js +12 -22
- package/node_modules/uuid/dist/v1.js +66 -42
- package/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/node_modules/uuid/dist/v3.js +2 -7
- package/node_modules/uuid/dist/v35.js +11 -28
- package/node_modules/uuid/dist/v4.js +6 -17
- package/node_modules/uuid/dist/v5.js +2 -7
- package/node_modules/uuid/dist/v6.js +38 -0
- package/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/node_modules/uuid/dist/v7.js +152 -0
- package/node_modules/uuid/dist/validate.js +2 -7
- package/node_modules/uuid/dist/version.js +2 -8
- package/node_modules/uuid/package.json +41 -34
- package/node_modules/uuid/wrapper.mjs +5 -0
- package/package.json +6 -6
- package/tak-ingest.js +5 -1
- package/tak-registration.js +8 -1
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +0 -8
- package/node_modules/@types/node/ts4.8/assert.d.ts +0 -996
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/buffer.d.ts +0 -2362
- package/node_modules/@types/node/ts4.8/child_process.d.ts +0 -1540
- package/node_modules/@types/node/ts4.8/cluster.d.ts +0 -432
- package/node_modules/@types/node/ts4.8/console.d.ts +0 -415
- package/node_modules/@types/node/ts4.8/constants.d.ts +0 -19
- package/node_modules/@types/node/ts4.8/crypto.d.ts +0 -4455
- package/node_modules/@types/node/ts4.8/dgram.d.ts +0 -586
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +0 -425
- package/node_modules/@types/node/ts4.8/dns.d.ts +0 -809
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +0 -122
- package/node_modules/@types/node/ts4.8/domain.d.ts +0 -170
- package/node_modules/@types/node/ts4.8/events.d.ts +0 -879
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +0 -1239
- package/node_modules/@types/node/ts4.8/fs.d.ts +0 -4291
- package/node_modules/@types/node/ts4.8/globals.d.ts +0 -385
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/http.d.ts +0 -1888
- package/node_modules/@types/node/ts4.8/http2.d.ts +0 -2382
- package/node_modules/@types/node/ts4.8/https.d.ts +0 -550
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -88
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -2747
- package/node_modules/@types/node/ts4.8/module.d.ts +0 -301
- package/node_modules/@types/node/ts4.8/net.d.ts +0 -949
- package/node_modules/@types/node/ts4.8/os.d.ts +0 -478
- package/node_modules/@types/node/ts4.8/path.d.ts +0 -191
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +0 -639
- package/node_modules/@types/node/ts4.8/process.d.ts +0 -1539
- package/node_modules/@types/node/ts4.8/punycode.d.ts +0 -117
- package/node_modules/@types/node/ts4.8/querystring.d.ts +0 -141
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +0 -150
- package/node_modules/@types/node/ts4.8/readline.d.ts +0 -539
- package/node_modules/@types/node/ts4.8/repl.d.ts +0 -430
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +0 -12
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +0 -83
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +0 -350
- package/node_modules/@types/node/ts4.8/stream.d.ts +0 -1701
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +0 -67
- package/node_modules/@types/node/ts4.8/test.d.ts +0 -1382
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/ts4.8/timers.d.ts +0 -240
- package/node_modules/@types/node/ts4.8/tls.d.ts +0 -1210
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +0 -182
- package/node_modules/@types/node/ts4.8/tty.d.ts +0 -208
- package/node_modules/@types/node/ts4.8/url.d.ts +0 -927
- package/node_modules/@types/node/ts4.8/util.d.ts +0 -2183
- package/node_modules/@types/node/ts4.8/v8.d.ts +0 -635
- package/node_modules/@types/node/ts4.8/vm.d.ts +0 -903
- package/node_modules/@types/node/ts4.8/wasi.d.ts +0 -158
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +0 -691
- package/node_modules/@types/node/ts4.8/zlib.d.ts +0 -517
- package/node_modules/define-data-property/index.d.ts.map +0 -1
- package/node_modules/hasown/index.d.ts.map +0 -1
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/polygon-clipping/CHANGELOG.md +0 -129
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* ```js
|
|
5
5
|
* const v8 = require('node:v8');
|
|
6
6
|
* ```
|
|
7
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
7
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/v8.js)
|
|
8
8
|
*/
|
|
9
9
|
declare module "v8" {
|
|
10
10
|
import { Readable } from "node:stream";
|
|
@@ -38,6 +38,18 @@ declare module "v8" {
|
|
|
38
38
|
bytecode_and_metadata_size: number;
|
|
39
39
|
external_script_source_size: number;
|
|
40
40
|
}
|
|
41
|
+
interface HeapSnapshotOptions {
|
|
42
|
+
/**
|
|
43
|
+
* If true, expose internals in the heap snapshot.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
exposeInternals?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* If true, expose numeric values in artificial fields.
|
|
49
|
+
* @default false
|
|
50
|
+
*/
|
|
51
|
+
exposeNumericValues?: boolean;
|
|
52
|
+
}
|
|
41
53
|
/**
|
|
42
54
|
* Returns an integer representing a version tag derived from the V8 version,
|
|
43
55
|
* command-line flags, and detected CPU features. This is useful for determining
|
|
@@ -58,7 +70,7 @@ declare module "v8" {
|
|
|
58
70
|
/**
|
|
59
71
|
* Returns an object with the following properties:
|
|
60
72
|
*
|
|
61
|
-
* `does_zap_garbage` is a 0/1 boolean, which signifies whether the`--zap_code_space` option is enabled or not. This makes V8 overwrite heap
|
|
73
|
+
* `does_zap_garbage` is a 0/1 boolean, which signifies whether the `--zap_code_space` option is enabled or not. This makes V8 overwrite heap
|
|
62
74
|
* garbage with a bit pattern. The RSS footprint (resident set size) gets bigger
|
|
63
75
|
* because it continuously touches all heap pages and that makes them less likely
|
|
64
76
|
* to get swapped out by the operating system.
|
|
@@ -105,7 +117,7 @@ declare module "v8" {
|
|
|
105
117
|
* Returns statistics about the V8 heap spaces, i.e. the segments which make up
|
|
106
118
|
* the V8 heap. Neither the ordering of heap spaces, nor the availability of a
|
|
107
119
|
* heap space can be guaranteed as the statistics are provided via the
|
|
108
|
-
* V8[`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
|
|
120
|
+
* V8 [`GetHeapSpaceStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#ac673576f24fdc7a33378f8f57e1d13a4) function and may change from one V8 version to the
|
|
109
121
|
* next.
|
|
110
122
|
*
|
|
111
123
|
* The value returned is an array of objects containing the following properties:
|
|
@@ -158,7 +170,7 @@ declare module "v8" {
|
|
|
158
170
|
* after the VM has started may result in unpredictable behavior, including
|
|
159
171
|
* crashes and data loss; or it may simply do nothing.
|
|
160
172
|
*
|
|
161
|
-
* The V8 options available for a version of Node.js may be determined by running`node --v8-options`.
|
|
173
|
+
* The V8 options available for a version of Node.js may be determined by running `node --v8-options`.
|
|
162
174
|
*
|
|
163
175
|
* Usage:
|
|
164
176
|
*
|
|
@@ -171,6 +183,50 @@ declare module "v8" {
|
|
|
171
183
|
* @since v1.0.0
|
|
172
184
|
*/
|
|
173
185
|
function setFlagsFromString(flags: string): void;
|
|
186
|
+
/**
|
|
187
|
+
* This is similar to the [`queryObjects()` console API](https://developer.chrome.com/docs/devtools/console/utilities#queryObjects-function)
|
|
188
|
+
* provided by the Chromium DevTools console. It can be used to search for objects that have the matching constructor on its prototype chain
|
|
189
|
+
* in the heap after a full garbage collection, which can be useful for memory leak regression tests. To avoid surprising results, users should
|
|
190
|
+
* avoid using this API on constructors whose implementation they don't control, or on constructors that can be invoked by other parties in the
|
|
191
|
+
* application.
|
|
192
|
+
*
|
|
193
|
+
* To avoid accidental leaks, this API does not return raw references to the objects found. By default, it returns the count of the objects
|
|
194
|
+
* found. If `options.format` is `'summary'`, it returns an array containing brief string representations for each object. The visibility provided
|
|
195
|
+
* in this API is similar to what the heap snapshot provides, while users can save the cost of serialization and parsing and directly filter the
|
|
196
|
+
* target objects during the search.
|
|
197
|
+
*
|
|
198
|
+
* Only objects created in the current execution context are included in the results.
|
|
199
|
+
*
|
|
200
|
+
* ```js
|
|
201
|
+
* import { queryObjects } from 'node:v8';
|
|
202
|
+
* class A { foo = 'bar'; }
|
|
203
|
+
* console.log(queryObjects(A)); // 0
|
|
204
|
+
* const a = new A();
|
|
205
|
+
* console.log(queryObjects(A)); // 1
|
|
206
|
+
* // [ "A { foo: 'bar' }" ]
|
|
207
|
+
* console.log(queryObjects(A, { format: 'summary' }));
|
|
208
|
+
*
|
|
209
|
+
* class B extends A { bar = 'qux'; }
|
|
210
|
+
* const b = new B();
|
|
211
|
+
* console.log(queryObjects(B)); // 1
|
|
212
|
+
* // [ "B { foo: 'bar', bar: 'qux' }" ]
|
|
213
|
+
* console.log(queryObjects(B, { format: 'summary' }));
|
|
214
|
+
*
|
|
215
|
+
* // Note that, when there are child classes inheriting from a constructor,
|
|
216
|
+
* // the constructor also shows up in the prototype chain of the child
|
|
217
|
+
* // classes's prototoype, so the child classes's prototoype would also be
|
|
218
|
+
* // included in the result.
|
|
219
|
+
* console.log(queryObjects(A)); // 3
|
|
220
|
+
* // [ "B { foo: 'bar', bar: 'qux' }", 'A {}', "A { foo: 'bar' }" ]
|
|
221
|
+
* console.log(queryObjects(A, { format: 'summary' }));
|
|
222
|
+
* ```
|
|
223
|
+
* @param ctor The constructor that can be used to search on the prototype chain in order to filter target objects in the heap.
|
|
224
|
+
* @since v20.13.0
|
|
225
|
+
* @experimental
|
|
226
|
+
*/
|
|
227
|
+
function queryObjects(ctor: Function): number | string[];
|
|
228
|
+
function queryObjects(ctor: Function, options: { format: "count" }): number;
|
|
229
|
+
function queryObjects(ctor: Function, options: { format: "summary" }): string[];
|
|
174
230
|
/**
|
|
175
231
|
* Generates a snapshot of the current V8 heap and returns a Readable
|
|
176
232
|
* Stream that may be used to read the JSON serialized representation.
|
|
@@ -194,7 +250,7 @@ declare module "v8" {
|
|
|
194
250
|
* @since v11.13.0
|
|
195
251
|
* @return A Readable containing the V8 heap snapshot.
|
|
196
252
|
*/
|
|
197
|
-
function getHeapSnapshot(): Readable;
|
|
253
|
+
function getHeapSnapshot(options?: HeapSnapshotOptions): Readable;
|
|
198
254
|
/**
|
|
199
255
|
* Generates a snapshot of the current V8 heap and writes it to a JSON
|
|
200
256
|
* file. This file is intended to be used with tools such as Chrome
|
|
@@ -246,10 +302,10 @@ declare module "v8" {
|
|
|
246
302
|
* worker thread.
|
|
247
303
|
* @return The filename where the snapshot was saved.
|
|
248
304
|
*/
|
|
249
|
-
function writeHeapSnapshot(filename?: string): string;
|
|
305
|
+
function writeHeapSnapshot(filename?: string, options?: HeapSnapshotOptions): string;
|
|
250
306
|
/**
|
|
251
307
|
* Get statistics about code and its metadata in the heap, see
|
|
252
|
-
* V8[`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
|
|
308
|
+
* V8 [`GetHeapCodeAndMetadataStatistics`](https://v8docs.nodesource.com/node-13.2/d5/dda/classv8_1_1_isolate.html#a6079122af17612ef54ef3348ce170866) API. Returns an object with the
|
|
253
309
|
* following properties:
|
|
254
310
|
*
|
|
255
311
|
* ```js
|
|
@@ -344,7 +400,7 @@ declare module "v8" {
|
|
|
344
400
|
transferArrayBuffer(id: number, arrayBuffer: ArrayBuffer): void;
|
|
345
401
|
/**
|
|
346
402
|
* Reads the underlying wire format version. Likely mostly to be useful to
|
|
347
|
-
* legacy code reading old wire format versions. May not be called before`.readHeader()`.
|
|
403
|
+
* legacy code reading old wire format versions. May not be called before `.readHeader()`.
|
|
348
404
|
*/
|
|
349
405
|
getWireFormatVersion(): number;
|
|
350
406
|
/**
|
|
@@ -353,7 +409,7 @@ declare module "v8" {
|
|
|
353
409
|
*/
|
|
354
410
|
readUint32(): number;
|
|
355
411
|
/**
|
|
356
|
-
* Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]`with two 32-bit unsigned integer entries.
|
|
412
|
+
* Read a raw 64-bit unsigned integer and return it as an array `[hi, lo]` with two 32-bit unsigned integer entries.
|
|
357
413
|
* For use inside of a custom `deserializer._readHostObject()`.
|
|
358
414
|
*/
|
|
359
415
|
readUint64(): [number, number];
|
|
@@ -408,6 +464,13 @@ declare module "v8" {
|
|
|
408
464
|
* @since v15.1.0, v14.18.0, v12.22.0
|
|
409
465
|
*/
|
|
410
466
|
function stopCoverage(): void;
|
|
467
|
+
/**
|
|
468
|
+
* The API is a no-op if `--heapsnapshot-near-heap-limit` is already set from the command line or the API is called more than once.
|
|
469
|
+
* `limit` must be a positive integer. See [`--heapsnapshot-near-heap-limit`](https://nodejs.org/docs/latest-v20.x/api/cli.html#--heapsnapshot-near-heap-limitmax_count) for more information.
|
|
470
|
+
* @experimental
|
|
471
|
+
* @since v18.10.0, v16.18.0
|
|
472
|
+
*/
|
|
473
|
+
function setHeapSnapshotNearHeapLimit(limit: number): void;
|
|
411
474
|
/**
|
|
412
475
|
* This API collects GC data in current thread.
|
|
413
476
|
* @since v19.6.0, v18.15.0
|
|
@@ -419,7 +482,7 @@ declare module "v8" {
|
|
|
419
482
|
*/
|
|
420
483
|
start(): void;
|
|
421
484
|
/**
|
|
422
|
-
* Stop collecting GC data and return an object.The content of object
|
|
485
|
+
* Stop collecting GC data and return an object. The content of object
|
|
423
486
|
* is as follows.
|
|
424
487
|
*
|
|
425
488
|
* ```json
|
|
@@ -629,6 +692,116 @@ declare module "v8" {
|
|
|
629
692
|
* @since v17.1.0, v16.14.0
|
|
630
693
|
*/
|
|
631
694
|
const promiseHooks: PromiseHooks;
|
|
695
|
+
type StartupSnapshotCallbackFn = (args: any) => any;
|
|
696
|
+
interface StartupSnapshot {
|
|
697
|
+
/**
|
|
698
|
+
* Add a callback that will be called when the Node.js instance is about to get serialized into a snapshot and exit.
|
|
699
|
+
* This can be used to release resources that should not or cannot be serialized or to convert user data into a form more suitable for serialization.
|
|
700
|
+
* @since v18.6.0, v16.17.0
|
|
701
|
+
*/
|
|
702
|
+
addSerializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
|
703
|
+
/**
|
|
704
|
+
* Add a callback that will be called when the Node.js instance is deserialized from a snapshot.
|
|
705
|
+
* The `callback` and the `data` (if provided) will be serialized into the snapshot, they can be used to re-initialize the state of the application or
|
|
706
|
+
* to re-acquire resources that the application needs when the application is restarted from the snapshot.
|
|
707
|
+
* @since v18.6.0, v16.17.0
|
|
708
|
+
*/
|
|
709
|
+
addDeserializeCallback(callback: StartupSnapshotCallbackFn, data?: any): void;
|
|
710
|
+
/**
|
|
711
|
+
* This sets the entry point of the Node.js application when it is deserialized from a snapshot. This can be called only once in the snapshot building script.
|
|
712
|
+
* If called, the deserialized application no longer needs an additional entry point script to start up and will simply invoke the callback along with the deserialized
|
|
713
|
+
* data (if provided), otherwise an entry point script still needs to be provided to the deserialized application.
|
|
714
|
+
* @since v18.6.0, v16.17.0
|
|
715
|
+
*/
|
|
716
|
+
setDeserializeMainFunction(callback: StartupSnapshotCallbackFn, data?: any): void;
|
|
717
|
+
/**
|
|
718
|
+
* Returns true if the Node.js instance is run to build a snapshot.
|
|
719
|
+
* @since v18.6.0, v16.17.0
|
|
720
|
+
*/
|
|
721
|
+
isBuildingSnapshot(): boolean;
|
|
722
|
+
}
|
|
723
|
+
/**
|
|
724
|
+
* The `v8.startupSnapshot` interface can be used to add serialization and deserialization hooks for custom startup snapshots.
|
|
725
|
+
*
|
|
726
|
+
* ```bash
|
|
727
|
+
* $ node --snapshot-blob snapshot.blob --build-snapshot entry.js
|
|
728
|
+
* # This launches a process with the snapshot
|
|
729
|
+
* $ node --snapshot-blob snapshot.blob
|
|
730
|
+
* ```
|
|
731
|
+
*
|
|
732
|
+
* In the example above, `entry.js` can use methods from the `v8.startupSnapshot` interface to specify how to save information for custom objects
|
|
733
|
+
* in the snapshot during serialization and how the information can be used to synchronize these objects during deserialization of the snapshot.
|
|
734
|
+
* For example, if the `entry.js` contains the following script:
|
|
735
|
+
*
|
|
736
|
+
* ```js
|
|
737
|
+
* 'use strict';
|
|
738
|
+
*
|
|
739
|
+
* const fs = require('node:fs');
|
|
740
|
+
* const zlib = require('node:zlib');
|
|
741
|
+
* const path = require('node:path');
|
|
742
|
+
* const assert = require('node:assert');
|
|
743
|
+
*
|
|
744
|
+
* const v8 = require('node:v8');
|
|
745
|
+
*
|
|
746
|
+
* class BookShelf {
|
|
747
|
+
* storage = new Map();
|
|
748
|
+
*
|
|
749
|
+
* // Reading a series of files from directory and store them into storage.
|
|
750
|
+
* constructor(directory, books) {
|
|
751
|
+
* for (const book of books) {
|
|
752
|
+
* this.storage.set(book, fs.readFileSync(path.join(directory, book)));
|
|
753
|
+
* }
|
|
754
|
+
* }
|
|
755
|
+
*
|
|
756
|
+
* static compressAll(shelf) {
|
|
757
|
+
* for (const [ book, content ] of shelf.storage) {
|
|
758
|
+
* shelf.storage.set(book, zlib.gzipSync(content));
|
|
759
|
+
* }
|
|
760
|
+
* }
|
|
761
|
+
*
|
|
762
|
+
* static decompressAll(shelf) {
|
|
763
|
+
* for (const [ book, content ] of shelf.storage) {
|
|
764
|
+
* shelf.storage.set(book, zlib.gunzipSync(content));
|
|
765
|
+
* }
|
|
766
|
+
* }
|
|
767
|
+
* }
|
|
768
|
+
*
|
|
769
|
+
* // __dirname here is where the snapshot script is placed
|
|
770
|
+
* // during snapshot building time.
|
|
771
|
+
* const shelf = new BookShelf(__dirname, [
|
|
772
|
+
* 'book1.en_US.txt',
|
|
773
|
+
* 'book1.es_ES.txt',
|
|
774
|
+
* 'book2.zh_CN.txt',
|
|
775
|
+
* ]);
|
|
776
|
+
*
|
|
777
|
+
* assert(v8.startupSnapshot.isBuildingSnapshot());
|
|
778
|
+
* // On snapshot serialization, compress the books to reduce size.
|
|
779
|
+
* v8.startupSnapshot.addSerializeCallback(BookShelf.compressAll, shelf);
|
|
780
|
+
* // On snapshot deserialization, decompress the books.
|
|
781
|
+
* v8.startupSnapshot.addDeserializeCallback(BookShelf.decompressAll, shelf);
|
|
782
|
+
* v8.startupSnapshot.setDeserializeMainFunction((shelf) => {
|
|
783
|
+
* // process.env and process.argv are refreshed during snapshot
|
|
784
|
+
* // deserialization.
|
|
785
|
+
* const lang = process.env.BOOK_LANG || 'en_US';
|
|
786
|
+
* const book = process.argv[1];
|
|
787
|
+
* const name = `${book}.${lang}.txt`;
|
|
788
|
+
* console.log(shelf.storage.get(name));
|
|
789
|
+
* }, shelf);
|
|
790
|
+
* ```
|
|
791
|
+
*
|
|
792
|
+
* The resulted binary will get print the data deserialized from the snapshot during start up, using the refreshed `process.env` and `process.argv` of the launched process:
|
|
793
|
+
*
|
|
794
|
+
* ```bash
|
|
795
|
+
* $ BOOK_LANG=es_ES node --snapshot-blob snapshot.blob book1
|
|
796
|
+
* # Prints content of book1.es_ES.txt deserialized from the snapshot.
|
|
797
|
+
* ```
|
|
798
|
+
*
|
|
799
|
+
* Currently the application deserialized from a user-land snapshot cannot be snapshotted again, so these APIs are only available to applications that are not deserialized from a user-land snapshot.
|
|
800
|
+
*
|
|
801
|
+
* @experimental
|
|
802
|
+
* @since v18.6.0, v16.17.0
|
|
803
|
+
*/
|
|
804
|
+
const startupSnapshot: StartupSnapshot;
|
|
632
805
|
}
|
|
633
806
|
declare module "node:v8" {
|
|
634
807
|
export * from "v8";
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
*
|
|
35
35
|
* console.log(x); // 1; y is not defined.
|
|
36
36
|
* ```
|
|
37
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
37
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/vm.js)
|
|
38
38
|
*/
|
|
39
39
|
declare module "vm" {
|
|
40
40
|
import { ImportAttributes } from "node:module";
|
|
@@ -42,12 +42,12 @@ declare module "vm" {
|
|
|
42
42
|
interface BaseOptions {
|
|
43
43
|
/**
|
|
44
44
|
* Specifies the filename used in stack traces produced by this script.
|
|
45
|
-
*
|
|
45
|
+
* @default ''
|
|
46
46
|
*/
|
|
47
47
|
filename?: string | undefined;
|
|
48
48
|
/**
|
|
49
49
|
* Specifies the line number offset that is displayed in stack traces produced by this script.
|
|
50
|
-
*
|
|
50
|
+
* @default 0
|
|
51
51
|
*/
|
|
52
52
|
lineOffset?: number | undefined;
|
|
53
53
|
/**
|
|
@@ -64,17 +64,19 @@ declare module "vm" {
|
|
|
64
64
|
/** @deprecated in favor of `script.createCachedData()` */
|
|
65
65
|
produceCachedData?: boolean | undefined;
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
67
|
+
* Used to specify how the modules should be loaded during the evaluation of this script when `import()` is called. This option is
|
|
68
|
+
* part of the experimental modules API. We do not recommend using it in a production environment. For detailed information, see
|
|
69
|
+
* [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
69
70
|
*/
|
|
70
71
|
importModuleDynamically?:
|
|
71
72
|
| ((specifier: string, script: Script, importAttributes: ImportAttributes) => Module)
|
|
73
|
+
| typeof constants.USE_MAIN_CONTEXT_DEFAULT_LOADER
|
|
72
74
|
| undefined;
|
|
73
75
|
}
|
|
74
76
|
interface RunningScriptOptions extends BaseOptions {
|
|
75
77
|
/**
|
|
76
78
|
* When `true`, if an `Error` occurs while compiling the `code`, the line of code causing the error is attached to the stack trace.
|
|
77
|
-
*
|
|
79
|
+
* @default true
|
|
78
80
|
*/
|
|
79
81
|
displayErrors?: boolean | undefined;
|
|
80
82
|
/**
|
|
@@ -86,7 +88,7 @@ declare module "vm" {
|
|
|
86
88
|
* If `true`, the execution will be terminated when `SIGINT` (Ctrl+C) is received.
|
|
87
89
|
* Existing handlers for the event that have been attached via `process.on('SIGINT')` will be disabled during script execution, but will continue to work after that.
|
|
88
90
|
* If execution is terminated, an `Error` will be thrown.
|
|
89
|
-
*
|
|
91
|
+
* @default false
|
|
90
92
|
*/
|
|
91
93
|
breakOnSigint?: boolean | undefined;
|
|
92
94
|
}
|
|
@@ -122,7 +124,7 @@ declare module "vm" {
|
|
|
122
124
|
cachedData?: Buffer | undefined;
|
|
123
125
|
/**
|
|
124
126
|
* Specifies whether to produce new cache data.
|
|
125
|
-
*
|
|
127
|
+
* @default false
|
|
126
128
|
*/
|
|
127
129
|
produceCachedData?: boolean | undefined;
|
|
128
130
|
/**
|
|
@@ -193,7 +195,7 @@ declare module "vm" {
|
|
|
193
195
|
class Script {
|
|
194
196
|
constructor(code: string, options?: ScriptOptions | string);
|
|
195
197
|
/**
|
|
196
|
-
* Runs the compiled code contained by the `vm.Script` object within the given`contextifiedObject` and returns the result. Running code does not have access
|
|
198
|
+
* Runs the compiled code contained by the `vm.Script` object within the given `contextifiedObject` and returns the result. Running code does not have access
|
|
197
199
|
* to local scope.
|
|
198
200
|
*
|
|
199
201
|
* The following example compiles code that increments a global variable, sets
|
|
@@ -281,7 +283,7 @@ declare module "vm" {
|
|
|
281
283
|
*/
|
|
282
284
|
runInThisContext(options?: RunningScriptOptions): any;
|
|
283
285
|
/**
|
|
284
|
-
* Creates a code cache that can be used with the `Script` constructor's`cachedData` option. Returns a `Buffer`. This method may be called at any
|
|
286
|
+
* Creates a code cache that can be used with the `Script` constructor's `cachedData` option. Returns a `Buffer`. This method may be called at any
|
|
285
287
|
* time and any number of times.
|
|
286
288
|
*
|
|
287
289
|
* The code cache of the `Script` doesn't contain any JavaScript observable
|
|
@@ -319,7 +321,7 @@ declare module "vm" {
|
|
|
319
321
|
cachedDataProduced?: boolean | undefined;
|
|
320
322
|
/**
|
|
321
323
|
* When `cachedData` is supplied to create the `vm.Script`, this value will be set
|
|
322
|
-
* to either `true` or `false` depending on acceptance of the data by V8
|
|
324
|
+
* to either `true` or `false` depending on acceptance of the data by V8.
|
|
323
325
|
* Otherwise the value is `undefined`.
|
|
324
326
|
* @since v5.7.0
|
|
325
327
|
*/
|
|
@@ -345,11 +347,14 @@ declare module "vm" {
|
|
|
345
347
|
sourceMapURL?: string | undefined;
|
|
346
348
|
}
|
|
347
349
|
/**
|
|
348
|
-
* If given a `contextObject`, the `vm.createContext()` method will
|
|
349
|
-
* that object
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
* will
|
|
350
|
+
* If given a `contextObject`, the `vm.createContext()` method will
|
|
351
|
+
* [prepare that object](https://nodejs.org/docs/latest-v20.x/api/vm.html#what-does-it-mean-to-contextify-an-object)
|
|
352
|
+
* and return a reference to it so that it can be used in `{@link runInContext}` or
|
|
353
|
+
* [`script.runInContext()`](https://nodejs.org/docs/latest-v20.x/api/vm.html#scriptrunincontextcontextifiedobject-options). Inside such
|
|
354
|
+
* scripts, the `contextObject` will be the global object, retaining all of its
|
|
355
|
+
* existing properties but also having the built-in objects and functions any
|
|
356
|
+
* standard [global object](https://es5.github.io/#x15.1) has. Outside of scripts run by the vm module, global
|
|
357
|
+
* variables will remain unchanged.
|
|
353
358
|
*
|
|
354
359
|
* ```js
|
|
355
360
|
* const vm = require('node:vm');
|
|
@@ -472,9 +477,9 @@ declare module "vm" {
|
|
|
472
477
|
* // Prints: evalResult: 'eval', localVar: 'eval'
|
|
473
478
|
* ```
|
|
474
479
|
*
|
|
475
|
-
* Because `vm.runInThisContext()` does not have access to the local scope
|
|
480
|
+
* Because `vm.runInThisContext()` does not have access to the local scope, `localVar` is unchanged. In contrast,
|
|
476
481
|
* [`eval()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval) _does_ have access to the
|
|
477
|
-
* local scope, so the value `localVar` is changed. In this way`vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
|
|
482
|
+
* local scope, so the value `localVar` is changed. In this way `vm.runInThisContext()` is much like an [indirect `eval()` call](https://es5.github.io/#x10.4.2), e.g.`(0,eval)('code')`.
|
|
478
483
|
*
|
|
479
484
|
* ## Example: Running an HTTP server within a VM
|
|
480
485
|
*
|
|
@@ -536,7 +541,7 @@ declare module "vm" {
|
|
|
536
541
|
* The format of the object that the returned Promise may resolve with is
|
|
537
542
|
* specific to the V8 engine and may change from one version of V8 to the next.
|
|
538
543
|
*
|
|
539
|
-
* The returned result is different from the statistics returned by`v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
|
|
544
|
+
* The returned result is different from the statistics returned by `v8.getHeapSpaceStatistics()` in that `vm.measureMemory()` measure the
|
|
540
545
|
* memory reachable by each V8 specific contexts in the current instance of
|
|
541
546
|
* the V8 engine, while the result of `v8.getHeapSpaceStatistics()` measure
|
|
542
547
|
* the memory occupied by each heap space in the current V8 instance.
|
|
@@ -604,7 +609,7 @@ declare module "vm" {
|
|
|
604
609
|
* flag enabled.
|
|
605
610
|
*
|
|
606
611
|
* The `vm.Module` class provides a low-level interface for using
|
|
607
|
-
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script`class that closely mirrors [Module Record](https://262.ecma-international.org/14.0/#sec-abstract-module-records) s as
|
|
612
|
+
* ECMAScript modules in VM contexts. It is the counterpart of the `vm.Script` class that closely mirrors [Module Record](https://262.ecma-international.org/14.0/#sec-abstract-module-records) s as
|
|
608
613
|
* defined in the ECMAScript
|
|
609
614
|
* specification.
|
|
610
615
|
*
|
|
@@ -742,7 +747,7 @@ declare module "vm" {
|
|
|
742
747
|
* * `'errored'`: The module has been evaluated, but an exception was thrown.
|
|
743
748
|
*
|
|
744
749
|
* Other than `'errored'`, this status string corresponds to the specification's [Cyclic Module Record](https://tc39.es/ecma262/#sec-cyclic-module-records)'s `[[Status]]` field. `'errored'`
|
|
745
|
-
* corresponds to`'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
|
|
750
|
+
* corresponds to `'evaluated'` in the specification, but with `[[EvaluationError]]` set to a
|
|
746
751
|
* value that is not `undefined`.
|
|
747
752
|
*/
|
|
748
753
|
status: ModuleStatus;
|
|
@@ -775,7 +780,7 @@ declare module "vm" {
|
|
|
775
780
|
* * Its `status` must not be `'errored'`.
|
|
776
781
|
*
|
|
777
782
|
* If the returned `Module`'s `status` is `'unlinked'`, this method will be
|
|
778
|
-
* recursively called on the returned `Module` with the same provided `linker`function.
|
|
783
|
+
* recursively called on the returned `Module` with the same provided `linker` function.
|
|
779
784
|
*
|
|
780
785
|
* `link()` returns a `Promise` that will either get resolved when all linking
|
|
781
786
|
* instances resolve to a valid `Module`, or rejected if the linker function either
|
|
@@ -897,6 +902,22 @@ declare module "vm" {
|
|
|
897
902
|
*/
|
|
898
903
|
setExport(name: string, value: any): void;
|
|
899
904
|
}
|
|
905
|
+
/**
|
|
906
|
+
* Returns an object containing commonly used constants for VM operations.
|
|
907
|
+
* @since v20.12.0
|
|
908
|
+
*/
|
|
909
|
+
namespace constants {
|
|
910
|
+
/**
|
|
911
|
+
* Stability: 1.1 - Active development
|
|
912
|
+
*
|
|
913
|
+
* A constant that can be used as the `importModuleDynamically` option to `vm.Script`
|
|
914
|
+
* and `vm.compileFunction()` so that Node.js uses the default ESM loader from the main
|
|
915
|
+
* context to load the requested module.
|
|
916
|
+
*
|
|
917
|
+
* For detailed information, see [Support of dynamic `import()` in compilation APIs](https://nodejs.org/docs/latest-v20.x/api/vm.html#support-of-dynamic-import-in-compilation-apis).
|
|
918
|
+
*/
|
|
919
|
+
const USE_MAIN_CONTEXT_DEFAULT_LOADER: number;
|
|
920
|
+
}
|
|
900
921
|
}
|
|
901
922
|
declare module "node:vm" {
|
|
902
923
|
export * from "vm";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The
|
|
3
|
-
*
|
|
2
|
+
* **The `node:wasi` module does not currently provide the**
|
|
3
|
+
* **comprehensive file system security properties provided by some WASI runtimes.**
|
|
4
|
+
* **Full support for secure file system sandboxing may or may not be implemented in**
|
|
5
|
+
* **future. In the mean time, do not rely on it to run untrusted code.**
|
|
6
|
+
*
|
|
7
|
+
* The WASI API provides an implementation of the [WebAssembly System Interface](https://wasi.dev/) specification. WASI gives WebAssembly applications access to the underlying
|
|
8
|
+
* operating system via a collection of POSIX-like functions.
|
|
4
9
|
*
|
|
5
10
|
* ```js
|
|
6
11
|
* import { readFile } from 'node:fs/promises';
|
|
@@ -12,7 +17,7 @@
|
|
|
12
17
|
* args: argv,
|
|
13
18
|
* env,
|
|
14
19
|
* preopens: {
|
|
15
|
-
* '/
|
|
20
|
+
* '/local': '/some/real/path/that/wasm/can/access',
|
|
16
21
|
* },
|
|
17
22
|
* });
|
|
18
23
|
*
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
* wasi.start(instance);
|
|
25
30
|
* ```
|
|
26
31
|
*
|
|
27
|
-
* To run the above example, create a new WebAssembly text format file named`demo.wat`:
|
|
32
|
+
* To run the above example, create a new WebAssembly text format file named `demo.wat`:
|
|
28
33
|
*
|
|
29
34
|
* ```text
|
|
30
35
|
* (module
|
|
@@ -62,7 +67,7 @@
|
|
|
62
67
|
* wat2wasm demo.wat
|
|
63
68
|
* ```
|
|
64
69
|
* @experimental
|
|
65
|
-
* @see [source](https://github.com/nodejs/node/blob/v20.
|
|
70
|
+
* @see [source](https://github.com/nodejs/node/blob/v20.13.1/lib/wasi.js)
|
|
66
71
|
*/
|
|
67
72
|
declare module "wasi" {
|
|
68
73
|
interface WASIOptions {
|
|
@@ -70,11 +75,13 @@ declare module "wasi" {
|
|
|
70
75
|
* An array of strings that the WebAssembly application will
|
|
71
76
|
* see as command line arguments. The first argument is the virtual path to the
|
|
72
77
|
* WASI command itself.
|
|
78
|
+
* @default []
|
|
73
79
|
*/
|
|
74
80
|
args?: string[] | undefined;
|
|
75
81
|
/**
|
|
76
82
|
* An object similar to `process.env` that the WebAssembly
|
|
77
83
|
* application will see as its environment.
|
|
84
|
+
* @default {}
|
|
78
85
|
*/
|
|
79
86
|
env?: object | undefined;
|
|
80
87
|
/**
|
|
@@ -86,7 +93,7 @@ declare module "wasi" {
|
|
|
86
93
|
preopens?: NodeJS.Dict<string> | undefined;
|
|
87
94
|
/**
|
|
88
95
|
* By default, when WASI applications call `__wasi_proc_exit()`
|
|
89
|
-
*
|
|
96
|
+
* `wasi.start()` will return with the exit code specified rather than terminatng the process.
|
|
90
97
|
* Setting this option to `false` will cause the Node.js process to exit with
|
|
91
98
|
* the specified exit code instead.
|
|
92
99
|
* @default true
|
|
@@ -109,25 +116,41 @@ declare module "wasi" {
|
|
|
109
116
|
stderr?: number | undefined;
|
|
110
117
|
/**
|
|
111
118
|
* The version of WASI requested.
|
|
112
|
-
* Currently the only supported versions are `'unstable'` and `'preview1'`.
|
|
113
|
-
* @since
|
|
119
|
+
* Currently the only supported versions are `'unstable'` and `'preview1'`. This option is mandatory.
|
|
120
|
+
* @since v19.8.0
|
|
114
121
|
*/
|
|
115
|
-
version:
|
|
122
|
+
version: "unstable" | "preview1";
|
|
116
123
|
}
|
|
117
124
|
/**
|
|
118
125
|
* The `WASI` class provides the WASI system call API and additional convenience
|
|
119
126
|
* methods for working with WASI-based applications. Each `WASI` instance
|
|
120
|
-
* represents a distinct
|
|
121
|
-
* sandbox directory structure configured explicitly.
|
|
127
|
+
* represents a distinct environment.
|
|
122
128
|
* @since v13.3.0, v12.16.0
|
|
123
129
|
*/
|
|
124
130
|
class WASI {
|
|
125
131
|
constructor(options?: WASIOptions);
|
|
126
132
|
/**
|
|
127
|
-
*
|
|
133
|
+
* Return an import object that can be passed to `WebAssembly.instantiate()` if no other WASM imports are needed beyond those provided by WASI.
|
|
134
|
+
*
|
|
135
|
+
* If version `unstable` was passed into the constructor it will return:
|
|
136
|
+
*
|
|
137
|
+
* ```js
|
|
138
|
+
* { wasi_unstable: wasi.wasiImport }
|
|
139
|
+
* ```
|
|
140
|
+
*
|
|
141
|
+
* If version `preview1` was passed into the constructor or no version was specified it will return:
|
|
142
|
+
*
|
|
143
|
+
* ```js
|
|
144
|
+
* { wasi_snapshot_preview1: wasi.wasiImport }
|
|
145
|
+
* ```
|
|
146
|
+
* @since v19.8.0
|
|
147
|
+
*/
|
|
148
|
+
getImportObject(): object;
|
|
149
|
+
/**
|
|
150
|
+
* Attempt to begin execution of `instance` as a WASI command by invoking its `_start()` export. If `instance` does not contain a `_start()` export, or if `instance` contains an `_initialize()`
|
|
128
151
|
* export, then an exception is thrown.
|
|
129
152
|
*
|
|
130
|
-
* `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`. If
|
|
153
|
+
* `start()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`. If
|
|
131
154
|
* `instance` does not have a `memory` export an exception is thrown.
|
|
132
155
|
*
|
|
133
156
|
* If `start()` is called more than once, an exception is thrown.
|
|
@@ -135,9 +158,9 @@ declare module "wasi" {
|
|
|
135
158
|
*/
|
|
136
159
|
start(instance: object): number; // TODO: avoid DOM dependency until WASM moved to own lib.
|
|
137
160
|
/**
|
|
138
|
-
* Attempt to initialize `instance` as a WASI reactor by invoking its`_initialize()` export, if it is present. If `instance` contains a `_start()`export, then an exception is thrown.
|
|
161
|
+
* Attempt to initialize `instance` as a WASI reactor by invoking its `_initialize()` export, if it is present. If `instance` contains a `_start()` export, then an exception is thrown.
|
|
139
162
|
*
|
|
140
|
-
* `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named`memory`.
|
|
163
|
+
* `initialize()` requires that `instance` exports a [`WebAssembly.Memory`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory) named `memory`.
|
|
141
164
|
* If `instance` does not have a `memory` export an exception is thrown.
|
|
142
165
|
*
|
|
143
166
|
* If `initialize()` is called more than once, an exception is thrown.
|