apipost-cli 1.0.8 → 1.0.13
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/README.md +4 -0
- package/dist/37.index.js +452 -0
- package/dist/841.index.js +6984 -0
- package/dist/action.js +4 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortController.d.ts +85 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/AbortSignal.d.ts +80 -0
- package/dist/apipost-cli/node_modules/@azure/abort-controller/types/3.1/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-auth/types/3.1/core-auth.d.ts +229 -0
- package/dist/apipost-cli/node_modules/@azure/core-client/types/3.1/core-client.d.ts +900 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/core-paging.d.ts +77 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/samples-dev/getPagedAsyncIteratorSample.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/getPagedAsyncIterator.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/index.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/src/models.d.ts +69 -0
- package/dist/apipost-cli/node_modules/@azure/core-paging/types/3.1/test/getPagedAsyncIterator.spec.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@azure/core-rest-pipeline/types/3.1/core-rest-pipeline.d.ts +1114 -0
- package/dist/apipost-cli/node_modules/@azure/core-util/types/3.1/core-util.d.ts +112 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/constants.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/settings.js +24 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.scandir/package.json +44 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/index.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/settings.js +16 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.stat/package.json +37 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/index.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/settings.js +26 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/out/types/index.js +2 -0
- package/dist/apipost-cli/node_modules/@nodelib/fs.walk/package.json +44 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert/strict.d.ts +8 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/assert.d.ts +972 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/async_hooks.d.ts +530 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/buffer.d.ts +2351 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/child_process.d.ts +1395 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/cluster.d.ts +410 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/console.d.ts +412 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/constants.d.ts +18 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/crypto.d.ts +3961 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dgram.d.ts +545 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns/promises.d.ts +414 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dns.d.ts +668 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/dom-events.d.ts +126 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/domain.d.ts +170 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/events.d.ts +724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs/promises.d.ts +1189 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/fs.d.ts +4043 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.d.ts +303 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/globals.global.d.ts +1 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http.d.ts +1724 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/http2.d.ts +2129 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/https.d.ts +441 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/index.d.ts +88 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/inspector.d.ts +2748 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/module.d.ts +116 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/net.d.ts +886 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/os.d.ts +477 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/path.d.ts +191 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/perf_hooks.d.ts +638 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/process.d.ts +1485 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/punycode.d.ts +117 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/querystring.d.ts +131 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline/promises.d.ts +145 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/readline.d.ts +526 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/repl.d.ts +424 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/consumers.d.ts +12 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/promises.d.ts +42 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream/web.d.ts +330 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/stream.d.ts +1392 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/string_decoder.d.ts +67 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/test.d.ts +1052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers/promises.d.ts +93 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/timers.d.ts +215 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tls.d.ts +1119 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/trace_events.d.ts +182 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/tty.d.ts +205 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/url.d.ts +901 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/util.d.ts +2052 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/v8.d.ts +635 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/vm.d.ts +894 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/wasi.d.ts +152 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/worker_threads.d.ts +693 -0
- package/dist/apipost-cli/node_modules/@types/node/ts4.8/zlib.d.ts +517 -0
- package/dist/apipost-cli/node_modules/bignumber.js/LICENCE.md +26 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.d.ts +1831 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.js +2926 -0
- package/dist/apipost-cli/node_modules/bignumber.js/bignumber.mjs +2889 -0
- package/dist/apipost-cli/node_modules/bignumber.js/doc/API.html +2249 -0
- package/dist/apipost-cli/node_modules/bignumber.js/package.json +50 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/filesystem.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/hwcaps.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_aarch64_macos_or_iphone.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_arm_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_mips_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_ppc_linux.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_freebsd.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_linux_or_android.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_macos.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/impl_x86_windows.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/stack_line_reader.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpu_features/deps/cpu_features/src/string_view.o +0 -0
- package/dist/apipost-cli/node_modules/cpu-features/build/Release/obj.target/cpufeatures/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cbc.js +65 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/cipher.js +142 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/des.js +150 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/ede.js +54 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des/utils.js +256 -0
- package/dist/apipost-cli/node_modules/des.js/lib/des.js +7 -0
- package/dist/apipost-cli/node_modules/des.js/package.json +33 -0
- package/dist/apipost-cli/node_modules/des.js/test/cbc-test.js +73 -0
- package/dist/apipost-cli/node_modules/des.js/test/des-test.js +139 -0
- package/dist/apipost-cli/node_modules/des.js/test/ede-test.js +106 -0
- package/dist/apipost-cli/node_modules/des.js/test/fixtures.js +5 -0
- package/dist/apipost-cli/node_modules/des.js/test/utils-test.js +169 -0
- package/dist/apipost-cli/node_modules/fs.realpath/LICENSE +43 -0
- package/dist/apipost-cli/node_modules/fs.realpath/index.js +66 -0
- package/dist/apipost-cli/node_modules/fs.realpath/old.js +303 -0
- package/dist/apipost-cli/node_modules/fs.realpath/package.json +26 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/auto.js +3 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/helpers/functionsHaveNames.js +5 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/implementation.js +43 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/index.js +18 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/package.json +80 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/polyfill.js +7 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/shim.js +35 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/index.js +23 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/shimmed.js +21 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/tests.js +60 -0
- package/dist/apipost-cli/node_modules/function.prototype.name/test/uglified.js +17 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/index.js +599 -0
- package/dist/apipost-cli/node_modules/lodash.camelcase/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/index.js +676 -0
- package/dist/apipost-cli/node_modules/lodash.memoize/package.json +17 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/LICENSE +47 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/index.js +896 -0
- package/dist/apipost-cli/node_modules/lodash.uniq/package.json +17 -0
- package/dist/apipost-cli/node_modules/moment/ts3.1-typings/moment.d.ts +785 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/LICENSE +20 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/Makefile +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.d.ts +192 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/oauth-1.0a.js +377 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/package.json +30 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/getParameterString.js +21 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/mocha.opts +4 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/oauth_body_hash.js +141 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/consumer.js +14 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/last_ampersand.js +55 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values.js +54 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/multiple_values_qs.js +50 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/nonce_length.js +44 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/parameter_seperator.js +102 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/realm.js +51 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/options/signature_method.js +36 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/bitbucket.js +88 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/flickr.js +196 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/openbank.js +61 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/services/twitter.js +183 -0
- package/dist/apipost-cli/node_modules/oauth-1.0a/test/twitter_sample_data.js +94 -0
- package/dist/apipost-cli/node_modules/object.assign/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/object.assign/auto.js +3 -0
- package/dist/apipost-cli/node_modules/object.assign/dist/browser.js +944 -0
- package/dist/apipost-cli/node_modules/object.assign/hasSymbols.js +43 -0
- package/dist/apipost-cli/node_modules/object.assign/implementation.js +46 -0
- package/dist/apipost-cli/node_modules/object.assign/index.js +22 -0
- package/dist/apipost-cli/node_modules/object.assign/package.json +96 -0
- package/dist/apipost-cli/node_modules/object.assign/polyfill.js +55 -0
- package/dist/apipost-cli/node_modules/object.assign/shim.js +14 -0
- package/dist/apipost-cli/node_modules/object.assign/test/implementation.js +19 -0
- package/dist/apipost-cli/node_modules/object.assign/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/object.assign/test/native.js +49 -0
- package/dist/apipost-cli/node_modules/object.assign/test/ses-compat.js +12 -0
- package/dist/apipost-cli/node_modules/object.assign/test/shimmed.js +52 -0
- package/dist/apipost-cli/node_modules/object.assign/test/tests.js +232 -0
- package/dist/apipost-cli/node_modules/object.assign/test.html +18458 -0
- package/dist/apipost-cli/node_modules/promise.series/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/promise.series/index.js +10 -0
- package/dist/apipost-cli/node_modules/promise.series/package.json +34 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/LICENSE +22 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/auto.js +3 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/implementation.js +42 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/index.js +18 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/package.json +100 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/polyfill.js +36 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/shimmed.js +48 -0
- package/dist/apipost-cli/node_modules/regexp.prototype.flags/test/tests.js +143 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.js +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/dist/index.mjs +1 -0
- package/dist/apipost-cli/node_modules/resolve.exports/index.d.ts +100 -0
- package/dist/apipost-cli/node_modules/resolve.exports/license +21 -0
- package/dist/apipost-cli/node_modules/resolve.exports/package.json +50 -0
- package/dist/apipost-cli/node_modules/ssh2/lib/protocol/crypto/build/Release/obj.target/sshcrypto/src/binding.o +0 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/package.json +101 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/polyfill.js +19 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/implementation.js +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trim/test/tests.js +45 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/index.js +17 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimend/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/LICENSE +21 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/auto.js +3 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/implementation.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/index.js +23 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/package.json +79 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/polyfill.js +15 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/shim.js +14 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/implementation.js +20 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/index.js +18 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/shimmed.js +36 -0
- package/dist/apipost-cli/node_modules/string.prototype.trimstart/test/tests.js +31 -0
- package/dist/apipost-cli/node_modules/web-streams-polyfill/dist/types/ts3.6/polyfill.d.ts +771 -0
- package/dist/apipost-http-schema.json +129 -0
- package/dist/bridge.js +1010 -0
- package/dist/build/Release/cpufeatures.node +0 -0
- package/dist/esprima.js +3756 -0
- package/dist/events.js +977 -0
- package/dist/index.js +565958 -0
- package/dist/index1.js +26 -0
- package/dist/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
- package/dist/module.js +34 -0
- package/dist/pagent.exe +0 -0
- package/dist/setup-node-sandbox.js +461 -0
- package/dist/setup-sandbox.js +545 -0
- package/dist/snappy.darwin-arm64.node +0 -0
- package/dist/xdg-open +1066 -0
- package/package.json +13 -4
- package/bin/cli.js +0 -216
- package/bin/template.js +0 -803
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.html" +0 -0
- /package/{bin → dist/apipost-cli}/apipost-reports//346/265/213/350/257/225.json" +0 -0
package/dist/index1.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var render = require('./render');
|
|
4
|
+
var compile = require('./compile');
|
|
5
|
+
var defaults = require('./defaults');
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 模板引擎
|
|
9
|
+
* @param {string} filename 模板名
|
|
10
|
+
* @param {Object|string} content 数据或模板内容
|
|
11
|
+
* @return {string|function} 如果 content 为 string 则编译并缓存模板,否则渲染模板
|
|
12
|
+
*/
|
|
13
|
+
var template = function template(filename, content) {
|
|
14
|
+
return content instanceof Object ? render({
|
|
15
|
+
filename: filename
|
|
16
|
+
}, content) : compile({
|
|
17
|
+
filename: filename,
|
|
18
|
+
source: content
|
|
19
|
+
});
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
template.render = render;
|
|
23
|
+
template.compile = compile;
|
|
24
|
+
template.defaults = defaults;
|
|
25
|
+
|
|
26
|
+
module.exports = template;
|
|
Binary file
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
var _ast = {
|
|
2
|
+
|
|
3
|
+
initialize: function() {
|
|
4
|
+
this._nodes = [];
|
|
5
|
+
this._node = {};
|
|
6
|
+
this._stash = [];
|
|
7
|
+
},
|
|
8
|
+
|
|
9
|
+
set: function(props) {
|
|
10
|
+
for (var k in props) this._node[k] = props[k];
|
|
11
|
+
return this._node;
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
node: function(obj) {
|
|
15
|
+
if (arguments.length) this._node = obj;
|
|
16
|
+
return this._node;
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
push: function() {
|
|
20
|
+
this._nodes.push(this._node);
|
|
21
|
+
this._node = {};
|
|
22
|
+
},
|
|
23
|
+
|
|
24
|
+
unshift: function() {
|
|
25
|
+
this._nodes.unshift(this._node);
|
|
26
|
+
this._node = {};
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
yield: function() {
|
|
30
|
+
var _nodes = this._nodes;
|
|
31
|
+
this.initialize();
|
|
32
|
+
return _nodes;
|
|
33
|
+
}
|
|
34
|
+
};
|
package/dist/pagent.exe
ADDED
|
Binary file
|
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
/* global host, data, VMError */
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const LocalError = Error;
|
|
6
|
+
const LocalTypeError = TypeError;
|
|
7
|
+
const LocalWeakMap = WeakMap;
|
|
8
|
+
|
|
9
|
+
const {
|
|
10
|
+
apply: localReflectApply,
|
|
11
|
+
defineProperty: localReflectDefineProperty
|
|
12
|
+
} = Reflect;
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
set: localWeakMapSet,
|
|
16
|
+
get: localWeakMapGet
|
|
17
|
+
} = LocalWeakMap.prototype;
|
|
18
|
+
|
|
19
|
+
const {
|
|
20
|
+
isArray: localArrayIsArray
|
|
21
|
+
} = Array;
|
|
22
|
+
|
|
23
|
+
function uncurryThis(func) {
|
|
24
|
+
return (thiz, ...args) => localReflectApply(func, thiz, args);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const localArrayPrototypeSlice = uncurryThis(Array.prototype.slice);
|
|
28
|
+
const localArrayPrototypeIncludes = uncurryThis(Array.prototype.includes);
|
|
29
|
+
const localArrayPrototypePush = uncurryThis(Array.prototype.push);
|
|
30
|
+
const localArrayPrototypeIndexOf = uncurryThis(Array.prototype.indexOf);
|
|
31
|
+
const localArrayPrototypeSplice = uncurryThis(Array.prototype.splice);
|
|
32
|
+
const localStringPrototypeStartsWith = uncurryThis(String.prototype.startsWith);
|
|
33
|
+
const localStringPrototypeSlice = uncurryThis(String.prototype.slice);
|
|
34
|
+
const localStringPrototypeIndexOf = uncurryThis(String.prototype.indexOf);
|
|
35
|
+
|
|
36
|
+
const {
|
|
37
|
+
argv: optionArgv,
|
|
38
|
+
env: optionEnv,
|
|
39
|
+
console: optionConsole,
|
|
40
|
+
extensions,
|
|
41
|
+
emitArgs,
|
|
42
|
+
globalPaths,
|
|
43
|
+
getLookupPathsFor,
|
|
44
|
+
resolve: resolve0,
|
|
45
|
+
lookupPaths,
|
|
46
|
+
loadBuiltinModule,
|
|
47
|
+
registerModule,
|
|
48
|
+
builtinModules,
|
|
49
|
+
dirname,
|
|
50
|
+
basename
|
|
51
|
+
} = data;
|
|
52
|
+
|
|
53
|
+
function ensureSandboxArray(a) {
|
|
54
|
+
return localArrayPrototypeSlice(a);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
class Module {
|
|
58
|
+
|
|
59
|
+
constructor(id, path, parent) {
|
|
60
|
+
this.id = id;
|
|
61
|
+
this.filename = id;
|
|
62
|
+
this.path = path;
|
|
63
|
+
this.parent = parent;
|
|
64
|
+
this.loaded = false;
|
|
65
|
+
this.paths = path ? ensureSandboxArray(getLookupPathsFor(path)) : [];
|
|
66
|
+
this.children = [];
|
|
67
|
+
this.exports = {};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
_updateChildren(child, isNew) {
|
|
71
|
+
const children = this.children;
|
|
72
|
+
if (children && (isNew || !localArrayPrototypeIncludes(children, child))) {
|
|
73
|
+
localArrayPrototypePush(children, child);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
require(id) {
|
|
78
|
+
return requireImpl(this, id, false);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const originalRequire = Module.prototype.require;
|
|
84
|
+
const cacheBuiltins = {__proto__: null};
|
|
85
|
+
|
|
86
|
+
function requireImpl(mod, id, direct) {
|
|
87
|
+
if (direct && mod.require !== originalRequire) {
|
|
88
|
+
return mod.require(id);
|
|
89
|
+
}
|
|
90
|
+
const filename = resolve0(mod, id, undefined, Module._extensions, direct);
|
|
91
|
+
if (localStringPrototypeStartsWith(filename, 'node:')) {
|
|
92
|
+
id = localStringPrototypeSlice(filename, 5);
|
|
93
|
+
let nmod = cacheBuiltins[id];
|
|
94
|
+
if (!nmod) {
|
|
95
|
+
nmod = loadBuiltinModule(id);
|
|
96
|
+
if (!nmod) throw new VMError(`Cannot find module '${filename}'`, 'ENOTFOUND');
|
|
97
|
+
cacheBuiltins[id] = nmod;
|
|
98
|
+
}
|
|
99
|
+
return nmod;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const cachedModule = Module._cache[filename];
|
|
103
|
+
if (cachedModule !== undefined) {
|
|
104
|
+
mod._updateChildren(cachedModule, false);
|
|
105
|
+
return cachedModule.exports;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
let nmod = cacheBuiltins[id];
|
|
109
|
+
if (nmod) return nmod;
|
|
110
|
+
nmod = loadBuiltinModule(id);
|
|
111
|
+
if (nmod) {
|
|
112
|
+
cacheBuiltins[id] = nmod;
|
|
113
|
+
return nmod;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const path = dirname(filename);
|
|
117
|
+
const module = new Module(filename, path, mod);
|
|
118
|
+
registerModule(module, filename, path, mod, direct);
|
|
119
|
+
mod._updateChildren(module, true);
|
|
120
|
+
try {
|
|
121
|
+
Module._cache[filename] = module;
|
|
122
|
+
const handler = findBestExtensionHandler(filename);
|
|
123
|
+
handler(module, filename);
|
|
124
|
+
module.loaded = true;
|
|
125
|
+
} catch (e) {
|
|
126
|
+
delete Module._cache[filename];
|
|
127
|
+
const children = mod.children;
|
|
128
|
+
if (localArrayIsArray(children)) {
|
|
129
|
+
const index = localArrayPrototypeIndexOf(children, module);
|
|
130
|
+
if (index !== -1) {
|
|
131
|
+
localArrayPrototypeSplice(children, index, 1);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
throw e;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return module.exports;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
Module.builtinModules = ensureSandboxArray(builtinModules);
|
|
141
|
+
Module.globalPaths = ensureSandboxArray(globalPaths);
|
|
142
|
+
Module._extensions = {__proto__: null};
|
|
143
|
+
Module._cache = {__proto__: null};
|
|
144
|
+
|
|
145
|
+
{
|
|
146
|
+
const keys = Object.getOwnPropertyNames(extensions);
|
|
147
|
+
for (let i = 0; i < keys.length; i++) {
|
|
148
|
+
const key = keys[i];
|
|
149
|
+
const handler = extensions[key];
|
|
150
|
+
Module._extensions[key] = (mod, filename) => handler(mod, filename);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function findBestExtensionHandler(filename) {
|
|
155
|
+
const name = basename(filename);
|
|
156
|
+
for (let i = 0; (i = localStringPrototypeIndexOf(name, '.', i + 1)) !== -1;) {
|
|
157
|
+
const ext = localStringPrototypeSlice(name, i);
|
|
158
|
+
const handler = Module._extensions[ext];
|
|
159
|
+
if (handler) return handler;
|
|
160
|
+
}
|
|
161
|
+
const js = Module._extensions['.js'];
|
|
162
|
+
if (js) return js;
|
|
163
|
+
const keys = Object.getOwnPropertyNames(Module._extensions);
|
|
164
|
+
if (keys.length === 0) throw new VMError(`Failed to load '${filename}': Unknown type.`, 'ELOADFAIL');
|
|
165
|
+
return Module._extensions[keys[0]];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function createRequireForModule(mod) {
|
|
169
|
+
// eslint-disable-next-line no-shadow
|
|
170
|
+
function require(id) {
|
|
171
|
+
return requireImpl(mod, id, true);
|
|
172
|
+
}
|
|
173
|
+
function resolve(id, options) {
|
|
174
|
+
return resolve0(mod, id, options, Module._extensions, true);
|
|
175
|
+
}
|
|
176
|
+
require.resolve = resolve;
|
|
177
|
+
function paths(id) {
|
|
178
|
+
return ensureSandboxArray(lookupPaths(mod, id));
|
|
179
|
+
}
|
|
180
|
+
resolve.paths = paths;
|
|
181
|
+
|
|
182
|
+
require.extensions = Module._extensions;
|
|
183
|
+
|
|
184
|
+
require.cache = Module._cache;
|
|
185
|
+
|
|
186
|
+
return require;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Prepare sandbox.
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
const TIMERS = new LocalWeakMap();
|
|
194
|
+
|
|
195
|
+
class Timeout {
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
class Interval {
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
class Immediate {
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
function clearTimer(timer) {
|
|
205
|
+
const obj = localReflectApply(localWeakMapGet, TIMERS, [timer]);
|
|
206
|
+
if (obj) {
|
|
207
|
+
obj.clear(obj.value);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
// This is a function and not an arrow function, since the original is also a function
|
|
212
|
+
// eslint-disable-next-line no-shadow
|
|
213
|
+
global.setTimeout = function setTimeout(callback, delay, ...args) {
|
|
214
|
+
if (typeof callback !== 'function') throw new LocalTypeError('"callback" argument must be a function');
|
|
215
|
+
const obj = new Timeout(callback, args);
|
|
216
|
+
const cb = () => {
|
|
217
|
+
localReflectApply(callback, null, args);
|
|
218
|
+
};
|
|
219
|
+
const tmr = host.setTimeout(cb, delay);
|
|
220
|
+
|
|
221
|
+
const ref = {
|
|
222
|
+
__proto__: null,
|
|
223
|
+
clear: host.clearTimeout,
|
|
224
|
+
value: tmr
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
localReflectApply(localWeakMapSet, TIMERS, [obj, ref]);
|
|
228
|
+
return obj;
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
// eslint-disable-next-line no-shadow
|
|
232
|
+
global.setInterval = function setInterval(callback, interval, ...args) {
|
|
233
|
+
if (typeof callback !== 'function') throw new LocalTypeError('"callback" argument must be a function');
|
|
234
|
+
const obj = new Interval();
|
|
235
|
+
const cb = () => {
|
|
236
|
+
localReflectApply(callback, null, args);
|
|
237
|
+
};
|
|
238
|
+
const tmr = host.setInterval(cb, interval);
|
|
239
|
+
|
|
240
|
+
const ref = {
|
|
241
|
+
__proto__: null,
|
|
242
|
+
clear: host.clearInterval,
|
|
243
|
+
value: tmr
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
localReflectApply(localWeakMapSet, TIMERS, [obj, ref]);
|
|
247
|
+
return obj;
|
|
248
|
+
};
|
|
249
|
+
|
|
250
|
+
// eslint-disable-next-line no-shadow
|
|
251
|
+
global.setImmediate = function setImmediate(callback, ...args) {
|
|
252
|
+
if (typeof callback !== 'function') throw new LocalTypeError('"callback" argument must be a function');
|
|
253
|
+
const obj = new Immediate();
|
|
254
|
+
const cb = () => {
|
|
255
|
+
localReflectApply(callback, null, args);
|
|
256
|
+
};
|
|
257
|
+
const tmr = host.setImmediate(cb);
|
|
258
|
+
|
|
259
|
+
const ref = {
|
|
260
|
+
__proto__: null,
|
|
261
|
+
clear: host.clearImmediate,
|
|
262
|
+
value: tmr
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
localReflectApply(localWeakMapSet, TIMERS, [obj, ref]);
|
|
266
|
+
return obj;
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
// eslint-disable-next-line no-shadow
|
|
270
|
+
global.clearTimeout = function clearTimeout(timeout) {
|
|
271
|
+
clearTimer(timeout);
|
|
272
|
+
};
|
|
273
|
+
|
|
274
|
+
// eslint-disable-next-line no-shadow
|
|
275
|
+
global.clearInterval = function clearInterval(interval) {
|
|
276
|
+
clearTimer(interval);
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
// eslint-disable-next-line no-shadow
|
|
280
|
+
global.clearImmediate = function clearImmediate(immediate) {
|
|
281
|
+
clearTimer(immediate);
|
|
282
|
+
};
|
|
283
|
+
|
|
284
|
+
const localProcess = host.process;
|
|
285
|
+
|
|
286
|
+
const LISTENERS = new LocalWeakMap();
|
|
287
|
+
const LISTENER_HANDLER = new LocalWeakMap();
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
*
|
|
291
|
+
* @param {*} name
|
|
292
|
+
* @param {*} handler
|
|
293
|
+
* @this process
|
|
294
|
+
* @return {this}
|
|
295
|
+
*/
|
|
296
|
+
function addListener(name, handler) {
|
|
297
|
+
if (name !== 'beforeExit' && name !== 'exit') {
|
|
298
|
+
throw new LocalError(`Access denied to listen for '${name}' event.`);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
let cb = localReflectApply(localWeakMapGet, LISTENERS, [handler]);
|
|
302
|
+
if (!cb) {
|
|
303
|
+
cb = () => {
|
|
304
|
+
handler();
|
|
305
|
+
};
|
|
306
|
+
localReflectApply(localWeakMapSet, LISTENER_HANDLER, [cb, handler]);
|
|
307
|
+
localReflectApply(localWeakMapSet, LISTENERS, [handler, cb]);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
localProcess.on(name, cb);
|
|
311
|
+
|
|
312
|
+
return this;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
*
|
|
317
|
+
* @this process
|
|
318
|
+
* @return {this}
|
|
319
|
+
*/
|
|
320
|
+
// eslint-disable-next-line no-shadow
|
|
321
|
+
function process() {
|
|
322
|
+
return this;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const baseUptime = localProcess.uptime();
|
|
326
|
+
|
|
327
|
+
// FIXME wrong class structure
|
|
328
|
+
global.process = {
|
|
329
|
+
__proto__: process.prototype,
|
|
330
|
+
argv: optionArgv !== undefined ? optionArgv : [],
|
|
331
|
+
title: localProcess.title,
|
|
332
|
+
version: localProcess.version,
|
|
333
|
+
versions: localProcess.versions,
|
|
334
|
+
arch: localProcess.arch,
|
|
335
|
+
platform: localProcess.platform,
|
|
336
|
+
env: optionEnv !== undefined ? optionEnv : {},
|
|
337
|
+
pid: localProcess.pid,
|
|
338
|
+
features: localProcess.features,
|
|
339
|
+
nextTick: function nextTick(callback, ...args) {
|
|
340
|
+
if (typeof callback !== 'function') {
|
|
341
|
+
throw new LocalError('Callback must be a function.');
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
localProcess.nextTick(()=>{
|
|
345
|
+
localReflectApply(callback, null, args);
|
|
346
|
+
});
|
|
347
|
+
},
|
|
348
|
+
hrtime: function hrtime(time) {
|
|
349
|
+
return localProcess.hrtime(time);
|
|
350
|
+
},
|
|
351
|
+
uptime: function uptime() {
|
|
352
|
+
return localProcess.uptime() - baseUptime;
|
|
353
|
+
},
|
|
354
|
+
cwd: function cwd() {
|
|
355
|
+
return localProcess.cwd();
|
|
356
|
+
},
|
|
357
|
+
addListener,
|
|
358
|
+
on: addListener,
|
|
359
|
+
|
|
360
|
+
once: function once(name, handler) {
|
|
361
|
+
if (name !== 'beforeExit' && name !== 'exit') {
|
|
362
|
+
throw new LocalError(`Access denied to listen for '${name}' event.`);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
let triggered = false;
|
|
366
|
+
const cb = () => {
|
|
367
|
+
if (triggered) return;
|
|
368
|
+
triggered = true;
|
|
369
|
+
localProcess.removeListener(name, cb);
|
|
370
|
+
handler();
|
|
371
|
+
};
|
|
372
|
+
localReflectApply(localWeakMapSet, LISTENER_HANDLER, [cb, handler]);
|
|
373
|
+
|
|
374
|
+
localProcess.on(name, cb);
|
|
375
|
+
|
|
376
|
+
return this;
|
|
377
|
+
},
|
|
378
|
+
|
|
379
|
+
listeners: function listeners(name) {
|
|
380
|
+
if (name !== 'beforeExit' && name !== 'exit') {
|
|
381
|
+
// Maybe add ({__proto__:null})[name] to throw when name fails in https://tc39.es/ecma262/#sec-topropertykey.
|
|
382
|
+
return [];
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
// Filter out listeners, which were not created in this sandbox
|
|
386
|
+
const all = localProcess.listeners(name);
|
|
387
|
+
const filtered = [];
|
|
388
|
+
let j = 0;
|
|
389
|
+
for (let i = 0; i < all.length; i++) {
|
|
390
|
+
const h = localReflectApply(localWeakMapGet, LISTENER_HANDLER, [all[i]]);
|
|
391
|
+
if (h) {
|
|
392
|
+
if (!localReflectDefineProperty(filtered, j, {
|
|
393
|
+
__proto__: null,
|
|
394
|
+
value: h,
|
|
395
|
+
writable: true,
|
|
396
|
+
enumerable: true,
|
|
397
|
+
configurable: true
|
|
398
|
+
})) throw new LocalError('Unexpected');
|
|
399
|
+
j++;
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
return filtered;
|
|
403
|
+
},
|
|
404
|
+
|
|
405
|
+
removeListener: function removeListener(name, handler) {
|
|
406
|
+
if (name !== 'beforeExit' && name !== 'exit') {
|
|
407
|
+
return this;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
const cb = localReflectApply(localWeakMapGet, LISTENERS, [handler]);
|
|
411
|
+
if (cb) localProcess.removeListener(name, cb);
|
|
412
|
+
|
|
413
|
+
return this;
|
|
414
|
+
},
|
|
415
|
+
|
|
416
|
+
umask: function umask() {
|
|
417
|
+
if (arguments.length) {
|
|
418
|
+
throw new LocalError('Access denied to set umask.');
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
return localProcess.umask();
|
|
422
|
+
}
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
if (optionConsole === 'inherit') {
|
|
426
|
+
global.console = host.console;
|
|
427
|
+
} else if (optionConsole === 'redirect') {
|
|
428
|
+
global.console = {
|
|
429
|
+
debug(...args) {
|
|
430
|
+
emitArgs('console.debug', args);
|
|
431
|
+
},
|
|
432
|
+
log(...args) {
|
|
433
|
+
emitArgs('console.log', args);
|
|
434
|
+
},
|
|
435
|
+
info(...args) {
|
|
436
|
+
emitArgs('console.info', args);
|
|
437
|
+
},
|
|
438
|
+
warn(...args) {
|
|
439
|
+
emitArgs('console.warn', args);
|
|
440
|
+
},
|
|
441
|
+
error(...args) {
|
|
442
|
+
emitArgs('console.error', args);
|
|
443
|
+
},
|
|
444
|
+
dir(...args) {
|
|
445
|
+
emitArgs('console.dir', args);
|
|
446
|
+
},
|
|
447
|
+
time() {},
|
|
448
|
+
timeEnd() {},
|
|
449
|
+
trace(...args) {
|
|
450
|
+
emitArgs('console.trace', args);
|
|
451
|
+
}
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
return {
|
|
456
|
+
__proto__: null,
|
|
457
|
+
Module,
|
|
458
|
+
jsonParse: JSON.parse,
|
|
459
|
+
createRequireForModule,
|
|
460
|
+
requireImpl
|
|
461
|
+
};
|