@teammy/server 0.1.4 → 0.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/dist/main.js +11646 -7952
- package/dist/native-pi-entry.js +14 -1
- package/dist/project-pi-entry.js +46 -8
- package/dist/runtime/workflows/task-bootstrap/prompt.md +2 -0
- package/dist/web/assets/{Assistant-B3h2yQF3.css → Assistant-4yZWjYm-.css} +1 -1
- package/dist/web/assets/Assistant-BNVXOHQZ.js +1 -0
- package/dist/web/assets/Dashboard-zKTK6EZD.js +1 -0
- package/dist/web/assets/Files-DI98WkdW.js +1 -0
- package/dist/web/assets/{Markdown-Bq8P_NBV.js → Markdown-D3cU0ani.js} +4 -4
- package/dist/web/assets/Materials-CK-mbNmo.css +1 -0
- package/dist/web/assets/Materials-CWptgAHz.js +6 -0
- package/dist/web/assets/Sessions-DiDwqXLI.js +1 -0
- package/dist/web/assets/WorkspaceTree-DeAA1QtV.js +1 -0
- package/dist/web/assets/{file-links-CFCIacLV.js → file-links-GfCXWkEh.js} +1 -1
- package/dist/web/assets/index-BwEl1PIa.js +66 -0
- package/dist/web/assets/{index-B-MqU_88.css → index-CTIAGUGG.css} +1 -1
- package/dist/web/downloads/teammy-skill.zip +0 -0
- package/dist/web/index.html +2 -2
- package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/README.md +333 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +114 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js +762 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js +142 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts +114 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js +758 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/index.min.js.map +7 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/package.json +3 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts +4 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js +138 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/parse-class.js.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/package.json +56 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/index.ts +900 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
- package/node_modules/@wecom/aibot-node-sdk/README.md +786 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/api.d.ts +17 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/client.d.ts +217 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/crypto.d.ts +12 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js +1563 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.cjs.js.map +1 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.d.ts +1324 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js +1544 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/index.esm.js.map +1 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/logger.d.ts +14 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/message-handler.d.ts +29 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/api.d.ts +466 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/common.d.ts +30 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/config.d.ts +34 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/event.d.ts +109 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/index.d.ts +10 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/types/message.d.ts +158 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/utils.d.ts +19 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/wecom-crypto/index.d.ts +46 -0
- package/node_modules/@wecom/aibot-node-sdk/dist/ws.d.ts +161 -0
- package/node_modules/@wecom/aibot-node-sdk/package.json +43 -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 +1934 -0
- package/node_modules/axios/LICENSE +7 -0
- package/node_modules/axios/MIGRATION_GUIDE.md +877 -0
- package/node_modules/axios/README.md +2786 -0
- package/node_modules/axios/dist/axios.js +6460 -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 +6509 -0
- package/node_modules/axios/dist/esm/axios.js +6530 -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 +7491 -0
- package/node_modules/axios/index.d.cts +785 -0
- package/node_modules/axios/index.d.ts +804 -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 +749 -0
- package/node_modules/axios/lib/adapters/http.js +1609 -0
- package/node_modules/axios/lib/adapters/xhr.js +384 -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 +361 -0
- package/node_modules/axios/lib/core/AxiosError.js +278 -0
- package/node_modules/axios/lib/core/AxiosHeaders.js +487 -0
- package/node_modules/axios/lib/core/InterceptorManager.js +182 -0
- package/node_modules/axios/lib/core/README.md +8 -0
- package/node_modules/axios/lib/core/assertParamsAcyclic.js +49 -0
- package/node_modules/axios/lib/core/buildFullPath.js +76 -0
- package/node_modules/axios/lib/core/createMultipartBody.js +37 -0
- package/node_modules/axios/lib/core/dispatchRequest.js +115 -0
- package/node_modules/axios/lib/core/mergeConfig.js +237 -0
- 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/core/settle.js +27 -0
- package/node_modules/axios/lib/core/transformData.js +28 -0
- package/node_modules/axios/lib/defaults/index.js +178 -0
- package/node_modules/axios/lib/defaults/transitional.js +11 -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 +165 -0
- package/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +59 -0
- package/node_modules/axios/lib/helpers/Http2Sessions.js +122 -0
- package/node_modules/axios/lib/helpers/HttpStatusCode.js +88 -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 +69 -0
- package/node_modules/axios/lib/helpers/callbackify.js +18 -0
- package/node_modules/axios/lib/helpers/combineURLs.js +23 -0
- package/node_modules/axios/lib/helpers/composeSignals.js +71 -0
- package/node_modules/axios/lib/helpers/cookies.js +88 -0
- package/node_modules/axios/lib/helpers/deprecatedMethod.js +31 -0
- package/node_modules/axios/lib/helpers/estimateDataURLDecodedBytes.js +193 -0
- package/node_modules/axios/lib/helpers/formDataToBlob.js +113 -0
- package/node_modules/axios/lib/helpers/formDataToJSON.js +149 -0
- package/node_modules/axios/lib/helpers/formDataToStream.js +119 -0
- package/node_modules/axios/lib/helpers/fromDataURI.js +75 -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 +11 -0
- package/node_modules/axios/lib/helpers/normalizeURLForProtocolCheck.js +24 -0
- package/node_modules/axios/lib/helpers/null.js +2 -0
- package/node_modules/axios/lib/helpers/parseHeaders.js +72 -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 +120 -0
- package/node_modules/axios/lib/helpers/sanitizeHeaderValue.js +60 -0
- package/node_modules/axios/lib/helpers/shouldBypassProxy.js +520 -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 +45 -0
- package/node_modules/axios/lib/helpers/toFormData.js +279 -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/Buffer.js +11 -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 +1201 -0
- package/node_modules/axios/node_modules/agent-base/README.md +145 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.d.ts +78 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js +203 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/index.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.d.ts +4 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js +18 -0
- package/node_modules/axios/node_modules/agent-base/dist/src/promisify.js.map +1 -0
- package/node_modules/axios/node_modules/agent-base/package.json +64 -0
- package/node_modules/axios/node_modules/agent-base/src/index.ts +345 -0
- package/node_modules/axios/node_modules/agent-base/src/promisify.ts +33 -0
- package/node_modules/axios/node_modules/https-proxy-agent/README.md +137 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.d.ts +30 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js +177 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/agent.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.d.ts +23 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js +14 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts +7 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js +66 -0
- package/node_modules/axios/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/axios/node_modules/https-proxy-agent/package.json +56 -0
- package/node_modules/axios/package.json +202 -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/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/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/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/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 +44 -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 +79 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +7 -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/eventemitter3/LICENSE +21 -0
- package/node_modules/eventemitter3/README.md +85 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.js +355 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.esm.min.js.map +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.js +363 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js +1 -0
- package/node_modules/eventemitter3/dist/eventemitter3.umd.min.js.map +1 -0
- package/node_modules/eventemitter3/index.d.ts +135 -0
- package/node_modules/eventemitter3/index.js +336 -0
- package/node_modules/eventemitter3/index.mjs +4 -0
- package/node_modules/eventemitter3/package.json +62 -0
- package/node_modules/follow-redirects/LICENSE +18 -0
- package/node_modules/follow-redirects/README.md +183 -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 +714 -0
- package/node_modules/follow-redirects/package.json +58 -0
- package/node_modules/form-data/CHANGELOG.md +686 -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 +506 -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/README.md +388 -214
- package/node_modules/glob/dist/commonjs/glob.d.ts +20 -11
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/glob.js +22 -29
- package/node_modules/glob/dist/commonjs/glob.js.map +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.d.ts +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/has-magic.js +1 -4
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -1
- package/node_modules/glob/dist/commonjs/ignore.d.ts +16 -4
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/ignore.js +24 -4
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -1
- package/node_modules/glob/dist/commonjs/index.d.ts +3 -2
- package/node_modules/glob/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/index.js.map +1 -1
- package/node_modules/glob/dist/commonjs/index.min.js +2 -3
- package/node_modules/glob/dist/commonjs/index.min.js.map +4 -4
- package/node_modules/glob/dist/commonjs/pattern.d.ts +10 -3
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/pattern.js +27 -15
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -1
- package/node_modules/glob/dist/commonjs/processor.d.ts +23 -10
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/processor.js +36 -23
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -1
- package/node_modules/glob/dist/commonjs/walker.d.ts +19 -17
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -1
- package/node_modules/glob/dist/commonjs/walker.js +50 -35
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -1
- package/node_modules/glob/dist/esm/glob.d.ts +20 -11
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/glob.js +22 -29
- package/node_modules/glob/dist/esm/glob.js.map +1 -1
- package/node_modules/glob/dist/esm/has-magic.d.ts +1 -1
- package/node_modules/glob/dist/esm/has-magic.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/has-magic.js +1 -4
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -1
- package/node_modules/glob/dist/esm/ignore.d.ts +16 -4
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/ignore.js +25 -5
- package/node_modules/glob/dist/esm/ignore.js.map +1 -1
- package/node_modules/glob/dist/esm/index.d.ts +3 -2
- package/node_modules/glob/dist/esm/index.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/index.js.map +1 -1
- package/node_modules/glob/dist/esm/index.min.js +2 -3
- package/node_modules/glob/dist/esm/index.min.js.map +4 -4
- package/node_modules/glob/dist/esm/pattern.d.ts +10 -3
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/pattern.js +27 -15
- package/node_modules/glob/dist/esm/pattern.js.map +1 -1
- package/node_modules/glob/dist/esm/processor.d.ts +23 -10
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/processor.js +36 -23
- package/node_modules/glob/dist/esm/processor.js.map +1 -1
- package/node_modules/glob/dist/esm/walker.d.ts +19 -17
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -1
- package/node_modules/glob/dist/esm/walker.js +51 -36
- package/node_modules/glob/dist/esm/walker.js.map +1 -1
- package/node_modules/glob/package.json +28 -12
- package/node_modules/glob/src/glob.ts +655 -0
- package/node_modules/glob/src/has-magic.ts +23 -0
- package/node_modules/glob/src/ignore.ts +162 -0
- package/node_modules/glob/src/index.ts +225 -0
- package/node_modules/glob/src/pattern.ts +286 -0
- package/node_modules/glob/src/processor.ts +333 -0
- package/node_modules/glob/src/walker.ts +523 -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/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +58 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/eslint.config.mjs +6 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +6 -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/README.md +125 -107
- package/node_modules/minimatch/dist/commonjs/index.d.ts +49 -38
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/commonjs/index.js +782 -359
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -1
- package/node_modules/minimatch/dist/esm/index.d.ts +49 -38
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -1
- package/node_modules/minimatch/dist/esm/index.js +781 -356
- package/node_modules/minimatch/dist/esm/index.js.map +1 -1
- package/node_modules/minimatch/package.json +5 -4
- package/node_modules/path-scurry/README.md +0 -1
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +7 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -1
- package/node_modules/path-scurry/dist/commonjs/index.js +59 -21
- package/node_modules/path-scurry/dist/commonjs/index.js.map +1 -1
- package/node_modules/path-scurry/dist/esm/index.d.ts +7 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -1
- package/node_modules/path-scurry/dist/esm/index.js +42 -14
- package/node_modules/path-scurry/dist/esm/index.js.map +1 -1
- package/node_modules/path-scurry/package.json +4 -4
- 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/package.json +3 -1
- package/dist/web/assets/Assistant-DSQAdSiW.js +0 -1
- package/dist/web/assets/Dashboard-dCu2Cdxd.js +0 -1
- package/dist/web/assets/Files-cRhoWviM.js +0 -1
- package/dist/web/assets/Sessions-BxHsX1C5.js +0 -1
- package/dist/web/assets/WorkspaceTree-CD94JsaJ.js +0 -1
- package/dist/web/assets/index-BXpTaAUz.js +0 -66
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/ast.js +0 -845
- package/node_modules/minimatch/dist/commonjs/ast.js.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -150
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.d.ts +0 -22
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/ast.js +0 -841
- package/node_modules/minimatch/dist/esm/ast.js.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +0 -8
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +0 -1
- package/node_modules/minimatch/dist/esm/brace-expressions.js +0 -146
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +0 -1
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single-use utility classes to provide functionality to the {@link Glob}
|
|
3
|
+
* methods.
|
|
4
|
+
*
|
|
5
|
+
* @module
|
|
6
|
+
*/
|
|
7
|
+
import { Minipass } from 'minipass'
|
|
8
|
+
import type { Form } from 'minimatch'
|
|
9
|
+
import type { Path } from 'path-scurry'
|
|
10
|
+
import type { IgnoreLike } from './ignore.js'
|
|
11
|
+
import { Ignore } from './ignore.js'
|
|
12
|
+
|
|
13
|
+
// XXX can we somehow make it so that it NEVER processes a given path more than
|
|
14
|
+
// once, enough that the match set tracking is no longer needed? that'd speed
|
|
15
|
+
// things up a lot. Or maybe bring back nounique, and skip it in that case?
|
|
16
|
+
|
|
17
|
+
// a single minimatch set entry with 1 or more parts
|
|
18
|
+
import type { Pattern } from './pattern.js'
|
|
19
|
+
import { MatchRecord, Processor } from './processor.js'
|
|
20
|
+
|
|
21
|
+
const { ABSOLUTE, IF_DIR } = MatchRecord
|
|
22
|
+
|
|
23
|
+
export interface GlobWalkerOpts {
|
|
24
|
+
absolute?: boolean
|
|
25
|
+
allowWindowsEscape?: boolean
|
|
26
|
+
cwd?: string | URL
|
|
27
|
+
dot?: boolean
|
|
28
|
+
dotRelative?: boolean
|
|
29
|
+
follow?: boolean
|
|
30
|
+
ignore?: string | string[] | IgnoreLike | ReadonlyArray<string>
|
|
31
|
+
mark?: boolean
|
|
32
|
+
matchBase?: boolean
|
|
33
|
+
// Note: maxDepth here means "maximum actual Path.depth()",
|
|
34
|
+
// not "maximum depth beyond cwd"
|
|
35
|
+
maxDepth?: number
|
|
36
|
+
nobrace?: boolean
|
|
37
|
+
nocase?: boolean
|
|
38
|
+
nodir?: boolean
|
|
39
|
+
noext?: boolean
|
|
40
|
+
noglobstar?: boolean
|
|
41
|
+
normalize?: boolean | Form
|
|
42
|
+
platform?: NodeJS.Platform
|
|
43
|
+
posix?: boolean
|
|
44
|
+
realpath?: boolean
|
|
45
|
+
root?: string
|
|
46
|
+
stat?: boolean
|
|
47
|
+
signal?: AbortSignal
|
|
48
|
+
windowsPathsNoEscape?: boolean
|
|
49
|
+
withFileTypes?: boolean
|
|
50
|
+
includeChildMatches?: boolean
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type GWOFileTypesTrue = GlobWalkerOpts & {
|
|
54
|
+
withFileTypes: true
|
|
55
|
+
}
|
|
56
|
+
export type GWOFileTypesFalse = GlobWalkerOpts & {
|
|
57
|
+
withFileTypes: false
|
|
58
|
+
}
|
|
59
|
+
export type GWOFileTypesUnset = GlobWalkerOpts & {
|
|
60
|
+
withFileTypes?: undefined
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type Result<O extends GlobWalkerOpts> =
|
|
64
|
+
O extends GWOFileTypesTrue ? Path
|
|
65
|
+
: O extends GWOFileTypesFalse ? string
|
|
66
|
+
: O extends GWOFileTypesUnset ? string
|
|
67
|
+
: Path | string
|
|
68
|
+
|
|
69
|
+
export type Matches<O extends GlobWalkerOpts> =
|
|
70
|
+
O extends GWOFileTypesTrue ? Path[]
|
|
71
|
+
: O extends GWOFileTypesFalse ? string[]
|
|
72
|
+
: O extends GWOFileTypesUnset ? string[]
|
|
73
|
+
: (Path | string)[]
|
|
74
|
+
|
|
75
|
+
export type MatchStream<O extends GlobWalkerOpts> = Minipass<
|
|
76
|
+
Result<O>,
|
|
77
|
+
Result<O>
|
|
78
|
+
>
|
|
79
|
+
|
|
80
|
+
const makeIgnore = (
|
|
81
|
+
ignore: string | string[] | IgnoreLike | ReadonlyArray<string>,
|
|
82
|
+
opts: GlobWalkerOpts,
|
|
83
|
+
cwd: Path,
|
|
84
|
+
): IgnoreLike =>
|
|
85
|
+
typeof ignore === 'string' ? new Ignore([ignore], opts, cwd)
|
|
86
|
+
: Array.isArray(ignore) ? new Ignore(ignore, opts, cwd)
|
|
87
|
+
: (ignore as IgnoreLike)
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* basic walking utilities that all the glob walker types use
|
|
91
|
+
*/
|
|
92
|
+
export abstract class GlobUtil<O extends GlobWalkerOpts = GlobWalkerOpts> {
|
|
93
|
+
path: Path
|
|
94
|
+
patterns: Pattern[]
|
|
95
|
+
opts: O
|
|
96
|
+
seen: Set<Path> = new Set<Path>()
|
|
97
|
+
paused: boolean = false
|
|
98
|
+
aborted: boolean = false
|
|
99
|
+
#onResume: (() => unknown)[] = []
|
|
100
|
+
#ignore?: IgnoreLike
|
|
101
|
+
#sep: '\\' | '/'
|
|
102
|
+
signal?: AbortSignal
|
|
103
|
+
maxDepth: number
|
|
104
|
+
includeChildMatches: boolean
|
|
105
|
+
|
|
106
|
+
constructor(patterns: Pattern[], path: Path, opts: O)
|
|
107
|
+
constructor(patterns: Pattern[], path: Path, opts: O) {
|
|
108
|
+
this.patterns = patterns
|
|
109
|
+
this.path = path
|
|
110
|
+
this.opts = opts
|
|
111
|
+
this.#sep = !opts.posix && opts.platform === 'win32' ? '\\' : '/'
|
|
112
|
+
this.includeChildMatches = opts.includeChildMatches !== false
|
|
113
|
+
if (opts.ignore || !this.includeChildMatches) {
|
|
114
|
+
this.#ignore = makeIgnore(opts.ignore ?? [], opts, path)
|
|
115
|
+
if (
|
|
116
|
+
!this.includeChildMatches &&
|
|
117
|
+
typeof this.#ignore.add !== 'function'
|
|
118
|
+
) {
|
|
119
|
+
const m = 'cannot ignore child matches, ignore lacks add() method.'
|
|
120
|
+
throw new Error(m)
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
// ignore, always set with maxDepth, but it's optional on the
|
|
124
|
+
// GlobOptions type
|
|
125
|
+
/* c8 ignore start */
|
|
126
|
+
this.maxDepth = opts.maxDepth || Infinity
|
|
127
|
+
/* c8 ignore stop */
|
|
128
|
+
if (opts.signal) {
|
|
129
|
+
this.signal = opts.signal
|
|
130
|
+
this.signal.addEventListener('abort', () => {
|
|
131
|
+
this.#onResume.length = 0
|
|
132
|
+
})
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
#ignored(path: Path): boolean {
|
|
137
|
+
return this.seen.has(path) || !!this.#ignore?.ignored?.(path)
|
|
138
|
+
}
|
|
139
|
+
#childrenIgnored(path: Path): boolean {
|
|
140
|
+
return !!this.#ignore?.childrenIgnored?.(path)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// backpressure mechanism
|
|
144
|
+
pause() {
|
|
145
|
+
this.paused = true
|
|
146
|
+
}
|
|
147
|
+
resume() {
|
|
148
|
+
/* c8 ignore start */
|
|
149
|
+
if (this.signal?.aborted) return
|
|
150
|
+
/* c8 ignore stop */
|
|
151
|
+
this.paused = false
|
|
152
|
+
let fn: (() => unknown) | undefined = undefined
|
|
153
|
+
while (!this.paused && (fn = this.#onResume.shift())) {
|
|
154
|
+
fn()
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
onResume(fn: () => unknown) {
|
|
158
|
+
/* c8 ignore start */
|
|
159
|
+
if (!this.paused) {
|
|
160
|
+
fn()
|
|
161
|
+
} else {
|
|
162
|
+
/* c8 ignore stop */
|
|
163
|
+
this.#onResume.push(fn)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// do the requisite realpath/stat checking, and return the path
|
|
168
|
+
// to add or undefined to filter it out.
|
|
169
|
+
async matchCheck(
|
|
170
|
+
inPath: Path,
|
|
171
|
+
ifDir: boolean,
|
|
172
|
+
): Promise<Path | undefined> {
|
|
173
|
+
if (ifDir && this.opts.nodir) return undefined
|
|
174
|
+
let rpc: Path | undefined
|
|
175
|
+
let e: Path
|
|
176
|
+
if (this.opts.realpath) {
|
|
177
|
+
rpc = inPath.realpathCached() || (await inPath.realpath())
|
|
178
|
+
if (!rpc) return undefined
|
|
179
|
+
e = rpc
|
|
180
|
+
} else {
|
|
181
|
+
e = inPath
|
|
182
|
+
}
|
|
183
|
+
const needStat = e.isUnknown() || this.opts.stat
|
|
184
|
+
const s = needStat ? await e.lstat() : e
|
|
185
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
186
|
+
const target = await s.realpath()
|
|
187
|
+
/* c8 ignore start */
|
|
188
|
+
if (target && (target.isUnknown() || this.opts.stat)) {
|
|
189
|
+
await target.lstat()
|
|
190
|
+
}
|
|
191
|
+
/* c8 ignore stop */
|
|
192
|
+
}
|
|
193
|
+
return this.matchCheckTest(s, ifDir)
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
matchCheckTest(e: Path | undefined, ifDir: boolean): Path | undefined {
|
|
197
|
+
return (
|
|
198
|
+
e &&
|
|
199
|
+
(this.maxDepth === Infinity || e.depth() <= this.maxDepth) &&
|
|
200
|
+
(!ifDir || e.canReaddir()) &&
|
|
201
|
+
(!this.opts.nodir || !e.isDirectory()) &&
|
|
202
|
+
(!this.opts.nodir ||
|
|
203
|
+
!this.opts.follow ||
|
|
204
|
+
!e.isSymbolicLink() ||
|
|
205
|
+
!e.realpathCached()?.isDirectory()) &&
|
|
206
|
+
!this.#ignored(e)
|
|
207
|
+
) ?
|
|
208
|
+
e
|
|
209
|
+
: undefined
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
matchCheckSync(inPath: Path, ifDir: boolean): Path | undefined {
|
|
213
|
+
if (ifDir && this.opts.nodir) return undefined
|
|
214
|
+
let rpc: Path | undefined
|
|
215
|
+
let e: Path
|
|
216
|
+
if (this.opts.realpath) {
|
|
217
|
+
rpc = inPath.realpathCached() || inPath.realpathSync()
|
|
218
|
+
if (!rpc) return undefined
|
|
219
|
+
e = rpc
|
|
220
|
+
} else {
|
|
221
|
+
e = inPath
|
|
222
|
+
}
|
|
223
|
+
const needStat = e.isUnknown() || this.opts.stat
|
|
224
|
+
const s = needStat ? e.lstatSync() : e
|
|
225
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
226
|
+
const target = s.realpathSync()
|
|
227
|
+
if (target && (target?.isUnknown() || this.opts.stat)) {
|
|
228
|
+
target.lstatSync()
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return this.matchCheckTest(s, ifDir)
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
abstract matchEmit(p: Result<O>): void
|
|
235
|
+
abstract matchEmit(p: string | Path): void
|
|
236
|
+
|
|
237
|
+
matchFinish(e: Path, absolute: boolean) {
|
|
238
|
+
if (this.#ignored(e)) return
|
|
239
|
+
this.#matchEmitChecked(e, absolute)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// emit a match that is known to not be seen or ignored yet
|
|
243
|
+
#matchEmitChecked(e: Path, absolute: boolean) {
|
|
244
|
+
// we know we have an ignore if this is false, but TS doesn't
|
|
245
|
+
if (!this.includeChildMatches && this.#ignore?.add) {
|
|
246
|
+
const ign = `${e.relativePosix()}/**`
|
|
247
|
+
this.#ignore.add(ign)
|
|
248
|
+
}
|
|
249
|
+
const abs =
|
|
250
|
+
this.opts.absolute === undefined ? absolute : this.opts.absolute
|
|
251
|
+
this.seen.add(e)
|
|
252
|
+
const mark = this.opts.mark && e.isDirectory() ? this.#sep : ''
|
|
253
|
+
// ok, we have what we need!
|
|
254
|
+
if (this.opts.withFileTypes) {
|
|
255
|
+
this.matchEmit(e)
|
|
256
|
+
} else if (abs) {
|
|
257
|
+
const abs = this.opts.posix ? e.fullpathPosix() : e.fullpath()
|
|
258
|
+
this.matchEmit(abs + mark)
|
|
259
|
+
} else {
|
|
260
|
+
const rel = this.opts.posix ? e.relativePosix() : e.relative()
|
|
261
|
+
const pre =
|
|
262
|
+
this.opts.dotRelative && !rel.startsWith(`..${this.#sep}`) ?
|
|
263
|
+
`.${this.#sep}`
|
|
264
|
+
: ''
|
|
265
|
+
this.matchEmit(!rel ? `.${mark}` : pre + rel + mark)
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
async match(e: Path, absolute: boolean, ifDir: boolean): Promise<void> {
|
|
270
|
+
const p = await this.matchCheck(e, ifDir)
|
|
271
|
+
if (p) this.matchFinish(p, absolute)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
matchSync(e: Path, absolute: boolean, ifDir: boolean): void {
|
|
275
|
+
// matchCheckSync just checked that it is not seen or ignored, and
|
|
276
|
+
// nothing can have changed since
|
|
277
|
+
const p = this.matchCheckSync(e, ifDir)
|
|
278
|
+
if (p) this.#matchEmitChecked(p, absolute)
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
walkCB(target: Path, patterns: Pattern[], cb: () => unknown) {
|
|
282
|
+
/* c8 ignore start */
|
|
283
|
+
if (this.signal?.aborted) return cb()
|
|
284
|
+
/* c8 ignore stop */
|
|
285
|
+
this.walkCB2(target, patterns, new Processor(this.opts), cb)
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
walkCB2(
|
|
289
|
+
target: Path,
|
|
290
|
+
patterns: Pattern[],
|
|
291
|
+
processor: Processor,
|
|
292
|
+
cb: () => unknown,
|
|
293
|
+
) {
|
|
294
|
+
if (this.#childrenIgnored(target)) return cb()
|
|
295
|
+
if (this.signal?.aborted) return cb()
|
|
296
|
+
if (this.paused) {
|
|
297
|
+
this.onResume(() => this.walkCB2(target, patterns, processor, cb))
|
|
298
|
+
return
|
|
299
|
+
}
|
|
300
|
+
processor.processPatterns(target, patterns)
|
|
301
|
+
|
|
302
|
+
// done processing. all of the above is sync, can be abstracted out.
|
|
303
|
+
// subwalks is a map of paths to the entry filters they need
|
|
304
|
+
// matches is a map of paths to [absolute, ifDir] tuples.
|
|
305
|
+
let tasks = 1
|
|
306
|
+
const next = () => {
|
|
307
|
+
if (--tasks === 0) cb()
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
for (const [m, n] of processor.matches.store) {
|
|
311
|
+
if (this.#ignored(m)) continue
|
|
312
|
+
tasks++
|
|
313
|
+
void this.match(m, !!(n & ABSOLUTE), !!(n & IF_DIR)).then(() =>
|
|
314
|
+
next(),
|
|
315
|
+
)
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
for (const t of processor.subwalkTargets()) {
|
|
319
|
+
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
|
320
|
+
continue
|
|
321
|
+
}
|
|
322
|
+
tasks++
|
|
323
|
+
const childrenCached = t.readdirCached()
|
|
324
|
+
if (t.calledReaddir())
|
|
325
|
+
this.walkCB3(t, childrenCached, processor, next)
|
|
326
|
+
else {
|
|
327
|
+
t.readdirCB(
|
|
328
|
+
(_, entries) => this.walkCB3(t, entries, processor, next),
|
|
329
|
+
true,
|
|
330
|
+
)
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
next()
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
walkCB3(
|
|
338
|
+
target: Path,
|
|
339
|
+
entries: Path[],
|
|
340
|
+
processorx: Processor,
|
|
341
|
+
cb: () => unknown,
|
|
342
|
+
) {
|
|
343
|
+
const proc = processorx.filterEntries(target, entries)
|
|
344
|
+
|
|
345
|
+
let tasks = 1
|
|
346
|
+
const next = () => {
|
|
347
|
+
if (--tasks === 0) cb()
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
for (const [m, n] of proc.matches.store) {
|
|
351
|
+
if (this.#ignored(m)) continue
|
|
352
|
+
tasks++
|
|
353
|
+
void this.match(m, !!(n & ABSOLUTE), !!(n & IF_DIR)).then(() =>
|
|
354
|
+
next(),
|
|
355
|
+
)
|
|
356
|
+
}
|
|
357
|
+
for (const [target, patterns] of proc.subwalks.entries()) {
|
|
358
|
+
tasks++
|
|
359
|
+
this.walkCB2(target, patterns, proc.child(), next)
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
next()
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
walkCBSync(target: Path, patterns: Pattern[], cb: () => unknown) {
|
|
366
|
+
/* c8 ignore start */
|
|
367
|
+
if (this.signal?.aborted) return cb()
|
|
368
|
+
/* c8 ignore stop */
|
|
369
|
+
this.walkCB2Sync(target, patterns, new Processor(this.opts), cb)
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
walkCB2Sync(
|
|
373
|
+
target: Path,
|
|
374
|
+
patterns: Pattern[],
|
|
375
|
+
processor: Processor,
|
|
376
|
+
cb: () => unknown,
|
|
377
|
+
) {
|
|
378
|
+
if (this.#childrenIgnored(target)) return cb()
|
|
379
|
+
if (this.signal?.aborted) return cb()
|
|
380
|
+
if (this.paused) {
|
|
381
|
+
this.onResume(() =>
|
|
382
|
+
this.walkCB2Sync(target, patterns, processor, cb),
|
|
383
|
+
)
|
|
384
|
+
return
|
|
385
|
+
}
|
|
386
|
+
processor.processPatterns(target, patterns)
|
|
387
|
+
|
|
388
|
+
// done processing. all of the above is sync, can be abstracted out.
|
|
389
|
+
// subwalks is a map of paths to the entry filters they need
|
|
390
|
+
// matches is a map of paths to [absolute, ifDir] tuples.
|
|
391
|
+
let tasks = 1
|
|
392
|
+
const next = () => {
|
|
393
|
+
if (--tasks === 0) cb()
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
for (const [m, n] of processor.matches.store) {
|
|
397
|
+
if (this.#ignored(m)) continue
|
|
398
|
+
this.matchSync(m, !!(n & ABSOLUTE), !!(n & IF_DIR))
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
for (const t of processor.subwalkTargets()) {
|
|
402
|
+
if (this.maxDepth !== Infinity && t.depth() >= this.maxDepth) {
|
|
403
|
+
continue
|
|
404
|
+
}
|
|
405
|
+
tasks++
|
|
406
|
+
const children = t.readdirSync()
|
|
407
|
+
this.walkCB3Sync(t, children, processor, next)
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
next()
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
walkCB3Sync(
|
|
414
|
+
target: Path,
|
|
415
|
+
entries: Path[],
|
|
416
|
+
processor: Processor,
|
|
417
|
+
cb: () => unknown,
|
|
418
|
+
) {
|
|
419
|
+
const proc = processor.filterEntries(target, entries)
|
|
420
|
+
|
|
421
|
+
let tasks = 1
|
|
422
|
+
const next = () => {
|
|
423
|
+
if (--tasks === 0) cb()
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
for (const [m, n] of proc.matches.store) {
|
|
427
|
+
if (this.#ignored(m)) continue
|
|
428
|
+
this.matchSync(m, !!(n & ABSOLUTE), !!(n & IF_DIR))
|
|
429
|
+
}
|
|
430
|
+
for (const [target, patterns] of proc.subwalks.entries()) {
|
|
431
|
+
tasks++
|
|
432
|
+
this.walkCB2Sync(target, patterns, proc.child(), next)
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
next()
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export class GlobWalker<
|
|
440
|
+
O extends GlobWalkerOpts = GlobWalkerOpts,
|
|
441
|
+
> extends GlobUtil<O> {
|
|
442
|
+
// each Path is only emitted once (see GlobUtil.seen), so the results
|
|
443
|
+
// do not need to be deduped
|
|
444
|
+
matches: Result<O>[] = []
|
|
445
|
+
|
|
446
|
+
constructor(patterns: Pattern[], path: Path, opts: O) {
|
|
447
|
+
super(patterns, path, opts)
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
matchEmit(e: Result<O>): void {
|
|
451
|
+
this.matches.push(e)
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
async walk(): Promise<Result<O>[]> {
|
|
455
|
+
if (this.signal?.aborted) throw this.signal.reason
|
|
456
|
+
if (this.path.isUnknown()) {
|
|
457
|
+
await this.path.lstat()
|
|
458
|
+
}
|
|
459
|
+
await new Promise((res, rej) => {
|
|
460
|
+
this.walkCB(this.path, this.patterns, () => {
|
|
461
|
+
if (this.signal?.aborted) {
|
|
462
|
+
rej(this.signal.reason)
|
|
463
|
+
} else {
|
|
464
|
+
res(this.matches)
|
|
465
|
+
}
|
|
466
|
+
})
|
|
467
|
+
})
|
|
468
|
+
return this.matches
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
walkSync(): Result<O>[] {
|
|
472
|
+
if (this.signal?.aborted) throw this.signal.reason
|
|
473
|
+
if (this.path.isUnknown()) {
|
|
474
|
+
this.path.lstatSync()
|
|
475
|
+
}
|
|
476
|
+
// nothing for the callback to do, because this never pauses
|
|
477
|
+
this.walkCBSync(this.path, this.patterns, () => {
|
|
478
|
+
if (this.signal?.aborted) throw this.signal.reason
|
|
479
|
+
})
|
|
480
|
+
return this.matches
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export class GlobStream<
|
|
485
|
+
O extends GlobWalkerOpts = GlobWalkerOpts,
|
|
486
|
+
> extends GlobUtil<O> {
|
|
487
|
+
results: Minipass<Result<O>, Result<O>>
|
|
488
|
+
|
|
489
|
+
constructor(patterns: Pattern[], path: Path, opts: O) {
|
|
490
|
+
super(patterns, path, opts)
|
|
491
|
+
this.results = new Minipass<Result<O>, Result<O>>({
|
|
492
|
+
signal: this.signal,
|
|
493
|
+
objectMode: true,
|
|
494
|
+
})
|
|
495
|
+
this.results.on('drain', () => this.resume())
|
|
496
|
+
this.results.on('resume', () => this.resume())
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
matchEmit(e: Result<O>): void {
|
|
500
|
+
this.results.write(e)
|
|
501
|
+
if (!this.results.flowing) this.pause()
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
stream(): MatchStream<O> {
|
|
505
|
+
const target = this.path
|
|
506
|
+
if (target.isUnknown()) {
|
|
507
|
+
void target.lstat().then(() => {
|
|
508
|
+
this.walkCB(target, this.patterns, () => this.results.end())
|
|
509
|
+
})
|
|
510
|
+
} else {
|
|
511
|
+
this.walkCB(target, this.patterns, () => this.results.end())
|
|
512
|
+
}
|
|
513
|
+
return this.results
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
streamSync(): MatchStream<O> {
|
|
517
|
+
if (this.path.isUnknown()) {
|
|
518
|
+
this.path.lstatSync()
|
|
519
|
+
}
|
|
520
|
+
this.walkCBSync(this.path, this.patterns, () => this.results.end())
|
|
521
|
+
return this.results
|
|
522
|
+
}
|
|
523
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/gopd
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.2.0](https://github.com/ljharb/gopd/compare/v1.1.0...v1.2.0) - 2024-12-03
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [New] add `gOPD` entry point; remove `get-intrinsic` [`5b61232`](https://github.com/ljharb/gopd/commit/5b61232dedea4591a314bcf16101b1961cee024e)
|
|
13
|
+
|
|
14
|
+
## [v1.1.0](https://github.com/ljharb/gopd/compare/v1.0.1...v1.1.0) - 2024-11-29
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [New] add types [`f585e39`](https://github.com/ljharb/gopd/commit/f585e397886d270e4ba84e53d226e4f9ca2eb0e6)
|
|
19
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `tape` [`0b8e4fd`](https://github.com/ljharb/gopd/commit/0b8e4fded64397a7726a9daa144a6cc9a5e2edfa)
|
|
20
|
+
- [Dev Deps] update `aud`, `npmignore`, `tape` [`48378b2`](https://github.com/ljharb/gopd/commit/48378b2443f09a4f7efbd0fb6c3ee845a6cabcf3)
|
|
21
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`78099ee`](https://github.com/ljharb/gopd/commit/78099eeed41bfdc134c912280483689cc8861c31)
|
|
22
|
+
- [Tests] replace `aud` with `npm audit` [`4e0d0ac`](https://github.com/ljharb/gopd/commit/4e0d0ac47619d24a75318a8e1f543ee04b2a2632)
|
|
23
|
+
- [meta] add missing `engines.node` [`1443316`](https://github.com/ljharb/gopd/commit/14433165d07835c680155b3dfd62d9217d735eca)
|
|
24
|
+
- [Deps] update `get-intrinsic` [`eee5f51`](https://github.com/ljharb/gopd/commit/eee5f51769f3dbaf578b70e2a3199116b01aa670)
|
|
25
|
+
- [Deps] update `get-intrinsic` [`550c378`](https://github.com/ljharb/gopd/commit/550c3780e3a9c77b62565712a001b4ed64ea61f5)
|
|
26
|
+
- [Dev Deps] add missing peer dep [`8c2ecf8`](https://github.com/ljharb/gopd/commit/8c2ecf848122e4e30abfc5b5086fb48b390dce75)
|
|
27
|
+
|
|
28
|
+
## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01
|
|
29
|
+
|
|
30
|
+
### Commits
|
|
31
|
+
|
|
32
|
+
- [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f)
|
|
33
|
+
|
|
34
|
+
## v1.0.0 - 2022-11-01
|
|
35
|
+
|
|
36
|
+
### Commits
|
|
37
|
+
|
|
38
|
+
- Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea)
|
|
39
|
+
- Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe)
|
|
40
|
+
- [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119)
|
|
41
|
+
- npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582)
|
|
42
|
+
- [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709)
|
|
43
|
+
- [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002)
|
|
44
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb)
|
|
45
|
+
- Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 Jordan Harband
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# gopd <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
|
+
|
|
3
|
+
[![github actions][actions-image]][actions-url]
|
|
4
|
+
[![coverage][codecov-image]][codecov-url]
|
|
5
|
+
[![License][license-image]][license-url]
|
|
6
|
+
[![Downloads][downloads-image]][downloads-url]
|
|
7
|
+
|
|
8
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
9
|
+
|
|
10
|
+
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
var gOPD = require('gopd');
|
|
16
|
+
var assert = require('assert');
|
|
17
|
+
|
|
18
|
+
if (gOPD) {
|
|
19
|
+
assert.equal(typeof gOPD, 'function', 'descriptors supported');
|
|
20
|
+
// use gOPD like Object.getOwnPropertyDescriptor here
|
|
21
|
+
} else {
|
|
22
|
+
assert.ok(!gOPD, 'descriptors not supported');
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
[package-url]: https://npmjs.org/package/gopd
|
|
27
|
+
[npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg
|
|
28
|
+
[deps-svg]: https://david-dm.org/ljharb/gopd.svg
|
|
29
|
+
[deps-url]: https://david-dm.org/ljharb/gopd
|
|
30
|
+
[dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg
|
|
31
|
+
[dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies
|
|
32
|
+
[npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true
|
|
33
|
+
[license-image]: https://img.shields.io/npm/l/gopd.svg
|
|
34
|
+
[license-url]: LICENSE
|
|
35
|
+
[downloads-image]: https://img.shields.io/npm/dm/gopd.svg
|
|
36
|
+
[downloads-url]: https://npm-stat.com/charts.html?package=gopd
|
|
37
|
+
[codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg
|
|
38
|
+
[codecov-url]: https://app.codecov.io/gh/ljharb/gopd/
|
|
39
|
+
[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd
|
|
40
|
+
[actions-url]: https://github.com/ljharb/gopd/actions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export = Object.getOwnPropertyDescriptor;
|