@automattic/vip 4.1.4 → 4.1.6
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/assets/dev-env.lando.template.yml.ejs +6 -2
- package/config/config.local.json +6 -0
- package/dist/bin/vip-config-software-get.js +9 -0
- package/dist/bin/vip-wp.js +128 -39
- package/dist/lib/client-file-uploader.js +34 -5
- package/dist/lib/config/software.js +42 -2
- package/dist/lib/dev-environment/dev-environment-cli.js +8 -5
- package/dist/lib/dev-environment/dev-environment-core.js +1 -1
- package/helpers/generate-docs.js +9 -3
- package/node_modules/@apollo/client/CHANGELOG.md +38 -0
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/core/cache.d.cts +4 -1
- package/node_modules/@apollo/client/__cjs/cache/core/types/Cache.d.cts +5 -0
- package/node_modules/@apollo/client/__cjs/cache/inmemory/entityStore.cjs +4 -4
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs +15 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/inMemoryCache.d.cts +3 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/key-extractor.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/policies.cjs +5 -5
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs +28 -10
- package/node_modules/@apollo/client/__cjs/cache/inmemory/readFromStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/types.d.cts +7 -2
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs +29 -14
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/cache/inmemory/writeToStore.d.cts +5 -2
- package/node_modules/@apollo/client/__cjs/core/ApolloClient.cjs +14 -14
- package/node_modules/@apollo/client/__cjs/core/ObservableQuery.cjs +8 -8
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs +13 -32
- package/node_modules/@apollo/client/__cjs/core/QueryInfo.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/core/QueryManager.cjs +12 -12
- package/node_modules/@apollo/client/__cjs/core/RefetchEventManager.cjs +3 -3
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs +15 -2
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/defer20220824.d.cts +5 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs +58 -14
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/handlers/graphql17Alpha9.d.cts +23 -12
- package/node_modules/@apollo/client/__cjs/incremental/handlers/notImplemented.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/incremental/types.d.cts +19 -1
- package/node_modules/@apollo/client/__cjs/invariantErrorCodes.cjs +64 -58
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs +1 -1
- package/node_modules/@apollo/client/__cjs/link/http/parseAndCheckHttpResponse.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs +27 -1
- package/node_modules/@apollo/client/__cjs/react/hooks/useLazyQuery.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/index.d.cts +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs +24 -26
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isDeferredFragment.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs +24 -20
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.cjs.map +1 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/isStreamField.d.cts +1 -1
- package/node_modules/@apollo/client/__cjs/version.cjs +1 -1
- package/node_modules/@apollo/client/cache/core/cache.d.ts +4 -1
- package/node_modules/@apollo/client/cache/core/cache.js +1 -1
- package/node_modules/@apollo/client/cache/core/cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/core/types/Cache.d.ts +5 -0
- package/node_modules/@apollo/client/cache/core/types/Cache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/entityStore.js +4 -4
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.d.ts +3 -1
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js +15 -5
- package/node_modules/@apollo/client/cache/inmemory/inMemoryCache.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/key-extractor.js +1 -1
- package/node_modules/@apollo/client/cache/inmemory/policies.js +5 -5
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js +28 -10
- package/node_modules/@apollo/client/cache/inmemory/readFromStore.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/types.d.ts +7 -2
- package/node_modules/@apollo/client/cache/inmemory/types.js.map +1 -1
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.d.ts +5 -2
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js +30 -15
- package/node_modules/@apollo/client/cache/inmemory/writeToStore.js.map +1 -1
- package/node_modules/@apollo/client/core/ApolloClient.js +14 -14
- package/node_modules/@apollo/client/core/ObservableQuery.js +8 -8
- package/node_modules/@apollo/client/core/QueryInfo.js +14 -33
- package/node_modules/@apollo/client/core/QueryInfo.js.map +1 -1
- package/node_modules/@apollo/client/core/QueryManager.js +12 -12
- package/node_modules/@apollo/client/core/RefetchEventManager.js +3 -3
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.d.ts +5 -1
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js +15 -2
- package/node_modules/@apollo/client/incremental/handlers/defer20220824.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.d.ts +23 -12
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js +58 -14
- package/node_modules/@apollo/client/incremental/handlers/graphql17Alpha9.js.map +1 -1
- package/node_modules/@apollo/client/incremental/handlers/notImplemented.js +1 -1
- package/node_modules/@apollo/client/incremental/types.d.ts +19 -1
- package/node_modules/@apollo/client/incremental/types.js.map +1 -1
- package/node_modules/@apollo/client/invariantErrorCodes.js +64 -58
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +1 -1
- package/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -1
- package/node_modules/@apollo/client/package.json +1 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js +27 -1
- package/node_modules/@apollo/client/react/hooks/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js +27 -1
- package/node_modules/@apollo/client/react/hooks-compiled/useLazyQuery.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/index.d.ts +0 -1
- package/node_modules/@apollo/client/utilities/internal/index.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.d.ts +1 -1
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js +23 -25
- package/node_modules/@apollo/client/utilities/internal/isDeferredFragment.js.map +1 -1
- package/node_modules/@apollo/client/utilities/internal/isStreamField.d.ts +1 -1
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js +23 -19
- package/node_modules/@apollo/client/utilities/internal/isStreamField.js.map +1 -1
- package/node_modules/@apollo/client/version.js +1 -1
- package/node_modules/@types/node/README.md +2 -2
- package/node_modules/@types/node/child_process.d.ts +1 -1
- package/node_modules/@types/node/crypto.d.ts +22 -10
- package/node_modules/@types/node/dgram.d.ts +1 -1
- package/node_modules/@types/node/ffi.d.ts +14 -0
- package/node_modules/@types/node/http2.d.ts +3 -2
- package/node_modules/@types/node/net.d.ts +16 -4
- package/node_modules/@types/node/package.json +2 -17
- package/node_modules/@types/node/process.d.ts +1 -0
- package/node_modules/@types/node/quic.d.ts +39 -1
- package/node_modules/@types/node/stream/iter.d.ts +9 -12
- package/node_modules/@types/node/test/reporters.d.ts +1 -0
- package/node_modules/@types/node/test.d.ts +72 -0
- package/node_modules/@types/node/tls.d.ts +14 -10
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/@types/node/vm.d.ts +2 -1
- package/node_modules/@types/node/worker_threads.d.ts +4 -1
- package/node_modules/@types/node/zlib.d.ts +6 -0
- package/node_modules/axios/CHANGELOG.md +62 -0
- package/node_modules/axios/README.md +297 -5
- package/node_modules/axios/dist/axios.js +728 -170
- package/node_modules/axios/dist/axios.min.js +3 -3
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +871 -188
- package/node_modules/axios/dist/esm/axios.js +871 -188
- package/node_modules/axios/dist/esm/axios.min.js +2 -2
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +1037 -225
- package/node_modules/axios/index.d.cts +102 -74
- package/node_modules/axios/index.d.ts +100 -68
- package/node_modules/axios/lib/adapters/fetch.js +64 -11
- package/node_modules/axios/lib/adapters/http.js +140 -67
- package/node_modules/axios/lib/adapters/xhr.js +52 -3
- package/node_modules/axios/lib/core/Axios.js +43 -20
- package/node_modules/axios/lib/core/AxiosError.js +33 -2
- package/node_modules/axios/lib/core/AxiosHeaders.js +124 -1
- package/node_modules/axios/lib/core/InterceptorManager.js +107 -8
- package/node_modules/axios/lib/core/buildFullPath.js +41 -15
- package/node_modules/axios/lib/core/dispatchRequest.js +8 -2
- package/node_modules/axios/lib/core/mergeConfig.js +19 -4
- package/node_modules/axios/lib/core/methodList.js +17 -0
- package/node_modules/axios/lib/core/setFormDataHeaders.js +27 -0
- package/node_modules/axios/lib/defaults/index.js +2 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/Http2Sessions.js +2 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +12 -1
- package/node_modules/axios/lib/helpers/combineURLs.js +11 -3
- package/node_modules/axios/lib/helpers/composeSignals.js +12 -1
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +115 -54
- package/node_modules/axios/lib/helpers/formDataToJSON.js +11 -5
- package/node_modules/axios/lib/helpers/fromDataURI.js +5 -4
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +5 -3
- package/node_modules/axios/lib/helpers/progressEventReducer.js +4 -4
- package/node_modules/axios/lib/helpers/resolveConfig.js +5 -17
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +300 -5
- package/node_modules/axios/lib/helpers/throttle.js +3 -2
- package/node_modules/axios/lib/helpers/toFormData.js +17 -23
- package/node_modules/axios/lib/platform/node/classes/Buffer.js +11 -0
- package/node_modules/axios/lib/utils.js +151 -18
- package/node_modules/axios/package.json +21 -19
- package/node_modules/chalk/package.json +1 -1
- package/node_modules/chalk/source/index.js +2 -1
- package/node_modules/cpu-features/build/config.gypi +2 -2
- package/node_modules/ejs/README.md +64 -28
- package/node_modules/ejs/bin/cli.js +220 -158
- package/node_modules/ejs/ejs.js +64 -94
- package/node_modules/ejs/ejs.min.js +1 -1
- package/node_modules/ejs/jakefile.js +44 -0
- package/node_modules/ejs/lib/cjs/ejs.js +64 -63
- package/node_modules/ejs/lib/cjs/parseargs.js +129 -77
- package/node_modules/ejs/lib/cjs/utils.js +0 -31
- package/node_modules/ejs/lib/esm/ejs.js +66 -65
- package/node_modules/ejs/lib/esm/parseargs.js +136 -82
- package/node_modules/ejs/lib/esm/utils.js +0 -32
- package/node_modules/ejs/package.json +3 -2
- package/node_modules/ejs/usage.txt +9 -9
- package/node_modules/follow-redirects/index.js +10 -1
- package/node_modules/follow-redirects/package.json +1 -1
- package/node_modules/graphql-ws/dist/client.cjs +28 -13
- package/node_modules/graphql-ws/dist/client.js +28 -13
- package/node_modules/graphql-ws/dist/index.cjs +1 -1
- package/node_modules/graphql-ws/dist/index.d.cts +1 -1
- package/node_modules/graphql-ws/dist/index.d.ts +1 -1
- package/node_modules/graphql-ws/dist/index.js +1 -1
- package/node_modules/graphql-ws/dist/{server-B8ZBs9OC.d.ts → server-BzBeHlSW.d.ts} +26 -1
- package/node_modules/graphql-ws/dist/{server-DN5-9C2B.cjs → server-Ce-Z86Ys.cjs} +10 -4
- package/node_modules/graphql-ws/dist/{server-ChpuX357.d.cts → server-u6zrlwzL.d.cts} +26 -1
- package/node_modules/graphql-ws/dist/{server-DHPI7HHW.js → server-zBhvXJ_Z.js} +10 -4
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/@fastify/websocket.js +2 -2
- package/node_modules/graphql-ws/dist/use/bun.cjs +1 -1
- package/node_modules/graphql-ws/dist/use/bun.d.cts +2 -2
- package/node_modules/graphql-ws/dist/use/bun.d.ts +2 -2
- package/node_modules/graphql-ws/dist/use/bun.js +2 -2
- package/node_modules/graphql-ws/dist/use/crossws.cjs +16 -4
- package/node_modules/graphql-ws/dist/use/crossws.d.cts +6 -1
- package/node_modules/graphql-ws/dist/use/crossws.d.ts +6 -1
- package/node_modules/graphql-ws/dist/use/crossws.js +16 -4
- package/node_modules/graphql-ws/dist/use/deno.d.ts +1 -1
- package/node_modules/graphql-ws/dist/use/deno.js +1 -1
- package/node_modules/graphql-ws/dist/use/uWebSockets.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/uWebSockets.js +2 -2
- package/node_modules/graphql-ws/dist/use/ws.cjs +2 -2
- package/node_modules/graphql-ws/dist/use/ws.d.cts +8 -2
- package/node_modules/graphql-ws/dist/use/ws.d.ts +8 -2
- package/node_modules/graphql-ws/dist/use/ws.js +2 -2
- package/node_modules/graphql-ws/package.json +3 -3
- package/node_modules/graphql-ws/umd/graphql-ws.js +28 -13
- package/node_modules/graphql-ws/umd/graphql-ws.min.js +1 -1
- package/node_modules/graphql-ws/umd/graphql-ws.min.js.gz +0 -0
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs +522 -495
- package/node_modules/js-yaml/dist/browser/js-yaml.esm.min.mjs.map +1 -1
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js +24 -24
- package/node_modules/js-yaml/dist/browser/js-yaml.umd.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.cjs.js +135 -78
- package/node_modules/js-yaml/dist/js-yaml.cjs.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +129 -72
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/node_modules/argparse/LICENSE +47 -0
- package/node_modules/js-yaml/node_modules/argparse/README.md +89 -0
- package/node_modules/js-yaml/node_modules/argparse/lib/_colorize.js +72 -0
- package/node_modules/js-yaml/node_modules/argparse/lib/argparse.d.ts +292 -0
- package/node_modules/{argparse → js-yaml/node_modules/argparse/lib}/argparse.js +1142 -1029
- package/node_modules/js-yaml/node_modules/argparse/lib/difflib.js +190 -0
- package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/sub.js +4 -4
- package/node_modules/{argparse → js-yaml/node_modules/argparse}/lib/textwrap.js +28 -28
- package/node_modules/js-yaml/node_modules/argparse/package.json +38 -0
- package/node_modules/js-yaml/package.json +12 -12
- package/node_modules/lando/.github/dependabot.yml +4 -0
- package/node_modules/lando/.github/workflows/build-util-images.yml +1 -1
- package/node_modules/lando/.github/workflows/pr-core-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-db-tools-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-django-tests.yml +4 -2
- package/node_modules/lando/.github/workflows/pr-linter.yml +2 -2
- package/node_modules/lando/.github/workflows/pr-unit-tests.yml +2 -2
- package/node_modules/lando/.node-version +1 -1
- package/node_modules/lando/bin/lando.js +3 -83
- package/node_modules/lando/config.yml +0 -1
- package/node_modules/lando/eslint.config.mjs +4 -0
- package/node_modules/lando/examples/django/.lando.yml +1 -1
- package/node_modules/lando/examples/django/README.md +1 -1
- package/node_modules/lando/examples/django/requirements.txt +1 -1
- package/node_modules/lando/examples/sql-export/README.md +5 -0
- package/node_modules/lando/lib/app.js +78 -84
- package/node_modules/lando/lib/art.js +86 -30
- package/node_modules/lando/lib/bootstrap.js +148 -45
- package/node_modules/lando/lib/cache.js +14 -15
- package/node_modules/lando/lib/cli.js +67 -63
- package/node_modules/lando/lib/compose.js +76 -45
- package/node_modules/lando/lib/config.js +51 -33
- package/node_modules/lando/lib/daemon.js +27 -10
- package/node_modules/lando/lib/docker.js +46 -19
- package/node_modules/lando/lib/engine.js +131 -144
- package/node_modules/lando/lib/env.js +25 -46
- package/node_modules/lando/lib/error.js +15 -6
- package/node_modules/lando/lib/esm/package.json +3 -0
- package/node_modules/lando/lib/esm/string-argv.js +2 -0
- package/node_modules/lando/lib/esm/yargs.js +2 -0
- package/node_modules/lando/lib/events.js +15 -15
- package/node_modules/lando/lib/factory.js +43 -14
- package/node_modules/lando/lib/formatters.js +19 -31
- package/node_modules/lando/lib/lando.js +59 -48
- package/node_modules/lando/lib/logger.js +12 -24
- package/node_modules/lando/lib/plugins.js +27 -15
- package/node_modules/lando/lib/promise.js +17 -17
- package/node_modules/lando/lib/router.js +75 -21
- package/node_modules/lando/lib/scan.js +29 -12
- package/node_modules/lando/lib/shell.js +44 -20
- package/node_modules/lando/lib/user.js +14 -20
- package/node_modules/lando/lib/utils.js +87 -44
- package/node_modules/lando/lib/yaml.js +11 -9
- package/node_modules/lando/node_modules/ansi-regex/index.d.ts +33 -0
- package/node_modules/lando/node_modules/ansi-regex/index.js +15 -0
- package/node_modules/lando/node_modules/ansi-regex/package.json +61 -0
- package/node_modules/lando/node_modules/ansi-regex/readme.md +66 -0
- package/node_modules/lando/node_modules/cliui/README.md +26 -6
- package/node_modules/lando/node_modules/cliui/build/lib/index.js +2 -2
- package/node_modules/lando/node_modules/cliui/build/tsconfig.tsbuildinfo +1 -0
- package/node_modules/lando/node_modules/cliui/index.mjs +7 -5
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/index.js +82 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/license +9 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/package.json +64 -0
- package/node_modules/lando/node_modules/cliui/node_modules/string-width/readme.md +66 -0
- package/node_modules/lando/node_modules/cliui/package.json +21 -32
- package/node_modules/lando/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/lando/node_modules/emoji-regex/README.md +107 -0
- package/node_modules/lando/node_modules/emoji-regex/index.d.ts +3 -0
- package/node_modules/lando/node_modules/emoji-regex/index.js +4 -0
- package/node_modules/lando/node_modules/emoji-regex/index.mjs +4 -0
- package/node_modules/lando/node_modules/emoji-regex/package.json +45 -0
- package/node_modules/lando/node_modules/string-width/index.d.ts +39 -0
- package/node_modules/lando/node_modules/string-width/index.js +203 -0
- package/node_modules/lando/node_modules/string-width/license +9 -0
- package/node_modules/lando/node_modules/string-width/package.json +65 -0
- package/node_modules/lando/node_modules/string-width/readme.md +66 -0
- package/node_modules/lando/node_modules/strip-ansi/index.d.ts +15 -0
- package/node_modules/lando/node_modules/strip-ansi/index.js +19 -0
- package/node_modules/lando/node_modules/strip-ansi/license +9 -0
- package/node_modules/lando/node_modules/strip-ansi/package.json +59 -0
- package/node_modules/lando/node_modules/strip-ansi/readme.md +37 -0
- package/node_modules/lando/node_modules/yargs/README.md +16 -36
- package/node_modules/lando/node_modules/yargs/browser.d.ts +5 -0
- package/node_modules/lando/node_modules/yargs/browser.mjs +2 -2
- package/node_modules/lando/node_modules/yargs/build/lib/command.js +308 -211
- package/node_modules/lando/node_modules/yargs/build/lib/completion-templates.js +28 -9
- package/node_modules/lando/node_modules/yargs/build/lib/completion.js +233 -91
- package/node_modules/lando/node_modules/yargs/build/lib/middleware.js +51 -16
- package/node_modules/lando/node_modules/yargs/build/lib/usage.js +88 -52
- package/node_modules/lando/node_modules/yargs/build/lib/utils/apply-extends.js +4 -2
- package/node_modules/lando/node_modules/yargs/build/lib/utils/levenshtein.js +9 -1
- package/node_modules/lando/node_modules/yargs/build/lib/utils/maybe-async-result.js +17 -0
- package/node_modules/lando/node_modules/yargs/build/lib/validation.js +51 -54
- package/node_modules/lando/node_modules/yargs/build/lib/yargs-factory.js +1261 -887
- package/node_modules/lando/node_modules/yargs/build/lib/yerror.js +3 -1
- package/node_modules/lando/node_modules/yargs/index.mjs +4 -2
- package/node_modules/lando/node_modules/yargs/lib/platform-shims/browser.mjs +9 -2
- package/node_modules/lando/node_modules/yargs/lib/platform-shims/esm.mjs +22 -22
- package/node_modules/lando/node_modules/yargs/locales/cs.json +51 -0
- package/node_modules/lando/node_modules/yargs/locales/de.json +1 -1
- package/node_modules/lando/node_modules/yargs/locales/en.json +4 -0
- package/node_modules/lando/node_modules/yargs/locales/fi.json +1 -1
- package/node_modules/lando/node_modules/yargs/locales/he.json +55 -0
- package/node_modules/lando/node_modules/yargs/locales/ka.json +55 -0
- package/node_modules/lando/node_modules/yargs/locales/ko.json +25 -25
- package/node_modules/lando/node_modules/yargs/locales/ru.json +6 -1
- package/node_modules/lando/node_modules/yargs/locales/uk_UA.json +51 -0
- package/node_modules/lando/node_modules/yargs/locales/uz.json +52 -0
- package/node_modules/lando/node_modules/yargs/locales/zh_TW.json +50 -46
- package/node_modules/lando/node_modules/yargs/package.json +41 -60
- package/node_modules/lando/node_modules/yargs-parser/build/lib/index.js +13 -8
- package/node_modules/lando/node_modules/yargs-parser/build/lib/yargs-parser.js +21 -12
- package/node_modules/lando/node_modules/yargs-parser/package.json +31 -40
- package/node_modules/lando/package.json +59 -22
- package/node_modules/lando/plugins/lando-compose/index.js +4 -0
- package/node_modules/lando/plugins/lando-compose/lib/utils.js +16 -7
- package/node_modules/lando/plugins/lando-core/index.js +1 -2
- package/node_modules/lando/plugins/lando-core/lib/utils.js +35 -15
- package/node_modules/lando/plugins/lando-core/lib/warnings.js +27 -0
- package/node_modules/lando/plugins/lando-core/tasks/destroy.js +1 -1
- package/node_modules/lando/plugins/lando-core/tasks/rebuild.js +1 -1
- package/node_modules/lando/plugins/lando-events/index.js +4 -0
- package/node_modules/lando/plugins/lando-events/lib/utils.js +27 -6
- package/node_modules/lando/plugins/lando-networking/app.js +2 -2
- package/node_modules/lando/plugins/lando-networking/index.js +9 -2
- package/node_modules/lando/plugins/lando-networking/test/app.spec.js +87 -0
- package/node_modules/lando/plugins/lando-proxy/index.js +6 -1
- package/node_modules/lando/plugins/lando-proxy/lib/utils.js +63 -28
- package/node_modules/lando/plugins/lando-proxy/lib/warnings.js +10 -0
- package/node_modules/lando/plugins/lando-recipes/index.js +4 -0
- package/node_modules/lando/plugins/lando-recipes/lib/build.js +22 -4
- package/node_modules/lando/plugins/lando-recipes/lib/options.js +42 -66
- package/node_modules/lando/plugins/lando-recipes/lib/utils.js +30 -13
- package/node_modules/lando/plugins/lando-recipes/lib/warnings.js +5 -0
- package/node_modules/lando/plugins/lando-recipes/sources/remote.js +0 -26
- package/node_modules/lando/plugins/lando-recipes/tasks/init.js +1 -1
- package/node_modules/lando/plugins/lando-services/index.js +4 -0
- package/node_modules/lando/plugins/lando-services/lib/utils.js +38 -15
- package/node_modules/lando/plugins/lando-sharing/index.js +4 -0
- package/node_modules/lando/plugins/lando-sharing/lib/utils.js +28 -5
- package/node_modules/lando/plugins/lando-tooling/index.js +5 -0
- package/node_modules/lando/plugins/lando-tooling/lib/build.js +5 -2
- package/node_modules/lando/plugins/lando-tooling/lib/utils.js +83 -47
- package/node_modules/lando/test/cli.spec.js +59 -21
- package/node_modules/lando/test/docker.spec.js +24 -28
- package/node_modules/lando/test/env.spec.js +8 -0
- package/node_modules/lando/test/error.spec.js +1 -1
- package/node_modules/lando/test/events.spec.js +6 -7
- package/node_modules/lando/test/lando.spec.js +1 -1
- package/node_modules/lando/test/plugins.spec.js +2 -3
- package/node_modules/lando/test/promise.spec.js +1 -1
- package/node_modules/lando/test/scan.spec.js +1 -1
- package/node_modules/lando/test/shell.spec.js +19 -2
- package/node_modules/lando/test/utils.spec.js +52 -0
- package/node_modules/open/index.js +3 -5
- package/node_modules/open/package.json +1 -1
- package/node_modules/socket.io-client/README.md +1 -0
- package/node_modules/socket.io-client/build/cjs/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/cjs/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/cjs/manager.js +17 -7
- package/node_modules/socket.io-client/build/cjs/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/cjs/socket.js +0 -1
- package/node_modules/socket.io-client/build/esm/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/esm/index.js +1 -1
- package/node_modules/socket.io-client/build/esm/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/esm/package.json +1 -1
- package/node_modules/socket.io-client/build/esm/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/esm/socket.js +0 -1
- package/node_modules/socket.io-client/build/esm-debug/index.d.ts +3 -3
- package/node_modules/socket.io-client/build/esm-debug/index.js +1 -1
- package/node_modules/socket.io-client/build/esm-debug/manager.d.ts +1 -2
- package/node_modules/socket.io-client/build/esm-debug/package.json +1 -1
- package/node_modules/socket.io-client/build/esm-debug/socket.d.ts +5 -2
- package/node_modules/socket.io-client/build/esm-debug/socket.js +0 -1
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.esm.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.js +174 -242
- package/node_modules/socket.io-client/dist/socket.io.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.min.js.map +1 -1
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js +3 -3
- package/node_modules/socket.io-client/dist/socket.io.msgpack.min.js.map +1 -1
- package/node_modules/socket.io-client/package.json +2 -2
- package/node_modules/string-argv/CHANGELOG.md +38 -0
- package/node_modules/string-argv/README.md +96 -50
- package/node_modules/string-argv/index.d.ts +2 -0
- package/node_modules/string-argv/index.js +55 -35
- package/node_modules/string-argv/package.json +50 -40
- package/node_modules/undici/README.md +35 -4
- package/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/undici/docs/docs/api/Dispatcher.md +12 -0
- package/node_modules/undici/docs/docs/api/Errors.md +101 -1
- package/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/undici/docs/docs/api/Interceptors.md +17 -9
- package/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/undici/docs/docs/index.md +22 -13
- package/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/undici/lib/core/request.js +39 -3
- package/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/undici/lib/core/util.js +26 -40
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +127 -84
- package/node_modules/undici/lib/dispatcher/client-h2.js +97 -21
- package/node_modules/undici/lib/dispatcher/client.js +10 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/undici/lib/dispatcher/pool-base.js +117 -19
- package/node_modules/undici/lib/dispatcher/pool.js +99 -13
- package/node_modules/undici/lib/dispatcher/proxy-agent.js +34 -11
- package/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/undici/lib/handler/deduplication-handler.js +126 -52
- package/node_modules/undici/lib/handler/redirect-handler.js +31 -6
- package/node_modules/undici/lib/handler/retry-handler.js +116 -24
- package/node_modules/undici/lib/interceptor/cache.js +15 -4
- package/node_modules/undici/lib/interceptor/decompress.js +253 -73
- package/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/undici/lib/web/eventsource/eventsource.js +50 -3
- package/node_modules/undici/lib/web/fetch/body.js +69 -53
- package/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/undici/lib/web/fetch/headers.js +36 -33
- package/node_modules/undici/lib/web/fetch/index.js +54 -29
- package/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/undici/lib/web/websocket/receiver.js +27 -4
- package/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/undici/package.json +7 -5
- package/node_modules/undici/types/cache-interceptor.d.ts +10 -0
- package/node_modules/undici/types/client.d.ts +10 -4
- package/node_modules/undici/types/diagnostics-channel.d.ts +2 -1
- package/node_modules/undici/types/errors.d.ts +16 -1
- package/node_modules/undici/types/h2c-client.d.ts +1 -1
- package/node_modules/undici/types/interceptors.d.ts +7 -2
- package/node_modules/undici/types/webidl.d.ts +13 -7
- package/node_modules/{lando/node_modules/js-yaml → unicode-segmenter}/LICENSE +6 -6
- package/node_modules/unicode-segmenter/README.md +324 -0
- package/node_modules/unicode-segmenter/_emoji_data.cjs +24 -0
- package/node_modules/unicode-segmenter/_emoji_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_emoji_data.d.ts +12 -0
- package/node_modules/unicode-segmenter/_emoji_data.js +26 -0
- package/node_modules/unicode-segmenter/_general_data.cjs +30 -0
- package/node_modules/unicode-segmenter/_general_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_general_data.d.ts +16 -0
- package/node_modules/unicode-segmenter/_general_data.js +34 -0
- package/node_modules/unicode-segmenter/_grapheme_data.cjs +125 -0
- package/node_modules/unicode-segmenter/_grapheme_data.d.cts +1 -0
- package/node_modules/unicode-segmenter/_grapheme_data.d.ts +112 -0
- package/node_modules/unicode-segmenter/_grapheme_data.js +123 -0
- package/node_modules/unicode-segmenter/core.cjs +135 -0
- package/node_modules/unicode-segmenter/core.d.cts +1 -0
- package/node_modules/unicode-segmenter/core.d.ts +118 -0
- package/node_modules/unicode-segmenter/core.js +129 -0
- package/node_modules/unicode-segmenter/emoji.cjs +43 -0
- package/node_modules/unicode-segmenter/emoji.d.cts +1 -0
- package/node_modules/unicode-segmenter/emoji.d.ts +23 -0
- package/node_modules/unicode-segmenter/emoji.js +42 -0
- package/node_modules/unicode-segmenter/general.cjs +51 -0
- package/node_modules/unicode-segmenter/general.d.cts +1 -0
- package/node_modules/unicode-segmenter/general.d.ts +26 -0
- package/node_modules/unicode-segmenter/general.js +50 -0
- package/node_modules/unicode-segmenter/grapheme.cjs +405 -0
- package/node_modules/unicode-segmenter/grapheme.d.cts +1 -0
- package/node_modules/unicode-segmenter/grapheme.d.ts +64 -0
- package/node_modules/unicode-segmenter/grapheme.js +438 -0
- package/node_modules/unicode-segmenter/index.cjs +26 -0
- package/node_modules/unicode-segmenter/index.d.cts +1 -0
- package/node_modules/unicode-segmenter/index.d.ts +4 -0
- package/node_modules/unicode-segmenter/index.js +6 -0
- package/node_modules/unicode-segmenter/intl-adapter.cjs +124 -0
- package/node_modules/unicode-segmenter/intl-adapter.d.cts +1 -0
- package/node_modules/unicode-segmenter/intl-adapter.d.ts +62 -0
- package/node_modules/unicode-segmenter/intl-adapter.js +113 -0
- package/node_modules/unicode-segmenter/intl-polyfill.cjs +17 -0
- package/node_modules/unicode-segmenter/intl-polyfill.d.cts +1 -0
- package/node_modules/unicode-segmenter/intl-polyfill.d.ts +1 -0
- package/node_modules/unicode-segmenter/intl-polyfill.js +16 -0
- package/node_modules/unicode-segmenter/package.json +165 -0
- package/node_modules/unicode-segmenter/utils.cjs +99 -0
- package/node_modules/unicode-segmenter/utils.d.cts +1 -0
- package/node_modules/unicode-segmenter/utils.d.ts +64 -0
- package/node_modules/unicode-segmenter/utils.js +89 -0
- package/package.json +6 -6
- package/.buildkite/build-linux.sh +0 -68
- package/.buildkite/build-macos-installer.sh +0 -34
- package/.buildkite/build-macos.sh +0 -67
- package/.buildkite/build-windows-installer.ps1 +0 -65
- package/.buildkite/build-windows.ps1 +0 -59
- package/.buildkite/fetch-search-replace.sh +0 -65
- package/.buildkite/pack-release.sh +0 -26
- package/.buildkite/pipeline.yml +0 -81
- package/.buildkite/shared-pipeline-vars +0 -16
- package/.buildkite/sign-windows.ps1 +0 -21
- package/.buildkite/test-windows-installer-download.ps1 +0 -54
- package/.buildkite/test_pipeline.py +0 -69
- package/.bundle/config +0 -4
- package/.editorconfig +0 -11
- package/.prettierignore +0 -13
- package/.ruby-version +0 -1
- package/.sonarcloud.properties +0 -2
- package/.xcode-version +0 -1
- package/AGENTS.md +0 -101
- package/CLAUDE.md +0 -4
- package/Gemfile +0 -8
- package/Gemfile.lock +0 -377
- package/Makefile +0 -293
- package/cmd/installer-payload/main.go +0 -19
- package/cmd/installer-version/main.go +0 -22
- package/cmd/stamp-version/main.go +0 -25
- package/cmd/vip-next/auth_bootstrap.go +0 -139
- package/cmd/vip-next/auth_bootstrap_test.go +0 -379
- package/cmd/vip-next/auth_bypass_wiring_test.go +0 -162
- package/cmd/vip-next/cli_error_hook_test.go +0 -91
- package/cmd/vip-next/commands/app.go +0 -23
- package/cmd/vip-next/commands/app_debug_test.go +0 -89
- package/cmd/vip-next/commands/app_deploy.go +0 -217
- package/cmd/vip-next/commands/app_deploy_test.go +0 -297
- package/cmd/vip-next/commands/app_deploy_validate.go +0 -58
- package/cmd/vip-next/commands/app_get.go +0 -293
- package/cmd/vip-next/commands/app_get_test.go +0 -226
- package/cmd/vip-next/commands/app_list.go +0 -93
- package/cmd/vip-next/commands/app_list_test.go +0 -95
- package/cmd/vip-next/commands/backup.go +0 -16
- package/cmd/vip-next/commands/backup_db.go +0 -137
- package/cmd/vip-next/commands/backup_db_test.go +0 -187
- package/cmd/vip-next/commands/cache.go +0 -16
- package/cmd/vip-next/commands/cache_purge_url.go +0 -90
- package/cmd/vip-next/commands/cache_purge_url_test.go +0 -154
- package/cmd/vip-next/commands/config.go +0 -17
- package/cmd/vip-next/commands/config_debug_test.go +0 -137
- package/cmd/vip-next/commands/config_envvar.go +0 -16
- package/cmd/vip-next/commands/config_envvar_delete.go +0 -135
- package/cmd/vip-next/commands/config_envvar_delete_test.go +0 -140
- package/cmd/vip-next/commands/config_envvar_get.go +0 -72
- package/cmd/vip-next/commands/config_envvar_get_all.go +0 -58
- package/cmd/vip-next/commands/config_envvar_get_all_test.go +0 -83
- package/cmd/vip-next/commands/config_envvar_get_test.go +0 -79
- package/cmd/vip-next/commands/config_envvar_list.go +0 -70
- package/cmd/vip-next/commands/config_envvar_list_test.go +0 -134
- package/cmd/vip-next/commands/config_envvar_set.go +0 -162
- package/cmd/vip-next/commands/config_envvar_set_test.go +0 -251
- package/cmd/vip-next/commands/config_software.go +0 -229
- package/cmd/vip-next/commands/config_software_test.go +0 -161
- package/cmd/vip-next/commands/config_software_update.go +0 -270
- package/cmd/vip-next/commands/config_software_update_test.go +0 -334
- package/cmd/vip-next/commands/db.go +0 -16
- package/cmd/vip-next/commands/db_phpmyadmin.go +0 -122
- package/cmd/vip-next/commands/db_phpmyadmin_test.go +0 -277
- package/cmd/vip-next/commands/defensive_mode.go +0 -106
- package/cmd/vip-next/commands/defensive_mode_configure.go +0 -150
- package/cmd/vip-next/commands/defensive_mode_disable.go +0 -62
- package/cmd/vip-next/commands/defensive_mode_enable.go +0 -62
- package/cmd/vip-next/commands/defensive_mode_test.go +0 -389
- package/cmd/vip-next/commands/devenv.go +0 -48
- package/cmd/vip-next/commands/devenv_create_appinfo.go +0 -158
- package/cmd/vip-next/commands/devenv_create_appinfo_test.go +0 -29
- package/cmd/vip-next/commands/devenv_create_test.go +0 -269
- package/cmd/vip-next/commands/devenv_data.go +0 -86
- package/cmd/vip-next/commands/devenv_data_confirm_test.go +0 -49
- package/cmd/vip-next/commands/devenv_debug_test.go +0 -34
- package/cmd/vip-next/commands/devenv_e2e_gate_test.go +0 -17
- package/cmd/vip-next/commands/devenv_e2e_test.go +0 -34
- package/cmd/vip-next/commands/devenv_envvar.go +0 -180
- package/cmd/vip-next/commands/devenv_envvar_test.go +0 -183
- package/cmd/vip-next/commands/devenv_exec.go +0 -75
- package/cmd/vip-next/commands/devenv_exec_test.go +0 -39
- package/cmd/vip-next/commands/devenv_flag_grammar_test.go +0 -241
- package/cmd/vip-next/commands/devenv_lifecycle.go +0 -778
- package/cmd/vip-next/commands/devenv_logs.go +0 -29
- package/cmd/vip-next/commands/devenv_resolve.go +0 -106
- package/cmd/vip-next/commands/devenv_resolve_test.go +0 -221
- package/cmd/vip-next/commands/devenv_sync.go +0 -256
- package/cmd/vip-next/commands/devenv_sync_sites.go +0 -116
- package/cmd/vip-next/commands/devenv_sync_sites_test.go +0 -151
- package/cmd/vip-next/commands/devenv_sync_test.go +0 -63
- package/cmd/vip-next/commands/devenv_test.go +0 -60
- package/cmd/vip-next/commands/devenv_update.go +0 -207
- package/cmd/vip-next/commands/devenv_update_test.go +0 -109
- package/cmd/vip-next/commands/devenv_versions_proxy_test.go +0 -133
- package/cmd/vip-next/commands/edge_workers.go +0 -197
- package/cmd/vip-next/commands/edge_workers_flags.go +0 -56
- package/cmd/vip-next/commands/edge_workers_local.go +0 -127
- package/cmd/vip-next/commands/edge_workers_mutation.go +0 -130
- package/cmd/vip-next/commands/edge_workers_read.go +0 -103
- package/cmd/vip-next/commands/edge_workers_test.go +0 -272
- package/cmd/vip-next/commands/export.go +0 -16
- package/cmd/vip-next/commands/export_sql.go +0 -333
- package/cmd/vip-next/commands/export_sql_test.go +0 -321
- package/cmd/vip-next/commands/format_env.go +0 -17
- package/cmd/vip-next/commands/import.go +0 -19
- package/cmd/vip-next/commands/import_debug_test.go +0 -110
- package/cmd/vip-next/commands/import_media.go +0 -433
- package/cmd/vip-next/commands/import_media_abort.go +0 -76
- package/cmd/vip-next/commands/import_media_confirm.go +0 -83
- package/cmd/vip-next/commands/import_media_confirm_test.go +0 -249
- package/cmd/vip-next/commands/import_media_fetch_test.go +0 -98
- package/cmd/vip-next/commands/import_media_status.go +0 -58
- package/cmd/vip-next/commands/import_media_test.go +0 -370
- package/cmd/vip-next/commands/import_sql.go +0 -1161
- package/cmd/vip-next/commands/import_sql_status.go +0 -67
- package/cmd/vip-next/commands/import_sql_test.go +0 -746
- package/cmd/vip-next/commands/import_validate_files.go +0 -157
- package/cmd/vip-next/commands/import_validate_files_test.go +0 -157
- package/cmd/vip-next/commands/import_validate_sql.go +0 -207
- package/cmd/vip-next/commands/import_validate_sql_test.go +0 -293
- package/cmd/vip-next/commands/login.go +0 -53
- package/cmd/vip-next/commands/login_test.go +0 -25
- package/cmd/vip-next/commands/logout.go +0 -43
- package/cmd/vip-next/commands/logout_test.go +0 -158
- package/cmd/vip-next/commands/logs.go +0 -169
- package/cmd/vip-next/commands/logs_test.go +0 -174
- package/cmd/vip-next/commands/nodeflag_aliases.go +0 -59
- package/cmd/vip-next/commands/progress_renderer.go +0 -118
- package/cmd/vip-next/commands/progress_renderer_test.go +0 -28
- package/cmd/vip-next/commands/searchreplace.go +0 -75
- package/cmd/vip-next/commands/searchreplace_debug_test.go +0 -82
- package/cmd/vip-next/commands/searchreplace_test.go +0 -155
- package/cmd/vip-next/commands/slowlogs.go +0 -167
- package/cmd/vip-next/commands/slowlogs_test.go +0 -159
- package/cmd/vip-next/commands/sqlreport.go +0 -183
- package/cmd/vip-next/commands/sqlreport_test.go +0 -66
- package/cmd/vip-next/commands/sync.go +0 -189
- package/cmd/vip-next/commands/sync_confirm.go +0 -121
- package/cmd/vip-next/commands/sync_confirm_test.go +0 -202
- package/cmd/vip-next/commands/sync_render.go +0 -207
- package/cmd/vip-next/commands/sync_render_test.go +0 -101
- package/cmd/vip-next/commands/sync_test.go +0 -148
- package/cmd/vip-next/commands/update.go +0 -85
- package/cmd/vip-next/commands/update_test.go +0 -49
- package/cmd/vip-next/commands/whoami.go +0 -161
- package/cmd/vip-next/commands/whoami_debug_test.go +0 -79
- package/cmd/vip-next/commands/whoami_test.go +0 -85
- package/cmd/vip-next/commands/wp.go +0 -376
- package/cmd/vip-next/commands/wp_debug_test.go +0 -32
- package/cmd/vip-next/commands/wp_test.go +0 -276
- package/cmd/vip-next/debug_args.go +0 -63
- package/cmd/vip-next/debug_test.go +0 -122
- package/cmd/vip-next/edge_workers_test.go +0 -108
- package/cmd/vip-next/flags_node_parity_test.go +0 -434
- package/cmd/vip-next/main.go +0 -391
- package/cmd/vip-next/main_test.go +0 -202
- package/cmd/vip-next/pendo_wiring_test.go +0 -148
- package/cmd/vip-next/root.go +0 -211
- package/cmd/vip-next/update_bootstrap.go +0 -94
- package/cmd/vip-next/update_bootstrap_test.go +0 -85
- package/cmd/vip-next/update_integration_test.go +0 -137
- package/cmd/vip-next-prerelease/main.go +0 -108
- package/cmd/vip-next-prerelease/main_test.go +0 -46
- package/docs/ARCHITECTURE.md +0 -95
- package/docs/BUILD-SIGNING.md +0 -501
- package/docs/CHANGELOG.md +0 -1844
- package/docs/COMMANDER-MIGRATION.md +0 -45
- package/docs/CONTRIBUTING.md +0 -29
- package/docs/CUTOVER-BREAKING-CHANGES.md +0 -261
- package/docs/DEBUGGING.md +0 -94
- package/docs/EDGE-WORKERS.md +0 -256
- package/docs/GO-UPDATES.md +0 -97
- package/docs/NPM-RELEASE-RECOVERY.md +0 -47
- package/docs/RELEASING.md +0 -211
- package/docs/SECURITY.md +0 -9
- package/docs/SETUP.md +0 -154
- package/docs/TESTING.md +0 -67
- package/docs/decisions/0001-operation-scoped-elevated-token-reuse.md +0 -87
- package/docs/dev-env-windows-wsl-testing.md +0 -191
- package/docs/vip-next-vip-command-reference.md +0 -257
- package/docs/vip-wp-line-parse-dfa.dot +0 -31
- package/eslint.config.js +0 -35
- package/fastlane/Fastfile +0 -204
- package/fastlane/example.env +0 -8
- package/fastlane/test_signing.rb +0 -83
- package/go.mod +0 -39
- package/go.sum +0 -127
- package/internal/appctx/app_resolver.go +0 -202
- package/internal/appctx/app_resolver_test.go +0 -187
- package/internal/appctx/confirm.go +0 -180
- package/internal/appctx/confirm_payload_test.go +0 -201
- package/internal/appctx/confirm_test.go +0 -120
- package/internal/appctx/context.go +0 -94
- package/internal/appctx/context_test.go +0 -56
- package/internal/appctx/env_resolver.go +0 -110
- package/internal/appctx/env_resolver_test.go +0 -215
- package/internal/appctx/format.go +0 -72
- package/internal/appctx/format_test.go +0 -75
- package/internal/appctx/interactive.go +0 -50
- package/internal/appctx/interactive_test.go +0 -134
- package/internal/appctx/middleware.go +0 -56
- package/internal/appctx/middleware_test.go +0 -88
- package/internal/appctx/prompts.go +0 -70
- package/internal/appctx/prompts_test.go +0 -97
- package/internal/appctx/required_args.go +0 -24
- package/internal/appctx/required_args_test.go +0 -38
- package/internal/appctx/telemetry.go +0 -22
- package/internal/appctx/telemetry_test.go +0 -42
- package/internal/appctx/wildcard.go +0 -29
- package/internal/appctx/wildcard_test.go +0 -53
- package/internal/auth/bypass.go +0 -84
- package/internal/auth/bypass_test.go +0 -97
- package/internal/auth/login.go +0 -156
- package/internal/auth/login_test.go +0 -184
- package/internal/auth/logout.go +0 -44
- package/internal/auth/logout_test.go +0 -78
- package/internal/auth/store.go +0 -130
- package/internal/auth/store_test.go +0 -339
- package/internal/auth/token.go +0 -117
- package/internal/auth/token_test.go +0 -90
- package/internal/backup/backup.go +0 -194
- package/internal/backup/backup_test.go +0 -228
- package/internal/cachepurge/cachepurge.go +0 -38
- package/internal/cachepurge/cachepurge_test.go +0 -92
- package/internal/customdeploy/archive.go +0 -205
- package/internal/customdeploy/archive_test.go +0 -174
- package/internal/customdeploy/customdeploy.go +0 -91
- package/internal/customdeploy/customdeploy_test.go +0 -82
- package/internal/debuglog/debuglog.go +0 -85
- package/internal/debuglog/debuglog_test.go +0 -44
- package/internal/defensivemode/api.go +0 -89
- package/internal/defensivemode/api_test.go +0 -122
- package/internal/devenv/adapters.go +0 -168
- package/internal/devenv/adapters_test.go +0 -44
- package/internal/devenv/adopt.go +0 -20
- package/internal/devenv/adopt_setup_test.go +0 -30
- package/internal/devenv/compose/labels.go +0 -90
- package/internal/devenv/compose/labels_test.go +0 -136
- package/internal/devenv/compose/project.go +0 -88
- package/internal/devenv/compose/project_test.go +0 -148
- package/internal/devenv/compose/render.go +0 -54
- package/internal/devenv/compose/render_test.go +0 -90
- package/internal/devenv/compose/services.go +0 -337
- package/internal/devenv/compose/services_test.go +0 -258
- package/internal/devenv/compose/testdata/full.golden.yml +0 -265
- package/internal/devenv/compose/types.go +0 -97
- package/internal/devenv/compose/types_test.go +0 -61
- package/internal/devenv/compose/view.go +0 -205
- package/internal/devenv/compose/view_test.go +0 -120
- package/internal/devenv/configfile.go +0 -300
- package/internal/devenv/configfile_test.go +0 -246
- package/internal/devenv/create.go +0 -130
- package/internal/devenv/create_test.go +0 -98
- package/internal/devenv/debug.go +0 -4
- package/internal/devenv/debug_test.go +0 -103
- package/internal/devenv/devenv.go +0 -434
- package/internal/devenv/devenv_test.go +0 -77
- package/internal/devenv/devexec.go +0 -140
- package/internal/devenv/devexec_test.go +0 -91
- package/internal/devenv/devlog/devlog.go +0 -219
- package/internal/devenv/devlog/devlog_test.go +0 -112
- package/internal/devenv/devterm/devterm.go +0 -65
- package/internal/devenv/devterm/devterm_pty.go +0 -58
- package/internal/devenv/devterm/devterm_stub.go +0 -20
- package/internal/devenv/devterm/devterm_test.go +0 -78
- package/internal/devenv/dockercli/capture.go +0 -84
- package/internal/devenv/dockercli/capture_test.go +0 -33
- package/internal/devenv/dockercli/compose.go +0 -30
- package/internal/devenv/dockercli/compose_test.go +0 -35
- package/internal/devenv/dockercli/runner.go +0 -214
- package/internal/devenv/dockercli/runner_test.go +0 -157
- package/internal/devenv/dockercli/socket.go +0 -56
- package/internal/devenv/dockercli/socket_test.go +0 -52
- package/internal/devenv/e2e_gate_test.go +0 -17
- package/internal/devenv/e2e_test.go +0 -499
- package/internal/devenv/e2esafety/gate_wiring_test.go +0 -90
- package/internal/devenv/e2esafety/safety.go +0 -52
- package/internal/devenv/e2esafety/safety_test.go +0 -71
- package/internal/devenv/eachenv_test.go +0 -132
- package/internal/devenv/editor.go +0 -82
- package/internal/devenv/editor_test.go +0 -60
- package/internal/devenv/envfile.go +0 -287
- package/internal/devenv/envvar.go +0 -165
- package/internal/devenv/envvar_test.go +0 -178
- package/internal/devenv/hostops/context.go +0 -38
- package/internal/devenv/hostops/context_test.go +0 -24
- package/internal/devenv/hostops/e2e_gate_test.go +0 -17
- package/internal/devenv/hostops/e2e_test.go +0 -429
- package/internal/devenv/hostops/elevate.go +0 -248
- package/internal/devenv/hostops/elevate_message_test.go +0 -35
- package/internal/devenv/hostops/elevate_test.go +0 -111
- package/internal/devenv/hostops/hosts.go +0 -255
- package/internal/devenv/hostops/hosts_test.go +0 -178
- package/internal/devenv/hostops/thumbprint_test.go +0 -57
- package/internal/devenv/hostops/trust.go +0 -115
- package/internal/devenv/hostops/trust_test.go +0 -90
- package/internal/devenv/hostrefresh.go +0 -127
- package/internal/devenv/hostrefresh_test.go +0 -123
- package/internal/devenv/importdata.go +0 -491
- package/internal/devenv/importdata_test.go +0 -142
- package/internal/devenv/importdecompress_test.go +0 -90
- package/internal/devenv/importgate_test.go +0 -166
- package/internal/devenv/importvalidate.go +0 -437
- package/internal/devenv/importvalidate_test.go +0 -293
- package/internal/devenv/info_table.go +0 -165
- package/internal/devenv/info_table_test.go +0 -111
- package/internal/devenv/instancedata/instancedata.go +0 -239
- package/internal/devenv/instancedata/instancedata_test.go +0 -281
- package/internal/devenv/instancedata/testdata/legacy_keys.json +0 -16
- package/internal/devenv/instancedata/testdata/unknown_keys.json +0 -19
- package/internal/devenv/lifecycle/adopt.go +0 -24
- package/internal/devenv/lifecycle/adopt_test.go +0 -43
- package/internal/devenv/lifecycle/health.go +0 -28
- package/internal/devenv/lifecycle/health_test.go +0 -34
- package/internal/devenv/lifecycle/hosts.go +0 -42
- package/internal/devenv/lifecycle/hosts_test.go +0 -41
- package/internal/devenv/lifecycle/migrate.go +0 -44
- package/internal/devenv/lifecycle/migrate_test.go +0 -78
- package/internal/devenv/lifecycle/pull.go +0 -19
- package/internal/devenv/lifecycle/pull_test.go +0 -29
- package/internal/devenv/lifecycle/setup.go +0 -35
- package/internal/devenv/lifecycle/setup_test.go +0 -46
- package/internal/devenv/lifecycle/start.go +0 -132
- package/internal/devenv/lifecycle/start_test.go +0 -350
- package/internal/devenv/lifecycle/teardown.go +0 -32
- package/internal/devenv/lifecycle/teardown_test.go +0 -83
- package/internal/devenv/lifecycle/types.go +0 -86
- package/internal/devenv/lifecycle/waiter.go +0 -49
- package/internal/devenv/lifecycle/waiter_test.go +0 -98
- package/internal/devenv/list.go +0 -49
- package/internal/devenv/list_test.go +0 -24
- package/internal/devenv/logs.go +0 -43
- package/internal/devenv/logs_test.go +0 -28
- package/internal/devenv/materialize.go +0 -44
- package/internal/devenv/materialize_test.go +0 -112
- package/internal/devenv/paths/paths.go +0 -42
- package/internal/devenv/paths/paths_test.go +0 -39
- package/internal/devenv/postimport.go +0 -134
- package/internal/devenv/postimport_test.go +0 -389
- package/internal/devenv/proxy/ca.go +0 -110
- package/internal/devenv/proxy/ca_test.go +0 -111
- package/internal/devenv/proxy/network.go +0 -28
- package/internal/devenv/proxy/network_test.go +0 -68
- package/internal/devenv/proxy/ports.go +0 -104
- package/internal/devenv/proxy/ports_test.go +0 -76
- package/internal/devenv/proxy/proxy.go +0 -143
- package/internal/devenv/proxy/proxy_test.go +0 -149
- package/internal/devenv/proxy/scripts/gen-certs.sh +0 -73
- package/internal/devenv/proxy/spec.go +0 -60
- package/internal/devenv/proxy/spec_test.go +0 -44
- package/internal/devenv/proxy/testhelpers_test.go +0 -7
- package/internal/devenv/proxy_policy_test.go +0 -155
- package/internal/devenv/syncplan.go +0 -573
- package/internal/devenv/syncplan_test.go +0 -256
- package/internal/devenv/syncsql.go +0 -247
- package/internal/devenv/syncsql_repair.go +0 -169
- package/internal/devenv/syncsql_repair_test.go +0 -150
- package/internal/devenv/syncsql_test.go +0 -220
- package/internal/devenv/update.go +0 -87
- package/internal/devenv/update_test.go +0 -47
- package/internal/edgeworkers/api.go +0 -173
- package/internal/edgeworkers/api_test.go +0 -256
- package/internal/edgeworkers/build.go +0 -188
- package/internal/edgeworkers/build_test.go +0 -175
- package/internal/edgeworkers/confirmation.go +0 -72
- package/internal/edgeworkers/deployment.go +0 -156
- package/internal/edgeworkers/deployment_test.go +0 -165
- package/internal/edgeworkers/output.go +0 -131
- package/internal/edgeworkers/output_test.go +0 -98
- package/internal/edgeworkers/project.go +0 -264
- package/internal/edgeworkers/project_test.go +0 -167
- package/internal/edgeworkers/scaffold.go +0 -88
- package/internal/edgeworkers/templates/README.md +0 -25
- package/internal/edgeworkers/templates/edge-workers.json +0 -4
- package/internal/edgeworkers/templates/gitignore +0 -2
- package/internal/edgeworkers/templates/package.json +0 -16
- package/internal/edgeworkers/templates/tsconfig.json +0 -6
- package/internal/edgeworkers/templates/worker.ts +0 -19
- package/internal/edgeworkers/types.go +0 -37
- package/internal/edgeworkers/validation.go +0 -177
- package/internal/envalias/envalias.go +0 -50
- package/internal/envalias/envalias_test.go +0 -147
- package/internal/envvar/envvar.go +0 -253
- package/internal/envvar/envvar_test.go +0 -274
- package/internal/envvar/reload_manifest.go +0 -99
- package/internal/envvar/reload_manifest_test.go +0 -44
- package/internal/envvar/value_confirm.go +0 -26
- package/internal/envvar/value_confirm_test.go +0 -22
- package/internal/exit/exit.go +0 -94
- package/internal/exit/exit_test.go +0 -119
- package/internal/gql/SCHEMA.md +0 -21
- package/internal/gql/client.go +0 -54
- package/internal/gql/client_test.go +0 -71
- package/internal/gql/debug_test.go +0 -79
- package/internal/gql/decoder_compat_helpers_test.go +0 -35
- package/internal/gql/decoder_compat_test.go +0 -78
- package/internal/gql/doc.go +0 -13
- package/internal/gql/edgeworkerinput/input.go +0 -58
- package/internal/gql/edgeworkerinput/input_test.go +0 -52
- package/internal/gql/error.go +0 -163
- package/internal/gql/error_test.go +0 -203
- package/internal/gql/generated.go +0 -10425
- package/internal/gql/genqlient.yaml +0 -26
- package/internal/gql/import_sql_marshal_test.go +0 -69
- package/internal/gql/operation.go +0 -67
- package/internal/gql/operation_test.go +0 -60
- package/internal/gql/operations/app_get.graphql +0 -43
- package/internal/gql/operations/app_list.graphql +0 -9
- package/internal/gql/operations/app_resolve.graphql +0 -37
- package/internal/gql/operations/backup_export_deploy.graphql +0 -123
- package/internal/gql/operations/cachepurge.graphql +0 -6
- package/internal/gql/operations/defensive_mode.graphql +0 -13
- package/internal/gql/operations/dev_env_create.graphql +0 -38
- package/internal/gql/operations/dev_env_sync.graphql +0 -15
- package/internal/gql/operations/edge_workers.graphql +0 -53
- package/internal/gql/operations/envvar.graphql +0 -52
- package/internal/gql/operations/fragments.graphql +0 -5
- package/internal/gql/operations/import_media.graphql +0 -61
- package/internal/gql/operations/import_sql.graphql +0 -135
- package/internal/gql/operations/logs.graphql +0 -22
- package/internal/gql/operations/me.graphql +0 -13
- package/internal/gql/operations/phpmyadmin.graphql +0 -21
- package/internal/gql/operations/slowlogs.graphql +0 -25
- package/internal/gql/operations/software.graphql +0 -53
- package/internal/gql/operations/sync.graphql +0 -51
- package/internal/gql/operations/wp.graphql +0 -37
- package/internal/gql/proxy_test.go +0 -62
- package/internal/gql/rechallenge.go +0 -218
- package/internal/gql/rechallenge_test.go +0 -471
- package/internal/gql/retry.go +0 -130
- package/internal/gql/retry_test.go +0 -230
- package/internal/gql/schema.gql +0 -9337
- package/internal/gql/transport.go +0 -65
- package/internal/gql/transport_helper.go +0 -24
- package/internal/httpproxy/callers_test.go +0 -211
- package/internal/httpproxy/debug_test.go +0 -32
- package/internal/httpproxy/httpproxy.go +0 -315
- package/internal/httpproxy/httpproxy_test.go +0 -435
- package/internal/installer/version.go +0 -41
- package/internal/installer/version_test.go +0 -33
- package/internal/keychain/fallback.go +0 -93
- package/internal/keychain/keychain.go +0 -197
- package/internal/keychain/keychain_select_test.go +0 -34
- package/internal/keychain/keychain_test.go +0 -112
- package/internal/logsapi/logsapi.go +0 -165
- package/internal/logsapi/logsapi_test.go +0 -82
- package/internal/mediaimport/mediaimport.go +0 -26
- package/internal/mediaimport/mediaimport_test.go +0 -46
- package/internal/mediaimport/status.go +0 -162
- package/internal/mediaimport/status_test.go +0 -159
- package/internal/mediaimport/tracker.go +0 -116
- package/internal/mediaimport/tracker_test.go +0 -62
- package/internal/nodeflags/nodeflags.go +0 -130
- package/internal/nodeflags/nodeflags_test.go +0 -138
- package/internal/nodeflags/optionalvalue.go +0 -123
- package/internal/nodeflags/optionalvalue_test.go +0 -158
- package/internal/output/csv.go +0 -178
- package/internal/output/fields.go +0 -22
- package/internal/output/fields_test.go +0 -21
- package/internal/output/ids.go +0 -26
- package/internal/output/ids_test.go +0 -32
- package/internal/output/json.go +0 -113
- package/internal/output/keyvalue.go +0 -35
- package/internal/output/keyvalue_block.go +0 -77
- package/internal/output/keyvalue_block_test.go +0 -95
- package/internal/output/keyvalue_test.go +0 -35
- package/internal/output/ordered.go +0 -44
- package/internal/output/ordered_test.go +0 -42
- package/internal/output/output.go +0 -62
- package/internal/output/output_test.go +0 -400
- package/internal/output/table.go +0 -231
- package/internal/output/table_layout.go +0 -472
- package/internal/output/table_layout_test.go +0 -107
- package/internal/output/table_layout_tty_test.go +0 -63
- package/internal/output/text.go +0 -24
- package/internal/output/text_test.go +0 -31
- package/internal/output/typename.go +0 -35
- package/internal/output/typename_test.go +0 -48
- package/internal/parity/backup_export_deploy_scenario_test.go +0 -285
- package/internal/parity/cache_scenario_test.go +0 -173
- package/internal/parity/command_surface_scenario_test.go +0 -530
- package/internal/parity/defensive_mode_scenario_test.go +0 -133
- package/internal/parity/diff.go +0 -128
- package/internal/parity/diff_test.go +0 -155
- package/internal/parity/differential_test.go +0 -166
- package/internal/parity/edge_workers_build_smoke_test.go +0 -69
- package/internal/parity/edge_workers_cases_test.go +0 -77
- package/internal/parity/edge_workers_debug_test.go +0 -87
- package/internal/parity/edge_workers_differential_test.go +0 -483
- package/internal/parity/edge_workers_prompt_test.go +0 -151
- package/internal/parity/env.go +0 -176
- package/internal/parity/env_test.go +0 -211
- package/internal/parity/envvar_mutation_scenario_test.go +0 -188
- package/internal/parity/harness.go +0 -28
- package/internal/parity/harness_test.go +0 -62
- package/internal/parity/import_media_scenario_test.go +0 -207
- package/internal/parity/import_sql_scenario_test.go +0 -198
- package/internal/parity/import_validate_sql_scenario_test.go +0 -68
- package/internal/parity/keychain.go +0 -538
- package/internal/parity/keychain_test.go +0 -201
- package/internal/parity/m5_differential_test.go +0 -185
- package/internal/parity/m5_scenarios_test.go +0 -225
- package/internal/parity/nodebin.go +0 -120
- package/internal/parity/nodebin_test.go +0 -148
- package/internal/parity/parker.go +0 -491
- package/internal/parity/parker_discovery.go +0 -373
- package/internal/parity/parker_discovery_test.go +0 -267
- package/internal/parity/parker_live_test.go +0 -164
- package/internal/parity/parker_test.go +0 -480
- package/internal/parity/pendo_test.go +0 -122
- package/internal/parity/phpmyadmin_scenario_test.go +0 -214
- package/internal/parity/runner.go +0 -56
- package/internal/parity/runner_test.go +0 -67
- package/internal/parity/scenario.go +0 -82
- package/internal/parity/scenario_test.go +0 -52
- package/internal/parity/surface_differential_test.go +0 -494
- package/internal/parity/sync_scenario_test.go +0 -172
- package/internal/parity/vendored_src_test.go +0 -84
- package/internal/parity/whoami_scenario_test.go +0 -69
- package/internal/parity/wp_scenario_test.go +0 -428
- package/internal/phpmyadmin/client.go +0 -221
- package/internal/phpmyadmin/client_test.go +0 -418
- package/internal/poll/poll.go +0 -85
- package/internal/poll/poll_test.go +0 -136
- package/internal/polling/polling.go +0 -97
- package/internal/polling/polling_test.go +0 -59
- package/internal/rechallenge/browser.go +0 -16
- package/internal/rechallenge/client.go +0 -198
- package/internal/rechallenge/client_test.go +0 -169
- package/internal/rechallenge/errors.go +0 -137
- package/internal/rechallenge/errors_test.go +0 -81
- package/internal/rechallenge/flow.go +0 -232
- package/internal/rechallenge/flow_noninteractive_test.go +0 -285
- package/internal/rechallenge/flow_test.go +0 -217
- package/internal/rechallenge/interactive.go +0 -90
- package/internal/rechallenge/interactive_test.go +0 -106
- package/internal/rechallenge/redact.go +0 -36
- package/internal/rechallenge/redact_test.go +0 -142
- package/internal/rechallenge/tokencache.go +0 -148
- package/internal/rechallenge/tokencache_test.go +0 -139
- package/internal/rechallenge/types.go +0 -100
- package/internal/rechallenge/types_test.go +0 -56
- package/internal/redact/redact.go +0 -99
- package/internal/redact/redact_test.go +0 -80
- package/internal/releasepromotion/buildkite.go +0 -233
- package/internal/releasepromotion/buildkite_test.go +0 -284
- package/internal/releasepromotion/contract.go +0 -165
- package/internal/releasepromotion/contract_test.go +0 -211
- package/internal/releasepromotion/github.go +0 -378
- package/internal/releasepromotion/github_test.go +0 -399
- package/internal/releasepromotion/optional_installers_test.go +0 -87
- package/internal/releasepromotion/promoter.go +0 -134
- package/internal/releasepromotion/promoter_test.go +0 -147
- package/internal/releasepromotion/verify.go +0 -239
- package/internal/releasepromotion/verify_test.go +0 -296
- package/internal/searchreplace/debug_test.go +0 -71
- package/internal/searchreplace/dumpdetails.go +0 -104
- package/internal/searchreplace/dumpdetails_test.go +0 -86
- package/internal/searchreplace/searchreplace.go +0 -261
- package/internal/searchreplace/searchreplace_test.go +0 -250
- package/internal/siteimport/debug_test.go +0 -34
- package/internal/siteimport/siteimport.go +0 -18
- package/internal/siteimport/siteimport_test.go +0 -19
- package/internal/siteimport/sitetype.go +0 -74
- package/internal/siteimport/sitetype_test.go +0 -62
- package/internal/siteimport/status.go +0 -282
- package/internal/siteimport/status_test.go +0 -234
- package/internal/slowlogsapi/slowlogsapi.go +0 -176
- package/internal/slowlogsapi/slowlogsapi_test.go +0 -93
- package/internal/softwaresettings/format.go +0 -192
- package/internal/softwaresettings/format_test.go +0 -123
- package/internal/sqlexport/diskspace.go +0 -36
- package/internal/sqlexport/diskspace_unix.go +0 -24
- package/internal/sqlexport/diskspace_windows.go +0 -26
- package/internal/sqlexport/download.go +0 -75
- package/internal/sqlexport/download_test.go +0 -103
- package/internal/sqlexport/export.go +0 -321
- package/internal/sqlexport/export_test.go +0 -313
- package/internal/sqlexport/format.go +0 -44
- package/internal/sqlexport/livecopy.go +0 -150
- package/internal/sqlexport/livecopy_test.go +0 -273
- package/internal/sqlvalidation/devenv_checks_test.go +0 -134
- package/internal/sqlvalidation/filename.go +0 -30
- package/internal/sqlvalidation/line_by_line.go +0 -91
- package/internal/sqlvalidation/line_by_line_test.go +0 -165
- package/internal/sqlvalidation/multisite.go +0 -31
- package/internal/sqlvalidation/multisite_test.go +0 -34
- package/internal/sqlvalidation/sql.go +0 -510
- package/internal/sqlvalidation/sql_test.go +0 -206
- package/internal/sync/sync.go +0 -246
- package/internal/sync/sync_test.go +0 -253
- package/internal/telemetry/config.go +0 -34
- package/internal/telemetry/default.go +0 -67
- package/internal/telemetry/default_endpoint_test.go +0 -111
- package/internal/telemetry/pendo.go +0 -185
- package/internal/telemetry/pendo_auth_test.go +0 -92
- package/internal/telemetry/pendo_test.go +0 -252
- package/internal/telemetry/scrub.go +0 -90
- package/internal/telemetry/scrub_test.go +0 -131
- package/internal/telemetry/tracker.go +0 -102
- package/internal/telemetry/tracker_test.go +0 -76
- package/internal/telemetry/tracks.go +0 -82
- package/internal/telemetry/tracks_test.go +0 -129
- package/internal/telemetry/uuid.go +0 -50
- package/internal/telemetry/uuid_test.go +0 -90
- package/internal/tui/progress.go +0 -153
- package/internal/tui/progress_test.go +0 -89
- package/internal/tui/progress_tracker.go +0 -299
- package/internal/tui/progress_tracker_test.go +0 -155
- package/internal/update/archive.go +0 -134
- package/internal/update/archive_test.go +0 -132
- package/internal/update/download.go +0 -138
- package/internal/update/download_test.go +0 -32
- package/internal/update/github.go +0 -121
- package/internal/update/install.go +0 -265
- package/internal/update/install_test.go +0 -151
- package/internal/update/lock_unix.go +0 -23
- package/internal/update/lock_windows.go +0 -22
- package/internal/update/native_test.go +0 -70
- package/internal/update/notify.go +0 -91
- package/internal/update/ownership.go +0 -117
- package/internal/update/ownership_test.go +0 -102
- package/internal/update/release.go +0 -120
- package/internal/update/release_test.go +0 -168
- package/internal/update/service.go +0 -197
- package/internal/update/service_test.go +0 -118
- package/internal/update/state.go +0 -116
- package/internal/update/state_test.go +0 -132
- package/internal/upload/debug_test.go +0 -76
- package/internal/upload/filemeta.go +0 -112
- package/internal/upload/filemeta_test.go +0 -94
- package/internal/upload/multipart.go +0 -215
- package/internal/upload/multipart_test.go +0 -210
- package/internal/upload/orchestrate.go +0 -81
- package/internal/upload/parts.go +0 -39
- package/internal/upload/parts_test.go +0 -39
- package/internal/upload/presign.go +0 -103
- package/internal/upload/presign_test.go +0 -128
- package/internal/upload/proxy_test.go +0 -55
- package/internal/upload/putobject.go +0 -92
- package/internal/upload/putobject_test.go +0 -79
- package/internal/upload/retry.go +0 -45
- package/internal/upload/upload.go +0 -22
- package/internal/upload/xmlerror.go +0 -28
- package/internal/validatefiles/files.go +0 -105
- package/internal/validatefiles/files_test.go +0 -143
- package/internal/validatefiles/report.go +0 -172
- package/internal/validatefiles/validatefiles.go +0 -271
- package/internal/validatefiles/validatefiles_test.go +0 -127
- package/internal/version/stamp.go +0 -15
- package/internal/version/stamp_test.go +0 -25
- package/internal/version/version.go +0 -14
- package/internal/version/version_test.go +0 -25
- package/internal/wpshell/parser.go +0 -68
- package/internal/wpshell/parser_test.go +0 -58
- package/internal/wpshell/repl.go +0 -81
- package/internal/wpshell/repl_test.go +0 -71
- package/internal/wpshell/requote.go +0 -13
- package/internal/wpshell/requote_test.go +0 -15
- package/internal/wpssh/debug_test.go +0 -67
- package/internal/wpssh/wpssh.go +0 -124
- package/internal/wpssh/wpssh_test.go +0 -203
- package/internal/wpstream/debug_test.go +0 -116
- package/internal/wpstream/e2e_test.go +0 -178
- package/internal/wpstream/engineio.go +0 -291
- package/internal/wpstream/engineio_test.go +0 -82
- package/internal/wpstream/iostream.go +0 -391
- package/internal/wpstream/iostream_test.go +0 -138
- package/internal/wpstream/run.go +0 -364
- package/internal/wpstream/run_test.go +0 -184
- package/internal/wpstream/socketio.go +0 -435
- package/internal/wpstream/socketio_test.go +0 -402
- package/internal/wpstream/testdata/fixture-server.js +0 -54
- package/make.ps1 +0 -155
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs +0 -3
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.cjs.map +0 -1
- package/node_modules/@apollo/client/__cjs/utilities/internal/types/DeferInfo.d.cts +0 -10
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.d.ts +0 -10
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js +0 -2
- package/node_modules/@apollo/client/utilities/internal/types/DeferInfo.js.map +0 -1
- package/node_modules/argparse/LICENSE +0 -254
- package/node_modules/argparse/README.md +0 -84
- package/node_modules/argparse/package.json +0 -31
- package/node_modules/lando/node_modules/cliui/build/index.cjs +0 -302
- package/node_modules/lando/node_modules/cliui/build/lib/string-utils.js +0 -27
- package/node_modules/lando/node_modules/js-yaml/README.md +0 -233
- package/node_modules/lando/node_modules/js-yaml/bin/js-yaml.js +0 -117
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js +0 -3022
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.js.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js +0 -2
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.min.js.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs +0 -3082
- package/node_modules/lando/node_modules/js-yaml/dist/js-yaml.mjs.map +0 -1
- package/node_modules/lando/node_modules/js-yaml/index.js +0 -44
- package/node_modules/lando/node_modules/js-yaml/lib/common.js +0 -50
- package/node_modules/lando/node_modules/js-yaml/lib/dumper.js +0 -937
- package/node_modules/lando/node_modules/js-yaml/lib/exception.js +0 -51
- package/node_modules/lando/node_modules/js-yaml/lib/index_vite_proxy.tmp.mjs +0 -37
- package/node_modules/lando/node_modules/js-yaml/lib/loader.js +0 -1803
- package/node_modules/lando/node_modules/js-yaml/lib/schema/core.js +0 -9
- package/node_modules/lando/node_modules/js-yaml/lib/schema/default.js +0 -20
- package/node_modules/lando/node_modules/js-yaml/lib/schema/failsafe.js +0 -14
- package/node_modules/lando/node_modules/js-yaml/lib/schema/json.js +0 -17
- package/node_modules/lando/node_modules/js-yaml/lib/schema.js +0 -109
- package/node_modules/lando/node_modules/js-yaml/lib/snippet.js +0 -96
- package/node_modules/lando/node_modules/js-yaml/lib/type/binary.js +0 -122
- package/node_modules/lando/node_modules/js-yaml/lib/type/bool.js +0 -35
- package/node_modules/lando/node_modules/js-yaml/lib/type/float.js +0 -99
- package/node_modules/lando/node_modules/js-yaml/lib/type/int.js +0 -142
- package/node_modules/lando/node_modules/js-yaml/lib/type/map.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/merge.js +0 -12
- package/node_modules/lando/node_modules/js-yaml/lib/type/null.js +0 -35
- package/node_modules/lando/node_modules/js-yaml/lib/type/omap.js +0 -45
- package/node_modules/lando/node_modules/js-yaml/lib/type/pairs.js +0 -50
- package/node_modules/lando/node_modules/js-yaml/lib/type/seq.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/set.js +0 -29
- package/node_modules/lando/node_modules/js-yaml/lib/type/str.js +0 -8
- package/node_modules/lando/node_modules/js-yaml/lib/type/timestamp.js +0 -88
- package/node_modules/lando/node_modules/js-yaml/lib/type.js +0 -66
- package/node_modules/lando/node_modules/js-yaml/package.json +0 -83
- package/node_modules/lando/node_modules/wrap-ansi/index.js +0 -216
- package/node_modules/lando/node_modules/wrap-ansi/package.json +0 -62
- package/node_modules/lando/node_modules/wrap-ansi/readme.md +0 -91
- package/node_modules/lando/node_modules/yargs/build/index.cjs +0 -2920
- package/node_modules/lando/node_modules/yargs/helpers/index.js +0 -14
- package/node_modules/lando/node_modules/yargs/index.cjs +0 -39
- package/node_modules/lando/node_modules/yargs/yargs +0 -9
- package/node_modules/lando/node_modules/yargs-parser/build/index.cjs +0 -1042
- package/node_modules/lando/plugins/lando-test/index.js +0 -3
- package/node_modules/lando/plugins/lando-test/plugin.yml +0 -2
- package/packaging/macos/build-pkg.sh +0 -53
- package/packaging/macos/preinstall +0 -33
- package/packaging/macos/test-install.sh +0 -51
- package/packaging/macos/test_package.py +0 -74
- package/packaging/macos/uninstall.sh +0 -24
- package/packaging/macos/verify-pkg.py +0 -61
- package/packaging/windows/build-msi.ps1 +0 -153
- package/packaging/windows/test-msi.ps1 +0 -225
- package/packaging/windows/verify-msi.ps1 +0 -74
- package/packaging/windows/vip-next.wxs +0 -79
- package/scripts/catalog_script_test.go +0 -123
- package/scripts/vip-next-command-catalog.sh +0 -506
- package/test-utils/undici-mock.js +0 -25
- package/testdata/installer-fixture/main.go +0 -40
- package/testdata/parity/app-deploy-completed.yaml +0 -14
- package/testdata/parity/app-deploy-missing-token.yaml +0 -21
- package/testdata/parity/app-deploy-validate-clean.yaml +0 -11
- package/testdata/parity/app-deploy-validate-missing-themes.yaml +0 -21
- package/testdata/parity/app-get-baseline.yaml +0 -14
- package/testdata/parity/app-get-custom-deploy.yaml +0 -14
- package/testdata/parity/app-get-json.yaml +0 -14
- package/testdata/parity/app-get-not-found.yaml +0 -13
- package/testdata/parity/app-list-baseline.yaml +0 -14
- package/testdata/parity/app-list-csv.yaml +0 -13
- package/testdata/parity/app-list-empty.yaml +0 -13
- package/testdata/parity/app-list-ids.yaml +0 -26
- package/testdata/parity/app-list-json.yaml +0 -13
- package/testdata/parity/app-list-unknown-format.yaml +0 -29
- package/testdata/parity/backup-db-already-in-progress.yaml +0 -15
- package/testdata/parity/backup-db-completed.yaml +0 -14
- package/testdata/parity/backup-db-help.yaml +0 -10
- package/testdata/parity/cache-purge-url-empty.yaml +0 -26
- package/testdata/parity/cache-purge-url-from-file.yaml +0 -21
- package/testdata/parity/cache-purge-url-multi.yaml +0 -19
- package/testdata/parity/cache-purge-url-single.yaml +0 -18
- package/testdata/parity/defensive-mode-enable-with-rechallenge.yaml +0 -20
- package/testdata/parity/edge-workers-artifact-symlink.yaml +0 -8
- package/testdata/parity/edge-workers-bare-location.yaml +0 -8
- package/testdata/parity/edge-workers-bare-path.yaml +0 -8
- package/testdata/parity/edge-workers-bare-type.yaml +0 -8
- package/testdata/parity/edge-workers-build-all.yaml +0 -8
- package/testdata/parity/edge-workers-build-compiler-error.yaml +0 -8
- package/testdata/parity/edge-workers-build-empty.yaml +0 -8
- package/testdata/parity/edge-workers-build-missing-compiler.yaml +0 -8
- package/testdata/parity/edge-workers-build-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-build-one.yaml +0 -8
- package/testdata/parity/edge-workers-delete-force.yaml +0 -8
- package/testdata/parity/edge-workers-delete-rejected.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-active-update-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-active-update.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-all-preparation-failure.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-create-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-create.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-enable-failure.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-inactive-update-enable.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-inactive-update.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-clear.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-preserve.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-location-replace.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-production-refused.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-production-skip.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-source-create.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-source.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-skip-validate.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-source-empty.yaml +0 -8
- package/testdata/parity/edge-workers-deploy-upload-failure.yaml +0 -8
- package/testdata/parity/edge-workers-disable.yaml +0 -8
- package/testdata/parity/edge-workers-double-dash.yaml +0 -8
- package/testdata/parity/edge-workers-duplicate-names.yaml +0 -8
- package/testdata/parity/edge-workers-enable-production-refused.yaml +0 -8
- package/testdata/parity/edge-workers-enable.yaml +0 -8
- package/testdata/parity/edge-workers-entry-escape.yaml +0 -8
- package/testdata/parity/edge-workers-get-empty-source.yaml +0 -8
- package/testdata/parity/edge-workers-get-missing.yaml +0 -8
- package/testdata/parity/edge-workers-get-no-source.yaml +0 -8
- package/testdata/parity/edge-workers-get-source.yaml +0 -8
- package/testdata/parity/edge-workers-get.yaml +0 -8
- package/testdata/parity/edge-workers-init-invalid-type.yaml +0 -8
- package/testdata/parity/edge-workers-init-nonempty.yaml +0 -8
- package/testdata/parity/edge-workers-init.yaml +0 -8
- package/testdata/parity/edge-workers-json-control-name.yaml +0 -8
- package/testdata/parity/edge-workers-list-csv.yaml +0 -8
- package/testdata/parity/edge-workers-list-empty-json.yaml +0 -8
- package/testdata/parity/edge-workers-list-empty.yaml +0 -8
- package/testdata/parity/edge-workers-list-json.yaml +0 -8
- package/testdata/parity/edge-workers-list-table.yaml +0 -8
- package/testdata/parity/edge-workers-mutation-graphql-error.yaml +0 -8
- package/testdata/parity/edge-workers-mutation-null.yaml +0 -8
- package/testdata/parity/edge-workers-new-invalid-location.yaml +0 -8
- package/testdata/parity/edge-workers-new-invalid-name.yaml +0 -8
- package/testdata/parity/edge-workers-new-location.yaml +0 -8
- package/testdata/parity/edge-workers-new.yaml +0 -8
- package/testdata/parity/edge-workers-read-null.yaml +0 -8
- package/testdata/parity/edge-workers-repeated-path.yaml +0 -8
- package/testdata/parity/edge-workers-repeated-type.yaml +0 -8
- package/testdata/parity/edge-workers-short-equals.yaml +0 -8
- package/testdata/parity/edge-workers-table-control-name.yaml +0 -8
- package/testdata/parity/edge-workers-unicode-order.yaml +0 -8
- package/testdata/parity/edge-workers-validate-all.yaml +0 -8
- package/testdata/parity/edge-workers-validate-invalid.yaml +0 -8
- package/testdata/parity/edge-workers-validate-name-all.yaml +0 -8
- package/testdata/parity/edge-workers-validate-no-artifact.yaml +0 -8
- package/testdata/parity/edge-workers-validate-no-name.yaml +0 -8
- package/testdata/parity/edge-workers-validate-null.yaml +0 -8
- package/testdata/parity/edge-workers-validate.yaml +0 -8
- package/testdata/parity/envvar-delete-baseline.yaml +0 -19
- package/testdata/parity/envvar-delete-prod-cancel.yaml +0 -41
- package/testdata/parity/envvar-delete-typed-mismatch.yaml +0 -44
- package/testdata/parity/envvar-get-baseline.yaml +0 -14
- package/testdata/parity/envvar-get-lowercase-input.yaml +0 -14
- package/testdata/parity/envvar-get-named-help.yaml +0 -24
- package/testdata/parity/envvar-get-not-found.yaml +0 -17
- package/testdata/parity/envvar-getall-baseline.yaml +0 -14
- package/testdata/parity/envvar-getall-empty.yaml +0 -15
- package/testdata/parity/envvar-getall-keyvalue.yaml +0 -22
- package/testdata/parity/envvar-list-baseline.yaml +0 -15
- package/testdata/parity/envvar-list-empty.yaml +0 -15
- package/testdata/parity/envvar-list-ids.yaml +0 -14
- package/testdata/parity/envvar-list-json.yaml +0 -14
- package/testdata/parity/envvar-list-keyvalue.yaml +0 -22
- package/testdata/parity/envvar-set-baseline.yaml +0 -21
- package/testdata/parity/envvar-set-invalid-name.yaml +0 -20
- package/testdata/parity/envvar-set-newrelic-blocked.yaml +0 -21
- package/testdata/parity/envvar-set-prod-cancel.yaml +0 -42
- package/testdata/parity/envvar-set-prod-confirm-skipped.yaml +0 -20
- package/testdata/parity/export-sql-completed.yaml +0 -14
- package/testdata/parity/export-sql-config-conflict.yaml +0 -21
- package/testdata/parity/export-sql-help.yaml +0 -11
- package/testdata/parity/import-media-abort-noninteractive.yaml +0 -19
- package/testdata/parity/import-media-help.yaml +0 -12
- package/testdata/parity/import-media-invalid-archive.yaml +0 -18
- package/testdata/parity/import-media-status-completed.yaml +0 -19
- package/testdata/parity/import-media-status-failed.yaml +0 -18
- package/testdata/parity/import-media-url-completed.yaml +0 -18
- package/testdata/parity/import-sql-bad-extension.yaml +0 -26
- package/testdata/parity/import-sql-help.yaml +0 -12
- package/testdata/parity/import-sql-in-progress.yaml +0 -26
- package/testdata/parity/import-sql-invalid-md5.yaml +0 -27
- package/testdata/parity/import-sql-noninteractive-abort.yaml +0 -20
- package/testdata/parity/import-sql-status-completed.yaml +0 -17
- package/testdata/parity/import-sql-status-no-job.yaml +0 -17
- package/testdata/parity/import-sql-validation-failure.yaml +0 -18
- package/testdata/parity/import-validate-files-clean.yaml +0 -18
- package/testdata/parity/import-validate-files-not-dir.yaml +0 -16
- package/testdata/parity/import-validate-sql-clean.yaml +0 -23
- package/testdata/parity/import-validate-sql-dangerous-stmt.yaml +0 -27
- package/testdata/parity/import-validate-sql-multisite-warn.yaml +0 -23
- package/testdata/parity/logs-baseline.yaml +0 -24
- package/testdata/parity/logs-batch.yaml +0 -24
- package/testdata/parity/logs-empty.yaml +0 -15
- package/testdata/parity/logs-format-json.yaml +0 -15
- package/testdata/parity/logs-limit-100.yaml +0 -24
- package/testdata/parity/phpmyadmin-error.yaml +0 -24
- package/testdata/parity/phpmyadmin-print.yaml +0 -22
- package/testdata/parity/phpmyadmin-silent.yaml +0 -16
- package/testdata/parity/recordings/app-get-baseline/app.json +0 -11
- package/testdata/parity/recordings/app-get-custom-deploy/app.json +0 -8
- package/testdata/parity/recordings/app-get-json/app.json +0 -11
- package/testdata/parity/recordings/app-get-not-found/app.json +0 -1
- package/testdata/parity/recordings/app-list-baseline/apps.json +0 -1
- package/testdata/parity/recordings/app-list-csv/apps.json +0 -1
- package/testdata/parity/recordings/app-list-empty/apps.json +0 -1
- package/testdata/parity/recordings/app-list-json/apps.json +0 -1
- package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-1.json +0 -1
- package/testdata/parity/recordings/backup-db-already-in-progress/backup-status-2.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-1.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-2.json +0 -1
- package/testdata/parity/recordings/backup-db-completed/backup-status-3.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-from-file/urls.txt +0 -2
- package/testdata/parity/recordings/cache-purge-url-multi/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-multi/resolve-app.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-single/purge.json +0 -1
- package/testdata/parity/recordings/cache-purge-url-single/resolve-app.json +0 -1
- package/testdata/parity/recordings/config-software-get/resolve-app.json +0 -1
- package/testdata/parity/recordings/config-software-update/resolve-app.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-elevated.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/mutation-success.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-create-session.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-exchange.json +0 -1
- package/testdata/parity/recordings/defensive-mode-enable-rechallenge/parker-status-verified.json +0 -1
- package/testdata/parity/recordings/envvar-delete-baseline/delete.json +0 -1
- package/testdata/parity/recordings/envvar-delete-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-delete-prod-cancel/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-delete-typed-mismatch/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-lowercase-input/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-lowercase-input/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-named-help/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-named-help/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-get-not-found/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-get-not-found/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-empty/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-getall-keyvalue/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-getall-keyvalue/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-baseline/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-empty/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-ids/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-ids/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-json/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-json/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-list-keyvalue/envvars.json +0 -1
- package/testdata/parity/recordings/envvar-list-keyvalue/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/add.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-baseline/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-invalid-name/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-invalid-name/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-newrelic-blocked/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-newrelic-blocked/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-prod-cancel/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-cancel/value.txt +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/add.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/resolve-app.json +0 -1
- package/testdata/parity/recordings/envvar-set-prod-confirm-skipped/value.txt +0 -1
- package/testdata/parity/recordings/export-sql-completed/export-status-1.json +0 -1
- package/testdata/parity/recordings/export-sql-completed/export-status-2.json +0 -1
- package/testdata/parity/recordings/import-media-invalid-archive/file.sql +0 -1
- package/testdata/parity/recordings/import-media-shared/abort-media-import.json +0 -1
- package/testdata/parity/recordings/import-media-shared/env-info.json +0 -1
- package/testdata/parity/recordings/import-media-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-media-shared/start-media-import.json +0 -1
- package/testdata/parity/recordings/import-media-status-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-media-status-failed/progress.json +0 -1
- package/testdata/parity/recordings/import-media-url-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-bad-extension/file.txt +0 -1
- package/testdata/parity/recordings/import-sql-in-progress/env-info.json +0 -1
- package/testdata/parity/recordings/import-sql-in-progress/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-sql-noninteractive-abort/clean.sql +0 -5
- package/testdata/parity/recordings/import-sql-shared/env-info.json +0 -1
- package/testdata/parity/recordings/import-sql-shared/multisite.json +0 -1
- package/testdata/parity/recordings/import-sql-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/import-sql-status-completed/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-status-no-job/progress.json +0 -1
- package/testdata/parity/recordings/import-sql-validation-failure/dirty.sql +0 -6
- package/testdata/parity/recordings/import-validate-files-clean/config.json +0 -1
- package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/a.jpg +0 -1
- package/testdata/parity/recordings/import-validate-files-clean/uploads/2020/06/b.png +0 -1
- package/testdata/parity/recordings/import-validate-sql-clean/clean.sql +0 -17
- package/testdata/parity/recordings/import-validate-sql-dangerous-stmt/dangerous.sql +0 -11
- package/testdata/parity/recordings/import-validate-sql-multisite-warn/multisite.sql +0 -12
- package/testdata/parity/recordings/logs-baseline/logs.json +0 -1
- package/testdata/parity/recordings/logs-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-batch/logs.json +0 -1
- package/testdata/parity/recordings/logs-batch/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-empty/logs.json +0 -1
- package/testdata/parity/recordings/logs-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-format-json/logs.json +0 -1
- package/testdata/parity/recordings/logs-format-json/resolve-app.json +0 -1
- package/testdata/parity/recordings/logs-limit-100/logs.json +0 -1
- package/testdata/parity/recordings/logs-limit-100/resolve-app.json +0 -1
- package/testdata/parity/recordings/m7c-shared/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-error/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-error/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/generate.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-print/status.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/enable.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/generate.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/resolve-app.json +0 -1
- package/testdata/parity/recordings/phpmyadmin-silent/status.json +0 -1
- package/testdata/parity/recordings/slowlogs-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-baseline/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-csv/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-csv/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-empty/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-empty/slowlogs.json +0 -1
- package/testdata/parity/recordings/slowlogs-limit-50/resolve-app.json +0 -1
- package/testdata/parity/recordings/slowlogs-limit-50/slowlogs.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/resolve-app.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-start.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-status-1.json +0 -1
- package/testdata/parity/recordings/sync-already-syncing/sync-status-2.json +0 -1
- package/testdata/parity/recordings/sync-baseline/resolve-app.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-start.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-status-1.json +0 -1
- package/testdata/parity/recordings/sync-baseline/sync-status-2.json +0 -1
- package/testdata/parity/recordings/whoami-baseline/me-response.json +0 -1
- package/testdata/parity/recordings/wp-nodejs-rejected/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-production-confirm-decline/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-ssh-happy/resolve-app.json +0 -1
- package/testdata/parity/recordings/wp-websocket-redirect/resolve-app.json +0 -1
- package/testdata/parity/slowlogs-baseline.yaml +0 -18
- package/testdata/parity/slowlogs-csv.yaml +0 -16
- package/testdata/parity/slowlogs-empty.yaml +0 -17
- package/testdata/parity/slowlogs-limit-50.yaml +0 -16
- package/testdata/parity/sync-already-syncing.yaml +0 -20
- package/testdata/parity/sync-baseline.yaml +0 -19
- package/testdata/parity/version-smoke.yaml +0 -14
- package/testdata/parity/whoami-baseline.yaml +0 -14
- package/testdata/parity/wp-help.yaml +0 -12
- package/testdata/parity/wp-nodejs-rejected.yaml +0 -13
- package/testdata/parity/wp-production-confirm-decline.yaml +0 -14
- package/testdata/parity/wp-ssh-happy.yaml +0 -15
- package/testdata/parity/wp-websocket-redirect.yaml +0 -14
- package/testdata/parity-local/app-get-csv.yaml +0 -8
- package/testdata/parity-local/app-get-json.yaml +0 -8
- package/testdata/parity-local/app-get-table.yaml +0 -8
- package/testdata/parity-local/app-list-csv.yaml +0 -8
- package/testdata/parity-local/app-list-json.yaml +0 -8
- package/testdata/parity-local/app-list-table.yaml +0 -8
- package/testdata/parity-local/edge-workers/basic/edge-workers.json +0 -1
- package/testdata/parity-local/edge-workers/basic/workers/headers/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/basic/workers/headers/worker.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/edge-workers.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/a/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/a/worker.json +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/b/assembly/index.ts +0 -1
- package/testdata/parity-local/edge-workers/two-workers/workers/b/worker.json +0 -1
- package/testdata/parity-local/envvar-list-csv.yaml +0 -8
- package/testdata/parity-local/envvar-list-ids.yaml +0 -8
- package/testdata/parity-local/envvar-list-json.yaml +0 -8
- package/testdata/parity-local/envvar-list-keyvalue.yaml +0 -8
- package/testdata/parity-local/envvar-list-table.yaml +0 -8
- package/testdata/parity-local/software-get-csv.yaml +0 -8
- package/testdata/parity-local/software-get-json.yaml +0 -8
- package/testdata/parity-local/software-get-table.yaml +0 -8
- package/testdata/parity-local/whoami.yaml +0 -8
- package/testdata/update-fixture/main.go +0 -62
- package/third_party/go-search-replace/MANIFEST +0 -33
- package/tsconfig.json +0 -25
- /package/node_modules/lando/node_modules/{wrap-ansi → ansi-regex}/license +0 -0
|
@@ -1,1803 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
|
|
3
|
-
const common = require('./common')
|
|
4
|
-
const YAMLException = require('./exception')
|
|
5
|
-
const makeSnippet = require('./snippet')
|
|
6
|
-
const DEFAULT_SCHEMA = require('./schema/default')
|
|
7
|
-
|
|
8
|
-
const _hasOwnProperty = Object.prototype.hasOwnProperty
|
|
9
|
-
|
|
10
|
-
const CONTEXT_FLOW_IN = 1
|
|
11
|
-
const CONTEXT_FLOW_OUT = 2
|
|
12
|
-
const CONTEXT_BLOCK_IN = 3
|
|
13
|
-
const CONTEXT_BLOCK_OUT = 4
|
|
14
|
-
|
|
15
|
-
const CHOMPING_CLIP = 1
|
|
16
|
-
const CHOMPING_STRIP = 2
|
|
17
|
-
const CHOMPING_KEEP = 3
|
|
18
|
-
|
|
19
|
-
// eslint-disable-next-line no-control-regex
|
|
20
|
-
const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/
|
|
21
|
-
const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/
|
|
22
|
-
// eslint-disable-next-line no-useless-escape
|
|
23
|
-
const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/
|
|
24
|
-
// eslint-disable-next-line no-useless-escape
|
|
25
|
-
const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/
|
|
26
|
-
// eslint-disable-next-line no-useless-escape
|
|
27
|
-
const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i
|
|
28
|
-
|
|
29
|
-
function _class (obj) { return Object.prototype.toString.call(obj) }
|
|
30
|
-
|
|
31
|
-
function isEol (c) {
|
|
32
|
-
return (c === 0x0A/* LF */) || (c === 0x0D/* CR */)
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function isWhiteSpace (c) {
|
|
36
|
-
return (c === 0x09/* Tab */) || (c === 0x20/* Space */)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
function isWsOrEol (c) {
|
|
40
|
-
return (c === 0x09/* Tab */) ||
|
|
41
|
-
(c === 0x20/* Space */) ||
|
|
42
|
-
(c === 0x0A/* LF */) ||
|
|
43
|
-
(c === 0x0D/* CR */)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function isFlowIndicator (c) {
|
|
47
|
-
return c === 0x2C/* , */ ||
|
|
48
|
-
c === 0x5B/* [ */ ||
|
|
49
|
-
c === 0x5D/* ] */ ||
|
|
50
|
-
c === 0x7B/* { */ ||
|
|
51
|
-
c === 0x7D/* } */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function fromHexCode (c) {
|
|
55
|
-
if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) {
|
|
56
|
-
return c - 0x30
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const lc = c | 0x20
|
|
60
|
-
|
|
61
|
-
if ((lc >= 0x61/* a */) && (lc <= 0x66/* f */)) {
|
|
62
|
-
return lc - 0x61 + 10
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return -1
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
function escapedHexLen (c) {
|
|
69
|
-
if (c === 0x78/* x */) { return 2 }
|
|
70
|
-
if (c === 0x75/* u */) { return 4 }
|
|
71
|
-
if (c === 0x55/* U */) { return 8 }
|
|
72
|
-
return 0
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
function fromDecimalCode (c) {
|
|
76
|
-
if ((c >= 0x30/* 0 */) && (c <= 0x39/* 9 */)) {
|
|
77
|
-
return c - 0x30
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
return -1
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function simpleEscapeSequence (c) {
|
|
84
|
-
switch (c) {
|
|
85
|
-
case 0x30/* 0 */: return '\x00'
|
|
86
|
-
case 0x61/* a */: return '\x07'
|
|
87
|
-
case 0x62/* b */: return '\x08'
|
|
88
|
-
case 0x74/* t */: return '\x09'
|
|
89
|
-
case 0x09/* Tab */: return '\x09'
|
|
90
|
-
case 0x6E/* n */: return '\x0A'
|
|
91
|
-
case 0x76/* v */: return '\x0B'
|
|
92
|
-
case 0x66/* f */: return '\x0C'
|
|
93
|
-
case 0x72/* r */: return '\x0D'
|
|
94
|
-
case 0x65/* e */: return '\x1B'
|
|
95
|
-
case 0x20/* Space */: return ' '
|
|
96
|
-
case 0x22/* " */: return '\x22'
|
|
97
|
-
case 0x2F/* / */: return '/'
|
|
98
|
-
case 0x5C/* \ */: return '\x5C'
|
|
99
|
-
case 0x4E/* N */: return '\x85'
|
|
100
|
-
case 0x5F/* _ */: return '\xA0'
|
|
101
|
-
case 0x4C/* L */: return '\u2028'
|
|
102
|
-
case 0x50/* P */: return '\u2029'
|
|
103
|
-
default: return ''
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
function charFromCodepoint (c) {
|
|
108
|
-
if (c <= 0xFFFF) {
|
|
109
|
-
return String.fromCharCode(c)
|
|
110
|
-
}
|
|
111
|
-
// Encode UTF-16 surrogate pair
|
|
112
|
-
// https://en.wikipedia.org/wiki/UTF-16#Code_points_U.2B010000_to_U.2B10FFFF
|
|
113
|
-
return String.fromCharCode(
|
|
114
|
-
((c - 0x010000) >> 10) + 0xD800,
|
|
115
|
-
((c - 0x010000) & 0x03FF) + 0xDC00
|
|
116
|
-
)
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// set a property of a literal object, while protecting against prototype pollution,
|
|
120
|
-
// see https://github.com/nodeca/js-yaml/issues/164 for more details
|
|
121
|
-
function setProperty (object, key, value) {
|
|
122
|
-
// used for this specific key only because Object.defineProperty is slow
|
|
123
|
-
if (key === '__proto__') {
|
|
124
|
-
Object.defineProperty(object, key, {
|
|
125
|
-
configurable: true,
|
|
126
|
-
enumerable: true,
|
|
127
|
-
writable: true,
|
|
128
|
-
value: value
|
|
129
|
-
})
|
|
130
|
-
} else {
|
|
131
|
-
object[key] = value
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
const simpleEscapeCheck = new Array(256) // integer, for fast access
|
|
136
|
-
const simpleEscapeMap = new Array(256)
|
|
137
|
-
for (let i = 0; i < 256; i++) {
|
|
138
|
-
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0
|
|
139
|
-
simpleEscapeMap[i] = simpleEscapeSequence(i)
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
function State (input, options) {
|
|
143
|
-
this.input = input
|
|
144
|
-
|
|
145
|
-
this.filename = options['filename'] || null
|
|
146
|
-
this.schema = options['schema'] || DEFAULT_SCHEMA
|
|
147
|
-
this.onWarning = options['onWarning'] || null
|
|
148
|
-
// (Hidden) Remove? makes the loader to expect YAML 1.1 documents
|
|
149
|
-
// if such documents have no explicit %YAML directive
|
|
150
|
-
this.legacy = options['legacy'] || false
|
|
151
|
-
|
|
152
|
-
this.json = options['json'] || false
|
|
153
|
-
this.listener = options['listener'] || null
|
|
154
|
-
this.maxDepth = typeof options['maxDepth'] === 'number' ? options['maxDepth'] : 100
|
|
155
|
-
this.maxTotalMergeKeys = typeof options['maxTotalMergeKeys'] === 'number' ? options['maxTotalMergeKeys'] : 10000
|
|
156
|
-
|
|
157
|
-
this.implicitTypes = this.schema.compiledImplicit
|
|
158
|
-
this.typeMap = this.schema.compiledTypeMap
|
|
159
|
-
|
|
160
|
-
this.length = input.length
|
|
161
|
-
this.position = 0
|
|
162
|
-
this.line = 0
|
|
163
|
-
this.lineStart = 0
|
|
164
|
-
this.lineIndent = 0
|
|
165
|
-
this.depth = 0
|
|
166
|
-
this.totalMergeKeys = 0
|
|
167
|
-
|
|
168
|
-
// position of first leading tab in the current line,
|
|
169
|
-
// used to make sure there are no tabs in the indentation
|
|
170
|
-
this.firstTabInLine = -1
|
|
171
|
-
|
|
172
|
-
this.documents = []
|
|
173
|
-
this.anchorMapTransactions = []
|
|
174
|
-
|
|
175
|
-
/*
|
|
176
|
-
this.version;
|
|
177
|
-
this.checkLineBreaks;
|
|
178
|
-
this.tagMap;
|
|
179
|
-
this.anchorMap;
|
|
180
|
-
this.tag;
|
|
181
|
-
this.anchor;
|
|
182
|
-
this.kind;
|
|
183
|
-
this.result; */
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
function generateError (state, message) {
|
|
187
|
-
const mark = {
|
|
188
|
-
name: state.filename,
|
|
189
|
-
buffer: state.input.slice(0, -1), // omit trailing \0
|
|
190
|
-
position: state.position,
|
|
191
|
-
line: state.line,
|
|
192
|
-
column: state.position - state.lineStart
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
mark.snippet = makeSnippet(mark)
|
|
196
|
-
|
|
197
|
-
return new YAMLException(message, mark)
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function throwError (state, message) {
|
|
201
|
-
throw generateError(state, message)
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
function throwWarning (state, message) {
|
|
205
|
-
if (state.onWarning) {
|
|
206
|
-
state.onWarning.call(null, generateError(state, message))
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
function storeAnchor (state, name, value) {
|
|
211
|
-
const transactions = state.anchorMapTransactions
|
|
212
|
-
|
|
213
|
-
if (transactions.length !== 0) {
|
|
214
|
-
const transaction = transactions[transactions.length - 1]
|
|
215
|
-
|
|
216
|
-
if (!_hasOwnProperty.call(transaction, name)) {
|
|
217
|
-
transaction[name] = {
|
|
218
|
-
existed: _hasOwnProperty.call(state.anchorMap, name),
|
|
219
|
-
value: state.anchorMap[name]
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
state.anchorMap[name] = value
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function beginAnchorTransaction (state) {
|
|
228
|
-
state.anchorMapTransactions.push(Object.create(null))
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
function commitAnchorTransaction (state) {
|
|
232
|
-
const transaction = state.anchorMapTransactions.pop()
|
|
233
|
-
const transactions = state.anchorMapTransactions
|
|
234
|
-
|
|
235
|
-
if (transactions.length === 0) return
|
|
236
|
-
|
|
237
|
-
const parent = transactions[transactions.length - 1]
|
|
238
|
-
const names = Object.keys(transaction)
|
|
239
|
-
|
|
240
|
-
for (let index = 0, length = names.length; index < length; index += 1) {
|
|
241
|
-
const name = names[index]
|
|
242
|
-
|
|
243
|
-
if (!_hasOwnProperty.call(parent, name)) {
|
|
244
|
-
parent[name] = transaction[name]
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function rollbackAnchorTransaction (state) {
|
|
250
|
-
const transaction = state.anchorMapTransactions.pop()
|
|
251
|
-
const names = Object.keys(transaction)
|
|
252
|
-
|
|
253
|
-
for (let index = names.length - 1; index >= 0; index -= 1) {
|
|
254
|
-
const entry = transaction[names[index]]
|
|
255
|
-
|
|
256
|
-
if (entry.existed) {
|
|
257
|
-
state.anchorMap[names[index]] = entry.value
|
|
258
|
-
} else {
|
|
259
|
-
delete state.anchorMap[names[index]]
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
function snapshotState (state) {
|
|
265
|
-
return {
|
|
266
|
-
position: state.position,
|
|
267
|
-
line: state.line,
|
|
268
|
-
lineStart: state.lineStart,
|
|
269
|
-
lineIndent: state.lineIndent,
|
|
270
|
-
firstTabInLine: state.firstTabInLine,
|
|
271
|
-
tag: state.tag,
|
|
272
|
-
anchor: state.anchor,
|
|
273
|
-
kind: state.kind,
|
|
274
|
-
result: state.result
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
function restoreState (state, snapshot) {
|
|
279
|
-
state.position = snapshot.position
|
|
280
|
-
state.line = snapshot.line
|
|
281
|
-
state.lineStart = snapshot.lineStart
|
|
282
|
-
state.lineIndent = snapshot.lineIndent
|
|
283
|
-
state.firstTabInLine = snapshot.firstTabInLine
|
|
284
|
-
state.tag = snapshot.tag
|
|
285
|
-
state.anchor = snapshot.anchor
|
|
286
|
-
state.kind = snapshot.kind
|
|
287
|
-
state.result = snapshot.result
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
const directiveHandlers = {
|
|
291
|
-
|
|
292
|
-
YAML: function handleYamlDirective (state, name, args) {
|
|
293
|
-
if (state.version !== null) {
|
|
294
|
-
throwError(state, 'duplication of %YAML directive')
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (args.length !== 1) {
|
|
298
|
-
throwError(state, 'YAML directive accepts exactly one argument')
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0])
|
|
302
|
-
|
|
303
|
-
if (match === null) {
|
|
304
|
-
throwError(state, 'ill-formed argument of the YAML directive')
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
const major = parseInt(match[1], 10)
|
|
308
|
-
const minor = parseInt(match[2], 10)
|
|
309
|
-
|
|
310
|
-
if (major !== 1) {
|
|
311
|
-
throwError(state, 'unacceptable YAML version of the document')
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
state.version = args[0]
|
|
315
|
-
state.checkLineBreaks = (minor < 2)
|
|
316
|
-
|
|
317
|
-
if (minor !== 1 && minor !== 2) {
|
|
318
|
-
throwWarning(state, 'unsupported YAML version of the document')
|
|
319
|
-
}
|
|
320
|
-
},
|
|
321
|
-
|
|
322
|
-
TAG: function handleTagDirective (state, name, args) {
|
|
323
|
-
let prefix
|
|
324
|
-
|
|
325
|
-
if (args.length !== 2) {
|
|
326
|
-
throwError(state, 'TAG directive accepts exactly two arguments')
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
const handle = args[0]
|
|
330
|
-
prefix = args[1]
|
|
331
|
-
|
|
332
|
-
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
333
|
-
throwError(state, 'ill-formed tag handle (first argument) of the TAG directive')
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
if (_hasOwnProperty.call(state.tagMap, handle)) {
|
|
337
|
-
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle')
|
|
338
|
-
}
|
|
339
|
-
|
|
340
|
-
if (!PATTERN_TAG_URI.test(prefix)) {
|
|
341
|
-
throwError(state, 'ill-formed tag prefix (second argument) of the TAG directive')
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
try {
|
|
345
|
-
prefix = decodeURIComponent(prefix)
|
|
346
|
-
} catch (err) {
|
|
347
|
-
throwError(state, 'tag prefix is malformed: ' + prefix)
|
|
348
|
-
}
|
|
349
|
-
|
|
350
|
-
state.tagMap[handle] = prefix
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
function captureSegment (state, start, end, checkJson) {
|
|
355
|
-
if (start < end) {
|
|
356
|
-
const _result = state.input.slice(start, end)
|
|
357
|
-
|
|
358
|
-
if (checkJson) {
|
|
359
|
-
for (let _position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
360
|
-
const _character = _result.charCodeAt(_position)
|
|
361
|
-
if (!(_character === 0x09 ||
|
|
362
|
-
(_character >= 0x20 && _character <= 0x10FFFF))) {
|
|
363
|
-
throwError(state, 'expected valid JSON character')
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
} else if (PATTERN_NON_PRINTABLE.test(_result)) {
|
|
367
|
-
throwError(state, 'the stream contains non-printable characters')
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
state.result += _result
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
function chargeMergeWork (state) {
|
|
375
|
-
state.totalMergeKeys++
|
|
376
|
-
|
|
377
|
-
if (state.maxTotalMergeKeys !== -1 && state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
378
|
-
throwError(state, 'merge keys exceeded maxTotalMergeKeys (' + state.maxTotalMergeKeys + ')')
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
function mergeMappings (state, destination, source, overridableKeys) {
|
|
383
|
-
if (!common.isObject(source)) {
|
|
384
|
-
throwError(state, 'cannot merge mappings; the provided source object is unacceptable')
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
// Count the source mapping itself to bound sequences of empty mappings.
|
|
388
|
-
chargeMergeWork(state)
|
|
389
|
-
|
|
390
|
-
const sourceKeys = Object.keys(source)
|
|
391
|
-
|
|
392
|
-
for (let index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
393
|
-
const key = sourceKeys[index]
|
|
394
|
-
|
|
395
|
-
chargeMergeWork(state)
|
|
396
|
-
|
|
397
|
-
if (!_hasOwnProperty.call(destination, key)) {
|
|
398
|
-
setProperty(destination, key, source[key])
|
|
399
|
-
overridableKeys[key] = true
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
|
|
404
|
-
function storeMappingPair (state, _result, overridableKeys, keyTag, keyNode, valueNode,
|
|
405
|
-
startLine, startLineStart, startPos) {
|
|
406
|
-
// The output is a plain object here, so keys can only be strings.
|
|
407
|
-
// We need to convert keyNode to a string, but doing so can hang the process
|
|
408
|
-
// (deeply nested arrays that explode exponentially using aliases).
|
|
409
|
-
if (Array.isArray(keyNode)) {
|
|
410
|
-
keyNode = Array.prototype.slice.call(keyNode)
|
|
411
|
-
|
|
412
|
-
for (let index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
413
|
-
if (Array.isArray(keyNode[index])) {
|
|
414
|
-
throwError(state, 'nested arrays are not supported inside keys')
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
if (typeof keyNode === 'object' && _class(keyNode[index]) === '[object Object]') {
|
|
418
|
-
keyNode[index] = '[object Object]'
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
// Avoid code execution in load() via toString property
|
|
424
|
-
// (still use its own toString for arrays, timestamps,
|
|
425
|
-
// and whatever user schema extensions happen to have @@toStringTag)
|
|
426
|
-
if (typeof keyNode === 'object' && _class(keyNode) === '[object Object]') {
|
|
427
|
-
keyNode = '[object Object]'
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
keyNode = String(keyNode)
|
|
431
|
-
|
|
432
|
-
if (_result === null) {
|
|
433
|
-
_result = {}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
if (keyTag === 'tag:yaml.org,2002:merge') {
|
|
437
|
-
if (Array.isArray(valueNode)) {
|
|
438
|
-
if (valueNode.length > 100) {
|
|
439
|
-
throwError(state, 'abnormal merge sequence size')
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
for (let index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
443
|
-
mergeMappings(state, _result, valueNode[index], overridableKeys)
|
|
444
|
-
}
|
|
445
|
-
} else {
|
|
446
|
-
mergeMappings(state, _result, valueNode, overridableKeys)
|
|
447
|
-
}
|
|
448
|
-
} else {
|
|
449
|
-
if (!state.json &&
|
|
450
|
-
!_hasOwnProperty.call(overridableKeys, keyNode) &&
|
|
451
|
-
_hasOwnProperty.call(_result, keyNode)) {
|
|
452
|
-
state.line = startLine || state.line
|
|
453
|
-
state.lineStart = startLineStart || state.lineStart
|
|
454
|
-
state.position = startPos || state.position
|
|
455
|
-
throwError(state, 'duplicated mapping key')
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
setProperty(_result, keyNode, valueNode)
|
|
459
|
-
delete overridableKeys[keyNode]
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
return _result
|
|
463
|
-
}
|
|
464
|
-
|
|
465
|
-
function readLineBreak (state) {
|
|
466
|
-
const ch = state.input.charCodeAt(state.position)
|
|
467
|
-
|
|
468
|
-
if (ch === 0x0A/* LF */) {
|
|
469
|
-
state.position++
|
|
470
|
-
} else if (ch === 0x0D/* CR */) {
|
|
471
|
-
state.position++
|
|
472
|
-
if (state.input.charCodeAt(state.position) === 0x0A/* LF */) {
|
|
473
|
-
state.position++
|
|
474
|
-
}
|
|
475
|
-
} else {
|
|
476
|
-
throwError(state, 'a line break is expected')
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
state.line += 1
|
|
480
|
-
state.lineStart = state.position
|
|
481
|
-
state.firstTabInLine = -1
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
function skipSeparationSpace (state, allowComments, checkIndent) {
|
|
485
|
-
let lineBreaks = 0
|
|
486
|
-
let ch = state.input.charCodeAt(state.position)
|
|
487
|
-
|
|
488
|
-
while (ch !== 0) {
|
|
489
|
-
while (isWhiteSpace(ch)) {
|
|
490
|
-
if (ch === 0x09/* Tab */ && state.firstTabInLine === -1) {
|
|
491
|
-
state.firstTabInLine = state.position
|
|
492
|
-
}
|
|
493
|
-
ch = state.input.charCodeAt(++state.position)
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
if (allowComments && ch === 0x23/* # */) {
|
|
497
|
-
do {
|
|
498
|
-
ch = state.input.charCodeAt(++state.position)
|
|
499
|
-
} while (ch !== 0x0A/* LF */ && ch !== 0x0D/* CR */ && ch !== 0)
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
if (isEol(ch)) {
|
|
503
|
-
readLineBreak(state)
|
|
504
|
-
|
|
505
|
-
ch = state.input.charCodeAt(state.position)
|
|
506
|
-
lineBreaks++
|
|
507
|
-
state.lineIndent = 0
|
|
508
|
-
|
|
509
|
-
while (ch === 0x20/* Space */) {
|
|
510
|
-
state.lineIndent++
|
|
511
|
-
ch = state.input.charCodeAt(++state.position)
|
|
512
|
-
}
|
|
513
|
-
} else {
|
|
514
|
-
break
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
|
|
519
|
-
throwWarning(state, 'deficient indentation')
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
return lineBreaks
|
|
523
|
-
}
|
|
524
|
-
|
|
525
|
-
function testDocumentSeparator (state) {
|
|
526
|
-
let _position = state.position
|
|
527
|
-
let ch = state.input.charCodeAt(_position)
|
|
528
|
-
|
|
529
|
-
// Condition state.position === state.lineStart is tested
|
|
530
|
-
// in parent on each call, for efficiency. No needs to test here again.
|
|
531
|
-
if ((ch === 0x2D/* - */ || ch === 0x2E/* . */) &&
|
|
532
|
-
ch === state.input.charCodeAt(_position + 1) &&
|
|
533
|
-
ch === state.input.charCodeAt(_position + 2)) {
|
|
534
|
-
_position += 3
|
|
535
|
-
|
|
536
|
-
ch = state.input.charCodeAt(_position)
|
|
537
|
-
|
|
538
|
-
if (ch === 0 || isWsOrEol(ch)) {
|
|
539
|
-
return true
|
|
540
|
-
}
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
return false
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
function writeFoldedLines (state, count) {
|
|
547
|
-
if (count === 1) {
|
|
548
|
-
state.result += ' '
|
|
549
|
-
} else if (count > 1) {
|
|
550
|
-
state.result += common.repeat('\n', count - 1)
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
function readPlainScalar (state, nodeIndent, withinFlowCollection) {
|
|
555
|
-
let captureStart
|
|
556
|
-
let captureEnd
|
|
557
|
-
let hasPendingContent
|
|
558
|
-
let _line
|
|
559
|
-
let _lineStart
|
|
560
|
-
let _lineIndent
|
|
561
|
-
const _kind = state.kind
|
|
562
|
-
const _result = state.result
|
|
563
|
-
|
|
564
|
-
let ch = state.input.charCodeAt(state.position)
|
|
565
|
-
|
|
566
|
-
if (isWsOrEol(ch) ||
|
|
567
|
-
isFlowIndicator(ch) ||
|
|
568
|
-
ch === 0x23/* # */ ||
|
|
569
|
-
ch === 0x26/* & */ ||
|
|
570
|
-
ch === 0x2A/* * */ ||
|
|
571
|
-
ch === 0x21/* ! */ ||
|
|
572
|
-
ch === 0x7C/* | */ ||
|
|
573
|
-
ch === 0x3E/* > */ ||
|
|
574
|
-
ch === 0x27/* ' */ ||
|
|
575
|
-
ch === 0x22/* " */ ||
|
|
576
|
-
ch === 0x25/* % */ ||
|
|
577
|
-
ch === 0x40/* @ */ ||
|
|
578
|
-
ch === 0x60/* ` */) {
|
|
579
|
-
return false
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
if (ch === 0x3F/* ? */ || ch === 0x2D/* - */) {
|
|
583
|
-
const following = state.input.charCodeAt(state.position + 1)
|
|
584
|
-
|
|
585
|
-
if (isWsOrEol(following) ||
|
|
586
|
-
(withinFlowCollection && isFlowIndicator(following))) {
|
|
587
|
-
return false
|
|
588
|
-
}
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
state.kind = 'scalar'
|
|
592
|
-
state.result = ''
|
|
593
|
-
captureStart = captureEnd = state.position
|
|
594
|
-
hasPendingContent = false
|
|
595
|
-
|
|
596
|
-
while (ch !== 0) {
|
|
597
|
-
if (ch === 0x3A/* : */) {
|
|
598
|
-
const following = state.input.charCodeAt(state.position + 1)
|
|
599
|
-
|
|
600
|
-
if (isWsOrEol(following) ||
|
|
601
|
-
(withinFlowCollection && isFlowIndicator(following))) {
|
|
602
|
-
break
|
|
603
|
-
}
|
|
604
|
-
} else if (ch === 0x23/* # */) {
|
|
605
|
-
const preceding = state.input.charCodeAt(state.position - 1)
|
|
606
|
-
|
|
607
|
-
if (isWsOrEol(preceding)) {
|
|
608
|
-
break
|
|
609
|
-
}
|
|
610
|
-
} else if ((state.position === state.lineStart && testDocumentSeparator(state)) ||
|
|
611
|
-
(withinFlowCollection && isFlowIndicator(ch))) {
|
|
612
|
-
break
|
|
613
|
-
} else if (isEol(ch)) {
|
|
614
|
-
_line = state.line
|
|
615
|
-
_lineStart = state.lineStart
|
|
616
|
-
_lineIndent = state.lineIndent
|
|
617
|
-
skipSeparationSpace(state, false, -1)
|
|
618
|
-
|
|
619
|
-
if (state.lineIndent >= nodeIndent) {
|
|
620
|
-
hasPendingContent = true
|
|
621
|
-
ch = state.input.charCodeAt(state.position)
|
|
622
|
-
continue
|
|
623
|
-
} else {
|
|
624
|
-
state.position = captureEnd
|
|
625
|
-
state.line = _line
|
|
626
|
-
state.lineStart = _lineStart
|
|
627
|
-
state.lineIndent = _lineIndent
|
|
628
|
-
break
|
|
629
|
-
}
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
if (hasPendingContent) {
|
|
633
|
-
captureSegment(state, captureStart, captureEnd, false)
|
|
634
|
-
writeFoldedLines(state, state.line - _line)
|
|
635
|
-
captureStart = captureEnd = state.position
|
|
636
|
-
hasPendingContent = false
|
|
637
|
-
}
|
|
638
|
-
|
|
639
|
-
if (!isWhiteSpace(ch)) {
|
|
640
|
-
captureEnd = state.position + 1
|
|
641
|
-
}
|
|
642
|
-
|
|
643
|
-
ch = state.input.charCodeAt(++state.position)
|
|
644
|
-
}
|
|
645
|
-
|
|
646
|
-
captureSegment(state, captureStart, captureEnd, false)
|
|
647
|
-
|
|
648
|
-
if (state.result) {
|
|
649
|
-
return true
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
state.kind = _kind
|
|
653
|
-
state.result = _result
|
|
654
|
-
return false
|
|
655
|
-
}
|
|
656
|
-
|
|
657
|
-
function readSingleQuotedScalar (state, nodeIndent) {
|
|
658
|
-
let captureStart
|
|
659
|
-
let captureEnd
|
|
660
|
-
|
|
661
|
-
let ch = state.input.charCodeAt(state.position)
|
|
662
|
-
|
|
663
|
-
if (ch !== 0x27/* ' */) {
|
|
664
|
-
return false
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
state.kind = 'scalar'
|
|
668
|
-
state.result = ''
|
|
669
|
-
state.position++
|
|
670
|
-
captureStart = captureEnd = state.position
|
|
671
|
-
|
|
672
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
673
|
-
if (ch === 0x27/* ' */) {
|
|
674
|
-
captureSegment(state, captureStart, state.position, true)
|
|
675
|
-
ch = state.input.charCodeAt(++state.position)
|
|
676
|
-
|
|
677
|
-
if (ch === 0x27/* ' */) {
|
|
678
|
-
captureStart = state.position
|
|
679
|
-
state.position++
|
|
680
|
-
captureEnd = state.position
|
|
681
|
-
} else {
|
|
682
|
-
return true
|
|
683
|
-
}
|
|
684
|
-
} else if (isEol(ch)) {
|
|
685
|
-
captureSegment(state, captureStart, captureEnd, true)
|
|
686
|
-
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent))
|
|
687
|
-
captureStart = captureEnd = state.position
|
|
688
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
689
|
-
throwError(state, 'unexpected end of the document within a single quoted scalar')
|
|
690
|
-
} else {
|
|
691
|
-
state.position++
|
|
692
|
-
if (!isWhiteSpace(ch)) {
|
|
693
|
-
captureEnd = state.position
|
|
694
|
-
}
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
throwError(state, 'unexpected end of the stream within a single quoted scalar')
|
|
699
|
-
}
|
|
700
|
-
|
|
701
|
-
function readDoubleQuotedScalar (state, nodeIndent) {
|
|
702
|
-
let captureStart
|
|
703
|
-
let captureEnd
|
|
704
|
-
let tmp
|
|
705
|
-
|
|
706
|
-
let ch = state.input.charCodeAt(state.position)
|
|
707
|
-
|
|
708
|
-
if (ch !== 0x22/* " */) {
|
|
709
|
-
return false
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
state.kind = 'scalar'
|
|
713
|
-
state.result = ''
|
|
714
|
-
state.position++
|
|
715
|
-
captureStart = captureEnd = state.position
|
|
716
|
-
|
|
717
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
718
|
-
if (ch === 0x22/* " */) {
|
|
719
|
-
captureSegment(state, captureStart, state.position, true)
|
|
720
|
-
state.position++
|
|
721
|
-
return true
|
|
722
|
-
} else if (ch === 0x5C/* \ */) {
|
|
723
|
-
captureSegment(state, captureStart, state.position, true)
|
|
724
|
-
ch = state.input.charCodeAt(++state.position)
|
|
725
|
-
|
|
726
|
-
if (isEol(ch)) {
|
|
727
|
-
skipSeparationSpace(state, false, nodeIndent)
|
|
728
|
-
|
|
729
|
-
// TODO: rework to inline fn with no type cast?
|
|
730
|
-
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
731
|
-
state.result += simpleEscapeMap[ch]
|
|
732
|
-
state.position++
|
|
733
|
-
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
734
|
-
let hexLength = tmp
|
|
735
|
-
let hexResult = 0
|
|
736
|
-
|
|
737
|
-
for (; hexLength > 0; hexLength--) {
|
|
738
|
-
ch = state.input.charCodeAt(++state.position)
|
|
739
|
-
|
|
740
|
-
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
741
|
-
hexResult = (hexResult << 4) + tmp
|
|
742
|
-
} else {
|
|
743
|
-
throwError(state, 'expected hexadecimal character')
|
|
744
|
-
}
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
state.result += charFromCodepoint(hexResult)
|
|
748
|
-
|
|
749
|
-
state.position++
|
|
750
|
-
} else {
|
|
751
|
-
throwError(state, 'unknown escape sequence')
|
|
752
|
-
}
|
|
753
|
-
|
|
754
|
-
captureStart = captureEnd = state.position
|
|
755
|
-
} else if (isEol(ch)) {
|
|
756
|
-
captureSegment(state, captureStart, captureEnd, true)
|
|
757
|
-
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent))
|
|
758
|
-
captureStart = captureEnd = state.position
|
|
759
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
760
|
-
throwError(state, 'unexpected end of the document within a double quoted scalar')
|
|
761
|
-
} else {
|
|
762
|
-
state.position++
|
|
763
|
-
if (!isWhiteSpace(ch)) {
|
|
764
|
-
captureEnd = state.position
|
|
765
|
-
}
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
throwError(state, 'unexpected end of the stream within a double quoted scalar')
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
function readFlowCollection (state, nodeIndent) {
|
|
773
|
-
let readNext = true
|
|
774
|
-
let _line
|
|
775
|
-
let _lineStart
|
|
776
|
-
let _pos
|
|
777
|
-
const _tag = state.tag
|
|
778
|
-
let _result
|
|
779
|
-
const _anchor = state.anchor
|
|
780
|
-
let terminator
|
|
781
|
-
let isPair
|
|
782
|
-
let isExplicitPair
|
|
783
|
-
let isMapping
|
|
784
|
-
const overridableKeys = Object.create(null)
|
|
785
|
-
let keyNode
|
|
786
|
-
let keyTag
|
|
787
|
-
let valueNode
|
|
788
|
-
|
|
789
|
-
let ch = state.input.charCodeAt(state.position)
|
|
790
|
-
|
|
791
|
-
if (ch === 0x5B/* [ */) {
|
|
792
|
-
terminator = 0x5D/* ] */
|
|
793
|
-
isMapping = false
|
|
794
|
-
_result = []
|
|
795
|
-
} else if (ch === 0x7B/* { */) {
|
|
796
|
-
terminator = 0x7D/* } */
|
|
797
|
-
isMapping = true
|
|
798
|
-
_result = {}
|
|
799
|
-
} else {
|
|
800
|
-
return false
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
if (state.anchor !== null) {
|
|
804
|
-
storeAnchor(state, state.anchor, _result)
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
ch = state.input.charCodeAt(++state.position)
|
|
808
|
-
|
|
809
|
-
while (ch !== 0) {
|
|
810
|
-
skipSeparationSpace(state, true, nodeIndent)
|
|
811
|
-
|
|
812
|
-
ch = state.input.charCodeAt(state.position)
|
|
813
|
-
|
|
814
|
-
if (ch === terminator) {
|
|
815
|
-
state.position++
|
|
816
|
-
state.tag = _tag
|
|
817
|
-
state.anchor = _anchor
|
|
818
|
-
state.kind = isMapping ? 'mapping' : 'sequence'
|
|
819
|
-
state.result = _result
|
|
820
|
-
return true
|
|
821
|
-
} else if (!readNext) {
|
|
822
|
-
throwError(state, 'missed comma between flow collection entries')
|
|
823
|
-
} else if (ch === 0x2C/* , */) {
|
|
824
|
-
// "flow collection entries can never be completely empty", as per YAML 1.2, section 7.4
|
|
825
|
-
throwError(state, "expected the node content, but found ','")
|
|
826
|
-
}
|
|
827
|
-
|
|
828
|
-
keyTag = keyNode = valueNode = null
|
|
829
|
-
isPair = isExplicitPair = false
|
|
830
|
-
|
|
831
|
-
if (ch === 0x3F/* ? */) {
|
|
832
|
-
const following = state.input.charCodeAt(state.position + 1)
|
|
833
|
-
|
|
834
|
-
if (isWsOrEol(following)) {
|
|
835
|
-
isPair = isExplicitPair = true
|
|
836
|
-
state.position++
|
|
837
|
-
skipSeparationSpace(state, true, nodeIndent)
|
|
838
|
-
}
|
|
839
|
-
}
|
|
840
|
-
|
|
841
|
-
_line = state.line // Save the current line.
|
|
842
|
-
_lineStart = state.lineStart
|
|
843
|
-
_pos = state.position
|
|
844
|
-
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)
|
|
845
|
-
keyTag = state.tag
|
|
846
|
-
keyNode = state.result
|
|
847
|
-
skipSeparationSpace(state, true, nodeIndent)
|
|
848
|
-
|
|
849
|
-
ch = state.input.charCodeAt(state.position)
|
|
850
|
-
|
|
851
|
-
if ((isExplicitPair || state.line === _line) && ch === 0x3A/* : */) {
|
|
852
|
-
isPair = true
|
|
853
|
-
ch = state.input.charCodeAt(++state.position)
|
|
854
|
-
skipSeparationSpace(state, true, nodeIndent)
|
|
855
|
-
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true)
|
|
856
|
-
valueNode = state.result
|
|
857
|
-
}
|
|
858
|
-
|
|
859
|
-
if (isMapping) {
|
|
860
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos)
|
|
861
|
-
} else if (isPair) {
|
|
862
|
-
_result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos))
|
|
863
|
-
} else {
|
|
864
|
-
_result.push(keyNode)
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
skipSeparationSpace(state, true, nodeIndent)
|
|
868
|
-
|
|
869
|
-
ch = state.input.charCodeAt(state.position)
|
|
870
|
-
|
|
871
|
-
if (ch === 0x2C/* , */) {
|
|
872
|
-
readNext = true
|
|
873
|
-
ch = state.input.charCodeAt(++state.position)
|
|
874
|
-
} else {
|
|
875
|
-
readNext = false
|
|
876
|
-
}
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
throwError(state, 'unexpected end of the stream within a flow collection')
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
function readBlockScalar (state, nodeIndent) {
|
|
883
|
-
let folding
|
|
884
|
-
let chomping = CHOMPING_CLIP
|
|
885
|
-
let didReadContent = false
|
|
886
|
-
let detectedIndent = false
|
|
887
|
-
let textIndent = nodeIndent
|
|
888
|
-
let emptyLines = 0
|
|
889
|
-
let atMoreIndented = false
|
|
890
|
-
let tmp
|
|
891
|
-
|
|
892
|
-
let ch = state.input.charCodeAt(state.position)
|
|
893
|
-
|
|
894
|
-
if (ch === 0x7C/* | */) {
|
|
895
|
-
folding = false
|
|
896
|
-
} else if (ch === 0x3E/* > */) {
|
|
897
|
-
folding = true
|
|
898
|
-
} else {
|
|
899
|
-
return false
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
state.kind = 'scalar'
|
|
903
|
-
state.result = ''
|
|
904
|
-
|
|
905
|
-
while (ch !== 0) {
|
|
906
|
-
ch = state.input.charCodeAt(++state.position)
|
|
907
|
-
|
|
908
|
-
if (ch === 0x2B/* + */ || ch === 0x2D/* - */) {
|
|
909
|
-
if (CHOMPING_CLIP === chomping) {
|
|
910
|
-
chomping = (ch === 0x2B/* + */) ? CHOMPING_KEEP : CHOMPING_STRIP
|
|
911
|
-
} else {
|
|
912
|
-
throwError(state, 'repeat of a chomping mode identifier')
|
|
913
|
-
}
|
|
914
|
-
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
|
915
|
-
if (tmp === 0) {
|
|
916
|
-
throwError(state, 'bad explicit indentation width of a block scalar; it cannot be less than one')
|
|
917
|
-
} else if (!detectedIndent) {
|
|
918
|
-
textIndent = nodeIndent + tmp - 1
|
|
919
|
-
detectedIndent = true
|
|
920
|
-
} else {
|
|
921
|
-
throwError(state, 'repeat of an indentation width identifier')
|
|
922
|
-
}
|
|
923
|
-
} else {
|
|
924
|
-
break
|
|
925
|
-
}
|
|
926
|
-
}
|
|
927
|
-
|
|
928
|
-
if (isWhiteSpace(ch)) {
|
|
929
|
-
do { ch = state.input.charCodeAt(++state.position) }
|
|
930
|
-
while (isWhiteSpace(ch))
|
|
931
|
-
|
|
932
|
-
if (ch === 0x23/* # */) {
|
|
933
|
-
do { ch = state.input.charCodeAt(++state.position) }
|
|
934
|
-
while (!isEol(ch) && (ch !== 0))
|
|
935
|
-
}
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
while (ch !== 0) {
|
|
939
|
-
readLineBreak(state)
|
|
940
|
-
state.lineIndent = 0
|
|
941
|
-
|
|
942
|
-
ch = state.input.charCodeAt(state.position)
|
|
943
|
-
|
|
944
|
-
// eslint-disable-next-line no-unmodified-loop-condition
|
|
945
|
-
while ((!detectedIndent || state.lineIndent < textIndent) &&
|
|
946
|
-
(ch === 0x20/* Space */)) {
|
|
947
|
-
state.lineIndent++
|
|
948
|
-
ch = state.input.charCodeAt(++state.position)
|
|
949
|
-
}
|
|
950
|
-
|
|
951
|
-
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
952
|
-
textIndent = state.lineIndent
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
if (isEol(ch)) {
|
|
956
|
-
emptyLines++
|
|
957
|
-
continue
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
if (!detectedIndent && textIndent === 0) {
|
|
961
|
-
throwError(state, 'missing indentation for block scalar')
|
|
962
|
-
}
|
|
963
|
-
|
|
964
|
-
// End of the scalar.
|
|
965
|
-
if (state.lineIndent < textIndent) {
|
|
966
|
-
// Perform the chomping.
|
|
967
|
-
if (chomping === CHOMPING_KEEP) {
|
|
968
|
-
state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines)
|
|
969
|
-
} else if (chomping === CHOMPING_CLIP) {
|
|
970
|
-
if (didReadContent) { // i.e. only if the scalar is not empty.
|
|
971
|
-
state.result += '\n'
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
|
|
975
|
-
// Break this `while` cycle and go to the funciton's epilogue.
|
|
976
|
-
break
|
|
977
|
-
}
|
|
978
|
-
|
|
979
|
-
// Folded style: use fancy rules to handle line breaks.
|
|
980
|
-
if (folding) {
|
|
981
|
-
// Lines starting with white space characters (more-indented lines) are not folded.
|
|
982
|
-
if (isWhiteSpace(ch)) {
|
|
983
|
-
atMoreIndented = true
|
|
984
|
-
// except for the first content line (cf. Example 8.1)
|
|
985
|
-
state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines)
|
|
986
|
-
|
|
987
|
-
// End of more-indented block.
|
|
988
|
-
} else if (atMoreIndented) {
|
|
989
|
-
atMoreIndented = false
|
|
990
|
-
state.result += common.repeat('\n', emptyLines + 1)
|
|
991
|
-
|
|
992
|
-
// Just one line break - perceive as the same line.
|
|
993
|
-
} else if (emptyLines === 0) {
|
|
994
|
-
if (didReadContent) { // i.e. only if we have already read some scalar content.
|
|
995
|
-
state.result += ' '
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
// Several line breaks - perceive as different lines.
|
|
999
|
-
} else {
|
|
1000
|
-
state.result += common.repeat('\n', emptyLines)
|
|
1001
|
-
}
|
|
1002
|
-
|
|
1003
|
-
// Literal style: just add exact number of line breaks between content lines.
|
|
1004
|
-
} else {
|
|
1005
|
-
// Keep all line breaks except the header line break.
|
|
1006
|
-
state.result += common.repeat('\n', didReadContent ? 1 + emptyLines : emptyLines)
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
didReadContent = true
|
|
1010
|
-
detectedIndent = true
|
|
1011
|
-
emptyLines = 0
|
|
1012
|
-
const captureStart = state.position
|
|
1013
|
-
|
|
1014
|
-
while (!isEol(ch) && (ch !== 0)) {
|
|
1015
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1016
|
-
}
|
|
1017
|
-
|
|
1018
|
-
captureSegment(state, captureStart, state.position, false)
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
|
-
return true
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
function readBlockSequence (state, nodeIndent) {
|
|
1025
|
-
const _tag = state.tag
|
|
1026
|
-
const _anchor = state.anchor
|
|
1027
|
-
const _result = []
|
|
1028
|
-
let detected = false
|
|
1029
|
-
|
|
1030
|
-
// there is a leading tab before this token, so it can't be a block sequence/mapping;
|
|
1031
|
-
// it can still be flow sequence/mapping or a scalar
|
|
1032
|
-
if (state.firstTabInLine !== -1) return false
|
|
1033
|
-
|
|
1034
|
-
if (state.anchor !== null) {
|
|
1035
|
-
storeAnchor(state, state.anchor, _result)
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
let ch = state.input.charCodeAt(state.position)
|
|
1039
|
-
|
|
1040
|
-
while (ch !== 0) {
|
|
1041
|
-
if (state.firstTabInLine !== -1) {
|
|
1042
|
-
state.position = state.firstTabInLine
|
|
1043
|
-
throwError(state, 'tab characters must not be used in indentation')
|
|
1044
|
-
}
|
|
1045
|
-
|
|
1046
|
-
if (ch !== 0x2D/* - */) {
|
|
1047
|
-
break
|
|
1048
|
-
}
|
|
1049
|
-
|
|
1050
|
-
const following = state.input.charCodeAt(state.position + 1)
|
|
1051
|
-
|
|
1052
|
-
if (!isWsOrEol(following)) {
|
|
1053
|
-
break
|
|
1054
|
-
}
|
|
1055
|
-
|
|
1056
|
-
detected = true
|
|
1057
|
-
state.position++
|
|
1058
|
-
|
|
1059
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1060
|
-
if (state.lineIndent <= nodeIndent) {
|
|
1061
|
-
_result.push(null)
|
|
1062
|
-
ch = state.input.charCodeAt(state.position)
|
|
1063
|
-
continue
|
|
1064
|
-
}
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
const _line = state.line
|
|
1068
|
-
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true)
|
|
1069
|
-
_result.push(state.result)
|
|
1070
|
-
skipSeparationSpace(state, true, -1)
|
|
1071
|
-
|
|
1072
|
-
ch = state.input.charCodeAt(state.position)
|
|
1073
|
-
|
|
1074
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
|
|
1075
|
-
throwError(state, 'bad indentation of a sequence entry')
|
|
1076
|
-
} else if (state.lineIndent < nodeIndent) {
|
|
1077
|
-
break
|
|
1078
|
-
}
|
|
1079
|
-
}
|
|
1080
|
-
|
|
1081
|
-
if (detected) {
|
|
1082
|
-
state.tag = _tag
|
|
1083
|
-
state.anchor = _anchor
|
|
1084
|
-
state.kind = 'sequence'
|
|
1085
|
-
state.result = _result
|
|
1086
|
-
return true
|
|
1087
|
-
}
|
|
1088
|
-
return false
|
|
1089
|
-
}
|
|
1090
|
-
|
|
1091
|
-
function readBlockMapping (state, nodeIndent, flowIndent) {
|
|
1092
|
-
let allowCompact
|
|
1093
|
-
let _keyLine
|
|
1094
|
-
let _keyLineStart
|
|
1095
|
-
let _keyPos
|
|
1096
|
-
const _tag = state.tag
|
|
1097
|
-
const _anchor = state.anchor
|
|
1098
|
-
const _result = {}
|
|
1099
|
-
const overridableKeys = Object.create(null)
|
|
1100
|
-
let keyTag = null
|
|
1101
|
-
let keyNode = null
|
|
1102
|
-
let valueNode = null
|
|
1103
|
-
let atExplicitKey = false
|
|
1104
|
-
let detected = false
|
|
1105
|
-
|
|
1106
|
-
// there is a leading tab before this token, so it can't be a block sequence/mapping;
|
|
1107
|
-
// it can still be flow sequence/mapping or a scalar
|
|
1108
|
-
if (state.firstTabInLine !== -1) return false
|
|
1109
|
-
|
|
1110
|
-
if (state.anchor !== null) {
|
|
1111
|
-
storeAnchor(state, state.anchor, _result)
|
|
1112
|
-
}
|
|
1113
|
-
|
|
1114
|
-
let ch = state.input.charCodeAt(state.position)
|
|
1115
|
-
|
|
1116
|
-
while (ch !== 0) {
|
|
1117
|
-
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
1118
|
-
state.position = state.firstTabInLine
|
|
1119
|
-
throwError(state, 'tab characters must not be used in indentation')
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
|
-
const following = state.input.charCodeAt(state.position + 1)
|
|
1123
|
-
const _line = state.line // Save the current line.
|
|
1124
|
-
|
|
1125
|
-
//
|
|
1126
|
-
// Explicit notation case. There are two separate blocks:
|
|
1127
|
-
// first for the key (denoted by "?") and second for the value (denoted by ":")
|
|
1128
|
-
//
|
|
1129
|
-
if ((ch === 0x3F/* ? */ || ch === 0x3A/* : */) && isWsOrEol(following)) {
|
|
1130
|
-
if (ch === 0x3F/* ? */) {
|
|
1131
|
-
if (atExplicitKey) {
|
|
1132
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos)
|
|
1133
|
-
keyTag = keyNode = valueNode = null
|
|
1134
|
-
}
|
|
1135
|
-
|
|
1136
|
-
detected = true
|
|
1137
|
-
atExplicitKey = true
|
|
1138
|
-
allowCompact = true
|
|
1139
|
-
} else if (atExplicitKey) {
|
|
1140
|
-
// i.e. 0x3A/* : */ === character after the explicit key.
|
|
1141
|
-
atExplicitKey = false
|
|
1142
|
-
allowCompact = true
|
|
1143
|
-
} else {
|
|
1144
|
-
throwError(state, 'incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line')
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
state.position += 1
|
|
1148
|
-
ch = following
|
|
1149
|
-
|
|
1150
|
-
//
|
|
1151
|
-
// Implicit notation case. Flow-style node as the key first, then ":", and the value.
|
|
1152
|
-
//
|
|
1153
|
-
} else {
|
|
1154
|
-
_keyLine = state.line
|
|
1155
|
-
_keyLineStart = state.lineStart
|
|
1156
|
-
_keyPos = state.position
|
|
1157
|
-
|
|
1158
|
-
if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
|
|
1159
|
-
// Neither implicit nor explicit notation.
|
|
1160
|
-
// Reading is done. Go to the epilogue.
|
|
1161
|
-
break
|
|
1162
|
-
}
|
|
1163
|
-
|
|
1164
|
-
if (state.line === _line) {
|
|
1165
|
-
ch = state.input.charCodeAt(state.position)
|
|
1166
|
-
|
|
1167
|
-
while (isWhiteSpace(ch)) {
|
|
1168
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
if (ch === 0x3A/* : */) {
|
|
1172
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1173
|
-
|
|
1174
|
-
if (!isWsOrEol(ch)) {
|
|
1175
|
-
throwError(state, 'a whitespace character is expected after the key-value separator within a block mapping')
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
|
-
if (atExplicitKey) {
|
|
1179
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos)
|
|
1180
|
-
keyTag = keyNode = valueNode = null
|
|
1181
|
-
}
|
|
1182
|
-
|
|
1183
|
-
detected = true
|
|
1184
|
-
atExplicitKey = false
|
|
1185
|
-
allowCompact = false
|
|
1186
|
-
keyTag = state.tag
|
|
1187
|
-
keyNode = state.result
|
|
1188
|
-
} else if (detected) {
|
|
1189
|
-
throwError(state, 'can not read an implicit mapping pair; a colon is missed')
|
|
1190
|
-
} else {
|
|
1191
|
-
state.tag = _tag
|
|
1192
|
-
state.anchor = _anchor
|
|
1193
|
-
return true // Keep the result of `composeNode`.
|
|
1194
|
-
}
|
|
1195
|
-
} else if (detected) {
|
|
1196
|
-
throwError(state, 'can not read a block mapping entry; a multiline key may not be an implicit key')
|
|
1197
|
-
} else {
|
|
1198
|
-
state.tag = _tag
|
|
1199
|
-
state.anchor = _anchor
|
|
1200
|
-
return true // Keep the result of `composeNode`.
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
//
|
|
1205
|
-
// Common reading code for both explicit and implicit notations.
|
|
1206
|
-
//
|
|
1207
|
-
if (state.line === _line || state.lineIndent > nodeIndent) {
|
|
1208
|
-
if (atExplicitKey) {
|
|
1209
|
-
_keyLine = state.line
|
|
1210
|
-
_keyLineStart = state.lineStart
|
|
1211
|
-
_keyPos = state.position
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
|
1215
|
-
if (atExplicitKey) {
|
|
1216
|
-
keyNode = state.result
|
|
1217
|
-
} else {
|
|
1218
|
-
valueNode = state.result
|
|
1219
|
-
}
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
if (!atExplicitKey) {
|
|
1223
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos)
|
|
1224
|
-
keyTag = keyNode = valueNode = null
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
|
-
skipSeparationSpace(state, true, -1)
|
|
1228
|
-
ch = state.input.charCodeAt(state.position)
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && (ch !== 0)) {
|
|
1232
|
-
throwError(state, 'bad indentation of a mapping entry')
|
|
1233
|
-
} else if (state.lineIndent < nodeIndent) {
|
|
1234
|
-
break
|
|
1235
|
-
}
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
|
-
//
|
|
1239
|
-
// Epilogue.
|
|
1240
|
-
//
|
|
1241
|
-
|
|
1242
|
-
// Special case: last mapping's node contains only the key in explicit notation.
|
|
1243
|
-
if (atExplicitKey) {
|
|
1244
|
-
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos)
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
// Expose the resulting mapping.
|
|
1248
|
-
if (detected) {
|
|
1249
|
-
state.tag = _tag
|
|
1250
|
-
state.anchor = _anchor
|
|
1251
|
-
state.kind = 'mapping'
|
|
1252
|
-
state.result = _result
|
|
1253
|
-
}
|
|
1254
|
-
|
|
1255
|
-
return detected
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
function readTagProperty (state) {
|
|
1259
|
-
let isVerbatim = false
|
|
1260
|
-
let isNamed = false
|
|
1261
|
-
let tagHandle
|
|
1262
|
-
let tagName
|
|
1263
|
-
|
|
1264
|
-
let ch = state.input.charCodeAt(state.position)
|
|
1265
|
-
|
|
1266
|
-
if (ch !== 0x21/* ! */) return false
|
|
1267
|
-
|
|
1268
|
-
if (state.tag !== null) {
|
|
1269
|
-
throwError(state, 'duplication of a tag property')
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1273
|
-
|
|
1274
|
-
if (ch === 0x3C/* < */) {
|
|
1275
|
-
isVerbatim = true
|
|
1276
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1277
|
-
} else if (ch === 0x21/* ! */) {
|
|
1278
|
-
isNamed = true
|
|
1279
|
-
tagHandle = '!!'
|
|
1280
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1281
|
-
} else {
|
|
1282
|
-
tagHandle = '!'
|
|
1283
|
-
}
|
|
1284
|
-
|
|
1285
|
-
let _position = state.position
|
|
1286
|
-
|
|
1287
|
-
if (isVerbatim) {
|
|
1288
|
-
do { ch = state.input.charCodeAt(++state.position) }
|
|
1289
|
-
while (ch !== 0 && ch !== 0x3E/* > */)
|
|
1290
|
-
|
|
1291
|
-
if (state.position < state.length) {
|
|
1292
|
-
tagName = state.input.slice(_position, state.position)
|
|
1293
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1294
|
-
} else {
|
|
1295
|
-
throwError(state, 'unexpected end of the stream within a verbatim tag')
|
|
1296
|
-
}
|
|
1297
|
-
} else {
|
|
1298
|
-
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
1299
|
-
if (ch === 0x21/* ! */) {
|
|
1300
|
-
if (!isNamed) {
|
|
1301
|
-
tagHandle = state.input.slice(_position - 1, state.position + 1)
|
|
1302
|
-
|
|
1303
|
-
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
1304
|
-
throwError(state, 'named tag handle cannot contain such characters')
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
isNamed = true
|
|
1308
|
-
_position = state.position + 1
|
|
1309
|
-
} else {
|
|
1310
|
-
throwError(state, 'tag suffix cannot contain exclamation marks')
|
|
1311
|
-
}
|
|
1312
|
-
}
|
|
1313
|
-
|
|
1314
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1315
|
-
}
|
|
1316
|
-
|
|
1317
|
-
tagName = state.input.slice(_position, state.position)
|
|
1318
|
-
|
|
1319
|
-
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
1320
|
-
throwError(state, 'tag suffix cannot contain flow indicator characters')
|
|
1321
|
-
}
|
|
1322
|
-
}
|
|
1323
|
-
|
|
1324
|
-
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
|
1325
|
-
throwError(state, 'tag name cannot contain such characters: ' + tagName)
|
|
1326
|
-
}
|
|
1327
|
-
|
|
1328
|
-
try {
|
|
1329
|
-
tagName = decodeURIComponent(tagName)
|
|
1330
|
-
} catch (err) {
|
|
1331
|
-
throwError(state, 'tag name is malformed: ' + tagName)
|
|
1332
|
-
}
|
|
1333
|
-
|
|
1334
|
-
if (isVerbatim) {
|
|
1335
|
-
state.tag = tagName
|
|
1336
|
-
} else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
|
|
1337
|
-
state.tag = state.tagMap[tagHandle] + tagName
|
|
1338
|
-
} else if (tagHandle === '!') {
|
|
1339
|
-
state.tag = '!' + tagName
|
|
1340
|
-
} else if (tagHandle === '!!') {
|
|
1341
|
-
state.tag = 'tag:yaml.org,2002:' + tagName
|
|
1342
|
-
} else {
|
|
1343
|
-
throwError(state, 'undeclared tag handle "' + tagHandle + '"')
|
|
1344
|
-
}
|
|
1345
|
-
|
|
1346
|
-
return true
|
|
1347
|
-
}
|
|
1348
|
-
|
|
1349
|
-
function readAnchorProperty (state) {
|
|
1350
|
-
let ch = state.input.charCodeAt(state.position)
|
|
1351
|
-
|
|
1352
|
-
if (ch !== 0x26/* & */) return false
|
|
1353
|
-
|
|
1354
|
-
if (state.anchor !== null) {
|
|
1355
|
-
throwError(state, 'duplication of an anchor property')
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1359
|
-
const _position = state.position
|
|
1360
|
-
|
|
1361
|
-
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
1362
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
if (state.position === _position) {
|
|
1366
|
-
throwError(state, 'name of an anchor node must contain at least one character')
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
state.anchor = state.input.slice(_position, state.position)
|
|
1370
|
-
return true
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
function readAlias (state) {
|
|
1374
|
-
let ch = state.input.charCodeAt(state.position)
|
|
1375
|
-
|
|
1376
|
-
if (ch !== 0x2A/* * */) return false
|
|
1377
|
-
|
|
1378
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1379
|
-
const _position = state.position
|
|
1380
|
-
|
|
1381
|
-
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
1382
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1383
|
-
}
|
|
1384
|
-
|
|
1385
|
-
if (state.position === _position) {
|
|
1386
|
-
throwError(state, 'name of an alias node must contain at least one character')
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
const alias = state.input.slice(_position, state.position)
|
|
1390
|
-
|
|
1391
|
-
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
|
1392
|
-
throwError(state, 'unidentified alias "' + alias + '"')
|
|
1393
|
-
}
|
|
1394
|
-
|
|
1395
|
-
state.result = state.anchorMap[alias]
|
|
1396
|
-
skipSeparationSpace(state, true, -1)
|
|
1397
|
-
return true
|
|
1398
|
-
}
|
|
1399
|
-
|
|
1400
|
-
function tryReadBlockMappingFromProperty (state, propertyStart, nodeIndent, flowIndent) {
|
|
1401
|
-
const fallbackState = snapshotState(state)
|
|
1402
|
-
|
|
1403
|
-
beginAnchorTransaction(state)
|
|
1404
|
-
restoreState(state, propertyStart)
|
|
1405
|
-
|
|
1406
|
-
// Re-read the leading properties as part of the first implicit key, not as
|
|
1407
|
-
// properties of the current node.
|
|
1408
|
-
state.tag = null
|
|
1409
|
-
state.anchor = null
|
|
1410
|
-
state.kind = null
|
|
1411
|
-
state.result = null
|
|
1412
|
-
|
|
1413
|
-
if (readBlockMapping(state, nodeIndent, flowIndent) && state.kind === 'mapping') {
|
|
1414
|
-
commitAnchorTransaction(state)
|
|
1415
|
-
return true
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
rollbackAnchorTransaction(state)
|
|
1419
|
-
restoreState(state, fallbackState)
|
|
1420
|
-
return false
|
|
1421
|
-
}
|
|
1422
|
-
|
|
1423
|
-
function composeNode (state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
|
1424
|
-
let allowBlockScalars
|
|
1425
|
-
let allowBlockCollections
|
|
1426
|
-
let indentStatus = 1 // 1: this>parent, 0: this=parent, -1: this<parent
|
|
1427
|
-
let atNewLine = false
|
|
1428
|
-
let hasContent = false
|
|
1429
|
-
let propertyStart = null
|
|
1430
|
-
let type
|
|
1431
|
-
let flowIndent
|
|
1432
|
-
let blockIndent
|
|
1433
|
-
|
|
1434
|
-
if (state.depth >= state.maxDepth) {
|
|
1435
|
-
throwError(state, 'nesting exceeded maxDepth (' + state.maxDepth + ')')
|
|
1436
|
-
}
|
|
1437
|
-
|
|
1438
|
-
state.depth += 1
|
|
1439
|
-
|
|
1440
|
-
if (state.listener !== null) {
|
|
1441
|
-
state.listener('open', state)
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
state.tag = null
|
|
1445
|
-
state.anchor = null
|
|
1446
|
-
state.kind = null
|
|
1447
|
-
state.result = null
|
|
1448
|
-
|
|
1449
|
-
const allowBlockStyles = allowBlockScalars = allowBlockCollections =
|
|
1450
|
-
CONTEXT_BLOCK_OUT === nodeContext ||
|
|
1451
|
-
CONTEXT_BLOCK_IN === nodeContext
|
|
1452
|
-
|
|
1453
|
-
if (allowToSeek) {
|
|
1454
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1455
|
-
atNewLine = true
|
|
1456
|
-
|
|
1457
|
-
if (state.lineIndent > parentIndent) {
|
|
1458
|
-
indentStatus = 1
|
|
1459
|
-
} else if (state.lineIndent === parentIndent) {
|
|
1460
|
-
indentStatus = 0
|
|
1461
|
-
} else if (state.lineIndent < parentIndent) {
|
|
1462
|
-
indentStatus = -1
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
}
|
|
1466
|
-
|
|
1467
|
-
if (indentStatus === 1) {
|
|
1468
|
-
while (true) {
|
|
1469
|
-
const ch = state.input.charCodeAt(state.position)
|
|
1470
|
-
const propertyState = snapshotState(state)
|
|
1471
|
-
|
|
1472
|
-
// A duplicate property token after a line break can be the first key of
|
|
1473
|
-
// a nested block mapping, e.g. `!!map\n !!str key: value`.
|
|
1474
|
-
if (atNewLine &&
|
|
1475
|
-
((ch === 0x21/* ! */ && state.tag !== null) ||
|
|
1476
|
-
(ch === 0x26/* & */ && state.anchor !== null))) {
|
|
1477
|
-
break
|
|
1478
|
-
}
|
|
1479
|
-
|
|
1480
|
-
if (!readTagProperty(state) && !readAnchorProperty(state)) {
|
|
1481
|
-
break
|
|
1482
|
-
}
|
|
1483
|
-
|
|
1484
|
-
if (propertyStart === null) {
|
|
1485
|
-
propertyStart = propertyState
|
|
1486
|
-
}
|
|
1487
|
-
|
|
1488
|
-
if (skipSeparationSpace(state, true, -1)) {
|
|
1489
|
-
atNewLine = true
|
|
1490
|
-
allowBlockCollections = allowBlockStyles
|
|
1491
|
-
|
|
1492
|
-
if (state.lineIndent > parentIndent) {
|
|
1493
|
-
indentStatus = 1
|
|
1494
|
-
} else if (state.lineIndent === parentIndent) {
|
|
1495
|
-
indentStatus = 0
|
|
1496
|
-
} else if (state.lineIndent < parentIndent) {
|
|
1497
|
-
indentStatus = -1
|
|
1498
|
-
}
|
|
1499
|
-
} else {
|
|
1500
|
-
allowBlockCollections = false
|
|
1501
|
-
}
|
|
1502
|
-
}
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
|
-
if (allowBlockCollections) {
|
|
1506
|
-
allowBlockCollections = atNewLine || allowCompact
|
|
1507
|
-
}
|
|
1508
|
-
|
|
1509
|
-
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
1510
|
-
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
|
|
1511
|
-
flowIndent = parentIndent
|
|
1512
|
-
} else {
|
|
1513
|
-
flowIndent = parentIndent + 1
|
|
1514
|
-
}
|
|
1515
|
-
|
|
1516
|
-
blockIndent = state.position - state.lineStart
|
|
1517
|
-
|
|
1518
|
-
if (indentStatus === 1) {
|
|
1519
|
-
if ((allowBlockCollections &&
|
|
1520
|
-
(readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent))) ||
|
|
1521
|
-
readFlowCollection(state, flowIndent)) {
|
|
1522
|
-
hasContent = true
|
|
1523
|
-
} else {
|
|
1524
|
-
const ch = state.input.charCodeAt(state.position)
|
|
1525
|
-
|
|
1526
|
-
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections &&
|
|
1527
|
-
ch !== 0x7C/* | */ && ch !== 0x3E/* > */ &&
|
|
1528
|
-
tryReadBlockMappingFromProperty(
|
|
1529
|
-
state,
|
|
1530
|
-
propertyStart,
|
|
1531
|
-
propertyStart.position - propertyStart.lineStart,
|
|
1532
|
-
flowIndent
|
|
1533
|
-
)) {
|
|
1534
|
-
hasContent = true
|
|
1535
|
-
} else if ((allowBlockScalars && readBlockScalar(state, flowIndent)) ||
|
|
1536
|
-
readSingleQuotedScalar(state, flowIndent) ||
|
|
1537
|
-
readDoubleQuotedScalar(state, flowIndent)) {
|
|
1538
|
-
hasContent = true
|
|
1539
|
-
} else if (readAlias(state)) {
|
|
1540
|
-
hasContent = true
|
|
1541
|
-
|
|
1542
|
-
if (state.tag !== null || state.anchor !== null) {
|
|
1543
|
-
throwError(state, 'alias node should not have any properties')
|
|
1544
|
-
}
|
|
1545
|
-
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
1546
|
-
hasContent = true
|
|
1547
|
-
|
|
1548
|
-
if (state.tag === null) {
|
|
1549
|
-
state.tag = '?'
|
|
1550
|
-
}
|
|
1551
|
-
}
|
|
1552
|
-
|
|
1553
|
-
if (state.anchor !== null) {
|
|
1554
|
-
storeAnchor(state, state.anchor, state.result)
|
|
1555
|
-
}
|
|
1556
|
-
}
|
|
1557
|
-
} else if (indentStatus === 0) {
|
|
1558
|
-
// Special case: block sequences are allowed to have same indentation level as the parent.
|
|
1559
|
-
// http://www.yaml.org/spec/1.2/spec.html#id2799784
|
|
1560
|
-
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent)
|
|
1561
|
-
}
|
|
1562
|
-
}
|
|
1563
|
-
|
|
1564
|
-
if (state.tag === null) {
|
|
1565
|
-
if (state.anchor !== null) {
|
|
1566
|
-
storeAnchor(state, state.anchor, state.result)
|
|
1567
|
-
}
|
|
1568
|
-
} else if (state.tag === '?') {
|
|
1569
|
-
// Implicit resolving is not allowed for non-scalar types, and '?'
|
|
1570
|
-
// non-specific tag is only automatically assigned to plain scalars.
|
|
1571
|
-
//
|
|
1572
|
-
// We only need to check kind conformity in case user explicitly assigns '?'
|
|
1573
|
-
// tag, for example like this: "!<?> [0]"
|
|
1574
|
-
//
|
|
1575
|
-
if (state.result !== null && state.kind !== 'scalar') {
|
|
1576
|
-
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"')
|
|
1577
|
-
}
|
|
1578
|
-
|
|
1579
|
-
for (let typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
1580
|
-
type = state.implicitTypes[typeIndex]
|
|
1581
|
-
|
|
1582
|
-
if (type.resolve(state.result)) { // `state.result` updated in resolver if matched
|
|
1583
|
-
state.result = type.construct(state.result)
|
|
1584
|
-
state.tag = type.tag
|
|
1585
|
-
if (state.anchor !== null) {
|
|
1586
|
-
storeAnchor(state, state.anchor, state.result)
|
|
1587
|
-
}
|
|
1588
|
-
break
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
} else if (state.tag !== '!') {
|
|
1592
|
-
if (_hasOwnProperty.call(state.typeMap[state.kind || 'fallback'], state.tag)) {
|
|
1593
|
-
type = state.typeMap[state.kind || 'fallback'][state.tag]
|
|
1594
|
-
} else {
|
|
1595
|
-
// looking for multi type
|
|
1596
|
-
type = null
|
|
1597
|
-
const typeList = state.typeMap.multi[state.kind || 'fallback']
|
|
1598
|
-
|
|
1599
|
-
for (let typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
1600
|
-
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
1601
|
-
type = typeList[typeIndex]
|
|
1602
|
-
break
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
if (!type) {
|
|
1608
|
-
throwError(state, 'unknown tag !<' + state.tag + '>')
|
|
1609
|
-
}
|
|
1610
|
-
|
|
1611
|
-
if (state.result !== null && type.kind !== state.kind) {
|
|
1612
|
-
throwError(state, 'unacceptable node kind for !<' + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"')
|
|
1613
|
-
}
|
|
1614
|
-
|
|
1615
|
-
if (!type.resolve(state.result, state.tag)) { // `state.result` updated in resolver if matched
|
|
1616
|
-
throwError(state, 'cannot resolve a node with !<' + state.tag + '> explicit tag')
|
|
1617
|
-
} else {
|
|
1618
|
-
state.result = type.construct(state.result, state.tag)
|
|
1619
|
-
if (state.anchor !== null) {
|
|
1620
|
-
storeAnchor(state, state.anchor, state.result)
|
|
1621
|
-
}
|
|
1622
|
-
}
|
|
1623
|
-
}
|
|
1624
|
-
|
|
1625
|
-
if (state.listener !== null) {
|
|
1626
|
-
state.listener('close', state)
|
|
1627
|
-
}
|
|
1628
|
-
|
|
1629
|
-
state.depth -= 1
|
|
1630
|
-
return state.tag !== null || state.anchor !== null || hasContent
|
|
1631
|
-
}
|
|
1632
|
-
|
|
1633
|
-
function readDocument (state) {
|
|
1634
|
-
const documentStart = state.position
|
|
1635
|
-
let hasDirectives = false
|
|
1636
|
-
let ch
|
|
1637
|
-
|
|
1638
|
-
state.version = null
|
|
1639
|
-
state.checkLineBreaks = state.legacy
|
|
1640
|
-
state.tagMap = Object.create(null)
|
|
1641
|
-
state.anchorMap = Object.create(null)
|
|
1642
|
-
|
|
1643
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
1644
|
-
skipSeparationSpace(state, true, -1)
|
|
1645
|
-
|
|
1646
|
-
ch = state.input.charCodeAt(state.position)
|
|
1647
|
-
|
|
1648
|
-
if (state.lineIndent > 0 || ch !== 0x25/* % */) {
|
|
1649
|
-
break
|
|
1650
|
-
}
|
|
1651
|
-
|
|
1652
|
-
hasDirectives = true
|
|
1653
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1654
|
-
let _position = state.position
|
|
1655
|
-
|
|
1656
|
-
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
1657
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
|
-
const directiveName = state.input.slice(_position, state.position)
|
|
1661
|
-
const directiveArgs = []
|
|
1662
|
-
|
|
1663
|
-
if (directiveName.length < 1) {
|
|
1664
|
-
throwError(state, 'directive name must not be less than one character in length')
|
|
1665
|
-
}
|
|
1666
|
-
|
|
1667
|
-
while (ch !== 0) {
|
|
1668
|
-
while (isWhiteSpace(ch)) {
|
|
1669
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1670
|
-
}
|
|
1671
|
-
|
|
1672
|
-
if (ch === 0x23/* # */) {
|
|
1673
|
-
do { ch = state.input.charCodeAt(++state.position) }
|
|
1674
|
-
while (ch !== 0 && !isEol(ch))
|
|
1675
|
-
break
|
|
1676
|
-
}
|
|
1677
|
-
|
|
1678
|
-
if (isEol(ch)) break
|
|
1679
|
-
|
|
1680
|
-
_position = state.position
|
|
1681
|
-
|
|
1682
|
-
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
1683
|
-
ch = state.input.charCodeAt(++state.position)
|
|
1684
|
-
}
|
|
1685
|
-
|
|
1686
|
-
directiveArgs.push(state.input.slice(_position, state.position))
|
|
1687
|
-
}
|
|
1688
|
-
|
|
1689
|
-
if (ch !== 0) readLineBreak(state)
|
|
1690
|
-
|
|
1691
|
-
if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
|
|
1692
|
-
directiveHandlers[directiveName](state, directiveName, directiveArgs)
|
|
1693
|
-
} else {
|
|
1694
|
-
throwWarning(state, 'unknown document directive "' + directiveName + '"')
|
|
1695
|
-
}
|
|
1696
|
-
}
|
|
1697
|
-
|
|
1698
|
-
skipSeparationSpace(state, true, -1)
|
|
1699
|
-
|
|
1700
|
-
if (state.lineIndent === 0 &&
|
|
1701
|
-
state.input.charCodeAt(state.position) === 0x2D/* - */ &&
|
|
1702
|
-
state.input.charCodeAt(state.position + 1) === 0x2D/* - */ &&
|
|
1703
|
-
state.input.charCodeAt(state.position + 2) === 0x2D/* - */) {
|
|
1704
|
-
state.position += 3
|
|
1705
|
-
skipSeparationSpace(state, true, -1)
|
|
1706
|
-
} else if (hasDirectives) {
|
|
1707
|
-
throwError(state, 'directives end mark is expected')
|
|
1708
|
-
}
|
|
1709
|
-
|
|
1710
|
-
composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true)
|
|
1711
|
-
skipSeparationSpace(state, true, -1)
|
|
1712
|
-
|
|
1713
|
-
if (state.checkLineBreaks &&
|
|
1714
|
-
PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
|
|
1715
|
-
throwWarning(state, 'non-ASCII line breaks are interpreted as content')
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
state.documents.push(state.result)
|
|
1719
|
-
|
|
1720
|
-
if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
1721
|
-
if (state.input.charCodeAt(state.position) === 0x2E/* . */) {
|
|
1722
|
-
state.position += 3
|
|
1723
|
-
skipSeparationSpace(state, true, -1)
|
|
1724
|
-
}
|
|
1725
|
-
return
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
if (state.position < (state.length - 1)) {
|
|
1729
|
-
throwError(state, 'end of the stream or a document separator is expected')
|
|
1730
|
-
}
|
|
1731
|
-
}
|
|
1732
|
-
|
|
1733
|
-
function loadDocuments (input, options) {
|
|
1734
|
-
input = String(input)
|
|
1735
|
-
options = options || {}
|
|
1736
|
-
|
|
1737
|
-
if (input.length !== 0) {
|
|
1738
|
-
// Add tailing `\n` if not exists
|
|
1739
|
-
if (input.charCodeAt(input.length - 1) !== 0x0A/* LF */ &&
|
|
1740
|
-
input.charCodeAt(input.length - 1) !== 0x0D/* CR */) {
|
|
1741
|
-
input += '\n'
|
|
1742
|
-
}
|
|
1743
|
-
|
|
1744
|
-
// Strip BOM
|
|
1745
|
-
if (input.charCodeAt(0) === 0xFEFF) {
|
|
1746
|
-
input = input.slice(1)
|
|
1747
|
-
}
|
|
1748
|
-
}
|
|
1749
|
-
|
|
1750
|
-
const state = new State(input, options)
|
|
1751
|
-
|
|
1752
|
-
const nullpos = input.indexOf('\0')
|
|
1753
|
-
|
|
1754
|
-
if (nullpos !== -1) {
|
|
1755
|
-
state.position = nullpos
|
|
1756
|
-
throwError(state, 'null byte is not allowed in input')
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
// Use 0 as string terminator. That significantly simplifies bounds check.
|
|
1760
|
-
state.input += '\0'
|
|
1761
|
-
|
|
1762
|
-
while (state.input.charCodeAt(state.position) === 0x20/* Space */) {
|
|
1763
|
-
state.lineIndent += 1
|
|
1764
|
-
state.position += 1
|
|
1765
|
-
}
|
|
1766
|
-
|
|
1767
|
-
while (state.position < (state.length - 1)) {
|
|
1768
|
-
readDocument(state)
|
|
1769
|
-
}
|
|
1770
|
-
|
|
1771
|
-
return state.documents
|
|
1772
|
-
}
|
|
1773
|
-
|
|
1774
|
-
function loadAll (input, iterator, options) {
|
|
1775
|
-
if (iterator !== null && typeof iterator === 'object' && typeof options === 'undefined') {
|
|
1776
|
-
options = iterator
|
|
1777
|
-
iterator = null
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
const documents = loadDocuments(input, options)
|
|
1781
|
-
|
|
1782
|
-
if (typeof iterator !== 'function') {
|
|
1783
|
-
return documents
|
|
1784
|
-
}
|
|
1785
|
-
|
|
1786
|
-
for (let index = 0, length = documents.length; index < length; index += 1) {
|
|
1787
|
-
iterator(documents[index])
|
|
1788
|
-
}
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
function load (input, options) {
|
|
1792
|
-
const documents = loadDocuments(input, options)
|
|
1793
|
-
|
|
1794
|
-
if (documents.length === 0) {
|
|
1795
|
-
return undefined
|
|
1796
|
-
} else if (documents.length === 1) {
|
|
1797
|
-
return documents[0]
|
|
1798
|
-
}
|
|
1799
|
-
throw new YAMLException('expected a single document in the stream, but found more')
|
|
1800
|
-
}
|
|
1801
|
-
|
|
1802
|
-
module.exports.loadAll = loadAll
|
|
1803
|
-
module.exports.load = load
|