@skaile/workspaces 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +395 -0
- package/README.md +1 -1
- package/dist/app-sdk/index.d.ts +2 -0
- package/dist/app-sdk/index.js +481 -0
- package/dist/app-sdk/index.js.map +1 -0
- package/dist/app-sdk/src/app.d.ts +152 -0
- package/dist/app-sdk/src/app.d.ts.map +1 -0
- package/dist/app-sdk/src/connection-params.d.ts +117 -0
- package/dist/app-sdk/src/connection-params.d.ts.map +1 -0
- package/dist/app-sdk/src/define-app-capability.d.ts +139 -0
- package/dist/app-sdk/src/define-app-capability.d.ts.map +1 -0
- package/dist/app-sdk/src/index.d.ts +17 -0
- package/dist/app-sdk/src/index.d.ts.map +1 -0
- package/dist/app-sdk/src/logger.d.ts +26 -0
- package/dist/app-sdk/src/logger.d.ts.map +1 -0
- package/dist/app-sdk/src/transport.d.ts +93 -0
- package/dist/app-sdk/src/transport.d.ts.map +1 -0
- package/dist/app-sdk/src/ws-transport.d.ts +79 -0
- package/dist/app-sdk/src/ws-transport.d.ts.map +1 -0
- package/dist/{asset-feeds-NEZKG6YS.js → asset-feeds-T35ELX2O.js} +11 -11
- package/dist/{asset-feeds-NEZKG6YS.js.map → asset-feeds-T35ELX2O.js.map} +1 -1
- package/dist/asset-manager/index.js +15 -10
- package/dist/asset-manager/installer.js +9 -9
- package/dist/asset-manager/renderers.js +2 -2
- package/dist/asset-manager/src/index.d.ts +42 -6
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/bridge/drivers/claude-sdk.js +2 -2
- package/dist/bridge/drivers/codex.js +1 -1
- package/dist/bridge/drivers/continue.js +2 -2
- package/dist/bridge/drivers/echo.js +1 -1
- package/dist/bridge/drivers/gemini.js +3 -3
- package/dist/bridge/drivers/goose.js +2 -2
- package/dist/bridge/drivers/omp.js +1 -1
- package/dist/bridge/drivers/opencode.js +2 -2
- package/dist/bridge/drivers/qwen.js +3 -3
- package/dist/bridge/index.js +3 -3
- package/dist/{chunk-YOPSHV7V.js → chunk-2DWXGUZA.js} +3 -3
- package/dist/{chunk-YOPSHV7V.js.map → chunk-2DWXGUZA.js.map} +1 -1
- package/dist/{chunk-XBG2YDQQ.js → chunk-2ZMO4CFG.js} +3 -3
- package/dist/{chunk-XBG2YDQQ.js.map → chunk-2ZMO4CFG.js.map} +1 -1
- package/dist/{chunk-OBSSORCE.js → chunk-3CHARYD4.js} +84 -12
- package/dist/chunk-3CHARYD4.js.map +1 -0
- package/dist/{chunk-SKADPHAM.js → chunk-4N5XR5DQ.js} +2 -2
- package/dist/chunk-4N5XR5DQ.js.map +1 -0
- package/dist/{chunk-WFEPI5LA.js → chunk-6NR2BEIY.js} +6 -6
- package/dist/{chunk-WFEPI5LA.js.map → chunk-6NR2BEIY.js.map} +1 -1
- package/dist/{chunk-7CNIRF42.js → chunk-BGIC25VK.js} +26 -15
- package/dist/chunk-BGIC25VK.js.map +1 -0
- package/dist/{chunk-YXEPZ7LP.js → chunk-CNSNN7N6.js} +6 -6
- package/dist/{chunk-YXEPZ7LP.js.map → chunk-CNSNN7N6.js.map} +1 -1
- package/dist/{chunk-PSMW5HLX.js → chunk-DMG6NJH7.js} +5 -5
- package/dist/{chunk-PSMW5HLX.js.map → chunk-DMG6NJH7.js.map} +1 -1
- package/dist/{chunk-P3MJYPZE.js → chunk-FDE7XRQA.js} +57 -9
- package/dist/chunk-FDE7XRQA.js.map +1 -0
- package/dist/{chunk-K5SD7FSF.js → chunk-HKX5VSWQ.js} +3 -3
- package/dist/{chunk-K5SD7FSF.js.map → chunk-HKX5VSWQ.js.map} +1 -1
- package/dist/{chunk-AZAS3FKN.js → chunk-HY33RMEA.js} +49 -3
- package/dist/chunk-HY33RMEA.js.map +1 -0
- package/dist/{chunk-XKARS6EE.js → chunk-IEX5YV4R.js} +3 -3
- package/dist/{chunk-XKARS6EE.js.map → chunk-IEX5YV4R.js.map} +1 -1
- package/dist/{chunk-GB4SEEK4.js → chunk-IRORTHGA.js} +10 -4
- package/dist/chunk-IRORTHGA.js.map +1 -0
- package/dist/chunk-J5TI55E7.js +203 -0
- package/dist/chunk-J5TI55E7.js.map +1 -0
- package/dist/chunk-JIDKX7GC.js +122 -0
- package/dist/chunk-JIDKX7GC.js.map +1 -0
- package/dist/{chunk-BDUANIAR.js → chunk-KEQ4GLVM.js} +3 -3
- package/dist/{chunk-BDUANIAR.js.map → chunk-KEQ4GLVM.js.map} +1 -1
- package/dist/{chunk-5XS3BFJS.js → chunk-KMY7HVQ6.js} +3 -3
- package/dist/{chunk-5XS3BFJS.js.map → chunk-KMY7HVQ6.js.map} +1 -1
- package/dist/{chunk-BZMTR5WW.js → chunk-MZV6WCF3.js} +83 -51
- package/dist/chunk-MZV6WCF3.js.map +1 -0
- package/dist/{chunk-QK5JDAFF.js → chunk-NKTFEV7Q.js} +4 -4
- package/dist/{chunk-QK5JDAFF.js.map → chunk-NKTFEV7Q.js.map} +1 -1
- package/dist/{chunk-DZCK7GRW.js → chunk-P4VHQA4N.js} +22 -6
- package/dist/chunk-P4VHQA4N.js.map +1 -0
- package/dist/{chunk-EVZKWY5J.js → chunk-PK7Q7MC7.js} +5 -4
- package/dist/chunk-PK7Q7MC7.js.map +1 -0
- package/dist/{chunk-ETYDLXI5.js → chunk-RDYOU6N6.js} +2 -2
- package/dist/{chunk-ETYDLXI5.js.map → chunk-RDYOU6N6.js.map} +1 -1
- package/dist/{chunk-RHMQPLIK.js → chunk-RSYV7XEN.js} +14 -8
- package/dist/chunk-RSYV7XEN.js.map +1 -0
- package/dist/{chunk-SUOGVHGJ.js → chunk-TNSCHS4I.js} +2 -2
- package/dist/{chunk-SUOGVHGJ.js.map → chunk-TNSCHS4I.js.map} +1 -1
- package/dist/{chunk-Z5Z3MYDL.js → chunk-UPZGQZEJ.js} +3 -3
- package/dist/{chunk-Z5Z3MYDL.js.map → chunk-UPZGQZEJ.js.map} +1 -1
- package/dist/{chunk-RJ3HUSBC.js → chunk-UQ5FK2AB.js} +3 -3
- package/dist/{chunk-RJ3HUSBC.js.map → chunk-UQ5FK2AB.js.map} +1 -1
- package/dist/{chunk-OUWNTFDG.js → chunk-UQKYT4V6.js} +38 -6
- package/dist/chunk-UQKYT4V6.js.map +1 -0
- package/dist/chunk-WYGXYGJH.js +688 -0
- package/dist/chunk-WYGXYGJH.js.map +1 -0
- package/dist/{chunk-TJRWGMD2.js → chunk-ZBZQC5R7.js} +3 -3
- package/dist/{chunk-TJRWGMD2.js.map → chunk-ZBZQC5R7.js.map} +1 -1
- package/dist/cli/index.js +1022 -374
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/catalog.d.ts +18 -0
- package/dist/cli/src/commands/catalog.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts +2 -2
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-publish.d.ts +53 -0
- package/dist/cli/src/commands/library-publish.d.ts.map +1 -0
- package/dist/cli/src/commands/preset-apply.d.ts +59 -0
- package/dist/cli/src/commands/preset-apply.d.ts.map +1 -0
- package/dist/cli/src/commands/preset-cmd.d.ts +8 -2
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-export.d.ts +102 -0
- package/dist/cli/src/commands/preset-export.d.ts.map +1 -0
- package/dist/cli/src/commands/project.d.ts.map +1 -1
- package/dist/cli/src/commands/publish-core.d.ts +75 -0
- package/dist/cli/src/commands/publish-core.d.ts.map +1 -0
- package/dist/cli/src/commands/run.d.ts.map +1 -1
- package/dist/cli/src/commands/source-manifest-publish.d.ts +82 -0
- package/dist/cli/src/commands/source-manifest-publish.d.ts.map +1 -0
- package/dist/cli/src/commands/source-manifest.d.ts +65 -6
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -1
- package/dist/cli/src/commands/source.d.ts +13 -0
- package/dist/cli/src/commands/source.d.ts.map +1 -1
- package/dist/cli/src/commands/store.d.ts.map +1 -1
- package/dist/cli/src/commands/why.d.ts +18 -0
- package/dist/cli/src/commands/why.d.ts.map +1 -1
- package/dist/cli/src/driver-error.d.ts +12 -0
- package/dist/cli/src/driver-error.d.ts.map +1 -0
- package/dist/cli/src/open-library.d.ts +4 -0
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/cli/src/store-auth.d.ts +42 -0
- package/dist/cli/src/store-auth.d.ts.map +1 -0
- package/dist/cli/src/store-client.d.ts +20 -22
- package/dist/cli/src/store-client.d.ts.map +1 -1
- package/dist/cli/src/store-publisher.d.ts +91 -0
- package/dist/cli/src/store-publisher.d.ts.map +1 -0
- package/dist/connectors/config.js +6 -6
- package/dist/connectors/index.js +8 -8
- package/dist/core/index.js +5 -5
- package/dist/core/publish-manifest.js +1 -1
- package/dist/core/runtime-assets.js +3 -3
- package/dist/core/src/cache-paths.d.ts +17 -0
- package/dist/core/src/cache-paths.d.ts.map +1 -1
- package/dist/core/src/index.d.ts +2 -2
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/publish-manifest.d.ts.map +1 -1
- package/dist/core/src/repo-manager.d.ts +13 -2
- package/dist/core/src/repo-manager.d.ts.map +1 -1
- package/dist/core/src/walker.d.ts +10 -0
- package/dist/core/src/walker.d.ts.map +1 -1
- package/dist/core/src/workspace-yaml-editor.d.ts +14 -1
- package/dist/core/src/workspace-yaml-editor.d.ts.map +1 -1
- package/dist/core/workspace-config.js +2 -2
- package/dist/deploy/index.js +5 -5
- package/dist/discovery/index.js +3 -3
- package/dist/discovery/src/discover-manifest.d.ts.map +1 -1
- package/dist/discovery/src/discover.d.ts +17 -4
- package/dist/discovery/src/discover.d.ts.map +1 -1
- package/dist/discovery/src/index.d.ts +1 -1
- package/dist/discovery/src/index.d.ts.map +1 -1
- package/dist/discovery/src/reference-lint.d.ts +7 -0
- package/dist/discovery/src/reference-lint.d.ts.map +1 -1
- package/dist/discovery/src/source-config.d.ts +28 -0
- package/dist/discovery/src/source-config.d.ts.map +1 -1
- package/dist/discovery/src/tree-entries.d.ts.map +1 -1
- package/dist/{ensure-sources-4BAJGJRK.js → ensure-sources-QDVFUIUP.js} +18 -13
- package/dist/ensure-sources-QDVFUIUP.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +8 -8
- package/dist/factory-assets/connectors/deploy.js +8 -8
- package/dist/factory-assets/connectors/devserver.js +8 -8
- package/dist/factory-assets/connectors/flow/adapter.js +8 -8
- package/dist/factory-assets/connectors/flow/engine/engine.d.ts +4 -1
- package/dist/factory-assets/connectors/flow/engine/engine.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine/types.d.ts +41 -6
- package/dist/factory-assets/connectors/flow/engine/types.d.ts.map +1 -1
- package/dist/factory-assets/connectors/flow/engine.js +6 -6
- package/dist/factory-assets/connectors/flow/run-flow.js +9 -9
- package/dist/factory-assets/connectors/flow.js +8 -8
- package/dist/factory-assets/connectors/git.js +8 -8
- package/dist/factory-assets/connectors/gmail.js +8 -8
- package/dist/factory-assets/connectors/googledrive.js +8 -8
- package/dist/factory-assets/connectors/local.js +8 -8
- package/dist/factory-assets/connectors/mattermost.js +8 -8
- package/dist/factory-assets/connectors/memory.js +8 -8
- package/dist/factory-assets/connectors/minio.js +8 -8
- package/dist/factory-assets/connectors/postgres.js +8 -8
- package/dist/factory-assets/connectors/s3.js +8 -8
- package/dist/factory-assets/connectors/sharepoint.js +8 -8
- package/dist/factory-assets/connectors/sqlite.js +8 -8
- package/dist/factory-assets/connectors/static-server.js +8 -8
- package/dist/factory-assets/connectors/tunnel.js +8 -8
- package/dist/factory-assets/connectors/webdav.js +8 -8
- package/dist/factory-assets/connectors/xstate-store.js +8 -8
- package/dist/factory-assets/connectors/xstate.js +8 -8
- package/dist/factory-assets/skills/skaile-author-asset/SKILL.md +1 -1
- package/dist/factory-assets/skills/skaile-manage-workspace/SKILL.md +1 -1
- package/dist/{flows-UFCOGAAM.js → flows-MRVXTYWC.js} +4 -4
- package/dist/{flows-UFCOGAAM.js.map → flows-MRVXTYWC.js.map} +1 -1
- package/dist/helpers-TF7GCBRQ.js +27 -0
- package/dist/{helpers-2OL4FRFB.js.map → helpers-TF7GCBRQ.js.map} +1 -1
- package/dist/library/index.js +9 -9
- package/dist/library/install.js +5 -5
- package/dist/library/src/index.d.ts +2 -2
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +12 -1
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/sync/manifest-writeback.d.ts +36 -0
- package/dist/library/src/sync/manifest-writeback.d.ts.map +1 -1
- package/dist/library-publish-K5IBE44D.js +249 -0
- package/dist/library-publish-K5IBE44D.js.map +1 -0
- package/dist/open-library-4HMIDK3N.js +29 -0
- package/dist/{open-library-RPV2LIKL.js.map → open-library-4HMIDK3N.js.map} +1 -1
- package/dist/{paths-ML33B5SB.js → paths-P3DWFUPS.js} +8 -8
- package/dist/{paths-ML33B5SB.js.map → paths-P3DWFUPS.js.map} +1 -1
- package/dist/{plugin-store-G4HKWCTU.js → plugin-store-S7OMGI7N.js} +7 -7
- package/dist/{plugin-store-G4HKWCTU.js.map → plugin-store-S7OMGI7N.js.map} +1 -1
- package/dist/runner/index.js +14 -14
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/capability-registry.d.ts +15 -4
- package/dist/runner/src/capability-registry.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +15 -10
- package/dist/sdk/bridge.js +3 -3
- package/dist/sdk/core.js +5 -5
- package/dist/sdk/flow.js +6 -6
- package/dist/sdk/index.js +14 -14
- package/dist/sdk/runner.js +14 -14
- package/dist/sdk/session.js +2 -2
- package/dist/sdk/types.js +1 -1
- package/dist/session/index.js +2 -2
- package/dist/{setup-WS6PF6JQ.js → setup-2CCS63L6.js} +10 -10
- package/dist/{setup-WS6PF6JQ.js.map → setup-2CCS63L6.js.map} +1 -1
- package/dist/source-LOAM7IIQ.js +30 -0
- package/dist/{source-22U5NOY4.js.map → source-LOAM7IIQ.js.map} +1 -1
- package/dist/source-manifest-publish-TGVZ6KMC.js +228 -0
- package/dist/source-manifest-publish-TGVZ6KMC.js.map +1 -0
- package/dist/tui/index.js +14 -14
- package/dist/types/index.js +1 -1
- package/dist/types/manifests.js +1 -1
- package/dist/types/src/capabilities.d.ts +8 -2
- package/dist/types/src/capabilities.d.ts.map +1 -1
- package/dist/types/src/logging.d.ts +3 -2
- package/dist/types/src/logging.d.ts.map +1 -1
- package/dist/types/src/manifests/_shared.d.ts +4 -4
- package/dist/types/src/manifests/index.d.ts +2 -2
- package/dist/types/src/manifests/index.d.ts.map +1 -1
- package/dist/types/src/manifests/preset.d.ts +10 -0
- package/dist/types/src/manifests/preset.d.ts.map +1 -1
- package/dist/types/src/version.d.ts +11 -1
- package/dist/types/src/version.d.ts.map +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +2 -2
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +7 -1
- package/dist/chunk-7CNIRF42.js.map +0 -1
- package/dist/chunk-AZAS3FKN.js.map +0 -1
- package/dist/chunk-BZMTR5WW.js.map +0 -1
- package/dist/chunk-DZCK7GRW.js.map +0 -1
- package/dist/chunk-EVZKWY5J.js.map +0 -1
- package/dist/chunk-GB4SEEK4.js.map +0 -1
- package/dist/chunk-JQMIG7D3.js +0 -93
- package/dist/chunk-JQMIG7D3.js.map +0 -1
- package/dist/chunk-OBSSORCE.js.map +0 -1
- package/dist/chunk-OUWNTFDG.js.map +0 -1
- package/dist/chunk-P3MJYPZE.js.map +0 -1
- package/dist/chunk-RHMQPLIK.js.map +0 -1
- package/dist/chunk-RYRJEVQ4.js +0 -377
- package/dist/chunk-RYRJEVQ4.js.map +0 -1
- package/dist/chunk-SKADPHAM.js.map +0 -1
- package/dist/ensure-sources-4BAJGJRK.js.map +0 -1
- package/dist/helpers-2OL4FRFB.js +0 -22
- package/dist/open-library-RPV2LIKL.js +0 -29
- package/dist/source-22U5NOY4.js +0 -30
- package/dist/store-client-YLMBH5MF.js +0 -15
- package/dist/store-client-YLMBH5MF.js.map +0 -1
|
@@ -3,7 +3,25 @@
|
|
|
3
3
|
* All delegate to @skaile/workspaces/asset-manager's AssetManager class.
|
|
4
4
|
*/
|
|
5
5
|
import { AssetManager } from "@skaile/workspaces/asset-manager";
|
|
6
|
+
import { type CatalogEntry } from "@skaile/workspaces/core";
|
|
7
|
+
import type { CatalogAsset } from "@skaile/workspaces/plugins";
|
|
6
8
|
import { Command } from "commander";
|
|
9
|
+
/**
|
|
10
|
+
* Copyable install ref for a store catalog asset — `kind:@<publisher>/<name>#<version>`,
|
|
11
|
+
* the exact shape `skaile add` accepts.
|
|
12
|
+
*/
|
|
13
|
+
export declare function catalogAssetRef(a: CatalogAsset): string;
|
|
14
|
+
/**
|
|
15
|
+
* Copyable ref for a local index entry. Uses `kind:@<publisher>/<name>` when a
|
|
16
|
+
* publisher is known; local assets without one fall back to the bare name.
|
|
17
|
+
*/
|
|
18
|
+
export declare function localEntryRef(e: Pick<CatalogEntry, "kind" | "name" | "publisher">): string;
|
|
19
|
+
/**
|
|
20
|
+
* Client-side text filter over catalog assets — the store's `listAssets` has no
|
|
21
|
+
* server-side query. Case-insensitive match across name, description, publisher;
|
|
22
|
+
* an empty query returns every asset.
|
|
23
|
+
*/
|
|
24
|
+
export declare function filterCatalogAssets(assets: CatalogAsset[], query: string | undefined): CatalogAsset[];
|
|
7
25
|
/**
|
|
8
26
|
* Create the `skaile search` command.
|
|
9
27
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,YAAY,EAMb,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/catalog.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,YAAY,EAMb,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAEL,KAAK,YAAY,EAKlB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAe5C;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAEvD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC,GAAG,MAAM,CAE1F;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EAAE,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,YAAY,EAAE,CAShB;AA0PD;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAW3C;AAwBD;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,gBAAgB,GAAG,KAAK,CAAC,EAChD,GAAG,EAAE,MAAM,EACX,EAAE,EAAE;IACF,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,GACA,OAAO,CAAC,IAAI,CAAC,CAuCf;AAED;;;;;;GAMG;AACH,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,+BAA+B,GAAG,QAAQ,CAAC,EAClE,GAAG,EAAE,MAAM,EACX,EAAE,EAAE;IACF,KAAK,EAAE,OAAO,CAAC;IACf,4EAA4E;IAC5E,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,CAAC;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;IACtC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAChC,GACA,OAAO,CAAC,IAAI,CAAC,CAsBf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAmExC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAsC3C;AAUD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAkEzC;AA0DD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAsCzC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAkB3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CA2B3C"}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Lifecycle subcommands: list, status, show, init, link, create, default,
|
|
6
6
|
* rename, set, remove. Git verbs (commit, pull, push, propose, git, sync)
|
|
7
|
-
* apply to git-backed libraries. Publish/register/yank
|
|
8
|
-
*
|
|
7
|
+
* apply to git-backed libraries. Publish/register/yank (in `library-publish.ts`)
|
|
8
|
+
* push + register the library repo and publish its manifest to the store.
|
|
9
9
|
*
|
|
10
10
|
* @docLink cli/commands/library
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/library-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"library-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/library-cmd.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,EAAE,OAAO,EAAU,MAAM,WAAW,CAAC;AAO5C,wBAAgB,kBAAkB,IAAI,OAAO,CAqjB5C"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skaile library publish / register / yank` — the first-party publish flow.
|
|
3
|
+
* A git-backed library you own carries an in-repo `skaile.manifest.yaml`; this
|
|
4
|
+
* commits + pushes the library repo (publish), or takes the current remote HEAD
|
|
5
|
+
* as-is (register), then registers + syncs it as a store source and publishes
|
|
6
|
+
* the manifest's assets under the manifest's own `publisher` (no namespace
|
|
7
|
+
* remap — first-party authors intend their declared namespace).
|
|
8
|
+
*
|
|
9
|
+
* - `publish` = commit (if dirty) + push + register + sync + publish.
|
|
10
|
+
* - `register` = same, but skip the commit/push (bytes already on GitHub).
|
|
11
|
+
* - `yank` = unpublish the library's published assets (all, or one).
|
|
12
|
+
*
|
|
13
|
+
* The store REST surface is reached through the injectable {@link PublisherClient}
|
|
14
|
+
* (default HTTP); git side-effects go through an injectable `spawn`. Both seams
|
|
15
|
+
* keep the flow unit/integration-testable without a live store or a real remote.
|
|
16
|
+
*
|
|
17
|
+
* @docLink cli/commands/library
|
|
18
|
+
*/
|
|
19
|
+
import { spawnSync } from "node:child_process";
|
|
20
|
+
import { type PublisherClient } from "../store-publisher.ts";
|
|
21
|
+
/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */
|
|
22
|
+
type SpawnLike = typeof spawnSync;
|
|
23
|
+
/**
|
|
24
|
+
* `skaile library publish <lib>` — commit + push the library repo, register +
|
|
25
|
+
* sync it as a store source, and publish its manifest's assets under the
|
|
26
|
+
* manifest publisher. See the module header for the full flow.
|
|
27
|
+
*/
|
|
28
|
+
export declare function runLibraryPublish(name: string, opts: {
|
|
29
|
+
asset?: string;
|
|
30
|
+
createRepo?: boolean;
|
|
31
|
+
ref?: string;
|
|
32
|
+
dryRun?: boolean;
|
|
33
|
+
}, client?: PublisherClient, spawn?: SpawnLike): Promise<void>;
|
|
34
|
+
/**
|
|
35
|
+
* `skaile library register <lib>` — same as publish but skips the commit/push
|
|
36
|
+
* (the bytes are already on GitHub at the current remote HEAD). Still requires a
|
|
37
|
+
* git-backed remote.
|
|
38
|
+
*/
|
|
39
|
+
export declare function runLibraryRegister(name: string, opts: {
|
|
40
|
+
asset?: string;
|
|
41
|
+
ref?: string;
|
|
42
|
+
dryRun?: boolean;
|
|
43
|
+
}, client?: PublisherClient, spawn?: SpawnLike): Promise<void>;
|
|
44
|
+
/**
|
|
45
|
+
* `skaile library yank <lib>` — unpublish the library's published assets from
|
|
46
|
+
* the store (all, or the single asset matching `opts.asset`'s name).
|
|
47
|
+
* Auth-gated like publish.
|
|
48
|
+
*/
|
|
49
|
+
export declare function runLibraryYank(name: string, opts: {
|
|
50
|
+
asset?: string;
|
|
51
|
+
}, client?: PublisherClient): Promise<void>;
|
|
52
|
+
export {};
|
|
53
|
+
//# sourceMappingURL=library-publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-publish.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/library-publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAQ/C,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGtF,+EAA+E;AAC/E,KAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AA6OlC;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,EAC9E,MAAM,CAAC,EAAE,eAAe,EACxB,KAAK,GAAE,SAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,EACxD,MAAM,CAAC,EAAE,eAAe,EACxB,KAAK,GAAE,SAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;;;GAIG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EACxB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAkDf"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skaile preset apply` — pure core: reverse a `.preset.yaml` snapshot back into
|
|
3
|
+
* a workspace's `skaile.yaml` sections (the inverse of `preset export`).
|
|
4
|
+
*
|
|
5
|
+
* These helpers are I/O- and prompt-free so they can be unit-tested in
|
|
6
|
+
* isolation. The Commander action in `preset-cmd.ts` owns file reads, the
|
|
7
|
+
* interactive prompting for non-secret inputs, the editor writes, and the
|
|
8
|
+
* post-apply install.
|
|
9
|
+
*/
|
|
10
|
+
import type { ConnectorDeclaration, McpServerDeclaration, SourceEntry } from "@skaile/workspaces/core";
|
|
11
|
+
import type { Placeholder, PresetManifest } from "@skaile/workspaces/types/manifests";
|
|
12
|
+
/** The workspace sections produced by reversing a preset's items. */
|
|
13
|
+
export interface WorkspaceItems {
|
|
14
|
+
/** Bare dependency refs, copied verbatim from non-connector/mcp items. */
|
|
15
|
+
dependencies: string[];
|
|
16
|
+
/** Connector declarations rebuilt from `connector:<driver>` items. */
|
|
17
|
+
connectors: ConnectorDeclaration[];
|
|
18
|
+
/** MCP server declarations rebuilt from `mcp:<id>` items. */
|
|
19
|
+
mcpServers: McpServerDeclaration[];
|
|
20
|
+
/** Git sources the deps resolve from — registered before install. */
|
|
21
|
+
sources: SourceEntry[];
|
|
22
|
+
/** Secret placeholder keys the user must export as env vars before running. */
|
|
23
|
+
envVarsToSet: string[];
|
|
24
|
+
}
|
|
25
|
+
/** Rejection message for nested preset refs (unsupported by v1 apply). */
|
|
26
|
+
export declare const NESTED_PRESET_UNSUPPORTED = "nested presets are not supported by `preset apply` yet";
|
|
27
|
+
/**
|
|
28
|
+
* Resolve one placeholder to the value that lands in `skaile.yaml`.
|
|
29
|
+
*
|
|
30
|
+
* A secret placeholder NEVER yields its raw value — it resolves to an
|
|
31
|
+
* `env:<KEY>` indirection reference so the credential stays out of the file.
|
|
32
|
+
* A non-secret placeholder resolves to the provided literal (or its declared
|
|
33
|
+
* default); a required non-secret placeholder with neither throws.
|
|
34
|
+
*
|
|
35
|
+
* @param placeholder - The placeholder definition from the preset item.
|
|
36
|
+
* @param providedValue - Value supplied via `--input`/prompt, or `undefined`.
|
|
37
|
+
* @returns `{ envRef }` for secrets, `{ value }` for resolved literals.
|
|
38
|
+
* @throws When a required non-secret placeholder has no value and no default.
|
|
39
|
+
*/
|
|
40
|
+
export declare function resolvePlaceholderValue(placeholder: Placeholder, providedValue: string | undefined): {
|
|
41
|
+
value: string;
|
|
42
|
+
} | {
|
|
43
|
+
envRef: string;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Reverse a preset's items into additive `skaile.yaml` sections.
|
|
47
|
+
*
|
|
48
|
+
* Items are classified by **`id` presence** (export writes one on connector/mcp
|
|
49
|
+
* items, never on deps), so a bare `mcp:excel` shorthand stays a dependency.
|
|
50
|
+
* Secret tokens resolve to `env:<KEY>` refs (collected into `envVarsToSet`).
|
|
51
|
+
*
|
|
52
|
+
* @param preset - The validated preset manifest.
|
|
53
|
+
* @param values - Resolved non-secret input values, keyed by placeholder key.
|
|
54
|
+
* @returns The workspace sections plus the secret env-var keys to set.
|
|
55
|
+
* @throws When a required non-secret placeholder is unresolved, or a nested
|
|
56
|
+
* preset ref is encountered (unsupported by apply).
|
|
57
|
+
*/
|
|
58
|
+
export declare function presetItemsToWorkspace(preset: PresetManifest, values: Record<string, string>): WorkspaceItems;
|
|
59
|
+
//# sourceMappingURL=preset-apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset-apply.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/preset-apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAc,MAAM,oCAAoC,CAAC;AAElG,qEAAqE;AACrE,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,sEAAsE;IACtE,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,6DAA6D;IAC7D,UAAU,EAAE,oBAAoB,EAAE,CAAC;IACnC,qEAAqE;IACrE,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,+EAA+E;IAC/E,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAKD,0EAA0E;AAC1E,eAAO,MAAM,yBAAyB,2DAA2D,CAAC;AAElG;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,CAexC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC7B,cAAc,CA+BhB"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* skaile preset — scaffold and
|
|
2
|
+
* skaile preset — scaffold, validate, export, and apply preset YAML files.
|
|
3
3
|
*
|
|
4
|
-
* Subcommands: init, validate.
|
|
4
|
+
* Subcommands: init, validate, export, apply.
|
|
5
5
|
* Delegates to @skaile/library preset module for parsing and validation.
|
|
6
6
|
*/
|
|
7
|
+
import { type Placeholder } from "@skaile/workspaces/types/manifests";
|
|
7
8
|
import { Command } from "commander";
|
|
8
9
|
/**
|
|
9
10
|
* Creates the `skaile preset` command group.
|
|
@@ -16,4 +17,9 @@ import { Command } from "commander";
|
|
|
16
17
|
* @docLink cli/commands/misc#preset
|
|
17
18
|
*/
|
|
18
19
|
export declare function makePresetCommand(): Command;
|
|
20
|
+
/**
|
|
21
|
+
* Validate per-item placeholder structure (dry-run with no input values).
|
|
22
|
+
* Returns true when any placeholder issues were surfaced as warnings.
|
|
23
|
+
*/
|
|
24
|
+
export declare function checkPresetPlaceholders(allPlaceholders: Placeholder[]): Promise<boolean>;
|
|
19
25
|
//# sourceMappingURL=preset-cmd.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/preset-cmd.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"preset-cmd.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/preset-cmd.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CA0E3C;AAwhBD;;;GAGG;AACH,wBAAsB,uBAAuB,CAAC,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAqB9F"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skaile preset export` — pure core: turn a project's own `skaile.yaml`
|
|
3
|
+
* (`SkWorkspaceConfig`) into a shareable `PresetManifest`, with first-class
|
|
4
|
+
* detection and redaction of inline secrets.
|
|
5
|
+
*
|
|
6
|
+
* These helpers are intentionally free of I/O and prompting so they can be
|
|
7
|
+
* unit-tested in isolation; the Commander action in `preset-cmd.ts` owns file
|
|
8
|
+
* reads/writes, the loud stderr summary, and interactive confirmation.
|
|
9
|
+
*/
|
|
10
|
+
import { type LockFile, type SkWorkspaceConfig, type SourceEntry } from "@skaile/workspaces/core";
|
|
11
|
+
import type { PresetManifest } from "@skaile/workspaces/types/manifests";
|
|
12
|
+
/** One inline-secret hit: which item, where in its config, and a safe preview. */
|
|
13
|
+
export interface SecretFinding {
|
|
14
|
+
/** `id` of the offending preset item (connector/mcp id). */
|
|
15
|
+
itemId: string;
|
|
16
|
+
/** Dotted path into the item's `config`, e.g. `options.dsn` or `env.TOKEN`. */
|
|
17
|
+
path: string;
|
|
18
|
+
/** Value with its secret portion masked, safe to print to a terminal. */
|
|
19
|
+
maskedValue: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Build a self-consistent {@link PresetManifest} from a workspace config.
|
|
23
|
+
*
|
|
24
|
+
* Mapping (a future `preset apply` reverses this):
|
|
25
|
+
* - `dependencies[]` → `{ ref }` items, ref copied VERBATIM (no re-pinning).
|
|
26
|
+
* - `connectors[]` → `{ id, ref: "connector:<driver>", config }` items.
|
|
27
|
+
* - `mcp_servers[]` → `{ id, ref: "mcp:<id>", config }` items.
|
|
28
|
+
*
|
|
29
|
+
* `agent_config` is deliberately NOT exported — it is personal/machine-specific
|
|
30
|
+
* (driver, model, API-cloud transport) and does not belong in a shared preset.
|
|
31
|
+
*
|
|
32
|
+
* @param config - The project-own `skaile.yaml` (NOT the merged/global config).
|
|
33
|
+
* @param name - Preset name; also the default output filename stem.
|
|
34
|
+
* @param sources - Git sources the dep items resolve from (see {@link neededSources}).
|
|
35
|
+
* @returns A manifest that passes `validatePreset` whenever it has ≥1 item.
|
|
36
|
+
*/
|
|
37
|
+
export declare function buildPresetFromWorkspace(config: SkWorkspaceConfig, name: string, sources?: SourceEntry[]): PresetManifest;
|
|
38
|
+
/**
|
|
39
|
+
* The subset of `config.sources` a cross-repo apply must register before install.
|
|
40
|
+
*
|
|
41
|
+
* The lock's top-level `sources` list is the full **transitive** closure of every
|
|
42
|
+
* source that contributed a resolved asset, so filtering `config.sources` to it
|
|
43
|
+
* (minus the always-available factory source) captures direct + transitive deps
|
|
44
|
+
* with no drop risk. With no lock (provenance unknown), every non-factory source
|
|
45
|
+
* is kept so apply still resolves. Connectors/mcp carry no source.
|
|
46
|
+
*/
|
|
47
|
+
export declare function neededSources(config: SkWorkspaceConfig, lock: LockFile | null): SourceEntry[];
|
|
48
|
+
/**
|
|
49
|
+
* Of the captured `neededSources`, the ones whose assets resolve through a
|
|
50
|
+
* MACHINE-LOCAL curated store manifest (`~/.skaile/store/manifests/<slug>.yaml`,
|
|
51
|
+
* written by `source manifest init`). Those overlays are not shared with the
|
|
52
|
+
* preset, so a recipient on another machine won't reproduce the same resolution
|
|
53
|
+
* until the sidecar is itself published. Returns the affected source URLs (empty
|
|
54
|
+
* when none carry a sidecar).
|
|
55
|
+
*/
|
|
56
|
+
export declare function sourcesWithSidecar(sources: SourceEntry[]): string[];
|
|
57
|
+
/**
|
|
58
|
+
* True when `value` is a secret *reference* (indirection) rather than an inline
|
|
59
|
+
* secret — e.g. `env:DATABASE_URL`, `forge:api-key`, `pat:env:GH_TOKEN`. Such
|
|
60
|
+
* values are safe to publish and are never flagged.
|
|
61
|
+
*/
|
|
62
|
+
export declare function isSecretReference(value: string): boolean;
|
|
63
|
+
/** True when a source URL embeds `user:pass@` credentials (private-HTTPS auth form). */
|
|
64
|
+
export declare function urlHasCredentials(url: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Strip `user:pass@` userinfo from a URL. The repo is fully identified without it
|
|
67
|
+
* (git auth on apply uses the target's own credential helper / ssh key), so an
|
|
68
|
+
* exported source URL must never carry the token into a shared preset.
|
|
69
|
+
*/
|
|
70
|
+
export declare function stripUrlCredentials(url: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Scan every string inside each item's `config` and return inline secrets.
|
|
73
|
+
*
|
|
74
|
+
* A string is flagged when it is NOT a {@link isSecretReference} AND sits in a
|
|
75
|
+
* credential context: the inherent `auth` field, a suspicious key name, a
|
|
76
|
+
* `proto://user:pass@` URL, or a long high-entropy blob. Items without a `config`
|
|
77
|
+
* (bare deps) are skipped.
|
|
78
|
+
*
|
|
79
|
+
* Detection is **heuristic / best-effort**, not exhaustive: a short, low-entropy
|
|
80
|
+
* secret under an innocuous key name can slip through. A clean scan is not a
|
|
81
|
+
* guarantee — treat it as a safety net, not proof the file holds no secrets.
|
|
82
|
+
*/
|
|
83
|
+
export declare function scanInlineSecrets(preset: PresetManifest): SecretFinding[];
|
|
84
|
+
/**
|
|
85
|
+
* Replace each flagged inline value with a `${INPUT:<KEY>}` placeholder and add
|
|
86
|
+
* a matching `secret` placeholder entry to the owning item. Returns a NEW preset
|
|
87
|
+
* (the input is not mutated) plus the generated placeholder keys.
|
|
88
|
+
*
|
|
89
|
+
* `<KEY>` is `<itemId>_<path>` upper-snake-cased so it is stable and readable.
|
|
90
|
+
*/
|
|
91
|
+
export declare function redactSecrets(preset: PresetManifest, findings: SecretFinding[]): {
|
|
92
|
+
preset: PresetManifest;
|
|
93
|
+
keys: string[];
|
|
94
|
+
};
|
|
95
|
+
/** Exact wording written into the file when unresolved inline secrets remain. */
|
|
96
|
+
export declare const INLINE_SECRETS_HEADER = "# \u26A0\uFE0F CONTAINS INLINE SECRETS \u2014 replace with placeholders before sharing or publishing";
|
|
97
|
+
/**
|
|
98
|
+
* Header comment for a preset that still holds unresolved inline secrets, or
|
|
99
|
+
* `null` when `findings` is empty (nothing left to warn about).
|
|
100
|
+
*/
|
|
101
|
+
export declare function secretHeaderComment(findings: SecretFinding[]): string | null;
|
|
102
|
+
//# sourceMappingURL=preset-export.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset-export.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/preset-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAKH,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAA2B,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAElG,kFAAkF;AAClF,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;CACrB;AAID;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,WAAW,EAAO,GAC1B,cAAc,CAoDhB;AAID;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,QAAQ,GAAG,IAAI,GAAG,WAAW,EAAE,CAM7F;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAKnE;AAmBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAExD;AAkBD,wFAAwF;AACxF,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAEtD;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEvD;AAiBD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,aAAa,EAAE,CASzE;AAwDD;;;;;;GAMG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,aAAa,EAAE,GACxB;IAAE,MAAM,EAAE,cAAc,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CA+B5C;AAwBD,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,yGACuD,CAAC;AAE1F;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,aAAa,EAAE,GAAG,MAAM,GAAG,IAAI,CAE5E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/project.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAOhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,qBAAqB,CAKxF;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,OAAO,EAAE,qBAAqB,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE,GAChE,OAAO,CAAC,wBAAwB,CAAC,CA8BnC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAoB5C;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/project.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAOhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAqBpC;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC3D;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,IAAI,qBAAqB,CAKxF;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACtE;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,OAAO,EAAE,qBAAqB,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE,GAChE,OAAO,CAAC,wBAAwB,CAAC,CA8BnC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAoB5C;AAqKD;;;;;;GAMG;AACH,wBAAsB,uBAAuB,CAC3C,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,cAAc,GAAG,gBAAgB,CAAC,EACzD,MAAM,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAA+B,GACxD,OAAO,CAAC,IAAI,CAAC,CASf;AA6CD;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAkB1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAwE1C"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared store-interaction core for the two publish front-ends — the curator
|
|
3
|
+
* sidecar flow (`source manifest publish`) and the first-party library flow
|
|
4
|
+
* (`library publish`). Both differ only in their git side-effects + how they
|
|
5
|
+
* resolve the source repo; the store orchestration below (register → sync →
|
|
6
|
+
* candidates → per-asset preview+publish) is identical.
|
|
7
|
+
*
|
|
8
|
+
* The store REST surface is reached through the injectable {@link PublisherClient}
|
|
9
|
+
* so the orchestration stays unit/integration-testable without a live store.
|
|
10
|
+
*
|
|
11
|
+
* @docLink cli/commands/source#manifest-publish
|
|
12
|
+
*/
|
|
13
|
+
import type { SkPublishManifest } from "@skaile/workspaces/core";
|
|
14
|
+
import type { PublisherClient } from "../store-publisher.ts";
|
|
15
|
+
/** One candidate row shape the matcher operates on (kind + name are the key). */
|
|
16
|
+
interface CandidateLike {
|
|
17
|
+
kind: string;
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Keep only candidates whose `(kind, name)` pair is declared in the manifest.
|
|
22
|
+
* The backend may merge extra assets from the base repo into the candidate
|
|
23
|
+
* list; a publish only touches what the manifest curated/declared.
|
|
24
|
+
*/
|
|
25
|
+
export declare function matchCandidatesToManifest<T extends CandidateLike>(candidates: T[], manifest: SkPublishManifest): T[];
|
|
26
|
+
/** A canonical ref string `kind:@publisher/name[#version]` for reporting. */
|
|
27
|
+
export declare function refFor(kind: string, publisher: string, name: string, version?: string): string;
|
|
28
|
+
/** The bare asset name from a `kind:@publisher/name#version` ref or a plain name. */
|
|
29
|
+
export declare function bareName(ref: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Poll a job until it leaves `running` or the deadline passes. Returns the last
|
|
32
|
+
* observed state — the caller MUST treat a still-`running` result as a timeout
|
|
33
|
+
* (not success), since it means the deadline was hit before the job finished.
|
|
34
|
+
*/
|
|
35
|
+
export declare function pollJob(client: PublisherClient, jobId: string, intervalMs?: number, timeoutMs?: number): Promise<{
|
|
36
|
+
status: string;
|
|
37
|
+
items?: Array<{
|
|
38
|
+
label: string;
|
|
39
|
+
status: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
}>;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* True when a `sourcesAdd` rejection is a duplicate-URL conflict (the source is
|
|
45
|
+
* already registered) — the only error the publish flow recovers from by looking
|
|
46
|
+
* the existing row up. Every other failure (auth, 5xx, network) must propagate.
|
|
47
|
+
*/
|
|
48
|
+
export declare function isDupSourceError(err: unknown): boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Register + sync the source, then publish its curated/declared candidates —
|
|
51
|
+
* the store-side steps shared by both publish front-ends. Git side-effects (the
|
|
52
|
+
* sidecar push, or the library commit+push) happen in the caller *before* this;
|
|
53
|
+
* this function is purely store interaction.
|
|
54
|
+
*
|
|
55
|
+
* The sidecar front-end passes `sidecar` (so `sourcesAdd` carries the sidecar
|
|
56
|
+
* pin); the library front-end omits it (the source repo IS the manifest host).
|
|
57
|
+
* `assetName`, when set, narrows publication to the single candidate of that
|
|
58
|
+
* name. Fatal store states (`sourcesAdd` non-dup failure) surface; sync failures
|
|
59
|
+
* and empty candidate sets `process.exit(1)` with the same messages as before.
|
|
60
|
+
*/
|
|
61
|
+
export declare function publishToStore(opts: {
|
|
62
|
+
sourceUrl: string;
|
|
63
|
+
ref: string;
|
|
64
|
+
sidecar?: {
|
|
65
|
+
url: string;
|
|
66
|
+
ref: string;
|
|
67
|
+
};
|
|
68
|
+
manifest: SkPublishManifest;
|
|
69
|
+
assetName?: string;
|
|
70
|
+
client: PublisherClient;
|
|
71
|
+
}): Promise<{
|
|
72
|
+
published: string[];
|
|
73
|
+
}>;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=publish-core.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish-core.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/publish-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE7D,iFAAiF;AACjF,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,aAAa,EAC/D,UAAU,EAAE,CAAC,EAAE,EACf,QAAQ,EAAE,iBAAiB,GAC1B,CAAC,EAAE,CAGL;AAED,6EAA6E;AAC7E,wBAAgB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAG9F;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAI5C;AAED;;;;GAIG;AACH,wBAAsB,OAAO,CAC3B,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,MAAM,EACb,UAAU,SAAQ,EAClB,SAAS,SAAS,GACjB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;CAAE,CAAC,CAQ/F;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGtD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;CACzB,GAAG,OAAO,CAAC;IAAE,SAAS,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAgFnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/run.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/run.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAiDpC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,IAAI,OAAO,CAyIxC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAqC3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAoC3C;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAS1C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,IAAI,OAAO,CAyEzC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `skaile source manifest publish` / `yank` — the curator-publish flow. Takes a
|
|
3
|
+
* locally-curated sidecar manifest (over a foreign public GitHub repo) and:
|
|
4
|
+
*
|
|
5
|
+
* 1. Pushes the curated `skaile.manifest.yaml` to the curator's OWN public
|
|
6
|
+
* "sidecar" repo (bytes stay in the foreign source; the sidecar holds only
|
|
7
|
+
* the manifest pointing at it).
|
|
8
|
+
* 2. Registers the foreign source + the sidecar (url + pinned commit) with the
|
|
9
|
+
* store, syncs it, and publishes each curated asset.
|
|
10
|
+
*
|
|
11
|
+
* `yank` is the inverse: unpublish each currently-published asset of the source.
|
|
12
|
+
*
|
|
13
|
+
* The store REST surface is reached through the injectable {@link PublisherClient}
|
|
14
|
+
* (default HTTP client); git side-effects go through an injectable `spawn`. Both
|
|
15
|
+
* seams keep the pure helpers + orchestration unit/integration-testable without a
|
|
16
|
+
* live store or a real remote.
|
|
17
|
+
*
|
|
18
|
+
* @docLink cli/commands/source#manifest-publish
|
|
19
|
+
*/
|
|
20
|
+
import { spawnSync } from "node:child_process";
|
|
21
|
+
import { type SkPublishManifest } from "@skaile/workspaces/core";
|
|
22
|
+
import { type PublisherClient } from "../store-publisher.ts";
|
|
23
|
+
/** Injectable spawn contract — the subset of `spawnSync` these helpers use. */
|
|
24
|
+
type SpawnLike = typeof spawnSync;
|
|
25
|
+
/**
|
|
26
|
+
* Return a copy of `manifest` normalized for publication under `namespace`:
|
|
27
|
+
* the top-level `publisher` is set to `namespace` and every per-asset
|
|
28
|
+
* `publisher` override is removed so all assets inherit the top-level one.
|
|
29
|
+
* Pure — the input is not mutated.
|
|
30
|
+
*/
|
|
31
|
+
export declare function normalizePublishedManifest(manifest: SkPublishManifest, namespace: string): SkPublishManifest;
|
|
32
|
+
/**
|
|
33
|
+
* The sidecar repo URL previously associated with a source `slug`, if any.
|
|
34
|
+
* Reads `settings.sidecarRepos?.[slug]?.repo`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function getSidecarRepo(slug: string): string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Persist the sidecar repo URL for a source `slug`, preserving every other
|
|
39
|
+
* settings key. Stored as an object (`{ repo }`) so a `path` (or other fields)
|
|
40
|
+
* can be added later without a schema migration.
|
|
41
|
+
*/
|
|
42
|
+
export declare function saveSidecarRepo(slug: string, repo: string): void;
|
|
43
|
+
/**
|
|
44
|
+
* Clone the curator's sidecar repo, write the curated manifest at its root, and
|
|
45
|
+
* commit + push. Returns the pushed commit sha (used to pin the store source).
|
|
46
|
+
*
|
|
47
|
+
* Idempotent re-publish: when the manifest is unchanged `git commit` fails with
|
|
48
|
+
* "nothing to commit" — we swallow that and return the current HEAD so a no-op
|
|
49
|
+
* re-run still yields a valid pin. Any push/auth failure surfaces as a thrown
|
|
50
|
+
* Error carrying git's stderr.
|
|
51
|
+
*/
|
|
52
|
+
export declare function pushSidecarManifest(opts: {
|
|
53
|
+
sidecarRepoUrl: string;
|
|
54
|
+
manifestText: string;
|
|
55
|
+
spawn?: SpawnLike;
|
|
56
|
+
}): {
|
|
57
|
+
commitSha: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* `source manifest publish <src>` — publish a curated sidecar manifest to the
|
|
61
|
+
* store. See the module header for the full flow. Store calls go through
|
|
62
|
+
* `client` (default HTTP); git side-effects through `spawn` (default
|
|
63
|
+
* `spawnSync`). The auth gate is enforced only for the default HTTP client so
|
|
64
|
+
* injected fakes bypass it.
|
|
65
|
+
*/
|
|
66
|
+
export declare function runPublish(arg: string, opts: {
|
|
67
|
+
projectDir: string;
|
|
68
|
+
as?: string;
|
|
69
|
+
sidecarRepo?: string;
|
|
70
|
+
ref?: string;
|
|
71
|
+
dryRun?: boolean;
|
|
72
|
+
}, client?: PublisherClient, spawn?: SpawnLike): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* `source manifest yank <src>` — unpublish the source's published assets (all,
|
|
75
|
+
* or the single asset matching `opts.asset`'s name). Auth-gated like publish.
|
|
76
|
+
*/
|
|
77
|
+
export declare function runYank(arg: string, opts: {
|
|
78
|
+
projectDir: string;
|
|
79
|
+
asset?: string;
|
|
80
|
+
}, client?: PublisherClient): Promise<void>;
|
|
81
|
+
export {};
|
|
82
|
+
//# sourceMappingURL=source-manifest-publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-manifest-publish.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source-manifest-publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAI/C,OAAO,EAGL,KAAK,iBAAiB,EAEvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAA2B,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAStF,+EAA+E;AAC/E,KAAK,SAAS,GAAG,OAAO,SAAS,CAAC;AAElC;;;;;GAKG;AACH,wBAAgB,0BAA0B,CACxC,QAAQ,EAAE,iBAAiB,EAC3B,SAAS,EAAE,MAAM,GAChB,iBAAiB,CAMnB;AA0BD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG/D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQhE;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAyDxB;AAID;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IACJ,UAAU,EAAE,MAAM,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,EACD,MAAM,CAAC,EAAE,eAAe,EACxB,KAAK,GAAE,SAAqB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAwFf;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAC3B,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5C,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
|
|
@@ -1,19 +1,78 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `skaile source manifest …` —
|
|
3
|
-
*
|
|
2
|
+
* `skaile source manifest …` — curated `skaile.manifest.yaml` lifecycle for a
|
|
3
|
+
* source you do NOT own. `init` generates a curated manifest from a discovery
|
|
4
|
+
* run and stores it OUTSIDE the source, under the local store catalog
|
|
5
|
+
* (`~/.skaile/store/manifests/<slug>.yaml`); `edit` opens it in `$EDITOR` and
|
|
6
|
+
* re-validates on save. `source add`/`sync` then apply it as a read overlay
|
|
7
|
+
* (see `source.ts` `refreshManifestCache`).
|
|
4
8
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
+
* `rebuild` refreshes a curated manifest after an upstream change (merge by
|
|
10
|
+
* default — curation is sacred; `--overwrite` re-scans). `verify` is a
|
|
11
|
+
* read-only integrity check (paths, declared hashes, schema, dep refs).
|
|
12
|
+
* `publish`/`propose`/`yank` remain stubs — they need the store publish
|
|
13
|
+
* endpoint (`POST /sources/<id>/manifest`), which lands in a follow-up.
|
|
9
14
|
*
|
|
10
15
|
* @docLink cli/commands/source#manifest
|
|
11
16
|
*/
|
|
12
17
|
import type { Command } from "commander";
|
|
18
|
+
/**
|
|
19
|
+
* Resolve a `source manifest` argument into a `{ url, slug, dest }` triple.
|
|
20
|
+
*
|
|
21
|
+
* Resolution order:
|
|
22
|
+
* 1. A key matching an already-registered project source (stored URL, cache
|
|
23
|
+
* key, or short slug).
|
|
24
|
+
* 2. A collision-free **store slug** (`<host>__<owner>__<repo>`) whose
|
|
25
|
+
* manifest already exists at `~/.skaile/store/manifests/<arg>.yaml`. This
|
|
26
|
+
* MUST be tried before bare-name expansion: a bare name like `cli` would
|
|
27
|
+
* otherwise expand (via `normalizeSourceUrl`) to the skaile-ai org and a
|
|
28
|
+
* DIFFERENT slug than the one `init` wrote (e.g. `larksuite`). The slug is
|
|
29
|
+
* the exact identifier `init`'s next-step hint prints back.
|
|
30
|
+
* 3. Otherwise a git URL / `owner/repo` / bare name via `normalizeSourceUrl`.
|
|
31
|
+
*
|
|
32
|
+
* The clone dir is the same URL-keyed cache `source add` uses.
|
|
33
|
+
*/
|
|
34
|
+
export declare function resolveSourceArg(arg: string, projectDir: string): {
|
|
35
|
+
url: string;
|
|
36
|
+
slug: string;
|
|
37
|
+
dest: string;
|
|
38
|
+
manifestFile: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Split a `$VISUAL`/`$EDITOR` value into `{ command, args }` and append the file
|
|
42
|
+
* as the final arg. The env value is a full command line, not a bare binary —
|
|
43
|
+
* `EDITOR="code --wait"` must spawn `code` with `["--wait", <file>]`, and
|
|
44
|
+
* `EDITOR=code` (which returns before save) is the user's problem, not ours.
|
|
45
|
+
* A whitespace split covers the common editors (`code --wait`, `code -w`,
|
|
46
|
+
* `subl -w`, `vi`); paths with embedded spaces are not supported (rare for an
|
|
47
|
+
* editor binary and out of scope). Falls back to `vi` when unset/empty.
|
|
48
|
+
*
|
|
49
|
+
* @docLink cli/commands/source#manifest-edit
|
|
50
|
+
*/
|
|
51
|
+
export declare function resolveEditorCommand(editorEnv: string | undefined, target: string): {
|
|
52
|
+
command: string;
|
|
53
|
+
args: string[];
|
|
54
|
+
};
|
|
55
|
+
/** Minimal spawn contract runEdit needs — lets tests inject a fake. */
|
|
56
|
+
type SpawnLike = (command: string, args: string[], opts: {
|
|
57
|
+
stdio: "inherit";
|
|
58
|
+
}) => {
|
|
59
|
+
status: number | null;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* `source manifest edit <src>` — open the curated store manifest in `$EDITOR`
|
|
63
|
+
* and re-validate on save. Warnings are surfaced but never hard-fail.
|
|
64
|
+
*
|
|
65
|
+
* `spawn` is injectable so tests can assert the argv without launching a real
|
|
66
|
+
* editor; production passes the default `spawnSync`.
|
|
67
|
+
*/
|
|
68
|
+
export declare function runEdit(arg: string, opts: {
|
|
69
|
+
projectDir: string;
|
|
70
|
+
}, spawn?: SpawnLike): void;
|
|
13
71
|
/**
|
|
14
72
|
* Append the `manifest` sub-tree to a `source` command.
|
|
15
73
|
*
|
|
16
74
|
* Called from `makeSourceCommand()` in `source.ts`.
|
|
17
75
|
*/
|
|
18
76
|
export declare function addSourceManifestCommands(src: Command): void;
|
|
77
|
+
export {};
|
|
19
78
|
//# sourceMappingURL=source-manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-manifest.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source-manifest.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"source-manifest.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqBH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,UAAU,EAAE,MAAM,GACjB;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAWnE;AAyZD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,EAAE,MAAM,GACb;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAIrC;AAED,uEAAuE;AACvE,KAAK,SAAS,GAAG,CACf,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,EAAE;IAAE,KAAK,EAAE,SAAS,CAAA;CAAE,KACvB;IAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC;AAE/B;;;;;;GAMG;AACH,wBAAgB,OAAO,CACrB,GAAG,EAAE,MAAM,EACX,IAAI,EAAE;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,EAC5B,KAAK,GAAE,SAA6C,GACnD,IAAI,CAgCN;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAqE5D"}
|
|
@@ -58,6 +58,19 @@ export declare function sourceMatchesKey(entry: SourceEntry, key: string): boole
|
|
|
58
58
|
* (which `setSource` updates in place).
|
|
59
59
|
*/
|
|
60
60
|
export declare function findCacheKeyCollision(sources: SourceEntry[], url: string): SourceEntry | undefined;
|
|
61
|
+
export declare function readProjectSources(yamlPath: string): SourceEntry[];
|
|
62
|
+
/**
|
|
63
|
+
* Clone the source if its clone directory does not yet exist. When `force` is
|
|
64
|
+
* set, the existing clone is replaced by a fresh checkout. Returns true when a
|
|
65
|
+
* clone happened. The cache slug is derived from the URL.
|
|
66
|
+
*
|
|
67
|
+
* A `--force` re-clone moves the old clone aside first and only deletes it once
|
|
68
|
+
* the fresh clone succeeds — so a failed re-clone restores the previous clone
|
|
69
|
+
* rather than leaving the source registered with no cache behind it.
|
|
70
|
+
*/
|
|
71
|
+
export declare function ensureClone(entry: SourceEntry, opts?: {
|
|
72
|
+
force?: boolean;
|
|
73
|
+
}): boolean;
|
|
61
74
|
/**
|
|
62
75
|
* Auto-sync hook for `skaile search` on an unsynced workspace. Clones/pulls and
|
|
63
76
|
* re-indexes every source declared in the project's `skaile.yaml`, then returns
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAGL,KAAK,WAAW,
|
|
1
|
+
{"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,EAGL,KAAK,WAAW,EAMjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEnD;AAKD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAEzE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAYvE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOxD;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAIzE;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EAAE,EACtB,GAAG,EAAE,MAAM,GACV,WAAW,GAAG,SAAS,CAGzB;AAaD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,EAAE,CAQlE;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,OAAO,CAwBvF;AA+CD;;;;;;;;;;GAUG;AACH,wBAAsB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQ5E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,kBAAkB,CACtC,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAA;CAAO,GAC3B,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAuC5D;AAoBD,wBAAgB,iBAAiB,IAAI,OAAO,CAwR3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAuJ1C"}
|