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
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var keys = require('object-keys');
|
|
4
|
+
|
|
5
|
+
module.exports = function hasSymbols() {
|
|
6
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
7
|
+
if (typeof Symbol.iterator === 'symbol') { return true; }
|
|
8
|
+
|
|
9
|
+
var obj = {};
|
|
10
|
+
var sym = Symbol('test');
|
|
11
|
+
var symObj = Object(sym);
|
|
12
|
+
if (typeof sym === 'string') { return false; }
|
|
13
|
+
|
|
14
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
|
|
15
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
|
|
16
|
+
|
|
17
|
+
/*
|
|
18
|
+
* temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
19
|
+
* if (sym instanceof Symbol) { return false; }
|
|
20
|
+
* temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
21
|
+
* if (!(symObj instanceof Symbol)) { return false; }
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var symVal = 42;
|
|
25
|
+
obj[sym] = symVal;
|
|
26
|
+
for (sym in obj) { return false; } // eslint-disable-line no-unreachable-loop
|
|
27
|
+
if (keys(obj).length !== 0) { return false; }
|
|
28
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
|
|
29
|
+
|
|
30
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
|
|
31
|
+
|
|
32
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
33
|
+
if (syms.length !== 1 || syms[0] !== sym) { return false; }
|
|
34
|
+
|
|
35
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
|
|
36
|
+
|
|
37
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
38
|
+
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
|
|
39
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return true;
|
|
43
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// modified from https://github.com/es-shims/es6-shim
|
|
4
|
+
var objectKeys = require('object-keys');
|
|
5
|
+
var hasSymbols = require('has-symbols/shams')();
|
|
6
|
+
var callBound = require('call-bind/callBound');
|
|
7
|
+
var toObject = Object;
|
|
8
|
+
var $push = callBound('Array.prototype.push');
|
|
9
|
+
var $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');
|
|
10
|
+
var originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;
|
|
11
|
+
|
|
12
|
+
// eslint-disable-next-line no-unused-vars
|
|
13
|
+
module.exports = function assign(target, source1) {
|
|
14
|
+
if (target == null) { throw new TypeError('target must be an object'); }
|
|
15
|
+
var to = toObject(target); // step 1
|
|
16
|
+
if (arguments.length === 1) {
|
|
17
|
+
return to; // step 2
|
|
18
|
+
}
|
|
19
|
+
for (var s = 1; s < arguments.length; ++s) {
|
|
20
|
+
var from = toObject(arguments[s]); // step 3.a.i
|
|
21
|
+
|
|
22
|
+
// step 3.a.ii:
|
|
23
|
+
var keys = objectKeys(from);
|
|
24
|
+
var getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);
|
|
25
|
+
if (getSymbols) {
|
|
26
|
+
var syms = getSymbols(from);
|
|
27
|
+
for (var j = 0; j < syms.length; ++j) {
|
|
28
|
+
var key = syms[j];
|
|
29
|
+
if ($propIsEnumerable(from, key)) {
|
|
30
|
+
$push(keys, key);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// step 3.a.iii:
|
|
36
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
37
|
+
var nextKey = keys[i];
|
|
38
|
+
if ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2
|
|
39
|
+
var propValue = from[nextKey]; // step 3.a.iii.2.a
|
|
40
|
+
to[nextKey] = propValue; // step 3.a.iii.2.b
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return to; // step 4
|
|
46
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var defineProperties = require('define-properties');
|
|
4
|
+
var callBind = require('call-bind');
|
|
5
|
+
|
|
6
|
+
var implementation = require('./implementation');
|
|
7
|
+
var getPolyfill = require('./polyfill');
|
|
8
|
+
var shim = require('./shim');
|
|
9
|
+
|
|
10
|
+
var polyfill = callBind.apply(getPolyfill());
|
|
11
|
+
// eslint-disable-next-line no-unused-vars
|
|
12
|
+
var bound = function assign(target, source1) {
|
|
13
|
+
return polyfill(Object, arguments);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
defineProperties(bound, {
|
|
17
|
+
getPolyfill: getPolyfill,
|
|
18
|
+
implementation: implementation,
|
|
19
|
+
shim: shim
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
module.exports = bound;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "object.assign",
|
|
3
|
+
"version": "4.1.4",
|
|
4
|
+
"author": "Jordan Harband",
|
|
5
|
+
"funding": {
|
|
6
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
7
|
+
},
|
|
8
|
+
"description": "ES6 spec-compliant Object.assign shim. From https://github.com/es-shims/es6-shim",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"main": "index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
13
|
+
"pretest": "npm run lint && es-shim-api --bound",
|
|
14
|
+
"test": "npm run tests-only && npm run test:ses",
|
|
15
|
+
"posttest": "aud --production",
|
|
16
|
+
"tests-only": "npm run test:implementation && npm run test:shim",
|
|
17
|
+
"test:native": "nyc node test/native",
|
|
18
|
+
"test:shim": "nyc node test/shimmed",
|
|
19
|
+
"test:implementation": "nyc node test",
|
|
20
|
+
"test:ses": "node test/ses-compat",
|
|
21
|
+
"lint": "eslint .",
|
|
22
|
+
"build": "mkdir -p dist && browserify browserShim.js > dist/browser.js",
|
|
23
|
+
"prepublishOnly": "safe-publish-latest && npm run build",
|
|
24
|
+
"prepublish": "not-in-publish || npm run prepublishOnly"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git://github.com/ljharb/object.assign.git"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"Object.assign",
|
|
32
|
+
"assign",
|
|
33
|
+
"ES6",
|
|
34
|
+
"extend",
|
|
35
|
+
"$.extend",
|
|
36
|
+
"jQuery",
|
|
37
|
+
"_.extend",
|
|
38
|
+
"Underscore",
|
|
39
|
+
"es-shim API",
|
|
40
|
+
"polyfill",
|
|
41
|
+
"shim"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"call-bind": "^1.0.2",
|
|
45
|
+
"define-properties": "^1.1.4",
|
|
46
|
+
"has-symbols": "^1.0.3",
|
|
47
|
+
"object-keys": "^1.1.1"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@es-shims/api": "^2.2.3",
|
|
51
|
+
"@ljharb/eslint-config": "^21.0.0",
|
|
52
|
+
"aud": "^2.0.0",
|
|
53
|
+
"browserify": "^16.5.2",
|
|
54
|
+
"eslint": "=8.8.0",
|
|
55
|
+
"for-each": "^0.3.3",
|
|
56
|
+
"functions-have-names": "^1.2.3",
|
|
57
|
+
"has": "^1.0.3",
|
|
58
|
+
"has-strict-mode": "^1.0.1",
|
|
59
|
+
"is": "^3.3.0",
|
|
60
|
+
"mock-property": "^1.0.0",
|
|
61
|
+
"npmignore": "^0.3.0",
|
|
62
|
+
"nyc": "^10.3.2",
|
|
63
|
+
"safe-publish-latest": "^2.0.0",
|
|
64
|
+
"ses": "^0.11.1",
|
|
65
|
+
"tape": "^5.5.3"
|
|
66
|
+
},
|
|
67
|
+
"testling": {
|
|
68
|
+
"files": "test/index.js",
|
|
69
|
+
"browsers": [
|
|
70
|
+
"iexplore/6.0..latest",
|
|
71
|
+
"firefox/3.0..6.0",
|
|
72
|
+
"firefox/15.0..latest",
|
|
73
|
+
"firefox/nightly",
|
|
74
|
+
"chrome/4.0..10.0",
|
|
75
|
+
"chrome/20.0..latest",
|
|
76
|
+
"chrome/canary",
|
|
77
|
+
"opera/10.0..latest",
|
|
78
|
+
"opera/next",
|
|
79
|
+
"safari/4.0..latest",
|
|
80
|
+
"ipad/6.0..latest",
|
|
81
|
+
"iphone/6.0..latest",
|
|
82
|
+
"android-browser/4.2"
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
"engines": {
|
|
86
|
+
"node": ">= 0.4"
|
|
87
|
+
},
|
|
88
|
+
"publishConfig": {
|
|
89
|
+
"ignore": [
|
|
90
|
+
".github/workflows",
|
|
91
|
+
"bower.json",
|
|
92
|
+
"browserShim.js",
|
|
93
|
+
"!dist/"
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var implementation = require('./implementation');
|
|
4
|
+
|
|
5
|
+
var lacksProperEnumerationOrder = function () {
|
|
6
|
+
if (!Object.assign) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
/*
|
|
10
|
+
* v8, specifically in node 4.x, has a bug with incorrect property enumeration order
|
|
11
|
+
* note: this does not detect the bug unless there's 20 characters
|
|
12
|
+
*/
|
|
13
|
+
var str = 'abcdefghijklmnopqrst';
|
|
14
|
+
var letters = str.split('');
|
|
15
|
+
var map = {};
|
|
16
|
+
for (var i = 0; i < letters.length; ++i) {
|
|
17
|
+
map[letters[i]] = letters[i];
|
|
18
|
+
}
|
|
19
|
+
var obj = Object.assign({}, map);
|
|
20
|
+
var actual = '';
|
|
21
|
+
for (var k in obj) {
|
|
22
|
+
actual += k;
|
|
23
|
+
}
|
|
24
|
+
return str !== actual;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var assignHasPendingExceptions = function () {
|
|
28
|
+
if (!Object.assign || !Object.preventExtensions) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
/*
|
|
32
|
+
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
|
33
|
+
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
|
34
|
+
*/
|
|
35
|
+
var thrower = Object.preventExtensions({ 1: 2 });
|
|
36
|
+
try {
|
|
37
|
+
Object.assign(thrower, 'xy');
|
|
38
|
+
} catch (e) {
|
|
39
|
+
return thrower[1] === 'y';
|
|
40
|
+
}
|
|
41
|
+
return false;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
module.exports = function getPolyfill() {
|
|
45
|
+
if (!Object.assign) {
|
|
46
|
+
return implementation;
|
|
47
|
+
}
|
|
48
|
+
if (lacksProperEnumerationOrder()) {
|
|
49
|
+
return implementation;
|
|
50
|
+
}
|
|
51
|
+
if (assignHasPendingExceptions()) {
|
|
52
|
+
return implementation;
|
|
53
|
+
}
|
|
54
|
+
return Object.assign;
|
|
55
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var define = require('define-properties');
|
|
4
|
+
var getPolyfill = require('./polyfill');
|
|
5
|
+
|
|
6
|
+
module.exports = function shimAssign() {
|
|
7
|
+
var polyfill = getPolyfill();
|
|
8
|
+
define(
|
|
9
|
+
Object,
|
|
10
|
+
{ assign: polyfill },
|
|
11
|
+
{ assign: function () { return Object.assign !== polyfill; } }
|
|
12
|
+
);
|
|
13
|
+
return polyfill;
|
|
14
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var implementation = require('../implementation');
|
|
4
|
+
var callBind = require('call-bind');
|
|
5
|
+
var test = require('tape');
|
|
6
|
+
var hasStrictMode = require('has-strict-mode')();
|
|
7
|
+
var runTests = require('./tests');
|
|
8
|
+
|
|
9
|
+
test('as a function', function (t) {
|
|
10
|
+
t.test('bad first arg/receiver', { skip: !hasStrictMode }, function (st) {
|
|
11
|
+
st['throws'](function () { implementation(undefined); }, TypeError, 'undefined is not an object');
|
|
12
|
+
st['throws'](function () { implementation(null); }, TypeError, 'null is not an object');
|
|
13
|
+
st.end();
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
runTests(callBind(implementation, Object), t);
|
|
17
|
+
|
|
18
|
+
t.end();
|
|
19
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var assign = require('../');
|
|
4
|
+
var test = require('tape');
|
|
5
|
+
var runTests = require('./tests');
|
|
6
|
+
|
|
7
|
+
test('as a function', function (t) {
|
|
8
|
+
t.test('bad array/this value', function (st) {
|
|
9
|
+
st['throws'](function () { assign(undefined); }, TypeError, 'undefined is not an object');
|
|
10
|
+
st['throws'](function () { assign(null); }, TypeError, 'null is not an object');
|
|
11
|
+
st.end();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
runTests(assign, t);
|
|
15
|
+
|
|
16
|
+
t.end();
|
|
17
|
+
});
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
var defineProperties = require('define-properties');
|
|
5
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var functionsHaveNames = require('functions-have-names')();
|
|
7
|
+
|
|
8
|
+
var runTests = require('./tests');
|
|
9
|
+
|
|
10
|
+
test('native', function (t) {
|
|
11
|
+
t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
|
|
12
|
+
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
|
13
|
+
st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
|
|
14
|
+
st.end();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
|
18
|
+
et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
|
|
19
|
+
et.end();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
|
23
|
+
|
|
24
|
+
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
|
|
25
|
+
st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
|
|
26
|
+
st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
|
|
27
|
+
st.end();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
|
31
|
+
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
|
32
|
+
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
|
33
|
+
/*
|
|
34
|
+
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
|
35
|
+
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
|
36
|
+
*/
|
|
37
|
+
var thrower = Object.preventExtensions({ 1: '2' });
|
|
38
|
+
var error;
|
|
39
|
+
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
|
40
|
+
st.equal(error instanceof TypeError, true, 'error is TypeError');
|
|
41
|
+
st.equal(thrower[1], '2', 'thrower[1] === "2"');
|
|
42
|
+
|
|
43
|
+
st.end();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
runTests(Object.assign, t);
|
|
47
|
+
|
|
48
|
+
t.end();
|
|
49
|
+
});
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var assign = require('../');
|
|
4
|
+
assign.shim();
|
|
5
|
+
|
|
6
|
+
var test = require('tape');
|
|
7
|
+
var defineProperties = require('define-properties');
|
|
8
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var functionsHaveNames = require('functions-have-names')();
|
|
10
|
+
|
|
11
|
+
var runTests = require('./tests');
|
|
12
|
+
|
|
13
|
+
test('shimmed', function (t) {
|
|
14
|
+
t.equal(Object.assign.length, 2, 'Object.assign has a length of 2');
|
|
15
|
+
t.test('Function name', { skip: !functionsHaveNames }, function (st) {
|
|
16
|
+
st.equal(Object.assign.name, 'assign', 'Object.assign has name "assign"');
|
|
17
|
+
st.end();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
t.test('enumerability', { skip: !defineProperties.supportsDescriptors }, function (et) {
|
|
21
|
+
et.equal(false, isEnumerable.call(Object, 'assign'), 'Object.assign is not enumerable');
|
|
22
|
+
et.end();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var supportsStrictMode = (function () { return typeof this === 'undefined'; }());
|
|
26
|
+
|
|
27
|
+
t.test('bad object value', { skip: !supportsStrictMode }, function (st) {
|
|
28
|
+
st['throws'](function () { return Object.assign(undefined); }, TypeError, 'undefined is not an object');
|
|
29
|
+
st['throws'](function () { return Object.assign(null); }, TypeError, 'null is not an object');
|
|
30
|
+
st.end();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// v8 in node 0.8 and 0.10 have non-enumerable string properties
|
|
34
|
+
var stringCharsAreEnumerable = isEnumerable.call('xy', 0);
|
|
35
|
+
t.test('when Object.assign is present and has pending exceptions', { skip: !stringCharsAreEnumerable || !Object.preventExtensions }, function (st) {
|
|
36
|
+
/*
|
|
37
|
+
* Firefox 37 still has "pending exception" logic in its Object.assign implementation,
|
|
38
|
+
* which is 72% slower than our shim, and Firefox 40's native implementation.
|
|
39
|
+
*/
|
|
40
|
+
var thrower = Object.preventExtensions({ 1: '2' });
|
|
41
|
+
var error;
|
|
42
|
+
try { Object.assign(thrower, 'xy'); } catch (e) { error = e; }
|
|
43
|
+
st.equal(error instanceof TypeError, true, 'error is TypeError');
|
|
44
|
+
st.equal(thrower[1], '2', 'thrower[1] === "2"');
|
|
45
|
+
|
|
46
|
+
st.end();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
runTests(Object.assign, t);
|
|
50
|
+
|
|
51
|
+
t.end();
|
|
52
|
+
});
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var hasSymbols = require('has-symbols/shams')();
|
|
4
|
+
var forEach = require('for-each');
|
|
5
|
+
var has = require('has');
|
|
6
|
+
var mockProperty = require('mock-property');
|
|
7
|
+
|
|
8
|
+
module.exports = function (assign, t) {
|
|
9
|
+
t.test('error cases', function (st) {
|
|
10
|
+
st['throws'](function () { assign(null); }, TypeError, 'target must be an object');
|
|
11
|
+
st['throws'](function () { assign(undefined); }, TypeError, 'target must be an object');
|
|
12
|
+
st['throws'](function () { assign(null, {}); }, TypeError, 'target must be an object');
|
|
13
|
+
st['throws'](function () { assign(undefined, {}); }, TypeError, 'target must be an object');
|
|
14
|
+
st.end();
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
t.test('non-object target, no sources', function (st) {
|
|
18
|
+
var bool = assign(true);
|
|
19
|
+
st.equal(typeof bool, 'object', 'bool is object');
|
|
20
|
+
st.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
|
21
|
+
|
|
22
|
+
var number = assign(1);
|
|
23
|
+
st.equal(typeof number, 'object', 'number is object');
|
|
24
|
+
st.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
|
|
25
|
+
|
|
26
|
+
var string = assign('1');
|
|
27
|
+
st.equal(typeof string, 'object', 'number is object');
|
|
28
|
+
st.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
|
|
29
|
+
|
|
30
|
+
st.end();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
t.test('non-object target, with sources', function (st) {
|
|
34
|
+
var signal = {};
|
|
35
|
+
|
|
36
|
+
st.test('boolean', function (st2) {
|
|
37
|
+
var bool = assign(true, { a: signal });
|
|
38
|
+
st2.equal(typeof bool, 'object', 'bool is object');
|
|
39
|
+
st2.equal(Boolean.prototype.valueOf.call(bool), true, 'bool coerces to `true`');
|
|
40
|
+
st2.equal(bool.a, signal, 'source properties copied');
|
|
41
|
+
st2.end();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
st.test('number', function (st2) {
|
|
45
|
+
var number = assign(1, { a: signal });
|
|
46
|
+
st2.equal(typeof number, 'object', 'number is object');
|
|
47
|
+
st2.equal(Number.prototype.valueOf.call(number), 1, 'number coerces to `1`');
|
|
48
|
+
st2.equal(number.a, signal, 'source properties copied');
|
|
49
|
+
st2.end();
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
st.test('string', function (st2) {
|
|
53
|
+
var string = assign('1', { a: signal });
|
|
54
|
+
st2.equal(typeof string, 'object', 'number is object');
|
|
55
|
+
st2.equal(String.prototype.valueOf.call(string), '1', 'number coerces to `"1"`');
|
|
56
|
+
st2.equal(string.a, signal, 'source properties copied');
|
|
57
|
+
st2.end();
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
st.end();
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
t.test('non-object sources', function (st) {
|
|
64
|
+
st.deepEqual(assign({ a: 1 }, null, { b: 2 }), { a: 1, b: 2 }, 'ignores null source');
|
|
65
|
+
st.deepEqual(assign({ a: 1 }, { b: 2 }, undefined), { a: 1, b: 2 }, 'ignores undefined source');
|
|
66
|
+
st.end();
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
t.test('returns the modified target object', function (st) {
|
|
70
|
+
var target = {};
|
|
71
|
+
var returned = assign(target, { a: 1 });
|
|
72
|
+
st.equal(returned, target, 'returned object is the same reference as the target object');
|
|
73
|
+
st.end();
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
t.test('has the right length', function (st) {
|
|
77
|
+
st.equal(assign.length, 2, 'length is 2 => 2 required arguments');
|
|
78
|
+
st.end();
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
t.test('merge two objects', function (st) {
|
|
82
|
+
var target = { a: 1 };
|
|
83
|
+
var returned = assign(target, { b: 2 });
|
|
84
|
+
st.deepEqual(returned, { a: 1, b: 2 }, 'returned object has properties from both');
|
|
85
|
+
st.end();
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
t.test('works with functions', function (st) {
|
|
89
|
+
var target = function () {};
|
|
90
|
+
target.a = 1;
|
|
91
|
+
var returned = assign(target, { b: 2 });
|
|
92
|
+
st.equal(target, returned, 'returned object is target');
|
|
93
|
+
st.equal(returned.a, 1);
|
|
94
|
+
st.equal(returned.b, 2);
|
|
95
|
+
st.end();
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
t.test('works with primitives', function (st) {
|
|
99
|
+
var target = 2;
|
|
100
|
+
var source = { b: 42 };
|
|
101
|
+
var returned = assign(target, source);
|
|
102
|
+
st.equal(Object.prototype.toString.call(returned), '[object Number]', 'returned is object form of number primitive');
|
|
103
|
+
st.equal(Number(returned), target, 'returned and target have same valueOf');
|
|
104
|
+
st.equal(returned.b, source.b);
|
|
105
|
+
st.end();
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
/* globals window */
|
|
109
|
+
t.test('works with window.location', { skip: typeof window === 'undefined' }, function (st) {
|
|
110
|
+
var target = {};
|
|
111
|
+
assign(target, window.location);
|
|
112
|
+
for (var prop in window.location) {
|
|
113
|
+
if (has(window.location, prop)) {
|
|
114
|
+
st.deepEqual(target[prop], window.location[prop], prop + ' is copied');
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
st.end();
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
t.test('merge N objects', function (st) {
|
|
121
|
+
var target = { a: 1 };
|
|
122
|
+
var source1 = { b: 2 };
|
|
123
|
+
var source2 = { c: 3 };
|
|
124
|
+
var returned = assign(target, source1, source2);
|
|
125
|
+
st.deepEqual(returned, { a: 1, b: 2, c: 3 }, 'returned object has properties from all sources');
|
|
126
|
+
st.end();
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
t.test('only iterates over own keys', function (st) {
|
|
130
|
+
var Foo = function () {};
|
|
131
|
+
Foo.prototype.bar = true;
|
|
132
|
+
var foo = new Foo();
|
|
133
|
+
foo.baz = true;
|
|
134
|
+
var target = { a: 1 };
|
|
135
|
+
var returned = assign(target, foo);
|
|
136
|
+
st.equal(returned, target, 'returned object is the same reference as the target object');
|
|
137
|
+
st.deepEqual(target, { a: 1, baz: true }, 'returned object has only own properties from both');
|
|
138
|
+
st.end();
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
t.test('includes enumerable symbols, after keys', { skip: !hasSymbols }, function (st) {
|
|
142
|
+
var visited = [];
|
|
143
|
+
var obj = {};
|
|
144
|
+
Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
|
|
145
|
+
var symbol = Symbol('enumerable');
|
|
146
|
+
Object.defineProperty(obj, symbol, {
|
|
147
|
+
enumerable: true,
|
|
148
|
+
get: function () { visited.push(symbol); return Infinity; }
|
|
149
|
+
});
|
|
150
|
+
var nonEnumSymbol = Symbol('non-enumerable');
|
|
151
|
+
Object.defineProperty(obj, nonEnumSymbol, {
|
|
152
|
+
enumerable: false,
|
|
153
|
+
get: function () { visited.push(nonEnumSymbol); return -Infinity; }
|
|
154
|
+
});
|
|
155
|
+
var target = assign({}, obj);
|
|
156
|
+
st.deepEqual(visited, ['a', symbol], 'key is visited first, then symbol');
|
|
157
|
+
st.equal(target.a, 42, 'target.a is 42');
|
|
158
|
+
st.equal(target[symbol], Infinity, 'target[symbol] is Infinity');
|
|
159
|
+
st.notEqual(target[nonEnumSymbol], -Infinity, 'target[nonEnumSymbol] is not -Infinity');
|
|
160
|
+
st.end();
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
t.test('does not fail when symbols are not present', { skip: !Object.isFrozen || Object.isFrozen(Object) }, function (st) {
|
|
164
|
+
st.teardown(mockProperty(Object, 'getOwnPropertySymbols', { 'delete': true }));
|
|
165
|
+
|
|
166
|
+
var visited = [];
|
|
167
|
+
var obj = {};
|
|
168
|
+
Object.defineProperty(obj, 'a', { enumerable: true, get: function () { visited.push('a'); return 42; } });
|
|
169
|
+
var keys = ['a'];
|
|
170
|
+
if (hasSymbols) {
|
|
171
|
+
var symbol = Symbol('sym');
|
|
172
|
+
Object.defineProperty(obj, symbol, {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () { visited.push(symbol); return Infinity; }
|
|
175
|
+
});
|
|
176
|
+
keys.push(symbol);
|
|
177
|
+
}
|
|
178
|
+
var target = assign({}, obj);
|
|
179
|
+
st.deepEqual(visited, keys, 'assign visits expected keys');
|
|
180
|
+
st.equal(target.a, 42, 'target.a is 42');
|
|
181
|
+
|
|
182
|
+
if (hasSymbols) {
|
|
183
|
+
st.equal(target[symbol], Infinity);
|
|
184
|
+
}
|
|
185
|
+
st.end();
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
t.test('preserves correct property enumeration order', function (st) {
|
|
189
|
+
var str = 'abcdefghijklmnopqrst';
|
|
190
|
+
var letters = {};
|
|
191
|
+
forEach(str.split(''), function (letter) {
|
|
192
|
+
letters[letter] = letter;
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
var n = 5;
|
|
196
|
+
st.comment('run the next test ' + n + ' times');
|
|
197
|
+
var object = assign({}, letters);
|
|
198
|
+
var actual = '';
|
|
199
|
+
for (var k in object) {
|
|
200
|
+
actual += k;
|
|
201
|
+
}
|
|
202
|
+
for (var i = 0; i < n; ++i) {
|
|
203
|
+
st.equal(actual, str, 'property enumeration order should be followed');
|
|
204
|
+
}
|
|
205
|
+
st.end();
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
t.test('checks enumerability and existence, in case of modification during [[Get]]', { skip: !Object.defineProperty }, function (st) {
|
|
209
|
+
var targetBvalue = {};
|
|
210
|
+
var targetCvalue = {};
|
|
211
|
+
var target = { b: targetBvalue, c: targetCvalue };
|
|
212
|
+
var source = {};
|
|
213
|
+
Object.defineProperty(source, 'a', {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
get: function () {
|
|
216
|
+
delete this.b;
|
|
217
|
+
Object.defineProperty(this, 'c', { enumerable: false });
|
|
218
|
+
return 'a';
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
var sourceBvalue = {};
|
|
222
|
+
var sourceCvalue = {};
|
|
223
|
+
source.b = sourceBvalue;
|
|
224
|
+
source.c = sourceCvalue;
|
|
225
|
+
var result = assign(target, source);
|
|
226
|
+
st.equal(result, target, 'sanity check: result is === target');
|
|
227
|
+
st.equal(result.b, targetBvalue, 'target key not overwritten by deleted source key');
|
|
228
|
+
st.equal(result.c, targetCvalue, 'target key not overwritten by non-enumerable source key');
|
|
229
|
+
|
|
230
|
+
st.end();
|
|
231
|
+
});
|
|
232
|
+
};
|