@automovie/template 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +37 -2
- package/build/resolveTemplateVersions.ts +92 -0
- package/build/syncScaffoldInstructions.ts +28 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.d.ts +14 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js +52 -0
- package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js.map +1 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.d.ts +2 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js +42 -0
- package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js.map +1 -0
- package/lib/AutoMovieScaffoldLayer.d.ts +15 -0
- package/lib/AutoMovieScaffoldLayer.js +3 -0
- package/lib/AutoMovieScaffoldLayer.js.map +1 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.d.ts +2 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js +6 -0
- package/lib/FILE_ATTRIBUTE_DIRECTORY.js.map +1 -0
- package/lib/IAutoMovieCatalogVersionProps.d.ts +16 -0
- package/lib/IAutoMovieCatalogVersionProps.js +3 -0
- package/lib/IAutoMovieCatalogVersionProps.js.map +1 -0
- package/lib/IAutoMovieScaffoldProps.d.ts +14 -0
- package/lib/IAutoMovieScaffoldProps.js +3 -0
- package/lib/IAutoMovieScaffoldProps.js.map +1 -0
- package/lib/IAutoMovieScaffoldSourceEntry.d.ts +18 -0
- package/lib/IAutoMovieScaffoldSourceEntry.js +3 -0
- package/lib/IAutoMovieScaffoldSourceEntry.js.map +1 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.d.ts +17 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js +3 -0
- package/lib/IAutoMovieTemplateDependencyVersionsProps.js.map +1 -0
- package/lib/IAutoMovieWorkspacePackageVersions.d.ts +34 -0
- package/lib/IAutoMovieWorkspacePackageVersions.js +3 -0
- package/lib/IAutoMovieWorkspacePackageVersions.js.map +1 -0
- package/lib/IBoundChild.d.ts +71 -0
- package/lib/IBoundChild.js +3 -0
- package/lib/IBoundChild.js.map +1 -0
- package/lib/IBoundChildStatus.d.ts +20 -0
- package/lib/IBoundChildStatus.js +3 -0
- package/lib/IBoundChildStatus.js.map +1 -0
- package/lib/IBoundParent.d.ts +61 -0
- package/lib/IBoundParent.js +3 -0
- package/lib/IBoundParent.js.map +1 -0
- package/lib/IBoundParentStatus.d.ts +14 -0
- package/lib/IBoundParentStatus.js +3 -0
- package/lib/IBoundParentStatus.js.map +1 -0
- package/lib/ICreateResult.d.ts +27 -0
- package/lib/ICreateResult.js +3 -0
- package/lib/ICreateResult.js.map +1 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.d.ts +16 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldCompletedFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldCompletedPublication.d.ts +15 -0
- package/lib/IScaffoldCompletedPublication.js +3 -0
- package/lib/IScaffoldCompletedPublication.js.map +1 -0
- package/lib/IScaffoldFileSnapshot.d.ts +24 -0
- package/lib/IScaffoldFileSnapshot.js +3 -0
- package/lib/IScaffoldFileSnapshot.js.map +1 -0
- package/lib/IScaffoldParentPublicationRequest.d.ts +26 -0
- package/lib/IScaffoldParentPublicationRequest.js +3 -0
- package/lib/IScaffoldParentPublicationRequest.js.map +1 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.d.ts +22 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldPartialFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldPhysicalDirectory.d.ts +20 -0
- package/lib/IScaffoldPhysicalDirectory.js +3 -0
- package/lib/IScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/IScaffoldPosixConstants.d.ts +24 -0
- package/lib/IScaffoldPosixConstants.js +3 -0
- package/lib/IScaffoldPosixConstants.js.map +1 -0
- package/lib/IScaffoldPublicationEntry.d.ts +20 -0
- package/lib/IScaffoldPublicationEntry.js +3 -0
- package/lib/IScaffoldPublicationEntry.js.map +1 -0
- package/lib/IScaffoldPublicationFailure.d.ts +18 -0
- package/lib/IScaffoldPublicationFailure.js +3 -0
- package/lib/IScaffoldPublicationFailure.js.map +1 -0
- package/lib/IScaffoldPublicationOptions.d.ts +17 -0
- package/lib/IScaffoldPublicationOptions.js +3 -0
- package/lib/IScaffoldPublicationOptions.js.map +1 -0
- package/lib/IScaffoldPublicationReceipt.d.ts +25 -0
- package/lib/IScaffoldPublicationReceipt.js +3 -0
- package/lib/IScaffoldPublicationReceipt.js.map +1 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.d.ts +18 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.js +3 -0
- package/lib/IScaffoldRefusedFilePublicationOutcome.js.map +1 -0
- package/lib/IScaffoldSyncPlan.d.ts +25 -0
- package/lib/IScaffoldSyncPlan.js +3 -0
- package/lib/IScaffoldSyncPlan.js.map +1 -0
- package/lib/IScaffoldSyncProps.d.ts +16 -0
- package/lib/IScaffoldSyncProps.js +3 -0
- package/lib/IScaffoldSyncProps.js.map +1 -0
- package/lib/IWindowsFileInformation.d.ts +20 -0
- package/lib/IWindowsFileInformation.js +3 -0
- package/lib/IWindowsFileInformation.js.map +1 -0
- package/lib/IWindowsLibrary.d.ts +127 -0
- package/lib/IWindowsLibrary.js +3 -0
- package/lib/IWindowsLibrary.js.map +1 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.d.ts +4 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js +8 -0
- package/lib/SCAFFOLD_SYNC_STATE_FILE.js.map +1 -0
- package/lib/ScaffoldFilePublicationOutcome.d.ts +14 -0
- package/lib/ScaffoldFilePublicationOutcome.js +3 -0
- package/lib/ScaffoldFilePublicationOutcome.js.map +1 -0
- package/lib/ScaffoldParentChangedError.d.ts +11 -0
- package/lib/ScaffoldParentChangedError.js +19 -0
- package/lib/ScaffoldParentChangedError.js.map +1 -0
- package/lib/ScaffoldPublicationError.d.ts +17 -0
- package/lib/ScaffoldPublicationError.js +46 -0
- package/lib/ScaffoldPublicationError.js.map +1 -0
- package/lib/assertOrdinaryFile.d.ts +13 -0
- package/lib/assertOrdinaryFile.js +20 -0
- package/lib/assertOrdinaryFile.js.map +1 -0
- package/lib/assertOrdinarySingleLinkFile.d.ts +13 -0
- package/lib/assertOrdinarySingleLinkFile.js +22 -0
- package/lib/assertOrdinarySingleLinkFile.js.map +1 -0
- package/lib/assertScaffoldOwnership.d.ts +13 -0
- package/lib/assertScaffoldOwnership.js +24 -0
- package/lib/assertScaffoldOwnership.js.map +1 -0
- package/lib/assertScaffoldPhysicalDirectory.d.ts +16 -0
- package/lib/assertScaffoldPhysicalDirectory.js +26 -0
- package/lib/assertScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/assertScaffoldProjectName.d.ts +18 -0
- package/lib/assertScaffoldProjectName.js +34 -0
- package/lib/assertScaffoldProjectName.js.map +1 -0
- package/lib/attachScaffoldSyncState.d.ts +18 -0
- package/lib/attachScaffoldSyncState.js +30 -0
- package/lib/attachScaffoldSyncState.js.map +1 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.d.ts +13 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.js +69 -0
- package/lib/captureEmptyScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/captureScaffoldFile.d.ts +13 -0
- package/lib/captureScaffoldFile.js +67 -0
- package/lib/captureScaffoldFile.js.map +1 -0
- package/lib/captureScaffoldPhysicalDirectory.d.ts +13 -0
- package/lib/captureScaffoldPhysicalDirectory.js +63 -0
- package/lib/captureScaffoldPhysicalDirectory.js.map +1 -0
- package/lib/combineScaffoldFailures.d.ts +19 -0
- package/lib/combineScaffoldFailures.js +32 -0
- package/lib/combineScaffoldFailures.js.map +1 -0
- package/lib/createAutoMovieCatalogVersionResolver.d.ts +17 -0
- package/lib/createAutoMovieCatalogVersionResolver.js +64 -0
- package/lib/createAutoMovieCatalogVersionResolver.js.map +1 -0
- package/lib/createScaffoldSyncState.d.ts +12 -0
- package/lib/createScaffoldSyncState.js +26 -0
- package/lib/createScaffoldSyncState.js.map +1 -0
- package/lib/createScaffoldVariables.d.ts +25 -0
- package/lib/createScaffoldVariables.js +41 -0
- package/lib/createScaffoldVariables.js.map +1 -0
- package/lib/ensureScaffoldBaseDirectory.d.ts +19 -0
- package/lib/ensureScaffoldBaseDirectory.js +89 -0
- package/lib/ensureScaffoldBaseDirectory.js.map +1 -0
- package/lib/ensureScaffoldFileDirectory.d.ts +25 -0
- package/lib/ensureScaffoldFileDirectory.js +103 -0
- package/lib/ensureScaffoldFileDirectory.js.map +1 -0
- package/lib/index.d.ts +47 -0
- package/lib/index.js +64 -0
- package/lib/index.js.map +1 -0
- package/lib/inside.d.ts +12 -0
- package/lib/inside.js +57 -0
- package/lib/inside.js.map +1 -0
- package/lib/isScaffoldInstruction.d.ts +12 -0
- package/lib/isScaffoldInstruction.js +29 -0
- package/lib/isScaffoldInstruction.js.map +1 -0
- package/lib/listAutoMovieScaffoldFiles.d.ts +17 -0
- package/lib/listAutoMovieScaffoldFiles.js +87 -0
- package/lib/listAutoMovieScaffoldFiles.js.map +1 -0
- package/lib/loadWindowsLibrary.d.ts +13 -0
- package/lib/loadWindowsLibrary.js +180 -0
- package/lib/loadWindowsLibrary.js.map +1 -0
- package/lib/mergeScaffoldFiles.d.ts +18 -0
- package/lib/mergeScaffoldFiles.js +37 -0
- package/lib/mergeScaffoldFiles.js.map +1 -0
- package/lib/missingPath.d.ts +12 -0
- package/lib/missingPath.js +18 -0
- package/lib/missingPath.js.map +1 -0
- package/lib/nativeError.d.ts +12 -0
- package/lib/nativeError.js +17 -0
- package/lib/nativeError.js.map +1 -0
- package/lib/openPosixParent.d.ts +13 -0
- package/lib/openPosixParent.js +135 -0
- package/lib/openPosixParent.js.map +1 -0
- package/lib/openWindowsParent.d.ts +13 -0
- package/lib/openWindowsParent.js +224 -0
- package/lib/openWindowsParent.js.map +1 -0
- package/lib/overwriteScaffoldFile.d.ts +22 -0
- package/lib/overwriteScaffoldFile.js +214 -0
- package/lib/overwriteScaffoldFile.js.map +1 -0
- package/lib/physicalDirectoryIdentity.d.ts +15 -0
- package/lib/physicalDirectoryIdentity.js +65 -0
- package/lib/physicalDirectoryIdentity.js.map +1 -0
- package/lib/physicalVersion.d.ts +13 -0
- package/lib/physicalVersion.js +18 -0
- package/lib/physicalVersion.js.map +1 -0
- package/lib/planScaffoldPublication.d.ts +22 -0
- package/lib/planScaffoldPublication.js +100 -0
- package/lib/planScaffoldPublication.js.map +1 -0
- package/lib/planScaffoldSync.d.ts +14 -0
- package/lib/planScaffoldSync.js +102 -0
- package/lib/planScaffoldSync.js.map +1 -0
- package/lib/publishFiles.d.ts +23 -0
- package/lib/publishFiles.js +124 -0
- package/lib/publishFiles.js.map +1 -0
- package/lib/publishNativeScaffoldFile.d.ts +21 -0
- package/lib/publishNativeScaffoldFile.js +211 -0
- package/lib/publishNativeScaffoldFile.js.map +1 -0
- package/lib/publishScaffoldCandidate.d.ts +24 -0
- package/lib/publishScaffoldCandidate.js +70 -0
- package/lib/publishScaffoldCandidate.js.map +1 -0
- package/lib/readAutoMovieScaffoldSources.d.ts +20 -0
- package/lib/readAutoMovieScaffoldSources.js +103 -0
- package/lib/readAutoMovieScaffoldSources.js.map +1 -0
- package/lib/readScaffoldSyncFile.d.ts +16 -0
- package/lib/readScaffoldSyncFile.js +64 -0
- package/lib/readScaffoldSyncFile.js.map +1 -0
- package/lib/renderScaffold.d.ts +19 -0
- package/lib/renderScaffold.js +33 -0
- package/lib/renderScaffold.js.map +1 -0
- package/lib/renderScaffoldEntries.d.ts +20 -0
- package/lib/renderScaffoldEntries.js +106 -0
- package/lib/renderScaffoldEntries.js.map +1 -0
- package/lib/renderScaffoldInstructions.d.ts +17 -0
- package/lib/renderScaffoldInstructions.js +23 -0
- package/lib/renderScaffoldInstructions.js.map +1 -0
- package/lib/renderScaffoldLayer.d.ts +20 -0
- package/lib/renderScaffoldLayer.js +28 -0
- package/lib/renderScaffoldLayer.js.map +1 -0
- package/lib/renderTemplate.d.ts +19 -0
- package/lib/renderTemplate.js +56 -0
- package/lib/renderTemplate.js.map +1 -0
- package/lib/renderWorkspaceProductionScaffold.d.ts +19 -0
- package/lib/renderWorkspaceProductionScaffold.js +30 -0
- package/lib/renderWorkspaceProductionScaffold.js.map +1 -0
- package/lib/renderWorkspaceScaffold.d.ts +19 -0
- package/lib/renderWorkspaceScaffold.js +33 -0
- package/lib/renderWorkspaceScaffold.js.map +1 -0
- package/lib/replaceSharedScaffoldFile.d.ts +30 -0
- package/lib/replaceSharedScaffoldFile.js +106 -0
- package/lib/replaceSharedScaffoldFile.js.map +1 -0
- package/lib/resolveAutoMovieCatalogVersion.d.ts +19 -0
- package/lib/resolveAutoMovieCatalogVersion.js +24 -0
- package/lib/resolveAutoMovieCatalogVersion.js.map +1 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.d.ts +19 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.js +62 -0
- package/lib/resolveAutoMovieTemplateDependencyVersions.js.map +1 -0
- package/lib/resolveScaffoldPosixConstants.d.ts +13 -0
- package/lib/resolveScaffoldPosixConstants.js +44 -0
- package/lib/resolveScaffoldPosixConstants.js.map +1 -0
- package/lib/scaffoldAssetDirectory.d.ts +19 -0
- package/lib/scaffoldAssetDirectory.js +63 -0
- package/lib/scaffoldAssetDirectory.js.map +1 -0
- package/lib/scaffoldPhysicalIdentity.d.ts +18 -0
- package/lib/scaffoldPhysicalIdentity.js +22 -0
- package/lib/scaffoldPhysicalIdentity.js.map +1 -0
- package/lib/scaffoldSharedSkillDirectory.d.ts +17 -0
- package/lib/scaffoldSharedSkillDirectory.js +62 -0
- package/lib/scaffoldSharedSkillDirectory.js.map +1 -0
- package/lib/scaffoldSharedSkillPath.d.ts +17 -0
- package/lib/scaffoldSharedSkillPath.js +66 -0
- package/lib/scaffoldSharedSkillPath.js.map +1 -0
- package/lib/skills/3d-modeling/conditioning.md +82 -0
- package/lib/skills/3d-modeling/crafting.md +82 -0
- package/lib/skills/3d-modeling/diffusion.md +34 -0
- package/lib/skills/3d-modeling/inspection.md +54 -0
- package/lib/skills/3d-modeling/lofting.md +43 -0
- package/lib/skills/3d-modeling/modularization.md +31 -0
- package/lib/skills/3d-modeling/recovery.md +29 -0
- package/lib/skills/3d-modeling/rigging.md +97 -0
- package/lib/skills/3d-modeling/sources.md +29 -0
- package/lib/skills/contracts/development/common.md +13 -0
- package/lib/skills/contracts/development/design.md +28 -0
- package/lib/skills/contracts/development/implementation.md +49 -0
- package/lib/skills/contracts/development/testing.md +27 -0
- package/lib/skills/development/repair.md +13 -0
- package/lib/skills/documentation/SKILL.md +25 -0
- package/lib/skills/documentation/writing.md +51 -0
- package/lib/skills/motion/authoring.md +51 -0
- package/lib/skills/motion/contacts.md +39 -0
- package/lib/skills/motion/laws.md +23 -0
- package/lib/skills/motion/layers.md +7 -0
- package/lib/skills/motion/transitions.md +27 -0
- package/lib/skills/motion/variation.md +23 -0
- package/lib/skills/motion/verification.md +36 -0
- package/lib/skills/prompting/SKILL.md +80 -0
- package/lib/skills/visual-debugging/capture.md +60 -0
- package/lib/skills/visual-debugging/comparison.md +35 -0
- package/lib/skills/visual-debugging/correction-rounds.md +34 -0
- package/lib/skills/visual-debugging/passes.md +29 -0
- package/lib/skills/visual-debugging/rendering-cost.md +5 -0
- package/lib/syncScaffold.d.ts +19 -0
- package/lib/syncScaffold.js +28 -0
- package/lib/syncScaffold.js.map +1 -0
- package/lib/writeFiles.d.ts +20 -0
- package/lib/writeFiles.js +33 -0
- package/lib/writeFiles.js.map +1 -0
- package/lib/writeScaffoldFile.d.ts +35 -0
- package/lib/writeScaffoldFile.js +107 -0
- package/lib/writeScaffoldFile.js.map +1 -0
- package/lib/writtenVersion.d.ts +13 -0
- package/lib/writtenVersion.js +18 -0
- package/lib/writtenVersion.js.map +1 -0
- package/package.json +59 -3
- package/scaffold/instructions/.agents/skills/$documentation +0 -0
- package/scaffold/instructions/.agents/skills/$prompting +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$conditioning.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$crafting.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$diffusion.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$inspection.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$lofting.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$modularization.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$recovery.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$rigging.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/$sources.md +0 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +32 -0
- package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +25 -0
- package/scaffold/instructions/.agents/skills/audio/SKILL.md +28 -0
- package/scaffold/instructions/.agents/skills/audio/acquisition.md +25 -0
- package/scaffold/instructions/.agents/skills/audio/local-speech.md +11 -0
- package/scaffold/instructions/.agents/skills/audio/sound-effects.md +29 -0
- package/scaffold/instructions/.agents/skills/contracts/SKILL.md +41 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$common.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$design.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$implementation.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/$testing.md +0 -0
- package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +22 -0
- package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/development/composition.md +29 -0
- package/scaffold/instructions/.agents/skills/contracts/development/entities.md +27 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/behaviors.md +42 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/composition.md +32 -0
- package/scaffold/instructions/.agents/skills/contracts/development/statements/entities.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/SKILL.md +44 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/brief.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/common.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/narratives.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/settings.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/common.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/common.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/realized.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/realized.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/screenplay.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/brief.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/common.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/index.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/narratives.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/review.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/screenplay.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/scripts.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/settings.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/treatments.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/brief.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/common.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/index.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/narratives.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/realized.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/research.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/review.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/screenplay.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/scripts.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/settings.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/treatments.md +13 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/brief.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/common.md +42 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/narratives.md +8 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/screenplay.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/scripts.md +11 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/settings.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/common.md +94 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/common.md +20 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/realized.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/screenplay.md +11 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/scripts.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/realized.md +19 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/screenplay.md +25 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/scripts.md +19 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/brief.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/common.md +31 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/index.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/narratives.md +43 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/review.md +37 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/screenplay.md +26 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/scripts.md +26 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/settings.md +38 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/treatments.md +31 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/brief.md +21 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/common.md +15 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/index.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/narratives.md +41 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/realized.md +17 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/research.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/review.md +37 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/screenplay.md +82 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/scripts.md +45 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/settings.md +34 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/treatments.md +27 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/screenplay.md +14 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/scripts.md +12 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/treatments.md +10 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/screenplay.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/scripts.md +9 -0
- package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/development/$repair.md +0 -0
- package/scaffold/instructions/.agents/skills/development/SKILL.md +33 -0
- package/scaffold/instructions/.agents/skills/development/entities.md +43 -0
- package/scaffold/instructions/.agents/skills/development/reuse.md +47 -0
- package/scaffold/instructions/.agents/skills/development/source-layout.md +69 -0
- package/scaffold/instructions/.agents/skills/development/testing.md +27 -0
- package/scaffold/instructions/.agents/skills/evidence/SKILL.md +16 -0
- package/scaffold/instructions/.agents/skills/evidence/adoption.md +11 -0
- package/scaffold/instructions/.agents/skills/evidence/answering.md +11 -0
- package/scaffold/instructions/.agents/skills/evidence/configuration.md +23 -0
- package/scaffold/instructions/.agents/skills/image/SKILL.md +69 -0
- package/scaffold/instructions/.agents/skills/motion/$authoring.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$contacts.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$laws.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$layers.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$transitions.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$variation.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/$verification.md +0 -0
- package/scaffold/instructions/.agents/skills/motion/SKILL.md +55 -0
- package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +11 -0
- package/scaffold/instructions/.agents/skills/motion/control-channels.md +19 -0
- package/scaffold/instructions/.agents/skills/motion/frame-evaluation.md +25 -0
- package/scaffold/instructions/.agents/skills/motion/method-references.md +23 -0
- package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +31 -0
- package/scaffold/instructions/.agents/skills/motion/retargeting.md +23 -0
- package/scaffold/instructions/.agents/skills/motion/segment-review.md +17 -0
- package/scaffold/instructions/.agents/skills/motion/staging.md +29 -0
- package/scaffold/instructions/.agents/skills/production/SKILL.md +45 -0
- package/scaffold/instructions/.agents/skills/production/assembly.md +30 -0
- package/scaffold/instructions/.agents/skills/production/media-records.md +29 -0
- package/scaffold/instructions/.agents/skills/production/project-context.md +25 -0
- package/scaffold/instructions/.agents/skills/production/stage-caches.md +30 -0
- package/scaffold/instructions/.agents/skills/production/sustained-runs.md +21 -0
- package/scaffold/instructions/.agents/skills/production/sync-and-reorganization.md +21 -0
- package/scaffold/instructions/.agents/skills/review/SKILL.md +24 -0
- package/scaffold/instructions/.agents/skills/review/delivery-review.md +65 -0
- package/scaffold/instructions/.agents/skills/review/estimation.md +48 -0
- package/scaffold/instructions/.agents/skills/review/independent-reading.md +39 -0
- package/scaffold/instructions/.agents/skills/review/narrative-rounds.md +53 -0
- package/scaffold/instructions/.agents/skills/review/source-review.md +31 -0
- package/scaffold/instructions/.agents/skills/story/SKILL.md +20 -0
- package/scaffold/instructions/.agents/skills/story/correction/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/correction/inspection.md +29 -0
- package/scaffold/instructions/.agents/skills/story/correction/repair.md +35 -0
- package/scaffold/instructions/.agents/skills/story/document-layout.md +38 -0
- package/scaffold/instructions/.agents/skills/story/evidence/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/evidence/answer-placement.md +13 -0
- package/scaffold/instructions/.agents/skills/story/evidence/answer-writing.md +23 -0
- package/scaffold/instructions/.agents/skills/story/layers/SKILL.md +17 -0
- package/scaffold/instructions/.agents/skills/story/layers/brief.md +29 -0
- package/scaffold/instructions/.agents/skills/story/layers/notation.md +34 -0
- package/scaffold/instructions/.agents/skills/story/layers/screenplay.md +15 -0
- package/scaffold/instructions/.agents/skills/story/layers/scripts.md +11 -0
- package/scaffold/instructions/.agents/skills/story/layers/settings.md +39 -0
- package/scaffold/instructions/.agents/skills/story/layers/treatments.md +9 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/SKILL.md +13 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/rewriting.md +17 -0
- package/scaffold/instructions/.agents/skills/story/naturalness/transfer.md +11 -0
- package/scaffold/instructions/.agents/skills/story/planning/SKILL.md +15 -0
- package/scaffold/instructions/.agents/skills/story/planning/direction.md +14 -0
- package/scaffold/instructions/.agents/skills/story/planning/discovery.md +20 -0
- package/scaffold/instructions/.agents/skills/story/planning/requirements.md +25 -0
- package/scaffold/instructions/.agents/skills/story/planning/research.md +25 -0
- package/scaffold/instructions/.agents/skills/story/workflow.md +61 -0
- package/scaffold/instructions/.agents/skills/video/SKILL.md +29 -0
- package/scaffold/instructions/.agents/skills/video/diffusion.md +33 -0
- package/scaffold/instructions/.agents/skills/video/generation.md +27 -0
- package/scaffold/instructions/.agents/skills/video/prompts.md +51 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$capture.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$comparison.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$correction-rounds.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$passes.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/$rendering-cost.md +0 -0
- package/scaffold/instructions/.agents/skills/visual-debugging/SKILL.md +30 -0
- package/scaffold/instructions/AGENTS.md +96 -0
- package/scaffold/instructions/CLAUDE.md +1 -0
- package/scaffold/production/PROJECT.md +3 -0
- package/scaffold/production/README.md +146 -0
- package/scaffold/production/_gitignore +20 -0
- package/scaffold/production/evidence.config.ts +12 -0
- package/scaffold/production/index.html +20 -0
- package/scaffold/production/lint.config.ts +46 -0
- package/scaffold/production/package.json +54 -0
- package/scaffold/production/src/IFilm.ts +41 -0
- package/scaffold/production/src/IFilmProduction.ts +80 -0
- package/scaffold/production/src/clampProductionSeconds.ts +21 -0
- package/scaffold/production/src/composition/films/index.ts +10 -0
- package/scaffold/production/src/composition/films/starter.ts +45 -0
- package/scaffold/production/src/executable/capture.ts +489 -0
- package/scaffold/production/src/executable/physics.ts +48 -0
- package/scaffold/production/src/executable/planCaptureStills.ts +65 -0
- package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +171 -0
- package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +268 -0
- package/scaffold/production/src/executable/recovery/node/artifact/index.ts +3 -0
- package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +303 -0
- package/scaffold/production/src/executable/recovery/node/cli.ts +12 -0
- package/scaffold/production/src/executable/recovery/node/index.ts +9 -0
- package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +25 -0
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +95 -0
- package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +50 -0
- package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +181 -0
- package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +492 -0
- package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +57 -0
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +80 -0
- package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +26 -0
- package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +272 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +152 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +113 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +117 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +158 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +185 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +176 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +151 -0
- package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +237 -0
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +265 -0
- package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +252 -0
- package/scaffold/production/src/executable/recovery/node/mesh/index.ts +3 -0
- package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +239 -0
- package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +63 -0
- package/scaffold/production/src/executable/recovery/node/reconstruction/index.ts +1 -0
- package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +473 -0
- package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +148 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureError.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureErrorCode.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessWaitUntil.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureOptions.ts +79 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureSession.ts +39 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessFrameWriter.ts +20 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessLocator.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessPage.ts +1 -0
- package/scaffold/production/src/executable/render/headlessCapture/createHeadlessCaptureAdapter.ts +92 -0
- package/scaffold/production/src/executable/render/headlessCapture/index.ts +9 -0
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoOptions.ts +128 -0
- package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoResult.ts +43 -0
- package/scaffold/production/src/executable/render/node/IProductionRenditionClip.ts +44 -0
- package/scaffold/production/src/executable/render/node/acquireViewerBrowser.ts +24 -0
- package/scaffold/production/src/executable/render/node/addProductionMp4Sample.ts +89 -0
- package/scaffold/production/src/executable/render/node/appendLosslessVideoClip.ts +62 -0
- package/scaffold/production/src/executable/render/node/assembleProductionChunkVideoMp4.ts +167 -0
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionClips.ts +184 -0
- package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionVideo.ts +127 -0
- package/scaffold/production/src/executable/render/node/assertProductionRenditionClipDelivery.ts +102 -0
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieDirectoryArtifactStore.ts +59 -0
- package/scaffold/production/src/executable/render/node/cache/IAutoMovieViewerFrameCacheReport.ts +30 -0
- package/scaffold/production/src/executable/render/node/cache/cacheViewerCaptureSession.ts +187 -0
- package/scaffold/production/src/executable/render/node/cache/composeViewerFrameKeys.ts +55 -0
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieArtifactMiddleware.ts +107 -0
- package/scaffold/production/src/executable/render/node/cache/createAutoMovieDirectoryArtifactStore.ts +203 -0
- package/scaffold/production/src/executable/render/node/cache/digestAutoMovieSourceTree.ts +66 -0
- package/scaffold/production/src/executable/render/node/cache/readViewerFrameStates.ts +95 -0
- package/scaffold/production/src/executable/render/node/capture/DEFAULT_CHROME_EXECUTABLE.ts +11 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageOperationFailure.ts +13 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeArtifact.ts +30 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeOptions.ts +51 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceMetadata.ts +27 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderArtifact.ts +44 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderOptions.ts +43 -0
- package/scaffold/production/src/executable/render/node/capture/IAutoMovieSequenceDissolvePixelCheck.ts +39 -0
- package/scaffold/production/src/executable/render/node/capture/captureRenderAndSee.ts +233 -0
- package/scaffold/production/src/executable/render/node/capture/captureSequenceRenderAndSee.ts +377 -0
- package/scaffold/production/src/executable/render/node/capture/index.ts +14 -0
- package/scaffold/production/src/executable/render/node/capture/preserveCleanupFailure.ts +34 -0
- package/scaffold/production/src/executable/render/node/capture/renderAndSeeCommand.ts +169 -0
- package/scaffold/production/src/executable/render/node/capture/renderSequenceAndSeeCommand.ts +165 -0
- package/scaffold/production/src/executable/render/node/capture/verifySequenceDissolvePixels.ts +179 -0
- package/scaffold/production/src/executable/render/node/conformProductionRenditionVideoMp4.ts +86 -0
- package/scaffold/production/src/executable/render/node/conformProductionVisualDeliveryVideoMp4.ts +230 -0
- package/scaffold/production/src/executable/render/node/decodeAutoMovieDelivery.ts +253 -0
- package/scaffold/production/src/executable/render/node/equalRational.ts +36 -0
- package/scaffold/production/src/executable/render/node/exactProductionClockProduct.ts +26 -0
- package/scaffold/production/src/executable/render/node/exportModelToGLB.ts +267 -0
- package/scaffold/production/src/executable/render/node/index.ts +27 -0
- package/scaffold/production/src/executable/render/node/loadModelGltfCore.ts +18 -0
- package/scaffold/production/src/executable/render/node/mixAutoMovieAudioCues.ts +74 -0
- package/scaffold/production/src/executable/render/node/muxProductionFeatureMp4.ts +170 -0
- package/scaffold/production/src/executable/render/node/neutralTrackPresentation.ts +59 -0
- package/scaffold/production/src/executable/render/node/normalizeProductionH264Mp4.ts +110 -0
- package/scaffold/production/src/executable/render/node/openLosslessVideoTrack.ts +81 -0
- package/scaffold/production/src/executable/render/node/parseMp4.ts +46 -0
- package/scaffold/production/src/executable/render/node/parseProductionMp4Output.ts +70 -0
- package/scaffold/production/src/executable/render/node/parseProductionRenditionClip.ts +92 -0
- package/scaffold/production/src/executable/render/node/planViewerVideo.ts +140 -0
- package/scaffold/production/src/executable/render/node/probeParsedProductionVideoMp4.ts +48 -0
- package/scaffold/production/src/executable/render/node/probeProductionPngPicture.ts +223 -0
- package/scaffold/production/src/executable/render/node/probeProductionRenderedMedia.ts +355 -0
- package/scaffold/production/src/executable/render/node/probeProductionVideoMp4.ts +27 -0
- package/scaffold/production/src/executable/render/node/probeVideoTrack.ts +220 -0
- package/scaffold/production/src/executable/render/node/productionRenditionVideoPlan.ts +149 -0
- package/scaffold/production/src/executable/render/node/recordViewerPlayback.ts +137 -0
- package/scaffold/production/src/executable/render/node/renderViewerFrames.ts +139 -0
- package/scaffold/production/src/executable/render/node/renderViewerVideo.ts +301 -0
- package/scaffold/production/src/executable/render/node/renderViewerVideoSession.ts +75 -0
- package/scaffold/production/src/executable/render/node/residentMp4Box.ts +36 -0
- package/scaffold/production/src/executable/render/node/residentPngJs.ts +26 -0
- package/scaffold/production/src/executable/render/node/runViewerVideoEncoder.ts +58 -0
- package/scaffold/production/src/executable/render/node/sameSampleDescription.ts +43 -0
- package/scaffold/production/src/executable/render/node/sameSampleFlags.ts +28 -0
- package/scaffold/production/src/executable/render/node/sampleBytes.ts +46 -0
- package/scaffold/production/src/executable/render/node/sampleDescription.ts +40 -0
- package/scaffold/production/src/executable/render/node/sampleOptions.ts +37 -0
- package/scaffold/production/src/executable/render/node/serializeDescriptionBox.ts +29 -0
- package/scaffold/production/src/executable/render/node/trimProductionAudioPresentation.ts +115 -0
- package/scaffold/production/src/executable/render/node/verifySampleStorage.ts +86 -0
- package/scaffold/production/src/executable/render/node/writeViewerFrameSheet.ts +101 -0
- package/scaffold/production/src/executable/render.ts +92 -0
- package/scaffold/production/src/executable/review.ts +54 -0
- package/scaffold/production/src/executable/viewer/inspection/createViewerDiskSource.ts +119 -0
- package/scaffold/production/src/executable/viewer/inspection/readViewerMaintainedSourceFiles.ts +64 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureError.ts +41 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureErrorCode.ts +22 -0
- package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessWaitUntil.ts +18 -0
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessLocator.ts +32 -0
- package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessPage.ts +130 -0
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureOptions.ts +38 -0
- package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureSession.ts +41 -0
- package/scaffold/production/src/executable/viewer/node/capture/createViewerCaptureSession.ts +154 -0
- package/scaffold/production/src/executable/viewer/node/capture/index.ts +8 -0
- package/scaffold/production/src/executable/viewer/node/index.ts +2 -0
- package/scaffold/production/src/executable/viewer/process/ProcessOwnership.ts +102 -0
- package/scaffold/production/src/executable/viewer/process/internal/IProcessChildObservation.ts +18 -0
- package/scaffold/production/src/executable/viewer/process/internal/IProcessOwnershipHost.ts +70 -0
- package/scaffold/production/src/executable/viewer/process/internal/ProcessOwnershipController.ts +125 -0
- package/scaffold/production/src/executable/viewer/process/internal/WindowsProcessOwnershipPrograms.ts +52 -0
- package/scaffold/production/src/executable/viewer/process/internal/createNodeProcessOwnershipHost.ts +41 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodeLinuxProcessIdentity.ts +22 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodePosixProcessIdentity.ts +24 -0
- package/scaffold/production/src/executable/viewer/process/internal/decodeWindowsProcessResult.ts +24 -0
- package/scaffold/production/src/executable/viewer/process/internal/readNativeProcessIdentity.ts +45 -0
- package/scaffold/production/src/executable/viewer/process/internal/requireProcessId.ts +15 -0
- package/scaffold/production/src/executable/viewer/process/internal/resolveProcessIdentityReadError.ts +15 -0
- package/scaffold/production/src/executable/viewer/process/internal/runWindowsProcessOperation.ts +41 -0
- package/scaffold/production/src/executable/viewer/process/internal/selectProcessOwnershipTree.ts +68 -0
- package/scaffold/production/src/main.ts +197 -0
- package/scaffold/production/src/selectFilm.ts +34 -0
- package/scaffold/production/test/features/executable/test_plan_capture_stills.ts +75 -0
- package/scaffold/production/test/features/test_clamp_production_seconds.ts +39 -0
- package/scaffold/production/test/features/test_select_film.ts +59 -0
- package/scaffold/production/test/features/testing/test_test_execution.ts +57 -0
- package/scaffold/production/test/features/testing/test_test_selection.ts +78 -0
- package/scaffold/production/test/helpers/assessTestExecution.ts +22 -0
- package/scaffold/production/test/helpers/selectTestFiles.ts +79 -0
- package/scaffold/production/test/index.ts +64 -0
- package/scaffold/production/test/tsconfig.json +6 -0
- package/scaffold/production/tsconfig.json +34 -0
- package/scaffold/production/tsconfig.test.json +9 -0
- package/scaffold/production/vite.config.ts +35 -0
- package/scaffold/workspace/README.md +42 -0
- package/scaffold/workspace/_gitignore +9 -0
- package/scaffold/workspace/package.json +19 -0
- package/scaffold/workspace/pnpm-workspace.yaml +46 -0
- package/src/AUTOMOVIE_TEMPLATE_CATALOGS.ts +48 -0
- package/src/AUTOMOVIE_TEMPLATE_VERSIONS.ts +39 -0
- package/src/AutoMovieScaffoldLayer.ts +18 -0
- package/src/FILE_ATTRIBUTE_DIRECTORY.ts +2 -0
- package/src/IAutoMovieCatalogVersionProps.ts +18 -0
- package/src/IAutoMovieScaffoldProps.ts +14 -0
- package/src/IAutoMovieScaffoldSourceEntry.ts +19 -0
- package/src/IAutoMovieTemplateDependencyVersionsProps.ts +19 -0
- package/src/IAutoMovieWorkspacePackageVersions.ts +44 -0
- package/src/IBoundChild.ts +86 -0
- package/src/IBoundChildStatus.ts +24 -0
- package/src/IBoundParent.ts +65 -0
- package/src/IBoundParentStatus.ts +15 -0
- package/src/ICreateResult.ts +35 -0
- package/src/IScaffoldCompletedFilePublicationOutcome.ts +17 -0
- package/src/IScaffoldCompletedPublication.ts +17 -0
- package/src/IScaffoldFileSnapshot.ts +28 -0
- package/src/IScaffoldParentPublicationRequest.ts +29 -0
- package/src/IScaffoldPartialFilePublicationOutcome.ts +25 -0
- package/src/IScaffoldPhysicalDirectory.ts +22 -0
- package/src/IScaffoldPosixConstants.ts +30 -0
- package/src/IScaffoldPublicationEntry.ts +22 -0
- package/src/IScaffoldPublicationFailure.ts +18 -0
- package/src/IScaffoldPublicationOptions.ts +19 -0
- package/src/IScaffoldPublicationReceipt.ts +29 -0
- package/src/IScaffoldRefusedFilePublicationOutcome.ts +20 -0
- package/src/IScaffoldSyncPlan.ts +26 -0
- package/src/IScaffoldSyncProps.ts +16 -0
- package/src/IWindowsFileInformation.ts +24 -0
- package/src/IWindowsLibrary.ts +148 -0
- package/src/SCAFFOLD_SYNC_STATE_FILE.ts +5 -0
- package/src/ScaffoldFilePublicationOutcome.ts +18 -0
- package/src/ScaffoldParentChangedError.ts +14 -0
- package/src/ScaffoldPublicationError.ts +58 -0
- package/src/assertOrdinaryFile.ts +20 -0
- package/src/assertOrdinarySingleLinkFile.ts +26 -0
- package/src/assertScaffoldOwnership.ts +29 -0
- package/src/assertScaffoldPhysicalDirectory.ts +29 -0
- package/src/assertScaffoldProjectName.ts +34 -0
- package/src/attachScaffoldSyncState.ts +30 -0
- package/src/captureEmptyScaffoldPhysicalDirectory.ts +45 -0
- package/src/captureScaffoldFile.ts +34 -0
- package/src/captureScaffoldPhysicalDirectory.ts +34 -0
- package/src/combineScaffoldFailures.ts +35 -0
- package/src/createAutoMovieCatalogVersionResolver.ts +117 -0
- package/src/createScaffoldSyncState.ts +33 -0
- package/src/createScaffoldVariables.ts +50 -0
- package/src/ensureScaffoldBaseDirectory.ts +55 -0
- package/src/ensureScaffoldFileDirectory.ts +75 -0
- package/src/index.ts +48 -0
- package/src/inside.ts +25 -0
- package/src/isScaffoldInstruction.ts +29 -0
- package/src/listAutoMovieScaffoldFiles.ts +56 -0
- package/src/loadWindowsLibrary.ts +277 -0
- package/src/mergeScaffoldFiles.ts +39 -0
- package/src/missingPath.ts +16 -0
- package/src/nativeError.ts +15 -0
- package/src/openPosixParent.ts +155 -0
- package/src/openWindowsParent.ts +305 -0
- package/src/overwriteScaffoldFile.ts +262 -0
- package/src/physicalDirectoryIdentity.ts +33 -0
- package/src/physicalVersion.ts +18 -0
- package/src/planScaffoldPublication.ts +100 -0
- package/src/planScaffoldSync.ts +122 -0
- package/src/publishFiles.ts +120 -0
- package/src/publishNativeScaffoldFile.ts +287 -0
- package/src/publishScaffoldCandidate.ts +94 -0
- package/src/readAutoMovieScaffoldSources.ts +82 -0
- package/src/readScaffoldSyncFile.ts +66 -0
- package/src/renderScaffold.ts +43 -0
- package/src/renderScaffoldEntries.ts +110 -0
- package/src/renderScaffoldInstructions.ts +22 -0
- package/src/renderScaffoldLayer.ts +38 -0
- package/src/renderTemplate.ts +62 -0
- package/src/renderWorkspaceProductionScaffold.ts +35 -0
- package/src/renderWorkspaceScaffold.ts +43 -0
- package/src/replaceSharedScaffoldFile.ts +88 -0
- package/src/resolveAutoMovieCatalogVersion.ts +27 -0
- package/src/resolveAutoMovieTemplateDependencyVersions.ts +70 -0
- package/src/resolveScaffoldPosixConstants.ts +50 -0
- package/src/scaffoldAssetDirectory.ts +30 -0
- package/src/scaffoldPhysicalIdentity.ts +21 -0
- package/src/scaffoldSharedSkillDirectory.ts +25 -0
- package/src/scaffoldSharedSkillPath.ts +31 -0
- package/src/syncScaffold.ts +38 -0
- package/src/writeFiles.ts +48 -0
- package/src/writeScaffoldFile.ts +88 -0
- package/src/writtenVersion.ts +19 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.attachScaffoldSyncState = void 0;
|
|
4
|
+
const SCAFFOLD_SYNC_STATE_FILE_1 = require("./SCAFFOLD_SYNC_STATE_FILE");
|
|
5
|
+
const createScaffoldSyncState_1 = require("./createScaffoldSyncState");
|
|
6
|
+
/**
|
|
7
|
+
* Add the generated sync-state record, the digests of `files`' instruction files, at {@link SCAFFOLD_SYNC_STATE_FILE}.
|
|
8
|
+
*
|
|
9
|
+
* Every installation that holds `AGENTS.md` records the instruction bytes it adopted, so a later explicit sync can tell local edits from bundle updates.
|
|
10
|
+
*
|
|
11
|
+
* @param files A rendered installation; it is changed in place.
|
|
12
|
+
* @returns The same map.
|
|
13
|
+
* @throws When `files` already supplies the reserved state path.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation The state is computed from the exact rendered instruction bytes it accompanies, after every layer is joined.
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure A single production and a workspace root attach their state through this one owner.
|
|
17
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A scaffold file at the reserved address is refused instead of being overwritten.
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states what is recorded, why, the in-place change and the refusal.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One digest per instruction file, as createScaffoldSyncState computes.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each installation is rendered and recorded once.
|
|
21
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The map gains one string and stays owned by the caller.
|
|
22
|
+
*/
|
|
23
|
+
const attachScaffoldSyncState = (files) => {
|
|
24
|
+
if (SCAFFOLD_SYNC_STATE_FILE_1.SCAFFOLD_SYNC_STATE_FILE in files)
|
|
25
|
+
throw new Error("The scaffold reserves its generated sync-state address.");
|
|
26
|
+
files[SCAFFOLD_SYNC_STATE_FILE_1.SCAFFOLD_SYNC_STATE_FILE] = (0, createScaffoldSyncState_1.createScaffoldSyncState)(files);
|
|
27
|
+
return files;
|
|
28
|
+
};
|
|
29
|
+
exports.attachScaffoldSyncState = attachScaffoldSyncState;
|
|
30
|
+
//# sourceMappingURL=attachScaffoldSyncState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attachScaffoldSyncState.js","sourceRoot":"","sources":["../src/attachScaffoldSyncState.ts"],"names":[],"mappings":";;;AAAA,yEAAsE;AACtE,uEAAoE;AAEpE;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,uBAAuB,GAEN,CAC5B,KAA6B,EACL,EAAE;IAC1B,IAAI,mDAAwB,IAAI,KAAK;QACnC,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,KAAK,CAAC,mDAAwB,CAAC,GAAG,IAAA,iDAAuB,EAAC,KAAK,CAAC,CAAC;IACjE,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AATW,QAAA,uBAAuB,GAAvB,uBAAuB,CASlC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
|
|
2
|
+
/**
|
|
3
|
+
* Capture a directory this module just created and require it to be empty.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/development/implementation.md#principled-implementation A newly created ordinary directory is captured, checked empty and revalidated across the inspection by identity and full generation.
|
|
6
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure New-directory qualification is separate from capturing pre-existing ordinary directories.
|
|
7
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unexpected content or a concurrent generation change refuses instead of adopting a competitor's directory.
|
|
8
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states that this owner created the directory and requires it still be empty.
|
|
9
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Metadata work is fixed and readdir scans the current entries; an unexpectedly populated new directory therefore costs its full entry count.
|
|
10
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The inspection cannot reuse an earlier empty answer because another process can change the directory between calls.
|
|
11
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Each identity helper attempts its own descriptor close before returning; a failed close aborts qualification without proving release. The entry array is call-local and only the completed capture transfers to the caller.
|
|
12
|
+
*/
|
|
13
|
+
export declare const captureEmptyScaffoldPhysicalDirectory: (directory: string) => IScaffoldPhysicalDirectory;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.captureEmptyScaffoldPhysicalDirectory = void 0;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const assertScaffoldPhysicalDirectory_1 = require("./assertScaffoldPhysicalDirectory");
|
|
39
|
+
const captureScaffoldPhysicalDirectory_1 = require("./captureScaffoldPhysicalDirectory");
|
|
40
|
+
const physicalDirectoryIdentity_1 = require("./physicalDirectoryIdentity");
|
|
41
|
+
const physicalVersion_1 = require("./physicalVersion");
|
|
42
|
+
/**
|
|
43
|
+
* Capture a directory this module just created and require it to be empty.
|
|
44
|
+
*
|
|
45
|
+
* @evidence contracts/development/implementation.md#principled-implementation A newly created ordinary directory is captured, checked empty and revalidated across the inspection by identity and full generation.
|
|
46
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure New-directory qualification is separate from capturing pre-existing ordinary directories.
|
|
47
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unexpected content or a concurrent generation change refuses instead of adopting a competitor's directory.
|
|
48
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states that this owner created the directory and requires it still be empty.
|
|
49
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Metadata work is fixed and readdir scans the current entries; an unexpectedly populated new directory therefore costs its full entry count.
|
|
50
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The inspection cannot reuse an earlier empty answer because another process can change the directory between calls.
|
|
51
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Each identity helper attempts its own descriptor close before returning; a failed close aborts qualification without proving release. The entry array is call-local and only the completed capture transfers to the caller.
|
|
52
|
+
*/
|
|
53
|
+
const captureEmptyScaffoldPhysicalDirectory = (directory) => {
|
|
54
|
+
const ownership = (0, captureScaffoldPhysicalDirectory_1.captureScaffoldPhysicalDirectory)(directory);
|
|
55
|
+
const before = fs.lstatSync(ownership.path, { bigint: true });
|
|
56
|
+
if ((0, physicalDirectoryIdentity_1.physicalDirectoryIdentity)(ownership.path, before) !== ownership.identity)
|
|
57
|
+
throw new Error(`scaffold directory changed generation: ${ownership.path}`);
|
|
58
|
+
const entries = fs.readdirSync(ownership.path);
|
|
59
|
+
const after = fs.lstatSync(ownership.path, { bigint: true });
|
|
60
|
+
if ((0, physicalDirectoryIdentity_1.physicalDirectoryIdentity)(ownership.path, after) !== ownership.identity ||
|
|
61
|
+
(0, physicalVersion_1.physicalVersion)(after) !== (0, physicalVersion_1.physicalVersion)(before))
|
|
62
|
+
throw new Error(`scaffold directory changed while inspected: ${ownership.path}`);
|
|
63
|
+
(0, assertScaffoldPhysicalDirectory_1.assertScaffoldPhysicalDirectory)(ownership);
|
|
64
|
+
if (entries.length !== 0)
|
|
65
|
+
throw new Error(`new scaffold directory is unexpectedly non-empty: ${ownership.path}`);
|
|
66
|
+
return ownership;
|
|
67
|
+
};
|
|
68
|
+
exports.captureEmptyScaffoldPhysicalDirectory = captureEmptyScaffoldPhysicalDirectory;
|
|
69
|
+
//# sourceMappingURL=captureEmptyScaffoldPhysicalDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureEmptyScaffoldPhysicalDirectory.js","sourceRoot":"","sources":["../src/captureEmptyScaffoldPhysicalDirectory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,oCAAgB;AAG9B,uFAAoF;AACpF,yFAAsF;AACtF,2EAAwE;AACxE,uDAAoD;AAEpD;;;;;;;;;;GAUG;AACI,MAAM,qCAAqC,GAEhB,CAChC,SAAiB,EACW,EAAE;IAC9B,MAAM,SAAS,GACb,IAAA,mEAAgC,EAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,MAAM,GAAmB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9E,IAAI,IAAA,qDAAyB,EAAC,SAAS,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,SAAS,CAAC,QAAQ;QAC1E,MAAM,IAAI,KAAK,CAAC,0CAA0C,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IAC9E,MAAM,OAAO,GAAa,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACzD,MAAM,KAAK,GAAmB,EAAE,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC7E,IACE,IAAA,qDAAyB,EAAC,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,KAAK,SAAS,CAAC,QAAQ;QACvE,IAAA,iCAAe,EAAC,KAAK,CAAC,KAAK,IAAA,iCAAe,EAAC,MAAM,CAAC;QAElD,MAAM,IAAI,KAAK,CACb,+CAA+C,SAAS,CAAC,IAAI,EAAE,CAChE,CAAC;IACJ,IAAA,iEAA+B,EAAC,SAAS,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,qDAAqD,SAAS,CAAC,IAAI,EAAE,CACtE,CAAC;IACJ,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAzBW,QAAA,qCAAqC,GAArC,qCAAqC,CAyBhD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IScaffoldFileSnapshot } from "./IScaffoldFileSnapshot";
|
|
2
|
+
/**
|
|
3
|
+
* Capture one existing ordinary file through its pathname, recording whether another directory entry also names it.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/development/implementation.md#principled-implementation A fresh lstat admits an ordinary pathname and captures its physical identity, written and full versions, and whether its link count exceeds one.
|
|
6
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One snapshot producer supplies reading, replacement admission and before-and-after resident verification; the writer chooses its method from `shared`.
|
|
7
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Symbolic links and non-regular entries fail before a snapshot exists; a shared file is admitted but marked, so no writer rewrites it in place.
|
|
8
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states ordinary-file admission and the shared mark; the snapshot members document exact version semantics.
|
|
9
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One lstat and a fixed number of bigint-to-string encodings dominate, independent of file contents.
|
|
10
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each snapshot is a new pathname observation, so a previous snapshot is not reused as current ownership.
|
|
11
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only scalar snapshot fields escape; lstat opens no retained descriptor in this owner.
|
|
12
|
+
*/
|
|
13
|
+
export declare const captureScaffoldFile: (file: string) => IScaffoldFileSnapshot;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.captureScaffoldFile = void 0;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const assertOrdinaryFile_1 = require("./assertOrdinaryFile");
|
|
40
|
+
const physicalVersion_1 = require("./physicalVersion");
|
|
41
|
+
const scaffoldPhysicalIdentity_1 = require("./scaffoldPhysicalIdentity");
|
|
42
|
+
const writtenVersion_1 = require("./writtenVersion");
|
|
43
|
+
/**
|
|
44
|
+
* Capture one existing ordinary file through its pathname, recording whether another directory entry also names it.
|
|
45
|
+
*
|
|
46
|
+
* @evidence contracts/development/implementation.md#principled-implementation A fresh lstat admits an ordinary pathname and captures its physical identity, written and full versions, and whether its link count exceeds one.
|
|
47
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One snapshot producer supplies reading, replacement admission and before-and-after resident verification; the writer chooses its method from `shared`.
|
|
48
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Symbolic links and non-regular entries fail before a snapshot exists; a shared file is admitted but marked, so no writer rewrites it in place.
|
|
49
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states ordinary-file admission and the shared mark; the snapshot members document exact version semantics.
|
|
50
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One lstat and a fixed number of bigint-to-string encodings dominate, independent of file contents.
|
|
51
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each snapshot is a new pathname observation, so a previous snapshot is not reused as current ownership.
|
|
52
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only scalar snapshot fields escape; lstat opens no retained descriptor in this owner.
|
|
53
|
+
*/
|
|
54
|
+
const captureScaffoldFile = (file) => {
|
|
55
|
+
const absolute = path.resolve(file);
|
|
56
|
+
const status = fs.lstatSync(absolute, { bigint: true });
|
|
57
|
+
(0, assertOrdinaryFile_1.assertOrdinaryFile)(status, absolute);
|
|
58
|
+
return {
|
|
59
|
+
identity: (0, scaffoldPhysicalIdentity_1.scaffoldPhysicalIdentity)(status),
|
|
60
|
+
path: absolute,
|
|
61
|
+
shared: status.nlink > 1n,
|
|
62
|
+
version: (0, physicalVersion_1.physicalVersion)(status),
|
|
63
|
+
written: (0, writtenVersion_1.writtenVersion)(status),
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
exports.captureScaffoldFile = captureScaffoldFile;
|
|
67
|
+
//# sourceMappingURL=captureScaffoldFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureScaffoldFile.js","sourceRoot":"","sources":["../src/captureScaffoldFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAGlC,6DAA0D;AAC1D,uDAAoD;AACpD,yEAAsE;AACtE,qDAAkD;AAElD;;;;;;;;;;GAUG;AACI,MAAM,mBAAmB,GAA4C,CAC1E,IAAY,EACW,EAAE;IACzB,MAAM,QAAQ,GAAW,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAmB,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACxE,IAAA,uCAAkB,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IACrC,OAAO;QACL,QAAQ,EAAE,IAAA,mDAAwB,EAAC,MAAM,CAAC;QAC1C,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,MAAM,CAAC,KAAK,GAAG,EAAE;QACzB,OAAO,EAAE,IAAA,iCAAe,EAAC,MAAM,CAAC;QAChC,OAAO,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC;KAChC,CAAC;AACJ,CAAC,CAAC;AAbW,QAAA,mBAAmB,GAAnB,mBAAmB,CAa9B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
|
|
2
|
+
/**
|
|
3
|
+
* Capture one ordinary directory, refusing a symbolic link or junction.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/development/implementation.md#principled-implementation A non-symlink directory lstat is paired with descriptor identity and native real path for later generation checks.
|
|
6
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure All directory admission and revalidation reuse one capture definition.
|
|
7
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A linked final component or non-directory is refused rather than being resolved and trusted.
|
|
8
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states ordinary-directory capture and the result documents lexical, physical and real-path identities.
|
|
9
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One lstat, one descriptor fstat and one native realpath are fixed metadata operations plus pathname processing.
|
|
10
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work A fresh capture is needed for each revalidation; prior filesystem observations cannot prove current identity.
|
|
11
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources physicalDirectoryIdentity attempts descriptor close in finally and must finish that close before this capture returns its three strings; failure propagates without proving native release, and no handle enters the returned record.
|
|
12
|
+
*/
|
|
13
|
+
export declare const captureScaffoldPhysicalDirectory: (directory: string) => IScaffoldPhysicalDirectory;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.captureScaffoldPhysicalDirectory = void 0;
|
|
37
|
+
const fs = __importStar(require("node:fs"));
|
|
38
|
+
const path = __importStar(require("node:path"));
|
|
39
|
+
const physicalDirectoryIdentity_1 = require("./physicalDirectoryIdentity");
|
|
40
|
+
/**
|
|
41
|
+
* Capture one ordinary directory, refusing a symbolic link or junction.
|
|
42
|
+
*
|
|
43
|
+
* @evidence contracts/development/implementation.md#principled-implementation A non-symlink directory lstat is paired with descriptor identity and native real path for later generation checks.
|
|
44
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure All directory admission and revalidation reuse one capture definition.
|
|
45
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A linked final component or non-directory is refused rather than being resolved and trusted.
|
|
46
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states ordinary-directory capture and the result documents lexical, physical and real-path identities.
|
|
47
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One lstat, one descriptor fstat and one native realpath are fixed metadata operations plus pathname processing.
|
|
48
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work A fresh capture is needed for each revalidation; prior filesystem observations cannot prove current identity.
|
|
49
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources physicalDirectoryIdentity attempts descriptor close in finally and must finish that close before this capture returns its three strings; failure propagates without proving native release, and no handle enters the returned record.
|
|
50
|
+
*/
|
|
51
|
+
const captureScaffoldPhysicalDirectory = (directory) => {
|
|
52
|
+
const absolute = path.resolve(directory);
|
|
53
|
+
const status = fs.lstatSync(absolute, { bigint: true });
|
|
54
|
+
if (status.isSymbolicLink() || status.isDirectory() === false)
|
|
55
|
+
throw new Error(`scaffold directory is not one ordinary directory: ${absolute}`);
|
|
56
|
+
return {
|
|
57
|
+
identity: (0, physicalDirectoryIdentity_1.physicalDirectoryIdentity)(absolute, status),
|
|
58
|
+
path: absolute,
|
|
59
|
+
real: path.resolve(fs.realpathSync.native(absolute)),
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
exports.captureScaffoldPhysicalDirectory = captureScaffoldPhysicalDirectory;
|
|
63
|
+
//# sourceMappingURL=captureScaffoldPhysicalDirectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"captureScaffoldPhysicalDirectory.js","sourceRoot":"","sources":["../src/captureScaffoldPhysicalDirectory.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,MAAY,EAAE,oCAAgB;AAC9B,MAAY,IAAI,sCAAkB;AAGlC,2EAAwE;AAExE;;;;;;;;;;GAUG;AACI,MAAM,gCAAgC,GAEX,CAChC,SAAiB,EACW,EAAE;IAC9B,MAAM,QAAQ,GAAW,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,MAAM,GAAmB,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IACxE,IAAI,MAAM,CAAC,cAAc,EAAE,IAAI,MAAM,CAAC,WAAW,EAAE,KAAK,KAAK;QAC3D,MAAM,IAAI,KAAK,CACb,qDAAqD,QAAQ,EAAE,CAChE,CAAC;IACJ,OAAO;QACL,QAAQ,EAAE,IAAA,qDAAyB,EAAC,QAAQ,EAAE,MAAM,CAAC;QACrD,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACrD,CAAC;AACJ,CAAC,CAAC;AAhBW,QAAA,gCAAgC,GAAhC,gCAAgC,CAgB3C"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Combine an operation's earlier failure with the failure of a cleanup step that ran because of it, so a close error never hides the error that caused the close.
|
|
3
|
+
*
|
|
4
|
+
* `first` is `undefined` when the operation had not failed; `second` is then returned unchanged. Otherwise the result is one `AggregateError` listing `first` before `second`, and a `first` that this function built is spread into the new list, so repeated cleanups yield one flat list in failure order. Any other `AggregateError` stays a single member, keeping its own message.
|
|
5
|
+
*
|
|
6
|
+
* @param first Failure observed before the cleanup, or `undefined` for none.
|
|
7
|
+
* @param second Failure of the cleanup step.
|
|
8
|
+
* @param resource Name of the released resource, used in the message.
|
|
9
|
+
* @returns `second` alone, or the combined failure.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation `AggregateError` is the standard container for several errors, and a private subclass marks the lists built here so only those are flattened; the premise is that no caller throws `undefined` as a real failure, which holds because every caller stores caught errors from Node or from this package, and both throw `Error` objects.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure publishNativeScaffoldFile and overwriteScaffoldFile share cleanup-error ordering and flattening here; the private aggregate subtype keeps the combination marker out of the public API.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Nothing is swallowed or retried: both failures reach the caller, and the function only decides their container.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states what `undefined` means for `first`, the order of members, which aggregates are flattened, and what `resource` names.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Building the list copies the members of an earlier combination once, linear in the failures of one operation, which is at most a few close steps.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call wraps two distinct failures of one operation; there is no result another call could share.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned aggregate holds references to the combined failures only for as long as the caller keeps it; the function owns no handle or other state.
|
|
18
|
+
*/
|
|
19
|
+
export declare const combineScaffoldFailures: (first: unknown, second: unknown, resource: string) => unknown;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.combineScaffoldFailures = void 0;
|
|
4
|
+
/** The failures of one scaffold operation, in the order they happened. */
|
|
5
|
+
class ScaffoldCleanupError extends AggregateError {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Combine an operation's earlier failure with the failure of a cleanup step that ran because of it, so a close error never hides the error that caused the close.
|
|
9
|
+
*
|
|
10
|
+
* `first` is `undefined` when the operation had not failed; `second` is then returned unchanged. Otherwise the result is one `AggregateError` listing `first` before `second`, and a `first` that this function built is spread into the new list, so repeated cleanups yield one flat list in failure order. Any other `AggregateError` stays a single member, keeping its own message.
|
|
11
|
+
*
|
|
12
|
+
* @param first Failure observed before the cleanup, or `undefined` for none.
|
|
13
|
+
* @param second Failure of the cleanup step.
|
|
14
|
+
* @param resource Name of the released resource, used in the message.
|
|
15
|
+
* @returns `second` alone, or the combined failure.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/development/implementation.md#principled-implementation `AggregateError` is the standard container for several errors, and a private subclass marks the lists built here so only those are flattened; the premise is that no caller throws `undefined` as a real failure, which holds because every caller stores caught errors from Node or from this package, and both throw `Error` objects.
|
|
18
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure publishNativeScaffoldFile and overwriteScaffoldFile share cleanup-error ordering and flattening here; the private aggregate subtype keeps the combination marker out of the public API.
|
|
19
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Nothing is swallowed or retried: both failures reach the caller, and the function only decides their container.
|
|
20
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states what `undefined` means for `first`, the order of members, which aggregates are flattened, and what `resource` names.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Building the list copies the members of an earlier combination once, linear in the failures of one operation, which is at most a few close steps.
|
|
22
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call wraps two distinct failures of one operation; there is no result another call could share.
|
|
23
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned aggregate holds references to the combined failures only for as long as the caller keeps it; the function owns no handle or other state.
|
|
24
|
+
*/
|
|
25
|
+
const combineScaffoldFailures = (first, second, resource) => first === undefined
|
|
26
|
+
? second
|
|
27
|
+
: new ScaffoldCleanupError([
|
|
28
|
+
...(first instanceof ScaffoldCleanupError ? first.errors : [first]),
|
|
29
|
+
second,
|
|
30
|
+
], `${resource} failed after an earlier scaffold failure`);
|
|
31
|
+
exports.combineScaffoldFailures = combineScaffoldFailures;
|
|
32
|
+
//# sourceMappingURL=combineScaffoldFailures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"combineScaffoldFailures.js","sourceRoot":"","sources":["../src/combineScaffoldFailures.ts"],"names":[],"mappings":";;;AAAA,0EAA0E;AAC1E,MAAM,oBAAqB,SAAQ,cAAc;CAAG;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AACI,MAAM,uBAAuB,GAIrB,CAAC,KAAc,EAAE,MAAe,EAAE,QAAgB,EAAW,EAAE,CAC5E,KAAK,KAAK,SAAS;IACjB,CAAC,CAAC,MAAM;IACR,CAAC,CAAC,IAAI,oBAAoB,CACtB;QACE,GAAG,CAAC,KAAK,YAAY,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACnE,MAAM;KACP,EACD,GAAG,QAAQ,2CAA2C,CACvD,CAAC;AAbK,QAAA,uBAAuB,GAAvB,uBAAuB,CAa5B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parse a pnpm workspace manifest once and return a lookup of its catalog entries.
|
|
3
|
+
*
|
|
4
|
+
* The lookup returns the string at `catalogs.<catalog>.<dependency>`, reading only direct children of each mapping: the same key at the top level, in a sibling catalog, or deeper inside the requested catalog never answers. An alias resolves to its anchored node. Parsing is strict and refuses duplicate keys, and a YAML error or warning, a missing key, an owner that is not a mapping, or a value that is not a non-blank string throws from the lookup with a message naming the requested catalog and dependency. A parse error is therefore raised by every lookup, not by this call.
|
|
5
|
+
*
|
|
6
|
+
* @param workspace Complete `pnpm-workspace.yaml` text.
|
|
7
|
+
* @returns Lookup from catalog and dependency name to the specifier as written.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/implementation.md#principled-implementation The `yaml` package's document model gives each key its owning mapping, so ownership is decided structurally instead of by matching lines; strict parsing with `uniqueKeys` makes a duplicated key an error rather than a silent last-wins, and alias resolution follows the YAML anchor rules, refusing a forward or missing anchor.
|
|
10
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function separates the once-per-manifest parse from the per-entry lookup, which is the split `resolveAutoMovieTemplateDependencyVersions` needs for its many lookups and `resolveAutoMovieCatalogVersion` reuses for one.
|
|
11
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A parse diagnostic is held and rethrown by each lookup with that lookup's context, never ignored, and no catalog or dependency name is special-cased.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the lookup path, the direct-ownership rule, alias handling, every refusal, and that a parse error surfaces at lookup time.
|
|
13
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The manifest is parsed once, linear in its size; each lookup scans the direct keys of the root, `catalogs`, and one catalog, linear in those mappings' sizes, which are tens of keys.
|
|
14
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Every lookup made through one returned function shares the single parsed document, which is equivalent because the manifest text is immutable and the document is never modified; a different manifest needs a new call.
|
|
15
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned function retains the parsed document and its first diagnostic for as long as the caller holds the function, one document per call, and owns no handle.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createAutoMovieCatalogVersionResolver: (workspace: string) => (catalog: string, dependency: string) => string;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAutoMovieCatalogVersionResolver = void 0;
|
|
4
|
+
const yaml_1 = require("yaml");
|
|
5
|
+
/**
|
|
6
|
+
* Parse a pnpm workspace manifest once and return a lookup of its catalog entries.
|
|
7
|
+
*
|
|
8
|
+
* The lookup returns the string at `catalogs.<catalog>.<dependency>`, reading only direct children of each mapping: the same key at the top level, in a sibling catalog, or deeper inside the requested catalog never answers. An alias resolves to its anchored node. Parsing is strict and refuses duplicate keys, and a YAML error or warning, a missing key, an owner that is not a mapping, or a value that is not a non-blank string throws from the lookup with a message naming the requested catalog and dependency. A parse error is therefore raised by every lookup, not by this call.
|
|
9
|
+
*
|
|
10
|
+
* @param workspace Complete `pnpm-workspace.yaml` text.
|
|
11
|
+
* @returns Lookup from catalog and dependency name to the specifier as written.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/development/implementation.md#principled-implementation The `yaml` package's document model gives each key its owning mapping, so ownership is decided structurally instead of by matching lines; strict parsing with `uniqueKeys` makes a duplicated key an error rather than a silent last-wins, and alias resolution follows the YAML anchor rules, refusing a forward or missing anchor.
|
|
14
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The function separates the once-per-manifest parse from the per-entry lookup, which is the split `resolveAutoMovieTemplateDependencyVersions` needs for its many lookups and `resolveAutoMovieCatalogVersion` reuses for one.
|
|
15
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A parse diagnostic is held and rethrown by each lookup with that lookup's context, never ignored, and no catalog or dependency name is special-cased.
|
|
16
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the lookup path, the direct-ownership rule, alias handling, every refusal, and that a parse error surfaces at lookup time.
|
|
17
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The manifest is parsed once, linear in its size; each lookup scans the direct keys of the root, `catalogs`, and one catalog, linear in those mappings' sizes, which are tens of keys.
|
|
18
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Every lookup made through one returned function shares the single parsed document, which is equivalent because the manifest text is immutable and the document is never modified; a different manifest needs a new call.
|
|
19
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned function retains the parsed document and its first diagnostic for as long as the caller holds the function, one document per call, and owns no handle.
|
|
20
|
+
*/
|
|
21
|
+
const createAutoMovieCatalogVersionResolver = (workspace) => {
|
|
22
|
+
const document = (0, yaml_1.parseDocument)(workspace, {
|
|
23
|
+
prettyErrors: false,
|
|
24
|
+
strict: true,
|
|
25
|
+
uniqueKeys: true,
|
|
26
|
+
});
|
|
27
|
+
const diagnostic = document.errors[0] ?? document.warnings[0];
|
|
28
|
+
return (catalog, dependency) => {
|
|
29
|
+
const context = `catalog "${catalog}" dependency "${dependency}"`;
|
|
30
|
+
if (diagnostic !== undefined)
|
|
31
|
+
throw new Error(`${context} has invalid YAML: ${diagnostic.message}`);
|
|
32
|
+
const root = requireMapping(document.contents, context, "document");
|
|
33
|
+
const catalogs = requireMapping(requireDirect(root, "catalogs", context, "top-level mapping"), context, "catalogs");
|
|
34
|
+
const owner = requireMapping(requireDirect(catalogs, catalog, context, "catalogs"), context, `catalog "${catalog}"`);
|
|
35
|
+
const resolved = resolveNode(requireDirect(owner, dependency, context, `catalog "${catalog}"`), document, context);
|
|
36
|
+
if ((0, yaml_1.isScalar)(resolved) === false || typeof resolved.value !== "string")
|
|
37
|
+
throw new Error(`${context} must be a string scalar`);
|
|
38
|
+
if (resolved.value.trim().length === 0)
|
|
39
|
+
throw new Error(`${context} must be a non-empty string scalar`);
|
|
40
|
+
return resolved.value;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
exports.createAutoMovieCatalogVersionResolver = createAutoMovieCatalogVersionResolver;
|
|
44
|
+
const requireMapping = (node, context, owner) => {
|
|
45
|
+
if ((0, yaml_1.isMap)(node) === false)
|
|
46
|
+
throw new Error(`${context} requires ${owner} to be a mapping`);
|
|
47
|
+
return node;
|
|
48
|
+
};
|
|
49
|
+
/** The value under `key` among the direct scalar keys of `mapping`. */
|
|
50
|
+
const requireDirect = (mapping, key, context, owner) => {
|
|
51
|
+
const pair = mapping.items.find((item) => (0, yaml_1.isScalar)(item.key) && item.key.value === key);
|
|
52
|
+
if (pair === undefined)
|
|
53
|
+
throw new Error(`${context} is missing "${key}" under ${owner}`);
|
|
54
|
+
return pair.value ?? null;
|
|
55
|
+
};
|
|
56
|
+
const resolveNode = (node, document, context) => {
|
|
57
|
+
if ((0, yaml_1.isAlias)(node) === false)
|
|
58
|
+
return node;
|
|
59
|
+
const resolved = node.resolve(document);
|
|
60
|
+
if (resolved === undefined)
|
|
61
|
+
throw new Error(`${context} contains an unresolved YAML alias`);
|
|
62
|
+
return resolved;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=createAutoMovieCatalogVersionResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAutoMovieCatalogVersionResolver.js","sourceRoot":"","sources":["../src/createAutoMovieCatalogVersionResolver.ts"],"names":[],"mappings":";;;AAAA,+BASc;AAEd;;;;;;;;;;;;;;;GAeG;AACI,MAAM,qCAAqC,GAEK,CACrD,SAAiB,EACkC,EAAE;IACrD,MAAM,QAAQ,GAAa,IAAA,oBAAa,EAAC,SAAS,EAAE;QAClD,YAAY,EAAE,KAAK;QACnB,MAAM,EAAE,IAAI;QACZ,UAAU,EAAE,IAAI;KACjB,CAAC,CAAC;IACH,MAAM,UAAU,GACd,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,OAAe,EAAE,UAAkB,EAAU,EAAE;QACrD,MAAM,OAAO,GAAW,YAAY,OAAO,iBAAiB,UAAU,GAAG,CAAC;QAC1E,IAAI,UAAU,KAAK,SAAS;YAC1B,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,sBAAsB,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;QACxE,MAAM,IAAI,GAAY,cAAc,CAClC,QAAQ,CAAC,QAAQ,EACjB,OAAO,EACP,UAAU,CACX,CAAC;QACF,MAAM,QAAQ,GAAY,cAAc,CACtC,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,mBAAmB,CAAC,EAC7D,OAAO,EACP,UAAU,CACX,CAAC;QACF,MAAM,KAAK,GAAY,cAAc,CACnC,aAAa,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EACrD,OAAO,EACP,YAAY,OAAO,GAAG,CACvB,CAAC;QACF,MAAM,QAAQ,GAAgB,WAAW,CACvC,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,OAAO,GAAG,CAAC,EACjE,QAAQ,EACR,OAAO,CACR,CAAC;QACF,IAAI,IAAA,eAAQ,EAAC,QAAQ,CAAC,KAAK,KAAK,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ;YACpE,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,0BAA0B,CAAC,CAAC;QACxD,IAAI,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YACpC,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,oCAAoC,CAAC,CAAC;QAClE,OAAO,QAAQ,CAAC,KAAK,CAAC;IACxB,CAAC,CAAC;AACJ,CAAC,CAAC;AA1CW,QAAA,qCAAqC,GAArC,qCAAqC,CA0ChD;AAEF,MAAM,cAAc,GAIL,CAAC,IAAiB,EAAE,OAAe,EAAE,KAAa,EAAW,EAAE;IAC5E,IAAI,IAAA,YAAK,EAAC,IAAI,CAAC,KAAK,KAAK;QACvB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,aAAa,KAAK,kBAAkB,CAAC,CAAC;IAClE,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,uEAAuE;AACvE,MAAM,aAAa,GAKA,CACjB,OAAgB,EAChB,GAAW,EACX,OAAe,EACf,KAAa,EACA,EAAE;IACf,MAAM,IAAI,GAAyC,OAAO,CAAC,KAAK,CAAC,IAAI,CACnE,CAAC,IAA8B,EAAW,EAAE,CAC1C,IAAA,eAAQ,EAAC,IAAI,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,GAAG,CAC/C,CAAC;IACF,IAAI,IAAI,KAAK,SAAS;QACpB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,gBAAgB,GAAG,WAAW,KAAK,EAAE,CAAC,CAAC;IACnE,OAAQ,IAAI,CAAC,KAAqB,IAAI,IAAI,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,WAAW,GAIE,CACjB,IAAiB,EACjB,QAAkB,EAClB,OAAe,EACF,EAAE;IACf,IAAI,IAAA,cAAO,EAAC,IAAI,CAAC,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IACzC,MAAM,QAAQ,GAAqB,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC1D,IAAI,QAAQ,KAAK,SAAS;QACxB,MAAM,IAAI,KAAK,CAAC,GAAG,OAAO,oCAAoC,CAAC,CAAC;IAClE,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serializes the LF-normalized digests of generated instruction files.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/development/implementation.md#principled-implementation SHA-256 over canonical LF text records byte identity for later three-way comparison, without claiming semantic acceptance.
|
|
5
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Rendering and successful sync use this single deterministic state format.
|
|
6
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Only managed instructions enter state; contract and creative bytes are never marked generated.
|
|
7
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states normalization, digest meaning and managed population.
|
|
8
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Filtering and hashing scan total instruction bytes; sorting costs n log n path comparisons.
|
|
9
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work One render supplies all already-read file contents; no file is reopened.
|
|
10
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned JSON and digest record are caller-owned and bounded by instruction count; no handles are opened.
|
|
11
|
+
*/
|
|
12
|
+
export declare function createScaffoldSyncState(files: Readonly<Record<string, string>>): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createScaffoldSyncState = createScaffoldSyncState;
|
|
4
|
+
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const isScaffoldInstruction_1 = require("./isScaffoldInstruction");
|
|
6
|
+
/**
|
|
7
|
+
* Serializes the LF-normalized digests of generated instruction files.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/implementation.md#principled-implementation SHA-256 over canonical LF text records byte identity for later three-way comparison, without claiming semantic acceptance.
|
|
10
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Rendering and successful sync use this single deterministic state format.
|
|
11
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Only managed instructions enter state; contract and creative bytes are never marked generated.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states normalization, digest meaning and managed population.
|
|
13
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Filtering and hashing scan total instruction bytes; sorting costs n log n path comparisons.
|
|
14
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work One render supplies all already-read file contents; no file is reopened.
|
|
15
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned JSON and digest record are caller-owned and bounded by instruction count; no handles are opened.
|
|
16
|
+
*/
|
|
17
|
+
function createScaffoldSyncState(files) {
|
|
18
|
+
const selected = Object.entries(files).filter(([name]) => (0, isScaffoldInstruction_1.isScaffoldInstruction)(name));
|
|
19
|
+
selected.sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
|
|
20
|
+
const hashes = Object.fromEntries(selected.map(([name, text]) => [
|
|
21
|
+
name,
|
|
22
|
+
(0, node_crypto_1.createHash)("sha256").update(text.replaceAll("\r\n", "\n")).digest("hex"),
|
|
23
|
+
]));
|
|
24
|
+
return JSON.stringify({ version: 1, files: hashes }, null, 2) + "\n";
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=createScaffoldSyncState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScaffoldSyncState.js","sourceRoot":"","sources":["../src/createScaffoldSyncState.ts"],"names":[],"mappings":";;;AAAA,6CAAyC;AAEzC,mEAAgE;AAEhE;;;;;;;;;;GAUG;AACH,iCACE,KAAuC;IAEvC,MAAM,QAAQ,GAAuB,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAC/D,CAAC,CAAC,IAAI,CAAmB,EAAW,EAAE,CAAC,IAAA,6CAAqB,EAAC,IAAI,CAAC,CACnE,CAAC;IACF,QAAQ,CAAC,IAAI,CACX,CAAC,CAAC,IAAI,CAAmB,EAAE,CAAC,KAAK,CAAmB,EAAU,EAAE,CAC9D,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;IACF,MAAM,MAAM,GAA2B,MAAM,CAAC,WAAW,CACvD,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAmB,EAAoB,EAAE,CAAC;QACjE,IAAI;QACJ,IAAA,wBAAU,EAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KACzE,CAAC,CACH,CAAC;IACF,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC;AACvE,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The token table for the `production` and `workspace` scaffold layers.
|
|
3
|
+
*
|
|
4
|
+
* `{{name}}` is the admitted project name and `{{skills}}` the path from the rendered directory to the shared `.agents/skills` tree. Every `{{version:<key>}}` resolves to the build-time {@link AUTOMOVIE_TEMPLATE_VERSIONS} range for `"release"`, or to the named-catalog specifier `catalog:<name>` from {@link AUTOMOVIE_TEMPLATE_CATALOGS} for `"catalog"`, so a workspace production takes its versions from the workspace root's `pnpm-workspace.yaml`.
|
|
5
|
+
*
|
|
6
|
+
* @param props The admitted name, the skills path, and how dependency versions are written.
|
|
7
|
+
* @returns A fresh token table.
|
|
8
|
+
* @throws When a version key has no catalog in catalog mode.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/implementation.md#principled-implementation A pnpm `catalog:<name>` specifier resolves through the workspace's named `catalogs`, so writing it for every version key defers each range to the catalog the workspace root renders from the same version table.
|
|
11
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One owner builds every layer's table; the renderers choose only the name, the skills path and the dependency mode.
|
|
12
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The keys are exactly the version table's plus `name` and `skills`, with no per-file value; an unknown token still fails rendering.
|
|
13
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states every token, both dependency modes and why the catalog mode exists.
|
|
14
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One pass over the fixed version table.
|
|
15
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A render builds its table once.
|
|
16
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned table is owned by the caller and holds one string per key.
|
|
17
|
+
*/
|
|
18
|
+
export declare const createScaffoldVariables: (props: {
|
|
19
|
+
/** Admitted project name. */
|
|
20
|
+
name: string;
|
|
21
|
+
/** Path from the rendered directory to the shared `.agents/skills`, with `/` separators. */
|
|
22
|
+
skills: string;
|
|
23
|
+
/** `"release"` writes the build-time ranges; `"catalog"` writes `catalog:<name>` for a workspace production. */
|
|
24
|
+
dependencies: "release" | "catalog";
|
|
25
|
+
}) => Record<string, string>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createScaffoldVariables = void 0;
|
|
4
|
+
const AUTOMOVIE_TEMPLATE_CATALOGS_1 = require("./AUTOMOVIE_TEMPLATE_CATALOGS");
|
|
5
|
+
const AUTOMOVIE_TEMPLATE_VERSIONS_1 = require("./AUTOMOVIE_TEMPLATE_VERSIONS");
|
|
6
|
+
/**
|
|
7
|
+
* The token table for the `production` and `workspace` scaffold layers.
|
|
8
|
+
*
|
|
9
|
+
* `{{name}}` is the admitted project name and `{{skills}}` the path from the rendered directory to the shared `.agents/skills` tree. Every `{{version:<key>}}` resolves to the build-time {@link AUTOMOVIE_TEMPLATE_VERSIONS} range for `"release"`, or to the named-catalog specifier `catalog:<name>` from {@link AUTOMOVIE_TEMPLATE_CATALOGS} for `"catalog"`, so a workspace production takes its versions from the workspace root's `pnpm-workspace.yaml`.
|
|
10
|
+
*
|
|
11
|
+
* @param props The admitted name, the skills path, and how dependency versions are written.
|
|
12
|
+
* @returns A fresh token table.
|
|
13
|
+
* @throws When a version key has no catalog in catalog mode.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation A pnpm `catalog:<name>` specifier resolves through the workspace's named `catalogs`, so writing it for every version key defers each range to the catalog the workspace root renders from the same version table.
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One owner builds every layer's table; the renderers choose only the name, the skills path and the dependency mode.
|
|
17
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The keys are exactly the version table's plus `name` and `skills`, with no per-file value; an unknown token still fails rendering.
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states every token, both dependency modes and why the catalog mode exists.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One pass over the fixed version table.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A render builds its table once.
|
|
21
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned table is owned by the caller and holds one string per key.
|
|
22
|
+
*/
|
|
23
|
+
const createScaffoldVariables = (props) => {
|
|
24
|
+
const variables = {
|
|
25
|
+
name: props.name,
|
|
26
|
+
skills: props.skills,
|
|
27
|
+
};
|
|
28
|
+
for (const [key, value] of Object.entries(AUTOMOVIE_TEMPLATE_VERSIONS_1.AUTOMOVIE_TEMPLATE_VERSIONS)) {
|
|
29
|
+
if (props.dependencies === "release") {
|
|
30
|
+
variables[`version:${key}`] = value;
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const catalog = AUTOMOVIE_TEMPLATE_CATALOGS_1.AUTOMOVIE_TEMPLATE_CATALOGS[key];
|
|
34
|
+
if (catalog === undefined)
|
|
35
|
+
throw new Error(`version key "${key}" has no workspace catalog`);
|
|
36
|
+
variables[`version:${key}`] = `catalog:${catalog}`;
|
|
37
|
+
}
|
|
38
|
+
return variables;
|
|
39
|
+
};
|
|
40
|
+
exports.createScaffoldVariables = createScaffoldVariables;
|
|
41
|
+
//# sourceMappingURL=createScaffoldVariables.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScaffoldVariables.js","sourceRoot":"","sources":["../src/createScaffoldVariables.ts"],"names":[],"mappings":";;;AAAA,+EAA4E;AAC5E,+EAA4E;AAE5E;;;;;;;;;;;;;;;;GAgBG;AACI,MAAM,uBAAuB,GASL,CAAC,KAI/B,EAA0B,EAAE;IAC3B,MAAM,SAAS,GAA2B;QACxC,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,MAAM,EAAE,KAAK,CAAC,MAAM;KACrB,CAAC;IACF,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,yDAA2B,CAAC,EAAE,CAAC;QACvE,IAAI,KAAK,CAAC,YAAY,KAAK,SAAS,EAAE,CAAC;YACrC,SAAS,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG,KAAK,CAAC;YACpC,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAAuB,yDAA2B,CAAC,GAAG,CAAC,CAAC;QACrE,IAAI,OAAO,KAAK,SAAS;YACvB,MAAM,IAAI,KAAK,CAAC,gBAAgB,GAAG,4BAA4B,CAAC,CAAC;QACnE,SAAS,CAAC,WAAW,GAAG,EAAE,CAAC,GAAG,WAAW,OAAO,EAAE,CAAC;IACrD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AA7BW,QAAA,uBAAuB,GAAvB,uBAAuB,CA6BlC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
|
|
2
|
+
/**
|
|
3
|
+
* Create or capture the scaffold root, qualifying the nearest existing directory and every missing level created below it.
|
|
4
|
+
*
|
|
5
|
+
* The nearest existing ancestor of `directory` is captured first; each missing level is then created with a plain `mkdir`, after revalidating the level above it, and captured as a new, empty, ordinary directory. Existing ancestors above that first capture are not walked: an intermediate link in its pathname can therefore lead to the captured real directory.
|
|
6
|
+
*
|
|
7
|
+
* @param directory Root path, resolved against the working directory.
|
|
8
|
+
* @returns The captured root.
|
|
9
|
+
* @throws When an existing level is a link or not a directory, when a captured level changes during creation, when a level created here is not empty, or when an ancestor cannot be read for a reason other than being missing.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation The walk climbs with `path.dirname` until a level exists, which ends at the file-system root, then creates downward with non-recursive `mkdirSync`, so every created level has a captured parent; a level created by someone else between the climb and the `mkdir` makes `mkdir` throw `EEXIST` instead of being adopted.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This function owns only the root and its missing ancestors; descendants of the root belong to `ensureScaffoldFileDirectory`, which checks containment against this capture.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Only `ENOENT` and `ENOTDIR` are treated as missing levels; any other capture error propagates, and an unexpected entry in a level created here is refused rather than tolerated.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the climb, create-and-capture order, path resolution and refusals, and limits link admission to the first captured existing directory and newly created levels rather than every existing pathname ancestor.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Cost is linear in the number of path levels, with a constant number of stats, opens, and real-path reads per level; `missing.unshift` is quadratic only in that depth, which is a handful of levels.
|
|
16
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call captures the current file-system state that the caller is about to rely on, so an earlier capture is not equivalent; `publishFiles` calls this once per publication.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources physicalDirectoryIdentity attempts close for each capture and propagates close failures; successful captures own only strings. This walk keeps a call-local list bounded by missing path depth, while created directories intentionally remain after later refusal.
|
|
18
|
+
*/
|
|
19
|
+
export declare const ensureScaffoldBaseDirectory: (directory: string) => IScaffoldPhysicalDirectory;
|