@loomhelm/multi-task-flow 0.2.1 → 0.2.7
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 +5 -5
- package/package.json +7 -3
- package/src/release.ts +2 -1
- package/toolkit/artifact-manifest.json +4828 -738
- package/toolkit/package.json +6 -2
- package/toolkit/skills/bin/compatibility_dispatch.ts +0 -4
- package/toolkit/skills/bin/modules/checks/architecture_review_contracts.ts +3 -0
- package/toolkit/skills/bin/modules/checks/pr_terminal_events.ts +8 -0
- package/toolkit/skills/bin/modules/checks/pr_terminal_scan.ts +6 -0
- package/toolkit/skills/bin/modules/checks/pr_terminal_state.ts +2 -0
- package/toolkit/skills/bin/modules/checks/pr_terminal_support.ts +4 -0
- package/toolkit/skills/bin/modules/checks/pr_terminal_task.ts +11 -0
- package/toolkit/skills/catalog.json +3 -1
- package/toolkit/skills/docs-migrate/scripts/_runtime/compatibility_cli.ts +12 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/compatibility_docs.ts +115 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/compatibility_shared.ts +230 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/checks/replay.ts +336 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/git.ts +54 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/hardware_ingest.ts +377 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/hardware_locks.ts +181 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/legacy_spec_id.ts +131 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/migration_common.ts +291 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/next_plan.ts +199 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/next_plan_support.ts +245 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_contract.ts +299 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift.ts +387 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift_helpers.ts +381 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift_legacy.ts +376 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift_paths.ts +3 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift_types.ts +27 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_drift_validation.ts +251 -0
- package/toolkit/skills/docs-migrate/scripts/_runtime/modules/docs/spec_migration.ts +191 -0
- package/toolkit/skills/docs-migrate/scripts/gen_legacy_spec_id.ts +1 -1
- package/toolkit/skills/docs-migrate/scripts/specs_migrate_guard.ts +1 -1
- package/toolkit/skills/find-next-plan/scripts/_runtime/compatibility_cli.ts +12 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/compatibility_docs.ts +115 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/compatibility_shared.ts +230 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/checks/replay.ts +336 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/git.ts +54 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/hardware_ingest.ts +377 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/hardware_locks.ts +181 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/legacy_spec_id.ts +131 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/migration_common.ts +291 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/next_plan.ts +199 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/next_plan_support.ts +245 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_contract.ts +299 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift.ts +387 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift_helpers.ts +381 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift_legacy.ts +376 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift_paths.ts +3 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift_types.ts +27 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_drift_validation.ts +251 -0
- package/toolkit/skills/find-next-plan/scripts/_runtime/modules/docs/spec_migration.ts +191 -0
- package/toolkit/skills/find-next-plan/scripts/find_next_plan.ts +1 -1
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/compatibility_cli.ts +12 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/compatibility_docs.ts +115 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/compatibility_shared.ts +230 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/checks/replay.ts +336 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/git.ts +54 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/hardware_ingest.ts +377 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/hardware_locks.ts +181 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/legacy_spec_id.ts +131 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/migration_common.ts +291 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/next_plan.ts +199 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/next_plan_support.ts +245 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_contract.ts +299 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift.ts +387 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift_helpers.ts +381 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift_legacy.ts +376 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift_paths.ts +3 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift_types.ts +27 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_drift_validation.ts +251 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/_runtime/modules/docs/spec_migration.ts +191 -0
- package/toolkit/skills/hardware-doc-ingest/scripts/ingest_mineru_extract.ts +1 -1
- package/toolkit/skills/hardware-doc-ingest/scripts/verify_doc_locks.ts +1 -1
- package/toolkit/skills/multi-task-flow/SKILL.md +4 -4
- package/toolkit/skills/multi-task-flow/dist/app.css +1 -1
- package/toolkit/skills/multi-task-flow/dist/app.js +81 -81
- package/toolkit/skills/multi-task-flow/dist/index.html +6 -4
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/index.ts +54 -0
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/group-core.md +4 -4
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/group-dashboard.md +2 -2
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-acceptance.md +1 -1
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-deploy.md +1 -1
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-model.md +3 -3
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-release.md +1 -1
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-scheduler.md +5 -4
- package/toolkit/skills/multi-task-flow/examples/orchestration-viewer/requirements/task-verify.md +1 -1
- package/toolkit/skills/multi-task-flow/lib/atomic-orchestration.ts +237 -0
- package/toolkit/skills/multi-task-flow/lib/contract.ts +1 -1
- package/toolkit/skills/multi-task-flow/lib/engine.ts +94 -29
- package/toolkit/skills/multi-task-flow/lib/schema.ts +57 -6
- package/toolkit/skills/multi-task-flow/lib/service-compatibility.ts +1 -1
- package/toolkit/skills/multi-task-flow/lib/service-pages.ts +2 -1
- package/toolkit/skills/multi-task-flow/lib/store-migration.ts +19 -0
- package/toolkit/skills/multi-task-flow/lib/view.ts +98 -9
- package/toolkit/skills/multi-task-flow/node_modules/zod/LICENSE +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/README.md +218 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/compile.cjs +96 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/compile.d.cts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/compile.d.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/compile.js +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/index.cjs +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/index.js +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.cjs +36 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.d.cts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.d.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/locales/index.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/locales/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.cjs +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/mini/index.js +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/mini/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/package.json +147 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/compile.ts +56 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/index.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/locales/index.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/mini/index.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/ZodError.ts +340 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/datetime.ts +58 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/discriminatedUnion.ts +80 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/index.ts +59 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/ipv4.ts +57 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/object.ts +69 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/primitives.ts +162 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/realworld.ts +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/string.ts +55 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/benchmarks/union.ts +80 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/errors.ts +13 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/external.ts +6 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/enumUtil.ts +17 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/errorUtil.ts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/parseUtil.ts +176 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/partialUtil.ts +34 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/typeAliases.ts +2 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/helpers/util.ts +224 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/index.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/locales/en.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/standard-schema.ts +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/Mocker.ts +54 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/all-errors.test.ts +157 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/anyunknown.test.ts +28 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/array.test.ts +71 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/async-parsing.test.ts +388 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/async-refinements.test.ts +46 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/base.test.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/bigint.test.ts +55 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/branded.test.ts +53 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/catch.test.ts +220 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/coerce.test.ts +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/complex.test.ts +70 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/custom.test.ts +31 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/date.test.ts +32 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/deepmasking.test.ts +186 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/default.test.ts +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/description.test.ts +33 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/discriminated-unions.test.ts +315 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/enum.test.ts +80 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/error.test.ts +586 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/firstparty.test.ts +87 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/firstpartyschematypes.test.ts +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/function.test.ts +261 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/generics.test.ts +48 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/instanceof.test.ts +37 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/intersection.test.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/language-server.source.ts +76 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/language-server.test.ts +206 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/literal.test.ts +36 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/map.test.ts +110 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/masking.test.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/mocker.test.ts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nan.test.ts +24 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nativeEnum.test.ts +87 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/nullable.test.ts +42 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/number.test.ts +176 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object-augmentation.test.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/object.test.ts +431 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/optional.test.ts +42 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/parseUtil.test.ts +23 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/parser.test.ts +41 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/partials.test.ts +243 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/pickomit.test.ts +111 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/pipeline.test.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/preprocess.test.ts +186 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/primitive.test.ts +440 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/promise.test.ts +90 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/readonly.test.ts +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/record.test.ts +171 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/recursive.test.ts +197 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/refine.test.ts +313 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/safeparse.test.ts +27 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/set.test.ts +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/standard-schema.test.ts +83 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/string.test.ts +922 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/transformer.test.ts +233 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/tuple.test.ts +90 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/unions.test.ts +57 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/validations.test.ts +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/tests/void.test.ts +15 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v3/types.ts +5138 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/checks.ts +33 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/coerce.ts +27 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/compat.ts +78 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/deep-partial.ts +76 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/errors.ts +97 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/external.ts +57 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/from-json-schema.ts +944 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/in-out.ts +45 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/index.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/iso.ts +20 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/parse.ts +88 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/schemas.ts +2937 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/anyunknown.test.ts +26 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/apply.test.ts +86 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/array.test.ts +291 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/assignability.test.ts +402 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/async-parsing.test.ts +381 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/async-refinements.test.ts +68 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/base.test.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/bigint.test.ts +89 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/brand.test.ts +106 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/catch.test.ts +604 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/coalesce.test.ts +20 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/codec-examples.test.ts +572 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/codec.test.ts +704 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/coerce.test.ts +160 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/continuability.test.ts +374 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/credit-card.test.ts +76 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/custom.test.ts +40 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/cyclic-data.test.ts +985 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/date.test.ts +92 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/datetime.test.ts +316 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/deep-partial.test.ts +380 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/default-locale.test.ts +32 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/default.test.ts +455 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/describe-meta-checks.test.ts +27 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/description.test.ts +32 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/detached-methods.test.ts +221 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/discriminated-unions.test.ts +942 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/enum.test.ts +305 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/error-utils.test.ts +917 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/error.test.ts +1108 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/file.test.ts +96 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/firstparty.test.ts +179 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/fix-json-issue.test.ts +26 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/from-json-schema.test.ts +1467 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/function.test.ts +391 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/generics.test.ts +72 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/global-config.test.ts +32 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/hash.test.ts +67 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/iban.test.ts +81 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/in-out.test.ts +159 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/index.test.ts +958 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/instance-footprint.test.ts +319 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/instanceof.test.ts +127 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/intersection.test.ts +334 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/issue-schema.test.ts +215 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/jitless-allows-eval.test.ts +39 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/json.test.ts +109 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/lazy.test.ts +262 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/literal.test.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/locales_ka.test.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/locales_ro.test.ts +24 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/map.test.ts +349 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nan.test.ts +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nested-refine.test.ts +168 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nonoptional.test.ts +101 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/nullable.test.ts +22 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/number.test.ts +401 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/object.test.ts +1006 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/optin-ladder.test.ts +235 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/optional.test.ts +366 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/partial.test.ts +497 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/pickomit.test.ts +211 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/pipe.test.ts +101 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/prefault.test.ts +144 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/preprocess-types.test.ts +44 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/preprocess.test.ts +351 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/primitive.test.ts +175 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/promise.test.ts +81 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/properties.test.ts +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/prototypes.test.ts +23 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/readonly.test.ts +184 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/record.test.ts +885 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/recursive-types.test.ts +707 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/redos.test.ts +68 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/refine.test.ts +693 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/registries.test.ts +243 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/set.test.ts +196 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/standard-schema.test.ts +153 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/string-formats.test.ts +125 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/string.test.ts +1440 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/stringbool.test.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/template-literal.test.ts +812 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/to-json-schema-methods.test.ts +438 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/to-json-schema.test.ts +4733 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/transform.test.ts +378 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/tuple.test.ts +511 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/union.test.ts +310 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/url.test.ts +13 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/validate.test.ts +645 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/validations.test.ts +283 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/classic/tests/void.test.ts +12 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/api.ts +1875 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/checks.ts +1266 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/compile.ts +2322 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/core.ts +230 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/doc.ts +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/errors.ts +543 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/index.ts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema-generator.ts +131 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema-processors.ts +934 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/json-schema.ts +148 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/memoizer.ts +331 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/parse.ts +309 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/regexes.ts +217 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/registries.ts +105 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/schemas.ts +5226 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/standard-schema.ts +159 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/cached.test.ts +54 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-differential.test.ts +1004 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-generative.test.ts +445 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-global.test.ts +89 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-off-by-default.test.ts +26 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile-stats.test.ts +34 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/compile.test.ts +2036 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/email-regex.test.ts +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/extend.test.ts +59 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/index.test.ts +46 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/be.test.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/el.test.ts +214 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/en.test.ts +22 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/es.test.ts +180 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/fr.test.ts +72 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/he.test.ts +379 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/hr.test.ts +163 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/nl.test.ts +46 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/parity.test.ts +42 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/ru.test.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tg.test.ts +85 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tk.test.ts +69 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/tr.test.ts +69 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/locales/uz.test.ts +105 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/polyfill-collision.test.ts +46 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/record-constructor.test.ts +125 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/recursive-tuples.test.ts +45 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/treeshake.test.ts +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/tests/url-no-canparse.test.ts +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/to-json-schema.ts +857 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/util.ts +1293 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/versions.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/visit.ts +193 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/core/zsf.ts +323 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/index.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ar.ts +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/az.ts +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/be.ts +188 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/bg.ts +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/bn.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ca.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ckb.ts +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/cs.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/da.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/de.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/el.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/en.ts +136 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/eo.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/es.ts +145 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fa.ts +131 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fi.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fr-CA.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/fr.ts +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/gu.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/he.ts +253 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hi.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hr.ts +135 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hu.ts +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/hy.ts +175 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/id.ts +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/index.ts +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/is.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/it.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ja.ts +119 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ka.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/kh.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/km.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/kn.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ko.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/lt.ts +243 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/mk.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ms.ts +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ne.ts +128 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/nl.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/nn.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/no.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ota.ts +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pl.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ps.ts +131 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pt-BR.ts +161 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/pt.ts +159 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ro.ts +132 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ru.ts +188 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sk.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sl.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/sv.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ta.ts +123 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tg.ts +135 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/th.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tk.ts +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/tr.ts +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ua.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/uk.ts +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/ur.ts +124 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/uz.ts +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/vi.ts +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/yo.ts +129 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/zh-CN.ts +121 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/locales/zh-TW.ts +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/checks.ts +33 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/coerce.ts +27 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/deep-partial.ts +73 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/external.ts +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/in-out.ts +45 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/index.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/iso.ts +66 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/parse.ts +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/schemas.ts +2051 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/apply.test.ts +57 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/assignability.test.ts +190 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/brand.test.ts +94 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/checks.test.ts +158 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/codec.test.ts +582 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/computed.test.ts +30 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/cyclic-data.test.ts +84 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/deep-partial.test.ts +54 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/error.test.ts +41 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/functions.test.ts +14 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/index.test.ts +1146 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/number.test.ts +109 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/object.test.ts +292 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/prototypes.test.ts +43 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/recursive-types.test.ts +341 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/standard-schema.test.ts +50 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4/mini/tests/string.test.ts +396 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/src/v4-mini/index.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.cjs +167 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.d.cts +164 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.d.ts +164 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/ZodError.js +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.cjs +36 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.d.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/errors.js +9 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.cjs +41 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.d.cts +6 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.d.ts +6 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/external.js +6 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.d.cts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.d.ts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/enumUtil.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.cjs +28 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.d.cts +9 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.d.ts +9 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/errorUtil.js +6 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.cjs +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.d.cts +78 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.d.ts +78 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/parseUtil.js +109 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.d.cts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.d.ts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/partialUtil.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.d.cts +2 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.d.ts +2 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/typeAliases.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.cjs +156 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.d.cts +85 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.d.ts +85 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/helpers/util.js +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.cjs +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.d.cts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/index.js +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.cjs +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/locales/en.js +109 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.d.cts +102 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.d.ts +102 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/standard-schema.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.cjs +3798 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.d.cts +1034 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.d.ts +1034 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v3/types.js +3697 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.cjs +53 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.d.cts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.d.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/checks.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.cjs +66 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.d.cts +17 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.d.ts +17 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/coerce.js +17 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.cjs +80 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.d.cts +48 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.d.ts +48 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/compat.js +31 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.cjs +58 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.d.cts +14 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.d.ts +14 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/deep-partial.js +13 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.cjs +102 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.d.cts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.d.ts +29 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/errors.js +57 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.cjs +97 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.d.cts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.d.ts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/external.js +17 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.cjs +926 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.d.cts +12 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.d.ts +12 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/from-json-schema.js +881 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.cjs +82 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.d.cts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.d.ts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/in-out.js +36 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.cjs +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/index.js +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.cjs +68 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.d.cts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.d.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/iso.js +15 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.cjs +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.d.cts +44 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.d.ts +44 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/parse.js +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.cjs +1676 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.d.cts +816 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.d.ts +816 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/classic/schemas.js +1535 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.cjs +1269 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.d.cts +335 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.d.ts +335 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/api.js +1107 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.cjs +561 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.d.cts +294 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.d.ts +294 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/checks.js +516 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.cjs +1916 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.d.cts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.d.ts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/compile.js +1866 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.cjs +167 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.d.cts +82 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.d.ts +82 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/core.js +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.cjs +61 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.d.cts +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.d.ts +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/doc.js +38 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.cjs +317 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.d.cts +225 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.d.ts +225 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/errors.js +267 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.cjs +70 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.d.cts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.d.ts +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/index.js +19 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.cjs +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.d.cts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.d.ts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-generator.js +99 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.cjs +929 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.d.cts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.d.ts +65 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema-processors.js +843 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.d.cts +89 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.d.ts +89 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/json-schema.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.cjs +360 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.d.cts +15 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.d.ts +15 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/memoizer.js +311 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.cjs +233 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.d.cts +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.d.ts +52 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/parse.js +175 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.cjs +209 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.d.cts +90 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.d.ts +90 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/regexes.js +156 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.cjs +75 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.d.cts +35 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.d.ts +35 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/registries.js +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.cjs +2699 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.d.cts +1275 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.d.ts +1275 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/schemas.js +2636 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.cjs +21 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.d.cts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.d.ts +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/standard-schema.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.cjs +681 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.d.cts +154 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.d.ts +154 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/to-json-schema.js +651 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.cjs +964 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.d.cts +280 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.d.ts +280 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/util.js +873 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.cjs +27 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.d.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/versions.js +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.cjs +214 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.d.cts +30 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.d.ts +30 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/core/visit.js +169 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.cjs +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/index.js +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.cjs +138 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ar.js +111 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.cjs +137 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/az.js +110 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.cjs +195 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/be.js +168 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.cjs +152 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bg.js +125 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/bn.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ca.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.cjs +160 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ckb.js +133 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.cjs +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/cs.js +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.cjs +147 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/da.js +120 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/de.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/el.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.cjs +152 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/en.js +125 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/eo.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.cjs +163 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/es.js +136 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.cjs +146 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fa.js +119 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.cjs +144 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fi.js +117 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr-CA.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.cjs +156 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/fr.js +129 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/gu.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.cjs +248 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/he.js +221 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.cjs +138 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hi.js +111 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.cjs +153 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hr.js +126 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hu.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.cjs +185 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/hy.js +158 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.cjs +138 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/id.js +111 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.cjs +152 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.d.cts +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.d.ts +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/index.js +63 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/is.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/it.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ja.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.cjs +144 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ka.js +117 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.cjs +12 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.d.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kh.js +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/km.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.cjs +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/kn.js +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.cjs +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ko.js +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.cjs +234 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/lt.js +207 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/mk.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ms.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.cjs +138 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ne.js +111 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nl.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/nn.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/no.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ota.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pl.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.cjs +146 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ps.js +119 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.cjs +170 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt-BR.js +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.cjs +169 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/pt.js +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.cjs +149 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ro.js +122 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.cjs +195 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ru.js +168 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.cjs +143 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sk.js +116 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sl.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/sv.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ta.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.cjs +144 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tg.js +117 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/th.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.cjs +134 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tk.js +107 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.cjs +137 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/tr.js +110 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.cjs +12 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.d.ts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ua.js +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uk.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.cjs +142 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/ur.js +115 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/uz.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.cjs +140 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/vi.js +113 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/yo.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.cjs +141 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-CN.js +114 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.cjs +139 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.d.cts +5 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.d.ts +4 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/locales/zh-TW.js +112 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.cjs +54 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.d.cts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.d.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/checks.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.cjs +71 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.d.cts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.d.ts +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/coerce.js +22 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.cjs +58 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.d.cts +14 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.d.ts +14 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/deep-partial.js +13 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.cjs +95 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.d.cts +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.d.ts +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/external.js +16 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.cjs +82 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.d.cts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.d.ts +8 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/in-out.js +36 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.cjs +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/index.js +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.cjs +83 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.d.cts +22 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.d.ts +22 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/iso.js +34 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.cjs +37 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.d.cts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.d.ts +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/parse.js +1 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.cjs +1147 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.d.cts +480 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.d.ts +480 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/mini/schemas.js +1002 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4/package.json +7 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.cjs +51 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.d.cts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.d.ts +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/index.js +3 -0
- package/toolkit/skills/multi-task-flow/node_modules/zod/v4-mini/package.json +7 -0
- package/toolkit/skills/multi-task-flow/scripts/demo-static.ts +1 -1
- package/toolkit/skills/multi-task-flow/scripts/orchestrate.ts +2 -0
- package/toolkit/skills/multi-task-flow/scripts/package-client-skills.ts +62 -23
- package/toolkit/skills/multi-task-flow/tests/atomic-orchestration-schema.test.ts +60 -0
- package/toolkit/skills/multi-task-flow/tests/graph-projection.test.ts +9 -0
- package/toolkit/skills/multi-task-flow/tests/task-kind.test.ts +14 -0
- package/toolkit/skills/multi-task-flow/tests/ui/detail-surface.test.ts +1 -1
- package/toolkit/skills/multi-task-flow/tests/ui/responsive-width-contract.test.ts +12 -0
- package/toolkit/skills/multi-task-flow/tests/view-state.test.ts +7 -0
- package/toolkit/skills/multi-task-flow/web/app.css +35 -6
- package/toolkit/skills/multi-task-flow/web/app.ts +48 -7
- package/toolkit/skills/multi-task-flow/web/atomic-graph-view.tsx +158 -0
- package/toolkit/skills/multi-task-flow/web/graph-layout.ts +3 -3
- package/toolkit/skills/multi-task-flow/web/graph-projection.ts +31 -0
- package/toolkit/skills/multi-task-flow/web/graph-view.tsx +1 -1
- package/toolkit/skills/multi-task-flow/web/graph.ts +3 -0
- package/toolkit/skills/multi-task-flow/web/index.html +6 -4
- package/toolkit/skills/multi-task-flow/web/labels.ts +1 -1
- package/toolkit/skills/multi-task-flow/web/model.ts +2 -0
- package/toolkit/skills/multi-task-flow/web/view-state.ts +12 -5
- package/toolkit/skills/node_modules/@img/colour/LICENSE.md +82 -0
- package/toolkit/skills/node_modules/@img/colour/README.md +15 -0
- package/toolkit/skills/node_modules/@img/colour/color.cjs +1596 -0
- package/toolkit/skills/node_modules/@img/colour/index.cjs +1 -0
- package/toolkit/skills/node_modules/@img/colour/index.d.ts +929 -0
- package/toolkit/skills/node_modules/@img/colour/package.json +58 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/README.md +46 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +219 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +1 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.18.7 +0 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/package.json +43 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linux-x64/versions.json +30 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +46 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +219 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +1 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.18.7 +0 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +43 -0
- package/toolkit/skills/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +30 -0
- package/toolkit/skills/node_modules/@img/sharp-linux-x64/LICENSE +191 -0
- package/toolkit/skills/node_modules/@img/sharp-linux-x64/README.md +18 -0
- package/toolkit/skills/node_modules/@img/sharp-linux-x64/index.cjs +2 -0
- package/toolkit/skills/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64-0.35.5.node +0 -0
- package/toolkit/skills/node_modules/@img/sharp-linux-x64/package.json +47 -0
- package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/LICENSE +191 -0
- package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/README.md +18 -0
- package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/index.cjs +2 -0
- package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64-0.35.5.node +0 -0
- package/toolkit/skills/node_modules/@img/sharp-linuxmusl-x64/package.json +47 -0
- package/toolkit/skills/node_modules/detect-libc/LICENSE +201 -0
- package/toolkit/skills/node_modules/detect-libc/README.md +163 -0
- package/toolkit/skills/node_modules/detect-libc/index.d.ts +14 -0
- package/toolkit/skills/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/toolkit/skills/node_modules/detect-libc/lib/elf.js +39 -0
- package/toolkit/skills/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/toolkit/skills/node_modules/detect-libc/lib/process.js +24 -0
- package/toolkit/skills/node_modules/detect-libc/package.json +44 -0
- package/toolkit/skills/node_modules/semver/LICENSE +15 -0
- package/toolkit/skills/node_modules/semver/README.md +680 -0
- package/toolkit/skills/node_modules/semver/bin/semver.js +195 -0
- package/toolkit/skills/node_modules/semver/classes/comparator.js +143 -0
- package/toolkit/skills/node_modules/semver/classes/index.js +7 -0
- package/toolkit/skills/node_modules/semver/classes/range.js +577 -0
- package/toolkit/skills/node_modules/semver/classes/semver.js +350 -0
- package/toolkit/skills/node_modules/semver/functions/clean.js +8 -0
- package/toolkit/skills/node_modules/semver/functions/cmp.js +54 -0
- package/toolkit/skills/node_modules/semver/functions/coerce.js +62 -0
- package/toolkit/skills/node_modules/semver/functions/compare-build.js +9 -0
- package/toolkit/skills/node_modules/semver/functions/compare-loose.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/compare.js +7 -0
- package/toolkit/skills/node_modules/semver/functions/diff.js +60 -0
- package/toolkit/skills/node_modules/semver/functions/eq.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/gt.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/gte.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/inc.js +21 -0
- package/toolkit/skills/node_modules/semver/functions/lt.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/lte.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/major.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/minor.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/neq.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/parse.js +18 -0
- package/toolkit/skills/node_modules/semver/functions/patch.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/prerelease.js +8 -0
- package/toolkit/skills/node_modules/semver/functions/rcompare.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/rsort.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/satisfies.js +12 -0
- package/toolkit/skills/node_modules/semver/functions/sort.js +5 -0
- package/toolkit/skills/node_modules/semver/functions/truncate.js +48 -0
- package/toolkit/skills/node_modules/semver/functions/valid.js +8 -0
- package/toolkit/skills/node_modules/semver/index.js +93 -0
- package/toolkit/skills/node_modules/semver/internal/constants.js +67 -0
- package/toolkit/skills/node_modules/semver/internal/debug.js +11 -0
- package/toolkit/skills/node_modules/semver/internal/identifiers.js +29 -0
- package/toolkit/skills/node_modules/semver/internal/lrucache.js +42 -0
- package/toolkit/skills/node_modules/semver/internal/parse-options.js +17 -0
- package/toolkit/skills/node_modules/semver/internal/re.js +223 -0
- package/toolkit/skills/node_modules/semver/internal/trim-comparator-whitespace.js +438 -0
- package/toolkit/skills/node_modules/semver/package.json +78 -0
- package/toolkit/skills/node_modules/semver/preload.js +4 -0
- package/toolkit/skills/node_modules/semver/range.bnf +17 -0
- package/toolkit/skills/node_modules/semver/ranges/gtr.js +6 -0
- package/toolkit/skills/node_modules/semver/ranges/intersects.js +9 -0
- package/toolkit/skills/node_modules/semver/ranges/ltr.js +6 -0
- package/toolkit/skills/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/toolkit/skills/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/toolkit/skills/node_modules/semver/ranges/min-version.js +63 -0
- package/toolkit/skills/node_modules/semver/ranges/outside.js +82 -0
- package/toolkit/skills/node_modules/semver/ranges/simplify.js +49 -0
- package/toolkit/skills/node_modules/semver/ranges/subset.js +249 -0
- package/toolkit/skills/node_modules/semver/ranges/to-comparators.js +10 -0
- package/toolkit/skills/node_modules/semver/ranges/valid.js +13 -0
- package/toolkit/skills/node_modules/sharp/LICENSE +191 -0
- package/toolkit/skills/node_modules/sharp/README.md +112 -0
- package/toolkit/skills/node_modules/sharp/dist/channel.cjs +177 -0
- package/toolkit/skills/node_modules/sharp/dist/channel.mjs +177 -0
- package/toolkit/skills/node_modules/sharp/dist/colour.cjs +199 -0
- package/toolkit/skills/node_modules/sharp/dist/colour.mjs +199 -0
- package/toolkit/skills/node_modules/sharp/dist/composite.cjs +213 -0
- package/toolkit/skills/node_modules/sharp/dist/composite.mjs +213 -0
- package/toolkit/skills/node_modules/sharp/dist/constructor.cjs +511 -0
- package/toolkit/skills/node_modules/sharp/dist/constructor.mjs +511 -0
- package/toolkit/skills/node_modules/sharp/dist/index.cjs +25 -0
- package/toolkit/skills/node_modules/sharp/dist/index.d.cts +1999 -0
- package/toolkit/skills/node_modules/sharp/dist/index.d.mts +2046 -0
- package/toolkit/skills/node_modules/sharp/dist/index.mjs +25 -0
- package/toolkit/skills/node_modules/sharp/dist/input.cjs +819 -0
- package/toolkit/skills/node_modules/sharp/dist/input.mjs +819 -0
- package/toolkit/skills/node_modules/sharp/dist/is.cjs +149 -0
- package/toolkit/skills/node_modules/sharp/dist/is.mjs +149 -0
- package/toolkit/skills/node_modules/sharp/dist/libvips.cjs +212 -0
- package/toolkit/skills/node_modules/sharp/dist/libvips.mjs +212 -0
- package/toolkit/skills/node_modules/sharp/dist/operation.cjs +1002 -0
- package/toolkit/skills/node_modules/sharp/dist/operation.mjs +1002 -0
- package/toolkit/skills/node_modules/sharp/dist/output.cjs +1786 -0
- package/toolkit/skills/node_modules/sharp/dist/output.mjs +1786 -0
- package/toolkit/skills/node_modules/sharp/dist/resize.cjs +617 -0
- package/toolkit/skills/node_modules/sharp/dist/resize.mjs +617 -0
- package/toolkit/skills/node_modules/sharp/dist/sharp.cjs +174 -0
- package/toolkit/skills/node_modules/sharp/dist/sharp.mjs +174 -0
- package/toolkit/skills/node_modules/sharp/dist/utility.cjs +301 -0
- package/toolkit/skills/node_modules/sharp/dist/utility.mjs +301 -0
- package/toolkit/skills/node_modules/sharp/install/build.js +38 -0
- package/toolkit/skills/node_modules/sharp/lib/index.d.ts +1999 -0
- package/toolkit/skills/node_modules/sharp/package.json +223 -2
- package/toolkit/skills/node_modules/sharp/src/binding.gyp +303 -0
- package/toolkit/skills/node_modules/sharp/src/common.cc +1186 -0
- package/toolkit/skills/node_modules/sharp/src/common.h +421 -0
- package/toolkit/skills/node_modules/sharp/src/metadata.cc +404 -0
- package/toolkit/skills/node_modules/sharp/src/metadata.h +95 -0
- package/toolkit/skills/node_modules/sharp/src/operations.cc +516 -0
- package/toolkit/skills/node_modules/sharp/src/operations.h +137 -0
- package/toolkit/skills/node_modules/sharp/src/pipeline.cc +1973 -0
- package/toolkit/skills/node_modules/sharp/src/pipeline.h +422 -0
- package/toolkit/skills/node_modules/sharp/src/sharp.cc +43 -0
- package/toolkit/skills/node_modules/sharp/src/stats.cc +186 -0
- package/toolkit/skills/node_modules/sharp/src/stats.h +62 -0
- package/toolkit/skills/node_modules/sharp/src/utilities.cc +289 -0
- package/toolkit/skills/node_modules/sharp/src/utilities.h +22 -0
- package/toolkit/skills/project-engineering-workflow/SKILL.md +1 -1
- package/toolkit/skills/project-engineering-workflow/references/pr-merge-procedure.md +14 -3
- package/toolkit/skills/project-engineering-workflow/scripts/base_alignment_helper.ts +9 -3
- package/toolkit/skills/project-engineering-workflow/scripts/test_base_alignment_helper.ts +1 -1
- package/toolkit/skills/{bin/tests/workspace → project-engineering-workflow/tests}/base_alignment.test.ts +26 -3
- package/toolkit/skills/project-engineering-workflow/tests/pr_replay_policy.test.ts +172 -0
- package/toolkit/skills/source-manifest.json +394 -65
- package/toolkit/skills/spec-sync/SKILL.md +1 -1
- package/toolkit/skills/spec-sync/scripts/_runtime/compatibility_cli.ts +12 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/compatibility_docs.ts +115 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/compatibility_shared.ts +230 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/checks/replay.ts +336 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/git.ts +54 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/hardware_ingest.ts +377 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/hardware_locks.ts +181 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/legacy_spec_id.ts +131 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/migration_common.ts +291 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/next_plan.ts +199 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/next_plan_support.ts +245 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_contract.ts +299 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift.ts +387 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift_helpers.ts +381 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift_legacy.ts +376 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift_paths.ts +3 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift_types.ts +27 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_drift_validation.ts +251 -0
- package/toolkit/skills/spec-sync/scripts/_runtime/modules/docs/spec_migration.ts +191 -0
- package/toolkit/skills/spec-sync/scripts/spec_drift_check.ts +1 -1
- package/toolkit/skills/support-manifest.json +77 -1
- package/toolkit/skills/node_modules/@xyflow/react/index.js +0 -3
- package/toolkit/skills/node_modules/@xyflow/react/package.json +0 -6
- package/toolkit/skills/node_modules/elkjs/index.js +0 -3
- package/toolkit/skills/node_modules/elkjs/package.json +0 -6
- package/toolkit/skills/node_modules/lucide/index.js +0 -3
- package/toolkit/skills/node_modules/lucide/package.json +0 -6
- package/toolkit/skills/node_modules/moment/index.js +0 -3
- package/toolkit/skills/node_modules/moment/package.json +0 -6
- package/toolkit/skills/node_modules/playwright/index.js +0 -3
- package/toolkit/skills/node_modules/playwright/package.json +0 -6
- package/toolkit/skills/node_modules/react/index.js +0 -3
- package/toolkit/skills/node_modules/react/package.json +0 -6
- package/toolkit/skills/node_modules/react-dom/index.js +0 -3
- package/toolkit/skills/node_modules/react-dom/package.json +0 -6
- package/toolkit/skills/node_modules/sharp/index.js +0 -3
- package/toolkit/skills/node_modules/vis-data/index.js +0 -3
- package/toolkit/skills/node_modules/vis-data/package.json +0 -6
- package/toolkit/skills/node_modules/vis-timeline/index.js +0 -3
- package/toolkit/skills/node_modules/vis-timeline/package.json +0 -6
- package/toolkit/skills/node_modules/zod/index.js +0 -3
- package/toolkit/skills/node_modules/zod/package.json +0 -6
- /package/toolkit/skills/{bin/modules/workspace → project-engineering-workflow/scripts}/base_alignment.ts +0 -0
- /package/toolkit/skills/{bin/modules/workspace → project-engineering-workflow/scripts}/base_alignment_actions.ts +0 -0
|
@@ -0,0 +1,1786 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
Copyright 2013 Lovell Fuller and others.
|
|
3
|
+
SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import is from './is.mjs';
|
|
8
|
+
import sharp from './sharp.mjs';
|
|
9
|
+
|
|
10
|
+
const formats = new Map([
|
|
11
|
+
['heic', 'heif'],
|
|
12
|
+
['heif', 'heif'],
|
|
13
|
+
['avif', 'avif'],
|
|
14
|
+
['jpeg', 'jpeg'],
|
|
15
|
+
['jpg', 'jpeg'],
|
|
16
|
+
['jpe', 'jpeg'],
|
|
17
|
+
['tile', 'tile'],
|
|
18
|
+
['dz', 'tile'],
|
|
19
|
+
['png', 'png'],
|
|
20
|
+
['raw', 'raw'],
|
|
21
|
+
['tiff', 'tiff'],
|
|
22
|
+
['tif', 'tiff'],
|
|
23
|
+
['webp', 'webp'],
|
|
24
|
+
['gif', 'gif'],
|
|
25
|
+
['jp2', 'jp2'],
|
|
26
|
+
['jpx', 'jp2'],
|
|
27
|
+
['j2k', 'jp2'],
|
|
28
|
+
['j2c', 'jp2'],
|
|
29
|
+
['jxl', 'jxl']
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
const jp2Regex = /\.(jp[2x]|j2[kc])$/i;
|
|
33
|
+
|
|
34
|
+
const errJp2Save = () => new Error('JP2 output requires libvips with support for OpenJPEG');
|
|
35
|
+
|
|
36
|
+
const bitdepthFromColourCount = (colours) => 1 << 32 - Math.clz32(Math.ceil(Math.log2(colours)) - 1);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Write output image data to a file.
|
|
40
|
+
*
|
|
41
|
+
* If an explicit output format is not selected, it will be inferred from the extension,
|
|
42
|
+
* with JPEG, PNG, WebP, AVIF, TIFF, GIF, DZI, and libvips' V format supported.
|
|
43
|
+
* Note that raw pixel data is only supported for buffer output.
|
|
44
|
+
*
|
|
45
|
+
* By default all metadata will be removed, which includes EXIF-based orientation.
|
|
46
|
+
* See {@link #withmetadata withMetadata} for control over this.
|
|
47
|
+
*
|
|
48
|
+
* The caller is responsible for ensuring directory structures and permissions exist.
|
|
49
|
+
*
|
|
50
|
+
* A `Promise` is returned when `callback` is not provided.
|
|
51
|
+
*
|
|
52
|
+
* @example
|
|
53
|
+
* sharp(input)
|
|
54
|
+
* .toFile('output.png', (err, info) => { ... });
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* sharp(input)
|
|
58
|
+
* .toFile('output.png')
|
|
59
|
+
* .then(info => { ... })
|
|
60
|
+
* .catch(err => { ... });
|
|
61
|
+
*
|
|
62
|
+
* @param {string} fileOut - the path to write the image data to.
|
|
63
|
+
* @param {Function} [callback] - called on completion with two arguments `(err, info)`.
|
|
64
|
+
* `info` contains the output image `format`, `size` (bytes), `width`, `height`,
|
|
65
|
+
* `channels` and `premultiplied` (indicating if premultiplication was used).
|
|
66
|
+
* When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`.
|
|
67
|
+
* When using the attention crop strategy also contains `attentionX` and `attentionY`, the focal point of the cropped region.
|
|
68
|
+
* Animated output will also contain `pageHeight` and `pages`.
|
|
69
|
+
* May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text.
|
|
70
|
+
* @returns {Promise<Object>} - when no callback is provided
|
|
71
|
+
* @throws {Error} Invalid parameters
|
|
72
|
+
*/
|
|
73
|
+
function toFile (fileOut, callback) {
|
|
74
|
+
let err;
|
|
75
|
+
if (!is.string(fileOut)) {
|
|
76
|
+
err = new Error('Missing output file path');
|
|
77
|
+
} else if (is.string(this.options.input.file) && path.resolve(this.options.input.file) === path.resolve(fileOut)) {
|
|
78
|
+
err = new Error('Cannot use same file for input and output');
|
|
79
|
+
} else if (jp2Regex.test(path.extname(fileOut)) && !this.constructor.format.jp2.output.file) {
|
|
80
|
+
err = errJp2Save();
|
|
81
|
+
}
|
|
82
|
+
if (err) {
|
|
83
|
+
if (is.fn(callback)) {
|
|
84
|
+
callback(err);
|
|
85
|
+
} else {
|
|
86
|
+
return Promise.reject(err);
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
this.options.fileOut = fileOut;
|
|
90
|
+
const stack = Error();
|
|
91
|
+
return this._pipeline(callback, stack);
|
|
92
|
+
}
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Write output to a Buffer.
|
|
98
|
+
* JPEG, PNG, WebP, AVIF, TIFF, GIF and raw pixel data output are supported.
|
|
99
|
+
*
|
|
100
|
+
* Use {@link #toformat toFormat} or one of the format-specific functions such as {@link #jpeg jpeg}, {@link #png png} etc. to set the output format.
|
|
101
|
+
*
|
|
102
|
+
* If no explicit format is set, the output format will match the input image, except SVG input which becomes PNG output.
|
|
103
|
+
*
|
|
104
|
+
* By default all metadata will be removed, which includes EXIF-based orientation.
|
|
105
|
+
* See {@link #withmetadata withMetadata} for control over this.
|
|
106
|
+
*
|
|
107
|
+
* `callback`, if present, gets three arguments `(err, data, info)` where:
|
|
108
|
+
* - `err` is an error, if any.
|
|
109
|
+
* - `data` is the output image data.
|
|
110
|
+
* - `info` contains the output image `format`, `size` (bytes), `width`, `height`,
|
|
111
|
+
* `channels` and `premultiplied` (indicating if premultiplication was used).
|
|
112
|
+
* When using a crop strategy also contains `cropOffsetLeft` and `cropOffsetTop`.
|
|
113
|
+
* Animated output will also contain `pageHeight` and `pages`.
|
|
114
|
+
* May also contain `textAutofitDpi` (dpi the font was rendered at) if image was created from text.
|
|
115
|
+
*
|
|
116
|
+
* The underlying `ArrayBuffer` may be marked as non-transferable by some JavaScript runtimes.
|
|
117
|
+
* Use {@link #touint8array toUint8Array} for a guaranteed transferable `ArrayBuffer`.
|
|
118
|
+
*
|
|
119
|
+
* A `Promise` is returned when `callback` is not provided.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* const data = await sharp(input)
|
|
123
|
+
* .png()
|
|
124
|
+
* .toBuffer();
|
|
125
|
+
*
|
|
126
|
+
* @example
|
|
127
|
+
* const { data, info } = await sharp(input)
|
|
128
|
+
* .png()
|
|
129
|
+
* .toBuffer({ resolveWithObject: true });
|
|
130
|
+
*
|
|
131
|
+
* @example
|
|
132
|
+
* const { data, info } = await sharp('my-image.jpg')
|
|
133
|
+
* // output the raw pixels
|
|
134
|
+
* .raw()
|
|
135
|
+
* .toBuffer({ resolveWithObject: true });
|
|
136
|
+
*
|
|
137
|
+
* // create a more type safe way to work with the raw pixel data
|
|
138
|
+
* // this will not copy the data, instead it will change `data`s underlying ArrayBuffer
|
|
139
|
+
* // so `data` and `pixelArray` point to the same memory location
|
|
140
|
+
* const pixelArray = new Uint8ClampedArray(data.buffer);
|
|
141
|
+
*
|
|
142
|
+
* // When you are done changing the pixelArray, sharp takes the `pixelArray` as an input
|
|
143
|
+
* const { width, height, channels } = info;
|
|
144
|
+
* await sharp(pixelArray, { raw: { width, height, channels } })
|
|
145
|
+
* .toFile('my-changed-image.jpg');
|
|
146
|
+
*
|
|
147
|
+
* @param {Object} [options]
|
|
148
|
+
* @param {boolean} [options.resolveWithObject] Resolve the Promise with an Object containing `data` and `info` properties instead of resolving only with `data`.
|
|
149
|
+
* @param {Function} [callback]
|
|
150
|
+
* @returns {Promise<Buffer>} - when no callback is provided
|
|
151
|
+
*/
|
|
152
|
+
function toBuffer (options, callback) {
|
|
153
|
+
if (is.object(options)) {
|
|
154
|
+
this._setBooleanOption('resolveWithObject', options.resolveWithObject);
|
|
155
|
+
} else if (this.options.resolveWithObject) {
|
|
156
|
+
this.options.resolveWithObject = false;
|
|
157
|
+
}
|
|
158
|
+
this.options.fileOut = '';
|
|
159
|
+
const stack = Error();
|
|
160
|
+
return this._pipeline(is.fn(options) ? options : callback, stack);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Write output to a `Uint8Array` backed by a transferable `ArrayBuffer`.
|
|
165
|
+
* JPEG, PNG, WebP, AVIF, TIFF, GIF and raw pixel data output are supported.
|
|
166
|
+
*
|
|
167
|
+
* Use {@link #toformat toFormat} or one of the format-specific functions such as {@link #jpeg jpeg}, {@link #png png} etc. to set the output format.
|
|
168
|
+
*
|
|
169
|
+
* If no explicit format is set, the output format will match the input image, except SVG input which becomes PNG output.
|
|
170
|
+
*
|
|
171
|
+
* By default all metadata will be removed, which includes EXIF-based orientation.
|
|
172
|
+
* See {@link #keepexif keepExif} and similar methods for control over this.
|
|
173
|
+
*
|
|
174
|
+
* Resolves with an `Object` containing:
|
|
175
|
+
* - `data` is the output image as a `Uint8Array` backed by a transferable `ArrayBuffer`.
|
|
176
|
+
* - `info` contains properties relating to the output image such as `width` and `height`.
|
|
177
|
+
*
|
|
178
|
+
* @since v0.35.0
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* const { data, info } = await sharp(input).toUint8Array();
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* const { data } = await sharp(input)
|
|
185
|
+
* .avif()
|
|
186
|
+
* .toUint8Array();
|
|
187
|
+
* const base64String = data.toBase64();
|
|
188
|
+
*
|
|
189
|
+
* @returns {Promise<{ data: Uint8Array, info: Object }>}
|
|
190
|
+
*/
|
|
191
|
+
function toUint8Array () {
|
|
192
|
+
this.options.resolveWithObject = true;
|
|
193
|
+
this.options.typedArrayOut = true;
|
|
194
|
+
const stack = Error();
|
|
195
|
+
return this._pipeline(null, stack);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Set output density (DPI) in EXIF metadata.
|
|
200
|
+
*
|
|
201
|
+
* @since 0.35.0
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* const data = await sharp(input)
|
|
205
|
+
* .withDensity(96)
|
|
206
|
+
* .toBuffer();
|
|
207
|
+
*
|
|
208
|
+
* @param {number} density Number of pixels per inch (DPI).
|
|
209
|
+
* @returns {Sharp}
|
|
210
|
+
* @throws {Error} Invalid parameters
|
|
211
|
+
*/
|
|
212
|
+
function withDensity (density) {
|
|
213
|
+
if (is.number(density) && density > 0) {
|
|
214
|
+
this.options.withMetadataDensity = density;
|
|
215
|
+
} else {
|
|
216
|
+
throw is.invalidParameterError('density', 'positive number', density);
|
|
217
|
+
}
|
|
218
|
+
return this.keepExif();
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* Keep all EXIF metadata from the input image in the output image.
|
|
223
|
+
*
|
|
224
|
+
* EXIF metadata is unsupported for TIFF output.
|
|
225
|
+
*
|
|
226
|
+
* @since 0.33.0
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* const outputWithExif = await sharp(inputWithExif)
|
|
230
|
+
* .keepExif()
|
|
231
|
+
* .toBuffer();
|
|
232
|
+
*
|
|
233
|
+
* @returns {Sharp}
|
|
234
|
+
*/
|
|
235
|
+
function keepExif () {
|
|
236
|
+
this.options.keepMetadata |= 0b00001;
|
|
237
|
+
return this;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Set EXIF metadata in the output image, ignoring any EXIF in the input image.
|
|
242
|
+
*
|
|
243
|
+
* @since 0.33.0
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* const dataWithExif = await sharp(input)
|
|
247
|
+
* .withExif({
|
|
248
|
+
* IFD0: {
|
|
249
|
+
* Copyright: 'The National Gallery'
|
|
250
|
+
* },
|
|
251
|
+
* IFD3: {
|
|
252
|
+
* GPSLatitudeRef: 'N',
|
|
253
|
+
* GPSLatitude: '51/1 30/1 3230/100',
|
|
254
|
+
* GPSLongitudeRef: 'W',
|
|
255
|
+
* GPSLongitude: '0/1 7/1 4366/100'
|
|
256
|
+
* }
|
|
257
|
+
* })
|
|
258
|
+
* .toBuffer();
|
|
259
|
+
*
|
|
260
|
+
* @param {Object<string, Object<string, string>>} exif Object keyed by IFD0, IFD1 etc. of key/value string pairs to write as EXIF data.
|
|
261
|
+
* @returns {Sharp}
|
|
262
|
+
* @throws {Error} Invalid parameters
|
|
263
|
+
*/
|
|
264
|
+
function withExif (exif) {
|
|
265
|
+
if (is.object(exif)) {
|
|
266
|
+
for (const [ifd, entries] of Object.entries(exif)) {
|
|
267
|
+
if (is.object(entries)) {
|
|
268
|
+
for (const [k, v] of Object.entries(entries)) {
|
|
269
|
+
if (is.string(v)) {
|
|
270
|
+
this.options.withExif[`exif-${ifd.toLowerCase()}-${k}`] = v;
|
|
271
|
+
} else {
|
|
272
|
+
throw is.invalidParameterError(`${ifd}.${k}`, 'string', v);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
} else {
|
|
276
|
+
throw is.invalidParameterError(ifd, 'object', entries);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
} else {
|
|
280
|
+
throw is.invalidParameterError('exif', 'object', exif);
|
|
281
|
+
}
|
|
282
|
+
this.options.withExifMerge = false;
|
|
283
|
+
return this.keepExif();
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* Update EXIF metadata from the input image in the output image.
|
|
288
|
+
*
|
|
289
|
+
* @since 0.33.0
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* const dataWithMergedExif = await sharp(inputWithExif)
|
|
293
|
+
* .withExifMerge({
|
|
294
|
+
* IFD0: {
|
|
295
|
+
* Copyright: 'The National Gallery'
|
|
296
|
+
* }
|
|
297
|
+
* })
|
|
298
|
+
* .toBuffer();
|
|
299
|
+
*
|
|
300
|
+
* @param {Object<string, Object<string, string>>} exif Object keyed by IFD0, IFD1 etc. of key/value string pairs to write as EXIF data.
|
|
301
|
+
* @returns {Sharp}
|
|
302
|
+
* @throws {Error} Invalid parameters
|
|
303
|
+
*/
|
|
304
|
+
function withExifMerge (exif) {
|
|
305
|
+
this.withExif(exif);
|
|
306
|
+
this.options.withExifMerge = true;
|
|
307
|
+
return this;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Keep ICC profile from the input image in the output image.
|
|
312
|
+
*
|
|
313
|
+
* When input and output colour spaces differ, use with {@link /api-colour/#tocolourspace toColourspace} and optionally {@link /api-colour/#pipelinecolourspace pipelineColourspace}.
|
|
314
|
+
*
|
|
315
|
+
* @since 0.33.0
|
|
316
|
+
*
|
|
317
|
+
* @example
|
|
318
|
+
* const outputWithIccProfile = await sharp(inputWithIccProfile)
|
|
319
|
+
* .keepIccProfile()
|
|
320
|
+
* .toBuffer();
|
|
321
|
+
*
|
|
322
|
+
* @example
|
|
323
|
+
* const cmykOutputWithIccProfile = await sharp(cmykInputWithIccProfile)
|
|
324
|
+
* .pipelineColourspace('cmyk')
|
|
325
|
+
* .toColourspace('cmyk')
|
|
326
|
+
* .keepIccProfile()
|
|
327
|
+
* .toBuffer();
|
|
328
|
+
*
|
|
329
|
+
* @returns {Sharp}
|
|
330
|
+
*/
|
|
331
|
+
function keepIccProfile () {
|
|
332
|
+
this.options.keepMetadata |= 0b01000;
|
|
333
|
+
return this;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
/**
|
|
337
|
+
* Transform using an ICC profile and attach to the output image.
|
|
338
|
+
*
|
|
339
|
+
* This can either be an absolute filesystem path or
|
|
340
|
+
* built-in profile name (`srgb`, `p3`, `cmyk`).
|
|
341
|
+
*
|
|
342
|
+
* @since 0.33.0
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* const outputWithP3 = await sharp(input)
|
|
346
|
+
* .withIccProfile('p3')
|
|
347
|
+
* .toBuffer();
|
|
348
|
+
*
|
|
349
|
+
* @param {string} icc - Absolute filesystem path to output ICC profile or built-in profile name (srgb, p3, cmyk).
|
|
350
|
+
* @param {Object} [options]
|
|
351
|
+
* @param {number} [options.attach=true] Should the ICC profile be included in the output image metadata?
|
|
352
|
+
* @returns {Sharp}
|
|
353
|
+
* @throws {Error} Invalid parameters
|
|
354
|
+
*/
|
|
355
|
+
function withIccProfile (icc, options) {
|
|
356
|
+
if (is.string(icc)) {
|
|
357
|
+
this.options.withIccProfile = icc;
|
|
358
|
+
} else {
|
|
359
|
+
throw is.invalidParameterError('icc', 'string', icc);
|
|
360
|
+
}
|
|
361
|
+
this.keepIccProfile();
|
|
362
|
+
if (is.object(options)) {
|
|
363
|
+
if (is.defined(options.attach)) {
|
|
364
|
+
if (is.bool(options.attach)) {
|
|
365
|
+
if (!options.attach) {
|
|
366
|
+
this.options.keepMetadata &= ~0b01000;
|
|
367
|
+
}
|
|
368
|
+
} else {
|
|
369
|
+
throw is.invalidParameterError('attach', 'boolean', options.attach);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return this;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* If the input contains gain map metadata, attempt to process the image and gain map separately,
|
|
378
|
+
* recombining them into a single output image.
|
|
379
|
+
*
|
|
380
|
+
* This approach is faster and should produce better results than {@link #withgainmap withGainMap},
|
|
381
|
+
* however not all operations are supported.
|
|
382
|
+
*
|
|
383
|
+
* Only JPEG input and output are supported.
|
|
384
|
+
* JPEG output options other than `quality` are ignored.
|
|
385
|
+
*
|
|
386
|
+
* This feature is experimental and the API may change.
|
|
387
|
+
*
|
|
388
|
+
* @since 0.35.0
|
|
389
|
+
*
|
|
390
|
+
* @example
|
|
391
|
+
* const outputWithResizedGainMap = await sharp(inputWithGainMap)
|
|
392
|
+
* .keepGainMap()
|
|
393
|
+
* .resize({ width: 64 })
|
|
394
|
+
* .toBuffer();
|
|
395
|
+
*
|
|
396
|
+
* @returns {Sharp}
|
|
397
|
+
*/
|
|
398
|
+
function keepGainMap() {
|
|
399
|
+
this.options.keepGainMap = true;
|
|
400
|
+
this.options.withGainMap = false;
|
|
401
|
+
this.options.keepMetadata |= 0b100000;
|
|
402
|
+
return this;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* If the input contains gain map metadata, use it to convert the main image to HDR (High Dynamic Range) before further processing.
|
|
407
|
+
* The input gain map is discarded.
|
|
408
|
+
*
|
|
409
|
+
* If the output is JPEG, generate and attach a new ISO 21496-1 gain map.
|
|
410
|
+
* JPEG output options other than `quality` are ignored.
|
|
411
|
+
*
|
|
412
|
+
* This feature is experimental and the API may change.
|
|
413
|
+
*
|
|
414
|
+
* @since 0.35.0
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* const outputWithRegeneratedGainMap = await sharp(inputWithGainMap)
|
|
418
|
+
* .withGainMap()
|
|
419
|
+
* .toBuffer();
|
|
420
|
+
*
|
|
421
|
+
* @returns {Sharp}
|
|
422
|
+
*/
|
|
423
|
+
function withGainMap() {
|
|
424
|
+
this.options.withGainMap = true;
|
|
425
|
+
this.options.keepGainMap = false;
|
|
426
|
+
this.options.colourspace = 'scrgb';
|
|
427
|
+
return this;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Keep XMP metadata from the input image in the output image.
|
|
432
|
+
*
|
|
433
|
+
* @since 0.34.3
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* const outputWithXmp = await sharp(inputWithXmp)
|
|
437
|
+
* .keepXmp()
|
|
438
|
+
* .toBuffer();
|
|
439
|
+
*
|
|
440
|
+
* @returns {Sharp}
|
|
441
|
+
*/
|
|
442
|
+
function keepXmp () {
|
|
443
|
+
this.options.keepMetadata |= 0b00010;
|
|
444
|
+
return this;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* Set XMP metadata in the output image.
|
|
449
|
+
*
|
|
450
|
+
* Supported by PNG, JPEG, WebP, and TIFF output.
|
|
451
|
+
*
|
|
452
|
+
* @since 0.34.3
|
|
453
|
+
*
|
|
454
|
+
* @example
|
|
455
|
+
* const xmpString = `
|
|
456
|
+
* <?xml version="1.0"?>
|
|
457
|
+
* <x:xmpmeta xmlns:x="adobe:ns:meta/">
|
|
458
|
+
* <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
|
|
459
|
+
* <rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
460
|
+
* <dc:creator><rdf:Seq><rdf:li>John Doe</rdf:li></rdf:Seq></dc:creator>
|
|
461
|
+
* </rdf:Description>
|
|
462
|
+
* </rdf:RDF>
|
|
463
|
+
* </x:xmpmeta>`;
|
|
464
|
+
*
|
|
465
|
+
* const data = await sharp(input)
|
|
466
|
+
* .withXmp(xmpString)
|
|
467
|
+
* .toBuffer();
|
|
468
|
+
*
|
|
469
|
+
* @param {string} xmp String containing XMP metadata to be embedded in the output image.
|
|
470
|
+
* @returns {Sharp}
|
|
471
|
+
* @throws {Error} Invalid parameters
|
|
472
|
+
*/
|
|
473
|
+
function withXmp (xmp) {
|
|
474
|
+
if (is.string(xmp) && xmp.length > 0) {
|
|
475
|
+
this.options.withXmp = xmp;
|
|
476
|
+
this.options.keepMetadata |= 0b00010;
|
|
477
|
+
} else {
|
|
478
|
+
throw is.invalidParameterError('xmp', 'non-empty string', xmp);
|
|
479
|
+
}
|
|
480
|
+
return this;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Keep all metadata (EXIF, ICC, XMP, IPTC) from the input image in the output image.
|
|
485
|
+
*
|
|
486
|
+
* The default behaviour, when `keepMetadata` is not used, is to convert to the device-independent
|
|
487
|
+
* sRGB colour space and strip all metadata, including the removal of any ICC profile.
|
|
488
|
+
*
|
|
489
|
+
* @since 0.33.0
|
|
490
|
+
*
|
|
491
|
+
* @example
|
|
492
|
+
* const outputWithMetadata = await sharp(inputWithMetadata)
|
|
493
|
+
* .keepMetadata()
|
|
494
|
+
* .toBuffer();
|
|
495
|
+
*
|
|
496
|
+
* @returns {Sharp}
|
|
497
|
+
*/
|
|
498
|
+
function keepMetadata () {
|
|
499
|
+
this.options.keepMetadata |= 0b11111;
|
|
500
|
+
return this;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Keep most metadata (EXIF, XMP, IPTC) from the input image in the output image.
|
|
505
|
+
*
|
|
506
|
+
* This will also convert to and add a web-friendly sRGB ICC profile if appropriate.
|
|
507
|
+
*
|
|
508
|
+
* Allows orientation and density to be set or updated.
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* const outputSrgbWithMetadata = await sharp(inputRgbWithMetadata)
|
|
512
|
+
* .withMetadata()
|
|
513
|
+
* .toBuffer();
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* // Set output metadata to 96 DPI
|
|
517
|
+
* const data = await sharp(input)
|
|
518
|
+
* .withMetadata({ density: 96 })
|
|
519
|
+
* .toBuffer();
|
|
520
|
+
*
|
|
521
|
+
* @param {Object} [options]
|
|
522
|
+
* @param {number} [options.orientation] Used to update the EXIF `Orientation` tag, integer between 1 and 8.
|
|
523
|
+
* @param {number} [options.density] Number of pixels per inch (DPI).
|
|
524
|
+
* @returns {Sharp}
|
|
525
|
+
* @throws {Error} Invalid parameters
|
|
526
|
+
*/
|
|
527
|
+
function withMetadata (options) {
|
|
528
|
+
this.keepMetadata();
|
|
529
|
+
this.withIccProfile('srgb');
|
|
530
|
+
if (is.object(options)) {
|
|
531
|
+
if (is.defined(options.orientation)) {
|
|
532
|
+
if (is.integer(options.orientation) && is.inRange(options.orientation, 1, 8)) {
|
|
533
|
+
this.options.withMetadataOrientation = options.orientation;
|
|
534
|
+
} else {
|
|
535
|
+
throw is.invalidParameterError('orientation', 'integer between 1 and 8', options.orientation);
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
if (is.defined(options.density)) {
|
|
539
|
+
if (is.number(options.density) && options.density > 0) {
|
|
540
|
+
this.options.withMetadataDensity = options.density;
|
|
541
|
+
} else {
|
|
542
|
+
throw is.invalidParameterError('density', 'positive number', options.density);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
if (is.defined(options.icc)) {
|
|
546
|
+
this.withIccProfile(options.icc);
|
|
547
|
+
}
|
|
548
|
+
if (is.defined(options.exif)) {
|
|
549
|
+
this.withExifMerge(options.exif);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
return this;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* Force output to a given format.
|
|
557
|
+
*
|
|
558
|
+
* @example
|
|
559
|
+
* // Convert any input to PNG output
|
|
560
|
+
* const data = await sharp(input)
|
|
561
|
+
* .toFormat('png')
|
|
562
|
+
* .toBuffer();
|
|
563
|
+
*
|
|
564
|
+
* @param {(string|Object)} format - as a string or an Object with an 'id' attribute
|
|
565
|
+
* @param {Object} options - output options
|
|
566
|
+
* @returns {Sharp}
|
|
567
|
+
* @throws {Error} unsupported format or options
|
|
568
|
+
*/
|
|
569
|
+
function toFormat (format, options) {
|
|
570
|
+
const actualFormat = formats.get((is.object(format) && is.string(format.id) ? format.id : format).toLowerCase());
|
|
571
|
+
if (!actualFormat) {
|
|
572
|
+
throw is.invalidParameterError('format', `one of: ${[...formats.keys()].join(', ')}`, format);
|
|
573
|
+
}
|
|
574
|
+
return this[actualFormat](options);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Use these JPEG options for output image.
|
|
579
|
+
*
|
|
580
|
+
* @example
|
|
581
|
+
* // Convert any input to very high quality JPEG output
|
|
582
|
+
* const data = await sharp(input)
|
|
583
|
+
* .jpeg({
|
|
584
|
+
* quality: 100,
|
|
585
|
+
* chromaSubsampling: '4:4:4'
|
|
586
|
+
* })
|
|
587
|
+
* .toBuffer();
|
|
588
|
+
*
|
|
589
|
+
* @example
|
|
590
|
+
* // Use mozjpeg to reduce output JPEG file size (slower)
|
|
591
|
+
* const data = await sharp(input)
|
|
592
|
+
* .jpeg({ mozjpeg: true })
|
|
593
|
+
* .toBuffer();
|
|
594
|
+
*
|
|
595
|
+
* @param {Object} [options] - output options
|
|
596
|
+
* @param {number} [options.quality=80] - quality, integer 1-100
|
|
597
|
+
* @param {boolean} [options.progressive=false] - use progressive (interlace) scan
|
|
598
|
+
* @param {string} [options.chromaSubsampling='4:2:0'] - set to '4:4:4' to prevent chroma subsampling otherwise defaults to '4:2:0' chroma subsampling
|
|
599
|
+
* @param {boolean} [options.optimiseCoding=true] - optimise Huffman coding tables
|
|
600
|
+
* @param {boolean} [options.optimizeCoding=true] - alternative spelling of optimiseCoding
|
|
601
|
+
* @param {boolean} [options.mozjpeg=false] - use mozjpeg defaults, equivalent to `{ trellisQuantisation: true, overshootDeringing: true, optimiseScans: true, quantisationTable: 3 }`
|
|
602
|
+
* @param {boolean} [options.trellisQuantisation=false] - apply trellis quantisation
|
|
603
|
+
* @param {boolean} [options.overshootDeringing=false] - apply overshoot deringing
|
|
604
|
+
* @param {boolean} [options.optimiseScans=false] - optimise progressive scans, forces progressive
|
|
605
|
+
* @param {boolean} [options.optimizeScans=false] - alternative spelling of optimiseScans
|
|
606
|
+
* @param {number} [options.quantisationTable=0] - quantization table to use, integer 0-8
|
|
607
|
+
* @param {number} [options.quantizationTable=0] - alternative spelling of quantisationTable
|
|
608
|
+
* @param {boolean} [options.force=true] - force JPEG output, otherwise attempt to use input format
|
|
609
|
+
* @returns {Sharp}
|
|
610
|
+
* @throws {Error} Invalid options
|
|
611
|
+
*/
|
|
612
|
+
function jpeg (options) {
|
|
613
|
+
if (is.object(options)) {
|
|
614
|
+
if (is.defined(options.quality)) {
|
|
615
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
616
|
+
this.options.jpegQuality = options.quality;
|
|
617
|
+
} else {
|
|
618
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
if (is.defined(options.progressive)) {
|
|
622
|
+
this._setBooleanOption('jpegProgressive', options.progressive);
|
|
623
|
+
}
|
|
624
|
+
if (is.defined(options.chromaSubsampling)) {
|
|
625
|
+
if (is.string(options.chromaSubsampling) && is.inArray(options.chromaSubsampling, ['4:2:0', '4:4:4'])) {
|
|
626
|
+
this.options.jpegChromaSubsampling = options.chromaSubsampling;
|
|
627
|
+
} else {
|
|
628
|
+
throw is.invalidParameterError('chromaSubsampling', 'one of: 4:2:0, 4:4:4', options.chromaSubsampling);
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
const optimiseCoding = is.bool(options.optimizeCoding) ? options.optimizeCoding : options.optimiseCoding;
|
|
632
|
+
if (is.defined(optimiseCoding)) {
|
|
633
|
+
this._setBooleanOption('jpegOptimiseCoding', optimiseCoding);
|
|
634
|
+
}
|
|
635
|
+
if (is.defined(options.mozjpeg)) {
|
|
636
|
+
if (is.bool(options.mozjpeg)) {
|
|
637
|
+
if (options.mozjpeg) {
|
|
638
|
+
this.options.jpegTrellisQuantisation = true;
|
|
639
|
+
this.options.jpegOvershootDeringing = true;
|
|
640
|
+
this.options.jpegOptimiseScans = true;
|
|
641
|
+
this.options.jpegProgressive = true;
|
|
642
|
+
this.options.jpegQuantisationTable = 3;
|
|
643
|
+
}
|
|
644
|
+
} else {
|
|
645
|
+
throw is.invalidParameterError('mozjpeg', 'boolean', options.mozjpeg);
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
const trellisQuantisation = is.bool(options.trellisQuantization) ? options.trellisQuantization : options.trellisQuantisation;
|
|
649
|
+
if (is.defined(trellisQuantisation)) {
|
|
650
|
+
this._setBooleanOption('jpegTrellisQuantisation', trellisQuantisation);
|
|
651
|
+
}
|
|
652
|
+
if (is.defined(options.overshootDeringing)) {
|
|
653
|
+
this._setBooleanOption('jpegOvershootDeringing', options.overshootDeringing);
|
|
654
|
+
}
|
|
655
|
+
const optimiseScans = is.bool(options.optimizeScans) ? options.optimizeScans : options.optimiseScans;
|
|
656
|
+
if (is.defined(optimiseScans)) {
|
|
657
|
+
this._setBooleanOption('jpegOptimiseScans', optimiseScans);
|
|
658
|
+
if (optimiseScans) {
|
|
659
|
+
this.options.jpegProgressive = true;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
const quantisationTable = is.number(options.quantizationTable) ? options.quantizationTable : options.quantisationTable;
|
|
663
|
+
if (is.defined(quantisationTable)) {
|
|
664
|
+
if (is.integer(quantisationTable) && is.inRange(quantisationTable, 0, 8)) {
|
|
665
|
+
this.options.jpegQuantisationTable = quantisationTable;
|
|
666
|
+
} else {
|
|
667
|
+
throw is.invalidParameterError('quantisationTable', 'integer between 0 and 8', quantisationTable);
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
return this._updateFormatOut('jpeg', options);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Use these PNG options for output image.
|
|
676
|
+
*
|
|
677
|
+
* By default, PNG output is full colour at 8 bits per pixel.
|
|
678
|
+
*
|
|
679
|
+
* Indexed PNG input at 1, 2 or 4 bits per pixel is converted to 8 bits per pixel.
|
|
680
|
+
* Set `palette` to `true` for slower, indexed PNG output.
|
|
681
|
+
*
|
|
682
|
+
* For 16 bits per pixel output, convert to `rgb16` via
|
|
683
|
+
* {@link /api-colour/#tocolourspace toColourspace}.
|
|
684
|
+
*
|
|
685
|
+
* @example
|
|
686
|
+
* // Convert any input to full colour PNG output
|
|
687
|
+
* const data = await sharp(input)
|
|
688
|
+
* .png()
|
|
689
|
+
* .toBuffer();
|
|
690
|
+
*
|
|
691
|
+
* @example
|
|
692
|
+
* // Convert any input to indexed PNG output (slower)
|
|
693
|
+
* const data = await sharp(input)
|
|
694
|
+
* .png({ palette: true })
|
|
695
|
+
* .toBuffer();
|
|
696
|
+
*
|
|
697
|
+
* @example
|
|
698
|
+
* // Output 16 bits per pixel RGB(A)
|
|
699
|
+
* const data = await sharp(input)
|
|
700
|
+
* .toColourspace('rgb16')
|
|
701
|
+
* .png()
|
|
702
|
+
* .toBuffer();
|
|
703
|
+
*
|
|
704
|
+
* @param {Object} [options]
|
|
705
|
+
* @param {boolean} [options.progressive=false] - use progressive (interlace) scan
|
|
706
|
+
* @param {number} [options.compressionLevel=6] - zlib compression level, 0 (fastest, largest) to 9 (slowest, smallest)
|
|
707
|
+
* @param {boolean} [options.adaptiveFiltering=false] - use adaptive row filtering
|
|
708
|
+
* @param {boolean} [options.palette=false] - quantise to a palette-based image with alpha transparency support
|
|
709
|
+
* @param {number} [options.quality=100] - use the lowest number of colours needed to achieve given quality, sets `palette` to `true`
|
|
710
|
+
* @param {number} [options.effort=7] - CPU effort, between 1 (fastest) and 10 (slowest), sets `palette` to `true`
|
|
711
|
+
* @param {number} [options.colours=256] - maximum number of palette entries, sets `palette` to `true`
|
|
712
|
+
* @param {number} [options.colors=256] - alternative spelling of `options.colours`, sets `palette` to `true`
|
|
713
|
+
* @param {number} [options.dither=1.0] - level of Floyd-Steinberg error diffusion, sets `palette` to `true`
|
|
714
|
+
* @param {boolean} [options.force=true] - force PNG output, otherwise attempt to use input format
|
|
715
|
+
* @returns {Sharp}
|
|
716
|
+
* @throws {Error} Invalid options
|
|
717
|
+
*/
|
|
718
|
+
function png (options) {
|
|
719
|
+
if (is.object(options)) {
|
|
720
|
+
if (is.defined(options.progressive)) {
|
|
721
|
+
this._setBooleanOption('pngProgressive', options.progressive);
|
|
722
|
+
}
|
|
723
|
+
if (is.defined(options.compressionLevel)) {
|
|
724
|
+
if (is.integer(options.compressionLevel) && is.inRange(options.compressionLevel, 0, 9)) {
|
|
725
|
+
this.options.pngCompressionLevel = options.compressionLevel;
|
|
726
|
+
} else {
|
|
727
|
+
throw is.invalidParameterError('compressionLevel', 'integer between 0 and 9', options.compressionLevel);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
if (is.defined(options.adaptiveFiltering)) {
|
|
731
|
+
this._setBooleanOption('pngAdaptiveFiltering', options.adaptiveFiltering);
|
|
732
|
+
}
|
|
733
|
+
const colours = options.colours || options.colors;
|
|
734
|
+
if (is.defined(colours)) {
|
|
735
|
+
if (is.integer(colours) && is.inRange(colours, 2, 256)) {
|
|
736
|
+
this.options.pngBitdepth = bitdepthFromColourCount(colours);
|
|
737
|
+
} else {
|
|
738
|
+
throw is.invalidParameterError('colours', 'integer between 2 and 256', colours);
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
if (is.defined(options.palette)) {
|
|
742
|
+
this._setBooleanOption('pngPalette', options.palette);
|
|
743
|
+
} else if ([options.quality, options.effort, options.colours, options.colors, options.dither].some(is.defined)) {
|
|
744
|
+
this._setBooleanOption('pngPalette', true);
|
|
745
|
+
}
|
|
746
|
+
if (this.options.pngPalette) {
|
|
747
|
+
if (is.defined(options.quality)) {
|
|
748
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 0, 100)) {
|
|
749
|
+
this.options.pngQuality = options.quality;
|
|
750
|
+
} else {
|
|
751
|
+
throw is.invalidParameterError('quality', 'integer between 0 and 100', options.quality);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
if (is.defined(options.effort)) {
|
|
755
|
+
if (is.integer(options.effort) && is.inRange(options.effort, 1, 10)) {
|
|
756
|
+
this.options.pngEffort = options.effort;
|
|
757
|
+
} else {
|
|
758
|
+
throw is.invalidParameterError('effort', 'integer between 1 and 10', options.effort);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
if (is.defined(options.dither)) {
|
|
762
|
+
if (is.number(options.dither) && is.inRange(options.dither, 0, 1)) {
|
|
763
|
+
this.options.pngDither = options.dither;
|
|
764
|
+
} else {
|
|
765
|
+
throw is.invalidParameterError('dither', 'number between 0.0 and 1.0', options.dither);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
return this._updateFormatOut('png', options);
|
|
771
|
+
}
|
|
772
|
+
|
|
773
|
+
/**
|
|
774
|
+
* Use these WebP options for output image.
|
|
775
|
+
*
|
|
776
|
+
* @example
|
|
777
|
+
* // Convert any input to lossless WebP output
|
|
778
|
+
* const data = await sharp(input)
|
|
779
|
+
* .webp({ lossless: true })
|
|
780
|
+
* .toBuffer();
|
|
781
|
+
*
|
|
782
|
+
* @example
|
|
783
|
+
* // Optimise the file size of an animated WebP
|
|
784
|
+
* const outputWebp = await sharp(inputWebp, { animated: true })
|
|
785
|
+
* .webp({ effort: 6 })
|
|
786
|
+
* .toBuffer();
|
|
787
|
+
*
|
|
788
|
+
* @param {Object} [options] - output options
|
|
789
|
+
* @param {number} [options.quality=80] - quality, integer 1-100
|
|
790
|
+
* @param {number} [options.alphaQuality=100] - quality of alpha layer, integer 0-100
|
|
791
|
+
* @param {boolean} [options.lossless=false] - use lossless compression mode
|
|
792
|
+
* @param {boolean} [options.nearLossless=false] - use near_lossless compression mode
|
|
793
|
+
* @param {boolean} [options.smartSubsample=false] - use high quality chroma subsampling
|
|
794
|
+
* @param {boolean} [options.smartDeblock=false] - auto-adjust the deblocking filter, can improve low contrast edges (slow)
|
|
795
|
+
* @param {string} [options.preset='default'] - named preset for preprocessing/filtering, one of: default, photo, picture, drawing, icon, text
|
|
796
|
+
* @param {number} [options.effort=4] - CPU effort, between 0 (fastest) and 6 (slowest)
|
|
797
|
+
* @param {number} [options.loop=0] - number of animation iterations, use 0 for infinite animation
|
|
798
|
+
* @param {number|number[]} [options.delay] - delay(s) between animation frames (in milliseconds)
|
|
799
|
+
* @param {boolean} [options.minSize=false] - prevent use of animation key frames to minimise file size (slow)
|
|
800
|
+
* @param {boolean} [options.mixed=false] - allow mixture of lossy and lossless animation frames (slow)
|
|
801
|
+
* @param {boolean} [options.exact=false] - preserve the colour data in transparent pixels
|
|
802
|
+
* @param {boolean} [options.force=true] - force WebP output, otherwise attempt to use input format
|
|
803
|
+
* @returns {Sharp}
|
|
804
|
+
* @throws {Error} Invalid options
|
|
805
|
+
*/
|
|
806
|
+
function webp (options) {
|
|
807
|
+
if (is.object(options)) {
|
|
808
|
+
if (is.defined(options.quality)) {
|
|
809
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
810
|
+
this.options.webpQuality = options.quality;
|
|
811
|
+
} else {
|
|
812
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
if (is.defined(options.alphaQuality)) {
|
|
816
|
+
if (is.integer(options.alphaQuality) && is.inRange(options.alphaQuality, 0, 100)) {
|
|
817
|
+
this.options.webpAlphaQuality = options.alphaQuality;
|
|
818
|
+
} else {
|
|
819
|
+
throw is.invalidParameterError('alphaQuality', 'integer between 0 and 100', options.alphaQuality);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
if (is.defined(options.lossless)) {
|
|
823
|
+
this._setBooleanOption('webpLossless', options.lossless);
|
|
824
|
+
}
|
|
825
|
+
if (is.defined(options.nearLossless)) {
|
|
826
|
+
this._setBooleanOption('webpNearLossless', options.nearLossless);
|
|
827
|
+
}
|
|
828
|
+
if (is.defined(options.smartSubsample)) {
|
|
829
|
+
this._setBooleanOption('webpSmartSubsample', options.smartSubsample);
|
|
830
|
+
}
|
|
831
|
+
if (is.defined(options.smartDeblock)) {
|
|
832
|
+
this._setBooleanOption('webpSmartDeblock', options.smartDeblock);
|
|
833
|
+
}
|
|
834
|
+
if (is.defined(options.preset)) {
|
|
835
|
+
if (is.string(options.preset) && is.inArray(options.preset, ['default', 'photo', 'picture', 'drawing', 'icon', 'text'])) {
|
|
836
|
+
this.options.webpPreset = options.preset;
|
|
837
|
+
} else {
|
|
838
|
+
throw is.invalidParameterError('preset', 'one of: default, photo, picture, drawing, icon, text', options.preset);
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
if (is.defined(options.effort)) {
|
|
842
|
+
if (is.integer(options.effort) && is.inRange(options.effort, 0, 6)) {
|
|
843
|
+
this.options.webpEffort = options.effort;
|
|
844
|
+
} else {
|
|
845
|
+
throw is.invalidParameterError('effort', 'integer between 0 and 6', options.effort);
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
if (is.defined(options.minSize)) {
|
|
849
|
+
this._setBooleanOption('webpMinSize', options.minSize);
|
|
850
|
+
}
|
|
851
|
+
if (is.defined(options.mixed)) {
|
|
852
|
+
this._setBooleanOption('webpMixed', options.mixed);
|
|
853
|
+
}
|
|
854
|
+
if (is.defined(options.exact)) {
|
|
855
|
+
this._setBooleanOption('webpExact', options.exact);
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
trySetAnimationOptions(options, this.options);
|
|
859
|
+
return this._updateFormatOut('webp', options);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Use these GIF options for the output image.
|
|
864
|
+
*
|
|
865
|
+
* The first entry in the palette is reserved for transparency.
|
|
866
|
+
*
|
|
867
|
+
* The palette of the input image will be re-used if possible.
|
|
868
|
+
*
|
|
869
|
+
* @since 0.30.0
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* // Convert PNG to GIF
|
|
873
|
+
* await sharp(pngBuffer)
|
|
874
|
+
* .gif()
|
|
875
|
+
* .toBuffer();
|
|
876
|
+
*
|
|
877
|
+
* @example
|
|
878
|
+
* // Convert animated WebP to animated GIF
|
|
879
|
+
* await sharp('animated.webp', { animated: true })
|
|
880
|
+
* .toFile('animated.gif');
|
|
881
|
+
*
|
|
882
|
+
* @example
|
|
883
|
+
* // Create a 128x128, cropped, non-dithered, animated thumbnail of an animated GIF
|
|
884
|
+
* const out = await sharp('in.gif', { animated: true })
|
|
885
|
+
* .resize({ width: 128, height: 128 })
|
|
886
|
+
* .gif({ dither: 0 })
|
|
887
|
+
* .toBuffer();
|
|
888
|
+
*
|
|
889
|
+
* @example
|
|
890
|
+
* // Lossy file size reduction of animated GIF
|
|
891
|
+
* await sharp('in.gif', { animated: true })
|
|
892
|
+
* .gif({ interFrameMaxError: 8 })
|
|
893
|
+
* .toFile('optim.gif');
|
|
894
|
+
*
|
|
895
|
+
* @param {Object} [options] - output options
|
|
896
|
+
* @param {boolean} [options.reuse=true] - re-use existing palette, otherwise generate new (slow)
|
|
897
|
+
* @param {boolean} [options.progressive=false] - use progressive (interlace) scan
|
|
898
|
+
* @param {number} [options.colours=256] - maximum number of palette entries, including transparency, between 2 and 256
|
|
899
|
+
* @param {number} [options.colors=256] - alternative spelling of `options.colours`
|
|
900
|
+
* @param {number} [options.effort=7] - CPU effort, between 1 (fastest) and 10 (slowest)
|
|
901
|
+
* @param {number} [options.dither=1.0] - level of Floyd-Steinberg error diffusion, between 0 (least) and 1 (most)
|
|
902
|
+
* @param {number} [options.interFrameMaxError=0] - maximum inter-frame error for transparency, between 0 (lossless) and 32
|
|
903
|
+
* @param {number} [options.interPaletteMaxError=3] - maximum inter-palette error for palette reuse, between 0 and 256
|
|
904
|
+
* @param {boolean} [options.keepDuplicateFrames=false] - keep duplicate frames in the output instead of combining them
|
|
905
|
+
* @param {number} [options.loop=0] - number of animation iterations, use 0 for infinite animation
|
|
906
|
+
* @param {number|number[]} [options.delay] - delay(s) between animation frames (in milliseconds)
|
|
907
|
+
* @param {boolean} [options.force=true] - force GIF output, otherwise attempt to use input format
|
|
908
|
+
* @returns {Sharp}
|
|
909
|
+
* @throws {Error} Invalid options
|
|
910
|
+
*/
|
|
911
|
+
function gif (options) {
|
|
912
|
+
if (is.object(options)) {
|
|
913
|
+
if (is.defined(options.reuse)) {
|
|
914
|
+
this._setBooleanOption('gifReuse', options.reuse);
|
|
915
|
+
}
|
|
916
|
+
if (is.defined(options.progressive)) {
|
|
917
|
+
this._setBooleanOption('gifProgressive', options.progressive);
|
|
918
|
+
}
|
|
919
|
+
const colours = options.colours || options.colors;
|
|
920
|
+
if (is.defined(colours)) {
|
|
921
|
+
if (is.integer(colours) && is.inRange(colours, 2, 256)) {
|
|
922
|
+
this.options.gifBitdepth = bitdepthFromColourCount(colours);
|
|
923
|
+
} else {
|
|
924
|
+
throw is.invalidParameterError('colours', 'integer between 2 and 256', colours);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
if (is.defined(options.effort)) {
|
|
928
|
+
if (is.integer(options.effort) && is.inRange(options.effort, 1, 10)) {
|
|
929
|
+
this.options.gifEffort = options.effort;
|
|
930
|
+
} else {
|
|
931
|
+
throw is.invalidParameterError('effort', 'integer between 1 and 10', options.effort);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
if (is.defined(options.dither)) {
|
|
935
|
+
if (is.number(options.dither) && is.inRange(options.dither, 0, 1)) {
|
|
936
|
+
this.options.gifDither = options.dither;
|
|
937
|
+
} else {
|
|
938
|
+
throw is.invalidParameterError('dither', 'number between 0.0 and 1.0', options.dither);
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
if (is.defined(options.interFrameMaxError)) {
|
|
942
|
+
if (is.number(options.interFrameMaxError) && is.inRange(options.interFrameMaxError, 0, 32)) {
|
|
943
|
+
this.options.gifInterFrameMaxError = options.interFrameMaxError;
|
|
944
|
+
} else {
|
|
945
|
+
throw is.invalidParameterError('interFrameMaxError', 'number between 0.0 and 32.0', options.interFrameMaxError);
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
if (is.defined(options.interPaletteMaxError)) {
|
|
949
|
+
if (is.number(options.interPaletteMaxError) && is.inRange(options.interPaletteMaxError, 0, 256)) {
|
|
950
|
+
this.options.gifInterPaletteMaxError = options.interPaletteMaxError;
|
|
951
|
+
} else {
|
|
952
|
+
throw is.invalidParameterError('interPaletteMaxError', 'number between 0.0 and 256.0', options.interPaletteMaxError);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
if (is.defined(options.keepDuplicateFrames)) {
|
|
956
|
+
if (is.bool(options.keepDuplicateFrames)) {
|
|
957
|
+
this._setBooleanOption('gifKeepDuplicateFrames', options.keepDuplicateFrames);
|
|
958
|
+
} else {
|
|
959
|
+
throw is.invalidParameterError('keepDuplicateFrames', 'boolean', options.keepDuplicateFrames);
|
|
960
|
+
}
|
|
961
|
+
}
|
|
962
|
+
}
|
|
963
|
+
trySetAnimationOptions(options, this.options);
|
|
964
|
+
return this._updateFormatOut('gif', options);
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/**
|
|
968
|
+
* Use these JP2 options for output image.
|
|
969
|
+
*
|
|
970
|
+
* Requires libvips compiled with support for OpenJPEG.
|
|
971
|
+
* The prebuilt binaries do not include this - see
|
|
972
|
+
* {@link /install#custom-libvips installing a custom libvips}.
|
|
973
|
+
*
|
|
974
|
+
* @example
|
|
975
|
+
* // Convert any input to lossless JP2 output
|
|
976
|
+
* const data = await sharp(input)
|
|
977
|
+
* .jp2({ lossless: true })
|
|
978
|
+
* .toBuffer();
|
|
979
|
+
*
|
|
980
|
+
* @example
|
|
981
|
+
* // Convert any input to very high quality JP2 output
|
|
982
|
+
* const data = await sharp(input)
|
|
983
|
+
* .jp2({
|
|
984
|
+
* quality: 100,
|
|
985
|
+
* chromaSubsampling: '4:4:4'
|
|
986
|
+
* })
|
|
987
|
+
* .toBuffer();
|
|
988
|
+
*
|
|
989
|
+
* @since 0.29.1
|
|
990
|
+
*
|
|
991
|
+
* @param {Object} [options] - output options
|
|
992
|
+
* @param {number} [options.quality=80] - quality, integer 1-100
|
|
993
|
+
* @param {boolean} [options.lossless=false] - use lossless compression mode
|
|
994
|
+
* @param {number} [options.tileWidth=512] - horizontal tile size
|
|
995
|
+
* @param {number} [options.tileHeight=512] - vertical tile size
|
|
996
|
+
* @param {string} [options.chromaSubsampling='4:4:4'] - set to '4:2:0' to use chroma subsampling
|
|
997
|
+
* @returns {Sharp}
|
|
998
|
+
* @throws {Error} Invalid options
|
|
999
|
+
*/
|
|
1000
|
+
function jp2 (options) {
|
|
1001
|
+
/* node:coverage ignore next 41 */
|
|
1002
|
+
if (!this.constructor.format.jp2.output.buffer) {
|
|
1003
|
+
throw errJp2Save();
|
|
1004
|
+
}
|
|
1005
|
+
if (is.object(options)) {
|
|
1006
|
+
if (is.defined(options.quality)) {
|
|
1007
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
1008
|
+
this.options.jp2Quality = options.quality;
|
|
1009
|
+
} else {
|
|
1010
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
if (is.defined(options.lossless)) {
|
|
1014
|
+
if (is.bool(options.lossless)) {
|
|
1015
|
+
this.options.jp2Lossless = options.lossless;
|
|
1016
|
+
} else {
|
|
1017
|
+
throw is.invalidParameterError('lossless', 'boolean', options.lossless);
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
if (is.defined(options.tileWidth)) {
|
|
1021
|
+
if (is.integer(options.tileWidth) && is.inRange(options.tileWidth, 1, 32768)) {
|
|
1022
|
+
this.options.jp2TileWidth = options.tileWidth;
|
|
1023
|
+
} else {
|
|
1024
|
+
throw is.invalidParameterError('tileWidth', 'integer between 1 and 32768', options.tileWidth);
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
if (is.defined(options.tileHeight)) {
|
|
1028
|
+
if (is.integer(options.tileHeight) && is.inRange(options.tileHeight, 1, 32768)) {
|
|
1029
|
+
this.options.jp2TileHeight = options.tileHeight;
|
|
1030
|
+
} else {
|
|
1031
|
+
throw is.invalidParameterError('tileHeight', 'integer between 1 and 32768', options.tileHeight);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
if (is.defined(options.chromaSubsampling)) {
|
|
1035
|
+
if (is.string(options.chromaSubsampling) && is.inArray(options.chromaSubsampling, ['4:2:0', '4:4:4'])) {
|
|
1036
|
+
this.options.jp2ChromaSubsampling = options.chromaSubsampling;
|
|
1037
|
+
} else {
|
|
1038
|
+
throw is.invalidParameterError('chromaSubsampling', 'one of: 4:2:0, 4:4:4', options.chromaSubsampling);
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
return this._updateFormatOut('jp2', options);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
/**
|
|
1046
|
+
* Set animation options if available.
|
|
1047
|
+
* @private
|
|
1048
|
+
*
|
|
1049
|
+
* @param {Object} [source] - output options
|
|
1050
|
+
* @param {number} [source.loop=0] - number of animation iterations, use 0 for infinite animation
|
|
1051
|
+
* @param {number[]} [source.delay] - list of delays between animation frames (in milliseconds)
|
|
1052
|
+
* @param {Object} [target] - target object for valid options
|
|
1053
|
+
* @throws {Error} Invalid options
|
|
1054
|
+
*/
|
|
1055
|
+
function trySetAnimationOptions (source, target) {
|
|
1056
|
+
if (is.object(source) && is.defined(source.loop)) {
|
|
1057
|
+
if (is.integer(source.loop) && is.inRange(source.loop, 0, 65535)) {
|
|
1058
|
+
target.loop = source.loop;
|
|
1059
|
+
} else {
|
|
1060
|
+
throw is.invalidParameterError('loop', 'integer between 0 and 65535', source.loop);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
if (is.object(source) && is.defined(source.delay)) {
|
|
1064
|
+
// We allow singular values as well
|
|
1065
|
+
if (is.integer(source.delay) && is.inRange(source.delay, 0, 65535)) {
|
|
1066
|
+
target.delay = [source.delay];
|
|
1067
|
+
} else if (
|
|
1068
|
+
Array.isArray(source.delay) &&
|
|
1069
|
+
is.inRange(source.delay.length, 1, 1000000) &&
|
|
1070
|
+
source.delay.every(is.integer) &&
|
|
1071
|
+
source.delay.every(v => is.inRange(v, 0, 65535))) {
|
|
1072
|
+
target.delay = source.delay;
|
|
1073
|
+
} else {
|
|
1074
|
+
throw is.invalidParameterError('delay', 'integer or an array of integers between 0 and 65535', source.delay);
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Use these TIFF options for output image.
|
|
1081
|
+
*
|
|
1082
|
+
* The `density` can be set in pixels/inch via {@link #withmetadata withMetadata}
|
|
1083
|
+
* instead of providing `xres` and `yres` in pixels/mm.
|
|
1084
|
+
*
|
|
1085
|
+
* @example
|
|
1086
|
+
* // Convert SVG input to LZW-compressed, 1 bit per pixel TIFF output
|
|
1087
|
+
* sharp('input.svg')
|
|
1088
|
+
* .tiff({
|
|
1089
|
+
* compression: 'lzw',
|
|
1090
|
+
* bitdepth: 1
|
|
1091
|
+
* })
|
|
1092
|
+
* .toFile('1-bpp-output.tiff')
|
|
1093
|
+
* .then(info => { ... });
|
|
1094
|
+
*
|
|
1095
|
+
* @param {Object} [options] - output options
|
|
1096
|
+
* @param {number} [options.quality=80] - quality, integer 1-100
|
|
1097
|
+
* @param {boolean} [options.force=true] - force TIFF output, otherwise attempt to use input format
|
|
1098
|
+
* @param {string} [options.compression='jpeg'] - compression options: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k
|
|
1099
|
+
* @param {boolean} [options.bigtiff=false] - use BigTIFF variant (has no effect when compression is none)
|
|
1100
|
+
* @param {string} [options.predictor='horizontal'] - compression predictor options: none, horizontal, float
|
|
1101
|
+
* @param {boolean} [options.pyramid=false] - write an image pyramid
|
|
1102
|
+
* @param {boolean} [options.tile=false] - write a tiled tiff
|
|
1103
|
+
* @param {number} [options.tileWidth=256] - horizontal tile size, valid values are integers in the range 1-32768
|
|
1104
|
+
* @param {number} [options.tileHeight=256] - vertical tile size, valid values are integers in the range 1-32768
|
|
1105
|
+
* @param {number} [options.xres=1.0] - horizontal resolution in pixels/mm, valid values are numbers in the range 0.001-1000000
|
|
1106
|
+
* @param {number} [options.yres=1.0] - vertical resolution in pixels/mm, valid values are numbers in the range 0.001-1000000
|
|
1107
|
+
* @param {string} [options.resolutionUnit='inch'] - resolution unit options: inch, cm
|
|
1108
|
+
* @param {number} [options.bitdepth=0] - reduce bitdepth to 1, 2 or 4 bit
|
|
1109
|
+
* @param {boolean} [options.miniswhite=false] - write 1-bit images as miniswhite
|
|
1110
|
+
* @returns {Sharp}
|
|
1111
|
+
* @throws {Error} Invalid options
|
|
1112
|
+
*/
|
|
1113
|
+
function tiff (options) {
|
|
1114
|
+
if (is.object(options)) {
|
|
1115
|
+
if (is.defined(options.quality)) {
|
|
1116
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
1117
|
+
this.options.tiffQuality = options.quality;
|
|
1118
|
+
} else {
|
|
1119
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
if (is.defined(options.bitdepth)) {
|
|
1123
|
+
if (is.integer(options.bitdepth) && is.inArray(options.bitdepth, [1, 2, 4])) {
|
|
1124
|
+
this.options.tiffBitdepth = options.bitdepth;
|
|
1125
|
+
} else {
|
|
1126
|
+
throw is.invalidParameterError('bitdepth', '1, 2 or 4', options.bitdepth);
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
// tiling
|
|
1130
|
+
if (is.defined(options.tile)) {
|
|
1131
|
+
this._setBooleanOption('tiffTile', options.tile);
|
|
1132
|
+
}
|
|
1133
|
+
if (is.defined(options.tileWidth)) {
|
|
1134
|
+
if (is.integer(options.tileWidth) && is.inRange(options.tileWidth, 1, 32768)) {
|
|
1135
|
+
this.options.tiffTileWidth = options.tileWidth;
|
|
1136
|
+
} else {
|
|
1137
|
+
throw is.invalidParameterError('tileWidth', 'integer between 1 and 32768', options.tileWidth);
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
if (is.defined(options.tileHeight)) {
|
|
1141
|
+
if (is.integer(options.tileHeight) && is.inRange(options.tileHeight, 1, 32768)) {
|
|
1142
|
+
this.options.tiffTileHeight = options.tileHeight;
|
|
1143
|
+
} else {
|
|
1144
|
+
throw is.invalidParameterError('tileHeight', 'integer between 1 and 32768', options.tileHeight);
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
// miniswhite
|
|
1148
|
+
if (is.defined(options.miniswhite)) {
|
|
1149
|
+
this._setBooleanOption('tiffMiniswhite', options.miniswhite);
|
|
1150
|
+
}
|
|
1151
|
+
// pyramid
|
|
1152
|
+
if (is.defined(options.pyramid)) {
|
|
1153
|
+
this._setBooleanOption('tiffPyramid', options.pyramid);
|
|
1154
|
+
}
|
|
1155
|
+
// resolution
|
|
1156
|
+
if (is.defined(options.xres)) {
|
|
1157
|
+
if (is.number(options.xres) && is.inRange(options.xres, 0.001, 1000000)) {
|
|
1158
|
+
this.options.tiffXres = options.xres;
|
|
1159
|
+
} else {
|
|
1160
|
+
throw is.invalidParameterError('xres', 'number between 0.001 and 1000000', options.xres);
|
|
1161
|
+
}
|
|
1162
|
+
}
|
|
1163
|
+
if (is.defined(options.yres)) {
|
|
1164
|
+
if (is.number(options.yres) && is.inRange(options.yres, 0.001, 1000000)) {
|
|
1165
|
+
this.options.tiffYres = options.yres;
|
|
1166
|
+
} else {
|
|
1167
|
+
throw is.invalidParameterError('yres', 'number between 0.001 and 1000000', options.yres);
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
// compression
|
|
1171
|
+
if (is.defined(options.compression)) {
|
|
1172
|
+
if (is.string(options.compression) && is.inArray(options.compression, ['none', 'jpeg', 'deflate', 'packbits', 'ccittfax4', 'lzw', 'webp', 'zstd', 'jp2k'])) {
|
|
1173
|
+
this.options.tiffCompression = options.compression;
|
|
1174
|
+
} else {
|
|
1175
|
+
throw is.invalidParameterError('compression', 'one of: none, jpeg, deflate, packbits, ccittfax4, lzw, webp, zstd, jp2k', options.compression);
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
// bigtiff
|
|
1179
|
+
if (is.defined(options.bigtiff)) {
|
|
1180
|
+
this._setBooleanOption('tiffBigtiff', options.bigtiff);
|
|
1181
|
+
}
|
|
1182
|
+
// predictor
|
|
1183
|
+
if (is.defined(options.predictor)) {
|
|
1184
|
+
if (is.string(options.predictor) && is.inArray(options.predictor, ['none', 'horizontal', 'float'])) {
|
|
1185
|
+
this.options.tiffPredictor = options.predictor;
|
|
1186
|
+
} else {
|
|
1187
|
+
throw is.invalidParameterError('predictor', 'one of: none, horizontal, float', options.predictor);
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
// resolutionUnit
|
|
1191
|
+
if (is.defined(options.resolutionUnit)) {
|
|
1192
|
+
if (is.string(options.resolutionUnit) && is.inArray(options.resolutionUnit, ['inch', 'cm'])) {
|
|
1193
|
+
this.options.tiffResolutionUnit = options.resolutionUnit;
|
|
1194
|
+
} else {
|
|
1195
|
+
throw is.invalidParameterError('resolutionUnit', 'one of: inch, cm', options.resolutionUnit);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
return this._updateFormatOut('tiff', options);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/**
|
|
1203
|
+
* Use these AVIF options for output image.
|
|
1204
|
+
*
|
|
1205
|
+
* AVIF image sequences are not supported.
|
|
1206
|
+
*
|
|
1207
|
+
* @example
|
|
1208
|
+
* const data = await sharp(input)
|
|
1209
|
+
* .avif({ effort: 2 })
|
|
1210
|
+
* .toBuffer();
|
|
1211
|
+
*
|
|
1212
|
+
* @example
|
|
1213
|
+
* const data = await sharp(input)
|
|
1214
|
+
* .avif({ lossless: true })
|
|
1215
|
+
* .toBuffer();
|
|
1216
|
+
*
|
|
1217
|
+
* @since 0.27.0
|
|
1218
|
+
*
|
|
1219
|
+
* @param {Object} [options] - output options
|
|
1220
|
+
* @param {number} [options.quality=50] - quality, integer 1-100
|
|
1221
|
+
* @param {boolean} [options.lossless=false] - use lossless compression
|
|
1222
|
+
* @param {number} [options.effort=4] - CPU effort, between 0 (fastest) and 9 (slowest)
|
|
1223
|
+
* @param {string} [options.chromaSubsampling='4:4:4'] - set to '4:2:0' to use chroma subsampling
|
|
1224
|
+
* @param {number} [options.bitdepth=8] - set bitdepth to 8, 10 or 12 bit
|
|
1225
|
+
* @param {string} [options.tune='auto'] - tune output for a quality metric, one of 'auto' (default), 'iq', 'psnr' or 'ssim'
|
|
1226
|
+
* @returns {Sharp}
|
|
1227
|
+
* @throws {Error} Invalid options
|
|
1228
|
+
*/
|
|
1229
|
+
function avif (options) {
|
|
1230
|
+
return this.heif({ ...options, compression: 'av1' });
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
/**
|
|
1234
|
+
* Use these HEIF options for output image.
|
|
1235
|
+
*
|
|
1236
|
+
* Support for patent-encumbered HEIC images using `hevc` compression requires the use of a
|
|
1237
|
+
* globally-installed libvips compiled with support for libheif, libde265 and x265.
|
|
1238
|
+
*
|
|
1239
|
+
* @example
|
|
1240
|
+
* const data = await sharp(input)
|
|
1241
|
+
* .heif({ compression: 'hevc' })
|
|
1242
|
+
* .toBuffer();
|
|
1243
|
+
*
|
|
1244
|
+
* @since 0.23.0
|
|
1245
|
+
*
|
|
1246
|
+
* @param {Object} options - output options
|
|
1247
|
+
* @param {string} options.compression - compression format: av1, hevc
|
|
1248
|
+
* @param {number} [options.quality=50] - quality, integer 1-100
|
|
1249
|
+
* @param {boolean} [options.lossless=false] - use lossless compression
|
|
1250
|
+
* @param {number} [options.effort=4] - CPU effort, between 0 (fastest) and 9 (slowest)
|
|
1251
|
+
* @param {string} [options.chromaSubsampling='4:4:4'] - set to '4:2:0' to use chroma subsampling
|
|
1252
|
+
* @param {number} [options.bitdepth=8] - set bitdepth to 8, 10 or 12 bit
|
|
1253
|
+
* @param {string} [options.tune='auto'] - tune output for a quality metric, one of 'auto' (default), 'iq', 'psnr' or 'ssim'
|
|
1254
|
+
* @returns {Sharp}
|
|
1255
|
+
* @throws {Error} Invalid options
|
|
1256
|
+
*/
|
|
1257
|
+
function heif (options) {
|
|
1258
|
+
if (is.object(options)) {
|
|
1259
|
+
if (is.string(options.compression) && is.inArray(options.compression, ['av1', 'hevc'])) {
|
|
1260
|
+
this.options.heifCompression = options.compression;
|
|
1261
|
+
} else {
|
|
1262
|
+
throw is.invalidParameterError('compression', 'one of: av1, hevc', options.compression);
|
|
1263
|
+
}
|
|
1264
|
+
if (is.defined(options.quality)) {
|
|
1265
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
1266
|
+
this.options.heifQuality = options.quality;
|
|
1267
|
+
} else {
|
|
1268
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
1271
|
+
if (is.defined(options.lossless)) {
|
|
1272
|
+
if (is.bool(options.lossless)) {
|
|
1273
|
+
this.options.heifLossless = options.lossless;
|
|
1274
|
+
} else {
|
|
1275
|
+
throw is.invalidParameterError('lossless', 'boolean', options.lossless);
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
if (is.defined(options.effort)) {
|
|
1279
|
+
if (is.integer(options.effort) && is.inRange(options.effort, 0, 9)) {
|
|
1280
|
+
this.options.heifEffort = options.effort;
|
|
1281
|
+
} else {
|
|
1282
|
+
throw is.invalidParameterError('effort', 'integer between 0 and 9', options.effort);
|
|
1283
|
+
}
|
|
1284
|
+
}
|
|
1285
|
+
if (is.defined(options.chromaSubsampling)) {
|
|
1286
|
+
if (is.string(options.chromaSubsampling) && is.inArray(options.chromaSubsampling, ['4:2:0', '4:4:4'])) {
|
|
1287
|
+
this.options.heifChromaSubsampling = options.chromaSubsampling;
|
|
1288
|
+
} else {
|
|
1289
|
+
throw is.invalidParameterError('chromaSubsampling', 'one of: 4:2:0, 4:4:4', options.chromaSubsampling);
|
|
1290
|
+
}
|
|
1291
|
+
}
|
|
1292
|
+
if (is.defined(options.bitdepth)) {
|
|
1293
|
+
if (is.integer(options.bitdepth) && is.inArray(options.bitdepth, [8, 10, 12])) {
|
|
1294
|
+
this.options.heifBitdepth = options.bitdepth;
|
|
1295
|
+
} else {
|
|
1296
|
+
throw is.invalidParameterError('bitdepth', '8, 10 or 12', options.bitdepth);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
if (is.defined(options.tune)) {
|
|
1300
|
+
if (is.string(options.tune) && is.inArray(options.tune, ['auto', 'iq', 'psnr', 'ssim'])) {
|
|
1301
|
+
if (this.options.heifLossless && options.tune === 'iq') {
|
|
1302
|
+
this.options.heifTune = 'ssim';
|
|
1303
|
+
} else {
|
|
1304
|
+
this.options.heifTune = options.tune;
|
|
1305
|
+
}
|
|
1306
|
+
} else {
|
|
1307
|
+
throw is.invalidParameterError('tune', 'one of: auto, iq, psnr, ssim', options.tune);
|
|
1308
|
+
}
|
|
1309
|
+
}
|
|
1310
|
+
} else {
|
|
1311
|
+
throw is.invalidParameterError('options', 'Object', options);
|
|
1312
|
+
}
|
|
1313
|
+
return this._updateFormatOut('heif', options);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/**
|
|
1317
|
+
* Use these JPEG-XL (JXL) options for output image.
|
|
1318
|
+
*
|
|
1319
|
+
* This feature is experimental, please do not use in production systems.
|
|
1320
|
+
*
|
|
1321
|
+
* Requires libvips compiled with support for libjxl.
|
|
1322
|
+
* The prebuilt binaries do not include this - see
|
|
1323
|
+
* {@link /install/#custom-libvips installing a custom libvips}.
|
|
1324
|
+
*
|
|
1325
|
+
* @since 0.31.3
|
|
1326
|
+
*
|
|
1327
|
+
* @param {Object} [options] - output options
|
|
1328
|
+
* @param {number} [options.distance=1.0] - maximum encoding error, between 0 (highest quality) and 15 (lowest quality)
|
|
1329
|
+
* @param {number} [options.quality] - calculate `distance` based on JPEG-like quality, between 1 and 100, overrides distance if specified
|
|
1330
|
+
* @param {number} [options.decodingTier=0] - target decode speed tier, between 0 (highest quality) and 4 (lowest quality)
|
|
1331
|
+
* @param {boolean} [options.lossless=false] - use lossless compression
|
|
1332
|
+
* @param {number} [options.effort=7] - CPU effort, between 1 (fastest) and 9 (slowest)
|
|
1333
|
+
* @param {number} [options.loop=0] - number of animation iterations, use 0 for infinite animation
|
|
1334
|
+
* @param {number|number[]} [options.delay] - delay(s) between animation frames (in milliseconds)
|
|
1335
|
+
* @returns {Sharp}
|
|
1336
|
+
* @throws {Error} Invalid options
|
|
1337
|
+
*/
|
|
1338
|
+
function jxl (options) {
|
|
1339
|
+
if (is.object(options)) {
|
|
1340
|
+
if (is.defined(options.quality)) {
|
|
1341
|
+
if (is.integer(options.quality) && is.inRange(options.quality, 1, 100)) {
|
|
1342
|
+
// https://github.com/libjxl/libjxl/blob/0aeea7f180bafd6893c1db8072dcb67d2aa5b03d/tools/cjxl_main.cc#L640-L644
|
|
1343
|
+
this.options.jxlDistance = options.quality >= 30
|
|
1344
|
+
? 0.1 + (100 - options.quality) * 0.09
|
|
1345
|
+
: 53 / 3000 * options.quality * options.quality - 23 / 20 * options.quality + 25;
|
|
1346
|
+
} else {
|
|
1347
|
+
throw is.invalidParameterError('quality', 'integer between 1 and 100', options.quality);
|
|
1348
|
+
}
|
|
1349
|
+
} else if (is.defined(options.distance)) {
|
|
1350
|
+
if (is.number(options.distance) && is.inRange(options.distance, 0, 15)) {
|
|
1351
|
+
this.options.jxlDistance = options.distance;
|
|
1352
|
+
} else {
|
|
1353
|
+
throw is.invalidParameterError('distance', 'number between 0.0 and 15.0', options.distance);
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
if (is.defined(options.decodingTier)) {
|
|
1357
|
+
if (is.integer(options.decodingTier) && is.inRange(options.decodingTier, 0, 4)) {
|
|
1358
|
+
this.options.jxlDecodingTier = options.decodingTier;
|
|
1359
|
+
} else {
|
|
1360
|
+
throw is.invalidParameterError('decodingTier', 'integer between 0 and 4', options.decodingTier);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
if (is.defined(options.lossless)) {
|
|
1364
|
+
if (is.bool(options.lossless)) {
|
|
1365
|
+
this.options.jxlLossless = options.lossless;
|
|
1366
|
+
} else {
|
|
1367
|
+
throw is.invalidParameterError('lossless', 'boolean', options.lossless);
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
if (is.defined(options.effort)) {
|
|
1371
|
+
if (is.integer(options.effort) && is.inRange(options.effort, 1, 9)) {
|
|
1372
|
+
this.options.jxlEffort = options.effort;
|
|
1373
|
+
} else {
|
|
1374
|
+
throw is.invalidParameterError('effort', 'integer between 1 and 9', options.effort);
|
|
1375
|
+
}
|
|
1376
|
+
}
|
|
1377
|
+
}
|
|
1378
|
+
trySetAnimationOptions(options, this.options);
|
|
1379
|
+
return this._updateFormatOut('jxl', options);
|
|
1380
|
+
}
|
|
1381
|
+
|
|
1382
|
+
/**
|
|
1383
|
+
* Force output to be raw, uncompressed pixel data.
|
|
1384
|
+
* Pixel ordering is left-to-right, top-to-bottom, without padding.
|
|
1385
|
+
* Channel ordering will be RGB or RGBA for non-greyscale colourspaces.
|
|
1386
|
+
*
|
|
1387
|
+
* @example
|
|
1388
|
+
* // Extract raw, unsigned 8-bit RGB pixel data from JPEG input
|
|
1389
|
+
* const { data, info } = await sharp('input.jpg')
|
|
1390
|
+
* .raw()
|
|
1391
|
+
* .toBuffer({ resolveWithObject: true });
|
|
1392
|
+
*
|
|
1393
|
+
* @example
|
|
1394
|
+
* // Extract alpha channel as raw, unsigned 16-bit pixel data from PNG input
|
|
1395
|
+
* const data = await sharp('input.png')
|
|
1396
|
+
* .ensureAlpha()
|
|
1397
|
+
* .extractChannel(3)
|
|
1398
|
+
* .toColourspace('b-w')
|
|
1399
|
+
* .raw({ depth: 'ushort' })
|
|
1400
|
+
* .toBuffer();
|
|
1401
|
+
*
|
|
1402
|
+
* @param {Object} [options] - output options
|
|
1403
|
+
* @param {string} [options.depth='uchar'] - bit depth, one of: char, uchar (default), short, ushort, int, uint, float, complex, double, dpcomplex
|
|
1404
|
+
* @returns {Sharp}
|
|
1405
|
+
* @throws {Error} Invalid options
|
|
1406
|
+
*/
|
|
1407
|
+
function raw (options) {
|
|
1408
|
+
if (is.object(options)) {
|
|
1409
|
+
if (is.defined(options.depth)) {
|
|
1410
|
+
if (is.string(options.depth) && is.inArray(options.depth,
|
|
1411
|
+
['char', 'uchar', 'short', 'ushort', 'int', 'uint', 'float', 'complex', 'double', 'dpcomplex']
|
|
1412
|
+
)) {
|
|
1413
|
+
this.options.rawDepth = options.depth;
|
|
1414
|
+
} else {
|
|
1415
|
+
throw is.invalidParameterError('depth', 'one of: char, uchar, short, ushort, int, uint, float, complex, double, dpcomplex', options.depth);
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
return this._updateFormatOut('raw');
|
|
1420
|
+
}
|
|
1421
|
+
|
|
1422
|
+
/**
|
|
1423
|
+
* Use tile-based deep zoom (image pyramid) output.
|
|
1424
|
+
*
|
|
1425
|
+
* Set the format and options for tile images via the `toFormat`, `jpeg`, `png` or `webp` functions.
|
|
1426
|
+
* Use a `.zip` or `.szi` file extension with `toFile` to write to a compressed archive file format.
|
|
1427
|
+
*
|
|
1428
|
+
* The container will be set to `zip` when the output is a Buffer or Stream, otherwise it will default to `fs`.
|
|
1429
|
+
*
|
|
1430
|
+
* @example
|
|
1431
|
+
* sharp('input.tiff')
|
|
1432
|
+
* .png()
|
|
1433
|
+
* .tile({
|
|
1434
|
+
* size: 512
|
|
1435
|
+
* })
|
|
1436
|
+
* .toFile('output.dz', function(err, info) {
|
|
1437
|
+
* // output.dzi is the Deep Zoom XML definition
|
|
1438
|
+
* // output_files contains 512x512 tiles grouped by zoom level
|
|
1439
|
+
* });
|
|
1440
|
+
*
|
|
1441
|
+
* @example
|
|
1442
|
+
* const zipFileWithTiles = await sharp(input)
|
|
1443
|
+
* .tile({ basename: "tiles" })
|
|
1444
|
+
* .toBuffer();
|
|
1445
|
+
*
|
|
1446
|
+
* @example
|
|
1447
|
+
* const iiififier = sharp().tile({ layout: "iiif" });
|
|
1448
|
+
* readableStream
|
|
1449
|
+
* .pipe(iiififier)
|
|
1450
|
+
* .pipe(writeableStream);
|
|
1451
|
+
*
|
|
1452
|
+
* @param {Object} [options]
|
|
1453
|
+
* @param {number} [options.size=256] tile size in pixels, a value between 1 and 8192.
|
|
1454
|
+
* @param {number} [options.overlap=0] tile overlap in pixels, a value between 0 and 8192.
|
|
1455
|
+
* @param {number} [options.angle=0] tile angle of rotation, must be a multiple of 90.
|
|
1456
|
+
* @param {string|Object} [options.background={r: 255, g: 255, b: 255, alpha: 1}] - background colour, parsed by the [color](https://www.npmjs.org/package/color) module, defaults to white without transparency.
|
|
1457
|
+
* @param {string} [options.depth] how deep to make the pyramid, possible values are `onepixel`, `onetile` or `one`, default based on layout.
|
|
1458
|
+
* @param {number} [options.skipBlanks=-1] Threshold to skip tile generation. Range is 0-255 for 8-bit images, 0-65535 for 16-bit images. Default is 5 for `google` layout, -1 (no skip) otherwise.
|
|
1459
|
+
* @param {string} [options.container='fs'] tile container, with value `fs` (filesystem) or `zip` (compressed file).
|
|
1460
|
+
* @param {string} [options.layout='dz'] filesystem layout, possible values are `dz`, `iiif`, `iiif3`, `zoomify` or `google`.
|
|
1461
|
+
* @param {boolean} [options.centre=false] centre image in tile.
|
|
1462
|
+
* @param {boolean} [options.center=false] alternative spelling of centre.
|
|
1463
|
+
* @param {string} [options.id='https://example.com/iiif'] when `layout` is `iiif`/`iiif3`, sets the `@id`/`id` attribute of `info.json`
|
|
1464
|
+
* @param {string} [options.basename] the name of the directory within the zip file when container is `zip`.
|
|
1465
|
+
* @returns {Sharp}
|
|
1466
|
+
* @throws {Error} Invalid parameters
|
|
1467
|
+
*/
|
|
1468
|
+
function tile (options) {
|
|
1469
|
+
if (is.object(options)) {
|
|
1470
|
+
// Size of square tiles, in pixels
|
|
1471
|
+
if (is.defined(options.size)) {
|
|
1472
|
+
if (is.integer(options.size) && is.inRange(options.size, 1, 8192)) {
|
|
1473
|
+
this.options.tileSize = options.size;
|
|
1474
|
+
} else {
|
|
1475
|
+
throw is.invalidParameterError('size', 'integer between 1 and 8192', options.size);
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
// Overlap of tiles, in pixels
|
|
1479
|
+
if (is.defined(options.overlap)) {
|
|
1480
|
+
if (is.integer(options.overlap) && is.inRange(options.overlap, 0, 8192)) {
|
|
1481
|
+
if (options.overlap > this.options.tileSize) {
|
|
1482
|
+
throw is.invalidParameterError('overlap', `<= size (${this.options.tileSize})`, options.overlap);
|
|
1483
|
+
}
|
|
1484
|
+
this.options.tileOverlap = options.overlap;
|
|
1485
|
+
} else {
|
|
1486
|
+
throw is.invalidParameterError('overlap', 'integer between 0 and 8192', options.overlap);
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
// Container
|
|
1490
|
+
if (is.defined(options.container)) {
|
|
1491
|
+
if (is.string(options.container) && is.inArray(options.container, ['fs', 'zip'])) {
|
|
1492
|
+
this.options.tileContainer = options.container;
|
|
1493
|
+
} else {
|
|
1494
|
+
throw is.invalidParameterError('container', 'one of: fs, zip', options.container);
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
// Layout
|
|
1498
|
+
if (is.defined(options.layout)) {
|
|
1499
|
+
if (is.string(options.layout) && is.inArray(options.layout, ['dz', 'google', 'iiif', 'iiif3', 'zoomify'])) {
|
|
1500
|
+
this.options.tileLayout = options.layout;
|
|
1501
|
+
} else {
|
|
1502
|
+
throw is.invalidParameterError('layout', 'one of: dz, google, iiif, iiif3, zoomify', options.layout);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
// Angle of rotation,
|
|
1506
|
+
if (is.defined(options.angle)) {
|
|
1507
|
+
if (is.integer(options.angle) && !(options.angle % 90)) {
|
|
1508
|
+
this.options.tileAngle = options.angle;
|
|
1509
|
+
} else {
|
|
1510
|
+
throw is.invalidParameterError('angle', 'positive/negative multiple of 90', options.angle);
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
// Background colour
|
|
1514
|
+
this._setBackgroundColourOption('tileBackground', options.background);
|
|
1515
|
+
// Depth of tiles
|
|
1516
|
+
if (is.defined(options.depth)) {
|
|
1517
|
+
if (is.string(options.depth) && is.inArray(options.depth, ['onepixel', 'onetile', 'one'])) {
|
|
1518
|
+
this.options.tileDepth = options.depth;
|
|
1519
|
+
} else {
|
|
1520
|
+
throw is.invalidParameterError('depth', 'one of: onepixel, onetile, one', options.depth);
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
// Threshold to skip blank tiles
|
|
1524
|
+
if (is.defined(options.skipBlanks)) {
|
|
1525
|
+
if (is.integer(options.skipBlanks) && is.inRange(options.skipBlanks, -1, 65535)) {
|
|
1526
|
+
this.options.tileSkipBlanks = options.skipBlanks;
|
|
1527
|
+
} else {
|
|
1528
|
+
throw is.invalidParameterError('skipBlanks', 'integer between -1 and 255/65535', options.skipBlanks);
|
|
1529
|
+
}
|
|
1530
|
+
} else if (is.defined(options.layout) && options.layout === 'google') {
|
|
1531
|
+
this.options.tileSkipBlanks = 5;
|
|
1532
|
+
}
|
|
1533
|
+
// Center image in tile
|
|
1534
|
+
const centre = is.bool(options.center) ? options.center : options.centre;
|
|
1535
|
+
if (is.defined(centre)) {
|
|
1536
|
+
this._setBooleanOption('tileCentre', centre);
|
|
1537
|
+
}
|
|
1538
|
+
// @id attribute for IIIF layout
|
|
1539
|
+
if (is.defined(options.id)) {
|
|
1540
|
+
if (is.string(options.id)) {
|
|
1541
|
+
this.options.tileId = options.id;
|
|
1542
|
+
} else {
|
|
1543
|
+
throw is.invalidParameterError('id', 'string', options.id);
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
// Basename for zip container
|
|
1547
|
+
if (is.defined(options.basename)) {
|
|
1548
|
+
if (is.string(options.basename)) {
|
|
1549
|
+
this.options.tileBasename = options.basename;
|
|
1550
|
+
} else {
|
|
1551
|
+
throw is.invalidParameterError('basename', 'string', options.basename);
|
|
1552
|
+
}
|
|
1553
|
+
}
|
|
1554
|
+
}
|
|
1555
|
+
// Format
|
|
1556
|
+
if (is.inArray(this.options.formatOut, ['jpeg', 'png', 'webp'])) {
|
|
1557
|
+
this.options.tileFormat = this.options.formatOut;
|
|
1558
|
+
} else if (this.options.formatOut !== 'input') {
|
|
1559
|
+
throw is.invalidParameterError('format', 'one of: jpeg, png, webp', this.options.formatOut);
|
|
1560
|
+
}
|
|
1561
|
+
return this._updateFormatOut('dz');
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
/**
|
|
1565
|
+
* Set a timeout for processing, in seconds.
|
|
1566
|
+
* Use a value of zero to continue processing indefinitely, the default behaviour.
|
|
1567
|
+
*
|
|
1568
|
+
* The clock starts when libvips opens an input image for processing.
|
|
1569
|
+
* Time spent waiting for a libuv thread to become available is not included.
|
|
1570
|
+
*
|
|
1571
|
+
* @example
|
|
1572
|
+
* // Ensure processing takes no longer than 3 seconds
|
|
1573
|
+
* try {
|
|
1574
|
+
* const data = await sharp(input)
|
|
1575
|
+
* .blur(1000)
|
|
1576
|
+
* .timeout({ seconds: 3 })
|
|
1577
|
+
* .toBuffer();
|
|
1578
|
+
* } catch (err) {
|
|
1579
|
+
* if (err.message.includes('timeout')) { ... }
|
|
1580
|
+
* }
|
|
1581
|
+
*
|
|
1582
|
+
* @since 0.29.2
|
|
1583
|
+
*
|
|
1584
|
+
* @param {Object} options
|
|
1585
|
+
* @param {number} options.seconds - Number of seconds after which processing will be stopped
|
|
1586
|
+
* @returns {Sharp}
|
|
1587
|
+
*/
|
|
1588
|
+
function timeout (options) {
|
|
1589
|
+
if (!is.plainObject(options)) {
|
|
1590
|
+
throw is.invalidParameterError('options', 'object', options);
|
|
1591
|
+
}
|
|
1592
|
+
if (is.integer(options.seconds) && is.inRange(options.seconds, 0, 3600)) {
|
|
1593
|
+
this.options.timeoutSeconds = options.seconds;
|
|
1594
|
+
} else {
|
|
1595
|
+
throw is.invalidParameterError('seconds', 'integer between 0 and 3600', options.seconds);
|
|
1596
|
+
}
|
|
1597
|
+
return this;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
/**
|
|
1601
|
+
* Update the output format unless options.force is false,
|
|
1602
|
+
* in which case revert to input format.
|
|
1603
|
+
* @private
|
|
1604
|
+
* @param {string} formatOut
|
|
1605
|
+
* @param {Object} [options]
|
|
1606
|
+
* @param {boolean} [options.force=true] - force output format, otherwise attempt to use input format
|
|
1607
|
+
* @returns {Sharp}
|
|
1608
|
+
*/
|
|
1609
|
+
function _updateFormatOut (formatOut, options) {
|
|
1610
|
+
if (!(is.object(options) && options.force === false)) {
|
|
1611
|
+
this.options.formatOut = formatOut;
|
|
1612
|
+
}
|
|
1613
|
+
return this;
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
/**
|
|
1617
|
+
* Update a boolean attribute of the this.options Object.
|
|
1618
|
+
* @private
|
|
1619
|
+
* @param {string} key
|
|
1620
|
+
* @param {boolean} val
|
|
1621
|
+
* @throws {Error} Invalid key
|
|
1622
|
+
*/
|
|
1623
|
+
function _setBooleanOption (key, val) {
|
|
1624
|
+
if (is.bool(val)) {
|
|
1625
|
+
this.options[key] = val;
|
|
1626
|
+
} else {
|
|
1627
|
+
throw is.invalidParameterError(key, 'boolean', val);
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
/**
|
|
1632
|
+
* Called by a WriteableStream to notify us it is ready for data.
|
|
1633
|
+
* @private
|
|
1634
|
+
*/
|
|
1635
|
+
function _read () {
|
|
1636
|
+
if (!this.options.streamOut) {
|
|
1637
|
+
this.options.streamOut = true;
|
|
1638
|
+
const stack = Error();
|
|
1639
|
+
this._pipeline(undefined, stack);
|
|
1640
|
+
}
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/**
|
|
1644
|
+
* Invoke the C++ image processing pipeline
|
|
1645
|
+
* Supports callback, stream and promise variants
|
|
1646
|
+
* @private
|
|
1647
|
+
*/
|
|
1648
|
+
function _pipeline (callback, stack) {
|
|
1649
|
+
if (typeof callback === 'function') {
|
|
1650
|
+
// output=file/buffer
|
|
1651
|
+
if (this._isStreamInput()) {
|
|
1652
|
+
// output=file/buffer, input=stream
|
|
1653
|
+
this._whenStreamInFinished(() => {
|
|
1654
|
+
this._flattenBufferIn();
|
|
1655
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1656
|
+
if (err) {
|
|
1657
|
+
callback(is.nativeError(err, stack));
|
|
1658
|
+
} else {
|
|
1659
|
+
callback(null, data, info);
|
|
1660
|
+
}
|
|
1661
|
+
});
|
|
1662
|
+
});
|
|
1663
|
+
} else {
|
|
1664
|
+
// output=file/buffer, input=file/buffer
|
|
1665
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1666
|
+
if (err) {
|
|
1667
|
+
callback(is.nativeError(err, stack));
|
|
1668
|
+
} else {
|
|
1669
|
+
callback(null, data, info);
|
|
1670
|
+
}
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
return this;
|
|
1674
|
+
} else if (this.options.streamOut) {
|
|
1675
|
+
// output=stream
|
|
1676
|
+
if (this._isStreamInput()) {
|
|
1677
|
+
// output=stream, input=stream
|
|
1678
|
+
this._whenStreamInFinished(() => {
|
|
1679
|
+
this._flattenBufferIn();
|
|
1680
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1681
|
+
if (err) {
|
|
1682
|
+
this.emit('error', is.nativeError(err, stack));
|
|
1683
|
+
} else {
|
|
1684
|
+
this.emit('info', info);
|
|
1685
|
+
this.push(data);
|
|
1686
|
+
}
|
|
1687
|
+
this.push(null);
|
|
1688
|
+
this.on('end', () => this.emit('close'));
|
|
1689
|
+
});
|
|
1690
|
+
});
|
|
1691
|
+
} else {
|
|
1692
|
+
// output=stream, input=file/buffer
|
|
1693
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1694
|
+
if (err) {
|
|
1695
|
+
this.emit('error', is.nativeError(err, stack));
|
|
1696
|
+
} else {
|
|
1697
|
+
this.emit('info', info);
|
|
1698
|
+
this.push(data);
|
|
1699
|
+
}
|
|
1700
|
+
this.push(null);
|
|
1701
|
+
this.on('end', () => this.emit('close'));
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
return this;
|
|
1705
|
+
} else {
|
|
1706
|
+
// output=promise
|
|
1707
|
+
if (this._isStreamInput()) {
|
|
1708
|
+
// output=promise, input=stream
|
|
1709
|
+
return new Promise((resolve, reject) => {
|
|
1710
|
+
this._whenStreamInFinished(() => {
|
|
1711
|
+
this._flattenBufferIn();
|
|
1712
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1713
|
+
if (err) {
|
|
1714
|
+
reject(is.nativeError(err, stack));
|
|
1715
|
+
} else {
|
|
1716
|
+
if (this.options.resolveWithObject) {
|
|
1717
|
+
resolve({ data, info });
|
|
1718
|
+
} else {
|
|
1719
|
+
resolve(data);
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
});
|
|
1723
|
+
});
|
|
1724
|
+
});
|
|
1725
|
+
} else {
|
|
1726
|
+
// output=promise, input=file/buffer
|
|
1727
|
+
return new Promise((resolve, reject) => {
|
|
1728
|
+
sharp.pipeline(this.options, (err, data, info) => {
|
|
1729
|
+
if (err) {
|
|
1730
|
+
reject(is.nativeError(err, stack));
|
|
1731
|
+
} else {
|
|
1732
|
+
if (this.options.resolveWithObject) {
|
|
1733
|
+
resolve({ data, info });
|
|
1734
|
+
} else {
|
|
1735
|
+
resolve(data);
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
});
|
|
1740
|
+
}
|
|
1741
|
+
}
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
/**
|
|
1745
|
+
* Decorate the Sharp prototype with output-related functions.
|
|
1746
|
+
* @module Sharp
|
|
1747
|
+
* @private
|
|
1748
|
+
*/
|
|
1749
|
+
export default (Sharp) => {
|
|
1750
|
+
Object.assign(Sharp.prototype, {
|
|
1751
|
+
// Public
|
|
1752
|
+
toFile,
|
|
1753
|
+
toBuffer,
|
|
1754
|
+
toUint8Array,
|
|
1755
|
+
withDensity,
|
|
1756
|
+
keepExif,
|
|
1757
|
+
withExif,
|
|
1758
|
+
withExifMerge,
|
|
1759
|
+
keepIccProfile,
|
|
1760
|
+
withIccProfile,
|
|
1761
|
+
keepGainMap,
|
|
1762
|
+
withGainMap,
|
|
1763
|
+
keepXmp,
|
|
1764
|
+
withXmp,
|
|
1765
|
+
keepMetadata,
|
|
1766
|
+
withMetadata,
|
|
1767
|
+
toFormat,
|
|
1768
|
+
jpeg,
|
|
1769
|
+
jp2,
|
|
1770
|
+
png,
|
|
1771
|
+
webp,
|
|
1772
|
+
tiff,
|
|
1773
|
+
avif,
|
|
1774
|
+
heif,
|
|
1775
|
+
jxl,
|
|
1776
|
+
gif,
|
|
1777
|
+
raw,
|
|
1778
|
+
tile,
|
|
1779
|
+
timeout,
|
|
1780
|
+
// Private
|
|
1781
|
+
_updateFormatOut,
|
|
1782
|
+
_setBooleanOption,
|
|
1783
|
+
_read,
|
|
1784
|
+
_pipeline
|
|
1785
|
+
});
|
|
1786
|
+
};
|