@12ui/design 0.2.27 → 0.2.29
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 +141 -87
- package/SKILL.md +5 -5
- package/dist/branch-completion.d.ts.map +1 -1
- package/dist/branch-completion.js +37 -14
- package/dist/branch-completion.js.map +1 -1
- package/dist/branch-execution.d.ts.map +1 -1
- package/dist/branch-execution.js +28 -8
- package/dist/branch-execution.js.map +1 -1
- package/dist/branch-identity.d.ts +10 -4
- package/dist/branch-identity.d.ts.map +1 -1
- package/dist/branch-identity.js +9 -6
- package/dist/branch-identity.js.map +1 -1
- package/dist/branch-page-conversion.d.ts +9 -8
- package/dist/branch-page-conversion.d.ts.map +1 -1
- package/dist/branch-page-conversion.js +8 -2
- package/dist/branch-page-conversion.js.map +1 -1
- package/dist/branch-page-packaging.d.ts +31 -0
- package/dist/branch-page-packaging.d.ts.map +1 -0
- package/dist/branch-page-packaging.js +86 -0
- package/dist/branch-page-packaging.js.map +1 -0
- package/dist/branch-plan.d.ts +6 -0
- package/dist/branch-plan.d.ts.map +1 -1
- package/dist/branch-plan.js +6 -1
- package/dist/branch-plan.js.map +1 -1
- package/dist/branch-progress.d.ts +22 -0
- package/dist/branch-progress.d.ts.map +1 -1
- package/dist/branch-progress.js +33 -8
- package/dist/branch-progress.js.map +1 -1
- package/dist/branch-run-record.d.ts +9 -0
- package/dist/branch-run-record.d.ts.map +1 -1
- package/dist/branch-run-record.js.map +1 -1
- package/dist/branch-status.d.ts +2 -0
- package/dist/branch-status.d.ts.map +1 -1
- package/dist/branch-status.js +60 -15
- package/dist/branch-status.js.map +1 -1
- package/dist/branch-winner.d.ts +13 -15
- package/dist/branch-winner.d.ts.map +1 -1
- package/dist/branch-winner.js +25 -77
- package/dist/branch-winner.js.map +1 -1
- package/dist/cli-arguments.d.ts.map +1 -1
- package/dist/cli-arguments.js +1 -0
- package/dist/cli-arguments.js.map +1 -1
- package/dist/cli-auth-command.d.ts.map +1 -1
- package/dist/cli-auth-command.js +5 -0
- package/dist/cli-auth-command.js.map +1 -1
- package/dist/cli-auth-onboarding.d.ts +12 -0
- package/dist/cli-auth-onboarding.d.ts.map +1 -0
- package/dist/cli-auth-onboarding.js +21 -0
- package/dist/cli-auth-onboarding.js.map +1 -0
- package/dist/cli-branch-command.d.ts +14 -19
- package/dist/cli-branch-command.d.ts.map +1 -1
- package/dist/cli-branch-command.js +207 -137
- package/dist/cli-branch-command.js.map +1 -1
- package/dist/cli-capabilities.d.ts +16 -51
- package/dist/cli-capabilities.d.ts.map +1 -1
- package/dist/cli-capabilities.js +23 -26
- package/dist/cli-capabilities.js.map +1 -1
- package/dist/cli-cli-command.d.ts +3 -0
- package/dist/cli-cli-command.d.ts.map +1 -1
- package/dist/cli-cli-command.js +15 -3
- package/dist/cli-cli-command.js.map +1 -1
- package/dist/cli-conversion-derivation.d.ts +30 -0
- package/dist/cli-conversion-derivation.d.ts.map +1 -0
- package/dist/{cli-export-command.js → cli-conversion-derivation.js} +178 -110
- package/dist/cli-conversion-derivation.js.map +1 -0
- package/dist/cli-conversion-output-directory.d.ts +5 -0
- package/dist/cli-conversion-output-directory.d.ts.map +1 -0
- package/dist/{cli-export-output-directory.js → cli-conversion-output-directory.js} +10 -10
- package/dist/cli-conversion-output-directory.js.map +1 -0
- package/dist/cli-convert-command.d.ts +9 -0
- package/dist/cli-convert-command.d.ts.map +1 -1
- package/dist/cli-convert-command.js +528 -158
- package/dist/cli-convert-command.js.map +1 -1
- package/dist/cli-corpus-command.d.ts.map +1 -1
- package/dist/cli-corpus-command.js +77 -10
- package/dist/cli-corpus-command.js.map +1 -1
- package/dist/cli-corpus-reference-downloads.d.ts +5 -0
- package/dist/cli-corpus-reference-downloads.d.ts.map +1 -1
- package/dist/cli-corpus-reference-downloads.js +18 -7
- package/dist/cli-corpus-reference-downloads.js.map +1 -1
- package/dist/cli-corpus-run.d.ts +9 -0
- package/dist/cli-corpus-run.d.ts.map +1 -1
- package/dist/cli-corpus-run.js +18 -0
- package/dist/cli-corpus-run.js.map +1 -1
- package/dist/cli-detach.d.ts +12 -4
- package/dist/cli-detach.d.ts.map +1 -1
- package/dist/cli-detach.js +49 -17
- package/dist/cli-detach.js.map +1 -1
- package/dist/cli-draft-command.d.ts +44 -61
- package/dist/cli-draft-command.d.ts.map +1 -1
- package/dist/cli-draft-command.js +307 -180
- package/dist/cli-draft-command.js.map +1 -1
- package/dist/cli-help/conversion.d.ts +30 -0
- package/dist/cli-help/conversion.d.ts.map +1 -0
- package/dist/cli-help/conversion.js +55 -0
- package/dist/cli-help/conversion.js.map +1 -0
- package/dist/cli-help/design.d.ts +84 -0
- package/dist/cli-help/design.d.ts.map +1 -0
- package/dist/cli-help/design.js +152 -0
- package/dist/cli-help/design.js.map +1 -0
- package/dist/cli-help/index.d.ts +234 -0
- package/dist/cli-help/index.d.ts.map +1 -0
- package/dist/cli-help/index.js +32 -0
- package/dist/cli-help/index.js.map +1 -0
- package/dist/cli-help/meta.d.ts +24 -0
- package/dist/cli-help/meta.d.ts.map +1 -0
- package/dist/cli-help/meta.js +30 -0
- package/dist/cli-help/meta.js.map +1 -0
- package/dist/cli-help/render.d.ts +4 -0
- package/dist/cli-help/render.d.ts.map +1 -0
- package/dist/cli-help/render.js +28 -0
- package/dist/cli-help/render.js.map +1 -0
- package/dist/cli-help/setup.d.ts +93 -0
- package/dist/cli-help/setup.d.ts.map +1 -0
- package/dist/cli-help/setup.js +142 -0
- package/dist/cli-help/setup.js.map +1 -0
- package/dist/cli-help/types.d.ts +10 -0
- package/dist/cli-help/types.d.ts.map +1 -0
- package/dist/cli-help/types.js +2 -0
- package/dist/cli-help/types.js.map +1 -0
- package/dist/cli-next-command.d.ts +11 -8
- package/dist/cli-next-command.d.ts.map +1 -1
- package/dist/cli-next-command.js +288 -88
- package/dist/cli-next-command.js.map +1 -1
- package/dist/cli-output-paths.d.ts +2 -23
- package/dist/cli-output-paths.d.ts.map +1 -1
- package/dist/cli-output-paths.js +2 -36
- package/dist/cli-output-paths.js.map +1 -1
- package/dist/cli-package-command.d.ts +1 -0
- package/dist/cli-package-command.d.ts.map +1 -1
- package/dist/cli-package-command.js +107 -34
- package/dist/cli-package-command.js.map +1 -1
- package/dist/cli-pending-auth.d.ts +20 -0
- package/dist/cli-pending-auth.d.ts.map +1 -0
- package/dist/cli-pending-auth.js +160 -0
- package/dist/cli-pending-auth.js.map +1 -0
- package/dist/cli-progress.d.ts +256 -75
- package/dist/cli-progress.d.ts.map +1 -1
- package/dist/cli-progress.js +425 -98
- package/dist/cli-progress.js.map +1 -1
- package/dist/cli-review-command.d.ts +8 -0
- package/dist/cli-review-command.d.ts.map +1 -0
- package/dist/cli-review-command.js +71 -0
- package/dist/cli-review-command.js.map +1 -0
- package/dist/cli-run.d.ts +2 -0
- package/dist/cli-run.d.ts.map +1 -1
- package/dist/cli-run.js +62 -73
- package/dist/cli-run.js.map +1 -1
- package/dist/cli-skill-command.d.ts +3 -0
- package/dist/cli-skill-command.d.ts.map +1 -1
- package/dist/cli-skill-command.js +26 -3
- package/dist/cli-skill-command.js.map +1 -1
- package/dist/cli-usage.d.ts +17 -8
- package/dist/cli-usage.d.ts.map +1 -1
- package/dist/cli-usage.js +57 -40
- package/dist/cli-usage.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +8 -2
- package/dist/config.js.map +1 -1
- package/dist/conversion-client.d.ts +4 -0
- package/dist/conversion-client.d.ts.map +1 -1
- package/dist/conversion-client.js +8 -1
- package/dist/conversion-client.js.map +1 -1
- package/dist/conversion-outputs.d.ts +11 -0
- package/dist/conversion-outputs.d.ts.map +1 -1
- package/dist/conversion-outputs.js +13 -1
- package/dist/conversion-outputs.js.map +1 -1
- package/dist/conversion-receipt.d.ts +1 -1
- package/dist/conversion-receipt.js +1 -1
- package/dist/conversion-recovery.d.ts +20 -0
- package/dist/conversion-recovery.d.ts.map +1 -0
- package/dist/conversion-recovery.js +61 -0
- package/dist/conversion-recovery.js.map +1 -0
- package/dist/conversion-status-contract.js +1 -1
- package/dist/conversion-status-contract.js.map +1 -1
- package/dist/credential-setup.d.ts +9 -1
- package/dist/credential-setup.d.ts.map +1 -1
- package/dist/credential-setup.js +13 -1
- package/dist/credential-setup.js.map +1 -1
- package/dist/draft-adoption.d.ts +9 -3
- package/dist/draft-adoption.d.ts.map +1 -1
- package/dist/draft-adoption.js +26 -41
- package/dist/draft-adoption.js.map +1 -1
- package/dist/draft-identity.d.ts +9 -12
- package/dist/draft-identity.d.ts.map +1 -1
- package/dist/draft-identity.js +0 -0
- package/dist/draft-identity.js.map +1 -1
- package/dist/draft-run.d.ts +9 -19
- package/dist/draft-run.d.ts.map +1 -1
- package/dist/draft-run.js +67 -95
- package/dist/draft-run.js.map +1 -1
- package/dist/draft-workspace.d.ts +26 -18
- package/dist/draft-workspace.d.ts.map +1 -1
- package/dist/draft-workspace.js +16 -5
- package/dist/draft-workspace.js.map +1 -1
- package/dist/hosted-draft-identity.d.ts +20 -0
- package/dist/hosted-draft-identity.d.ts.map +1 -0
- package/dist/hosted-draft-identity.js +30 -0
- package/dist/hosted-draft-identity.js.map +1 -0
- package/dist/hosted-draft-run.d.ts +60 -0
- package/dist/hosted-draft-run.d.ts.map +1 -0
- package/dist/hosted-draft-run.js +97 -0
- package/dist/hosted-draft-run.js.map +1 -0
- package/dist/legacy-codex-cleanup.d.ts +13 -0
- package/dist/legacy-codex-cleanup.d.ts.map +1 -1
- package/dist/legacy-codex-cleanup.js +83 -0
- package/dist/legacy-codex-cleanup.js.map +1 -1
- package/dist/legacy-skill-catalog.d.ts +2 -2
- package/dist/legacy-skill-catalog.d.ts.map +1 -1
- package/dist/legacy-skill-catalog.js +76 -5
- package/dist/legacy-skill-catalog.js.map +1 -1
- package/dist/login-auth.d.ts +38 -0
- package/dist/login-auth.d.ts.map +1 -1
- package/dist/login-auth.js +67 -16
- package/dist/login-auth.js.map +1 -1
- package/dist/mcp-tool-definitions.js +1 -1
- package/dist/mcp-tool-definitions.js.map +1 -1
- package/dist/next-target.d.ts +1 -4
- package/dist/next-target.d.ts.map +1 -1
- package/dist/next-target.js +5 -9
- package/dist/next-target.js.map +1 -1
- package/dist/next-wait-lease.d.ts +18 -0
- package/dist/next-wait-lease.d.ts.map +1 -0
- package/dist/next-wait-lease.js +143 -0
- package/dist/next-wait-lease.js.map +1 -0
- package/dist/next-wait-process.d.ts +17 -0
- package/dist/next-wait-process.d.ts.map +1 -0
- package/dist/next-wait-process.js +40 -0
- package/dist/next-wait-process.js.map +1 -0
- package/dist/package-client.d.ts +30 -0
- package/dist/package-client.d.ts.map +1 -1
- package/dist/package-client.js.map +1 -1
- package/dist/package-submission.d.ts +17 -0
- package/dist/package-submission.d.ts.map +1 -1
- package/dist/package-submission.js +13 -0
- package/dist/package-submission.js.map +1 -1
- package/dist/pending-auth-store.d.ts +15 -0
- package/dist/pending-auth-store.d.ts.map +1 -0
- package/dist/pending-auth-store.js +90 -0
- package/dist/pending-auth-store.js.map +1 -0
- package/dist/responsive-quality.d.ts +2 -2
- package/dist/responsive-quality.js +2 -2
- package/dist/review-discovery.d.ts +10 -0
- package/dist/review-discovery.d.ts.map +1 -0
- package/dist/review-discovery.js +381 -0
- package/dist/review-discovery.js.map +1 -0
- package/dist/review-edit-html.d.ts +6 -0
- package/dist/review-edit-html.d.ts.map +1 -0
- package/dist/review-edit-html.js +11 -0
- package/dist/review-edit-html.js.map +1 -0
- package/dist/review-edit-source.d.ts +22 -0
- package/dist/review-edit-source.d.ts.map +1 -0
- package/dist/review-edit-source.js +103 -0
- package/dist/review-edit-source.js.map +1 -0
- package/dist/review-edit.d.ts +15 -0
- package/dist/review-edit.d.ts.map +1 -0
- package/dist/review-edit.js +192 -0
- package/dist/review-edit.js.map +1 -0
- package/dist/review-layerdoc-diff.d.ts +7 -0
- package/dist/review-layerdoc-diff.d.ts.map +1 -0
- package/dist/review-layerdoc-diff.js +92 -0
- package/dist/review-layerdoc-diff.js.map +1 -0
- package/dist/review-page-assets.d.ts +3 -0
- package/dist/review-page-assets.d.ts.map +1 -0
- package/dist/review-page-assets.js +43 -0
- package/dist/review-page-assets.js.map +1 -0
- package/dist/review-page.d.ts +3 -0
- package/dist/review-page.d.ts.map +1 -0
- package/dist/review-page.js +237 -0
- package/dist/review-page.js.map +1 -0
- package/dist/review-pricing.d.ts +14 -0
- package/dist/review-pricing.d.ts.map +1 -0
- package/dist/review-pricing.js +23 -0
- package/dist/review-pricing.js.map +1 -0
- package/dist/review-server.d.ts +15 -0
- package/dist/review-server.d.ts.map +1 -0
- package/dist/review-server.js +204 -0
- package/dist/review-server.js.map +1 -0
- package/dist/review-store.d.ts +11 -0
- package/dist/review-store.d.ts.map +1 -0
- package/dist/review-store.js +96 -0
- package/dist/review-store.js.map +1 -0
- package/dist/review-types.d.ts +128 -0
- package/dist/review-types.d.ts.map +1 -0
- package/dist/review-types.js +2 -0
- package/dist/review-types.js.map +1 -0
- package/dist/run-journal-commands.d.ts.map +1 -1
- package/dist/run-journal-commands.js +34 -76
- package/dist/run-journal-commands.js.map +1 -1
- package/dist/run-journal-in-flight.d.ts +2 -2
- package/dist/run-journal-in-flight.d.ts.map +1 -1
- package/dist/run-journal-in-flight.js +0 -0
- package/dist/run-journal-in-flight.js.map +1 -1
- package/dist/skill-installer.d.ts +2 -2
- package/dist/skill-installer.d.ts.map +1 -1
- package/dist/skill-installer.js +2 -2
- package/dist/skill-installer.js.map +1 -1
- package/open-design.json +3 -3
- package/package.json +1 -1
- package/skills/12ui-design/SKILL.md +62 -0
- package/skills/12ui-design/agents/openai.yaml +6 -0
- package/skills/12ui-design/inspire.md +11 -0
- package/dist/cli-create-command.d.ts +0 -59
- package/dist/cli-create-command.d.ts.map +0 -1
- package/dist/cli-create-command.js +0 -354
- package/dist/cli-create-command.js.map +0 -1
- package/dist/cli-export-command.d.ts +0 -26
- package/dist/cli-export-command.d.ts.map +0 -1
- package/dist/cli-export-command.js.map +0 -1
- package/dist/cli-export-output-directory.d.ts +0 -5
- package/dist/cli-export-output-directory.d.ts.map +0 -1
- package/dist/cli-export-output-directory.js.map +0 -1
- package/dist/cli-image-batch-command.d.ts +0 -29
- package/dist/cli-image-batch-command.d.ts.map +0 -1
- package/dist/cli-image-batch-command.js +0 -236
- package/dist/cli-image-batch-command.js.map +0 -1
- package/dist/cli-image-batch-materialize.d.ts +0 -27
- package/dist/cli-image-batch-materialize.d.ts.map +0 -1
- package/dist/cli-image-batch-materialize.js +0 -41
- package/dist/cli-image-batch-materialize.js.map +0 -1
- package/dist/cli-image-batch-resume.d.ts +0 -36
- package/dist/cli-image-batch-resume.d.ts.map +0 -1
- package/dist/cli-image-batch-resume.js +0 -176
- package/dist/cli-image-batch-resume.js.map +0 -1
- package/dist/cli-image-command.d.ts +0 -10
- package/dist/cli-image-command.d.ts.map +0 -1
- package/dist/cli-image-command.js +0 -106
- package/dist/cli-image-command.js.map +0 -1
- package/dist/cli-select-command.d.ts +0 -16
- package/dist/cli-select-command.d.ts.map +0 -1
- package/dist/cli-select-command.js +0 -60
- package/dist/cli-select-command.js.map +0 -1
- package/dist/create-identity.d.ts +0 -25
- package/dist/create-identity.d.ts.map +0 -1
- package/dist/create-identity.js +0 -0
- package/dist/create-identity.js.map +0 -1
- package/dist/draft-prompts.d.ts +0 -35
- package/dist/draft-prompts.d.ts.map +0 -1
- package/dist/draft-prompts.js +0 -51
- package/dist/draft-prompts.js.map +0 -1
- package/dist/image-batch-status.d.ts +0 -42
- package/dist/image-batch-status.d.ts.map +0 -1
- package/dist/image-batch-status.js +0 -143
- package/dist/image-batch-status.js.map +0 -1
- package/dist/image-generation-batch-attempt.d.ts +0 -28
- package/dist/image-generation-batch-attempt.d.ts.map +0 -1
- package/dist/image-generation-batch-attempt.js +0 -48
- package/dist/image-generation-batch-attempt.js.map +0 -1
- package/dist/image-generation-batch-manifest.d.ts +0 -25
- package/dist/image-generation-batch-manifest.d.ts.map +0 -1
- package/dist/image-generation-batch-manifest.js +0 -97
- package/dist/image-generation-batch-manifest.js.map +0 -1
- package/dist/image-generation-completion.d.ts +0 -43
- package/dist/image-generation-completion.d.ts.map +0 -1
- package/dist/image-generation-completion.js +0 -54
- package/dist/image-generation-completion.js.map +0 -1
- package/dist/image-generation-error.d.ts +0 -3
- package/dist/image-generation-error.d.ts.map +0 -1
- package/dist/image-generation-error.js +0 -30
- package/dist/image-generation-error.js.map +0 -1
- package/dist/image-generation-evidence.d.ts +0 -43
- package/dist/image-generation-evidence.d.ts.map +0 -1
- package/dist/image-generation-evidence.js +0 -28
- package/dist/image-generation-evidence.js.map +0 -1
- package/dist/image-generation-fs.d.ts +0 -3
- package/dist/image-generation-fs.d.ts.map +0 -1
- package/dist/image-generation-fs.js +0 -23
- package/dist/image-generation-fs.js.map +0 -1
- package/dist/image-generation-output.d.ts +0 -3
- package/dist/image-generation-output.d.ts.map +0 -1
- package/dist/image-generation-output.js +0 -51
- package/dist/image-generation-output.js.map +0 -1
- package/dist/image-generation-request.d.ts +0 -43
- package/dist/image-generation-request.d.ts.map +0 -1
- package/dist/image-generation-request.js +0 -52
- package/dist/image-generation-request.js.map +0 -1
- package/dist/image-generation-resume.d.ts +0 -49
- package/dist/image-generation-resume.d.ts.map +0 -1
- package/dist/image-generation-resume.js +0 -96
- package/dist/image-generation-resume.js.map +0 -1
- package/dist/image-generation-run.d.ts +0 -46
- package/dist/image-generation-run.d.ts.map +0 -1
- package/dist/image-generation-run.js +0 -158
- package/dist/image-generation-run.js.map +0 -1
- package/dist/image-generation-staging.d.ts +0 -25
- package/dist/image-generation-staging.d.ts.map +0 -1
- package/dist/image-generation-staging.js +0 -80
- package/dist/image-generation-staging.js.map +0 -1
- package/dist/image-generation-usage.d.ts +0 -75
- package/dist/image-generation-usage.d.ts.map +0 -1
- package/dist/image-generation-usage.js +0 -219
- package/dist/image-generation-usage.js.map +0 -1
- package/dist/image-provider-preflight.d.ts +0 -21
- package/dist/image-provider-preflight.d.ts.map +0 -1
- package/dist/image-provider-preflight.js +0 -184
- package/dist/image-provider-preflight.js.map +0 -1
- package/dist/selection-record.d.ts +0 -97
- package/dist/selection-record.d.ts.map +0 -1
- package/dist/selection-record.js +0 -138
- package/dist/selection-record.js.map +0 -1
- package/skills/design/SKILL.md +0 -116
- package/skills/design/agents/openai.yaml +0 -8
- package/skills/design/assets/large-logo.svg +0 -3
- package/skills/design/assets/small-400px.png +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { writeFile } from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import { materializeConversionArtifacts, } from './artifact-materializer.js';
|
|
5
|
-
import {
|
|
6
|
-
import { stringFlag } from './cli-arguments.js';
|
|
5
|
+
import { conversionDerivationKey } from './branch-identity.js';
|
|
6
|
+
import { booleanFlag, stringFlag } from './cli-arguments.js';
|
|
7
7
|
import { CliRefusal } from './cli-refusal.js';
|
|
8
|
-
import {
|
|
8
|
+
import { derivationManifestPath, derivedOutputFilePath, prepareDerivationOutputDirectory, } from './cli-conversion-output-directory.js';
|
|
9
9
|
import { TwelveUiConversionClient, } from './conversion-client.js';
|
|
10
|
-
import {
|
|
10
|
+
import { isCliConversionOutput, } from './conversion-outputs.js';
|
|
11
11
|
import { conversionIdYielding, isPendingConversionStatus, readConversionStatus, } from './conversion-status-contract.js';
|
|
12
12
|
import { readConversionConfig } from './config.js';
|
|
13
13
|
import { usageRefusal } from './cli-usage.js';
|
|
14
14
|
import { normalizeOptionalIdempotencyKey } from './idempotency-key.js';
|
|
15
|
-
import {
|
|
15
|
+
import { OPERATION_DURATION_HINTS, createLongRunningProgress, formatDuration, } from './cli-progress.js';
|
|
16
16
|
import { isResponsiveConversionQuality, } from './responsive-quality.js';
|
|
17
17
|
const sha256 = (bytes) => (createHash('sha256').update(bytes).digest('hex'));
|
|
18
18
|
const parseOutputs = (value) => {
|
|
@@ -21,47 +21,22 @@ const parseOutputs = (value) => {
|
|
|
21
21
|
const outputs = value.split(',').map((entry) => entry.trim()).filter(Boolean);
|
|
22
22
|
if (outputs.length === 0)
|
|
23
23
|
throw new Error('--output is required');
|
|
24
|
-
const invalid = outputs.filter((output) => !
|
|
24
|
+
const invalid = outputs.filter((output) => !isCliConversionOutput(output));
|
|
25
25
|
if (invalid.length > 0)
|
|
26
|
-
throw new Error(`Unsupported
|
|
26
|
+
throw new Error(`Unsupported conversion output: ${invalid.join(', ')}`);
|
|
27
27
|
return [...new Set(outputs)];
|
|
28
28
|
};
|
|
29
|
-
const readProfile = async (output, value) => {
|
|
30
|
-
if (!value?.trim()) {
|
|
31
|
-
throw new Error(`${output === 'web_project' ? '--web-profile' : '--app-profile'} is required`
|
|
32
|
-
+ ` when exporting ${output}`);
|
|
33
|
-
}
|
|
34
|
-
const trimmed = value.trim();
|
|
35
|
-
const source = trimmed.startsWith('{')
|
|
36
|
-
? trimmed
|
|
37
|
-
: await readFile(path.resolve(trimmed.startsWith('@') ? trimmed.slice(1) : trimmed), 'utf8');
|
|
38
|
-
let parsed;
|
|
39
|
-
try {
|
|
40
|
-
parsed = JSON.parse(source);
|
|
41
|
-
}
|
|
42
|
-
catch (error) {
|
|
43
|
-
throw new Error(`Invalid ${output} profile JSON: ${error instanceof Error ? error.message : String(error)}`);
|
|
44
|
-
}
|
|
45
|
-
return parseConversionOutputProfile(output, parsed);
|
|
46
|
-
};
|
|
47
29
|
const outputIdempotencyKey = (base, output, requestShapeSha256) => {
|
|
48
30
|
const suffix = `${output}:${requestShapeSha256.slice(0, 32)}`;
|
|
49
31
|
return `${base.slice(0, 128 - suffix.length - 1)}:${suffix}`;
|
|
50
32
|
};
|
|
51
|
-
const
|
|
33
|
+
const prepareDerivationPlan = (args) => {
|
|
52
34
|
const requestShape = args.output === 'html'
|
|
53
35
|
? {
|
|
54
36
|
output: args.output,
|
|
55
37
|
responsiveQuality: args.responsiveQuality,
|
|
56
38
|
}
|
|
57
|
-
:
|
|
58
|
-
? {
|
|
59
|
-
output: args.output,
|
|
60
|
-
profile: args.profile,
|
|
61
|
-
}
|
|
62
|
-
: {
|
|
63
|
-
output: args.output,
|
|
64
|
-
};
|
|
39
|
+
: { output: args.output };
|
|
65
40
|
const requestShapeSha256 = sha256(Buffer.from(JSON.stringify(requestShape)));
|
|
66
41
|
return {
|
|
67
42
|
output: args.output,
|
|
@@ -73,31 +48,30 @@ const prepareExportPlan = (args) => {
|
|
|
73
48
|
...(args.output === 'html'
|
|
74
49
|
? { responsiveQuality: args.responsiveQuality }
|
|
75
50
|
: {}),
|
|
76
|
-
...(args.output === 'web_project' || args.output === 'app_project'
|
|
77
|
-
? { profile: args.profile }
|
|
78
|
-
: {}),
|
|
79
51
|
},
|
|
80
52
|
};
|
|
81
53
|
};
|
|
82
54
|
/** A rejection that knows which conversion it was waiting on. */
|
|
83
|
-
class
|
|
55
|
+
class DerivationAttemptError extends Error {
|
|
84
56
|
conversionId;
|
|
85
57
|
constructor(message, conversionId, options) {
|
|
86
58
|
super(message, options);
|
|
87
|
-
this.name = '
|
|
59
|
+
this.name = 'DerivationAttemptError';
|
|
88
60
|
this.conversionId = conversionId;
|
|
89
61
|
}
|
|
90
62
|
}
|
|
91
|
-
const waitForSuccess = async (client, operation, timeoutMs) => {
|
|
63
|
+
const waitForSuccess = async (client, operation, timeoutMs, onProgress) => {
|
|
64
|
+
onProgress?.(operation);
|
|
92
65
|
if (operation.status === 'succeeded')
|
|
93
66
|
return operation;
|
|
94
67
|
return client.waitForConversion(operation.id, {
|
|
95
68
|
expiresAt: operation.expires_at,
|
|
96
69
|
timeoutMs,
|
|
70
|
+
...(onProgress ? { onProgress } : {}),
|
|
97
71
|
});
|
|
98
72
|
};
|
|
99
|
-
const
|
|
100
|
-
const outFile =
|
|
73
|
+
const deriveOne = async (args) => {
|
|
74
|
+
const outFile = derivedOutputFilePath(args.outDir, args.plan.output);
|
|
101
75
|
if (args.plan.output === 'layerdoc') {
|
|
102
76
|
await writeFile(outFile, args.baseLayerDoc, { flag: 'wx' });
|
|
103
77
|
return {
|
|
@@ -123,106 +97,138 @@ const exportOne = async (args) => {
|
|
|
123
97
|
idempotencyKey: shared.idempotencyKey,
|
|
124
98
|
waitSeconds: shared.waitSeconds,
|
|
125
99
|
}
|
|
126
|
-
:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
waitSeconds: shared.waitSeconds,
|
|
135
|
-
}
|
|
136
|
-
: args.plan.output === 'app_project'
|
|
137
|
-
? {
|
|
138
|
-
layerdoc: args.baseLayerDoc,
|
|
139
|
-
filename: `${args.source.id}.layerdoc.json`,
|
|
140
|
-
sourceConversionId: args.source.id,
|
|
141
|
-
output: 'app_project',
|
|
142
|
-
profile: args.plan.request.profile,
|
|
143
|
-
idempotencyKey: shared.idempotencyKey,
|
|
144
|
-
waitSeconds: shared.waitSeconds,
|
|
145
|
-
}
|
|
146
|
-
: {
|
|
147
|
-
layerdoc: args.baseLayerDoc,
|
|
148
|
-
filename: `${args.source.id}.layerdoc.json`,
|
|
149
|
-
sourceConversionId: args.source.id,
|
|
150
|
-
output: args.plan.output,
|
|
151
|
-
idempotencyKey: shared.idempotencyKey,
|
|
152
|
-
waitSeconds: shared.waitSeconds,
|
|
153
|
-
};
|
|
100
|
+
: {
|
|
101
|
+
layerdoc: args.baseLayerDoc,
|
|
102
|
+
filename: `${args.source.id}.layerdoc.json`,
|
|
103
|
+
sourceConversionId: args.source.id,
|
|
104
|
+
output: args.plan.output,
|
|
105
|
+
idempotencyKey: shared.idempotencyKey,
|
|
106
|
+
waitSeconds: shared.waitSeconds,
|
|
107
|
+
};
|
|
154
108
|
const dispatched = await args.client.createConversion(input);
|
|
109
|
+
// Identity said once per format, when it exists — never on every tick.
|
|
110
|
+
args.progress.note(`${args.plan.output}: conversion ${dispatched.id}`);
|
|
111
|
+
const publish = (operation) => {
|
|
112
|
+
args.progress.update({
|
|
113
|
+
stage: operation.status === 'succeeded'
|
|
114
|
+
? 'collecting'
|
|
115
|
+
: operation.progress?.stage ?? operation.status,
|
|
116
|
+
completed: args.completed(),
|
|
117
|
+
total: args.total,
|
|
118
|
+
unit: 'formats settled',
|
|
119
|
+
running: args.running(),
|
|
120
|
+
detail: args.plan.output,
|
|
121
|
+
});
|
|
122
|
+
};
|
|
155
123
|
let completed;
|
|
156
124
|
try {
|
|
157
|
-
completed = await waitForSuccess(args.client, dispatched, args.timeoutMs);
|
|
125
|
+
completed = await waitForSuccess(args.client, dispatched, args.timeoutMs, publish);
|
|
158
126
|
}
|
|
159
127
|
catch (error) {
|
|
160
128
|
// The id travels with the failure. Without it the manifest names a format
|
|
161
129
|
// and a message, and a caller holding a merely-slow export has nothing to
|
|
162
130
|
// collect it with except another conversion.
|
|
163
|
-
throw new
|
|
131
|
+
throw new DerivationAttemptError(error instanceof Error ? error.message : String(error), dispatched.id, { cause: error });
|
|
164
132
|
}
|
|
165
133
|
const downloaded = await args.client.downloadResult(completed.id, args.plan.output);
|
|
166
134
|
await writeFile(outFile, downloaded.bytes, { flag: 'wx' });
|
|
135
|
+
const manifest = await materializeConversionArtifacts(args.client, completed, outFile);
|
|
167
136
|
return {
|
|
168
137
|
output: args.plan.output,
|
|
169
138
|
conversionId: completed.id,
|
|
170
139
|
outFile,
|
|
171
|
-
artifactManifest:
|
|
140
|
+
artifactManifest: {
|
|
141
|
+
conversionId: manifest.conversionId,
|
|
142
|
+
operationExpiresAt: manifest.operationExpiresAt,
|
|
143
|
+
manifestFile: manifest.manifestFile,
|
|
144
|
+
artifactCount: manifest.artifacts.length,
|
|
145
|
+
},
|
|
172
146
|
request: args.plan.request,
|
|
173
147
|
};
|
|
174
148
|
};
|
|
175
|
-
export const
|
|
149
|
+
export const runConversionDerivation = async (sourceConversionId, flags) => {
|
|
176
150
|
const sourceId = sourceConversionId?.trim();
|
|
177
151
|
if (!sourceId) {
|
|
178
152
|
throw usageRefusal({
|
|
179
|
-
reason: '
|
|
153
|
+
reason: 'A conversion-id input derives new formats from one finished LayerDoc conversion,'
|
|
154
|
+
+ ' and no source'
|
|
180
155
|
+ ' conversion id was given.',
|
|
181
|
-
code: '
|
|
182
|
-
verb: ['
|
|
156
|
+
code: 'convert_usage',
|
|
157
|
+
verb: ['convert'],
|
|
183
158
|
});
|
|
184
159
|
}
|
|
185
160
|
const outputs = parseOutputs(stringFlag(flags, 'output'));
|
|
186
161
|
const outDirValue = stringFlag(flags, 'out-dir');
|
|
187
162
|
if (!outDirValue)
|
|
188
|
-
throw new CliRefusal('--out-dir is required', '
|
|
163
|
+
throw new CliRefusal('--out-dir is required', 'convert_out_dir_missing');
|
|
189
164
|
const outDir = path.resolve(outDirValue);
|
|
190
|
-
const idempotencyKey = normalizeOptionalIdempotencyKey(stringFlag(flags, 'idempotency-key'), '--idempotency-key') ??
|
|
165
|
+
const idempotencyKey = normalizeOptionalIdempotencyKey(stringFlag(flags, 'idempotency-key'), '--idempotency-key') ?? conversionDerivationKey({ sourceConversionId: sourceId });
|
|
191
166
|
const responsiveValue = stringFlag(flags, 'responsive-quality') ?? 'standard';
|
|
192
167
|
if (!isResponsiveConversionQuality(responsiveValue)) {
|
|
193
168
|
throw new Error('--responsive-quality must be standard or pro');
|
|
194
169
|
}
|
|
195
|
-
|
|
196
|
-
outputs.includes('web_project')
|
|
197
|
-
? readProfile('web_project', stringFlag(flags, 'web-profile'))
|
|
198
|
-
: undefined,
|
|
199
|
-
outputs.includes('app_project')
|
|
200
|
-
? readProfile('app_project', stringFlag(flags, 'app-profile'))
|
|
201
|
-
: undefined,
|
|
202
|
-
]);
|
|
203
|
-
await prepareExportOutputDirectory(outDir, outputs);
|
|
170
|
+
await prepareDerivationOutputDirectory(outDir, outputs);
|
|
204
171
|
const client = new TwelveUiConversionClient(readConversionConfig({
|
|
205
172
|
origin: stringFlag(flags, 'origin'),
|
|
206
173
|
apiKey: stringFlag(flags, 'api-key'),
|
|
207
174
|
}));
|
|
208
|
-
const
|
|
175
|
+
const progress = createLongRunningProgress({
|
|
176
|
+
label: `derive ${sourceId}`,
|
|
177
|
+
typicalSeconds: OPERATION_DURATION_HINTS.derivation,
|
|
178
|
+
quiet: booleanFlag(flags, 'quiet'),
|
|
179
|
+
});
|
|
180
|
+
// No single number is honest here: a format the server has already
|
|
181
|
+
// rendered replays in seconds, a fresh export dispatch takes minutes, and
|
|
182
|
+
// which of the two this run is only becomes known per format after
|
|
183
|
+
// submission. The board measured the numeric quote as a +3m44 worst
|
|
184
|
+
// overstatement on a 16s replay; the conditional sentence IS the good
|
|
185
|
+
// estimate for a bimodal wait, and each dispatch announces itself below.
|
|
186
|
+
progress.brief({
|
|
187
|
+
request: `derive ${outputs.join(', ')} from conversion ${sourceId}`,
|
|
188
|
+
...(outputs.includes('html')
|
|
189
|
+
? { paid: '1 responsive export (html); the other formats are free derivations' }
|
|
190
|
+
: { free: 'every requested format derives from the finished document without a new purchase' }),
|
|
191
|
+
done: `one file per requested format in ${outDir}, plus a derivation manifest`,
|
|
192
|
+
blocking: true,
|
|
193
|
+
});
|
|
194
|
+
progress.note('replayed formats land in seconds; a freshly dispatched export runs'
|
|
195
|
+
+ ` ~${formatDuration(OPERATION_DURATION_HINTS.derivation)} and is announced when it starts`);
|
|
196
|
+
progress.update({
|
|
197
|
+
stage: 'prepare',
|
|
198
|
+
completed: 0,
|
|
199
|
+
total: outputs.length,
|
|
200
|
+
unit: 'formats settled',
|
|
201
|
+
detail: 'reading the source conversion',
|
|
202
|
+
});
|
|
203
|
+
const source = await client.getConversion(sourceId).catch((error) => {
|
|
204
|
+
progress.finish('stopped', {
|
|
205
|
+
detail: error instanceof Error ? error.message : String(error),
|
|
206
|
+
});
|
|
207
|
+
throw error;
|
|
208
|
+
});
|
|
209
209
|
// Not finished and wrong kind are different facts, and answering both with
|
|
210
210
|
// one sentence is what sent a measured run off to buy a second conversion of
|
|
211
211
|
// the same image. Each gets its own answer, and each names the id that works.
|
|
212
212
|
if (source.output !== 'layerdoc') {
|
|
213
|
+
progress.finish('stopped', { detail: `source produces ${source.output}, not layerdoc` });
|
|
213
214
|
const document = conversionIdYielding(source, 'layerdoc');
|
|
214
215
|
throw new Error(`Source conversion ${sourceId} produces ${source.output}; only a layerdoc conversion can be`
|
|
215
|
-
+ `
|
|
216
|
-
? ` Its document is ${document}:
|
|
216
|
+
+ ` used as a derivation source.${document
|
|
217
|
+
? ` Its document is ${document}: convert from that one.`
|
|
217
218
|
: ' Name the layerdoc conversion this one derives from.'}`);
|
|
218
219
|
}
|
|
219
220
|
if (isPendingConversionStatus(source.status)) {
|
|
221
|
+
progress.finish('stopped', {
|
|
222
|
+
detail: `source conversion is ${source.status}, not finished; nothing was bought`,
|
|
223
|
+
next: `12ui resume ${sourceId} --output layerdoc --out <file> blocks until it settles`,
|
|
224
|
+
});
|
|
220
225
|
throw new Error(`Source conversion ${sourceId} is ${source.status}, not finished. Nothing failed and nothing`
|
|
221
226
|
+ ` was bought here. Leave \`12ui resume ${sourceId} --output layerdoc --out <file>\` running,`
|
|
222
|
-
+ ' which blocks until it settles, then
|
|
227
|
+
+ ' which blocks until it settles, then derive from it.');
|
|
223
228
|
}
|
|
224
229
|
if (source.status !== 'succeeded') {
|
|
225
|
-
|
|
230
|
+
progress.finish('failed', { detail: `source conversion ${source.status}; there is nothing to derive` });
|
|
231
|
+
throw new Error(`Source conversion ${sourceId} ${source.status}; there is nothing to derive.`);
|
|
226
232
|
}
|
|
227
233
|
// Read through `conversionIdYielding` rather than off the field: the link
|
|
228
234
|
// from a conversion to the id that yields a given format lives in one module,
|
|
@@ -237,7 +243,7 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
237
243
|
// the one that exists, at the last moment it is still free.
|
|
238
244
|
process.stderr.write(`Conversion ${sourceId} already carries a responsive HTML export: ${existingHtmlExport}.`
|
|
239
245
|
+ ` Collect it with \`12ui resume ${existingHtmlExport} --output html --out <file>\` rather`
|
|
240
|
-
+ ' than paying for a second one. Continuing with the
|
|
246
|
+
+ ' than paying for a second one. Continuing with the derivation you asked for.\n');
|
|
241
247
|
}
|
|
242
248
|
const baseLayerDoc = (await client.downloadResult(source.id, 'layerdoc')).bytes;
|
|
243
249
|
const timeoutValue = stringFlag(flags, 'timeout-ms');
|
|
@@ -245,21 +251,50 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
245
251
|
if (timeoutMs !== undefined && (!Number.isFinite(timeoutMs) || timeoutMs < 1_000)) {
|
|
246
252
|
throw new Error('--timeout-ms must be a number of at least 1000');
|
|
247
253
|
}
|
|
248
|
-
const plans = outputs.map((output) =>
|
|
254
|
+
const plans = outputs.map((output) => prepareDerivationPlan({
|
|
249
255
|
idempotencyKey,
|
|
250
256
|
output,
|
|
251
|
-
profile: output === 'web_project' ? webProfile : output === 'app_project' ? appProfile : undefined,
|
|
252
257
|
responsiveQuality: responsiveValue,
|
|
253
258
|
}));
|
|
254
259
|
const preparedAt = new Date().toISOString();
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
260
|
+
let completedCount = 0;
|
|
261
|
+
const active = new Set(plans.map((plan) => plan.output));
|
|
262
|
+
progress.update({
|
|
263
|
+
stage: 'queued',
|
|
264
|
+
completed: 0,
|
|
265
|
+
total: plans.length,
|
|
266
|
+
unit: 'formats settled',
|
|
267
|
+
running: active.size,
|
|
268
|
+
detail: `active: ${[...active].join(', ')}`,
|
|
269
|
+
});
|
|
270
|
+
const settled = await Promise.allSettled(plans.map(async (plan) => {
|
|
271
|
+
try {
|
|
272
|
+
return await deriveOne({
|
|
273
|
+
baseLayerDoc,
|
|
274
|
+
client,
|
|
275
|
+
outDir,
|
|
276
|
+
plan,
|
|
277
|
+
source,
|
|
278
|
+
timeoutMs,
|
|
279
|
+
progress,
|
|
280
|
+
completed: () => completedCount,
|
|
281
|
+
running: () => active.size,
|
|
282
|
+
total: plans.length,
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
finally {
|
|
286
|
+
active.delete(plan.output);
|
|
287
|
+
completedCount += 1;
|
|
288
|
+
progress.update({
|
|
289
|
+
stage: 'collecting',
|
|
290
|
+
completed: completedCount,
|
|
291
|
+
total: plans.length,
|
|
292
|
+
unit: 'formats settled',
|
|
293
|
+
running: active.size,
|
|
294
|
+
detail: `settled ${plan.output}${active.size > 0 ? `; active: ${[...active].join(', ')}` : ''}`,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}));
|
|
263
298
|
const results = settled.flatMap((result) => result.status === 'fulfilled' ? [result.value] : []);
|
|
264
299
|
// A wait that ended without the bytes is not the same fact as a conversion
|
|
265
300
|
// that failed. One free read per rejection settles which it was, and a
|
|
@@ -267,7 +302,7 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
267
302
|
// the id that collects it.
|
|
268
303
|
const failures = await Promise.all(settled.flatMap((result, index) => result.status === 'rejected'
|
|
269
304
|
? [(async () => {
|
|
270
|
-
const conversionId = result.reason instanceof
|
|
305
|
+
const conversionId = result.reason instanceof DerivationAttemptError
|
|
271
306
|
? result.reason.conversionId
|
|
272
307
|
: null;
|
|
273
308
|
const status = conversionId ? await readConversionStatus(client, conversionId) : 'unknown';
|
|
@@ -281,7 +316,7 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
281
316
|
};
|
|
282
317
|
})()]
|
|
283
318
|
: []));
|
|
284
|
-
const manifestPath =
|
|
319
|
+
const manifestPath = derivationManifestPath(outDir);
|
|
285
320
|
await writeFile(manifestPath, `${JSON.stringify({
|
|
286
321
|
schemaVersion: 2,
|
|
287
322
|
sourceConversionId: source.id,
|
|
@@ -297,11 +332,44 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
297
332
|
? `${failure.output}: ${failure.conversionId} is ${failure.status}, not failed; collect it`
|
|
298
333
|
+ ` with \`12ui resume ${failure.conversionId} --output ${failure.output} --out <file>\``
|
|
299
334
|
: `${failure.output}: ${failure.error}`);
|
|
335
|
+
progress.finish(failures.every((failure) => failure.pending) ? 'deadline' : 'partial', {
|
|
336
|
+
detail: failures.every((failure) => failure.pending)
|
|
337
|
+
? 'client wait ended; paid work continues server-side'
|
|
338
|
+
: `${failures.length} requested format(s) did not settle`,
|
|
339
|
+
artifacts: [
|
|
340
|
+
...results.map((result) => ({
|
|
341
|
+
name: result.output,
|
|
342
|
+
state: 'succeeded',
|
|
343
|
+
path: result.outFile,
|
|
344
|
+
})),
|
|
345
|
+
...failures.map((failure) => (failure.pending
|
|
346
|
+
? {
|
|
347
|
+
name: failure.output,
|
|
348
|
+
state: `still running server-side (${failure.status})`,
|
|
349
|
+
...(failure.conversionId
|
|
350
|
+
? { note: `collect free with: 12ui resume ${failure.conversionId} --output ${failure.output} --out <file>` }
|
|
351
|
+
: {}),
|
|
352
|
+
}
|
|
353
|
+
: { name: failure.output, state: 'failed', note: failure.error })),
|
|
354
|
+
],
|
|
355
|
+
next: `evidence and every id: ${manifestPath}`,
|
|
356
|
+
});
|
|
300
357
|
throw new Error(`${failures.every((failure) => failure.pending)
|
|
301
|
-
? 'One or more
|
|
302
|
-
: 'One or more
|
|
358
|
+
? 'One or more derivations have not settled yet'
|
|
359
|
+
: 'One or more derivations failed without redispatch'}:`
|
|
303
360
|
+ ` ${failures.map(describe).join('; ')}. Evidence: ${manifestPath}`);
|
|
304
361
|
}
|
|
362
|
+
progress.finish('succeeded', {
|
|
363
|
+
artifacts: results.map((result) => ({
|
|
364
|
+
name: result.output,
|
|
365
|
+
state: 'succeeded',
|
|
366
|
+
path: result.outFile,
|
|
367
|
+
})),
|
|
368
|
+
spend: outputs.includes('html')
|
|
369
|
+
? '1 responsive export purchased; the other formats derived free'
|
|
370
|
+
: 'nothing — every format derived free from the finished document',
|
|
371
|
+
next: `derivation manifest: ${manifestPath}`,
|
|
372
|
+
});
|
|
305
373
|
console.log(JSON.stringify({
|
|
306
374
|
sourceConversionId: source.id,
|
|
307
375
|
sourceLayerDocSha256: sha256(baseLayerDoc),
|
|
@@ -310,4 +378,4 @@ export const runExportCommand = async (sourceConversionId, flags) => {
|
|
|
310
378
|
}, null, 2));
|
|
311
379
|
return { sourceConversionId: source.id, manifestPath, results };
|
|
312
380
|
};
|
|
313
|
-
//# sourceMappingURL=cli-
|
|
381
|
+
//# sourceMappingURL=cli-conversion-derivation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-conversion-derivation.js","sourceRoot":"","sources":["../src/cli-conversion-derivation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EACL,8BAA8B,GAE/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,UAAU,EAAiB,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,qBAAqB,EACrB,gCAAgC,GACjC,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,wBAAwB,GAGzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,qBAAqB,GAEtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,+BAA+B,EAAE,MAAM,sBAAsB,CAAC;AACvE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,cAAc,GAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,6BAA6B,GAE9B,MAAM,yBAAyB,CAAC;AA6BjC,MAAM,MAAM,GAAG,CAAC,KAAiB,EAA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+D;YACjE,CAAC,CAAC,gEAAgE;QACpE,IAAI,EAAE,wBAAwB,YAAY,EAAE;KAC7C,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACzB,kBAAkB,EAAE,MAAM,CAAC,EAAE;QAC7B,oBAAoB,EAAE,MAAM,CAAC,YAAY,CAAC;QAC1C,YAAY;QACZ,OAAO;KACR,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IACb,OAAO,EAAE,kBAAkB,EAAE,MAAM,CAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;AAClE,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ConversionOutput } from './conversion-outputs.js';
|
|
2
|
+
export declare const derivedOutputFilePath: (outDir: string, output: ConversionOutput) => string;
|
|
3
|
+
export declare const derivationManifestPath: (outDir: string) => string;
|
|
4
|
+
export declare const prepareDerivationOutputDirectory: (outDir: string, outputs: readonly ConversionOutput[]) => Promise<void>;
|
|
5
|
+
//# sourceMappingURL=cli-conversion-output-directory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-conversion-output-directory.d.ts","sourceRoot":"","sources":["../src/cli-conversion-output-directory.ts"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,EACd,QAAQ,gBAAgB,KACvB,MAOF,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,MAEvD,CAAC;AAYF,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,MAAM,EACd,SAAS,SAAS,gBAAgB,EAAE,KACnC,OAAO,CAAC,IAAI,CAkBd,CAAC"}
|
|
@@ -2,12 +2,12 @@ import { lstat } from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { prepareOutputDirectory } from './cli-output-paths.js';
|
|
4
4
|
import { CONVERSION_OUTPUT_FILENAME_SUFFIXES, } from './conversion-outputs.js';
|
|
5
|
-
export const
|
|
6
|
-
? '
|
|
5
|
+
export const derivedOutputFilePath = (outDir, output) => path.join(outDir, output === 'html'
|
|
6
|
+
? 'derived.responsive.html'
|
|
7
7
|
: output === 'html_fixed'
|
|
8
|
-
? '
|
|
9
|
-
: `
|
|
10
|
-
export const
|
|
8
|
+
? 'derived.fixed.html'
|
|
9
|
+
: `derived.${CONVERSION_OUTPUT_FILENAME_SUFFIXES[output]}`);
|
|
10
|
+
export const derivationManifestPath = (outDir) => (path.join(outDir, 'derivation-manifest.json'));
|
|
11
11
|
const pathExists = async (target) => {
|
|
12
12
|
try {
|
|
13
13
|
await lstat(target);
|
|
@@ -19,17 +19,17 @@ const pathExists = async (target) => {
|
|
|
19
19
|
throw error;
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
export const
|
|
22
|
+
export const prepareDerivationOutputDirectory = async (outDir, outputs) => {
|
|
23
23
|
await prepareOutputDirectory(outDir);
|
|
24
|
-
const outputFiles = outputs.map((output) =>
|
|
24
|
+
const outputFiles = outputs.map((output) => derivedOutputFilePath(outDir, output));
|
|
25
25
|
const reservedPaths = [
|
|
26
|
-
|
|
26
|
+
derivationManifestPath(outDir),
|
|
27
27
|
...outputFiles,
|
|
28
28
|
...outputFiles.flatMap((outputFile, index) => (outputs[index] === 'layerdoc' ? [] : [`${outputFile}.assets`])),
|
|
29
29
|
];
|
|
30
30
|
const conflicts = (await Promise.all(reservedPaths.map(async (target) => (await pathExists(target) ? target : null)))).filter((target) => target !== null);
|
|
31
31
|
if (conflicts.length > 0) {
|
|
32
|
-
throw new Error(`Refusing
|
|
32
|
+
throw new Error(`Refusing derivation because destination path already exists: ${conflicts.join(', ')}`);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=cli-
|
|
35
|
+
//# sourceMappingURL=cli-conversion-output-directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cli-conversion-output-directory.js","sourceRoot":"","sources":["../src/cli-conversion-output-directory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EACL,mCAAmC,GAEpC,MAAM,yBAAyB,CAAC;AAEjC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,MAAc,EACd,MAAwB,EAChB,EAAE,CAAC,IAAI,CAAC,IAAI,CACpB,MAAM,EACN,MAAM,KAAK,MAAM;IACf,CAAC,CAAC,yBAAyB;IAC3B,CAAC,CAAC,MAAM,KAAK,YAAY;QACvB,CAAC,CAAC,oBAAoB;QACtB,CAAC,CAAC,WAAW,mCAAmC,CAAC,MAAM,CAAC,EAAE,CAC/D,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,CAChE,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAC9C,CAAC;AAEF,MAAM,UAAU,GAAG,KAAK,EAAE,MAAc,EAAoB,EAAE;IAC5D,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,MAAM,CAAC,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAK,KAA+B,CAAC,IAAI,KAAK,QAAQ;YAAE,OAAO,KAAK,CAAC;QACrE,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,gCAAgC,GAAG,KAAK,EACnD,MAAc,EACd,OAAoC,EACrB,EAAE;IACjB,MAAM,sBAAsB,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACnF,MAAM,aAAa,GAAG;QACpB,sBAAsB,CAAC,MAAM,CAAC;QAC9B,GAAG,WAAW;QACd,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5C,OAAO,CAAC,KAAK,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,UAAU,SAAS,CAAC,CAC9D,CAAC;KACH,CAAC;IACF,MAAM,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CACvE,MAAM,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CACzC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC;IAC3D,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CACb,gEAAgE,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvF,CAAC;IACJ,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CliFlags } from './cli-arguments.js';
|
|
2
|
+
import { type ObservedConversionStatus } from './conversion-status-contract.js';
|
|
2
3
|
import { type InFlightRunJournalRecord } from './run-journal-in-flight.js';
|
|
3
4
|
import type { RunJournalNotes } from './run-journal.js';
|
|
4
5
|
/**
|
|
@@ -19,6 +20,14 @@ export declare const parseTimeoutMs: (value?: string) => number | undefined;
|
|
|
19
20
|
* the command that wrote the file is the one that knows there is no page.
|
|
20
21
|
*/
|
|
21
22
|
export declare const layerDocPageAction: (outFile: string) => string;
|
|
23
|
+
export declare const layerDocStateAction: (args: {
|
|
24
|
+
outFile: string;
|
|
25
|
+
linkedExport?: {
|
|
26
|
+
id: string;
|
|
27
|
+
status: ObservedConversionStatus;
|
|
28
|
+
outFile?: string;
|
|
29
|
+
};
|
|
30
|
+
}) => string;
|
|
22
31
|
/**
|
|
23
32
|
* A conversion of these exact bytes is already running in this workspace.
|
|
24
33
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli-convert-command.d.ts","sourceRoot":"","sources":["../src/cli-convert-command.ts"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"cli-convert-command.d.ts","sourceRoot":"","sources":["../src/cli-convert-command.ts"],"names":[],"mappings":"AAKA,OAAO,EAA2B,KAAK,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AA4B5E,OAAO,EAIL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAgBzC,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;GAIG;AAEH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,KAAG,MAAM,GAAG,SAOxD,CAAC;AA8DF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,KAAG,MAIpD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,MAAM;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE;QACb,EAAE,EAAE,MAAM,CAAC;QACX,MAAM,EAAE,wBAAwB,CAAC;QACjC,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,KAAG,MAYH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,GAAI,MAAM;IAC3C,MAAM,EAAE,wBAAwB,CAAC;IACjC,SAAS,EAAE,MAAM,CAAC;CACnB,KAAG,MAMH,CAAC;AAoJF,eAAO,MAAM,oBAAoB,GAC/B,SAAS,SAAS,MAAM,EAAE,EAC1B,OAAO,QAAQ,EACf,SAAS,eAAe,KACvB,OAAO,CAAC,IAAI,CAklBd,CAAC"}
|