nexus-agents 8.82.1 → 8.82.2
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/{chunk-K3DV7HIH.js → chunk-2TR3B7MN.js} +2 -2
- package/dist/{chunk-N7OF5OLJ.js → chunk-AOGHVE7R.js} +2 -2
- package/dist/{chunk-CBM4AIBL.js → chunk-HXIN7YWW.js} +3 -3
- package/dist/{chunk-DJWWAPWD.js → chunk-IDV4V5UL.js} +7 -7
- package/dist/{chunk-HQLLYWTD.js → chunk-OHBE6HR2.js} +3 -3
- package/dist/{chunk-W6LC7UIY.js → chunk-RRTISAC5.js} +2 -2
- package/dist/cli.js +7 -7
- package/dist/{consensus-vote-X4BV3FKZ.js → consensus-vote-2OADIAQL.js} +4 -4
- package/dist/{improvement-review-MMH4XD66.js → improvement-review-WOR3EFIY.js} +4 -4
- package/dist/index.js +6 -6
- package/dist/{setup-data-dir-YUXVTYJ7.js → setup-data-dir-ZHSJ3AQ5.js} +3 -3
- package/node_modules/fast-uri/.github/dependabot.yml +42 -2
- package/node_modules/fast-uri/.github/workflows/ci.yml +54 -6
- package/node_modules/fast-uri/.github/workflows/lock-threads.yml +1 -1
- package/node_modules/fast-uri/.github/workflows/ossf-scorecard.yml +45 -0
- package/node_modules/fast-uri/README.md +11 -9
- package/node_modules/fast-uri/SECURITY.md +222 -0
- package/node_modules/fast-uri/benchmark/benchmark.mjs +71 -0
- package/node_modules/fast-uri/benchmark/encoder.mjs +54 -0
- package/node_modules/fast-uri/index.js +41 -3
- package/node_modules/fast-uri/lib/schemes.js +435 -3
- package/node_modules/fast-uri/lib/utils.js +197 -94
- package/node_modules/fast-uri/package.json +4 -4
- package/node_modules/fast-uri/test/equal.test.js +63 -0
- package/node_modules/fast-uri/test/fixtures/uri-js-parse.json +23 -1
- package/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +23 -1
- package/node_modules/fast-uri/test/ipv6-validation.test.js +160 -0
- package/node_modules/fast-uri/test/mailto-authority-security.test.js +125 -0
- package/node_modules/fast-uri/test/mailto-field-name-security.test.js +151 -0
- package/node_modules/fast-uri/test/parse.test.js +143 -0
- package/node_modules/fast-uri/test/scheme-normalization.test.js +16 -0
- package/node_modules/fast-uri/test/scheme-validation.test.js +2 -4
- package/node_modules/fast-uri/test/security-utf8-encoding.test.js +0 -0
- package/node_modules/fast-uri/test/serialize.test.js +144 -0
- package/node_modules/fast-uri/test/uri-js-compatibility.test.js +0 -3
- package/node_modules/fast-uri/test/uri-js.test.js +4 -4
- package/node_modules/fast-uri/test/util.test.js +9 -0
- package/node_modules/fast-uri/tsconfig.json +8 -7
- package/node_modules/fast-uri/types/index.d.ts +20 -9
- package/node_modules/fast-uri/types/index.tst.ts +31 -0
- package/node_modules/protobufjs/README.md +259 -562
- package/node_modules/protobufjs/dist/light/protobuf.js +3230 -1917
- 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 +1985 -1179
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +3428 -1977
- 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/README.md +70 -0
- package/node_modules/protobufjs/ext/descriptor/README.md +3 -70
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +0 -193
- package/node_modules/protobufjs/ext/descriptor/index.js +1 -1185
- package/node_modules/protobufjs/ext/descriptor.d.ts +87 -0
- package/node_modules/protobufjs/ext/descriptor.generated.d.ts +424 -0
- package/node_modules/protobufjs/ext/descriptor.js +1396 -0
- package/node_modules/protobufjs/ext/protojson.LICENSE +201 -0
- package/node_modules/protobufjs/ext/protojson.d.ts +20 -0
- package/node_modules/protobufjs/ext/protojson.generated.d.ts +49 -0
- package/node_modules/protobufjs/ext/protojson.js +961 -0
- package/node_modules/protobufjs/ext/textformat.d.ts +19 -0
- package/node_modules/protobufjs/ext/textformat.generated.d.ts +33 -0
- package/node_modules/protobufjs/ext/textformat.js +1280 -0
- package/node_modules/protobufjs/google/api/annotations.json +3 -1
- package/node_modules/protobufjs/google/api/http.json +2 -1
- package/node_modules/protobufjs/google/protobuf/api.json +12 -6
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.json +126 -0
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +47 -0
- package/node_modules/protobufjs/google/protobuf/descriptor.json +190 -88
- package/node_modules/protobufjs/google/protobuf/descriptor.proto +14 -9
- package/node_modules/protobufjs/google/protobuf/source_context.json +2 -1
- package/node_modules/protobufjs/google/protobuf/type.json +14 -7
- package/node_modules/protobufjs/index.d.ts +1090 -704
- package/node_modules/protobufjs/package.json +25 -51
- package/node_modules/protobufjs/src/common.js +14 -8
- package/node_modules/protobufjs/src/converter.js +90 -52
- package/node_modules/protobufjs/src/decoder.js +209 -65
- package/node_modules/protobufjs/src/encoder.js +27 -7
- package/node_modules/protobufjs/src/enum.js +33 -7
- package/node_modules/protobufjs/src/field.js +77 -20
- package/node_modules/protobufjs/src/index-light.js +29 -29
- package/node_modules/protobufjs/src/index-minimal.js +12 -13
- package/node_modules/protobufjs/src/index.js +6 -6
- package/node_modules/protobufjs/src/mapfield.js +26 -8
- package/node_modules/protobufjs/src/message.js +5 -11
- package/node_modules/protobufjs/src/method.js +30 -7
- package/node_modules/protobufjs/src/namespace.js +26 -10
- package/node_modules/protobufjs/src/object.js +44 -31
- package/node_modules/protobufjs/src/oneof.js +12 -1
- package/node_modules/protobufjs/src/parse.js +194 -67
- package/node_modules/protobufjs/src/reader.js +479 -56
- package/node_modules/protobufjs/src/reader_buffer.js +31 -5
- package/node_modules/protobufjs/src/root.js +16 -4
- package/node_modules/protobufjs/src/rpc/service.js +18 -5
- package/node_modules/protobufjs/src/service.js +15 -2
- package/node_modules/protobufjs/src/tokenize.js +6 -1
- package/node_modules/protobufjs/src/type.js +90 -36
- package/node_modules/protobufjs/src/typescript.js +25 -0
- package/node_modules/{@protobufjs/aspromise/index.d.ts → protobufjs/src/util/aspromise.d.ts} +13 -13
- package/node_modules/{@protobufjs/aspromise/index.js → protobufjs/src/util/aspromise.js} +52 -52
- package/node_modules/{@protobufjs/base64/index.d.ts → protobufjs/src/util/base64.d.ts} +32 -32
- package/node_modules/{@protobufjs/base64/index.js → protobufjs/src/util/base64.js} +146 -139
- package/node_modules/{@protobufjs/codegen/index.d.ts → protobufjs/src/util/codegen.d.ts} +31 -31
- package/node_modules/{@protobufjs/codegen/index.js → protobufjs/src/util/codegen.js} +120 -112
- package/node_modules/{@protobufjs/eventemitter/index.d.ts → protobufjs/src/util/eventemitter.d.ts} +45 -45
- package/node_modules/{@protobufjs/eventemitter/index.js → protobufjs/src/util/eventemitter.js} +86 -86
- package/node_modules/{@protobufjs/fetch/index.d.ts → protobufjs/src/util/fetch.d.ts} +56 -56
- package/node_modules/{@protobufjs/fetch/index.js → protobufjs/src/util/fetch.js} +112 -112
- package/node_modules/{@protobufjs/float/index.js → protobufjs/src/util/float.js} +335 -335
- package/node_modules/protobufjs/src/util/longbits.js +10 -6
- package/node_modules/protobufjs/src/util/minimal.js +71 -51
- package/node_modules/{@protobufjs/path/index.d.ts → protobufjs/src/util/path.d.ts} +22 -22
- package/node_modules/{@protobufjs/path/index.js → protobufjs/src/util/path.js} +100 -65
- package/node_modules/{@protobufjs/pool/index.d.ts → protobufjs/src/util/pool.d.ts} +32 -32
- package/node_modules/{@protobufjs/pool/index.js → protobufjs/src/util/pool.js} +48 -48
- package/node_modules/{@protobufjs/utf8/index.d.ts → protobufjs/src/util/utf8.d.ts} +24 -24
- package/node_modules/protobufjs/src/util/utf8.js +164 -0
- package/node_modules/protobufjs/src/util.js +51 -17
- package/node_modules/protobufjs/src/verifier.js +19 -14
- package/node_modules/protobufjs/src/wrappers.js +2 -3
- package/node_modules/protobufjs/src/writer.js +428 -189
- package/node_modules/protobufjs/src/writer_buffer.js +41 -26
- package/node_modules/protobufjs/tsconfig.json +3 -5
- package/package.json +41 -1
- package/node_modules/@protobufjs/aspromise/LICENSE +0 -26
- package/node_modules/@protobufjs/aspromise/README.md +0 -13
- package/node_modules/@protobufjs/aspromise/package.json +0 -21
- package/node_modules/@protobufjs/aspromise/tests/index.js +0 -130
- package/node_modules/@protobufjs/base64/LICENSE +0 -26
- package/node_modules/@protobufjs/base64/README.md +0 -19
- package/node_modules/@protobufjs/base64/package.json +0 -21
- package/node_modules/@protobufjs/base64/tests/index.js +0 -46
- package/node_modules/@protobufjs/codegen/LICENSE +0 -26
- package/node_modules/@protobufjs/codegen/README.md +0 -49
- package/node_modules/@protobufjs/codegen/package.json +0 -13
- package/node_modules/@protobufjs/codegen/tests/index.js +0 -13
- package/node_modules/@protobufjs/eventemitter/CHANGELOG.md +0 -8
- package/node_modules/@protobufjs/eventemitter/LICENSE +0 -26
- package/node_modules/@protobufjs/eventemitter/README.md +0 -22
- package/node_modules/@protobufjs/eventemitter/package.json +0 -21
- package/node_modules/@protobufjs/eventemitter/tests/index.js +0 -83
- package/node_modules/@protobufjs/fetch/CHANGELOG.md +0 -8
- package/node_modules/@protobufjs/fetch/LICENSE +0 -26
- package/node_modules/@protobufjs/fetch/README.md +0 -13
- package/node_modules/@protobufjs/fetch/package.json +0 -27
- package/node_modules/@protobufjs/fetch/tests/data/file.txt +0 -1
- package/node_modules/@protobufjs/fetch/tests/index.js +0 -158
- package/node_modules/@protobufjs/fetch/util/fs.js +0 -11
- package/node_modules/@protobufjs/float/LICENSE +0 -26
- package/node_modules/@protobufjs/float/README.md +0 -102
- package/node_modules/@protobufjs/float/bench/index.js +0 -87
- package/node_modules/@protobufjs/float/bench/suite.js +0 -46
- package/node_modules/@protobufjs/float/package.json +0 -26
- package/node_modules/@protobufjs/float/tests/index.js +0 -100
- package/node_modules/@protobufjs/path/LICENSE +0 -26
- package/node_modules/@protobufjs/path/README.md +0 -19
- package/node_modules/@protobufjs/path/package.json +0 -21
- package/node_modules/@protobufjs/path/tests/index.js +0 -60
- package/node_modules/@protobufjs/pool/.npmignore +0 -3
- package/node_modules/@protobufjs/pool/LICENSE +0 -26
- package/node_modules/@protobufjs/pool/README.md +0 -13
- package/node_modules/@protobufjs/pool/package.json +0 -21
- package/node_modules/@protobufjs/pool/tests/index.js +0 -33
- package/node_modules/@protobufjs/utf8/CHANGELOG.md +0 -8
- package/node_modules/@protobufjs/utf8/LICENSE +0 -26
- package/node_modules/@protobufjs/utf8/README.md +0 -20
- package/node_modules/@protobufjs/utf8/index.js +0 -115
- package/node_modules/@protobufjs/utf8/package.json +0 -21
- package/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +0 -207
- package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +0 -216
- package/node_modules/@protobufjs/utf8/tests/index.js +0 -79
- package/node_modules/@types/node/LICENSE +0 -21
- package/node_modules/@types/node/README.md +0 -15
- package/node_modules/@types/node/assert/strict.d.ts +0 -68
- package/node_modules/@types/node/assert.d.ts +0 -1077
- package/node_modules/@types/node/async_hooks.d.ts +0 -711
- package/node_modules/@types/node/buffer.buffer.d.ts +0 -471
- package/node_modules/@types/node/buffer.d.ts +0 -1800
- package/node_modules/@types/node/child_process.d.ts +0 -1361
- package/node_modules/@types/node/cluster.d.ts +0 -432
- package/node_modules/@types/node/console.d.ts +0 -93
- package/node_modules/@types/node/constants.d.ts +0 -14
- package/node_modules/@types/node/crypto.d.ts +0 -3964
- package/node_modules/@types/node/dgram.d.ts +0 -652
- package/node_modules/@types/node/diagnostics_channel.d.ts +0 -794
- package/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/node_modules/@types/node/dns.d.ts +0 -876
- package/node_modules/@types/node/domain.d.ts +0 -150
- package/node_modules/@types/node/events.d.ts +0 -1008
- package/node_modules/@types/node/ffi.d.ts +0 -500
- package/node_modules/@types/node/fs/promises.d.ts +0 -1477
- package/node_modules/@types/node/fs.d.ts +0 -4803
- package/node_modules/@types/node/globals.d.ts +0 -150
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/node_modules/@types/node/http.d.ts +0 -2218
- package/node_modules/@types/node/http2.d.ts +0 -2498
- package/node_modules/@types/node/https.d.ts +0 -400
- package/node_modules/@types/node/index.d.ts +0 -116
- package/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/node_modules/@types/node/inspector.d.ts +0 -265
- package/node_modules/@types/node/inspector.generated.d.ts +0 -4406
- package/node_modules/@types/node/module.d.ts +0 -726
- package/node_modules/@types/node/net.d.ts +0 -1074
- package/node_modules/@types/node/os.d.ts +0 -498
- package/node_modules/@types/node/package.json +0 -140
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/path.d.ts +0 -178
- package/node_modules/@types/node/perf_hooks.d.ts +0 -617
- package/node_modules/@types/node/process.d.ts +0 -2269
- package/node_modules/@types/node/punycode.d.ts +0 -89
- package/node_modules/@types/node/querystring.d.ts +0 -139
- package/node_modules/@types/node/quic.d.ts +0 -2191
- package/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/node_modules/@types/node/readline.d.ts +0 -508
- package/node_modules/@types/node/repl.d.ts +0 -420
- package/node_modules/@types/node/sea.d.ts +0 -47
- package/node_modules/@types/node/sqlite.d.ts +0 -1140
- package/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/node_modules/@types/node/stream/iter.d.ts +0 -449
- package/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/node_modules/@types/node/stream/web.d.ts +0 -320
- package/node_modules/@types/node/stream.d.ts +0 -1806
- package/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/node_modules/@types/node/test/reporters.d.ts +0 -60
- package/node_modules/@types/node/test.d.ts +0 -2558
- package/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/node_modules/@types/node/timers.d.ts +0 -149
- package/node_modules/@types/node/tls.d.ts +0 -1232
- package/node_modules/@types/node/trace_events.d.ts +0 -103
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -467
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/node_modules/@types/node/ts5.6/index.d.ts +0 -118
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -118
- package/node_modules/@types/node/tty.d.ts +0 -226
- package/node_modules/@types/node/url.d.ts +0 -556
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/util.d.ts +0 -1677
- package/node_modules/@types/node/v8.d.ts +0 -1059
- package/node_modules/@types/node/vfs.d.ts +0 -211
- package/node_modules/@types/node/vm.d.ts +0 -1137
- package/node_modules/@types/node/wasi.d.ts +0 -131
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/domexception.d.ts +0 -83
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -119
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/@types/node/worker_threads.d.ts +0 -672
- package/node_modules/@types/node/zlib/iter.d.ts +0 -131
- package/node_modules/@types/node/zlib.d.ts +0 -606
- package/node_modules/fast-uri/.github/workflows/package-manager-ci.yml +0 -24
- package/node_modules/fast-uri/types/index.test-d.ts +0 -17
- package/node_modules/protobufjs/ext/descriptor/test.js +0 -54
- package/node_modules/protobufjs/scripts/postinstall.js +0 -32
- package/node_modules/protobufjs/src/typescript.jsdoc +0 -15
- package/node_modules/undici-types/LICENSE +0 -21
- package/node_modules/undici-types/README.md +0 -6
- package/node_modules/undici-types/agent.d.ts +0 -30
- package/node_modules/undici-types/api.d.ts +0 -43
- package/node_modules/undici-types/balanced-pool.d.ts +0 -30
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -179
- package/node_modules/undici-types/cache.d.ts +0 -36
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/client.d.ts +0 -134
- package/node_modules/undici-types/connector.d.ts +0 -37
- package/node_modules/undici-types/content-type.d.ts +0 -21
- package/node_modules/undici-types/cookies.d.ts +0 -30
- package/node_modules/undici-types/diagnostics-channel.d.ts +0 -74
- package/node_modules/undici-types/dispatcher.d.ts +0 -253
- package/node_modules/undici-types/dispatcher1-wrapper.d.ts +0 -7
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -22
- package/node_modules/undici-types/errors.d.ts +0 -187
- package/node_modules/undici-types/eventsource.d.ts +0 -66
- package/node_modules/undici-types/fetch.d.ts +0 -235
- package/node_modules/undici-types/formdata.d.ts +0 -108
- package/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/node_modules/undici-types/global-origin.d.ts +0 -7
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/handlers.d.ts +0 -16
- package/node_modules/undici-types/header.d.ts +0 -165
- package/node_modules/undici-types/index.d.ts +0 -93
- package/node_modules/undici-types/interceptors.d.ts +0 -80
- package/node_modules/undici-types/mock-agent.d.ts +0 -68
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/mock-client.d.ts +0 -27
- package/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/node_modules/undici-types/mock-interceptor.d.ts +0 -98
- package/node_modules/undici-types/mock-pool.d.ts +0 -27
- package/node_modules/undici-types/package.json +0 -55
- package/node_modules/undici-types/patch.d.ts +0 -29
- package/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/node_modules/undici-types/pool.d.ts +0 -39
- package/node_modules/undici-types/proxy-agent.d.ts +0 -36
- package/node_modules/undici-types/readable.d.ts +0 -68
- package/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/node_modules/undici-types/retry-handler.d.ts +0 -125
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -39
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -113
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +0 -25
- package/node_modules/undici-types/util.d.ts +0 -18
- package/node_modules/undici-types/utility.d.ts +0 -7
- package/node_modules/undici-types/webidl.d.ts +0 -346
- package/node_modules/undici-types/websocket.d.ts +0 -188
- /package/dist/{chunk-K3DV7HIH.js.map → chunk-2TR3B7MN.js.map} +0 -0
- /package/dist/{chunk-N7OF5OLJ.js.map → chunk-AOGHVE7R.js.map} +0 -0
- /package/dist/{chunk-CBM4AIBL.js.map → chunk-HXIN7YWW.js.map} +0 -0
- /package/dist/{chunk-DJWWAPWD.js.map → chunk-IDV4V5UL.js.map} +0 -0
- /package/dist/{chunk-HQLLYWTD.js.map → chunk-OHBE6HR2.js.map} +0 -0
- /package/dist/{chunk-W6LC7UIY.js.map → chunk-RRTISAC5.js.map} +0 -0
- /package/dist/{consensus-vote-X4BV3FKZ.js.map → consensus-vote-2OADIAQL.js.map} +0 -0
- /package/dist/{improvement-review-MMH4XD66.js.map → improvement-review-WOR3EFIY.js.map} +0 -0
- /package/dist/{setup-data-dir-YUXVTYJ7.js.map → setup-data-dir-ZHSJ3AQ5.js.map} +0 -0
- /package/node_modules/{@protobufjs/float/index.d.ts → protobufjs/src/util/float.d.ts} +0 -0
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Calculates the byte length of a base64 encoded string.
|
|
3
|
-
* @param {string} string Base64 encoded string
|
|
4
|
-
* @returns {number} Byte length
|
|
5
|
-
*/
|
|
6
|
-
export function length(string: string): number;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Encodes a buffer to a base64 encoded string.
|
|
10
|
-
* @param {Uint8Array} buffer Source buffer
|
|
11
|
-
* @param {number} start Source start
|
|
12
|
-
* @param {number} end Source end
|
|
13
|
-
* @returns {string} Base64 encoded string
|
|
14
|
-
*/
|
|
15
|
-
export function encode(buffer: Uint8Array, start: number, end: number): string;
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Decodes a base64 encoded string to a buffer.
|
|
19
|
-
* @param {string} string Source string
|
|
20
|
-
* @param {Uint8Array} buffer Destination buffer
|
|
21
|
-
* @param {number} offset Destination offset
|
|
22
|
-
* @returns {number} Number of bytes written
|
|
23
|
-
* @throws {Error} If encoding is invalid
|
|
24
|
-
*/
|
|
25
|
-
export function decode(string: string, buffer: Uint8Array, offset: number): number;
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Tests if the specified string appears to be base64 encoded.
|
|
29
|
-
* @param {string} string String to test
|
|
30
|
-
* @returns {boolean} `true` if it appears to be base64 encoded, otherwise false
|
|
31
|
-
*/
|
|
32
|
-
export function test(string: string): boolean;
|
|
1
|
+
/**
|
|
2
|
+
* Calculates the byte length of a base64 encoded string.
|
|
3
|
+
* @param {string} string Base64 encoded string
|
|
4
|
+
* @returns {number} Byte length
|
|
5
|
+
*/
|
|
6
|
+
export function length(string: string): number;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Encodes a buffer to a base64 encoded string.
|
|
10
|
+
* @param {Uint8Array} buffer Source buffer
|
|
11
|
+
* @param {number} start Source start
|
|
12
|
+
* @param {number} end Source end
|
|
13
|
+
* @returns {string} Base64 encoded string
|
|
14
|
+
*/
|
|
15
|
+
export function encode(buffer: Uint8Array, start: number, end: number): string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Decodes a base64 encoded string to a buffer.
|
|
19
|
+
* @param {string} string Source string
|
|
20
|
+
* @param {Uint8Array} buffer Destination buffer
|
|
21
|
+
* @param {number} offset Destination offset
|
|
22
|
+
* @returns {number} Number of bytes written
|
|
23
|
+
* @throws {Error} If encoding is invalid
|
|
24
|
+
*/
|
|
25
|
+
export function decode(string: string, buffer: Uint8Array, offset: number): number;
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Tests if the specified string appears to be base64 encoded.
|
|
29
|
+
* @param {string} string String to test
|
|
30
|
+
* @returns {boolean} `true` if it appears to be base64 encoded, otherwise false
|
|
31
|
+
*/
|
|
32
|
+
export function test(string: string): boolean;
|
|
@@ -1,139 +1,146 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A minimal base64 implementation for number arrays.
|
|
5
|
-
* @memberof util
|
|
6
|
-
* @namespace
|
|
7
|
-
*/
|
|
8
|
-
var base64 = exports;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Calculates the byte length of a base64 encoded string.
|
|
12
|
-
* @param {string} string Base64 encoded string
|
|
13
|
-
* @returns {number} Byte length
|
|
14
|
-
*/
|
|
15
|
-
base64.length = function length(string) {
|
|
16
|
-
var p = string.length;
|
|
17
|
-
if (!p)
|
|
18
|
-
return 0;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
*
|
|
39
|
-
* @param {
|
|
40
|
-
* @
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
var
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
* @param {
|
|
93
|
-
* @
|
|
94
|
-
* @
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
if (
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A minimal base64 implementation for number arrays.
|
|
5
|
+
* @memberof util
|
|
6
|
+
* @namespace
|
|
7
|
+
*/
|
|
8
|
+
var base64 = exports;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Calculates the byte length of a base64 encoded string.
|
|
12
|
+
* @param {string} string Base64 encoded string
|
|
13
|
+
* @returns {number} Byte length
|
|
14
|
+
*/
|
|
15
|
+
base64.length = function length(string) {
|
|
16
|
+
var p = string.length;
|
|
17
|
+
if (!p)
|
|
18
|
+
return 0;
|
|
19
|
+
while (p > 0 && string.charAt(p - 1) === "=")
|
|
20
|
+
--p;
|
|
21
|
+
return Math.floor(p * 3 / 4);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// Base64 encoding table
|
|
25
|
+
var b64 = new Array(64);
|
|
26
|
+
|
|
27
|
+
// Base64 decoding table
|
|
28
|
+
var s64 = new Array(123);
|
|
29
|
+
|
|
30
|
+
// 65..90, 97..122, 48..57, 43, 47
|
|
31
|
+
for (var i = 0; i < 64;)
|
|
32
|
+
s64[b64[i] = i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;
|
|
33
|
+
|
|
34
|
+
s64[45] = 62; // - -> +
|
|
35
|
+
s64[95] = 63; // _ -> /
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Encodes a buffer to a base64 encoded string.
|
|
39
|
+
* @param {Uint8Array} buffer Source buffer
|
|
40
|
+
* @param {number} start Source start
|
|
41
|
+
* @param {number} end Source end
|
|
42
|
+
* @returns {string} Base64 encoded string
|
|
43
|
+
*/
|
|
44
|
+
base64.encode = function encode(buffer, start, end) {
|
|
45
|
+
var parts = null,
|
|
46
|
+
chunk = [];
|
|
47
|
+
var i = 0, // output index
|
|
48
|
+
j = 0, // goto index
|
|
49
|
+
t; // temporary
|
|
50
|
+
while (start < end) {
|
|
51
|
+
var b = buffer[start++];
|
|
52
|
+
switch (j) {
|
|
53
|
+
case 0:
|
|
54
|
+
chunk[i++] = b64[b >> 2];
|
|
55
|
+
t = (b & 3) << 4;
|
|
56
|
+
j = 1;
|
|
57
|
+
break;
|
|
58
|
+
case 1:
|
|
59
|
+
chunk[i++] = b64[t | b >> 4];
|
|
60
|
+
t = (b & 15) << 2;
|
|
61
|
+
j = 2;
|
|
62
|
+
break;
|
|
63
|
+
case 2:
|
|
64
|
+
chunk[i++] = b64[t | b >> 6];
|
|
65
|
+
chunk[i++] = b64[b & 63];
|
|
66
|
+
j = 0;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
if (i > 8191) {
|
|
70
|
+
(parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));
|
|
71
|
+
i = 0;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (j) {
|
|
75
|
+
chunk[i++] = b64[t];
|
|
76
|
+
chunk[i++] = 61;
|
|
77
|
+
if (j === 1)
|
|
78
|
+
chunk[i++] = 61;
|
|
79
|
+
}
|
|
80
|
+
if (parts) {
|
|
81
|
+
if (i)
|
|
82
|
+
parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));
|
|
83
|
+
return parts.join("");
|
|
84
|
+
}
|
|
85
|
+
return String.fromCharCode.apply(String, chunk.slice(0, i));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
var invalidEncoding = "invalid encoding";
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Decodes a base64 encoded string to a buffer.
|
|
92
|
+
* @param {string} string Source string
|
|
93
|
+
* @param {Uint8Array} buffer Destination buffer
|
|
94
|
+
* @param {number} offset Destination offset
|
|
95
|
+
* @returns {number} Number of bytes written
|
|
96
|
+
* @throws {Error} If encoding is invalid
|
|
97
|
+
*/
|
|
98
|
+
base64.decode = function decode(string, buffer, offset) {
|
|
99
|
+
var start = offset;
|
|
100
|
+
var j = 0, // goto index
|
|
101
|
+
t; // temporary
|
|
102
|
+
for (var i = 0; i < string.length;) {
|
|
103
|
+
var c = string.charCodeAt(i++);
|
|
104
|
+
if (c === 61 && j > 1)
|
|
105
|
+
break;
|
|
106
|
+
if ((c = s64[c]) === undefined)
|
|
107
|
+
throw Error(invalidEncoding);
|
|
108
|
+
switch (j) {
|
|
109
|
+
case 0:
|
|
110
|
+
t = c;
|
|
111
|
+
j = 1;
|
|
112
|
+
break;
|
|
113
|
+
case 1:
|
|
114
|
+
buffer[offset++] = t << 2 | (c & 48) >> 4;
|
|
115
|
+
t = c;
|
|
116
|
+
j = 2;
|
|
117
|
+
break;
|
|
118
|
+
case 2:
|
|
119
|
+
buffer[offset++] = (t & 15) << 4 | (c & 60) >> 2;
|
|
120
|
+
t = c;
|
|
121
|
+
j = 3;
|
|
122
|
+
break;
|
|
123
|
+
case 3:
|
|
124
|
+
buffer[offset++] = (t & 3) << 6 | c;
|
|
125
|
+
j = 0;
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
if (j === 1)
|
|
130
|
+
throw Error(invalidEncoding);
|
|
131
|
+
return offset - start;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
var base64Re = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,
|
|
135
|
+
base64UrlRe = /[-_]/,
|
|
136
|
+
base64UrlNoPaddingRe = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2}(?:==)?|[A-Za-z0-9_-]{3}=?)?$/;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Tests if the specified string appears to be base64 encoded.
|
|
140
|
+
* @param {string} string String to test
|
|
141
|
+
* @returns {boolean} `true` if probably base64 encoded, otherwise false
|
|
142
|
+
*/
|
|
143
|
+
base64.test = function test(string) {
|
|
144
|
+
return base64Re.test(string)
|
|
145
|
+
|| base64UrlRe.test(string) && base64UrlNoPaddingRe.test(string);
|
|
146
|
+
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
export = codegen;
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Appends code to the function's body.
|
|
5
|
-
* @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
|
|
6
|
-
* @param [formatParams] Format parameters
|
|
7
|
-
* @returns Itself or the generated function if finished
|
|
8
|
-
* @throws {Error} If format parameter counts do not match
|
|
9
|
-
*/
|
|
10
|
-
type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function);
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Begins generating a function.
|
|
14
|
-
* @param functionParams Function parameter names
|
|
15
|
-
* @param [functionName] Function name if not anonymous
|
|
16
|
-
* @returns Appender that appends code to the function's body
|
|
17
|
-
*/
|
|
18
|
-
declare function codegen(functionParams: string[], functionName?: string): Codegen;
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* Begins generating a function.
|
|
22
|
-
* @param [functionName] Function name if not anonymous
|
|
23
|
-
* @returns Appender that appends code to the function's body
|
|
24
|
-
*/
|
|
25
|
-
declare function codegen(functionName?: string): Codegen;
|
|
26
|
-
|
|
27
|
-
declare namespace codegen {
|
|
28
|
-
|
|
29
|
-
/** When set to `true`, codegen will log generated code to console. Useful for debugging. */
|
|
30
|
-
let verbose: boolean;
|
|
31
|
-
}
|
|
1
|
+
export = codegen;
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Appends code to the function's body.
|
|
5
|
+
* @param [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
|
|
6
|
+
* @param [formatParams] Format parameters
|
|
7
|
+
* @returns Itself or the generated function if finished
|
|
8
|
+
* @throws {Error} If format parameter counts do not match
|
|
9
|
+
*/
|
|
10
|
+
type Codegen = (formatStringOrScope?: (string|{ [k: string]: any }), ...formatParams: any[]) => (Codegen|Function);
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Begins generating a function.
|
|
14
|
+
* @param functionParams Function parameter names
|
|
15
|
+
* @param [functionName] Function name if not anonymous
|
|
16
|
+
* @returns Appender that appends code to the function's body
|
|
17
|
+
*/
|
|
18
|
+
declare function codegen(functionParams: string[], functionName?: string): Codegen;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Begins generating a function.
|
|
22
|
+
* @param [functionName] Function name if not anonymous
|
|
23
|
+
* @returns Appender that appends code to the function's body
|
|
24
|
+
*/
|
|
25
|
+
declare function codegen(functionName?: string): Codegen;
|
|
26
|
+
|
|
27
|
+
declare namespace codegen {
|
|
28
|
+
|
|
29
|
+
/** When set to `true`, codegen will log generated code to console. Useful for debugging. */
|
|
30
|
+
let verbose: boolean;
|
|
31
|
+
}
|
|
@@ -1,112 +1,120 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
module.exports = codegen;
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*
|
|
9
|
-
* @
|
|
10
|
-
* @param {string
|
|
11
|
-
* @
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
*
|
|
26
|
-
* @
|
|
27
|
-
* @
|
|
28
|
-
* @param {
|
|
29
|
-
* @
|
|
30
|
-
* @
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
case "
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
*
|
|
98
|
-
* @
|
|
99
|
-
* @
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
module.exports = codegen;
|
|
3
|
+
|
|
4
|
+
var patterns = require("./patterns");
|
|
5
|
+
var reservedRe = patterns.reservedRe;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Begins generating a function.
|
|
9
|
+
* @memberof util
|
|
10
|
+
* @param {string[]} functionParams Function parameter names
|
|
11
|
+
* @param {string} [functionName] Function name if not anonymous
|
|
12
|
+
* @returns {Codegen} Appender that appends code to the function's body
|
|
13
|
+
*/
|
|
14
|
+
function codegen(functionParams, functionName) {
|
|
15
|
+
|
|
16
|
+
/* istanbul ignore if */
|
|
17
|
+
if (typeof functionParams === "string") {
|
|
18
|
+
functionName = functionParams;
|
|
19
|
+
functionParams = undefined;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
var body = [];
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Appends code to the function's body or finishes generation.
|
|
26
|
+
* @typedef Codegen
|
|
27
|
+
* @type {function}
|
|
28
|
+
* @param {string|Object.<string,*>} [formatStringOrScope] Format string or, to finish the function, an object of additional scope variables, if any
|
|
29
|
+
* @param {...*} [formatParams] Format parameters
|
|
30
|
+
* @returns {Codegen|Function} Itself or the generated function if finished
|
|
31
|
+
* @throws {Error} If format parameter counts do not match
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
function Codegen(formatStringOrScope) {
|
|
35
|
+
// note that explicit array handling below makes this ~50% faster
|
|
36
|
+
|
|
37
|
+
// finish the function
|
|
38
|
+
if (typeof formatStringOrScope !== "string") {
|
|
39
|
+
var source = toString();
|
|
40
|
+
if (codegen.verbose)
|
|
41
|
+
console.log("codegen: " + source); // eslint-disable-line no-console
|
|
42
|
+
source = "return " + source;
|
|
43
|
+
if (formatStringOrScope) {
|
|
44
|
+
var scopeKeys = Object.keys(formatStringOrScope),
|
|
45
|
+
scopeParams = new Array(scopeKeys.length + 1),
|
|
46
|
+
scopeValues = new Array(scopeKeys.length),
|
|
47
|
+
scopeOffset = 0;
|
|
48
|
+
while (scopeOffset < scopeKeys.length) {
|
|
49
|
+
scopeParams[scopeOffset] = scopeKeys[scopeOffset];
|
|
50
|
+
scopeValues[scopeOffset] = formatStringOrScope[scopeKeys[scopeOffset++]];
|
|
51
|
+
}
|
|
52
|
+
scopeParams[scopeOffset] = source;
|
|
53
|
+
return Function.apply(null, scopeParams).apply(null, scopeValues); // eslint-disable-line no-new-func
|
|
54
|
+
}
|
|
55
|
+
return Function(source)(); // eslint-disable-line no-new-func
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// otherwise append to body
|
|
59
|
+
var formatParams = new Array(arguments.length - 1),
|
|
60
|
+
formatOffset = 0;
|
|
61
|
+
while (formatOffset < formatParams.length)
|
|
62
|
+
formatParams[formatOffset] = arguments[++formatOffset];
|
|
63
|
+
formatOffset = 0;
|
|
64
|
+
formatStringOrScope = formatStringOrScope.replace(/%([%dfijs])/g, function replace($0, $1) {
|
|
65
|
+
var value = formatParams[formatOffset++];
|
|
66
|
+
switch ($1) {
|
|
67
|
+
case "d": case "f":
|
|
68
|
+
value = Number(value);
|
|
69
|
+
return Object.is(value, -0) ? "-0" : String(value);
|
|
70
|
+
case "i": return String(Math.floor(value));
|
|
71
|
+
case "j": return JSON.stringify(value);
|
|
72
|
+
case "s": return String(value);
|
|
73
|
+
}
|
|
74
|
+
return "%";
|
|
75
|
+
});
|
|
76
|
+
if (formatOffset !== formatParams.length)
|
|
77
|
+
throw Error("parameter count mismatch");
|
|
78
|
+
body.push(formatStringOrScope);
|
|
79
|
+
return Codegen;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function toString(functionNameOverride) {
|
|
83
|
+
return "function " + safeFunctionName(functionNameOverride || functionName) + "(" + (functionParams && functionParams.join(",") || "") + "){\n " + body.join("\n ") + "\n}";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
Object.defineProperty(Codegen, "toString", {
|
|
87
|
+
value: toString,
|
|
88
|
+
writable: true,
|
|
89
|
+
enumerable: true,
|
|
90
|
+
configurable: true
|
|
91
|
+
});
|
|
92
|
+
return Codegen;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Begins generating a function.
|
|
97
|
+
* @memberof util
|
|
98
|
+
* @function codegen
|
|
99
|
+
* @param {string} [functionName] Function name if not anonymous
|
|
100
|
+
* @returns {Codegen} Appender that appends code to the function's body
|
|
101
|
+
* @variation 2
|
|
102
|
+
*/
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* When set to `true`, codegen will log generated code to console. Useful for debugging.
|
|
106
|
+
* @name util.codegen.verbose
|
|
107
|
+
* @type {boolean}
|
|
108
|
+
*/
|
|
109
|
+
codegen.verbose = false;
|
|
110
|
+
|
|
111
|
+
function safeFunctionName(name) {
|
|
112
|
+
if (!name)
|
|
113
|
+
return "";
|
|
114
|
+
name = String(name).replace(/[^\w$]/g, "");
|
|
115
|
+
if (!name)
|
|
116
|
+
return "";
|
|
117
|
+
if (/^\d/.test(name))
|
|
118
|
+
name = "_" + name;
|
|
119
|
+
return reservedRe.test(name) ? name + "_" : name;
|
|
120
|
+
}
|