@vibesdotdev/applets 0.0.0-stage → 1.0.0-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +18 -0
- package/README.md +43 -2
- package/dist/applet-gate.d.ts +47 -0
- package/dist/applet-gate.d.ts.map +1 -0
- package/dist/applet-gate.js +167 -0
- package/dist/applet-gate.js.map +1 -0
- package/dist/applet-root-surface.d.ts +135 -0
- package/dist/applet-root-surface.d.ts.map +1 -0
- package/dist/applet-root-surface.js +222 -0
- package/dist/applet-root-surface.js.map +1 -0
- package/dist/applet-value-bound.d.ts +24 -0
- package/dist/applet-value-bound.d.ts.map +1 -0
- package/dist/applet-value-bound.js +46 -0
- package/dist/applet-value-bound.js.map +1 -0
- package/dist/applets.cloud.plugin.d.ts +4 -0
- package/dist/applets.cloud.plugin.d.ts.map +1 -0
- package/dist/applets.cloud.plugin.js +11 -0
- package/dist/applets.cloud.plugin.js.map +1 -0
- package/dist/applets.consumer.plugin.d.ts +4 -0
- package/dist/applets.consumer.plugin.d.ts.map +1 -0
- package/dist/applets.consumer.plugin.js +11 -0
- package/dist/applets.consumer.plugin.js.map +1 -0
- package/dist/applets.plugin.d.ts +3 -0
- package/dist/applets.plugin.d.ts.map +1 -0
- package/dist/applets.plugin.js +30 -0
- package/dist/applets.plugin.js.map +1 -0
- package/dist/authorization.d.ts +87 -0
- package/dist/authorization.d.ts.map +1 -0
- package/dist/authorization.js +189 -0
- package/dist/authorization.js.map +1 -0
- package/dist/browser-runtime.d.ts +34 -0
- package/dist/browser-runtime.d.ts.map +1 -0
- package/dist/browser-runtime.js +5 -0
- package/dist/browser-runtime.js.map +1 -0
- package/dist/build-definition.d.ts +34 -0
- package/dist/build-definition.d.ts.map +1 -0
- package/dist/build-definition.js +44 -0
- package/dist/build-definition.js.map +1 -0
- package/dist/capabilities/capability.kind.d.ts +44 -0
- package/dist/capabilities/capability.kind.d.ts.map +1 -0
- package/dist/capabilities/capability.kind.js +17 -0
- package/dist/capabilities/capability.kind.js.map +1 -0
- package/dist/capabilities/runtime-dispatch.d.ts +9 -0
- package/dist/capabilities/runtime-dispatch.d.ts.map +1 -0
- package/dist/capabilities/runtime-dispatch.js +62 -0
- package/dist/capabilities/runtime-dispatch.js.map +1 -0
- package/dist/cli/applet-group.descriptor.d.ts +11 -0
- package/dist/cli/applet-group.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-group.descriptor.js +19 -0
- package/dist/cli/applet-group.descriptor.js.map +1 -0
- package/dist/cli/applet-local-store.storage.descriptor.d.ts +66 -0
- package/dist/cli/applet-local-store.storage.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-local-store.storage.descriptor.js +39 -0
- package/dist/cli/applet-local-store.storage.descriptor.js.map +1 -0
- package/dist/cli/applet-serve.process.descriptor.d.ts +37 -0
- package/dist/cli/applet-serve.process.descriptor.d.ts.map +1 -0
- package/dist/cli/applet-serve.process.descriptor.js +41 -0
- package/dist/cli/applet-serve.process.descriptor.js.map +1 -0
- package/dist/cli/commands/build.command.descriptor.d.ts +40 -0
- package/dist/cli/commands/build.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/build.command.descriptor.js +52 -0
- package/dist/cli/commands/build.command.descriptor.js.map +1 -0
- package/dist/cli/commands/build.command.impl.d.ts +8 -0
- package/dist/cli/commands/build.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/build.command.impl.js +116 -0
- package/dist/cli/commands/build.command.impl.js.map +1 -0
- package/dist/cli/commands/init.command.descriptor.d.ts +29 -0
- package/dist/cli/commands/init.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/init.command.descriptor.js +23 -0
- package/dist/cli/commands/init.command.descriptor.js.map +1 -0
- package/dist/cli/commands/init.command.impl.d.ts +7 -0
- package/dist/cli/commands/init.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/init.command.impl.js +64 -0
- package/dist/cli/commands/init.command.impl.js.map +1 -0
- package/dist/cli/commands/list.command.descriptor.d.ts +26 -0
- package/dist/cli/commands/list.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/list.command.descriptor.js +22 -0
- package/dist/cli/commands/list.command.descriptor.js.map +1 -0
- package/dist/cli/commands/list.command.impl.d.ts +13 -0
- package/dist/cli/commands/list.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/list.command.impl.js +47 -0
- package/dist/cli/commands/list.command.impl.js.map +1 -0
- package/dist/cli/commands/serve-stylesheet.d.ts +11 -0
- package/dist/cli/commands/serve-stylesheet.d.ts.map +1 -0
- package/dist/cli/commands/serve-stylesheet.js +50 -0
- package/dist/cli/commands/serve-stylesheet.js.map +1 -0
- package/dist/cli/commands/serve-surface.d.ts +36 -0
- package/dist/cli/commands/serve-surface.d.ts.map +1 -0
- package/dist/cli/commands/serve-surface.js +410 -0
- package/dist/cli/commands/serve-surface.js.map +1 -0
- package/dist/cli/commands/serve.command.descriptor.d.ts +42 -0
- package/dist/cli/commands/serve.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/serve.command.descriptor.js +46 -0
- package/dist/cli/commands/serve.command.descriptor.js.map +1 -0
- package/dist/cli/commands/serve.command.impl.d.ts +110 -0
- package/dist/cli/commands/serve.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/serve.command.impl.js +1105 -0
- package/dist/cli/commands/serve.command.impl.js.map +1 -0
- package/dist/cli/commands/serve.schemas.d.ts +127 -0
- package/dist/cli/commands/serve.schemas.d.ts.map +1 -0
- package/dist/cli/commands/serve.schemas.js +85 -0
- package/dist/cli/commands/serve.schemas.js.map +1 -0
- package/dist/cli/commands/served-applet-browser.d.ts +12 -0
- package/dist/cli/commands/served-applet-browser.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-browser.js +48 -0
- package/dist/cli/commands/served-applet-browser.js.map +1 -0
- package/dist/cli/commands/served-applet-connection.d.ts +15 -0
- package/dist/cli/commands/served-applet-connection.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-connection.js +25 -0
- package/dist/cli/commands/served-applet-connection.js.map +1 -0
- package/dist/cli/commands/served-applet-rpc.d.ts +16 -0
- package/dist/cli/commands/served-applet-rpc.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-rpc.js +108 -0
- package/dist/cli/commands/served-applet-rpc.js.map +1 -0
- package/dist/cli/commands/served-applet-surface.d.ts +14 -0
- package/dist/cli/commands/served-applet-surface.d.ts.map +1 -0
- package/dist/cli/commands/served-applet-surface.js +99 -0
- package/dist/cli/commands/served-applet-surface.js.map +1 -0
- package/dist/cli/commands/templates.command.descriptor.d.ts +22 -0
- package/dist/cli/commands/templates.command.descriptor.d.ts.map +1 -0
- package/dist/cli/commands/templates.command.descriptor.js +21 -0
- package/dist/cli/commands/templates.command.descriptor.js.map +1 -0
- package/dist/cli/commands/templates.command.impl.d.ts +35 -0
- package/dist/cli/commands/templates.command.impl.d.ts.map +1 -0
- package/dist/cli/commands/templates.command.impl.js +59 -0
- package/dist/cli/commands/templates.command.impl.js.map +1 -0
- package/dist/cli/index.d.ts +7 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +7 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/local-serve.authz-policy.descriptor.d.ts +22 -0
- package/dist/cli/local-serve.authz-policy.descriptor.d.ts.map +1 -0
- package/dist/cli/local-serve.authz-policy.descriptor.js +13 -0
- package/dist/cli/local-serve.authz-policy.descriptor.js.map +1 -0
- package/dist/cli/plugin.d.ts +19 -0
- package/dist/cli/plugin.d.ts.map +1 -0
- package/dist/cli/plugin.js +57 -0
- package/dist/cli/plugin.js.map +1 -0
- package/dist/cli/project-files.d.ts +48 -0
- package/dist/cli/project-files.d.ts.map +1 -0
- package/dist/cli/project-files.js +130 -0
- package/dist/cli/project-files.js.map +1 -0
- package/dist/client/contract.d.ts +113 -0
- package/dist/client/contract.d.ts.map +1 -0
- package/dist/client/contract.js +17 -0
- package/dist/client/contract.js.map +1 -0
- package/dist/client/index.d.ts +3 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/client/index.js +3 -0
- package/dist/client/index.js.map +1 -0
- package/dist/client/repository.context.d.ts +113 -0
- package/dist/client/repository.context.d.ts.map +1 -0
- package/dist/client/repository.context.js +8 -0
- package/dist/client/repository.context.js.map +1 -0
- package/dist/client/runtime-client.d.ts +22 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +200 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/companion-path.d.ts +25 -0
- package/dist/companion-path.d.ts.map +1 -0
- package/dist/companion-path.js +90 -0
- package/dist/companion-path.js.map +1 -0
- package/dist/component-ref.d.ts +12 -0
- package/dist/component-ref.d.ts.map +1 -0
- package/dist/component-ref.js +45 -0
- package/dist/component-ref.js.map +1 -0
- package/dist/composition-plan.d.ts +92 -0
- package/dist/composition-plan.d.ts.map +1 -0
- package/dist/composition-plan.js +44 -0
- package/dist/composition-plan.js.map +1 -0
- package/dist/composition.d.ts +97 -0
- package/dist/composition.d.ts.map +1 -0
- package/dist/composition.js +99 -0
- package/dist/composition.js.map +1 -0
- package/dist/config/applets.config.descriptor.d.ts +55 -0
- package/dist/config/applets.config.descriptor.d.ts.map +1 -0
- package/dist/config/applets.config.descriptor.js +37 -0
- package/dist/config/applets.config.descriptor.js.map +1 -0
- package/dist/config/load.d.ts +4 -0
- package/dist/config/load.d.ts.map +1 -0
- package/dist/config/load.js +12 -0
- package/dist/config/load.js.map +1 -0
- package/dist/content-path.d.ts +62 -0
- package/dist/content-path.d.ts.map +1 -0
- package/dist/content-path.js +121 -0
- package/dist/content-path.js.map +1 -0
- package/dist/contribution-registry.d.ts +270 -0
- package/dist/contribution-registry.d.ts.map +1 -0
- package/dist/contribution-registry.js +488 -0
- package/dist/contribution-registry.js.map +1 -0
- package/dist/docs/applets.docs.descriptor.d.ts +4 -0
- package/dist/docs/applets.docs.descriptor.d.ts.map +1 -0
- package/dist/docs/applets.docs.descriptor.js +74 -0
- package/dist/docs/applets.docs.descriptor.js.map +1 -0
- package/dist/host/local-host.contract.d.ts +7 -0
- package/dist/host/local-host.contract.d.ts.map +1 -0
- package/dist/host/local-host.contract.js +2 -0
- package/dist/host/local-host.contract.js.map +1 -0
- package/dist/host/local-host.impl.d.ts +9 -0
- package/dist/host/local-host.impl.d.ts.map +1 -0
- package/dist/host/local-host.impl.js +41 -0
- package/dist/host/local-host.impl.js.map +1 -0
- package/dist/host/local-host.plugin.d.ts +3 -0
- package/dist/host/local-host.plugin.d.ts.map +1 -0
- package/dist/host/local-host.plugin.js +16 -0
- package/dist/host/local-host.plugin.js.map +1 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -0
- package/dist/local-project.d.ts +106 -0
- package/dist/local-project.d.ts.map +1 -0
- package/dist/local-project.js +277 -0
- package/dist/local-project.js.map +1 -0
- package/dist/manifest-hash.d.ts +12 -0
- package/dist/manifest-hash.d.ts.map +1 -0
- package/dist/manifest-hash.js +76 -0
- package/dist/manifest-hash.js.map +1 -0
- package/dist/presentation.d.ts +43 -0
- package/dist/presentation.d.ts.map +1 -0
- package/dist/presentation.js +36 -0
- package/dist/presentation.js.map +1 -0
- package/dist/retention.d.ts +34 -0
- package/dist/retention.d.ts.map +1 -0
- package/dist/retention.js +51 -0
- package/dist/retention.js.map +1 -0
- package/dist/schemas/applet-messages.d.ts +97 -0
- package/dist/schemas/applet-messages.d.ts.map +1 -0
- package/dist/schemas/applet-messages.js +51 -0
- package/dist/schemas/applet-messages.js.map +1 -0
- package/dist/schemas/capabilities.d.ts +37 -0
- package/dist/schemas/capabilities.d.ts.map +1 -0
- package/dist/schemas/capabilities.js +28 -0
- package/dist/schemas/capabilities.js.map +1 -0
- package/dist/schemas/component-release-ref.d.ts +13 -0
- package/dist/schemas/component-release-ref.d.ts.map +1 -0
- package/dist/schemas/component-release-ref.js +21 -0
- package/dist/schemas/component-release-ref.js.map +1 -0
- package/dist/schemas/contributes.d.ts +306 -0
- package/dist/schemas/contributes.d.ts.map +1 -0
- package/dist/schemas/contributes.js +184 -0
- package/dist/schemas/contributes.js.map +1 -0
- package/dist/schemas/definition.d.ts +301 -0
- package/dist/schemas/definition.d.ts.map +1 -0
- package/dist/schemas/definition.js +457 -0
- package/dist/schemas/definition.js.map +1 -0
- package/dist/schemas/dispatch.d.ts +52 -0
- package/dist/schemas/dispatch.d.ts.map +1 -0
- package/dist/schemas/dispatch.js +32 -0
- package/dist/schemas/dispatch.js.map +1 -0
- package/dist/schemas/grants.d.ts +56 -0
- package/dist/schemas/grants.d.ts.map +1 -0
- package/dist/schemas/grants.js +64 -0
- package/dist/schemas/grants.js.map +1 -0
- package/dist/schemas/index.d.ts +16 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/index.js +16 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/instance.d.ts +230 -0
- package/dist/schemas/instance.d.ts.map +1 -0
- package/dist/schemas/instance.js +44 -0
- package/dist/schemas/instance.js.map +1 -0
- package/dist/schemas/lineage.d.ts +60 -0
- package/dist/schemas/lineage.d.ts.map +1 -0
- package/dist/schemas/lineage.js +52 -0
- package/dist/schemas/lineage.js.map +1 -0
- package/dist/schemas/observation.d.ts +70 -0
- package/dist/schemas/observation.d.ts.map +1 -0
- package/dist/schemas/observation.js +49 -0
- package/dist/schemas/observation.js.map +1 -0
- package/dist/schemas/patterns.d.ts +24 -0
- package/dist/schemas/patterns.d.ts.map +1 -0
- package/dist/schemas/patterns.js +24 -0
- package/dist/schemas/patterns.js.map +1 -0
- package/dist/schemas/publishing.d.ts +27 -0
- package/dist/schemas/publishing.d.ts.map +1 -0
- package/dist/schemas/publishing.js +20 -0
- package/dist/schemas/publishing.js.map +1 -0
- package/dist/schemas/run.d.ts +35 -0
- package/dist/schemas/run.d.ts.map +1 -0
- package/dist/schemas/run.js +26 -0
- package/dist/schemas/run.js.map +1 -0
- package/dist/schemas/share-link.d.ts +61 -0
- package/dist/schemas/share-link.d.ts.map +1 -0
- package/dist/schemas/share-link.js +68 -0
- package/dist/schemas/share-link.js.map +1 -0
- package/dist/schemas/state-events.d.ts +66 -0
- package/dist/schemas/state-events.d.ts.map +1 -0
- package/dist/schemas/state-events.js +66 -0
- package/dist/schemas/state-events.js.map +1 -0
- package/dist/schemas/subscription.d.ts +47 -0
- package/dist/schemas/subscription.d.ts.map +1 -0
- package/dist/schemas/subscription.js +46 -0
- package/dist/schemas/subscription.js.map +1 -0
- package/dist/schemas/template-revision.d.ts +53 -0
- package/dist/schemas/template-revision.d.ts.map +1 -0
- package/dist/schemas/template-revision.js +30 -0
- package/dist/schemas/template-revision.js.map +1 -0
- package/dist/selection.d.ts +22 -0
- package/dist/selection.d.ts.map +1 -0
- package/dist/selection.js +21 -0
- package/dist/selection.js.map +1 -0
- package/dist/storage/index.d.ts +27 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +27 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/records.d.ts +28 -0
- package/dist/storage/records.d.ts.map +1 -0
- package/dist/storage/records.js +272 -0
- package/dist/storage/records.js.map +1 -0
- package/dist/svelte/applets-svelte.plugin.d.ts +38 -0
- package/dist/svelte/applets-svelte.plugin.d.ts.map +1 -0
- package/dist/svelte/applets-svelte.plugin.js +25 -0
- package/dist/svelte/components/AppletCanvas.svelte +488 -0
- package/dist/svelte/components/AppletCanvas.svelte.d.ts +53 -0
- package/dist/svelte/components/AppletCanvas.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletCatalog.svelte +42 -0
- package/dist/svelte/components/AppletCatalog.svelte.d.ts +8 -0
- package/dist/svelte/components/AppletCatalog.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletComposition.svelte +128 -0
- package/dist/svelte/components/AppletComposition.svelte.d.ts +30 -0
- package/dist/svelte/components/AppletComposition.svelte.d.ts.map +1 -0
- package/dist/svelte/components/AppletConsent.svelte +143 -0
- package/dist/svelte/components/AppletConsent.svelte.d.ts +12 -0
- package/dist/svelte/components/AppletConsent.svelte.d.ts.map +1 -0
- package/dist/svelte/components/LocalAppletView.svelte +102 -0
- package/dist/svelte/components/LocalAppletView.svelte.d.ts +13 -0
- package/dist/svelte/components/LocalAppletView.svelte.d.ts.map +1 -0
- package/dist/svelte/components/RunnableTracker.svelte +51 -0
- package/dist/svelte/components/RunnableTracker.svelte.d.ts +18 -0
- package/dist/svelte/components/RunnableTracker.svelte.d.ts.map +1 -0
- package/dist/svelte/index.d.ts +11 -0
- package/dist/svelte/index.d.ts.map +1 -0
- package/dist/svelte/index.js +10 -0
- package/dist/svelte/lib/canvas-lifecycle.d.ts +68 -0
- package/dist/svelte/lib/canvas-lifecycle.d.ts.map +1 -0
- package/dist/svelte/lib/canvas-lifecycle.js +99 -0
- package/dist/svelte/lib/capability-review.d.ts +64 -0
- package/dist/svelte/lib/capability-review.d.ts.map +1 -0
- package/dist/svelte/lib/capability-review.js +77 -0
- package/dist/svelte/lib/message-protocol.d.ts +184 -0
- package/dist/svelte/lib/message-protocol.d.ts.map +1 -0
- package/dist/svelte/lib/message-protocol.js +251 -0
- package/dist/svelte/runnable-source.d.ts +5 -0
- package/dist/svelte/runnable-source.d.ts.map +1 -0
- package/dist/svelte/runnable-source.js +92 -0
- package/dist/svelte/serve-index.svelte +39 -0
- package/dist/svelte/serve-index.svelte.d.ts +10 -0
- package/dist/svelte/serve-index.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.d.ts +26 -0
- package/dist/svelte/state.svelte.d.ts.map +1 -0
- package/dist/svelte/state.svelte.js +74 -0
- package/dist/svelte/styles.css +4 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte +148 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts +5 -0
- package/dist/svelte/tool-widgets/AppletToolCard.svelte.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/applet-tool-card.d.ts +41 -0
- package/dist/svelte/tool-widgets/applet-tool-card.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/applet-tool-card.js +167 -0
- package/dist/svelte/tool-widgets/index.d.ts +3 -0
- package/dist/svelte/tool-widgets/index.d.ts.map +1 -0
- package/dist/svelte/tool-widgets/index.js +2 -0
- package/dist/templates/index.d.ts +2 -0
- package/dist/templates/index.d.ts.map +1 -0
- package/dist/templates/index.js +2 -0
- package/dist/templates/index.js.map +1 -0
- package/dist/templates/template.kind.d.ts +39 -0
- package/dist/templates/template.kind.d.ts.map +1 -0
- package/dist/templates/template.kind.js +29 -0
- package/dist/templates/template.kind.js.map +1 -0
- package/dist/tools/applet.descriptor.d.ts +196 -0
- package/dist/tools/applet.descriptor.d.ts.map +1 -0
- package/dist/tools/applet.descriptor.js +81 -0
- package/dist/tools/applet.descriptor.js.map +1 -0
- package/dist/tools/applet.impl.d.ts +32 -0
- package/dist/tools/applet.impl.d.ts.map +1 -0
- package/dist/tools/applet.impl.js +485 -0
- package/dist/tools/applet.impl.js.map +1 -0
- package/dist/tools/applet.schemas.d.ts +198 -0
- package/dist/tools/applet.schemas.d.ts.map +1 -0
- package/dist/tools/applet.schemas.js +136 -0
- package/dist/tools/applet.schemas.js.map +1 -0
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/upgrade.d.ts +45 -0
- package/dist/upgrade.d.ts.map +1 -0
- package/dist/upgrade.js +179 -0
- package/dist/upgrade.js.map +1 -0
- package/dist/vite.d.ts +26 -0
- package/dist/vite.d.ts.map +1 -0
- package/dist/vite.js +28 -0
- package/dist/vite.js.map +1 -0
- package/package.json +264 -4
- package/templates/applet-tour/Applet.svelte +95 -0
- package/templates/applet-tour/applet.descriptor.ts +15 -0
- package/templates/assembly-field/Applet.svelte +242 -0
- package/templates/assembly-field/applet.descriptor.ts +7 -0
- package/templates/assembly-field/applet.storage.json +47 -0
- package/templates/assembly-field/schemas/settings.ts +14 -0
- package/templates/assembly-field/settings.ts +32 -0
- package/templates/benchmark-comparison/Applet.svelte +17 -0
- package/templates/benchmark-comparison/applet.descriptor.ts +7 -0
- package/templates/file-diff-viewer/Applet.svelte +91 -0
- package/templates/file-diff-viewer/applet.descriptor.ts +14 -0
- package/templates/file-diff-viewer/diff.ts +63 -0
- package/templates/file-viewer/Applet.svelte +80 -0
- package/templates/file-viewer/applet.descriptor.ts +14 -0
- package/templates/fleet-runs/Applet.svelte +14 -0
- package/templates/fleet-runs/applet.descriptor.ts +7 -0
- package/templates/graph-runbook-tracker/Applet.svelte +13 -0
- package/templates/graph-runbook-tracker/applet.descriptor.ts +7 -0
- package/templates/runbook-tracker/Applet.svelte +12 -0
- package/templates/runbook-tracker/applet.descriptor.ts +7 -0
- package/templates/runnable-tracker/Applet.svelte +16 -0
- package/templates/runnable-tracker/applet.descriptor.ts +10 -0
- package/templates/storage-viewer/Applet.svelte +90 -0
- package/templates/storage-viewer/applet.descriptor.ts +15 -0
- package/templates/workspace-graph-runbook-tracker/Applet.svelte +13 -0
- package/templates/workspace-graph-runbook-tracker/applet.descriptor.ts +7 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Where `vibes applet serve` keeps the stores a local applet declares.
|
|
3
|
+
*
|
|
4
|
+
* One `storage/manifest`, partitioned per applet project and then per declared
|
|
5
|
+
* store (`StorageManifest.partition`), so one applet's store can never address
|
|
6
|
+
* another's rows and deleting one store cannot touch its neighbour. Each
|
|
7
|
+
* partition is one document: the store's keys and their values.
|
|
8
|
+
*
|
|
9
|
+
* LocalDB only, in the bound workspace (`project` scope): an applet's data is
|
|
10
|
+
* durable workspace state, so a host without LocalDB refuses rather than
|
|
11
|
+
* quietly keeping the data in memory until the next restart.
|
|
12
|
+
*
|
|
13
|
+
* Registered by the applets CLI plugin; it waits, like any descriptor, for the
|
|
14
|
+
* `storage/manifest` kind that the Storage plugin owns.
|
|
15
|
+
*/
|
|
16
|
+
import * as z from 'zod/v4';
|
|
17
|
+
import { boundedJsonValueSchema } from '@vibesdotdev/shared/schemas';
|
|
18
|
+
import { StorageManifestDescriptorSchema } from '@vibesdotdev/storage/schemas';
|
|
19
|
+
export const APPLET_LOCAL_STORE_MANIFEST_ID = 'applets.local-store';
|
|
20
|
+
/** The longest key a store document holds; the root surface refuses longer ones first. */
|
|
21
|
+
const APPLET_LOCAL_STORE_KEY_MAX = 256;
|
|
22
|
+
/** One declared store: each key and its bounded JSON value. */
|
|
23
|
+
export const appletLocalStoreDocumentSchema = z.record(z.string().min(1).max(APPLET_LOCAL_STORE_KEY_MAX), boundedJsonValueSchema);
|
|
24
|
+
export const appletLocalStoreStorageDescriptor = StorageManifestDescriptorSchema.parse({
|
|
25
|
+
kind: 'storage/manifest',
|
|
26
|
+
id: APPLET_LOCAL_STORE_MANIFEST_ID,
|
|
27
|
+
name: 'Local applet stores',
|
|
28
|
+
description: 'The stores each local applet declares in applet.storage.json, served by `vibes applet serve`. Partitioned per project and store.',
|
|
29
|
+
namespace: APPLET_LOCAL_STORE_MANIFEST_ID,
|
|
30
|
+
schema: appletLocalStoreDocumentSchema,
|
|
31
|
+
dataType: 'objects',
|
|
32
|
+
allowedAdapters: ['storage.localdb'],
|
|
33
|
+
defaultAdapter: 'storage.localdb',
|
|
34
|
+
scope: 'project',
|
|
35
|
+
version: 1,
|
|
36
|
+
internal: true
|
|
37
|
+
});
|
|
38
|
+
export default appletLocalStoreStorageDescriptor;
|
|
39
|
+
//# sourceMappingURL=applet-local-store.storage.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-local-store.storage.descriptor.js","sourceRoot":"","sources":["../../src/cli/applet-local-store.storage.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EACN,+BAA+B,EAE/B,MAAM,8BAA8B,CAAC;AAEtC,MAAM,CAAC,MAAM,8BAA8B,GAAG,qBAAqB,CAAC;AAEpE,0FAA0F;AAC1F,MAAM,0BAA0B,GAAG,GAAG,CAAC;AAEvC,+DAA+D;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,CAAC,MAAM,CACrD,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,0BAA0B,CAAC,EACjD,sBAAsB,CACtB,CAAC;AAGF,MAAM,CAAC,MAAM,iCAAiC,GAAG,+BAA+B,CAAC,KAAK,CAAC;IACtF,IAAI,EAAE,kBAAkB;IACxB,EAAE,EAAE,8BAA8B;IAClC,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EACV,kIAAkI;IACnI,SAAS,EAAE,8BAA8B;IACzC,MAAM,EAAE,8BAA8B;IACtC,QAAQ,EAAE,SAAS;IACnB,eAAe,EAAE,CAAC,iBAAiB,CAAC;IACpC,cAAc,EAAE,iBAAiB;IACjC,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,IAAI;CACd,CAAqC,CAAC;AAEvC,eAAe,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local applet server: a `pm/process` descriptor the applets CLI plugin
|
|
3
|
+
* registers.
|
|
4
|
+
*
|
|
5
|
+
* Makes `vibes applet serve` a managed process: it outlives the shell that
|
|
6
|
+
* started it, restarts if it crashes, and shows in `vibes pm list`. One origin
|
|
7
|
+
* on 127.0.0.1:5190 serves every project under the workspace's
|
|
8
|
+
* `.vibes/applets` from disk at request time, so editing an applet needs no
|
|
9
|
+
* restart, only a reload.
|
|
10
|
+
*
|
|
11
|
+
* Runs the shipping command, `vibes applet serve`, through the executable host
|
|
12
|
+
* PM itself runs (`selfSpawn: true`), like every other managed vibes process.
|
|
13
|
+
*
|
|
14
|
+
* Authorship (rc02-rc03 §2.5): a published package registers its descriptors
|
|
15
|
+
* through its plugin. This was `applet-serve.pm.process.ts` at the package
|
|
16
|
+
* root, found by pattern discovery. That module read `VIBES_WORKSPACE_PATH`
|
|
17
|
+
* from the host's ambient environment and walked up from its own directory for a
|
|
18
|
+
* `.vibes/applets`; both are gone. The descriptor is pure data and names no
|
|
19
|
+
* root: PM starts the child in its admitted workspace, and `applet serve`
|
|
20
|
+
* serves its own bound workspace (`--root` absent), which the kernel resolves.
|
|
21
|
+
*/
|
|
22
|
+
export declare const appletServeProcessDescriptor: {
|
|
23
|
+
readonly kind: "pm/process";
|
|
24
|
+
readonly id: "applet-serve";
|
|
25
|
+
readonly name: "Applet Serve";
|
|
26
|
+
readonly description: "Local applet web server: every applet under the workspace's .vibes/applets on http://127.0.0.1:5190.";
|
|
27
|
+
readonly command: "vibes";
|
|
28
|
+
readonly args: readonly ["applet", "serve", "--port", "5190"];
|
|
29
|
+
readonly selfSpawn: true;
|
|
30
|
+
readonly autoRestart: true;
|
|
31
|
+
readonly restartDelay: 2000;
|
|
32
|
+
readonly maxRestarts: 10;
|
|
33
|
+
readonly presets: readonly ["dev"];
|
|
34
|
+
readonly tags: readonly ["applets", "dev-server"];
|
|
35
|
+
};
|
|
36
|
+
export default appletServeProcessDescriptor;
|
|
37
|
+
//# sourceMappingURL=applet-serve.process.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve.process.descriptor.d.ts","sourceRoot":"","sources":["../../src/cli/applet-serve.process.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;CAiB/B,CAAC;AAEX,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local applet server: a `pm/process` descriptor the applets CLI plugin
|
|
3
|
+
* registers.
|
|
4
|
+
*
|
|
5
|
+
* Makes `vibes applet serve` a managed process: it outlives the shell that
|
|
6
|
+
* started it, restarts if it crashes, and shows in `vibes pm list`. One origin
|
|
7
|
+
* on 127.0.0.1:5190 serves every project under the workspace's
|
|
8
|
+
* `.vibes/applets` from disk at request time, so editing an applet needs no
|
|
9
|
+
* restart, only a reload.
|
|
10
|
+
*
|
|
11
|
+
* Runs the shipping command, `vibes applet serve`, through the executable host
|
|
12
|
+
* PM itself runs (`selfSpawn: true`), like every other managed vibes process.
|
|
13
|
+
*
|
|
14
|
+
* Authorship (rc02-rc03 §2.5): a published package registers its descriptors
|
|
15
|
+
* through its plugin. This was `applet-serve.pm.process.ts` at the package
|
|
16
|
+
* root, found by pattern discovery. That module read `VIBES_WORKSPACE_PATH`
|
|
17
|
+
* from the host's ambient environment and walked up from its own directory for a
|
|
18
|
+
* `.vibes/applets`; both are gone. The descriptor is pure data and names no
|
|
19
|
+
* root: PM starts the child in its admitted workspace, and `applet serve`
|
|
20
|
+
* serves its own bound workspace (`--root` absent), which the kernel resolves.
|
|
21
|
+
*/
|
|
22
|
+
export const appletServeProcessDescriptor = {
|
|
23
|
+
kind: 'pm/process',
|
|
24
|
+
id: 'applet-serve',
|
|
25
|
+
name: 'Applet Serve',
|
|
26
|
+
description: "Local applet web server: every applet under the workspace's .vibes/applets on http://127.0.0.1:5190.",
|
|
27
|
+
command: 'vibes',
|
|
28
|
+
args: ['applet', 'serve', '--port', '5190'],
|
|
29
|
+
// The host that spawns this process is the host that must run it: PM
|
|
30
|
+
// resolves the host's self-spawn command at activation (S15) instead of
|
|
31
|
+
// trusting a `vibes` on PATH that may be a different build, and fails
|
|
32
|
+
// closed on a host without one.
|
|
33
|
+
selfSpawn: true,
|
|
34
|
+
autoRestart: true,
|
|
35
|
+
restartDelay: 2_000,
|
|
36
|
+
maxRestarts: 10,
|
|
37
|
+
presets: ['dev'],
|
|
38
|
+
tags: ['applets', 'dev-server']
|
|
39
|
+
};
|
|
40
|
+
export default appletServeProcessDescriptor;
|
|
41
|
+
//# sourceMappingURL=applet-serve.process.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"applet-serve.process.descriptor.js","sourceRoot":"","sources":["../../src/cli/applet-serve.process.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC3C,IAAI,EAAE,YAAY;IAClB,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,sGAAsG;IACnH,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;IAC3C,qEAAqE;IACrE,wEAAwE;IACxE,sEAAsE;IACtE,gCAAgC;IAChC,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,IAAI;IACjB,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,EAAE;IACf,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,IAAI,EAAE,CAAC,SAAS,EAAE,YAAY,CAAC;CACtB,CAAC;AAEX,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet build` — read one project and report what it would publish.
|
|
3
|
+
*
|
|
4
|
+
* "Build" here means: resolve the file set, compute the digest-pinned inventory,
|
|
5
|
+
* and say what a publish would carry. It deliberately does NOT compile or upload
|
|
6
|
+
* — the compiler lives in `apps/platform-web` and publishing needs a session, and
|
|
7
|
+
* a command that quietly does either would make a local, offline operation into
|
|
8
|
+
* something else.
|
|
9
|
+
*/
|
|
10
|
+
export declare const appletBuildCommandDescriptor: {
|
|
11
|
+
readonly kind: "cli/command";
|
|
12
|
+
readonly id: "applet.build";
|
|
13
|
+
readonly name: "build";
|
|
14
|
+
readonly description: "Resolve one Applet project under .vibes/applets and report its digest-pinned file inventory. Reads the filesystem only; does not compile or publish.";
|
|
15
|
+
readonly group: "applet";
|
|
16
|
+
readonly arguments: [{
|
|
17
|
+
readonly name: "id";
|
|
18
|
+
readonly description: "The project directory name under .vibes/applets";
|
|
19
|
+
readonly required: true;
|
|
20
|
+
}];
|
|
21
|
+
readonly options: [{
|
|
22
|
+
readonly flags: "--entry <name>";
|
|
23
|
+
readonly description: "Entry component within the project (default: Applet.svelte)";
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
}];
|
|
26
|
+
readonly surfaces: ["cli"];
|
|
27
|
+
readonly hardware: readonly ["consumer", "cloud"];
|
|
28
|
+
readonly enabled: true;
|
|
29
|
+
readonly examples: [{
|
|
30
|
+
readonly command: "vibes applet build my-applet";
|
|
31
|
+
readonly description: "Show the file inventory a publish would carry";
|
|
32
|
+
readonly expectExit: 0;
|
|
33
|
+
}, {
|
|
34
|
+
readonly command: "vibes applet build my-applet --json";
|
|
35
|
+
readonly description: "Emit the inventory as JSON";
|
|
36
|
+
readonly expectExit: 0;
|
|
37
|
+
}];
|
|
38
|
+
};
|
|
39
|
+
export default appletBuildCommandDescriptor;
|
|
40
|
+
//# sourceMappingURL=build.command.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.command.descriptor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.command.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwCvC,CAAC;AAEH,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet build` — read one project and report what it would publish.
|
|
3
|
+
*
|
|
4
|
+
* "Build" here means: resolve the file set, compute the digest-pinned inventory,
|
|
5
|
+
* and say what a publish would carry. It deliberately does NOT compile or upload
|
|
6
|
+
* — the compiler lives in `apps/platform-web` and publishing needs a session, and
|
|
7
|
+
* a command that quietly does either would make a local, offline operation into
|
|
8
|
+
* something else.
|
|
9
|
+
*/
|
|
10
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
11
|
+
export const appletBuildCommandDescriptor = createRuntimeAsset({
|
|
12
|
+
kind: 'cli/command',
|
|
13
|
+
id: 'applet.build',
|
|
14
|
+
name: 'build',
|
|
15
|
+
description: 'Resolve one Applet project under .vibes/applets and report its digest-pinned file inventory. Reads the filesystem only; does not compile or publish.',
|
|
16
|
+
group: 'applet',
|
|
17
|
+
arguments: [
|
|
18
|
+
{
|
|
19
|
+
name: 'id',
|
|
20
|
+
description: 'The project directory name under .vibes/applets',
|
|
21
|
+
required: true
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
options: [
|
|
25
|
+
{
|
|
26
|
+
// `flags` is a COMMANDER flag string, which is what `CLIOptionSchema`
|
|
27
|
+
// requires. A `{ name, type, required }` shape parses as an invalid
|
|
28
|
+
// descriptor, and the runtime SKIPS it with a warning — so the command
|
|
29
|
+
// silently vanishes rather than failing loudly.
|
|
30
|
+
flags: '--entry <name>',
|
|
31
|
+
description: 'Entry component within the project (default: Applet.svelte)',
|
|
32
|
+
type: 'string'
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
surfaces: ['cli'],
|
|
36
|
+
hardware: ['consumer', 'cloud'],
|
|
37
|
+
enabled: true,
|
|
38
|
+
examples: [
|
|
39
|
+
{
|
|
40
|
+
command: 'vibes applet build my-applet',
|
|
41
|
+
description: 'Show the file inventory a publish would carry',
|
|
42
|
+
expectExit: 0
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
command: 'vibes applet build my-applet --json',
|
|
46
|
+
description: 'Emit the inventory as JSON',
|
|
47
|
+
expectExit: 0
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
export default appletBuildCommandDescriptor;
|
|
52
|
+
//# sourceMappingURL=build.command.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.command.descriptor.js","sourceRoot":"","sources":["../../../src/cli/commands/build.command.descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,MAAM,4BAA4B,GAAG,kBAAkB,CAAC;IAC9D,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,cAAc;IAClB,IAAI,EAAE,OAAO;IACb,WAAW,EACV,sJAAsJ;IACvJ,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE;QACV;YACC,IAAI,EAAE,IAAI;YACV,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,IAAI;SACd;KACD;IACD,OAAO,EAAE;QACR;YACC,sEAAsE;YACtE,oEAAoE;YACpE,uEAAuE;YACvE,gDAAgD;YAChD,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,6DAA6D;YAC1E,IAAI,EAAE,QAAQ;SACd;KACD;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACT;YACC,OAAO,EAAE,8BAA8B;YACvC,WAAW,EAAE,+CAA+C;YAC5D,UAAU,EAAE,CAAC;SACb;QACD;YACC,OAAO,EAAE,qCAAqC;YAC9C,WAAW,EAAE,4BAA4B;YACzC,UAAU,EAAE,CAAC;SACb;KACD;CACD,CAAC,CAAC;AAEH,eAAe,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { CommandContext, CommandOptions } from '@vibesdotdev/cli';
|
|
2
|
+
/** Resolved by `impl.execute`. See the note in `list.command.impl.ts`. */
|
|
3
|
+
export declare function execute(args: CommandOptions, options: CommandOptions, context: CommandContext): Promise<void>;
|
|
4
|
+
declare const _default: {
|
|
5
|
+
execute: typeof execute;
|
|
6
|
+
};
|
|
7
|
+
export default _default;
|
|
8
|
+
//# sourceMappingURL=build.command.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.command.impl.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/build.command.impl.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2HvE,0EAA0E;AAC1E,wBAAsB,OAAO,CAC5B,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAKf;;;;AAED,wBAA2B"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet build` implementation.
|
|
3
|
+
*
|
|
4
|
+
* Resolves ONE project through the same `readAppletLocalProject` the rest of the
|
|
5
|
+
* pipeline uses, so what this prints is what a publish would carry — not a second
|
|
6
|
+
* opinion about it.
|
|
7
|
+
*/
|
|
8
|
+
import { commandWriters, writeJson, writeStdoutLine } from '@vibesdotdev/cli/output';
|
|
9
|
+
import { requestCLIExit } from '@vibesdotdev/cli/providers';
|
|
10
|
+
import * as z from 'zod/v4';
|
|
11
|
+
import { buildAppletLocalDefinitionManifest, computeAppletManifestHash, readAppletLocalProject } from '@vibesdotdev/applets';
|
|
12
|
+
import { appletProjectsDir, digestContents, readAppletProjectEntries, resolveAppletProjectHost, resolveAppletWorkspaceRoot } from "../project-files.js";
|
|
13
|
+
const buildArgsSchema = z.object({
|
|
14
|
+
id: z.string().optional()
|
|
15
|
+
}).passthrough();
|
|
16
|
+
const buildOptionsSchema = z.object({
|
|
17
|
+
format: z.string().optional(),
|
|
18
|
+
entry: z.string().optional()
|
|
19
|
+
}).passthrough();
|
|
20
|
+
async function run(runtime, id, options = {}) {
|
|
21
|
+
const workspaceRoot = await resolveAppletWorkspaceRoot(runtime);
|
|
22
|
+
const host = await resolveAppletProjectHost(runtime);
|
|
23
|
+
const writers = await commandWriters(runtime);
|
|
24
|
+
const projectsDir = appletProjectsDir(workspaceRoot, host);
|
|
25
|
+
const projectDir = host.paths.join(projectsDir, id);
|
|
26
|
+
if (!(await host.files.exists(projectDir))) {
|
|
27
|
+
writers.log(`No Applet project "${id}". Run \`vibes applet list\` to see what is there.`);
|
|
28
|
+
requestCLIExit(1);
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const entries = await readAppletProjectEntries(workspaceRoot, id, host);
|
|
32
|
+
const input = {
|
|
33
|
+
id,
|
|
34
|
+
entries,
|
|
35
|
+
digest: digestContents
|
|
36
|
+
};
|
|
37
|
+
if (options.entry)
|
|
38
|
+
input.entry = options.entry;
|
|
39
|
+
const result = await readAppletLocalProject(input);
|
|
40
|
+
if (!result.ok) {
|
|
41
|
+
// EVERY error, not the first. This runs during authoring, where the author
|
|
42
|
+
// wants to see everything that is wrong in one pass — the same reason
|
|
43
|
+
// `buildAppletDefinitionManifest` and `validateStarter` return errors
|
|
44
|
+
// rather than throwing.
|
|
45
|
+
if (options.format === 'json') {
|
|
46
|
+
await writeJson(runtime, { ok: false, id, errors: result.errors });
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
writers.log(`Applet "${id}" cannot be built:\n`);
|
|
50
|
+
for (const error of result.errors)
|
|
51
|
+
writers.log(` ${error.path}: ${error.message}`);
|
|
52
|
+
}
|
|
53
|
+
requestCLIExit(1);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const { project } = result;
|
|
57
|
+
const totalBytes = project.files.reduce((sum, file) => sum + file.size, 0);
|
|
58
|
+
// The inventory must actually BECOME a manifest, or `build` reports something
|
|
59
|
+
// that cannot publish — the exact declarable-and-unpublishable defect this
|
|
60
|
+
// branch removes elsewhere. `buildAppletDefinitionManifest` is the producer
|
|
61
|
+
// that already exists; running it here is what makes "what a publish would
|
|
62
|
+
// carry" true rather than approximate. It is what catches a 40 MB file
|
|
63
|
+
// against the 16 MiB cap, a 257th file, and a path the manifest refuses.
|
|
64
|
+
// The SAME producer `serve` binds stores from, so the hash printed below
|
|
65
|
+
// covers the stores the applet actually declares.
|
|
66
|
+
const built = buildAppletLocalDefinitionManifest(project);
|
|
67
|
+
if (!built.ok) {
|
|
68
|
+
if (options.format === 'json') {
|
|
69
|
+
await writeJson(runtime, { ok: false, id, errors: built.errors.map((message) => ({ path: id, message })) });
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
writers.log(`Applet "${id}" resolves, but could not become a manifest:\n`);
|
|
73
|
+
for (const message of built.errors)
|
|
74
|
+
writers.log(` ${message}`);
|
|
75
|
+
}
|
|
76
|
+
requestCLIExit(1);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
// THE PIN, so a composing author can put it in their edge.
|
|
80
|
+
//
|
|
81
|
+
// A composition edge that pins `manifestHash` is what makes a child's
|
|
82
|
+
// declarations trustworthy — the storage route refuses a child whose manifest
|
|
83
|
+
// is not committed to. The hash is computable from the built manifest, and
|
|
84
|
+
// nowhere else showed it, so a pin was a thing the system required and no
|
|
85
|
+
// author could obtain.
|
|
86
|
+
const manifestHash = await computeAppletManifestHash(built.manifest);
|
|
87
|
+
if (options.format === 'json') {
|
|
88
|
+
await writeJson(runtime, {
|
|
89
|
+
ok: true,
|
|
90
|
+
id: project.id,
|
|
91
|
+
entry: project.entry,
|
|
92
|
+
files: project.files,
|
|
93
|
+
totalBytes,
|
|
94
|
+
manifestHash
|
|
95
|
+
});
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
await writeStdoutLine(runtime, `Applet "${project.id}" — entry ${project.entry}\n`);
|
|
99
|
+
for (const file of project.files) {
|
|
100
|
+
// The DIGEST is the point of this command: it is what pins a release, and
|
|
101
|
+
// seeing it locally is how an author knows what they are about to publish.
|
|
102
|
+
await writeStdoutLine(runtime, ` ${file.digest.slice(0, 19)}… ${String(file.size).padStart(7)} ${file.path}`);
|
|
103
|
+
}
|
|
104
|
+
await writeStdoutLine(runtime, `\n ${project.files.length} file(s), ${totalBytes} bytes`);
|
|
105
|
+
await writeStdoutLine(runtime, `\n manifestHash ${manifestHash}`);
|
|
106
|
+
await writeStdoutLine(runtime, ` Pin this on a composition edge to let this applet be composed with storage.`);
|
|
107
|
+
}
|
|
108
|
+
/** Resolved by `impl.execute`. See the note in `list.command.impl.ts`. */
|
|
109
|
+
export async function execute(args, options, context) {
|
|
110
|
+
const parsedArgs = buildArgsSchema.safeParse(args);
|
|
111
|
+
const parsedOptions = buildOptionsSchema.safeParse(options);
|
|
112
|
+
const id = parsedArgs.success && parsedArgs.data.id ? parsedArgs.data.id : '';
|
|
113
|
+
await run(context.runtime, id, parsedOptions.success ? parsedOptions.data : {});
|
|
114
|
+
}
|
|
115
|
+
export default { execute };
|
|
116
|
+
//# sourceMappingURL=build.command.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build.command.impl.js","sourceRoot":"","sources":["../../../src/cli/commands/build.command.impl.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EACN,kCAAkC,EAClC,yBAAyB,EACzB,sBAAsB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACN,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACzB,CAAC,CAAC,WAAW,EAAE,CAAC;AAEjB,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC5B,CAAC,CAAC,WAAW,EAAE,CAAC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,UAAU,OAAO,CAC5B,IAAoB,EACpB,OAAuB,EACvB,OAAuB;IAEvB,MAAM,UAAU,GAAG,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,aAAa,GAAG,kBAAkB,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC5D,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,MAAM,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,EAAE,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACjF,CAAC;AAED,eAAe,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet init` — scaffold a local project from a shipped template.
|
|
3
|
+
*/
|
|
4
|
+
export declare const appletInitCommandDescriptor: {
|
|
5
|
+
readonly kind: "cli/command";
|
|
6
|
+
readonly id: "applet.init";
|
|
7
|
+
readonly name: "init";
|
|
8
|
+
readonly description: "Create .vibes/applets/{id}/ from a first-party template (see `vibes applet templates`).";
|
|
9
|
+
readonly group: "applet";
|
|
10
|
+
readonly arguments: [{
|
|
11
|
+
readonly name: "id";
|
|
12
|
+
readonly description: "New local applet project id";
|
|
13
|
+
}];
|
|
14
|
+
readonly options: [{
|
|
15
|
+
readonly flags: "--from <template>";
|
|
16
|
+
readonly type: "string";
|
|
17
|
+
readonly description: "Template id to scaffold from";
|
|
18
|
+
}];
|
|
19
|
+
readonly surfaces: ["cli"];
|
|
20
|
+
readonly hardware: readonly ["consumer", "cloud"];
|
|
21
|
+
readonly enabled: true;
|
|
22
|
+
readonly examples: [{
|
|
23
|
+
readonly command: "vibes applet init my-viewer --from file-viewer";
|
|
24
|
+
readonly description: "Scaffold from the file-viewer template";
|
|
25
|
+
readonly expectExit: 0;
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
28
|
+
export default appletInitCommandDescriptor;
|
|
29
|
+
//# sourceMappingURL=init.command.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.command.descriptor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.command.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;CAgBtC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet init` — scaffold a local project from a shipped template.
|
|
3
|
+
*/
|
|
4
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
5
|
+
export const appletInitCommandDescriptor = createRuntimeAsset({
|
|
6
|
+
kind: 'cli/command',
|
|
7
|
+
id: 'applet.init',
|
|
8
|
+
name: 'init',
|
|
9
|
+
description: 'Create .vibes/applets/{id}/ from a first-party template (see `vibes applet templates`).',
|
|
10
|
+
group: 'applet',
|
|
11
|
+
arguments: [{ name: 'id', description: 'New local applet project id' }],
|
|
12
|
+
options: [
|
|
13
|
+
{ flags: '--from <template>', type: 'string', description: 'Template id to scaffold from' }
|
|
14
|
+
],
|
|
15
|
+
surfaces: ['cli'],
|
|
16
|
+
hardware: ['consumer', 'cloud'],
|
|
17
|
+
enabled: true,
|
|
18
|
+
examples: [
|
|
19
|
+
{ command: 'vibes applet init my-viewer --from file-viewer', description: 'Scaffold from the file-viewer template', expectExit: 0 }
|
|
20
|
+
]
|
|
21
|
+
});
|
|
22
|
+
export default appletInitCommandDescriptor;
|
|
23
|
+
//# sourceMappingURL=init.command.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.command.descriptor.js","sourceRoot":"","sources":["../../../src/cli/commands/init.command.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;IAC7D,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,yFAAyF;IACtG,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;IACvE,OAAO,EAAE;QACR,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;KAC3F;IACD,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,gDAAgD,EAAE,WAAW,EAAE,wCAAwC,EAAE,UAAU,EAAE,CAAC,EAAE;KACnI;CACD,CAAC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CommandContext, CommandOptions } from '@vibesdotdev/cli';
|
|
2
|
+
export declare function execute(args: CommandOptions, options: CommandOptions, context: CommandContext): Promise<void>;
|
|
3
|
+
declare const _default: {
|
|
4
|
+
execute: typeof execute;
|
|
5
|
+
};
|
|
6
|
+
export default _default;
|
|
7
|
+
//# sourceMappingURL=init.command.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.command.impl.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.command.impl.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAoEvE,wBAAsB,OAAO,CAC5B,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAIf;;;;AAED,wBAA2B"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet init` implementation — copy a shipped template into a new
|
|
3
|
+
* local project, rewriting the descriptor id.
|
|
4
|
+
*/
|
|
5
|
+
import * as z from 'zod/v4';
|
|
6
|
+
import { requestCLIExit } from '@vibesdotdev/cli/providers';
|
|
7
|
+
import { commandWriters, writeStdoutLine } from '@vibesdotdev/cli/output';
|
|
8
|
+
import { CapabilityError } from '@vibesdotdev/kernel';
|
|
9
|
+
import { resolveAppletWorkspaceRoot } from "../project-files.js";
|
|
10
|
+
import { APPLET_PROJECT_ROOT } from '@vibesdotdev/applets';
|
|
11
|
+
import { listTemplateIds, resolveAppletTemplateHost, resolveTemplatesDir } from "./templates.command.impl.js";
|
|
12
|
+
const initArgsSchema = z.object({
|
|
13
|
+
id: z.string().optional()
|
|
14
|
+
}).passthrough();
|
|
15
|
+
const initOptionsSchema = z.object({
|
|
16
|
+
from: z.string().optional()
|
|
17
|
+
}).passthrough();
|
|
18
|
+
async function run(runtime, args, options) {
|
|
19
|
+
const id = args.id ?? '';
|
|
20
|
+
const from = options.from ?? '';
|
|
21
|
+
const writers = await commandWriters(runtime);
|
|
22
|
+
if (!/^[a-z0-9][a-z0-9-]*$/.test(id)) {
|
|
23
|
+
writers.log(`Invalid project id "${id}" — lowercase letters, digits, hyphens.`);
|
|
24
|
+
requestCLIExit(1);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const host = await resolveAppletTemplateHost(runtime);
|
|
28
|
+
const templates = await listTemplateIds(host);
|
|
29
|
+
if (!templates.includes(from)) {
|
|
30
|
+
writers.log(`Unknown template "${from}". Available: ${templates.join(', ')}`);
|
|
31
|
+
requestCLIExit(1);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const workspaceRoot = await resolveAppletWorkspaceRoot(runtime);
|
|
35
|
+
const target = host.paths.join(workspaceRoot, APPLET_PROJECT_ROOT, id);
|
|
36
|
+
if (await host.files.exists(target)) {
|
|
37
|
+
writers.log(`Already exists: ${target}`);
|
|
38
|
+
requestCLIExit(1);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
await host.files.mkdir(target, { recursive: true });
|
|
42
|
+
await host.files.copy(host.paths.join(await resolveTemplatesDir(host), from), target, { recursive: true });
|
|
43
|
+
// Rewrite the descriptor id so the scaffold is its own project.
|
|
44
|
+
const descPath = host.paths.join(target, 'applet.descriptor.ts');
|
|
45
|
+
if (await host.files.exists(descPath)) {
|
|
46
|
+
const text = z.string().safeParse(await host.files.readFile(descPath, 'utf8'));
|
|
47
|
+
if (!text.success) {
|
|
48
|
+
throw new CapabilityError('The template descriptor is not text.', 'INVALID_INPUT', {
|
|
49
|
+
reason: 'applet-template-descriptor-invalid',
|
|
50
|
+
cause: text.error
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
await host.files.writeFile(descPath, text.data.replace(/(id:\s*)'[^']*'/, `$1'${id}'`));
|
|
54
|
+
}
|
|
55
|
+
await writeStdoutLine(runtime, `Created ${host.paths.join(APPLET_PROJECT_ROOT, id)}/ from template "${from}".`);
|
|
56
|
+
await writeStdoutLine(runtime, 'Next: vibes applet build ' + id);
|
|
57
|
+
}
|
|
58
|
+
export async function execute(args, options, context) {
|
|
59
|
+
const parsedArgs = initArgsSchema.safeParse(args);
|
|
60
|
+
const parsedOptions = initOptionsSchema.safeParse(options);
|
|
61
|
+
await run(context.runtime, parsedArgs.success ? parsedArgs.data : {}, parsedOptions.success ? parsedOptions.data : {});
|
|
62
|
+
}
|
|
63
|
+
export default { execute };
|
|
64
|
+
//# sourceMappingURL=init.command.impl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.command.impl.js","sourceRoot":"","sources":["../../../src/cli/commands/init.command.impl.ts"],"names":[],"mappings":"AAAA;;;G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ly kind: "cli/command";
|
|
6
|
+
readonly id: "applet.list";
|
|
7
|
+
readonly name: "list";
|
|
8
|
+
readonly description: "List Applet projects under .vibes/applets in the current workspace. Reads the filesystem only; no network, no session.";
|
|
9
|
+
readonly group: "applet";
|
|
10
|
+
readonly arguments: [];
|
|
11
|
+
readonly options: [];
|
|
12
|
+
readonly surfaces: ["cli"];
|
|
13
|
+
readonly hardware: readonly ["consumer", "cloud"];
|
|
14
|
+
readonly enabled: true;
|
|
15
|
+
readonly examples: [{
|
|
16
|
+
readonly command: "vibes applet list";
|
|
17
|
+
readonly description: "Show every local Applet project";
|
|
18
|
+
readonly expectExit: 0;
|
|
19
|
+
}, {
|
|
20
|
+
readonly command: "vibes applet list --json";
|
|
21
|
+
readonly description: "Emit the projects as JSON";
|
|
22
|
+
readonly expectExit: 0;
|
|
23
|
+
}];
|
|
24
|
+
};
|
|
25
|
+
export default appletListCommandDescriptor;
|
|
26
|
+
//# sourceMappingURL=list.command.descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.command.descriptor.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.command.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;CAgBtC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `vibes applet list` — the applet projects in this workspace.
|
|
3
|
+
*/
|
|
4
|
+
import { createRuntimeAsset } from '@vibesdotdev/kernel';
|
|
5
|
+
export const appletListCommandDescriptor = createRuntimeAsset({
|
|
6
|
+
kind: 'cli/command',
|
|
7
|
+
id: 'applet.list',
|
|
8
|
+
name: 'list',
|
|
9
|
+
description: 'List Applet projects under .vibes/applets in the current workspace. Reads the filesystem only; no network, no session.',
|
|
10
|
+
group: 'applet',
|
|
11
|
+
arguments: [],
|
|
12
|
+
options: [],
|
|
13
|
+
surfaces: ['cli'],
|
|
14
|
+
hardware: ['consumer', 'cloud'],
|
|
15
|
+
enabled: true,
|
|
16
|
+
examples: [
|
|
17
|
+
{ command: 'vibes applet list', description: 'Show every local Applet project', expectExit: 0 },
|
|
18
|
+
{ command: 'vibes applet list --json', description: 'Emit the projects as JSON', expectExit: 0 }
|
|
19
|
+
]
|
|
20
|
+
});
|
|
21
|
+
export default appletListCommandDescriptor;
|
|
22
|
+
//# sourceMappingURL=list.command.descriptor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.command.descriptor.js","sourceRoot":"","sources":["../../../src/cli/commands/list.command.descriptor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,CAAC,MAAM,2BAA2B,GAAG,kBAAkB,CAAC;IAC7D,IAAI,EAAE,aAAa;IACnB,EAAE,EAAE,aAAa;IACjB,IAAI,EAAE,MAAM;IACZ,WAAW,EACV,wHAAwH;IACzH,KAAK,EAAE,QAAQ;IACf,SAAS,EAAE,EAAE;IACb,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;IAC/B,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACT,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,iCAAiC,EAAE,UAAU,EAAE,CAAC,EAAE;QAC/F,EAAE,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,2BAA2B,EAAE,UAAU,EAAE,CAAC,EAAE;KAChG;CACD,CAAC,CAAC;AAEH,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CommandContext, CommandOptions } from '@vibesdotdev/cli';
|
|
2
|
+
/**
|
|
3
|
+
* The CLI resolves an implementation by `impl.execute`, not by a default
|
|
4
|
+
* function. A module whose default IS the function registers fine and then
|
|
5
|
+
* reports "no resolvable implementation" at invoke time — discoverable and
|
|
6
|
+
* broken, which is worse than absent.
|
|
7
|
+
*/
|
|
8
|
+
export declare function execute(_args: CommandOptions, options: CommandOptions, context: CommandContext): Promise<void>;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
execute: typeof execute;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
//# sourceMappingURL=list.command.impl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.command.impl.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/list.command.impl.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAiDvE;;;;;GAKG;AACH,wBAAsB,OAAO,CAC5B,KAAK,EAAE,cAAc,EACrB,OAAO,EAAE,cAAc,EACvB,OAAO,EAAE,cAAc,GACrB,OAAO,CAAC,IAAI,CAAC,CAGf;;;;AAED,wBAA2B"}
|