gennady 0.6.0 → 0.7.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/README.md +2 -15
- package/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/ai/agents/agent-review-verifier.xml +6 -0
- package/ai/directives/architecture/README.md +21 -0
- package/ai/directives/coding/README.md +23 -0
- package/ai/directives/coding/result-conventions.xml +55 -0
- package/ai/directives/coding/svelte5-runes.xml +248 -0
- package/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/ai/directives/coding/typescript-rules.xml +589 -0
- package/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/ai/directives/dbc-audit.directive.xml +131 -0
- package/ai/directives/dev-review.directive.xml +148 -0
- package/ai/directives/infra/README.md +11 -0
- package/ai/directives/infra/eslint-setup.xml +467 -0
- package/ai/directives/infra/git-setup.xml +261 -0
- package/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/ai/directives/infra/storybook-setup.xml +153 -0
- package/ai/directives/knowledge.xml +206 -0
- package/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/ai/directives/sdd/README.md +49 -0
- package/ai/directives/sdd/audit.directive.xml +543 -0
- package/ai/directives/sdd/discovery.directive.xml +824 -0
- package/ai/directives/sdd/fix.directive.xml +249 -0
- package/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/ai/directives/sdd/setup.directive.xml +213 -0
- package/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/ai/directives/testing/README.md +25 -0
- package/ai/directives/testing/common.xml +234 -0
- package/ai/directives/testing/node-test.xml +288 -0
- package/ai/directives/testing/playwright-cli.xml +199 -0
- package/ai/directives/testing/playwright-e2e.xml +292 -0
- package/ai/directives/testing/storybook-usage.xml +173 -0
- package/ai/directives/testing/svelte-testing.xml +237 -0
- package/ai/directives/testing/vitest-rules.xml +326 -0
- package/ai/docs/README.md +17 -0
- package/ai/docs/ai-icl.md +538 -0
- package/ai/docs/ai-priming.md +548 -0
- package/ai/docs/ai-prompt-formats.md +406 -0
- package/ai/docs/ai-promting.md +572 -0
- package/ai/drafts/DRAFT.md +120 -0
- package/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/ai/drafts/d.md +65 -0
- package/ai/drafts/music-posts.md +105 -0
- package/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/ai/fw/v1/core/mental-model.xml +50 -0
- package/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/ai/fw/v2/arch-universal.xml +73 -0
- package/ai/fw-draft/README.md +79 -0
- package/ai/fw-draft/bin/discovery.sh +116 -0
- package/ai/fw-draft/gennady.xml +58 -0
- package/ai/fw-draft/provider/claude.xml +16 -0
- package/ai/fw-draft/provider/cursor.xml +23 -0
- package/ai/fw-draft/provider/default.xml +12 -0
- package/ai/fw-draft/roles/developer.xml +18 -0
- package/ai/fw-draft/router.xml +39 -0
- package/ai/fw-draft/routes/development.xml +32 -0
- package/ai/fw-draft/routes/universal.xml +58 -0
- package/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/ai/agents/agent-resolve-conflicts.xml +6 -0
- package/dist/ai/agents/agent-review-verifier.xml +6 -0
- package/dist/ai/directives/architecture/README.md +21 -0
- package/dist/ai/directives/coding/README.md +23 -0
- package/dist/ai/directives/coding/result-conventions.xml +55 -0
- package/dist/ai/directives/coding/svelte5-runes.xml +248 -0
- package/dist/ai/directives/coding/sveltekit-rules.xml +247 -0
- package/dist/ai/directives/coding/typescript-rules.xml +589 -0
- package/dist/ai/directives/coding/uikit-component-storybook.xml +347 -0
- package/dist/ai/directives/coding/uikit-component-svelte.xml +344 -0
- package/dist/ai/directives/coding/uikit-spec-drafting.xml +243 -0
- package/dist/ai/directives/dbc-audit.directive.xml +131 -0
- package/dist/ai/directives/dev-review.directive.xml +148 -0
- package/dist/ai/directives/infra/README.md +11 -0
- package/dist/ai/directives/infra/eslint-setup.xml +467 -0
- package/dist/ai/directives/infra/git-setup.xml +261 -0
- package/dist/ai/directives/infra/nodejs-npm-setup.xml +354 -0
- package/dist/ai/directives/infra/storybook-setup.xml +153 -0
- package/dist/ai/directives/knowledge.xml +206 -0
- package/dist/ai/directives/perf-auditor/perf-auditor.directive.xml +75 -0
- package/dist/ai/directives/perf-auditor/rules/async-latency.xml +101 -0
- package/dist/ai/directives/perf-auditor/rules/data-structures.xml +103 -0
- package/dist/ai/directives/perf-auditor/rules/iteration-fusion.xml +96 -0
- package/dist/ai/directives/perf-auditor/rules/memory-gc.xml +102 -0
- package/dist/ai/directives/sdd/README.md +49 -0
- package/dist/ai/directives/sdd/audit.directive.xml +543 -0
- package/dist/ai/directives/sdd/discovery.directive.xml +824 -0
- package/dist/ai/directives/sdd/fix.directive.xml +249 -0
- package/dist/ai/directives/sdd/module-decomposition.directive.xml +666 -0
- package/dist/ai/directives/sdd/phase-execution-protocol.xml +339 -0
- package/dist/ai/directives/sdd/scaffold.directive.xml +717 -0
- package/dist/ai/directives/sdd/setup.directive.xml +213 -0
- package/dist/ai/directives/sdd/svelte-ui-discovery.directive.xml +263 -0
- package/dist/ai/directives/semantic-change-extractor.directive.xml +99 -0
- package/dist/ai/directives/testing/README.md +25 -0
- package/dist/ai/directives/testing/common.xml +234 -0
- package/dist/ai/directives/testing/node-test.xml +288 -0
- package/dist/ai/directives/testing/playwright-cli.xml +199 -0
- package/dist/ai/directives/testing/playwright-e2e.xml +292 -0
- package/dist/ai/directives/testing/storybook-usage.xml +173 -0
- package/dist/ai/directives/testing/svelte-testing.xml +237 -0
- package/dist/ai/directives/testing/vitest-rules.xml +326 -0
- package/dist/ai/docs/README.md +17 -0
- package/dist/ai/docs/ai-icl.md +538 -0
- package/dist/ai/docs/ai-priming.md +548 -0
- package/dist/ai/docs/ai-prompt-formats.md +406 -0
- package/dist/ai/docs/ai-promting.md +572 -0
- package/dist/ai/drafts/DRAFT.md +120 -0
- package/dist/ai/drafts/agent-devgen-class-from-description.rules.xml +123 -0
- package/dist/ai/drafts/agent-typescript-devgen.v1.xml +303 -0
- package/dist/ai/drafts/d.md +65 -0
- package/dist/ai/drafts/music-posts.md +105 -0
- package/dist/ai/fw/v1/architecture/blueprint-factory.xml +77 -0
- package/dist/ai/fw/v1/core/mental-model.xml +50 -0
- package/dist/ai/fw/v1/discovery/intent-reactor.xml +92 -0
- package/dist/ai/fw/v1/production/swarm-protocol.xml +122 -0
- package/dist/ai/fw/v1/review/quality-pipeline.xml +102 -0
- package/dist/ai/fw/v2/arch-universal.xml +73 -0
- package/dist/ai/fw-draft/README.md +79 -0
- package/dist/ai/fw-draft/bin/discovery.sh +116 -0
- package/dist/ai/fw-draft/gennady.xml +58 -0
- package/dist/ai/fw-draft/provider/claude.xml +16 -0
- package/dist/ai/fw-draft/provider/cursor.xml +23 -0
- package/dist/ai/fw-draft/provider/default.xml +12 -0
- package/dist/ai/fw-draft/roles/developer.xml +18 -0
- package/dist/ai/fw-draft/router.xml +39 -0
- package/dist/ai/fw-draft/routes/development.xml +32 -0
- package/dist/ai/fw-draft/routes/universal.xml +58 -0
- package/dist/ai/fw-draft/rules/dev/base/file-structure-rules.xml +89 -0
- package/dist/ai/fw-draft/rules/dev/typescript/contacts.xml +194 -0
- package/dist/chunks/devtools-B-7ugZhF.js +79 -0
- package/dist/chunks/{help.cmd-CWasx25o.js → help.cmd-B_G7EWzF.js} +9 -2
- package/dist/chunks/{index-B63fYXL2.js → index-BeL1Zcbg.js} +1 -1
- package/dist/chunks/index-CVR66voe.js +26963 -0
- package/dist/chunks/index-CXuhZzS3.js +16979 -0
- package/dist/chunks/{index-B5bA2T7A.js → index-CaahtXiM.js} +33 -9
- package/dist/chunks/{index-iqg0w_pE.js → index-CiEM-8nJ.js} +35 -19
- package/dist/chunks/{index-B4m0-PAT.js → index-D1qsi0Uc.js} +57 -33
- package/dist/chunks/index-D9ceRUyB.js +443 -0
- package/dist/chunks/index-DJpVmyp2.js +176 -0
- package/dist/chunks/{index-C0andxna.js → index-DU6jD7SS.js} +1 -1
- package/dist/chunks/index-KxSZKmZn.js +540 -0
- package/dist/chunks/{index-Dqe1TdW4.js → index-UbHoePfr.js} +12 -12
- package/dist/chunks/{index-5xIgwwKx.js → index-g1LXlp77.js} +2 -2
- package/dist/chunks/index-zBnnuvLA.js +3788 -0
- package/dist/chunks/{run-review-command.logic-a_M3CkeZ.js → run-review-command.logic-DpkRoEi8.js} +2 -2
- package/dist/chunks/services-CaLOhuLV.js +2889 -0
- package/dist/chunks/shared-Bjy30TeM.js +665 -0
- package/dist/cli/cmd/_shared/prompt/io/load-agent-template.io.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-first-knowledge-block.logic.d.ts +3 -3
- package/dist/cli/cmd/_shared/prompt/logic/build-ai-verify-placeholders.logic.d.ts +7 -4
- package/dist/cli/cmd/_shared/prompt/logic/verify-commands/resolve-verify-commands.logic.d.ts +5 -0
- package/dist/cli/cmd/_shared/update-check-worker.d.ts +1 -0
- package/dist/cli/cmd/_shared/update-check.d.ts +38 -0
- package/dist/cli/cmd/agent-mon/cmd/create-providers.d.ts +15 -0
- package/dist/cli/cmd/agent-mon/cmd/index.d.ts +1 -0
- package/dist/cli/cmd/agent-mon/cmd/run.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/state/create-state-manager.d.ts +32 -0
- package/dist/cli/cmd/agent-mon/state/group-by-provider.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/state/index.d.ts +5 -0
- package/dist/cli/cmd/agent-mon/state/is-waiting.d.ts +9 -0
- package/dist/cli/cmd/agent-mon/state/view-model.type.d.ts +74 -0
- package/dist/cli/cmd/agent-mon/ui/app.d.ts +16 -0
- package/dist/cli/cmd/agent-mon/ui/column-view.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/index.d.ts +10 -0
- package/dist/cli/cmd/agent-mon/ui/provider-column.d.ts +14 -0
- package/dist/cli/cmd/agent-mon/ui/session-card.d.ts +12 -0
- package/dist/cli/cmd/agent-mon/ui/status-badge.d.ts +10 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-parser.d.ts +18 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion-runner.d.ts +32 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.cmd.d.ts +34 -0
- package/dist/cli/cmd/alt-opinion/alt-opinion.types.d.ts +88 -0
- package/dist/cli/cmd/alt-opinion/index.d.ts +1 -0
- package/dist/cli/cmd/cat/cat-url.fn.d.ts +19 -0
- package/dist/cli/cmd/lint/checks/anchor.check.d.ts +11 -0
- package/dist/cli/cmd/lint/checks/dbc-contract.check.d.ts +16 -0
- package/dist/cli/cmd/lint/checks/disables.check.d.ts +12 -0
- package/dist/cli/cmd/lint/checks/file-header.check.d.ts +10 -0
- package/dist/cli/cmd/lint/checks/language.check.d.ts +11 -0
- package/dist/cli/cmd/lint/index.d.ts +1 -0
- package/dist/cli/cmd/lint/lint.cmd.d.ts +18 -0
- package/dist/cli/cmd/lint/lint.types.d.ts +72 -0
- package/dist/cli/cmd/lint/utils/resolve-references.fn.d.ts +32 -0
- package/dist/cli/cmd/remote-console/index.d.ts +2 -0
- package/dist/cli/cmd/remote-console/remote-console.cmd.d.ts +55 -0
- package/dist/cli/cmd/resolve-conflicts/_core/io/resolve-conflicts-template-load.io.d.ts +2 -2
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-args-parse.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-command-run.logic.d.ts +3 -3
- package/dist/cli/cmd/resolve-conflicts/_core/logic/resolve-conflicts-context-git-build.logic.d.ts +4 -4
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-artifact.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-args.type.d.ts +3 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/resolve-conflicts/_core/types/resolve-conflicts-context-git.type.d.ts +18 -2
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-artifact-build.xml.d.ts +6 -6
- package/dist/cli/cmd/resolve-conflicts/_core/xml/resolve-conflicts-render.xml.d.ts +4 -4
- package/dist/cli/cmd/review/_core/io/load-review-verify-template.io.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/build-review-context-git.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/build-review-context-vcs.logic.d.ts +2 -2
- package/dist/cli/cmd/review/_core/logic/load-review-context-mr.logic.d.ts +5 -5
- package/dist/cli/cmd/review/_core/logic/parse-review-command-args.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/resolve-review-intent.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/logic/run-review-command.logic.d.ts +3 -3
- package/dist/cli/cmd/review/_core/types/review-artifact.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-command-args.type.d.ts +7 -1
- package/dist/cli/cmd/review/_core/types/review-command-mode.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/types/review-command-options.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-command-result.type.d.ts +5 -1
- package/dist/cli/cmd/review/_core/types/review-context-git.type.d.ts +3 -1
- package/dist/cli/cmd/review/_core/types/review-context-mr.type.d.ts +22 -3
- package/dist/cli/cmd/review/_core/types/review-context-vcs.type.d.ts +4 -1
- package/dist/cli/cmd/review/_core/types/review-intent.type.d.ts +1 -1
- package/dist/cli/cmd/review/_core/xml/build-review-artifact.xml.d.ts +10 -10
- package/dist/cli/cmd/review/_core/xml/render-review-issues.xml.d.ts +3 -3
- package/dist/cli/cmd/review/_core/xml/render-review-verify.xml.d.ts +4 -4
- package/dist/cli/cmd/sync/index.d.ts +1 -0
- package/dist/cli/cmd/sync/sync-core.d.ts +65 -0
- package/dist/cli/cmd/sync/sync-formatter.d.ts +12 -0
- package/dist/cli/cmd/sync/sync.cmd.d.ts +33 -0
- package/dist/cli/cmd/sync/sync.types.d.ts +50 -0
- package/dist/cli/cmd/vcs-reply/vcs-reply.cmd.d.ts +4 -4
- package/dist/cli/utils/ai-legacy/ai-legacy-agent.d.ts +12 -11
- package/dist/cli/utils/ai-legacy/ai-legacy-core.d.ts +33 -17
- package/dist/cli/utils/ai-legacy/ai-legacy-model.d.ts +42 -23
- package/dist/cli/utils/cat-gen/cat-gen.d.ts +19 -8
- package/dist/cli/utils/commit-gen/commit-gen.d.ts +39 -15
- package/dist/cli/utils/prompts/index.d.ts +6 -6
- package/dist/cli/utils/review-gen/review-gen.d.ts +33 -9
- package/dist/gennady.js +30 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +44 -23
- package/dist/services/agent-mon/diff/diff.d.ts +9 -0
- package/dist/services/agent-mon/diff/index.d.ts +1 -0
- package/dist/services/agent-mon/index.d.ts +10 -0
- package/dist/services/agent-mon/model/agent-provider.type.d.ts +20 -0
- package/dist/services/agent-mon/model/agent-session.type.d.ts +49 -0
- package/dist/services/agent-mon/model/errors.d.ts +20 -0
- package/dist/services/agent-mon/model/index.d.ts +7 -0
- package/dist/services/agent-mon/model/observe-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/scan-opts.type.d.ts +7 -0
- package/dist/services/agent-mon/model/session-changes.type.d.ts +10 -0
- package/dist/services/agent-mon/monitor/agent-monitor.d.ts +44 -0
- package/dist/services/agent-mon/monitor/create-monitor.d.ts +6 -0
- package/dist/services/agent-mon/monitor/index.d.ts +2 -0
- package/dist/services/agent-mon/observe/index.d.ts +1 -0
- package/dist/services/agent-mon/observe/observe.d.ts +12 -0
- package/dist/services/agent-mon/providers/claude/claude-provider.d.ts +50 -0
- package/dist/services/agent-mon/providers/claude/index.d.ts +5 -0
- package/dist/services/agent-mon/providers/claude/ps.d.ts +36 -0
- package/dist/services/agent-mon/providers/claude/session-json.d.ts +37 -0
- package/dist/services/agent-mon/providers/opencode/db.d.ts +41 -0
- package/dist/services/agent-mon/providers/opencode/index.d.ts +3 -0
- package/dist/services/agent-mon/providers/opencode/model-parser.d.ts +6 -0
- package/dist/services/agent-mon/providers/opencode/opencode-provider.d.ts +45 -0
- package/dist/services/ai-client/providers/ai-model.type.d.ts +14 -0
- package/dist/services/ai-client/providers/open-router/open-router-model.type.d.ts +1 -4
- package/dist/services/ai-client/providers/open-router/open-router-provider.d.ts +17 -0
- package/dist/services/ai-client/providers/openai-like-provider.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.d.ts +17 -0
- package/dist/services/data-ore/telegram/telegram-data-ore.types.d.ts +4 -0
- package/dist/services/data-ore/telegram/telegram-demo-music-helper.d.ts +1 -0
- package/dist/services/data-ore/telegram/telegram-demo.d.ts +1 -0
- package/dist/services/dbc/linter/dbc-ast-adapter.types.d.ts +82 -0
- package/dist/services/dbc/linter/dbc-linter.types.d.ts +95 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-ast-adapter.d.ts +183 -0
- package/dist/services/dbc/linter/implementations/ts/dbc-ts-linter.d.ts +152 -0
- package/dist/services/dbc/parser/dbc-parser.types.d.ts +16 -16
- package/dist/services/dbc/parser/implementations/jsdoc/dbc-jsdoc-parser.d.ts +14 -4
- package/dist/services/logger/logger.d.ts +26 -6
- package/dist/services/remote-console/client/remote-console-client-serializer.d.ts +7 -0
- package/dist/services/remote-console/client/remote-console-client.d.ts +20 -0
- package/dist/services/remote-console/client/remote-console-client.types.d.ts +88 -0
- package/dist/services/remote-console/remote-console.d.ts +6 -0
- package/dist/services/remote-console/server/remote-console-server.d.ts +10 -0
- package/dist/services/remote-console/server/remote-console-server.types.d.ts +44 -0
- package/dist/services/remote-console/server/remote-console-stdout-writer.d.ts +26 -0
- package/dist/services/vcs-client/abstract/vcs-client-merge-discussions.d.ts +22 -14
- package/dist/services/vcs-client/abstract/vcs-client-merge-requests.d.ts +31 -14
- package/dist/services/vcs-client/abstract/vcs-client-repository-files.d.ts +16 -0
- package/dist/services/vcs-client/abstract/vcs-client.d.ts +9 -5
- package/dist/services/vcs-client/entities/vcs-file-content.type.d.ts +24 -0
- package/dist/services/vcs-client/entities/vcs-merge-request-changes.type.d.ts +32 -0
- package/dist/services/vcs-client/entities/vcs-url.type.d.ts +14 -0
- package/dist/services/vcs-client/entities/vcs-user.type.d.ts +3 -0
- package/dist/services/vcs-client/github/vcs-github-client.d.ts +31 -0
- package/dist/services/vcs-client/github/vcs-github-merge-requests.d.ts +40 -0
- package/dist/services/vcs-client/github/vcs-github-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/gitlab/vcs-gitlab-client.d.ts +13 -4
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-discussions.d.ts +16 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-merge-requests.d.ts +24 -5
- package/dist/services/vcs-client/gitlab/vcs-gitlab-repository-files.d.ts +27 -0
- package/dist/services/vcs-client/parse-vcs-url.d.ts +3 -0
- package/dist/shared/backend/git/git-core.d.ts +24 -22
- package/dist/shared/backend/git/git-diff.d.ts +16 -5
- package/dist/shared/backend/rc/rc-config.d.ts +27 -15
- package/dist/shared/common/exec.d.ts +4 -6
- package/dist/shared/common/files.d.ts +1 -3
- package/dist/shared/common/language.d.ts +3 -6
- package/dist/shared/common/parse-args.d.ts +1 -4
- package/dist/shared/common/style.d.ts +3 -3
- package/dist/shared/common/think.d.ts +1 -5
- package/dist/shared/common/tokens.d.ts +1 -5
- package/dist/shared/common/unguard.d.ts +4 -8
- package/dist/shared/common/xml.d.ts +16 -12
- package/package.json +20 -4
- package/dist/.ai/agents/agent-review-verifier.xml +0 -181
- package/dist/chunks/index-CNbmXK8M.js +0 -3548
- package/dist/chunks/services-Sb7TwLxt.js +0 -122
- package/dist/chunks/shared-BgLzFWMH.js +0 -577
|
@@ -1,3548 +0,0 @@
|
|
|
1
|
-
import ct from "node:fs";
|
|
2
|
-
import lt from "node:path";
|
|
3
|
-
import It from "os";
|
|
4
|
-
import he from "path";
|
|
5
|
-
import gn from "util";
|
|
6
|
-
import it from "stream";
|
|
7
|
-
import bn from "events";
|
|
8
|
-
import Ft from "fs";
|
|
9
|
-
import { l as Qt } from "./services-Sb7TwLxt.js";
|
|
10
|
-
import { p as Pn, s as ie } from "./shared-BgLzFWMH.js";
|
|
11
|
-
var Cn = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12
|
-
function Tn(u) {
|
|
13
|
-
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
14
|
-
}
|
|
15
|
-
var te = {}, re = {}, ve = {}, Yt;
|
|
16
|
-
function xn() {
|
|
17
|
-
if (Yt) return ve;
|
|
18
|
-
Yt = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.splitWhen = ve.flatten = void 0;
|
|
19
|
-
function u(f) {
|
|
20
|
-
return f.reduce((a, n) => [].concat(a, n), []);
|
|
21
|
-
}
|
|
22
|
-
ve.flatten = u;
|
|
23
|
-
function o(f, a) {
|
|
24
|
-
const n = [[]];
|
|
25
|
-
let e = 0;
|
|
26
|
-
for (const r of f)
|
|
27
|
-
a(r) ? (e++, n[e] = []) : n[e].push(r);
|
|
28
|
-
return n;
|
|
29
|
-
}
|
|
30
|
-
return ve.splitWhen = o, ve;
|
|
31
|
-
}
|
|
32
|
-
var Ae = {}, Xt;
|
|
33
|
-
function On() {
|
|
34
|
-
if (Xt) return Ae;
|
|
35
|
-
Xt = 1, Object.defineProperty(Ae, "__esModule", { value: !0 }), Ae.isEnoentCodeError = void 0;
|
|
36
|
-
function u(o) {
|
|
37
|
-
return o.code === "ENOENT";
|
|
38
|
-
}
|
|
39
|
-
return Ae.isEnoentCodeError = u, Ae;
|
|
40
|
-
}
|
|
41
|
-
var be = {}, Zt;
|
|
42
|
-
function wn() {
|
|
43
|
-
if (Zt) return be;
|
|
44
|
-
Zt = 1, Object.defineProperty(be, "__esModule", { value: !0 }), be.createDirentFromStats = void 0;
|
|
45
|
-
class u {
|
|
46
|
-
constructor(a, n) {
|
|
47
|
-
this.name = a, this.isBlockDevice = n.isBlockDevice.bind(n), this.isCharacterDevice = n.isCharacterDevice.bind(n), this.isDirectory = n.isDirectory.bind(n), this.isFIFO = n.isFIFO.bind(n), this.isFile = n.isFile.bind(n), this.isSocket = n.isSocket.bind(n), this.isSymbolicLink = n.isSymbolicLink.bind(n);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function o(f, a) {
|
|
51
|
-
return new u(f, a);
|
|
52
|
-
}
|
|
53
|
-
return be.createDirentFromStats = o, be;
|
|
54
|
-
}
|
|
55
|
-
var Z = {}, zt;
|
|
56
|
-
function $n() {
|
|
57
|
-
if (zt) return Z;
|
|
58
|
-
zt = 1, Object.defineProperty(Z, "__esModule", { value: !0 }), Z.convertPosixPathToPattern = Z.convertWindowsPathToPattern = Z.convertPathToPattern = Z.escapePosixPath = Z.escapeWindowsPath = Z.escape = Z.removeLeadingDotSegment = Z.makeAbsolute = Z.unixify = void 0;
|
|
59
|
-
const u = It, o = he, f = u.platform() === "win32", a = 2, n = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g, e = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g, r = /^\\\\([.?])/, t = /\\(?![!()+@[\]{}])/g;
|
|
60
|
-
function s(P) {
|
|
61
|
-
return P.replace(/\\/g, "/");
|
|
62
|
-
}
|
|
63
|
-
Z.unixify = s;
|
|
64
|
-
function i(P, d) {
|
|
65
|
-
return o.resolve(P, d);
|
|
66
|
-
}
|
|
67
|
-
Z.makeAbsolute = i;
|
|
68
|
-
function c(P) {
|
|
69
|
-
if (P.charAt(0) === ".") {
|
|
70
|
-
const d = P.charAt(1);
|
|
71
|
-
if (d === "/" || d === "\\")
|
|
72
|
-
return P.slice(a);
|
|
73
|
-
}
|
|
74
|
-
return P;
|
|
75
|
-
}
|
|
76
|
-
Z.removeLeadingDotSegment = c, Z.escape = f ? h : l;
|
|
77
|
-
function h(P) {
|
|
78
|
-
return P.replace(e, "\\$2");
|
|
79
|
-
}
|
|
80
|
-
Z.escapeWindowsPath = h;
|
|
81
|
-
function l(P) {
|
|
82
|
-
return P.replace(n, "\\$2");
|
|
83
|
-
}
|
|
84
|
-
Z.escapePosixPath = l, Z.convertPathToPattern = f ? y : C;
|
|
85
|
-
function y(P) {
|
|
86
|
-
return h(P).replace(r, "//$1").replace(t, "/");
|
|
87
|
-
}
|
|
88
|
-
Z.convertWindowsPathToPattern = y;
|
|
89
|
-
function C(P) {
|
|
90
|
-
return l(P);
|
|
91
|
-
}
|
|
92
|
-
return Z.convertPosixPathToPattern = C, Z;
|
|
93
|
-
}
|
|
94
|
-
var M = {};
|
|
95
|
-
/*!
|
|
96
|
-
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
|
97
|
-
*
|
|
98
|
-
* Copyright (c) 2014-2016, Jon Schlinkert.
|
|
99
|
-
* Licensed under the MIT License.
|
|
100
|
-
*/
|
|
101
|
-
var ft, Jt;
|
|
102
|
-
function Ln() {
|
|
103
|
-
return Jt || (Jt = 1, ft = function(o) {
|
|
104
|
-
if (typeof o != "string" || o === "")
|
|
105
|
-
return !1;
|
|
106
|
-
for (var f; f = /(\\).|([@?!+*]\(.*\))/g.exec(o); ) {
|
|
107
|
-
if (f[2]) return !0;
|
|
108
|
-
o = o.slice(f.index + f[0].length);
|
|
109
|
-
}
|
|
110
|
-
return !1;
|
|
111
|
-
}), ft;
|
|
112
|
-
}
|
|
113
|
-
/*!
|
|
114
|
-
* is-glob <https://github.com/jonschlinkert/is-glob>
|
|
115
|
-
*
|
|
116
|
-
* Copyright (c) 2014-2017, Jon Schlinkert.
|
|
117
|
-
* Released under the MIT License.
|
|
118
|
-
*/
|
|
119
|
-
var ht, er;
|
|
120
|
-
function kn() {
|
|
121
|
-
if (er) return ht;
|
|
122
|
-
er = 1;
|
|
123
|
-
var u = Ln(), o = { "{": "}", "(": ")", "[": "]" }, f = function(n) {
|
|
124
|
-
if (n[0] === "!")
|
|
125
|
-
return !0;
|
|
126
|
-
for (var e = 0, r = -2, t = -2, s = -2, i = -2, c = -2; e < n.length; ) {
|
|
127
|
-
if (n[e] === "*" || n[e + 1] === "?" && /[\].+)]/.test(n[e]) || t !== -1 && n[e] === "[" && n[e + 1] !== "]" && (t < e && (t = n.indexOf("]", e)), t > e && (c === -1 || c > t || (c = n.indexOf("\\", e), c === -1 || c > t))) || s !== -1 && n[e] === "{" && n[e + 1] !== "}" && (s = n.indexOf("}", e), s > e && (c = n.indexOf("\\", e), c === -1 || c > s)) || i !== -1 && n[e] === "(" && n[e + 1] === "?" && /[:!=]/.test(n[e + 2]) && n[e + 3] !== ")" && (i = n.indexOf(")", e), i > e && (c = n.indexOf("\\", e), c === -1 || c > i)) || r !== -1 && n[e] === "(" && n[e + 1] !== "|" && (r < e && (r = n.indexOf("|", e)), r !== -1 && n[r + 1] !== ")" && (i = n.indexOf(")", r), i > r && (c = n.indexOf("\\", r), c === -1 || c > i))))
|
|
128
|
-
return !0;
|
|
129
|
-
if (n[e] === "\\") {
|
|
130
|
-
var h = n[e + 1];
|
|
131
|
-
e += 2;
|
|
132
|
-
var l = o[h];
|
|
133
|
-
if (l) {
|
|
134
|
-
var y = n.indexOf(l, e);
|
|
135
|
-
y !== -1 && (e = y + 1);
|
|
136
|
-
}
|
|
137
|
-
if (n[e] === "!")
|
|
138
|
-
return !0;
|
|
139
|
-
} else
|
|
140
|
-
e++;
|
|
141
|
-
}
|
|
142
|
-
return !1;
|
|
143
|
-
}, a = function(n) {
|
|
144
|
-
if (n[0] === "!")
|
|
145
|
-
return !0;
|
|
146
|
-
for (var e = 0; e < n.length; ) {
|
|
147
|
-
if (/[*?{}()[\]]/.test(n[e]))
|
|
148
|
-
return !0;
|
|
149
|
-
if (n[e] === "\\") {
|
|
150
|
-
var r = n[e + 1];
|
|
151
|
-
e += 2;
|
|
152
|
-
var t = o[r];
|
|
153
|
-
if (t) {
|
|
154
|
-
var s = n.indexOf(t, e);
|
|
155
|
-
s !== -1 && (e = s + 1);
|
|
156
|
-
}
|
|
157
|
-
if (n[e] === "!")
|
|
158
|
-
return !0;
|
|
159
|
-
} else
|
|
160
|
-
e++;
|
|
161
|
-
}
|
|
162
|
-
return !1;
|
|
163
|
-
};
|
|
164
|
-
return ht = function(e, r) {
|
|
165
|
-
if (typeof e != "string" || e === "")
|
|
166
|
-
return !1;
|
|
167
|
-
if (u(e))
|
|
168
|
-
return !0;
|
|
169
|
-
var t = f;
|
|
170
|
-
return r && r.strict === !1 && (t = a), t(e);
|
|
171
|
-
}, ht;
|
|
172
|
-
}
|
|
173
|
-
var pt, tr;
|
|
174
|
-
function Hn() {
|
|
175
|
-
if (tr) return pt;
|
|
176
|
-
tr = 1;
|
|
177
|
-
var u = kn(), o = he.posix.dirname, f = It.platform() === "win32", a = "/", n = /\\/g, e = /[\{\[].*[\}\]]$/, r = /(^|[^\\])([\{\[]|\([^\)]+$)/, t = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
178
|
-
return pt = function(i, c) {
|
|
179
|
-
var h = Object.assign({ flipBackslashes: !0 }, c);
|
|
180
|
-
h.flipBackslashes && f && i.indexOf(a) < 0 && (i = i.replace(n, a)), e.test(i) && (i += a), i += "a";
|
|
181
|
-
do
|
|
182
|
-
i = o(i);
|
|
183
|
-
while (u(i) || r.test(i));
|
|
184
|
-
return i.replace(t, "$1");
|
|
185
|
-
}, pt;
|
|
186
|
-
}
|
|
187
|
-
var dt = {}, rr;
|
|
188
|
-
function Bt() {
|
|
189
|
-
return rr || (rr = 1, (function(u) {
|
|
190
|
-
u.isInteger = (o) => typeof o == "number" ? Number.isInteger(o) : typeof o == "string" && o.trim() !== "" ? Number.isInteger(Number(o)) : !1, u.find = (o, f) => o.nodes.find((a) => a.type === f), u.exceedsLimit = (o, f, a = 1, n) => n === !1 || !u.isInteger(o) || !u.isInteger(f) ? !1 : (Number(f) - Number(o)) / Number(a) >= n, u.escapeNode = (o, f = 0, a) => {
|
|
191
|
-
const n = o.nodes[f];
|
|
192
|
-
n && (a && n.type === a || n.type === "open" || n.type === "close") && n.escaped !== !0 && (n.value = "\\" + n.value, n.escaped = !0);
|
|
193
|
-
}, u.encloseBrace = (o) => o.type !== "brace" ? !1 : o.commas >> 0 + o.ranges >> 0 === 0 ? (o.invalid = !0, !0) : !1, u.isInvalidBrace = (o) => o.type !== "brace" ? !1 : o.invalid === !0 || o.dollar ? !0 : o.commas >> 0 + o.ranges >> 0 === 0 || o.open !== !0 || o.close !== !0 ? (o.invalid = !0, !0) : !1, u.isOpenOrClose = (o) => o.type === "open" || o.type === "close" ? !0 : o.open === !0 || o.close === !0, u.reduce = (o) => o.reduce((f, a) => (a.type === "text" && f.push(a.value), a.type === "range" && (a.type = "text"), f), []), u.flatten = (...o) => {
|
|
194
|
-
const f = [], a = (n) => {
|
|
195
|
-
for (let e = 0; e < n.length; e++) {
|
|
196
|
-
const r = n[e];
|
|
197
|
-
if (Array.isArray(r)) {
|
|
198
|
-
a(r);
|
|
199
|
-
continue;
|
|
200
|
-
}
|
|
201
|
-
r !== void 0 && f.push(r);
|
|
202
|
-
}
|
|
203
|
-
return f;
|
|
204
|
-
};
|
|
205
|
-
return a(o), f;
|
|
206
|
-
};
|
|
207
|
-
})(dt)), dt;
|
|
208
|
-
}
|
|
209
|
-
var _t, nr;
|
|
210
|
-
function jt() {
|
|
211
|
-
if (nr) return _t;
|
|
212
|
-
nr = 1;
|
|
213
|
-
const u = Bt();
|
|
214
|
-
return _t = (o, f = {}) => {
|
|
215
|
-
const a = (n, e = {}) => {
|
|
216
|
-
const r = f.escapeInvalid && u.isInvalidBrace(e), t = n.invalid === !0 && f.escapeInvalid === !0;
|
|
217
|
-
let s = "";
|
|
218
|
-
if (n.value)
|
|
219
|
-
return (r || t) && u.isOpenOrClose(n) ? "\\" + n.value : n.value;
|
|
220
|
-
if (n.value)
|
|
221
|
-
return n.value;
|
|
222
|
-
if (n.nodes)
|
|
223
|
-
for (const i of n.nodes)
|
|
224
|
-
s += a(i);
|
|
225
|
-
return s;
|
|
226
|
-
};
|
|
227
|
-
return a(o);
|
|
228
|
-
}, _t;
|
|
229
|
-
}
|
|
230
|
-
/*!
|
|
231
|
-
* is-number <https://github.com/jonschlinkert/is-number>
|
|
232
|
-
*
|
|
233
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
234
|
-
* Released under the MIT License.
|
|
235
|
-
*/
|
|
236
|
-
var gt, ir;
|
|
237
|
-
function Mn() {
|
|
238
|
-
return ir || (ir = 1, gt = function(u) {
|
|
239
|
-
return typeof u == "number" ? u - u === 0 : typeof u == "string" && u.trim() !== "" ? Number.isFinite ? Number.isFinite(+u) : isFinite(+u) : !1;
|
|
240
|
-
}), gt;
|
|
241
|
-
}
|
|
242
|
-
/*!
|
|
243
|
-
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
|
244
|
-
*
|
|
245
|
-
* Copyright (c) 2015-present, Jon Schlinkert.
|
|
246
|
-
* Released under the MIT License.
|
|
247
|
-
*/
|
|
248
|
-
var yt, sr;
|
|
249
|
-
function Dn() {
|
|
250
|
-
if (sr) return yt;
|
|
251
|
-
sr = 1;
|
|
252
|
-
const u = Mn(), o = (d, _, b) => {
|
|
253
|
-
if (u(d) === !1)
|
|
254
|
-
throw new TypeError("toRegexRange: expected the first argument to be a number");
|
|
255
|
-
if (_ === void 0 || d === _)
|
|
256
|
-
return String(d);
|
|
257
|
-
if (u(_) === !1)
|
|
258
|
-
throw new TypeError("toRegexRange: expected the second argument to be a number.");
|
|
259
|
-
let p = { relaxZeros: !0, ...b };
|
|
260
|
-
typeof p.strictZeros == "boolean" && (p.relaxZeros = p.strictZeros === !1);
|
|
261
|
-
let A = String(p.relaxZeros), S = String(p.shorthand), T = String(p.capture), m = String(p.wrap), L = d + ":" + _ + "=" + A + S + T + m;
|
|
262
|
-
if (o.cache.hasOwnProperty(L))
|
|
263
|
-
return o.cache[L].result;
|
|
264
|
-
let k = Math.min(d, _), D = Math.max(d, _);
|
|
265
|
-
if (Math.abs(k - D) === 1) {
|
|
266
|
-
let I = d + "|" + _;
|
|
267
|
-
return p.capture ? `(${I})` : p.wrap === !1 ? I : `(?:${I})`;
|
|
268
|
-
}
|
|
269
|
-
let w = C(d) || C(_), H = { min: d, max: _, a: k, b: D }, R = [], j = [];
|
|
270
|
-
if (w && (H.isPadded = w, H.maxLen = String(H.max).length), k < 0) {
|
|
271
|
-
let I = D < 0 ? Math.abs(D) : 1;
|
|
272
|
-
j = e(I, Math.abs(k), H, p), k = H.a = 0;
|
|
273
|
-
}
|
|
274
|
-
return D >= 0 && (R = e(k, D, H, p)), H.negatives = j, H.positives = R, H.result = f(j, R), p.capture === !0 ? H.result = `(${H.result})` : p.wrap !== !1 && R.length + j.length > 1 && (H.result = `(?:${H.result})`), o.cache[L] = H, H.result;
|
|
275
|
-
};
|
|
276
|
-
function f(d, _, b) {
|
|
277
|
-
let p = r(d, _, "-", !1) || [], A = r(_, d, "", !1) || [], S = r(d, _, "-?", !0) || [];
|
|
278
|
-
return p.concat(S).concat(A).join("|");
|
|
279
|
-
}
|
|
280
|
-
function a(d, _) {
|
|
281
|
-
let b = 1, p = 1, A = c(d, b), S = /* @__PURE__ */ new Set([_]);
|
|
282
|
-
for (; d <= A && A <= _; )
|
|
283
|
-
S.add(A), b += 1, A = c(d, b);
|
|
284
|
-
for (A = h(_ + 1, p) - 1; d < A && A <= _; )
|
|
285
|
-
S.add(A), p += 1, A = h(_ + 1, p) - 1;
|
|
286
|
-
return S = [...S], S.sort(s), S;
|
|
287
|
-
}
|
|
288
|
-
function n(d, _, b) {
|
|
289
|
-
if (d === _)
|
|
290
|
-
return { pattern: d, count: [], digits: 0 };
|
|
291
|
-
let p = t(d, _), A = p.length, S = "", T = 0;
|
|
292
|
-
for (let m = 0; m < A; m++) {
|
|
293
|
-
let [L, k] = p[m];
|
|
294
|
-
L === k ? S += L : L !== "0" || k !== "9" ? S += y(L, k) : T++;
|
|
295
|
-
}
|
|
296
|
-
return T && (S += b.shorthand === !0 ? "\\d" : "[0-9]"), { pattern: S, count: [T], digits: A };
|
|
297
|
-
}
|
|
298
|
-
function e(d, _, b, p) {
|
|
299
|
-
let A = a(d, _), S = [], T = d, m;
|
|
300
|
-
for (let L = 0; L < A.length; L++) {
|
|
301
|
-
let k = A[L], D = n(String(T), String(k), p), w = "";
|
|
302
|
-
if (!b.isPadded && m && m.pattern === D.pattern) {
|
|
303
|
-
m.count.length > 1 && m.count.pop(), m.count.push(D.count[0]), m.string = m.pattern + l(m.count), T = k + 1;
|
|
304
|
-
continue;
|
|
305
|
-
}
|
|
306
|
-
b.isPadded && (w = P(k, b, p)), D.string = w + D.pattern + l(D.count), S.push(D), T = k + 1, m = D;
|
|
307
|
-
}
|
|
308
|
-
return S;
|
|
309
|
-
}
|
|
310
|
-
function r(d, _, b, p, A) {
|
|
311
|
-
let S = [];
|
|
312
|
-
for (let T of d) {
|
|
313
|
-
let { string: m } = T;
|
|
314
|
-
!p && !i(_, "string", m) && S.push(b + m), p && i(_, "string", m) && S.push(b + m);
|
|
315
|
-
}
|
|
316
|
-
return S;
|
|
317
|
-
}
|
|
318
|
-
function t(d, _) {
|
|
319
|
-
let b = [];
|
|
320
|
-
for (let p = 0; p < d.length; p++) b.push([d[p], _[p]]);
|
|
321
|
-
return b;
|
|
322
|
-
}
|
|
323
|
-
function s(d, _) {
|
|
324
|
-
return d > _ ? 1 : _ > d ? -1 : 0;
|
|
325
|
-
}
|
|
326
|
-
function i(d, _, b) {
|
|
327
|
-
return d.some((p) => p[_] === b);
|
|
328
|
-
}
|
|
329
|
-
function c(d, _) {
|
|
330
|
-
return Number(String(d).slice(0, -_) + "9".repeat(_));
|
|
331
|
-
}
|
|
332
|
-
function h(d, _) {
|
|
333
|
-
return d - d % Math.pow(10, _);
|
|
334
|
-
}
|
|
335
|
-
function l(d) {
|
|
336
|
-
let [_ = 0, b = ""] = d;
|
|
337
|
-
return b || _ > 1 ? `{${_ + (b ? "," + b : "")}}` : "";
|
|
338
|
-
}
|
|
339
|
-
function y(d, _, b) {
|
|
340
|
-
return `[${d}${_ - d === 1 ? "" : "-"}${_}]`;
|
|
341
|
-
}
|
|
342
|
-
function C(d) {
|
|
343
|
-
return /^-?(0+)\d/.test(d);
|
|
344
|
-
}
|
|
345
|
-
function P(d, _, b) {
|
|
346
|
-
if (!_.isPadded)
|
|
347
|
-
return d;
|
|
348
|
-
let p = Math.abs(_.maxLen - String(d).length), A = b.relaxZeros !== !1;
|
|
349
|
-
switch (p) {
|
|
350
|
-
case 0:
|
|
351
|
-
return "";
|
|
352
|
-
case 1:
|
|
353
|
-
return A ? "0?" : "0";
|
|
354
|
-
case 2:
|
|
355
|
-
return A ? "0{0,2}" : "00";
|
|
356
|
-
default:
|
|
357
|
-
return A ? `0{0,${p}}` : `0{${p}}`;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
return o.cache = {}, o.clearCache = () => o.cache = {}, yt = o, yt;
|
|
361
|
-
}
|
|
362
|
-
/*!
|
|
363
|
-
* fill-range <https://github.com/jonschlinkert/fill-range>
|
|
364
|
-
*
|
|
365
|
-
* Copyright (c) 2014-present, Jon Schlinkert.
|
|
366
|
-
* Licensed under the MIT License.
|
|
367
|
-
*/
|
|
368
|
-
var St, ar;
|
|
369
|
-
function yn() {
|
|
370
|
-
if (ar) return St;
|
|
371
|
-
ar = 1;
|
|
372
|
-
const u = gn, o = Dn(), f = (p) => p !== null && typeof p == "object" && !Array.isArray(p), a = (p) => (A) => p === !0 ? Number(A) : String(A), n = (p) => typeof p == "number" || typeof p == "string" && p !== "", e = (p) => Number.isInteger(+p), r = (p) => {
|
|
373
|
-
let A = `${p}`, S = -1;
|
|
374
|
-
if (A[0] === "-" && (A = A.slice(1)), A === "0") return !1;
|
|
375
|
-
for (; A[++S] === "0"; ) ;
|
|
376
|
-
return S > 0;
|
|
377
|
-
}, t = (p, A, S) => typeof p == "string" || typeof A == "string" ? !0 : S.stringify === !0, s = (p, A, S) => {
|
|
378
|
-
if (A > 0) {
|
|
379
|
-
let T = p[0] === "-" ? "-" : "";
|
|
380
|
-
T && (p = p.slice(1)), p = T + p.padStart(T ? A - 1 : A, "0");
|
|
381
|
-
}
|
|
382
|
-
return S === !1 ? String(p) : p;
|
|
383
|
-
}, i = (p, A) => {
|
|
384
|
-
let S = p[0] === "-" ? "-" : "";
|
|
385
|
-
for (S && (p = p.slice(1), A--); p.length < A; ) p = "0" + p;
|
|
386
|
-
return S ? "-" + p : p;
|
|
387
|
-
}, c = (p, A, S) => {
|
|
388
|
-
p.negatives.sort((D, w) => D < w ? -1 : D > w ? 1 : 0), p.positives.sort((D, w) => D < w ? -1 : D > w ? 1 : 0);
|
|
389
|
-
let T = A.capture ? "" : "?:", m = "", L = "", k;
|
|
390
|
-
return p.positives.length && (m = p.positives.map((D) => i(String(D), S)).join("|")), p.negatives.length && (L = `-(${T}${p.negatives.map((D) => i(String(D), S)).join("|")})`), m && L ? k = `${m}|${L}` : k = m || L, A.wrap ? `(${T}${k})` : k;
|
|
391
|
-
}, h = (p, A, S, T) => {
|
|
392
|
-
if (S)
|
|
393
|
-
return o(p, A, { wrap: !1, ...T });
|
|
394
|
-
let m = String.fromCharCode(p);
|
|
395
|
-
if (p === A) return m;
|
|
396
|
-
let L = String.fromCharCode(A);
|
|
397
|
-
return `[${m}-${L}]`;
|
|
398
|
-
}, l = (p, A, S) => {
|
|
399
|
-
if (Array.isArray(p)) {
|
|
400
|
-
let T = S.wrap === !0, m = S.capture ? "" : "?:";
|
|
401
|
-
return T ? `(${m}${p.join("|")})` : p.join("|");
|
|
402
|
-
}
|
|
403
|
-
return o(p, A, S);
|
|
404
|
-
}, y = (...p) => new RangeError("Invalid range arguments: " + u.inspect(...p)), C = (p, A, S) => {
|
|
405
|
-
if (S.strictRanges === !0) throw y([p, A]);
|
|
406
|
-
return [];
|
|
407
|
-
}, P = (p, A) => {
|
|
408
|
-
if (A.strictRanges === !0)
|
|
409
|
-
throw new TypeError(`Expected step "${p}" to be a number`);
|
|
410
|
-
return [];
|
|
411
|
-
}, d = (p, A, S = 1, T = {}) => {
|
|
412
|
-
let m = Number(p), L = Number(A);
|
|
413
|
-
if (!Number.isInteger(m) || !Number.isInteger(L)) {
|
|
414
|
-
if (T.strictRanges === !0) throw y([p, A]);
|
|
415
|
-
return [];
|
|
416
|
-
}
|
|
417
|
-
m === 0 && (m = 0), L === 0 && (L = 0);
|
|
418
|
-
let k = m > L, D = String(p), w = String(A), H = String(S);
|
|
419
|
-
S = Math.max(Math.abs(S), 1);
|
|
420
|
-
let R = r(D) || r(w) || r(H), j = R ? Math.max(D.length, w.length, H.length) : 0, I = R === !1 && t(p, A, T) === !1, F = T.transform || a(I);
|
|
421
|
-
if (T.toRegex && S === 1)
|
|
422
|
-
return h(i(p, j), i(A, j), !0, T);
|
|
423
|
-
let N = { negatives: [], positives: [] }, K = (g) => N[g < 0 ? "negatives" : "positives"].push(Math.abs(g)), se = [], x = 0;
|
|
424
|
-
for (; k ? m >= L : m <= L; )
|
|
425
|
-
T.toRegex === !0 && S > 1 ? K(m) : se.push(s(F(m, x), j, I)), m = k ? m - S : m + S, x++;
|
|
426
|
-
return T.toRegex === !0 ? S > 1 ? c(N, T, j) : l(se, null, { wrap: !1, ...T }) : se;
|
|
427
|
-
}, _ = (p, A, S = 1, T = {}) => {
|
|
428
|
-
if (!e(p) && p.length > 1 || !e(A) && A.length > 1)
|
|
429
|
-
return C(p, A, T);
|
|
430
|
-
let m = T.transform || ((I) => String.fromCharCode(I)), L = `${p}`.charCodeAt(0), k = `${A}`.charCodeAt(0), D = L > k, w = Math.min(L, k), H = Math.max(L, k);
|
|
431
|
-
if (T.toRegex && S === 1)
|
|
432
|
-
return h(w, H, !1, T);
|
|
433
|
-
let R = [], j = 0;
|
|
434
|
-
for (; D ? L >= k : L <= k; )
|
|
435
|
-
R.push(m(L, j)), L = D ? L - S : L + S, j++;
|
|
436
|
-
return T.toRegex === !0 ? l(R, null, { wrap: !1, options: T }) : R;
|
|
437
|
-
}, b = (p, A, S, T = {}) => {
|
|
438
|
-
if (A == null && n(p))
|
|
439
|
-
return [p];
|
|
440
|
-
if (!n(p) || !n(A))
|
|
441
|
-
return C(p, A, T);
|
|
442
|
-
if (typeof S == "function")
|
|
443
|
-
return b(p, A, 1, { transform: S });
|
|
444
|
-
if (f(S))
|
|
445
|
-
return b(p, A, 0, S);
|
|
446
|
-
let m = { ...T };
|
|
447
|
-
return m.capture === !0 && (m.wrap = !0), S = S || m.step || 1, e(S) ? e(p) && e(A) ? d(p, A, S, m) : _(p, A, Math.max(Math.abs(S), 1), m) : S != null && !f(S) ? P(S, m) : b(p, A, 1, S);
|
|
448
|
-
};
|
|
449
|
-
return St = b, St;
|
|
450
|
-
}
|
|
451
|
-
var vt, or;
|
|
452
|
-
function qn() {
|
|
453
|
-
if (or) return vt;
|
|
454
|
-
or = 1;
|
|
455
|
-
const u = yn(), o = Bt();
|
|
456
|
-
return vt = (a, n = {}) => {
|
|
457
|
-
const e = (r, t = {}) => {
|
|
458
|
-
const s = o.isInvalidBrace(t), i = r.invalid === !0 && n.escapeInvalid === !0, c = s === !0 || i === !0, h = n.escapeInvalid === !0 ? "\\" : "";
|
|
459
|
-
let l = "";
|
|
460
|
-
if (r.isOpen === !0)
|
|
461
|
-
return h + r.value;
|
|
462
|
-
if (r.isClose === !0)
|
|
463
|
-
return console.log("node.isClose", h, r.value), h + r.value;
|
|
464
|
-
if (r.type === "open")
|
|
465
|
-
return c ? h + r.value : "(";
|
|
466
|
-
if (r.type === "close")
|
|
467
|
-
return c ? h + r.value : ")";
|
|
468
|
-
if (r.type === "comma")
|
|
469
|
-
return r.prev.type === "comma" ? "" : c ? r.value : "|";
|
|
470
|
-
if (r.value)
|
|
471
|
-
return r.value;
|
|
472
|
-
if (r.nodes && r.ranges > 0) {
|
|
473
|
-
const y = o.reduce(r.nodes), C = u(...y, { ...n, wrap: !1, toRegex: !0, strictZeros: !0 });
|
|
474
|
-
if (C.length !== 0)
|
|
475
|
-
return y.length > 1 && C.length > 1 ? `(${C})` : C;
|
|
476
|
-
}
|
|
477
|
-
if (r.nodes)
|
|
478
|
-
for (const y of r.nodes)
|
|
479
|
-
l += e(y, r);
|
|
480
|
-
return l;
|
|
481
|
-
};
|
|
482
|
-
return e(a);
|
|
483
|
-
}, vt;
|
|
484
|
-
}
|
|
485
|
-
var mt, ur;
|
|
486
|
-
function Nn() {
|
|
487
|
-
if (ur) return mt;
|
|
488
|
-
ur = 1;
|
|
489
|
-
const u = yn(), o = jt(), f = Bt(), a = (e = "", r = "", t = !1) => {
|
|
490
|
-
const s = [];
|
|
491
|
-
if (e = [].concat(e), r = [].concat(r), !r.length) return e;
|
|
492
|
-
if (!e.length)
|
|
493
|
-
return t ? f.flatten(r).map((i) => `{${i}}`) : r;
|
|
494
|
-
for (const i of e)
|
|
495
|
-
if (Array.isArray(i))
|
|
496
|
-
for (const c of i)
|
|
497
|
-
s.push(a(c, r, t));
|
|
498
|
-
else
|
|
499
|
-
for (let c of r)
|
|
500
|
-
t === !0 && typeof c == "string" && (c = `{${c}}`), s.push(Array.isArray(c) ? a(i, c, t) : i + c);
|
|
501
|
-
return f.flatten(s);
|
|
502
|
-
};
|
|
503
|
-
return mt = (e, r = {}) => {
|
|
504
|
-
const t = r.rangeLimit === void 0 ? 1e3 : r.rangeLimit, s = (i, c = {}) => {
|
|
505
|
-
i.queue = [];
|
|
506
|
-
let h = c, l = c.queue;
|
|
507
|
-
for (; h.type !== "brace" && h.type !== "root" && h.parent; )
|
|
508
|
-
h = h.parent, l = h.queue;
|
|
509
|
-
if (i.invalid || i.dollar) {
|
|
510
|
-
l.push(a(l.pop(), o(i, r)));
|
|
511
|
-
return;
|
|
512
|
-
}
|
|
513
|
-
if (i.type === "brace" && i.invalid !== !0 && i.nodes.length === 2) {
|
|
514
|
-
l.push(a(l.pop(), ["{}"]));
|
|
515
|
-
return;
|
|
516
|
-
}
|
|
517
|
-
if (i.nodes && i.ranges > 0) {
|
|
518
|
-
const d = f.reduce(i.nodes);
|
|
519
|
-
if (f.exceedsLimit(...d, r.step, t))
|
|
520
|
-
throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");
|
|
521
|
-
let _ = u(...d, r);
|
|
522
|
-
_.length === 0 && (_ = o(i, r)), l.push(a(l.pop(), _)), i.nodes = [];
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
const y = f.encloseBrace(i);
|
|
526
|
-
let C = i.queue, P = i;
|
|
527
|
-
for (; P.type !== "brace" && P.type !== "root" && P.parent; )
|
|
528
|
-
P = P.parent, C = P.queue;
|
|
529
|
-
for (let d = 0; d < i.nodes.length; d++) {
|
|
530
|
-
const _ = i.nodes[d];
|
|
531
|
-
if (_.type === "comma" && i.type === "brace") {
|
|
532
|
-
d === 1 && C.push(""), C.push("");
|
|
533
|
-
continue;
|
|
534
|
-
}
|
|
535
|
-
if (_.type === "close") {
|
|
536
|
-
l.push(a(l.pop(), C, y));
|
|
537
|
-
continue;
|
|
538
|
-
}
|
|
539
|
-
if (_.value && _.type !== "open") {
|
|
540
|
-
C.push(a(C.pop(), _.value));
|
|
541
|
-
continue;
|
|
542
|
-
}
|
|
543
|
-
_.nodes && s(_, i);
|
|
544
|
-
}
|
|
545
|
-
return C;
|
|
546
|
-
};
|
|
547
|
-
return f.flatten(s(e));
|
|
548
|
-
}, mt;
|
|
549
|
-
}
|
|
550
|
-
var Rt, cr;
|
|
551
|
-
function In() {
|
|
552
|
-
return cr || (cr = 1, Rt = {
|
|
553
|
-
MAX_LENGTH: 1e4,
|
|
554
|
-
// Digits
|
|
555
|
-
CHAR_0: "0",
|
|
556
|
-
/* 0 */
|
|
557
|
-
CHAR_9: "9",
|
|
558
|
-
/* 9 */
|
|
559
|
-
// Alphabet chars.
|
|
560
|
-
CHAR_UPPERCASE_A: "A",
|
|
561
|
-
/* A */
|
|
562
|
-
CHAR_LOWERCASE_A: "a",
|
|
563
|
-
/* a */
|
|
564
|
-
CHAR_UPPERCASE_Z: "Z",
|
|
565
|
-
/* Z */
|
|
566
|
-
CHAR_LOWERCASE_Z: "z",
|
|
567
|
-
/* z */
|
|
568
|
-
CHAR_LEFT_PARENTHESES: "(",
|
|
569
|
-
/* ( */
|
|
570
|
-
CHAR_RIGHT_PARENTHESES: ")",
|
|
571
|
-
/* ) */
|
|
572
|
-
CHAR_ASTERISK: "*",
|
|
573
|
-
/* * */
|
|
574
|
-
// Non-alphabetic chars.
|
|
575
|
-
CHAR_AMPERSAND: "&",
|
|
576
|
-
/* & */
|
|
577
|
-
CHAR_AT: "@",
|
|
578
|
-
/* @ */
|
|
579
|
-
CHAR_BACKSLASH: "\\",
|
|
580
|
-
/* \ */
|
|
581
|
-
CHAR_BACKTICK: "`",
|
|
582
|
-
/* ` */
|
|
583
|
-
CHAR_CARRIAGE_RETURN: "\r",
|
|
584
|
-
/* \r */
|
|
585
|
-
CHAR_CIRCUMFLEX_ACCENT: "^",
|
|
586
|
-
/* ^ */
|
|
587
|
-
CHAR_COLON: ":",
|
|
588
|
-
/* : */
|
|
589
|
-
CHAR_COMMA: ",",
|
|
590
|
-
/* , */
|
|
591
|
-
CHAR_DOLLAR: "$",
|
|
592
|
-
/* . */
|
|
593
|
-
CHAR_DOT: ".",
|
|
594
|
-
/* . */
|
|
595
|
-
CHAR_DOUBLE_QUOTE: '"',
|
|
596
|
-
/* " */
|
|
597
|
-
CHAR_EQUAL: "=",
|
|
598
|
-
/* = */
|
|
599
|
-
CHAR_EXCLAMATION_MARK: "!",
|
|
600
|
-
/* ! */
|
|
601
|
-
CHAR_FORM_FEED: "\f",
|
|
602
|
-
/* \f */
|
|
603
|
-
CHAR_FORWARD_SLASH: "/",
|
|
604
|
-
/* / */
|
|
605
|
-
CHAR_HASH: "#",
|
|
606
|
-
/* # */
|
|
607
|
-
CHAR_HYPHEN_MINUS: "-",
|
|
608
|
-
/* - */
|
|
609
|
-
CHAR_LEFT_ANGLE_BRACKET: "<",
|
|
610
|
-
/* < */
|
|
611
|
-
CHAR_LEFT_CURLY_BRACE: "{",
|
|
612
|
-
/* { */
|
|
613
|
-
CHAR_LEFT_SQUARE_BRACKET: "[",
|
|
614
|
-
/* [ */
|
|
615
|
-
CHAR_LINE_FEED: `
|
|
616
|
-
`,
|
|
617
|
-
/* \n */
|
|
618
|
-
CHAR_NO_BREAK_SPACE: " ",
|
|
619
|
-
/* \u00A0 */
|
|
620
|
-
CHAR_PERCENT: "%",
|
|
621
|
-
/* % */
|
|
622
|
-
CHAR_PLUS: "+",
|
|
623
|
-
/* + */
|
|
624
|
-
CHAR_QUESTION_MARK: "?",
|
|
625
|
-
/* ? */
|
|
626
|
-
CHAR_RIGHT_ANGLE_BRACKET: ">",
|
|
627
|
-
/* > */
|
|
628
|
-
CHAR_RIGHT_CURLY_BRACE: "}",
|
|
629
|
-
/* } */
|
|
630
|
-
CHAR_RIGHT_SQUARE_BRACKET: "]",
|
|
631
|
-
/* ] */
|
|
632
|
-
CHAR_SEMICOLON: ";",
|
|
633
|
-
/* ; */
|
|
634
|
-
CHAR_SINGLE_QUOTE: "'",
|
|
635
|
-
/* ' */
|
|
636
|
-
CHAR_SPACE: " ",
|
|
637
|
-
/* */
|
|
638
|
-
CHAR_TAB: " ",
|
|
639
|
-
/* \t */
|
|
640
|
-
CHAR_UNDERSCORE: "_",
|
|
641
|
-
/* _ */
|
|
642
|
-
CHAR_VERTICAL_LINE: "|",
|
|
643
|
-
/* | */
|
|
644
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: "\uFEFF"
|
|
645
|
-
/* \uFEFF */
|
|
646
|
-
}), Rt;
|
|
647
|
-
}
|
|
648
|
-
var Et, lr;
|
|
649
|
-
function Fn() {
|
|
650
|
-
if (lr) return Et;
|
|
651
|
-
lr = 1;
|
|
652
|
-
const u = jt(), {
|
|
653
|
-
MAX_LENGTH: o,
|
|
654
|
-
CHAR_BACKSLASH: f,
|
|
655
|
-
/* \ */
|
|
656
|
-
CHAR_BACKTICK: a,
|
|
657
|
-
/* ` */
|
|
658
|
-
CHAR_COMMA: n,
|
|
659
|
-
/* , */
|
|
660
|
-
CHAR_DOT: e,
|
|
661
|
-
/* . */
|
|
662
|
-
CHAR_LEFT_PARENTHESES: r,
|
|
663
|
-
/* ( */
|
|
664
|
-
CHAR_RIGHT_PARENTHESES: t,
|
|
665
|
-
/* ) */
|
|
666
|
-
CHAR_LEFT_CURLY_BRACE: s,
|
|
667
|
-
/* { */
|
|
668
|
-
CHAR_RIGHT_CURLY_BRACE: i,
|
|
669
|
-
/* } */
|
|
670
|
-
CHAR_LEFT_SQUARE_BRACKET: c,
|
|
671
|
-
/* [ */
|
|
672
|
-
CHAR_RIGHT_SQUARE_BRACKET: h,
|
|
673
|
-
/* ] */
|
|
674
|
-
CHAR_DOUBLE_QUOTE: l,
|
|
675
|
-
/* " */
|
|
676
|
-
CHAR_SINGLE_QUOTE: y,
|
|
677
|
-
/* ' */
|
|
678
|
-
CHAR_NO_BREAK_SPACE: C,
|
|
679
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: P
|
|
680
|
-
} = In();
|
|
681
|
-
return Et = (_, b = {}) => {
|
|
682
|
-
if (typeof _ != "string")
|
|
683
|
-
throw new TypeError("Expected a string");
|
|
684
|
-
const p = b || {}, A = typeof p.maxLength == "number" ? Math.min(o, p.maxLength) : o;
|
|
685
|
-
if (_.length > A)
|
|
686
|
-
throw new SyntaxError(`Input length (${_.length}), exceeds max characters (${A})`);
|
|
687
|
-
const S = { type: "root", input: _, nodes: [] }, T = [S];
|
|
688
|
-
let m = S, L = S, k = 0;
|
|
689
|
-
const D = _.length;
|
|
690
|
-
let w = 0, H = 0, R;
|
|
691
|
-
const j = () => _[w++], I = (F) => {
|
|
692
|
-
if (F.type === "text" && L.type === "dot" && (L.type = "text"), L && L.type === "text" && F.type === "text") {
|
|
693
|
-
L.value += F.value;
|
|
694
|
-
return;
|
|
695
|
-
}
|
|
696
|
-
return m.nodes.push(F), F.parent = m, F.prev = L, L = F, F;
|
|
697
|
-
};
|
|
698
|
-
for (I({ type: "bos" }); w < D; )
|
|
699
|
-
if (m = T[T.length - 1], R = j(), !(R === P || R === C)) {
|
|
700
|
-
if (R === f) {
|
|
701
|
-
I({ type: "text", value: (b.keepEscaping ? R : "") + j() });
|
|
702
|
-
continue;
|
|
703
|
-
}
|
|
704
|
-
if (R === h) {
|
|
705
|
-
I({ type: "text", value: "\\" + R });
|
|
706
|
-
continue;
|
|
707
|
-
}
|
|
708
|
-
if (R === c) {
|
|
709
|
-
k++;
|
|
710
|
-
let F;
|
|
711
|
-
for (; w < D && (F = j()); ) {
|
|
712
|
-
if (R += F, F === c) {
|
|
713
|
-
k++;
|
|
714
|
-
continue;
|
|
715
|
-
}
|
|
716
|
-
if (F === f) {
|
|
717
|
-
R += j();
|
|
718
|
-
continue;
|
|
719
|
-
}
|
|
720
|
-
if (F === h && (k--, k === 0))
|
|
721
|
-
break;
|
|
722
|
-
}
|
|
723
|
-
I({ type: "text", value: R });
|
|
724
|
-
continue;
|
|
725
|
-
}
|
|
726
|
-
if (R === r) {
|
|
727
|
-
m = I({ type: "paren", nodes: [] }), T.push(m), I({ type: "text", value: R });
|
|
728
|
-
continue;
|
|
729
|
-
}
|
|
730
|
-
if (R === t) {
|
|
731
|
-
if (m.type !== "paren") {
|
|
732
|
-
I({ type: "text", value: R });
|
|
733
|
-
continue;
|
|
734
|
-
}
|
|
735
|
-
m = T.pop(), I({ type: "text", value: R }), m = T[T.length - 1];
|
|
736
|
-
continue;
|
|
737
|
-
}
|
|
738
|
-
if (R === l || R === y || R === a) {
|
|
739
|
-
const F = R;
|
|
740
|
-
let N;
|
|
741
|
-
for (b.keepQuotes !== !0 && (R = ""); w < D && (N = j()); ) {
|
|
742
|
-
if (N === f) {
|
|
743
|
-
R += N + j();
|
|
744
|
-
continue;
|
|
745
|
-
}
|
|
746
|
-
if (N === F) {
|
|
747
|
-
b.keepQuotes === !0 && (R += N);
|
|
748
|
-
break;
|
|
749
|
-
}
|
|
750
|
-
R += N;
|
|
751
|
-
}
|
|
752
|
-
I({ type: "text", value: R });
|
|
753
|
-
continue;
|
|
754
|
-
}
|
|
755
|
-
if (R === s) {
|
|
756
|
-
H++;
|
|
757
|
-
const N = {
|
|
758
|
-
type: "brace",
|
|
759
|
-
open: !0,
|
|
760
|
-
close: !1,
|
|
761
|
-
dollar: L.value && L.value.slice(-1) === "$" || m.dollar === !0,
|
|
762
|
-
depth: H,
|
|
763
|
-
commas: 0,
|
|
764
|
-
ranges: 0,
|
|
765
|
-
nodes: []
|
|
766
|
-
};
|
|
767
|
-
m = I(N), T.push(m), I({ type: "open", value: R });
|
|
768
|
-
continue;
|
|
769
|
-
}
|
|
770
|
-
if (R === i) {
|
|
771
|
-
if (m.type !== "brace") {
|
|
772
|
-
I({ type: "text", value: R });
|
|
773
|
-
continue;
|
|
774
|
-
}
|
|
775
|
-
const F = "close";
|
|
776
|
-
m = T.pop(), m.close = !0, I({ type: F, value: R }), H--, m = T[T.length - 1];
|
|
777
|
-
continue;
|
|
778
|
-
}
|
|
779
|
-
if (R === n && H > 0) {
|
|
780
|
-
if (m.ranges > 0) {
|
|
781
|
-
m.ranges = 0;
|
|
782
|
-
const F = m.nodes.shift();
|
|
783
|
-
m.nodes = [F, { type: "text", value: u(m) }];
|
|
784
|
-
}
|
|
785
|
-
I({ type: "comma", value: R }), m.commas++;
|
|
786
|
-
continue;
|
|
787
|
-
}
|
|
788
|
-
if (R === e && H > 0 && m.commas === 0) {
|
|
789
|
-
const F = m.nodes;
|
|
790
|
-
if (H === 0 || F.length === 0) {
|
|
791
|
-
I({ type: "text", value: R });
|
|
792
|
-
continue;
|
|
793
|
-
}
|
|
794
|
-
if (L.type === "dot") {
|
|
795
|
-
if (m.range = [], L.value += R, L.type = "range", m.nodes.length !== 3 && m.nodes.length !== 5) {
|
|
796
|
-
m.invalid = !0, m.ranges = 0, L.type = "text";
|
|
797
|
-
continue;
|
|
798
|
-
}
|
|
799
|
-
m.ranges++, m.args = [];
|
|
800
|
-
continue;
|
|
801
|
-
}
|
|
802
|
-
if (L.type === "range") {
|
|
803
|
-
F.pop();
|
|
804
|
-
const N = F[F.length - 1];
|
|
805
|
-
N.value += L.value + R, L = N, m.ranges--;
|
|
806
|
-
continue;
|
|
807
|
-
}
|
|
808
|
-
I({ type: "dot", value: R });
|
|
809
|
-
continue;
|
|
810
|
-
}
|
|
811
|
-
I({ type: "text", value: R });
|
|
812
|
-
}
|
|
813
|
-
do
|
|
814
|
-
if (m = T.pop(), m.type !== "root") {
|
|
815
|
-
m.nodes.forEach((K) => {
|
|
816
|
-
K.nodes || (K.type === "open" && (K.isOpen = !0), K.type === "close" && (K.isClose = !0), K.nodes || (K.type = "text"), K.invalid = !0);
|
|
817
|
-
});
|
|
818
|
-
const F = T[T.length - 1], N = F.nodes.indexOf(m);
|
|
819
|
-
F.nodes.splice(N, 1, ...m.nodes);
|
|
820
|
-
}
|
|
821
|
-
while (T.length > 0);
|
|
822
|
-
return I({ type: "eos" }), S;
|
|
823
|
-
}, Et;
|
|
824
|
-
}
|
|
825
|
-
var At, fr;
|
|
826
|
-
function Bn() {
|
|
827
|
-
if (fr) return At;
|
|
828
|
-
fr = 1;
|
|
829
|
-
const u = jt(), o = qn(), f = Nn(), a = Fn(), n = (e, r = {}) => {
|
|
830
|
-
let t = [];
|
|
831
|
-
if (Array.isArray(e))
|
|
832
|
-
for (const s of e) {
|
|
833
|
-
const i = n.create(s, r);
|
|
834
|
-
Array.isArray(i) ? t.push(...i) : t.push(i);
|
|
835
|
-
}
|
|
836
|
-
else
|
|
837
|
-
t = [].concat(n.create(e, r));
|
|
838
|
-
return r && r.expand === !0 && r.nodupes === !0 && (t = [...new Set(t)]), t;
|
|
839
|
-
};
|
|
840
|
-
return n.parse = (e, r = {}) => a(e, r), n.stringify = (e, r = {}) => u(typeof e == "string" ? n.parse(e, r) : e, r), n.compile = (e, r = {}) => (typeof e == "string" && (e = n.parse(e, r)), o(e, r)), n.expand = (e, r = {}) => {
|
|
841
|
-
typeof e == "string" && (e = n.parse(e, r));
|
|
842
|
-
let t = f(e, r);
|
|
843
|
-
return r.noempty === !0 && (t = t.filter(Boolean)), r.nodupes === !0 && (t = [...new Set(t)]), t;
|
|
844
|
-
}, n.create = (e, r = {}) => e === "" || e.length < 3 ? [e] : r.expand !== !0 ? n.compile(e, r) : n.expand(e, r), At = n, At;
|
|
845
|
-
}
|
|
846
|
-
var bt = {}, Pt, hr;
|
|
847
|
-
function st() {
|
|
848
|
-
if (hr) return Pt;
|
|
849
|
-
hr = 1;
|
|
850
|
-
const u = he, o = "\\\\/", f = `[^${o}]`, a = "\\.", n = "\\+", e = "\\?", r = "\\/", t = "(?=.)", s = "[^/]", i = `(?:${r}|$)`, c = `(?:^|${r})`, h = `${a}{1,2}${i}`, l = `(?!${a})`, y = `(?!${c}${h})`, C = `(?!${a}{0,1}${i})`, P = `(?!${h})`, d = `[^.${r}]`, _ = `${s}*?`, b = {
|
|
851
|
-
DOT_LITERAL: a,
|
|
852
|
-
PLUS_LITERAL: n,
|
|
853
|
-
QMARK_LITERAL: e,
|
|
854
|
-
SLASH_LITERAL: r,
|
|
855
|
-
ONE_CHAR: t,
|
|
856
|
-
QMARK: s,
|
|
857
|
-
END_ANCHOR: i,
|
|
858
|
-
DOTS_SLASH: h,
|
|
859
|
-
NO_DOT: l,
|
|
860
|
-
NO_DOTS: y,
|
|
861
|
-
NO_DOT_SLASH: C,
|
|
862
|
-
NO_DOTS_SLASH: P,
|
|
863
|
-
QMARK_NO_DOT: d,
|
|
864
|
-
STAR: _,
|
|
865
|
-
START_ANCHOR: c
|
|
866
|
-
}, p = {
|
|
867
|
-
...b,
|
|
868
|
-
SLASH_LITERAL: `[${o}]`,
|
|
869
|
-
QMARK: f,
|
|
870
|
-
STAR: `${f}*?`,
|
|
871
|
-
DOTS_SLASH: `${a}{1,2}(?:[${o}]|$)`,
|
|
872
|
-
NO_DOT: `(?!${a})`,
|
|
873
|
-
NO_DOTS: `(?!(?:^|[${o}])${a}{1,2}(?:[${o}]|$))`,
|
|
874
|
-
NO_DOT_SLASH: `(?!${a}{0,1}(?:[${o}]|$))`,
|
|
875
|
-
NO_DOTS_SLASH: `(?!${a}{1,2}(?:[${o}]|$))`,
|
|
876
|
-
QMARK_NO_DOT: `[^.${o}]`,
|
|
877
|
-
START_ANCHOR: `(?:^|[${o}])`,
|
|
878
|
-
END_ANCHOR: `(?:[${o}]|$)`
|
|
879
|
-
}, A = {
|
|
880
|
-
alnum: "a-zA-Z0-9",
|
|
881
|
-
alpha: "a-zA-Z",
|
|
882
|
-
ascii: "\\x00-\\x7F",
|
|
883
|
-
blank: " \\t",
|
|
884
|
-
cntrl: "\\x00-\\x1F\\x7F",
|
|
885
|
-
digit: "0-9",
|
|
886
|
-
graph: "\\x21-\\x7E",
|
|
887
|
-
lower: "a-z",
|
|
888
|
-
print: "\\x20-\\x7E ",
|
|
889
|
-
punct: "\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",
|
|
890
|
-
space: " \\t\\r\\n\\v\\f",
|
|
891
|
-
upper: "A-Z",
|
|
892
|
-
word: "A-Za-z0-9_",
|
|
893
|
-
xdigit: "A-Fa-f0-9"
|
|
894
|
-
};
|
|
895
|
-
return Pt = {
|
|
896
|
-
MAX_LENGTH: 1024 * 64,
|
|
897
|
-
POSIX_REGEX_SOURCE: A,
|
|
898
|
-
// regular expressions
|
|
899
|
-
REGEX_BACKSLASH: /\\(?![*+?^${}(|)[\]])/g,
|
|
900
|
-
REGEX_NON_SPECIAL_CHARS: /^[^@![\].,$*+?^{}()|\\/]+/,
|
|
901
|
-
REGEX_SPECIAL_CHARS: /[-*+?.^${}(|)[\]]/,
|
|
902
|
-
REGEX_SPECIAL_CHARS_BACKREF: /(\\?)((\W)(\3*))/g,
|
|
903
|
-
REGEX_SPECIAL_CHARS_GLOBAL: /([-*+?.^${}(|)[\]])/g,
|
|
904
|
-
REGEX_REMOVE_BACKSLASH: /(?:\[.*?[^\\]\]|\\(?=.))/g,
|
|
905
|
-
// Replace globs with equivalent patterns to reduce parsing time.
|
|
906
|
-
REPLACEMENTS: {
|
|
907
|
-
"***": "*",
|
|
908
|
-
"**/**": "**",
|
|
909
|
-
"**/**/**": "**"
|
|
910
|
-
},
|
|
911
|
-
// Digits
|
|
912
|
-
CHAR_0: 48,
|
|
913
|
-
/* 0 */
|
|
914
|
-
CHAR_9: 57,
|
|
915
|
-
/* 9 */
|
|
916
|
-
// Alphabet chars.
|
|
917
|
-
CHAR_UPPERCASE_A: 65,
|
|
918
|
-
/* A */
|
|
919
|
-
CHAR_LOWERCASE_A: 97,
|
|
920
|
-
/* a */
|
|
921
|
-
CHAR_UPPERCASE_Z: 90,
|
|
922
|
-
/* Z */
|
|
923
|
-
CHAR_LOWERCASE_Z: 122,
|
|
924
|
-
/* z */
|
|
925
|
-
CHAR_LEFT_PARENTHESES: 40,
|
|
926
|
-
/* ( */
|
|
927
|
-
CHAR_RIGHT_PARENTHESES: 41,
|
|
928
|
-
/* ) */
|
|
929
|
-
CHAR_ASTERISK: 42,
|
|
930
|
-
/* * */
|
|
931
|
-
// Non-alphabetic chars.
|
|
932
|
-
CHAR_AMPERSAND: 38,
|
|
933
|
-
/* & */
|
|
934
|
-
CHAR_AT: 64,
|
|
935
|
-
/* @ */
|
|
936
|
-
CHAR_BACKWARD_SLASH: 92,
|
|
937
|
-
/* \ */
|
|
938
|
-
CHAR_CARRIAGE_RETURN: 13,
|
|
939
|
-
/* \r */
|
|
940
|
-
CHAR_CIRCUMFLEX_ACCENT: 94,
|
|
941
|
-
/* ^ */
|
|
942
|
-
CHAR_COLON: 58,
|
|
943
|
-
/* : */
|
|
944
|
-
CHAR_COMMA: 44,
|
|
945
|
-
/* , */
|
|
946
|
-
CHAR_DOT: 46,
|
|
947
|
-
/* . */
|
|
948
|
-
CHAR_DOUBLE_QUOTE: 34,
|
|
949
|
-
/* " */
|
|
950
|
-
CHAR_EQUAL: 61,
|
|
951
|
-
/* = */
|
|
952
|
-
CHAR_EXCLAMATION_MARK: 33,
|
|
953
|
-
/* ! */
|
|
954
|
-
CHAR_FORM_FEED: 12,
|
|
955
|
-
/* \f */
|
|
956
|
-
CHAR_FORWARD_SLASH: 47,
|
|
957
|
-
/* / */
|
|
958
|
-
CHAR_GRAVE_ACCENT: 96,
|
|
959
|
-
/* ` */
|
|
960
|
-
CHAR_HASH: 35,
|
|
961
|
-
/* # */
|
|
962
|
-
CHAR_HYPHEN_MINUS: 45,
|
|
963
|
-
/* - */
|
|
964
|
-
CHAR_LEFT_ANGLE_BRACKET: 60,
|
|
965
|
-
/* < */
|
|
966
|
-
CHAR_LEFT_CURLY_BRACE: 123,
|
|
967
|
-
/* { */
|
|
968
|
-
CHAR_LEFT_SQUARE_BRACKET: 91,
|
|
969
|
-
/* [ */
|
|
970
|
-
CHAR_LINE_FEED: 10,
|
|
971
|
-
/* \n */
|
|
972
|
-
CHAR_NO_BREAK_SPACE: 160,
|
|
973
|
-
/* \u00A0 */
|
|
974
|
-
CHAR_PERCENT: 37,
|
|
975
|
-
/* % */
|
|
976
|
-
CHAR_PLUS: 43,
|
|
977
|
-
/* + */
|
|
978
|
-
CHAR_QUESTION_MARK: 63,
|
|
979
|
-
/* ? */
|
|
980
|
-
CHAR_RIGHT_ANGLE_BRACKET: 62,
|
|
981
|
-
/* > */
|
|
982
|
-
CHAR_RIGHT_CURLY_BRACE: 125,
|
|
983
|
-
/* } */
|
|
984
|
-
CHAR_RIGHT_SQUARE_BRACKET: 93,
|
|
985
|
-
/* ] */
|
|
986
|
-
CHAR_SEMICOLON: 59,
|
|
987
|
-
/* ; */
|
|
988
|
-
CHAR_SINGLE_QUOTE: 39,
|
|
989
|
-
/* ' */
|
|
990
|
-
CHAR_SPACE: 32,
|
|
991
|
-
/* */
|
|
992
|
-
CHAR_TAB: 9,
|
|
993
|
-
/* \t */
|
|
994
|
-
CHAR_UNDERSCORE: 95,
|
|
995
|
-
/* _ */
|
|
996
|
-
CHAR_VERTICAL_LINE: 124,
|
|
997
|
-
/* | */
|
|
998
|
-
CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
|
|
999
|
-
/* \uFEFF */
|
|
1000
|
-
SEP: u.sep,
|
|
1001
|
-
/**
|
|
1002
|
-
* Create EXTGLOB_CHARS
|
|
1003
|
-
*/
|
|
1004
|
-
extglobChars(S) {
|
|
1005
|
-
return {
|
|
1006
|
-
"!": { type: "negate", open: "(?:(?!(?:", close: `))${S.STAR})` },
|
|
1007
|
-
"?": { type: "qmark", open: "(?:", close: ")?" },
|
|
1008
|
-
"+": { type: "plus", open: "(?:", close: ")+" },
|
|
1009
|
-
"*": { type: "star", open: "(?:", close: ")*" },
|
|
1010
|
-
"@": { type: "at", open: "(?:", close: ")" }
|
|
1011
|
-
};
|
|
1012
|
-
},
|
|
1013
|
-
/**
|
|
1014
|
-
* Create GLOB_CHARS
|
|
1015
|
-
*/
|
|
1016
|
-
globChars(S) {
|
|
1017
|
-
return S === !0 ? p : b;
|
|
1018
|
-
}
|
|
1019
|
-
}, Pt;
|
|
1020
|
-
}
|
|
1021
|
-
var pr;
|
|
1022
|
-
function at() {
|
|
1023
|
-
return pr || (pr = 1, (function(u) {
|
|
1024
|
-
const o = he, f = process.platform === "win32", {
|
|
1025
|
-
REGEX_BACKSLASH: a,
|
|
1026
|
-
REGEX_REMOVE_BACKSLASH: n,
|
|
1027
|
-
REGEX_SPECIAL_CHARS: e,
|
|
1028
|
-
REGEX_SPECIAL_CHARS_GLOBAL: r
|
|
1029
|
-
} = st();
|
|
1030
|
-
u.isObject = (t) => t !== null && typeof t == "object" && !Array.isArray(t), u.hasRegexChars = (t) => e.test(t), u.isRegexChar = (t) => t.length === 1 && u.hasRegexChars(t), u.escapeRegex = (t) => t.replace(r, "\\$1"), u.toPosixSlashes = (t) => t.replace(a, "/"), u.removeBackslashes = (t) => t.replace(n, (s) => s === "\\" ? "" : s), u.supportsLookbehinds = () => {
|
|
1031
|
-
const t = process.version.slice(1).split(".").map(Number);
|
|
1032
|
-
return t.length === 3 && t[0] >= 9 || t[0] === 8 && t[1] >= 10;
|
|
1033
|
-
}, u.isWindows = (t) => t && typeof t.windows == "boolean" ? t.windows : f === !0 || o.sep === "\\", u.escapeLast = (t, s, i) => {
|
|
1034
|
-
const c = t.lastIndexOf(s, i);
|
|
1035
|
-
return c === -1 ? t : t[c - 1] === "\\" ? u.escapeLast(t, s, c - 1) : `${t.slice(0, c)}\\${t.slice(c)}`;
|
|
1036
|
-
}, u.removePrefix = (t, s = {}) => {
|
|
1037
|
-
let i = t;
|
|
1038
|
-
return i.startsWith("./") && (i = i.slice(2), s.prefix = "./"), i;
|
|
1039
|
-
}, u.wrapOutput = (t, s = {}, i = {}) => {
|
|
1040
|
-
const c = i.contains ? "" : "^", h = i.contains ? "" : "$";
|
|
1041
|
-
let l = `${c}(?:${t})${h}`;
|
|
1042
|
-
return s.negated === !0 && (l = `(?:^(?!${l}).*$)`), l;
|
|
1043
|
-
};
|
|
1044
|
-
})(bt)), bt;
|
|
1045
|
-
}
|
|
1046
|
-
var Ct, dr;
|
|
1047
|
-
function jn() {
|
|
1048
|
-
if (dr) return Ct;
|
|
1049
|
-
dr = 1;
|
|
1050
|
-
const u = at(), {
|
|
1051
|
-
CHAR_ASTERISK: o,
|
|
1052
|
-
/* * */
|
|
1053
|
-
CHAR_AT: f,
|
|
1054
|
-
/* @ */
|
|
1055
|
-
CHAR_BACKWARD_SLASH: a,
|
|
1056
|
-
/* \ */
|
|
1057
|
-
CHAR_COMMA: n,
|
|
1058
|
-
/* , */
|
|
1059
|
-
CHAR_DOT: e,
|
|
1060
|
-
/* . */
|
|
1061
|
-
CHAR_EXCLAMATION_MARK: r,
|
|
1062
|
-
/* ! */
|
|
1063
|
-
CHAR_FORWARD_SLASH: t,
|
|
1064
|
-
/* / */
|
|
1065
|
-
CHAR_LEFT_CURLY_BRACE: s,
|
|
1066
|
-
/* { */
|
|
1067
|
-
CHAR_LEFT_PARENTHESES: i,
|
|
1068
|
-
/* ( */
|
|
1069
|
-
CHAR_LEFT_SQUARE_BRACKET: c,
|
|
1070
|
-
/* [ */
|
|
1071
|
-
CHAR_PLUS: h,
|
|
1072
|
-
/* + */
|
|
1073
|
-
CHAR_QUESTION_MARK: l,
|
|
1074
|
-
/* ? */
|
|
1075
|
-
CHAR_RIGHT_CURLY_BRACE: y,
|
|
1076
|
-
/* } */
|
|
1077
|
-
CHAR_RIGHT_PARENTHESES: C,
|
|
1078
|
-
/* ) */
|
|
1079
|
-
CHAR_RIGHT_SQUARE_BRACKET: P
|
|
1080
|
-
/* ] */
|
|
1081
|
-
} = st(), d = (p) => p === t || p === a, _ = (p) => {
|
|
1082
|
-
p.isPrefix !== !0 && (p.depth = p.isGlobstar ? 1 / 0 : 1);
|
|
1083
|
-
};
|
|
1084
|
-
return Ct = (p, A) => {
|
|
1085
|
-
const S = A || {}, T = p.length - 1, m = S.parts === !0 || S.scanToEnd === !0, L = [], k = [], D = [];
|
|
1086
|
-
let w = p, H = -1, R = 0, j = 0, I = !1, F = !1, N = !1, K = !1, se = !1, x = !1, g = !1, G = !1, z = !1, ne = !1, v = 0, E, U, B = { value: "", depth: 0, isGlob: !1 };
|
|
1087
|
-
const ue = () => H >= T, pe = () => w.charCodeAt(H + 1), Y = () => (E = U, w.charCodeAt(++H));
|
|
1088
|
-
for (; H < T; ) {
|
|
1089
|
-
U = Y();
|
|
1090
|
-
let q;
|
|
1091
|
-
if (U === a) {
|
|
1092
|
-
g = B.backslashes = !0, U = Y(), U === s && (x = !0);
|
|
1093
|
-
continue;
|
|
1094
|
-
}
|
|
1095
|
-
if (x === !0 || U === s) {
|
|
1096
|
-
for (v++; ue() !== !0 && (U = Y()); ) {
|
|
1097
|
-
if (U === a) {
|
|
1098
|
-
g = B.backslashes = !0, Y();
|
|
1099
|
-
continue;
|
|
1100
|
-
}
|
|
1101
|
-
if (U === s) {
|
|
1102
|
-
v++;
|
|
1103
|
-
continue;
|
|
1104
|
-
}
|
|
1105
|
-
if (x !== !0 && U === e && (U = Y()) === e) {
|
|
1106
|
-
if (I = B.isBrace = !0, N = B.isGlob = !0, ne = !0, m === !0)
|
|
1107
|
-
continue;
|
|
1108
|
-
break;
|
|
1109
|
-
}
|
|
1110
|
-
if (x !== !0 && U === n) {
|
|
1111
|
-
if (I = B.isBrace = !0, N = B.isGlob = !0, ne = !0, m === !0)
|
|
1112
|
-
continue;
|
|
1113
|
-
break;
|
|
1114
|
-
}
|
|
1115
|
-
if (U === y && (v--, v === 0)) {
|
|
1116
|
-
x = !1, I = B.isBrace = !0, ne = !0;
|
|
1117
|
-
break;
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
if (m === !0)
|
|
1121
|
-
continue;
|
|
1122
|
-
break;
|
|
1123
|
-
}
|
|
1124
|
-
if (U === t) {
|
|
1125
|
-
if (L.push(H), k.push(B), B = { value: "", depth: 0, isGlob: !1 }, ne === !0) continue;
|
|
1126
|
-
if (E === e && H === R + 1) {
|
|
1127
|
-
R += 2;
|
|
1128
|
-
continue;
|
|
1129
|
-
}
|
|
1130
|
-
j = H + 1;
|
|
1131
|
-
continue;
|
|
1132
|
-
}
|
|
1133
|
-
if (S.noext !== !0 && (U === h || U === f || U === o || U === l || U === r) === !0 && pe() === i) {
|
|
1134
|
-
if (N = B.isGlob = !0, K = B.isExtglob = !0, ne = !0, U === r && H === R && (z = !0), m === !0) {
|
|
1135
|
-
for (; ue() !== !0 && (U = Y()); ) {
|
|
1136
|
-
if (U === a) {
|
|
1137
|
-
g = B.backslashes = !0, U = Y();
|
|
1138
|
-
continue;
|
|
1139
|
-
}
|
|
1140
|
-
if (U === C) {
|
|
1141
|
-
N = B.isGlob = !0, ne = !0;
|
|
1142
|
-
break;
|
|
1143
|
-
}
|
|
1144
|
-
}
|
|
1145
|
-
continue;
|
|
1146
|
-
}
|
|
1147
|
-
break;
|
|
1148
|
-
}
|
|
1149
|
-
if (U === o) {
|
|
1150
|
-
if (E === o && (se = B.isGlobstar = !0), N = B.isGlob = !0, ne = !0, m === !0)
|
|
1151
|
-
continue;
|
|
1152
|
-
break;
|
|
1153
|
-
}
|
|
1154
|
-
if (U === l) {
|
|
1155
|
-
if (N = B.isGlob = !0, ne = !0, m === !0)
|
|
1156
|
-
continue;
|
|
1157
|
-
break;
|
|
1158
|
-
}
|
|
1159
|
-
if (U === c) {
|
|
1160
|
-
for (; ue() !== !0 && (q = Y()); ) {
|
|
1161
|
-
if (q === a) {
|
|
1162
|
-
g = B.backslashes = !0, Y();
|
|
1163
|
-
continue;
|
|
1164
|
-
}
|
|
1165
|
-
if (q === P) {
|
|
1166
|
-
F = B.isBracket = !0, N = B.isGlob = !0, ne = !0;
|
|
1167
|
-
break;
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
if (m === !0)
|
|
1171
|
-
continue;
|
|
1172
|
-
break;
|
|
1173
|
-
}
|
|
1174
|
-
if (S.nonegate !== !0 && U === r && H === R) {
|
|
1175
|
-
G = B.negated = !0, R++;
|
|
1176
|
-
continue;
|
|
1177
|
-
}
|
|
1178
|
-
if (S.noparen !== !0 && U === i) {
|
|
1179
|
-
if (N = B.isGlob = !0, m === !0) {
|
|
1180
|
-
for (; ue() !== !0 && (U = Y()); ) {
|
|
1181
|
-
if (U === i) {
|
|
1182
|
-
g = B.backslashes = !0, U = Y();
|
|
1183
|
-
continue;
|
|
1184
|
-
}
|
|
1185
|
-
if (U === C) {
|
|
1186
|
-
ne = !0;
|
|
1187
|
-
break;
|
|
1188
|
-
}
|
|
1189
|
-
}
|
|
1190
|
-
continue;
|
|
1191
|
-
}
|
|
1192
|
-
break;
|
|
1193
|
-
}
|
|
1194
|
-
if (N === !0) {
|
|
1195
|
-
if (ne = !0, m === !0)
|
|
1196
|
-
continue;
|
|
1197
|
-
break;
|
|
1198
|
-
}
|
|
1199
|
-
}
|
|
1200
|
-
S.noext === !0 && (K = !1, N = !1);
|
|
1201
|
-
let X = w, Ee = "", ce = "";
|
|
1202
|
-
R > 0 && (Ee = w.slice(0, R), w = w.slice(R), j -= R), X && N === !0 && j > 0 ? (X = w.slice(0, j), ce = w.slice(j)) : N === !0 ? (X = "", ce = w) : X = w, X && X !== "" && X !== "/" && X !== w && d(X.charCodeAt(X.length - 1)) && (X = X.slice(0, -1)), S.unescape === !0 && (ce && (ce = u.removeBackslashes(ce)), X && g === !0 && (X = u.removeBackslashes(X)));
|
|
1203
|
-
const ae = {
|
|
1204
|
-
prefix: Ee,
|
|
1205
|
-
input: p,
|
|
1206
|
-
start: R,
|
|
1207
|
-
base: X,
|
|
1208
|
-
glob: ce,
|
|
1209
|
-
isBrace: I,
|
|
1210
|
-
isBracket: F,
|
|
1211
|
-
isGlob: N,
|
|
1212
|
-
isExtglob: K,
|
|
1213
|
-
isGlobstar: se,
|
|
1214
|
-
negated: G,
|
|
1215
|
-
negatedExtglob: z
|
|
1216
|
-
};
|
|
1217
|
-
if (S.tokens === !0 && (ae.maxDepth = 0, d(U) || k.push(B), ae.tokens = k), S.parts === !0 || S.tokens === !0) {
|
|
1218
|
-
let q;
|
|
1219
|
-
for (let J = 0; J < L.length; J++) {
|
|
1220
|
-
const ot = q ? q + 1 : R, $ = L[J], V = p.slice(ot, $);
|
|
1221
|
-
S.tokens && (J === 0 && R !== 0 ? (k[J].isPrefix = !0, k[J].value = Ee) : k[J].value = V, _(k[J]), ae.maxDepth += k[J].depth), (J !== 0 || V !== "") && D.push(V), q = $;
|
|
1222
|
-
}
|
|
1223
|
-
if (q && q + 1 < p.length) {
|
|
1224
|
-
const J = p.slice(q + 1);
|
|
1225
|
-
D.push(J), S.tokens && (k[k.length - 1].value = J, _(k[k.length - 1]), ae.maxDepth += k[k.length - 1].depth);
|
|
1226
|
-
}
|
|
1227
|
-
ae.slashes = L, ae.parts = D;
|
|
1228
|
-
}
|
|
1229
|
-
return ae;
|
|
1230
|
-
}, Ct;
|
|
1231
|
-
}
|
|
1232
|
-
var Tt, _r;
|
|
1233
|
-
function Gn() {
|
|
1234
|
-
if (_r) return Tt;
|
|
1235
|
-
_r = 1;
|
|
1236
|
-
const u = st(), o = at(), {
|
|
1237
|
-
MAX_LENGTH: f,
|
|
1238
|
-
POSIX_REGEX_SOURCE: a,
|
|
1239
|
-
REGEX_NON_SPECIAL_CHARS: n,
|
|
1240
|
-
REGEX_SPECIAL_CHARS_BACKREF: e,
|
|
1241
|
-
REPLACEMENTS: r
|
|
1242
|
-
} = u, t = (c, h) => {
|
|
1243
|
-
if (typeof h.expandRange == "function")
|
|
1244
|
-
return h.expandRange(...c, h);
|
|
1245
|
-
c.sort();
|
|
1246
|
-
const l = `[${c.join("-")}]`;
|
|
1247
|
-
try {
|
|
1248
|
-
new RegExp(l);
|
|
1249
|
-
} catch {
|
|
1250
|
-
return c.map((C) => o.escapeRegex(C)).join("..");
|
|
1251
|
-
}
|
|
1252
|
-
return l;
|
|
1253
|
-
}, s = (c, h) => `Missing ${c}: "${h}" - use "\\\\${h}" to match literal characters`, i = (c, h) => {
|
|
1254
|
-
if (typeof c != "string")
|
|
1255
|
-
throw new TypeError("Expected a string");
|
|
1256
|
-
c = r[c] || c;
|
|
1257
|
-
const l = { ...h }, y = typeof l.maxLength == "number" ? Math.min(f, l.maxLength) : f;
|
|
1258
|
-
let C = c.length;
|
|
1259
|
-
if (C > y)
|
|
1260
|
-
throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${y}`);
|
|
1261
|
-
const P = { type: "bos", value: "", output: l.prepend || "" }, d = [P], _ = l.capture ? "" : "?:", b = o.isWindows(h), p = u.globChars(b), A = u.extglobChars(p), {
|
|
1262
|
-
DOT_LITERAL: S,
|
|
1263
|
-
PLUS_LITERAL: T,
|
|
1264
|
-
SLASH_LITERAL: m,
|
|
1265
|
-
ONE_CHAR: L,
|
|
1266
|
-
DOTS_SLASH: k,
|
|
1267
|
-
NO_DOT: D,
|
|
1268
|
-
NO_DOT_SLASH: w,
|
|
1269
|
-
NO_DOTS_SLASH: H,
|
|
1270
|
-
QMARK: R,
|
|
1271
|
-
QMARK_NO_DOT: j,
|
|
1272
|
-
STAR: I,
|
|
1273
|
-
START_ANCHOR: F
|
|
1274
|
-
} = p, N = ($) => `(${_}(?:(?!${F}${$.dot ? k : S}).)*?)`, K = l.dot ? "" : D, se = l.dot ? R : j;
|
|
1275
|
-
let x = l.bash === !0 ? N(l) : I;
|
|
1276
|
-
l.capture && (x = `(${x})`), typeof l.noext == "boolean" && (l.noextglob = l.noext);
|
|
1277
|
-
const g = {
|
|
1278
|
-
input: c,
|
|
1279
|
-
index: -1,
|
|
1280
|
-
start: 0,
|
|
1281
|
-
dot: l.dot === !0,
|
|
1282
|
-
consumed: "",
|
|
1283
|
-
output: "",
|
|
1284
|
-
prefix: "",
|
|
1285
|
-
backtrack: !1,
|
|
1286
|
-
negated: !1,
|
|
1287
|
-
brackets: 0,
|
|
1288
|
-
braces: 0,
|
|
1289
|
-
parens: 0,
|
|
1290
|
-
quotes: 0,
|
|
1291
|
-
globstar: !1,
|
|
1292
|
-
tokens: d
|
|
1293
|
-
};
|
|
1294
|
-
c = o.removePrefix(c, g), C = c.length;
|
|
1295
|
-
const G = [], z = [], ne = [];
|
|
1296
|
-
let v = P, E;
|
|
1297
|
-
const U = () => g.index === C - 1, B = g.peek = ($ = 1) => c[g.index + $], ue = g.advance = () => c[++g.index] || "", pe = () => c.slice(g.index + 1), Y = ($ = "", V = 0) => {
|
|
1298
|
-
g.consumed += $, g.index += V;
|
|
1299
|
-
}, X = ($) => {
|
|
1300
|
-
g.output += $.output != null ? $.output : $.value, Y($.value);
|
|
1301
|
-
}, Ee = () => {
|
|
1302
|
-
let $ = 1;
|
|
1303
|
-
for (; B() === "!" && (B(2) !== "(" || B(3) === "?"); )
|
|
1304
|
-
ue(), g.start++, $++;
|
|
1305
|
-
return $ % 2 === 0 ? !1 : (g.negated = !0, g.start++, !0);
|
|
1306
|
-
}, ce = ($) => {
|
|
1307
|
-
g[$]++, ne.push($);
|
|
1308
|
-
}, ae = ($) => {
|
|
1309
|
-
g[$]--, ne.pop();
|
|
1310
|
-
}, q = ($) => {
|
|
1311
|
-
if (v.type === "globstar") {
|
|
1312
|
-
const V = g.braces > 0 && ($.type === "comma" || $.type === "brace"), O = $.extglob === !0 || G.length && ($.type === "pipe" || $.type === "paren");
|
|
1313
|
-
$.type !== "slash" && $.type !== "paren" && !V && !O && (g.output = g.output.slice(0, -v.output.length), v.type = "star", v.value = "*", v.output = x, g.output += v.output);
|
|
1314
|
-
}
|
|
1315
|
-
if (G.length && $.type !== "paren" && (G[G.length - 1].inner += $.value), ($.value || $.output) && X($), v && v.type === "text" && $.type === "text") {
|
|
1316
|
-
v.value += $.value, v.output = (v.output || "") + $.value;
|
|
1317
|
-
return;
|
|
1318
|
-
}
|
|
1319
|
-
$.prev = v, d.push($), v = $;
|
|
1320
|
-
}, J = ($, V) => {
|
|
1321
|
-
const O = { ...A[V], conditions: 1, inner: "" };
|
|
1322
|
-
O.prev = v, O.parens = g.parens, O.output = g.output;
|
|
1323
|
-
const W = (l.capture ? "(" : "") + O.open;
|
|
1324
|
-
ce("parens"), q({ type: $, value: V, output: g.output ? "" : L }), q({ type: "paren", extglob: !0, value: ue(), output: W }), G.push(O);
|
|
1325
|
-
}, ot = ($) => {
|
|
1326
|
-
let V = $.close + (l.capture ? ")" : ""), O;
|
|
1327
|
-
if ($.type === "negate") {
|
|
1328
|
-
let W = x;
|
|
1329
|
-
if ($.inner && $.inner.length > 1 && $.inner.includes("/") && (W = N(l)), (W !== x || U() || /^\)+$/.test(pe())) && (V = $.close = `)$))${W}`), $.inner.includes("*") && (O = pe()) && /^\.[^\\/.]+$/.test(O)) {
|
|
1330
|
-
const Q = i(O, { ...h, fastpaths: !1 }).output;
|
|
1331
|
-
V = $.close = `)${Q})${W})`;
|
|
1332
|
-
}
|
|
1333
|
-
$.prev.type === "bos" && (g.negatedExtglob = !0);
|
|
1334
|
-
}
|
|
1335
|
-
q({ type: "paren", extglob: !0, value: E, output: V }), ae("parens");
|
|
1336
|
-
};
|
|
1337
|
-
if (l.fastpaths !== !1 && !/(^[*!]|[/()[\]{}"])/.test(c)) {
|
|
1338
|
-
let $ = !1, V = c.replace(e, (O, W, Q, oe, ee, ut) => oe === "\\" ? ($ = !0, O) : oe === "?" ? W ? W + oe + (ee ? R.repeat(ee.length) : "") : ut === 0 ? se + (ee ? R.repeat(ee.length) : "") : R.repeat(Q.length) : oe === "." ? S.repeat(Q.length) : oe === "*" ? W ? W + oe + (ee ? x : "") : x : W ? O : `\\${O}`);
|
|
1339
|
-
return $ === !0 && (l.unescape === !0 ? V = V.replace(/\\/g, "") : V = V.replace(/\\+/g, (O) => O.length % 2 === 0 ? "\\\\" : O ? "\\" : "")), V === c && l.contains === !0 ? (g.output = c, g) : (g.output = o.wrapOutput(V, g, h), g);
|
|
1340
|
-
}
|
|
1341
|
-
for (; !U(); ) {
|
|
1342
|
-
if (E = ue(), E === "\0")
|
|
1343
|
-
continue;
|
|
1344
|
-
if (E === "\\") {
|
|
1345
|
-
const O = B();
|
|
1346
|
-
if (O === "/" && l.bash !== !0 || O === "." || O === ";")
|
|
1347
|
-
continue;
|
|
1348
|
-
if (!O) {
|
|
1349
|
-
E += "\\", q({ type: "text", value: E });
|
|
1350
|
-
continue;
|
|
1351
|
-
}
|
|
1352
|
-
const W = /^\\+/.exec(pe());
|
|
1353
|
-
let Q = 0;
|
|
1354
|
-
if (W && W[0].length > 2 && (Q = W[0].length, g.index += Q, Q % 2 !== 0 && (E += "\\")), l.unescape === !0 ? E = ue() : E += ue(), g.brackets === 0) {
|
|
1355
|
-
q({ type: "text", value: E });
|
|
1356
|
-
continue;
|
|
1357
|
-
}
|
|
1358
|
-
}
|
|
1359
|
-
if (g.brackets > 0 && (E !== "]" || v.value === "[" || v.value === "[^")) {
|
|
1360
|
-
if (l.posix !== !1 && E === ":") {
|
|
1361
|
-
const O = v.value.slice(1);
|
|
1362
|
-
if (O.includes("[") && (v.posix = !0, O.includes(":"))) {
|
|
1363
|
-
const W = v.value.lastIndexOf("["), Q = v.value.slice(0, W), oe = v.value.slice(W + 2), ee = a[oe];
|
|
1364
|
-
if (ee) {
|
|
1365
|
-
v.value = Q + ee, g.backtrack = !0, ue(), !P.output && d.indexOf(v) === 1 && (P.output = L);
|
|
1366
|
-
continue;
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
}
|
|
1370
|
-
(E === "[" && B() !== ":" || E === "-" && B() === "]") && (E = `\\${E}`), E === "]" && (v.value === "[" || v.value === "[^") && (E = `\\${E}`), l.posix === !0 && E === "!" && v.value === "[" && (E = "^"), v.value += E, X({ value: E });
|
|
1371
|
-
continue;
|
|
1372
|
-
}
|
|
1373
|
-
if (g.quotes === 1 && E !== '"') {
|
|
1374
|
-
E = o.escapeRegex(E), v.value += E, X({ value: E });
|
|
1375
|
-
continue;
|
|
1376
|
-
}
|
|
1377
|
-
if (E === '"') {
|
|
1378
|
-
g.quotes = g.quotes === 1 ? 0 : 1, l.keepQuotes === !0 && q({ type: "text", value: E });
|
|
1379
|
-
continue;
|
|
1380
|
-
}
|
|
1381
|
-
if (E === "(") {
|
|
1382
|
-
ce("parens"), q({ type: "paren", value: E });
|
|
1383
|
-
continue;
|
|
1384
|
-
}
|
|
1385
|
-
if (E === ")") {
|
|
1386
|
-
if (g.parens === 0 && l.strictBrackets === !0)
|
|
1387
|
-
throw new SyntaxError(s("opening", "("));
|
|
1388
|
-
const O = G[G.length - 1];
|
|
1389
|
-
if (O && g.parens === O.parens + 1) {
|
|
1390
|
-
ot(G.pop());
|
|
1391
|
-
continue;
|
|
1392
|
-
}
|
|
1393
|
-
q({ type: "paren", value: E, output: g.parens ? ")" : "\\)" }), ae("parens");
|
|
1394
|
-
continue;
|
|
1395
|
-
}
|
|
1396
|
-
if (E === "[") {
|
|
1397
|
-
if (l.nobracket === !0 || !pe().includes("]")) {
|
|
1398
|
-
if (l.nobracket !== !0 && l.strictBrackets === !0)
|
|
1399
|
-
throw new SyntaxError(s("closing", "]"));
|
|
1400
|
-
E = `\\${E}`;
|
|
1401
|
-
} else
|
|
1402
|
-
ce("brackets");
|
|
1403
|
-
q({ type: "bracket", value: E });
|
|
1404
|
-
continue;
|
|
1405
|
-
}
|
|
1406
|
-
if (E === "]") {
|
|
1407
|
-
if (l.nobracket === !0 || v && v.type === "bracket" && v.value.length === 1) {
|
|
1408
|
-
q({ type: "text", value: E, output: `\\${E}` });
|
|
1409
|
-
continue;
|
|
1410
|
-
}
|
|
1411
|
-
if (g.brackets === 0) {
|
|
1412
|
-
if (l.strictBrackets === !0)
|
|
1413
|
-
throw new SyntaxError(s("opening", "["));
|
|
1414
|
-
q({ type: "text", value: E, output: `\\${E}` });
|
|
1415
|
-
continue;
|
|
1416
|
-
}
|
|
1417
|
-
ae("brackets");
|
|
1418
|
-
const O = v.value.slice(1);
|
|
1419
|
-
if (v.posix !== !0 && O[0] === "^" && !O.includes("/") && (E = `/${E}`), v.value += E, X({ value: E }), l.literalBrackets === !1 || o.hasRegexChars(O))
|
|
1420
|
-
continue;
|
|
1421
|
-
const W = o.escapeRegex(v.value);
|
|
1422
|
-
if (g.output = g.output.slice(0, -v.value.length), l.literalBrackets === !0) {
|
|
1423
|
-
g.output += W, v.value = W;
|
|
1424
|
-
continue;
|
|
1425
|
-
}
|
|
1426
|
-
v.value = `(${_}${W}|${v.value})`, g.output += v.value;
|
|
1427
|
-
continue;
|
|
1428
|
-
}
|
|
1429
|
-
if (E === "{" && l.nobrace !== !0) {
|
|
1430
|
-
ce("braces");
|
|
1431
|
-
const O = {
|
|
1432
|
-
type: "brace",
|
|
1433
|
-
value: E,
|
|
1434
|
-
output: "(",
|
|
1435
|
-
outputIndex: g.output.length,
|
|
1436
|
-
tokensIndex: g.tokens.length
|
|
1437
|
-
};
|
|
1438
|
-
z.push(O), q(O);
|
|
1439
|
-
continue;
|
|
1440
|
-
}
|
|
1441
|
-
if (E === "}") {
|
|
1442
|
-
const O = z[z.length - 1];
|
|
1443
|
-
if (l.nobrace === !0 || !O) {
|
|
1444
|
-
q({ type: "text", value: E, output: E });
|
|
1445
|
-
continue;
|
|
1446
|
-
}
|
|
1447
|
-
let W = ")";
|
|
1448
|
-
if (O.dots === !0) {
|
|
1449
|
-
const Q = d.slice(), oe = [];
|
|
1450
|
-
for (let ee = Q.length - 1; ee >= 0 && (d.pop(), Q[ee].type !== "brace"); ee--)
|
|
1451
|
-
Q[ee].type !== "dots" && oe.unshift(Q[ee].value);
|
|
1452
|
-
W = t(oe, l), g.backtrack = !0;
|
|
1453
|
-
}
|
|
1454
|
-
if (O.comma !== !0 && O.dots !== !0) {
|
|
1455
|
-
const Q = g.output.slice(0, O.outputIndex), oe = g.tokens.slice(O.tokensIndex);
|
|
1456
|
-
O.value = O.output = "\\{", E = W = "\\}", g.output = Q;
|
|
1457
|
-
for (const ee of oe)
|
|
1458
|
-
g.output += ee.output || ee.value;
|
|
1459
|
-
}
|
|
1460
|
-
q({ type: "brace", value: E, output: W }), ae("braces"), z.pop();
|
|
1461
|
-
continue;
|
|
1462
|
-
}
|
|
1463
|
-
if (E === "|") {
|
|
1464
|
-
G.length > 0 && G[G.length - 1].conditions++, q({ type: "text", value: E });
|
|
1465
|
-
continue;
|
|
1466
|
-
}
|
|
1467
|
-
if (E === ",") {
|
|
1468
|
-
let O = E;
|
|
1469
|
-
const W = z[z.length - 1];
|
|
1470
|
-
W && ne[ne.length - 1] === "braces" && (W.comma = !0, O = "|"), q({ type: "comma", value: E, output: O });
|
|
1471
|
-
continue;
|
|
1472
|
-
}
|
|
1473
|
-
if (E === "/") {
|
|
1474
|
-
if (v.type === "dot" && g.index === g.start + 1) {
|
|
1475
|
-
g.start = g.index + 1, g.consumed = "", g.output = "", d.pop(), v = P;
|
|
1476
|
-
continue;
|
|
1477
|
-
}
|
|
1478
|
-
q({ type: "slash", value: E, output: m });
|
|
1479
|
-
continue;
|
|
1480
|
-
}
|
|
1481
|
-
if (E === ".") {
|
|
1482
|
-
if (g.braces > 0 && v.type === "dot") {
|
|
1483
|
-
v.value === "." && (v.output = S);
|
|
1484
|
-
const O = z[z.length - 1];
|
|
1485
|
-
v.type = "dots", v.output += E, v.value += E, O.dots = !0;
|
|
1486
|
-
continue;
|
|
1487
|
-
}
|
|
1488
|
-
if (g.braces + g.parens === 0 && v.type !== "bos" && v.type !== "slash") {
|
|
1489
|
-
q({ type: "text", value: E, output: S });
|
|
1490
|
-
continue;
|
|
1491
|
-
}
|
|
1492
|
-
q({ type: "dot", value: E, output: S });
|
|
1493
|
-
continue;
|
|
1494
|
-
}
|
|
1495
|
-
if (E === "?") {
|
|
1496
|
-
if (!(v && v.value === "(") && l.noextglob !== !0 && B() === "(" && B(2) !== "?") {
|
|
1497
|
-
J("qmark", E);
|
|
1498
|
-
continue;
|
|
1499
|
-
}
|
|
1500
|
-
if (v && v.type === "paren") {
|
|
1501
|
-
const W = B();
|
|
1502
|
-
let Q = E;
|
|
1503
|
-
if (W === "<" && !o.supportsLookbehinds())
|
|
1504
|
-
throw new Error("Node.js v10 or higher is required for regex lookbehinds");
|
|
1505
|
-
(v.value === "(" && !/[!=<:]/.test(W) || W === "<" && !/<([!=]|\w+>)/.test(pe())) && (Q = `\\${E}`), q({ type: "text", value: E, output: Q });
|
|
1506
|
-
continue;
|
|
1507
|
-
}
|
|
1508
|
-
if (l.dot !== !0 && (v.type === "slash" || v.type === "bos")) {
|
|
1509
|
-
q({ type: "qmark", value: E, output: j });
|
|
1510
|
-
continue;
|
|
1511
|
-
}
|
|
1512
|
-
q({ type: "qmark", value: E, output: R });
|
|
1513
|
-
continue;
|
|
1514
|
-
}
|
|
1515
|
-
if (E === "!") {
|
|
1516
|
-
if (l.noextglob !== !0 && B() === "(" && (B(2) !== "?" || !/[!=<:]/.test(B(3)))) {
|
|
1517
|
-
J("negate", E);
|
|
1518
|
-
continue;
|
|
1519
|
-
}
|
|
1520
|
-
if (l.nonegate !== !0 && g.index === 0) {
|
|
1521
|
-
Ee();
|
|
1522
|
-
continue;
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
if (E === "+") {
|
|
1526
|
-
if (l.noextglob !== !0 && B() === "(" && B(2) !== "?") {
|
|
1527
|
-
J("plus", E);
|
|
1528
|
-
continue;
|
|
1529
|
-
}
|
|
1530
|
-
if (v && v.value === "(" || l.regex === !1) {
|
|
1531
|
-
q({ type: "plus", value: E, output: T });
|
|
1532
|
-
continue;
|
|
1533
|
-
}
|
|
1534
|
-
if (v && (v.type === "bracket" || v.type === "paren" || v.type === "brace") || g.parens > 0) {
|
|
1535
|
-
q({ type: "plus", value: E });
|
|
1536
|
-
continue;
|
|
1537
|
-
}
|
|
1538
|
-
q({ type: "plus", value: T });
|
|
1539
|
-
continue;
|
|
1540
|
-
}
|
|
1541
|
-
if (E === "@") {
|
|
1542
|
-
if (l.noextglob !== !0 && B() === "(" && B(2) !== "?") {
|
|
1543
|
-
q({ type: "at", extglob: !0, value: E, output: "" });
|
|
1544
|
-
continue;
|
|
1545
|
-
}
|
|
1546
|
-
q({ type: "text", value: E });
|
|
1547
|
-
continue;
|
|
1548
|
-
}
|
|
1549
|
-
if (E !== "*") {
|
|
1550
|
-
(E === "$" || E === "^") && (E = `\\${E}`);
|
|
1551
|
-
const O = n.exec(pe());
|
|
1552
|
-
O && (E += O[0], g.index += O[0].length), q({ type: "text", value: E });
|
|
1553
|
-
continue;
|
|
1554
|
-
}
|
|
1555
|
-
if (v && (v.type === "globstar" || v.star === !0)) {
|
|
1556
|
-
v.type = "star", v.star = !0, v.value += E, v.output = x, g.backtrack = !0, g.globstar = !0, Y(E);
|
|
1557
|
-
continue;
|
|
1558
|
-
}
|
|
1559
|
-
let $ = pe();
|
|
1560
|
-
if (l.noextglob !== !0 && /^\([^?]/.test($)) {
|
|
1561
|
-
J("star", E);
|
|
1562
|
-
continue;
|
|
1563
|
-
}
|
|
1564
|
-
if (v.type === "star") {
|
|
1565
|
-
if (l.noglobstar === !0) {
|
|
1566
|
-
Y(E);
|
|
1567
|
-
continue;
|
|
1568
|
-
}
|
|
1569
|
-
const O = v.prev, W = O.prev, Q = O.type === "slash" || O.type === "bos", oe = W && (W.type === "star" || W.type === "globstar");
|
|
1570
|
-
if (l.bash === !0 && (!Q || $[0] && $[0] !== "/")) {
|
|
1571
|
-
q({ type: "star", value: E, output: "" });
|
|
1572
|
-
continue;
|
|
1573
|
-
}
|
|
1574
|
-
const ee = g.braces > 0 && (O.type === "comma" || O.type === "brace"), ut = G.length && (O.type === "pipe" || O.type === "paren");
|
|
1575
|
-
if (!Q && O.type !== "paren" && !ee && !ut) {
|
|
1576
|
-
q({ type: "star", value: E, output: "" });
|
|
1577
|
-
continue;
|
|
1578
|
-
}
|
|
1579
|
-
for (; $.slice(0, 3) === "/**"; ) {
|
|
1580
|
-
const ke = c[g.index + 4];
|
|
1581
|
-
if (ke && ke !== "/")
|
|
1582
|
-
break;
|
|
1583
|
-
$ = $.slice(3), Y("/**", 3);
|
|
1584
|
-
}
|
|
1585
|
-
if (O.type === "bos" && U()) {
|
|
1586
|
-
v.type = "globstar", v.value += E, v.output = N(l), g.output = v.output, g.globstar = !0, Y(E);
|
|
1587
|
-
continue;
|
|
1588
|
-
}
|
|
1589
|
-
if (O.type === "slash" && O.prev.type !== "bos" && !oe && U()) {
|
|
1590
|
-
g.output = g.output.slice(0, -(O.output + v.output).length), O.output = `(?:${O.output}`, v.type = "globstar", v.output = N(l) + (l.strictSlashes ? ")" : "|$)"), v.value += E, g.globstar = !0, g.output += O.output + v.output, Y(E);
|
|
1591
|
-
continue;
|
|
1592
|
-
}
|
|
1593
|
-
if (O.type === "slash" && O.prev.type !== "bos" && $[0] === "/") {
|
|
1594
|
-
const ke = $[1] !== void 0 ? "|$" : "";
|
|
1595
|
-
g.output = g.output.slice(0, -(O.output + v.output).length), O.output = `(?:${O.output}`, v.type = "globstar", v.output = `${N(l)}${m}|${m}${ke})`, v.value += E, g.output += O.output + v.output, g.globstar = !0, Y(E + ue()), q({ type: "slash", value: "/", output: "" });
|
|
1596
|
-
continue;
|
|
1597
|
-
}
|
|
1598
|
-
if (O.type === "bos" && $[0] === "/") {
|
|
1599
|
-
v.type = "globstar", v.value += E, v.output = `(?:^|${m}|${N(l)}${m})`, g.output = v.output, g.globstar = !0, Y(E + ue()), q({ type: "slash", value: "/", output: "" });
|
|
1600
|
-
continue;
|
|
1601
|
-
}
|
|
1602
|
-
g.output = g.output.slice(0, -v.output.length), v.type = "globstar", v.output = N(l), v.value += E, g.output += v.output, g.globstar = !0, Y(E);
|
|
1603
|
-
continue;
|
|
1604
|
-
}
|
|
1605
|
-
const V = { type: "star", value: E, output: x };
|
|
1606
|
-
if (l.bash === !0) {
|
|
1607
|
-
V.output = ".*?", (v.type === "bos" || v.type === "slash") && (V.output = K + V.output), q(V);
|
|
1608
|
-
continue;
|
|
1609
|
-
}
|
|
1610
|
-
if (v && (v.type === "bracket" || v.type === "paren") && l.regex === !0) {
|
|
1611
|
-
V.output = E, q(V);
|
|
1612
|
-
continue;
|
|
1613
|
-
}
|
|
1614
|
-
(g.index === g.start || v.type === "slash" || v.type === "dot") && (v.type === "dot" ? (g.output += w, v.output += w) : l.dot === !0 ? (g.output += H, v.output += H) : (g.output += K, v.output += K), B() !== "*" && (g.output += L, v.output += L)), q(V);
|
|
1615
|
-
}
|
|
1616
|
-
for (; g.brackets > 0; ) {
|
|
1617
|
-
if (l.strictBrackets === !0) throw new SyntaxError(s("closing", "]"));
|
|
1618
|
-
g.output = o.escapeLast(g.output, "["), ae("brackets");
|
|
1619
|
-
}
|
|
1620
|
-
for (; g.parens > 0; ) {
|
|
1621
|
-
if (l.strictBrackets === !0) throw new SyntaxError(s("closing", ")"));
|
|
1622
|
-
g.output = o.escapeLast(g.output, "("), ae("parens");
|
|
1623
|
-
}
|
|
1624
|
-
for (; g.braces > 0; ) {
|
|
1625
|
-
if (l.strictBrackets === !0) throw new SyntaxError(s("closing", "}"));
|
|
1626
|
-
g.output = o.escapeLast(g.output, "{"), ae("braces");
|
|
1627
|
-
}
|
|
1628
|
-
if (l.strictSlashes !== !0 && (v.type === "star" || v.type === "bracket") && q({ type: "maybe_slash", value: "", output: `${m}?` }), g.backtrack === !0) {
|
|
1629
|
-
g.output = "";
|
|
1630
|
-
for (const $ of g.tokens)
|
|
1631
|
-
g.output += $.output != null ? $.output : $.value, $.suffix && (g.output += $.suffix);
|
|
1632
|
-
}
|
|
1633
|
-
return g;
|
|
1634
|
-
};
|
|
1635
|
-
return i.fastpaths = (c, h) => {
|
|
1636
|
-
const l = { ...h }, y = typeof l.maxLength == "number" ? Math.min(f, l.maxLength) : f, C = c.length;
|
|
1637
|
-
if (C > y)
|
|
1638
|
-
throw new SyntaxError(`Input length: ${C}, exceeds maximum allowed length: ${y}`);
|
|
1639
|
-
c = r[c] || c;
|
|
1640
|
-
const P = o.isWindows(h), {
|
|
1641
|
-
DOT_LITERAL: d,
|
|
1642
|
-
SLASH_LITERAL: _,
|
|
1643
|
-
ONE_CHAR: b,
|
|
1644
|
-
DOTS_SLASH: p,
|
|
1645
|
-
NO_DOT: A,
|
|
1646
|
-
NO_DOTS: S,
|
|
1647
|
-
NO_DOTS_SLASH: T,
|
|
1648
|
-
STAR: m,
|
|
1649
|
-
START_ANCHOR: L
|
|
1650
|
-
} = u.globChars(P), k = l.dot ? S : A, D = l.dot ? T : A, w = l.capture ? "" : "?:", H = { negated: !1, prefix: "" };
|
|
1651
|
-
let R = l.bash === !0 ? ".*?" : m;
|
|
1652
|
-
l.capture && (R = `(${R})`);
|
|
1653
|
-
const j = (K) => K.noglobstar === !0 ? R : `(${w}(?:(?!${L}${K.dot ? p : d}).)*?)`, I = (K) => {
|
|
1654
|
-
switch (K) {
|
|
1655
|
-
case "*":
|
|
1656
|
-
return `${k}${b}${R}`;
|
|
1657
|
-
case ".*":
|
|
1658
|
-
return `${d}${b}${R}`;
|
|
1659
|
-
case "*.*":
|
|
1660
|
-
return `${k}${R}${d}${b}${R}`;
|
|
1661
|
-
case "*/*":
|
|
1662
|
-
return `${k}${R}${_}${b}${D}${R}`;
|
|
1663
|
-
case "**":
|
|
1664
|
-
return k + j(l);
|
|
1665
|
-
case "**/*":
|
|
1666
|
-
return `(?:${k}${j(l)}${_})?${D}${b}${R}`;
|
|
1667
|
-
case "**/*.*":
|
|
1668
|
-
return `(?:${k}${j(l)}${_})?${D}${R}${d}${b}${R}`;
|
|
1669
|
-
case "**/.*":
|
|
1670
|
-
return `(?:${k}${j(l)}${_})?${d}${b}${R}`;
|
|
1671
|
-
default: {
|
|
1672
|
-
const se = /^(.*?)\.(\w+)$/.exec(K);
|
|
1673
|
-
if (!se) return;
|
|
1674
|
-
const x = I(se[1]);
|
|
1675
|
-
return x ? x + d + se[2] : void 0;
|
|
1676
|
-
}
|
|
1677
|
-
}
|
|
1678
|
-
}, F = o.removePrefix(c, H);
|
|
1679
|
-
let N = I(F);
|
|
1680
|
-
return N && l.strictSlashes !== !0 && (N += `${_}?`), N;
|
|
1681
|
-
}, Tt = i, Tt;
|
|
1682
|
-
}
|
|
1683
|
-
var xt, gr;
|
|
1684
|
-
function Un() {
|
|
1685
|
-
if (gr) return xt;
|
|
1686
|
-
gr = 1;
|
|
1687
|
-
const u = he, o = jn(), f = Gn(), a = at(), n = st(), e = (t) => t && typeof t == "object" && !Array.isArray(t), r = (t, s, i = !1) => {
|
|
1688
|
-
if (Array.isArray(t)) {
|
|
1689
|
-
const _ = t.map((p) => r(p, s, i));
|
|
1690
|
-
return (p) => {
|
|
1691
|
-
for (const A of _) {
|
|
1692
|
-
const S = A(p);
|
|
1693
|
-
if (S) return S;
|
|
1694
|
-
}
|
|
1695
|
-
return !1;
|
|
1696
|
-
};
|
|
1697
|
-
}
|
|
1698
|
-
const c = e(t) && t.tokens && t.input;
|
|
1699
|
-
if (t === "" || typeof t != "string" && !c)
|
|
1700
|
-
throw new TypeError("Expected pattern to be a non-empty string");
|
|
1701
|
-
const h = s || {}, l = a.isWindows(s), y = c ? r.compileRe(t, s) : r.makeRe(t, s, !1, !0), C = y.state;
|
|
1702
|
-
delete y.state;
|
|
1703
|
-
let P = () => !1;
|
|
1704
|
-
if (h.ignore) {
|
|
1705
|
-
const _ = { ...s, ignore: null, onMatch: null, onResult: null };
|
|
1706
|
-
P = r(h.ignore, _, i);
|
|
1707
|
-
}
|
|
1708
|
-
const d = (_, b = !1) => {
|
|
1709
|
-
const { isMatch: p, match: A, output: S } = r.test(_, y, s, { glob: t, posix: l }), T = { glob: t, state: C, regex: y, posix: l, input: _, output: S, match: A, isMatch: p };
|
|
1710
|
-
return typeof h.onResult == "function" && h.onResult(T), p === !1 ? (T.isMatch = !1, b ? T : !1) : P(_) ? (typeof h.onIgnore == "function" && h.onIgnore(T), T.isMatch = !1, b ? T : !1) : (typeof h.onMatch == "function" && h.onMatch(T), b ? T : !0);
|
|
1711
|
-
};
|
|
1712
|
-
return i && (d.state = C), d;
|
|
1713
|
-
};
|
|
1714
|
-
return r.test = (t, s, i, { glob: c, posix: h } = {}) => {
|
|
1715
|
-
if (typeof t != "string")
|
|
1716
|
-
throw new TypeError("Expected input to be a string");
|
|
1717
|
-
if (t === "")
|
|
1718
|
-
return { isMatch: !1, output: "" };
|
|
1719
|
-
const l = i || {}, y = l.format || (h ? a.toPosixSlashes : null);
|
|
1720
|
-
let C = t === c, P = C && y ? y(t) : t;
|
|
1721
|
-
return C === !1 && (P = y ? y(t) : t, C = P === c), (C === !1 || l.capture === !0) && (l.matchBase === !0 || l.basename === !0 ? C = r.matchBase(t, s, i, h) : C = s.exec(P)), { isMatch: !!C, match: C, output: P };
|
|
1722
|
-
}, r.matchBase = (t, s, i, c = a.isWindows(i)) => (s instanceof RegExp ? s : r.makeRe(s, i)).test(u.basename(t)), r.isMatch = (t, s, i) => r(s, i)(t), r.parse = (t, s) => Array.isArray(t) ? t.map((i) => r.parse(i, s)) : f(t, { ...s, fastpaths: !1 }), r.scan = (t, s) => o(t, s), r.compileRe = (t, s, i = !1, c = !1) => {
|
|
1723
|
-
if (i === !0)
|
|
1724
|
-
return t.output;
|
|
1725
|
-
const h = s || {}, l = h.contains ? "" : "^", y = h.contains ? "" : "$";
|
|
1726
|
-
let C = `${l}(?:${t.output})${y}`;
|
|
1727
|
-
t && t.negated === !0 && (C = `^(?!${C}).*$`);
|
|
1728
|
-
const P = r.toRegex(C, s);
|
|
1729
|
-
return c === !0 && (P.state = t), P;
|
|
1730
|
-
}, r.makeRe = (t, s = {}, i = !1, c = !1) => {
|
|
1731
|
-
if (!t || typeof t != "string")
|
|
1732
|
-
throw new TypeError("Expected a non-empty string");
|
|
1733
|
-
let h = { negated: !1, fastpaths: !0 };
|
|
1734
|
-
return s.fastpaths !== !1 && (t[0] === "." || t[0] === "*") && (h.output = f.fastpaths(t, s)), h.output || (h = f(t, s)), r.compileRe(h, s, i, c);
|
|
1735
|
-
}, r.toRegex = (t, s) => {
|
|
1736
|
-
try {
|
|
1737
|
-
const i = s || {};
|
|
1738
|
-
return new RegExp(t, i.flags || (i.nocase ? "i" : ""));
|
|
1739
|
-
} catch (i) {
|
|
1740
|
-
if (s && s.debug === !0) throw i;
|
|
1741
|
-
return /$^/;
|
|
1742
|
-
}
|
|
1743
|
-
}, r.constants = n, xt = r, xt;
|
|
1744
|
-
}
|
|
1745
|
-
var Ot, yr;
|
|
1746
|
-
function Wn() {
|
|
1747
|
-
return yr || (yr = 1, Ot = Un()), Ot;
|
|
1748
|
-
}
|
|
1749
|
-
var wt, Sr;
|
|
1750
|
-
function Vn() {
|
|
1751
|
-
if (Sr) return wt;
|
|
1752
|
-
Sr = 1;
|
|
1753
|
-
const u = gn, o = Bn(), f = Wn(), a = at(), n = (t) => t === "" || t === "./", e = (t) => {
|
|
1754
|
-
const s = t.indexOf("{");
|
|
1755
|
-
return s > -1 && t.indexOf("}", s) > -1;
|
|
1756
|
-
}, r = (t, s, i) => {
|
|
1757
|
-
s = [].concat(s), t = [].concat(t);
|
|
1758
|
-
let c = /* @__PURE__ */ new Set(), h = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), y = 0, C = (_) => {
|
|
1759
|
-
l.add(_.output), i && i.onResult && i.onResult(_);
|
|
1760
|
-
};
|
|
1761
|
-
for (let _ = 0; _ < s.length; _++) {
|
|
1762
|
-
let b = f(String(s[_]), { ...i, onResult: C }, !0), p = b.state.negated || b.state.negatedExtglob;
|
|
1763
|
-
p && y++;
|
|
1764
|
-
for (let A of t) {
|
|
1765
|
-
let S = b(A, !0);
|
|
1766
|
-
(p ? !S.isMatch : S.isMatch) && (p ? c.add(S.output) : (c.delete(S.output), h.add(S.output)));
|
|
1767
|
-
}
|
|
1768
|
-
}
|
|
1769
|
-
let d = (y === s.length ? [...l] : [...h]).filter((_) => !c.has(_));
|
|
1770
|
-
if (i && d.length === 0) {
|
|
1771
|
-
if (i.failglob === !0)
|
|
1772
|
-
throw new Error(`No matches found for "${s.join(", ")}"`);
|
|
1773
|
-
if (i.nonull === !0 || i.nullglob === !0)
|
|
1774
|
-
return i.unescape ? s.map((_) => _.replace(/\\/g, "")) : s;
|
|
1775
|
-
}
|
|
1776
|
-
return d;
|
|
1777
|
-
};
|
|
1778
|
-
return r.match = r, r.matcher = (t, s) => f(t, s), r.isMatch = (t, s, i) => f(s, i)(t), r.any = r.isMatch, r.not = (t, s, i = {}) => {
|
|
1779
|
-
s = [].concat(s).map(String);
|
|
1780
|
-
let c = /* @__PURE__ */ new Set(), h = [], l = (C) => {
|
|
1781
|
-
i.onResult && i.onResult(C), h.push(C.output);
|
|
1782
|
-
}, y = new Set(r(t, s, { ...i, onResult: l }));
|
|
1783
|
-
for (let C of h)
|
|
1784
|
-
y.has(C) || c.add(C);
|
|
1785
|
-
return [...c];
|
|
1786
|
-
}, r.contains = (t, s, i) => {
|
|
1787
|
-
if (typeof t != "string")
|
|
1788
|
-
throw new TypeError(`Expected a string: "${u.inspect(t)}"`);
|
|
1789
|
-
if (Array.isArray(s))
|
|
1790
|
-
return s.some((c) => r.contains(t, c, i));
|
|
1791
|
-
if (typeof s == "string") {
|
|
1792
|
-
if (n(t) || n(s))
|
|
1793
|
-
return !1;
|
|
1794
|
-
if (t.includes(s) || t.startsWith("./") && t.slice(2).includes(s))
|
|
1795
|
-
return !0;
|
|
1796
|
-
}
|
|
1797
|
-
return r.isMatch(t, s, { ...i, contains: !0 });
|
|
1798
|
-
}, r.matchKeys = (t, s, i) => {
|
|
1799
|
-
if (!a.isObject(t))
|
|
1800
|
-
throw new TypeError("Expected the first argument to be an object");
|
|
1801
|
-
let c = r(Object.keys(t), s, i), h = {};
|
|
1802
|
-
for (let l of c) h[l] = t[l];
|
|
1803
|
-
return h;
|
|
1804
|
-
}, r.some = (t, s, i) => {
|
|
1805
|
-
let c = [].concat(t);
|
|
1806
|
-
for (let h of [].concat(s)) {
|
|
1807
|
-
let l = f(String(h), i);
|
|
1808
|
-
if (c.some((y) => l(y)))
|
|
1809
|
-
return !0;
|
|
1810
|
-
}
|
|
1811
|
-
return !1;
|
|
1812
|
-
}, r.every = (t, s, i) => {
|
|
1813
|
-
let c = [].concat(t);
|
|
1814
|
-
for (let h of [].concat(s)) {
|
|
1815
|
-
let l = f(String(h), i);
|
|
1816
|
-
if (!c.every((y) => l(y)))
|
|
1817
|
-
return !1;
|
|
1818
|
-
}
|
|
1819
|
-
return !0;
|
|
1820
|
-
}, r.all = (t, s, i) => {
|
|
1821
|
-
if (typeof t != "string")
|
|
1822
|
-
throw new TypeError(`Expected a string: "${u.inspect(t)}"`);
|
|
1823
|
-
return [].concat(s).every((c) => f(c, i)(t));
|
|
1824
|
-
}, r.capture = (t, s, i) => {
|
|
1825
|
-
let c = a.isWindows(i), l = f.makeRe(String(t), { ...i, capture: !0 }).exec(c ? a.toPosixSlashes(s) : s);
|
|
1826
|
-
if (l)
|
|
1827
|
-
return l.slice(1).map((y) => y === void 0 ? "" : y);
|
|
1828
|
-
}, r.makeRe = (...t) => f.makeRe(...t), r.scan = (...t) => f.scan(...t), r.parse = (t, s) => {
|
|
1829
|
-
let i = [];
|
|
1830
|
-
for (let c of [].concat(t || []))
|
|
1831
|
-
for (let h of o(String(c), s))
|
|
1832
|
-
i.push(f.parse(h, s));
|
|
1833
|
-
return i;
|
|
1834
|
-
}, r.braces = (t, s) => {
|
|
1835
|
-
if (typeof t != "string") throw new TypeError("Expected a string");
|
|
1836
|
-
return s && s.nobrace === !0 || !e(t) ? [t] : o(t, s);
|
|
1837
|
-
}, r.braceExpand = (t, s) => {
|
|
1838
|
-
if (typeof t != "string") throw new TypeError("Expected a string");
|
|
1839
|
-
return r.braces(t, { ...s, expand: !0 });
|
|
1840
|
-
}, r.hasBraces = e, wt = r, wt;
|
|
1841
|
-
}
|
|
1842
|
-
var vr;
|
|
1843
|
-
function Kn() {
|
|
1844
|
-
if (vr) return M;
|
|
1845
|
-
vr = 1, Object.defineProperty(M, "__esModule", { value: !0 }), M.isAbsolute = M.partitionAbsoluteAndRelative = M.removeDuplicateSlashes = M.matchAny = M.convertPatternsToRe = M.makeRe = M.getPatternParts = M.expandBraceExpansion = M.expandPatternsWithBraceExpansion = M.isAffectDepthOfReadingPattern = M.endsWithSlashGlobStar = M.hasGlobStar = M.getBaseDirectory = M.isPatternRelatedToParentDirectory = M.getPatternsOutsideCurrentDirectory = M.getPatternsInsideCurrentDirectory = M.getPositivePatterns = M.getNegativePatterns = M.isPositivePattern = M.isNegativePattern = M.convertToNegativePattern = M.convertToPositivePattern = M.isDynamicPattern = M.isStaticPattern = void 0;
|
|
1846
|
-
const u = he, o = Hn(), f = Vn(), a = "**", n = "\\", e = /[*?]|^!/, r = /\[[^[]*]/, t = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/, s = /[!*+?@]\([^(]*\)/, i = /,|\.\./, c = /(?!^)\/{2,}/g;
|
|
1847
|
-
function h(x, g = {}) {
|
|
1848
|
-
return !l(x, g);
|
|
1849
|
-
}
|
|
1850
|
-
M.isStaticPattern = h;
|
|
1851
|
-
function l(x, g = {}) {
|
|
1852
|
-
return x === "" ? !1 : !!(g.caseSensitiveMatch === !1 || x.includes(n) || e.test(x) || r.test(x) || t.test(x) || g.extglob !== !1 && s.test(x) || g.braceExpansion !== !1 && y(x));
|
|
1853
|
-
}
|
|
1854
|
-
M.isDynamicPattern = l;
|
|
1855
|
-
function y(x) {
|
|
1856
|
-
const g = x.indexOf("{");
|
|
1857
|
-
if (g === -1)
|
|
1858
|
-
return !1;
|
|
1859
|
-
const G = x.indexOf("}", g + 1);
|
|
1860
|
-
if (G === -1)
|
|
1861
|
-
return !1;
|
|
1862
|
-
const z = x.slice(g, G);
|
|
1863
|
-
return i.test(z);
|
|
1864
|
-
}
|
|
1865
|
-
function C(x) {
|
|
1866
|
-
return d(x) ? x.slice(1) : x;
|
|
1867
|
-
}
|
|
1868
|
-
M.convertToPositivePattern = C;
|
|
1869
|
-
function P(x) {
|
|
1870
|
-
return "!" + x;
|
|
1871
|
-
}
|
|
1872
|
-
M.convertToNegativePattern = P;
|
|
1873
|
-
function d(x) {
|
|
1874
|
-
return x.startsWith("!") && x[1] !== "(";
|
|
1875
|
-
}
|
|
1876
|
-
M.isNegativePattern = d;
|
|
1877
|
-
function _(x) {
|
|
1878
|
-
return !d(x);
|
|
1879
|
-
}
|
|
1880
|
-
M.isPositivePattern = _;
|
|
1881
|
-
function b(x) {
|
|
1882
|
-
return x.filter(d);
|
|
1883
|
-
}
|
|
1884
|
-
M.getNegativePatterns = b;
|
|
1885
|
-
function p(x) {
|
|
1886
|
-
return x.filter(_);
|
|
1887
|
-
}
|
|
1888
|
-
M.getPositivePatterns = p;
|
|
1889
|
-
function A(x) {
|
|
1890
|
-
return x.filter((g) => !T(g));
|
|
1891
|
-
}
|
|
1892
|
-
M.getPatternsInsideCurrentDirectory = A;
|
|
1893
|
-
function S(x) {
|
|
1894
|
-
return x.filter(T);
|
|
1895
|
-
}
|
|
1896
|
-
M.getPatternsOutsideCurrentDirectory = S;
|
|
1897
|
-
function T(x) {
|
|
1898
|
-
return x.startsWith("..") || x.startsWith("./..");
|
|
1899
|
-
}
|
|
1900
|
-
M.isPatternRelatedToParentDirectory = T;
|
|
1901
|
-
function m(x) {
|
|
1902
|
-
return o(x, { flipBackslashes: !1 });
|
|
1903
|
-
}
|
|
1904
|
-
M.getBaseDirectory = m;
|
|
1905
|
-
function L(x) {
|
|
1906
|
-
return x.includes(a);
|
|
1907
|
-
}
|
|
1908
|
-
M.hasGlobStar = L;
|
|
1909
|
-
function k(x) {
|
|
1910
|
-
return x.endsWith("/" + a);
|
|
1911
|
-
}
|
|
1912
|
-
M.endsWithSlashGlobStar = k;
|
|
1913
|
-
function D(x) {
|
|
1914
|
-
const g = u.basename(x);
|
|
1915
|
-
return k(x) || h(g);
|
|
1916
|
-
}
|
|
1917
|
-
M.isAffectDepthOfReadingPattern = D;
|
|
1918
|
-
function w(x) {
|
|
1919
|
-
return x.reduce((g, G) => g.concat(H(G)), []);
|
|
1920
|
-
}
|
|
1921
|
-
M.expandPatternsWithBraceExpansion = w;
|
|
1922
|
-
function H(x) {
|
|
1923
|
-
const g = f.braces(x, { expand: !0, nodupes: !0, keepEscaping: !0 });
|
|
1924
|
-
return g.sort((G, z) => G.length - z.length), g.filter((G) => G !== "");
|
|
1925
|
-
}
|
|
1926
|
-
M.expandBraceExpansion = H;
|
|
1927
|
-
function R(x, g) {
|
|
1928
|
-
let { parts: G } = f.scan(x, Object.assign(Object.assign({}, g), { parts: !0 }));
|
|
1929
|
-
return G.length === 0 && (G = [x]), G[0].startsWith("/") && (G[0] = G[0].slice(1), G.unshift("")), G;
|
|
1930
|
-
}
|
|
1931
|
-
M.getPatternParts = R;
|
|
1932
|
-
function j(x, g) {
|
|
1933
|
-
return f.makeRe(x, g);
|
|
1934
|
-
}
|
|
1935
|
-
M.makeRe = j;
|
|
1936
|
-
function I(x, g) {
|
|
1937
|
-
return x.map((G) => j(G, g));
|
|
1938
|
-
}
|
|
1939
|
-
M.convertPatternsToRe = I;
|
|
1940
|
-
function F(x, g) {
|
|
1941
|
-
return g.some((G) => G.test(x));
|
|
1942
|
-
}
|
|
1943
|
-
M.matchAny = F;
|
|
1944
|
-
function N(x) {
|
|
1945
|
-
return x.replace(c, "/");
|
|
1946
|
-
}
|
|
1947
|
-
M.removeDuplicateSlashes = N;
|
|
1948
|
-
function K(x) {
|
|
1949
|
-
const g = [], G = [];
|
|
1950
|
-
for (const z of x)
|
|
1951
|
-
se(z) ? g.push(z) : G.push(z);
|
|
1952
|
-
return [g, G];
|
|
1953
|
-
}
|
|
1954
|
-
M.partitionAbsoluteAndRelative = K;
|
|
1955
|
-
function se(x) {
|
|
1956
|
-
return u.isAbsolute(x);
|
|
1957
|
-
}
|
|
1958
|
-
return M.isAbsolute = se, M;
|
|
1959
|
-
}
|
|
1960
|
-
var Pe = {}, $t, mr;
|
|
1961
|
-
function Qn() {
|
|
1962
|
-
if (mr) return $t;
|
|
1963
|
-
mr = 1;
|
|
1964
|
-
const o = it.PassThrough, f = Array.prototype.slice;
|
|
1965
|
-
$t = a;
|
|
1966
|
-
function a() {
|
|
1967
|
-
const e = [], r = f.call(arguments);
|
|
1968
|
-
let t = !1, s = r[r.length - 1];
|
|
1969
|
-
s && !Array.isArray(s) && s.pipe == null ? r.pop() : s = {};
|
|
1970
|
-
const i = s.end !== !1, c = s.pipeError === !0;
|
|
1971
|
-
s.objectMode == null && (s.objectMode = !0), s.highWaterMark == null && (s.highWaterMark = 64 * 1024);
|
|
1972
|
-
const h = o(s);
|
|
1973
|
-
function l() {
|
|
1974
|
-
for (let P = 0, d = arguments.length; P < d; P++)
|
|
1975
|
-
e.push(n(arguments[P], s));
|
|
1976
|
-
return y(), this;
|
|
1977
|
-
}
|
|
1978
|
-
function y() {
|
|
1979
|
-
if (t)
|
|
1980
|
-
return;
|
|
1981
|
-
t = !0;
|
|
1982
|
-
let P = e.shift();
|
|
1983
|
-
if (!P) {
|
|
1984
|
-
process.nextTick(C);
|
|
1985
|
-
return;
|
|
1986
|
-
}
|
|
1987
|
-
Array.isArray(P) || (P = [P]);
|
|
1988
|
-
let d = P.length + 1;
|
|
1989
|
-
function _() {
|
|
1990
|
-
--d > 0 || (t = !1, y());
|
|
1991
|
-
}
|
|
1992
|
-
function b(p) {
|
|
1993
|
-
function A() {
|
|
1994
|
-
p.removeListener("merge2UnpipeEnd", A), p.removeListener("end", A), c && p.removeListener("error", S), _();
|
|
1995
|
-
}
|
|
1996
|
-
function S(T) {
|
|
1997
|
-
h.emit("error", T);
|
|
1998
|
-
}
|
|
1999
|
-
if (p._readableState.endEmitted)
|
|
2000
|
-
return _();
|
|
2001
|
-
p.on("merge2UnpipeEnd", A), p.on("end", A), c && p.on("error", S), p.pipe(h, { end: !1 }), p.resume();
|
|
2002
|
-
}
|
|
2003
|
-
for (let p = 0; p < P.length; p++)
|
|
2004
|
-
b(P[p]);
|
|
2005
|
-
_();
|
|
2006
|
-
}
|
|
2007
|
-
function C() {
|
|
2008
|
-
t = !1, h.emit("queueDrain"), i && h.end();
|
|
2009
|
-
}
|
|
2010
|
-
return h.setMaxListeners(0), h.add = l, h.on("unpipe", function(P) {
|
|
2011
|
-
P.emit("merge2UnpipeEnd");
|
|
2012
|
-
}), r.length && l.apply(null, r), h;
|
|
2013
|
-
}
|
|
2014
|
-
function n(e, r) {
|
|
2015
|
-
if (Array.isArray(e))
|
|
2016
|
-
for (let t = 0, s = e.length; t < s; t++)
|
|
2017
|
-
e[t] = n(e[t], r);
|
|
2018
|
-
else {
|
|
2019
|
-
if (!e._readableState && e.pipe && (e = e.pipe(o(r))), !e._readableState || !e.pause || !e.pipe)
|
|
2020
|
-
throw new Error("Only readable stream can be merged.");
|
|
2021
|
-
e.pause();
|
|
2022
|
-
}
|
|
2023
|
-
return e;
|
|
2024
|
-
}
|
|
2025
|
-
return $t;
|
|
2026
|
-
}
|
|
2027
|
-
var Rr;
|
|
2028
|
-
function Yn() {
|
|
2029
|
-
if (Rr) return Pe;
|
|
2030
|
-
Rr = 1, Object.defineProperty(Pe, "__esModule", { value: !0 }), Pe.merge = void 0;
|
|
2031
|
-
const u = Qn();
|
|
2032
|
-
function o(a) {
|
|
2033
|
-
const n = u(a);
|
|
2034
|
-
return a.forEach((e) => {
|
|
2035
|
-
e.once("error", (r) => n.emit("error", r));
|
|
2036
|
-
}), n.once("close", () => f(a)), n.once("end", () => f(a)), n;
|
|
2037
|
-
}
|
|
2038
|
-
Pe.merge = o;
|
|
2039
|
-
function f(a) {
|
|
2040
|
-
a.forEach((n) => n.emit("close"));
|
|
2041
|
-
}
|
|
2042
|
-
return Pe;
|
|
2043
|
-
}
|
|
2044
|
-
var me = {}, Er;
|
|
2045
|
-
function Xn() {
|
|
2046
|
-
if (Er) return me;
|
|
2047
|
-
Er = 1, Object.defineProperty(me, "__esModule", { value: !0 }), me.isEmpty = me.isString = void 0;
|
|
2048
|
-
function u(f) {
|
|
2049
|
-
return typeof f == "string";
|
|
2050
|
-
}
|
|
2051
|
-
me.isString = u;
|
|
2052
|
-
function o(f) {
|
|
2053
|
-
return f === "";
|
|
2054
|
-
}
|
|
2055
|
-
return me.isEmpty = o, me;
|
|
2056
|
-
}
|
|
2057
|
-
var Ar;
|
|
2058
|
-
function Se() {
|
|
2059
|
-
if (Ar) return re;
|
|
2060
|
-
Ar = 1, Object.defineProperty(re, "__esModule", { value: !0 }), re.string = re.stream = re.pattern = re.path = re.fs = re.errno = re.array = void 0;
|
|
2061
|
-
const u = xn();
|
|
2062
|
-
re.array = u;
|
|
2063
|
-
const o = On();
|
|
2064
|
-
re.errno = o;
|
|
2065
|
-
const f = wn();
|
|
2066
|
-
re.fs = f;
|
|
2067
|
-
const a = $n();
|
|
2068
|
-
re.path = a;
|
|
2069
|
-
const n = Kn();
|
|
2070
|
-
re.pattern = n;
|
|
2071
|
-
const e = Yn();
|
|
2072
|
-
re.stream = e;
|
|
2073
|
-
const r = Xn();
|
|
2074
|
-
return re.string = r, re;
|
|
2075
|
-
}
|
|
2076
|
-
var br;
|
|
2077
|
-
function Zn() {
|
|
2078
|
-
if (br) return te;
|
|
2079
|
-
br = 1, Object.defineProperty(te, "__esModule", { value: !0 }), te.convertPatternGroupToTask = te.convertPatternGroupsToTasks = te.groupPatternsByBaseDirectory = te.getNegativePatternsAsPositive = te.getPositivePatterns = te.convertPatternsToTasks = te.generate = void 0;
|
|
2080
|
-
const u = Se();
|
|
2081
|
-
function o(i, c) {
|
|
2082
|
-
const h = f(i, c), l = f(c.ignore, c), y = n(h), C = e(h, l), P = y.filter((p) => u.pattern.isStaticPattern(p, c)), d = y.filter((p) => u.pattern.isDynamicPattern(p, c)), _ = a(
|
|
2083
|
-
P,
|
|
2084
|
-
C,
|
|
2085
|
-
/* dynamic */
|
|
2086
|
-
!1
|
|
2087
|
-
), b = a(
|
|
2088
|
-
d,
|
|
2089
|
-
C,
|
|
2090
|
-
/* dynamic */
|
|
2091
|
-
!0
|
|
2092
|
-
);
|
|
2093
|
-
return _.concat(b);
|
|
2094
|
-
}
|
|
2095
|
-
te.generate = o;
|
|
2096
|
-
function f(i, c) {
|
|
2097
|
-
let h = i;
|
|
2098
|
-
return c.braceExpansion && (h = u.pattern.expandPatternsWithBraceExpansion(h)), c.baseNameMatch && (h = h.map((l) => l.includes("/") ? l : `**/${l}`)), h.map((l) => u.pattern.removeDuplicateSlashes(l));
|
|
2099
|
-
}
|
|
2100
|
-
function a(i, c, h) {
|
|
2101
|
-
const l = [], y = u.pattern.getPatternsOutsideCurrentDirectory(i), C = u.pattern.getPatternsInsideCurrentDirectory(i), P = r(y), d = r(C);
|
|
2102
|
-
return l.push(...t(P, c, h)), "." in d ? l.push(s(".", C, c, h)) : l.push(...t(d, c, h)), l;
|
|
2103
|
-
}
|
|
2104
|
-
te.convertPatternsToTasks = a;
|
|
2105
|
-
function n(i) {
|
|
2106
|
-
return u.pattern.getPositivePatterns(i);
|
|
2107
|
-
}
|
|
2108
|
-
te.getPositivePatterns = n;
|
|
2109
|
-
function e(i, c) {
|
|
2110
|
-
return u.pattern.getNegativePatterns(i).concat(c).map(u.pattern.convertToPositivePattern);
|
|
2111
|
-
}
|
|
2112
|
-
te.getNegativePatternsAsPositive = e;
|
|
2113
|
-
function r(i) {
|
|
2114
|
-
const c = {};
|
|
2115
|
-
return i.reduce((h, l) => {
|
|
2116
|
-
const y = u.pattern.getBaseDirectory(l);
|
|
2117
|
-
return y in h ? h[y].push(l) : h[y] = [l], h;
|
|
2118
|
-
}, c);
|
|
2119
|
-
}
|
|
2120
|
-
te.groupPatternsByBaseDirectory = r;
|
|
2121
|
-
function t(i, c, h) {
|
|
2122
|
-
return Object.keys(i).map((l) => s(l, i[l], c, h));
|
|
2123
|
-
}
|
|
2124
|
-
te.convertPatternGroupsToTasks = t;
|
|
2125
|
-
function s(i, c, h, l) {
|
|
2126
|
-
return {
|
|
2127
|
-
dynamic: l,
|
|
2128
|
-
positive: c,
|
|
2129
|
-
negative: h,
|
|
2130
|
-
base: i,
|
|
2131
|
-
patterns: [].concat(c, h.map(u.pattern.convertToNegativePattern))
|
|
2132
|
-
};
|
|
2133
|
-
}
|
|
2134
|
-
return te.convertPatternGroupToTask = s, te;
|
|
2135
|
-
}
|
|
2136
|
-
var He = {}, Me = {}, le = {}, De = {}, qe = {}, de = {}, _e = {}, ge = {}, Ce = {}, Pr;
|
|
2137
|
-
function zn() {
|
|
2138
|
-
if (Pr) return Ce;
|
|
2139
|
-
Pr = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.read = void 0;
|
|
2140
|
-
function u(a, n, e) {
|
|
2141
|
-
n.fs.lstat(a, (r, t) => {
|
|
2142
|
-
if (r !== null) {
|
|
2143
|
-
o(e, r);
|
|
2144
|
-
return;
|
|
2145
|
-
}
|
|
2146
|
-
if (!t.isSymbolicLink() || !n.followSymbolicLink) {
|
|
2147
|
-
f(e, t);
|
|
2148
|
-
return;
|
|
2149
|
-
}
|
|
2150
|
-
n.fs.stat(a, (s, i) => {
|
|
2151
|
-
if (s !== null) {
|
|
2152
|
-
if (n.throwErrorOnBrokenSymbolicLink) {
|
|
2153
|
-
o(e, s);
|
|
2154
|
-
return;
|
|
2155
|
-
}
|
|
2156
|
-
f(e, t);
|
|
2157
|
-
return;
|
|
2158
|
-
}
|
|
2159
|
-
n.markSymbolicLink && (i.isSymbolicLink = () => !0), f(e, i);
|
|
2160
|
-
});
|
|
2161
|
-
});
|
|
2162
|
-
}
|
|
2163
|
-
Ce.read = u;
|
|
2164
|
-
function o(a, n) {
|
|
2165
|
-
a(n);
|
|
2166
|
-
}
|
|
2167
|
-
function f(a, n) {
|
|
2168
|
-
a(null, n);
|
|
2169
|
-
}
|
|
2170
|
-
return Ce;
|
|
2171
|
-
}
|
|
2172
|
-
var Te = {}, Cr;
|
|
2173
|
-
function Jn() {
|
|
2174
|
-
if (Cr) return Te;
|
|
2175
|
-
Cr = 1, Object.defineProperty(Te, "__esModule", { value: !0 }), Te.read = void 0;
|
|
2176
|
-
function u(o, f) {
|
|
2177
|
-
const a = f.fs.lstatSync(o);
|
|
2178
|
-
if (!a.isSymbolicLink() || !f.followSymbolicLink)
|
|
2179
|
-
return a;
|
|
2180
|
-
try {
|
|
2181
|
-
const n = f.fs.statSync(o);
|
|
2182
|
-
return f.markSymbolicLink && (n.isSymbolicLink = () => !0), n;
|
|
2183
|
-
} catch (n) {
|
|
2184
|
-
if (!f.throwErrorOnBrokenSymbolicLink)
|
|
2185
|
-
return a;
|
|
2186
|
-
throw n;
|
|
2187
|
-
}
|
|
2188
|
-
}
|
|
2189
|
-
return Te.read = u, Te;
|
|
2190
|
-
}
|
|
2191
|
-
var Ne = {}, Lt = {}, Tr;
|
|
2192
|
-
function ei() {
|
|
2193
|
-
return Tr || (Tr = 1, (function(u) {
|
|
2194
|
-
Object.defineProperty(u, "__esModule", { value: !0 }), u.createFileSystemAdapter = u.FILE_SYSTEM_ADAPTER = void 0;
|
|
2195
|
-
const o = Ft;
|
|
2196
|
-
u.FILE_SYSTEM_ADAPTER = {
|
|
2197
|
-
lstat: o.lstat,
|
|
2198
|
-
stat: o.stat,
|
|
2199
|
-
lstatSync: o.lstatSync,
|
|
2200
|
-
statSync: o.statSync
|
|
2201
|
-
};
|
|
2202
|
-
function f(a) {
|
|
2203
|
-
return a === void 0 ? u.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, u.FILE_SYSTEM_ADAPTER), a);
|
|
2204
|
-
}
|
|
2205
|
-
u.createFileSystemAdapter = f;
|
|
2206
|
-
})(Lt)), Lt;
|
|
2207
|
-
}
|
|
2208
|
-
var xr;
|
|
2209
|
-
function ti() {
|
|
2210
|
-
if (xr) return Ne;
|
|
2211
|
-
xr = 1, Object.defineProperty(Ne, "__esModule", { value: !0 });
|
|
2212
|
-
const u = ei();
|
|
2213
|
-
class o {
|
|
2214
|
-
constructor(a = {}) {
|
|
2215
|
-
this._options = a, this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, !0), this.fs = u.createFileSystemAdapter(this._options.fs), this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0);
|
|
2216
|
-
}
|
|
2217
|
-
_getValue(a, n) {
|
|
2218
|
-
return a ?? n;
|
|
2219
|
-
}
|
|
2220
|
-
}
|
|
2221
|
-
return Ne.default = o, Ne;
|
|
2222
|
-
}
|
|
2223
|
-
var Or;
|
|
2224
|
-
function Re() {
|
|
2225
|
-
if (Or) return ge;
|
|
2226
|
-
Or = 1, Object.defineProperty(ge, "__esModule", { value: !0 }), ge.statSync = ge.stat = ge.Settings = void 0;
|
|
2227
|
-
const u = zn(), o = Jn(), f = ti();
|
|
2228
|
-
ge.Settings = f.default;
|
|
2229
|
-
function a(r, t, s) {
|
|
2230
|
-
if (typeof t == "function") {
|
|
2231
|
-
u.read(r, e(), t);
|
|
2232
|
-
return;
|
|
2233
|
-
}
|
|
2234
|
-
u.read(r, e(t), s);
|
|
2235
|
-
}
|
|
2236
|
-
ge.stat = a;
|
|
2237
|
-
function n(r, t) {
|
|
2238
|
-
const s = e(t);
|
|
2239
|
-
return o.read(r, s);
|
|
2240
|
-
}
|
|
2241
|
-
ge.statSync = n;
|
|
2242
|
-
function e(r = {}) {
|
|
2243
|
-
return r instanceof f.default ? r : new f.default(r);
|
|
2244
|
-
}
|
|
2245
|
-
return ge;
|
|
2246
|
-
}
|
|
2247
|
-
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2248
|
-
var kt, wr;
|
|
2249
|
-
function ri() {
|
|
2250
|
-
if (wr) return kt;
|
|
2251
|
-
wr = 1;
|
|
2252
|
-
let u;
|
|
2253
|
-
return kt = typeof queueMicrotask == "function" ? queueMicrotask.bind(typeof window < "u" ? window : Cn) : (o) => (u || (u = Promise.resolve())).then(o).catch((f) => setTimeout(() => {
|
|
2254
|
-
throw f;
|
|
2255
|
-
}, 0)), kt;
|
|
2256
|
-
}
|
|
2257
|
-
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
2258
|
-
var Ht, $r;
|
|
2259
|
-
function ni() {
|
|
2260
|
-
if ($r) return Ht;
|
|
2261
|
-
$r = 1, Ht = o;
|
|
2262
|
-
const u = ri();
|
|
2263
|
-
function o(f, a) {
|
|
2264
|
-
let n, e, r, t = !0;
|
|
2265
|
-
Array.isArray(f) ? (n = [], e = f.length) : (r = Object.keys(f), n = {}, e = r.length);
|
|
2266
|
-
function s(c) {
|
|
2267
|
-
function h() {
|
|
2268
|
-
a && a(c, n), a = null;
|
|
2269
|
-
}
|
|
2270
|
-
t ? u(h) : h();
|
|
2271
|
-
}
|
|
2272
|
-
function i(c, h, l) {
|
|
2273
|
-
n[c] = l, (--e === 0 || h) && s(h);
|
|
2274
|
-
}
|
|
2275
|
-
e ? r ? r.forEach(function(c) {
|
|
2276
|
-
f[c](function(h, l) {
|
|
2277
|
-
i(c, h, l);
|
|
2278
|
-
});
|
|
2279
|
-
}) : f.forEach(function(c, h) {
|
|
2280
|
-
c(function(l, y) {
|
|
2281
|
-
i(h, l, y);
|
|
2282
|
-
});
|
|
2283
|
-
}) : s(null), t = !1;
|
|
2284
|
-
}
|
|
2285
|
-
return Ht;
|
|
2286
|
-
}
|
|
2287
|
-
var xe = {}, Lr;
|
|
2288
|
-
function Sn() {
|
|
2289
|
-
if (Lr) return xe;
|
|
2290
|
-
Lr = 1, Object.defineProperty(xe, "__esModule", { value: !0 }), xe.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
|
|
2291
|
-
const u = process.versions.node.split(".");
|
|
2292
|
-
if (u[0] === void 0 || u[1] === void 0)
|
|
2293
|
-
throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
|
|
2294
|
-
const o = Number.parseInt(u[0], 10), f = Number.parseInt(u[1], 10), a = 10, n = 10, e = o > a, r = o === a && f >= n;
|
|
2295
|
-
return xe.IS_SUPPORT_READDIR_WITH_FILE_TYPES = e || r, xe;
|
|
2296
|
-
}
|
|
2297
|
-
var Oe = {}, we = {}, kr;
|
|
2298
|
-
function ii() {
|
|
2299
|
-
if (kr) return we;
|
|
2300
|
-
kr = 1, Object.defineProperty(we, "__esModule", { value: !0 }), we.createDirentFromStats = void 0;
|
|
2301
|
-
class u {
|
|
2302
|
-
constructor(a, n) {
|
|
2303
|
-
this.name = a, this.isBlockDevice = n.isBlockDevice.bind(n), this.isCharacterDevice = n.isCharacterDevice.bind(n), this.isDirectory = n.isDirectory.bind(n), this.isFIFO = n.isFIFO.bind(n), this.isFile = n.isFile.bind(n), this.isSocket = n.isSocket.bind(n), this.isSymbolicLink = n.isSymbolicLink.bind(n);
|
|
2304
|
-
}
|
|
2305
|
-
}
|
|
2306
|
-
function o(f, a) {
|
|
2307
|
-
return new u(f, a);
|
|
2308
|
-
}
|
|
2309
|
-
return we.createDirentFromStats = o, we;
|
|
2310
|
-
}
|
|
2311
|
-
var Hr;
|
|
2312
|
-
function vn() {
|
|
2313
|
-
if (Hr) return Oe;
|
|
2314
|
-
Hr = 1, Object.defineProperty(Oe, "__esModule", { value: !0 }), Oe.fs = void 0;
|
|
2315
|
-
const u = ii();
|
|
2316
|
-
return Oe.fs = u, Oe;
|
|
2317
|
-
}
|
|
2318
|
-
var $e = {}, Mr;
|
|
2319
|
-
function mn() {
|
|
2320
|
-
if (Mr) return $e;
|
|
2321
|
-
Mr = 1, Object.defineProperty($e, "__esModule", { value: !0 }), $e.joinPathSegments = void 0;
|
|
2322
|
-
function u(o, f, a) {
|
|
2323
|
-
return o.endsWith(a) ? o + f : o + a + f;
|
|
2324
|
-
}
|
|
2325
|
-
return $e.joinPathSegments = u, $e;
|
|
2326
|
-
}
|
|
2327
|
-
var Dr;
|
|
2328
|
-
function si() {
|
|
2329
|
-
if (Dr) return _e;
|
|
2330
|
-
Dr = 1, Object.defineProperty(_e, "__esModule", { value: !0 }), _e.readdir = _e.readdirWithFileTypes = _e.read = void 0;
|
|
2331
|
-
const u = Re(), o = ni(), f = Sn(), a = vn(), n = mn();
|
|
2332
|
-
function e(h, l, y) {
|
|
2333
|
-
if (!l.stats && f.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
|
|
2334
|
-
r(h, l, y);
|
|
2335
|
-
return;
|
|
2336
|
-
}
|
|
2337
|
-
s(h, l, y);
|
|
2338
|
-
}
|
|
2339
|
-
_e.read = e;
|
|
2340
|
-
function r(h, l, y) {
|
|
2341
|
-
l.fs.readdir(h, { withFileTypes: !0 }, (C, P) => {
|
|
2342
|
-
if (C !== null) {
|
|
2343
|
-
i(y, C);
|
|
2344
|
-
return;
|
|
2345
|
-
}
|
|
2346
|
-
const d = P.map((b) => ({
|
|
2347
|
-
dirent: b,
|
|
2348
|
-
name: b.name,
|
|
2349
|
-
path: n.joinPathSegments(h, b.name, l.pathSegmentSeparator)
|
|
2350
|
-
}));
|
|
2351
|
-
if (!l.followSymbolicLinks) {
|
|
2352
|
-
c(y, d);
|
|
2353
|
-
return;
|
|
2354
|
-
}
|
|
2355
|
-
const _ = d.map((b) => t(b, l));
|
|
2356
|
-
o(_, (b, p) => {
|
|
2357
|
-
if (b !== null) {
|
|
2358
|
-
i(y, b);
|
|
2359
|
-
return;
|
|
2360
|
-
}
|
|
2361
|
-
c(y, p);
|
|
2362
|
-
});
|
|
2363
|
-
});
|
|
2364
|
-
}
|
|
2365
|
-
_e.readdirWithFileTypes = r;
|
|
2366
|
-
function t(h, l) {
|
|
2367
|
-
return (y) => {
|
|
2368
|
-
if (!h.dirent.isSymbolicLink()) {
|
|
2369
|
-
y(null, h);
|
|
2370
|
-
return;
|
|
2371
|
-
}
|
|
2372
|
-
l.fs.stat(h.path, (C, P) => {
|
|
2373
|
-
if (C !== null) {
|
|
2374
|
-
if (l.throwErrorOnBrokenSymbolicLink) {
|
|
2375
|
-
y(C);
|
|
2376
|
-
return;
|
|
2377
|
-
}
|
|
2378
|
-
y(null, h);
|
|
2379
|
-
return;
|
|
2380
|
-
}
|
|
2381
|
-
h.dirent = a.fs.createDirentFromStats(h.name, P), y(null, h);
|
|
2382
|
-
});
|
|
2383
|
-
};
|
|
2384
|
-
}
|
|
2385
|
-
function s(h, l, y) {
|
|
2386
|
-
l.fs.readdir(h, (C, P) => {
|
|
2387
|
-
if (C !== null) {
|
|
2388
|
-
i(y, C);
|
|
2389
|
-
return;
|
|
2390
|
-
}
|
|
2391
|
-
const d = P.map((_) => {
|
|
2392
|
-
const b = n.joinPathSegments(h, _, l.pathSegmentSeparator);
|
|
2393
|
-
return (p) => {
|
|
2394
|
-
u.stat(b, l.fsStatSettings, (A, S) => {
|
|
2395
|
-
if (A !== null) {
|
|
2396
|
-
p(A);
|
|
2397
|
-
return;
|
|
2398
|
-
}
|
|
2399
|
-
const T = {
|
|
2400
|
-
name: _,
|
|
2401
|
-
path: b,
|
|
2402
|
-
dirent: a.fs.createDirentFromStats(_, S)
|
|
2403
|
-
};
|
|
2404
|
-
l.stats && (T.stats = S), p(null, T);
|
|
2405
|
-
});
|
|
2406
|
-
};
|
|
2407
|
-
});
|
|
2408
|
-
o(d, (_, b) => {
|
|
2409
|
-
if (_ !== null) {
|
|
2410
|
-
i(y, _);
|
|
2411
|
-
return;
|
|
2412
|
-
}
|
|
2413
|
-
c(y, b);
|
|
2414
|
-
});
|
|
2415
|
-
});
|
|
2416
|
-
}
|
|
2417
|
-
_e.readdir = s;
|
|
2418
|
-
function i(h, l) {
|
|
2419
|
-
h(l);
|
|
2420
|
-
}
|
|
2421
|
-
function c(h, l) {
|
|
2422
|
-
h(null, l);
|
|
2423
|
-
}
|
|
2424
|
-
return _e;
|
|
2425
|
-
}
|
|
2426
|
-
var ye = {}, qr;
|
|
2427
|
-
function ai() {
|
|
2428
|
-
if (qr) return ye;
|
|
2429
|
-
qr = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.readdir = ye.readdirWithFileTypes = ye.read = void 0;
|
|
2430
|
-
const u = Re(), o = Sn(), f = vn(), a = mn();
|
|
2431
|
-
function n(t, s) {
|
|
2432
|
-
return !s.stats && o.IS_SUPPORT_READDIR_WITH_FILE_TYPES ? e(t, s) : r(t, s);
|
|
2433
|
-
}
|
|
2434
|
-
ye.read = n;
|
|
2435
|
-
function e(t, s) {
|
|
2436
|
-
return s.fs.readdirSync(t, { withFileTypes: !0 }).map((c) => {
|
|
2437
|
-
const h = {
|
|
2438
|
-
dirent: c,
|
|
2439
|
-
name: c.name,
|
|
2440
|
-
path: a.joinPathSegments(t, c.name, s.pathSegmentSeparator)
|
|
2441
|
-
};
|
|
2442
|
-
if (h.dirent.isSymbolicLink() && s.followSymbolicLinks)
|
|
2443
|
-
try {
|
|
2444
|
-
const l = s.fs.statSync(h.path);
|
|
2445
|
-
h.dirent = f.fs.createDirentFromStats(h.name, l);
|
|
2446
|
-
} catch (l) {
|
|
2447
|
-
if (s.throwErrorOnBrokenSymbolicLink)
|
|
2448
|
-
throw l;
|
|
2449
|
-
}
|
|
2450
|
-
return h;
|
|
2451
|
-
});
|
|
2452
|
-
}
|
|
2453
|
-
ye.readdirWithFileTypes = e;
|
|
2454
|
-
function r(t, s) {
|
|
2455
|
-
return s.fs.readdirSync(t).map((c) => {
|
|
2456
|
-
const h = a.joinPathSegments(t, c, s.pathSegmentSeparator), l = u.statSync(h, s.fsStatSettings), y = {
|
|
2457
|
-
name: c,
|
|
2458
|
-
path: h,
|
|
2459
|
-
dirent: f.fs.createDirentFromStats(c, l)
|
|
2460
|
-
};
|
|
2461
|
-
return s.stats && (y.stats = l), y;
|
|
2462
|
-
});
|
|
2463
|
-
}
|
|
2464
|
-
return ye.readdir = r, ye;
|
|
2465
|
-
}
|
|
2466
|
-
var Ie = {}, Mt = {}, Nr;
|
|
2467
|
-
function oi() {
|
|
2468
|
-
return Nr || (Nr = 1, (function(u) {
|
|
2469
|
-
Object.defineProperty(u, "__esModule", { value: !0 }), u.createFileSystemAdapter = u.FILE_SYSTEM_ADAPTER = void 0;
|
|
2470
|
-
const o = Ft;
|
|
2471
|
-
u.FILE_SYSTEM_ADAPTER = {
|
|
2472
|
-
lstat: o.lstat,
|
|
2473
|
-
stat: o.stat,
|
|
2474
|
-
lstatSync: o.lstatSync,
|
|
2475
|
-
statSync: o.statSync,
|
|
2476
|
-
readdir: o.readdir,
|
|
2477
|
-
readdirSync: o.readdirSync
|
|
2478
|
-
};
|
|
2479
|
-
function f(a) {
|
|
2480
|
-
return a === void 0 ? u.FILE_SYSTEM_ADAPTER : Object.assign(Object.assign({}, u.FILE_SYSTEM_ADAPTER), a);
|
|
2481
|
-
}
|
|
2482
|
-
u.createFileSystemAdapter = f;
|
|
2483
|
-
})(Mt)), Mt;
|
|
2484
|
-
}
|
|
2485
|
-
var Ir;
|
|
2486
|
-
function ui() {
|
|
2487
|
-
if (Ir) return Ie;
|
|
2488
|
-
Ir = 1, Object.defineProperty(Ie, "__esModule", { value: !0 });
|
|
2489
|
-
const u = he, o = Re(), f = oi();
|
|
2490
|
-
class a {
|
|
2491
|
-
constructor(e = {}) {
|
|
2492
|
-
this._options = e, this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !1), this.fs = f.createFileSystemAdapter(this._options.fs), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, u.sep), this.stats = this._getValue(this._options.stats, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !0), this.fsStatSettings = new o.Settings({
|
|
2493
|
-
followSymbolicLink: this.followSymbolicLinks,
|
|
2494
|
-
fs: this.fs,
|
|
2495
|
-
throwErrorOnBrokenSymbolicLink: this.throwErrorOnBrokenSymbolicLink
|
|
2496
|
-
});
|
|
2497
|
-
}
|
|
2498
|
-
_getValue(e, r) {
|
|
2499
|
-
return e ?? r;
|
|
2500
|
-
}
|
|
2501
|
-
}
|
|
2502
|
-
return Ie.default = a, Ie;
|
|
2503
|
-
}
|
|
2504
|
-
var Fr;
|
|
2505
|
-
function Gt() {
|
|
2506
|
-
if (Fr) return de;
|
|
2507
|
-
Fr = 1, Object.defineProperty(de, "__esModule", { value: !0 }), de.Settings = de.scandirSync = de.scandir = void 0;
|
|
2508
|
-
const u = si(), o = ai(), f = ui();
|
|
2509
|
-
de.Settings = f.default;
|
|
2510
|
-
function a(r, t, s) {
|
|
2511
|
-
if (typeof t == "function") {
|
|
2512
|
-
u.read(r, e(), t);
|
|
2513
|
-
return;
|
|
2514
|
-
}
|
|
2515
|
-
u.read(r, e(t), s);
|
|
2516
|
-
}
|
|
2517
|
-
de.scandir = a;
|
|
2518
|
-
function n(r, t) {
|
|
2519
|
-
const s = e(t);
|
|
2520
|
-
return o.read(r, s);
|
|
2521
|
-
}
|
|
2522
|
-
de.scandirSync = n;
|
|
2523
|
-
function e(r = {}) {
|
|
2524
|
-
return r instanceof f.default ? r : new f.default(r);
|
|
2525
|
-
}
|
|
2526
|
-
return de;
|
|
2527
|
-
}
|
|
2528
|
-
var Fe = { exports: {} }, Dt, Br;
|
|
2529
|
-
function ci() {
|
|
2530
|
-
if (Br) return Dt;
|
|
2531
|
-
Br = 1;
|
|
2532
|
-
function u(o) {
|
|
2533
|
-
var f = new o(), a = f;
|
|
2534
|
-
function n() {
|
|
2535
|
-
var r = f;
|
|
2536
|
-
return r.next ? f = r.next : (f = new o(), a = f), r.next = null, r;
|
|
2537
|
-
}
|
|
2538
|
-
function e(r) {
|
|
2539
|
-
a.next = r, a = r;
|
|
2540
|
-
}
|
|
2541
|
-
return {
|
|
2542
|
-
get: n,
|
|
2543
|
-
release: e
|
|
2544
|
-
};
|
|
2545
|
-
}
|
|
2546
|
-
return Dt = u, Dt;
|
|
2547
|
-
}
|
|
2548
|
-
var jr;
|
|
2549
|
-
function li() {
|
|
2550
|
-
if (jr) return Fe.exports;
|
|
2551
|
-
jr = 1;
|
|
2552
|
-
var u = ci();
|
|
2553
|
-
function o(e, r, t) {
|
|
2554
|
-
if (typeof e == "function" && (t = r, r = e, e = null), !(t >= 1))
|
|
2555
|
-
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2556
|
-
var s = u(a), i = null, c = null, h = 0, l = null, y = {
|
|
2557
|
-
push: A,
|
|
2558
|
-
drain: f,
|
|
2559
|
-
saturated: f,
|
|
2560
|
-
pause: P,
|
|
2561
|
-
paused: !1,
|
|
2562
|
-
get concurrency() {
|
|
2563
|
-
return t;
|
|
2564
|
-
},
|
|
2565
|
-
set concurrency(w) {
|
|
2566
|
-
if (!(w >= 1))
|
|
2567
|
-
throw new Error("fastqueue concurrency must be equal to or greater than 1");
|
|
2568
|
-
if (t = w, !y.paused)
|
|
2569
|
-
for (; i && h < t; )
|
|
2570
|
-
h++, T();
|
|
2571
|
-
},
|
|
2572
|
-
running: C,
|
|
2573
|
-
resume: b,
|
|
2574
|
-
idle: p,
|
|
2575
|
-
length: d,
|
|
2576
|
-
getQueue: _,
|
|
2577
|
-
unshift: S,
|
|
2578
|
-
empty: f,
|
|
2579
|
-
kill: m,
|
|
2580
|
-
killAndDrain: L,
|
|
2581
|
-
error: D,
|
|
2582
|
-
abort: k
|
|
2583
|
-
};
|
|
2584
|
-
return y;
|
|
2585
|
-
function C() {
|
|
2586
|
-
return h;
|
|
2587
|
-
}
|
|
2588
|
-
function P() {
|
|
2589
|
-
y.paused = !0;
|
|
2590
|
-
}
|
|
2591
|
-
function d() {
|
|
2592
|
-
for (var w = i, H = 0; w; )
|
|
2593
|
-
w = w.next, H++;
|
|
2594
|
-
return H;
|
|
2595
|
-
}
|
|
2596
|
-
function _() {
|
|
2597
|
-
for (var w = i, H = []; w; )
|
|
2598
|
-
H.push(w.value), w = w.next;
|
|
2599
|
-
return H;
|
|
2600
|
-
}
|
|
2601
|
-
function b() {
|
|
2602
|
-
if (y.paused) {
|
|
2603
|
-
if (y.paused = !1, i === null) {
|
|
2604
|
-
h++, T();
|
|
2605
|
-
return;
|
|
2606
|
-
}
|
|
2607
|
-
for (; i && h < t; )
|
|
2608
|
-
h++, T();
|
|
2609
|
-
}
|
|
2610
|
-
}
|
|
2611
|
-
function p() {
|
|
2612
|
-
return h === 0 && y.length() === 0;
|
|
2613
|
-
}
|
|
2614
|
-
function A(w, H) {
|
|
2615
|
-
var R = s.get();
|
|
2616
|
-
R.context = e, R.release = T, R.value = w, R.callback = H || f, R.errorHandler = l, h >= t || y.paused ? c ? (c.next = R, c = R) : (i = R, c = R, y.saturated()) : (h++, r.call(e, R.value, R.worked));
|
|
2617
|
-
}
|
|
2618
|
-
function S(w, H) {
|
|
2619
|
-
var R = s.get();
|
|
2620
|
-
R.context = e, R.release = T, R.value = w, R.callback = H || f, R.errorHandler = l, h >= t || y.paused ? i ? (R.next = i, i = R) : (i = R, c = R, y.saturated()) : (h++, r.call(e, R.value, R.worked));
|
|
2621
|
-
}
|
|
2622
|
-
function T(w) {
|
|
2623
|
-
w && s.release(w);
|
|
2624
|
-
var H = i;
|
|
2625
|
-
H && h <= t ? y.paused ? h-- : (c === i && (c = null), i = H.next, H.next = null, r.call(e, H.value, H.worked), c === null && y.empty()) : --h === 0 && y.drain();
|
|
2626
|
-
}
|
|
2627
|
-
function m() {
|
|
2628
|
-
i = null, c = null, y.drain = f;
|
|
2629
|
-
}
|
|
2630
|
-
function L() {
|
|
2631
|
-
i = null, c = null, y.drain(), y.drain = f;
|
|
2632
|
-
}
|
|
2633
|
-
function k() {
|
|
2634
|
-
var w = i;
|
|
2635
|
-
for (i = null, c = null; w; ) {
|
|
2636
|
-
var H = w.next, R = w.callback, j = w.errorHandler, I = w.value, F = w.context;
|
|
2637
|
-
w.value = null, w.callback = f, w.errorHandler = null, j && j(new Error("abort"), I), R.call(F, new Error("abort")), w.release(w), w = H;
|
|
2638
|
-
}
|
|
2639
|
-
y.drain = f;
|
|
2640
|
-
}
|
|
2641
|
-
function D(w) {
|
|
2642
|
-
l = w;
|
|
2643
|
-
}
|
|
2644
|
-
}
|
|
2645
|
-
function f() {
|
|
2646
|
-
}
|
|
2647
|
-
function a() {
|
|
2648
|
-
this.value = null, this.callback = f, this.next = null, this.release = f, this.context = null, this.errorHandler = null;
|
|
2649
|
-
var e = this;
|
|
2650
|
-
this.worked = function(t, s) {
|
|
2651
|
-
var i = e.callback, c = e.errorHandler, h = e.value;
|
|
2652
|
-
e.value = null, e.callback = f, e.errorHandler && c(t, h), i.call(e.context, t, s), e.release(e);
|
|
2653
|
-
};
|
|
2654
|
-
}
|
|
2655
|
-
function n(e, r, t) {
|
|
2656
|
-
typeof e == "function" && (t = r, r = e, e = null);
|
|
2657
|
-
function s(P, d) {
|
|
2658
|
-
r.call(this, P).then(function(_) {
|
|
2659
|
-
d(null, _);
|
|
2660
|
-
}, d);
|
|
2661
|
-
}
|
|
2662
|
-
var i = o(e, s, t), c = i.push, h = i.unshift;
|
|
2663
|
-
return i.push = l, i.unshift = y, i.drained = C, i;
|
|
2664
|
-
function l(P) {
|
|
2665
|
-
var d = new Promise(function(_, b) {
|
|
2666
|
-
c(P, function(p, A) {
|
|
2667
|
-
if (p) {
|
|
2668
|
-
b(p);
|
|
2669
|
-
return;
|
|
2670
|
-
}
|
|
2671
|
-
_(A);
|
|
2672
|
-
});
|
|
2673
|
-
});
|
|
2674
|
-
return d.catch(f), d;
|
|
2675
|
-
}
|
|
2676
|
-
function y(P) {
|
|
2677
|
-
var d = new Promise(function(_, b) {
|
|
2678
|
-
h(P, function(p, A) {
|
|
2679
|
-
if (p) {
|
|
2680
|
-
b(p);
|
|
2681
|
-
return;
|
|
2682
|
-
}
|
|
2683
|
-
_(A);
|
|
2684
|
-
});
|
|
2685
|
-
});
|
|
2686
|
-
return d.catch(f), d;
|
|
2687
|
-
}
|
|
2688
|
-
function C() {
|
|
2689
|
-
var P = new Promise(function(d) {
|
|
2690
|
-
process.nextTick(function() {
|
|
2691
|
-
if (i.idle())
|
|
2692
|
-
d();
|
|
2693
|
-
else {
|
|
2694
|
-
var _ = i.drain;
|
|
2695
|
-
i.drain = function() {
|
|
2696
|
-
typeof _ == "function" && _(), d(), i.drain = _;
|
|
2697
|
-
};
|
|
2698
|
-
}
|
|
2699
|
-
});
|
|
2700
|
-
});
|
|
2701
|
-
return P;
|
|
2702
|
-
}
|
|
2703
|
-
}
|
|
2704
|
-
return Fe.exports = o, Fe.exports.promise = n, Fe.exports;
|
|
2705
|
-
}
|
|
2706
|
-
var fe = {}, Gr;
|
|
2707
|
-
function Ut() {
|
|
2708
|
-
if (Gr) return fe;
|
|
2709
|
-
Gr = 1, Object.defineProperty(fe, "__esModule", { value: !0 }), fe.joinPathSegments = fe.replacePathSegmentSeparator = fe.isAppliedFilter = fe.isFatalError = void 0;
|
|
2710
|
-
function u(n, e) {
|
|
2711
|
-
return n.errorFilter === null ? !0 : !n.errorFilter(e);
|
|
2712
|
-
}
|
|
2713
|
-
fe.isFatalError = u;
|
|
2714
|
-
function o(n, e) {
|
|
2715
|
-
return n === null || n(e);
|
|
2716
|
-
}
|
|
2717
|
-
fe.isAppliedFilter = o;
|
|
2718
|
-
function f(n, e) {
|
|
2719
|
-
return n.split(/[/\\]/).join(e);
|
|
2720
|
-
}
|
|
2721
|
-
fe.replacePathSegmentSeparator = f;
|
|
2722
|
-
function a(n, e, r) {
|
|
2723
|
-
return n === "" ? e : n.endsWith(r) ? n + e : n + r + e;
|
|
2724
|
-
}
|
|
2725
|
-
return fe.joinPathSegments = a, fe;
|
|
2726
|
-
}
|
|
2727
|
-
var Be = {}, Ur;
|
|
2728
|
-
function Rn() {
|
|
2729
|
-
if (Ur) return Be;
|
|
2730
|
-
Ur = 1, Object.defineProperty(Be, "__esModule", { value: !0 });
|
|
2731
|
-
const u = Ut();
|
|
2732
|
-
class o {
|
|
2733
|
-
constructor(a, n) {
|
|
2734
|
-
this._root = a, this._settings = n, this._root = u.replacePathSegmentSeparator(a, n.pathSegmentSeparator);
|
|
2735
|
-
}
|
|
2736
|
-
}
|
|
2737
|
-
return Be.default = o, Be;
|
|
2738
|
-
}
|
|
2739
|
-
var Wr;
|
|
2740
|
-
function En() {
|
|
2741
|
-
if (Wr) return qe;
|
|
2742
|
-
Wr = 1, Object.defineProperty(qe, "__esModule", { value: !0 });
|
|
2743
|
-
const u = bn, o = Gt(), f = li(), a = Ut(), n = Rn();
|
|
2744
|
-
class e extends n.default {
|
|
2745
|
-
constructor(t, s) {
|
|
2746
|
-
super(t, s), this._settings = s, this._scandir = o.scandir, this._emitter = new u.EventEmitter(), this._queue = f(this._worker.bind(this), this._settings.concurrency), this._isFatalError = !1, this._isDestroyed = !1, this._queue.drain = () => {
|
|
2747
|
-
this._isFatalError || this._emitter.emit("end");
|
|
2748
|
-
};
|
|
2749
|
-
}
|
|
2750
|
-
read() {
|
|
2751
|
-
return this._isFatalError = !1, this._isDestroyed = !1, setImmediate(() => {
|
|
2752
|
-
this._pushToQueue(this._root, this._settings.basePath);
|
|
2753
|
-
}), this._emitter;
|
|
2754
|
-
}
|
|
2755
|
-
get isDestroyed() {
|
|
2756
|
-
return this._isDestroyed;
|
|
2757
|
-
}
|
|
2758
|
-
destroy() {
|
|
2759
|
-
if (this._isDestroyed)
|
|
2760
|
-
throw new Error("The reader is already destroyed");
|
|
2761
|
-
this._isDestroyed = !0, this._queue.killAndDrain();
|
|
2762
|
-
}
|
|
2763
|
-
onEntry(t) {
|
|
2764
|
-
this._emitter.on("entry", t);
|
|
2765
|
-
}
|
|
2766
|
-
onError(t) {
|
|
2767
|
-
this._emitter.once("error", t);
|
|
2768
|
-
}
|
|
2769
|
-
onEnd(t) {
|
|
2770
|
-
this._emitter.once("end", t);
|
|
2771
|
-
}
|
|
2772
|
-
_pushToQueue(t, s) {
|
|
2773
|
-
const i = { directory: t, base: s };
|
|
2774
|
-
this._queue.push(i, (c) => {
|
|
2775
|
-
c !== null && this._handleError(c);
|
|
2776
|
-
});
|
|
2777
|
-
}
|
|
2778
|
-
_worker(t, s) {
|
|
2779
|
-
this._scandir(t.directory, this._settings.fsScandirSettings, (i, c) => {
|
|
2780
|
-
if (i !== null) {
|
|
2781
|
-
s(i, void 0);
|
|
2782
|
-
return;
|
|
2783
|
-
}
|
|
2784
|
-
for (const h of c)
|
|
2785
|
-
this._handleEntry(h, t.base);
|
|
2786
|
-
s(null, void 0);
|
|
2787
|
-
});
|
|
2788
|
-
}
|
|
2789
|
-
_handleError(t) {
|
|
2790
|
-
this._isDestroyed || !a.isFatalError(this._settings, t) || (this._isFatalError = !0, this._isDestroyed = !0, this._emitter.emit("error", t));
|
|
2791
|
-
}
|
|
2792
|
-
_handleEntry(t, s) {
|
|
2793
|
-
if (this._isDestroyed || this._isFatalError)
|
|
2794
|
-
return;
|
|
2795
|
-
const i = t.path;
|
|
2796
|
-
s !== void 0 && (t.path = a.joinPathSegments(s, t.name, this._settings.pathSegmentSeparator)), a.isAppliedFilter(this._settings.entryFilter, t) && this._emitEntry(t), t.dirent.isDirectory() && a.isAppliedFilter(this._settings.deepFilter, t) && this._pushToQueue(i, s === void 0 ? void 0 : t.path);
|
|
2797
|
-
}
|
|
2798
|
-
_emitEntry(t) {
|
|
2799
|
-
this._emitter.emit("entry", t);
|
|
2800
|
-
}
|
|
2801
|
-
}
|
|
2802
|
-
return qe.default = e, qe;
|
|
2803
|
-
}
|
|
2804
|
-
var Vr;
|
|
2805
|
-
function fi() {
|
|
2806
|
-
if (Vr) return De;
|
|
2807
|
-
Vr = 1, Object.defineProperty(De, "__esModule", { value: !0 });
|
|
2808
|
-
const u = En();
|
|
2809
|
-
class o {
|
|
2810
|
-
constructor(e, r) {
|
|
2811
|
-
this._root = e, this._settings = r, this._reader = new u.default(this._root, this._settings), this._storage = [];
|
|
2812
|
-
}
|
|
2813
|
-
read(e) {
|
|
2814
|
-
this._reader.onError((r) => {
|
|
2815
|
-
f(e, r);
|
|
2816
|
-
}), this._reader.onEntry((r) => {
|
|
2817
|
-
this._storage.push(r);
|
|
2818
|
-
}), this._reader.onEnd(() => {
|
|
2819
|
-
a(e, this._storage);
|
|
2820
|
-
}), this._reader.read();
|
|
2821
|
-
}
|
|
2822
|
-
}
|
|
2823
|
-
De.default = o;
|
|
2824
|
-
function f(n, e) {
|
|
2825
|
-
n(e);
|
|
2826
|
-
}
|
|
2827
|
-
function a(n, e) {
|
|
2828
|
-
n(null, e);
|
|
2829
|
-
}
|
|
2830
|
-
return De;
|
|
2831
|
-
}
|
|
2832
|
-
var je = {}, Kr;
|
|
2833
|
-
function hi() {
|
|
2834
|
-
if (Kr) return je;
|
|
2835
|
-
Kr = 1, Object.defineProperty(je, "__esModule", { value: !0 });
|
|
2836
|
-
const u = it, o = En();
|
|
2837
|
-
class f {
|
|
2838
|
-
constructor(n, e) {
|
|
2839
|
-
this._root = n, this._settings = e, this._reader = new o.default(this._root, this._settings), this._stream = new u.Readable({
|
|
2840
|
-
objectMode: !0,
|
|
2841
|
-
read: () => {
|
|
2842
|
-
},
|
|
2843
|
-
destroy: () => {
|
|
2844
|
-
this._reader.isDestroyed || this._reader.destroy();
|
|
2845
|
-
}
|
|
2846
|
-
});
|
|
2847
|
-
}
|
|
2848
|
-
read() {
|
|
2849
|
-
return this._reader.onError((n) => {
|
|
2850
|
-
this._stream.emit("error", n);
|
|
2851
|
-
}), this._reader.onEntry((n) => {
|
|
2852
|
-
this._stream.push(n);
|
|
2853
|
-
}), this._reader.onEnd(() => {
|
|
2854
|
-
this._stream.push(null);
|
|
2855
|
-
}), this._reader.read(), this._stream;
|
|
2856
|
-
}
|
|
2857
|
-
}
|
|
2858
|
-
return je.default = f, je;
|
|
2859
|
-
}
|
|
2860
|
-
var Ge = {}, Ue = {}, Qr;
|
|
2861
|
-
function pi() {
|
|
2862
|
-
if (Qr) return Ue;
|
|
2863
|
-
Qr = 1, Object.defineProperty(Ue, "__esModule", { value: !0 });
|
|
2864
|
-
const u = Gt(), o = Ut(), f = Rn();
|
|
2865
|
-
class a extends f.default {
|
|
2866
|
-
constructor() {
|
|
2867
|
-
super(...arguments), this._scandir = u.scandirSync, this._storage = [], this._queue = /* @__PURE__ */ new Set();
|
|
2868
|
-
}
|
|
2869
|
-
read() {
|
|
2870
|
-
return this._pushToQueue(this._root, this._settings.basePath), this._handleQueue(), this._storage;
|
|
2871
|
-
}
|
|
2872
|
-
_pushToQueue(e, r) {
|
|
2873
|
-
this._queue.add({ directory: e, base: r });
|
|
2874
|
-
}
|
|
2875
|
-
_handleQueue() {
|
|
2876
|
-
for (const e of this._queue.values())
|
|
2877
|
-
this._handleDirectory(e.directory, e.base);
|
|
2878
|
-
}
|
|
2879
|
-
_handleDirectory(e, r) {
|
|
2880
|
-
try {
|
|
2881
|
-
const t = this._scandir(e, this._settings.fsScandirSettings);
|
|
2882
|
-
for (const s of t)
|
|
2883
|
-
this._handleEntry(s, r);
|
|
2884
|
-
} catch (t) {
|
|
2885
|
-
this._handleError(t);
|
|
2886
|
-
}
|
|
2887
|
-
}
|
|
2888
|
-
_handleError(e) {
|
|
2889
|
-
if (o.isFatalError(this._settings, e))
|
|
2890
|
-
throw e;
|
|
2891
|
-
}
|
|
2892
|
-
_handleEntry(e, r) {
|
|
2893
|
-
const t = e.path;
|
|
2894
|
-
r !== void 0 && (e.path = o.joinPathSegments(r, e.name, this._settings.pathSegmentSeparator)), o.isAppliedFilter(this._settings.entryFilter, e) && this._pushToStorage(e), e.dirent.isDirectory() && o.isAppliedFilter(this._settings.deepFilter, e) && this._pushToQueue(t, r === void 0 ? void 0 : e.path);
|
|
2895
|
-
}
|
|
2896
|
-
_pushToStorage(e) {
|
|
2897
|
-
this._storage.push(e);
|
|
2898
|
-
}
|
|
2899
|
-
}
|
|
2900
|
-
return Ue.default = a, Ue;
|
|
2901
|
-
}
|
|
2902
|
-
var Yr;
|
|
2903
|
-
function di() {
|
|
2904
|
-
if (Yr) return Ge;
|
|
2905
|
-
Yr = 1, Object.defineProperty(Ge, "__esModule", { value: !0 });
|
|
2906
|
-
const u = pi();
|
|
2907
|
-
class o {
|
|
2908
|
-
constructor(a, n) {
|
|
2909
|
-
this._root = a, this._settings = n, this._reader = new u.default(this._root, this._settings);
|
|
2910
|
-
}
|
|
2911
|
-
read() {
|
|
2912
|
-
return this._reader.read();
|
|
2913
|
-
}
|
|
2914
|
-
}
|
|
2915
|
-
return Ge.default = o, Ge;
|
|
2916
|
-
}
|
|
2917
|
-
var We = {}, Xr;
|
|
2918
|
-
function _i() {
|
|
2919
|
-
if (Xr) return We;
|
|
2920
|
-
Xr = 1, Object.defineProperty(We, "__esModule", { value: !0 });
|
|
2921
|
-
const u = he, o = Gt();
|
|
2922
|
-
class f {
|
|
2923
|
-
constructor(n = {}) {
|
|
2924
|
-
this._options = n, this.basePath = this._getValue(this._options.basePath, void 0), this.concurrency = this._getValue(this._options.concurrency, Number.POSITIVE_INFINITY), this.deepFilter = this._getValue(this._options.deepFilter, null), this.entryFilter = this._getValue(this._options.entryFilter, null), this.errorFilter = this._getValue(this._options.errorFilter, null), this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, u.sep), this.fsScandirSettings = new o.Settings({
|
|
2925
|
-
followSymbolicLinks: this._options.followSymbolicLinks,
|
|
2926
|
-
fs: this._options.fs,
|
|
2927
|
-
pathSegmentSeparator: this._options.pathSegmentSeparator,
|
|
2928
|
-
stats: this._options.stats,
|
|
2929
|
-
throwErrorOnBrokenSymbolicLink: this._options.throwErrorOnBrokenSymbolicLink
|
|
2930
|
-
});
|
|
2931
|
-
}
|
|
2932
|
-
_getValue(n, e) {
|
|
2933
|
-
return n ?? e;
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
return We.default = f, We;
|
|
2937
|
-
}
|
|
2938
|
-
var Zr;
|
|
2939
|
-
function Wt() {
|
|
2940
|
-
if (Zr) return le;
|
|
2941
|
-
Zr = 1, Object.defineProperty(le, "__esModule", { value: !0 }), le.Settings = le.walkStream = le.walkSync = le.walk = void 0;
|
|
2942
|
-
const u = fi(), o = hi(), f = di(), a = _i();
|
|
2943
|
-
le.Settings = a.default;
|
|
2944
|
-
function n(s, i, c) {
|
|
2945
|
-
if (typeof i == "function") {
|
|
2946
|
-
new u.default(s, t()).read(i);
|
|
2947
|
-
return;
|
|
2948
|
-
}
|
|
2949
|
-
new u.default(s, t(i)).read(c);
|
|
2950
|
-
}
|
|
2951
|
-
le.walk = n;
|
|
2952
|
-
function e(s, i) {
|
|
2953
|
-
const c = t(i);
|
|
2954
|
-
return new f.default(s, c).read();
|
|
2955
|
-
}
|
|
2956
|
-
le.walkSync = e;
|
|
2957
|
-
function r(s, i) {
|
|
2958
|
-
const c = t(i);
|
|
2959
|
-
return new o.default(s, c).read();
|
|
2960
|
-
}
|
|
2961
|
-
le.walkStream = r;
|
|
2962
|
-
function t(s = {}) {
|
|
2963
|
-
return s instanceof a.default ? s : new a.default(s);
|
|
2964
|
-
}
|
|
2965
|
-
return le;
|
|
2966
|
-
}
|
|
2967
|
-
var Ve = {}, zr;
|
|
2968
|
-
function Vt() {
|
|
2969
|
-
if (zr) return Ve;
|
|
2970
|
-
zr = 1, Object.defineProperty(Ve, "__esModule", { value: !0 });
|
|
2971
|
-
const u = he, o = Re(), f = Se();
|
|
2972
|
-
class a {
|
|
2973
|
-
constructor(e) {
|
|
2974
|
-
this._settings = e, this._fsStatSettings = new o.Settings({
|
|
2975
|
-
followSymbolicLink: this._settings.followSymbolicLinks,
|
|
2976
|
-
fs: this._settings.fs,
|
|
2977
|
-
throwErrorOnBrokenSymbolicLink: this._settings.followSymbolicLinks
|
|
2978
|
-
});
|
|
2979
|
-
}
|
|
2980
|
-
_getFullEntryPath(e) {
|
|
2981
|
-
return u.resolve(this._settings.cwd, e);
|
|
2982
|
-
}
|
|
2983
|
-
_makeEntry(e, r) {
|
|
2984
|
-
const t = {
|
|
2985
|
-
name: r,
|
|
2986
|
-
path: r,
|
|
2987
|
-
dirent: f.fs.createDirentFromStats(r, e)
|
|
2988
|
-
};
|
|
2989
|
-
return this._settings.stats && (t.stats = e), t;
|
|
2990
|
-
}
|
|
2991
|
-
_isFatalError(e) {
|
|
2992
|
-
return !f.errno.isEnoentCodeError(e) && !this._settings.suppressErrors;
|
|
2993
|
-
}
|
|
2994
|
-
}
|
|
2995
|
-
return Ve.default = a, Ve;
|
|
2996
|
-
}
|
|
2997
|
-
var Ke = {}, Jr;
|
|
2998
|
-
function An() {
|
|
2999
|
-
if (Jr) return Ke;
|
|
3000
|
-
Jr = 1, Object.defineProperty(Ke, "__esModule", { value: !0 });
|
|
3001
|
-
const u = it, o = Re(), f = Wt(), a = Vt();
|
|
3002
|
-
class n extends a.default {
|
|
3003
|
-
constructor() {
|
|
3004
|
-
super(...arguments), this._walkStream = f.walkStream, this._stat = o.stat;
|
|
3005
|
-
}
|
|
3006
|
-
dynamic(r, t) {
|
|
3007
|
-
return this._walkStream(r, t);
|
|
3008
|
-
}
|
|
3009
|
-
static(r, t) {
|
|
3010
|
-
const s = r.map(this._getFullEntryPath, this), i = new u.PassThrough({ objectMode: !0 });
|
|
3011
|
-
i._write = (c, h, l) => this._getEntry(s[c], r[c], t).then((y) => {
|
|
3012
|
-
y !== null && t.entryFilter(y) && i.push(y), c === s.length - 1 && i.end(), l();
|
|
3013
|
-
}).catch(l);
|
|
3014
|
-
for (let c = 0; c < s.length; c++)
|
|
3015
|
-
i.write(c);
|
|
3016
|
-
return i;
|
|
3017
|
-
}
|
|
3018
|
-
_getEntry(r, t, s) {
|
|
3019
|
-
return this._getStat(r).then((i) => this._makeEntry(i, t)).catch((i) => {
|
|
3020
|
-
if (s.errorFilter(i))
|
|
3021
|
-
return null;
|
|
3022
|
-
throw i;
|
|
3023
|
-
});
|
|
3024
|
-
}
|
|
3025
|
-
_getStat(r) {
|
|
3026
|
-
return new Promise((t, s) => {
|
|
3027
|
-
this._stat(r, this._fsStatSettings, (i, c) => i === null ? t(c) : s(i));
|
|
3028
|
-
});
|
|
3029
|
-
}
|
|
3030
|
-
}
|
|
3031
|
-
return Ke.default = n, Ke;
|
|
3032
|
-
}
|
|
3033
|
-
var en;
|
|
3034
|
-
function gi() {
|
|
3035
|
-
if (en) return Me;
|
|
3036
|
-
en = 1, Object.defineProperty(Me, "__esModule", { value: !0 });
|
|
3037
|
-
const u = Wt(), o = Vt(), f = An();
|
|
3038
|
-
class a extends o.default {
|
|
3039
|
-
constructor() {
|
|
3040
|
-
super(...arguments), this._walkAsync = u.walk, this._readerStream = new f.default(this._settings);
|
|
3041
|
-
}
|
|
3042
|
-
dynamic(e, r) {
|
|
3043
|
-
return new Promise((t, s) => {
|
|
3044
|
-
this._walkAsync(e, r, (i, c) => {
|
|
3045
|
-
i === null ? t(c) : s(i);
|
|
3046
|
-
});
|
|
3047
|
-
});
|
|
3048
|
-
}
|
|
3049
|
-
async static(e, r) {
|
|
3050
|
-
const t = [], s = this._readerStream.static(e, r);
|
|
3051
|
-
return new Promise((i, c) => {
|
|
3052
|
-
s.once("error", c), s.on("data", (h) => t.push(h)), s.once("end", () => i(t));
|
|
3053
|
-
});
|
|
3054
|
-
}
|
|
3055
|
-
}
|
|
3056
|
-
return Me.default = a, Me;
|
|
3057
|
-
}
|
|
3058
|
-
var Qe = {}, Ye = {}, Xe = {}, Ze = {}, tn;
|
|
3059
|
-
function yi() {
|
|
3060
|
-
if (tn) return Ze;
|
|
3061
|
-
tn = 1, Object.defineProperty(Ze, "__esModule", { value: !0 });
|
|
3062
|
-
const u = Se();
|
|
3063
|
-
class o {
|
|
3064
|
-
constructor(a, n, e) {
|
|
3065
|
-
this._patterns = a, this._settings = n, this._micromatchOptions = e, this._storage = [], this._fillStorage();
|
|
3066
|
-
}
|
|
3067
|
-
_fillStorage() {
|
|
3068
|
-
for (const a of this._patterns) {
|
|
3069
|
-
const n = this._getPatternSegments(a), e = this._splitSegmentsIntoSections(n);
|
|
3070
|
-
this._storage.push({
|
|
3071
|
-
complete: e.length <= 1,
|
|
3072
|
-
pattern: a,
|
|
3073
|
-
segments: n,
|
|
3074
|
-
sections: e
|
|
3075
|
-
});
|
|
3076
|
-
}
|
|
3077
|
-
}
|
|
3078
|
-
_getPatternSegments(a) {
|
|
3079
|
-
return u.pattern.getPatternParts(a, this._micromatchOptions).map((e) => u.pattern.isDynamicPattern(e, this._settings) ? {
|
|
3080
|
-
dynamic: !0,
|
|
3081
|
-
pattern: e,
|
|
3082
|
-
patternRe: u.pattern.makeRe(e, this._micromatchOptions)
|
|
3083
|
-
} : {
|
|
3084
|
-
dynamic: !1,
|
|
3085
|
-
pattern: e
|
|
3086
|
-
});
|
|
3087
|
-
}
|
|
3088
|
-
_splitSegmentsIntoSections(a) {
|
|
3089
|
-
return u.array.splitWhen(a, (n) => n.dynamic && u.pattern.hasGlobStar(n.pattern));
|
|
3090
|
-
}
|
|
3091
|
-
}
|
|
3092
|
-
return Ze.default = o, Ze;
|
|
3093
|
-
}
|
|
3094
|
-
var rn;
|
|
3095
|
-
function Si() {
|
|
3096
|
-
if (rn) return Xe;
|
|
3097
|
-
rn = 1, Object.defineProperty(Xe, "__esModule", { value: !0 });
|
|
3098
|
-
const u = yi();
|
|
3099
|
-
class o extends u.default {
|
|
3100
|
-
match(a) {
|
|
3101
|
-
const n = a.split("/"), e = n.length, r = this._storage.filter((t) => !t.complete || t.segments.length > e);
|
|
3102
|
-
for (const t of r) {
|
|
3103
|
-
const s = t.sections[0];
|
|
3104
|
-
if (!t.complete && e > s.length || n.every((c, h) => {
|
|
3105
|
-
const l = t.segments[h];
|
|
3106
|
-
return !!(l.dynamic && l.patternRe.test(c) || !l.dynamic && l.pattern === c);
|
|
3107
|
-
}))
|
|
3108
|
-
return !0;
|
|
3109
|
-
}
|
|
3110
|
-
return !1;
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
return Xe.default = o, Xe;
|
|
3114
|
-
}
|
|
3115
|
-
var nn;
|
|
3116
|
-
function vi() {
|
|
3117
|
-
if (nn) return Ye;
|
|
3118
|
-
nn = 1, Object.defineProperty(Ye, "__esModule", { value: !0 });
|
|
3119
|
-
const u = Se(), o = Si();
|
|
3120
|
-
class f {
|
|
3121
|
-
constructor(n, e) {
|
|
3122
|
-
this._settings = n, this._micromatchOptions = e;
|
|
3123
|
-
}
|
|
3124
|
-
getFilter(n, e, r) {
|
|
3125
|
-
const t = this._getMatcher(e), s = this._getNegativePatternsRe(r);
|
|
3126
|
-
return (i) => this._filter(n, i, t, s);
|
|
3127
|
-
}
|
|
3128
|
-
_getMatcher(n) {
|
|
3129
|
-
return new o.default(n, this._settings, this._micromatchOptions);
|
|
3130
|
-
}
|
|
3131
|
-
_getNegativePatternsRe(n) {
|
|
3132
|
-
const e = n.filter(u.pattern.isAffectDepthOfReadingPattern);
|
|
3133
|
-
return u.pattern.convertPatternsToRe(e, this._micromatchOptions);
|
|
3134
|
-
}
|
|
3135
|
-
_filter(n, e, r, t) {
|
|
3136
|
-
if (this._isSkippedByDeep(n, e.path) || this._isSkippedSymbolicLink(e))
|
|
3137
|
-
return !1;
|
|
3138
|
-
const s = u.path.removeLeadingDotSegment(e.path);
|
|
3139
|
-
return this._isSkippedByPositivePatterns(s, r) ? !1 : this._isSkippedByNegativePatterns(s, t);
|
|
3140
|
-
}
|
|
3141
|
-
_isSkippedByDeep(n, e) {
|
|
3142
|
-
return this._settings.deep === 1 / 0 ? !1 : this._getEntryLevel(n, e) >= this._settings.deep;
|
|
3143
|
-
}
|
|
3144
|
-
_getEntryLevel(n, e) {
|
|
3145
|
-
const r = e.split("/").length;
|
|
3146
|
-
if (n === "")
|
|
3147
|
-
return r;
|
|
3148
|
-
const t = n.split("/").length;
|
|
3149
|
-
return r - t;
|
|
3150
|
-
}
|
|
3151
|
-
_isSkippedSymbolicLink(n) {
|
|
3152
|
-
return !this._settings.followSymbolicLinks && n.dirent.isSymbolicLink();
|
|
3153
|
-
}
|
|
3154
|
-
_isSkippedByPositivePatterns(n, e) {
|
|
3155
|
-
return !this._settings.baseNameMatch && !e.match(n);
|
|
3156
|
-
}
|
|
3157
|
-
_isSkippedByNegativePatterns(n, e) {
|
|
3158
|
-
return !u.pattern.matchAny(n, e);
|
|
3159
|
-
}
|
|
3160
|
-
}
|
|
3161
|
-
return Ye.default = f, Ye;
|
|
3162
|
-
}
|
|
3163
|
-
var ze = {}, sn;
|
|
3164
|
-
function mi() {
|
|
3165
|
-
if (sn) return ze;
|
|
3166
|
-
sn = 1, Object.defineProperty(ze, "__esModule", { value: !0 });
|
|
3167
|
-
const u = Se();
|
|
3168
|
-
class o {
|
|
3169
|
-
constructor(a, n) {
|
|
3170
|
-
this._settings = a, this._micromatchOptions = n, this.index = /* @__PURE__ */ new Map();
|
|
3171
|
-
}
|
|
3172
|
-
getFilter(a, n) {
|
|
3173
|
-
const [e, r] = u.pattern.partitionAbsoluteAndRelative(n), t = {
|
|
3174
|
-
positive: {
|
|
3175
|
-
all: u.pattern.convertPatternsToRe(a, this._micromatchOptions)
|
|
3176
|
-
},
|
|
3177
|
-
negative: {
|
|
3178
|
-
absolute: u.pattern.convertPatternsToRe(e, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 })),
|
|
3179
|
-
relative: u.pattern.convertPatternsToRe(r, Object.assign(Object.assign({}, this._micromatchOptions), { dot: !0 }))
|
|
3180
|
-
}
|
|
3181
|
-
};
|
|
3182
|
-
return (s) => this._filter(s, t);
|
|
3183
|
-
}
|
|
3184
|
-
_filter(a, n) {
|
|
3185
|
-
const e = u.path.removeLeadingDotSegment(a.path);
|
|
3186
|
-
if (this._settings.unique && this._isDuplicateEntry(e) || this._onlyFileFilter(a) || this._onlyDirectoryFilter(a))
|
|
3187
|
-
return !1;
|
|
3188
|
-
const r = this._isMatchToPatternsSet(e, n, a.dirent.isDirectory());
|
|
3189
|
-
return this._settings.unique && r && this._createIndexRecord(e), r;
|
|
3190
|
-
}
|
|
3191
|
-
_isDuplicateEntry(a) {
|
|
3192
|
-
return this.index.has(a);
|
|
3193
|
-
}
|
|
3194
|
-
_createIndexRecord(a) {
|
|
3195
|
-
this.index.set(a, void 0);
|
|
3196
|
-
}
|
|
3197
|
-
_onlyFileFilter(a) {
|
|
3198
|
-
return this._settings.onlyFiles && !a.dirent.isFile();
|
|
3199
|
-
}
|
|
3200
|
-
_onlyDirectoryFilter(a) {
|
|
3201
|
-
return this._settings.onlyDirectories && !a.dirent.isDirectory();
|
|
3202
|
-
}
|
|
3203
|
-
_isMatchToPatternsSet(a, n, e) {
|
|
3204
|
-
return !(!this._isMatchToPatterns(a, n.positive.all, e) || this._isMatchToPatterns(a, n.negative.relative, e) || this._isMatchToAbsoluteNegative(a, n.negative.absolute, e));
|
|
3205
|
-
}
|
|
3206
|
-
_isMatchToAbsoluteNegative(a, n, e) {
|
|
3207
|
-
if (n.length === 0)
|
|
3208
|
-
return !1;
|
|
3209
|
-
const r = u.path.makeAbsolute(this._settings.cwd, a);
|
|
3210
|
-
return this._isMatchToPatterns(r, n, e);
|
|
3211
|
-
}
|
|
3212
|
-
_isMatchToPatterns(a, n, e) {
|
|
3213
|
-
if (n.length === 0)
|
|
3214
|
-
return !1;
|
|
3215
|
-
const r = u.pattern.matchAny(a, n);
|
|
3216
|
-
return !r && e ? u.pattern.matchAny(a + "/", n) : r;
|
|
3217
|
-
}
|
|
3218
|
-
}
|
|
3219
|
-
return ze.default = o, ze;
|
|
3220
|
-
}
|
|
3221
|
-
var Je = {}, an;
|
|
3222
|
-
function Ri() {
|
|
3223
|
-
if (an) return Je;
|
|
3224
|
-
an = 1, Object.defineProperty(Je, "__esModule", { value: !0 });
|
|
3225
|
-
const u = Se();
|
|
3226
|
-
class o {
|
|
3227
|
-
constructor(a) {
|
|
3228
|
-
this._settings = a;
|
|
3229
|
-
}
|
|
3230
|
-
getFilter() {
|
|
3231
|
-
return (a) => this._isNonFatalError(a);
|
|
3232
|
-
}
|
|
3233
|
-
_isNonFatalError(a) {
|
|
3234
|
-
return u.errno.isEnoentCodeError(a) || this._settings.suppressErrors;
|
|
3235
|
-
}
|
|
3236
|
-
}
|
|
3237
|
-
return Je.default = o, Je;
|
|
3238
|
-
}
|
|
3239
|
-
var et = {}, on;
|
|
3240
|
-
function Ei() {
|
|
3241
|
-
if (on) return et;
|
|
3242
|
-
on = 1, Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3243
|
-
const u = Se();
|
|
3244
|
-
class o {
|
|
3245
|
-
constructor(a) {
|
|
3246
|
-
this._settings = a;
|
|
3247
|
-
}
|
|
3248
|
-
getTransformer() {
|
|
3249
|
-
return (a) => this._transform(a);
|
|
3250
|
-
}
|
|
3251
|
-
_transform(a) {
|
|
3252
|
-
let n = a.path;
|
|
3253
|
-
return this._settings.absolute && (n = u.path.makeAbsolute(this._settings.cwd, n), n = u.path.unixify(n)), this._settings.markDirectories && a.dirent.isDirectory() && (n += "/"), this._settings.objectMode ? Object.assign(Object.assign({}, a), { path: n }) : n;
|
|
3254
|
-
}
|
|
3255
|
-
}
|
|
3256
|
-
return et.default = o, et;
|
|
3257
|
-
}
|
|
3258
|
-
var un;
|
|
3259
|
-
function Kt() {
|
|
3260
|
-
if (un) return Qe;
|
|
3261
|
-
un = 1, Object.defineProperty(Qe, "__esModule", { value: !0 });
|
|
3262
|
-
const u = he, o = vi(), f = mi(), a = Ri(), n = Ei();
|
|
3263
|
-
class e {
|
|
3264
|
-
constructor(t) {
|
|
3265
|
-
this._settings = t, this.errorFilter = new a.default(this._settings), this.entryFilter = new f.default(this._settings, this._getMicromatchOptions()), this.deepFilter = new o.default(this._settings, this._getMicromatchOptions()), this.entryTransformer = new n.default(this._settings);
|
|
3266
|
-
}
|
|
3267
|
-
_getRootDirectory(t) {
|
|
3268
|
-
return u.resolve(this._settings.cwd, t.base);
|
|
3269
|
-
}
|
|
3270
|
-
_getReaderOptions(t) {
|
|
3271
|
-
const s = t.base === "." ? "" : t.base;
|
|
3272
|
-
return {
|
|
3273
|
-
basePath: s,
|
|
3274
|
-
pathSegmentSeparator: "/",
|
|
3275
|
-
concurrency: this._settings.concurrency,
|
|
3276
|
-
deepFilter: this.deepFilter.getFilter(s, t.positive, t.negative),
|
|
3277
|
-
entryFilter: this.entryFilter.getFilter(t.positive, t.negative),
|
|
3278
|
-
errorFilter: this.errorFilter.getFilter(),
|
|
3279
|
-
followSymbolicLinks: this._settings.followSymbolicLinks,
|
|
3280
|
-
fs: this._settings.fs,
|
|
3281
|
-
stats: this._settings.stats,
|
|
3282
|
-
throwErrorOnBrokenSymbolicLink: this._settings.throwErrorOnBrokenSymbolicLink,
|
|
3283
|
-
transform: this.entryTransformer.getTransformer()
|
|
3284
|
-
};
|
|
3285
|
-
}
|
|
3286
|
-
_getMicromatchOptions() {
|
|
3287
|
-
return {
|
|
3288
|
-
dot: this._settings.dot,
|
|
3289
|
-
matchBase: this._settings.baseNameMatch,
|
|
3290
|
-
nobrace: !this._settings.braceExpansion,
|
|
3291
|
-
nocase: !this._settings.caseSensitiveMatch,
|
|
3292
|
-
noext: !this._settings.extglob,
|
|
3293
|
-
noglobstar: !this._settings.globstar,
|
|
3294
|
-
posix: !0,
|
|
3295
|
-
strictSlashes: !1
|
|
3296
|
-
};
|
|
3297
|
-
}
|
|
3298
|
-
}
|
|
3299
|
-
return Qe.default = e, Qe;
|
|
3300
|
-
}
|
|
3301
|
-
var cn;
|
|
3302
|
-
function Ai() {
|
|
3303
|
-
if (cn) return He;
|
|
3304
|
-
cn = 1, Object.defineProperty(He, "__esModule", { value: !0 });
|
|
3305
|
-
const u = gi(), o = Kt();
|
|
3306
|
-
class f extends o.default {
|
|
3307
|
-
constructor() {
|
|
3308
|
-
super(...arguments), this._reader = new u.default(this._settings);
|
|
3309
|
-
}
|
|
3310
|
-
async read(n) {
|
|
3311
|
-
const e = this._getRootDirectory(n), r = this._getReaderOptions(n);
|
|
3312
|
-
return (await this.api(e, n, r)).map((s) => r.transform(s));
|
|
3313
|
-
}
|
|
3314
|
-
api(n, e, r) {
|
|
3315
|
-
return e.dynamic ? this._reader.dynamic(n, r) : this._reader.static(e.patterns, r);
|
|
3316
|
-
}
|
|
3317
|
-
}
|
|
3318
|
-
return He.default = f, He;
|
|
3319
|
-
}
|
|
3320
|
-
var tt = {}, ln;
|
|
3321
|
-
function bi() {
|
|
3322
|
-
if (ln) return tt;
|
|
3323
|
-
ln = 1, Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
3324
|
-
const u = it, o = An(), f = Kt();
|
|
3325
|
-
class a extends f.default {
|
|
3326
|
-
constructor() {
|
|
3327
|
-
super(...arguments), this._reader = new o.default(this._settings);
|
|
3328
|
-
}
|
|
3329
|
-
read(e) {
|
|
3330
|
-
const r = this._getRootDirectory(e), t = this._getReaderOptions(e), s = this.api(r, e, t), i = new u.Readable({ objectMode: !0, read: () => {
|
|
3331
|
-
} });
|
|
3332
|
-
return s.once("error", (c) => i.emit("error", c)).on("data", (c) => i.emit("data", t.transform(c))).once("end", () => i.emit("end")), i.once("close", () => s.destroy()), i;
|
|
3333
|
-
}
|
|
3334
|
-
api(e, r, t) {
|
|
3335
|
-
return r.dynamic ? this._reader.dynamic(e, t) : this._reader.static(r.patterns, t);
|
|
3336
|
-
}
|
|
3337
|
-
}
|
|
3338
|
-
return tt.default = a, tt;
|
|
3339
|
-
}
|
|
3340
|
-
var rt = {}, nt = {}, fn;
|
|
3341
|
-
function Pi() {
|
|
3342
|
-
if (fn) return nt;
|
|
3343
|
-
fn = 1, Object.defineProperty(nt, "__esModule", { value: !0 });
|
|
3344
|
-
const u = Re(), o = Wt(), f = Vt();
|
|
3345
|
-
class a extends f.default {
|
|
3346
|
-
constructor() {
|
|
3347
|
-
super(...arguments), this._walkSync = o.walkSync, this._statSync = u.statSync;
|
|
3348
|
-
}
|
|
3349
|
-
dynamic(e, r) {
|
|
3350
|
-
return this._walkSync(e, r);
|
|
3351
|
-
}
|
|
3352
|
-
static(e, r) {
|
|
3353
|
-
const t = [];
|
|
3354
|
-
for (const s of e) {
|
|
3355
|
-
const i = this._getFullEntryPath(s), c = this._getEntry(i, s, r);
|
|
3356
|
-
c === null || !r.entryFilter(c) || t.push(c);
|
|
3357
|
-
}
|
|
3358
|
-
return t;
|
|
3359
|
-
}
|
|
3360
|
-
_getEntry(e, r, t) {
|
|
3361
|
-
try {
|
|
3362
|
-
const s = this._getStat(e);
|
|
3363
|
-
return this._makeEntry(s, r);
|
|
3364
|
-
} catch (s) {
|
|
3365
|
-
if (t.errorFilter(s))
|
|
3366
|
-
return null;
|
|
3367
|
-
throw s;
|
|
3368
|
-
}
|
|
3369
|
-
}
|
|
3370
|
-
_getStat(e) {
|
|
3371
|
-
return this._statSync(e, this._fsStatSettings);
|
|
3372
|
-
}
|
|
3373
|
-
}
|
|
3374
|
-
return nt.default = a, nt;
|
|
3375
|
-
}
|
|
3376
|
-
var hn;
|
|
3377
|
-
function Ci() {
|
|
3378
|
-
if (hn) return rt;
|
|
3379
|
-
hn = 1, Object.defineProperty(rt, "__esModule", { value: !0 });
|
|
3380
|
-
const u = Pi(), o = Kt();
|
|
3381
|
-
class f extends o.default {
|
|
3382
|
-
constructor() {
|
|
3383
|
-
super(...arguments), this._reader = new u.default(this._settings);
|
|
3384
|
-
}
|
|
3385
|
-
read(n) {
|
|
3386
|
-
const e = this._getRootDirectory(n), r = this._getReaderOptions(n);
|
|
3387
|
-
return this.api(e, n, r).map(r.transform);
|
|
3388
|
-
}
|
|
3389
|
-
api(n, e, r) {
|
|
3390
|
-
return e.dynamic ? this._reader.dynamic(n, r) : this._reader.static(e.patterns, r);
|
|
3391
|
-
}
|
|
3392
|
-
}
|
|
3393
|
-
return rt.default = f, rt;
|
|
3394
|
-
}
|
|
3395
|
-
var qt = {}, pn;
|
|
3396
|
-
function Ti() {
|
|
3397
|
-
return pn || (pn = 1, (function(u) {
|
|
3398
|
-
Object.defineProperty(u, "__esModule", { value: !0 }), u.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
|
|
3399
|
-
const o = Ft, a = Math.max(It.cpus().length, 1);
|
|
3400
|
-
u.DEFAULT_FILE_SYSTEM_ADAPTER = {
|
|
3401
|
-
lstat: o.lstat,
|
|
3402
|
-
lstatSync: o.lstatSync,
|
|
3403
|
-
stat: o.stat,
|
|
3404
|
-
statSync: o.statSync,
|
|
3405
|
-
readdir: o.readdir,
|
|
3406
|
-
readdirSync: o.readdirSync
|
|
3407
|
-
};
|
|
3408
|
-
class n {
|
|
3409
|
-
constructor(r = {}) {
|
|
3410
|
-
this._options = r, this.absolute = this._getValue(this._options.absolute, !1), this.baseNameMatch = this._getValue(this._options.baseNameMatch, !1), this.braceExpansion = this._getValue(this._options.braceExpansion, !0), this.caseSensitiveMatch = this._getValue(this._options.caseSensitiveMatch, !0), this.concurrency = this._getValue(this._options.concurrency, a), this.cwd = this._getValue(this._options.cwd, process.cwd()), this.deep = this._getValue(this._options.deep, 1 / 0), this.dot = this._getValue(this._options.dot, !1), this.extglob = this._getValue(this._options.extglob, !0), this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, !0), this.fs = this._getFileSystemMethods(this._options.fs), this.globstar = this._getValue(this._options.globstar, !0), this.ignore = this._getValue(this._options.ignore, []), this.markDirectories = this._getValue(this._options.markDirectories, !1), this.objectMode = this._getValue(this._options.objectMode, !1), this.onlyDirectories = this._getValue(this._options.onlyDirectories, !1), this.onlyFiles = this._getValue(this._options.onlyFiles, !0), this.stats = this._getValue(this._options.stats, !1), this.suppressErrors = this._getValue(this._options.suppressErrors, !1), this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, !1), this.unique = this._getValue(this._options.unique, !0), this.onlyDirectories && (this.onlyFiles = !1), this.stats && (this.objectMode = !0), this.ignore = [].concat(this.ignore);
|
|
3411
|
-
}
|
|
3412
|
-
_getValue(r, t) {
|
|
3413
|
-
return r === void 0 ? t : r;
|
|
3414
|
-
}
|
|
3415
|
-
_getFileSystemMethods(r = {}) {
|
|
3416
|
-
return Object.assign(Object.assign({}, u.DEFAULT_FILE_SYSTEM_ADAPTER), r);
|
|
3417
|
-
}
|
|
3418
|
-
}
|
|
3419
|
-
u.default = n;
|
|
3420
|
-
})(qt)), qt;
|
|
3421
|
-
}
|
|
3422
|
-
var Nt, dn;
|
|
3423
|
-
function xi() {
|
|
3424
|
-
if (dn) return Nt;
|
|
3425
|
-
dn = 1;
|
|
3426
|
-
const u = Zn(), o = Ai(), f = bi(), a = Ci(), n = Ti(), e = Se();
|
|
3427
|
-
async function r(i, c) {
|
|
3428
|
-
s(i);
|
|
3429
|
-
const h = t(i, o.default, c), l = await Promise.all(h);
|
|
3430
|
-
return e.array.flatten(l);
|
|
3431
|
-
}
|
|
3432
|
-
(function(i) {
|
|
3433
|
-
i.glob = i, i.globSync = c, i.globStream = h, i.async = i;
|
|
3434
|
-
function c(d, _) {
|
|
3435
|
-
s(d);
|
|
3436
|
-
const b = t(d, a.default, _);
|
|
3437
|
-
return e.array.flatten(b);
|
|
3438
|
-
}
|
|
3439
|
-
i.sync = c;
|
|
3440
|
-
function h(d, _) {
|
|
3441
|
-
s(d);
|
|
3442
|
-
const b = t(d, f.default, _);
|
|
3443
|
-
return e.stream.merge(b);
|
|
3444
|
-
}
|
|
3445
|
-
i.stream = h;
|
|
3446
|
-
function l(d, _) {
|
|
3447
|
-
s(d);
|
|
3448
|
-
const b = [].concat(d), p = new n.default(_);
|
|
3449
|
-
return u.generate(b, p);
|
|
3450
|
-
}
|
|
3451
|
-
i.generateTasks = l;
|
|
3452
|
-
function y(d, _) {
|
|
3453
|
-
s(d);
|
|
3454
|
-
const b = new n.default(_);
|
|
3455
|
-
return e.pattern.isDynamicPattern(d, b);
|
|
3456
|
-
}
|
|
3457
|
-
i.isDynamicPattern = y;
|
|
3458
|
-
function C(d) {
|
|
3459
|
-
return s(d), e.path.escape(d);
|
|
3460
|
-
}
|
|
3461
|
-
i.escapePath = C;
|
|
3462
|
-
function P(d) {
|
|
3463
|
-
return s(d), e.path.convertPathToPattern(d);
|
|
3464
|
-
}
|
|
3465
|
-
i.convertPathToPattern = P, (function(d) {
|
|
3466
|
-
function _(p) {
|
|
3467
|
-
return s(p), e.path.escapePosixPath(p);
|
|
3468
|
-
}
|
|
3469
|
-
d.escapePath = _;
|
|
3470
|
-
function b(p) {
|
|
3471
|
-
return s(p), e.path.convertPosixPathToPattern(p);
|
|
3472
|
-
}
|
|
3473
|
-
d.convertPathToPattern = b;
|
|
3474
|
-
})(i.posix || (i.posix = {})), (function(d) {
|
|
3475
|
-
function _(p) {
|
|
3476
|
-
return s(p), e.path.escapeWindowsPath(p);
|
|
3477
|
-
}
|
|
3478
|
-
d.escapePath = _;
|
|
3479
|
-
function b(p) {
|
|
3480
|
-
return s(p), e.path.convertWindowsPathToPattern(p);
|
|
3481
|
-
}
|
|
3482
|
-
d.convertPathToPattern = b;
|
|
3483
|
-
})(i.win32 || (i.win32 = {}));
|
|
3484
|
-
})(r || (r = {}));
|
|
3485
|
-
function t(i, c, h) {
|
|
3486
|
-
const l = [].concat(i), y = new n.default(h), C = u.generate(l, y), P = new c(y);
|
|
3487
|
-
return C.map(P.read, P);
|
|
3488
|
-
}
|
|
3489
|
-
function s(i) {
|
|
3490
|
-
if (![].concat(i).every((l) => e.string.isString(l) && !e.string.isEmpty(l)))
|
|
3491
|
-
throw new TypeError("Patterns must be a string (non empty) or an array of strings");
|
|
3492
|
-
}
|
|
3493
|
-
return Nt = r, Nt;
|
|
3494
|
-
}
|
|
3495
|
-
var Oi = xi();
|
|
3496
|
-
const wi = /* @__PURE__ */ Tn(Oi), $i = [".md", ".mdc", ".js", ".ts", ".tsx", ".go", ".sh", ".puml", "."], Li = (u, o = {}) => {
|
|
3497
|
-
const { extensions: f = $i, exclude: a = [], ignoreDefaultExcludes: n = !1 } = o, r = (Array.isArray(a) ? a : [a]).map((y) => /[*{}!]/.test(y) ? y : `**/*${y}`);
|
|
3498
|
-
n || r.push("**/node_modules/**");
|
|
3499
|
-
const s = (Array.isArray(u) ? u : [u]).map((y) => {
|
|
3500
|
-
try {
|
|
3501
|
-
if (ct.existsSync(y) && ct.statSync(y).isDirectory())
|
|
3502
|
-
return lt.join(y, "**/*");
|
|
3503
|
-
} catch (C) {
|
|
3504
|
-
Qt.debug(`[catGen] [paths → glob] Treating as glob: ${y}`, { cause: C });
|
|
3505
|
-
}
|
|
3506
|
-
return y;
|
|
3507
|
-
}), i = {
|
|
3508
|
-
ignore: r,
|
|
3509
|
-
onlyFiles: !0,
|
|
3510
|
-
absolute: !0,
|
|
3511
|
-
dot: n,
|
|
3512
|
-
suppressErrors: !0
|
|
3513
|
-
};
|
|
3514
|
-
let c = wi.sync(s, i);
|
|
3515
|
-
const h = new Set(Array.isArray(f) ? f : [f]);
|
|
3516
|
-
return h.has("*") || (c = c.filter((y) => h.has(lt.extname(y).toLowerCase()))), c.map((y) => {
|
|
3517
|
-
try {
|
|
3518
|
-
const C = ct.readFileSync(y, "utf8"), P = lt.relative(process.cwd(), y);
|
|
3519
|
-
return { absPath: y, relativePath: P, contents: C };
|
|
3520
|
-
} catch (C) {
|
|
3521
|
-
return Qt.warn(`[catGen] [reading → skip] ${y}`, { cause: C }), null;
|
|
3522
|
-
}
|
|
3523
|
-
}).filter((y) => y !== null);
|
|
3524
|
-
}, Le = Pn(process.argv, {
|
|
3525
|
-
plain: ["plain"],
|
|
3526
|
-
exclude: ["exclude", "e"],
|
|
3527
|
-
extensions: ["ext"],
|
|
3528
|
-
output: ["o"]
|
|
3529
|
-
}), ki = (u) => {
|
|
3530
|
-
console.log(ie.blue("## CODEBASE:")), u.forEach(({ relativePath: o, contents: f }) => {
|
|
3531
|
-
console.log(ie.blue(`### SOURCE: ${o}`)), console.log(ie.gray("```" + (o.split(".").pop() ?? ""))), console.log(f), console.log(ie.gray("```")), console.log("");
|
|
3532
|
-
});
|
|
3533
|
-
}, Hi = (u) => {
|
|
3534
|
-
console.log(ie.blue("<Codebase>")), u.forEach(({ relativePath: o, contents: f }) => {
|
|
3535
|
-
const a = [
|
|
3536
|
-
`${ie.yellow("type")}=${ie.green('"file"')}`,
|
|
3537
|
-
`${ie.yellow("path")}=${ie.green(`"${o}"`)}`
|
|
3538
|
-
].join(" ");
|
|
3539
|
-
console.log(` ${ie.blue("<Source")} ${a}${ie.blue(">")}`), console.log(f), console.log(` ${ie.blue("</Source>")}`);
|
|
3540
|
-
}), console.log(ie.blue("</Codebase>")), console.log("");
|
|
3541
|
-
};
|
|
3542
|
-
Le._.length === 0 && (console.error(ie.yellow("Usage: npx gennady cat <path/to/glob>")), process.exit(1));
|
|
3543
|
-
const _n = Li(Le._, Le);
|
|
3544
|
-
Le.output === "md" ? ki(_n) : Hi(_n);
|
|
3545
|
-
Le.plain || (console.log(ie.green("^".repeat(40))), console.log(
|
|
3546
|
-
ie.italic.gray(`Hint: npx gennady cat ${process.argv.slice(3).join(" ")} --plain | pbcopy`)
|
|
3547
|
-
));
|
|
3548
|
-
console.log("");
|