@baselane/packs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.d.ts +8 -0
- package/dist/manifest.js +10 -0
- package/package.json +7 -4
package/dist/index.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export { ingestHarness } from "./ingest.ts";
|
|
|
32
32
|
export type { IngestInput, IngestResult } from "./ingest.ts";
|
|
33
33
|
export { packFromFileset } from "./pack-from-fileset.ts";
|
|
34
34
|
export type { PackFromFilesetResult } from "./pack-from-fileset.ts";
|
|
35
|
-
export { validateManifest, buildManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, KNOWN_CAPABILITIES, type HarnessManifest, type CapabilityName, type CapabilityReceipt } from "./manifest.ts";
|
|
35
|
+
export { validateManifest, buildManifest, serializeManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, MANIFEST_SCHEMA_URL, KNOWN_CAPABILITIES, type HarnessManifest, type CapabilityName, type CapabilityReceipt } from "./manifest.ts";
|
|
36
36
|
export { materializeHarness, sha256Hex } from "./materialize-harness.ts";
|
|
37
37
|
export type { MaterializeInput, MaterializeResult } from "./materialize-harness.ts";
|
|
38
38
|
export { detectPackDrift } from "./drift-detect.ts";
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,6 @@ export { buildWikiSeed } from "./seed/wiki-seed.js";
|
|
|
16
16
|
export { buildGraphSeed } from "./seed/graph-seed.js";
|
|
17
17
|
export { ingestHarness } from "./ingest.js";
|
|
18
18
|
export { packFromFileset } from "./pack-from-fileset.js";
|
|
19
|
-
export { validateManifest, buildManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, KNOWN_CAPABILITIES } from "./manifest.js";
|
|
19
|
+
export { validateManifest, buildManifest, serializeManifest, MANIFEST_PATH, LEGACY_MANIFEST_PATH, MANIFEST_SCHEMA_URL, KNOWN_CAPABILITIES } from "./manifest.js";
|
|
20
20
|
export { materializeHarness, sha256Hex } from "./materialize-harness.js";
|
|
21
21
|
export { detectPackDrift } from "./drift-detect.js";
|
package/dist/manifest.d.ts
CHANGED
|
@@ -49,6 +49,9 @@ export interface HarnessManifest {
|
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
51
|
export declare const MANIFEST_PATH = "harness.json";
|
|
52
|
+
/** Served from the landing site (landing/harness.schema.json); documented in baselane-sh/harness.json.
|
|
53
|
+
* Written as the first key of every generated harness.json for editor validation/autocomplete. */
|
|
54
|
+
export declare const MANIFEST_SCHEMA_URL = "https://baselane.sh/harness.schema.json";
|
|
52
55
|
/** Pre-2026-07-16 repo manifest location. `readManifestWithFallback` (packages/materialize)
|
|
53
56
|
* reads from here when the root manifest is absent; `install` migrates it forward. */
|
|
54
57
|
export declare const LEGACY_MANIFEST_PATH = ".baselane/harness.json";
|
|
@@ -56,6 +59,11 @@ export declare const LEGACY_MANIFEST_PATH = ".baselane/harness.json";
|
|
|
56
59
|
* normalized object — absent registry → null, absent capabilities → {}, absent materialized
|
|
57
60
|
* lists → []. Throws with a reason on anything invalid. Never mutates `raw`. */
|
|
58
61
|
export declare function validateManifest(raw: unknown): HarnessManifest;
|
|
62
|
+
/** Canonical serialization of a generated harness.json: $schema first key (editor
|
|
63
|
+
* validation/autocomplete against the published schema), 2-space indent, trailing newline.
|
|
64
|
+
* Every writer of a harness.json file — CLI/agent (writeManifestFile) and portal install
|
|
65
|
+
* PRs — goes through this, so the $schema key can never drift per-writer. */
|
|
66
|
+
export declare function serializeManifest(manifest: HarnessManifest): string;
|
|
59
67
|
/** Builds the manifest an install writes. If a `receipt` is supplied (hashed vendored files,
|
|
60
68
|
* managed-region receipts, resolutions), it is used verbatim. Otherwise the receipt half is
|
|
61
69
|
* derived from the file paths the materializer produced — entry files become managedRegions,
|
package/dist/manifest.js
CHANGED
|
@@ -3,6 +3,9 @@ import { isEntryFile } from "./merge-region.js";
|
|
|
3
3
|
/** Capabilities a pack can declare as materialized (centrally computed, then distributed). */
|
|
4
4
|
export const KNOWN_CAPABILITIES = ["system-map", "wiki", "graph"];
|
|
5
5
|
export const MANIFEST_PATH = "harness.json";
|
|
6
|
+
/** Served from the landing site (landing/harness.schema.json); documented in baselane-sh/harness.json.
|
|
7
|
+
* Written as the first key of every generated harness.json for editor validation/autocomplete. */
|
|
8
|
+
export const MANIFEST_SCHEMA_URL = "https://baselane.sh/harness.schema.json";
|
|
6
9
|
/** Pre-2026-07-16 repo manifest location. `readManifestWithFallback` (packages/materialize)
|
|
7
10
|
* reads from here when the root manifest is absent; `install` migrates it forward. */
|
|
8
11
|
export const LEGACY_MANIFEST_PATH = ".baselane/harness.json";
|
|
@@ -182,6 +185,13 @@ export function validateManifest(raw) {
|
|
|
182
185
|
materialized: { vendored, managedRegions, derivedCommitted, resolutions, capabilities: materializedCapabilities },
|
|
183
186
|
};
|
|
184
187
|
}
|
|
188
|
+
/** Canonical serialization of a generated harness.json: $schema first key (editor
|
|
189
|
+
* validation/autocomplete against the published schema), 2-space indent, trailing newline.
|
|
190
|
+
* Every writer of a harness.json file — CLI/agent (writeManifestFile) and portal install
|
|
191
|
+
* PRs — goes through this, so the $schema key can never drift per-writer. */
|
|
192
|
+
export function serializeManifest(manifest) {
|
|
193
|
+
return JSON.stringify({ $schema: MANIFEST_SCHEMA_URL, ...manifest }, null, 2) + "\n";
|
|
194
|
+
}
|
|
185
195
|
/** Builds the manifest an install writes. If a `receipt` is supplied (hashed vendored files,
|
|
186
196
|
* managed-region receipts, resolutions), it is used verbatim. Otherwise the receipt half is
|
|
187
197
|
* derived from the file paths the materializer produced — entry files become managedRegions,
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@baselane/packs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "WorkflowPack schema, validation, and render pipeline, plus the built-in packs shipped by the baselane CLI.",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/
|
|
10
|
+
"url": "git+https://github.com/baselane-sh/baselane.git",
|
|
11
11
|
"directory": "packages/packs"
|
|
12
12
|
},
|
|
13
|
-
"homepage": "https://baselane
|
|
13
|
+
"homepage": "https://github.com/baselane-sh/baselane",
|
|
14
14
|
"files": [
|
|
15
15
|
"dist/",
|
|
16
16
|
"packs/",
|
|
@@ -22,13 +22,16 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@baselane/analyze": "0.1.
|
|
25
|
+
"@baselane/analyze": "0.1.1"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^24.0.0",
|
|
29
29
|
"typescript": "^5.9.0",
|
|
30
30
|
"vitest": "^2.0.0"
|
|
31
31
|
},
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/baselane-sh/baselane/issues"
|
|
34
|
+
},
|
|
32
35
|
"scripts": {
|
|
33
36
|
"test": "vitest run",
|
|
34
37
|
"typecheck": "tsc --noEmit",
|