@agimon-ai/doompi 0.0.1-alpha.76 → 0.0.1-alpha.78
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/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/antigravity.cjs +5 -0
- package/dist/antigravity.d.cts +2 -0
- package/dist/antigravity.d.mts +2 -0
- package/dist/antigravity.mjs +2 -0
- package/dist/api-contracts.cjs +11 -0
- package/dist/api-contracts.cjs.map +1 -0
- package/dist/api-contracts.d.cts +52 -0
- package/dist/api-contracts.d.cts.map +1 -0
- package/dist/api-contracts.d.mts +52 -0
- package/dist/api-contracts.d.mts.map +1 -0
- package/dist/api-contracts.mjs +7 -0
- package/dist/api-contracts.mjs.map +1 -0
- package/dist/base-command.cjs +3 -0
- package/dist/base-command.d.cts +2 -0
- package/dist/base-command.d.mts +2 -0
- package/dist/base-command.mjs +2 -0
- package/dist/bin/cli.cjs +29 -0
- package/dist/bin/cli.cjs.map +1 -0
- package/dist/bin/cli.d.cts +1 -0
- package/dist/bin/cli.d.mts +1 -0
- package/dist/bin/cli.mjs +30 -0
- package/dist/bin/cli.mjs.map +1 -0
- package/dist/bin/doomRunner.cjs +39 -0
- package/dist/bin/doomRunner.cjs.map +1 -0
- package/dist/bin/doomRunner.d.cts +12 -0
- package/dist/bin/doomRunner.d.cts.map +1 -0
- package/dist/bin/doomRunner.d.mts +12 -0
- package/dist/bin/doomRunner.d.mts.map +1 -0
- package/dist/bin/doomRunner.mjs +38 -0
- package/dist/bin/doomRunner.mjs.map +1 -0
- package/dist/bin/dpi.cjs +12 -0
- package/dist/bin/dpi.cjs.map +1 -0
- package/dist/bin/dpi.d.cts +1 -0
- package/dist/bin/dpi.d.mts +1 -0
- package/dist/bin/dpi.mjs +14 -0
- package/dist/bin/dpi.mjs.map +1 -0
- package/dist/bin/serve.cjs +11 -0
- package/dist/bin/serve.cjs.map +1 -0
- package/dist/bin/serve.d.cts +1 -0
- package/dist/bin/serve.d.mts +1 -0
- package/dist/bin/serve.mjs +13 -0
- package/dist/bin/serve.mjs.map +1 -0
- package/dist/builders/apiContractExport/index.cjs +81 -0
- package/dist/builders/apiContractExport/index.cjs.map +1 -0
- package/dist/builders/apiContractExport/index.mjs +77 -0
- package/dist/builders/apiContractExport/index.mjs.map +1 -0
- package/dist/builders/apiContracts/index.cjs +87 -0
- package/dist/builders/apiContracts/index.cjs.map +1 -0
- package/dist/builders/apiContracts/index.mjs +82 -0
- package/dist/builders/apiContracts/index.mjs.map +1 -0
- package/dist/builders/cli/bootstrapClaim.cjs +53 -0
- package/dist/builders/cli/bootstrapClaim.cjs.map +1 -0
- package/dist/builders/cli/bootstrapClaim.mjs +51 -0
- package/dist/builders/cli/bootstrapClaim.mjs.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.cjs +204 -0
- package/dist/builders/cli/bootstrapLocator/index.cjs.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.d.cts +5 -0
- package/dist/builders/cli/bootstrapLocator/index.d.cts.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.d.mts +5 -0
- package/dist/builders/cli/bootstrapLocator/index.d.mts.map +1 -0
- package/dist/builders/cli/bootstrapLocator/index.mjs +196 -0
- package/dist/builders/cli/bootstrapLocator/index.mjs.map +1 -0
- package/dist/builders/cli/composition.cjs +378 -0
- package/dist/builders/cli/composition.cjs.map +1 -0
- package/dist/builders/cli/composition.d.cts +119 -0
- package/dist/builders/cli/composition.d.cts.map +1 -0
- package/dist/builders/cli/composition.d.mts +119 -0
- package/dist/builders/cli/composition.d.mts.map +1 -0
- package/dist/builders/cli/composition.mjs +351 -0
- package/dist/builders/cli/composition.mjs.map +1 -0
- package/dist/builders/cli/compositionState.cjs +33 -0
- package/dist/builders/cli/compositionState.cjs.map +1 -0
- package/dist/builders/cli/compositionState.d.cts +9 -0
- package/dist/builders/cli/compositionState.d.cts.map +1 -0
- package/dist/builders/cli/compositionState.d.mts +9 -0
- package/dist/builders/cli/compositionState.d.mts.map +1 -0
- package/dist/builders/cli/compositionState.mjs +30 -0
- package/dist/builders/cli/compositionState.mjs.map +1 -0
- package/dist/builders/cli/constants.cjs +20 -0
- package/dist/builders/cli/constants.cjs.map +1 -0
- package/dist/builders/cli/constants.d.cts +17 -0
- package/dist/builders/cli/constants.d.cts.map +1 -0
- package/dist/builders/cli/constants.d.mts +17 -0
- package/dist/builders/cli/constants.d.mts.map +1 -0
- package/dist/builders/cli/constants.mjs +19 -0
- package/dist/builders/cli/constants.mjs.map +1 -0
- package/dist/builders/cli/contextCatalog.cjs +130 -0
- package/dist/builders/cli/contextCatalog.cjs.map +1 -0
- package/dist/builders/cli/contextCatalog.mjs +130 -0
- package/dist/builders/cli/contextCatalog.mjs.map +1 -0
- package/dist/builders/cli/dpiSettings.cjs +118 -0
- package/dist/builders/cli/dpiSettings.cjs.map +1 -0
- package/dist/builders/cli/dpiSettings.mjs +111 -0
- package/dist/builders/cli/dpiSettings.mjs.map +1 -0
- package/dist/builders/cli/entryResolution.cjs +23 -0
- package/dist/builders/cli/entryResolution.cjs.map +1 -0
- package/dist/builders/cli/entryResolution.d.cts +5 -0
- package/dist/builders/cli/entryResolution.d.cts.map +1 -0
- package/dist/builders/cli/entryResolution.d.mts +5 -0
- package/dist/builders/cli/entryResolution.d.mts.map +1 -0
- package/dist/builders/cli/entryResolution.mjs +20 -0
- package/dist/builders/cli/entryResolution.mjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.cjs +386 -0
- package/dist/builders/cli/extensionAssembler/index.cjs.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.d.cts +113 -0
- package/dist/builders/cli/extensionAssembler/index.d.cts.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts +113 -0
- package/dist/builders/cli/extensionAssembler/index.d.mts.map +1 -0
- package/dist/builders/cli/extensionAssembler/index.mjs +376 -0
- package/dist/builders/cli/extensionAssembler/index.mjs.map +1 -0
- package/dist/builders/cli/harnessContext.cjs +186 -0
- package/dist/builders/cli/harnessContext.cjs.map +1 -0
- package/dist/builders/cli/harnessContext.d.cts +51 -0
- package/dist/builders/cli/harnessContext.d.cts.map +1 -0
- package/dist/builders/cli/harnessContext.d.mts +51 -0
- package/dist/builders/cli/harnessContext.d.mts.map +1 -0
- package/dist/builders/cli/harnessContext.mjs +179 -0
- package/dist/builders/cli/harnessContext.mjs.map +1 -0
- package/dist/builders/cli/index.cjs +151 -0
- package/dist/builders/cli/index.cjs.map +1 -0
- package/dist/builders/cli/index.d.cts +22 -0
- package/dist/builders/cli/index.d.cts.map +1 -0
- package/dist/builders/cli/index.d.mts +22 -0
- package/dist/builders/cli/index.d.mts.map +1 -0
- package/dist/builders/cli/index.mjs +147 -0
- package/dist/builders/cli/index.mjs.map +1 -0
- package/dist/builders/cli/launchPlan/index.cjs +102 -0
- package/dist/builders/cli/launchPlan/index.cjs.map +1 -0
- package/dist/builders/cli/launchPlan/index.d.cts +43 -0
- package/dist/builders/cli/launchPlan/index.d.cts.map +1 -0
- package/dist/builders/cli/launchPlan/index.d.mts +43 -0
- package/dist/builders/cli/launchPlan/index.d.mts.map +1 -0
- package/dist/builders/cli/launchPlan/index.mjs +100 -0
- package/dist/builders/cli/launchPlan/index.mjs.map +1 -0
- package/dist/builders/cli/launcherComposition/index.cjs +84 -0
- package/dist/builders/cli/launcherComposition/index.cjs.map +1 -0
- package/dist/builders/cli/launcherComposition/index.mjs +80 -0
- package/dist/builders/cli/launcherComposition/index.mjs.map +1 -0
- package/dist/builders/cli/piExtensionAlias/index.cjs +40 -0
- package/dist/builders/cli/piExtensionAlias/index.cjs.map +1 -0
- package/dist/builders/cli/piExtensionAlias/index.mjs +35 -0
- package/dist/builders/cli/piExtensionAlias/index.mjs.map +1 -0
- package/dist/builders/cli/piExtensionDispatcher/index.cjs +205 -0
- package/dist/builders/cli/piExtensionDispatcher/index.cjs.map +1 -0
- package/dist/builders/cli/piExtensionDispatcher/index.mjs +198 -0
- package/dist/builders/cli/piExtensionDispatcher/index.mjs.map +1 -0
- package/dist/builders/cli/prepare.cjs +64 -0
- package/dist/builders/cli/prepare.cjs.map +1 -0
- package/dist/builders/cli/prepare.mjs +62 -0
- package/dist/builders/cli/prepare.mjs.map +1 -0
- package/dist/builders/cli/projectSettings.cjs +155 -0
- package/dist/builders/cli/projectSettings.cjs.map +1 -0
- package/dist/builders/cli/projectSettings.d.cts +27 -0
- package/dist/builders/cli/projectSettings.d.cts.map +1 -0
- package/dist/builders/cli/projectSettings.d.mts +27 -0
- package/dist/builders/cli/projectSettings.d.mts.map +1 -0
- package/dist/builders/cli/projectSettings.mjs +144 -0
- package/dist/builders/cli/projectSettings.mjs.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.cjs +130 -0
- package/dist/builders/cli/runtimeBundle/index.cjs.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.d.cts +21 -0
- package/dist/builders/cli/runtimeBundle/index.d.cts.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.d.mts +21 -0
- package/dist/builders/cli/runtimeBundle/index.d.mts.map +1 -0
- package/dist/builders/cli/runtimeBundle/index.mjs +126 -0
- package/dist/builders/cli/runtimeBundle/index.mjs.map +1 -0
- package/dist/builders/server/index.cjs +184 -0
- package/dist/builders/server/index.cjs.map +1 -0
- package/dist/builders/server/index.mjs +181 -0
- package/dist/builders/server/index.mjs.map +1 -0
- package/dist/builders/server/runtime.cjs +603 -0
- package/dist/builders/server/runtime.cjs.map +1 -0
- package/dist/builders/server/runtime.mjs +595 -0
- package/dist/builders/server/runtime.mjs.map +1 -0
- package/dist/builders/server/selectionStatus.cjs +12 -0
- package/dist/builders/server/selectionStatus.cjs.map +1 -0
- package/dist/builders/server/selectionStatus.mjs +12 -0
- package/dist/builders/server/selectionStatus.mjs.map +1 -0
- package/dist/builders/server/sessionArguments.cjs +22 -0
- package/dist/builders/server/sessionArguments.cjs.map +1 -0
- package/dist/builders/server/sessionArguments.mjs +22 -0
- package/dist/builders/server/sessionArguments.mjs.map +1 -0
- package/dist/builders/web/bundle.cjs +110 -0
- package/dist/builders/web/bundle.cjs.map +1 -0
- package/dist/builders/web/bundle.d.cts +29 -0
- package/dist/builders/web/bundle.d.cts.map +1 -0
- package/dist/builders/web/bundle.d.mts +29 -0
- package/dist/builders/web/bundle.d.mts.map +1 -0
- package/dist/builders/web/bundle.mjs +107 -0
- package/dist/builders/web/bundle.mjs.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.cjs +96 -0
- package/dist/builders/web/bundleAssetPolicy.cjs.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.d.cts +22 -0
- package/dist/builders/web/bundleAssetPolicy.d.cts.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.d.mts +22 -0
- package/dist/builders/web/bundleAssetPolicy.d.mts.map +1 -0
- package/dist/builders/web/bundleAssetPolicy.mjs +95 -0
- package/dist/builders/web/bundleAssetPolicy.mjs.map +1 -0
- package/dist/builders/web/index.cjs +75 -0
- package/dist/builders/web/index.cjs.map +1 -0
- package/dist/builders/web/index.d.cts +29 -0
- package/dist/builders/web/index.d.cts.map +1 -0
- package/dist/builders/web/index.d.mts +29 -0
- package/dist/builders/web/index.d.mts.map +1 -0
- package/dist/builders/web/index.mjs +72 -0
- package/dist/builders/web/index.mjs.map +1 -0
- package/dist/builders/web/webDevRoots.cjs +27 -0
- package/dist/builders/web/webDevRoots.cjs.map +1 -0
- package/dist/builders/web/webDevRoots.d.cts +22 -0
- package/dist/builders/web/webDevRoots.d.cts.map +1 -0
- package/dist/builders/web/webDevRoots.d.mts +22 -0
- package/dist/builders/web/webDevRoots.d.mts.map +1 -0
- package/dist/builders/web/webDevRoots.mjs +25 -0
- package/dist/builders/web/webDevRoots.mjs.map +1 -0
- package/dist/builders/web/webPluginGenerate.cjs +113 -0
- package/dist/builders/web/webPluginGenerate.cjs.map +1 -0
- package/dist/builders/web/webPluginGenerate.d.cts +28 -0
- package/dist/builders/web/webPluginGenerate.d.cts.map +1 -0
- package/dist/builders/web/webPluginGenerate.d.mts +28 -0
- package/dist/builders/web/webPluginGenerate.d.mts.map +1 -0
- package/dist/builders/web/webPluginGenerate.mjs +106 -0
- package/dist/builders/web/webPluginGenerate.mjs.map +1 -0
- package/dist/builders/web/webPluginManifest.cjs +92 -0
- package/dist/builders/web/webPluginManifest.cjs.map +1 -0
- package/dist/builders/web/webPluginManifest.d.cts +44 -0
- package/dist/builders/web/webPluginManifest.d.cts.map +1 -0
- package/dist/builders/web/webPluginManifest.d.mts +44 -0
- package/dist/builders/web/webPluginManifest.d.mts.map +1 -0
- package/dist/builders/web/webPluginManifest.mjs +88 -0
- package/dist/builders/web/webPluginManifest.mjs.map +1 -0
- package/dist/builders/web/webPluginScan.cjs +53 -0
- package/dist/builders/web/webPluginScan.cjs.map +1 -0
- package/dist/builders/web/webPluginScan.d.cts +16 -0
- package/dist/builders/web/webPluginScan.d.cts.map +1 -0
- package/dist/builders/web/webPluginScan.d.mts +16 -0
- package/dist/builders/web/webPluginScan.d.mts.map +1 -0
- package/dist/builders/web/webPluginScan.mjs +50 -0
- package/dist/builders/web/webPluginScan.mjs.map +1 -0
- package/dist/builders/web/webPluginVite.cjs +124 -0
- package/dist/builders/web/webPluginVite.cjs.map +1 -0
- package/dist/builders/web/webPluginVite.d.cts +36 -0
- package/dist/builders/web/webPluginVite.d.cts.map +1 -0
- package/dist/builders/web/webPluginVite.d.mts +36 -0
- package/dist/builders/web/webPluginVite.d.mts.map +1 -0
- package/dist/builders/web/webPluginVite.mjs +116 -0
- package/dist/builders/web/webPluginVite.mjs.map +1 -0
- package/dist/builders/web.cjs +33 -0
- package/dist/builders/web.d.cts +9 -0
- package/dist/builders/web.d.mts +9 -0
- package/dist/builders/web.mjs +9 -0
- package/dist/cli/cliApp.cjs +177 -0
- package/dist/cli/cliApp.cjs.map +1 -0
- package/dist/cli/cliApp.d.cts +25 -0
- package/dist/cli/cliApp.d.cts.map +1 -0
- package/dist/cli/cliApp.d.mts +25 -0
- package/dist/cli/cliApp.d.mts.map +1 -0
- package/dist/cli/cliApp.mjs +175 -0
- package/dist/cli/cliApp.mjs.map +1 -0
- package/dist/cli/commands/api-export/index.cjs +65 -0
- package/dist/cli/commands/api-export/index.cjs.map +1 -0
- package/dist/cli/commands/api-export/index.mjs +61 -0
- package/dist/cli/commands/api-export/index.mjs.map +1 -0
- package/dist/cli/commands/baseCommand.cjs +16 -0
- package/dist/cli/commands/baseCommand.cjs.map +1 -0
- package/dist/cli/commands/baseCommand.d.cts +24 -0
- package/dist/cli/commands/baseCommand.d.cts.map +1 -0
- package/dist/cli/commands/baseCommand.d.mts +24 -0
- package/dist/cli/commands/baseCommand.d.mts.map +1 -0
- package/dist/cli/commands/baseCommand.mjs +16 -0
- package/dist/cli/commands/baseCommand.mjs.map +1 -0
- package/dist/cli/commands/compat/context.cjs +115 -0
- package/dist/cli/commands/compat/context.cjs.map +1 -0
- package/dist/cli/commands/compat/context.d.cts +22 -0
- package/dist/cli/commands/compat/context.d.cts.map +1 -0
- package/dist/cli/commands/compat/context.d.mts +22 -0
- package/dist/cli/commands/compat/context.d.mts.map +1 -0
- package/dist/cli/commands/compat/context.mjs +110 -0
- package/dist/cli/commands/compat/context.mjs.map +1 -0
- package/dist/cli/commands/compat/help.cjs +26 -0
- package/dist/cli/commands/compat/help.cjs.map +1 -0
- package/dist/cli/commands/compat/help.d.cts +4 -0
- package/dist/cli/commands/compat/help.d.cts.map +1 -0
- package/dist/cli/commands/compat/help.d.mts +4 -0
- package/dist/cli/commands/compat/help.d.mts.map +1 -0
- package/dist/cli/commands/compat/help.mjs +25 -0
- package/dist/cli/commands/compat/help.mjs.map +1 -0
- package/dist/cli/commands/compat/index.cjs +73 -0
- package/dist/cli/commands/compat/index.cjs.map +1 -0
- package/dist/cli/commands/compat/index.d.cts +14 -0
- package/dist/cli/commands/compat/index.d.cts.map +1 -0
- package/dist/cli/commands/compat/index.d.mts +14 -0
- package/dist/cli/commands/compat/index.d.mts.map +1 -0
- package/dist/cli/commands/compat/index.mjs +70 -0
- package/dist/cli/commands/compat/index.mjs.map +1 -0
- package/dist/cli/commands/compat/options.cjs +88 -0
- package/dist/cli/commands/compat/options.cjs.map +1 -0
- package/dist/cli/commands/compat/options.d.cts +15 -0
- package/dist/cli/commands/compat/options.d.cts.map +1 -0
- package/dist/cli/commands/compat/options.d.mts +15 -0
- package/dist/cli/commands/compat/options.d.mts.map +1 -0
- package/dist/cli/commands/compat/options.mjs +86 -0
- package/dist/cli/commands/compat/options.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.cjs +294 -0
- package/dist/cli/commands/compat/providers/antigravity.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.d.cts +9 -0
- package/dist/cli/commands/compat/providers/antigravity.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.d.mts +9 -0
- package/dist/cli/commands/compat/providers/antigravity.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/antigravity.mjs +289 -0
- package/dist/cli/commands/compat/providers/antigravity.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/codex.cjs +178 -0
- package/dist/cli/commands/compat/providers/codex.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/codex.d.cts +17 -0
- package/dist/cli/commands/compat/providers/codex.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/codex.d.mts +17 -0
- package/dist/cli/commands/compat/providers/codex.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/codex.mjs +170 -0
- package/dist/cli/commands/compat/providers/codex.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/index.cjs +65 -0
- package/dist/cli/commands/compat/providers/index.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/index.d.cts +15 -0
- package/dist/cli/commands/compat/providers/index.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/index.d.mts +15 -0
- package/dist/cli/commands/compat/providers/index.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/index.mjs +45 -0
- package/dist/cli/commands/compat/providers/index.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/process.cjs +172 -0
- package/dist/cli/commands/compat/providers/process.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/process.d.cts +33 -0
- package/dist/cli/commands/compat/providers/process.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/process.d.mts +33 -0
- package/dist/cli/commands/compat/providers/process.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/process.mjs +159 -0
- package/dist/cli/commands/compat/providers/process.mjs.map +1 -0
- package/dist/cli/commands/compat/providers/shared.cjs +76 -0
- package/dist/cli/commands/compat/providers/shared.cjs.map +1 -0
- package/dist/cli/commands/compat/providers/shared.d.cts +40 -0
- package/dist/cli/commands/compat/providers/shared.d.cts.map +1 -0
- package/dist/cli/commands/compat/providers/shared.d.mts +40 -0
- package/dist/cli/commands/compat/providers/shared.d.mts.map +1 -0
- package/dist/cli/commands/compat/providers/shared.mjs +61 -0
- package/dist/cli/commands/compat/providers/shared.mjs.map +1 -0
- package/dist/cli/commands/compat/types.d.cts +31 -0
- package/dist/cli/commands/compat/types.d.cts.map +1 -0
- package/dist/cli/commands/compat/types.d.mts +31 -0
- package/dist/cli/commands/compat/types.d.mts.map +1 -0
- package/dist/cli/commands/doctor/help.cjs +19 -0
- package/dist/cli/commands/doctor/help.cjs.map +1 -0
- package/dist/cli/commands/doctor/help.d.cts +4 -0
- package/dist/cli/commands/doctor/help.d.cts.map +1 -0
- package/dist/cli/commands/doctor/help.d.mts +4 -0
- package/dist/cli/commands/doctor/help.d.mts.map +1 -0
- package/dist/cli/commands/doctor/help.mjs +19 -0
- package/dist/cli/commands/doctor/help.mjs.map +1 -0
- package/dist/cli/commands/doctor/index.cjs +116 -0
- package/dist/cli/commands/doctor/index.cjs.map +1 -0
- package/dist/cli/commands/doctor/index.d.cts +12 -0
- package/dist/cli/commands/doctor/index.d.cts.map +1 -0
- package/dist/cli/commands/doctor/index.d.mts +12 -0
- package/dist/cli/commands/doctor/index.d.mts.map +1 -0
- package/dist/cli/commands/doctor/index.mjs +112 -0
- package/dist/cli/commands/doctor/index.mjs.map +1 -0
- package/dist/cli/commands/emit-mcp/index.cjs +32 -0
- package/dist/cli/commands/emit-mcp/index.cjs.map +1 -0
- package/dist/cli/commands/emit-mcp/index.d.cts +19 -0
- package/dist/cli/commands/emit-mcp/index.d.cts.map +1 -0
- package/dist/cli/commands/emit-mcp/index.d.mts +19 -0
- package/dist/cli/commands/emit-mcp/index.d.mts.map +1 -0
- package/dist/cli/commands/emit-mcp/index.mjs +31 -0
- package/dist/cli/commands/emit-mcp/index.mjs.map +1 -0
- package/dist/cli/commands/explain/index.cjs +155 -0
- package/dist/cli/commands/explain/index.cjs.map +1 -0
- package/dist/cli/commands/explain/index.d.cts +57 -0
- package/dist/cli/commands/explain/index.d.cts.map +1 -0
- package/dist/cli/commands/explain/index.d.mts +57 -0
- package/dist/cli/commands/explain/index.d.mts.map +1 -0
- package/dist/cli/commands/explain/index.mjs +150 -0
- package/dist/cli/commands/explain/index.mjs.map +1 -0
- package/dist/cli/commands/history-export/help.cjs +18 -0
- package/dist/cli/commands/history-export/help.cjs.map +1 -0
- package/dist/cli/commands/history-export/help.d.cts +4 -0
- package/dist/cli/commands/history-export/help.d.cts.map +1 -0
- package/dist/cli/commands/history-export/help.d.mts +4 -0
- package/dist/cli/commands/history-export/help.d.mts.map +1 -0
- package/dist/cli/commands/history-export/help.mjs +18 -0
- package/dist/cli/commands/history-export/help.mjs.map +1 -0
- package/dist/cli/commands/history-export/index.cjs +76 -0
- package/dist/cli/commands/history-export/index.cjs.map +1 -0
- package/dist/cli/commands/history-export/index.mjs +74 -0
- package/dist/cli/commands/history-export/index.mjs.map +1 -0
- package/dist/cli/commands/history-import/help.cjs +20 -0
- package/dist/cli/commands/history-import/help.cjs.map +1 -0
- package/dist/cli/commands/history-import/help.d.cts +4 -0
- package/dist/cli/commands/history-import/help.d.cts.map +1 -0
- package/dist/cli/commands/history-import/help.d.mts +4 -0
- package/dist/cli/commands/history-import/help.d.mts.map +1 -0
- package/dist/cli/commands/history-import/help.mjs +20 -0
- package/dist/cli/commands/history-import/help.mjs.map +1 -0
- package/dist/cli/commands/history-import/index.cjs +78 -0
- package/dist/cli/commands/history-import/index.cjs.map +1 -0
- package/dist/cli/commands/history-import/index.mjs +75 -0
- package/dist/cli/commands/history-import/index.mjs.map +1 -0
- package/dist/cli/commands/init/constants.cjs +11 -0
- package/dist/cli/commands/init/constants.cjs.map +1 -0
- package/dist/cli/commands/init/constants.mjs +11 -0
- package/dist/cli/commands/init/constants.mjs.map +1 -0
- package/dist/cli/commands/init/help.cjs +17 -0
- package/dist/cli/commands/init/help.cjs.map +1 -0
- package/dist/cli/commands/init/help.d.cts +4 -0
- package/dist/cli/commands/init/help.d.cts.map +1 -0
- package/dist/cli/commands/init/help.d.mts +4 -0
- package/dist/cli/commands/init/help.d.mts.map +1 -0
- package/dist/cli/commands/init/help.mjs +17 -0
- package/dist/cli/commands/init/help.mjs.map +1 -0
- package/dist/cli/commands/init/index.cjs +87 -0
- package/dist/cli/commands/init/index.cjs.map +1 -0
- package/dist/cli/commands/init/index.d.cts +12 -0
- package/dist/cli/commands/init/index.d.cts.map +1 -0
- package/dist/cli/commands/init/index.d.mts +12 -0
- package/dist/cli/commands/init/index.d.mts.map +1 -0
- package/dist/cli/commands/init/index.mjs +83 -0
- package/dist/cli/commands/init/index.mjs.map +1 -0
- package/dist/cli/commands/init/presenter.cjs +170 -0
- package/dist/cli/commands/init/presenter.cjs.map +1 -0
- package/dist/cli/commands/init/presenter.d.cts +8 -0
- package/dist/cli/commands/init/presenter.d.cts.map +1 -0
- package/dist/cli/commands/init/presenter.d.mts +8 -0
- package/dist/cli/commands/init/presenter.d.mts.map +1 -0
- package/dist/cli/commands/init/presenter.mjs +170 -0
- package/dist/cli/commands/init/presenter.mjs.map +1 -0
- package/dist/cli/commands/launch/index.cjs +128 -0
- package/dist/cli/commands/launch/index.cjs.map +1 -0
- package/dist/cli/commands/launch/index.d.cts +29 -0
- package/dist/cli/commands/launch/index.d.cts.map +1 -0
- package/dist/cli/commands/launch/index.d.mts +29 -0
- package/dist/cli/commands/launch/index.d.mts.map +1 -0
- package/dist/cli/commands/launch/index.mjs +122 -0
- package/dist/cli/commands/launch/index.mjs.map +1 -0
- package/dist/cli/commands/sandbox/args.cjs +50 -0
- package/dist/cli/commands/sandbox/args.cjs.map +1 -0
- package/dist/cli/commands/sandbox/args.mjs +50 -0
- package/dist/cli/commands/sandbox/args.mjs.map +1 -0
- package/dist/cli/commands/sandbox/harness.cjs +61 -0
- package/dist/cli/commands/sandbox/harness.cjs.map +1 -0
- package/dist/cli/commands/sandbox/harness.mjs +60 -0
- package/dist/cli/commands/sandbox/harness.mjs.map +1 -0
- package/dist/cli/commands/sandbox/index.cjs +57 -0
- package/dist/cli/commands/sandbox/index.cjs.map +1 -0
- package/dist/cli/commands/sandbox/index.mjs +56 -0
- package/dist/cli/commands/sandbox/index.mjs.map +1 -0
- package/dist/cli/commands/sync/help.cjs +31 -0
- package/dist/cli/commands/sync/help.cjs.map +1 -0
- package/dist/cli/commands/sync/help.d.cts +4 -0
- package/dist/cli/commands/sync/help.d.cts.map +1 -0
- package/dist/cli/commands/sync/help.d.mts +4 -0
- package/dist/cli/commands/sync/help.d.mts.map +1 -0
- package/dist/cli/commands/sync/help.mjs +31 -0
- package/dist/cli/commands/sync/help.mjs.map +1 -0
- package/dist/cli/commands/sync/index.cjs +577 -0
- package/dist/cli/commands/sync/index.cjs.map +1 -0
- package/dist/cli/commands/sync/index.d.cts +65 -0
- package/dist/cli/commands/sync/index.d.cts.map +1 -0
- package/dist/cli/commands/sync/index.d.mts +65 -0
- package/dist/cli/commands/sync/index.d.mts.map +1 -0
- package/dist/cli/commands/sync/index.mjs +560 -0
- package/dist/cli/commands/sync/index.mjs.map +1 -0
- package/dist/cli/commands/sync/prepare.cjs +43 -0
- package/dist/cli/commands/sync/prepare.cjs.map +1 -0
- package/dist/cli/commands/sync/prepare.mjs +40 -0
- package/dist/cli/commands/sync/prepare.mjs.map +1 -0
- package/dist/cli/commands/sync/presenter.cjs +58 -0
- package/dist/cli/commands/sync/presenter.cjs.map +1 -0
- package/dist/cli/commands/sync/presenter.d.cts +16 -0
- package/dist/cli/commands/sync/presenter.d.cts.map +1 -0
- package/dist/cli/commands/sync/presenter.d.mts +16 -0
- package/dist/cli/commands/sync/presenter.d.mts.map +1 -0
- package/dist/cli/commands/sync/presenter.mjs +57 -0
- package/dist/cli/commands/sync/presenter.mjs.map +1 -0
- package/dist/cli/commands/sync/workflow.cjs +99 -0
- package/dist/cli/commands/sync/workflow.cjs.map +1 -0
- package/dist/cli/commands/sync/workflow.mjs +96 -0
- package/dist/cli/commands/sync/workflow.mjs.map +1 -0
- package/dist/cli/dpi.cjs +98 -0
- package/dist/cli/dpi.cjs.map +1 -0
- package/dist/cli/dpi.mjs +91 -0
- package/dist/cli/dpi.mjs.map +1 -0
- package/dist/cli/harnessOptions.cjs +60 -0
- package/dist/cli/harnessOptions.cjs.map +1 -0
- package/dist/cli/harnessOptions.d.cts +24 -0
- package/dist/cli/harnessOptions.d.cts.map +1 -0
- package/dist/cli/harnessOptions.d.mts +24 -0
- package/dist/cli/harnessOptions.d.mts.map +1 -0
- package/dist/cli/harnessOptions.mjs +57 -0
- package/dist/cli/harnessOptions.mjs.map +1 -0
- package/dist/cli/help.cjs +89 -0
- package/dist/cli/help.cjs.map +1 -0
- package/dist/cli/help.d.cts +12 -0
- package/dist/cli/help.d.cts.map +1 -0
- package/dist/cli/help.d.mts +12 -0
- package/dist/cli/help.d.mts.map +1 -0
- package/dist/cli/help.mjs +83 -0
- package/dist/cli/help.mjs.map +1 -0
- package/dist/cli/matrixOptions.cjs +178 -0
- package/dist/cli/matrixOptions.cjs.map +1 -0
- package/dist/cli/matrixOptions.d.cts +90 -0
- package/dist/cli/matrixOptions.d.cts.map +1 -0
- package/dist/cli/matrixOptions.d.mts +90 -0
- package/dist/cli/matrixOptions.d.mts.map +1 -0
- package/dist/cli/matrixOptions.mjs +151 -0
- package/dist/cli/matrixOptions.mjs.map +1 -0
- package/dist/cli/options.cjs +306 -0
- package/dist/cli/options.cjs.map +1 -0
- package/dist/cli/options.d.cts +5 -0
- package/dist/cli/options.d.cts.map +1 -0
- package/dist/cli/options.d.mts +5 -0
- package/dist/cli/options.d.mts.map +1 -0
- package/dist/cli/options.mjs +304 -0
- package/dist/cli/options.mjs.map +1 -0
- package/dist/cli/router.cjs +59 -0
- package/dist/cli/router.cjs.map +1 -0
- package/dist/cli/router.d.cts +32 -0
- package/dist/cli/router.d.cts.map +1 -0
- package/dist/cli/router.d.mts +32 -0
- package/dist/cli/router.d.mts.map +1 -0
- package/dist/cli/router.mjs +56 -0
- package/dist/cli/router.mjs.map +1 -0
- package/dist/cli/server/options.cjs +71 -0
- package/dist/cli/server/options.cjs.map +1 -0
- package/dist/cli/server/options.mjs +70 -0
- package/dist/cli/server/options.mjs.map +1 -0
- package/dist/cli/server/run.cjs +45 -0
- package/dist/cli/server/run.cjs.map +1 -0
- package/dist/cli/server/run.mjs +45 -0
- package/dist/cli/server/run.mjs.map +1 -0
- package/dist/cli-app.cjs +5 -0
- package/dist/cli-app.d.cts +2 -0
- package/dist/cli-app.d.mts +2 -0
- package/dist/cli-app.mjs +2 -0
- package/dist/cli.cjs +28 -0
- package/dist/cli.d.cts +11 -0
- package/dist/cli.d.mts +11 -0
- package/dist/cli.mjs +11 -0
- package/dist/codex.cjs +8 -0
- package/dist/codex.d.cts +2 -0
- package/dist/codex.d.mts +2 -0
- package/dist/codex.mjs +2 -0
- package/dist/commands.cjs +23 -0
- package/dist/commands.d.cts +9 -0
- package/dist/commands.d.mts +9 -0
- package/dist/commands.mjs +9 -0
- package/dist/compatibility-command.cjs +4 -0
- package/dist/compatibility-command.d.cts +2 -0
- package/dist/compatibility-command.d.mts +2 -0
- package/dist/compatibility-command.mjs +2 -0
- package/dist/compatibility-context.cjs +3 -0
- package/dist/compatibility-context.d.cts +2 -0
- package/dist/compatibility-context.d.mts +2 -0
- package/dist/compatibility-context.mjs +2 -0
- package/dist/compatibility-options.cjs +5 -0
- package/dist/compatibility-options.d.cts +2 -0
- package/dist/compatibility-options.d.mts +2 -0
- package/dist/compatibility-options.mjs +2 -0
- package/dist/compatibility.cjs +27 -0
- package/dist/compatibility.d.cts +6 -0
- package/dist/compatibility.d.mts +6 -0
- package/dist/compatibility.mjs +6 -0
- package/dist/compiler/cache.cjs +331 -0
- package/dist/compiler/cache.cjs.map +1 -0
- package/dist/compiler/cache.mjs +323 -0
- package/dist/compiler/cache.mjs.map +1 -0
- package/dist/compiler/index.cjs +996 -0
- package/dist/compiler/index.cjs.map +1 -0
- package/dist/compiler/index.mjs +988 -0
- package/dist/compiler/index.mjs.map +1 -0
- package/dist/compiler/inputs.cjs +83 -0
- package/dist/compiler/inputs.cjs.map +1 -0
- package/dist/compiler/inputs.mjs +78 -0
- package/dist/compiler/inputs.mjs.map +1 -0
- package/dist/composer.cjs +28 -0
- package/dist/composer.d.cts +4 -0
- package/dist/composer.d.mts +4 -0
- package/dist/composer.mjs +4 -0
- package/dist/composition/harnessState/index.cjs +48 -0
- package/dist/composition/harnessState/index.cjs.map +1 -0
- package/dist/composition/harnessState/index.d.cts +19 -0
- package/dist/composition/harnessState/index.d.cts.map +1 -0
- package/dist/composition/harnessState/index.d.mts +19 -0
- package/dist/composition/harnessState/index.d.mts.map +1 -0
- package/dist/composition/harnessState/index.mjs +34 -0
- package/dist/composition/harnessState/index.mjs.map +1 -0
- package/dist/composition/layerPackageInstaller/index.cjs +342 -0
- package/dist/composition/layerPackageInstaller/index.cjs.map +1 -0
- package/dist/composition/layerPackageInstaller/index.d.cts +45 -0
- package/dist/composition/layerPackageInstaller/index.d.cts.map +1 -0
- package/dist/composition/layerPackageInstaller/index.d.mts +45 -0
- package/dist/composition/layerPackageInstaller/index.d.mts.map +1 -0
- package/dist/composition/layerPackageInstaller/index.mjs +334 -0
- package/dist/composition/layerPackageInstaller/index.mjs.map +1 -0
- package/dist/composition/projectTrust/index.cjs +51 -0
- package/dist/composition/projectTrust/index.cjs.map +1 -0
- package/dist/composition/projectTrust/index.d.cts +22 -0
- package/dist/composition/projectTrust/index.d.cts.map +1 -0
- package/dist/composition/projectTrust/index.d.mts +22 -0
- package/dist/composition/projectTrust/index.d.mts.map +1 -0
- package/dist/composition/projectTrust/index.mjs +48 -0
- package/dist/composition/projectTrust/index.mjs.map +1 -0
- package/dist/composition/repository/index.cjs +69 -0
- package/dist/composition/repository/index.cjs.map +1 -0
- package/dist/composition/repository/index.d.cts +22 -0
- package/dist/composition/repository/index.d.cts.map +1 -0
- package/dist/composition/repository/index.d.mts +22 -0
- package/dist/composition/repository/index.d.mts.map +1 -0
- package/dist/composition/repository/index.mjs +64 -0
- package/dist/composition/repository/index.mjs.map +1 -0
- package/dist/composition/syncDrift/index.cjs +160 -0
- package/dist/composition/syncDrift/index.cjs.map +1 -0
- package/dist/composition/syncDrift/index.d.cts +41 -0
- package/dist/composition/syncDrift/index.d.cts.map +1 -0
- package/dist/composition/syncDrift/index.d.mts +41 -0
- package/dist/composition/syncDrift/index.d.mts.map +1 -0
- package/dist/composition/syncDrift/index.mjs +152 -0
- package/dist/composition/syncDrift/index.mjs.map +1 -0
- package/dist/composition/syncState/index.cjs +593 -0
- package/dist/composition/syncState/index.cjs.map +1 -0
- package/dist/composition/syncState/index.d.cts +188 -0
- package/dist/composition/syncState/index.d.cts.map +1 -0
- package/dist/composition/syncState/index.d.mts +188 -0
- package/dist/composition/syncState/index.d.mts.map +1 -0
- package/dist/composition/syncState/index.mjs +559 -0
- package/dist/composition/syncState/index.mjs.map +1 -0
- package/dist/composition/transitionLayers.cjs +17 -0
- package/dist/composition/transitionLayers.cjs.map +1 -0
- package/dist/composition/transitionLayers.d.cts +6 -0
- package/dist/composition/transitionLayers.d.cts.map +1 -0
- package/dist/composition/transitionLayers.d.mts +6 -0
- package/dist/composition/transitionLayers.d.mts.map +1 -0
- package/dist/composition/transitionLayers.mjs +16 -0
- package/dist/composition/transitionLayers.mjs.map +1 -0
- package/dist/composition/types/harness.d.cts +49 -0
- package/dist/composition/types/harness.d.cts.map +1 -0
- package/dist/composition/types/harness.d.mts +49 -0
- package/dist/composition/types/harness.d.mts.map +1 -0
- package/dist/config.cjs +163 -0
- package/dist/config.d.cts +7 -0
- package/dist/config.d.mts +7 -0
- package/dist/config.mjs +7 -0
- package/dist/emit-mcp-command.cjs +4 -0
- package/dist/emit-mcp-command.d.cts +2 -0
- package/dist/emit-mcp-command.d.mts +2 -0
- package/dist/emit-mcp-command.mjs +2 -0
- package/dist/explain-command.cjs +5 -0
- package/dist/explain-command.d.cts +2 -0
- package/dist/explain-command.d.mts +2 -0
- package/dist/explain-command.mjs +2 -0
- package/dist/extensions/agent-model.cjs +41 -0
- package/dist/extensions/agent-model.cjs.map +1 -0
- package/dist/extensions/agent-model.d.cts +22 -0
- package/dist/extensions/agent-model.d.cts.map +1 -0
- package/dist/extensions/agent-model.d.mts +22 -0
- package/dist/extensions/agent-model.d.mts.map +1 -0
- package/dist/extensions/agent-model.mjs +35 -0
- package/dist/extensions/agent-model.mjs.map +1 -0
- package/dist/extensions/composed-pi.cjs +46 -0
- package/dist/extensions/composed-pi.cjs.map +1 -0
- package/dist/extensions/composed-pi.d.cts +13 -0
- package/dist/extensions/composed-pi.d.cts.map +1 -0
- package/dist/extensions/composed-pi.d.mts +13 -0
- package/dist/extensions/composed-pi.d.mts.map +1 -0
- package/dist/extensions/composed-pi.mjs +41 -0
- package/dist/extensions/composed-pi.mjs.map +1 -0
- package/dist/extensions/context-catalog.cjs +96 -0
- package/dist/extensions/context-catalog.cjs.map +1 -0
- package/dist/extensions/context-catalog.d.cts +4 -0
- package/dist/extensions/context-catalog.d.cts.map +1 -0
- package/dist/extensions/context-catalog.d.mts +5 -0
- package/dist/extensions/context-catalog.d.mts.map +1 -0
- package/dist/extensions/context-catalog.mjs +96 -0
- package/dist/extensions/context-catalog.mjs.map +1 -0
- package/dist/extensions/cordis-finalizer.cjs +24 -0
- package/dist/extensions/cordis-finalizer.cjs.map +1 -0
- package/dist/extensions/cordis-finalizer.d.cts +7 -0
- package/dist/extensions/cordis-finalizer.d.cts.map +1 -0
- package/dist/extensions/cordis-finalizer.d.mts +7 -0
- package/dist/extensions/cordis-finalizer.d.mts.map +1 -0
- package/dist/extensions/cordis-finalizer.mjs +19 -0
- package/dist/extensions/cordis-finalizer.mjs.map +1 -0
- package/dist/extensions/cordis-host.cjs +19 -0
- package/dist/extensions/cordis-host.cjs.map +1 -0
- package/dist/extensions/cordis-host.d.cts +7 -0
- package/dist/extensions/cordis-host.d.cts.map +1 -0
- package/dist/extensions/cordis-host.d.mts +7 -0
- package/dist/extensions/cordis-host.d.mts.map +1 -0
- package/dist/extensions/cordis-host.mjs +14 -0
- package/dist/extensions/cordis-host.mjs.map +1 -0
- package/dist/extensions/effort.cjs +54 -0
- package/dist/extensions/effort.cjs.map +1 -0
- package/dist/extensions/effort.d.cts +8 -0
- package/dist/extensions/effort.d.cts.map +1 -0
- package/dist/extensions/effort.d.mts +8 -0
- package/dist/extensions/effort.d.mts.map +1 -0
- package/dist/extensions/effort.mjs +48 -0
- package/dist/extensions/effort.mjs.map +1 -0
- package/dist/extensions/launcher-bootstrap.cjs +38 -0
- package/dist/extensions/launcher-bootstrap.cjs.map +1 -0
- package/dist/extensions/launcher-bootstrap.d.cts +16 -0
- package/dist/extensions/launcher-bootstrap.d.cts.map +1 -0
- package/dist/extensions/launcher-bootstrap.d.mts +16 -0
- package/dist/extensions/launcher-bootstrap.d.mts.map +1 -0
- package/dist/extensions/launcher-bootstrap.mjs +33 -0
- package/dist/extensions/launcher-bootstrap.mjs.map +1 -0
- package/dist/extensions/ollama-provider.cjs +32 -0
- package/dist/extensions/ollama-provider.cjs.map +1 -0
- package/dist/extensions/ollama-provider.d.cts +5 -0
- package/dist/extensions/ollama-provider.d.cts.map +1 -0
- package/dist/extensions/ollama-provider.d.mts +5 -0
- package/dist/extensions/ollama-provider.d.mts.map +1 -0
- package/dist/extensions/ollama-provider.mjs +32 -0
- package/dist/extensions/ollama-provider.mjs.map +1 -0
- package/dist/extensions/pi.cjs +63 -0
- package/dist/extensions/pi.cjs.map +1 -0
- package/dist/extensions/pi.d.cts +7 -0
- package/dist/extensions/pi.d.cts.map +1 -0
- package/dist/extensions/pi.d.mts +7 -0
- package/dist/extensions/pi.d.mts.map +1 -0
- package/dist/extensions/pi.mjs +58 -0
- package/dist/extensions/pi.mjs.map +1 -0
- package/dist/extensions/server.cjs +20 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.cts +5 -0
- package/dist/extensions/server.d.cts.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +15 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/extensions/style-system.cjs +234 -0
- package/dist/extensions/style-system.cjs.map +1 -0
- package/dist/extensions/style-system.d.cts +32 -0
- package/dist/extensions/style-system.d.cts.map +1 -0
- package/dist/extensions/style-system.d.mts +32 -0
- package/dist/extensions/style-system.d.mts.map +1 -0
- package/dist/extensions/style-system.mjs +219 -0
- package/dist/extensions/style-system.mjs.map +1 -0
- package/dist/extensions/terminal-child-session.cjs +76 -0
- package/dist/extensions/terminal-child-session.cjs.map +1 -0
- package/dist/extensions/terminal-child-session.d.cts +7 -0
- package/dist/extensions/terminal-child-session.d.cts.map +1 -0
- package/dist/extensions/terminal-child-session.d.mts +7 -0
- package/dist/extensions/terminal-child-session.d.mts.map +1 -0
- package/dist/extensions/terminal-child-session.mjs +69 -0
- package/dist/extensions/terminal-child-session.mjs.map +1 -0
- package/dist/extensions/transition-coordinator.cjs +154 -0
- package/dist/extensions/transition-coordinator.cjs.map +1 -0
- package/dist/extensions/transition-coordinator.d.cts +8 -0
- package/dist/extensions/transition-coordinator.d.cts.map +1 -0
- package/dist/extensions/transition-coordinator.d.mts +8 -0
- package/dist/extensions/transition-coordinator.d.mts.map +1 -0
- package/dist/extensions/transition-coordinator.mjs +146 -0
- package/dist/extensions/transition-coordinator.mjs.map +1 -0
- package/dist/harness-context.cjs +5 -0
- package/dist/harness-context.d.cts +2 -0
- package/dist/harness-context.d.mts +2 -0
- package/dist/harness-context.mjs +2 -0
- package/dist/harness-state.cjs +19 -0
- package/dist/harness-state.d.cts +2 -0
- package/dist/harness-state.d.mts +2 -0
- package/dist/harness-state.mjs +2 -0
- package/dist/help.cjs +16 -0
- package/dist/help.d.cts +8 -0
- package/dist/help.d.mts +8 -0
- package/dist/help.mjs +8 -0
- package/dist/index.cjs +368 -0
- package/dist/index.d.cts +49 -0
- package/dist/index.d.mts +49 -0
- package/dist/index.mjs +46 -0
- package/dist/init-command.cjs +4 -0
- package/dist/init-command.d.cts +2 -0
- package/dist/init-command.d.mts +2 -0
- package/dist/init-command.mjs +2 -0
- package/dist/launch-command.cjs +7 -0
- package/dist/launch-command.d.cts +2 -0
- package/dist/launch-command.d.mts +2 -0
- package/dist/launch-command.mjs +2 -0
- package/dist/matrix-options.cjs +28 -0
- package/dist/matrix-options.d.cts +2 -0
- package/dist/matrix-options.d.mts +2 -0
- package/dist/matrix-options.mjs +2 -0
- package/dist/matrix-switcher.cjs +11 -0
- package/dist/matrix-switcher.d.cts +3 -0
- package/dist/matrix-switcher.d.mts +3 -0
- package/dist/matrix-switcher.mjs +3 -0
- package/dist/mcp-filter.cjs +9 -0
- package/dist/mcp-filter.d.cts +1 -0
- package/dist/mcp-filter.d.mts +1 -0
- package/dist/mcp-filter.mjs +2 -0
- package/dist/options.cjs +3 -0
- package/dist/options.d.cts +2 -0
- package/dist/options.d.mts +2 -0
- package/dist/options.mjs +2 -0
- package/dist/process.cjs +12 -0
- package/dist/process.d.cts +2 -0
- package/dist/process.d.mts +2 -0
- package/dist/process.mjs +2 -0
- package/dist/project-trust.cjs +6 -0
- package/dist/project-trust.d.cts +2 -0
- package/dist/project-trust.d.mts +2 -0
- package/dist/project-trust.mjs +2 -0
- package/dist/repository.cjs +5 -0
- package/dist/repository.d.cts +2 -0
- package/dist/repository.d.mts +2 -0
- package/dist/repository.mjs +2 -0
- package/dist/resource-collector.cjs +9 -0
- package/dist/resource-collector.d.cts +1 -0
- package/dist/resource-collector.d.mts +1 -0
- package/dist/resource-collector.mjs +2 -0
- package/dist/services.cjs +154 -0
- package/dist/services.d.cts +21 -0
- package/dist/services.d.mts +21 -0
- package/dist/services.mjs +21 -0
- package/dist/shared.cjs +18 -0
- package/dist/shared.d.cts +2 -0
- package/dist/shared.d.mts +2 -0
- package/dist/shared.mjs +2 -0
- package/dist/sync-command.cjs +13 -0
- package/dist/sync-command.d.cts +2 -0
- package/dist/sync-command.d.mts +2 -0
- package/dist/sync-command.mjs +2 -0
- package/dist/sync-state.cjs +33 -0
- package/dist/sync-state.d.cts +2 -0
- package/dist/sync-state.d.mts +2 -0
- package/dist/sync-state.mjs +2 -0
- package/dist/utils.cjs +6 -0
- package/dist/utils.d.cts +3 -0
- package/dist/utils.d.mts +3 -0
- package/dist/utils.mjs +3 -0
- package/package.json +16 -16
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_webPluginScan = require("./webPluginScan.cjs");
|
|
3
|
+
let node_fs = require("node:fs");
|
|
4
|
+
node_fs = require_runtime.__toESM(node_fs, 1);
|
|
5
|
+
let node_path = require("node:path");
|
|
6
|
+
node_path = require_runtime.__toESM(node_path, 1);
|
|
7
|
+
let node_url = require("node:url");
|
|
8
|
+
//#region src/builders/web/webPluginGenerate.ts
|
|
9
|
+
const HEADER = "// Generated by doompi web builder. Do not edit by hand.";
|
|
10
|
+
const BUILTIN_CLIENT_MODULE = node_path.default.join("src", "web", "app", "webPlugins.generated.ts");
|
|
11
|
+
const BUILTIN_CSS_MODULE = node_path.default.join("src", "web", "styles", "webPluginSources.generated.css");
|
|
12
|
+
function camel(pluginId) {
|
|
13
|
+
return pluginId.replace(/-([a-z0-9])/g, (_, ch) => ch.toUpperCase());
|
|
14
|
+
}
|
|
15
|
+
function relativeImport(fromDir, toFile) {
|
|
16
|
+
const spec = node_path.default.relative(fromDir, toFile).split(node_path.default.sep).join("/");
|
|
17
|
+
return spec.startsWith(".") ? spec : `./${spec}`;
|
|
18
|
+
}
|
|
19
|
+
function renderClientModule(plugins, style, packageRoot) {
|
|
20
|
+
const lines = [HEADER, "import type { WebPluginDefinition } from '@agimon-ai/doompi-core/web';"];
|
|
21
|
+
const names = [];
|
|
22
|
+
const fromDir = node_path.default.join(packageRoot, "src", "web", "app");
|
|
23
|
+
for (const plugin of plugins) {
|
|
24
|
+
const name = `${camel(plugin.pluginId)}Plugin`;
|
|
25
|
+
names.push(name);
|
|
26
|
+
const entry = node_path.default.join(plugin.packageDir, plugin.client.entry);
|
|
27
|
+
const specifier = style === "relative" ? relativeImport(fromDir, entry) : (0, node_url.pathToFileURL)(entry).href;
|
|
28
|
+
lines.push(`import { webPlugin as ${name} } from '${specifier}';`);
|
|
29
|
+
}
|
|
30
|
+
lines.push("", `export const webPlugins: readonly WebPluginDefinition[] = [${names.join(", ")}];`, "");
|
|
31
|
+
return lines.join("\n");
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The directory Tailwind scans for a plugin's class names.
|
|
35
|
+
*
|
|
36
|
+
* `src/extensions` wins, because a plugin's components colocate with the routed
|
|
37
|
+
* file that renders them, in private `_components` and `_lib` folders. The
|
|
38
|
+
* legacy `src/web` root is only a fallback: `existsSync` is true for a
|
|
39
|
+
* half-emptied directory holding nothing but a tsconfig, and packages have been
|
|
40
|
+
* in exactly that state, so preferring it would hand Tailwind a directory with
|
|
41
|
+
* no components in it and silently drop every class.
|
|
42
|
+
*
|
|
43
|
+
* The client entry's own directory is the last resort. It is published through
|
|
44
|
+
* `src/exports/webClient.ts`, a one-line re-export, or generated outside `src`
|
|
45
|
+
* entirely, so it holds no components either.
|
|
46
|
+
*/
|
|
47
|
+
function pluginSourceRoot(plugin) {
|
|
48
|
+
const routingRoot = node_path.default.join(plugin.packageDir, "src", "extensions");
|
|
49
|
+
if (node_fs.default.existsSync(routingRoot)) return routingRoot;
|
|
50
|
+
const webRoot = node_path.default.join(plugin.packageDir, "src", "web");
|
|
51
|
+
if (node_fs.default.existsSync(webRoot)) return webRoot;
|
|
52
|
+
return node_path.default.dirname(node_path.default.join(plugin.packageDir, plugin.client.entry));
|
|
53
|
+
}
|
|
54
|
+
function renderCssModule(plugins, leadingSourceRoots) {
|
|
55
|
+
const lines = [`/* ${HEADER.slice(3)} */`, ...leadingSourceRoots.map((root) => `@source "${root}";`)];
|
|
56
|
+
for (const plugin of plugins) {
|
|
57
|
+
if (plugin.isHost) continue;
|
|
58
|
+
lines.push(`@source "${pluginSourceRoot(plugin)}";`);
|
|
59
|
+
}
|
|
60
|
+
lines.push("");
|
|
61
|
+
return lines.join("\n");
|
|
62
|
+
}
|
|
63
|
+
/** The committed client registry, rendered from the host package alone. */
|
|
64
|
+
function renderBuiltinWebPluginModules(packageRoot) {
|
|
65
|
+
const plugins = require_webPluginScan.scanWebPlugins(packageRoot);
|
|
66
|
+
return /* @__PURE__ */ new Map([[BUILTIN_CLIENT_MODULE, renderClientModule(plugins, "relative", packageRoot)], [BUILTIN_CSS_MODULE, renderCssModule(plugins, [])]]);
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Keeps the committed client registry fresh: write-if-changed locally,
|
|
70
|
+
* check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call
|
|
71
|
+
* this at config-load time.
|
|
72
|
+
*/
|
|
73
|
+
function ensureBuiltinWebPluginModules({ packageRoot, check = false }) {
|
|
74
|
+
const stale = [];
|
|
75
|
+
for (const [relativePath, content] of renderBuiltinWebPluginModules(packageRoot)) {
|
|
76
|
+
const filePath = node_path.default.join(packageRoot, relativePath);
|
|
77
|
+
if ((node_fs.default.existsSync(filePath) ? node_fs.default.readFileSync(filePath, "utf8") : void 0) === content) continue;
|
|
78
|
+
if (check) {
|
|
79
|
+
stale.push(relativePath);
|
|
80
|
+
continue;
|
|
81
|
+
}
|
|
82
|
+
node_fs.default.mkdirSync(node_path.default.dirname(filePath), { recursive: true });
|
|
83
|
+
node_fs.default.writeFileSync(filePath, content);
|
|
84
|
+
}
|
|
85
|
+
if (stale.length > 0) throw new Error(`Stale generated web plugin modules: ${stale.join(", ")}. Run pnpm build in doompi-web and commit them.`);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* The sync-time variant: renders the full client plugin set (host built-ins plus
|
|
89
|
+
* the installed composition's packages) into a generation directory the bundler
|
|
90
|
+
* aliases over the committed builtin modules.
|
|
91
|
+
*/
|
|
92
|
+
function writeSyncWebPluginModules(plugins, generatedDir, packageRoot) {
|
|
93
|
+
node_fs.default.mkdirSync(generatedDir, { recursive: true });
|
|
94
|
+
const clientModulePath = node_path.default.join(generatedDir, "webPlugins.generated.ts");
|
|
95
|
+
const compositionModulePath = node_path.default.join(generatedDir, "webPluginComposition.generated.ts");
|
|
96
|
+
const cssModulePath = node_path.default.join(generatedDir, "webPluginSources.generated.css");
|
|
97
|
+
node_fs.default.writeFileSync(clientModulePath, renderClientModule(plugins, "absolute", packageRoot));
|
|
98
|
+
node_fs.default.writeFileSync(compositionModulePath, `${HEADER}\nimport '${(0, node_url.pathToFileURL)(node_path.default.join(packageRoot, "src", "web", "styles", "app.css")).href}';\nimport { webPlugins } from './webPlugins.generated.ts';\n\nglobalThis.DoomPiWebPluginComposition = webPlugins;\n`);
|
|
99
|
+
node_fs.default.writeFileSync(cssModulePath, renderCssModule(plugins, [node_path.default.join(packageRoot, "src", "web")]));
|
|
100
|
+
return {
|
|
101
|
+
clientModulePath,
|
|
102
|
+
compositionModulePath,
|
|
103
|
+
cssModulePath
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
//#endregion
|
|
107
|
+
exports.BUILTIN_CLIENT_MODULE = BUILTIN_CLIENT_MODULE;
|
|
108
|
+
exports.BUILTIN_CSS_MODULE = BUILTIN_CSS_MODULE;
|
|
109
|
+
exports.ensureBuiltinWebPluginModules = ensureBuiltinWebPluginModules;
|
|
110
|
+
exports.renderBuiltinWebPluginModules = renderBuiltinWebPluginModules;
|
|
111
|
+
exports.writeSyncWebPluginModules = writeSyncWebPluginModules;
|
|
112
|
+
|
|
113
|
+
//# sourceMappingURL=webPluginGenerate.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginGenerate.cjs","names":["path","pathToFileURL","fs","scanWebPlugins"],"sources":["../../../src/builders/web/webPluginGenerate.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nimport type { DeclaredWebPlugin } from './webPluginManifest';\nimport { scanWebPlugins } from './webPluginScan';\n\nconst HEADER = '// Generated by doompi web builder. Do not edit by hand.';\nexport const BUILTIN_CLIENT_MODULE = path.join('src', 'web', 'app', 'webPlugins.generated.ts');\nexport const BUILTIN_CSS_MODULE = path.join('src', 'web', 'styles', 'webPluginSources.generated.css');\n\nfunction camel(pluginId: string): string {\n return pluginId.replace(/-([a-z0-9])/g, (_, ch: string) => ch.toUpperCase());\n}\n\nfunction relativeImport(fromDir: string, toFile: string): string {\n const spec = path.relative(fromDir, toFile).split(path.sep).join('/');\n return spec.startsWith('.') ? spec : `./${spec}`;\n}\n\nfunction renderClientModule(\n plugins: readonly DeclaredWebPlugin[],\n style: 'relative' | 'absolute',\n packageRoot: string,\n): string {\n const lines = [HEADER, \"import type { WebPluginDefinition } from '@agimon-ai/doompi-core/web';\"];\n const names: string[] = [];\n const fromDir = path.join(packageRoot, 'src', 'web', 'app');\n for (const plugin of plugins) {\n const name = `${camel(plugin.pluginId)}Plugin`;\n names.push(name);\n const entry = path.join(plugin.packageDir, plugin.client.entry);\n // The committed builtin module keeps machine-neutral relative imports; the\n // sync-generated module lives outside src, is aliased over the committed\n // path, and resolves imports against its real location, so every entry\n // becomes an absolute file URL into the installed packages.\n const specifier = style === 'relative' ? relativeImport(fromDir, entry) : pathToFileURL(entry).href;\n lines.push(`import { webPlugin as ${name} } from '${specifier}';`);\n }\n lines.push('', `export const webPlugins: readonly WebPluginDefinition[] = [${names.join(', ')}];`, '');\n return lines.join('\\n');\n}\n\n/**\n * The directory Tailwind scans for a plugin's class names.\n *\n * `src/extensions` wins, because a plugin's components colocate with the routed\n * file that renders them, in private `_components` and `_lib` folders. The\n * legacy `src/web` root is only a fallback: `existsSync` is true for a\n * half-emptied directory holding nothing but a tsconfig, and packages have been\n * in exactly that state, so preferring it would hand Tailwind a directory with\n * no components in it and silently drop every class.\n *\n * The client entry's own directory is the last resort. It is published through\n * `src/exports/webClient.ts`, a one-line re-export, or generated outside `src`\n * entirely, so it holds no components either.\n */\nfunction pluginSourceRoot(plugin: DeclaredWebPlugin): string {\n const routingRoot = path.join(plugin.packageDir, 'src', 'extensions');\n if (fs.existsSync(routingRoot)) return routingRoot;\n const webRoot = path.join(plugin.packageDir, 'src', 'web');\n if (fs.existsSync(webRoot)) return webRoot;\n return path.dirname(path.join(plugin.packageDir, plugin.client.entry));\n}\n\nfunction renderCssModule(plugins: readonly DeclaredWebPlugin[], leadingSourceRoots: readonly string[]): string {\n // Sync CSS is compiled from a generated directory, so Tailwind cannot infer\n // the stable shell tree from app.css. Its caller names that tree explicitly\n // so later plugin utilities do not override missing responsive shell utilities.\n const lines = [`/* ${HEADER.slice(3)} */`, ...leadingSourceRoots.map((root) => `@source \"${root}\";`)];\n for (const plugin of plugins) {\n if (plugin.isHost) continue;\n lines.push(`@source \"${pluginSourceRoot(plugin)}\";`);\n }\n lines.push('');\n return lines.join('\\n');\n}\n\n/** The committed client registry, rendered from the host package alone. */\nexport function renderBuiltinWebPluginModules(packageRoot: string): Map<string, string> {\n const plugins = scanWebPlugins(packageRoot);\n return new Map([\n [BUILTIN_CLIENT_MODULE, renderClientModule(plugins, 'relative', packageRoot)],\n [BUILTIN_CSS_MODULE, renderCssModule(plugins, [])],\n ]);\n}\n\n/**\n * Keeps the committed client registry fresh: write-if-changed locally,\n * check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call\n * this at config-load time.\n */\nexport function ensureBuiltinWebPluginModules({\n packageRoot,\n check = false,\n}: {\n packageRoot: string;\n check?: boolean;\n}): void {\n const stale: string[] = [];\n for (const [relativePath, content] of renderBuiltinWebPluginModules(packageRoot)) {\n const filePath = path.join(packageRoot, relativePath);\n const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : undefined;\n if (existing === content) continue;\n if (check) {\n stale.push(relativePath);\n continue;\n }\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, content);\n }\n if (stale.length > 0) {\n throw new Error(\n `Stale generated web plugin modules: ${stale.join(', ')}. Run pnpm build in doompi-web and commit them.`,\n );\n }\n}\n\nexport interface SyncGeneratedModules {\n clientModulePath: string;\n compositionModulePath: string;\n cssModulePath: string;\n}\n\n/**\n * The sync-time variant: renders the full client plugin set (host built-ins plus\n * the installed composition's packages) into a generation directory the bundler\n * aliases over the committed builtin modules.\n */\nexport function writeSyncWebPluginModules(\n plugins: readonly DeclaredWebPlugin[],\n generatedDir: string,\n packageRoot: string,\n): SyncGeneratedModules {\n fs.mkdirSync(generatedDir, { recursive: true });\n const clientModulePath = path.join(generatedDir, 'webPlugins.generated.ts');\n const compositionModulePath = path.join(generatedDir, 'webPluginComposition.generated.ts');\n const cssModulePath = path.join(generatedDir, 'webPluginSources.generated.css');\n fs.writeFileSync(clientModulePath, renderClientModule(plugins, 'absolute', packageRoot));\n fs.writeFileSync(\n compositionModulePath,\n `${HEADER}\\nimport '${pathToFileURL(path.join(packageRoot, 'src', 'web', 'styles', 'app.css')).href}';\\nimport { webPlugins } from './webPlugins.generated.ts';\\n\\nglobalThis.DoomPiWebPluginComposition = webPlugins;\\n`,\n );\n fs.writeFileSync(cssModulePath, renderCssModule(plugins, [path.join(packageRoot, 'src', 'web')]));\n return {\n clientModulePath,\n compositionModulePath,\n cssModulePath,\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DeclaredWebPlugin } from "./webPluginManifest.cjs";
|
|
2
|
+
//#region src/builders/web/webPluginGenerate.d.ts
|
|
3
|
+
export declare const BUILTIN_CLIENT_MODULE: string;
|
|
4
|
+
export declare const BUILTIN_CSS_MODULE: string;
|
|
5
|
+
/** The committed client registry, rendered from the host package alone. */
|
|
6
|
+
export declare function renderBuiltinWebPluginModules(packageRoot: string): Map<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Keeps the committed client registry fresh: write-if-changed locally,
|
|
9
|
+
* check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call
|
|
10
|
+
* this at config-load time.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ensureBuiltinWebPluginModules({ packageRoot, check }: {
|
|
13
|
+
packageRoot: string;
|
|
14
|
+
check?: boolean;
|
|
15
|
+
}): void;
|
|
16
|
+
export interface SyncGeneratedModules {
|
|
17
|
+
clientModulePath: string;
|
|
18
|
+
compositionModulePath: string;
|
|
19
|
+
cssModulePath: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The sync-time variant: renders the full client plugin set (host built-ins plus
|
|
23
|
+
* the installed composition's packages) into a generation directory the bundler
|
|
24
|
+
* aliases over the committed builtin modules.
|
|
25
|
+
*/
|
|
26
|
+
export declare function writeSyncWebPluginModules(plugins: readonly DeclaredWebPlugin[], generatedDir: string, packageRoot: string): SyncGeneratedModules;
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=webPluginGenerate.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginGenerate.d.cts","names":[],"sources":["../../../src/builders/web/webPluginGenerate.ts"],"mappings":";;qBAQa;qBACA;;wBAsEG,8BAA8B,sBAAsB;;;;;;wBAapD,gCACd,aACA;EAEA;EACA;;iBAqBe;EACf;EACA;EACA;;;;;;;wBAQc,0BACd,kBAAkB,qBAClB,sBACA,sBACC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DeclaredWebPlugin } from "./webPluginManifest.mjs";
|
|
2
|
+
//#region src/builders/web/webPluginGenerate.d.ts
|
|
3
|
+
export declare const BUILTIN_CLIENT_MODULE: string;
|
|
4
|
+
export declare const BUILTIN_CSS_MODULE: string;
|
|
5
|
+
/** The committed client registry, rendered from the host package alone. */
|
|
6
|
+
export declare function renderBuiltinWebPluginModules(packageRoot: string): Map<string, string>;
|
|
7
|
+
/**
|
|
8
|
+
* Keeps the committed client registry fresh: write-if-changed locally,
|
|
9
|
+
* check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call
|
|
10
|
+
* this at config-load time.
|
|
11
|
+
*/
|
|
12
|
+
export declare function ensureBuiltinWebPluginModules({ packageRoot, check }: {
|
|
13
|
+
packageRoot: string;
|
|
14
|
+
check?: boolean;
|
|
15
|
+
}): void;
|
|
16
|
+
export interface SyncGeneratedModules {
|
|
17
|
+
clientModulePath: string;
|
|
18
|
+
compositionModulePath: string;
|
|
19
|
+
cssModulePath: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The sync-time variant: renders the full client plugin set (host built-ins plus
|
|
23
|
+
* the installed composition's packages) into a generation directory the bundler
|
|
24
|
+
* aliases over the committed builtin modules.
|
|
25
|
+
*/
|
|
26
|
+
export declare function writeSyncWebPluginModules(plugins: readonly DeclaredWebPlugin[], generatedDir: string, packageRoot: string): SyncGeneratedModules;
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=webPluginGenerate.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginGenerate.d.mts","names":[],"sources":["../../../src/builders/web/webPluginGenerate.ts"],"mappings":";;qBAQa;qBACA;;wBAsEG,8BAA8B,sBAAsB;;;;;;wBAapD,gCACd,aACA;EAEA;EACA;;iBAqBe;EACf;EACA;EACA;;;;;;;wBAQc,0BACd,kBAAkB,qBAClB,sBACA,sBACC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { scanWebPlugins } from "./webPluginScan.mjs";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { pathToFileURL } from "node:url";
|
|
5
|
+
//#region src/builders/web/webPluginGenerate.ts
|
|
6
|
+
const HEADER = "// Generated by doompi web builder. Do not edit by hand.";
|
|
7
|
+
const BUILTIN_CLIENT_MODULE = path.join("src", "web", "app", "webPlugins.generated.ts");
|
|
8
|
+
const BUILTIN_CSS_MODULE = path.join("src", "web", "styles", "webPluginSources.generated.css");
|
|
9
|
+
function camel(pluginId) {
|
|
10
|
+
return pluginId.replace(/-([a-z0-9])/g, (_, ch) => ch.toUpperCase());
|
|
11
|
+
}
|
|
12
|
+
function relativeImport(fromDir, toFile) {
|
|
13
|
+
const spec = path.relative(fromDir, toFile).split(path.sep).join("/");
|
|
14
|
+
return spec.startsWith(".") ? spec : `./${spec}`;
|
|
15
|
+
}
|
|
16
|
+
function renderClientModule(plugins, style, packageRoot) {
|
|
17
|
+
const lines = [HEADER, "import type { WebPluginDefinition } from '@agimon-ai/doompi-core/web';"];
|
|
18
|
+
const names = [];
|
|
19
|
+
const fromDir = path.join(packageRoot, "src", "web", "app");
|
|
20
|
+
for (const plugin of plugins) {
|
|
21
|
+
const name = `${camel(plugin.pluginId)}Plugin`;
|
|
22
|
+
names.push(name);
|
|
23
|
+
const entry = path.join(plugin.packageDir, plugin.client.entry);
|
|
24
|
+
const specifier = style === "relative" ? relativeImport(fromDir, entry) : pathToFileURL(entry).href;
|
|
25
|
+
lines.push(`import { webPlugin as ${name} } from '${specifier}';`);
|
|
26
|
+
}
|
|
27
|
+
lines.push("", `export const webPlugins: readonly WebPluginDefinition[] = [${names.join(", ")}];`, "");
|
|
28
|
+
return lines.join("\n");
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* The directory Tailwind scans for a plugin's class names.
|
|
32
|
+
*
|
|
33
|
+
* `src/extensions` wins, because a plugin's components colocate with the routed
|
|
34
|
+
* file that renders them, in private `_components` and `_lib` folders. The
|
|
35
|
+
* legacy `src/web` root is only a fallback: `existsSync` is true for a
|
|
36
|
+
* half-emptied directory holding nothing but a tsconfig, and packages have been
|
|
37
|
+
* in exactly that state, so preferring it would hand Tailwind a directory with
|
|
38
|
+
* no components in it and silently drop every class.
|
|
39
|
+
*
|
|
40
|
+
* The client entry's own directory is the last resort. It is published through
|
|
41
|
+
* `src/exports/webClient.ts`, a one-line re-export, or generated outside `src`
|
|
42
|
+
* entirely, so it holds no components either.
|
|
43
|
+
*/
|
|
44
|
+
function pluginSourceRoot(plugin) {
|
|
45
|
+
const routingRoot = path.join(plugin.packageDir, "src", "extensions");
|
|
46
|
+
if (fs.existsSync(routingRoot)) return routingRoot;
|
|
47
|
+
const webRoot = path.join(plugin.packageDir, "src", "web");
|
|
48
|
+
if (fs.existsSync(webRoot)) return webRoot;
|
|
49
|
+
return path.dirname(path.join(plugin.packageDir, plugin.client.entry));
|
|
50
|
+
}
|
|
51
|
+
function renderCssModule(plugins, leadingSourceRoots) {
|
|
52
|
+
const lines = [`/* ${HEADER.slice(3)} */`, ...leadingSourceRoots.map((root) => `@source "${root}";`)];
|
|
53
|
+
for (const plugin of plugins) {
|
|
54
|
+
if (plugin.isHost) continue;
|
|
55
|
+
lines.push(`@source "${pluginSourceRoot(plugin)}";`);
|
|
56
|
+
}
|
|
57
|
+
lines.push("");
|
|
58
|
+
return lines.join("\n");
|
|
59
|
+
}
|
|
60
|
+
/** The committed client registry, rendered from the host package alone. */
|
|
61
|
+
function renderBuiltinWebPluginModules(packageRoot) {
|
|
62
|
+
const plugins = scanWebPlugins(packageRoot);
|
|
63
|
+
return /* @__PURE__ */ new Map([[BUILTIN_CLIENT_MODULE, renderClientModule(plugins, "relative", packageRoot)], [BUILTIN_CSS_MODULE, renderCssModule(plugins, [])]]);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Keeps the committed client registry fresh: write-if-changed locally,
|
|
67
|
+
* check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call
|
|
68
|
+
* this at config-load time.
|
|
69
|
+
*/
|
|
70
|
+
function ensureBuiltinWebPluginModules({ packageRoot, check = false }) {
|
|
71
|
+
const stale = [];
|
|
72
|
+
for (const [relativePath, content] of renderBuiltinWebPluginModules(packageRoot)) {
|
|
73
|
+
const filePath = path.join(packageRoot, relativePath);
|
|
74
|
+
if ((fs.existsSync(filePath) ? fs.readFileSync(filePath, "utf8") : void 0) === content) continue;
|
|
75
|
+
if (check) {
|
|
76
|
+
stale.push(relativePath);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
80
|
+
fs.writeFileSync(filePath, content);
|
|
81
|
+
}
|
|
82
|
+
if (stale.length > 0) throw new Error(`Stale generated web plugin modules: ${stale.join(", ")}. Run pnpm build in doompi-web and commit them.`);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* The sync-time variant: renders the full client plugin set (host built-ins plus
|
|
86
|
+
* the installed composition's packages) into a generation directory the bundler
|
|
87
|
+
* aliases over the committed builtin modules.
|
|
88
|
+
*/
|
|
89
|
+
function writeSyncWebPluginModules(plugins, generatedDir, packageRoot) {
|
|
90
|
+
fs.mkdirSync(generatedDir, { recursive: true });
|
|
91
|
+
const clientModulePath = path.join(generatedDir, "webPlugins.generated.ts");
|
|
92
|
+
const compositionModulePath = path.join(generatedDir, "webPluginComposition.generated.ts");
|
|
93
|
+
const cssModulePath = path.join(generatedDir, "webPluginSources.generated.css");
|
|
94
|
+
fs.writeFileSync(clientModulePath, renderClientModule(plugins, "absolute", packageRoot));
|
|
95
|
+
fs.writeFileSync(compositionModulePath, `${HEADER}\nimport '${pathToFileURL(path.join(packageRoot, "src", "web", "styles", "app.css")).href}';\nimport { webPlugins } from './webPlugins.generated.ts';\n\nglobalThis.DoomPiWebPluginComposition = webPlugins;\n`);
|
|
96
|
+
fs.writeFileSync(cssModulePath, renderCssModule(plugins, [path.join(packageRoot, "src", "web")]));
|
|
97
|
+
return {
|
|
98
|
+
clientModulePath,
|
|
99
|
+
compositionModulePath,
|
|
100
|
+
cssModulePath
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
export { BUILTIN_CLIENT_MODULE, BUILTIN_CSS_MODULE, ensureBuiltinWebPluginModules, renderBuiltinWebPluginModules, writeSyncWebPluginModules };
|
|
105
|
+
|
|
106
|
+
//# sourceMappingURL=webPluginGenerate.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginGenerate.mjs","names":[],"sources":["../../../src/builders/web/webPluginGenerate.ts"],"sourcesContent":["import fs from 'node:fs';\nimport path from 'node:path';\nimport { pathToFileURL } from 'node:url';\n\nimport type { DeclaredWebPlugin } from './webPluginManifest';\nimport { scanWebPlugins } from './webPluginScan';\n\nconst HEADER = '// Generated by doompi web builder. Do not edit by hand.';\nexport const BUILTIN_CLIENT_MODULE = path.join('src', 'web', 'app', 'webPlugins.generated.ts');\nexport const BUILTIN_CSS_MODULE = path.join('src', 'web', 'styles', 'webPluginSources.generated.css');\n\nfunction camel(pluginId: string): string {\n return pluginId.replace(/-([a-z0-9])/g, (_, ch: string) => ch.toUpperCase());\n}\n\nfunction relativeImport(fromDir: string, toFile: string): string {\n const spec = path.relative(fromDir, toFile).split(path.sep).join('/');\n return spec.startsWith('.') ? spec : `./${spec}`;\n}\n\nfunction renderClientModule(\n plugins: readonly DeclaredWebPlugin[],\n style: 'relative' | 'absolute',\n packageRoot: string,\n): string {\n const lines = [HEADER, \"import type { WebPluginDefinition } from '@agimon-ai/doompi-core/web';\"];\n const names: string[] = [];\n const fromDir = path.join(packageRoot, 'src', 'web', 'app');\n for (const plugin of plugins) {\n const name = `${camel(plugin.pluginId)}Plugin`;\n names.push(name);\n const entry = path.join(plugin.packageDir, plugin.client.entry);\n // The committed builtin module keeps machine-neutral relative imports; the\n // sync-generated module lives outside src, is aliased over the committed\n // path, and resolves imports against its real location, so every entry\n // becomes an absolute file URL into the installed packages.\n const specifier = style === 'relative' ? relativeImport(fromDir, entry) : pathToFileURL(entry).href;\n lines.push(`import { webPlugin as ${name} } from '${specifier}';`);\n }\n lines.push('', `export const webPlugins: readonly WebPluginDefinition[] = [${names.join(', ')}];`, '');\n return lines.join('\\n');\n}\n\n/**\n * The directory Tailwind scans for a plugin's class names.\n *\n * `src/extensions` wins, because a plugin's components colocate with the routed\n * file that renders them, in private `_components` and `_lib` folders. The\n * legacy `src/web` root is only a fallback: `existsSync` is true for a\n * half-emptied directory holding nothing but a tsconfig, and packages have been\n * in exactly that state, so preferring it would hand Tailwind a directory with\n * no components in it and silently drop every class.\n *\n * The client entry's own directory is the last resort. It is published through\n * `src/exports/webClient.ts`, a one-line re-export, or generated outside `src`\n * entirely, so it holds no components either.\n */\nfunction pluginSourceRoot(plugin: DeclaredWebPlugin): string {\n const routingRoot = path.join(plugin.packageDir, 'src', 'extensions');\n if (fs.existsSync(routingRoot)) return routingRoot;\n const webRoot = path.join(plugin.packageDir, 'src', 'web');\n if (fs.existsSync(webRoot)) return webRoot;\n return path.dirname(path.join(plugin.packageDir, plugin.client.entry));\n}\n\nfunction renderCssModule(plugins: readonly DeclaredWebPlugin[], leadingSourceRoots: readonly string[]): string {\n // Sync CSS is compiled from a generated directory, so Tailwind cannot infer\n // the stable shell tree from app.css. Its caller names that tree explicitly\n // so later plugin utilities do not override missing responsive shell utilities.\n const lines = [`/* ${HEADER.slice(3)} */`, ...leadingSourceRoots.map((root) => `@source \"${root}\";`)];\n for (const plugin of plugins) {\n if (plugin.isHost) continue;\n lines.push(`@source \"${pluginSourceRoot(plugin)}\";`);\n }\n lines.push('');\n return lines.join('\\n');\n}\n\n/** The committed client registry, rendered from the host package alone. */\nexport function renderBuiltinWebPluginModules(packageRoot: string): Map<string, string> {\n const plugins = scanWebPlugins(packageRoot);\n return new Map([\n [BUILTIN_CLIENT_MODULE, renderClientModule(plugins, 'relative', packageRoot)],\n [BUILTIN_CSS_MODULE, renderCssModule(plugins, [])],\n ]);\n}\n\n/**\n * Keeps the committed client registry fresh: write-if-changed locally,\n * check-only (throw) in CI. Both vite.config.ts and tsdown.config.ts call\n * this at config-load time.\n */\nexport function ensureBuiltinWebPluginModules({\n packageRoot,\n check = false,\n}: {\n packageRoot: string;\n check?: boolean;\n}): void {\n const stale: string[] = [];\n for (const [relativePath, content] of renderBuiltinWebPluginModules(packageRoot)) {\n const filePath = path.join(packageRoot, relativePath);\n const existing = fs.existsSync(filePath) ? fs.readFileSync(filePath, 'utf8') : undefined;\n if (existing === content) continue;\n if (check) {\n stale.push(relativePath);\n continue;\n }\n fs.mkdirSync(path.dirname(filePath), { recursive: true });\n fs.writeFileSync(filePath, content);\n }\n if (stale.length > 0) {\n throw new Error(\n `Stale generated web plugin modules: ${stale.join(', ')}. Run pnpm build in doompi-web and commit them.`,\n );\n }\n}\n\nexport interface SyncGeneratedModules {\n clientModulePath: string;\n compositionModulePath: string;\n cssModulePath: string;\n}\n\n/**\n * The sync-time variant: renders the full client plugin set (host built-ins plus\n * the installed composition's packages) into a generation directory the bundler\n * aliases over the committed builtin modules.\n */\nexport function writeSyncWebPluginModules(\n plugins: readonly DeclaredWebPlugin[],\n generatedDir: string,\n packageRoot: string,\n): SyncGeneratedModules {\n fs.mkdirSync(generatedDir, { recursive: true });\n const clientModulePath = path.join(generatedDir, 'webPlugins.generated.ts');\n const compositionModulePath = path.join(generatedDir, 'webPluginComposition.generated.ts');\n const cssModulePath = path.join(generatedDir, 'webPluginSources.generated.css');\n fs.writeFileSync(clientModulePath, renderClientModule(plugins, 'absolute', packageRoot));\n fs.writeFileSync(\n compositionModulePath,\n `${HEADER}\\nimport '${pathToFileURL(path.join(packageRoot, 'src', 'web', 'styles', 'app.css')).href}';\\nimport { webPlugins } from './webPlugins.generated.ts';\\n\\nglobalThis.DoomPiWebPluginComposition = webPlugins;\\n`,\n );\n fs.writeFileSync(cssModulePath, renderCssModule(plugins, [path.join(packageRoot, 'src', 'web')]));\n return {\n clientModulePath,\n compositionModulePath,\n cssModulePath,\n };\n}\n"],"mappings":"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"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
//#region src/builders/web/webPluginManifest.ts
|
|
2
|
+
/**
|
|
3
|
+
* The doompiWeb manifest vocabulary: how a package declares its web plugin in
|
|
4
|
+
* package.json, validated and ordered without touching the filesystem. The
|
|
5
|
+
* scan adapter feeds this from real manifests; the sync bundler feeds it from
|
|
6
|
+
* the installed composition's package roots.
|
|
7
|
+
*
|
|
8
|
+
* Plugins are independent: a manifest names no other plugin, and the order
|
|
9
|
+
* plugins install in is only a tiebreak (registrationOrder, then pluginId),
|
|
10
|
+
* because every relation between two plugins resolves by name once all of
|
|
11
|
+
* them are installed. A collision between two packages is a notice for the
|
|
12
|
+
* sync log and the first package keeps the name; only a malformed block is an
|
|
13
|
+
* error, which the scanner turns into a notice for that package alone.
|
|
14
|
+
*/
|
|
15
|
+
const PLUGIN_ID_PATTERN = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
16
|
+
/** The order a plugin installs at when its manifest names none. */
|
|
17
|
+
const DEFAULT_REGISTRATION_ORDER = 1e3;
|
|
18
|
+
var WebPluginManifestError = class extends Error {
|
|
19
|
+
constructor(packageDir, message) {
|
|
20
|
+
super(`doompiWeb manifest in ${packageDir}: ${message}`);
|
|
21
|
+
this.name = "WebPluginManifestError";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function isRecord(value) {
|
|
25
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26
|
+
}
|
|
27
|
+
function normalizeEntry(packageDir, kind, value) {
|
|
28
|
+
const raw = typeof value === "string" ? { entry: value } : value;
|
|
29
|
+
if (!isRecord(raw)) throw new WebPluginManifestError(packageDir, `${kind} must be a path or {entry}.`);
|
|
30
|
+
const { entry } = raw;
|
|
31
|
+
if (typeof entry !== "string" || !entry.startsWith("./") || entry.includes("..")) throw new WebPluginManifestError(packageDir, `${kind}.entry must be a package-relative ./path with no '..'.`);
|
|
32
|
+
return { entry };
|
|
33
|
+
}
|
|
34
|
+
/** The doompiWeb value normalized to a list: one plugin object or an array of them. */
|
|
35
|
+
function pluginBlocksOf(manifest) {
|
|
36
|
+
if (manifest.doompiWeb === void 0) return [];
|
|
37
|
+
return Array.isArray(manifest.doompiWeb) ? manifest.doompiWeb : [manifest.doompiWeb];
|
|
38
|
+
}
|
|
39
|
+
/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */
|
|
40
|
+
function declaredPluginsOf(packageDir, manifest, isHost) {
|
|
41
|
+
const plugins = [];
|
|
42
|
+
for (const block of pluginBlocksOf(manifest)) {
|
|
43
|
+
if (!isRecord(block)) throw new WebPluginManifestError(packageDir, "each block must be an object.");
|
|
44
|
+
const { pluginId, registrationOrder = DEFAULT_REGISTRATION_ORDER, client, scopes } = block;
|
|
45
|
+
if (!Array.isArray(scopes) || scopes.length === 0 || scopes.some((scope) => ![
|
|
46
|
+
"global",
|
|
47
|
+
"workspace",
|
|
48
|
+
"session"
|
|
49
|
+
].includes(scope))) throw new WebPluginManifestError(packageDir, "scopes must explicitly name global, workspace, or session; resync the plugin.");
|
|
50
|
+
if (typeof pluginId !== "string" || !PLUGIN_ID_PATTERN.test(pluginId)) throw new WebPluginManifestError(packageDir, `pluginId '${String(pluginId)}' must be kebab-case.`);
|
|
51
|
+
if (!Number.isInteger(registrationOrder) || registrationOrder < 0) throw new WebPluginManifestError(packageDir, `'${pluginId}' needs a non-negative integer registrationOrder.`);
|
|
52
|
+
plugins.push({
|
|
53
|
+
pluginId,
|
|
54
|
+
registrationOrder,
|
|
55
|
+
packageDir,
|
|
56
|
+
packageName: typeof manifest.name === "string" ? manifest.name : packageDir,
|
|
57
|
+
isHost,
|
|
58
|
+
client: normalizeEntry(packageDir, "client", client),
|
|
59
|
+
scopes
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return plugins;
|
|
63
|
+
}
|
|
64
|
+
const byInstallOrder = (left, right) => left.registrationOrder - right.registrationOrder || left.pluginId.localeCompare(right.pluginId) || left.packageDir.localeCompare(right.packageDir);
|
|
65
|
+
/**
|
|
66
|
+
* The deterministic install order, (registrationOrder, pluginId), with the
|
|
67
|
+
* cross-package collisions resolved by the browser client registry: the first
|
|
68
|
+
* plugin keeps a shared pluginId and the later package is dropped with a notice.
|
|
69
|
+
*/
|
|
70
|
+
function orderDeclaredPlugins(plugins, onNotice = () => void 0) {
|
|
71
|
+
const sorted = [...plugins].sort(byInstallOrder);
|
|
72
|
+
const byId = /* @__PURE__ */ new Map();
|
|
73
|
+
const kept = [];
|
|
74
|
+
for (const plugin of sorted) {
|
|
75
|
+
const holder = byId.get(plugin.pluginId);
|
|
76
|
+
if (holder !== void 0) {
|
|
77
|
+
onNotice(`web plugin '${plugin.pluginId}' from ${plugin.packageDir} is skipped: ${holder.packageDir} already declares it.`);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
byId.set(plugin.pluginId, plugin);
|
|
81
|
+
kept.push(plugin);
|
|
82
|
+
}
|
|
83
|
+
return kept;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
exports.DEFAULT_REGISTRATION_ORDER = DEFAULT_REGISTRATION_ORDER;
|
|
87
|
+
exports.WebPluginManifestError = WebPluginManifestError;
|
|
88
|
+
exports.declaredPluginsOf = declaredPluginsOf;
|
|
89
|
+
exports.orderDeclaredPlugins = orderDeclaredPlugins;
|
|
90
|
+
exports.pluginBlocksOf = pluginBlocksOf;
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=webPluginManifest.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginManifest.cjs","names":[],"sources":["../../../src/builders/web/webPluginManifest.ts"],"sourcesContent":["/**\n * The doompiWeb manifest vocabulary: how a package declares its web plugin in\n * package.json, validated and ordered without touching the filesystem. The\n * scan adapter feeds this from real manifests; the sync bundler feeds it from\n * the installed composition's package roots.\n *\n * Plugins are independent: a manifest names no other plugin, and the order\n * plugins install in is only a tiebreak (registrationOrder, then pluginId),\n * because every relation between two plugins resolves by name once all of\n * them are installed. A collision between two packages is a notice for the\n * sync log and the first package keeps the name; only a malformed block is an\n * error, which the scanner turns into a notice for that package alone.\n */\n\nconst PLUGIN_ID_PATTERN = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;\n\n/** The order a plugin installs at when its manifest names none. */\nexport const DEFAULT_REGISTRATION_ORDER = 1000;\n\nexport interface WebPluginEntryDeclaration {\n /** Package-relative ./path to the source entry. */\n entry: string;\n}\n\nexport interface DeclaredWebPlugin {\n pluginId: string;\n registrationOrder: number;\n packageDir: string;\n packageName: string;\n isHost: boolean;\n client: WebPluginEntryDeclaration;\n scopes: readonly ('global' | 'workspace' | 'session')[];\n}\n\nexport class WebPluginManifestError extends Error {\n constructor(packageDir: string, message: string) {\n super(`doompiWeb manifest in ${packageDir}: ${message}`);\n this.name = 'WebPluginManifestError';\n }\n}\n\nfunction isRecord(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\nfunction normalizeEntry(packageDir: string, kind: string, value: unknown): WebPluginEntryDeclaration {\n const raw = typeof value === 'string' ? { entry: value } : value;\n if (!isRecord(raw)) throw new WebPluginManifestError(packageDir, `${kind} must be a path or {entry}.`);\n const { entry } = raw;\n if (typeof entry !== 'string' || !entry.startsWith('./') || entry.includes('..')) {\n throw new WebPluginManifestError(packageDir, `${kind}.entry must be a package-relative ./path with no '..'.`);\n }\n return { entry };\n}\n\n/** The doompiWeb value normalized to a list: one plugin object or an array of them. */\nexport function pluginBlocksOf(manifest: Record<string, unknown>): unknown[] {\n if (manifest.doompiWeb === undefined) return [];\n return Array.isArray(manifest.doompiWeb) ? manifest.doompiWeb : [manifest.doompiWeb];\n}\n\n/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */\nexport function declaredPluginsOf(\n packageDir: string,\n manifest: Record<string, unknown>,\n isHost: boolean,\n): DeclaredWebPlugin[] {\n const plugins: DeclaredWebPlugin[] = [];\n for (const block of pluginBlocksOf(manifest)) {\n if (!isRecord(block)) throw new WebPluginManifestError(packageDir, 'each block must be an object.');\n const { pluginId, registrationOrder = DEFAULT_REGISTRATION_ORDER, client, scopes } = block;\n if (\n !Array.isArray(scopes) ||\n scopes.length === 0 ||\n scopes.some((scope) => !['global', 'workspace', 'session'].includes(scope))\n ) {\n throw new WebPluginManifestError(\n packageDir,\n 'scopes must explicitly name global, workspace, or session; resync the plugin.',\n );\n }\n if (typeof pluginId !== 'string' || !PLUGIN_ID_PATTERN.test(pluginId)) {\n throw new WebPluginManifestError(packageDir, `pluginId '${String(pluginId)}' must be kebab-case.`);\n }\n if (!Number.isInteger(registrationOrder) || (registrationOrder as number) < 0) {\n throw new WebPluginManifestError(packageDir, `'${pluginId}' needs a non-negative integer registrationOrder.`);\n }\n plugins.push({\n pluginId,\n registrationOrder: registrationOrder as number,\n packageDir,\n packageName: typeof manifest.name === 'string' ? manifest.name : packageDir,\n isHost,\n client: normalizeEntry(packageDir, 'client', client),\n scopes,\n });\n }\n return plugins;\n}\n\nconst byInstallOrder = (left: DeclaredWebPlugin, right: DeclaredWebPlugin): number =>\n left.registrationOrder - right.registrationOrder ||\n left.pluginId.localeCompare(right.pluginId) ||\n left.packageDir.localeCompare(right.packageDir);\n\n/**\n * The deterministic install order, (registrationOrder, pluginId), with the\n * cross-package collisions resolved by the browser client registry: the first\n * plugin keeps a shared pluginId and the later package is dropped with a notice.\n */\nexport function orderDeclaredPlugins(\n plugins: readonly DeclaredWebPlugin[],\n onNotice: (message: string) => void = () => undefined,\n): DeclaredWebPlugin[] {\n const sorted = [...plugins].sort(byInstallOrder);\n const byId = new Map<string, DeclaredWebPlugin>();\n const kept: DeclaredWebPlugin[] = [];\n for (const plugin of sorted) {\n const holder = byId.get(plugin.pluginId);\n if (holder !== undefined) {\n onNotice(\n `web plugin '${plugin.pluginId}' from ${plugin.packageDir} is skipped: ${holder.packageDir} already declares it.`,\n );\n continue;\n }\n byId.set(plugin.pluginId, plugin);\n kept.push(plugin);\n }\n return kept;\n}\n"],"mappings":";;;;;;;;;;;;;;AAcA,MAAM,oBAAoB;;AAG1B,MAAa,6BAA6B;AAiB1C,IAAa,yBAAb,cAA4C,MAAM;CAChD,YAAY,YAAoB,SAAiB;EAC/C,MAAM,yBAAyB,WAAW,IAAI,SAAS;EACvD,KAAK,OAAO;CACd;AACF;AAEA,SAAS,SAAS,OAAkD;CAClE,OAAO,OAAO,UAAU,YAAY,UAAU,QAAQ,CAAC,MAAM,QAAQ,KAAK;AAC5E;AAEA,SAAS,eAAe,YAAoB,MAAc,OAA2C;CACnG,MAAM,MAAM,OAAO,UAAU,WAAW,EAAE,OAAO,MAAM,IAAI;CAC3D,IAAI,CAAC,SAAS,GAAG,GAAG,MAAM,IAAI,uBAAuB,YAAY,GAAG,KAAK,4BAA4B;CACrG,MAAM,EAAE,UAAU;CAClB,IAAI,OAAO,UAAU,YAAY,CAAC,MAAM,WAAW,IAAI,KAAK,MAAM,SAAS,IAAI,GAC7E,MAAM,IAAI,uBAAuB,YAAY,GAAG,KAAK,uDAAuD;CAE9G,OAAO,EAAE,MAAM;AACjB;;AAGA,SAAgB,eAAe,UAA8C;CAC3E,IAAI,SAAS,cAAc,KAAA,GAAW,OAAO,CAAC;CAC9C,OAAO,MAAM,QAAQ,SAAS,SAAS,IAAI,SAAS,YAAY,CAAC,SAAS,SAAS;AACrF;;AAGA,SAAgB,kBACd,YACA,UACA,QACqB;CACrB,MAAM,UAA+B,CAAC;CACtC,KAAK,MAAM,SAAS,eAAe,QAAQ,GAAG;EAC5C,IAAI,CAAC,SAAS,KAAK,GAAG,MAAM,IAAI,uBAAuB,YAAY,+BAA+B;EAClG,MAAM,EAAE,UAAU,oBAAoB,4BAA4B,QAAQ,WAAW;EACrF,IACE,CAAC,MAAM,QAAQ,MAAM,KACrB,OAAO,WAAW,KAClB,OAAO,MAAM,UAAU,CAAC;GAAC;GAAU;GAAa;EAAS,CAAC,CAAC,SAAS,KAAK,CAAC,GAE1E,MAAM,IAAI,uBACR,YACA,+EACF;EAEF,IAAI,OAAO,aAAa,YAAY,CAAC,kBAAkB,KAAK,QAAQ,GAClE,MAAM,IAAI,uBAAuB,YAAY,aAAa,OAAO,QAAQ,EAAE,sBAAsB;EAEnG,IAAI,CAAC,OAAO,UAAU,iBAAiB,KAAM,oBAA+B,GAC1E,MAAM,IAAI,uBAAuB,YAAY,IAAI,SAAS,kDAAkD;EAE9G,QAAQ,KAAK;GACX;GACmB;GACnB;GACA,aAAa,OAAO,SAAS,SAAS,WAAW,SAAS,OAAO;GACjE;GACA,QAAQ,eAAe,YAAY,UAAU,MAAM;GACnD;EACF,CAAC;CACH;CACA,OAAO;AACT;AAEA,MAAM,kBAAkB,MAAyB,UAC/C,KAAK,oBAAoB,MAAM,qBAC/B,KAAK,SAAS,cAAc,MAAM,QAAQ,KAC1C,KAAK,WAAW,cAAc,MAAM,UAAU;;;;;;AAOhD,SAAgB,qBACd,SACA,iBAA4C,KAAA,GACvB;CACrB,MAAM,SAAS,CAAC,GAAG,OAAO,CAAC,CAAC,KAAK,cAAc;CAC/C,MAAM,uBAAO,IAAI,IAA+B;CAChD,MAAM,OAA4B,CAAC;CACnC,KAAK,MAAM,UAAU,QAAQ;EAC3B,MAAM,SAAS,KAAK,IAAI,OAAO,QAAQ;EACvC,IAAI,WAAW,KAAA,GAAW;GACxB,SACE,eAAe,OAAO,SAAS,SAAS,OAAO,WAAW,eAAe,OAAO,WAAW,sBAC7F;GACA;EACF;EACA,KAAK,IAAI,OAAO,UAAU,MAAM;EAChC,KAAK,KAAK,MAAM;CAClB;CACA,OAAO;AACT"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/builders/web/webPluginManifest.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The doompiWeb manifest vocabulary: how a package declares its web plugin in
|
|
4
|
+
* package.json, validated and ordered without touching the filesystem. The
|
|
5
|
+
* scan adapter feeds this from real manifests; the sync bundler feeds it from
|
|
6
|
+
* the installed composition's package roots.
|
|
7
|
+
*
|
|
8
|
+
* Plugins are independent: a manifest names no other plugin, and the order
|
|
9
|
+
* plugins install in is only a tiebreak (registrationOrder, then pluginId),
|
|
10
|
+
* because every relation between two plugins resolves by name once all of
|
|
11
|
+
* them are installed. A collision between two packages is a notice for the
|
|
12
|
+
* sync log and the first package keeps the name; only a malformed block is an
|
|
13
|
+
* error, which the scanner turns into a notice for that package alone.
|
|
14
|
+
*/
|
|
15
|
+
/** The order a plugin installs at when its manifest names none. */
|
|
16
|
+
export declare const DEFAULT_REGISTRATION_ORDER = 1000;
|
|
17
|
+
export interface WebPluginEntryDeclaration {
|
|
18
|
+
/** Package-relative ./path to the source entry. */
|
|
19
|
+
entry: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DeclaredWebPlugin {
|
|
22
|
+
pluginId: string;
|
|
23
|
+
registrationOrder: number;
|
|
24
|
+
packageDir: string;
|
|
25
|
+
packageName: string;
|
|
26
|
+
isHost: boolean;
|
|
27
|
+
client: WebPluginEntryDeclaration;
|
|
28
|
+
scopes: readonly ('global' | 'workspace' | 'session')[];
|
|
29
|
+
}
|
|
30
|
+
export declare class WebPluginManifestError extends Error {
|
|
31
|
+
constructor(packageDir: string, message: string);
|
|
32
|
+
}
|
|
33
|
+
/** The doompiWeb value normalized to a list: one plugin object or an array of them. */
|
|
34
|
+
export declare function pluginBlocksOf(manifest: Record<string, unknown>): unknown[];
|
|
35
|
+
/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */
|
|
36
|
+
export declare function declaredPluginsOf(packageDir: string, manifest: Record<string, unknown>, isHost: boolean): DeclaredWebPlugin[];
|
|
37
|
+
/**
|
|
38
|
+
* The deterministic install order, (registrationOrder, pluginId), with the
|
|
39
|
+
* cross-package collisions resolved by the browser client registry: the first
|
|
40
|
+
* plugin keeps a shared pluginId and the later package is dropped with a notice.
|
|
41
|
+
*/
|
|
42
|
+
export declare function orderDeclaredPlugins(plugins: readonly DeclaredWebPlugin[], onNotice?: (message: string) => void): DeclaredWebPlugin[];
|
|
43
|
+
//#endregion
|
|
44
|
+
//# sourceMappingURL=webPluginManifest.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginManifest.d.cts","names":[],"sources":["../../../src/builders/web/webPluginManifest.ts"],"mappings":";;;;;;;;;;;;;;;qBAiBa;iBAEI;;EAEf;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;qBAGW,+BAA+B;EAC1C,YAAY,oBAAoB;;;wBAqBlB,eAAe,UAAU;;wBAMzB,kBACd,oBACA,UAAU,yBACV,kBACC;;;;;;wBA4Ca,qBACd,kBAAkB,qBAClB,YAAW,2BACV"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/builders/web/webPluginManifest.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* The doompiWeb manifest vocabulary: how a package declares its web plugin in
|
|
4
|
+
* package.json, validated and ordered without touching the filesystem. The
|
|
5
|
+
* scan adapter feeds this from real manifests; the sync bundler feeds it from
|
|
6
|
+
* the installed composition's package roots.
|
|
7
|
+
*
|
|
8
|
+
* Plugins are independent: a manifest names no other plugin, and the order
|
|
9
|
+
* plugins install in is only a tiebreak (registrationOrder, then pluginId),
|
|
10
|
+
* because every relation between two plugins resolves by name once all of
|
|
11
|
+
* them are installed. A collision between two packages is a notice for the
|
|
12
|
+
* sync log and the first package keeps the name; only a malformed block is an
|
|
13
|
+
* error, which the scanner turns into a notice for that package alone.
|
|
14
|
+
*/
|
|
15
|
+
/** The order a plugin installs at when its manifest names none. */
|
|
16
|
+
export declare const DEFAULT_REGISTRATION_ORDER = 1000;
|
|
17
|
+
export interface WebPluginEntryDeclaration {
|
|
18
|
+
/** Package-relative ./path to the source entry. */
|
|
19
|
+
entry: string;
|
|
20
|
+
}
|
|
21
|
+
export interface DeclaredWebPlugin {
|
|
22
|
+
pluginId: string;
|
|
23
|
+
registrationOrder: number;
|
|
24
|
+
packageDir: string;
|
|
25
|
+
packageName: string;
|
|
26
|
+
isHost: boolean;
|
|
27
|
+
client: WebPluginEntryDeclaration;
|
|
28
|
+
scopes: readonly ('global' | 'workspace' | 'session')[];
|
|
29
|
+
}
|
|
30
|
+
export declare class WebPluginManifestError extends Error {
|
|
31
|
+
constructor(packageDir: string, message: string);
|
|
32
|
+
}
|
|
33
|
+
/** The doompiWeb value normalized to a list: one plugin object or an array of them. */
|
|
34
|
+
export declare function pluginBlocksOf(manifest: Record<string, unknown>): unknown[];
|
|
35
|
+
/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */
|
|
36
|
+
export declare function declaredPluginsOf(packageDir: string, manifest: Record<string, unknown>, isHost: boolean): DeclaredWebPlugin[];
|
|
37
|
+
/**
|
|
38
|
+
* The deterministic install order, (registrationOrder, pluginId), with the
|
|
39
|
+
* cross-package collisions resolved by the browser client registry: the first
|
|
40
|
+
* plugin keeps a shared pluginId and the later package is dropped with a notice.
|
|
41
|
+
*/
|
|
42
|
+
export declare function orderDeclaredPlugins(plugins: readonly DeclaredWebPlugin[], onNotice?: (message: string) => void): DeclaredWebPlugin[];
|
|
43
|
+
//#endregion
|
|
44
|
+
//# sourceMappingURL=webPluginManifest.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webPluginManifest.d.mts","names":[],"sources":["../../../src/builders/web/webPluginManifest.ts"],"mappings":";;;;;;;;;;;;;;;qBAiBa;iBAEI;;EAEf;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA,QAAQ;EACR;;qBAGW,+BAA+B;EAC1C,YAAY,oBAAoB;;;wBAqBlB,eAAe,UAAU;;wBAMzB,kBACd,oBACA,UAAU,yBACV,kBACC;;;;;;wBA4Ca,qBACd,kBAAkB,qBAClB,YAAW,2BACV"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
//#region src/builders/web/webPluginManifest.ts
|
|
2
|
+
/**
|
|
3
|
+
* The doompiWeb manifest vocabulary: how a package declares its web plugin in
|
|
4
|
+
* package.json, validated and ordered without touching the filesystem. The
|
|
5
|
+
* scan adapter feeds this from real manifests; the sync bundler feeds it from
|
|
6
|
+
* the installed composition's package roots.
|
|
7
|
+
*
|
|
8
|
+
* Plugins are independent: a manifest names no other plugin, and the order
|
|
9
|
+
* plugins install in is only a tiebreak (registrationOrder, then pluginId),
|
|
10
|
+
* because every relation between two plugins resolves by name once all of
|
|
11
|
+
* them are installed. A collision between two packages is a notice for the
|
|
12
|
+
* sync log and the first package keeps the name; only a malformed block is an
|
|
13
|
+
* error, which the scanner turns into a notice for that package alone.
|
|
14
|
+
*/
|
|
15
|
+
const PLUGIN_ID_PATTERN = /^[a-z][a-z0-9]*(-[a-z0-9]+)*$/;
|
|
16
|
+
/** The order a plugin installs at when its manifest names none. */
|
|
17
|
+
const DEFAULT_REGISTRATION_ORDER = 1e3;
|
|
18
|
+
var WebPluginManifestError = class extends Error {
|
|
19
|
+
constructor(packageDir, message) {
|
|
20
|
+
super(`doompiWeb manifest in ${packageDir}: ${message}`);
|
|
21
|
+
this.name = "WebPluginManifestError";
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
function isRecord(value) {
|
|
25
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
26
|
+
}
|
|
27
|
+
function normalizeEntry(packageDir, kind, value) {
|
|
28
|
+
const raw = typeof value === "string" ? { entry: value } : value;
|
|
29
|
+
if (!isRecord(raw)) throw new WebPluginManifestError(packageDir, `${kind} must be a path or {entry}.`);
|
|
30
|
+
const { entry } = raw;
|
|
31
|
+
if (typeof entry !== "string" || !entry.startsWith("./") || entry.includes("..")) throw new WebPluginManifestError(packageDir, `${kind}.entry must be a package-relative ./path with no '..'.`);
|
|
32
|
+
return { entry };
|
|
33
|
+
}
|
|
34
|
+
/** The doompiWeb value normalized to a list: one plugin object or an array of them. */
|
|
35
|
+
function pluginBlocksOf(manifest) {
|
|
36
|
+
if (manifest.doompiWeb === void 0) return [];
|
|
37
|
+
return Array.isArray(manifest.doompiWeb) ? manifest.doompiWeb : [manifest.doompiWeb];
|
|
38
|
+
}
|
|
39
|
+
/** Validates one manifest's blocks into declared plugins; throws WebPluginManifestError on bad shape. */
|
|
40
|
+
function declaredPluginsOf(packageDir, manifest, isHost) {
|
|
41
|
+
const plugins = [];
|
|
42
|
+
for (const block of pluginBlocksOf(manifest)) {
|
|
43
|
+
if (!isRecord(block)) throw new WebPluginManifestError(packageDir, "each block must be an object.");
|
|
44
|
+
const { pluginId, registrationOrder = DEFAULT_REGISTRATION_ORDER, client, scopes } = block;
|
|
45
|
+
if (!Array.isArray(scopes) || scopes.length === 0 || scopes.some((scope) => ![
|
|
46
|
+
"global",
|
|
47
|
+
"workspace",
|
|
48
|
+
"session"
|
|
49
|
+
].includes(scope))) throw new WebPluginManifestError(packageDir, "scopes must explicitly name global, workspace, or session; resync the plugin.");
|
|
50
|
+
if (typeof pluginId !== "string" || !PLUGIN_ID_PATTERN.test(pluginId)) throw new WebPluginManifestError(packageDir, `pluginId '${String(pluginId)}' must be kebab-case.`);
|
|
51
|
+
if (!Number.isInteger(registrationOrder) || registrationOrder < 0) throw new WebPluginManifestError(packageDir, `'${pluginId}' needs a non-negative integer registrationOrder.`);
|
|
52
|
+
plugins.push({
|
|
53
|
+
pluginId,
|
|
54
|
+
registrationOrder,
|
|
55
|
+
packageDir,
|
|
56
|
+
packageName: typeof manifest.name === "string" ? manifest.name : packageDir,
|
|
57
|
+
isHost,
|
|
58
|
+
client: normalizeEntry(packageDir, "client", client),
|
|
59
|
+
scopes
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
return plugins;
|
|
63
|
+
}
|
|
64
|
+
const byInstallOrder = (left, right) => left.registrationOrder - right.registrationOrder || left.pluginId.localeCompare(right.pluginId) || left.packageDir.localeCompare(right.packageDir);
|
|
65
|
+
/**
|
|
66
|
+
* The deterministic install order, (registrationOrder, pluginId), with the
|
|
67
|
+
* cross-package collisions resolved by the browser client registry: the first
|
|
68
|
+
* plugin keeps a shared pluginId and the later package is dropped with a notice.
|
|
69
|
+
*/
|
|
70
|
+
function orderDeclaredPlugins(plugins, onNotice = () => void 0) {
|
|
71
|
+
const sorted = [...plugins].sort(byInstallOrder);
|
|
72
|
+
const byId = /* @__PURE__ */ new Map();
|
|
73
|
+
const kept = [];
|
|
74
|
+
for (const plugin of sorted) {
|
|
75
|
+
const holder = byId.get(plugin.pluginId);
|
|
76
|
+
if (holder !== void 0) {
|
|
77
|
+
onNotice(`web plugin '${plugin.pluginId}' from ${plugin.packageDir} is skipped: ${holder.packageDir} already declares it.`);
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
byId.set(plugin.pluginId, plugin);
|
|
81
|
+
kept.push(plugin);
|
|
82
|
+
}
|
|
83
|
+
return kept;
|
|
84
|
+
}
|
|
85
|
+
//#endregion
|
|
86
|
+
export { DEFAULT_REGISTRATION_ORDER, WebPluginManifestError, declaredPluginsOf, orderDeclaredPlugins, pluginBlocksOf };
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=webPluginManifest.mjs.map
|