@capyclaw/ppt-suite 2.4.9 → 2.5.67
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 +45 -42
- package/composition.lock.json +46 -70
- package/contract/ppt-contract.json +310 -11
- package/cordis.patch.yml +5 -25
- package/dsh-suite.json +108 -194
- package/lib/index.mjs +1 -1
- package/node_modules/@capyclaw/asset-service/README.md +48 -0
- package/node_modules/@capyclaw/asset-service/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/asset-service/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/asset-service/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/asset-service/package.json +59 -0
- package/node_modules/@capyclaw/asset-service/src/index.mjs +223 -0
- package/node_modules/@capyclaw/document-workbench/README.md +125 -0
- package/node_modules/@capyclaw/document-workbench/package.json +44 -0
- package/node_modules/@capyclaw/document-workbench/src/bridge/index.mjs +321 -0
- package/node_modules/@capyclaw/document-workbench/src/client/index.mjs +625 -0
- package/node_modules/@capyclaw/document-workbench/src/client/screenshot.mjs +98 -0
- package/node_modules/@capyclaw/document-workbench/src/index.mjs +9 -0
- package/node_modules/@capyclaw/document-workbench/src/model/audit.mjs +101 -0
- package/node_modules/@capyclaw/document-workbench/src/model/conformance.mjs +92 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ids.mjs +56 -0
- package/node_modules/@capyclaw/document-workbench/src/model/index.mjs +18 -0
- package/node_modules/@capyclaw/document-workbench/src/model/locate.mjs +118 -0
- package/node_modules/@capyclaw/document-workbench/src/model/manifest.mjs +148 -0
- package/node_modules/@capyclaw/document-workbench/src/model/ops.mjs +160 -0
- package/node_modules/@capyclaw/document-workbench/src/model/validate.mjs +72 -0
- package/node_modules/@capyclaw/document-workbench/src/ops/index.mjs +93 -0
- package/node_modules/@capyclaw/document-workbench/src/session/context.mjs +91 -0
- package/node_modules/@capyclaw/document-workbench/src/session/index.mjs +394 -0
- package/node_modules/@capyclaw/document-workbench/src/session/lease.mjs +105 -0
- package/node_modules/@capyclaw/document-workbench/src/session/mode.mjs +80 -0
- package/node_modules/@capyclaw/document-workbench/src/session/sanitize.mjs +107 -0
- package/node_modules/@capyclaw/document-workbench/src/session/state.mjs +159 -0
- package/node_modules/@capyclaw/document-workbench/src/session/watch.mjs +63 -0
- package/node_modules/@capyclaw/document-workbench/src/store/file-backend.mjs +158 -0
- package/node_modules/@capyclaw/document-workbench/src/testing/index.mjs +75 -0
- package/node_modules/@capyclaw/editor-host/README.md +37 -0
- package/node_modules/@capyclaw/editor-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/editor-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/editor-host/lib/host.mjs +14 -0
- package/node_modules/@capyclaw/editor-host/package.json +59 -0
- package/node_modules/@capyclaw/editor-host/src/index.mjs +159 -0
- package/node_modules/@capyclaw/foundation/README.md +51 -0
- package/node_modules/@capyclaw/foundation/abi/bridge.mjs +86 -0
- package/node_modules/@capyclaw/foundation/abi/errors.mjs +63 -0
- package/node_modules/@capyclaw/foundation/abi/index.mjs +35 -0
- package/node_modules/@capyclaw/foundation/abi/kinds.mjs +271 -0
- package/node_modules/@capyclaw/foundation/abi/loader.mjs +345 -0
- package/node_modules/@capyclaw/foundation/abi/schema.mjs +98 -0
- package/node_modules/@capyclaw/foundation/abi/spec.mjs +255 -0
- package/node_modules/@capyclaw/foundation/abi/validate.mjs +24 -0
- package/node_modules/@capyclaw/foundation/abi/version.mjs +82 -0
- package/node_modules/@capyclaw/foundation/cordis.patch.yml +5 -0
- package/node_modules/@capyclaw/foundation/kit/index.mjs +6 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/client-panel.mjs +98 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/host-event.mjs +35 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/http-router.mjs +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/lifecycle-hook.mjs +55 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/own-server.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/raw.mjs +68 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +113 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/service-provider.mjs +77 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/skill-provider.mjs +56 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/tool-provider.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/ui-panel.mjs +64 -0
- package/node_modules/@capyclaw/foundation/lib/ctx-service.mjs +42 -0
- package/node_modules/@capyclaw/foundation/lib/host/caps.mjs +34 -0
- package/node_modules/@capyclaw/foundation/lib/host/contract.mjs +85 -0
- package/node_modules/@capyclaw/foundation/lib/host/dsh.mjs +50 -0
- package/node_modules/@capyclaw/foundation/lib/host/memory.mjs +160 -0
- package/node_modules/@capyclaw/foundation/lib/host.mjs +23 -0
- package/node_modules/@capyclaw/foundation/lib/kernel.mjs +185 -0
- package/node_modules/@capyclaw/foundation/lib/skill/scan.mjs +87 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/events.mjs +60 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/log.mjs +51 -0
- package/node_modules/@capyclaw/foundation/lib/subsystems/net.mjs +188 -0
- package/node_modules/@capyclaw/foundation/package.json +53 -0
- package/node_modules/@capyclaw/foundation/runtime/index.mjs +20 -0
- package/node_modules/@capyclaw/plugin-kit/INTEGRATION.md +100 -0
- package/node_modules/@capyclaw/plugin-kit/README.md +70 -0
- package/node_modules/@capyclaw/plugin-kit/bin/sync.mjs +103 -0
- package/node_modules/@capyclaw/plugin-kit/package.json +69 -0
- package/node_modules/@capyclaw/plugin-kit/src/cli.mjs +56 -0
- package/node_modules/@capyclaw/plugin-kit/src/config.mjs +142 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/lease.mjs +139 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/shadow.mjs +219 -0
- package/node_modules/@capyclaw/plugin-kit/src/editor/transport.js +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/index.mjs +13 -0
- package/node_modules/@capyclaw/plugin-kit/src/pack.mjs +230 -0
- package/node_modules/@capyclaw/plugin-kit/src/runtime/context.mjs +128 -0
- package/node_modules/@capyclaw/plugin-kit/src/self-contained.mjs +307 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/api.mjs +45 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/http.mjs +113 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/mcp-http.mjs +143 -0
- package/node_modules/@capyclaw/plugin-kit/src/service/server.mjs +131 -0
- package/node_modules/@capyclaw/plugin-kit/src/skills/provider.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/blob-store.mjs +109 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/content-store.mjs +17 -0
- package/node_modules/@capyclaw/plugin-kit/src/store/journal-store.mjs +89 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/result.mjs +41 -0
- package/node_modules/@capyclaw/plugin-kit/src/tools/validate.mjs +150 -0
- package/node_modules/@capyclaw/plugin-kit/src/tuning.mjs +82 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/fs-lock.mjs +132 -0
- package/node_modules/@capyclaw/plugin-kit/src/util/http.mjs +130 -0
- package/node_modules/@capyclaw/plugin-kit/src/workspace/manager.mjs +656 -0
- package/node_modules/@capyclaw/plugin-kit/src/zip.mjs +181 -0
- package/node_modules/@capyclaw/portal/README.md +70 -0
- package/node_modules/@capyclaw/portal/lib/index.mjs +387 -0
- package/node_modules/@capyclaw/portal/lib/ledger.mjs +194 -0
- package/node_modules/@capyclaw/portal/lib/portal-agent.ps1 +811 -0
- package/node_modules/@capyclaw/portal/lib/portal-darwin.mjs +183 -0
- package/node_modules/@capyclaw/portal/package.json +40 -0
- package/node_modules/@capyclaw/ppt-editor/LICENSE +661 -0
- package/node_modules/@capyclaw/ppt-editor/README.md +86 -0
- package/node_modules/@capyclaw/ppt-editor/THIRD_PARTY_NOTICES.md +21 -0
- package/node_modules/@capyclaw/ppt-editor/app.js +6298 -0
- package/node_modules/@capyclaw/ppt-editor/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-editor/heartbeat-worker.js +129 -0
- package/node_modules/@capyclaw/ppt-editor/index.html +176 -0
- package/node_modules/@capyclaw/ppt-editor/lib/index.mjs +8 -0
- package/node_modules/@capyclaw/ppt-editor/package.json +57 -0
- package/node_modules/@capyclaw/ppt-editor/ppt-full-app.js +381 -0
- package/node_modules/@capyclaw/ppt-skill-api/README.md +3 -0
- package/node_modules/@capyclaw/ppt-skill-api/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-skill-api/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/ppt-skill-api/package.json +49 -0
- package/node_modules/@capyclaw/ppt-skill-api/plugin.mjs +15 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/SKILL.md +137 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/tool-contract.md +1646 -0
- package/node_modules/@capyclaw/ppt-skill-api/skills/pptist-api/references/visual-qa.md +28 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/README.md +3 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/package.json +49 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/plugin.mjs +15 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/SKILL.md +83 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/anti-ai-slop.md +18 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/deck-structure.md +42 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/design-tokens.md +36 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/layout-system.md +30 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/page-craft.md +31 -0
- package/node_modules/@capyclaw/ppt-skill-proposal/skills/pptmaster-proposal/references/scqa-pyramid.md +26 -0
- package/node_modules/@capyclaw/ppt-workbench/LICENSE +661 -0
- package/node_modules/@capyclaw/ppt-workbench/README.md +173 -0
- package/node_modules/@capyclaw/ppt-workbench/THIRD_PARTY_NOTICES.md +21 -0
- package/node_modules/@capyclaw/ppt-workbench/contract/ppt-contract.json +1828 -0
- package/node_modules/@capyclaw/ppt-workbench/core/audit.js +507 -0
- package/node_modules/@capyclaw/ppt-workbench/core/chart.js +199 -0
- package/node_modules/@capyclaw/ppt-workbench/core/color.js +170 -0
- package/node_modules/@capyclaw/ppt-workbench/core/deck-layout.js +375 -0
- package/node_modules/@capyclaw/ppt-workbench/core/formula.js +80 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/hershey.js +1763 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/index.js +1176 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/stretch.js +41 -0
- package/node_modules/@capyclaw/ppt-workbench/core/hfmath/symbols.js +408 -0
- package/node_modules/@capyclaw/ppt-workbench/core/inspect.js +366 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compare.mjs +103 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/compile.mjs +322 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/edit.mjs +239 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/parse.mjs +346 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/render-html.mjs +84 -0
- package/node_modules/@capyclaw/ppt-workbench/core/manuscript/sync.mjs +101 -0
- package/node_modules/@capyclaw/ppt-workbench/core/measure.js +104 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/browser.js +28 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/chart.js +64 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/deck.js +21 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/element.js +55 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/history.js +11 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/import.js +95 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/index.js +39 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/playback.js +9 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/recolor.js +87 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/slide.js +66 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/table.js +85 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/text.js +35 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops/view.js +13 -0
- package/node_modules/@capyclaw/ppt-workbench/core/ops.js +12 -0
- package/node_modules/@capyclaw/ppt-workbench/core/quick.js +52 -0
- package/node_modules/@capyclaw/ppt-workbench/core/shape-library.js +122 -0
- package/node_modules/@capyclaw/ppt-workbench/core/table.js +178 -0
- package/node_modules/@capyclaw/ppt-workbench/core/text.js +200 -0
- package/node_modules/@capyclaw/ppt-workbench/lib/host.mjs +1 -0
- package/node_modules/@capyclaw/ppt-workbench/package.json +73 -0
- package/node_modules/@capyclaw/ppt-workbench/plugin.mjs +1 -0
- package/node_modules/@capyclaw/ppt-workbench/server/audit.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/bridge-client.mjs +308 -0
- package/node_modules/@capyclaw/ppt-workbench/server/constants.mjs +21 -0
- package/node_modules/@capyclaw/ppt-workbench/server/contract-snapshots.mjs +89 -0
- package/node_modules/@capyclaw/ppt-workbench/server/contract.mjs +24 -0
- package/node_modules/@capyclaw/ppt-workbench/server/deck-layout.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/editor-assets.mjs +132 -0
- package/node_modules/@capyclaw/ppt-workbench/server/embedded-host.mjs +252 -0
- package/node_modules/@capyclaw/ppt-workbench/server/http-utils.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/runtime/context.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/store/blob-store.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/util/fs-lock.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/infra/workspace/manager.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/dispatch.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/handler.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/mcp/instructions.mjs +66 -0
- package/node_modules/@capyclaw/ppt-workbench/server/ppt-shim.mjs +168 -0
- package/node_modules/@capyclaw/ppt-workbench/server/relay.mjs +282 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/assets.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/bridge.mjs +74 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/editor.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/import.mjs +260 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/manuscript.mjs +414 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/mcp.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/routes/session.mjs +29 -0
- package/node_modules/@capyclaw/ppt-workbench/server/runtime/recovery.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/runtime/watch.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/session-context.mjs +5 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/SHARED_MANIFEST.json +70 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/asset-service.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/editor-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/editor/lease.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/api.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/service/mcp-http.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tools/validate.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/kit/util/fs-lock.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/service-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/tool-host.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/shared/tuning.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/backends/file-backend.mjs +13 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/checkpoints.mjs +28 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/deck-sanitize.mjs +68 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/doc.mjs +56 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/index.mjs +34 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/journal.mjs +9 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/lease.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/sanitize.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store/sessions.mjs +303 -0
- package/node_modules/@capyclaw/ppt-workbench/server/store.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/apply.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/audit.mjs +28 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/chart.mjs +83 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/compose.mjs +97 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/contract.mjs +38 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/deck.mjs +27 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/element.mjs +67 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/export.mjs +99 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/formula.mjs +72 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/history.mjs +29 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/image.mjs +174 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/imagesearch.mjs +203 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/import.mjs +180 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/index.mjs +64 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/inspect.mjs +46 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/line.mjs +58 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/manuscript.mjs +208 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/notes.mjs +33 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/present.mjs +34 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/recolor.mjs +62 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/screenshot.mjs +191 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/shape.mjs +64 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/slide.mjs +81 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/style.mjs +48 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/table.mjs +127 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/task.mjs +52 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/capabilities/text.mjs +82 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/color.mjs +4 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/image.mjs +78 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/index.mjs +7 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/manuscript-media.mjs +159 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/offline-render.mjs +256 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/pptx-export.mjs +577 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/recolor.mjs +25 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/remote-image.mjs +443 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/slide.mjs +21 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/text-style.mjs +11 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/domains/tooling.mjs +13 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/index.mjs +14 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/define.mjs +5 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/ports.mjs +52 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/kernel/registry.mjs +17 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools/model/deck-schema.mjs +105 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tools.mjs +18 -0
- package/node_modules/@capyclaw/ppt-workbench/server/tuning.mjs +93 -0
- package/node_modules/@capyclaw/ppt-workbench/server/validate.mjs +2 -0
- package/node_modules/@capyclaw/ppt-workbench/server/workbench-framework.mjs +305 -0
- package/node_modules/@capyclaw/service-broker/README.md +104 -0
- package/node_modules/@capyclaw/service-broker/cordis.patch.yml +8 -0
- package/node_modules/@capyclaw/service-broker/dsh-suite.json +21 -0
- package/node_modules/@capyclaw/service-broker/lib/control.mjs +193 -0
- package/node_modules/@capyclaw/service-broker/lib/discovery.mjs +109 -0
- package/node_modules/@capyclaw/service-broker/lib/engine.mjs +1236 -0
- package/node_modules/@capyclaw/service-broker/lib/host.mjs +182 -0
- package/node_modules/@capyclaw/service-broker/lib/manifest.mjs +249 -0
- package/node_modules/@capyclaw/service-broker/lib/recovery.mjs +325 -0
- package/node_modules/@capyclaw/service-broker/lib/skills-client.mjs +28 -0
- package/node_modules/@capyclaw/service-broker/lib/spec.mjs +78 -0
- package/node_modules/@capyclaw/service-broker/package.json +65 -0
- package/node_modules/@capyclaw/service-broker/server.mjs +81 -0
- package/node_modules/@capyclaw/service-broker/service.schema.json +62 -0
- package/node_modules/@capyclaw/service-broker/services.json +3 -0
- package/node_modules/@capyclaw/service-host/README.md +86 -0
- package/node_modules/@capyclaw/service-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/service-host/dsh-suite.json +29 -0
- package/node_modules/@capyclaw/service-host/lib/host.mjs +22 -0
- package/node_modules/@capyclaw/service-host/package.json +60 -0
- package/node_modules/@capyclaw/service-host/src/index.mjs +571 -0
- package/node_modules/@capyclaw/service-host/src/tuning.mjs +63 -0
- package/node_modules/@capyclaw/skills-service/README.md +31 -0
- package/node_modules/@capyclaw/skills-service/package.json +30 -0
- package/node_modules/@capyclaw/skills-service/server.mjs +237 -0
- package/node_modules/@capyclaw/tool-host/README.md +56 -0
- package/node_modules/@capyclaw/tool-host/cordis.patch.yml +4 -0
- package/node_modules/@capyclaw/tool-host/dsh-suite.json +30 -0
- package/node_modules/@capyclaw/tool-host/lib/host.mjs +16 -0
- package/node_modules/@capyclaw/tool-host/package.json +59 -0
- package/node_modules/@capyclaw/tool-host/src/descriptors.mjs +142 -0
- package/node_modules/@capyclaw/tool-host/src/index.mjs +390 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +8 -0
- package/node_modules/@types/node/assert.d.ts +1005 -0
- package/node_modules/@types/node/async_hooks.d.ts +586 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +457 -0
- package/node_modules/@types/node/buffer.d.ts +1901 -0
- package/node_modules/@types/node/child_process.d.ts +1453 -0
- package/node_modules/@types/node/cluster.d.ts +578 -0
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/node_modules/@types/node/console.d.ts +452 -0
- package/node_modules/@types/node/constants.d.ts +21 -0
- package/node_modules/@types/node/crypto.d.ts +4504 -0
- package/node_modules/@types/node/dgram.d.ts +596 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +551 -0
- package/node_modules/@types/node/dns/promises.d.ts +477 -0
- package/node_modules/@types/node/dns.d.ts +860 -0
- package/node_modules/@types/node/domain.d.ts +170 -0
- package/node_modules/@types/node/events.d.ts +863 -0
- package/node_modules/@types/node/fs/promises.d.ts +1208 -0
- package/node_modules/@types/node/fs.d.ts +4332 -0
- package/node_modules/@types/node/globals.d.ts +170 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +21 -0
- package/node_modules/@types/node/http.d.ts +1919 -0
- package/node_modules/@types/node/http2.d.ts +2580 -0
- package/node_modules/@types/node/https.d.ts +549 -0
- package/node_modules/@types/node/index.d.ts +92 -0
- package/node_modules/@types/node/inspector.generated.d.ts +2775 -0
- package/node_modules/@types/node/module.d.ts +503 -0
- package/node_modules/@types/node/net.d.ts +924 -0
- package/node_modules/@types/node/os.d.ts +480 -0
- package/node_modules/@types/node/package.json +145 -0
- package/node_modules/@types/node/path.d.ts +191 -0
- package/node_modules/@types/node/perf_hooks.d.ts +860 -0
- package/node_modules/@types/node/process.d.ts +1632 -0
- package/node_modules/@types/node/punycode.d.ts +117 -0
- package/node_modules/@types/node/querystring.d.ts +140 -0
- package/node_modules/@types/node/readline/promises.d.ts +154 -0
- package/node_modules/@types/node/readline.d.ts +715 -0
- package/node_modules/@types/node/repl.d.ts +430 -0
- package/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/node_modules/@types/node/stream/web.d.ts +527 -0
- package/node_modules/@types/node/stream.d.ts +1680 -0
- package/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/node_modules/@types/node/test.d.ts +1208 -0
- package/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/node_modules/@types/node/timers.d.ts +286 -0
- package/node_modules/@types/node/tls.d.ts +1204 -0
- package/node_modules/@types/node/trace_events.d.ts +171 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +455 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +19 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +92 -0
- package/node_modules/@types/node/tty.d.ts +206 -0
- package/node_modules/@types/node/url.d.ts +957 -0
- package/node_modules/@types/node/util.d.ts +2083 -0
- package/node_modules/@types/node/v8.d.ts +753 -0
- package/node_modules/@types/node/vm.d.ts +704 -0
- package/node_modules/@types/node/wasi.d.ts +160 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/events.d.ts +81 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +38 -0
- package/node_modules/@types/node/worker_threads.d.ts +698 -0
- package/node_modules/@types/node/zlib.d.ts +517 -0
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/https/package.json +15 -0
- package/node_modules/image-size/LICENSE +9 -0
- package/node_modules/image-size/Readme.md +184 -0
- package/node_modules/image-size/bin/image-size.js +53 -0
- package/node_modules/image-size/dist/detector.d.ts +2 -0
- package/node_modules/image-size/dist/detector.js +30 -0
- package/node_modules/image-size/dist/index.d.ts +10 -0
- package/node_modules/image-size/dist/index.js +129 -0
- package/node_modules/image-size/dist/types/bmp.d.ts +2 -0
- package/node_modules/image-size/dist/types/bmp.js +11 -0
- package/node_modules/image-size/dist/types/cur.d.ts +2 -0
- package/node_modules/image-size/dist/types/cur.js +17 -0
- package/node_modules/image-size/dist/types/dds.d.ts +2 -0
- package/node_modules/image-size/dist/types/dds.js +11 -0
- package/node_modules/image-size/dist/types/gif.d.ts +2 -0
- package/node_modules/image-size/dist/types/gif.js +12 -0
- package/node_modules/image-size/dist/types/heif.d.ts +2 -0
- package/node_modules/image-size/dist/types/heif.js +40 -0
- package/node_modules/image-size/dist/types/icns.d.ts +2 -0
- package/node_modules/image-size/dist/types/icns.js +101 -0
- package/node_modules/image-size/dist/types/ico.d.ts +2 -0
- package/node_modules/image-size/dist/types/ico.js +68 -0
- package/node_modules/image-size/dist/types/index.d.ts +23 -0
- package/node_modules/image-size/dist/types/index.js +46 -0
- package/node_modules/image-size/dist/types/interface.d.ts +13 -0
- package/node_modules/image-size/dist/types/interface.js +2 -0
- package/node_modules/image-size/dist/types/j2c.d.ts +2 -0
- package/node_modules/image-size/dist/types/j2c.js +12 -0
- package/node_modules/image-size/dist/types/jp2.d.ts +2 -0
- package/node_modules/image-size/dist/types/jp2.js +27 -0
- package/node_modules/image-size/dist/types/jpg.d.ts +2 -0
- package/node_modules/image-size/dist/types/jpg.js +123 -0
- package/node_modules/image-size/dist/types/jxl-stream.d.ts +2 -0
- package/node_modules/image-size/dist/types/jxl-stream.js +45 -0
- package/node_modules/image-size/dist/types/jxl.d.ts +2 -0
- package/node_modules/image-size/dist/types/jxl.js +59 -0
- package/node_modules/image-size/dist/types/ktx.d.ts +2 -0
- package/node_modules/image-size/dist/types/ktx.js +19 -0
- package/node_modules/image-size/dist/types/png.d.ts +2 -0
- package/node_modules/image-size/dist/types/png.js +35 -0
- package/node_modules/image-size/dist/types/pnm.d.ts +2 -0
- package/node_modules/image-size/dist/types/pnm.js +72 -0
- package/node_modules/image-size/dist/types/psd.d.ts +2 -0
- package/node_modules/image-size/dist/types/psd.js +11 -0
- package/node_modules/image-size/dist/types/svg.d.ts +2 -0
- package/node_modules/image-size/dist/types/svg.js +90 -0
- package/node_modules/image-size/dist/types/tga.d.ts +2 -0
- package/node_modules/image-size/dist/types/tga.js +15 -0
- package/node_modules/image-size/dist/types/tiff.d.ts +2 -0
- package/node_modules/image-size/dist/types/tiff.js +95 -0
- package/node_modules/image-size/dist/types/utils.d.ts +15 -0
- package/node_modules/image-size/dist/types/utils.js +75 -0
- package/node_modules/image-size/dist/types/webp.d.ts +2 -0
- package/node_modules/image-size/dist/types/webp.js +60 -0
- package/node_modules/image-size/dist/utils/bit-reader.d.ts +10 -0
- package/node_modules/image-size/dist/utils/bit-reader.js +44 -0
- package/node_modules/image-size/package.json +81 -0
- package/node_modules/immediate/LICENSE.txt +20 -0
- package/node_modules/immediate/README.md +93 -0
- package/node_modules/immediate/dist/immediate.js +75 -0
- package/node_modules/immediate/dist/immediate.min.js +1 -0
- package/node_modules/immediate/lib/browser.js +69 -0
- package/node_modules/immediate/lib/index.js +73 -0
- package/node_modules/immediate/package.json +42 -0
- package/node_modules/inherits/LICENSE +16 -0
- package/node_modules/inherits/README.md +42 -0
- package/node_modules/inherits/inherits.js +9 -0
- package/node_modules/inherits/inherits_browser.js +27 -0
- package/node_modules/inherits/package.json +29 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/jszip/.codeclimate.yml +16 -0
- package/node_modules/jszip/.editorconfig +8 -0
- package/node_modules/jszip/.eslintrc.js +43 -0
- package/node_modules/jszip/CHANGES.md +210 -0
- package/node_modules/jszip/LICENSE.markdown +651 -0
- package/node_modules/jszip/README.markdown +33 -0
- package/node_modules/jszip/dist/jszip.js +11586 -0
- package/node_modules/jszip/dist/jszip.min.js +13 -0
- package/node_modules/jszip/index.d.ts +344 -0
- package/node_modules/jszip/lib/base64.js +106 -0
- package/node_modules/jszip/lib/compressedObject.js +74 -0
- package/node_modules/jszip/lib/compressions.js +14 -0
- package/node_modules/jszip/lib/crc32.js +77 -0
- package/node_modules/jszip/lib/defaults.js +11 -0
- package/node_modules/jszip/lib/external.js +18 -0
- package/node_modules/jszip/lib/flate.js +85 -0
- package/node_modules/jszip/lib/generate/ZipFileWorker.js +539 -0
- package/node_modules/jszip/lib/generate/index.js +57 -0
- package/node_modules/jszip/lib/index.js +55 -0
- package/node_modules/jszip/lib/license_header.js +11 -0
- package/node_modules/jszip/lib/load.js +88 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamInputAdapter.js +74 -0
- package/node_modules/jszip/lib/nodejs/NodejsStreamOutputAdapter.js +42 -0
- package/node_modules/jszip/lib/nodejsUtils.js +57 -0
- package/node_modules/jszip/lib/object.js +384 -0
- package/node_modules/jszip/lib/readable-stream-browser.js +10 -0
- package/node_modules/jszip/lib/reader/ArrayReader.js +57 -0
- package/node_modules/jszip/lib/reader/DataReader.js +116 -0
- package/node_modules/jszip/lib/reader/NodeBufferReader.js +19 -0
- package/node_modules/jszip/lib/reader/StringReader.js +38 -0
- package/node_modules/jszip/lib/reader/Uint8ArrayReader.js +22 -0
- package/node_modules/jszip/lib/reader/readerFor.js +28 -0
- package/node_modules/jszip/lib/signature.js +7 -0
- package/node_modules/jszip/lib/stream/ConvertWorker.js +26 -0
- package/node_modules/jszip/lib/stream/Crc32Probe.js +24 -0
- package/node_modules/jszip/lib/stream/DataLengthProbe.js +29 -0
- package/node_modules/jszip/lib/stream/DataWorker.js +116 -0
- package/node_modules/jszip/lib/stream/GenericWorker.js +263 -0
- package/node_modules/jszip/lib/stream/StreamHelper.js +214 -0
- package/node_modules/jszip/lib/support.js +38 -0
- package/node_modules/jszip/lib/utf8.js +275 -0
- package/node_modules/jszip/lib/utils.js +510 -0
- package/node_modules/jszip/lib/zipEntries.js +261 -0
- package/node_modules/jszip/lib/zipEntry.js +293 -0
- package/node_modules/jszip/lib/zipObject.js +133 -0
- package/node_modules/jszip/package.json +67 -0
- package/node_modules/jszip/sponsors.md +21 -0
- package/node_modules/jszip/tsconfig.json +101 -0
- package/node_modules/jszip/vendor/FileSaver.js +247 -0
- package/node_modules/lie/README.md +62 -0
- package/node_modules/lie/dist/lie.js +350 -0
- package/node_modules/lie/dist/lie.min.js +1 -0
- package/node_modules/lie/dist/lie.polyfill.js +358 -0
- package/node_modules/lie/dist/lie.polyfill.min.js +1 -0
- package/node_modules/lie/lib/browser.js +273 -0
- package/node_modules/lie/lib/index.js +298 -0
- package/node_modules/lie/license.md +7 -0
- package/node_modules/lie/lie.d.ts +244 -0
- package/node_modules/lie/package.json +69 -0
- package/node_modules/lie/polyfill.js +4 -0
- package/node_modules/pako/LICENSE +21 -0
- package/node_modules/pako/README.md +191 -0
- package/node_modules/pako/dist/pako.js +6818 -0
- package/node_modules/pako/dist/pako.min.js +1 -0
- package/node_modules/pako/dist/pako_deflate.js +3997 -0
- package/node_modules/pako/dist/pako_deflate.min.js +1 -0
- package/node_modules/pako/dist/pako_inflate.js +3300 -0
- package/node_modules/pako/dist/pako_inflate.min.js +1 -0
- package/node_modules/pako/index.js +14 -0
- package/node_modules/pako/lib/deflate.js +400 -0
- package/node_modules/pako/lib/inflate.js +423 -0
- package/node_modules/pako/lib/utils/common.js +105 -0
- package/node_modules/pako/lib/utils/strings.js +187 -0
- package/node_modules/pako/lib/zlib/README +59 -0
- package/node_modules/pako/lib/zlib/adler32.js +51 -0
- package/node_modules/pako/lib/zlib/constants.js +68 -0
- package/node_modules/pako/lib/zlib/crc32.js +59 -0
- package/node_modules/pako/lib/zlib/deflate.js +1874 -0
- package/node_modules/pako/lib/zlib/gzheader.js +58 -0
- package/node_modules/pako/lib/zlib/inffast.js +345 -0
- package/node_modules/pako/lib/zlib/inflate.js +1556 -0
- package/node_modules/pako/lib/zlib/inftrees.js +343 -0
- package/node_modules/pako/lib/zlib/messages.js +32 -0
- package/node_modules/pako/lib/zlib/trees.js +1222 -0
- package/node_modules/pako/lib/zlib/zstream.js +47 -0
- package/node_modules/pako/package.json +44 -0
- package/node_modules/playwright-core/LICENSE +202 -0
- package/node_modules/playwright-core/NOTICE +5 -0
- package/node_modules/playwright-core/README.md +3 -0
- package/node_modules/playwright-core/ThirdPartyNotices.txt +13 -0
- package/node_modules/playwright-core/bin/install_media_pack.ps1 +5 -0
- package/node_modules/playwright-core/bin/install_webkit_wsl.ps1 +33 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_mac.sh +13 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_beta_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_linux.sh +42 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_mac.sh +12 -0
- package/node_modules/playwright-core/bin/reinstall_chrome_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_beta_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_dev_win.ps1 +23 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_linux.sh +48 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_mac.sh +11 -0
- package/node_modules/playwright-core/bin/reinstall_msedge_stable_win.ps1 +24 -0
- package/node_modules/playwright-core/browsers.json +52 -0
- package/node_modules/playwright-core/cli.js +22 -0
- package/node_modules/playwright-core/index.d.ts +17 -0
- package/node_modules/playwright-core/index.js +17 -0
- package/node_modules/playwright-core/index.mjs +28 -0
- package/node_modules/playwright-core/lib/bootstrap.js +149 -0
- package/node_modules/playwright-core/lib/coreBundle.js +78041 -0
- package/node_modules/playwright-core/lib/entry/cliDaemon.js +5 -0
- package/node_modules/playwright-core/lib/entry/dashboardApp.js +3 -0
- package/node_modules/playwright-core/lib/entry/mcp.js +10 -0
- package/node_modules/playwright-core/lib/entry/oopBrowserDownload.js +3 -0
- package/node_modules/playwright-core/lib/package.js +50 -0
- package/node_modules/playwright-core/lib/server/chromium/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/server/electron/loader.js +123 -0
- package/node_modules/playwright-core/lib/serverRegistry.js +1939 -0
- package/node_modules/playwright-core/lib/serverRegistry.js.LICENSE +65 -0
- package/node_modules/playwright-core/lib/tools/cli-client/channelSessions.js +141 -0
- package/node_modules/playwright-core/lib/tools/cli-client/cli.js +7 -0
- package/node_modules/playwright-core/lib/tools/cli-client/help.json +808 -0
- package/node_modules/playwright-core/lib/tools/cli-client/minimist.js +128 -0
- package/node_modules/playwright-core/lib/tools/cli-client/output.js +352 -0
- package/node_modules/playwright-core/lib/tools/cli-client/program.js +422 -0
- package/node_modules/playwright-core/lib/tools/cli-client/registry.js +180 -0
- package/node_modules/playwright-core/lib/tools/cli-client/session.js +261 -0
- package/node_modules/playwright-core/lib/tools/dashboard/appIcon.png +0 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/SKILL.md +493 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/element-attributes.md +23 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/playwright-tests.md +39 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/pr-attachments.md +60 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/request-mocking.md +87 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/running-code.md +245 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/session-management.md +227 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/storage-state.md +275 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/test-generation.md +433 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/tracing.md +139 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-cli/references/video-recording.md +216 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/SKILL.md +136 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/migration.md +89 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/react.md +69 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/typing.md +173 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-component-testing/references/vue.md +77 -0
- package/node_modules/playwright-core/lib/tools/skills/playwright-trace/SKILL.md +174 -0
- package/node_modules/playwright-core/lib/tools/utils/extension.js +112 -0
- package/node_modules/playwright-core/lib/tools/utils/socketConnection.js +108 -0
- package/node_modules/playwright-core/lib/utilsBundle.js +86078 -0
- package/node_modules/playwright-core/lib/utilsBundle.js.LICENSE +1890 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codeMirrorModule-CQ8RZGBm.js +32 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-1bWoP6pv.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-beta-k3eOH_eK.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/firefox-nightly-Cp5nfeDT.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-AwgwcYie.css +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/index-hRvO4yU2.js +12 -0
- package/node_modules/playwright-core/lib/vite/dashboard/assets/safari-na3_-uQk.svg +1 -0
- package/node_modules/playwright-core/lib/vite/dashboard/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/dashboard/playwright-logo.svg +24 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/index.html +16 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.css +2 -0
- package/node_modules/playwright-core/lib/vite/htmlReport/report.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codeMirrorModule-DK72OMRi.js +32 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/codicon-DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-BZpYJZ-P.css +1 -0
- package/node_modules/playwright-core/lib/vite/recorder/assets/index-Cn0mmDuv.js +129 -0
- package/node_modules/playwright-core/lib/vite/recorder/index.html +29 -0
- package/node_modules/playwright-core/lib/vite/recorder/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/codeMirrorModule-BEB2e8M3.js +32 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/defaultSettingsView-D-g2vrvf.js +184 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/assets/xtermModule-B794rD2Z.js +7 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/codicon.DCmgc-ay.ttf +0 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/defaultSettingsView.C8BeHuxd.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.html +44 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/index.oNry3Hjv.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/manifest.webmanifest +16 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/playwright-logo.svg +9 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/snapshot.html +10 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/sw.bundle.js +4 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CYwC_gH1.js +5 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.CyMfwkXJ.css +1 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/uiMode.html +18 -0
- package/node_modules/playwright-core/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
- package/node_modules/playwright-core/lib/webp_codec.LICENSE +173 -0
- package/node_modules/playwright-core/lib/webp_codec.wasm +0 -0
- package/node_modules/playwright-core/lib/xdg-open +1267 -0
- package/node_modules/playwright-core/package.json +34 -0
- package/node_modules/playwright-core/types/protocol.d.ts +24776 -0
- package/node_modules/playwright-core/types/structs.d.ts +52 -0
- package/node_modules/playwright-core/types/types.d.ts +27167 -0
- package/node_modules/pptxgenjs/LICENSE +21 -0
- package/node_modules/pptxgenjs/README.md +284 -0
- package/node_modules/pptxgenjs/dist/pptxgen.bundle.js +3 -0
- package/node_modules/pptxgenjs/dist/pptxgen.bundle.js.map +1 -0
- package/node_modules/pptxgenjs/dist/pptxgen.cjs.js +7445 -0
- package/node_modules/pptxgenjs/dist/pptxgen.es.js +7439 -0
- package/node_modules/pptxgenjs/dist/pptxgen.min.js +3 -0
- package/node_modules/pptxgenjs/dist/pptxgen.min.js.map +1 -0
- package/node_modules/pptxgenjs/package.json +89 -0
- package/node_modules/pptxgenjs/types/index.d.ts +2670 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/queue/LICENSE +8 -0
- package/node_modules/queue/index.d.ts +173 -0
- package/node_modules/queue/index.js +195 -0
- package/node_modules/queue/package.json +43 -0
- package/node_modules/queue/readme.md +221 -0
- package/node_modules/readable-stream/.travis.yml +34 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +58 -0
- package/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md +60 -0
- package/node_modules/readable-stream/duplex-browser.js +1 -0
- package/node_modules/readable-stream/duplex.js +1 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +131 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +47 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1019 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +214 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +685 -0
- package/node_modules/readable-stream/lib/internal/streams/BufferList.js +78 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +84 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +52 -0
- package/node_modules/readable-stream/passthrough.js +1 -0
- package/node_modules/readable-stream/readable-browser.js +7 -0
- package/node_modules/readable-stream/readable.js +19 -0
- package/node_modules/readable-stream/transform.js +1 -0
- package/node_modules/readable-stream/writable-browser.js +1 -0
- package/node_modules/readable-stream/writable.js +8 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +62 -0
- package/node_modules/safe-buffer/package.json +37 -0
- package/node_modules/setimmediate/LICENSE.txt +20 -0
- package/node_modules/setimmediate/package.json +30 -0
- package/node_modules/setimmediate/setImmediate.js +186 -0
- package/node_modules/string_decoder/.travis.yml +50 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +31 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/package.json +54 -21
- package/services.json +1 -20
|
@@ -0,0 +1,1939 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// packages/playwright-core/src/serverRegistry.ts
|
|
31
|
+
var serverRegistry_exports = {};
|
|
32
|
+
__export(serverRegistry_exports, {
|
|
33
|
+
serverRegistry: () => serverRegistry
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(serverRegistry_exports);
|
|
36
|
+
var import_events2 = require("events");
|
|
37
|
+
var import_fs3 = __toESM(require("fs"));
|
|
38
|
+
var import_net = __toESM(require("net"));
|
|
39
|
+
var import_path2 = __toESM(require("path"));
|
|
40
|
+
var import_os2 = __toESM(require("os"));
|
|
41
|
+
|
|
42
|
+
// node_modules/chokidar/esm/index.js
|
|
43
|
+
var import_fs2 = require("fs");
|
|
44
|
+
var import_promises3 = require("fs/promises");
|
|
45
|
+
var import_events = require("events");
|
|
46
|
+
var sysPath2 = __toESM(require("path"), 1);
|
|
47
|
+
|
|
48
|
+
// node_modules/readdirp/esm/index.js
|
|
49
|
+
var import_promises = require("node:fs/promises");
|
|
50
|
+
var import_node_stream = require("node:stream");
|
|
51
|
+
var import_node_path = require("node:path");
|
|
52
|
+
var EntryTypes = {
|
|
53
|
+
FILE_TYPE: "files",
|
|
54
|
+
DIR_TYPE: "directories",
|
|
55
|
+
FILE_DIR_TYPE: "files_directories",
|
|
56
|
+
EVERYTHING_TYPE: "all"
|
|
57
|
+
};
|
|
58
|
+
var defaultOptions = {
|
|
59
|
+
root: ".",
|
|
60
|
+
fileFilter: (_entryInfo) => true,
|
|
61
|
+
directoryFilter: (_entryInfo) => true,
|
|
62
|
+
type: EntryTypes.FILE_TYPE,
|
|
63
|
+
lstat: false,
|
|
64
|
+
depth: 2147483648,
|
|
65
|
+
alwaysStat: false,
|
|
66
|
+
highWaterMark: 4096
|
|
67
|
+
};
|
|
68
|
+
Object.freeze(defaultOptions);
|
|
69
|
+
var RECURSIVE_ERROR_CODE = "READDIRP_RECURSIVE_ERROR";
|
|
70
|
+
var NORMAL_FLOW_ERRORS = /* @__PURE__ */ new Set(["ENOENT", "EPERM", "EACCES", "ELOOP", RECURSIVE_ERROR_CODE]);
|
|
71
|
+
var ALL_TYPES = [
|
|
72
|
+
EntryTypes.DIR_TYPE,
|
|
73
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
74
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
75
|
+
EntryTypes.FILE_TYPE
|
|
76
|
+
];
|
|
77
|
+
var DIR_TYPES = /* @__PURE__ */ new Set([
|
|
78
|
+
EntryTypes.DIR_TYPE,
|
|
79
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
80
|
+
EntryTypes.FILE_DIR_TYPE
|
|
81
|
+
]);
|
|
82
|
+
var FILE_TYPES = /* @__PURE__ */ new Set([
|
|
83
|
+
EntryTypes.EVERYTHING_TYPE,
|
|
84
|
+
EntryTypes.FILE_DIR_TYPE,
|
|
85
|
+
EntryTypes.FILE_TYPE
|
|
86
|
+
]);
|
|
87
|
+
var isNormalFlowError = (error) => NORMAL_FLOW_ERRORS.has(error.code);
|
|
88
|
+
var wantBigintFsStats = process.platform === "win32";
|
|
89
|
+
var emptyFn = (_entryInfo) => true;
|
|
90
|
+
var normalizeFilter = (filter) => {
|
|
91
|
+
if (filter === void 0)
|
|
92
|
+
return emptyFn;
|
|
93
|
+
if (typeof filter === "function")
|
|
94
|
+
return filter;
|
|
95
|
+
if (typeof filter === "string") {
|
|
96
|
+
const fl = filter.trim();
|
|
97
|
+
return (entry) => entry.basename === fl;
|
|
98
|
+
}
|
|
99
|
+
if (Array.isArray(filter)) {
|
|
100
|
+
const trItems = filter.map((item) => item.trim());
|
|
101
|
+
return (entry) => trItems.some((f) => entry.basename === f);
|
|
102
|
+
}
|
|
103
|
+
return emptyFn;
|
|
104
|
+
};
|
|
105
|
+
var ReaddirpStream = class extends import_node_stream.Readable {
|
|
106
|
+
constructor(options = {}) {
|
|
107
|
+
super({
|
|
108
|
+
objectMode: true,
|
|
109
|
+
autoDestroy: true,
|
|
110
|
+
highWaterMark: options.highWaterMark
|
|
111
|
+
});
|
|
112
|
+
const opts = { ...defaultOptions, ...options };
|
|
113
|
+
const { root, type } = opts;
|
|
114
|
+
this._fileFilter = normalizeFilter(opts.fileFilter);
|
|
115
|
+
this._directoryFilter = normalizeFilter(opts.directoryFilter);
|
|
116
|
+
const statMethod = opts.lstat ? import_promises.lstat : import_promises.stat;
|
|
117
|
+
if (wantBigintFsStats) {
|
|
118
|
+
this._stat = (path3) => statMethod(path3, { bigint: true });
|
|
119
|
+
} else {
|
|
120
|
+
this._stat = statMethod;
|
|
121
|
+
}
|
|
122
|
+
this._maxDepth = opts.depth ?? defaultOptions.depth;
|
|
123
|
+
this._wantsDir = type ? DIR_TYPES.has(type) : false;
|
|
124
|
+
this._wantsFile = type ? FILE_TYPES.has(type) : false;
|
|
125
|
+
this._wantsEverything = type === EntryTypes.EVERYTHING_TYPE;
|
|
126
|
+
this._root = (0, import_node_path.resolve)(root);
|
|
127
|
+
this._isDirent = !opts.alwaysStat;
|
|
128
|
+
this._statsProp = this._isDirent ? "dirent" : "stats";
|
|
129
|
+
this._rdOptions = { encoding: "utf8", withFileTypes: this._isDirent };
|
|
130
|
+
this.parents = [this._exploreDir(root, 1)];
|
|
131
|
+
this.reading = false;
|
|
132
|
+
this.parent = void 0;
|
|
133
|
+
}
|
|
134
|
+
async _read(batch) {
|
|
135
|
+
if (this.reading)
|
|
136
|
+
return;
|
|
137
|
+
this.reading = true;
|
|
138
|
+
try {
|
|
139
|
+
while (!this.destroyed && batch > 0) {
|
|
140
|
+
const par = this.parent;
|
|
141
|
+
const fil = par && par.files;
|
|
142
|
+
if (fil && fil.length > 0) {
|
|
143
|
+
const { path: path3, depth } = par;
|
|
144
|
+
const slice = fil.splice(0, batch).map((dirent) => this._formatEntry(dirent, path3));
|
|
145
|
+
const awaited = await Promise.all(slice);
|
|
146
|
+
for (const entry of awaited) {
|
|
147
|
+
if (!entry)
|
|
148
|
+
continue;
|
|
149
|
+
if (this.destroyed)
|
|
150
|
+
return;
|
|
151
|
+
const entryType = await this._getEntryType(entry);
|
|
152
|
+
if (entryType === "directory" && this._directoryFilter(entry)) {
|
|
153
|
+
if (depth <= this._maxDepth) {
|
|
154
|
+
this.parents.push(this._exploreDir(entry.fullPath, depth + 1));
|
|
155
|
+
}
|
|
156
|
+
if (this._wantsDir) {
|
|
157
|
+
this.push(entry);
|
|
158
|
+
batch--;
|
|
159
|
+
}
|
|
160
|
+
} else if ((entryType === "file" || this._includeAsFile(entry)) && this._fileFilter(entry)) {
|
|
161
|
+
if (this._wantsFile) {
|
|
162
|
+
this.push(entry);
|
|
163
|
+
batch--;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else {
|
|
168
|
+
const parent = this.parents.pop();
|
|
169
|
+
if (!parent) {
|
|
170
|
+
this.push(null);
|
|
171
|
+
break;
|
|
172
|
+
}
|
|
173
|
+
this.parent = await parent;
|
|
174
|
+
if (this.destroyed)
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
} catch (error) {
|
|
179
|
+
this.destroy(error);
|
|
180
|
+
} finally {
|
|
181
|
+
this.reading = false;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
async _exploreDir(path3, depth) {
|
|
185
|
+
let files;
|
|
186
|
+
try {
|
|
187
|
+
files = await (0, import_promises.readdir)(path3, this._rdOptions);
|
|
188
|
+
} catch (error) {
|
|
189
|
+
this._onError(error);
|
|
190
|
+
}
|
|
191
|
+
return { files, depth, path: path3 };
|
|
192
|
+
}
|
|
193
|
+
async _formatEntry(dirent, path3) {
|
|
194
|
+
let entry;
|
|
195
|
+
const basename3 = this._isDirent ? dirent.name : dirent;
|
|
196
|
+
try {
|
|
197
|
+
const fullPath = (0, import_node_path.resolve)((0, import_node_path.join)(path3, basename3));
|
|
198
|
+
entry = { path: (0, import_node_path.relative)(this._root, fullPath), fullPath, basename: basename3 };
|
|
199
|
+
entry[this._statsProp] = this._isDirent ? dirent : await this._stat(fullPath);
|
|
200
|
+
} catch (err) {
|
|
201
|
+
this._onError(err);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
return entry;
|
|
205
|
+
}
|
|
206
|
+
_onError(err) {
|
|
207
|
+
if (isNormalFlowError(err) && !this.destroyed) {
|
|
208
|
+
this.emit("warn", err);
|
|
209
|
+
} else {
|
|
210
|
+
this.destroy(err);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
async _getEntryType(entry) {
|
|
214
|
+
if (!entry && this._statsProp in entry) {
|
|
215
|
+
return "";
|
|
216
|
+
}
|
|
217
|
+
const stats = entry[this._statsProp];
|
|
218
|
+
if (stats.isFile())
|
|
219
|
+
return "file";
|
|
220
|
+
if (stats.isDirectory())
|
|
221
|
+
return "directory";
|
|
222
|
+
if (stats && stats.isSymbolicLink()) {
|
|
223
|
+
const full = entry.fullPath;
|
|
224
|
+
try {
|
|
225
|
+
const entryRealPath = await (0, import_promises.realpath)(full);
|
|
226
|
+
const entryRealPathStats = await (0, import_promises.lstat)(entryRealPath);
|
|
227
|
+
if (entryRealPathStats.isFile()) {
|
|
228
|
+
return "file";
|
|
229
|
+
}
|
|
230
|
+
if (entryRealPathStats.isDirectory()) {
|
|
231
|
+
const len = entryRealPath.length;
|
|
232
|
+
if (full.startsWith(entryRealPath) && full.substr(len, 1) === import_node_path.sep) {
|
|
233
|
+
const recursiveError = new Error(`Circular symlink detected: "${full}" points to "${entryRealPath}"`);
|
|
234
|
+
recursiveError.code = RECURSIVE_ERROR_CODE;
|
|
235
|
+
return this._onError(recursiveError);
|
|
236
|
+
}
|
|
237
|
+
return "directory";
|
|
238
|
+
}
|
|
239
|
+
} catch (error) {
|
|
240
|
+
this._onError(error);
|
|
241
|
+
return "";
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
_includeAsFile(entry) {
|
|
246
|
+
const stats = entry && entry[this._statsProp];
|
|
247
|
+
return stats && this._wantsEverything && !stats.isDirectory();
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
function readdirp(root, options = {}) {
|
|
251
|
+
let type = options.entryType || options.type;
|
|
252
|
+
if (type === "both")
|
|
253
|
+
type = EntryTypes.FILE_DIR_TYPE;
|
|
254
|
+
if (type)
|
|
255
|
+
options.type = type;
|
|
256
|
+
if (!root) {
|
|
257
|
+
throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)");
|
|
258
|
+
} else if (typeof root !== "string") {
|
|
259
|
+
throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)");
|
|
260
|
+
} else if (type && !ALL_TYPES.includes(type)) {
|
|
261
|
+
throw new Error(`readdirp: Invalid type passed. Use one of ${ALL_TYPES.join(", ")}`);
|
|
262
|
+
}
|
|
263
|
+
options.root = root;
|
|
264
|
+
return new ReaddirpStream(options);
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// node_modules/chokidar/esm/handler.js
|
|
268
|
+
var import_fs = require("fs");
|
|
269
|
+
var import_promises2 = require("fs/promises");
|
|
270
|
+
var sysPath = __toESM(require("path"), 1);
|
|
271
|
+
var import_os = require("os");
|
|
272
|
+
var STR_DATA = "data";
|
|
273
|
+
var STR_END = "end";
|
|
274
|
+
var STR_CLOSE = "close";
|
|
275
|
+
var EMPTY_FN = () => {
|
|
276
|
+
};
|
|
277
|
+
var pl = process.platform;
|
|
278
|
+
var isWindows = pl === "win32";
|
|
279
|
+
var isMacos = pl === "darwin";
|
|
280
|
+
var isLinux = pl === "linux";
|
|
281
|
+
var isFreeBSD = pl === "freebsd";
|
|
282
|
+
var isIBMi = (0, import_os.type)() === "OS400";
|
|
283
|
+
var EVENTS = {
|
|
284
|
+
ALL: "all",
|
|
285
|
+
READY: "ready",
|
|
286
|
+
ADD: "add",
|
|
287
|
+
CHANGE: "change",
|
|
288
|
+
ADD_DIR: "addDir",
|
|
289
|
+
UNLINK: "unlink",
|
|
290
|
+
UNLINK_DIR: "unlinkDir",
|
|
291
|
+
RAW: "raw",
|
|
292
|
+
ERROR: "error"
|
|
293
|
+
};
|
|
294
|
+
var EV = EVENTS;
|
|
295
|
+
var THROTTLE_MODE_WATCH = "watch";
|
|
296
|
+
var statMethods = { lstat: import_promises2.lstat, stat: import_promises2.stat };
|
|
297
|
+
var KEY_LISTENERS = "listeners";
|
|
298
|
+
var KEY_ERR = "errHandlers";
|
|
299
|
+
var KEY_RAW = "rawEmitters";
|
|
300
|
+
var HANDLER_KEYS = [KEY_LISTENERS, KEY_ERR, KEY_RAW];
|
|
301
|
+
var binaryExtensions = /* @__PURE__ */ new Set([
|
|
302
|
+
"3dm",
|
|
303
|
+
"3ds",
|
|
304
|
+
"3g2",
|
|
305
|
+
"3gp",
|
|
306
|
+
"7z",
|
|
307
|
+
"a",
|
|
308
|
+
"aac",
|
|
309
|
+
"adp",
|
|
310
|
+
"afdesign",
|
|
311
|
+
"afphoto",
|
|
312
|
+
"afpub",
|
|
313
|
+
"ai",
|
|
314
|
+
"aif",
|
|
315
|
+
"aiff",
|
|
316
|
+
"alz",
|
|
317
|
+
"ape",
|
|
318
|
+
"apk",
|
|
319
|
+
"appimage",
|
|
320
|
+
"ar",
|
|
321
|
+
"arj",
|
|
322
|
+
"asf",
|
|
323
|
+
"au",
|
|
324
|
+
"avi",
|
|
325
|
+
"bak",
|
|
326
|
+
"baml",
|
|
327
|
+
"bh",
|
|
328
|
+
"bin",
|
|
329
|
+
"bk",
|
|
330
|
+
"bmp",
|
|
331
|
+
"btif",
|
|
332
|
+
"bz2",
|
|
333
|
+
"bzip2",
|
|
334
|
+
"cab",
|
|
335
|
+
"caf",
|
|
336
|
+
"cgm",
|
|
337
|
+
"class",
|
|
338
|
+
"cmx",
|
|
339
|
+
"cpio",
|
|
340
|
+
"cr2",
|
|
341
|
+
"cur",
|
|
342
|
+
"dat",
|
|
343
|
+
"dcm",
|
|
344
|
+
"deb",
|
|
345
|
+
"dex",
|
|
346
|
+
"djvu",
|
|
347
|
+
"dll",
|
|
348
|
+
"dmg",
|
|
349
|
+
"dng",
|
|
350
|
+
"doc",
|
|
351
|
+
"docm",
|
|
352
|
+
"docx",
|
|
353
|
+
"dot",
|
|
354
|
+
"dotm",
|
|
355
|
+
"dra",
|
|
356
|
+
"DS_Store",
|
|
357
|
+
"dsk",
|
|
358
|
+
"dts",
|
|
359
|
+
"dtshd",
|
|
360
|
+
"dvb",
|
|
361
|
+
"dwg",
|
|
362
|
+
"dxf",
|
|
363
|
+
"ecelp4800",
|
|
364
|
+
"ecelp7470",
|
|
365
|
+
"ecelp9600",
|
|
366
|
+
"egg",
|
|
367
|
+
"eol",
|
|
368
|
+
"eot",
|
|
369
|
+
"epub",
|
|
370
|
+
"exe",
|
|
371
|
+
"f4v",
|
|
372
|
+
"fbs",
|
|
373
|
+
"fh",
|
|
374
|
+
"fla",
|
|
375
|
+
"flac",
|
|
376
|
+
"flatpak",
|
|
377
|
+
"fli",
|
|
378
|
+
"flv",
|
|
379
|
+
"fpx",
|
|
380
|
+
"fst",
|
|
381
|
+
"fvt",
|
|
382
|
+
"g3",
|
|
383
|
+
"gh",
|
|
384
|
+
"gif",
|
|
385
|
+
"graffle",
|
|
386
|
+
"gz",
|
|
387
|
+
"gzip",
|
|
388
|
+
"h261",
|
|
389
|
+
"h263",
|
|
390
|
+
"h264",
|
|
391
|
+
"icns",
|
|
392
|
+
"ico",
|
|
393
|
+
"ief",
|
|
394
|
+
"img",
|
|
395
|
+
"ipa",
|
|
396
|
+
"iso",
|
|
397
|
+
"jar",
|
|
398
|
+
"jpeg",
|
|
399
|
+
"jpg",
|
|
400
|
+
"jpgv",
|
|
401
|
+
"jpm",
|
|
402
|
+
"jxr",
|
|
403
|
+
"key",
|
|
404
|
+
"ktx",
|
|
405
|
+
"lha",
|
|
406
|
+
"lib",
|
|
407
|
+
"lvp",
|
|
408
|
+
"lz",
|
|
409
|
+
"lzh",
|
|
410
|
+
"lzma",
|
|
411
|
+
"lzo",
|
|
412
|
+
"m3u",
|
|
413
|
+
"m4a",
|
|
414
|
+
"m4v",
|
|
415
|
+
"mar",
|
|
416
|
+
"mdi",
|
|
417
|
+
"mht",
|
|
418
|
+
"mid",
|
|
419
|
+
"midi",
|
|
420
|
+
"mj2",
|
|
421
|
+
"mka",
|
|
422
|
+
"mkv",
|
|
423
|
+
"mmr",
|
|
424
|
+
"mng",
|
|
425
|
+
"mobi",
|
|
426
|
+
"mov",
|
|
427
|
+
"movie",
|
|
428
|
+
"mp3",
|
|
429
|
+
"mp4",
|
|
430
|
+
"mp4a",
|
|
431
|
+
"mpeg",
|
|
432
|
+
"mpg",
|
|
433
|
+
"mpga",
|
|
434
|
+
"mxu",
|
|
435
|
+
"nef",
|
|
436
|
+
"npx",
|
|
437
|
+
"numbers",
|
|
438
|
+
"nupkg",
|
|
439
|
+
"o",
|
|
440
|
+
"odp",
|
|
441
|
+
"ods",
|
|
442
|
+
"odt",
|
|
443
|
+
"oga",
|
|
444
|
+
"ogg",
|
|
445
|
+
"ogv",
|
|
446
|
+
"otf",
|
|
447
|
+
"ott",
|
|
448
|
+
"pages",
|
|
449
|
+
"pbm",
|
|
450
|
+
"pcx",
|
|
451
|
+
"pdb",
|
|
452
|
+
"pdf",
|
|
453
|
+
"pea",
|
|
454
|
+
"pgm",
|
|
455
|
+
"pic",
|
|
456
|
+
"png",
|
|
457
|
+
"pnm",
|
|
458
|
+
"pot",
|
|
459
|
+
"potm",
|
|
460
|
+
"potx",
|
|
461
|
+
"ppa",
|
|
462
|
+
"ppam",
|
|
463
|
+
"ppm",
|
|
464
|
+
"pps",
|
|
465
|
+
"ppsm",
|
|
466
|
+
"ppsx",
|
|
467
|
+
"ppt",
|
|
468
|
+
"pptm",
|
|
469
|
+
"pptx",
|
|
470
|
+
"psd",
|
|
471
|
+
"pya",
|
|
472
|
+
"pyc",
|
|
473
|
+
"pyo",
|
|
474
|
+
"pyv",
|
|
475
|
+
"qt",
|
|
476
|
+
"rar",
|
|
477
|
+
"ras",
|
|
478
|
+
"raw",
|
|
479
|
+
"resources",
|
|
480
|
+
"rgb",
|
|
481
|
+
"rip",
|
|
482
|
+
"rlc",
|
|
483
|
+
"rmf",
|
|
484
|
+
"rmvb",
|
|
485
|
+
"rpm",
|
|
486
|
+
"rtf",
|
|
487
|
+
"rz",
|
|
488
|
+
"s3m",
|
|
489
|
+
"s7z",
|
|
490
|
+
"scpt",
|
|
491
|
+
"sgi",
|
|
492
|
+
"shar",
|
|
493
|
+
"snap",
|
|
494
|
+
"sil",
|
|
495
|
+
"sketch",
|
|
496
|
+
"slk",
|
|
497
|
+
"smv",
|
|
498
|
+
"snk",
|
|
499
|
+
"so",
|
|
500
|
+
"stl",
|
|
501
|
+
"suo",
|
|
502
|
+
"sub",
|
|
503
|
+
"swf",
|
|
504
|
+
"tar",
|
|
505
|
+
"tbz",
|
|
506
|
+
"tbz2",
|
|
507
|
+
"tga",
|
|
508
|
+
"tgz",
|
|
509
|
+
"thmx",
|
|
510
|
+
"tif",
|
|
511
|
+
"tiff",
|
|
512
|
+
"tlz",
|
|
513
|
+
"ttc",
|
|
514
|
+
"ttf",
|
|
515
|
+
"txz",
|
|
516
|
+
"udf",
|
|
517
|
+
"uvh",
|
|
518
|
+
"uvi",
|
|
519
|
+
"uvm",
|
|
520
|
+
"uvp",
|
|
521
|
+
"uvs",
|
|
522
|
+
"uvu",
|
|
523
|
+
"viv",
|
|
524
|
+
"vob",
|
|
525
|
+
"war",
|
|
526
|
+
"wav",
|
|
527
|
+
"wax",
|
|
528
|
+
"wbmp",
|
|
529
|
+
"wdp",
|
|
530
|
+
"weba",
|
|
531
|
+
"webm",
|
|
532
|
+
"webp",
|
|
533
|
+
"whl",
|
|
534
|
+
"wim",
|
|
535
|
+
"wm",
|
|
536
|
+
"wma",
|
|
537
|
+
"wmv",
|
|
538
|
+
"wmx",
|
|
539
|
+
"woff",
|
|
540
|
+
"woff2",
|
|
541
|
+
"wrm",
|
|
542
|
+
"wvx",
|
|
543
|
+
"xbm",
|
|
544
|
+
"xif",
|
|
545
|
+
"xla",
|
|
546
|
+
"xlam",
|
|
547
|
+
"xls",
|
|
548
|
+
"xlsb",
|
|
549
|
+
"xlsm",
|
|
550
|
+
"xlsx",
|
|
551
|
+
"xlt",
|
|
552
|
+
"xltm",
|
|
553
|
+
"xltx",
|
|
554
|
+
"xm",
|
|
555
|
+
"xmind",
|
|
556
|
+
"xpi",
|
|
557
|
+
"xpm",
|
|
558
|
+
"xwd",
|
|
559
|
+
"xz",
|
|
560
|
+
"z",
|
|
561
|
+
"zip",
|
|
562
|
+
"zipx"
|
|
563
|
+
]);
|
|
564
|
+
var isBinaryPath = (filePath) => binaryExtensions.has(sysPath.extname(filePath).slice(1).toLowerCase());
|
|
565
|
+
var foreach = (val, fn) => {
|
|
566
|
+
if (val instanceof Set) {
|
|
567
|
+
val.forEach(fn);
|
|
568
|
+
} else {
|
|
569
|
+
fn(val);
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
var addAndConvert = (main, prop, item) => {
|
|
573
|
+
let container = main[prop];
|
|
574
|
+
if (!(container instanceof Set)) {
|
|
575
|
+
main[prop] = container = /* @__PURE__ */ new Set([container]);
|
|
576
|
+
}
|
|
577
|
+
container.add(item);
|
|
578
|
+
};
|
|
579
|
+
var clearItem = (cont) => (key) => {
|
|
580
|
+
const set = cont[key];
|
|
581
|
+
if (set instanceof Set) {
|
|
582
|
+
set.clear();
|
|
583
|
+
} else {
|
|
584
|
+
delete cont[key];
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
var delFromSet = (main, prop, item) => {
|
|
588
|
+
const container = main[prop];
|
|
589
|
+
if (container instanceof Set) {
|
|
590
|
+
container.delete(item);
|
|
591
|
+
} else if (container === item) {
|
|
592
|
+
delete main[prop];
|
|
593
|
+
}
|
|
594
|
+
};
|
|
595
|
+
var isEmptySet = (val) => val instanceof Set ? val.size === 0 : !val;
|
|
596
|
+
var FsWatchInstances = /* @__PURE__ */ new Map();
|
|
597
|
+
function createFsWatchInstance(path3, options, listener, errHandler, emitRaw) {
|
|
598
|
+
const handleEvent = (rawEvent, evPath) => {
|
|
599
|
+
listener(path3);
|
|
600
|
+
emitRaw(rawEvent, evPath, { watchedPath: path3 });
|
|
601
|
+
if (evPath && path3 !== evPath) {
|
|
602
|
+
fsWatchBroadcast(sysPath.resolve(path3, evPath), KEY_LISTENERS, sysPath.join(path3, evPath));
|
|
603
|
+
}
|
|
604
|
+
};
|
|
605
|
+
try {
|
|
606
|
+
return (0, import_fs.watch)(path3, {
|
|
607
|
+
persistent: options.persistent
|
|
608
|
+
}, handleEvent);
|
|
609
|
+
} catch (error) {
|
|
610
|
+
errHandler(error);
|
|
611
|
+
return void 0;
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
var fsWatchBroadcast = (fullPath, listenerType, val1, val2, val3) => {
|
|
615
|
+
const cont = FsWatchInstances.get(fullPath);
|
|
616
|
+
if (!cont)
|
|
617
|
+
return;
|
|
618
|
+
foreach(cont[listenerType], (listener) => {
|
|
619
|
+
listener(val1, val2, val3);
|
|
620
|
+
});
|
|
621
|
+
};
|
|
622
|
+
var setFsWatchListener = (path3, fullPath, options, handlers) => {
|
|
623
|
+
const { listener, errHandler, rawEmitter } = handlers;
|
|
624
|
+
let cont = FsWatchInstances.get(fullPath);
|
|
625
|
+
let watcher;
|
|
626
|
+
if (!options.persistent) {
|
|
627
|
+
watcher = createFsWatchInstance(path3, options, listener, errHandler, rawEmitter);
|
|
628
|
+
if (!watcher)
|
|
629
|
+
return;
|
|
630
|
+
return watcher.close.bind(watcher);
|
|
631
|
+
}
|
|
632
|
+
if (cont) {
|
|
633
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
634
|
+
addAndConvert(cont, KEY_ERR, errHandler);
|
|
635
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
636
|
+
} else {
|
|
637
|
+
watcher = createFsWatchInstance(
|
|
638
|
+
path3,
|
|
639
|
+
options,
|
|
640
|
+
fsWatchBroadcast.bind(null, fullPath, KEY_LISTENERS),
|
|
641
|
+
errHandler,
|
|
642
|
+
// no need to use broadcast here
|
|
643
|
+
fsWatchBroadcast.bind(null, fullPath, KEY_RAW)
|
|
644
|
+
);
|
|
645
|
+
if (!watcher)
|
|
646
|
+
return;
|
|
647
|
+
watcher.on(EV.ERROR, async (error) => {
|
|
648
|
+
const broadcastErr = fsWatchBroadcast.bind(null, fullPath, KEY_ERR);
|
|
649
|
+
if (cont)
|
|
650
|
+
cont.watcherUnusable = true;
|
|
651
|
+
if (isWindows && error.code === "EPERM") {
|
|
652
|
+
try {
|
|
653
|
+
const fd = await (0, import_promises2.open)(path3, "r");
|
|
654
|
+
await fd.close();
|
|
655
|
+
broadcastErr(error);
|
|
656
|
+
} catch (err) {
|
|
657
|
+
}
|
|
658
|
+
} else {
|
|
659
|
+
broadcastErr(error);
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
cont = {
|
|
663
|
+
listeners: listener,
|
|
664
|
+
errHandlers: errHandler,
|
|
665
|
+
rawEmitters: rawEmitter,
|
|
666
|
+
watcher
|
|
667
|
+
};
|
|
668
|
+
FsWatchInstances.set(fullPath, cont);
|
|
669
|
+
}
|
|
670
|
+
return () => {
|
|
671
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
672
|
+
delFromSet(cont, KEY_ERR, errHandler);
|
|
673
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
674
|
+
if (isEmptySet(cont.listeners)) {
|
|
675
|
+
cont.watcher.close();
|
|
676
|
+
FsWatchInstances.delete(fullPath);
|
|
677
|
+
HANDLER_KEYS.forEach(clearItem(cont));
|
|
678
|
+
cont.watcher = void 0;
|
|
679
|
+
Object.freeze(cont);
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
var FsWatchFileInstances = /* @__PURE__ */ new Map();
|
|
684
|
+
var setFsWatchFileListener = (path3, fullPath, options, handlers) => {
|
|
685
|
+
const { listener, rawEmitter } = handlers;
|
|
686
|
+
let cont = FsWatchFileInstances.get(fullPath);
|
|
687
|
+
const copts = cont && cont.options;
|
|
688
|
+
if (copts && (copts.persistent < options.persistent || copts.interval > options.interval)) {
|
|
689
|
+
(0, import_fs.unwatchFile)(fullPath);
|
|
690
|
+
cont = void 0;
|
|
691
|
+
}
|
|
692
|
+
if (cont) {
|
|
693
|
+
addAndConvert(cont, KEY_LISTENERS, listener);
|
|
694
|
+
addAndConvert(cont, KEY_RAW, rawEmitter);
|
|
695
|
+
} else {
|
|
696
|
+
cont = {
|
|
697
|
+
listeners: listener,
|
|
698
|
+
rawEmitters: rawEmitter,
|
|
699
|
+
options,
|
|
700
|
+
watcher: (0, import_fs.watchFile)(fullPath, options, (curr, prev) => {
|
|
701
|
+
foreach(cont.rawEmitters, (rawEmitter2) => {
|
|
702
|
+
rawEmitter2(EV.CHANGE, fullPath, { curr, prev });
|
|
703
|
+
});
|
|
704
|
+
const currmtime = curr.mtimeMs;
|
|
705
|
+
if (curr.size !== prev.size || currmtime > prev.mtimeMs || currmtime === 0) {
|
|
706
|
+
foreach(cont.listeners, (listener2) => listener2(path3, curr));
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
};
|
|
710
|
+
FsWatchFileInstances.set(fullPath, cont);
|
|
711
|
+
}
|
|
712
|
+
return () => {
|
|
713
|
+
delFromSet(cont, KEY_LISTENERS, listener);
|
|
714
|
+
delFromSet(cont, KEY_RAW, rawEmitter);
|
|
715
|
+
if (isEmptySet(cont.listeners)) {
|
|
716
|
+
FsWatchFileInstances.delete(fullPath);
|
|
717
|
+
(0, import_fs.unwatchFile)(fullPath);
|
|
718
|
+
cont.options = cont.watcher = void 0;
|
|
719
|
+
Object.freeze(cont);
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
};
|
|
723
|
+
var NodeFsHandler = class {
|
|
724
|
+
constructor(fsW) {
|
|
725
|
+
this.fsw = fsW;
|
|
726
|
+
this._boundHandleError = (error) => fsW._handleError(error);
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Watch file for changes with fs_watchFile or fs_watch.
|
|
730
|
+
* @param path to file or dir
|
|
731
|
+
* @param listener on fs change
|
|
732
|
+
* @returns closer for the watcher instance
|
|
733
|
+
*/
|
|
734
|
+
_watchWithNodeFs(path3, listener) {
|
|
735
|
+
const opts = this.fsw.options;
|
|
736
|
+
const directory = sysPath.dirname(path3);
|
|
737
|
+
const basename3 = sysPath.basename(path3);
|
|
738
|
+
const parent = this.fsw._getWatchedDir(directory);
|
|
739
|
+
parent.add(basename3);
|
|
740
|
+
const absolutePath = sysPath.resolve(path3);
|
|
741
|
+
const options = {
|
|
742
|
+
persistent: opts.persistent
|
|
743
|
+
};
|
|
744
|
+
if (!listener)
|
|
745
|
+
listener = EMPTY_FN;
|
|
746
|
+
let closer;
|
|
747
|
+
if (opts.usePolling) {
|
|
748
|
+
const enableBin = opts.interval !== opts.binaryInterval;
|
|
749
|
+
options.interval = enableBin && isBinaryPath(basename3) ? opts.binaryInterval : opts.interval;
|
|
750
|
+
closer = setFsWatchFileListener(path3, absolutePath, options, {
|
|
751
|
+
listener,
|
|
752
|
+
rawEmitter: this.fsw._emitRaw
|
|
753
|
+
});
|
|
754
|
+
} else {
|
|
755
|
+
closer = setFsWatchListener(path3, absolutePath, options, {
|
|
756
|
+
listener,
|
|
757
|
+
errHandler: this._boundHandleError,
|
|
758
|
+
rawEmitter: this.fsw._emitRaw
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
return closer;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* Watch a file and emit add event if warranted.
|
|
765
|
+
* @returns closer for the watcher instance
|
|
766
|
+
*/
|
|
767
|
+
_handleFile(file, stats, initialAdd) {
|
|
768
|
+
if (this.fsw.closed) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
const dirname3 = sysPath.dirname(file);
|
|
772
|
+
const basename3 = sysPath.basename(file);
|
|
773
|
+
const parent = this.fsw._getWatchedDir(dirname3);
|
|
774
|
+
let prevStats = stats;
|
|
775
|
+
if (parent.has(basename3))
|
|
776
|
+
return;
|
|
777
|
+
const listener = async (path3, newStats) => {
|
|
778
|
+
if (!this.fsw._throttle(THROTTLE_MODE_WATCH, file, 5))
|
|
779
|
+
return;
|
|
780
|
+
if (!newStats || newStats.mtimeMs === 0) {
|
|
781
|
+
try {
|
|
782
|
+
const newStats2 = await (0, import_promises2.stat)(file);
|
|
783
|
+
if (this.fsw.closed)
|
|
784
|
+
return;
|
|
785
|
+
const at = newStats2.atimeMs;
|
|
786
|
+
const mt = newStats2.mtimeMs;
|
|
787
|
+
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
|
|
788
|
+
this.fsw._emit(EV.CHANGE, file, newStats2);
|
|
789
|
+
}
|
|
790
|
+
if ((isMacos || isLinux || isFreeBSD) && prevStats.ino !== newStats2.ino) {
|
|
791
|
+
this.fsw._closeFile(path3);
|
|
792
|
+
prevStats = newStats2;
|
|
793
|
+
const closer2 = this._watchWithNodeFs(file, listener);
|
|
794
|
+
if (closer2)
|
|
795
|
+
this.fsw._addPathCloser(path3, closer2);
|
|
796
|
+
} else {
|
|
797
|
+
prevStats = newStats2;
|
|
798
|
+
}
|
|
799
|
+
} catch (error) {
|
|
800
|
+
this.fsw._remove(dirname3, basename3);
|
|
801
|
+
}
|
|
802
|
+
} else if (parent.has(basename3)) {
|
|
803
|
+
const at = newStats.atimeMs;
|
|
804
|
+
const mt = newStats.mtimeMs;
|
|
805
|
+
if (!at || at <= mt || mt !== prevStats.mtimeMs) {
|
|
806
|
+
this.fsw._emit(EV.CHANGE, file, newStats);
|
|
807
|
+
}
|
|
808
|
+
prevStats = newStats;
|
|
809
|
+
}
|
|
810
|
+
};
|
|
811
|
+
const closer = this._watchWithNodeFs(file, listener);
|
|
812
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && this.fsw._isntIgnored(file)) {
|
|
813
|
+
if (!this.fsw._throttle(EV.ADD, file, 0))
|
|
814
|
+
return;
|
|
815
|
+
this.fsw._emit(EV.ADD, file, stats);
|
|
816
|
+
}
|
|
817
|
+
return closer;
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Handle symlinks encountered while reading a dir.
|
|
821
|
+
* @param entry returned by readdirp
|
|
822
|
+
* @param directory path of dir being read
|
|
823
|
+
* @param path of this item
|
|
824
|
+
* @param item basename of this item
|
|
825
|
+
* @returns true if no more processing is needed for this entry.
|
|
826
|
+
*/
|
|
827
|
+
async _handleSymlink(entry, directory, path3, item) {
|
|
828
|
+
if (this.fsw.closed) {
|
|
829
|
+
return;
|
|
830
|
+
}
|
|
831
|
+
const full = entry.fullPath;
|
|
832
|
+
const dir = this.fsw._getWatchedDir(directory);
|
|
833
|
+
if (!this.fsw.options.followSymlinks) {
|
|
834
|
+
this.fsw._incrReadyCount();
|
|
835
|
+
let linkPath;
|
|
836
|
+
try {
|
|
837
|
+
linkPath = await (0, import_promises2.realpath)(path3);
|
|
838
|
+
} catch (e) {
|
|
839
|
+
this.fsw._emitReady();
|
|
840
|
+
return true;
|
|
841
|
+
}
|
|
842
|
+
if (this.fsw.closed)
|
|
843
|
+
return;
|
|
844
|
+
if (dir.has(item)) {
|
|
845
|
+
if (this.fsw._symlinkPaths.get(full) !== linkPath) {
|
|
846
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
847
|
+
this.fsw._emit(EV.CHANGE, path3, entry.stats);
|
|
848
|
+
}
|
|
849
|
+
} else {
|
|
850
|
+
dir.add(item);
|
|
851
|
+
this.fsw._symlinkPaths.set(full, linkPath);
|
|
852
|
+
this.fsw._emit(EV.ADD, path3, entry.stats);
|
|
853
|
+
}
|
|
854
|
+
this.fsw._emitReady();
|
|
855
|
+
return true;
|
|
856
|
+
}
|
|
857
|
+
if (this.fsw._symlinkPaths.has(full)) {
|
|
858
|
+
return true;
|
|
859
|
+
}
|
|
860
|
+
this.fsw._symlinkPaths.set(full, true);
|
|
861
|
+
}
|
|
862
|
+
_handleRead(directory, initialAdd, wh, target, dir, depth, throttler) {
|
|
863
|
+
directory = sysPath.join(directory, "");
|
|
864
|
+
throttler = this.fsw._throttle("readdir", directory, 1e3);
|
|
865
|
+
if (!throttler)
|
|
866
|
+
return;
|
|
867
|
+
const previous = this.fsw._getWatchedDir(wh.path);
|
|
868
|
+
const current = /* @__PURE__ */ new Set();
|
|
869
|
+
let stream = this.fsw._readdirp(directory, {
|
|
870
|
+
fileFilter: (entry) => wh.filterPath(entry),
|
|
871
|
+
directoryFilter: (entry) => wh.filterDir(entry)
|
|
872
|
+
});
|
|
873
|
+
if (!stream)
|
|
874
|
+
return;
|
|
875
|
+
stream.on(STR_DATA, async (entry) => {
|
|
876
|
+
if (this.fsw.closed) {
|
|
877
|
+
stream = void 0;
|
|
878
|
+
return;
|
|
879
|
+
}
|
|
880
|
+
const item = entry.path;
|
|
881
|
+
let path3 = sysPath.join(directory, item);
|
|
882
|
+
current.add(item);
|
|
883
|
+
if (entry.stats.isSymbolicLink() && await this._handleSymlink(entry, directory, path3, item)) {
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
if (this.fsw.closed) {
|
|
887
|
+
stream = void 0;
|
|
888
|
+
return;
|
|
889
|
+
}
|
|
890
|
+
if (item === target || !target && !previous.has(item)) {
|
|
891
|
+
this.fsw._incrReadyCount();
|
|
892
|
+
path3 = sysPath.join(dir, sysPath.relative(dir, path3));
|
|
893
|
+
this._addToNodeFs(path3, initialAdd, wh, depth + 1);
|
|
894
|
+
}
|
|
895
|
+
}).on(EV.ERROR, this._boundHandleError);
|
|
896
|
+
return new Promise((resolve3, reject) => {
|
|
897
|
+
if (!stream)
|
|
898
|
+
return reject();
|
|
899
|
+
stream.once(STR_END, () => {
|
|
900
|
+
if (this.fsw.closed) {
|
|
901
|
+
stream = void 0;
|
|
902
|
+
return;
|
|
903
|
+
}
|
|
904
|
+
const wasThrottled = throttler ? throttler.clear() : false;
|
|
905
|
+
resolve3(void 0);
|
|
906
|
+
previous.getChildren().filter((item) => {
|
|
907
|
+
return item !== directory && !current.has(item);
|
|
908
|
+
}).forEach((item) => {
|
|
909
|
+
this.fsw._remove(directory, item);
|
|
910
|
+
});
|
|
911
|
+
stream = void 0;
|
|
912
|
+
if (wasThrottled)
|
|
913
|
+
this._handleRead(directory, false, wh, target, dir, depth, throttler);
|
|
914
|
+
});
|
|
915
|
+
});
|
|
916
|
+
}
|
|
917
|
+
/**
|
|
918
|
+
* Read directory to add / remove files from `@watched` list and re-read it on change.
|
|
919
|
+
* @param dir fs path
|
|
920
|
+
* @param stats
|
|
921
|
+
* @param initialAdd
|
|
922
|
+
* @param depth relative to user-supplied path
|
|
923
|
+
* @param target child path targeted for watch
|
|
924
|
+
* @param wh Common watch helpers for this path
|
|
925
|
+
* @param realpath
|
|
926
|
+
* @returns closer for the watcher instance.
|
|
927
|
+
*/
|
|
928
|
+
async _handleDir(dir, stats, initialAdd, depth, target, wh, realpath2) {
|
|
929
|
+
const parentDir = this.fsw._getWatchedDir(sysPath.dirname(dir));
|
|
930
|
+
const tracked = parentDir.has(sysPath.basename(dir));
|
|
931
|
+
if (!(initialAdd && this.fsw.options.ignoreInitial) && !target && !tracked) {
|
|
932
|
+
this.fsw._emit(EV.ADD_DIR, dir, stats);
|
|
933
|
+
}
|
|
934
|
+
parentDir.add(sysPath.basename(dir));
|
|
935
|
+
this.fsw._getWatchedDir(dir);
|
|
936
|
+
let throttler;
|
|
937
|
+
let closer;
|
|
938
|
+
const oDepth = this.fsw.options.depth;
|
|
939
|
+
if ((oDepth == null || depth <= oDepth) && !this.fsw._symlinkPaths.has(realpath2)) {
|
|
940
|
+
if (!target) {
|
|
941
|
+
await this._handleRead(dir, initialAdd, wh, target, dir, depth, throttler);
|
|
942
|
+
if (this.fsw.closed)
|
|
943
|
+
return;
|
|
944
|
+
}
|
|
945
|
+
closer = this._watchWithNodeFs(dir, (dirPath, stats2) => {
|
|
946
|
+
if (stats2 && stats2.mtimeMs === 0)
|
|
947
|
+
return;
|
|
948
|
+
this._handleRead(dirPath, false, wh, target, dir, depth, throttler);
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
return closer;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* Handle added file, directory, or glob pattern.
|
|
955
|
+
* Delegates call to _handleFile / _handleDir after checks.
|
|
956
|
+
* @param path to file or ir
|
|
957
|
+
* @param initialAdd was the file added at watch instantiation?
|
|
958
|
+
* @param priorWh depth relative to user-supplied path
|
|
959
|
+
* @param depth Child path actually targeted for watch
|
|
960
|
+
* @param target Child path actually targeted for watch
|
|
961
|
+
*/
|
|
962
|
+
async _addToNodeFs(path3, initialAdd, priorWh, depth, target) {
|
|
963
|
+
const ready = this.fsw._emitReady;
|
|
964
|
+
if (this.fsw._isIgnored(path3) || this.fsw.closed) {
|
|
965
|
+
ready();
|
|
966
|
+
return false;
|
|
967
|
+
}
|
|
968
|
+
const wh = this.fsw._getWatchHelpers(path3);
|
|
969
|
+
if (priorWh) {
|
|
970
|
+
wh.filterPath = (entry) => priorWh.filterPath(entry);
|
|
971
|
+
wh.filterDir = (entry) => priorWh.filterDir(entry);
|
|
972
|
+
}
|
|
973
|
+
try {
|
|
974
|
+
const stats = await statMethods[wh.statMethod](wh.watchPath);
|
|
975
|
+
if (this.fsw.closed)
|
|
976
|
+
return;
|
|
977
|
+
if (this.fsw._isIgnored(wh.watchPath, stats)) {
|
|
978
|
+
ready();
|
|
979
|
+
return false;
|
|
980
|
+
}
|
|
981
|
+
const follow = this.fsw.options.followSymlinks;
|
|
982
|
+
let closer;
|
|
983
|
+
if (stats.isDirectory()) {
|
|
984
|
+
const absPath = sysPath.resolve(path3);
|
|
985
|
+
const targetPath = follow ? await (0, import_promises2.realpath)(path3) : path3;
|
|
986
|
+
if (this.fsw.closed)
|
|
987
|
+
return;
|
|
988
|
+
closer = await this._handleDir(wh.watchPath, stats, initialAdd, depth, target, wh, targetPath);
|
|
989
|
+
if (this.fsw.closed)
|
|
990
|
+
return;
|
|
991
|
+
if (absPath !== targetPath && targetPath !== void 0) {
|
|
992
|
+
this.fsw._symlinkPaths.set(absPath, targetPath);
|
|
993
|
+
}
|
|
994
|
+
} else if (stats.isSymbolicLink()) {
|
|
995
|
+
const targetPath = follow ? await (0, import_promises2.realpath)(path3) : path3;
|
|
996
|
+
if (this.fsw.closed)
|
|
997
|
+
return;
|
|
998
|
+
const parent = sysPath.dirname(wh.watchPath);
|
|
999
|
+
this.fsw._getWatchedDir(parent).add(wh.watchPath);
|
|
1000
|
+
this.fsw._emit(EV.ADD, wh.watchPath, stats);
|
|
1001
|
+
closer = await this._handleDir(parent, stats, initialAdd, depth, path3, wh, targetPath);
|
|
1002
|
+
if (this.fsw.closed)
|
|
1003
|
+
return;
|
|
1004
|
+
if (targetPath !== void 0) {
|
|
1005
|
+
this.fsw._symlinkPaths.set(sysPath.resolve(path3), targetPath);
|
|
1006
|
+
}
|
|
1007
|
+
} else {
|
|
1008
|
+
closer = this._handleFile(wh.watchPath, stats, initialAdd);
|
|
1009
|
+
}
|
|
1010
|
+
ready();
|
|
1011
|
+
if (closer)
|
|
1012
|
+
this.fsw._addPathCloser(path3, closer);
|
|
1013
|
+
return false;
|
|
1014
|
+
} catch (error) {
|
|
1015
|
+
if (this.fsw._handleError(error)) {
|
|
1016
|
+
ready();
|
|
1017
|
+
return path3;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
};
|
|
1022
|
+
|
|
1023
|
+
// node_modules/chokidar/esm/index.js
|
|
1024
|
+
var SLASH = "/";
|
|
1025
|
+
var SLASH_SLASH = "//";
|
|
1026
|
+
var ONE_DOT = ".";
|
|
1027
|
+
var TWO_DOTS = "..";
|
|
1028
|
+
var STRING_TYPE = "string";
|
|
1029
|
+
var BACK_SLASH_RE = /\\/g;
|
|
1030
|
+
var DOUBLE_SLASH_RE = /\/\//;
|
|
1031
|
+
var DOT_RE = /\..*\.(sw[px])$|~$|\.subl.*\.tmp/;
|
|
1032
|
+
var REPLACER_RE = /^\.[/\\]/;
|
|
1033
|
+
function arrify(item) {
|
|
1034
|
+
return Array.isArray(item) ? item : [item];
|
|
1035
|
+
}
|
|
1036
|
+
var isMatcherObject = (matcher) => typeof matcher === "object" && matcher !== null && !(matcher instanceof RegExp);
|
|
1037
|
+
function createPattern(matcher) {
|
|
1038
|
+
if (typeof matcher === "function")
|
|
1039
|
+
return matcher;
|
|
1040
|
+
if (typeof matcher === "string")
|
|
1041
|
+
return (string) => matcher === string;
|
|
1042
|
+
if (matcher instanceof RegExp)
|
|
1043
|
+
return (string) => matcher.test(string);
|
|
1044
|
+
if (typeof matcher === "object" && matcher !== null) {
|
|
1045
|
+
return (string) => {
|
|
1046
|
+
if (matcher.path === string)
|
|
1047
|
+
return true;
|
|
1048
|
+
if (matcher.recursive) {
|
|
1049
|
+
const relative3 = sysPath2.relative(matcher.path, string);
|
|
1050
|
+
if (!relative3) {
|
|
1051
|
+
return false;
|
|
1052
|
+
}
|
|
1053
|
+
return !relative3.startsWith("..") && !sysPath2.isAbsolute(relative3);
|
|
1054
|
+
}
|
|
1055
|
+
return false;
|
|
1056
|
+
};
|
|
1057
|
+
}
|
|
1058
|
+
return () => false;
|
|
1059
|
+
}
|
|
1060
|
+
function normalizePath(path3) {
|
|
1061
|
+
if (typeof path3 !== "string")
|
|
1062
|
+
throw new Error("string expected");
|
|
1063
|
+
path3 = sysPath2.normalize(path3);
|
|
1064
|
+
path3 = path3.replace(/\\/g, "/");
|
|
1065
|
+
let prepend = false;
|
|
1066
|
+
if (path3.startsWith("//"))
|
|
1067
|
+
prepend = true;
|
|
1068
|
+
const DOUBLE_SLASH_RE2 = /\/\//;
|
|
1069
|
+
while (path3.match(DOUBLE_SLASH_RE2))
|
|
1070
|
+
path3 = path3.replace(DOUBLE_SLASH_RE2, "/");
|
|
1071
|
+
if (prepend)
|
|
1072
|
+
path3 = "/" + path3;
|
|
1073
|
+
return path3;
|
|
1074
|
+
}
|
|
1075
|
+
function matchPatterns(patterns, testString, stats) {
|
|
1076
|
+
const path3 = normalizePath(testString);
|
|
1077
|
+
for (let index = 0; index < patterns.length; index++) {
|
|
1078
|
+
const pattern = patterns[index];
|
|
1079
|
+
if (pattern(path3, stats)) {
|
|
1080
|
+
return true;
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
return false;
|
|
1084
|
+
}
|
|
1085
|
+
function anymatch(matchers, testString) {
|
|
1086
|
+
if (matchers == null) {
|
|
1087
|
+
throw new TypeError("anymatch: specify first argument");
|
|
1088
|
+
}
|
|
1089
|
+
const matchersArray = arrify(matchers);
|
|
1090
|
+
const patterns = matchersArray.map((matcher) => createPattern(matcher));
|
|
1091
|
+
if (testString == null) {
|
|
1092
|
+
return (testString2, stats) => {
|
|
1093
|
+
return matchPatterns(patterns, testString2, stats);
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
return matchPatterns(patterns, testString);
|
|
1097
|
+
}
|
|
1098
|
+
var unifyPaths = (paths_) => {
|
|
1099
|
+
const paths = arrify(paths_).flat();
|
|
1100
|
+
if (!paths.every((p) => typeof p === STRING_TYPE)) {
|
|
1101
|
+
throw new TypeError(`Non-string provided as watch path: ${paths}`);
|
|
1102
|
+
}
|
|
1103
|
+
return paths.map(normalizePathToUnix);
|
|
1104
|
+
};
|
|
1105
|
+
var toUnix = (string) => {
|
|
1106
|
+
let str = string.replace(BACK_SLASH_RE, SLASH);
|
|
1107
|
+
let prepend = false;
|
|
1108
|
+
if (str.startsWith(SLASH_SLASH)) {
|
|
1109
|
+
prepend = true;
|
|
1110
|
+
}
|
|
1111
|
+
while (str.match(DOUBLE_SLASH_RE)) {
|
|
1112
|
+
str = str.replace(DOUBLE_SLASH_RE, SLASH);
|
|
1113
|
+
}
|
|
1114
|
+
if (prepend) {
|
|
1115
|
+
str = SLASH + str;
|
|
1116
|
+
}
|
|
1117
|
+
return str;
|
|
1118
|
+
};
|
|
1119
|
+
var normalizePathToUnix = (path3) => toUnix(sysPath2.normalize(toUnix(path3)));
|
|
1120
|
+
var normalizeIgnored = (cwd = "") => (path3) => {
|
|
1121
|
+
if (typeof path3 === "string") {
|
|
1122
|
+
return normalizePathToUnix(sysPath2.isAbsolute(path3) ? path3 : sysPath2.join(cwd, path3));
|
|
1123
|
+
} else {
|
|
1124
|
+
return path3;
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
var getAbsolutePath = (path3, cwd) => {
|
|
1128
|
+
if (sysPath2.isAbsolute(path3)) {
|
|
1129
|
+
return path3;
|
|
1130
|
+
}
|
|
1131
|
+
return sysPath2.join(cwd, path3);
|
|
1132
|
+
};
|
|
1133
|
+
var EMPTY_SET = Object.freeze(/* @__PURE__ */ new Set());
|
|
1134
|
+
var DirEntry = class {
|
|
1135
|
+
constructor(dir, removeWatcher) {
|
|
1136
|
+
this.path = dir;
|
|
1137
|
+
this._removeWatcher = removeWatcher;
|
|
1138
|
+
this.items = /* @__PURE__ */ new Set();
|
|
1139
|
+
}
|
|
1140
|
+
add(item) {
|
|
1141
|
+
const { items } = this;
|
|
1142
|
+
if (!items)
|
|
1143
|
+
return;
|
|
1144
|
+
if (item !== ONE_DOT && item !== TWO_DOTS)
|
|
1145
|
+
items.add(item);
|
|
1146
|
+
}
|
|
1147
|
+
async remove(item) {
|
|
1148
|
+
const { items } = this;
|
|
1149
|
+
if (!items)
|
|
1150
|
+
return;
|
|
1151
|
+
items.delete(item);
|
|
1152
|
+
if (items.size > 0)
|
|
1153
|
+
return;
|
|
1154
|
+
const dir = this.path;
|
|
1155
|
+
try {
|
|
1156
|
+
await (0, import_promises3.readdir)(dir);
|
|
1157
|
+
} catch (err) {
|
|
1158
|
+
if (this._removeWatcher) {
|
|
1159
|
+
this._removeWatcher(sysPath2.dirname(dir), sysPath2.basename(dir));
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
has(item) {
|
|
1164
|
+
const { items } = this;
|
|
1165
|
+
if (!items)
|
|
1166
|
+
return;
|
|
1167
|
+
return items.has(item);
|
|
1168
|
+
}
|
|
1169
|
+
getChildren() {
|
|
1170
|
+
const { items } = this;
|
|
1171
|
+
if (!items)
|
|
1172
|
+
return [];
|
|
1173
|
+
return [...items.values()];
|
|
1174
|
+
}
|
|
1175
|
+
dispose() {
|
|
1176
|
+
this.items.clear();
|
|
1177
|
+
this.path = "";
|
|
1178
|
+
this._removeWatcher = EMPTY_FN;
|
|
1179
|
+
this.items = EMPTY_SET;
|
|
1180
|
+
Object.freeze(this);
|
|
1181
|
+
}
|
|
1182
|
+
};
|
|
1183
|
+
var STAT_METHOD_F = "stat";
|
|
1184
|
+
var STAT_METHOD_L = "lstat";
|
|
1185
|
+
var WatchHelper = class {
|
|
1186
|
+
constructor(path3, follow, fsw) {
|
|
1187
|
+
this.fsw = fsw;
|
|
1188
|
+
const watchPath = path3;
|
|
1189
|
+
this.path = path3 = path3.replace(REPLACER_RE, "");
|
|
1190
|
+
this.watchPath = watchPath;
|
|
1191
|
+
this.fullWatchPath = sysPath2.resolve(watchPath);
|
|
1192
|
+
this.dirParts = [];
|
|
1193
|
+
this.dirParts.forEach((parts) => {
|
|
1194
|
+
if (parts.length > 1)
|
|
1195
|
+
parts.pop();
|
|
1196
|
+
});
|
|
1197
|
+
this.followSymlinks = follow;
|
|
1198
|
+
this.statMethod = follow ? STAT_METHOD_F : STAT_METHOD_L;
|
|
1199
|
+
}
|
|
1200
|
+
entryPath(entry) {
|
|
1201
|
+
return sysPath2.join(this.watchPath, sysPath2.relative(this.watchPath, entry.fullPath));
|
|
1202
|
+
}
|
|
1203
|
+
filterPath(entry) {
|
|
1204
|
+
const { stats } = entry;
|
|
1205
|
+
if (stats && stats.isSymbolicLink())
|
|
1206
|
+
return this.filterDir(entry);
|
|
1207
|
+
const resolvedPath = this.entryPath(entry);
|
|
1208
|
+
return this.fsw._isntIgnored(resolvedPath, stats) && this.fsw._hasReadPermissions(stats);
|
|
1209
|
+
}
|
|
1210
|
+
filterDir(entry) {
|
|
1211
|
+
return this.fsw._isntIgnored(this.entryPath(entry), entry.stats);
|
|
1212
|
+
}
|
|
1213
|
+
};
|
|
1214
|
+
var FSWatcher = class extends import_events.EventEmitter {
|
|
1215
|
+
// Not indenting methods for history sake; for now.
|
|
1216
|
+
constructor(_opts = {}) {
|
|
1217
|
+
super();
|
|
1218
|
+
this.closed = false;
|
|
1219
|
+
this._closers = /* @__PURE__ */ new Map();
|
|
1220
|
+
this._ignoredPaths = /* @__PURE__ */ new Set();
|
|
1221
|
+
this._throttled = /* @__PURE__ */ new Map();
|
|
1222
|
+
this._streams = /* @__PURE__ */ new Set();
|
|
1223
|
+
this._symlinkPaths = /* @__PURE__ */ new Map();
|
|
1224
|
+
this._watched = /* @__PURE__ */ new Map();
|
|
1225
|
+
this._pendingWrites = /* @__PURE__ */ new Map();
|
|
1226
|
+
this._pendingUnlinks = /* @__PURE__ */ new Map();
|
|
1227
|
+
this._readyCount = 0;
|
|
1228
|
+
this._readyEmitted = false;
|
|
1229
|
+
const awf = _opts.awaitWriteFinish;
|
|
1230
|
+
const DEF_AWF = { stabilityThreshold: 2e3, pollInterval: 100 };
|
|
1231
|
+
const opts = {
|
|
1232
|
+
// Defaults
|
|
1233
|
+
persistent: true,
|
|
1234
|
+
ignoreInitial: false,
|
|
1235
|
+
ignorePermissionErrors: false,
|
|
1236
|
+
interval: 100,
|
|
1237
|
+
binaryInterval: 300,
|
|
1238
|
+
followSymlinks: true,
|
|
1239
|
+
usePolling: false,
|
|
1240
|
+
// useAsync: false,
|
|
1241
|
+
atomic: true,
|
|
1242
|
+
// NOTE: overwritten later (depends on usePolling)
|
|
1243
|
+
..._opts,
|
|
1244
|
+
// Change format
|
|
1245
|
+
ignored: _opts.ignored ? arrify(_opts.ignored) : arrify([]),
|
|
1246
|
+
awaitWriteFinish: awf === true ? DEF_AWF : typeof awf === "object" ? { ...DEF_AWF, ...awf } : false
|
|
1247
|
+
};
|
|
1248
|
+
if (isIBMi)
|
|
1249
|
+
opts.usePolling = true;
|
|
1250
|
+
if (opts.atomic === void 0)
|
|
1251
|
+
opts.atomic = !opts.usePolling;
|
|
1252
|
+
const envPoll = process.env.CHOKIDAR_USEPOLLING;
|
|
1253
|
+
if (envPoll !== void 0) {
|
|
1254
|
+
const envLower = envPoll.toLowerCase();
|
|
1255
|
+
if (envLower === "false" || envLower === "0")
|
|
1256
|
+
opts.usePolling = false;
|
|
1257
|
+
else if (envLower === "true" || envLower === "1")
|
|
1258
|
+
opts.usePolling = true;
|
|
1259
|
+
else
|
|
1260
|
+
opts.usePolling = !!envLower;
|
|
1261
|
+
}
|
|
1262
|
+
const envInterval = process.env.CHOKIDAR_INTERVAL;
|
|
1263
|
+
if (envInterval)
|
|
1264
|
+
opts.interval = Number.parseInt(envInterval, 10);
|
|
1265
|
+
let readyCalls = 0;
|
|
1266
|
+
this._emitReady = () => {
|
|
1267
|
+
readyCalls++;
|
|
1268
|
+
if (readyCalls >= this._readyCount) {
|
|
1269
|
+
this._emitReady = EMPTY_FN;
|
|
1270
|
+
this._readyEmitted = true;
|
|
1271
|
+
process.nextTick(() => this.emit(EVENTS.READY));
|
|
1272
|
+
}
|
|
1273
|
+
};
|
|
1274
|
+
this._emitRaw = (...args) => this.emit(EVENTS.RAW, ...args);
|
|
1275
|
+
this._boundRemove = this._remove.bind(this);
|
|
1276
|
+
this.options = opts;
|
|
1277
|
+
this._nodeFsHandler = new NodeFsHandler(this);
|
|
1278
|
+
Object.freeze(opts);
|
|
1279
|
+
}
|
|
1280
|
+
_addIgnoredPath(matcher) {
|
|
1281
|
+
if (isMatcherObject(matcher)) {
|
|
1282
|
+
for (const ignored of this._ignoredPaths) {
|
|
1283
|
+
if (isMatcherObject(ignored) && ignored.path === matcher.path && ignored.recursive === matcher.recursive) {
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
this._ignoredPaths.add(matcher);
|
|
1289
|
+
}
|
|
1290
|
+
_removeIgnoredPath(matcher) {
|
|
1291
|
+
this._ignoredPaths.delete(matcher);
|
|
1292
|
+
if (typeof matcher === "string") {
|
|
1293
|
+
for (const ignored of this._ignoredPaths) {
|
|
1294
|
+
if (isMatcherObject(ignored) && ignored.path === matcher) {
|
|
1295
|
+
this._ignoredPaths.delete(ignored);
|
|
1296
|
+
}
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
// Public methods
|
|
1301
|
+
/**
|
|
1302
|
+
* Adds paths to be watched on an existing FSWatcher instance.
|
|
1303
|
+
* @param paths_ file or file list. Other arguments are unused
|
|
1304
|
+
*/
|
|
1305
|
+
add(paths_, _origAdd, _internal) {
|
|
1306
|
+
const { cwd } = this.options;
|
|
1307
|
+
this.closed = false;
|
|
1308
|
+
this._closePromise = void 0;
|
|
1309
|
+
let paths = unifyPaths(paths_);
|
|
1310
|
+
if (cwd) {
|
|
1311
|
+
paths = paths.map((path3) => {
|
|
1312
|
+
const absPath = getAbsolutePath(path3, cwd);
|
|
1313
|
+
return absPath;
|
|
1314
|
+
});
|
|
1315
|
+
}
|
|
1316
|
+
paths.forEach((path3) => {
|
|
1317
|
+
this._removeIgnoredPath(path3);
|
|
1318
|
+
});
|
|
1319
|
+
this._userIgnored = void 0;
|
|
1320
|
+
if (!this._readyCount)
|
|
1321
|
+
this._readyCount = 0;
|
|
1322
|
+
this._readyCount += paths.length;
|
|
1323
|
+
Promise.all(paths.map(async (path3) => {
|
|
1324
|
+
const res = await this._nodeFsHandler._addToNodeFs(path3, !_internal, void 0, 0, _origAdd);
|
|
1325
|
+
if (res)
|
|
1326
|
+
this._emitReady();
|
|
1327
|
+
return res;
|
|
1328
|
+
})).then((results) => {
|
|
1329
|
+
if (this.closed)
|
|
1330
|
+
return;
|
|
1331
|
+
results.forEach((item) => {
|
|
1332
|
+
if (item)
|
|
1333
|
+
this.add(sysPath2.dirname(item), sysPath2.basename(_origAdd || item));
|
|
1334
|
+
});
|
|
1335
|
+
});
|
|
1336
|
+
return this;
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Close watchers or start ignoring events from specified paths.
|
|
1340
|
+
*/
|
|
1341
|
+
unwatch(paths_) {
|
|
1342
|
+
if (this.closed)
|
|
1343
|
+
return this;
|
|
1344
|
+
const paths = unifyPaths(paths_);
|
|
1345
|
+
const { cwd } = this.options;
|
|
1346
|
+
paths.forEach((path3) => {
|
|
1347
|
+
if (!sysPath2.isAbsolute(path3) && !this._closers.has(path3)) {
|
|
1348
|
+
if (cwd)
|
|
1349
|
+
path3 = sysPath2.join(cwd, path3);
|
|
1350
|
+
path3 = sysPath2.resolve(path3);
|
|
1351
|
+
}
|
|
1352
|
+
this._closePath(path3);
|
|
1353
|
+
this._addIgnoredPath(path3);
|
|
1354
|
+
if (this._watched.has(path3)) {
|
|
1355
|
+
this._addIgnoredPath({
|
|
1356
|
+
path: path3,
|
|
1357
|
+
recursive: true
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
this._userIgnored = void 0;
|
|
1361
|
+
});
|
|
1362
|
+
return this;
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
* Close watchers and remove all listeners from watched paths.
|
|
1366
|
+
*/
|
|
1367
|
+
close() {
|
|
1368
|
+
if (this._closePromise) {
|
|
1369
|
+
return this._closePromise;
|
|
1370
|
+
}
|
|
1371
|
+
this.closed = true;
|
|
1372
|
+
this.removeAllListeners();
|
|
1373
|
+
const closers = [];
|
|
1374
|
+
this._closers.forEach((closerList) => closerList.forEach((closer) => {
|
|
1375
|
+
const promise = closer();
|
|
1376
|
+
if (promise instanceof Promise)
|
|
1377
|
+
closers.push(promise);
|
|
1378
|
+
}));
|
|
1379
|
+
this._streams.forEach((stream) => stream.destroy());
|
|
1380
|
+
this._userIgnored = void 0;
|
|
1381
|
+
this._readyCount = 0;
|
|
1382
|
+
this._readyEmitted = false;
|
|
1383
|
+
this._watched.forEach((dirent) => dirent.dispose());
|
|
1384
|
+
this._closers.clear();
|
|
1385
|
+
this._watched.clear();
|
|
1386
|
+
this._streams.clear();
|
|
1387
|
+
this._symlinkPaths.clear();
|
|
1388
|
+
this._throttled.clear();
|
|
1389
|
+
this._closePromise = closers.length ? Promise.all(closers).then(() => void 0) : Promise.resolve();
|
|
1390
|
+
return this._closePromise;
|
|
1391
|
+
}
|
|
1392
|
+
/**
|
|
1393
|
+
* Expose list of watched paths
|
|
1394
|
+
* @returns for chaining
|
|
1395
|
+
*/
|
|
1396
|
+
getWatched() {
|
|
1397
|
+
const watchList = {};
|
|
1398
|
+
this._watched.forEach((entry, dir) => {
|
|
1399
|
+
const key = this.options.cwd ? sysPath2.relative(this.options.cwd, dir) : dir;
|
|
1400
|
+
const index = key || ONE_DOT;
|
|
1401
|
+
watchList[index] = entry.getChildren().sort();
|
|
1402
|
+
});
|
|
1403
|
+
return watchList;
|
|
1404
|
+
}
|
|
1405
|
+
emitWithAll(event, args) {
|
|
1406
|
+
this.emit(event, ...args);
|
|
1407
|
+
if (event !== EVENTS.ERROR)
|
|
1408
|
+
this.emit(EVENTS.ALL, event, ...args);
|
|
1409
|
+
}
|
|
1410
|
+
// Common helpers
|
|
1411
|
+
// --------------
|
|
1412
|
+
/**
|
|
1413
|
+
* Normalize and emit events.
|
|
1414
|
+
* Calling _emit DOES NOT MEAN emit() would be called!
|
|
1415
|
+
* @param event Type of event
|
|
1416
|
+
* @param path File or directory path
|
|
1417
|
+
* @param stats arguments to be passed with event
|
|
1418
|
+
* @returns the error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
1419
|
+
*/
|
|
1420
|
+
async _emit(event, path3, stats) {
|
|
1421
|
+
if (this.closed)
|
|
1422
|
+
return;
|
|
1423
|
+
const opts = this.options;
|
|
1424
|
+
if (isWindows)
|
|
1425
|
+
path3 = sysPath2.normalize(path3);
|
|
1426
|
+
if (opts.cwd)
|
|
1427
|
+
path3 = sysPath2.relative(opts.cwd, path3);
|
|
1428
|
+
const args = [path3];
|
|
1429
|
+
if (stats != null)
|
|
1430
|
+
args.push(stats);
|
|
1431
|
+
const awf = opts.awaitWriteFinish;
|
|
1432
|
+
let pw;
|
|
1433
|
+
if (awf && (pw = this._pendingWrites.get(path3))) {
|
|
1434
|
+
pw.lastChange = /* @__PURE__ */ new Date();
|
|
1435
|
+
return this;
|
|
1436
|
+
}
|
|
1437
|
+
if (opts.atomic) {
|
|
1438
|
+
if (event === EVENTS.UNLINK) {
|
|
1439
|
+
this._pendingUnlinks.set(path3, [event, ...args]);
|
|
1440
|
+
setTimeout(() => {
|
|
1441
|
+
this._pendingUnlinks.forEach((entry, path4) => {
|
|
1442
|
+
this.emit(...entry);
|
|
1443
|
+
this.emit(EVENTS.ALL, ...entry);
|
|
1444
|
+
this._pendingUnlinks.delete(path4);
|
|
1445
|
+
});
|
|
1446
|
+
}, typeof opts.atomic === "number" ? opts.atomic : 100);
|
|
1447
|
+
return this;
|
|
1448
|
+
}
|
|
1449
|
+
if (event === EVENTS.ADD && this._pendingUnlinks.has(path3)) {
|
|
1450
|
+
event = EVENTS.CHANGE;
|
|
1451
|
+
this._pendingUnlinks.delete(path3);
|
|
1452
|
+
}
|
|
1453
|
+
}
|
|
1454
|
+
if (awf && (event === EVENTS.ADD || event === EVENTS.CHANGE) && this._readyEmitted) {
|
|
1455
|
+
const awfEmit = (err, stats2) => {
|
|
1456
|
+
if (err) {
|
|
1457
|
+
event = EVENTS.ERROR;
|
|
1458
|
+
args[0] = err;
|
|
1459
|
+
this.emitWithAll(event, args);
|
|
1460
|
+
} else if (stats2) {
|
|
1461
|
+
if (args.length > 1) {
|
|
1462
|
+
args[1] = stats2;
|
|
1463
|
+
} else {
|
|
1464
|
+
args.push(stats2);
|
|
1465
|
+
}
|
|
1466
|
+
this.emitWithAll(event, args);
|
|
1467
|
+
}
|
|
1468
|
+
};
|
|
1469
|
+
this._awaitWriteFinish(path3, awf.stabilityThreshold, event, awfEmit);
|
|
1470
|
+
return this;
|
|
1471
|
+
}
|
|
1472
|
+
if (event === EVENTS.CHANGE) {
|
|
1473
|
+
const isThrottled = !this._throttle(EVENTS.CHANGE, path3, 50);
|
|
1474
|
+
if (isThrottled)
|
|
1475
|
+
return this;
|
|
1476
|
+
}
|
|
1477
|
+
if (opts.alwaysStat && stats === void 0 && (event === EVENTS.ADD || event === EVENTS.ADD_DIR || event === EVENTS.CHANGE)) {
|
|
1478
|
+
const fullPath = opts.cwd ? sysPath2.join(opts.cwd, path3) : path3;
|
|
1479
|
+
let stats2;
|
|
1480
|
+
try {
|
|
1481
|
+
stats2 = await (0, import_promises3.stat)(fullPath);
|
|
1482
|
+
} catch (err) {
|
|
1483
|
+
}
|
|
1484
|
+
if (!stats2 || this.closed)
|
|
1485
|
+
return;
|
|
1486
|
+
args.push(stats2);
|
|
1487
|
+
}
|
|
1488
|
+
this.emitWithAll(event, args);
|
|
1489
|
+
return this;
|
|
1490
|
+
}
|
|
1491
|
+
/**
|
|
1492
|
+
* Common handler for errors
|
|
1493
|
+
* @returns The error if defined, otherwise the value of the FSWatcher instance's `closed` flag
|
|
1494
|
+
*/
|
|
1495
|
+
_handleError(error) {
|
|
1496
|
+
const code = error && error.code;
|
|
1497
|
+
if (error && code !== "ENOENT" && code !== "ENOTDIR" && (!this.options.ignorePermissionErrors || code !== "EPERM" && code !== "EACCES")) {
|
|
1498
|
+
this.emit(EVENTS.ERROR, error);
|
|
1499
|
+
}
|
|
1500
|
+
return error || this.closed;
|
|
1501
|
+
}
|
|
1502
|
+
/**
|
|
1503
|
+
* Helper utility for throttling
|
|
1504
|
+
* @param actionType type being throttled
|
|
1505
|
+
* @param path being acted upon
|
|
1506
|
+
* @param timeout duration of time to suppress duplicate actions
|
|
1507
|
+
* @returns tracking object or false if action should be suppressed
|
|
1508
|
+
*/
|
|
1509
|
+
_throttle(actionType, path3, timeout) {
|
|
1510
|
+
if (!this._throttled.has(actionType)) {
|
|
1511
|
+
this._throttled.set(actionType, /* @__PURE__ */ new Map());
|
|
1512
|
+
}
|
|
1513
|
+
const action = this._throttled.get(actionType);
|
|
1514
|
+
if (!action)
|
|
1515
|
+
throw new Error("invalid throttle");
|
|
1516
|
+
const actionPath = action.get(path3);
|
|
1517
|
+
if (actionPath) {
|
|
1518
|
+
actionPath.count++;
|
|
1519
|
+
return false;
|
|
1520
|
+
}
|
|
1521
|
+
let timeoutObject;
|
|
1522
|
+
const clear = () => {
|
|
1523
|
+
const item = action.get(path3);
|
|
1524
|
+
const count = item ? item.count : 0;
|
|
1525
|
+
action.delete(path3);
|
|
1526
|
+
clearTimeout(timeoutObject);
|
|
1527
|
+
if (item)
|
|
1528
|
+
clearTimeout(item.timeoutObject);
|
|
1529
|
+
return count;
|
|
1530
|
+
};
|
|
1531
|
+
timeoutObject = setTimeout(clear, timeout);
|
|
1532
|
+
const thr = { timeoutObject, clear, count: 0 };
|
|
1533
|
+
action.set(path3, thr);
|
|
1534
|
+
return thr;
|
|
1535
|
+
}
|
|
1536
|
+
_incrReadyCount() {
|
|
1537
|
+
return this._readyCount++;
|
|
1538
|
+
}
|
|
1539
|
+
/**
|
|
1540
|
+
* Awaits write operation to finish.
|
|
1541
|
+
* Polls a newly created file for size variations. When files size does not change for 'threshold' milliseconds calls callback.
|
|
1542
|
+
* @param path being acted upon
|
|
1543
|
+
* @param threshold Time in milliseconds a file size must be fixed before acknowledging write OP is finished
|
|
1544
|
+
* @param event
|
|
1545
|
+
* @param awfEmit Callback to be called when ready for event to be emitted.
|
|
1546
|
+
*/
|
|
1547
|
+
_awaitWriteFinish(path3, threshold, event, awfEmit) {
|
|
1548
|
+
const awf = this.options.awaitWriteFinish;
|
|
1549
|
+
if (typeof awf !== "object")
|
|
1550
|
+
return;
|
|
1551
|
+
const pollInterval = awf.pollInterval;
|
|
1552
|
+
let timeoutHandler;
|
|
1553
|
+
let fullPath = path3;
|
|
1554
|
+
if (this.options.cwd && !sysPath2.isAbsolute(path3)) {
|
|
1555
|
+
fullPath = sysPath2.join(this.options.cwd, path3);
|
|
1556
|
+
}
|
|
1557
|
+
const now = /* @__PURE__ */ new Date();
|
|
1558
|
+
const writes = this._pendingWrites;
|
|
1559
|
+
function awaitWriteFinishFn(prevStat) {
|
|
1560
|
+
(0, import_fs2.stat)(fullPath, (err, curStat) => {
|
|
1561
|
+
if (err || !writes.has(path3)) {
|
|
1562
|
+
if (err && err.code !== "ENOENT")
|
|
1563
|
+
awfEmit(err);
|
|
1564
|
+
return;
|
|
1565
|
+
}
|
|
1566
|
+
const now2 = Number(/* @__PURE__ */ new Date());
|
|
1567
|
+
if (prevStat && curStat.size !== prevStat.size) {
|
|
1568
|
+
writes.get(path3).lastChange = now2;
|
|
1569
|
+
}
|
|
1570
|
+
const pw = writes.get(path3);
|
|
1571
|
+
const df = now2 - pw.lastChange;
|
|
1572
|
+
if (df >= threshold) {
|
|
1573
|
+
writes.delete(path3);
|
|
1574
|
+
awfEmit(void 0, curStat);
|
|
1575
|
+
} else {
|
|
1576
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval, curStat);
|
|
1577
|
+
}
|
|
1578
|
+
});
|
|
1579
|
+
}
|
|
1580
|
+
if (!writes.has(path3)) {
|
|
1581
|
+
writes.set(path3, {
|
|
1582
|
+
lastChange: now,
|
|
1583
|
+
cancelWait: () => {
|
|
1584
|
+
writes.delete(path3);
|
|
1585
|
+
clearTimeout(timeoutHandler);
|
|
1586
|
+
return event;
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
timeoutHandler = setTimeout(awaitWriteFinishFn, pollInterval);
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
/**
|
|
1593
|
+
* Determines whether user has asked to ignore this path.
|
|
1594
|
+
*/
|
|
1595
|
+
_isIgnored(path3, stats) {
|
|
1596
|
+
if (this.options.atomic && DOT_RE.test(path3))
|
|
1597
|
+
return true;
|
|
1598
|
+
if (!this._userIgnored) {
|
|
1599
|
+
const { cwd } = this.options;
|
|
1600
|
+
const ign = this.options.ignored;
|
|
1601
|
+
const ignored = (ign || []).map(normalizeIgnored(cwd));
|
|
1602
|
+
const ignoredPaths = [...this._ignoredPaths];
|
|
1603
|
+
const list = [...ignoredPaths.map(normalizeIgnored(cwd)), ...ignored];
|
|
1604
|
+
this._userIgnored = anymatch(list, void 0);
|
|
1605
|
+
}
|
|
1606
|
+
return this._userIgnored(path3, stats);
|
|
1607
|
+
}
|
|
1608
|
+
_isntIgnored(path3, stat4) {
|
|
1609
|
+
return !this._isIgnored(path3, stat4);
|
|
1610
|
+
}
|
|
1611
|
+
/**
|
|
1612
|
+
* Provides a set of common helpers and properties relating to symlink handling.
|
|
1613
|
+
* @param path file or directory pattern being watched
|
|
1614
|
+
*/
|
|
1615
|
+
_getWatchHelpers(path3) {
|
|
1616
|
+
return new WatchHelper(path3, this.options.followSymlinks, this);
|
|
1617
|
+
}
|
|
1618
|
+
// Directory helpers
|
|
1619
|
+
// -----------------
|
|
1620
|
+
/**
|
|
1621
|
+
* Provides directory tracking objects
|
|
1622
|
+
* @param directory path of the directory
|
|
1623
|
+
*/
|
|
1624
|
+
_getWatchedDir(directory) {
|
|
1625
|
+
const dir = sysPath2.resolve(directory);
|
|
1626
|
+
if (!this._watched.has(dir))
|
|
1627
|
+
this._watched.set(dir, new DirEntry(dir, this._boundRemove));
|
|
1628
|
+
return this._watched.get(dir);
|
|
1629
|
+
}
|
|
1630
|
+
// File helpers
|
|
1631
|
+
// ------------
|
|
1632
|
+
/**
|
|
1633
|
+
* Check for read permissions: https://stackoverflow.com/a/11781404/1358405
|
|
1634
|
+
*/
|
|
1635
|
+
_hasReadPermissions(stats) {
|
|
1636
|
+
if (this.options.ignorePermissionErrors)
|
|
1637
|
+
return true;
|
|
1638
|
+
return Boolean(Number(stats.mode) & 256);
|
|
1639
|
+
}
|
|
1640
|
+
/**
|
|
1641
|
+
* Handles emitting unlink events for
|
|
1642
|
+
* files and directories, and via recursion, for
|
|
1643
|
+
* files and directories within directories that are unlinked
|
|
1644
|
+
* @param directory within which the following item is located
|
|
1645
|
+
* @param item base path of item/directory
|
|
1646
|
+
*/
|
|
1647
|
+
_remove(directory, item, isDirectory) {
|
|
1648
|
+
const path3 = sysPath2.join(directory, item);
|
|
1649
|
+
const fullPath = sysPath2.resolve(path3);
|
|
1650
|
+
isDirectory = isDirectory != null ? isDirectory : this._watched.has(path3) || this._watched.has(fullPath);
|
|
1651
|
+
if (!this._throttle("remove", path3, 100))
|
|
1652
|
+
return;
|
|
1653
|
+
if (!isDirectory && this._watched.size === 1) {
|
|
1654
|
+
this.add(directory, item, true);
|
|
1655
|
+
}
|
|
1656
|
+
const wp = this._getWatchedDir(path3);
|
|
1657
|
+
const nestedDirectoryChildren = wp.getChildren();
|
|
1658
|
+
nestedDirectoryChildren.forEach((nested) => this._remove(path3, nested));
|
|
1659
|
+
const parent = this._getWatchedDir(directory);
|
|
1660
|
+
const wasTracked = parent.has(item);
|
|
1661
|
+
parent.remove(item);
|
|
1662
|
+
if (this._symlinkPaths.has(fullPath)) {
|
|
1663
|
+
this._symlinkPaths.delete(fullPath);
|
|
1664
|
+
}
|
|
1665
|
+
let relPath = path3;
|
|
1666
|
+
if (this.options.cwd)
|
|
1667
|
+
relPath = sysPath2.relative(this.options.cwd, path3);
|
|
1668
|
+
if (this.options.awaitWriteFinish && this._pendingWrites.has(relPath)) {
|
|
1669
|
+
const event = this._pendingWrites.get(relPath).cancelWait();
|
|
1670
|
+
if (event === EVENTS.ADD)
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
this._watched.delete(path3);
|
|
1674
|
+
this._watched.delete(fullPath);
|
|
1675
|
+
const eventName = isDirectory ? EVENTS.UNLINK_DIR : EVENTS.UNLINK;
|
|
1676
|
+
if (wasTracked && !this._isIgnored(path3))
|
|
1677
|
+
this._emit(eventName, path3);
|
|
1678
|
+
this._closePath(path3);
|
|
1679
|
+
}
|
|
1680
|
+
/**
|
|
1681
|
+
* Closes all watchers for a path
|
|
1682
|
+
*/
|
|
1683
|
+
_closePath(path3) {
|
|
1684
|
+
this._closeFile(path3);
|
|
1685
|
+
const dir = sysPath2.dirname(path3);
|
|
1686
|
+
this._getWatchedDir(dir).remove(sysPath2.basename(path3));
|
|
1687
|
+
}
|
|
1688
|
+
/**
|
|
1689
|
+
* Closes only file-specific watchers
|
|
1690
|
+
*/
|
|
1691
|
+
_closeFile(path3) {
|
|
1692
|
+
const closers = this._closers.get(path3);
|
|
1693
|
+
if (!closers)
|
|
1694
|
+
return;
|
|
1695
|
+
closers.forEach((closer) => closer());
|
|
1696
|
+
this._closers.delete(path3);
|
|
1697
|
+
}
|
|
1698
|
+
_addPathCloser(path3, closer) {
|
|
1699
|
+
if (!closer)
|
|
1700
|
+
return;
|
|
1701
|
+
let list = this._closers.get(path3);
|
|
1702
|
+
if (!list) {
|
|
1703
|
+
list = [];
|
|
1704
|
+
this._closers.set(path3, list);
|
|
1705
|
+
}
|
|
1706
|
+
list.push(closer);
|
|
1707
|
+
}
|
|
1708
|
+
_readdirp(root, opts) {
|
|
1709
|
+
if (this.closed)
|
|
1710
|
+
return;
|
|
1711
|
+
const options = { type: EVENTS.ALL, alwaysStat: true, lstat: true, ...opts, depth: 0 };
|
|
1712
|
+
let stream = readdirp(root, options);
|
|
1713
|
+
this._streams.add(stream);
|
|
1714
|
+
stream.once(STR_CLOSE, () => {
|
|
1715
|
+
stream = void 0;
|
|
1716
|
+
});
|
|
1717
|
+
stream.once(STR_END, () => {
|
|
1718
|
+
if (stream) {
|
|
1719
|
+
this._streams.delete(stream);
|
|
1720
|
+
stream = void 0;
|
|
1721
|
+
}
|
|
1722
|
+
});
|
|
1723
|
+
return stream;
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
function watch(paths, options = {}) {
|
|
1727
|
+
const watcher = new FSWatcher(options);
|
|
1728
|
+
watcher.add(paths);
|
|
1729
|
+
return watcher;
|
|
1730
|
+
}
|
|
1731
|
+
var esm_default = { watch, FSWatcher };
|
|
1732
|
+
|
|
1733
|
+
// packages/playwright-core/src/package.ts
|
|
1734
|
+
var import_path = __toESM(require("path"));
|
|
1735
|
+
var packageRoot = import_path.default.join(__dirname, "..");
|
|
1736
|
+
var packageJSON = require(import_path.default.join(packageRoot, "package.json"));
|
|
1737
|
+
var binPath = import_path.default.join(packageRoot, "bin");
|
|
1738
|
+
|
|
1739
|
+
// packages/playwright-core/src/serverRegistry.ts
|
|
1740
|
+
var packageVersion = packageJSON.version;
|
|
1741
|
+
var ServerRegistry = class extends import_events2.EventEmitter {
|
|
1742
|
+
constructor() {
|
|
1743
|
+
super(...arguments);
|
|
1744
|
+
this._descriptors = /* @__PURE__ */ new Map();
|
|
1745
|
+
this._watcherRefs = 0;
|
|
1746
|
+
}
|
|
1747
|
+
on(event, listener) {
|
|
1748
|
+
return super.on(event, listener);
|
|
1749
|
+
}
|
|
1750
|
+
off(event, listener) {
|
|
1751
|
+
return super.off(event, listener);
|
|
1752
|
+
}
|
|
1753
|
+
watch() {
|
|
1754
|
+
this._watcherRefs++;
|
|
1755
|
+
if (!this._watcher)
|
|
1756
|
+
this._startWatcher();
|
|
1757
|
+
let disposed = false;
|
|
1758
|
+
return () => {
|
|
1759
|
+
if (disposed)
|
|
1760
|
+
return;
|
|
1761
|
+
disposed = true;
|
|
1762
|
+
this._watcherRefs--;
|
|
1763
|
+
if (this._watcherRefs === 0)
|
|
1764
|
+
this._stopWatcher();
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
ready() {
|
|
1768
|
+
return this._ready ?? Promise.resolve();
|
|
1769
|
+
}
|
|
1770
|
+
async list() {
|
|
1771
|
+
const ownWatcher = !this._watcher;
|
|
1772
|
+
let dispose;
|
|
1773
|
+
if (ownWatcher)
|
|
1774
|
+
dispose = this.watch();
|
|
1775
|
+
try {
|
|
1776
|
+
await this._ready;
|
|
1777
|
+
const statuses = await Promise.all(
|
|
1778
|
+
[...this._descriptors.values()].map(async (descriptor) => {
|
|
1779
|
+
const canConnect = await canConnectTo(descriptor);
|
|
1780
|
+
return { descriptor, canConnect };
|
|
1781
|
+
})
|
|
1782
|
+
);
|
|
1783
|
+
const result = /* @__PURE__ */ new Map();
|
|
1784
|
+
for (const { descriptor, canConnect } of statuses) {
|
|
1785
|
+
if (!canConnect) {
|
|
1786
|
+
await import_fs3.default.promises.unlink(import_path2.default.join(this._browsersDir(), descriptor.browser.guid)).catch(() => {
|
|
1787
|
+
});
|
|
1788
|
+
continue;
|
|
1789
|
+
}
|
|
1790
|
+
const key = descriptor.workspaceDir ?? "";
|
|
1791
|
+
let list = result.get(key);
|
|
1792
|
+
if (!list) {
|
|
1793
|
+
list = [];
|
|
1794
|
+
result.set(key, list);
|
|
1795
|
+
}
|
|
1796
|
+
list.push(descriptor);
|
|
1797
|
+
}
|
|
1798
|
+
return result;
|
|
1799
|
+
} finally {
|
|
1800
|
+
dispose?.();
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
async create(browser, endpoint) {
|
|
1804
|
+
const file = import_path2.default.join(this._browsersDir(), browser.guid);
|
|
1805
|
+
await import_fs3.default.promises.mkdir(this._browsersDir(), { recursive: true });
|
|
1806
|
+
const descriptor = {
|
|
1807
|
+
playwrightVersion: packageVersion,
|
|
1808
|
+
playwrightLib: packageRoot,
|
|
1809
|
+
title: endpoint.title,
|
|
1810
|
+
browser,
|
|
1811
|
+
endpoint: endpoint.endpoint,
|
|
1812
|
+
workspaceDir: endpoint.workspaceDir
|
|
1813
|
+
};
|
|
1814
|
+
await import_fs3.default.promises.writeFile(file, JSON.stringify(descriptor, null, 2), "utf-8");
|
|
1815
|
+
}
|
|
1816
|
+
async delete(guid) {
|
|
1817
|
+
const file = import_path2.default.join(this._browsersDir(), guid);
|
|
1818
|
+
await import_fs3.default.promises.unlink(file).catch(() => {
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
async deleteUserData(guid) {
|
|
1822
|
+
const filePath = import_path2.default.join(this._browsersDir(), guid);
|
|
1823
|
+
const content = await import_fs3.default.promises.readFile(filePath, "utf-8");
|
|
1824
|
+
const descriptor = JSON.parse(content);
|
|
1825
|
+
if (descriptor.browser.userDataDir)
|
|
1826
|
+
await import_fs3.default.promises.rm(descriptor.browser.userDataDir, { recursive: true, force: true });
|
|
1827
|
+
await import_fs3.default.promises.unlink(filePath);
|
|
1828
|
+
}
|
|
1829
|
+
readDescriptor(guid) {
|
|
1830
|
+
const cached = this._descriptors.get(guid);
|
|
1831
|
+
if (cached)
|
|
1832
|
+
return cached;
|
|
1833
|
+
const filePath = import_path2.default.join(this._browsersDir(), guid);
|
|
1834
|
+
const content = import_fs3.default.readFileSync(filePath, "utf-8");
|
|
1835
|
+
return JSON.parse(content);
|
|
1836
|
+
}
|
|
1837
|
+
async find(name) {
|
|
1838
|
+
const entries = await this.list();
|
|
1839
|
+
for (const [, browsers] of entries) {
|
|
1840
|
+
for (const browser of browsers) {
|
|
1841
|
+
if (browser.title === name)
|
|
1842
|
+
return browser;
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
return null;
|
|
1846
|
+
}
|
|
1847
|
+
_browsersDir() {
|
|
1848
|
+
return process.env.PWTEST_SERVER_REGISTRY || registryDirectory();
|
|
1849
|
+
}
|
|
1850
|
+
_startWatcher() {
|
|
1851
|
+
const dir = this._browsersDir();
|
|
1852
|
+
try {
|
|
1853
|
+
import_fs3.default.mkdirSync(dir, { recursive: true });
|
|
1854
|
+
} catch {
|
|
1855
|
+
}
|
|
1856
|
+
const watcher = esm_default.watch(dir, {
|
|
1857
|
+
ignoreInitial: false,
|
|
1858
|
+
depth: 0,
|
|
1859
|
+
awaitWriteFinish: { stabilityThreshold: 50, pollInterval: 20 }
|
|
1860
|
+
});
|
|
1861
|
+
this._watcher = watcher;
|
|
1862
|
+
this._ready = new Promise((resolve3, reject) => {
|
|
1863
|
+
watcher.once("ready", () => resolve3());
|
|
1864
|
+
watcher.once("error", reject);
|
|
1865
|
+
});
|
|
1866
|
+
watcher.on("add", (file) => this._onAddOrChange(file, "added"));
|
|
1867
|
+
watcher.on("change", (file) => this._onAddOrChange(file, "changed"));
|
|
1868
|
+
watcher.on("unlink", (file) => {
|
|
1869
|
+
const guid = import_path2.default.basename(file);
|
|
1870
|
+
if (this._descriptors.delete(guid))
|
|
1871
|
+
this.emit("removed", guid);
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
_onAddOrChange(file, event) {
|
|
1875
|
+
const guid = import_path2.default.basename(file);
|
|
1876
|
+
let descriptor;
|
|
1877
|
+
try {
|
|
1878
|
+
descriptor = JSON.parse(import_fs3.default.readFileSync(file, "utf-8"));
|
|
1879
|
+
} catch {
|
|
1880
|
+
return;
|
|
1881
|
+
}
|
|
1882
|
+
this._descriptors.set(guid, descriptor);
|
|
1883
|
+
this.emit(event, descriptor);
|
|
1884
|
+
}
|
|
1885
|
+
_stopWatcher() {
|
|
1886
|
+
const watcher = this._watcher;
|
|
1887
|
+
this._watcher = void 0;
|
|
1888
|
+
this._ready = void 0;
|
|
1889
|
+
this._descriptors.clear();
|
|
1890
|
+
void watcher?.close();
|
|
1891
|
+
}
|
|
1892
|
+
};
|
|
1893
|
+
async function canConnectTo(descriptor) {
|
|
1894
|
+
if (!descriptor.endpoint)
|
|
1895
|
+
return false;
|
|
1896
|
+
if (descriptor.endpoint.startsWith("ws://") || descriptor.endpoint.startsWith("wss://")) {
|
|
1897
|
+
return await new Promise((resolve3) => {
|
|
1898
|
+
const url = new URL(descriptor.endpoint);
|
|
1899
|
+
const socket = import_net.default.createConnection(Number(url.port), url.hostname, () => {
|
|
1900
|
+
socket.destroy();
|
|
1901
|
+
resolve3(true);
|
|
1902
|
+
});
|
|
1903
|
+
socket.on("error", () => resolve3(false));
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
return await new Promise((resolve3) => {
|
|
1907
|
+
const socket = import_net.default.createConnection(descriptor.endpoint ?? descriptor.pipeName, () => {
|
|
1908
|
+
socket.destroy();
|
|
1909
|
+
resolve3(true);
|
|
1910
|
+
});
|
|
1911
|
+
socket.on("error", () => resolve3(false));
|
|
1912
|
+
});
|
|
1913
|
+
}
|
|
1914
|
+
function computeDefaultCacheDirectory() {
|
|
1915
|
+
if (process.platform === "linux")
|
|
1916
|
+
return process.env.XDG_CACHE_HOME || import_path2.default.join(import_os2.default.homedir(), ".cache");
|
|
1917
|
+
if (process.platform === "darwin")
|
|
1918
|
+
return import_path2.default.join(import_os2.default.homedir(), "Library", "Caches");
|
|
1919
|
+
if (process.platform === "win32")
|
|
1920
|
+
return process.env.LOCALAPPDATA || import_path2.default.join(import_os2.default.homedir(), "AppData", "Local");
|
|
1921
|
+
throw new Error("Unsupported platform: " + process.platform);
|
|
1922
|
+
}
|
|
1923
|
+
var _defaultCacheDirectory;
|
|
1924
|
+
function defaultCacheDirectory() {
|
|
1925
|
+
return _defaultCacheDirectory ??= computeDefaultCacheDirectory();
|
|
1926
|
+
}
|
|
1927
|
+
function registryDirectory() {
|
|
1928
|
+
return import_path2.default.join(defaultCacheDirectory(), "ms-playwright", "b");
|
|
1929
|
+
}
|
|
1930
|
+
var serverRegistry = new ServerRegistry();
|
|
1931
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1932
|
+
0 && (module.exports = {
|
|
1933
|
+
serverRegistry
|
|
1934
|
+
});
|
|
1935
|
+
/*! Bundled license information:
|
|
1936
|
+
|
|
1937
|
+
chokidar/esm/index.js:
|
|
1938
|
+
(*! chokidar - MIT License (c) 2012 Paul Miller (paulmillr.com) *)
|
|
1939
|
+
*/
|