@capyclaw/ppt-suite 2.4.10 → 2.5.68
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 +304 -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 +103 -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 +164 -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 +69 -0
- package/node_modules/@capyclaw/foundation/lib/adapters/runtime-driver.mjs +120 -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 +115 -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 +58 -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 +150 -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 +57 -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 +36 -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 +314 -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 +275 -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 +166 -0
- package/node_modules/@capyclaw/tool-host/src/index.mjs +416 -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/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,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var utils = require("./utils");
|
|
3
|
+
var external = require("./external");
|
|
4
|
+
var utf8 = require("./utf8");
|
|
5
|
+
var ZipEntries = require("./zipEntries");
|
|
6
|
+
var Crc32Probe = require("./stream/Crc32Probe");
|
|
7
|
+
var nodejsUtils = require("./nodejsUtils");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Check the CRC32 of an entry.
|
|
11
|
+
* @param {ZipEntry} zipEntry the zip entry to check.
|
|
12
|
+
* @return {Promise} the result.
|
|
13
|
+
*/
|
|
14
|
+
function checkEntryCRC32(zipEntry) {
|
|
15
|
+
return new external.Promise(function (resolve, reject) {
|
|
16
|
+
var worker = zipEntry.decompressed.getContentWorker().pipe(new Crc32Probe());
|
|
17
|
+
worker.on("error", function (e) {
|
|
18
|
+
reject(e);
|
|
19
|
+
})
|
|
20
|
+
.on("end", function () {
|
|
21
|
+
if (worker.streamInfo.crc32 !== zipEntry.decompressed.crc32) {
|
|
22
|
+
reject(new Error("Corrupted zip : CRC32 mismatch"));
|
|
23
|
+
} else {
|
|
24
|
+
resolve();
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
.resume();
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
module.exports = function (data, options) {
|
|
32
|
+
var zip = this;
|
|
33
|
+
options = utils.extend(options || {}, {
|
|
34
|
+
base64: false,
|
|
35
|
+
checkCRC32: false,
|
|
36
|
+
optimizedBinaryString: false,
|
|
37
|
+
createFolders: false,
|
|
38
|
+
decodeFileName: utf8.utf8decode
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
|
|
42
|
+
return external.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file."));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return utils.prepareContent("the loaded zip file", data, true, options.optimizedBinaryString, options.base64)
|
|
46
|
+
.then(function (data) {
|
|
47
|
+
var zipEntries = new ZipEntries(options);
|
|
48
|
+
zipEntries.load(data);
|
|
49
|
+
return zipEntries;
|
|
50
|
+
}).then(function checkCRC32(zipEntries) {
|
|
51
|
+
var promises = [external.Promise.resolve(zipEntries)];
|
|
52
|
+
var files = zipEntries.files;
|
|
53
|
+
if (options.checkCRC32) {
|
|
54
|
+
for (var i = 0; i < files.length; i++) {
|
|
55
|
+
promises.push(checkEntryCRC32(files[i]));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return external.Promise.all(promises);
|
|
59
|
+
}).then(function addFiles(results) {
|
|
60
|
+
var zipEntries = results.shift();
|
|
61
|
+
var files = zipEntries.files;
|
|
62
|
+
for (var i = 0; i < files.length; i++) {
|
|
63
|
+
var input = files[i];
|
|
64
|
+
|
|
65
|
+
var unsafeName = input.fileNameStr;
|
|
66
|
+
var safeName = utils.resolve(input.fileNameStr);
|
|
67
|
+
|
|
68
|
+
zip.file(safeName, input.decompressed, {
|
|
69
|
+
binary: true,
|
|
70
|
+
optimizedBinaryString: true,
|
|
71
|
+
date: input.date,
|
|
72
|
+
dir: input.dir,
|
|
73
|
+
comment: input.fileCommentStr.length ? input.fileCommentStr : null,
|
|
74
|
+
unixPermissions: input.unixPermissions,
|
|
75
|
+
dosPermissions: input.dosPermissions,
|
|
76
|
+
createFolders: options.createFolders
|
|
77
|
+
});
|
|
78
|
+
if (!input.dir) {
|
|
79
|
+
zip.file(safeName).unsafeOriginalName = unsafeName;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
if (zipEntries.zipComment.length) {
|
|
83
|
+
zip.comment = zipEntries.zipComment;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return zip;
|
|
87
|
+
});
|
|
88
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var utils = require("../utils");
|
|
4
|
+
var GenericWorker = require("../stream/GenericWorker");
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A worker that use a nodejs stream as source.
|
|
8
|
+
* @constructor
|
|
9
|
+
* @param {String} filename the name of the file entry for this stream.
|
|
10
|
+
* @param {Readable} stream the nodejs stream.
|
|
11
|
+
*/
|
|
12
|
+
function NodejsStreamInputAdapter(filename, stream) {
|
|
13
|
+
GenericWorker.call(this, "Nodejs stream input adapter for " + filename);
|
|
14
|
+
this._upstreamEnded = false;
|
|
15
|
+
this._bindStream(stream);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
utils.inherits(NodejsStreamInputAdapter, GenericWorker);
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Prepare the stream and bind the callbacks on it.
|
|
22
|
+
* Do this ASAP on node 0.10 ! A lazy binding doesn't always work.
|
|
23
|
+
* @param {Stream} stream the nodejs stream to use.
|
|
24
|
+
*/
|
|
25
|
+
NodejsStreamInputAdapter.prototype._bindStream = function (stream) {
|
|
26
|
+
var self = this;
|
|
27
|
+
this._stream = stream;
|
|
28
|
+
stream.pause();
|
|
29
|
+
stream
|
|
30
|
+
.on("data", function (chunk) {
|
|
31
|
+
self.push({
|
|
32
|
+
data: chunk,
|
|
33
|
+
meta : {
|
|
34
|
+
percent : 0
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
})
|
|
38
|
+
.on("error", function (e) {
|
|
39
|
+
if(self.isPaused) {
|
|
40
|
+
this.generatedError = e;
|
|
41
|
+
} else {
|
|
42
|
+
self.error(e);
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
.on("end", function () {
|
|
46
|
+
if(self.isPaused) {
|
|
47
|
+
self._upstreamEnded = true;
|
|
48
|
+
} else {
|
|
49
|
+
self.end();
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
NodejsStreamInputAdapter.prototype.pause = function () {
|
|
54
|
+
if(!GenericWorker.prototype.pause.call(this)) {
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
this._stream.pause();
|
|
58
|
+
return true;
|
|
59
|
+
};
|
|
60
|
+
NodejsStreamInputAdapter.prototype.resume = function () {
|
|
61
|
+
if(!GenericWorker.prototype.resume.call(this)) {
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
if(this._upstreamEnded) {
|
|
66
|
+
this.end();
|
|
67
|
+
} else {
|
|
68
|
+
this._stream.resume();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return true;
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
module.exports = NodejsStreamInputAdapter;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var Readable = require("readable-stream").Readable;
|
|
4
|
+
|
|
5
|
+
var utils = require("../utils");
|
|
6
|
+
utils.inherits(NodejsStreamOutputAdapter, Readable);
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A nodejs stream using a worker as source.
|
|
10
|
+
* @see the SourceWrapper in http://nodejs.org/api/stream.html
|
|
11
|
+
* @constructor
|
|
12
|
+
* @param {StreamHelper} helper the helper wrapping the worker
|
|
13
|
+
* @param {Object} options the nodejs stream options
|
|
14
|
+
* @param {Function} updateCb the update callback.
|
|
15
|
+
*/
|
|
16
|
+
function NodejsStreamOutputAdapter(helper, options, updateCb) {
|
|
17
|
+
Readable.call(this, options);
|
|
18
|
+
this._helper = helper;
|
|
19
|
+
|
|
20
|
+
var self = this;
|
|
21
|
+
helper.on("data", function (data, meta) {
|
|
22
|
+
if (!self.push(data)) {
|
|
23
|
+
self._helper.pause();
|
|
24
|
+
}
|
|
25
|
+
if(updateCb) {
|
|
26
|
+
updateCb(meta);
|
|
27
|
+
}
|
|
28
|
+
})
|
|
29
|
+
.on("error", function(e) {
|
|
30
|
+
self.emit("error", e);
|
|
31
|
+
})
|
|
32
|
+
.on("end", function () {
|
|
33
|
+
self.push(null);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
NodejsStreamOutputAdapter.prototype._read = function() {
|
|
39
|
+
this._helper.resume();
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
module.exports = NodejsStreamOutputAdapter;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
/**
|
|
5
|
+
* True if this is running in Nodejs, will be undefined in a browser.
|
|
6
|
+
* In a browser, browserify won't include this file and the whole module
|
|
7
|
+
* will be resolved an empty object.
|
|
8
|
+
*/
|
|
9
|
+
isNode : typeof Buffer !== "undefined",
|
|
10
|
+
/**
|
|
11
|
+
* Create a new nodejs Buffer from an existing content.
|
|
12
|
+
* @param {Object} data the data to pass to the constructor.
|
|
13
|
+
* @param {String} encoding the encoding to use.
|
|
14
|
+
* @return {Buffer} a new Buffer.
|
|
15
|
+
*/
|
|
16
|
+
newBufferFrom: function(data, encoding) {
|
|
17
|
+
if (Buffer.from && Buffer.from !== Uint8Array.from) {
|
|
18
|
+
return Buffer.from(data, encoding);
|
|
19
|
+
} else {
|
|
20
|
+
if (typeof data === "number") {
|
|
21
|
+
// Safeguard for old Node.js versions. On newer versions,
|
|
22
|
+
// Buffer.from(number) / Buffer(number, encoding) already throw.
|
|
23
|
+
throw new Error("The \"data\" argument must not be a number");
|
|
24
|
+
}
|
|
25
|
+
return new Buffer(data, encoding);
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Create a new nodejs Buffer with the specified size.
|
|
30
|
+
* @param {Integer} size the size of the buffer.
|
|
31
|
+
* @return {Buffer} a new Buffer.
|
|
32
|
+
*/
|
|
33
|
+
allocBuffer: function (size) {
|
|
34
|
+
if (Buffer.alloc) {
|
|
35
|
+
return Buffer.alloc(size);
|
|
36
|
+
} else {
|
|
37
|
+
var buf = new Buffer(size);
|
|
38
|
+
buf.fill(0);
|
|
39
|
+
return buf;
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
/**
|
|
43
|
+
* Find out if an object is a Buffer.
|
|
44
|
+
* @param {Object} b the object to test.
|
|
45
|
+
* @return {Boolean} true if the object is a Buffer, false otherwise.
|
|
46
|
+
*/
|
|
47
|
+
isBuffer : function(b){
|
|
48
|
+
return Buffer.isBuffer(b);
|
|
49
|
+
},
|
|
50
|
+
|
|
51
|
+
isStream : function (obj) {
|
|
52
|
+
return obj &&
|
|
53
|
+
typeof obj.on === "function" &&
|
|
54
|
+
typeof obj.pause === "function" &&
|
|
55
|
+
typeof obj.resume === "function";
|
|
56
|
+
}
|
|
57
|
+
};
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var utf8 = require("./utf8");
|
|
3
|
+
var utils = require("./utils");
|
|
4
|
+
var GenericWorker = require("./stream/GenericWorker");
|
|
5
|
+
var StreamHelper = require("./stream/StreamHelper");
|
|
6
|
+
var defaults = require("./defaults");
|
|
7
|
+
var CompressedObject = require("./compressedObject");
|
|
8
|
+
var ZipObject = require("./zipObject");
|
|
9
|
+
var generate = require("./generate");
|
|
10
|
+
var nodejsUtils = require("./nodejsUtils");
|
|
11
|
+
var NodejsStreamInputAdapter = require("./nodejs/NodejsStreamInputAdapter");
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Add a file in the current folder.
|
|
16
|
+
* @private
|
|
17
|
+
* @param {string} name the name of the file
|
|
18
|
+
* @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
|
|
19
|
+
* @param {Object} originalOptions the options of the file
|
|
20
|
+
* @return {Object} the new file.
|
|
21
|
+
*/
|
|
22
|
+
var fileAdd = function(name, data, originalOptions) {
|
|
23
|
+
// be sure sub folders exist
|
|
24
|
+
var dataType = utils.getTypeOf(data),
|
|
25
|
+
parent;
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
/*
|
|
29
|
+
* Correct options.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
var o = utils.extend(originalOptions || {}, defaults);
|
|
33
|
+
o.date = o.date || new Date();
|
|
34
|
+
if (o.compression !== null) {
|
|
35
|
+
o.compression = o.compression.toUpperCase();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (typeof o.unixPermissions === "string") {
|
|
39
|
+
o.unixPermissions = parseInt(o.unixPermissions, 8);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// UNX_IFDIR 0040000 see zipinfo.c
|
|
43
|
+
if (o.unixPermissions && (o.unixPermissions & 0x4000)) {
|
|
44
|
+
o.dir = true;
|
|
45
|
+
}
|
|
46
|
+
// Bit 4 Directory
|
|
47
|
+
if (o.dosPermissions && (o.dosPermissions & 0x0010)) {
|
|
48
|
+
o.dir = true;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (o.dir) {
|
|
52
|
+
name = forceTrailingSlash(name);
|
|
53
|
+
}
|
|
54
|
+
if (o.createFolders && (parent = parentFolder(name))) {
|
|
55
|
+
folderAdd.call(this, parent, true);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
var isUnicodeString = dataType === "string" && o.binary === false && o.base64 === false;
|
|
59
|
+
if (!originalOptions || typeof originalOptions.binary === "undefined") {
|
|
60
|
+
o.binary = !isUnicodeString;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
var isCompressedEmpty = (data instanceof CompressedObject) && data.uncompressedSize === 0;
|
|
65
|
+
|
|
66
|
+
if (isCompressedEmpty || o.dir || !data || data.length === 0) {
|
|
67
|
+
o.base64 = false;
|
|
68
|
+
o.binary = true;
|
|
69
|
+
data = "";
|
|
70
|
+
o.compression = "STORE";
|
|
71
|
+
dataType = "string";
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/*
|
|
75
|
+
* Convert content to fit.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
var zipObjectContent = null;
|
|
79
|
+
if (data instanceof CompressedObject || data instanceof GenericWorker) {
|
|
80
|
+
zipObjectContent = data;
|
|
81
|
+
} else if (nodejsUtils.isNode && nodejsUtils.isStream(data)) {
|
|
82
|
+
zipObjectContent = new NodejsStreamInputAdapter(name, data);
|
|
83
|
+
} else {
|
|
84
|
+
zipObjectContent = utils.prepareContent(name, data, o.binary, o.optimizedBinaryString, o.base64);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
var object = new ZipObject(name, zipObjectContent, o);
|
|
88
|
+
this.files[name] = object;
|
|
89
|
+
/*
|
|
90
|
+
TODO: we can't throw an exception because we have async promises
|
|
91
|
+
(we can have a promise of a Date() for example) but returning a
|
|
92
|
+
promise is useless because file(name, data) returns the JSZip
|
|
93
|
+
object for chaining. Should we break that to allow the user
|
|
94
|
+
to catch the error ?
|
|
95
|
+
|
|
96
|
+
return external.Promise.resolve(zipObjectContent)
|
|
97
|
+
.then(function () {
|
|
98
|
+
return object;
|
|
99
|
+
});
|
|
100
|
+
*/
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Find the parent folder of the path.
|
|
105
|
+
* @private
|
|
106
|
+
* @param {string} path the path to use
|
|
107
|
+
* @return {string} the parent folder, or ""
|
|
108
|
+
*/
|
|
109
|
+
var parentFolder = function (path) {
|
|
110
|
+
if (path.slice(-1) === "/") {
|
|
111
|
+
path = path.substring(0, path.length - 1);
|
|
112
|
+
}
|
|
113
|
+
var lastSlash = path.lastIndexOf("/");
|
|
114
|
+
return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Returns the path with a slash at the end.
|
|
119
|
+
* @private
|
|
120
|
+
* @param {String} path the path to check.
|
|
121
|
+
* @return {String} the path with a trailing slash.
|
|
122
|
+
*/
|
|
123
|
+
var forceTrailingSlash = function(path) {
|
|
124
|
+
// Check the name ends with a /
|
|
125
|
+
if (path.slice(-1) !== "/") {
|
|
126
|
+
path += "/"; // IE doesn't like substr(-1)
|
|
127
|
+
}
|
|
128
|
+
return path;
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Add a (sub) folder in the current folder.
|
|
133
|
+
* @private
|
|
134
|
+
* @param {string} name the folder's name
|
|
135
|
+
* @param {boolean=} [createFolders] If true, automatically create sub
|
|
136
|
+
* folders. Defaults to false.
|
|
137
|
+
* @return {Object} the new folder.
|
|
138
|
+
*/
|
|
139
|
+
var folderAdd = function(name, createFolders) {
|
|
140
|
+
createFolders = (typeof createFolders !== "undefined") ? createFolders : defaults.createFolders;
|
|
141
|
+
|
|
142
|
+
name = forceTrailingSlash(name);
|
|
143
|
+
|
|
144
|
+
// Does this folder already exist?
|
|
145
|
+
if (!this.files[name]) {
|
|
146
|
+
fileAdd.call(this, name, null, {
|
|
147
|
+
dir: true,
|
|
148
|
+
createFolders: createFolders
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
return this.files[name];
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Cross-window, cross-Node-context regular expression detection
|
|
156
|
+
* @param {Object} object Anything
|
|
157
|
+
* @return {Boolean} true if the object is a regular expression,
|
|
158
|
+
* false otherwise
|
|
159
|
+
*/
|
|
160
|
+
function isRegExp(object) {
|
|
161
|
+
return Object.prototype.toString.call(object) === "[object RegExp]";
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// return the actual prototype of JSZip
|
|
165
|
+
var out = {
|
|
166
|
+
/**
|
|
167
|
+
* @see loadAsync
|
|
168
|
+
*/
|
|
169
|
+
load: function() {
|
|
170
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
171
|
+
},
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Call a callback function for each entry at this folder level.
|
|
176
|
+
* @param {Function} cb the callback function:
|
|
177
|
+
* function (relativePath, file) {...}
|
|
178
|
+
* It takes 2 arguments : the relative path and the file.
|
|
179
|
+
*/
|
|
180
|
+
forEach: function(cb) {
|
|
181
|
+
var filename, relativePath, file;
|
|
182
|
+
// ignore warning about unwanted properties because this.files is a null prototype object
|
|
183
|
+
/* eslint-disable-next-line guard-for-in */
|
|
184
|
+
for (filename in this.files) {
|
|
185
|
+
file = this.files[filename];
|
|
186
|
+
relativePath = filename.slice(this.root.length, filename.length);
|
|
187
|
+
if (relativePath && filename.slice(0, this.root.length) === this.root) { // the file is in the current root
|
|
188
|
+
cb(relativePath, file); // TODO reverse the parameters ? need to be clean AND consistent with the filter search fn...
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Filter nested files/folders with the specified function.
|
|
195
|
+
* @param {Function} search the predicate to use :
|
|
196
|
+
* function (relativePath, file) {...}
|
|
197
|
+
* It takes 2 arguments : the relative path and the file.
|
|
198
|
+
* @return {Array} An array of matching elements.
|
|
199
|
+
*/
|
|
200
|
+
filter: function(search) {
|
|
201
|
+
var result = [];
|
|
202
|
+
this.forEach(function (relativePath, entry) {
|
|
203
|
+
if (search(relativePath, entry)) { // the file matches the function
|
|
204
|
+
result.push(entry);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
});
|
|
208
|
+
return result;
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Add a file to the zip file, or search a file.
|
|
213
|
+
* @param {string|RegExp} name The name of the file to add (if data is defined),
|
|
214
|
+
* the name of the file to find (if no data) or a regex to match files.
|
|
215
|
+
* @param {String|ArrayBuffer|Uint8Array|Buffer} data The file data, either raw or base64 encoded
|
|
216
|
+
* @param {Object} o File options
|
|
217
|
+
* @return {JSZip|Object|Array} this JSZip object (when adding a file),
|
|
218
|
+
* a file (when searching by string) or an array of files (when searching by regex).
|
|
219
|
+
*/
|
|
220
|
+
file: function(name, data, o) {
|
|
221
|
+
if (arguments.length === 1) {
|
|
222
|
+
if (isRegExp(name)) {
|
|
223
|
+
var regexp = name;
|
|
224
|
+
return this.filter(function(relativePath, file) {
|
|
225
|
+
return !file.dir && regexp.test(relativePath);
|
|
226
|
+
});
|
|
227
|
+
}
|
|
228
|
+
else { // text
|
|
229
|
+
var obj = this.files[this.root + name];
|
|
230
|
+
if (obj && !obj.dir) {
|
|
231
|
+
return obj;
|
|
232
|
+
} else {
|
|
233
|
+
return null;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
else { // more than one argument : we have data !
|
|
238
|
+
name = this.root + name;
|
|
239
|
+
fileAdd.call(this, name, data, o);
|
|
240
|
+
}
|
|
241
|
+
return this;
|
|
242
|
+
},
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Add a directory to the zip file, or search.
|
|
246
|
+
* @param {String|RegExp} arg The name of the directory to add, or a regex to search folders.
|
|
247
|
+
* @return {JSZip} an object with the new directory as the root, or an array containing matching folders.
|
|
248
|
+
*/
|
|
249
|
+
folder: function(arg) {
|
|
250
|
+
if (!arg) {
|
|
251
|
+
return this;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (isRegExp(arg)) {
|
|
255
|
+
return this.filter(function(relativePath, file) {
|
|
256
|
+
return file.dir && arg.test(relativePath);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
// else, name is a new folder
|
|
261
|
+
var name = this.root + arg;
|
|
262
|
+
var newFolder = folderAdd.call(this, name);
|
|
263
|
+
|
|
264
|
+
// Allow chaining by returning a new object with this folder as the root
|
|
265
|
+
var ret = this.clone();
|
|
266
|
+
ret.root = newFolder.name;
|
|
267
|
+
return ret;
|
|
268
|
+
},
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Delete a file, or a directory and all sub-files, from the zip
|
|
272
|
+
* @param {string} name the name of the file to delete
|
|
273
|
+
* @return {JSZip} this JSZip object
|
|
274
|
+
*/
|
|
275
|
+
remove: function(name) {
|
|
276
|
+
name = this.root + name;
|
|
277
|
+
var file = this.files[name];
|
|
278
|
+
if (!file) {
|
|
279
|
+
// Look for any folders
|
|
280
|
+
if (name.slice(-1) !== "/") {
|
|
281
|
+
name += "/";
|
|
282
|
+
}
|
|
283
|
+
file = this.files[name];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
if (file && !file.dir) {
|
|
287
|
+
// file
|
|
288
|
+
delete this.files[name];
|
|
289
|
+
} else {
|
|
290
|
+
// maybe a folder, delete recursively
|
|
291
|
+
var kids = this.filter(function(relativePath, file) {
|
|
292
|
+
return file.name.slice(0, name.length) === name;
|
|
293
|
+
});
|
|
294
|
+
for (var i = 0; i < kids.length; i++) {
|
|
295
|
+
delete this.files[kids[i].name];
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
return this;
|
|
300
|
+
},
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* @deprecated This method has been removed in JSZip 3.0, please check the upgrade guide.
|
|
304
|
+
*/
|
|
305
|
+
generate: function() {
|
|
306
|
+
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Generate the complete zip file as an internal stream.
|
|
311
|
+
* @param {Object} options the options to generate the zip file :
|
|
312
|
+
* - compression, "STORE" by default.
|
|
313
|
+
* - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
|
|
314
|
+
* @return {StreamHelper} the streamed zip file.
|
|
315
|
+
*/
|
|
316
|
+
generateInternalStream: function(options) {
|
|
317
|
+
var worker, opts = {};
|
|
318
|
+
try {
|
|
319
|
+
opts = utils.extend(options || {}, {
|
|
320
|
+
streamFiles: false,
|
|
321
|
+
compression: "STORE",
|
|
322
|
+
compressionOptions : null,
|
|
323
|
+
type: "",
|
|
324
|
+
platform: "DOS",
|
|
325
|
+
comment: null,
|
|
326
|
+
mimeType: "application/zip",
|
|
327
|
+
encodeFileName: utf8.utf8encode
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
opts.type = opts.type.toLowerCase();
|
|
331
|
+
opts.compression = opts.compression.toUpperCase();
|
|
332
|
+
|
|
333
|
+
// "binarystring" is preferred but the internals use "string".
|
|
334
|
+
if(opts.type === "binarystring") {
|
|
335
|
+
opts.type = "string";
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
if (!opts.type) {
|
|
339
|
+
throw new Error("No output type specified.");
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
utils.checkSupport(opts.type);
|
|
343
|
+
|
|
344
|
+
// accept nodejs `process.platform`
|
|
345
|
+
if(
|
|
346
|
+
opts.platform === "darwin" ||
|
|
347
|
+
opts.platform === "freebsd" ||
|
|
348
|
+
opts.platform === "linux" ||
|
|
349
|
+
opts.platform === "sunos"
|
|
350
|
+
) {
|
|
351
|
+
opts.platform = "UNIX";
|
|
352
|
+
}
|
|
353
|
+
if (opts.platform === "win32") {
|
|
354
|
+
opts.platform = "DOS";
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
var comment = opts.comment || this.comment || "";
|
|
358
|
+
worker = generate.generateWorker(this, opts, comment);
|
|
359
|
+
} catch (e) {
|
|
360
|
+
worker = new GenericWorker("error");
|
|
361
|
+
worker.error(e);
|
|
362
|
+
}
|
|
363
|
+
return new StreamHelper(worker, opts.type || "string", opts.mimeType);
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* Generate the complete zip file asynchronously.
|
|
367
|
+
* @see generateInternalStream
|
|
368
|
+
*/
|
|
369
|
+
generateAsync: function(options, onUpdate) {
|
|
370
|
+
return this.generateInternalStream(options).accumulate(onUpdate);
|
|
371
|
+
},
|
|
372
|
+
/**
|
|
373
|
+
* Generate the complete zip file asynchronously.
|
|
374
|
+
* @see generateInternalStream
|
|
375
|
+
*/
|
|
376
|
+
generateNodeStream: function(options, onUpdate) {
|
|
377
|
+
options = options || {};
|
|
378
|
+
if (!options.type) {
|
|
379
|
+
options.type = "nodebuffer";
|
|
380
|
+
}
|
|
381
|
+
return this.generateInternalStream(options).toNodejsStream(onUpdate);
|
|
382
|
+
}
|
|
383
|
+
};
|
|
384
|
+
module.exports = out;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* This file is used by module bundlers (browserify/webpack/etc) when
|
|
4
|
+
* including a stream implementation. We use "readable-stream" to get a
|
|
5
|
+
* consistent behavior between nodejs versions but bundlers often have a shim
|
|
6
|
+
* for "stream". Using this shim greatly improve the compatibility and greatly
|
|
7
|
+
* reduce the final size of the bundle (only one stream implementation, not
|
|
8
|
+
* two).
|
|
9
|
+
*/
|
|
10
|
+
module.exports = require("stream");
|