ibm-cloud-sdk-core 4.3.3 → 4.3.4
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/iamtest.env +3 -0
- package/package.json +2 -2
- package/sdk-test-utilities/node_modules/.package-lock.json +508 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js +156 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/code-frame/package.json +30 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js +70 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js +57 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js +35 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/lib/keyword.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/helper-validator-identifier/package.json +31 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/LICENSE +22 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/README.md +19 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js +119 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/lib/index.js.map +1 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/index.js +165 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/ansi-styles/readme.md +147 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js +228 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/index.js.flow +93 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/package.json +71 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/readme.md +314 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/templates.js +128 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/chalk/types/index.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/conversions.js +868 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/index.js +78 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/package.json +46 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/.eslintrc.json +43 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/package.json +25 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/color-name/test.js +7 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/license +21 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/package.json +41 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/escape-string-regexp/readme.md +27 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/package.json +44 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/has-flag/readme.md +70 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/index.js +131 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/node_modules/supports-color/readme.md +66 -0
- package/sdk-test-utilities/node_modules/@babel/highlight/package.json +30 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/README.md +5 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/immutableUtils.js +66 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.d.ts +94 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/index.js +34 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/jasmineUtils.js +218 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/build/utils.js +462 -0
- package/sdk-test-utilities/node_modules/@jest/expect-utils/package.json +35 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/README.md +3 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/build/index.js +60 -0
- package/sdk-test-utilities/node_modules/@jest/schemas/package.json +29 -0
- package/sdk-test-utilities/node_modules/@jest/types/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@jest/types/README.md +30 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Circus.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Config.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/Global.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/TestResult.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.d.ts +1204 -0
- package/sdk-test-utilities/node_modules/@jest/types/build/index.js +1 -0
- package/sdk-test-utilities/node_modules/@jest/types/package.json +38 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.d.ts +35 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/compiler.js +577 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.d.ts +2 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/compiler/index.js +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.d.ts +88 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/errors.js +609 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/errors/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/license +23 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/package.json +47 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/readme.md +1424 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/index.js +44 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/system/system.js +90 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.d.ts +723 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/typebox.js +2220 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.d.ts +30 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/cast.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/check.js +484 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/clone.js +71 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/convert.js +372 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.d.ts +26 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/create.js +480 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.d.ts +43 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/delta.js +204 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.d.ts +3 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/equal.js +80 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/hash.js +208 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.d.ts +6 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/index.js +56 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.d.ts +11 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/is.js +53 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.d.ts +13 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/mutate.js +121 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.d.ts +24 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/pointer.js +142 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.d.ts +39 -0
- package/sdk-test-utilities/node_modules/@sinclair/typebox/value/value.js +99 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/index.d.ts +111 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-coverage/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/index.d.ts +184 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-lib-report/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/README.md +86 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/index.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/istanbul-reports/package.json +32 -0
- package/sdk-test-utilities/node_modules/@types/node/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/node/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/sdk-test-utilities/node_modules/@types/node/assert.d.ts +1040 -0
- package/sdk-test-utilities/node_modules/@types/node/async_hooks.d.ts +541 -0
- package/sdk-test-utilities/node_modules/@types/node/buffer.d.ts +2363 -0
- package/sdk-test-utilities/node_modules/@types/node/child_process.d.ts +1544 -0
- package/sdk-test-utilities/node_modules/@types/node/cluster.d.ts +578 -0
- package/sdk-test-utilities/node_modules/@types/node/console.d.ts +452 -0
- package/sdk-test-utilities/node_modules/@types/node/constants.d.ts +19 -0
- package/sdk-test-utilities/node_modules/@types/node/crypto.d.ts +4523 -0
- package/sdk-test-utilities/node_modules/@types/node/dgram.d.ts +596 -0
- package/sdk-test-utilities/node_modules/@types/node/diagnostics_channel.d.ts +554 -0
- package/sdk-test-utilities/node_modules/@types/node/dns/promises.d.ts +474 -0
- package/sdk-test-utilities/node_modules/@types/node/dns.d.ts +864 -0
- package/sdk-test-utilities/node_modules/@types/node/dom-events.d.ts +124 -0
- package/sdk-test-utilities/node_modules/@types/node/domain.d.ts +170 -0
- package/sdk-test-utilities/node_modules/@types/node/events.d.ts +909 -0
- package/sdk-test-utilities/node_modules/@types/node/fs/promises.d.ts +1245 -0
- package/sdk-test-utilities/node_modules/@types/node/fs.d.ts +4317 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.d.ts +411 -0
- package/sdk-test-utilities/node_modules/@types/node/globals.global.d.ts +1 -0
- package/sdk-test-utilities/node_modules/@types/node/http.d.ts +1908 -0
- package/sdk-test-utilities/node_modules/@types/node/http2.d.ts +2418 -0
- package/sdk-test-utilities/node_modules/@types/node/https.d.ts +550 -0
- package/sdk-test-utilities/node_modules/@types/node/index.d.ts +89 -0
- package/sdk-test-utilities/node_modules/@types/node/inspector.d.ts +2746 -0
- package/sdk-test-utilities/node_modules/@types/node/module.d.ts +315 -0
- package/sdk-test-utilities/node_modules/@types/node/net.d.ts +999 -0
- package/sdk-test-utilities/node_modules/@types/node/os.d.ts +495 -0
- package/sdk-test-utilities/node_modules/@types/node/package.json +217 -0
- package/sdk-test-utilities/node_modules/@types/node/path.d.ts +191 -0
- package/sdk-test-utilities/node_modules/@types/node/perf_hooks.d.ts +905 -0
- package/sdk-test-utilities/node_modules/@types/node/process.d.ts +1754 -0
- package/sdk-test-utilities/node_modules/@types/node/punycode.d.ts +117 -0
- package/sdk-test-utilities/node_modules/@types/node/querystring.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/readline/promises.d.ts +150 -0
- package/sdk-test-utilities/node_modules/@types/node/readline.d.ts +540 -0
- package/sdk-test-utilities/node_modules/@types/node/repl.d.ts +430 -0
- package/sdk-test-utilities/node_modules/@types/node/sea.d.ts +153 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/consumers.d.ts +12 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/promises.d.ts +83 -0
- package/sdk-test-utilities/node_modules/@types/node/stream/web.d.ts +367 -0
- package/sdk-test-utilities/node_modules/@types/node/stream.d.ts +1707 -0
- package/sdk-test-utilities/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/sdk-test-utilities/node_modules/@types/node/test.d.ts +1718 -0
- package/sdk-test-utilities/node_modules/@types/node/timers/promises.d.ts +97 -0
- package/sdk-test-utilities/node_modules/@types/node/timers.d.ts +240 -0
- package/sdk-test-utilities/node_modules/@types/node/tls.d.ts +1217 -0
- package/sdk-test-utilities/node_modules/@types/node/trace_events.d.ts +197 -0
- package/sdk-test-utilities/node_modules/@types/node/tty.d.ts +208 -0
- package/sdk-test-utilities/node_modules/@types/node/url.d.ts +952 -0
- package/sdk-test-utilities/node_modules/@types/node/util.d.ts +2292 -0
- package/sdk-test-utilities/node_modules/@types/node/v8.d.ts +808 -0
- package/sdk-test-utilities/node_modules/@types/node/vm.d.ts +924 -0
- package/sdk-test-utilities/node_modules/@types/node/wasi.d.ts +181 -0
- package/sdk-test-utilities/node_modules/@types/node/worker_threads.d.ts +691 -0
- package/sdk-test-utilities/node_modules/@types/node/zlib.d.ts +530 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/README.md +78 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/index.d.ts +59 -0
- package/sdk-test-utilities/node_modules/@types/stack-utils/package.json +25 -0
- package/sdk-test-utilities/node_modules/@types/yargs/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.mts +1 -0
- package/sdk-test-utilities/node_modules/@types/yargs/helpers.d.ts +5 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.mts +46 -0
- package/sdk-test-utilities/node_modules/@types/yargs/index.d.ts +1031 -0
- package/sdk-test-utilities/node_modules/@types/yargs/package.json +87 -0
- package/sdk-test-utilities/node_modules/@types/yargs/yargs.d.ts +9 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/README.md +15 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/index.d.ts +112 -0
- package/sdk-test-utilities/node_modules/@types/yargs-parser/package.json +25 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.d.ts +345 -0
- package/sdk-test-utilities/node_modules/ansi-styles/index.js +163 -0
- package/sdk-test-utilities/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/ansi-styles/package.json +56 -0
- package/sdk-test-utilities/node_modules/ansi-styles/readme.md +152 -0
- package/sdk-test-utilities/node_modules/braces/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/braces/README.md +586 -0
- package/sdk-test-utilities/node_modules/braces/index.js +170 -0
- package/sdk-test-utilities/node_modules/braces/lib/compile.js +60 -0
- package/sdk-test-utilities/node_modules/braces/lib/constants.js +57 -0
- package/sdk-test-utilities/node_modules/braces/lib/expand.js +113 -0
- package/sdk-test-utilities/node_modules/braces/lib/parse.js +331 -0
- package/sdk-test-utilities/node_modules/braces/lib/stringify.js +32 -0
- package/sdk-test-utilities/node_modules/braces/lib/utils.js +122 -0
- package/sdk-test-utilities/node_modules/braces/package.json +77 -0
- package/sdk-test-utilities/node_modules/chalk/index.d.ts +415 -0
- package/sdk-test-utilities/node_modules/chalk/license +9 -0
- package/sdk-test-utilities/node_modules/chalk/package.json +68 -0
- package/sdk-test-utilities/node_modules/chalk/readme.md +341 -0
- package/sdk-test-utilities/node_modules/chalk/source/index.js +229 -0
- package/sdk-test-utilities/node_modules/chalk/source/templates.js +134 -0
- package/sdk-test-utilities/node_modules/chalk/source/util.js +39 -0
- package/sdk-test-utilities/node_modules/ci-info/CHANGELOG.md +178 -0
- package/sdk-test-utilities/node_modules/ci-info/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/ci-info/README.md +135 -0
- package/sdk-test-utilities/node_modules/ci-info/index.d.ts +75 -0
- package/sdk-test-utilities/node_modules/ci-info/index.js +90 -0
- package/sdk-test-utilities/node_modules/ci-info/package.json +45 -0
- package/sdk-test-utilities/node_modules/ci-info/vendors.json +321 -0
- package/sdk-test-utilities/node_modules/color-convert/CHANGELOG.md +54 -0
- package/sdk-test-utilities/node_modules/color-convert/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/color-convert/README.md +68 -0
- package/sdk-test-utilities/node_modules/color-convert/conversions.js +839 -0
- package/sdk-test-utilities/node_modules/color-convert/index.js +81 -0
- package/sdk-test-utilities/node_modules/color-convert/package.json +48 -0
- package/sdk-test-utilities/node_modules/color-convert/route.js +97 -0
- package/sdk-test-utilities/node_modules/color-name/LICENSE +8 -0
- package/sdk-test-utilities/node_modules/color-name/README.md +11 -0
- package/sdk-test-utilities/node_modules/color-name/index.js +152 -0
- package/sdk-test-utilities/node_modules/color-name/package.json +28 -0
- package/sdk-test-utilities/node_modules/diff-sequences/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/diff-sequences/README.md +404 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.d.ts +38 -0
- package/sdk-test-utilities/node_modules/diff-sequences/build/index.js +798 -0
- package/sdk-test-utilities/node_modules/diff-sequences/package.json +39 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.d.ts +18 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/index.js +11 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/license +9 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/package.json +43 -0
- package/sdk-test-utilities/node_modules/escape-string-regexp/readme.md +29 -0
- package/sdk-test-utilities/node_modules/expect/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/expect/README.md +3 -0
- package/sdk-test-utilities/node_modules/expect/build/asymmetricMatchers.js +375 -0
- package/sdk-test-utilities/node_modules/expect/build/extractExpectedAssertionsErrors.js +86 -0
- package/sdk-test-utilities/node_modules/expect/build/index.d.ts +370 -0
- package/sdk-test-utilities/node_modules/expect/build/index.js +410 -0
- package/sdk-test-utilities/node_modules/expect/build/jestMatchersObject.js +123 -0
- package/sdk-test-utilities/node_modules/expect/build/matchers.js +1292 -0
- package/sdk-test-utilities/node_modules/expect/build/print.js +122 -0
- package/sdk-test-utilities/node_modules/expect/build/spyMatchers.js +1254 -0
- package/sdk-test-utilities/node_modules/expect/build/toThrowMatchers.js +481 -0
- package/sdk-test-utilities/node_modules/expect/build/types.js +3 -0
- package/sdk-test-utilities/node_modules/expect/package.json +43 -0
- package/sdk-test-utilities/node_modules/fill-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/fill-range/README.md +237 -0
- package/sdk-test-utilities/node_modules/fill-range/index.js +248 -0
- package/sdk-test-utilities/node_modules/fill-range/package.json +74 -0
- package/sdk-test-utilities/node_modules/graceful-fs/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/graceful-fs/README.md +143 -0
- package/sdk-test-utilities/node_modules/graceful-fs/clone.js +23 -0
- package/sdk-test-utilities/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/sdk-test-utilities/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/sdk-test-utilities/node_modules/graceful-fs/package.json +53 -0
- package/sdk-test-utilities/node_modules/graceful-fs/polyfills.js +355 -0
- package/sdk-test-utilities/node_modules/has-flag/index.d.ts +39 -0
- package/sdk-test-utilities/node_modules/has-flag/index.js +8 -0
- package/sdk-test-utilities/node_modules/has-flag/license +9 -0
- package/sdk-test-utilities/node_modules/has-flag/package.json +46 -0
- package/sdk-test-utilities/node_modules/has-flag/readme.md +89 -0
- package/sdk-test-utilities/node_modules/is-number/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/is-number/README.md +187 -0
- package/sdk-test-utilities/node_modules/is-number/index.js +18 -0
- package/sdk-test-utilities/node_modules/is-number/package.json +82 -0
- package/sdk-test-utilities/node_modules/jest-diff/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-diff/README.md +671 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/cleanupSemantic.js +599 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/constants.js +19 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffLines.js +193 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/diffStrings.js +66 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/getAlignedDiffs.js +223 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.d.ts +93 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/index.js +232 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/joinAlignedDiffs.js +271 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/normalizeDiffOptions.js +59 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/printDiffs.js +79 -0
- package/sdk-test-utilities/node_modules/jest-diff/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-diff/package.json +36 -0
- package/sdk-test-utilities/node_modules/jest-get-type/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.d.ts +27 -0
- package/sdk-test-utilities/node_modules/jest-get-type/build/index.js +53 -0
- package/sdk-test-utilities/node_modules/jest-get-type/package.json +27 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/README.md +24 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/Replaceable.js +64 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/deepCyclicCopyReplaceable.js +111 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.d.ts +138 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/build/index.js +542 -0
- package/sdk-test-utilities/node_modules/jest-matcher-utils/package.json +37 -0
- package/sdk-test-utilities/node_modules/jest-message-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.d.ts +68 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/index.js +518 -0
- package/sdk-test-utilities/node_modules/jest-message-util/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/jest-message-util/package.json +43 -0
- package/sdk-test-utilities/node_modules/jest-util/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/jest-util/Readme.md +87 -0
- package/sdk-test-utilities/node_modules/jest-util/build/ErrorWithStack.js +28 -0
- package/sdk-test-utilities/node_modules/jest-util/build/clearLine.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/convertDescriptorToString.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createDirectory.js +71 -0
- package/sdk-test-utilities/node_modules/jest-util/build/createProcessObject.js +109 -0
- package/sdk-test-utilities/node_modules/jest-util/build/deepCyclicCopy.js +76 -0
- package/sdk-test-utilities/node_modules/jest-util/build/formatTime.js +24 -0
- package/sdk-test-utilities/node_modules/jest-util/build/globsToMatcher.js +98 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.d.ts +136 -0
- package/sdk-test-utilities/node_modules/jest-util/build/index.js +199 -0
- package/sdk-test-utilities/node_modules/jest-util/build/installCommonGlobals.js +115 -0
- package/sdk-test-utilities/node_modules/jest-util/build/interopRequireDefault.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/invariant.js +18 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isInteractive.js +22 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isNonNullable.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/isPromise.js +20 -0
- package/sdk-test-utilities/node_modules/jest-util/build/pluralize.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/preRunMessage.js +38 -0
- package/sdk-test-utilities/node_modules/jest-util/build/replacePathSepForGlob.js +16 -0
- package/sdk-test-utilities/node_modules/jest-util/build/requireOrImportModule.js +77 -0
- package/sdk-test-utilities/node_modules/jest-util/build/setGlobal.js +17 -0
- package/sdk-test-utilities/node_modules/jest-util/build/specialChars.js +25 -0
- package/sdk-test-utilities/node_modules/jest-util/build/testPathPatternToRegExp.js +19 -0
- package/sdk-test-utilities/node_modules/jest-util/build/tryRealpath.js +30 -0
- package/sdk-test-utilities/node_modules/jest-util/package.json +38 -0
- package/sdk-test-utilities/node_modules/js-tokens/CHANGELOG.md +151 -0
- package/sdk-test-utilities/node_modules/js-tokens/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/js-tokens/README.md +240 -0
- package/sdk-test-utilities/node_modules/js-tokens/index.js +23 -0
- package/sdk-test-utilities/node_modules/js-tokens/package.json +30 -0
- package/sdk-test-utilities/node_modules/micromatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/micromatch/README.md +1017 -0
- package/sdk-test-utilities/node_modules/micromatch/index.js +467 -0
- package/sdk-test-utilities/node_modules/micromatch/package.json +101 -0
- package/sdk-test-utilities/node_modules/picocolors/LICENSE +15 -0
- package/sdk-test-utilities/node_modules/picocolors/README.md +21 -0
- package/sdk-test-utilities/node_modules/picocolors/package.json +25 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.browser.js +4 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/picocolors/picocolors.js +65 -0
- package/sdk-test-utilities/node_modules/picomatch/CHANGELOG.md +136 -0
- package/sdk-test-utilities/node_modules/picomatch/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/picomatch/README.md +708 -0
- package/sdk-test-utilities/node_modules/picomatch/index.js +3 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/constants.js +179 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/parse.js +1091 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/picomatch.js +342 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/scan.js +391 -0
- package/sdk-test-utilities/node_modules/picomatch/lib/utils.js +64 -0
- package/sdk-test-utilities/node_modules/picomatch/package.json +81 -0
- package/sdk-test-utilities/node_modules/pretty-format/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/pretty-format/README.md +463 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/collections.js +180 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.d.ts +163 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/index.js +478 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js +89 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMCollection.js +67 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/DOMElement.js +101 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/Immutable.js +217 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactElement.js +143 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/ReactTestComponent.js +66 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/escapeHTML.js +16 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/plugins/lib/markup.js +113 -0
- package/sdk-test-utilities/node_modules/pretty-format/build/types.js +1 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.d.ts +167 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/index.js +164 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/license +9 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/package.json +52 -0
- package/sdk-test-utilities/node_modules/pretty-format/node_modules/ansi-styles/readme.md +144 -0
- package/sdk-test-utilities/node_modules/pretty-format/package.json +43 -0
- package/sdk-test-utilities/node_modules/react-is/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/react-is/README.md +104 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.development.js +221 -0
- package/sdk-test-utilities/node_modules/react-is/cjs/react-is.production.min.js +14 -0
- package/sdk-test-utilities/node_modules/react-is/index.js +7 -0
- package/sdk-test-utilities/node_modules/react-is/package.json +26 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.development.js +220 -0
- package/sdk-test-utilities/node_modules/react-is/umd/react-is.production.min.js +15 -0
- package/sdk-test-utilities/node_modules/slash/index.d.ts +25 -0
- package/sdk-test-utilities/node_modules/slash/index.js +11 -0
- package/sdk-test-utilities/node_modules/slash/license +9 -0
- package/sdk-test-utilities/node_modules/slash/package.json +35 -0
- package/sdk-test-utilities/node_modules/slash/readme.md +44 -0
- package/sdk-test-utilities/node_modules/stack-utils/LICENSE.md +21 -0
- package/sdk-test-utilities/node_modules/stack-utils/index.js +344 -0
- package/sdk-test-utilities/node_modules/stack-utils/package.json +39 -0
- package/sdk-test-utilities/node_modules/stack-utils/readme.md +143 -0
- package/sdk-test-utilities/node_modules/supports-color/browser.js +5 -0
- package/sdk-test-utilities/node_modules/supports-color/index.js +135 -0
- package/sdk-test-utilities/node_modules/supports-color/license +9 -0
- package/sdk-test-utilities/node_modules/supports-color/package.json +53 -0
- package/sdk-test-utilities/node_modules/supports-color/readme.md +76 -0
- package/sdk-test-utilities/node_modules/to-regex-range/LICENSE +21 -0
- package/sdk-test-utilities/node_modules/to-regex-range/README.md +305 -0
- package/sdk-test-utilities/node_modules/to-regex-range/index.js +288 -0
- package/sdk-test-utilities/node_modules/to-regex-range/package.json +88 -0
- package/sdk-test-utilities/node_modules/undici-types/README.md +6 -0
- package/sdk-test-utilities/node_modules/undici-types/agent.d.ts +31 -0
- package/sdk-test-utilities/node_modules/undici-types/api.d.ts +43 -0
- package/sdk-test-utilities/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/sdk-test-utilities/node_modules/undici-types/cache.d.ts +36 -0
- package/sdk-test-utilities/node_modules/undici-types/client.d.ts +97 -0
- package/sdk-test-utilities/node_modules/undici-types/connector.d.ts +34 -0
- package/sdk-test-utilities/node_modules/undici-types/content-type.d.ts +21 -0
- package/sdk-test-utilities/node_modules/undici-types/cookies.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/sdk-test-utilities/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/sdk-test-utilities/node_modules/undici-types/errors.d.ts +128 -0
- package/sdk-test-utilities/node_modules/undici-types/fetch.d.ts +209 -0
- package/sdk-test-utilities/node_modules/undici-types/file.d.ts +39 -0
- package/sdk-test-utilities/node_modules/undici-types/filereader.d.ts +54 -0
- package/sdk-test-utilities/node_modules/undici-types/formdata.d.ts +108 -0
- package/sdk-test-utilities/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/global-origin.d.ts +7 -0
- package/sdk-test-utilities/node_modules/undici-types/handlers.d.ts +9 -0
- package/sdk-test-utilities/node_modules/undici-types/header.d.ts +4 -0
- package/sdk-test-utilities/node_modules/undici-types/index.d.ts +63 -0
- package/sdk-test-utilities/node_modules/undici-types/interceptors.d.ts +5 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-client.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/sdk-test-utilities/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/sdk-test-utilities/node_modules/undici-types/package.json +55 -0
- package/sdk-test-utilities/node_modules/undici-types/patch.d.ts +71 -0
- package/sdk-test-utilities/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/sdk-test-utilities/node_modules/undici-types/pool.d.ts +28 -0
- package/sdk-test-utilities/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/sdk-test-utilities/node_modules/undici-types/readable.d.ts +61 -0
- package/sdk-test-utilities/node_modules/undici-types/webidl.d.ts +220 -0
- package/sdk-test-utilities/node_modules/undici-types/websocket.d.ts +131 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var _collections = require('../collections');
|
|
8
|
+
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
const asymmetricMatcher =
|
|
16
|
+
typeof Symbol === 'function' && Symbol.for
|
|
17
|
+
? Symbol.for('jest.asymmetricMatcher')
|
|
18
|
+
: 0x1357a5;
|
|
19
|
+
const SPACE = ' ';
|
|
20
|
+
const serialize = (val, config, indentation, depth, refs, printer) => {
|
|
21
|
+
const stringedValue = val.toString();
|
|
22
|
+
if (
|
|
23
|
+
stringedValue === 'ArrayContaining' ||
|
|
24
|
+
stringedValue === 'ArrayNotContaining'
|
|
25
|
+
) {
|
|
26
|
+
if (++depth > config.maxDepth) {
|
|
27
|
+
return `[${stringedValue}]`;
|
|
28
|
+
}
|
|
29
|
+
return `${stringedValue + SPACE}[${(0, _collections.printListItems)(
|
|
30
|
+
val.sample,
|
|
31
|
+
config,
|
|
32
|
+
indentation,
|
|
33
|
+
depth,
|
|
34
|
+
refs,
|
|
35
|
+
printer
|
|
36
|
+
)}]`;
|
|
37
|
+
}
|
|
38
|
+
if (
|
|
39
|
+
stringedValue === 'ObjectContaining' ||
|
|
40
|
+
stringedValue === 'ObjectNotContaining'
|
|
41
|
+
) {
|
|
42
|
+
if (++depth > config.maxDepth) {
|
|
43
|
+
return `[${stringedValue}]`;
|
|
44
|
+
}
|
|
45
|
+
return `${stringedValue + SPACE}{${(0, _collections.printObjectProperties)(
|
|
46
|
+
val.sample,
|
|
47
|
+
config,
|
|
48
|
+
indentation,
|
|
49
|
+
depth,
|
|
50
|
+
refs,
|
|
51
|
+
printer
|
|
52
|
+
)}}`;
|
|
53
|
+
}
|
|
54
|
+
if (
|
|
55
|
+
stringedValue === 'StringMatching' ||
|
|
56
|
+
stringedValue === 'StringNotMatching'
|
|
57
|
+
) {
|
|
58
|
+
return (
|
|
59
|
+
stringedValue +
|
|
60
|
+
SPACE +
|
|
61
|
+
printer(val.sample, config, indentation, depth, refs)
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (
|
|
65
|
+
stringedValue === 'StringContaining' ||
|
|
66
|
+
stringedValue === 'StringNotContaining'
|
|
67
|
+
) {
|
|
68
|
+
return (
|
|
69
|
+
stringedValue +
|
|
70
|
+
SPACE +
|
|
71
|
+
printer(val.sample, config, indentation, depth, refs)
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
if (typeof val.toAsymmetricMatcher !== 'function') {
|
|
75
|
+
throw new Error(
|
|
76
|
+
`Asymmetric matcher ${val.constructor.name} does not implement toAsymmetricMatcher()`
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return val.toAsymmetricMatcher();
|
|
80
|
+
};
|
|
81
|
+
exports.serialize = serialize;
|
|
82
|
+
const test = val => val && val.$$typeof === asymmetricMatcher;
|
|
83
|
+
exports.test = test;
|
|
84
|
+
const plugin = {
|
|
85
|
+
serialize,
|
|
86
|
+
test
|
|
87
|
+
};
|
|
88
|
+
var _default = plugin;
|
|
89
|
+
exports.default = _default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var _collections = require('../collections');
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const SPACE = ' ';
|
|
16
|
+
const OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];
|
|
17
|
+
const ARRAY_REGEXP = /^(HTML\w*Collection|NodeList)$/;
|
|
18
|
+
const testName = name =>
|
|
19
|
+
OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);
|
|
20
|
+
const test = val =>
|
|
21
|
+
val &&
|
|
22
|
+
val.constructor &&
|
|
23
|
+
!!val.constructor.name &&
|
|
24
|
+
testName(val.constructor.name);
|
|
25
|
+
exports.test = test;
|
|
26
|
+
const isNamedNodeMap = collection =>
|
|
27
|
+
collection.constructor.name === 'NamedNodeMap';
|
|
28
|
+
const serialize = (collection, config, indentation, depth, refs, printer) => {
|
|
29
|
+
const name = collection.constructor.name;
|
|
30
|
+
if (++depth > config.maxDepth) {
|
|
31
|
+
return `[${name}]`;
|
|
32
|
+
}
|
|
33
|
+
return (
|
|
34
|
+
(config.min ? '' : name + SPACE) +
|
|
35
|
+
(OBJECT_NAMES.indexOf(name) !== -1
|
|
36
|
+
? `{${(0, _collections.printObjectProperties)(
|
|
37
|
+
isNamedNodeMap(collection)
|
|
38
|
+
? Array.from(collection).reduce((props, attribute) => {
|
|
39
|
+
props[attribute.name] = attribute.value;
|
|
40
|
+
return props;
|
|
41
|
+
}, {})
|
|
42
|
+
: {
|
|
43
|
+
...collection
|
|
44
|
+
},
|
|
45
|
+
config,
|
|
46
|
+
indentation,
|
|
47
|
+
depth,
|
|
48
|
+
refs,
|
|
49
|
+
printer
|
|
50
|
+
)}}`
|
|
51
|
+
: `[${(0, _collections.printListItems)(
|
|
52
|
+
Array.from(collection),
|
|
53
|
+
config,
|
|
54
|
+
indentation,
|
|
55
|
+
depth,
|
|
56
|
+
refs,
|
|
57
|
+
printer
|
|
58
|
+
)}]`)
|
|
59
|
+
);
|
|
60
|
+
};
|
|
61
|
+
exports.serialize = serialize;
|
|
62
|
+
const plugin = {
|
|
63
|
+
serialize,
|
|
64
|
+
test
|
|
65
|
+
};
|
|
66
|
+
var _default = plugin;
|
|
67
|
+
exports.default = _default;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var _markup = require('./lib/markup');
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
const ELEMENT_NODE = 1;
|
|
16
|
+
const TEXT_NODE = 3;
|
|
17
|
+
const COMMENT_NODE = 8;
|
|
18
|
+
const FRAGMENT_NODE = 11;
|
|
19
|
+
const ELEMENT_REGEXP = /^((HTML|SVG)\w*)?Element$/;
|
|
20
|
+
const testHasAttribute = val => {
|
|
21
|
+
try {
|
|
22
|
+
return typeof val.hasAttribute === 'function' && val.hasAttribute('is');
|
|
23
|
+
} catch {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const testNode = val => {
|
|
28
|
+
const constructorName = val.constructor.name;
|
|
29
|
+
const {nodeType, tagName} = val;
|
|
30
|
+
const isCustomElement =
|
|
31
|
+
(typeof tagName === 'string' && tagName.includes('-')) ||
|
|
32
|
+
testHasAttribute(val);
|
|
33
|
+
return (
|
|
34
|
+
(nodeType === ELEMENT_NODE &&
|
|
35
|
+
(ELEMENT_REGEXP.test(constructorName) || isCustomElement)) ||
|
|
36
|
+
(nodeType === TEXT_NODE && constructorName === 'Text') ||
|
|
37
|
+
(nodeType === COMMENT_NODE && constructorName === 'Comment') ||
|
|
38
|
+
(nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment')
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
const test = val => val?.constructor?.name && testNode(val);
|
|
42
|
+
exports.test = test;
|
|
43
|
+
function nodeIsText(node) {
|
|
44
|
+
return node.nodeType === TEXT_NODE;
|
|
45
|
+
}
|
|
46
|
+
function nodeIsComment(node) {
|
|
47
|
+
return node.nodeType === COMMENT_NODE;
|
|
48
|
+
}
|
|
49
|
+
function nodeIsFragment(node) {
|
|
50
|
+
return node.nodeType === FRAGMENT_NODE;
|
|
51
|
+
}
|
|
52
|
+
const serialize = (node, config, indentation, depth, refs, printer) => {
|
|
53
|
+
if (nodeIsText(node)) {
|
|
54
|
+
return (0, _markup.printText)(node.data, config);
|
|
55
|
+
}
|
|
56
|
+
if (nodeIsComment(node)) {
|
|
57
|
+
return (0, _markup.printComment)(node.data, config);
|
|
58
|
+
}
|
|
59
|
+
const type = nodeIsFragment(node)
|
|
60
|
+
? 'DocumentFragment'
|
|
61
|
+
: node.tagName.toLowerCase();
|
|
62
|
+
if (++depth > config.maxDepth) {
|
|
63
|
+
return (0, _markup.printElementAsLeaf)(type, config);
|
|
64
|
+
}
|
|
65
|
+
return (0, _markup.printElement)(
|
|
66
|
+
type,
|
|
67
|
+
(0, _markup.printProps)(
|
|
68
|
+
nodeIsFragment(node)
|
|
69
|
+
? []
|
|
70
|
+
: Array.from(node.attributes, attr => attr.name).sort(),
|
|
71
|
+
nodeIsFragment(node)
|
|
72
|
+
? {}
|
|
73
|
+
: Array.from(node.attributes).reduce((props, attribute) => {
|
|
74
|
+
props[attribute.name] = attribute.value;
|
|
75
|
+
return props;
|
|
76
|
+
}, {}),
|
|
77
|
+
config,
|
|
78
|
+
indentation + config.indent,
|
|
79
|
+
depth,
|
|
80
|
+
refs,
|
|
81
|
+
printer
|
|
82
|
+
),
|
|
83
|
+
(0, _markup.printChildren)(
|
|
84
|
+
Array.prototype.slice.call(node.childNodes || node.children),
|
|
85
|
+
config,
|
|
86
|
+
indentation + config.indent,
|
|
87
|
+
depth,
|
|
88
|
+
refs,
|
|
89
|
+
printer
|
|
90
|
+
),
|
|
91
|
+
config,
|
|
92
|
+
indentation
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
exports.serialize = serialize;
|
|
96
|
+
const plugin = {
|
|
97
|
+
serialize,
|
|
98
|
+
test
|
|
99
|
+
};
|
|
100
|
+
var _default = plugin;
|
|
101
|
+
exports.default = _default;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var _collections = require('../collections');
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
// SENTINEL constants are from https://github.com/facebook/immutable-js
|
|
16
|
+
const IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';
|
|
17
|
+
const IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';
|
|
18
|
+
const IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';
|
|
19
|
+
const IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';
|
|
20
|
+
const IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';
|
|
21
|
+
const IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4
|
|
22
|
+
const IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';
|
|
23
|
+
const IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';
|
|
24
|
+
const IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';
|
|
25
|
+
const getImmutableName = name => `Immutable.${name}`;
|
|
26
|
+
const printAsLeaf = name => `[${name}]`;
|
|
27
|
+
const SPACE = ' ';
|
|
28
|
+
const LAZY = '…'; // Seq is lazy if it calls a method like filter
|
|
29
|
+
|
|
30
|
+
const printImmutableEntries = (
|
|
31
|
+
val,
|
|
32
|
+
config,
|
|
33
|
+
indentation,
|
|
34
|
+
depth,
|
|
35
|
+
refs,
|
|
36
|
+
printer,
|
|
37
|
+
type
|
|
38
|
+
) =>
|
|
39
|
+
++depth > config.maxDepth
|
|
40
|
+
? printAsLeaf(getImmutableName(type))
|
|
41
|
+
: `${getImmutableName(type) + SPACE}{${(0,
|
|
42
|
+
_collections.printIteratorEntries)(
|
|
43
|
+
val.entries(),
|
|
44
|
+
config,
|
|
45
|
+
indentation,
|
|
46
|
+
depth,
|
|
47
|
+
refs,
|
|
48
|
+
printer
|
|
49
|
+
)}}`;
|
|
50
|
+
|
|
51
|
+
// Record has an entries method because it is a collection in immutable v3.
|
|
52
|
+
// Return an iterator for Immutable Record from version v3 or v4.
|
|
53
|
+
function getRecordEntries(val) {
|
|
54
|
+
let i = 0;
|
|
55
|
+
return {
|
|
56
|
+
next() {
|
|
57
|
+
if (i < val._keys.length) {
|
|
58
|
+
const key = val._keys[i++];
|
|
59
|
+
return {
|
|
60
|
+
done: false,
|
|
61
|
+
value: [key, val.get(key)]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
done: true,
|
|
66
|
+
value: undefined
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
const printImmutableRecord = (
|
|
72
|
+
val,
|
|
73
|
+
config,
|
|
74
|
+
indentation,
|
|
75
|
+
depth,
|
|
76
|
+
refs,
|
|
77
|
+
printer
|
|
78
|
+
) => {
|
|
79
|
+
// _name property is defined only for an Immutable Record instance
|
|
80
|
+
// which was constructed with a second optional descriptive name arg
|
|
81
|
+
const name = getImmutableName(val._name || 'Record');
|
|
82
|
+
return ++depth > config.maxDepth
|
|
83
|
+
? printAsLeaf(name)
|
|
84
|
+
: `${name + SPACE}{${(0, _collections.printIteratorEntries)(
|
|
85
|
+
getRecordEntries(val),
|
|
86
|
+
config,
|
|
87
|
+
indentation,
|
|
88
|
+
depth,
|
|
89
|
+
refs,
|
|
90
|
+
printer
|
|
91
|
+
)}}`;
|
|
92
|
+
};
|
|
93
|
+
const printImmutableSeq = (val, config, indentation, depth, refs, printer) => {
|
|
94
|
+
const name = getImmutableName('Seq');
|
|
95
|
+
if (++depth > config.maxDepth) {
|
|
96
|
+
return printAsLeaf(name);
|
|
97
|
+
}
|
|
98
|
+
if (val[IS_KEYED_SENTINEL]) {
|
|
99
|
+
return `${name + SPACE}{${
|
|
100
|
+
// from Immutable collection of entries or from ECMAScript object
|
|
101
|
+
val._iter || val._object
|
|
102
|
+
? (0, _collections.printIteratorEntries)(
|
|
103
|
+
val.entries(),
|
|
104
|
+
config,
|
|
105
|
+
indentation,
|
|
106
|
+
depth,
|
|
107
|
+
refs,
|
|
108
|
+
printer
|
|
109
|
+
)
|
|
110
|
+
: LAZY
|
|
111
|
+
}}`;
|
|
112
|
+
}
|
|
113
|
+
return `${name + SPACE}[${
|
|
114
|
+
val._iter ||
|
|
115
|
+
// from Immutable collection of values
|
|
116
|
+
val._array ||
|
|
117
|
+
// from ECMAScript array
|
|
118
|
+
val._collection ||
|
|
119
|
+
// from ECMAScript collection in immutable v4
|
|
120
|
+
val._iterable // from ECMAScript collection in immutable v3
|
|
121
|
+
? (0, _collections.printIteratorValues)(
|
|
122
|
+
val.values(),
|
|
123
|
+
config,
|
|
124
|
+
indentation,
|
|
125
|
+
depth,
|
|
126
|
+
refs,
|
|
127
|
+
printer
|
|
128
|
+
)
|
|
129
|
+
: LAZY
|
|
130
|
+
}]`;
|
|
131
|
+
};
|
|
132
|
+
const printImmutableValues = (
|
|
133
|
+
val,
|
|
134
|
+
config,
|
|
135
|
+
indentation,
|
|
136
|
+
depth,
|
|
137
|
+
refs,
|
|
138
|
+
printer,
|
|
139
|
+
type
|
|
140
|
+
) =>
|
|
141
|
+
++depth > config.maxDepth
|
|
142
|
+
? printAsLeaf(getImmutableName(type))
|
|
143
|
+
: `${getImmutableName(type) + SPACE}[${(0,
|
|
144
|
+
_collections.printIteratorValues)(
|
|
145
|
+
val.values(),
|
|
146
|
+
config,
|
|
147
|
+
indentation,
|
|
148
|
+
depth,
|
|
149
|
+
refs,
|
|
150
|
+
printer
|
|
151
|
+
)}]`;
|
|
152
|
+
const serialize = (val, config, indentation, depth, refs, printer) => {
|
|
153
|
+
if (val[IS_MAP_SENTINEL]) {
|
|
154
|
+
return printImmutableEntries(
|
|
155
|
+
val,
|
|
156
|
+
config,
|
|
157
|
+
indentation,
|
|
158
|
+
depth,
|
|
159
|
+
refs,
|
|
160
|
+
printer,
|
|
161
|
+
val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
if (val[IS_LIST_SENTINEL]) {
|
|
165
|
+
return printImmutableValues(
|
|
166
|
+
val,
|
|
167
|
+
config,
|
|
168
|
+
indentation,
|
|
169
|
+
depth,
|
|
170
|
+
refs,
|
|
171
|
+
printer,
|
|
172
|
+
'List'
|
|
173
|
+
);
|
|
174
|
+
}
|
|
175
|
+
if (val[IS_SET_SENTINEL]) {
|
|
176
|
+
return printImmutableValues(
|
|
177
|
+
val,
|
|
178
|
+
config,
|
|
179
|
+
indentation,
|
|
180
|
+
depth,
|
|
181
|
+
refs,
|
|
182
|
+
printer,
|
|
183
|
+
val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
if (val[IS_STACK_SENTINEL]) {
|
|
187
|
+
return printImmutableValues(
|
|
188
|
+
val,
|
|
189
|
+
config,
|
|
190
|
+
indentation,
|
|
191
|
+
depth,
|
|
192
|
+
refs,
|
|
193
|
+
printer,
|
|
194
|
+
'Stack'
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
if (val[IS_SEQ_SENTINEL]) {
|
|
198
|
+
return printImmutableSeq(val, config, indentation, depth, refs, printer);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
// For compatibility with immutable v3 and v4, let record be the default.
|
|
202
|
+
return printImmutableRecord(val, config, indentation, depth, refs, printer);
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
// Explicitly comparing sentinel properties to true avoids false positive
|
|
206
|
+
// when mock identity-obj-proxy returns the key as the value for any key.
|
|
207
|
+
exports.serialize = serialize;
|
|
208
|
+
const test = val =>
|
|
209
|
+
val &&
|
|
210
|
+
(val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);
|
|
211
|
+
exports.test = test;
|
|
212
|
+
const plugin = {
|
|
213
|
+
serialize,
|
|
214
|
+
test
|
|
215
|
+
};
|
|
216
|
+
var _default = plugin;
|
|
217
|
+
exports.default = _default;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var ReactIs = _interopRequireWildcard(require('react-is'));
|
|
8
|
+
var _markup = require('./lib/markup');
|
|
9
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
10
|
+
if (typeof WeakMap !== 'function') return null;
|
|
11
|
+
var cacheBabelInterop = new WeakMap();
|
|
12
|
+
var cacheNodeInterop = new WeakMap();
|
|
13
|
+
return (_getRequireWildcardCache = function (nodeInterop) {
|
|
14
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
15
|
+
})(nodeInterop);
|
|
16
|
+
}
|
|
17
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
18
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
19
|
+
return obj;
|
|
20
|
+
}
|
|
21
|
+
if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
|
22
|
+
return {default: obj};
|
|
23
|
+
}
|
|
24
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
25
|
+
if (cache && cache.has(obj)) {
|
|
26
|
+
return cache.get(obj);
|
|
27
|
+
}
|
|
28
|
+
var newObj = {};
|
|
29
|
+
var hasPropertyDescriptor =
|
|
30
|
+
Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
31
|
+
for (var key in obj) {
|
|
32
|
+
if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
33
|
+
var desc = hasPropertyDescriptor
|
|
34
|
+
? Object.getOwnPropertyDescriptor(obj, key)
|
|
35
|
+
: null;
|
|
36
|
+
if (desc && (desc.get || desc.set)) {
|
|
37
|
+
Object.defineProperty(newObj, key, desc);
|
|
38
|
+
} else {
|
|
39
|
+
newObj[key] = obj[key];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
newObj.default = obj;
|
|
44
|
+
if (cache) {
|
|
45
|
+
cache.set(obj, newObj);
|
|
46
|
+
}
|
|
47
|
+
return newObj;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
51
|
+
*
|
|
52
|
+
* This source code is licensed under the MIT license found in the
|
|
53
|
+
* LICENSE file in the root directory of this source tree.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
// Given element.props.children, or subtree during recursive traversal,
|
|
57
|
+
// return flattened array of children.
|
|
58
|
+
const getChildren = (arg, children = []) => {
|
|
59
|
+
if (Array.isArray(arg)) {
|
|
60
|
+
arg.forEach(item => {
|
|
61
|
+
getChildren(item, children);
|
|
62
|
+
});
|
|
63
|
+
} else if (arg != null && arg !== false) {
|
|
64
|
+
children.push(arg);
|
|
65
|
+
}
|
|
66
|
+
return children;
|
|
67
|
+
};
|
|
68
|
+
const getType = element => {
|
|
69
|
+
const type = element.type;
|
|
70
|
+
if (typeof type === 'string') {
|
|
71
|
+
return type;
|
|
72
|
+
}
|
|
73
|
+
if (typeof type === 'function') {
|
|
74
|
+
return type.displayName || type.name || 'Unknown';
|
|
75
|
+
}
|
|
76
|
+
if (ReactIs.isFragment(element)) {
|
|
77
|
+
return 'React.Fragment';
|
|
78
|
+
}
|
|
79
|
+
if (ReactIs.isSuspense(element)) {
|
|
80
|
+
return 'React.Suspense';
|
|
81
|
+
}
|
|
82
|
+
if (typeof type === 'object' && type !== null) {
|
|
83
|
+
if (ReactIs.isContextProvider(element)) {
|
|
84
|
+
return 'Context.Provider';
|
|
85
|
+
}
|
|
86
|
+
if (ReactIs.isContextConsumer(element)) {
|
|
87
|
+
return 'Context.Consumer';
|
|
88
|
+
}
|
|
89
|
+
if (ReactIs.isForwardRef(element)) {
|
|
90
|
+
if (type.displayName) {
|
|
91
|
+
return type.displayName;
|
|
92
|
+
}
|
|
93
|
+
const functionName = type.render.displayName || type.render.name || '';
|
|
94
|
+
return functionName !== '' ? `ForwardRef(${functionName})` : 'ForwardRef';
|
|
95
|
+
}
|
|
96
|
+
if (ReactIs.isMemo(element)) {
|
|
97
|
+
const functionName =
|
|
98
|
+
type.displayName || type.type.displayName || type.type.name || '';
|
|
99
|
+
return functionName !== '' ? `Memo(${functionName})` : 'Memo';
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return 'UNDEFINED';
|
|
103
|
+
};
|
|
104
|
+
const getPropKeys = element => {
|
|
105
|
+
const {props} = element;
|
|
106
|
+
return Object.keys(props)
|
|
107
|
+
.filter(key => key !== 'children' && props[key] !== undefined)
|
|
108
|
+
.sort();
|
|
109
|
+
};
|
|
110
|
+
const serialize = (element, config, indentation, depth, refs, printer) =>
|
|
111
|
+
++depth > config.maxDepth
|
|
112
|
+
? (0, _markup.printElementAsLeaf)(getType(element), config)
|
|
113
|
+
: (0, _markup.printElement)(
|
|
114
|
+
getType(element),
|
|
115
|
+
(0, _markup.printProps)(
|
|
116
|
+
getPropKeys(element),
|
|
117
|
+
element.props,
|
|
118
|
+
config,
|
|
119
|
+
indentation + config.indent,
|
|
120
|
+
depth,
|
|
121
|
+
refs,
|
|
122
|
+
printer
|
|
123
|
+
),
|
|
124
|
+
(0, _markup.printChildren)(
|
|
125
|
+
getChildren(element.props.children),
|
|
126
|
+
config,
|
|
127
|
+
indentation + config.indent,
|
|
128
|
+
depth,
|
|
129
|
+
refs,
|
|
130
|
+
printer
|
|
131
|
+
),
|
|
132
|
+
config,
|
|
133
|
+
indentation
|
|
134
|
+
);
|
|
135
|
+
exports.serialize = serialize;
|
|
136
|
+
const test = val => val != null && ReactIs.isElement(val);
|
|
137
|
+
exports.test = test;
|
|
138
|
+
const plugin = {
|
|
139
|
+
serialize,
|
|
140
|
+
test
|
|
141
|
+
};
|
|
142
|
+
var _default = plugin;
|
|
143
|
+
exports.default = _default;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.test = exports.serialize = exports.default = void 0;
|
|
7
|
+
var _markup = require('./lib/markup');
|
|
8
|
+
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the MIT license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
// Child can be `number` in Stack renderer but not in Fiber renderer.
|
|
16
|
+
|
|
17
|
+
const testSymbol =
|
|
18
|
+
typeof Symbol === 'function' && Symbol.for
|
|
19
|
+
? Symbol.for('react.test.json')
|
|
20
|
+
: 0xea71357;
|
|
21
|
+
const getPropKeys = object => {
|
|
22
|
+
const {props} = object;
|
|
23
|
+
return props
|
|
24
|
+
? Object.keys(props)
|
|
25
|
+
.filter(key => props[key] !== undefined)
|
|
26
|
+
.sort()
|
|
27
|
+
: [];
|
|
28
|
+
};
|
|
29
|
+
const serialize = (object, config, indentation, depth, refs, printer) =>
|
|
30
|
+
++depth > config.maxDepth
|
|
31
|
+
? (0, _markup.printElementAsLeaf)(object.type, config)
|
|
32
|
+
: (0, _markup.printElement)(
|
|
33
|
+
object.type,
|
|
34
|
+
object.props
|
|
35
|
+
? (0, _markup.printProps)(
|
|
36
|
+
getPropKeys(object),
|
|
37
|
+
object.props,
|
|
38
|
+
config,
|
|
39
|
+
indentation + config.indent,
|
|
40
|
+
depth,
|
|
41
|
+
refs,
|
|
42
|
+
printer
|
|
43
|
+
)
|
|
44
|
+
: '',
|
|
45
|
+
object.children
|
|
46
|
+
? (0, _markup.printChildren)(
|
|
47
|
+
object.children,
|
|
48
|
+
config,
|
|
49
|
+
indentation + config.indent,
|
|
50
|
+
depth,
|
|
51
|
+
refs,
|
|
52
|
+
printer
|
|
53
|
+
)
|
|
54
|
+
: '',
|
|
55
|
+
config,
|
|
56
|
+
indentation
|
|
57
|
+
);
|
|
58
|
+
exports.serialize = serialize;
|
|
59
|
+
const test = val => val && val.$$typeof === testSymbol;
|
|
60
|
+
exports.test = test;
|
|
61
|
+
const plugin = {
|
|
62
|
+
serialize,
|
|
63
|
+
test
|
|
64
|
+
};
|
|
65
|
+
var _default = plugin;
|
|
66
|
+
exports.default = _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = escapeHTML;
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the MIT license found in the
|
|
11
|
+
* LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
function escapeHTML(str) {
|
|
15
|
+
return str.replace(/</g, '<').replace(/>/g, '>');
|
|
16
|
+
}
|