@skaile/workspaces 0.13.0 → 0.15.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 +88 -0
- package/dist/asset-manager/index.js +4 -4
- package/dist/asset-manager/installer.js +3 -3
- package/dist/base-assets/connectors/deploy.js +4 -4
- package/dist/base-assets/connectors/devserver.js +4 -4
- package/dist/base-assets/connectors/flow/adapter.js +4 -4
- package/dist/base-assets/connectors/flow/run-flow.js +5 -5
- package/dist/base-assets/connectors/flow.js +4 -4
- package/dist/base-assets/connectors/git.js +4 -4
- package/dist/base-assets/connectors/gmail.js +4 -4
- package/dist/base-assets/connectors/googledrive/driver.d.ts +47 -0
- package/dist/base-assets/connectors/googledrive/driver.d.ts.map +1 -0
- package/dist/base-assets/connectors/googledrive.js +20 -0
- package/dist/base-assets/connectors/googledrive.js.map +1 -0
- package/dist/base-assets/connectors/local.js +4 -4
- package/dist/base-assets/connectors/mattermost.js +4 -4
- package/dist/base-assets/connectors/memory.js +4 -4
- package/dist/base-assets/connectors/minio.js +4 -4
- package/dist/base-assets/connectors/postgres.js +4 -4
- package/dist/base-assets/connectors/redis.js +4 -4
- package/dist/base-assets/connectors/s3.js +4 -4
- package/dist/base-assets/connectors/sharepoint/driver.d.ts.map +1 -1
- package/dist/base-assets/connectors/sharepoint.js +4 -4
- package/dist/base-assets/connectors/sqlite.js +4 -4
- package/dist/base-assets/connectors/static-server.js +4 -4
- package/dist/base-assets/connectors/tunnel.js +4 -4
- package/dist/base-assets/connectors/webdav/driver.d.ts.map +1 -1
- package/dist/base-assets/connectors/webdav.js +4 -4
- package/dist/base-assets/connectors/xstate-store.js +4 -4
- package/dist/base-assets/connectors/xstate.js +4 -4
- package/dist/base-assets/connectors/yjs.js +4 -4
- package/dist/{chunk-42OQF7UU.js → chunk-2NIOMFSQ.js} +305 -225
- package/dist/chunk-2NIOMFSQ.js.map +1 -0
- package/dist/{chunk-DZG3JD4Y.js → chunk-4GEVGRWB.js} +3 -3
- package/dist/{chunk-DZG3JD4Y.js.map → chunk-4GEVGRWB.js.map} +1 -1
- package/dist/{chunk-VAJB2UJ5.js → chunk-6EN5IJ2Y.js} +13 -13
- package/dist/chunk-6EN5IJ2Y.js.map +1 -0
- package/dist/{chunk-QG4X77V3.js → chunk-7R4WLTZW.js} +4 -4
- package/dist/{chunk-QG4X77V3.js.map → chunk-7R4WLTZW.js.map} +1 -1
- package/dist/{chunk-GN6IYVJN.js → chunk-G7O7WDXX.js} +2 -2
- package/dist/{chunk-GN6IYVJN.js.map → chunk-G7O7WDXX.js.map} +1 -1
- package/dist/{chunk-EAJKY27M.js → chunk-HSOEX3TA.js} +250 -92
- package/dist/chunk-HSOEX3TA.js.map +1 -0
- package/dist/chunk-QAVZOJCV.js +72 -0
- package/dist/chunk-QAVZOJCV.js.map +1 -0
- package/dist/{chunk-CYRCPFZ2.js → chunk-SO43XRWF.js} +3 -3
- package/dist/{chunk-CYRCPFZ2.js.map → chunk-SO43XRWF.js.map} +1 -1
- package/dist/{chunk-4DDQKKWX.js → chunk-Z24KPZKU.js} +20 -13
- package/dist/chunk-Z24KPZKU.js.map +1 -0
- package/dist/cli/index.js +685 -527
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/src/commands/asset-cmd.d.ts +4 -1
- package/dist/cli/src/commands/asset-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/library-cmd.d.ts +6 -4
- package/dist/cli/src/commands/library-cmd.d.ts.map +1 -1
- package/dist/cli/src/commands/npx.d.ts.map +1 -1
- package/dist/cli/src/commands/project.d.ts +2 -2
- package/dist/cli/src/commands/source-manifest.d.ts +19 -0
- package/dist/cli/src/commands/source-manifest.d.ts.map +1 -0
- package/dist/cli/src/commands/source.d.ts +6 -2
- 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/open-library.d.ts +18 -18
- package/dist/cli/src/open-library.d.ts.map +1 -1
- package/dist/connectors/config.js +2 -2
- package/dist/connectors/index.js +4 -4
- package/dist/connectors/rclone-config.js +1 -1
- package/dist/connectors/src/connector-registry.d.ts.map +1 -1
- package/dist/connectors/src/fleet-utils.d.ts +35 -0
- package/dist/connectors/src/fleet-utils.d.ts.map +1 -0
- package/dist/connectors/src/index.d.ts +2 -1
- package/dist/connectors/src/index.d.ts.map +1 -1
- package/dist/connectors/src/rclone-config/googledrive.d.ts +59 -0
- package/dist/connectors/src/rclone-config/googledrive.d.ts.map +1 -0
- package/dist/connectors/src/rclone-config/index.d.ts +1 -0
- package/dist/connectors/src/rclone-config/index.d.ts.map +1 -1
- package/dist/connectors/src/rclone-config/onedrive.d.ts +1 -0
- package/dist/connectors/src/rclone-config/onedrive.d.ts.map +1 -1
- package/dist/connectors/src/rclone-config/sanitize.d.ts +9 -0
- package/dist/connectors/src/rclone-config/sanitize.d.ts.map +1 -0
- package/dist/connectors/src/rclone-config/webdav.d.ts +1 -0
- package/dist/connectors/src/rclone-config/webdav.d.ts.map +1 -1
- package/dist/core/index.js +2 -2
- package/dist/library/index.js +1 -1
- package/dist/library/src/config.d.ts +12 -3
- package/dist/library/src/config.d.ts.map +1 -1
- package/dist/library/src/index.d.ts +7 -8
- package/dist/library/src/index.d.ts.map +1 -1
- package/dist/library/src/library.d.ts +24 -77
- package/dist/library/src/library.d.ts.map +1 -1
- package/dist/library/src/local/db.d.ts +3 -2
- package/dist/library/src/local/db.d.ts.map +1 -1
- package/dist/library/src/local/{user-library-manager.d.ts → library-manager.d.ts} +15 -16
- package/dist/library/src/local/library-manager.d.ts.map +1 -0
- package/dist/library/src/local/library.d.ts +27 -23
- package/dist/library/src/local/library.d.ts.map +1 -1
- package/dist/library/src/local/local-catalog-source.d.ts +5 -5
- package/dist/library/src/local/local-catalog-source.d.ts.map +1 -1
- package/dist/library/src/local/sidecar-paths.d.ts +3 -3
- package/dist/library/src/local/store-paths.d.ts +42 -0
- package/dist/library/src/local/store-paths.d.ts.map +1 -0
- package/dist/library/src/preset/apply.d.ts +2 -2
- package/dist/library/src/preset/apply.d.ts.map +1 -1
- package/dist/library/src/preset/placeholders.d.ts +3 -3
- package/dist/library/src/preset/placeholders.d.ts.map +1 -1
- package/dist/library/src/preset/resolve-item.d.ts +3 -3
- package/dist/library/src/preset/resolve-item.d.ts.map +1 -1
- package/dist/library/src/sync/driver.d.ts +6 -6
- package/dist/library/src/sync/driver.d.ts.map +1 -1
- package/dist/library/src/sync/git-driver.d.ts +6 -6
- package/dist/library/src/sync/git-driver.d.ts.map +1 -1
- package/dist/library/src/sync/local-driver.d.ts +6 -6
- package/dist/library/src/sync/local-driver.d.ts.map +1 -1
- package/dist/library/src/user-library.d.ts +12 -17
- package/dist/library/src/user-library.d.ts.map +1 -1
- package/dist/{open-library-S6FK4N4S.js → open-library-XD7QYLMW.js} +4 -4
- package/dist/{open-library-S6FK4N4S.js.map → open-library-XD7QYLMW.js.map} +1 -1
- package/dist/runner/index.js +8 -8
- package/dist/runner/src/composition/resolve.d.ts +3 -3
- package/dist/runner/src/composition/resolve.d.ts.map +1 -1
- package/dist/sdk/asset-manager.js +4 -4
- package/dist/sdk/core.js +2 -2
- package/dist/sdk/index.js +9 -9
- package/dist/sdk/runner.js +8 -8
- package/dist/{setup-BQEST4RD.js → setup-WZFCLQ2J.js} +4 -4
- package/dist/{setup-BQEST4RD.js.map → setup-WZFCLQ2J.js.map} +1 -1
- package/dist/{store-client-CB6CYFXB.js → store-client-BM3IBDPT.js} +4 -4
- package/dist/{store-client-CB6CYFXB.js.map → store-client-BM3IBDPT.js.map} +1 -1
- package/dist/tui/index.js +8 -8
- package/dist/types/src/install-manifest.d.ts +1 -1
- package/dist/workspace-plugin/adapters/mcp.js +2 -2
- package/dist/workspace-plugin/index.js +1 -1
- package/package.json +7 -1
- package/dist/chunk-42OQF7UU.js.map +0 -1
- package/dist/chunk-4DDQKKWX.js.map +0 -1
- package/dist/chunk-EAJKY27M.js.map +0 -1
- package/dist/chunk-GCRKAFH7.js +0 -40
- package/dist/chunk-GCRKAFH7.js.map +0 -1
- package/dist/chunk-VAJB2UJ5.js.map +0 -1
- package/dist/cli/src/commands/library-status.d.ts +0 -19
- package/dist/cli/src/commands/library-status.d.ts.map +0 -1
- package/dist/cli/src/commands/source-sidecar.d.ts +0 -6
- package/dist/cli/src/commands/source-sidecar.d.ts.map +0 -1
- package/dist/library/src/local/user-library-manager.d.ts.map +0 -1
- package/dist/library/src/sync/store-driver.d.ts +0 -21
- package/dist/library/src/sync/store-driver.d.ts.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* IAssetIndex — single-interface contract for the asset cache layer.
|
|
3
3
|
*
|
|
4
4
|
* Two implementations:
|
|
5
|
-
* -
|
|
6
|
-
* -
|
|
5
|
+
* - LocalIndex (SQLite at ~/.skaile/index.db, Phase 1)
|
|
6
|
+
* - PlatformIndex (Postgres, Phase 3)
|
|
7
7
|
*
|
|
8
|
-
* @docLink packages/library/concepts#i-
|
|
8
|
+
* @docLink packages/library/concepts#i-asset-index
|
|
9
9
|
*/
|
|
10
10
|
/**
|
|
11
11
|
* All known asset kinds shipped with the framework (9 core + 2 initial
|
|
@@ -44,64 +44,13 @@ export declare const PIN_POLICIES: readonly ["exact", "minor-track", "latest"];
|
|
|
44
44
|
*/
|
|
45
45
|
export type PinPolicy = (typeof PIN_POLICIES)[number];
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
48
|
-
* table after the 2026-05-13 schema change. Kept for backward compat; new
|
|
49
|
-
* code should reference `UserLibrary` from `user-library.ts`.
|
|
50
|
-
*/
|
|
51
|
-
export type SourceType = "local" | "git" | "store";
|
|
52
|
-
/**
|
|
53
|
-
* A registered asset source — a row in the `libraries` table.
|
|
54
|
-
*
|
|
55
|
-
* @docLink packages/library/concepts#source
|
|
56
|
-
*/
|
|
57
|
-
export interface Source {
|
|
58
|
-
id: string;
|
|
59
|
-
/** Backend kind (renamed from `type`). */
|
|
60
|
-
type: SourceType;
|
|
61
|
-
/** User-visible handle (NEW). */
|
|
62
|
-
name: string;
|
|
63
|
-
/** Absolute on-disk root. */
|
|
64
|
-
path: string;
|
|
65
|
-
/** Ownership level (NEW). */
|
|
66
|
-
ownership: "owner" | "contributor" | "reader";
|
|
67
|
-
/** True iff this is the auto-target for `asset migrate`. */
|
|
68
|
-
isDefault: boolean;
|
|
69
|
-
/** Backend-specific config — parsed from JSON. */
|
|
70
|
-
backendConfig: Record<string, unknown>;
|
|
71
|
-
/** Detected layout. */
|
|
72
|
-
structure?: "flat" | "domain";
|
|
73
|
-
/** True iff CLI generated the on-disk `.skaile-source.yaml`. */
|
|
74
|
-
manifestGenerated: boolean;
|
|
75
|
-
/** Last sync timestamp. */
|
|
76
|
-
lastSyncedAt?: Date;
|
|
77
|
-
createdAt: Date;
|
|
78
|
-
updatedAt: Date;
|
|
79
|
-
/** @deprecated For migration compat; now mirrors `backendConfig.url`. */
|
|
80
|
-
url?: string;
|
|
81
|
-
/** @deprecated For migration compat; mirrors `backendConfig.branch`. */
|
|
82
|
-
ref?: string;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Input shape for {@link LocalLibrary.addSource}.
|
|
86
|
-
*
|
|
87
|
-
* @docLink packages/library/concepts#source
|
|
88
|
-
*/
|
|
89
|
-
export interface AddSourceInput {
|
|
90
|
-
type: SourceType;
|
|
91
|
-
name: string;
|
|
92
|
-
path: string;
|
|
93
|
-
ownership?: "owner" | "contributor" | "reader";
|
|
94
|
-
backendConfig?: Record<string, unknown>;
|
|
95
|
-
isDefault?: boolean;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Result returned by {@link ILibrary.syncSource}.
|
|
47
|
+
* Result returned by {@link IAssetIndex.syncLibrary}.
|
|
99
48
|
*
|
|
100
|
-
* @docLink packages/library/concepts#
|
|
49
|
+
* @docLink packages/library/concepts#library
|
|
101
50
|
*/
|
|
102
51
|
export interface SyncResult {
|
|
103
|
-
/** The
|
|
104
|
-
|
|
52
|
+
/** The library ID that was synced. */
|
|
53
|
+
libraryId: string;
|
|
105
54
|
/** Total number of assets discovered in the tree. */
|
|
106
55
|
assetsFound: number;
|
|
107
56
|
/** Number of asset definitions created or updated in the cache. */
|
|
@@ -137,8 +86,8 @@ export interface AssetDefinition {
|
|
|
137
86
|
category?: string;
|
|
138
87
|
/** Full parsed manifest as JSON-safe object. */
|
|
139
88
|
manifest: Record<string, unknown>;
|
|
140
|
-
/**
|
|
141
|
-
|
|
89
|
+
/** Library that provided this definition (null when library was removed). */
|
|
90
|
+
libraryId?: string;
|
|
142
91
|
/**
|
|
143
92
|
* Version of the IAssetKindProvider that produced this cached entry.
|
|
144
93
|
* Independent of the asset's own version — tracks schema/logic evolution.
|
|
@@ -152,7 +101,7 @@ export interface AssetDefinition {
|
|
|
152
101
|
updatedAt: Date;
|
|
153
102
|
}
|
|
154
103
|
/**
|
|
155
|
-
* Filter options for {@link
|
|
104
|
+
* Filter options for {@link IAssetIndex.listAssetDefs}.
|
|
156
105
|
*
|
|
157
106
|
* @docLink packages/library/concepts#asset-definition
|
|
158
107
|
*/
|
|
@@ -163,8 +112,8 @@ export interface AssetFilter {
|
|
|
163
112
|
publisher?: string;
|
|
164
113
|
/** Prefix match on the full `<publisher>/<name>` ref. */
|
|
165
114
|
prefix?: string;
|
|
166
|
-
/** Filter to assets from a specific
|
|
167
|
-
|
|
115
|
+
/** Filter to assets from a specific library. */
|
|
116
|
+
libraryId?: string;
|
|
168
117
|
/** Maximum number of results to return. */
|
|
169
118
|
limit?: number;
|
|
170
119
|
/** Number of results to skip (for pagination). */
|
|
@@ -198,12 +147,12 @@ export interface Instance {
|
|
|
198
147
|
/**
|
|
199
148
|
* Immutable upstream git commit SHA the asset bytes were installed from
|
|
200
149
|
* (pointer-only install path). Absent for instances created via
|
|
201
|
-
* {@link
|
|
150
|
+
* {@link IAssetIndex.createInstance} or preset apply.
|
|
202
151
|
*/
|
|
203
152
|
sourceCommitSha?: string;
|
|
204
153
|
}
|
|
205
154
|
/**
|
|
206
|
-
* Input shape for {@link
|
|
155
|
+
* Input shape for {@link IAssetIndex.createInstance}.
|
|
207
156
|
*
|
|
208
157
|
* @docLink packages/library/concepts#instance
|
|
209
158
|
*/
|
|
@@ -220,7 +169,7 @@ export interface CreateInstanceInput {
|
|
|
220
169
|
createdBy?: string;
|
|
221
170
|
}
|
|
222
171
|
/**
|
|
223
|
-
* Partial update shape for {@link
|
|
172
|
+
* Partial update shape for {@link IAssetIndex.updateInstance}.
|
|
224
173
|
*
|
|
225
174
|
* @docLink packages/library/concepts#instance
|
|
226
175
|
*/
|
|
@@ -233,7 +182,7 @@ export interface UpdateInstanceInput {
|
|
|
233
182
|
defPin?: PinPolicy;
|
|
234
183
|
}
|
|
235
184
|
/**
|
|
236
|
-
* Filter options for {@link
|
|
185
|
+
* Filter options for {@link IAssetIndex.listInstances}.
|
|
237
186
|
*
|
|
238
187
|
* @docLink packages/library/concepts#instance
|
|
239
188
|
*/
|
|
@@ -280,8 +229,8 @@ export declare class LibraryError extends Error {
|
|
|
280
229
|
constructor(message: string, code: string);
|
|
281
230
|
}
|
|
282
231
|
/**
|
|
283
|
-
* Thrown
|
|
284
|
-
*
|
|
232
|
+
* Thrown when a referenced library ID does not exist (e.g. by
|
|
233
|
+
* {@link IAssetIndex.removeSource} / {@link IAssetIndex.syncSource}).
|
|
285
234
|
*
|
|
286
235
|
* @docLink packages/library/concepts#errors
|
|
287
236
|
*/
|
|
@@ -289,8 +238,8 @@ export declare class SourceNotFoundError extends LibraryError {
|
|
|
289
238
|
constructor(id: string);
|
|
290
239
|
}
|
|
291
240
|
/**
|
|
292
|
-
* Thrown by {@link
|
|
293
|
-
* and {@link
|
|
241
|
+
* Thrown by {@link IAssetIndex.getInstance}, {@link IAssetIndex.updateInstance},
|
|
242
|
+
* and {@link IAssetIndex.deleteInstance} when the given instance ID does not exist.
|
|
294
243
|
*
|
|
295
244
|
* @docLink packages/library/concepts#errors
|
|
296
245
|
*/
|
|
@@ -298,7 +247,7 @@ export declare class InstanceNotFoundError extends LibraryError {
|
|
|
298
247
|
constructor(id: string);
|
|
299
248
|
}
|
|
300
249
|
/**
|
|
301
|
-
* Thrown by {@link
|
|
250
|
+
* Thrown by {@link IAssetIndex.unsubscribe} when the given subscription ID does not exist.
|
|
302
251
|
*
|
|
303
252
|
* @docLink packages/library/concepts#errors
|
|
304
253
|
*/
|
|
@@ -306,7 +255,7 @@ export declare class SubscriptionNotFoundError extends LibraryError {
|
|
|
306
255
|
constructor(id: string);
|
|
307
256
|
}
|
|
308
257
|
/**
|
|
309
|
-
* Thrown by {@link
|
|
258
|
+
* Thrown by {@link IAssetIndex.subscribe} when the workspace already has an active
|
|
310
259
|
* subscription to the same Instance.
|
|
311
260
|
*
|
|
312
261
|
* @docLink packages/library/concepts#errors
|
|
@@ -315,7 +264,7 @@ export declare class DuplicateSubscriptionError extends LibraryError {
|
|
|
315
264
|
constructor(workspaceId: string, instanceId: string);
|
|
316
265
|
}
|
|
317
266
|
/**
|
|
318
|
-
* Thrown by {@link
|
|
267
|
+
* Thrown by {@link IAssetIndex.deleteInstance} when the Instance has active
|
|
319
268
|
* Subscriptions and `{ cascade: true }` was not passed.
|
|
320
269
|
*
|
|
321
270
|
* @docLink packages/library/concepts#errors
|
|
@@ -345,6 +294,4 @@ export interface IAssetIndex {
|
|
|
345
294
|
listSubscriptions(workspaceId: string): Promise<Subscription[]>;
|
|
346
295
|
getConsumptionGraph(instanceId: string): Promise<Subscription[]>;
|
|
347
296
|
}
|
|
348
|
-
/** @deprecated Use `IAssetIndex`. Removed in next major. */
|
|
349
|
-
export type ILibrary = IAssetIndex;
|
|
350
297
|
//# sourceMappingURL=library.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../library/src/library.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAWH;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,kIAYpB,CAAC;AAE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AAC,EAAE,OAAO,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAExE,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAC1F,WAAW,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAChE,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;CAClE"}
|
|
@@ -19,10 +19,11 @@ export interface LibraryDbHandle {
|
|
|
19
19
|
/**
|
|
20
20
|
* Open (or create) the local library SQLite database.
|
|
21
21
|
*
|
|
22
|
-
* Async because `@libsql/client` is async-only. `
|
|
22
|
+
* Async because `@libsql/client` is async-only. `LocalIndex` opens the DB
|
|
23
23
|
* lazily on first use to keep its constructor synchronous.
|
|
24
24
|
*
|
|
25
|
-
* @param dbPath - Absolute path to the `
|
|
25
|
+
* @param dbPath - Absolute path to the `index.db` file. Pre-2026-05-27
|
|
26
|
+
* `lib.db` paths now hard-fail; see {@link assertNoLegacyLibDb}.
|
|
26
27
|
* @returns A handle carrying the Drizzle DB and a synchronous `close()`.
|
|
27
28
|
*/
|
|
28
29
|
export declare function createLibraryDb(dbPath: string): Promise<LibraryDbHandle>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../../library/src/local/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../../../library/src/local/db.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EAAW,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AA0PtC,MAAM,MAAM,SAAS,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,SAAS,CAAC;IACd,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;;GASG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CA0D9E"}
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* LibraryManager — CRUD for the `libraries` table plus driver dispatch.
|
|
3
3
|
*
|
|
4
|
-
* Wraps a
|
|
4
|
+
* Wraps a LocalIndex handle (sharing its db) and exposes the user-facing
|
|
5
5
|
* library lifecycle: add / list / get / setDefault / rename / update /
|
|
6
6
|
* remove. Also owns ensurePersonalLibrary() — the silent auto-init on first
|
|
7
7
|
* `skaile asset migrate`.
|
|
8
8
|
*
|
|
9
|
-
* @docLink packages/library/concepts#
|
|
9
|
+
* @docLink packages/library/concepts#library-manager
|
|
10
10
|
*/
|
|
11
11
|
import type { LibrarySyncDriver } from "../sync/driver.js";
|
|
12
|
-
import { type AddLibraryInput, type
|
|
13
|
-
import type {
|
|
14
|
-
export declare class
|
|
12
|
+
import { type AddLibraryInput, type Library, type LibraryBackend, type UpdateLibraryInput } from "../user-library.js";
|
|
13
|
+
import type { LocalIndex } from "./library.js";
|
|
14
|
+
export declare class LibraryManager {
|
|
15
15
|
private readonly lib;
|
|
16
16
|
private readonly localDrv;
|
|
17
17
|
private readonly gitDrv;
|
|
18
|
-
|
|
19
|
-
constructor(lib: LocalLibrary);
|
|
18
|
+
constructor(lib: LocalIndex);
|
|
20
19
|
/** Resolve the sync driver for a given backend. */
|
|
21
20
|
driverFor(backend: LibraryBackend): LibrarySyncDriver;
|
|
22
|
-
addLibrary(input: AddLibraryInput): Promise<
|
|
23
|
-
listLibraries(): Promise<
|
|
24
|
-
getLibrary(nameOrId: string): Promise<
|
|
25
|
-
requireLibrary(nameOrId: string): Promise<
|
|
26
|
-
updateLibrary(nameOrId: string, patch: UpdateLibraryInput): Promise<
|
|
27
|
-
setDefault(nameOrId: string): Promise<
|
|
21
|
+
addLibrary(input: AddLibraryInput): Promise<Library>;
|
|
22
|
+
listLibraries(): Promise<Library[]>;
|
|
23
|
+
getLibrary(nameOrId: string): Promise<Library | null>;
|
|
24
|
+
requireLibrary(nameOrId: string): Promise<Library>;
|
|
25
|
+
updateLibrary(nameOrId: string, patch: UpdateLibraryInput): Promise<Library>;
|
|
26
|
+
setDefault(nameOrId: string): Promise<Library>;
|
|
28
27
|
removeLibrary(nameOrId: string, opts?: {
|
|
29
28
|
purge?: boolean;
|
|
30
29
|
}): Promise<void>;
|
|
@@ -34,8 +33,8 @@ export declare class UserLibraryManager {
|
|
|
34
33
|
* exists. Returns the library row and a `created` flag.
|
|
35
34
|
*/
|
|
36
35
|
ensurePersonalLibrary(librariesDir: string): Promise<{
|
|
37
|
-
library:
|
|
36
|
+
library: Library;
|
|
38
37
|
created: boolean;
|
|
39
38
|
}>;
|
|
40
39
|
}
|
|
41
|
-
//# sourceMappingURL=
|
|
40
|
+
//# sourceMappingURL=library-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-manager.d.ts","sourceRoot":"","sources":["../../../../library/src/local/library-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAG3D,OAAO,EACL,KAAK,eAAe,EAGpB,KAAK,OAAO,EACZ,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AA2B/C,qBAAa,cAAc;IAIb,OAAO,CAAC,QAAQ,CAAC,GAAG;IAHhC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAyB;IAClD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAuB;gBAEjB,GAAG,EAAE,UAAU;IAE5C,mDAAmD;IACnD,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,iBAAiB;IAS/C,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC;IAkCpD,aAAa,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAMnC,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IAarD,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAMlD,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC;IAoB5E,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAY9C,aAAa,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IASpF;;;;OAIG;IACG,qBAAqB,CACzB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;CA2BnD"}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* LocalIndex — SQLite-backed IAssetIndex implementation.
|
|
3
3
|
*
|
|
4
|
-
* Storage: ~/.skaile/
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Storage: ~/.skaile/index.db by default; override with `SKAILE_INDEX_PATH`.
|
|
5
|
+
* Library checkouts live separately under `~/.skaile/libraries/<name>/` and
|
|
6
|
+
* are controlled by `SKAILE_LIBRARIES_DIR`.
|
|
7
7
|
*
|
|
8
8
|
* All four entity tables (libraries, asset_definitions, instances, subscriptions)
|
|
9
9
|
* are created on first open. See db.ts for DDL.
|
|
10
10
|
*
|
|
11
|
-
* @docLink packages/library/concepts#local-
|
|
11
|
+
* @docLink packages/library/concepts#local-index
|
|
12
12
|
*/
|
|
13
13
|
import type { IAssetKindRegistry } from "@skaile/workspaces/plugins";
|
|
14
|
-
import type {
|
|
14
|
+
import type { AssetDefinition, AssetFilter, CreateInstanceInput, IAssetIndex, Instance, InstanceFilter, PinPolicy, Subscription, SyncResult, UpdateInstanceInput } from "../library.js";
|
|
15
|
+
import type { AddLibraryInput, Library } from "../user-library.js";
|
|
15
16
|
import { type LibraryDb } from "./db.js";
|
|
16
17
|
import type { InstallManifest } from "@skaile/workspaces/types";
|
|
17
18
|
import { type AssetFetcher } from "../install/install-from-manifest.js";
|
|
18
|
-
export interface
|
|
19
|
-
/** Override the library
|
|
19
|
+
export interface LocalIndexOptions {
|
|
20
|
+
/** Override the library checkouts directory (where `library init` places dirs). */
|
|
20
21
|
libraryDir?: string;
|
|
22
|
+
/** Override the absolute path to the index SQLite file (default: ~/.skaile/index.db). */
|
|
23
|
+
indexPath?: string;
|
|
21
24
|
/** Kind registry for provider-version tracking and kind validation. */
|
|
22
25
|
kindRegistry?: IAssetKindRegistry;
|
|
23
26
|
}
|
|
@@ -25,31 +28,32 @@ export interface LocalLibraryOptions {
|
|
|
25
28
|
* SQLite-backed implementation of {@link IAssetIndex}.
|
|
26
29
|
*
|
|
27
30
|
* Backed by `@libsql/client`, so it runs on both Node and Bun. Stores data at
|
|
28
|
-
* `~/.skaile/
|
|
29
|
-
* `
|
|
30
|
-
*
|
|
31
|
+
* `~/.skaile/index.db` by default; override with `SKAILE_INDEX_PATH` (or via
|
|
32
|
+
* the constructor `indexPath` option). Library checkouts live separately at
|
|
33
|
+
* `resolveLibraryDir()` (default `~/.skaile/libraries/`).
|
|
31
34
|
*
|
|
32
35
|
* The constructor is synchronous — it only resolves the storage path. The
|
|
33
36
|
* SQLite connection is opened lazily on first use (`@libsql/client` is
|
|
34
|
-
* async-only). Always call {@link
|
|
37
|
+
* async-only). Always call {@link LocalIndex.close} in a `finally` block to
|
|
35
38
|
* release the connection.
|
|
36
39
|
*
|
|
37
|
-
* @docLink packages/library/concepts#local-
|
|
40
|
+
* @docLink packages/library/concepts#local-index
|
|
38
41
|
*/
|
|
39
|
-
export declare class
|
|
42
|
+
export declare class LocalIndex implements IAssetIndex {
|
|
40
43
|
private readonly dbPath;
|
|
41
44
|
private dbHandleRef;
|
|
42
45
|
private dbPromise;
|
|
43
46
|
private _kindRegistry;
|
|
44
|
-
/** Absolute path to the library
|
|
47
|
+
/** Absolute path to the library checkouts directory. */
|
|
45
48
|
private readonly libraryDir;
|
|
46
49
|
/**
|
|
47
|
-
* Construct a
|
|
50
|
+
* Construct a LocalIndex. Synchronous — does not open the DB.
|
|
48
51
|
*
|
|
49
|
-
* @param optionsOrDir - Either a `
|
|
50
|
-
* path (legacy signature,
|
|
52
|
+
* @param optionsOrDir - Either a `LocalIndexOptions` object or a string
|
|
53
|
+
* path (legacy signature: treated as the libraryDir, with the index file
|
|
54
|
+
* landing at `<dir>/index.db`).
|
|
51
55
|
*/
|
|
52
|
-
constructor(optionsOrDir?: string |
|
|
56
|
+
constructor(optionsOrDir?: string | LocalIndexOptions);
|
|
53
57
|
/**
|
|
54
58
|
* Lazily open the SQLite DB on first use. The `??=` dedupes concurrent
|
|
55
59
|
* first calls so the DB is opened exactly once, with no race.
|
|
@@ -59,10 +63,10 @@ export declare class LocalLibrary implements IAssetIndex {
|
|
|
59
63
|
get kinds(): IAssetKindRegistry | undefined;
|
|
60
64
|
/** Close the underlying SQLite connection. Call in tests / cleanup. */
|
|
61
65
|
close(): void;
|
|
62
|
-
/** Internal access for
|
|
66
|
+
/** Internal access for LibraryManager. Do not call from user code. */
|
|
63
67
|
dbHandle(): Promise<LibraryDb>;
|
|
64
|
-
listSources(): Promise<
|
|
65
|
-
addSource(input:
|
|
68
|
+
listSources(): Promise<Library[]>;
|
|
69
|
+
addSource(input: AddLibraryInput): Promise<Library>;
|
|
66
70
|
removeSource(id: string): Promise<void>;
|
|
67
71
|
syncSource(id: string): Promise<SyncResult>;
|
|
68
72
|
/**
|
|
@@ -89,7 +93,7 @@ export declare class LocalLibrary implements IAssetIndex {
|
|
|
89
93
|
* 2. records an {@link Instance} row carrying `sourceCommitSha` so the
|
|
90
94
|
* install is auditable and re-verifiable.
|
|
91
95
|
*
|
|
92
|
-
* Not part of the {@link
|
|
96
|
+
* Not part of the {@link IAssetIndex} interface — `LocalIndex`-only, since
|
|
93
97
|
* the platform variant resolves install bytes differently.
|
|
94
98
|
*
|
|
95
99
|
* @param manifest - The pointer-only install manifest from the Catalog.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../library/src/local/library.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../library/src/local/library.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGrE,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,mBAAmB,EACnB,WAAW,EACX,QAAQ,EACR,cAAc,EACd,SAAS,EACT,YAAY,EACZ,UAAU,EACV,mBAAmB,EACpB,MAAM,eAAe,CAAC;AAQvB,OAAO,KAAK,EACV,eAAe,EAEf,OAAO,EAER,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAmB,KAAK,SAAS,EAAwB,MAAM,SAAS,CAAC;AAEhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,C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E,CAAC;CAUvE"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Walks subscribed local repos via `discoverAssetsInTree`, computes SHA256
|
|
5
5
|
* over the deterministic file filter, and caches AssetDefinition rows in
|
|
6
|
-
* the
|
|
6
|
+
* the LocalIndex SQLite.
|
|
7
7
|
*
|
|
8
8
|
* Used by the CLI for local-only workflows. The platform uses the remote
|
|
9
9
|
* catalog source (Phase 2).
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @docLink packages/library/concepts#local-catalog-source
|
|
12
12
|
*/
|
|
13
13
|
import type { CatalogAsset, CatalogAssetFilter, CatalogSourceInfo, IAssetKindRegistry, ICatalogSource } from "@skaile/workspaces/plugins";
|
|
14
|
-
import type {
|
|
14
|
+
import type { LocalIndex } from "./library.js";
|
|
15
15
|
/**
|
|
16
16
|
* Optional constructor opts for {@link LocalCatalogSource}.
|
|
17
17
|
*
|
|
@@ -32,7 +32,7 @@ export interface LocalCatalogSourceOptions {
|
|
|
32
32
|
* Local-filesystem implementation of `ICatalogSource` (from `@skaile/plugins`).
|
|
33
33
|
*
|
|
34
34
|
* Backed by `discoverAssetsInTree` from `@skaile/discovery`. Upserts discovered
|
|
35
|
-
* assets into the `
|
|
35
|
+
* assets into the `LocalIndex` cache via `upsertAssetDef()`. Preset-kind assets
|
|
36
36
|
* are skipped (handled by the Preset subsystem, not stored as AssetDefinitions).
|
|
37
37
|
*
|
|
38
38
|
* @docLink packages/library/concepts#local-catalog-source
|
|
@@ -44,7 +44,7 @@ export declare class LocalCatalogSource implements ICatalogSource {
|
|
|
44
44
|
private readonly registry?;
|
|
45
45
|
readonly id: string;
|
|
46
46
|
private readonly sidecarPath?;
|
|
47
|
-
constructor(library:
|
|
47
|
+
constructor(library: LocalIndex, sourceId: string, rootPath: string, registry?: IAssetKindRegistry | undefined, options?: LocalCatalogSourceOptions);
|
|
48
48
|
resolve(ref: string): Promise<CatalogAsset | null>;
|
|
49
49
|
listAssets(filter?: CatalogAssetFilter): Promise<CatalogAsset[]>;
|
|
50
50
|
fetchTarball(_ref: string, _sha256: string): Promise<Uint8Array>;
|
|
@@ -53,7 +53,7 @@ export declare class LocalCatalogSource implements ICatalogSource {
|
|
|
53
53
|
* Sync: discover assets in the source directory and cache them in the library.
|
|
54
54
|
*
|
|
55
55
|
* Runs the discovery pipeline (glob -> parse -> filter -> hash -> requires)
|
|
56
|
-
* and upserts each discovered asset into the
|
|
56
|
+
* and upserts each discovered asset into the LocalIndex cache.
|
|
57
57
|
*
|
|
58
58
|
* @returns Discovery statistics and any errors encountered.
|
|
59
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-catalog-source.d.ts","sourceRoot":"","sources":["../../../../library/src/local/local-catalog-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"local-catalog-source.d.ts","sourceRoot":"","sources":["../../../../library/src/local/local-catalog-source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAUH,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACf,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAM/C;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD;;;;;;;;GAQG;AACH,qBAAa,kBAAmB,YAAW,cAAc;IAKrD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAP5B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAS;gBAGnB,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,kBAAkB,YAAA,EAC9C,OAAO,CAAC,EAAE,yBAAyB;IAM/B,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,GAAG,IAAI,CAAC;IAMlD,UAAU,CAAC,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAUhE,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAMhE,WAAW,IAAI,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAIjD;;;;;;;OAOG;IACG,IAAI,IAAI,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;CAuDxF"}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
* (`.skaile-source.yaml`), a provenance README, and a lock file.
|
|
7
7
|
*
|
|
8
8
|
* Path resolution honors the `SKAILE_HOME` env var (defaults to `~/.skaile`)
|
|
9
|
-
* mirroring the style used by `
|
|
10
|
-
* the library
|
|
11
|
-
* for test isolation: a single env var moves the sidecar root, the
|
|
9
|
+
* mirroring the style used by `SKAILE_LIBRARIES_DIR` (which already overrides
|
|
10
|
+
* the library checkouts dir). Setting `SKAILE_HOME` is the recommended hook
|
|
11
|
+
* for test isolation: a single env var moves the sidecar root, the libraries
|
|
12
12
|
* dir (when not separately overridden), and the catalog cache together.
|
|
13
13
|
*
|
|
14
14
|
* @docLink packages/library/concepts#sidecar-paths
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Store paths — manifest-only catalog living at `~/.skaile/store/`.
|
|
3
|
+
*
|
|
4
|
+
* The store is symmetric to a remote catalog (skaile.store) but lives on the
|
|
5
|
+
* user's machine. It holds *manifests* (pointer triples) only — never bytes.
|
|
6
|
+
* Bytes live under `~/.skaile/sources/` (third-party clones) or
|
|
7
|
+
* `~/.skaile/libraries/<name>/` (user authoring).
|
|
8
|
+
*
|
|
9
|
+
* Layout:
|
|
10
|
+
* ```
|
|
11
|
+
* ~/.skaile/store/
|
|
12
|
+
* ├── config.yaml mode: auto|local|remote, ttl, …
|
|
13
|
+
* ├── favourites.yaml user pins
|
|
14
|
+
* ├── manifests/ catalog entries (one yaml per ref)
|
|
15
|
+
* ├── remote-cache/ TTL cache of remote-store responses (.gitignore'd)
|
|
16
|
+
* └── .git/ store is a git repo (push to team remote)
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @docLink packages/library/concepts#store-paths
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Resolve the absolute path to the local store root (`~/.skaile/store/`).
|
|
23
|
+
*
|
|
24
|
+
* Honors `SKAILE_HOME` (test isolation hook), mirroring {@link getSidecarRoot}.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getStoreRoot(): string;
|
|
27
|
+
/** Manifests subdir: `<store>/manifests/`. */
|
|
28
|
+
export declare function getStoreManifestsDir(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Move every `~/.skaile/sources/<slug>/.skaile-source.yaml` into
|
|
31
|
+
* `~/.skaile/store/manifests/<slug>.yaml`, initialise the store as a git
|
|
32
|
+
* repo, and write a marker so the migration is a no-op on subsequent runs.
|
|
33
|
+
*
|
|
34
|
+
* Idempotent. Cheap to call (single `existsSync` for the marker on the hot
|
|
35
|
+
* path). Errors are swallowed and logged to stderr — a partial migration
|
|
36
|
+
* leaves the marker absent so the next run retries.
|
|
37
|
+
*/
|
|
38
|
+
export declare function migrateSidecarsToStoreIfNeeded(): {
|
|
39
|
+
migrated: number;
|
|
40
|
+
storeRoot: string;
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=store-paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store-paths.d.ts","sourceRoot":"","sources":["../../../../library/src/local/store-paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAYH;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,8CAA8C;AAC9C,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAWD;;;;;;;;GAQG;AACH,wBAAgB,8BAA8B,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAsDxF"}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
import type { PresetManifest } from "@skaile/workspaces/types/manifests";
|
|
26
26
|
import type { SecretsRouter } from "@skaile/workspaces/secrets";
|
|
27
|
-
import type {
|
|
27
|
+
import type { IAssetIndex, Instance, Subscription, PinPolicy } from "../library.js";
|
|
28
28
|
/**
|
|
29
29
|
* Options for {@link applyPreset}.
|
|
30
30
|
*
|
|
@@ -32,7 +32,7 @@ import type { ILibrary, Instance, Subscription, PinPolicy } from "../library.js"
|
|
|
32
32
|
*/
|
|
33
33
|
export interface ApplyOpts {
|
|
34
34
|
/** The library for instance creation and subscription. */
|
|
35
|
-
library:
|
|
35
|
+
library: IAssetIndex;
|
|
36
36
|
/** Workspace ID for subscription creation. */
|
|
37
37
|
workspaceId: string;
|
|
38
38
|
/** Pin policy for created instances (default: "minor-track"). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply.d.ts","sourceRoot":"","sources":["../../../../library/src/preset/apply.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,oCAAoC,CAAC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E,QAAQ,EAAE,CAAC;IACtB,2CAA2C;IAC3C,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,sCAAsC;IACtC,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,WAAW,CAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,WAAW,CAAC,CAqCtB;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,mBAAmB,CACvC,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,IAAI,EAAE,SAAS,GACd,OAAO,CAAC,WAAW,CAAC,CAUtB"}
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
* - Default value handling
|
|
9
9
|
* - Coercion from string input (CLI prompting returns strings)
|
|
10
10
|
*
|
|
11
|
-
* The `instance-picker` type queries the
|
|
11
|
+
* The `instance-picker` type queries the LocalIndex for available instances
|
|
12
12
|
* matching a filter (kind, defRef prefix).
|
|
13
13
|
*
|
|
14
14
|
* @docLink packages/library/concepts#placeholder-system
|
|
15
15
|
*/
|
|
16
16
|
import type { Placeholder } from "@skaile/workspaces/types/manifests";
|
|
17
|
-
import type {
|
|
17
|
+
import type { IAssetIndex } from "../library.js";
|
|
18
18
|
/**
|
|
19
19
|
* Result of validating a single placeholder value.
|
|
20
20
|
*
|
|
@@ -82,7 +82,7 @@ export declare function validateAllPlaceholders(placeholders: Placeholder[], inp
|
|
|
82
82
|
* @returns Available instance choices for display in a CLI prompt.
|
|
83
83
|
* @docLink packages/library/concepts#placeholder-system
|
|
84
84
|
*/
|
|
85
|
-
export declare function queryInstancePickerChoices(library:
|
|
85
|
+
export declare function queryInstancePickerChoices(library: IAssetIndex, options?: InstancePickerOptions): Promise<InstancePickerChoice[]>;
|
|
86
86
|
/**
|
|
87
87
|
* Get the effective default value for a placeholder.
|
|
88
88
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"placeholders.d.ts","sourceRoot":"","sources":["../../../../library/src/preset/placeholders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"placeholders.d.ts","sourceRoot":"","sources":["../../../../library/src/preset/placeholders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,eAAe,CAAC;AAMjE;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,2CAA2C;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,oDAAoD;IACpD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,WAAW,oBAAoB;IACnC,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;CACf;AAMD;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CACjC,WAAW,EAAE,WAAW,EACxB,KAAK,EAAE,OAAO,GACb,2BAA2B,CAkC7B;AAED;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAAE,WAAW,EAAE,EAC3B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9B;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAcvE;AAED;;;;;;;GAOG;AACH,wBAAsB,0BAA0B,CAC9C,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,OAAO,CAAC,oBAAoB,EAAE,CAAC,CAajC;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAEjE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAErE"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* @docLink packages/library/concepts#preset-item-resolution
|
|
11
11
|
*/
|
|
12
12
|
import type { PresetItem } from "@skaile/workspaces/types/manifests";
|
|
13
|
-
import type { Instance, AssetDefinition,
|
|
13
|
+
import type { Instance, AssetDefinition, IAssetIndex } from "../library.js";
|
|
14
14
|
/**
|
|
15
15
|
* Classification of a preset item's ref string.
|
|
16
16
|
*
|
|
@@ -105,7 +105,7 @@ export declare function extractLibraryInstanceId(ref: string): string | null;
|
|
|
105
105
|
* @returns A typed {@link ResolvedItem} discriminated by kind.
|
|
106
106
|
* @docLink packages/library/concepts#preset-item-resolution
|
|
107
107
|
*/
|
|
108
|
-
export declare function resolveItem(item: PresetItem, library:
|
|
108
|
+
export declare function resolveItem(item: PresetItem, library: IAssetIndex, knownPresetRefs?: Set<string>): Promise<ResolvedItem>;
|
|
109
109
|
/**
|
|
110
110
|
* Resolve all items in a preset in parallel.
|
|
111
111
|
*
|
|
@@ -115,5 +115,5 @@ export declare function resolveItem(item: PresetItem, library: ILibrary, knownPr
|
|
|
115
115
|
* @returns Array of resolved items in the same order as the input.
|
|
116
116
|
* @docLink packages/library/concepts#preset-item-resolution
|
|
117
117
|
*/
|
|
118
|
-
export declare function resolveAllItems(items: PresetItem[], library:
|
|
118
|
+
export declare function resolveAllItems(items: PresetItem[], library: IAssetIndex, knownPresetRefs?: Set<string>): Promise<ResolvedItem[]>;
|
|
119
119
|
//# sourceMappingURL=resolve-item.d.ts.map
|