reflex-search 1.2.0 → 1.4.0
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/binary.js +5 -3
- package/node_modules/.bin/prettier +80 -0
- package/node_modules/.bin/rimraf +250 -0
- package/node_modules/.package-lock.json +548 -0
- package/node_modules/agent-base/README.md +145 -0
- package/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/agent-base/package.json +64 -0
- package/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/asynckit/LICENSE +21 -0
- package/node_modules/asynckit/README.md +233 -0
- package/node_modules/asynckit/bench.js +76 -0
- package/node_modules/asynckit/index.js +6 -0
- package/node_modules/asynckit/lib/abort.js +29 -0
- package/node_modules/asynckit/lib/async.js +34 -0
- package/node_modules/asynckit/lib/defer.js +26 -0
- package/node_modules/asynckit/lib/iterate.js +75 -0
- package/node_modules/asynckit/lib/readable_asynckit.js +91 -0
- package/node_modules/asynckit/lib/readable_parallel.js +25 -0
- package/node_modules/asynckit/lib/readable_serial.js +25 -0
- package/node_modules/asynckit/lib/readable_serial_ordered.js +29 -0
- package/node_modules/asynckit/lib/state.js +37 -0
- package/node_modules/asynckit/lib/streamify.js +141 -0
- package/node_modules/asynckit/lib/terminator.js +29 -0
- package/node_modules/asynckit/package.json +63 -0
- package/node_modules/asynckit/parallel.js +43 -0
- package/node_modules/asynckit/serial.js +17 -0
- package/node_modules/asynckit/serialOrdered.js +75 -0
- package/node_modules/asynckit/stream.js +21 -0
- package/node_modules/axios/CHANGELOG.md +1747 -0
- package/node_modules/axios/LICENSE +7 -0
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2426 -0
- package/node_modules/axios/dist/axios.js +4892 -0
- package/node_modules/axios/dist/axios.js.map +1 -0
- package/node_modules/axios/dist/axios.min.js +5 -0
- package/node_modules/axios/dist/axios.min.js.map +1 -0
- package/node_modules/axios/dist/browser/axios.cjs +4733 -0
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -0
- package/node_modules/axios/dist/esm/axios.js +4754 -0
- package/node_modules/axios/dist/esm/axios.js.map +1 -0
- package/node_modules/axios/dist/esm/axios.min.js +3 -0
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -0
- package/node_modules/axios/dist/node/axios.cjs +5469 -0
- package/node_modules/axios/dist/node/axios.cjs.map +1 -0
- package/node_modules/axios/index.d.cts +715 -0
- package/node_modules/axios/index.d.ts +734 -0
- package/node_modules/axios/index.js +45 -0
- package/node_modules/axios/lib/adapters/README.md +36 -0
- package/node_modules/axios/lib/adapters/adapters.js +132 -0
- package/node_modules/axios/lib/adapters/fetch.js +473 -0
- package/node_modules/axios/lib/adapters/http.js +1312 -0
- package/node_modules/axios/lib/adapters/xhr.js +227 -0
- package/node_modules/axios/lib/axios.js +89 -0
- package/node_modules/axios/lib/cancel/CancelToken.js +135 -0
- package/node_modules/axios/lib/cancel/CanceledError.js +22 -0
- package/node_modules/axios/lib/cancel/isCancel.js +5 -0
- package/node_modules/axios/lib/core/Axios.js +281 -0
- package/node_modules/axios/lib/core/AxiosError.js +176 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +348 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +72 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/buildFullPath.js +22 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +89 -0
- package/node_modules/axios/lib/core/mergeConfig.js +124 -0
- package/node_modules/axios/lib/core/settle.js +27 -0
- package/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/axios/lib/defaults/index.js +177 -0
- package/node_modules/axios/lib/defaults/transitional.js +8 -0
- package/node_modules/axios/lib/env/README.md +3 -0
- package/node_modules/axios/lib/env/classes/FormData.js +2 -0
- package/node_modules/axios/lib/env/data.js +1 -0
- package/node_modules/axios/lib/helpers/AxiosTransformStream.js +156 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +61 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +77 -0
- package/node_modules/axios/lib/helpers/README.md +7 -0
- package/node_modules/axios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
- package/node_modules/axios/lib/helpers/bind.js +14 -0
- package/node_modules/axios/lib/helpers/buildURL.js +66 -0
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +15 -0
- package/node_modules/axios/lib/helpers/composeSignals.js +57 -0
- package/node_modules/axios/lib/helpers/cookies.js +60 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +100 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +97 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +66 -0
- package/node_modules/axios/lib/helpers/isAbsoluteURL.js +19 -0
- package/node_modules/axios/lib/helpers/isAxiosError.js +14 -0
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +16 -0
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +69 -0
- package/node_modules/axios/lib/helpers/parseProtocol.js +6 -0
- package/node_modules/axios/lib/helpers/progressEventReducer.js +54 -0
- package/node_modules/axios/lib/helpers/readBlob.js +15 -0
- package/node_modules/axios/lib/helpers/resolveConfig.js +106 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +178 -0
- package/node_modules/axios/lib/helpers/speedometer.js +55 -0
- package/node_modules/axios/lib/helpers/spread.js +28 -0
- package/node_modules/axios/lib/helpers/throttle.js +44 -0
- package/node_modules/axios/lib/helpers/toFormData.js +249 -0
- package/node_modules/axios/lib/helpers/toURLEncodedForm.js +19 -0
- package/node_modules/axios/lib/helpers/trackStream.js +89 -0
- package/node_modules/axios/lib/helpers/validator.js +112 -0
- package/node_modules/axios/lib/platform/browser/classes/Blob.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/browser/index.js +13 -0
- package/node_modules/axios/lib/platform/common/utils.js +52 -0
- package/node_modules/axios/lib/platform/index.js +7 -0
- package/node_modules/axios/lib/platform/node/classes/FormData.js +3 -0
- package/node_modules/axios/lib/platform/node/classes/URLSearchParams.js +4 -0
- package/node_modules/axios/lib/platform/node/index.js +37 -0
- package/node_modules/axios/lib/utils.js +932 -0
- package/node_modules/axios/package.json +185 -0
- package/node_modules/axios-proxy-builder/LICENSE +21 -0
- package/node_modules/axios-proxy-builder/README.md +36 -0
- package/node_modules/axios-proxy-builder/dist/index.d.ts +1 -0
- package/node_modules/axios-proxy-builder/dist/index.js +5 -0
- package/node_modules/axios-proxy-builder/dist/proxy-builder.d.ts +15 -0
- package/node_modules/axios-proxy-builder/dist/proxy-builder.js +40 -0
- package/node_modules/axios-proxy-builder/dist/proxy-builder.test.d.ts +1 -0
- package/node_modules/axios-proxy-builder/dist/proxy-builder.test.js +35 -0
- package/node_modules/axios-proxy-builder/dist/test-fixtures.d.ts +5 -0
- package/node_modules/axios-proxy-builder/dist/test-fixtures.js +8 -0
- package/node_modules/axios-proxy-builder/dist/utils.d.ts +1 -0
- package/node_modules/axios-proxy-builder/dist/utils.js +48 -0
- package/node_modules/axios-proxy-builder/dist/utils.test.d.ts +1 -0
- package/node_modules/axios-proxy-builder/dist/utils.test.js +51 -0
- package/node_modules/axios-proxy-builder/package.json +39 -0
- package/node_modules/balanced-match/LICENSE.md +23 -0
- package/node_modules/balanced-match/README.md +57 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/index.js +59 -0
- package/node_modules/balanced-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/balanced-match/dist/commonjs/package.json +3 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts +9 -0
- package/node_modules/balanced-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/balanced-match/dist/esm/index.js +54 -0
- package/node_modules/balanced-match/dist/esm/index.js.map +1 -0
- package/node_modules/balanced-match/dist/esm/package.json +3 -0
- package/node_modules/balanced-match/package.json +68 -0
- package/node_modules/brace-expansion/LICENSE +23 -0
- package/node_modules/brace-expansion/README.md +94 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +201 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/package.json +3 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts +6 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/esm/index.js +197 -0
- package/node_modules/brace-expansion/dist/esm/index.js.map +1 -0
- package/node_modules/brace-expansion/dist/esm/package.json +3 -0
- package/node_modules/brace-expansion/package.json +64 -0
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/call-bind-apply-helpers/LICENSE +21 -0
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/clone/.npmignore +4 -0
- package/node_modules/clone/LICENSE +18 -0
- package/node_modules/clone/README.md +126 -0
- package/node_modules/clone/clone.iml +10 -0
- package/node_modules/clone/clone.js +166 -0
- package/node_modules/clone/package.json +51 -0
- package/node_modules/combined-stream/License +19 -0
- package/node_modules/combined-stream/Readme.md +138 -0
- package/node_modules/combined-stream/lib/combined_stream.js +208 -0
- package/node_modules/combined-stream/package.json +25 -0
- package/node_modules/combined-stream/yarn.lock +17 -0
- package/node_modules/console.table/LICENSE-MIT +22 -0
- package/node_modules/console.table/README.md +173 -0
- package/node_modules/console.table/bower.json +29 -0
- package/node_modules/console.table/dist/console.table.js +179 -0
- package/node_modules/console.table/dist/console.table.min.js +1 -0
- package/node_modules/console.table/index.js +179 -0
- package/node_modules/console.table/package.json +90 -0
- package/node_modules/debug/LICENSE +20 -0
- package/node_modules/debug/README.md +481 -0
- package/node_modules/debug/package.json +64 -0
- package/node_modules/debug/src/browser.js +272 -0
- package/node_modules/debug/src/common.js +292 -0
- package/node_modules/debug/src/index.js +10 -0
- package/node_modules/debug/src/node.js +263 -0
- package/node_modules/defaults/LICENSE +22 -0
- package/node_modules/defaults/README.md +39 -0
- package/node_modules/defaults/index.js +13 -0
- package/node_modules/defaults/package.json +33 -0
- package/node_modules/defaults/test.js +34 -0
- package/node_modules/delayed-stream/.npmignore +1 -0
- package/node_modules/delayed-stream/License +19 -0
- package/node_modules/delayed-stream/Makefile +7 -0
- package/node_modules/delayed-stream/Readme.md +141 -0
- package/node_modules/delayed-stream/lib/delayed_stream.js +107 -0
- package/node_modules/delayed-stream/package.json +27 -0
- package/node_modules/detect-libc/LICENSE +201 -0
- package/node_modules/detect-libc/README.md +163 -0
- package/node_modules/detect-libc/index.d.ts +14 -0
- package/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/node_modules/detect-libc/lib/process.js +24 -0
- package/node_modules/detect-libc/package.json +44 -0
- package/node_modules/dunder-proto/.eslintrc +5 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/dunder-proto/LICENSE +21 -0
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/easy-table/.npmignore +3 -0
- package/node_modules/easy-table/HISTORY.md +53 -0
- package/node_modules/easy-table/README.md +226 -0
- package/node_modules/easy-table/package.json +23 -0
- package/node_modules/easy-table/table.js +445 -0
- package/node_modules/es-define-property/.eslintrc +13 -0
- package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
- package/node_modules/es-define-property/.nycrc +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +29 -0
- package/node_modules/es-define-property/LICENSE +21 -0
- package/node_modules/es-define-property/README.md +49 -0
- package/node_modules/es-define-property/index.d.ts +3 -0
- package/node_modules/es-define-property/index.js +14 -0
- package/node_modules/es-define-property/package.json +81 -0
- package/node_modules/es-define-property/test/index.js +56 -0
- package/node_modules/es-define-property/tsconfig.json +10 -0
- package/node_modules/es-errors/.eslintrc +5 -0
- package/node_modules/es-errors/.github/FUNDING.yml +12 -0
- package/node_modules/es-errors/CHANGELOG.md +40 -0
- package/node_modules/es-errors/LICENSE +21 -0
- package/node_modules/es-errors/README.md +55 -0
- package/node_modules/es-errors/eval.d.ts +3 -0
- package/node_modules/es-errors/eval.js +4 -0
- package/node_modules/es-errors/index.d.ts +3 -0
- package/node_modules/es-errors/index.js +4 -0
- package/node_modules/es-errors/package.json +80 -0
- package/node_modules/es-errors/range.d.ts +3 -0
- package/node_modules/es-errors/range.js +4 -0
- package/node_modules/es-errors/ref.d.ts +3 -0
- package/node_modules/es-errors/ref.js +4 -0
- package/node_modules/es-errors/syntax.d.ts +3 -0
- package/node_modules/es-errors/syntax.js +4 -0
- package/node_modules/es-errors/test/index.js +19 -0
- package/node_modules/es-errors/tsconfig.json +49 -0
- package/node_modules/es-errors/type.d.ts +3 -0
- package/node_modules/es-errors/type.js +4 -0
- package/node_modules/es-errors/uri.d.ts +3 -0
- package/node_modules/es-errors/uri.js +4 -0
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/es-object-atoms/LICENSE +21 -0
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/es-set-tostringtag/.eslintrc +13 -0
- package/node_modules/es-set-tostringtag/.nycrc +9 -0
- package/node_modules/es-set-tostringtag/CHANGELOG.md +67 -0
- package/node_modules/es-set-tostringtag/LICENSE +21 -0
- package/node_modules/es-set-tostringtag/README.md +53 -0
- package/node_modules/es-set-tostringtag/index.d.ts +10 -0
- package/node_modules/es-set-tostringtag/index.js +35 -0
- package/node_modules/es-set-tostringtag/package.json +78 -0
- package/node_modules/es-set-tostringtag/test/index.js +85 -0
- package/node_modules/es-set-tostringtag/tsconfig.json +9 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +157 -0
- package/node_modules/follow-redirects/debug.js +15 -0
- package/node_modules/follow-redirects/http.js +1 -0
- package/node_modules/follow-redirects/https.js +1 -0
- package/node_modules/follow-redirects/index.js +709 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/form-data/CHANGELOG.md +659 -0
- package/node_modules/form-data/License +19 -0
- package/node_modules/form-data/README.md +355 -0
- package/node_modules/form-data/index.d.ts +62 -0
- package/node_modules/form-data/lib/browser.js +4 -0
- package/node_modules/form-data/lib/form_data.js +494 -0
- package/node_modules/form-data/lib/populate.js +10 -0
- package/node_modules/form-data/package.json +82 -0
- package/node_modules/function-bind/.eslintrc +21 -0
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/LICENSE +20 -0
- package/node_modules/function-bind/README.md +46 -0
- package/node_modules/function-bind/implementation.js +84 -0
- package/node_modules/function-bind/index.js +5 -0
- package/node_modules/function-bind/package.json +87 -0
- package/node_modules/function-bind/test/.eslintrc +9 -0
- package/node_modules/function-bind/test/index.js +252 -0
- package/node_modules/get-intrinsic/.eslintrc +42 -0
- package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/node_modules/get-intrinsic/.nycrc +9 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +186 -0
- package/node_modules/get-intrinsic/LICENSE +21 -0
- package/node_modules/get-intrinsic/README.md +71 -0
- package/node_modules/get-intrinsic/index.js +378 -0
- package/node_modules/get-intrinsic/package.json +97 -0
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/get-proto/package.json +81 -0
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1177 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts +388 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/glob.js +247 -0
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/has-magic.js +27 -0
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts +24 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.js +119 -0
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/index.js +68 -0
- package/node_modules/glob/dist/commonjs/index.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.min.js +4 -0
- package/node_modules/glob/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/glob/dist/commonjs/package.json +3 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts +76 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/pattern.js +219 -0
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts +59 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.js +301 -0
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts +97 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.js +387 -0
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
- package/node_modules/glob/dist/esm/glob.d.ts +388 -0
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/glob.js +243 -0
- package/node_modules/glob/dist/esm/glob.js.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts +14 -0
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/has-magic.js +23 -0
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
- package/node_modules/glob/dist/esm/ignore.d.ts +24 -0
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/ignore.js +115 -0
- package/node_modules/glob/dist/esm/ignore.js.map +1 -0
- package/node_modules/glob/dist/esm/index.d.ts +97 -0
- package/node_modules/glob/dist/esm/index.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/index.js +55 -0
- package/node_modules/glob/dist/esm/index.js.map +1 -0
- package/node_modules/glob/dist/esm/index.min.js +4 -0
- package/node_modules/glob/dist/esm/index.min.js.map +7 -0
- package/node_modules/glob/dist/esm/package.json +3 -0
- package/node_modules/glob/dist/esm/pattern.d.ts +76 -0
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/pattern.js +215 -0
- package/node_modules/glob/dist/esm/pattern.js.map +1 -0
- package/node_modules/glob/dist/esm/processor.d.ts +59 -0
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/processor.js +294 -0
- package/node_modules/glob/dist/esm/processor.js.map +1 -0
- package/node_modules/glob/dist/esm/walker.d.ts +97 -0
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/walker.js +381 -0
- package/node_modules/glob/dist/esm/walker.js.map +1 -0
- package/node_modules/glob/package.json +101 -0
- package/node_modules/gopd/.eslintrc +16 -0
- package/node_modules/gopd/.github/FUNDING.yml +12 -0
- package/node_modules/gopd/CHANGELOG.md +45 -0
- package/node_modules/gopd/LICENSE +21 -0
- package/node_modules/gopd/README.md +40 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +15 -0
- package/node_modules/gopd/package.json +77 -0
- package/node_modules/gopd/test/index.js +36 -0
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/.eslintrc +11 -0
- package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/node_modules/has-symbols/.nycrc +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +91 -0
- package/node_modules/has-symbols/LICENSE +21 -0
- package/node_modules/has-symbols/README.md +46 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +14 -0
- package/node_modules/has-symbols/package.json +111 -0
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +45 -0
- package/node_modules/has-symbols/test/index.js +22 -0
- package/node_modules/has-symbols/test/shams/core-js.js +29 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +29 -0
- package/node_modules/has-symbols/test/tests.js +58 -0
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +5 -0
- package/node_modules/has-tostringtag/.github/FUNDING.yml +12 -0
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +42 -0
- package/node_modules/has-tostringtag/LICENSE +21 -0
- package/node_modules/has-tostringtag/README.md +46 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +8 -0
- package/node_modules/has-tostringtag/package.json +108 -0
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +8 -0
- package/node_modules/has-tostringtag/test/index.js +21 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +31 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +30 -0
- package/node_modules/has-tostringtag/test/tests.js +15 -0
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +40 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +92 -0
- package/node_modules/hasown/tsconfig.json +6 -0
- package/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/lru-cache/README.md +383 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts +1323 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1589 -0
- package/node_modules/lru-cache/dist/commonjs/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts +1323 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.js +1585 -0
- package/node_modules/lru-cache/dist/esm/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/package.json +101 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-db/package.json +60 -0
- package/node_modules/mime-types/HISTORY.md +397 -0
- package/node_modules/mime-types/LICENSE +23 -0
- package/node_modules/mime-types/README.md +113 -0
- package/node_modules/mime-types/index.js +188 -0
- package/node_modules/mime-types/package.json +44 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +528 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +845 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +150 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +30 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +174 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1127 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +38 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +841 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +146 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +15 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +26 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +174 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1114 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +22 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +34 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +73 -0
- package/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +549 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1028 -0
- package/node_modules/minipass/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass/dist/commonjs/package.json +3 -0
- package/node_modules/minipass/dist/esm/index.d.ts +549 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1018 -0
- package/node_modules/minipass/dist/esm/index.js.map +1 -0
- package/node_modules/minipass/dist/esm/package.json +3 -0
- package/node_modules/minipass/package.json +82 -0
- package/node_modules/ms/index.js +162 -0
- package/node_modules/ms/license.md +21 -0
- package/node_modules/ms/package.json +38 -0
- package/node_modules/ms/readme.md +59 -0
- package/node_modules/package-json-from-dist/LICENSE.md +63 -0
- package/node_modules/package-json-from-dist/README.md +110 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts +89 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.js +134 -0
- package/node_modules/package-json-from-dist/dist/commonjs/index.js.map +1 -0
- package/node_modules/package-json-from-dist/dist/commonjs/package.json +3 -0
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts +89 -0
- package/node_modules/package-json-from-dist/dist/esm/index.d.ts.map +1 -0
- package/node_modules/package-json-from-dist/dist/esm/index.js +129 -0
- package/node_modules/package-json-from-dist/dist/esm/index.js.map +1 -0
- package/node_modules/package-json-from-dist/dist/esm/package.json +3 -0
- package/node_modules/package-json-from-dist/package.json +68 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +636 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2018 -0
- package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/package.json +3 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts +1115 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/esm/index.js +1983 -0
- package/node_modules/path-scurry/dist/esm/index.js.map +1 -0
- package/node_modules/path-scurry/dist/esm/package.json +3 -0
- package/node_modules/path-scurry/package.json +88 -0
- package/node_modules/prettier/LICENSE +7 -0
- package/node_modules/prettier/README.md +104 -0
- package/node_modules/prettier/THIRD-PARTY-NOTICES.md +6059 -0
- package/node_modules/prettier/bin/prettier.cjs +80 -0
- package/node_modules/prettier/doc.d.ts +254 -0
- package/node_modules/prettier/doc.js +1511 -0
- package/node_modules/prettier/doc.mjs +1480 -0
- package/node_modules/prettier/index.cjs +720 -0
- package/node_modules/prettier/index.d.ts +968 -0
- package/node_modules/prettier/index.mjs +18793 -0
- package/node_modules/prettier/internal/experimental-cli-worker.mjs +2841 -0
- package/node_modules/prettier/internal/experimental-cli.mjs +12790 -0
- package/node_modules/prettier/internal/legacy-cli.mjs +6229 -0
- package/node_modules/prettier/package.json +203 -0
- package/node_modules/prettier/plugins/acorn.d.ts +6 -0
- package/node_modules/prettier/plugins/acorn.js +16 -0
- package/node_modules/prettier/plugins/acorn.mjs +16 -0
- package/node_modules/prettier/plugins/angular.d.ts +8 -0
- package/node_modules/prettier/plugins/angular.js +4 -0
- package/node_modules/prettier/plugins/angular.mjs +4 -0
- package/node_modules/prettier/plugins/babel.d.ts +18 -0
- package/node_modules/prettier/plugins/babel.js +15 -0
- package/node_modules/prettier/plugins/babel.mjs +15 -0
- package/node_modules/prettier/plugins/estree.d.ts +6 -0
- package/node_modules/prettier/plugins/estree.js +44 -0
- package/node_modules/prettier/plugins/estree.mjs +44 -0
- package/node_modules/prettier/plugins/flow.d.ts +5 -0
- package/node_modules/prettier/plugins/flow.js +20 -0
- package/node_modules/prettier/plugins/flow.mjs +20 -0
- package/node_modules/prettier/plugins/glimmer.d.ts +9 -0
- package/node_modules/prettier/plugins/glimmer.js +37 -0
- package/node_modules/prettier/plugins/glimmer.mjs +37 -0
- package/node_modules/prettier/plugins/graphql.d.ts +9 -0
- package/node_modules/prettier/plugins/graphql.js +28 -0
- package/node_modules/prettier/plugins/graphql.mjs +28 -0
- package/node_modules/prettier/plugins/html.d.ts +13 -0
- package/node_modules/prettier/plugins/html.js +24 -0
- package/node_modules/prettier/plugins/html.mjs +24 -0
- package/node_modules/prettier/plugins/markdown.d.ts +11 -0
- package/node_modules/prettier/plugins/markdown.js +62 -0
- package/node_modules/prettier/plugins/markdown.mjs +62 -0
- package/node_modules/prettier/plugins/meriyah.d.ts +5 -0
- package/node_modules/prettier/plugins/meriyah.js +5 -0
- package/node_modules/prettier/plugins/meriyah.mjs +5 -0
- package/node_modules/prettier/plugins/postcss.d.ts +11 -0
- package/node_modules/prettier/plugins/postcss.js +61 -0
- package/node_modules/prettier/plugins/postcss.mjs +61 -0
- package/node_modules/prettier/plugins/typescript.d.ts +5 -0
- package/node_modules/prettier/plugins/typescript.js +21 -0
- package/node_modules/prettier/plugins/typescript.mjs +21 -0
- package/node_modules/prettier/plugins/yaml.d.ts +9 -0
- package/node_modules/prettier/plugins/yaml.js +159 -0
- package/node_modules/prettier/plugins/yaml.mjs +159 -0
- package/node_modules/prettier/standalone.d.ts +33 -0
- package/node_modules/prettier/standalone.js +29 -0
- package/node_modules/prettier/standalone.mjs +29 -0
- package/node_modules/proxy-from-env/LICENSE +20 -0
- package/node_modules/proxy-from-env/README.md +163 -0
- package/node_modules/proxy-from-env/index.cjs +105 -0
- package/node_modules/proxy-from-env/index.js +103 -0
- package/node_modules/proxy-from-env/package.json +43 -0
- package/node_modules/rimraf/LICENSE.md +55 -0
- package/node_modules/rimraf/README.md +255 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.js +58 -0
- package/node_modules/rimraf/dist/commonjs/default-tmp.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/error.d.ts +6 -0
- package/node_modules/rimraf/dist/commonjs/error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/error.js +10 -0
- package/node_modules/rimraf/dist/commonjs/error.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.js +38 -0
- package/node_modules/rimraf/dist/commonjs/fix-eperm.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fs.d.ts +16 -0
- package/node_modules/rimraf/dist/commonjs/fs.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/fs.js +33 -0
- package/node_modules/rimraf/dist/commonjs/fs.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.js +24 -0
- package/node_modules/rimraf/dist/commonjs/ignore-enoent.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/index.d.ts +50 -0
- package/node_modules/rimraf/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/index.js +84 -0
- package/node_modules/rimraf/dist/commonjs/index.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts +34 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.js +54 -0
- package/node_modules/rimraf/dist/commonjs/opt-arg.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/package.json +3 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.js +49 -0
- package/node_modules/rimraf/dist/commonjs/path-arg.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.js +19 -0
- package/node_modules/rimraf/dist/commonjs/readdir-or-error.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts +8 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.js +65 -0
- package/node_modules/rimraf/dist/commonjs/retry-busy.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts +3 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.js +8 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-manual.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js +138 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-move-remove.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.js +24 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-native.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.js +102 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-posix.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.js +159 -0
- package/node_modules/rimraf/dist/commonjs/rimraf-windows.js.map +1 -0
- package/node_modules/rimraf/dist/commonjs/use-native.d.ts +4 -0
- package/node_modules/rimraf/dist/commonjs/use-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/commonjs/use-native.js +18 -0
- package/node_modules/rimraf/dist/commonjs/use-native.js.map +1 -0
- package/node_modules/rimraf/dist/esm/bin.d.mts +3 -0
- package/node_modules/rimraf/dist/esm/bin.d.mts.map +1 -0
- package/node_modules/rimraf/dist/esm/bin.mjs +250 -0
- package/node_modules/rimraf/dist/esm/bin.mjs.map +1 -0
- package/node_modules/rimraf/dist/esm/default-tmp.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/default-tmp.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/default-tmp.js +55 -0
- package/node_modules/rimraf/dist/esm/default-tmp.js.map +1 -0
- package/node_modules/rimraf/dist/esm/error.d.ts +6 -0
- package/node_modules/rimraf/dist/esm/error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/error.js +5 -0
- package/node_modules/rimraf/dist/esm/error.js.map +1 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.js +33 -0
- package/node_modules/rimraf/dist/esm/fix-eperm.js.map +1 -0
- package/node_modules/rimraf/dist/esm/fs.d.ts +16 -0
- package/node_modules/rimraf/dist/esm/fs.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/fs.js +18 -0
- package/node_modules/rimraf/dist/esm/fs.js.map +1 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.js +19 -0
- package/node_modules/rimraf/dist/esm/ignore-enoent.js.map +1 -0
- package/node_modules/rimraf/dist/esm/index.d.ts +50 -0
- package/node_modules/rimraf/dist/esm/index.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/index.js +76 -0
- package/node_modules/rimraf/dist/esm/index.js.map +1 -0
- package/node_modules/rimraf/dist/esm/opt-arg.d.ts +34 -0
- package/node_modules/rimraf/dist/esm/opt-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/opt-arg.js +47 -0
- package/node_modules/rimraf/dist/esm/opt-arg.js.map +1 -0
- package/node_modules/rimraf/dist/esm/package.json +3 -0
- package/node_modules/rimraf/dist/esm/path-arg.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/path-arg.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/path-arg.js +47 -0
- package/node_modules/rimraf/dist/esm/path-arg.js.map +1 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.js +14 -0
- package/node_modules/rimraf/dist/esm/readdir-or-error.js.map +1 -0
- package/node_modules/rimraf/dist/esm/retry-busy.d.ts +8 -0
- package/node_modules/rimraf/dist/esm/retry-busy.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/retry-busy.js +60 -0
- package/node_modules/rimraf/dist/esm/retry-busy.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts +3 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.js +5 -0
- package/node_modules/rimraf/dist/esm/rimraf-manual.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.js +133 -0
- package/node_modules/rimraf/dist/esm/rimraf-move-remove.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.js +19 -0
- package/node_modules/rimraf/dist/esm/rimraf-native.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.js +97 -0
- package/node_modules/rimraf/dist/esm/rimraf-posix.js.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.js +154 -0
- package/node_modules/rimraf/dist/esm/rimraf-windows.js.map +1 -0
- package/node_modules/rimraf/dist/esm/use-native.d.ts +4 -0
- package/node_modules/rimraf/dist/esm/use-native.d.ts.map +1 -0
- package/node_modules/rimraf/dist/esm/use-native.js +15 -0
- package/node_modules/rimraf/dist/esm/use-native.js.map +1 -0
- package/node_modules/rimraf/package.json +77 -0
- package/node_modules/tunnel/.idea/encodings.xml +6 -0
- package/node_modules/tunnel/.idea/modules.xml +8 -0
- package/node_modules/tunnel/.idea/node-tunnel.iml +12 -0
- package/node_modules/tunnel/.idea/vcs.xml +6 -0
- package/node_modules/tunnel/.idea/workspace.xml +797 -0
- package/node_modules/tunnel/.travis.yml +6 -0
- package/node_modules/tunnel/CHANGELOG.md +22 -0
- package/node_modules/tunnel/LICENSE +21 -0
- package/node_modules/tunnel/README.md +185 -0
- package/node_modules/tunnel/index.js +1 -0
- package/node_modules/tunnel/lib/tunnel.js +264 -0
- package/node_modules/tunnel/package.json +34 -0
- package/node_modules/wcwidth/.npmignore +1 -0
- package/node_modules/wcwidth/LICENSE +30 -0
- package/node_modules/wcwidth/Readme.md +33 -0
- package/node_modules/wcwidth/combining.js +50 -0
- package/node_modules/wcwidth/docs/index.md +65 -0
- package/node_modules/wcwidth/index.js +99 -0
- package/node_modules/wcwidth/package.json +42 -0
- package/node_modules/wcwidth/test/index.js +64 -0
- package/npm-shrinkwrap.json +272 -601
- package/package.json +7 -5
|
@@ -0,0 +1,841 @@
|
|
|
1
|
+
// parse a single path portion
|
|
2
|
+
var _a;
|
|
3
|
+
import { parseClass } from './brace-expressions.js';
|
|
4
|
+
import { unescape } from './unescape.js';
|
|
5
|
+
const types = new Set(['!', '?', '+', '*', '@']);
|
|
6
|
+
const isExtglobType = (c) => types.has(c);
|
|
7
|
+
const isExtglobAST = (c) => isExtglobType(c.type);
|
|
8
|
+
// Map of which extglob types can adopt the children of a nested extglob
|
|
9
|
+
//
|
|
10
|
+
// anything but ! can adopt a matching type:
|
|
11
|
+
// +(a|+(b|c)|d) => +(a|b|c|d)
|
|
12
|
+
// *(a|*(b|c)|d) => *(a|b|c|d)
|
|
13
|
+
// @(a|@(b|c)|d) => @(a|b|c|d)
|
|
14
|
+
// ?(a|?(b|c)|d) => ?(a|b|c|d)
|
|
15
|
+
//
|
|
16
|
+
// * can adopt anything, because 0 or repetition is allowed
|
|
17
|
+
// *(a|?(b|c)|d) => *(a|b|c|d)
|
|
18
|
+
// *(a|+(b|c)|d) => *(a|b|c|d)
|
|
19
|
+
// *(a|@(b|c)|d) => *(a|b|c|d)
|
|
20
|
+
//
|
|
21
|
+
// + can adopt @, because 1 or repetition is allowed
|
|
22
|
+
// +(a|@(b|c)|d) => +(a|b|c|d)
|
|
23
|
+
//
|
|
24
|
+
// + and @ CANNOT adopt *, because 0 would be allowed
|
|
25
|
+
// +(a|*(b|c)|d) => would match "", on *(b|c)
|
|
26
|
+
// @(a|*(b|c)|d) => would match "", on *(b|c)
|
|
27
|
+
//
|
|
28
|
+
// + and @ CANNOT adopt ?, because 0 would be allowed
|
|
29
|
+
// +(a|?(b|c)|d) => would match "", on ?(b|c)
|
|
30
|
+
// @(a|?(b|c)|d) => would match "", on ?(b|c)
|
|
31
|
+
//
|
|
32
|
+
// ? can adopt @, because 0 or 1 is allowed
|
|
33
|
+
// ?(a|@(b|c)|d) => ?(a|b|c|d)
|
|
34
|
+
//
|
|
35
|
+
// ? and @ CANNOT adopt * or +, because >1 would be allowed
|
|
36
|
+
// ?(a|*(b|c)|d) => would match bbb on *(b|c)
|
|
37
|
+
// @(a|*(b|c)|d) => would match bbb on *(b|c)
|
|
38
|
+
// ?(a|+(b|c)|d) => would match bbb on +(b|c)
|
|
39
|
+
// @(a|+(b|c)|d) => would match bbb on +(b|c)
|
|
40
|
+
//
|
|
41
|
+
// ! CANNOT adopt ! (nothing else can either)
|
|
42
|
+
// !(a|!(b|c)|d) => !(a|b|c|d) would fail to match on b (not not b|c)
|
|
43
|
+
//
|
|
44
|
+
// ! can adopt @
|
|
45
|
+
// !(a|@(b|c)|d) => !(a|b|c|d)
|
|
46
|
+
//
|
|
47
|
+
// ! CANNOT adopt *
|
|
48
|
+
// !(a|*(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
|
|
49
|
+
//
|
|
50
|
+
// ! CANNOT adopt +
|
|
51
|
+
// !(a|+(b|c)|d) => !(a|b|c|d) would match on bbb, not allowed
|
|
52
|
+
//
|
|
53
|
+
// ! CANNOT adopt ?
|
|
54
|
+
// x!(a|?(b|c)|d) => x!(a|b|c|d) would fail to match "x"
|
|
55
|
+
const adoptionMap = new Map([
|
|
56
|
+
['!', ['@']],
|
|
57
|
+
['?', ['?', '@']],
|
|
58
|
+
['@', ['@']],
|
|
59
|
+
['*', ['*', '+', '?', '@']],
|
|
60
|
+
['+', ['+', '@']],
|
|
61
|
+
]);
|
|
62
|
+
// nested extglobs that can be adopted in, but with the addition of
|
|
63
|
+
// a blank '' element.
|
|
64
|
+
const adoptionWithSpaceMap = new Map([
|
|
65
|
+
['!', ['?']],
|
|
66
|
+
['@', ['?']],
|
|
67
|
+
['+', ['?', '*']],
|
|
68
|
+
]);
|
|
69
|
+
// union of the previous two maps
|
|
70
|
+
const adoptionAnyMap = new Map([
|
|
71
|
+
['!', ['?', '@']],
|
|
72
|
+
['?', ['?', '@']],
|
|
73
|
+
['@', ['?', '@']],
|
|
74
|
+
['*', ['*', '+', '?', '@']],
|
|
75
|
+
['+', ['+', '@', '?', '*']],
|
|
76
|
+
]);
|
|
77
|
+
// Extglobs that can take over their parent if they are the only child
|
|
78
|
+
// the key is parent, value maps child to resulting extglob parent type
|
|
79
|
+
// '@' is omitted because it's a special case. An `@` extglob with a single
|
|
80
|
+
// member can always be usurped by that subpattern.
|
|
81
|
+
const usurpMap = new Map([
|
|
82
|
+
['!', new Map([['!', '@']])],
|
|
83
|
+
[
|
|
84
|
+
'?',
|
|
85
|
+
new Map([
|
|
86
|
+
['*', '*'],
|
|
87
|
+
['+', '*'],
|
|
88
|
+
]),
|
|
89
|
+
],
|
|
90
|
+
[
|
|
91
|
+
'@',
|
|
92
|
+
new Map([
|
|
93
|
+
['!', '!'],
|
|
94
|
+
['?', '?'],
|
|
95
|
+
['@', '@'],
|
|
96
|
+
['*', '*'],
|
|
97
|
+
['+', '+'],
|
|
98
|
+
]),
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
'+',
|
|
102
|
+
new Map([
|
|
103
|
+
['?', '*'],
|
|
104
|
+
['*', '*'],
|
|
105
|
+
]),
|
|
106
|
+
],
|
|
107
|
+
]);
|
|
108
|
+
// Patterns that get prepended to bind to the start of either the
|
|
109
|
+
// entire string, or just a single path portion, to prevent dots
|
|
110
|
+
// and/or traversal patterns, when needed.
|
|
111
|
+
// Exts don't need the ^ or / bit, because the root binds that already.
|
|
112
|
+
const startNoTraversal = '(?!(?:^|/)\\.\\.?(?:$|/))';
|
|
113
|
+
const startNoDot = '(?!\\.)';
|
|
114
|
+
// characters that indicate a start of pattern needs the "no dots" bit,
|
|
115
|
+
// because a dot *might* be matched. ( is not in the list, because in
|
|
116
|
+
// the case of a child extglob, it will handle the prevention itself.
|
|
117
|
+
const addPatternStart = new Set(['[', '.']);
|
|
118
|
+
// cases where traversal is A-OK, no dot prevention needed
|
|
119
|
+
const justDots = new Set(['..', '.']);
|
|
120
|
+
const reSpecials = new Set('().*{}+?[]^$\\!');
|
|
121
|
+
const regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&');
|
|
122
|
+
// any single thing other than /
|
|
123
|
+
const qmark = '[^/]';
|
|
124
|
+
// * => any number of characters
|
|
125
|
+
const star = qmark + '*?';
|
|
126
|
+
// use + when we need to ensure that *something* matches, because the * is
|
|
127
|
+
// the only thing in the path portion.
|
|
128
|
+
const starNoEmpty = qmark + '+?';
|
|
129
|
+
// remove the \ chars that we added if we end up doing a nonmagic compare
|
|
130
|
+
// const deslash = (s: string) => s.replace(/\\(.)/g, '$1')
|
|
131
|
+
let ID = 0;
|
|
132
|
+
export class AST {
|
|
133
|
+
type;
|
|
134
|
+
#root;
|
|
135
|
+
#hasMagic;
|
|
136
|
+
#uflag = false;
|
|
137
|
+
#parts = [];
|
|
138
|
+
#parent;
|
|
139
|
+
#parentIndex;
|
|
140
|
+
#negs;
|
|
141
|
+
#filledNegs = false;
|
|
142
|
+
#options;
|
|
143
|
+
#toString;
|
|
144
|
+
// set to true if it's an extglob with no children
|
|
145
|
+
// (which really means one child of '')
|
|
146
|
+
#emptyExt = false;
|
|
147
|
+
id = ++ID;
|
|
148
|
+
get depth() {
|
|
149
|
+
return (this.#parent?.depth ?? -1) + 1;
|
|
150
|
+
}
|
|
151
|
+
[Symbol.for('nodejs.util.inspect.custom')]() {
|
|
152
|
+
return {
|
|
153
|
+
'@@type': 'AST',
|
|
154
|
+
id: this.id,
|
|
155
|
+
type: this.type,
|
|
156
|
+
root: this.#root.id,
|
|
157
|
+
parent: this.#parent?.id,
|
|
158
|
+
depth: this.depth,
|
|
159
|
+
partsLength: this.#parts.length,
|
|
160
|
+
parts: this.#parts,
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
constructor(type, parent, options = {}) {
|
|
164
|
+
this.type = type;
|
|
165
|
+
// extglobs are inherently magical
|
|
166
|
+
if (type)
|
|
167
|
+
this.#hasMagic = true;
|
|
168
|
+
this.#parent = parent;
|
|
169
|
+
this.#root = this.#parent ? this.#parent.#root : this;
|
|
170
|
+
this.#options = this.#root === this ? options : this.#root.#options;
|
|
171
|
+
this.#negs = this.#root === this ? [] : this.#root.#negs;
|
|
172
|
+
if (type === '!' && !this.#root.#filledNegs)
|
|
173
|
+
this.#negs.push(this);
|
|
174
|
+
this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0;
|
|
175
|
+
}
|
|
176
|
+
get hasMagic() {
|
|
177
|
+
/* c8 ignore start */
|
|
178
|
+
if (this.#hasMagic !== undefined)
|
|
179
|
+
return this.#hasMagic;
|
|
180
|
+
/* c8 ignore stop */
|
|
181
|
+
for (const p of this.#parts) {
|
|
182
|
+
if (typeof p === 'string')
|
|
183
|
+
continue;
|
|
184
|
+
if (p.type || p.hasMagic)
|
|
185
|
+
return (this.#hasMagic = true);
|
|
186
|
+
}
|
|
187
|
+
// note: will be undefined until we generate the regexp src and find out
|
|
188
|
+
return this.#hasMagic;
|
|
189
|
+
}
|
|
190
|
+
// reconstructs the pattern
|
|
191
|
+
toString() {
|
|
192
|
+
return (this.#toString !== undefined ? this.#toString
|
|
193
|
+
: !this.type ?
|
|
194
|
+
(this.#toString = this.#parts.map(p => String(p)).join(''))
|
|
195
|
+
: (this.#toString =
|
|
196
|
+
this.type +
|
|
197
|
+
'(' +
|
|
198
|
+
this.#parts.map(p => String(p)).join('|') +
|
|
199
|
+
')'));
|
|
200
|
+
}
|
|
201
|
+
#fillNegs() {
|
|
202
|
+
/* c8 ignore start */
|
|
203
|
+
if (this !== this.#root)
|
|
204
|
+
throw new Error('should only call on root');
|
|
205
|
+
if (this.#filledNegs)
|
|
206
|
+
return this;
|
|
207
|
+
/* c8 ignore stop */
|
|
208
|
+
// call toString() once to fill this out
|
|
209
|
+
this.toString();
|
|
210
|
+
this.#filledNegs = true;
|
|
211
|
+
let n;
|
|
212
|
+
while ((n = this.#negs.pop())) {
|
|
213
|
+
if (n.type !== '!')
|
|
214
|
+
continue;
|
|
215
|
+
// walk up the tree, appending everthing that comes AFTER parentIndex
|
|
216
|
+
let p = n;
|
|
217
|
+
let pp = p.#parent;
|
|
218
|
+
while (pp) {
|
|
219
|
+
for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) {
|
|
220
|
+
for (const part of n.#parts) {
|
|
221
|
+
/* c8 ignore start */
|
|
222
|
+
if (typeof part === 'string') {
|
|
223
|
+
throw new Error('string part in extglob AST??');
|
|
224
|
+
}
|
|
225
|
+
/* c8 ignore stop */
|
|
226
|
+
part.copyIn(pp.#parts[i]);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
p = pp;
|
|
230
|
+
pp = p.#parent;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
return this;
|
|
234
|
+
}
|
|
235
|
+
push(...parts) {
|
|
236
|
+
for (const p of parts) {
|
|
237
|
+
if (p === '')
|
|
238
|
+
continue;
|
|
239
|
+
/* c8 ignore start */
|
|
240
|
+
if (typeof p !== 'string' &&
|
|
241
|
+
!(p instanceof _a && p.#parent === this)) {
|
|
242
|
+
throw new Error('invalid part: ' + p);
|
|
243
|
+
}
|
|
244
|
+
/* c8 ignore stop */
|
|
245
|
+
this.#parts.push(p);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
toJSON() {
|
|
249
|
+
const ret = this.type === null ?
|
|
250
|
+
this.#parts
|
|
251
|
+
.slice()
|
|
252
|
+
.map(p => (typeof p === 'string' ? p : p.toJSON()))
|
|
253
|
+
: [this.type, ...this.#parts.map(p => p.toJSON())];
|
|
254
|
+
if (this.isStart() && !this.type)
|
|
255
|
+
ret.unshift([]);
|
|
256
|
+
if (this.isEnd() &&
|
|
257
|
+
(this === this.#root ||
|
|
258
|
+
(this.#root.#filledNegs && this.#parent?.type === '!'))) {
|
|
259
|
+
ret.push({});
|
|
260
|
+
}
|
|
261
|
+
return ret;
|
|
262
|
+
}
|
|
263
|
+
isStart() {
|
|
264
|
+
if (this.#root === this)
|
|
265
|
+
return true;
|
|
266
|
+
// if (this.type) return !!this.#parent?.isStart()
|
|
267
|
+
if (!this.#parent?.isStart())
|
|
268
|
+
return false;
|
|
269
|
+
if (this.#parentIndex === 0)
|
|
270
|
+
return true;
|
|
271
|
+
// if everything AHEAD of this is a negation, then it's still the "start"
|
|
272
|
+
const p = this.#parent;
|
|
273
|
+
for (let i = 0; i < this.#parentIndex; i++) {
|
|
274
|
+
const pp = p.#parts[i];
|
|
275
|
+
if (!(pp instanceof _a && pp.type === '!')) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
return true;
|
|
280
|
+
}
|
|
281
|
+
isEnd() {
|
|
282
|
+
if (this.#root === this)
|
|
283
|
+
return true;
|
|
284
|
+
if (this.#parent?.type === '!')
|
|
285
|
+
return true;
|
|
286
|
+
if (!this.#parent?.isEnd())
|
|
287
|
+
return false;
|
|
288
|
+
if (!this.type)
|
|
289
|
+
return this.#parent?.isEnd();
|
|
290
|
+
// if not root, it'll always have a parent
|
|
291
|
+
/* c8 ignore start */
|
|
292
|
+
const pl = this.#parent ? this.#parent.#parts.length : 0;
|
|
293
|
+
/* c8 ignore stop */
|
|
294
|
+
return this.#parentIndex === pl - 1;
|
|
295
|
+
}
|
|
296
|
+
copyIn(part) {
|
|
297
|
+
if (typeof part === 'string')
|
|
298
|
+
this.push(part);
|
|
299
|
+
else
|
|
300
|
+
this.push(part.clone(this));
|
|
301
|
+
}
|
|
302
|
+
clone(parent) {
|
|
303
|
+
const c = new _a(this.type, parent);
|
|
304
|
+
for (const p of this.#parts) {
|
|
305
|
+
c.copyIn(p);
|
|
306
|
+
}
|
|
307
|
+
return c;
|
|
308
|
+
}
|
|
309
|
+
static #parseAST(str, ast, pos, opt, extDepth) {
|
|
310
|
+
const maxDepth = opt.maxExtglobRecursion ?? 2;
|
|
311
|
+
let escaping = false;
|
|
312
|
+
let inBrace = false;
|
|
313
|
+
let braceStart = -1;
|
|
314
|
+
let braceNeg = false;
|
|
315
|
+
if (ast.type === null) {
|
|
316
|
+
// outside of a extglob, append until we find a start
|
|
317
|
+
let i = pos;
|
|
318
|
+
let acc = '';
|
|
319
|
+
while (i < str.length) {
|
|
320
|
+
const c = str.charAt(i++);
|
|
321
|
+
// still accumulate escapes at this point, but we do ignore
|
|
322
|
+
// starts that are escaped
|
|
323
|
+
if (escaping || c === '\\') {
|
|
324
|
+
escaping = !escaping;
|
|
325
|
+
acc += c;
|
|
326
|
+
continue;
|
|
327
|
+
}
|
|
328
|
+
if (inBrace) {
|
|
329
|
+
if (i === braceStart + 1) {
|
|
330
|
+
if (c === '^' || c === '!') {
|
|
331
|
+
braceNeg = true;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
|
|
335
|
+
inBrace = false;
|
|
336
|
+
}
|
|
337
|
+
acc += c;
|
|
338
|
+
continue;
|
|
339
|
+
}
|
|
340
|
+
else if (c === '[') {
|
|
341
|
+
inBrace = true;
|
|
342
|
+
braceStart = i;
|
|
343
|
+
braceNeg = false;
|
|
344
|
+
acc += c;
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
// we don't have to check for adoption here, because that's
|
|
348
|
+
// done at the other recursion point.
|
|
349
|
+
const doRecurse = !opt.noext &&
|
|
350
|
+
isExtglobType(c) &&
|
|
351
|
+
str.charAt(i) === '(' &&
|
|
352
|
+
extDepth <= maxDepth;
|
|
353
|
+
if (doRecurse) {
|
|
354
|
+
ast.push(acc);
|
|
355
|
+
acc = '';
|
|
356
|
+
const ext = new _a(c, ast);
|
|
357
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + 1);
|
|
358
|
+
ast.push(ext);
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
acc += c;
|
|
362
|
+
}
|
|
363
|
+
ast.push(acc);
|
|
364
|
+
return i;
|
|
365
|
+
}
|
|
366
|
+
// some kind of extglob, pos is at the (
|
|
367
|
+
// find the next | or )
|
|
368
|
+
let i = pos + 1;
|
|
369
|
+
let part = new _a(null, ast);
|
|
370
|
+
const parts = [];
|
|
371
|
+
let acc = '';
|
|
372
|
+
while (i < str.length) {
|
|
373
|
+
const c = str.charAt(i++);
|
|
374
|
+
// still accumulate escapes at this point, but we do ignore
|
|
375
|
+
// starts that are escaped
|
|
376
|
+
if (escaping || c === '\\') {
|
|
377
|
+
escaping = !escaping;
|
|
378
|
+
acc += c;
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
if (inBrace) {
|
|
382
|
+
if (i === braceStart + 1) {
|
|
383
|
+
if (c === '^' || c === '!') {
|
|
384
|
+
braceNeg = true;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
else if (c === ']' && !(i === braceStart + 2 && braceNeg)) {
|
|
388
|
+
inBrace = false;
|
|
389
|
+
}
|
|
390
|
+
acc += c;
|
|
391
|
+
continue;
|
|
392
|
+
}
|
|
393
|
+
else if (c === '[') {
|
|
394
|
+
inBrace = true;
|
|
395
|
+
braceStart = i;
|
|
396
|
+
braceNeg = false;
|
|
397
|
+
acc += c;
|
|
398
|
+
continue;
|
|
399
|
+
}
|
|
400
|
+
const doRecurse = !opt.noext &&
|
|
401
|
+
isExtglobType(c) &&
|
|
402
|
+
str.charAt(i) === '(' &&
|
|
403
|
+
/* c8 ignore start - the maxDepth is sufficient here */
|
|
404
|
+
(extDepth <= maxDepth || (ast && ast.#canAdoptType(c)));
|
|
405
|
+
/* c8 ignore stop */
|
|
406
|
+
if (doRecurse) {
|
|
407
|
+
const depthAdd = ast && ast.#canAdoptType(c) ? 0 : 1;
|
|
408
|
+
part.push(acc);
|
|
409
|
+
acc = '';
|
|
410
|
+
const ext = new _a(c, part);
|
|
411
|
+
part.push(ext);
|
|
412
|
+
i = _a.#parseAST(str, ext, i, opt, extDepth + depthAdd);
|
|
413
|
+
continue;
|
|
414
|
+
}
|
|
415
|
+
if (c === '|') {
|
|
416
|
+
part.push(acc);
|
|
417
|
+
acc = '';
|
|
418
|
+
parts.push(part);
|
|
419
|
+
part = new _a(null, ast);
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
if (c === ')') {
|
|
423
|
+
if (acc === '' && ast.#parts.length === 0) {
|
|
424
|
+
ast.#emptyExt = true;
|
|
425
|
+
}
|
|
426
|
+
part.push(acc);
|
|
427
|
+
acc = '';
|
|
428
|
+
ast.push(...parts, part);
|
|
429
|
+
return i;
|
|
430
|
+
}
|
|
431
|
+
acc += c;
|
|
432
|
+
}
|
|
433
|
+
// unfinished extglob
|
|
434
|
+
// if we got here, it was a malformed extglob! not an extglob, but
|
|
435
|
+
// maybe something else in there.
|
|
436
|
+
ast.type = null;
|
|
437
|
+
ast.#hasMagic = undefined;
|
|
438
|
+
ast.#parts = [str.substring(pos - 1)];
|
|
439
|
+
return i;
|
|
440
|
+
}
|
|
441
|
+
#canAdoptWithSpace(child) {
|
|
442
|
+
return this.#canAdopt(child, adoptionWithSpaceMap);
|
|
443
|
+
}
|
|
444
|
+
#canAdopt(child, map = adoptionMap) {
|
|
445
|
+
if (!child ||
|
|
446
|
+
typeof child !== 'object' ||
|
|
447
|
+
child.type !== null ||
|
|
448
|
+
child.#parts.length !== 1 ||
|
|
449
|
+
this.type === null) {
|
|
450
|
+
return false;
|
|
451
|
+
}
|
|
452
|
+
const gc = child.#parts[0];
|
|
453
|
+
if (!gc || typeof gc !== 'object' || gc.type === null) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
return this.#canAdoptType(gc.type, map);
|
|
457
|
+
}
|
|
458
|
+
#canAdoptType(c, map = adoptionAnyMap) {
|
|
459
|
+
return !!map.get(this.type)?.includes(c);
|
|
460
|
+
}
|
|
461
|
+
#adoptWithSpace(child, index) {
|
|
462
|
+
const gc = child.#parts[0];
|
|
463
|
+
const blank = new _a(null, gc, this.options);
|
|
464
|
+
blank.#parts.push('');
|
|
465
|
+
gc.push(blank);
|
|
466
|
+
this.#adopt(child, index);
|
|
467
|
+
}
|
|
468
|
+
#adopt(child, index) {
|
|
469
|
+
const gc = child.#parts[0];
|
|
470
|
+
this.#parts.splice(index, 1, ...gc.#parts);
|
|
471
|
+
for (const p of gc.#parts) {
|
|
472
|
+
if (typeof p === 'object')
|
|
473
|
+
p.#parent = this;
|
|
474
|
+
}
|
|
475
|
+
this.#toString = undefined;
|
|
476
|
+
}
|
|
477
|
+
#canUsurpType(c) {
|
|
478
|
+
const m = usurpMap.get(this.type);
|
|
479
|
+
return !!m?.has(c);
|
|
480
|
+
}
|
|
481
|
+
#canUsurp(child) {
|
|
482
|
+
if (!child ||
|
|
483
|
+
typeof child !== 'object' ||
|
|
484
|
+
child.type !== null ||
|
|
485
|
+
child.#parts.length !== 1 ||
|
|
486
|
+
this.type === null ||
|
|
487
|
+
this.#parts.length !== 1) {
|
|
488
|
+
return false;
|
|
489
|
+
}
|
|
490
|
+
const gc = child.#parts[0];
|
|
491
|
+
if (!gc || typeof gc !== 'object' || gc.type === null) {
|
|
492
|
+
return false;
|
|
493
|
+
}
|
|
494
|
+
return this.#canUsurpType(gc.type);
|
|
495
|
+
}
|
|
496
|
+
#usurp(child) {
|
|
497
|
+
const m = usurpMap.get(this.type);
|
|
498
|
+
const gc = child.#parts[0];
|
|
499
|
+
const nt = m?.get(gc.type);
|
|
500
|
+
/* c8 ignore start - impossible */
|
|
501
|
+
if (!nt)
|
|
502
|
+
return false;
|
|
503
|
+
/* c8 ignore stop */
|
|
504
|
+
this.#parts = gc.#parts;
|
|
505
|
+
for (const p of this.#parts) {
|
|
506
|
+
if (typeof p === 'object') {
|
|
507
|
+
p.#parent = this;
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
this.type = nt;
|
|
511
|
+
this.#toString = undefined;
|
|
512
|
+
this.#emptyExt = false;
|
|
513
|
+
}
|
|
514
|
+
static fromGlob(pattern, options = {}) {
|
|
515
|
+
const ast = new _a(null, undefined, options);
|
|
516
|
+
_a.#parseAST(pattern, ast, 0, options, 0);
|
|
517
|
+
return ast;
|
|
518
|
+
}
|
|
519
|
+
// returns the regular expression if there's magic, or the unescaped
|
|
520
|
+
// string if not.
|
|
521
|
+
toMMPattern() {
|
|
522
|
+
// should only be called on root
|
|
523
|
+
/* c8 ignore start */
|
|
524
|
+
if (this !== this.#root)
|
|
525
|
+
return this.#root.toMMPattern();
|
|
526
|
+
/* c8 ignore stop */
|
|
527
|
+
const glob = this.toString();
|
|
528
|
+
const [re, body, hasMagic, uflag] = this.toRegExpSource();
|
|
529
|
+
// if we're in nocase mode, and not nocaseMagicOnly, then we do
|
|
530
|
+
// still need a regular expression if we have to case-insensitively
|
|
531
|
+
// match capital/lowercase characters.
|
|
532
|
+
const anyMagic = hasMagic ||
|
|
533
|
+
this.#hasMagic ||
|
|
534
|
+
(this.#options.nocase &&
|
|
535
|
+
!this.#options.nocaseMagicOnly &&
|
|
536
|
+
glob.toUpperCase() !== glob.toLowerCase());
|
|
537
|
+
if (!anyMagic) {
|
|
538
|
+
return body;
|
|
539
|
+
}
|
|
540
|
+
const flags = (this.#options.nocase ? 'i' : '') + (uflag ? 'u' : '');
|
|
541
|
+
return Object.assign(new RegExp(`^${re}$`, flags), {
|
|
542
|
+
_src: re,
|
|
543
|
+
_glob: glob,
|
|
544
|
+
});
|
|
545
|
+
}
|
|
546
|
+
get options() {
|
|
547
|
+
return this.#options;
|
|
548
|
+
}
|
|
549
|
+
// returns the string match, the regexp source, whether there's magic
|
|
550
|
+
// in the regexp (so a regular expression is required) and whether or
|
|
551
|
+
// not the uflag is needed for the regular expression (for posix classes)
|
|
552
|
+
// TODO: instead of injecting the start/end at this point, just return
|
|
553
|
+
// the BODY of the regexp, along with the start/end portions suitable
|
|
554
|
+
// for binding the start/end in either a joined full-path makeRe context
|
|
555
|
+
// (where we bind to (^|/), or a standalone matchPart context (where
|
|
556
|
+
// we bind to ^, and not /). Otherwise slashes get duped!
|
|
557
|
+
//
|
|
558
|
+
// In part-matching mode, the start is:
|
|
559
|
+
// - if not isStart: nothing
|
|
560
|
+
// - if traversal possible, but not allowed: ^(?!\.\.?$)
|
|
561
|
+
// - if dots allowed or not possible: ^
|
|
562
|
+
// - if dots possible and not allowed: ^(?!\.)
|
|
563
|
+
// end is:
|
|
564
|
+
// - if not isEnd(): nothing
|
|
565
|
+
// - else: $
|
|
566
|
+
//
|
|
567
|
+
// In full-path matching mode, we put the slash at the START of the
|
|
568
|
+
// pattern, so start is:
|
|
569
|
+
// - if first pattern: same as part-matching mode
|
|
570
|
+
// - if not isStart(): nothing
|
|
571
|
+
// - if traversal possible, but not allowed: /(?!\.\.?(?:$|/))
|
|
572
|
+
// - if dots allowed or not possible: /
|
|
573
|
+
// - if dots possible and not allowed: /(?!\.)
|
|
574
|
+
// end is:
|
|
575
|
+
// - if last pattern, same as part-matching mode
|
|
576
|
+
// - else nothing
|
|
577
|
+
//
|
|
578
|
+
// Always put the (?:$|/) on negated tails, though, because that has to be
|
|
579
|
+
// there to bind the end of the negated pattern portion, and it's easier to
|
|
580
|
+
// just stick it in now rather than try to inject it later in the middle of
|
|
581
|
+
// the pattern.
|
|
582
|
+
//
|
|
583
|
+
// We can just always return the same end, and leave it up to the caller
|
|
584
|
+
// to know whether it's going to be used joined or in parts.
|
|
585
|
+
// And, if the start is adjusted slightly, can do the same there:
|
|
586
|
+
// - if not isStart: nothing
|
|
587
|
+
// - if traversal possible, but not allowed: (?:/|^)(?!\.\.?$)
|
|
588
|
+
// - if dots allowed or not possible: (?:/|^)
|
|
589
|
+
// - if dots possible and not allowed: (?:/|^)(?!\.)
|
|
590
|
+
//
|
|
591
|
+
// But it's better to have a simpler binding without a conditional, for
|
|
592
|
+
// performance, so probably better to return both start options.
|
|
593
|
+
//
|
|
594
|
+
// Then the caller just ignores the end if it's not the first pattern,
|
|
595
|
+
// and the start always gets applied.
|
|
596
|
+
//
|
|
597
|
+
// But that's always going to be $ if it's the ending pattern, or nothing,
|
|
598
|
+
// so the caller can just attach $ at the end of the pattern when building.
|
|
599
|
+
//
|
|
600
|
+
// So the todo is:
|
|
601
|
+
// - better detect what kind of start is needed
|
|
602
|
+
// - return both flavors of starting pattern
|
|
603
|
+
// - attach $ at the end of the pattern when creating the actual RegExp
|
|
604
|
+
//
|
|
605
|
+
// Ah, but wait, no, that all only applies to the root when the first pattern
|
|
606
|
+
// is not an extglob. If the first pattern IS an extglob, then we need all
|
|
607
|
+
// that dot prevention biz to live in the extglob portions, because eg
|
|
608
|
+
// +(*|.x*) can match .xy but not .yx.
|
|
609
|
+
//
|
|
610
|
+
// So, return the two flavors if it's #root and the first child is not an
|
|
611
|
+
// AST, otherwise leave it to the child AST to handle it, and there,
|
|
612
|
+
// use the (?:^|/) style of start binding.
|
|
613
|
+
//
|
|
614
|
+
// Even simplified further:
|
|
615
|
+
// - Since the start for a join is eg /(?!\.) and the start for a part
|
|
616
|
+
// is ^(?!\.), we can just prepend (?!\.) to the pattern (either root
|
|
617
|
+
// or start or whatever) and prepend ^ or / at the Regexp construction.
|
|
618
|
+
toRegExpSource(allowDot) {
|
|
619
|
+
const dot = allowDot ?? !!this.#options.dot;
|
|
620
|
+
if (this.#root === this) {
|
|
621
|
+
this.#flatten();
|
|
622
|
+
this.#fillNegs();
|
|
623
|
+
}
|
|
624
|
+
if (!isExtglobAST(this)) {
|
|
625
|
+
const noEmpty = this.isStart() &&
|
|
626
|
+
this.isEnd() &&
|
|
627
|
+
!this.#parts.some(s => typeof s !== 'string');
|
|
628
|
+
const src = this.#parts
|
|
629
|
+
.map(p => {
|
|
630
|
+
const [re, _, hasMagic, uflag] = typeof p === 'string' ?
|
|
631
|
+
_a.#parseGlob(p, this.#hasMagic, noEmpty)
|
|
632
|
+
: p.toRegExpSource(allowDot);
|
|
633
|
+
this.#hasMagic = this.#hasMagic || hasMagic;
|
|
634
|
+
this.#uflag = this.#uflag || uflag;
|
|
635
|
+
return re;
|
|
636
|
+
})
|
|
637
|
+
.join('');
|
|
638
|
+
let start = '';
|
|
639
|
+
if (this.isStart()) {
|
|
640
|
+
if (typeof this.#parts[0] === 'string') {
|
|
641
|
+
// this is the string that will match the start of the pattern,
|
|
642
|
+
// so we need to protect against dots and such.
|
|
643
|
+
// '.' and '..' cannot match unless the pattern is that exactly,
|
|
644
|
+
// even if it starts with . or dot:true is set.
|
|
645
|
+
const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]);
|
|
646
|
+
if (!dotTravAllowed) {
|
|
647
|
+
const aps = addPatternStart;
|
|
648
|
+
// check if we have a possibility of matching . or ..,
|
|
649
|
+
// and prevent that.
|
|
650
|
+
const needNoTrav =
|
|
651
|
+
// dots are allowed, and the pattern starts with [ or .
|
|
652
|
+
(dot && aps.has(src.charAt(0))) ||
|
|
653
|
+
// the pattern starts with \., and then [ or .
|
|
654
|
+
(src.startsWith('\\.') && aps.has(src.charAt(2))) ||
|
|
655
|
+
// the pattern starts with \.\., and then [ or .
|
|
656
|
+
(src.startsWith('\\.\\.') && aps.has(src.charAt(4)));
|
|
657
|
+
// no need to prevent dots if it can't match a dot, or if a
|
|
658
|
+
// sub-pattern will be preventing it anyway.
|
|
659
|
+
const needNoDot = !dot && !allowDot && aps.has(src.charAt(0));
|
|
660
|
+
start =
|
|
661
|
+
needNoTrav ? startNoTraversal
|
|
662
|
+
: needNoDot ? startNoDot
|
|
663
|
+
: '';
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
// append the "end of path portion" pattern to negation tails
|
|
668
|
+
let end = '';
|
|
669
|
+
if (this.isEnd() &&
|
|
670
|
+
this.#root.#filledNegs &&
|
|
671
|
+
this.#parent?.type === '!') {
|
|
672
|
+
end = '(?:$|\\/)';
|
|
673
|
+
}
|
|
674
|
+
const final = start + src + end;
|
|
675
|
+
return [
|
|
676
|
+
final,
|
|
677
|
+
unescape(src),
|
|
678
|
+
(this.#hasMagic = !!this.#hasMagic),
|
|
679
|
+
this.#uflag,
|
|
680
|
+
];
|
|
681
|
+
}
|
|
682
|
+
// We need to calculate the body *twice* if it's a repeat pattern
|
|
683
|
+
// at the start, once in nodot mode, then again in dot mode, so a
|
|
684
|
+
// pattern like *(?) can match 'x.y'
|
|
685
|
+
const repeated = this.type === '*' || this.type === '+';
|
|
686
|
+
// some kind of extglob
|
|
687
|
+
const start = this.type === '!' ? '(?:(?!(?:' : '(?:';
|
|
688
|
+
let body = this.#partsToRegExp(dot);
|
|
689
|
+
if (this.isStart() && this.isEnd() && !body && this.type !== '!') {
|
|
690
|
+
// invalid extglob, has to at least be *something* present, if it's
|
|
691
|
+
// the entire path portion.
|
|
692
|
+
const s = this.toString();
|
|
693
|
+
const me = this;
|
|
694
|
+
me.#parts = [s];
|
|
695
|
+
me.type = null;
|
|
696
|
+
me.#hasMagic = undefined;
|
|
697
|
+
return [s, unescape(this.toString()), false, false];
|
|
698
|
+
}
|
|
699
|
+
let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ?
|
|
700
|
+
''
|
|
701
|
+
: this.#partsToRegExp(true);
|
|
702
|
+
if (bodyDotAllowed === body) {
|
|
703
|
+
bodyDotAllowed = '';
|
|
704
|
+
}
|
|
705
|
+
if (bodyDotAllowed) {
|
|
706
|
+
body = `(?:${body})(?:${bodyDotAllowed})*?`;
|
|
707
|
+
}
|
|
708
|
+
// an empty !() is exactly equivalent to a starNoEmpty
|
|
709
|
+
let final = '';
|
|
710
|
+
if (this.type === '!' && this.#emptyExt) {
|
|
711
|
+
final = (this.isStart() && !dot ? startNoDot : '') + starNoEmpty;
|
|
712
|
+
}
|
|
713
|
+
else {
|
|
714
|
+
const close = this.type === '!' ?
|
|
715
|
+
// !() must match something,but !(x) can match ''
|
|
716
|
+
'))' +
|
|
717
|
+
(this.isStart() && !dot && !allowDot ? startNoDot : '') +
|
|
718
|
+
star +
|
|
719
|
+
')'
|
|
720
|
+
: this.type === '@' ? ')'
|
|
721
|
+
: this.type === '?' ? ')?'
|
|
722
|
+
: this.type === '+' && bodyDotAllowed ? ')'
|
|
723
|
+
: this.type === '*' && bodyDotAllowed ? `)?`
|
|
724
|
+
: `)${this.type}`;
|
|
725
|
+
final = start + body + close;
|
|
726
|
+
}
|
|
727
|
+
return [
|
|
728
|
+
final,
|
|
729
|
+
unescape(body),
|
|
730
|
+
(this.#hasMagic = !!this.#hasMagic),
|
|
731
|
+
this.#uflag,
|
|
732
|
+
];
|
|
733
|
+
}
|
|
734
|
+
#flatten() {
|
|
735
|
+
if (!isExtglobAST(this)) {
|
|
736
|
+
for (const p of this.#parts) {
|
|
737
|
+
if (typeof p === 'object') {
|
|
738
|
+
p.#flatten();
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
}
|
|
742
|
+
else {
|
|
743
|
+
// do up to 10 passes to flatten as much as possible
|
|
744
|
+
let iterations = 0;
|
|
745
|
+
let done = false;
|
|
746
|
+
do {
|
|
747
|
+
done = true;
|
|
748
|
+
for (let i = 0; i < this.#parts.length; i++) {
|
|
749
|
+
const c = this.#parts[i];
|
|
750
|
+
if (typeof c === 'object') {
|
|
751
|
+
c.#flatten();
|
|
752
|
+
if (this.#canAdopt(c)) {
|
|
753
|
+
done = false;
|
|
754
|
+
this.#adopt(c, i);
|
|
755
|
+
}
|
|
756
|
+
else if (this.#canAdoptWithSpace(c)) {
|
|
757
|
+
done = false;
|
|
758
|
+
this.#adoptWithSpace(c, i);
|
|
759
|
+
}
|
|
760
|
+
else if (this.#canUsurp(c)) {
|
|
761
|
+
done = false;
|
|
762
|
+
this.#usurp(c);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
} while (!done && ++iterations < 10);
|
|
767
|
+
}
|
|
768
|
+
this.#toString = undefined;
|
|
769
|
+
}
|
|
770
|
+
#partsToRegExp(dot) {
|
|
771
|
+
return this.#parts
|
|
772
|
+
.map(p => {
|
|
773
|
+
// extglob ASTs should only contain parent ASTs
|
|
774
|
+
/* c8 ignore start */
|
|
775
|
+
if (typeof p === 'string') {
|
|
776
|
+
throw new Error('string type in extglob ast??');
|
|
777
|
+
}
|
|
778
|
+
/* c8 ignore stop */
|
|
779
|
+
// can ignore hasMagic, because extglobs are already always magic
|
|
780
|
+
const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot);
|
|
781
|
+
this.#uflag = this.#uflag || uflag;
|
|
782
|
+
return re;
|
|
783
|
+
})
|
|
784
|
+
.filter(p => !(this.isStart() && this.isEnd()) || !!p)
|
|
785
|
+
.join('|');
|
|
786
|
+
}
|
|
787
|
+
static #parseGlob(glob, hasMagic, noEmpty = false) {
|
|
788
|
+
let escaping = false;
|
|
789
|
+
let re = '';
|
|
790
|
+
let uflag = false;
|
|
791
|
+
// multiple stars that aren't globstars coalesce into one *
|
|
792
|
+
let inStar = false;
|
|
793
|
+
for (let i = 0; i < glob.length; i++) {
|
|
794
|
+
const c = glob.charAt(i);
|
|
795
|
+
if (escaping) {
|
|
796
|
+
escaping = false;
|
|
797
|
+
re += (reSpecials.has(c) ? '\\' : '') + c;
|
|
798
|
+
continue;
|
|
799
|
+
}
|
|
800
|
+
if (c === '*') {
|
|
801
|
+
if (inStar)
|
|
802
|
+
continue;
|
|
803
|
+
inStar = true;
|
|
804
|
+
re += noEmpty && /^[*]+$/.test(glob) ? starNoEmpty : star;
|
|
805
|
+
hasMagic = true;
|
|
806
|
+
continue;
|
|
807
|
+
}
|
|
808
|
+
else {
|
|
809
|
+
inStar = false;
|
|
810
|
+
}
|
|
811
|
+
if (c === '\\') {
|
|
812
|
+
if (i === glob.length - 1) {
|
|
813
|
+
re += '\\\\';
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
escaping = true;
|
|
817
|
+
}
|
|
818
|
+
continue;
|
|
819
|
+
}
|
|
820
|
+
if (c === '[') {
|
|
821
|
+
const [src, needUflag, consumed, magic] = parseClass(glob, i);
|
|
822
|
+
if (consumed) {
|
|
823
|
+
re += src;
|
|
824
|
+
uflag = uflag || needUflag;
|
|
825
|
+
i += consumed - 1;
|
|
826
|
+
hasMagic = hasMagic || magic;
|
|
827
|
+
continue;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (c === '?') {
|
|
831
|
+
re += qmark;
|
|
832
|
+
hasMagic = true;
|
|
833
|
+
continue;
|
|
834
|
+
}
|
|
835
|
+
re += regExpEscape(c);
|
|
836
|
+
}
|
|
837
|
+
return [re, unescape(glob), !!hasMagic, uflag];
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
_a = AST;
|
|
841
|
+
//# sourceMappingURL=ast.js.map
|