@macula-io/martha 0.0.0 → 1.0.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/LICENSE +201 -0
- package/README.md +53 -8
- package/bin/martha-install.mjs +54 -0
- package/check_the_node_version/check_the_node_version.mjs +19 -0
- package/install_a_release/install_a_release.mjs +166 -0
- package/keep_the_names_in_one_place/names.mjs +49 -0
- package/node_modules/@gar/promise-retry/LICENSE +20 -0
- package/node_modules/@gar/promise-retry/README.md +86 -0
- package/node_modules/@gar/promise-retry/lib/index.d.ts +114 -0
- package/node_modules/@gar/promise-retry/lib/index.js +62 -0
- package/node_modules/@gar/promise-retry/lib/retry.js +109 -0
- package/node_modules/@gar/promise-retry/package.json +45 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/LICENSE.md +55 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/README.md +364 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/index.d.ts +123 -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 +778 -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/numeric-range.d.ts +15 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js +76 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/commonjs/numeric-range.js.map +1 -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 +123 -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 +774 -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/numeric-range.d.ts +15 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.d.ts.map +1 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js +72 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/dist/esm/numeric-range.js.map +1 -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 +932 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/numeric-range.ts +79 -0
- package/node_modules/@isaacs/nonrecursive-glob-match/src/parse-class.ts +158 -0
- package/node_modules/@npmcli/agent/README.md +40 -0
- package/node_modules/@npmcli/agent/lib/agents.js +268 -0
- package/node_modules/@npmcli/agent/lib/dns.js +53 -0
- package/node_modules/@npmcli/agent/lib/errors.js +61 -0
- package/node_modules/@npmcli/agent/lib/index.js +56 -0
- package/node_modules/@npmcli/agent/lib/options.js +90 -0
- package/node_modules/@npmcli/agent/lib/proxy.js +88 -0
- package/node_modules/@npmcli/agent/package.json +61 -0
- package/node_modules/@npmcli/fs/LICENSE.md +20 -0
- package/node_modules/@npmcli/fs/README.md +97 -0
- package/node_modules/@npmcli/fs/lib/common/get-options.js +20 -0
- package/node_modules/@npmcli/fs/lib/common/node.js +9 -0
- package/node_modules/@npmcli/fs/lib/cp/LICENSE +15 -0
- package/node_modules/@npmcli/fs/lib/cp/errors.js +129 -0
- package/node_modules/@npmcli/fs/lib/cp/index.js +22 -0
- package/node_modules/@npmcli/fs/lib/cp/polyfill.js +428 -0
- package/node_modules/@npmcli/fs/lib/index.js +13 -0
- package/node_modules/@npmcli/fs/lib/move-file.js +78 -0
- package/node_modules/@npmcli/fs/lib/readdir-scoped.js +20 -0
- package/node_modules/@npmcli/fs/lib/with-temp-dir.js +39 -0
- package/node_modules/@npmcli/fs/package.json +54 -0
- package/node_modules/@npmcli/redact/LICENSE +21 -0
- package/node_modules/@npmcli/redact/README.md +42 -0
- package/node_modules/@npmcli/redact/lib/deep-map.js +71 -0
- package/node_modules/@npmcli/redact/lib/error.js +28 -0
- package/node_modules/@npmcli/redact/lib/index.js +44 -0
- package/node_modules/@npmcli/redact/lib/matchers.js +88 -0
- package/node_modules/@npmcli/redact/lib/server.js +59 -0
- package/node_modules/@npmcli/redact/lib/utils.js +202 -0
- package/node_modules/@npmcli/redact/package.json +52 -0
- package/node_modules/@sigstore/bundle/LICENSE +202 -0
- package/node_modules/@sigstore/bundle/README.md +19 -0
- package/node_modules/@sigstore/bundle/dist/build.d.ts +18 -0
- package/node_modules/@sigstore/bundle/dist/build.js +100 -0
- package/node_modules/@sigstore/bundle/dist/bundle.d.ts +74 -0
- package/node_modules/@sigstore/bundle/dist/bundle.js +24 -0
- package/node_modules/@sigstore/bundle/dist/error.d.ts +4 -0
- package/node_modules/@sigstore/bundle/dist/error.js +26 -0
- package/node_modules/@sigstore/bundle/dist/index.d.ts +8 -0
- package/node_modules/@sigstore/bundle/dist/index.js +43 -0
- package/node_modules/@sigstore/bundle/dist/serialized.d.ts +74 -0
- package/node_modules/@sigstore/bundle/dist/serialized.js +49 -0
- package/node_modules/@sigstore/bundle/dist/utility.d.ts +14 -0
- package/node_modules/@sigstore/bundle/dist/utility.js +2 -0
- package/node_modules/@sigstore/bundle/dist/validate.d.ts +7 -0
- package/node_modules/@sigstore/bundle/dist/validate.js +199 -0
- package/node_modules/@sigstore/bundle/package.json +35 -0
- package/node_modules/@sigstore/core/LICENSE +202 -0
- package/node_modules/@sigstore/core/README.md +10 -0
- package/node_modules/@sigstore/core/dist/asn1/error.d.ts +4 -0
- package/node_modules/@sigstore/core/dist/asn1/error.js +24 -0
- package/node_modules/@sigstore/core/dist/asn1/index.d.ts +1 -0
- package/node_modules/@sigstore/core/dist/asn1/index.js +20 -0
- package/node_modules/@sigstore/core/dist/asn1/length.d.ts +3 -0
- package/node_modules/@sigstore/core/dist/asn1/length.js +73 -0
- package/node_modules/@sigstore/core/dist/asn1/obj.d.ts +14 -0
- package/node_modules/@sigstore/core/dist/asn1/obj.js +173 -0
- package/node_modules/@sigstore/core/dist/asn1/parse.d.ts +6 -0
- package/node_modules/@sigstore/core/dist/asn1/parse.js +143 -0
- package/node_modules/@sigstore/core/dist/asn1/tag.d.ts +16 -0
- package/node_modules/@sigstore/core/dist/asn1/tag.js +89 -0
- package/node_modules/@sigstore/core/dist/crypto.d.ts +6 -0
- package/node_modules/@sigstore/core/dist/crypto.js +69 -0
- package/node_modules/@sigstore/core/dist/dsse.d.ts +1 -0
- package/node_modules/@sigstore/core/dist/dsse.js +29 -0
- package/node_modules/@sigstore/core/dist/encoding.d.ts +2 -0
- package/node_modules/@sigstore/core/dist/encoding.js +27 -0
- package/node_modules/@sigstore/core/dist/index.d.ts +9 -0
- package/node_modules/@sigstore/core/dist/index.js +66 -0
- package/node_modules/@sigstore/core/dist/json.d.ts +1 -0
- package/node_modules/@sigstore/core/dist/json.js +60 -0
- package/node_modules/@sigstore/core/dist/oid.d.ts +3 -0
- package/node_modules/@sigstore/core/dist/oid.js +20 -0
- package/node_modules/@sigstore/core/dist/pem.d.ts +2 -0
- package/node_modules/@sigstore/core/dist/pem.js +43 -0
- package/node_modules/@sigstore/core/dist/rfc3161/error.d.ts +2 -0
- package/node_modules/@sigstore/core/dist/rfc3161/error.js +21 -0
- package/node_modules/@sigstore/core/dist/rfc3161/index.d.ts +1 -0
- package/node_modules/@sigstore/core/dist/rfc3161/index.js +20 -0
- package/node_modules/@sigstore/core/dist/rfc3161/timestamp.d.ts +36 -0
- package/node_modules/@sigstore/core/dist/rfc3161/timestamp.js +212 -0
- package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.d.ts +12 -0
- package/node_modules/@sigstore/core/dist/rfc3161/tstinfo.js +72 -0
- package/node_modules/@sigstore/core/dist/stream.d.ts +21 -0
- package/node_modules/@sigstore/core/dist/stream.js +117 -0
- package/node_modules/@sigstore/core/dist/x509/cert.d.ts +43 -0
- package/node_modules/@sigstore/core/dist/x509/cert.js +245 -0
- package/node_modules/@sigstore/core/dist/x509/ext.d.ts +41 -0
- package/node_modules/@sigstore/core/dist/x509/ext.js +146 -0
- package/node_modules/@sigstore/core/dist/x509/index.d.ts +2 -0
- package/node_modules/@sigstore/core/dist/x509/index.js +23 -0
- package/node_modules/@sigstore/core/dist/x509/sct.d.ts +25 -0
- package/node_modules/@sigstore/core/dist/x509/sct.js +158 -0
- package/node_modules/@sigstore/core/package.json +31 -0
- package/node_modules/@sigstore/protobuf-specs/LICENSE +202 -0
- package/node_modules/@sigstore/protobuf-specs/README.md +5 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.d.ts +44 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/envelope.js +59 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.d.ts +64 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/events.js +174 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.d.ts +74 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/api/field_behavior.js +141 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.d.ts +74 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/any.js +35 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.d.ts +1309 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/descriptor.js +2191 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.d.ts +113 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/google/protobuf/timestamp.js +29 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.d.ts +23 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/dsse.js +55 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.d.ts +43 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/entry.js +81 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.d.ts +22 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/hashedrekord.js +56 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.d.ts +35 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/rekor/v2/verifier.js +74 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.d.ts +146 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_bundle.js +103 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.d.ts +304 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_common.js +612 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.d.ts +33 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_monitor.js +55 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.d.ts +144 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_rekor.js +137 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.d.ts +386 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_trustroot.js +284 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.d.ts +191 -0
- package/node_modules/@sigstore/protobuf-specs/dist/__generated__/sigstore_verification.js +281 -0
- package/node_modules/@sigstore/protobuf-specs/dist/index.d.ts +6 -0
- package/node_modules/@sigstore/protobuf-specs/dist/index.js +37 -0
- package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.d.ts +4 -0
- package/node_modules/@sigstore/protobuf-specs/dist/rekor/v2/index.js +35 -0
- package/node_modules/@sigstore/protobuf-specs/package.json +35 -0
- package/node_modules/@sigstore/sign/LICENSE +202 -0
- package/node_modules/@sigstore/sign/README.md +185 -0
- package/node_modules/@sigstore/sign/dist/bundler/base.d.ts +22 -0
- package/node_modules/@sigstore/sign/dist/bundler/base.js +52 -0
- package/node_modules/@sigstore/sign/dist/bundler/bundle.d.ts +5 -0
- package/node_modules/@sigstore/sign/dist/bundler/bundle.js +81 -0
- package/node_modules/@sigstore/sign/dist/bundler/dsse.d.ts +13 -0
- package/node_modules/@sigstore/sign/dist/bundler/dsse.js +47 -0
- package/node_modules/@sigstore/sign/dist/bundler/index.d.ts +3 -0
- package/node_modules/@sigstore/sign/dist/bundler/index.js +7 -0
- package/node_modules/@sigstore/sign/dist/bundler/message.d.ts +7 -0
- package/node_modules/@sigstore/sign/dist/bundler/message.js +30 -0
- package/node_modules/@sigstore/sign/dist/config.d.ts +18 -0
- package/node_modules/@sigstore/sign/dist/config.js +143 -0
- package/node_modules/@sigstore/sign/dist/error.d.ts +12 -0
- package/node_modules/@sigstore/sign/dist/error.js +41 -0
- package/node_modules/@sigstore/sign/dist/external/error.d.ts +9 -0
- package/node_modules/@sigstore/sign/dist/external/error.js +28 -0
- package/node_modules/@sigstore/sign/dist/external/fetch.d.ts +4 -0
- package/node_modules/@sigstore/sign/dist/external/fetch.js +98 -0
- package/node_modules/@sigstore/sign/dist/external/fulcio.d.ts +37 -0
- package/node_modules/@sigstore/sign/dist/external/fulcio.js +42 -0
- package/node_modules/@sigstore/sign/dist/external/rekor-v2.d.ts +14 -0
- package/node_modules/@sigstore/sign/dist/external/rekor-v2.js +45 -0
- package/node_modules/@sigstore/sign/dist/external/rekor.d.ts +28 -0
- package/node_modules/@sigstore/sign/dist/external/rekor.js +81 -0
- package/node_modules/@sigstore/sign/dist/external/tsa.d.ts +16 -0
- package/node_modules/@sigstore/sign/dist/external/tsa.js +44 -0
- package/node_modules/@sigstore/sign/dist/identity/ci.d.ts +11 -0
- package/node_modules/@sigstore/sign/dist/identity/ci.js +88 -0
- package/node_modules/@sigstore/sign/dist/identity/index.d.ts +2 -0
- package/node_modules/@sigstore/sign/dist/identity/index.js +20 -0
- package/node_modules/@sigstore/sign/dist/identity/provider.d.ts +3 -0
- package/node_modules/@sigstore/sign/dist/identity/provider.js +2 -0
- package/node_modules/@sigstore/sign/dist/index.d.ts +11 -0
- package/node_modules/@sigstore/sign/dist/index.js +19 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ca.d.ts +12 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ca.js +60 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.d.ts +6 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/ephemeral.js +43 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/index.d.ts +16 -0
- package/node_modules/@sigstore/sign/dist/signer/fulcio/index.js +90 -0
- package/node_modules/@sigstore/sign/dist/signer/index.d.ts +2 -0
- package/node_modules/@sigstore/sign/dist/signer/index.js +22 -0
- package/node_modules/@sigstore/sign/dist/signer/signer.d.ts +15 -0
- package/node_modules/@sigstore/sign/dist/signer/signer.js +17 -0
- package/node_modules/@sigstore/sign/dist/types/fetch.d.ts +6 -0
- package/node_modules/@sigstore/sign/dist/types/fetch.js +2 -0
- package/node_modules/@sigstore/sign/dist/util/index.d.ts +3 -0
- package/node_modules/@sigstore/sign/dist/util/index.js +59 -0
- package/node_modules/@sigstore/sign/dist/util/oidc.d.ts +1 -0
- package/node_modules/@sigstore/sign/dist/util/oidc.js +35 -0
- package/node_modules/@sigstore/sign/dist/util/ua.d.ts +1 -0
- package/node_modules/@sigstore/sign/dist/util/ua.js +32 -0
- package/node_modules/@sigstore/sign/dist/witness/index.d.ts +3 -0
- package/node_modules/@sigstore/sign/dist/witness/index.js +24 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/client.d.ts +29 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/client.js +92 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/entry.d.ts +5 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/entry.js +197 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/index.d.ts +20 -0
- package/node_modules/@sigstore/sign/dist/witness/tlog/index.js +97 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/client.d.ts +12 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/client.js +47 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/index.d.ts +13 -0
- package/node_modules/@sigstore/sign/dist/witness/tsa/index.js +45 -0
- package/node_modules/@sigstore/sign/dist/witness/witness.d.ts +9 -0
- package/node_modules/@sigstore/sign/dist/witness/witness.js +2 -0
- package/node_modules/@sigstore/sign/package.json +45 -0
- package/node_modules/@sigstore/tuf/LICENSE +202 -0
- package/node_modules/@sigstore/tuf/README.md +69 -0
- package/node_modules/@sigstore/tuf/dist/appdata.d.ts +1 -0
- package/node_modules/@sigstore/tuf/dist/appdata.js +43 -0
- package/node_modules/@sigstore/tuf/dist/client.d.ts +23 -0
- package/node_modules/@sigstore/tuf/dist/client.js +116 -0
- package/node_modules/@sigstore/tuf/dist/error.d.ts +11 -0
- package/node_modules/@sigstore/tuf/dist/error.js +14 -0
- package/node_modules/@sigstore/tuf/dist/index.d.ts +10 -0
- package/node_modules/@sigstore/tuf/dist/index.js +56 -0
- package/node_modules/@sigstore/tuf/dist/target.d.ts +2 -0
- package/node_modules/@sigstore/tuf/dist/target.js +79 -0
- package/node_modules/@sigstore/tuf/package.json +41 -0
- package/node_modules/@sigstore/tuf/seeds.json +1 -0
- package/node_modules/@sigstore/verify/README.md +13 -0
- package/node_modules/@sigstore/verify/dist/bundle/dsse.d.ts +13 -0
- package/node_modules/@sigstore/verify/dist/bundle/dsse.js +50 -0
- package/node_modules/@sigstore/verify/dist/bundle/index.d.ts +4 -0
- package/node_modules/@sigstore/verify/dist/bundle/index.js +59 -0
- package/node_modules/@sigstore/verify/dist/bundle/message.d.ts +14 -0
- package/node_modules/@sigstore/verify/dist/bundle/message.js +59 -0
- package/node_modules/@sigstore/verify/dist/error.d.ts +16 -0
- package/node_modules/@sigstore/verify/dist/error.js +34 -0
- package/node_modules/@sigstore/verify/dist/index.d.ts +6 -0
- package/node_modules/@sigstore/verify/dist/index.js +28 -0
- package/node_modules/@sigstore/verify/dist/key/certificate.d.ts +21 -0
- package/node_modules/@sigstore/verify/dist/key/certificate.js +216 -0
- package/node_modules/@sigstore/verify/dist/key/index.d.ts +10 -0
- package/node_modules/@sigstore/verify/dist/key/index.js +75 -0
- package/node_modules/@sigstore/verify/dist/key/sct.d.ts +4 -0
- package/node_modules/@sigstore/verify/dist/key/sct.js +78 -0
- package/node_modules/@sigstore/verify/dist/policy.d.ts +5 -0
- package/node_modules/@sigstore/verify/dist/policy.js +48 -0
- package/node_modules/@sigstore/verify/dist/shared.types.d.ts +55 -0
- package/node_modules/@sigstore/verify/dist/shared.types.js +2 -0
- package/node_modules/@sigstore/verify/dist/timestamp/index.d.ts +11 -0
- package/node_modules/@sigstore/verify/dist/timestamp/index.js +24 -0
- package/node_modules/@sigstore/verify/dist/timestamp/tsa.d.ts +3 -0
- package/node_modules/@sigstore/verify/dist/timestamp/tsa.js +63 -0
- package/node_modules/@sigstore/verify/dist/tlog/checkpoint.d.ts +11 -0
- package/node_modules/@sigstore/verify/dist/tlog/checkpoint.js +168 -0
- package/node_modules/@sigstore/verify/dist/tlog/dsse.d.ts +6 -0
- package/node_modules/@sigstore/verify/dist/tlog/dsse.js +106 -0
- package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.d.ts +6 -0
- package/node_modules/@sigstore/verify/dist/tlog/hashedrekord.js +94 -0
- package/node_modules/@sigstore/verify/dist/tlog/index.d.ts +5 -0
- package/node_modules/@sigstore/verify/dist/tlog/index.js +106 -0
- package/node_modules/@sigstore/verify/dist/tlog/intoto.d.ts +3 -0
- package/node_modules/@sigstore/verify/dist/tlog/intoto.js +62 -0
- package/node_modules/@sigstore/verify/dist/tlog/merkle.d.ts +3 -0
- package/node_modules/@sigstore/verify/dist/tlog/merkle.js +115 -0
- package/node_modules/@sigstore/verify/dist/tlog/set.d.ts +3 -0
- package/node_modules/@sigstore/verify/dist/tlog/set.js +60 -0
- package/node_modules/@sigstore/verify/dist/trust/filter.d.ts +8 -0
- package/node_modules/@sigstore/verify/dist/trust/filter.js +23 -0
- package/node_modules/@sigstore/verify/dist/trust/index.d.ts +5 -0
- package/node_modules/@sigstore/verify/dist/trust/index.js +90 -0
- package/node_modules/@sigstore/verify/dist/trust/trust.types.d.ts +29 -0
- package/node_modules/@sigstore/verify/dist/trust/trust.types.js +2 -0
- package/node_modules/@sigstore/verify/dist/verifier.d.ts +34 -0
- package/node_modules/@sigstore/verify/dist/verifier.js +172 -0
- package/node_modules/@sigstore/verify/package.json +36 -0
- package/node_modules/@tufjs/canonical-json/LICENSE +21 -0
- package/node_modules/@tufjs/canonical-json/README.md +53 -0
- package/node_modules/@tufjs/canonical-json/lib/index.d.ts +2 -0
- package/node_modules/@tufjs/canonical-json/lib/index.js +64 -0
- package/node_modules/@tufjs/canonical-json/package.json +35 -0
- package/node_modules/@tufjs/models/LICENSE +21 -0
- package/node_modules/@tufjs/models/README.md +3 -0
- package/node_modules/@tufjs/models/dist/base.d.ts +37 -0
- package/node_modules/@tufjs/models/dist/base.js +99 -0
- package/node_modules/@tufjs/models/dist/delegations.d.ts +32 -0
- package/node_modules/@tufjs/models/dist/delegations.js +122 -0
- package/node_modules/@tufjs/models/dist/error.d.ts +12 -0
- package/node_modules/@tufjs/models/dist/error.js +27 -0
- package/node_modules/@tufjs/models/dist/file.d.ts +38 -0
- package/node_modules/@tufjs/models/dist/file.js +191 -0
- package/node_modules/@tufjs/models/dist/index.d.ts +10 -0
- package/node_modules/@tufjs/models/dist/index.js +24 -0
- package/node_modules/@tufjs/models/dist/key.d.ts +21 -0
- package/node_modules/@tufjs/models/dist/key.js +90 -0
- package/node_modules/@tufjs/models/dist/metadata.d.ts +47 -0
- package/node_modules/@tufjs/models/dist/metadata.js +165 -0
- package/node_modules/@tufjs/models/dist/role.d.ts +103 -0
- package/node_modules/@tufjs/models/dist/role.js +310 -0
- package/node_modules/@tufjs/models/dist/root.d.ts +29 -0
- package/node_modules/@tufjs/models/dist/root.js +119 -0
- package/node_modules/@tufjs/models/dist/signature.d.ts +20 -0
- package/node_modules/@tufjs/models/dist/signature.js +40 -0
- package/node_modules/@tufjs/models/dist/snapshot.d.ts +23 -0
- package/node_modules/@tufjs/models/dist/snapshot.js +72 -0
- package/node_modules/@tufjs/models/dist/targets.d.ts +20 -0
- package/node_modules/@tufjs/models/dist/targets.js +94 -0
- package/node_modules/@tufjs/models/dist/timestamp.d.ts +21 -0
- package/node_modules/@tufjs/models/dist/timestamp.js +59 -0
- package/node_modules/@tufjs/models/dist/utils/guard.d.ts +7 -0
- package/node_modules/@tufjs/models/dist/utils/guard.js +32 -0
- package/node_modules/@tufjs/models/dist/utils/index.d.ts +3 -0
- package/node_modules/@tufjs/models/dist/utils/index.js +38 -0
- package/node_modules/@tufjs/models/dist/utils/key.d.ts +11 -0
- package/node_modules/@tufjs/models/dist/utils/key.js +170 -0
- package/node_modules/@tufjs/models/dist/utils/oid.d.ts +1 -0
- package/node_modules/@tufjs/models/dist/utils/oid.js +26 -0
- package/node_modules/@tufjs/models/dist/utils/types.d.ts +4 -0
- package/node_modules/@tufjs/models/dist/utils/types.js +2 -0
- package/node_modules/@tufjs/models/dist/utils/verify.d.ts +3 -0
- package/node_modules/@tufjs/models/dist/utils/verify.js +13 -0
- package/node_modules/@tufjs/models/package.json +37 -0
- package/node_modules/agent-base/LICENSE +22 -0
- package/node_modules/agent-base/README.md +69 -0
- package/node_modules/agent-base/dist/helpers.d.ts +10 -0
- package/node_modules/agent-base/dist/helpers.d.ts.map +1 -0
- package/node_modules/agent-base/dist/helpers.js +37 -0
- package/node_modules/agent-base/dist/helpers.js.map +1 -0
- package/node_modules/agent-base/dist/index.d.ts +37 -0
- package/node_modules/agent-base/dist/index.d.ts.map +1 -0
- package/node_modules/agent-base/dist/index.js +146 -0
- package/node_modules/agent-base/dist/index.js.map +1 -0
- package/node_modules/agent-base/package.json +46 -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 +105 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts +12 -0
- package/node_modules/brace-expansion/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/commonjs/index.js +333 -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 +12 -0
- package/node_modules/brace-expansion/dist/esm/index.d.ts.map +1 -0
- package/node_modules/brace-expansion/dist/esm/index.js +329 -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 +65 -0
- package/node_modules/cacache/LICENSE.md +16 -0
- package/node_modules/cacache/README.md +715 -0
- package/node_modules/cacache/lib/content/path.js +29 -0
- package/node_modules/cacache/lib/content/read.js +165 -0
- package/node_modules/cacache/lib/content/rm.js +18 -0
- package/node_modules/cacache/lib/content/write.js +208 -0
- package/node_modules/cacache/lib/entry-index.js +339 -0
- package/node_modules/cacache/lib/get.js +170 -0
- package/node_modules/cacache/lib/index.js +42 -0
- package/node_modules/cacache/lib/memoization.js +72 -0
- package/node_modules/cacache/lib/put.js +80 -0
- package/node_modules/cacache/lib/rm.js +32 -0
- package/node_modules/cacache/lib/util/cache-dir.js +29 -0
- package/node_modules/cacache/lib/util/glob.js +7 -0
- package/node_modules/cacache/lib/util/hash-to-segments.js +7 -0
- package/node_modules/cacache/lib/util/tmp.js +36 -0
- package/node_modules/cacache/lib/verify.js +258 -0
- package/node_modules/cacache/package.json +81 -0
- package/node_modules/content-type/LICENSE +22 -0
- package/node_modules/content-type/README.md +71 -0
- package/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/content-type/package.json +52 -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/fs-minipass/LICENSE +15 -0
- package/node_modules/fs-minipass/README.md +70 -0
- package/node_modules/fs-minipass/lib/index.js +443 -0
- package/node_modules/fs-minipass/package.json +54 -0
- package/node_modules/glob/LICENSE.md +63 -0
- package/node_modules/glob/README.md +1377 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts +405 -0
- package/node_modules/glob/dist/commonjs/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/glob.js +241 -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 +24 -0
- package/node_modules/glob/dist/commonjs/has-magic.js.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts +36 -0
- package/node_modules/glob/dist/commonjs/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/ignore.js +139 -0
- package/node_modules/glob/dist/commonjs/ignore.js.map +1 -0
- package/node_modules/glob/dist/commonjs/index.d.ts +98 -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 +3 -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 +86 -0
- package/node_modules/glob/dist/commonjs/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/pattern.js +235 -0
- package/node_modules/glob/dist/commonjs/pattern.js.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts +72 -0
- package/node_modules/glob/dist/commonjs/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/processor.js +314 -0
- package/node_modules/glob/dist/commonjs/processor.js.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts +99 -0
- package/node_modules/glob/dist/commonjs/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/commonjs/walker.js +402 -0
- package/node_modules/glob/dist/commonjs/walker.js.map +1 -0
- package/node_modules/glob/dist/esm/glob.d.ts +405 -0
- package/node_modules/glob/dist/esm/glob.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/glob.js +237 -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 +20 -0
- package/node_modules/glob/dist/esm/has-magic.js.map +1 -0
- package/node_modules/glob/dist/esm/ignore.d.ts +36 -0
- package/node_modules/glob/dist/esm/ignore.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/ignore.js +135 -0
- package/node_modules/glob/dist/esm/ignore.js.map +1 -0
- package/node_modules/glob/dist/esm/index.d.ts +98 -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 +3 -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 +86 -0
- package/node_modules/glob/dist/esm/pattern.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/pattern.js +231 -0
- package/node_modules/glob/dist/esm/pattern.js.map +1 -0
- package/node_modules/glob/dist/esm/processor.d.ts +72 -0
- package/node_modules/glob/dist/esm/processor.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/processor.js +307 -0
- package/node_modules/glob/dist/esm/processor.js.map +1 -0
- package/node_modules/glob/dist/esm/walker.d.ts +99 -0
- package/node_modules/glob/dist/esm/walker.d.ts.map +1 -0
- package/node_modules/glob/dist/esm/walker.js +396 -0
- package/node_modules/glob/dist/esm/walker.js.map +1 -0
- package/node_modules/glob/package.json +114 -0
- 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/http-cache-semantics/LICENSE +9 -0
- package/node_modules/http-cache-semantics/README.md +268 -0
- package/node_modules/http-cache-semantics/index.js +951 -0
- package/node_modules/http-cache-semantics/package.json +22 -0
- package/node_modules/http-proxy-agent/LICENSE +22 -0
- package/node_modules/http-proxy-agent/README.md +44 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts +47 -0
- package/node_modules/http-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/http-proxy-agent/dist/index.js +132 -0
- package/node_modules/http-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/http-proxy-agent/package.json +48 -0
- package/node_modules/https-proxy-agent/LICENSE +22 -0
- package/node_modules/https-proxy-agent/README.md +70 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts +51 -0
- package/node_modules/https-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/index.js +234 -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 +12 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.d.ts.map +1 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js +94 -0
- package/node_modules/https-proxy-agent/dist/parse-proxy-response.js.map +1 -0
- package/node_modules/https-proxy-agent/package.json +51 -0
- package/node_modules/iconv-lite/LICENSE +21 -0
- package/node_modules/iconv-lite/README.md +138 -0
- package/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
- package/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
- package/node_modules/iconv-lite/encodings/index.js +23 -0
- package/node_modules/iconv-lite/encodings/internal.js +218 -0
- package/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
- package/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/node_modules/iconv-lite/encodings/sbcs-data.js +180 -0
- package/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
- package/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/node_modules/iconv-lite/encodings/utf16.js +187 -0
- package/node_modules/iconv-lite/encodings/utf32.js +314 -0
- package/node_modules/iconv-lite/encodings/utf7.js +283 -0
- package/node_modules/iconv-lite/lib/bom-handling.js +48 -0
- package/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
- package/node_modules/iconv-lite/lib/index.d.ts +129 -0
- package/node_modules/iconv-lite/lib/index.js +182 -0
- package/node_modules/iconv-lite/lib/streams.js +105 -0
- package/node_modules/iconv-lite/package.json +70 -0
- package/node_modules/iconv-lite/types/encodings.d.ts +425 -0
- package/node_modules/ip-address/LICENSE +19 -0
- package/node_modules/ip-address/README.md +308 -0
- package/node_modules/ip-address/dist/address-error.d.ts +15 -0
- package/node_modules/ip-address/dist/address-error.js +12 -0
- package/node_modules/ip-address/dist/address-error.js.map +1 -0
- package/node_modules/ip-address/dist/common.d.ts +74 -0
- package/node_modules/ip-address/dist/common.js +154 -0
- package/node_modules/ip-address/dist/common.js.map +1 -0
- package/node_modules/ip-address/dist/ip-address.d.ts +7 -0
- package/node_modules/ip-address/dist/ip-address.js +35 -0
- package/node_modules/ip-address/dist/ip-address.js.map +1 -0
- package/node_modules/ip-address/dist/ipv4.d.ts +347 -0
- package/node_modules/ip-address/dist/ipv4.js +602 -0
- package/node_modules/ip-address/dist/ipv4.js.map +1 -0
- package/node_modules/ip-address/dist/ipv6.d.ts +634 -0
- package/node_modules/ip-address/dist/ipv6.js +1461 -0
- package/node_modules/ip-address/dist/ipv6.js.map +1 -0
- package/node_modules/ip-address/dist/v4/constants.d.ts +16 -0
- package/node_modules/ip-address/dist/v4/constants.js +51 -0
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -0
- package/node_modules/ip-address/dist/v6/constants.d.ts +61 -0
- package/node_modules/ip-address/dist/v6/constants.js +131 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -0
- package/node_modules/ip-address/dist/v6/helpers.d.ts +18 -0
- package/node_modules/ip-address/dist/v6/helpers.js +54 -0
- package/node_modules/ip-address/dist/v6/helpers.js.map +1 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +5 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.js +95 -0
- package/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -0
- package/node_modules/ip-address/package.json +91 -0
- package/node_modules/lru-cache/LICENSE.md +55 -0
- package/node_modules/lru-cache/README.md +469 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/browser/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.cjs.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel-cjs.d.cts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/index.js +1733 -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/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/node/diagnostics-channel.js +9 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/commonjs/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/package.json +3 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/diagnostics-channel.js +7 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js +1733 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js +10 -0
- package/node_modules/lru-cache/dist/commonjs/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel-browser.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/browser/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/browser/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/browser/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/browser/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/browser/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.d.mts.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel-esm.mjs.map +1 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/diagnostics-channel.js +19 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/index.js +1729 -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/node/diagnostics-channel-node.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel-node.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/node/diagnostics-channel.js +6 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/node/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/node/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js +2 -0
- package/node_modules/lru-cache/dist/esm/node/index.min.js.map +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/node/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/node/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/package.json +3 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/perf.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel-react-native.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.d.ts +5 -0
- package/node_modules/lru-cache/dist/esm/react-native/diagnostics-channel.js +4 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts +1400 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js +1729 -0
- package/node_modules/lru-cache/dist/esm/react-native/index.js.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts +12 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.d.ts.map +1 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js +7 -0
- package/node_modules/lru-cache/dist/esm/react-native/perf.js.map +1 -0
- package/node_modules/lru-cache/package.json +180 -0
- package/node_modules/make-fetch-happen/LICENSE +16 -0
- package/node_modules/make-fetch-happen/README.md +364 -0
- package/node_modules/make-fetch-happen/lib/cache/entry.js +471 -0
- package/node_modules/make-fetch-happen/lib/cache/errors.js +11 -0
- package/node_modules/make-fetch-happen/lib/cache/index.js +49 -0
- package/node_modules/make-fetch-happen/lib/cache/key.js +17 -0
- package/node_modules/make-fetch-happen/lib/cache/policy.js +161 -0
- package/node_modules/make-fetch-happen/lib/fetch.js +118 -0
- package/node_modules/make-fetch-happen/lib/index.js +41 -0
- package/node_modules/make-fetch-happen/lib/options.js +59 -0
- package/node_modules/make-fetch-happen/lib/pipeline.js +41 -0
- package/node_modules/make-fetch-happen/lib/remote.js +134 -0
- package/node_modules/make-fetch-happen/package.json +75 -0
- package/node_modules/minimatch/LICENSE.md +55 -0
- package/node_modules/minimatch/README.md +556 -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/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 +188 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1600 -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/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 +188 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1589 -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 +74 -0
- package/node_modules/minipass/LICENSE.md +55 -0
- package/node_modules/minipass/README.md +825 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts +545 -0
- package/node_modules/minipass/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/commonjs/index.js +1038 -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 +545 -0
- package/node_modules/minipass/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass/dist/esm/index.js +1020 -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 +77 -0
- package/node_modules/minipass-collect/LICENSE +15 -0
- package/node_modules/minipass-collect/README.md +48 -0
- package/node_modules/minipass-collect/index.js +71 -0
- package/node_modules/minipass-collect/package.json +30 -0
- package/node_modules/minipass-fetch/LICENSE +28 -0
- package/node_modules/minipass-fetch/README.md +29 -0
- package/node_modules/minipass-fetch/lib/abort-error.js +17 -0
- package/node_modules/minipass-fetch/lib/blob.js +97 -0
- package/node_modules/minipass-fetch/lib/body.js +360 -0
- package/node_modules/minipass-fetch/lib/fetch-error.js +32 -0
- package/node_modules/minipass-fetch/lib/headers.js +267 -0
- package/node_modules/minipass-fetch/lib/index.js +376 -0
- package/node_modules/minipass-fetch/lib/request.js +282 -0
- package/node_modules/minipass-fetch/lib/response.js +90 -0
- package/node_modules/minipass-fetch/package.json +70 -0
- package/node_modules/minipass-flush/LICENSE.md +55 -0
- package/node_modules/minipass-flush/README.md +47 -0
- package/node_modules/minipass-flush/index.js +39 -0
- package/node_modules/minipass-flush/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass-flush/node_modules/minipass/README.md +728 -0
- package/node_modules/minipass-flush/node_modules/minipass/index.d.ts +155 -0
- package/node_modules/minipass-flush/node_modules/minipass/index.js +649 -0
- package/node_modules/minipass-flush/node_modules/minipass/package.json +56 -0
- package/node_modules/minipass-flush/package.json +42 -0
- package/node_modules/minipass-pipeline/LICENSE +15 -0
- package/node_modules/minipass-pipeline/README.md +69 -0
- package/node_modules/minipass-pipeline/index.js +128 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/LICENSE +15 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/README.md +728 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/index.d.ts +155 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/index.js +649 -0
- package/node_modules/minipass-pipeline/node_modules/minipass/package.json +56 -0
- package/node_modules/minipass-pipeline/package.json +29 -0
- package/node_modules/minipass-sized/LICENSE +15 -0
- package/node_modules/minipass-sized/README.md +30 -0
- package/node_modules/minipass-sized/dist/commonjs/index.d.ts +21 -0
- package/node_modules/minipass-sized/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minipass-sized/dist/commonjs/index.js +69 -0
- package/node_modules/minipass-sized/dist/commonjs/index.js.map +1 -0
- package/node_modules/minipass-sized/dist/commonjs/package.json +3 -0
- package/node_modules/minipass-sized/dist/esm/index.d.ts +21 -0
- package/node_modules/minipass-sized/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minipass-sized/dist/esm/index.js +64 -0
- package/node_modules/minipass-sized/dist/esm/index.js.map +1 -0
- package/node_modules/minipass-sized/dist/esm/package.json +3 -0
- package/node_modules/minipass-sized/package.json +69 -0
- package/node_modules/minizlib/LICENSE +26 -0
- package/node_modules/minizlib/README.md +64 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/commonjs/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/constants.js +123 -0
- package/node_modules/minizlib/dist/commonjs/constants.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts +99 -0
- package/node_modules/minizlib/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/commonjs/index.js +416 -0
- package/node_modules/minizlib/dist/commonjs/index.js.map +1 -0
- package/node_modules/minizlib/dist/commonjs/package.json +3 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts +2 -0
- package/node_modules/minizlib/dist/esm/constants.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/constants.js +117 -0
- package/node_modules/minizlib/dist/esm/constants.js.map +1 -0
- package/node_modules/minizlib/dist/esm/index.d.ts +99 -0
- package/node_modules/minizlib/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minizlib/dist/esm/index.js +363 -0
- package/node_modules/minizlib/dist/esm/index.js.map +1 -0
- package/node_modules/minizlib/dist/esm/package.json +3 -0
- package/node_modules/minizlib/package.json +80 -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/negotiator/LICENSE +24 -0
- package/node_modules/negotiator/README.md +212 -0
- package/node_modules/negotiator/index.js +83 -0
- package/node_modules/negotiator/lib/accept.js +54 -0
- package/node_modules/negotiator/lib/charset.js +145 -0
- package/node_modules/negotiator/lib/encoding.js +184 -0
- package/node_modules/negotiator/lib/language.js +158 -0
- package/node_modules/negotiator/lib/mediaType.js +176 -0
- package/node_modules/negotiator/package.json +49 -0
- package/node_modules/p-map/index.d.ts +392 -0
- package/node_modules/p-map/index.js +663 -0
- package/node_modules/p-map/license +9 -0
- package/node_modules/p-map/package.json +57 -0
- package/node_modules/p-map/readme.md +404 -0
- package/node_modules/path-scurry/LICENSE.md +55 -0
- package/node_modules/path-scurry/README.md +635 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts +1122 -0
- package/node_modules/path-scurry/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/commonjs/index.js +2056 -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 +1122 -0
- package/node_modules/path-scurry/dist/esm/index.d.ts.map +1 -0
- package/node_modules/path-scurry/dist/esm/index.js +2011 -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 +72 -0
- package/node_modules/proc-log/LICENSE +15 -0
- package/node_modules/proc-log/README.md +226 -0
- package/node_modules/proc-log/lib/index.js +158 -0
- package/node_modules/proc-log/package.json +46 -0
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts +14 -0
- package/node_modules/proxy-agent-negotiate/dist/index.d.ts.map +1 -0
- package/node_modules/proxy-agent-negotiate/dist/index.js +35 -0
- package/node_modules/proxy-agent-negotiate/dist/index.js.map +1 -0
- package/node_modules/proxy-agent-negotiate/package.json +47 -0
- package/node_modules/safer-buffer/LICENSE +21 -0
- package/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/node_modules/safer-buffer/Readme.md +156 -0
- package/node_modules/safer-buffer/dangerous.js +58 -0
- package/node_modules/safer-buffer/package.json +34 -0
- package/node_modules/safer-buffer/safer.js +77 -0
- package/node_modules/safer-buffer/tests.js +406 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +67 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/sigstore/LICENSE +202 -0
- package/node_modules/sigstore/README.md +219 -0
- package/node_modules/sigstore/dist/config.d.ts +38 -0
- package/node_modules/sigstore/dist/config.js +126 -0
- package/node_modules/sigstore/dist/index.d.ts +9 -0
- package/node_modules/sigstore/dist/index.js +34 -0
- package/node_modules/sigstore/dist/sigstore.d.ts +11 -0
- package/node_modules/sigstore/dist/sigstore.js +112 -0
- package/node_modules/sigstore/package.json +47 -0
- package/node_modules/smart-buffer/.prettierrc.yaml +5 -0
- package/node_modules/smart-buffer/.travis.yml +13 -0
- package/node_modules/smart-buffer/LICENSE +20 -0
- package/node_modules/smart-buffer/README.md +633 -0
- package/node_modules/smart-buffer/build/smartbuffer.js +1233 -0
- package/node_modules/smart-buffer/build/smartbuffer.js.map +1 -0
- package/node_modules/smart-buffer/build/utils.js +108 -0
- package/node_modules/smart-buffer/build/utils.js.map +1 -0
- package/node_modules/smart-buffer/docs/CHANGELOG.md +70 -0
- package/node_modules/smart-buffer/docs/README_v3.md +367 -0
- package/node_modules/smart-buffer/docs/ROADMAP.md +0 -0
- package/node_modules/smart-buffer/package.json +79 -0
- package/node_modules/smart-buffer/typings/smartbuffer.d.ts +755 -0
- package/node_modules/smart-buffer/typings/utils.d.ts +66 -0
- package/node_modules/socks/.prettierrc.yaml +7 -0
- package/node_modules/socks/LICENSE +20 -0
- package/node_modules/socks/README.md +686 -0
- package/node_modules/socks/build/client/socksclient.js +793 -0
- package/node_modules/socks/build/client/socksclient.js.map +1 -0
- package/node_modules/socks/build/common/constants.js +108 -0
- package/node_modules/socks/build/common/constants.js.map +1 -0
- package/node_modules/socks/build/common/helpers.js +166 -0
- package/node_modules/socks/build/common/helpers.js.map +1 -0
- package/node_modules/socks/build/common/receivebuffer.js +43 -0
- package/node_modules/socks/build/common/receivebuffer.js.map +1 -0
- package/node_modules/socks/build/common/util.js +25 -0
- package/node_modules/socks/build/common/util.js.map +1 -0
- package/node_modules/socks/build/index.js +18 -0
- package/node_modules/socks/build/index.js.map +1 -0
- package/node_modules/socks/docs/examples/index.md +17 -0
- package/node_modules/socks/docs/examples/javascript/associateExample.md +90 -0
- package/node_modules/socks/docs/examples/javascript/bindExample.md +83 -0
- package/node_modules/socks/docs/examples/javascript/connectExample.md +258 -0
- package/node_modules/socks/docs/examples/typescript/associateExample.md +93 -0
- package/node_modules/socks/docs/examples/typescript/bindExample.md +86 -0
- package/node_modules/socks/docs/examples/typescript/connectExample.md +265 -0
- package/node_modules/socks/docs/index.md +5 -0
- package/node_modules/socks/docs/migratingFromV1.md +86 -0
- package/node_modules/socks/package.json +58 -0
- package/node_modules/socks/typings/client/socksclient.d.ts +162 -0
- package/node_modules/socks/typings/common/constants.d.ts +151 -0
- package/node_modules/socks/typings/common/helpers.d.ts +17 -0
- package/node_modules/socks/typings/common/receiveBuffer.d.ts +12 -0
- package/node_modules/socks/typings/common/util.d.ts +14 -0
- package/node_modules/socks/typings/index.d.ts +1 -0
- package/node_modules/socks-proxy-agent/LICENSE +22 -0
- package/node_modules/socks-proxy-agent/README.md +50 -0
- package/node_modules/socks-proxy-agent/dist/index.d.ts +25 -0
- package/node_modules/socks-proxy-agent/dist/index.d.ts.map +1 -0
- package/node_modules/socks-proxy-agent/dist/index.js +169 -0
- package/node_modules/socks-proxy-agent/dist/index.js.map +1 -0
- package/node_modules/socks-proxy-agent/package.json +142 -0
- package/node_modules/ssri/LICENSE.md +16 -0
- package/node_modules/ssri/README.md +528 -0
- package/node_modules/ssri/lib/index.js +550 -0
- package/node_modules/ssri/package.json +66 -0
- package/node_modules/tuf-js/LICENSE +21 -0
- package/node_modules/tuf-js/README.md +3 -0
- package/node_modules/tuf-js/dist/config.d.ts +15 -0
- package/node_modules/tuf-js/dist/config.js +16 -0
- package/node_modules/tuf-js/dist/error.d.ts +22 -0
- package/node_modules/tuf-js/dist/error.js +49 -0
- package/node_modules/tuf-js/dist/fetcher.d.ts +25 -0
- package/node_modules/tuf-js/dist/fetcher.js +131 -0
- package/node_modules/tuf-js/dist/index.d.ts +6 -0
- package/node_modules/tuf-js/dist/index.js +9 -0
- package/node_modules/tuf-js/dist/store.d.ts +18 -0
- package/node_modules/tuf-js/dist/store.js +219 -0
- package/node_modules/tuf-js/dist/updater.d.ts +35 -0
- package/node_modules/tuf-js/dist/updater.js +379 -0
- package/node_modules/tuf-js/dist/utils/tmpfile.d.ts +3 -0
- package/node_modules/tuf-js/dist/utils/tmpfile.js +25 -0
- package/node_modules/tuf-js/dist/utils/url.d.ts +1 -0
- package/node_modules/tuf-js/dist/utils/url.js +13 -0
- package/node_modules/tuf-js/package.json +43 -0
- package/node_modules/yallist/LICENSE +15 -0
- package/node_modules/yallist/README.md +204 -0
- package/node_modules/yallist/iterator.js +8 -0
- package/node_modules/yallist/package.json +29 -0
- package/node_modules/yallist/yallist.js +426 -0
- package/npm-shrinkwrap.json +771 -0
- package/package.json +56 -2
- package/place_the_release/place_the_release.mjs +132 -0
- package/read_the_release_registry/read_the_release_registry.mjs +255 -0
- package/refuse_in_words/refuse_in_words.mjs +31 -0
- package/signers.txt +11 -0
- package/unpack_the_release_layer/unpack_the_release_layer.mjs +286 -0
- package/verify_the_release_signature/verify_the_release_signature.mjs +174 -0
|
@@ -0,0 +1,932 @@
|
|
|
1
|
+
import { numericRange } from './numeric-range.js'
|
|
2
|
+
import { type Form, parseClass } from './parse-class.js'
|
|
3
|
+
|
|
4
|
+
export type { Form }
|
|
5
|
+
|
|
6
|
+
export type MatcherOptions = {
|
|
7
|
+
/** perform a case-insensitive match */
|
|
8
|
+
nocase?: boolean
|
|
9
|
+
/** do not treat strings starting with `.` specially */
|
|
10
|
+
dot?: boolean
|
|
11
|
+
/** do not match extglobs (treat them as normal strings) */
|
|
12
|
+
noext?: boolean
|
|
13
|
+
/**
|
|
14
|
+
* normalize unicode in the pattern and the tested strings, with
|
|
15
|
+
* this form. `true` means `'NFC'`.
|
|
16
|
+
*/
|
|
17
|
+
normalize?: boolean | Form
|
|
18
|
+
/**
|
|
19
|
+
* A char that marks a numeric range in the pattern, as
|
|
20
|
+
* `<mark><lo>..<hi><mark>`, where `lo` and `hi` are integers. It
|
|
21
|
+
* matches the strings that the bash brace expansion `{<lo>..<hi>}`
|
|
22
|
+
* makes, such as `{1..100}` or `{001..100}`, without making each
|
|
23
|
+
* one. A mark is never escaped by a `\` before it. Inside a `[...]`
|
|
24
|
+
* class, a mark is a char of the class.
|
|
25
|
+
*/
|
|
26
|
+
rangeMark?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// parsed pattern items
|
|
30
|
+
export type Item =
|
|
31
|
+
| { t: 'lit'; ch: string }
|
|
32
|
+
| { t: 'any' | 'star' }
|
|
33
|
+
| { t: 'class'; re: RegExp }
|
|
34
|
+
| { t: 'ext'; type: string; alts: Item[][] }
|
|
35
|
+
|
|
36
|
+
// extglob syntax tokens become literals if they are not part of a
|
|
37
|
+
// closed extglob
|
|
38
|
+
export type Token =
|
|
39
|
+
Item | { t: 'open'; type: string } | { t: 'bar' } | { t: 'close' }
|
|
40
|
+
|
|
41
|
+
// state machine nodes
|
|
42
|
+
export type NegNode = { t: 'neg'; id: number; sub: Node; next: Node }
|
|
43
|
+
export type SplitNode = { t: 'split'; id: number; out: Node[] }
|
|
44
|
+
export type Node =
|
|
45
|
+
| ({ t: 'lit'; id: number; next: Node } & Lit)
|
|
46
|
+
| { t: 'any' | 'star'; id: number; next: Node }
|
|
47
|
+
| { t: 'class'; id: number; re: RegExp; next: Node }
|
|
48
|
+
| SplitNode
|
|
49
|
+
| NegNode
|
|
50
|
+
| { t: 'match'; id: number }
|
|
51
|
+
|
|
52
|
+
// the end of the pattern, or of a negated sub-pattern
|
|
53
|
+
const MATCH: Node = { t: 'match', id: 0 }
|
|
54
|
+
|
|
55
|
+
const extTypes = '!?+*@'
|
|
56
|
+
|
|
57
|
+
const lit = (ch: string): Item => ({ t: 'lit', ch })
|
|
58
|
+
|
|
59
|
+
const reEscape = (s: string) => s.replace(/[\\^$.*+?()[\]{}|/]/g, '\\$&')
|
|
60
|
+
|
|
61
|
+
// a RegExp that only matches `s`, with unicode case folding
|
|
62
|
+
const newFoldRe = (s: string) => new RegExp(`^${reEscape(s)}$`, 'iu')
|
|
63
|
+
|
|
64
|
+
// foldRe for one literal char. The same chars are in most patterns,
|
|
65
|
+
// so keep them. A RegExp without the `g` or `y` flag has no state to
|
|
66
|
+
// share.
|
|
67
|
+
const foldCache = new Map<string, RegExp>()
|
|
68
|
+
const foldRe = (ch: string) => {
|
|
69
|
+
let re = foldCache.get(ch)
|
|
70
|
+
if (!re) {
|
|
71
|
+
re = newFoldRe(ch)
|
|
72
|
+
if (foldCache.size >= 1000) foldCache.clear()
|
|
73
|
+
foldCache.set(ch, re)
|
|
74
|
+
}
|
|
75
|
+
return re
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A literal char. With `nocase:true`, `re` folds case, and `ascii`
|
|
80
|
+
* holds its results for ASCII chars, by char code: 1 for a match,
|
|
81
|
+
* and 2 for not.
|
|
82
|
+
*/
|
|
83
|
+
export type Lit = { ch: string; re?: RegExp; ascii?: Uint8Array }
|
|
84
|
+
|
|
85
|
+
const litMatch = (l: Lit, c: string) => {
|
|
86
|
+
if (c === l.ch) return true
|
|
87
|
+
if (!l.re) return false
|
|
88
|
+
const code = c.charCodeAt(0)
|
|
89
|
+
if (code >= 128) return l.re.test(c)
|
|
90
|
+
const ascii = (l.ascii ??= new Uint8Array(128))
|
|
91
|
+
ascii[code] ||= l.re.test(c) ? 1 : 2
|
|
92
|
+
return ascii[code] === 1
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const tokenize = (
|
|
96
|
+
p: string,
|
|
97
|
+
nocase: boolean,
|
|
98
|
+
noext: boolean,
|
|
99
|
+
form?: Form,
|
|
100
|
+
mark?: string,
|
|
101
|
+
) => {
|
|
102
|
+
const toks: Token[] = []
|
|
103
|
+
for (let i = 0; i < p.length;) {
|
|
104
|
+
const c = String.fromCodePoint(p.codePointAt(i)!)
|
|
105
|
+
if (mark) {
|
|
106
|
+
// a \ before a range would only escape its first char
|
|
107
|
+
const m = c === '\\' && p.startsWith(mark, i + 1) ? 1 : 0
|
|
108
|
+
if (m || c === mark) {
|
|
109
|
+
const start = i + m + mark.length
|
|
110
|
+
const end = p.indexOf(mark, start)
|
|
111
|
+
const r = /^(-?\d+)\.\.(-?\d+)$/.exec(p.slice(start, end))
|
|
112
|
+
const alts = end !== -1 && r && numericRange(r[1]!, r[2]!)
|
|
113
|
+
if (alts) {
|
|
114
|
+
toks.push({ t: 'ext', type: '@', alts })
|
|
115
|
+
i = end + mark.length
|
|
116
|
+
continue
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (c === '\\') {
|
|
121
|
+
// a trailing \ is a literal \
|
|
122
|
+
const e = p.codePointAt(i + 1)
|
|
123
|
+
const ch = e === undefined ? c : String.fromCodePoint(e)
|
|
124
|
+
toks.push(lit(ch))
|
|
125
|
+
i += 1 + ch.length
|
|
126
|
+
continue
|
|
127
|
+
}
|
|
128
|
+
if (c === '[') {
|
|
129
|
+
const [re, consumed] = parseClass(p, i, nocase, form)
|
|
130
|
+
if (consumed) {
|
|
131
|
+
toks.push({ t: 'class', re })
|
|
132
|
+
i += consumed
|
|
133
|
+
continue
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (!noext && extTypes.includes(c) && p[i + 1] === '(') {
|
|
137
|
+
toks.push({ t: 'open', type: c })
|
|
138
|
+
i += 2
|
|
139
|
+
continue
|
|
140
|
+
}
|
|
141
|
+
toks.push(
|
|
142
|
+
!noext && c === '|' ? { t: 'bar' }
|
|
143
|
+
: !noext && c === ')' ? { t: 'close' }
|
|
144
|
+
: c === '*' ? { t: 'star' }
|
|
145
|
+
: c === '?' ? { t: 'any' }
|
|
146
|
+
: lit(c),
|
|
147
|
+
)
|
|
148
|
+
i += c.length
|
|
149
|
+
}
|
|
150
|
+
return toks
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
// map each open token index to the index of its close token
|
|
154
|
+
const pair = (toks: Token[]) => {
|
|
155
|
+
const pairs = new Map<number, number>()
|
|
156
|
+
const stack: number[] = []
|
|
157
|
+
toks.forEach((tok, i) => {
|
|
158
|
+
if (tok.t === 'open') stack.push(i)
|
|
159
|
+
else if (tok.t === 'close' && stack.length) pairs.set(stack.pop()!, i)
|
|
160
|
+
})
|
|
161
|
+
return pairs
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// build the alternatives between start and end. An open token that
|
|
165
|
+
// is not closed is never inside a closed extglob, so bar and close
|
|
166
|
+
// tokens are only literal at the top level.
|
|
167
|
+
const build = (
|
|
168
|
+
toks: Token[],
|
|
169
|
+
pairs: Map<number, number>,
|
|
170
|
+
start: number,
|
|
171
|
+
end: number,
|
|
172
|
+
top: boolean,
|
|
173
|
+
): Item[][] => {
|
|
174
|
+
let seq: Item[] = []
|
|
175
|
+
const alts = [seq]
|
|
176
|
+
for (let i = start; i < end; i++) {
|
|
177
|
+
const tok = toks[i]!
|
|
178
|
+
const close = pairs.get(i)
|
|
179
|
+
if (tok.t === 'open' && close !== undefined) {
|
|
180
|
+
const sub = build(toks, pairs, i + 1, close, false)
|
|
181
|
+
seq.push({ t: 'ext', type: tok.type, alts: sub })
|
|
182
|
+
i = close
|
|
183
|
+
} else if (tok.t === 'bar' && !top) {
|
|
184
|
+
alts.push((seq = []))
|
|
185
|
+
} else if (tok.t === 'open') {
|
|
186
|
+
seq.push(lit(tok.type), lit('('))
|
|
187
|
+
} else if (tok.t === 'bar') {
|
|
188
|
+
seq.push(lit('|'))
|
|
189
|
+
} else if (tok.t === 'close') {
|
|
190
|
+
seq.push(lit(')'))
|
|
191
|
+
} else {
|
|
192
|
+
seq.push(tok)
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
return alts
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// normalize each run of literal chars as one string, so that a char
|
|
199
|
+
// and the combining marks after it compose (or decompose) together.
|
|
200
|
+
// Syntax is already parsed, so a char that normalizes to a syntax
|
|
201
|
+
// char (such as full-width `*` in NFKC) stays a literal.
|
|
202
|
+
const normalize = (items: Item[], form: Form): Item[] => {
|
|
203
|
+
const out: Item[] = []
|
|
204
|
+
let run = ''
|
|
205
|
+
const flush = () => {
|
|
206
|
+
for (const ch of run.normalize(form)) out.push(lit(ch))
|
|
207
|
+
run = ''
|
|
208
|
+
}
|
|
209
|
+
for (const it of items) {
|
|
210
|
+
if (it.t === 'lit') {
|
|
211
|
+
run += it.ch
|
|
212
|
+
continue
|
|
213
|
+
}
|
|
214
|
+
flush()
|
|
215
|
+
out.push(
|
|
216
|
+
it.t === 'ext' ?
|
|
217
|
+
{ ...it, alts: it.alts.map(a => normalize(a, form)) }
|
|
218
|
+
: it,
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
flush()
|
|
222
|
+
return out
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
// the start node, and the number of node ids. Ids are dense, from 0
|
|
226
|
+
// for the match node.
|
|
227
|
+
const compile = (
|
|
228
|
+
items: Item[],
|
|
229
|
+
nocase: boolean,
|
|
230
|
+
): [start: Node, size: number] => {
|
|
231
|
+
let id = 1
|
|
232
|
+
const split = (out: Node[]): SplitNode => ({ t: 'split', id: id++, out })
|
|
233
|
+
const seq = (items: Item[], next: Node): Node =>
|
|
234
|
+
items.reduceRight((next, it) => item(it, next), next)
|
|
235
|
+
const item = (it: Item, next: Node): Node => {
|
|
236
|
+
switch (it.t) {
|
|
237
|
+
case 'lit':
|
|
238
|
+
const re = nocase ? foldRe(it.ch) : undefined
|
|
239
|
+
return { t: 'lit', id: id++, ch: it.ch, re, next }
|
|
240
|
+
case 'any':
|
|
241
|
+
case 'star':
|
|
242
|
+
return { t: it.t, id: id++, next }
|
|
243
|
+
case 'class':
|
|
244
|
+
return { t: 'class', id: id++, re: it.re, next }
|
|
245
|
+
}
|
|
246
|
+
const alts = (next: Node) => it.alts.map(a => seq(a, next))
|
|
247
|
+
switch (it.type) {
|
|
248
|
+
case '@':
|
|
249
|
+
return split(alts(next))
|
|
250
|
+
case '?':
|
|
251
|
+
return split([next, ...alts(next)])
|
|
252
|
+
case '!':
|
|
253
|
+
return { t: 'neg', id: id++, sub: split(alts(MATCH)), next }
|
|
254
|
+
}
|
|
255
|
+
// * and +, loop back after each match
|
|
256
|
+
const after = split([])
|
|
257
|
+
const entry = split(alts(after))
|
|
258
|
+
after.out.push(next, entry)
|
|
259
|
+
return it.type === '*' ? after : entry
|
|
260
|
+
}
|
|
261
|
+
const start = seq(items, MATCH)
|
|
262
|
+
return [start, id]
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// one line per node, in the order that a walk from the start
|
|
266
|
+
// reaches them. Edges point to node ids. The nodes of a negated
|
|
267
|
+
// sub-pattern are indented under their negation.
|
|
268
|
+
const show = (start: Node): string => {
|
|
269
|
+
const lines: string[] = []
|
|
270
|
+
const seen = new Set<Node>()
|
|
271
|
+
const ref = (n: Node) => (n.t === 'match' ? 'match' : String(n.id))
|
|
272
|
+
const walk = (n: Node, indent: string) => {
|
|
273
|
+
if (n.t === 'match' || seen.has(n)) return
|
|
274
|
+
seen.add(n)
|
|
275
|
+
const line = (desc: string) => lines.push(`${indent}${n.id}: ${desc}`)
|
|
276
|
+
switch (n.t) {
|
|
277
|
+
case 'split':
|
|
278
|
+
line(`split -> ${n.out.map(ref).join(', ')}`)
|
|
279
|
+
for (const o of n.out) walk(o, indent)
|
|
280
|
+
return
|
|
281
|
+
case 'neg':
|
|
282
|
+
line(`!(${ref(n.sub)}) -> ${ref(n.next)}`)
|
|
283
|
+
walk(n.sub, indent + ' ')
|
|
284
|
+
return walk(n.next, indent)
|
|
285
|
+
case 'lit':
|
|
286
|
+
line(`${JSON.stringify(n.ch)} -> ${ref(n.next)}`)
|
|
287
|
+
break
|
|
288
|
+
case 'class':
|
|
289
|
+
line(`${n.re} -> ${ref(n.next)}`)
|
|
290
|
+
break
|
|
291
|
+
default:
|
|
292
|
+
line(`${n.t === 'any' ? '?' : '*'} -> ${ref(n.next)}`)
|
|
293
|
+
}
|
|
294
|
+
walk(n.next, indent)
|
|
295
|
+
}
|
|
296
|
+
walk(start, '')
|
|
297
|
+
return [`start -> ${ref(start)}`, ...lines].join('\n')
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
// A thread inside a !(...) negation. It holds the threads of the
|
|
301
|
+
// negated sub-pattern, started where the negation started. The
|
|
302
|
+
// negation matches the chars so far if the sub-pattern does not.
|
|
303
|
+
type Run = { t: 'run'; neg: NegNode; state: State }
|
|
304
|
+
|
|
305
|
+
// The threads at one position in the string. Each node thread is
|
|
306
|
+
// only kept once, and runs with the same state are only kept once,
|
|
307
|
+
// so that identical threads merge. The match node is not in
|
|
308
|
+
// `threads`, because it can not step. It sets `match` instead.
|
|
309
|
+
class State {
|
|
310
|
+
// set by the Sim, to mark the nodes that this state has
|
|
311
|
+
gen: number
|
|
312
|
+
threads: Node[] = []
|
|
313
|
+
match = false
|
|
314
|
+
runs: Run[] = []
|
|
315
|
+
// the sorted ids of the threads, with 0 for a match, once the
|
|
316
|
+
// state is done
|
|
317
|
+
ids: number[] = []
|
|
318
|
+
|
|
319
|
+
constructor(gen: number) {
|
|
320
|
+
this.gen = gen
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
// no threads, so nothing more can match
|
|
324
|
+
get dead() {
|
|
325
|
+
return !this.threads.length && !this.match && !this.runs.length
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
// true if the two states hold the same threads
|
|
330
|
+
const sameState = (a: State, b: State): boolean => {
|
|
331
|
+
if (a.ids.length !== b.ids.length) return false
|
|
332
|
+
if (a.runs.length !== b.runs.length) return false
|
|
333
|
+
if (a.ids.some((id, i) => id !== b.ids[i])) return false
|
|
334
|
+
return a.runs.every(r =>
|
|
335
|
+
b.runs.some(o => o.neg === r.neg && sameState(o.state, r.state)),
|
|
336
|
+
)
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* For each node id, the gen of the last state that has the node as
|
|
341
|
+
* a thread, and of the last state that walked through it. A state is
|
|
342
|
+
* built to the end before the states around it go on, and the nodes
|
|
343
|
+
* of a negated sub-pattern are only in its states (other than the
|
|
344
|
+
* match node, which is never marked). So one mark for each node is
|
|
345
|
+
* enough to know if the state being built has it. The Sims of a
|
|
346
|
+
* matcher never run at the same time, so they share one Marks.
|
|
347
|
+
*/
|
|
348
|
+
export type Marks = { has: Float64Array; seen: Float64Array; gen: number }
|
|
349
|
+
|
|
350
|
+
const marks = (size: number): Marks => ({
|
|
351
|
+
has: new Float64Array(size),
|
|
352
|
+
seen: new Float64Array(size),
|
|
353
|
+
gen: 0,
|
|
354
|
+
})
|
|
355
|
+
|
|
356
|
+
class Sim {
|
|
357
|
+
// `.` and `..` only match literal dots, even with `dot:true`
|
|
358
|
+
dots: boolean
|
|
359
|
+
// the string starts with `.`, and `dot:true` is not set
|
|
360
|
+
dotStart: boolean
|
|
361
|
+
#marks: Marks
|
|
362
|
+
|
|
363
|
+
constructor(dots: boolean, dotStart: boolean, marks: Marks) {
|
|
364
|
+
this.dots = dots
|
|
365
|
+
this.dotStart = dotStart
|
|
366
|
+
this.#marks = marks
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
state() {
|
|
370
|
+
return new State(++this.#marks.gen)
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
// sort the ids of a state, once it has all of its threads
|
|
374
|
+
done(state: State) {
|
|
375
|
+
state.ids = state.threads.map(n => n.id).sort((a, b) => a - b)
|
|
376
|
+
if (state.match) state.ids.unshift(MATCH.id)
|
|
377
|
+
return state
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
// true the first time that the state walks through the node, so
|
|
381
|
+
// that loops in the graph stop
|
|
382
|
+
#visit(state: State, node: Node) {
|
|
383
|
+
const { seen } = this.#marks
|
|
384
|
+
if (seen[node.id] === state.gen) return false
|
|
385
|
+
seen[node.id] = state.gen
|
|
386
|
+
return true
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
#addThread(state: State, node: Node) {
|
|
390
|
+
const { has } = this.#marks
|
|
391
|
+
if (has[node.id] === state.gen) return false
|
|
392
|
+
has[node.id] = state.gen
|
|
393
|
+
state.threads.push(node)
|
|
394
|
+
return true
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
// wildcards only match a leading dot if `dot:true`. In a negated
|
|
398
|
+
// sub-pattern, this does not apply, because the negation itself
|
|
399
|
+
// can not match a leading dot.
|
|
400
|
+
restricted(i: number, top: boolean) {
|
|
401
|
+
return top && (this.dots || (this.dotStart && i === 0))
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
add(state: State, node: Node, i: number, top: boolean): void {
|
|
405
|
+
switch (node.t) {
|
|
406
|
+
case 'split':
|
|
407
|
+
if (!this.#visit(state, node)) return
|
|
408
|
+
for (const o of node.out) this.add(state, o, i, top)
|
|
409
|
+
return
|
|
410
|
+
case 'neg':
|
|
411
|
+
if (!this.#visit(state, node)) return
|
|
412
|
+
const sub = this.state()
|
|
413
|
+
this.add(sub, node.sub, i, false)
|
|
414
|
+
this.done(sub)
|
|
415
|
+
return this.addRun(
|
|
416
|
+
state,
|
|
417
|
+
{ t: 'run', neg: node, state: sub },
|
|
418
|
+
i,
|
|
419
|
+
top,
|
|
420
|
+
)
|
|
421
|
+
case 'star':
|
|
422
|
+
// a * can not start a dotfile, even if it matches nothing
|
|
423
|
+
if (this.restricted(i, top)) return
|
|
424
|
+
if (this.#addThread(state, node))
|
|
425
|
+
this.add(state, node.next, i, top)
|
|
426
|
+
return
|
|
427
|
+
case 'match':
|
|
428
|
+
state.match = true
|
|
429
|
+
return
|
|
430
|
+
default:
|
|
431
|
+
this.#addThread(state, node)
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
addRun(state: State, run: Run, i: number, top: boolean) {
|
|
436
|
+
for (const r of state.runs) {
|
|
437
|
+
if (r.neg === run.neg && sameState(r.state, run.state)) return
|
|
438
|
+
}
|
|
439
|
+
state.runs.push(run)
|
|
440
|
+
if (!run.state.match) {
|
|
441
|
+
this.add(state, run.neg.next, i, top)
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// the threads after char `c`, at index `i`
|
|
446
|
+
step(state: State, c: string, i: number, top: boolean): State {
|
|
447
|
+
const next = this.state()
|
|
448
|
+
for (const th of state.threads) {
|
|
449
|
+
switch (th.t) {
|
|
450
|
+
case 'lit':
|
|
451
|
+
if (litMatch(th, c)) {
|
|
452
|
+
this.add(next, th.next, i + 1, top)
|
|
453
|
+
}
|
|
454
|
+
break
|
|
455
|
+
case 'any':
|
|
456
|
+
if (!this.restricted(i, top)) this.add(next, th.next, i + 1, top)
|
|
457
|
+
break
|
|
458
|
+
case 'class':
|
|
459
|
+
if (!this.restricted(i, top) && th.re.test(c)) {
|
|
460
|
+
this.add(next, th.next, i + 1, top)
|
|
461
|
+
}
|
|
462
|
+
break
|
|
463
|
+
case 'star':
|
|
464
|
+
if (!this.restricted(i, top)) this.add(next, th, i + 1, top)
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
if (!this.restricted(i, top)) {
|
|
468
|
+
for (const run of state.runs) {
|
|
469
|
+
// a sub-pattern with no threads can not match again, so the
|
|
470
|
+
// run stays the same
|
|
471
|
+
if (run.state.dead) {
|
|
472
|
+
this.addRun(next, run, i + 1, top)
|
|
473
|
+
continue
|
|
474
|
+
}
|
|
475
|
+
const sub = this.step(run.state, c, i, false)
|
|
476
|
+
this.addRun(
|
|
477
|
+
next,
|
|
478
|
+
{ t: 'run', neg: run.neg, state: sub },
|
|
479
|
+
i + 1,
|
|
480
|
+
top,
|
|
481
|
+
)
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
return this.done(next)
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
// A canonical key for the threads in a state. States with the same
|
|
489
|
+
// key hold the same threads, so they match the same strings.
|
|
490
|
+
const stateKey = (state: State): string => {
|
|
491
|
+
const ids = state.ids.join()
|
|
492
|
+
if (!state.runs.length) return ids
|
|
493
|
+
const runs = state.runs.map(r => `${r.neg.id}(${stateKey(r.state)})`)
|
|
494
|
+
return `${ids}|${runs.sort().join('|')}`
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
// A cached state of the simulation, and the states that each char
|
|
498
|
+
// leads to.
|
|
499
|
+
type DState = {
|
|
500
|
+
state: State
|
|
501
|
+
match: boolean
|
|
502
|
+
// no threads, so nothing more can match
|
|
503
|
+
dead: boolean
|
|
504
|
+
// the next state for each ASCII char, by char code, and for the
|
|
505
|
+
// other chars
|
|
506
|
+
ascii?: (DState | undefined)[]
|
|
507
|
+
next: Map<string, DState>
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
// The cache can hold about this many chars of state keys and
|
|
511
|
+
// transitions. When it is full, it is cleared, so that a pattern
|
|
512
|
+
// can not use an unbounded amount of memory.
|
|
513
|
+
const DFA_BUDGET = 1 << 18
|
|
514
|
+
|
|
515
|
+
// A cache of the states that the simulation reaches, built as the
|
|
516
|
+
// matcher is used. Each char of a string is then one Map lookup,
|
|
517
|
+
// once the states that it leads to are known.
|
|
518
|
+
//
|
|
519
|
+
// The dot rules only restrict the first char of a dotfile (strings
|
|
520
|
+
// that are only `.` or `..` do not use the cache). So a dotfile
|
|
521
|
+
// starts at its own state, which takes its first step with the
|
|
522
|
+
// restriction, and every other state takes steps without it.
|
|
523
|
+
class Dfa {
|
|
524
|
+
#start: Node
|
|
525
|
+
#states = new Map<string, DState>()
|
|
526
|
+
#size = 0
|
|
527
|
+
#plain?: DState
|
|
528
|
+
#dotStart?: DState
|
|
529
|
+
#sim: Sim
|
|
530
|
+
#dotSim: Sim
|
|
531
|
+
|
|
532
|
+
constructor(start: Node, marks: Marks) {
|
|
533
|
+
this.#start = start
|
|
534
|
+
this.#sim = new Sim(false, false, marks)
|
|
535
|
+
this.#dotSim = new Sim(false, true, marks)
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
#make(state: State): DState {
|
|
539
|
+
return {
|
|
540
|
+
state,
|
|
541
|
+
match: state.match,
|
|
542
|
+
dead: state.dead,
|
|
543
|
+
next: new Map(),
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
#intern(state: State): DState {
|
|
548
|
+
const key = stateKey(state)
|
|
549
|
+
const found = this.#states.get(key)
|
|
550
|
+
if (found) return found
|
|
551
|
+
if (this.#size > DFA_BUDGET) this.#clear()
|
|
552
|
+
const d = this.#make(state)
|
|
553
|
+
this.#states.set(key, d)
|
|
554
|
+
this.#size += key.length + 1
|
|
555
|
+
return d
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
#clear() {
|
|
559
|
+
this.#states.clear()
|
|
560
|
+
this.#size = 0
|
|
561
|
+
this.#plain = undefined
|
|
562
|
+
this.#dotStart = undefined
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
start(dotStart: boolean): DState {
|
|
566
|
+
if (dotStart) {
|
|
567
|
+
if (this.#dotStart) return this.#dotStart
|
|
568
|
+
const state = this.#dotSim.state()
|
|
569
|
+
this.#dotSim.add(state, this.#start, 0, true)
|
|
570
|
+
return (this.#dotStart = this.#make(this.#dotSim.done(state)))
|
|
571
|
+
}
|
|
572
|
+
if (this.#plain) return this.#plain
|
|
573
|
+
const state = this.#sim.state()
|
|
574
|
+
this.#sim.add(state, this.#start, 0, true)
|
|
575
|
+
return (this.#plain = this.#intern(this.#sim.done(state)))
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// the next state, after a miss in `d.ascii`
|
|
579
|
+
next(d: DState, c: string): DState {
|
|
580
|
+
const code = c.charCodeAt(0)
|
|
581
|
+
const found = code < 128 ? undefined : d.next.get(c)
|
|
582
|
+
if (found) return found
|
|
583
|
+
// the dotfile start is not in the cache, so it is never shared
|
|
584
|
+
const n =
|
|
585
|
+
d === this.#dotStart ?
|
|
586
|
+
this.#intern(this.#dotSim.step(d.state, c, 0, true))
|
|
587
|
+
: this.#intern(this.#sim.step(d.state, c, 1, true))
|
|
588
|
+
if (code < 128) {
|
|
589
|
+
if (!d.ascii) {
|
|
590
|
+
d.ascii = new Array(128)
|
|
591
|
+
this.#size += 128
|
|
592
|
+
}
|
|
593
|
+
d.ascii[code] = n
|
|
594
|
+
} else {
|
|
595
|
+
d.next.set(c, n)
|
|
596
|
+
}
|
|
597
|
+
this.#size++
|
|
598
|
+
return n
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* A node in a graph with no splits or negations. Such a graph is a
|
|
604
|
+
* chain of nodes that each match one char, or a `*`.
|
|
605
|
+
*/
|
|
606
|
+
export type LinearNode = Exclude<
|
|
607
|
+
Node,
|
|
608
|
+
SplitNode | NegNode | { t: 'match' }
|
|
609
|
+
>
|
|
610
|
+
|
|
611
|
+
// the nodes in order, if the graph is a single chain
|
|
612
|
+
const linear = (start: Node): LinearNode[] | undefined => {
|
|
613
|
+
const nodes: LinearNode[] = []
|
|
614
|
+
for (let n = start; n.t !== 'match'; n = n.next) {
|
|
615
|
+
if (n.t === 'split' || n.t === 'neg') return undefined
|
|
616
|
+
nodes.push(n)
|
|
617
|
+
}
|
|
618
|
+
return nodes
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
// Match a chain of nodes. Each node other than `*` matches exactly
|
|
622
|
+
// one char, so on a failure it is enough to go back to the last `*`
|
|
623
|
+
// and let it match one more char. This takes at most
|
|
624
|
+
// nodes.length * chars.length steps.
|
|
625
|
+
const testLinear = (
|
|
626
|
+
nodes: LinearNode[],
|
|
627
|
+
chars: ArrayLike<string>,
|
|
628
|
+
start: number,
|
|
629
|
+
end: number,
|
|
630
|
+
) => {
|
|
631
|
+
let ni = 0
|
|
632
|
+
let ci = start
|
|
633
|
+
let starNi = -1
|
|
634
|
+
let starCi = 0
|
|
635
|
+
while (ci < end) {
|
|
636
|
+
const n = nodes[ni]
|
|
637
|
+
if (n?.t === 'star') {
|
|
638
|
+
starNi = ni++
|
|
639
|
+
starCi = ci
|
|
640
|
+
continue
|
|
641
|
+
}
|
|
642
|
+
const c = chars[ci]!
|
|
643
|
+
if (
|
|
644
|
+
n &&
|
|
645
|
+
(n.t === 'any' ||
|
|
646
|
+
(n.t === 'lit' && litMatch(n, c)) ||
|
|
647
|
+
(n.t === 'class' && n.re.test(c)))
|
|
648
|
+
) {
|
|
649
|
+
ni++
|
|
650
|
+
ci++
|
|
651
|
+
continue
|
|
652
|
+
}
|
|
653
|
+
if (starNi === -1) return false
|
|
654
|
+
ni = starNi + 1
|
|
655
|
+
ci = ++starCi
|
|
656
|
+
}
|
|
657
|
+
while (nodes[ni]?.t === 'star') ni++
|
|
658
|
+
return ni === nodes.length
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
// The least and most chars that the items can match. These are only
|
|
662
|
+
// bounds: a negation can match a string of any length, so it counts
|
|
663
|
+
// as 0 to Infinity.
|
|
664
|
+
const lengths = (items: Item[]): [min: number, max: number] => {
|
|
665
|
+
let min = 0
|
|
666
|
+
let max = 0
|
|
667
|
+
for (const it of items) {
|
|
668
|
+
const [lo, hi] = itemLengths(it)
|
|
669
|
+
min += lo
|
|
670
|
+
max += hi
|
|
671
|
+
}
|
|
672
|
+
return [min, max]
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
const itemLengths = (it: Item): [min: number, max: number] => {
|
|
676
|
+
if (it.t === 'star') return [0, Infinity]
|
|
677
|
+
if (it.t !== 'ext') return [1, 1]
|
|
678
|
+
if (it.type === '!') return [0, Infinity]
|
|
679
|
+
const alts = it.alts.map(lengths)
|
|
680
|
+
const min = Math.min(...alts.map(a => a[0]))
|
|
681
|
+
const max = Math.max(...alts.map(a => a[1]))
|
|
682
|
+
// a loop of alternatives that only match the empty string is empty
|
|
683
|
+
const loop = max === 0 ? 0 : Infinity
|
|
684
|
+
return (
|
|
685
|
+
it.type === '@' ? [min, max]
|
|
686
|
+
: it.type === '?' ? [0, max]
|
|
687
|
+
: it.type === '*' ? [0, loop]
|
|
688
|
+
: [min, loop]
|
|
689
|
+
)
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
// true if the chars from `start` match the literals
|
|
693
|
+
const hasAffix = (
|
|
694
|
+
lits: Lit[],
|
|
695
|
+
chars: ArrayLike<string>,
|
|
696
|
+
start: number,
|
|
697
|
+
) => {
|
|
698
|
+
for (let j = 0; j < lits.length; j++) {
|
|
699
|
+
if (!litMatch(lits[j]!, chars[start + j]!)) return false
|
|
700
|
+
}
|
|
701
|
+
return true
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
// a `/`, or half of a surrogate pair
|
|
705
|
+
const slashOrSurrogate = /[/\ud800-\udfff]/
|
|
706
|
+
const surrogate = /[\ud800-\udfff]/
|
|
707
|
+
|
|
708
|
+
// a string can be indexed by code point, unless it has surrogate
|
|
709
|
+
// pairs
|
|
710
|
+
const codePoints = (s: string): ArrayLike<string> =>
|
|
711
|
+
surrogate.test(s) ? [...s] : s
|
|
712
|
+
|
|
713
|
+
const noSlash = (s: string) => {
|
|
714
|
+
if (s.includes('/')) {
|
|
715
|
+
throw new Error('can only match a single path portion, got: ' + s)
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
export class Matcher {
|
|
720
|
+
pattern: string
|
|
721
|
+
options: MatcherOptions
|
|
722
|
+
#start: Node
|
|
723
|
+
// the number of node ids
|
|
724
|
+
#size: number
|
|
725
|
+
#marks?: Marks
|
|
726
|
+
// the Sim for strings that are only `.` or `..`
|
|
727
|
+
#dotsSim?: Sim
|
|
728
|
+
// the string to compare, if the pattern has no magic. With
|
|
729
|
+
// `nocase:true`, the RegExp that folds case is made when it is
|
|
730
|
+
// first used.
|
|
731
|
+
#literal?: string
|
|
732
|
+
#literalFold = false
|
|
733
|
+
#literalRe?: RegExp
|
|
734
|
+
// the nodes between the prefix and suffix, if the graph is a
|
|
735
|
+
// single chain
|
|
736
|
+
#linear?: LinearNode[]
|
|
737
|
+
// the linear nodes are only `*` and `?`, so the length bounds and
|
|
738
|
+
// the prefix and suffix decide the match
|
|
739
|
+
#wild = false
|
|
740
|
+
// the least and most chars that a match can have
|
|
741
|
+
#min = 0
|
|
742
|
+
#max = Infinity
|
|
743
|
+
// the literals that a match must start and end with. Each one
|
|
744
|
+
// matches exactly one char, and they are distinct items in the
|
|
745
|
+
// pattern, so a string that does not have them can not match.
|
|
746
|
+
#prefix: Lit[] = []
|
|
747
|
+
#suffix: Lit[] = []
|
|
748
|
+
// the prefix and suffix as strings, if they do not fold case
|
|
749
|
+
#prefixStr?: string
|
|
750
|
+
#suffixStr?: string
|
|
751
|
+
// there is a prefix or suffix to check
|
|
752
|
+
#affix = false
|
|
753
|
+
#dfa?: Dfa
|
|
754
|
+
#form?: Form
|
|
755
|
+
|
|
756
|
+
constructor(pattern: string, options: MatcherOptions = {}) {
|
|
757
|
+
if (pattern.includes('/')) {
|
|
758
|
+
throw new Error(
|
|
759
|
+
'can only match a single path portion, got pattern: ' + pattern,
|
|
760
|
+
)
|
|
761
|
+
}
|
|
762
|
+
this.pattern = pattern
|
|
763
|
+
this.options = options
|
|
764
|
+
const { nocase = false, noext = false, normalize: n } = options
|
|
765
|
+
this.#form = n === true ? 'NFC' : n || undefined
|
|
766
|
+
// a pattern that is only an empty extglob is a literal string,
|
|
767
|
+
// except for `!()`, which matches any non-empty string
|
|
768
|
+
const literal = /^[?*+@]\(\)$/.test(pattern)
|
|
769
|
+
const toks = tokenize(
|
|
770
|
+
pattern,
|
|
771
|
+
nocase,
|
|
772
|
+
noext || literal,
|
|
773
|
+
this.#form,
|
|
774
|
+
options.rangeMark,
|
|
775
|
+
)
|
|
776
|
+
let [items] = build(toks, pair(toks), 0, toks.length, true)
|
|
777
|
+
if (this.#form) items = normalize(items!, this.#form)
|
|
778
|
+
const [start, size] = compile(items!, nocase)
|
|
779
|
+
this.#start = start
|
|
780
|
+
this.#size = size
|
|
781
|
+
if (items!.every(it => it.t === 'lit')) {
|
|
782
|
+
this.#literal = items!.map(it => it.ch).join('')
|
|
783
|
+
this.#literalFold = nocase
|
|
784
|
+
} else {
|
|
785
|
+
const lit = (it: Item): Lit | undefined =>
|
|
786
|
+
it.t !== 'lit' ? undefined
|
|
787
|
+
: nocase ? { ch: it.ch, re: foldRe(it.ch) }
|
|
788
|
+
: { ch: it.ch }
|
|
789
|
+
for (const it of items!) {
|
|
790
|
+
const l = lit(it)
|
|
791
|
+
if (!l) break
|
|
792
|
+
this.#prefix.push(l)
|
|
793
|
+
}
|
|
794
|
+
for (let j = items!.length - 1; j >= 0; j--) {
|
|
795
|
+
const l = lit(items![j]!)
|
|
796
|
+
if (!l) break
|
|
797
|
+
this.#suffix.unshift(l)
|
|
798
|
+
}
|
|
799
|
+
this.#affix = !!(this.#prefix.length || this.#suffix.length)
|
|
800
|
+
if (!nocase) {
|
|
801
|
+
this.#prefixStr = this.#prefix.map(l => l.ch).join('')
|
|
802
|
+
this.#suffixStr = this.#suffix.map(l => l.ch).join('')
|
|
803
|
+
}
|
|
804
|
+
this.#linear = linear(this.#start)?.slice(
|
|
805
|
+
this.#prefix.length,
|
|
806
|
+
-this.#suffix.length || undefined,
|
|
807
|
+
)
|
|
808
|
+
this.#wild = !!this.#linear?.every(
|
|
809
|
+
n => n.t === 'star' || n.t === 'any',
|
|
810
|
+
)
|
|
811
|
+
const [min, max] = lengths(items!)
|
|
812
|
+
this.#min = min
|
|
813
|
+
this.#max = max
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
test(s: string): boolean {
|
|
818
|
+
// The `/` check uses the string as given, so with normalization it
|
|
819
|
+
// is a separate step. Otherwise, one scan finds both a `/` and the
|
|
820
|
+
// surrogate pairs that stop the string being indexed by code point.
|
|
821
|
+
if (this.#form) {
|
|
822
|
+
noSlash(s)
|
|
823
|
+
return this.#test(s.normalize(this.#form))
|
|
824
|
+
}
|
|
825
|
+
if (slashOrSurrogate.test(s)) {
|
|
826
|
+
noSlash(s)
|
|
827
|
+
return this.#test(s, [...s])
|
|
828
|
+
}
|
|
829
|
+
return this.#test(s, s)
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* The same as {@link Matcher#test}, but the string is not checked
|
|
834
|
+
* for `/` chars, so the result for a string that has one is not
|
|
835
|
+
* defined. Only use it for a string that is known to be one path
|
|
836
|
+
* portion, such as a part of a path that was split on `/`. It can
|
|
837
|
+
* be faster, because some patterns do not need to look at each char
|
|
838
|
+
* of the string.
|
|
839
|
+
*/
|
|
840
|
+
testUnchecked(s: string): boolean {
|
|
841
|
+
return this.#test(this.#form ? s.normalize(this.#form) : s)
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
// Test a string that has no `/`. `chars` indexes it by code point.
|
|
845
|
+
// If it is not given, it is only found if a step needs it.
|
|
846
|
+
#test(s: string, chars?: ArrayLike<string>): boolean {
|
|
847
|
+
if (this.#literal !== undefined) {
|
|
848
|
+
return this.#literalFold ?
|
|
849
|
+
(this.#literalRe ??= newFoldRe(this.#literal)).test(s)
|
|
850
|
+
: s === this.#literal
|
|
851
|
+
}
|
|
852
|
+
// the length check means that the prefix and suffix do not
|
|
853
|
+
// overlap. Without the chars, the length in code points is from
|
|
854
|
+
// half of the UTF-16 length (if each one is a surrogate pair) to
|
|
855
|
+
// all of it, which is often enough to know.
|
|
856
|
+
const min = this.#min
|
|
857
|
+
const max = this.#max
|
|
858
|
+
if (chars === undefined) {
|
|
859
|
+
const most = s.length
|
|
860
|
+
const least = (most + 1) >> 1
|
|
861
|
+
if (most < min || least > max) return false
|
|
862
|
+
if (least < min || most > max) chars = codePoints(s)
|
|
863
|
+
}
|
|
864
|
+
if (
|
|
865
|
+
chars !== undefined &&
|
|
866
|
+
(chars.length < min || chars.length > max)
|
|
867
|
+
) {
|
|
868
|
+
return false
|
|
869
|
+
}
|
|
870
|
+
const prefix = this.#prefix.length
|
|
871
|
+
if (this.#affix) {
|
|
872
|
+
if (this.#prefixStr !== undefined && this.#suffixStr !== undefined) {
|
|
873
|
+
if (
|
|
874
|
+
!s.startsWith(this.#prefixStr) ||
|
|
875
|
+
!s.endsWith(this.#suffixStr)
|
|
876
|
+
) {
|
|
877
|
+
return false
|
|
878
|
+
}
|
|
879
|
+
} else {
|
|
880
|
+
chars ??= codePoints(s)
|
|
881
|
+
const end = chars.length - this.#suffix.length
|
|
882
|
+
if (
|
|
883
|
+
!hasAffix(this.#prefix, chars, 0) ||
|
|
884
|
+
!hasAffix(this.#suffix, chars, end)
|
|
885
|
+
) {
|
|
886
|
+
return false
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
const dotStart = !this.options.dot && s.startsWith('.')
|
|
891
|
+
if (this.#linear) {
|
|
892
|
+
// `.` and `..` only match literal dots, even with `dot:true`
|
|
893
|
+
if (s === '.' || s === '..') return false
|
|
894
|
+
// only a literal can match the leading dot. A `*` can not
|
|
895
|
+
// start a dotfile, even if it matches nothing.
|
|
896
|
+
if (dotStart && !prefix) return false
|
|
897
|
+
if (this.#wild) return true
|
|
898
|
+
chars ??= codePoints(s)
|
|
899
|
+
const end = chars.length - this.#suffix.length
|
|
900
|
+
return testLinear(this.#linear, chars, prefix, end)
|
|
901
|
+
}
|
|
902
|
+
chars ??= codePoints(s)
|
|
903
|
+
if (s === '.' || s === '..') {
|
|
904
|
+
this.#marks ??= marks(this.#size)
|
|
905
|
+
const sim = (this.#dotsSim ??= new Sim(true, false, this.#marks))
|
|
906
|
+
const start = sim.state()
|
|
907
|
+
sim.add(start, this.#start, 0, true)
|
|
908
|
+
let state = sim.done(start)
|
|
909
|
+
for (let i = 0; i < chars.length; i++) {
|
|
910
|
+
state = sim.step(state, chars[i]!, i, true)
|
|
911
|
+
}
|
|
912
|
+
return state.match
|
|
913
|
+
}
|
|
914
|
+
this.#marks ??= marks(this.#size)
|
|
915
|
+
const dfa = (this.#dfa ??= new Dfa(this.#start, this.#marks))
|
|
916
|
+
let d = dfa.start(dotStart)
|
|
917
|
+
// read char codes from the string, so that a one-char string is
|
|
918
|
+
// only made for a cache miss
|
|
919
|
+
const str = chars === s
|
|
920
|
+
for (let i = 0; i < chars.length; i++) {
|
|
921
|
+
if (d.dead) return false
|
|
922
|
+
const code = str ? s.charCodeAt(i) : chars[i]!.charCodeAt(0)
|
|
923
|
+
d = d.ascii?.[code] ?? dfa.next(d, chars[i]!)
|
|
924
|
+
}
|
|
925
|
+
return d.match
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
/** a readable listing of the state machine */
|
|
929
|
+
toString(): string {
|
|
930
|
+
return show(this.#start)
|
|
931
|
+
}
|
|
932
|
+
}
|