@skaile/workspaces 1.4.0 → 1.6.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 +326 -0
- package/dist/app-sdk/index.js +241 -55
- package/dist/app-sdk/index.js.map +1 -1
- package/dist/app-sdk/src/app.d.ts +55 -4
- package/dist/app-sdk/src/app.d.ts.map +1 -1
- 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/index.d.ts +3 -2
- package/dist/app-sdk/src/index.d.ts.map +1 -1
- package/dist/app-sdk/src/transport.d.ts +9 -0
- package/dist/app-sdk/src/transport.d.ts.map +1 -1
- package/dist/app-sdk/src/ws-transport.d.ts +18 -2
- package/dist/app-sdk/src/ws-transport.d.ts.map +1 -1
- package/dist/{asset-feeds-NG5TKB3V.js → asset-feeds-T35ELX2O.js} +9 -9
- package/dist/{asset-feeds-NG5TKB3V.js.map → asset-feeds-T35ELX2O.js.map} +1 -1
- package/dist/asset-manager/index.js +11 -6
- package/dist/asset-manager/installer.js +5 -5
- package/dist/asset-manager/src/index.d.ts.map +1 -1
- package/dist/{chunk-BE5KTS2L.js → chunk-2DWXGUZA.js} +2 -2
- package/dist/{chunk-BE5KTS2L.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-X57AMTAH.js → chunk-3CHARYD4.js} +16 -7
- package/dist/chunk-3CHARYD4.js.map +1 -0
- package/dist/{chunk-LCTRCWBK.js → chunk-6NR2BEIY.js} +4 -4
- package/dist/{chunk-LCTRCWBK.js.map → chunk-6NR2BEIY.js.map} +1 -1
- package/dist/{chunk-JZPEEMIM.js → chunk-BEO6KN7P.js} +5 -5
- package/dist/{chunk-JZPEEMIM.js.map → chunk-BEO6KN7P.js.map} +1 -1
- package/dist/{chunk-AAGD2J4H.js → chunk-CBA2XIBF.js} +33 -15
- package/dist/chunk-CBA2XIBF.js.map +1 -0
- package/dist/{chunk-GWDZW44L.js → chunk-DMG6NJH7.js} +4 -4
- package/dist/{chunk-GWDZW44L.js.map → chunk-DMG6NJH7.js.map} +1 -1
- package/dist/{chunk-HWTQ6HPO.js → chunk-FDE7XRQA.js} +56 -8
- package/dist/chunk-FDE7XRQA.js.map +1 -0
- package/dist/{chunk-26YCXWCU.js → chunk-HY33RMEA.js} +3 -3
- package/dist/{chunk-26YCXWCU.js.map → chunk-HY33RMEA.js.map} +1 -1
- 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-DNFIKRO6.js → chunk-KMY7HVQ6.js} +3 -3
- package/dist/{chunk-DNFIKRO6.js.map → chunk-KMY7HVQ6.js.map} +1 -1
- package/dist/{chunk-B6SSXVF2.js → chunk-MZV6WCF3.js} +81 -49
- package/dist/chunk-MZV6WCF3.js.map +1 -0
- package/dist/{chunk-DZCK7GRW.js → chunk-P4VHQA4N.js} +22 -6
- package/dist/chunk-P4VHQA4N.js.map +1 -0
- package/dist/{chunk-OSCJRUKM.js → chunk-RDYOU6N6.js} +2 -2
- package/dist/{chunk-OSCJRUKM.js.map → chunk-RDYOU6N6.js.map} +1 -1
- package/dist/{chunk-77OXU44H.js → chunk-RSYV7XEN.js} +13 -7
- package/dist/chunk-RSYV7XEN.js.map +1 -0
- 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 +259 -192
- 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-cmd.d.ts +6 -0
- package/dist/cli/src/commands/preset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/preset-export.d.ts +10 -1
- package/dist/cli/src/commands/preset-export.d.ts.map +1 -1
- 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/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 +5 -5
- package/dist/connectors/index.js +6 -6
- package/dist/core/index.js +4 -4
- 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/workspace-config.js +2 -2
- package/dist/deploy/index.js +4 -4
- package/dist/discovery/index.js +2 -2
- 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-CHC7X7AJ.js → ensure-sources-QDVFUIUP.js} +14 -9
- package/dist/ensure-sources-QDVFUIUP.js.map +1 -0
- package/dist/factory-assets/connectors/box.js +6 -6
- package/dist/factory-assets/connectors/deploy.js +6 -6
- package/dist/factory-assets/connectors/devserver.js +6 -6
- package/dist/factory-assets/connectors/flow/adapter.js +6 -6
- package/dist/factory-assets/connectors/flow/engine.js +4 -4
- package/dist/factory-assets/connectors/flow/run-flow.js +7 -7
- package/dist/factory-assets/connectors/flow.js +6 -6
- package/dist/factory-assets/connectors/git.js +6 -6
- package/dist/factory-assets/connectors/gmail.js +6 -6
- package/dist/factory-assets/connectors/googledrive.js +6 -6
- package/dist/factory-assets/connectors/local.js +6 -6
- package/dist/factory-assets/connectors/mattermost.js +6 -6
- package/dist/factory-assets/connectors/memory.js +6 -6
- package/dist/factory-assets/connectors/minio.js +6 -6
- package/dist/factory-assets/connectors/postgres.js +6 -6
- package/dist/factory-assets/connectors/s3.js +6 -6
- package/dist/factory-assets/connectors/sharepoint.js +6 -6
- package/dist/factory-assets/connectors/sqlite.js +6 -6
- package/dist/factory-assets/connectors/static-server.js +6 -6
- package/dist/factory-assets/connectors/tunnel.js +6 -6
- package/dist/factory-assets/connectors/webdav.js +6 -6
- package/dist/factory-assets/connectors/xstate-store.js +6 -6
- package/dist/factory-assets/connectors/xstate.js +6 -6
- package/dist/{flows-CGOCUNO6.js → flows-MRVXTYWC.js} +3 -3
- package/dist/{flows-CGOCUNO6.js.map → flows-MRVXTYWC.js.map} +1 -1
- package/dist/{helpers-GWG4CYYC.js → helpers-TF7GCBRQ.js} +14 -9
- package/dist/{helpers-GWG4CYYC.js.map → helpers-TF7GCBRQ.js.map} +1 -1
- package/dist/library/index.js +6 -6
- package/dist/library/install.js +4 -4
- 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-37PXN6MK.js → open-library-4HMIDK3N.js} +13 -13
- package/dist/{open-library-37PXN6MK.js.map → open-library-4HMIDK3N.js.map} +1 -1
- package/dist/{paths-UVOHWUPY.js → paths-P3DWFUPS.js} +7 -7
- package/dist/{paths-UVOHWUPY.js.map → paths-P3DWFUPS.js.map} +1 -1
- package/dist/{plugin-store-EIMVEH3O.js → plugin-store-S7OMGI7N.js} +6 -6
- package/dist/{plugin-store-EIMVEH3O.js.map → plugin-store-S7OMGI7N.js.map} +1 -1
- package/dist/runner/index.js +8 -8
- package/dist/runner/src/agent.d.ts.map +1 -1
- package/dist/runner/src/capability-registry.d.ts +21 -2
- package/dist/runner/src/capability-registry.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +11 -6
- package/dist/sdk/core.js +4 -4
- package/dist/sdk/flow.js +4 -4
- package/dist/sdk/index.js +8 -8
- package/dist/sdk/runner.js +8 -8
- package/dist/{setup-DINVR6ZQ.js → setup-2CCS63L6.js} +6 -6
- package/dist/{setup-DINVR6ZQ.js.map → setup-2CCS63L6.js.map} +1 -1
- package/dist/source-LOAM7IIQ.js +30 -0
- package/dist/{source-RXAHIGMD.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 +8 -8
- package/dist/workspace-plugin/adapters/mcp.js +1 -1
- package/dist/workspace-plugin/adapters/omp.js +3 -3
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-77OXU44H.js.map +0 -1
- package/dist/chunk-AAGD2J4H.js.map +0 -1
- package/dist/chunk-B6SSXVF2.js.map +0 -1
- package/dist/chunk-BJHZHNKR.js +0 -93
- package/dist/chunk-BJHZHNKR.js.map +0 -1
- package/dist/chunk-DZCK7GRW.js.map +0 -1
- package/dist/chunk-HWTQ6HPO.js.map +0 -1
- package/dist/chunk-OUWNTFDG.js.map +0 -1
- package/dist/chunk-QM2TT2PJ.js +0 -385
- package/dist/chunk-QM2TT2PJ.js.map +0 -1
- package/dist/chunk-X57AMTAH.js.map +0 -1
- package/dist/ensure-sources-CHC7X7AJ.js.map +0 -1
- package/dist/source-RXAHIGMD.js +0 -30
- package/dist/store-client-T3F663YG.js +0 -15
- package/dist/store-client-T3F663YG.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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BAAqB,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"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
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"}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* unit-tested in isolation; the Commander action in `preset-cmd.ts` owns file
|
|
8
8
|
* reads/writes, the loud stderr summary, and interactive confirmation.
|
|
9
9
|
*/
|
|
10
|
-
import type
|
|
10
|
+
import { type LockFile, type SkWorkspaceConfig, type SourceEntry } from "@skaile/workspaces/core";
|
|
11
11
|
import type { PresetManifest } from "@skaile/workspaces/types/manifests";
|
|
12
12
|
/** One inline-secret hit: which item, where in its config, and a safe preview. */
|
|
13
13
|
export interface SecretFinding {
|
|
@@ -45,6 +45,15 @@ export declare function buildPresetFromWorkspace(config: SkWorkspaceConfig, name
|
|
|
45
45
|
* is kept so apply still resolves. Connectors/mcp carry no source.
|
|
46
46
|
*/
|
|
47
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[];
|
|
48
57
|
/**
|
|
49
58
|
* True when `value` is a secret *reference* (indirection) rather than an inline
|
|
50
59
|
* secret — e.g. `env:DATABASE_URL`, `forge:api-key`, `pat:env:GH_TOKEN`. Such
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset-export.d.ts","sourceRoot":"","sources":["../../../../cli/src/commands/preset-export.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
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,I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,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;AA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"","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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turn a driver-start/prompt failure into a friendly, actionable message when the
|
|
3
|
+
* cause is a missing/unusable agent binary; otherwise return `null` so the caller
|
|
4
|
+
* surfaces the raw error unchanged.
|
|
5
|
+
*
|
|
6
|
+
* The bridge classifies these as `category: "config"` and carries a `hint`, but the
|
|
7
|
+
* shape reaching the CLI varies: omp's `start()` rejects with the raw spawn error
|
|
8
|
+
* (`code === "ENOENT"`), while the subprocess CLI drivers reject with the classified
|
|
9
|
+
* `AgentError` attached under `.detail`. Duck-type across all of them.
|
|
10
|
+
*/
|
|
11
|
+
export declare function friendlyDriverError(err: unknown): string | null;
|
|
12
|
+
//# sourceMappingURL=driver-error.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"driver-error.d.ts","sourceRoot":"","sources":["../../../cli/src/driver-error.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAyB/D"}
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
* `https://skaile.store`) and a {@link LocalCatalogSource} bound to the most
|
|
11
11
|
* recent local library registered via `skaile source add`.
|
|
12
12
|
*/
|
|
13
|
+
/** Thrown by {@link openCatalogSource} when `catalog.url` is the `local` sentinel. */
|
|
14
|
+
export declare class LocalCatalogDisabledError extends Error {
|
|
15
|
+
constructor(message: string);
|
|
16
|
+
}
|
|
13
17
|
/**
|
|
14
18
|
* Open the LocalIndex with the full kind registry. Exits with code 1
|
|
15
19
|
* if the library directory cannot be created.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-library.d.ts","sourceRoot":"","sources":["../../../cli/src/open-library.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH;;;;;;GAMG;AACH,wBAAsB,WAAW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,IAAI,CAAC,EAAE;IAC7C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CACP,OAAO,4BAA4B,EAAE,mBAAmB,GACxD,OAAO,4BAA4B,EAAE,iBAAiB,CACzD,CAqBA;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,qBAAqB;IACpC,gDAAgD;IAChD,MAAM,EAAE,OAAO,4BAA4B,EAAE,cAAc,CAAC;IAC5D,sEAAsE;IACtE,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,oBAAoB,CAAC,IAAI,CAAC,EAAE;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAmEjC;AAED;;;;;;GAMG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC;IAClD,OAAO,EAAE,OAAO,4BAA4B,EAAE,cAAc,CAAC;IAC7D,OAAO,EAAE,OAAO,4BAA4B,EAAE,UAAU,CAAC;IACzD,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC,CAKD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Resolved auth targets — every field has a prod default, all env-overridable. */
|
|
2
|
+
export interface StoreAuthConfig {
|
|
3
|
+
keycloakUrl: string;
|
|
4
|
+
realm: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
authFile: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Load the auth config. Defaults target the production store
|
|
10
|
+
* (`auth.skaile.ai`, realm `skaile-store`, public client `skaile-store-cli`);
|
|
11
|
+
* override with `SKAILE_KEYCLOAK_URL` / `SKAILE_STORE_REALM` /
|
|
12
|
+
* `SKAILE_STORE_CLI_CLIENT` / `SKAILE_AUTH_FILE` for dev or a preview deploy.
|
|
13
|
+
*/
|
|
14
|
+
export declare function loadStoreAuthConfig(): StoreAuthConfig;
|
|
15
|
+
export interface StoredAuth {
|
|
16
|
+
access_token: string;
|
|
17
|
+
refresh_token?: string;
|
|
18
|
+
/** Epoch ms when the access token expires (with a safety margin already applied). */
|
|
19
|
+
expires_at: number;
|
|
20
|
+
}
|
|
21
|
+
/** Injectable seams so the poll loop is unit-testable without real time or network. */
|
|
22
|
+
export interface AuthDeps {
|
|
23
|
+
fetchImpl?: typeof fetch;
|
|
24
|
+
sleep?: (ms: number) => Promise<void>;
|
|
25
|
+
/** Called once with the verification URL + user code (default: write to stderr). */
|
|
26
|
+
onPrompt?: (url: string, userCode: string) => void;
|
|
27
|
+
}
|
|
28
|
+
/** Remove the cached session (sign out). */
|
|
29
|
+
export declare function logout(config: StoreAuthConfig): void;
|
|
30
|
+
/** True when a cached, well-formed session exists (validity/refresh resolved on use). */
|
|
31
|
+
export declare function hasStoredAuth(config: StoreAuthConfig): boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Run the device flow to completion, persisting tokens on success. Prints the
|
|
34
|
+
* verification URL + user code for the operator to approve in a browser.
|
|
35
|
+
*/
|
|
36
|
+
export declare function deviceLogin(config: StoreAuthConfig, deps?: AuthDeps): Promise<StoredAuth>;
|
|
37
|
+
/**
|
|
38
|
+
* Return a valid access token, refreshing if it is expired (or about to). Throws
|
|
39
|
+
* a clear "run `skaile store login`" error when there is no usable session.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getAccessToken(config: StoreAuthConfig, deps?: AuthDeps): Promise<string>;
|
|
42
|
+
//# sourceMappingURL=store-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-auth.d.ts","sourceRoot":"","sources":["../../../cli/src/store-auth.ts"],"names":[],"mappings":"AAaA,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAMD;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,eAAe,CAQrD;AAQD,MAAM,WAAW,UAAU;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,qFAAqF;IACrF,UAAU,EAAE,MAAM,CAAC;CACpB;AAsBD,uFAAuF;AACvF,MAAM,WAAW,QAAQ;IACvB,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;IACzB,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtC,oFAAoF;IACpF,QAAQ,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACpD;AAmBD,4CAA4C;AAC5C,wBAAgB,MAAM,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,CAMpD;AAED,yFAAyF;AACzF,wBAAgB,aAAa,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAE9D;AAkBD;;;GAGG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,GAAE,QAAa,GAAG,OAAO,CAAC,UAAU,CAAC,CAkDnG;AA0BD;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,eAAe,EACvB,IAAI,GAAE,QAAa,GAClB,OAAO,CAAC,MAAM,CAAC,CAWjB"}
|