@forgeax/engine-pack 0.1.21 → 0.1.24
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/README.md +167 -48
- package/dist/__tests__/inventory-schema.test.d.ts +2 -0
- package/dist/__tests__/inventory-schema.test.d.ts.map +1 -0
- package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts +2 -0
- package/dist/__tests__/material-cook-receipt-layer-plan.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-authoring-gateway.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-authoring.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-authoring.unit.test.d.ts.map +1 -0
- package/dist/__tests__/pack-scanner.unit.test.d.ts +2 -0
- package/dist/__tests__/pack-scanner.unit.test.d.ts.map +1 -0
- package/dist/__tests__/scanner-blacklist.test.d.ts +2 -0
- package/dist/__tests__/scanner-blacklist.test.d.ts.map +1 -0
- package/dist/build.d.ts +9 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/build.mjs +3449 -897
- package/dist/build.mjs.map +1 -1
- package/dist/builtin.mjs +37 -4
- package/dist/builtin.mjs.map +1 -1
- package/dist/catalog-builder.d.ts.map +1 -1
- package/dist/cli-asset.d.ts.map +1 -1
- package/dist/cli-asset.mjs +1361 -845
- package/dist/cli-asset.mjs.map +1 -1
- package/dist/deriveAssetName.d.ts +11 -7
- package/dist/deriveAssetName.d.ts.map +1 -1
- package/dist/evidence/material-cook.d.ts +11 -0
- package/dist/evidence/material-cook.d.ts.map +1 -1
- package/dist/evidence/source-inventory.d.ts.map +1 -1
- package/dist/guid.d.ts +15 -0
- package/dist/guid.d.ts.map +1 -1
- package/dist/guid.mjs +53 -5
- package/dist/guid.mjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1297 -562
- package/dist/index.mjs.map +1 -1
- package/dist/inventory/binding.d.ts +6 -0
- package/dist/inventory/binding.d.ts.map +1 -0
- package/dist/inventory/declaration.d.ts +24 -0
- package/dist/inventory/declaration.d.ts.map +1 -0
- package/dist/inventory/index.d.ts +3 -0
- package/dist/inventory/index.d.ts.map +1 -0
- package/dist/inventory/sync.d.ts +5 -0
- package/dist/inventory/sync.d.ts.map +1 -0
- package/dist/material-cook.d.ts +1 -1
- package/dist/material-cook.d.ts.map +1 -1
- package/dist/material-cook.mjs +50 -3
- package/dist/material-cook.mjs.map +1 -1
- package/dist/name.mjs +4 -7
- package/dist/name.mjs.map +1 -1
- package/dist/pack-authoring-node.d.ts +26 -0
- package/dist/pack-authoring-node.d.ts.map +1 -0
- package/dist/pack-authoring-node.mjs +11089 -0
- package/dist/pack-authoring-node.mjs.map +1 -0
- package/dist/pack-authoring.d.ts +230 -0
- package/dist/pack-authoring.d.ts.map +1 -0
- package/dist/pack-authoring.mjs +1137 -0
- package/dist/pack-authoring.mjs.map +1 -0
- package/dist/package-finalizer.d.ts +2 -20
- package/dist/package-finalizer.d.ts.map +1 -1
- package/dist/resolve-asset-source.d.ts +1 -3
- package/dist/resolve-asset-source.d.ts.map +1 -1
- package/dist/resolve-asset-source.mjs +6 -81
- package/dist/resolve-asset-source.mjs.map +1 -1
- package/dist/runtime.mjs +77 -7
- package/dist/runtime.mjs.map +1 -1
- package/dist/scanner.d.ts +18 -7
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.mjs +1164 -687
- package/dist/scanner.mjs.map +1 -1
- package/dist/schema-compiled.d.ts.map +1 -1
- package/dist/schema.mjs +79 -7
- package/dist/schema.mjs.map +1 -1
- package/dist/scriptable-pack-node.d.ts +7 -31
- package/dist/scriptable-pack-node.d.ts.map +1 -1
- package/dist/scriptable-pack-node.mjs +572 -1019
- package/dist/scriptable-pack-node.mjs.map +1 -1
- package/dist/scriptable-pack-worker.mjs +29 -11
- package/dist/scriptable-pack-worker.mjs.map +1 -1
- package/dist/scriptable-pack.d.ts +20 -532
- package/dist/scriptable-pack.d.ts.map +1 -1
- package/dist/scriptable-pack.mjs +1038 -527
- package/dist/scriptable-pack.mjs.map +1 -1
- package/package.json +2 -7
- package/schema/meta.schema.json +1 -1
- package/schema/pack.schema.json +76 -6
- package/src/__tests__/guid-collision.unit.test.ts +18 -9
- package/src/__tests__/inventory-schema.test.ts +109 -0
- package/src/__tests__/material-cook-receipt-layer-plan.unit.test.ts +16 -0
- package/src/__tests__/material-cook-schema.unit.test.ts +62 -0
- package/src/__tests__/pack-authoring-gateway.unit.test.ts +249 -0
- package/src/__tests__/pack-authoring.unit.test.ts +266 -0
- package/src/__tests__/pack-scanner.unit.test.ts +123 -0
- package/src/__tests__/pack.unit.test.ts +1 -238
- package/src/__tests__/package-finalizer.contract.test.ts +55 -0
- package/src/__tests__/resolve-asset-source.test.ts +15 -98
- package/src/__tests__/scanner-blacklist.test.ts +55 -0
- package/src/__tests__/scanner-inventory.contract.test.ts +11 -14
- package/src/__tests__/scanner-inventory.test.ts +23 -10
- package/src/__tests__/scriptable-pack-cli.integration.test.ts +4 -9
- package/src/__tests__/topology.unit.test.ts +23 -0
- package/src/build.ts +28 -18
- package/src/catalog-builder.ts +60 -33
- package/src/cli-asset.ts +68 -83
- package/src/deriveAssetName.ts +14 -13
- package/src/evidence/material-cook.ts +79 -3
- package/src/evidence/source-inventory.ts +34 -21
- package/src/guid.ts +65 -4
- package/src/index.ts +15 -11
- package/src/inventory/binding.ts +25 -0
- package/src/inventory/declaration.ts +168 -0
- package/src/inventory/index.ts +18 -0
- package/src/inventory/sync.ts +22 -0
- package/src/material-cook.ts +1 -0
- package/src/pack-authoring-node.ts +1966 -0
- package/src/pack-authoring.ts +1478 -0
- package/src/package-finalizer.ts +2 -42
- package/src/resolve-asset-source.ts +4 -76
- package/src/scanner.ts +236 -56
- package/src/schema/material-cook.schema.json +4 -1
- package/src/schema-compiled.ts +2 -0
- package/src/scriptable-pack-node.ts +108 -719
- package/src/scriptable-pack-worker.ts +48 -16
- package/src/scriptable-pack.ts +28 -939
- package/dist/.tsbuildinfo +0 -1
- package/dist/__tests__/load-asset-config.test.d.ts +0 -2
- package/dist/__tests__/load-asset-config.test.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack.test-d.d.ts +0 -2
- package/dist/__tests__/scriptable-pack.test-d.d.ts.map +0 -1
- package/dist/__tests__/scriptable-pack.unit.test.d.ts +0 -2
- package/dist/__tests__/scriptable-pack.unit.test.d.ts.map +0 -1
- package/dist/config.d.ts +0 -6
- package/dist/config.d.ts.map +0 -1
- package/dist/config.mjs +0 -29
- package/dist/config.mjs.map +0 -1
- package/src/__tests__/load-asset-config.test.ts +0 -121
- package/src/__tests__/scriptable-pack.test-d.ts +0 -131
- package/src/__tests__/scriptable-pack.unit.test.ts +0 -789
- package/src/config.ts +0 -36
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Pure function -- zero IO, zero side effects, browser-safe. Build-time
|
|
5
5
|
* (build-catalog) and runtime (resolveName) share this single source of truth
|
|
6
|
-
* for
|
|
6
|
+
* for deterministic asset display-name resolution.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
8
|
+
* Resolution contract:
|
|
9
|
+
* - an explicit storedName is authoritative;
|
|
10
|
+
* - a package path is the fallback when no storedName is present;
|
|
11
|
+
* - an asset without a package and without a storedName resolves to ''.
|
|
12
|
+
*
|
|
13
|
+
* `assetCount` remains in the signature because callers derive it from their
|
|
14
|
+
* package model, but it must not erase an explicitly authored name. In
|
|
15
|
+
* particular, a single authored entry in `Materials.pack.json` resolves to its
|
|
16
|
+
* entry name rather than temporarily appearing as the package basename.
|
|
13
17
|
*/
|
|
14
|
-
export declare function deriveAssetName(packagePath: string | null,
|
|
18
|
+
export declare function deriveAssetName(packagePath: string | null, _assetCount: number, storedName?: string): string;
|
|
15
19
|
//# sourceMappingURL=deriveAssetName.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deriveAssetName.d.ts","sourceRoot":"","sources":["../src/deriveAssetName.ts"],"names":[],"mappings":"AAaA
|
|
1
|
+
{"version":3,"file":"deriveAssetName.d.ts","sourceRoot":"","sources":["../src/deriveAssetName.ts"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,eAAe,CAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,EAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAQR"}
|
|
@@ -41,6 +41,8 @@ export interface MaterialCookReceipt {
|
|
|
41
41
|
readonly identity: MaterialCookIdentity;
|
|
42
42
|
readonly derivedInterface: {
|
|
43
43
|
readonly layoutIdentity: string;
|
|
44
|
+
/** Build-time Standard physical lowering identity, when the root is Standard. */
|
|
45
|
+
readonly layerPlanIdentity?: string;
|
|
44
46
|
};
|
|
45
47
|
}
|
|
46
48
|
export interface MaterialParameterContract {
|
|
@@ -81,6 +83,15 @@ export interface MaterialCookIdentityExpectation {
|
|
|
81
83
|
readonly artifactDigest?: string;
|
|
82
84
|
readonly inputDigest?: string;
|
|
83
85
|
}
|
|
86
|
+
/** Shared ownership predicate for the built-in Standard material root. */
|
|
87
|
+
export declare function isStandardRootModule(module: string): boolean;
|
|
88
|
+
export declare function isStandardMaterialRecord(record: Pick<CookedMaterialRecord, 'resolved'>): boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Recompute the Standard layer identity from the admitted resolved root.
|
|
91
|
+
* Material admission and runtime loading share this owner so a stale receipt
|
|
92
|
+
* cannot select a different physical layer plan after cooking.
|
|
93
|
+
*/
|
|
94
|
+
export declare function materialLayerPlanIdentity(record: Pick<CookedMaterialRecord, 'resolved'>): string | undefined;
|
|
84
95
|
export declare function collectMaterialCookRefs(material: Partial<MaterialAsset>): MaterialCookRefs;
|
|
85
96
|
export declare function createMaterialArtifactDigest(bytes: Uint8Array): string;
|
|
86
97
|
export declare function createMaterialCookIdentity(input: MaterialCookIdentityInput): MaterialCookIdentity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"material-cook.d.ts","sourceRoot":"","sources":["../../src/evidence/material-cook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,YAAY,EAGZ,aAAa,EACb,MAAM,EACP,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,KAAK,EAAE,UAAU,CAAC;CAC5B;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,sBAAsB,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;IACrC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,2BAA2B,EAAE,MAAM,CAA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AAmB,GAAG,MAAM,CAEjF;AA2DD,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,+BAAoC,GAC7C,MAAM,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAkEtD;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,OAAO,GACb,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,CAmGvD;AAED,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,oBAAoB,GAC3B,IAAI,CAAC,oBAAoB,EAAE,MAAM,GAAG,UAAU,CAAC,CAQjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-inventory.d.ts","sourceRoot":"","sources":["../../src/evidence/source-inventory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"source-inventory.d.ts","sourceRoot":"","sources":["../../src/evidence/source-inventory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAIvE,gFAAgF;AAChF,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACtB;AAcD,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAa5F;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,6BAA6B,GAAG,MAAM,CAcnF;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,6BAA6B,GACnC,2BAA2B,CAM7B;AA0DD,qFAAqF;AACrF,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,yBAAyB,GAAG,SAAS,CAAC,CA6DhD"}
|
package/dist/guid.d.ts
CHANGED
|
@@ -7,6 +7,10 @@ import { PackError } from './errors.js';
|
|
|
7
7
|
export type AssetGuid = Uint8Array & {
|
|
8
8
|
readonly __guidBrand: 'AssetGuid';
|
|
9
9
|
};
|
|
10
|
+
/** Pack-level identity. It is intentionally not assignable to AssetGuid. */
|
|
11
|
+
export type PackageId = Uint8Array & {
|
|
12
|
+
readonly __packageIdBrand: 'PackageId';
|
|
13
|
+
};
|
|
10
14
|
/** Minimal Result alias for this module (structurally compatible with ScanResult). */
|
|
11
15
|
export type GuidResult<T, E> = {
|
|
12
16
|
readonly ok: true;
|
|
@@ -15,7 +19,16 @@ export type GuidResult<T, E> = {
|
|
|
15
19
|
readonly ok: false;
|
|
16
20
|
readonly error: E;
|
|
17
21
|
};
|
|
22
|
+
/** Stable author-owned output identity. Paths and payloads are not identity inputs. */
|
|
23
|
+
export declare const PACK_SOURCE_KEY_RE: RegExp;
|
|
24
|
+
export declare function isValidPackSourceKey(value: unknown): value is string;
|
|
18
25
|
export declare function isValidAssetGuidString(value: unknown): value is string;
|
|
26
|
+
/** Utilities for the pack-level UUID identity. */
|
|
27
|
+
export declare const PackageId: {
|
|
28
|
+
readonly parse: (dashForm: string) => GuidResult<PackageId, PackError>;
|
|
29
|
+
readonly format: (value: PackageId) => string;
|
|
30
|
+
readonly random: () => PackageId;
|
|
31
|
+
};
|
|
19
32
|
/**
|
|
20
33
|
* Utilities for the AssetGuid branded 16-byte UUID type.
|
|
21
34
|
* Declare the type via `import type { AssetGuid } from '@forgeax/engine-pack/guid'`
|
|
@@ -41,5 +54,7 @@ export declare const AssetGuid: {
|
|
|
41
54
|
* Works in both Node.js and browser environments.
|
|
42
55
|
*/
|
|
43
56
|
readonly random: () => AssetGuid;
|
|
57
|
+
/** Derive the stable UUIDv5 projection for one Pack subject and sourceKey. */
|
|
58
|
+
readonly derive: (namespace: PackageId, sourceKey: string) => AssetGuid;
|
|
44
59
|
};
|
|
45
60
|
//# sourceMappingURL=guid.d.ts.map
|
package/dist/guid.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guid.d.ts","sourceRoot":"","sources":["../src/guid.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guid.d.ts","sourceRoot":"","sources":["../src/guid.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAA;CAAE,CAAC;AAE3E,4EAA4E;AAC5E,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG;IAAE,QAAQ,CAAC,gBAAgB,EAAE,WAAW,CAAA;CAAE,CAAC;AAEhF,sFAAsF;AACtF,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IACvB;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACxC;IAAE,QAAQ,CAAC,EAAE,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAgB9C,uFAAuF;AACvF,eAAO,MAAM,kBAAkB,QAAoD,CAAC;AAEpF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEpE;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAEtE;AAsBD,kDAAkD;AAClD,eAAO,MAAM,SAAS;+BACJ,MAAM,KAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC;6BAI3C,SAAS,KAAG,MAAM;2BAGtB,SAAS;CAGX,CAAC;AAyBX;;;;GAIG;AACH,eAAO,MAAM,SAAS;IACpB;;;;OAIG;+BACa,MAAM,KAAG,UAAU,CAAC,SAAS,EAAE,SAAS,CAAC;IAkBzD;;OAEG;4BACU,SAAS,KAAG,MAAM;IAI/B;;OAEG;yBACO,SAAS,KAAK,SAAS,KAAG,OAAO;IAO3C;;;OAGG;2BACO,SAAS;IAInB,8EAA8E;iCAC5D,SAAS,aAAa,MAAM,KAAG,SAAS;CAGlD,CAAC"}
|
package/dist/guid.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { sha1 } from '@noble/hashes/legacy.js';
|
|
1
2
|
import { uuidv7obj } from 'uuidv7';
|
|
2
3
|
|
|
3
4
|
// src/guid.ts
|
|
@@ -28,6 +29,10 @@ function bytesToDashForm(bytes) {
|
|
|
28
29
|
return `${h[bytes[0]]}${h[bytes[1]]}${h[bytes[2]]}${h[bytes[3]]}-${h[bytes[4]]}${h[bytes[5]]}-${h[bytes[6]]}${h[bytes[7]]}-${h[bytes[8]]}${h[bytes[9]]}-${h[bytes[10]]}${h[bytes[11]]}${h[bytes[12]]}${h[bytes[13]]}${h[bytes[14]]}${h[bytes[15]]}`;
|
|
29
30
|
}
|
|
30
31
|
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
32
|
+
var PACK_SOURCE_KEY_RE = /^[a-z0-9][a-z0-9._-]*(\/[a-z0-9][a-z0-9._-]*)*$/;
|
|
33
|
+
function isValidPackSourceKey(value) {
|
|
34
|
+
return typeof value === "string" && PACK_SOURCE_KEY_RE.test(value);
|
|
35
|
+
}
|
|
31
36
|
function isValidAssetGuidString(value) {
|
|
32
37
|
return typeof value === "string" && UUID_RE.test(value);
|
|
33
38
|
}
|
|
@@ -39,6 +44,48 @@ function dashFormToBytes(dashForm) {
|
|
|
39
44
|
}
|
|
40
45
|
return bytes;
|
|
41
46
|
}
|
|
47
|
+
function randomUuidBytes() {
|
|
48
|
+
const uuid = uuidv7obj();
|
|
49
|
+
const bytes = new Uint8Array(16);
|
|
50
|
+
bytes.set(uuid.bytes);
|
|
51
|
+
return bytes;
|
|
52
|
+
}
|
|
53
|
+
function packageId(value) {
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
var PackageId = {
|
|
57
|
+
parse(dashForm) {
|
|
58
|
+
const parsed = AssetGuid.parse(dashForm);
|
|
59
|
+
return parsed.ok ? { ok: true, value: packageId(parsed.value) } : parsed;
|
|
60
|
+
},
|
|
61
|
+
format(value) {
|
|
62
|
+
return bytesToDashForm(value);
|
|
63
|
+
},
|
|
64
|
+
random() {
|
|
65
|
+
return packageId(randomUuidBytes());
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
function derivedGuid(namespace, sourceKey) {
|
|
69
|
+
if (!(namespace instanceof Uint8Array) || namespace.byteLength !== 16) {
|
|
70
|
+
throw new TypeError("AssetGuid.derive requires a 16-byte PackageId");
|
|
71
|
+
}
|
|
72
|
+
if (!isValidPackSourceKey(sourceKey)) {
|
|
73
|
+
const error = new TypeError(
|
|
74
|
+
`AssetGuid.derive received invalid sourceKey ${JSON.stringify(sourceKey)}`
|
|
75
|
+
);
|
|
76
|
+
Object.defineProperty(error, "code", { value: "pack-source-key-invalid" });
|
|
77
|
+
throw error;
|
|
78
|
+
}
|
|
79
|
+
const name = new TextEncoder().encode(sourceKey);
|
|
80
|
+
const input = new Uint8Array(namespace.byteLength + name.byteLength);
|
|
81
|
+
input.set(namespace, 0);
|
|
82
|
+
input.set(name, namespace.byteLength);
|
|
83
|
+
const digest = sha1(input);
|
|
84
|
+
const result = digest.slice(0, 16);
|
|
85
|
+
result[6] = (result[6] ?? 0) & 15 | 80;
|
|
86
|
+
result[8] = (result[8] ?? 0) & 63 | 128;
|
|
87
|
+
return brand(result);
|
|
88
|
+
}
|
|
42
89
|
var AssetGuid = {
|
|
43
90
|
/**
|
|
44
91
|
* Parse a 36-char RFC 4122 dash-form UUID string into an AssetGuid.
|
|
@@ -82,13 +129,14 @@ var AssetGuid = {
|
|
|
82
129
|
* Works in both Node.js and browser environments.
|
|
83
130
|
*/
|
|
84
131
|
random() {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
132
|
+
return brand(randomUuidBytes());
|
|
133
|
+
},
|
|
134
|
+
/** Derive the stable UUIDv5 projection for one Pack subject and sourceKey. */
|
|
135
|
+
derive(namespace, sourceKey) {
|
|
136
|
+
return derivedGuid(namespace, sourceKey);
|
|
89
137
|
}
|
|
90
138
|
};
|
|
91
139
|
|
|
92
|
-
export { AssetGuid, isValidAssetGuidString };
|
|
140
|
+
export { AssetGuid, PACK_SOURCE_KEY_RE, PackageId, isValidAssetGuidString, isValidPackSourceKey };
|
|
93
141
|
//# sourceMappingURL=guid.mjs.map
|
|
94
142
|
//# sourceMappingURL=guid.mjs.map
|
package/dist/guid.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/errors.ts","../src/guid.ts"],"names":[],"mappings":";;;;;AA2BO,IAAM,SAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,EAC1B,IAAA;AAAA,EACA,QA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AAAA,UACnB,IAAA,EAAM,qBAAA;AAAA,UACN,QAAA,EAAU,iCAAA;AAAA,UACV,IAAA,EAAM,kGAAA;AAAA,UACN,MAAA,EAAQ;AAAA,YACN,GAAA,EAAK,QAAA;AAAA,YACL,MAAA,EAAQ;AAAA;AACV,SACD;AAAA,OACH;AAAA,IACF;AACA,IAAA,OAAO,EAAE,IAAI,IAAA,EAAM,KAAA,EAAO,MAAM,eAAA,CAAgB,QAAQ,CAAC,CAAA,EAAE;AAAA,EAC7D,CAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,IAAA,EAAyB;AAC9B,IAAA,OAAO,gBAAgB,IAAI,CAAA;AAAA,EAC7B,CAAA;AAAA;AAAA;AAAA;AAAA,EAKA,MAAA,CAAO,GAAc,CAAA,EAAuB;AAC1C,IAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,EAAA,EAAI,CAAA,EAAA,EAAK;AAC3B,MAAA,IAAI,EAAE,CAAC,CAAA,KAAM,CAAA,CAAE,CAAC,GAAG,OAAO,KAAA;AAAA,IAC5B;AACA,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAA,GAAoB;AAClB,IAAA,MAAM,OAAO,SAAA,EAAU;AACvB,IAAA,MAAM,KAAA,GAAQ,IAAI,UAAA,CAAW,EAAE,CAAA;AAC/B,IAAA,KAAA,CAAM,GAAA,CAAI,KAAK,KAAK,CAAA;AACpB,IAAA,OAAO,MAAM,KAAK,CAAA;AAAA,EACpB;AACF","file":"guid.mjs","sourcesContent":["// errors.ts — PackError class (feat-20260513-guid-asset-package-system w15)\n//\n// Four-field surface: .code / .expected / .hint / .detail\n// Structurally parallel to AssetError / RhiError / RemoteError\n// (charter proposition 5 consistent abstraction).\n//\n// .detail is narrowed per .code via PackErrorDetail discriminated union\n// (requirements §6.2 AC-07; plan-strategy §D-5).\n\nimport type { PackErrorCode, PackErrorDetail } from '@forgeax/engine-types';\n\n/**\n * Structured error for the engine-pack disk scanner fail-fast chain.\n *\n * AI users consume via exhaustive switch on .code — no default case needed:\n * ```ts\n * switch (err.code) {\n * case 'pack-guid-collision':\n * console.error(err.detail.paths);\n * break;\n * case 'pack-cyclic-reference':\n * console.error(err.detail.cycle);\n * break;\n * // ...all 8 cases\n * }\n * ```\n */\nexport class PackError extends Error {\n readonly code: PackErrorCode;\n readonly expected: string;\n readonly hint: string;\n readonly detail: PackErrorDetail;\n\n constructor(args: {\n code: PackErrorCode;\n expected: string;\n hint: string;\n detail: PackErrorDetail;\n }) {\n super(`[PackError ${args.code}] expected: ${args.expected}; hint: ${args.hint}`);\n this.name = 'PackError';\n this.code = args.code;\n this.expected = args.expected;\n this.hint = args.hint;\n this.detail = args.detail;\n }\n}\n","import { uuidv7obj } from 'uuidv7';\nimport { PackError } from './errors.js';\n\n/**\n * 16-byte UUID branded ABI. Prevents assignment from plain Uint8Array or string.\n * Brand field mirrors the declaration in @forgeax/engine-types for cross-package\n * structural compatibility (both use __guidBrand: 'AssetGuid').\n */\nexport type AssetGuid = Uint8Array & { readonly __guidBrand: 'AssetGuid' };\n\n/** Minimal Result alias for this module (structurally compatible with ScanResult). */\nexport type GuidResult<T, E> =\n | { readonly ok: true; readonly value: T }\n | { readonly ok: false; readonly error: E };\n\nfunction brand(bytes: Uint8Array): AssetGuid {\n return bytes as AssetGuid;\n}\n\nconst HEX_BYTE = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n\nfunction bytesToDashForm(bytes: Uint8Array): string {\n const h = HEX_BYTE;\n // biome-ignore lint/style/noNonNullAssertion: length guaranteed 16\n return `${h[bytes[0]!]}${h[bytes[1]!]}${h[bytes[2]!]}${h[bytes[3]!]}-${h[bytes[4]!]}${h[bytes[5]!]}-${h[bytes[6]!]}${h[bytes[7]!]}-${h[bytes[8]!]}${h[bytes[9]!]}-${h[bytes[10]!]}${h[bytes[11]!]}${h[bytes[12]!]}${h[bytes[13]!]}${h[bytes[14]!]}${h[bytes[15]!]}`;\n}\n\nconst UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\nexport function isValidAssetGuidString(value: unknown): value is string {\n return typeof value === 'string' && UUID_RE.test(value);\n}\n\nfunction dashFormToBytes(dashForm: string): Uint8Array {\n const hex = dashForm.replace(/-/g, '');\n const bytes = new Uint8Array(16);\n for (let i = 0; i < 16; i++) {\n bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);\n }\n return bytes;\n}\n\n/**\n * Utilities for the AssetGuid branded 16-byte UUID type.\n * Declare the type via `import type { AssetGuid } from '@forgeax/engine-pack/guid'`\n * or `import type { AssetGuid } from '@forgeax/engine-types'`.\n */\nexport const AssetGuid = {\n /**\n * Parse a 36-char RFC 4122 dash-form UUID string into an AssetGuid.\n * Returns Ok(AssetGuid) on success or Err(PackError) with code 'pack-guid-malformed' on failure.\n * Never throws for expected failures (requirements §4.2 / §14 / charter proposition 4).\n */\n parse(dashForm: string): GuidResult<AssetGuid, PackError> {\n if (!isValidAssetGuidString(dashForm)) {\n return {\n ok: false,\n error: new PackError({\n code: 'pack-guid-malformed',\n expected: '36-char RFC 4122 dash-form UUID',\n hint: 'use AssetGuid.random() or a UUIDv7 generator; all GUID fields must be 36-char RFC 4122 dash-form',\n detail: {\n raw: dashForm,\n reason: 'expected 36-char RFC 4122 dash-form UUID',\n },\n }),\n };\n }\n return { ok: true, value: brand(dashFormToBytes(dashForm)) };\n },\n\n /**\n * Format an AssetGuid as a 36-char RFC 4122 lowercase dash-form string.\n */\n format(guid: AssetGuid): string {\n return bytesToDashForm(guid);\n },\n\n /**\n * Test byte-by-byte equality between two AssetGuids.\n */\n equals(a: AssetGuid, b: AssetGuid): boolean {\n for (let i = 0; i < 16; i++) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n },\n\n /**\n * Mint a new time-ordered UUIDv7 as an AssetGuid.\n * Works in both Node.js and browser environments.\n */\n random(): AssetGuid {\n const uuid = uuidv7obj();\n const bytes = new Uint8Array(16);\n bytes.set(uuid.bytes);\n return brand(bytes);\n },\n} as const;\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts","../src/guid.ts"],"names":[],"mappings":";;;;;;AA2BO,IAAM,SAAA,GAAN,cAAwB,KAAA,CAAM;AAAA,EAC1B,IAAA;AAAA,EACA,QAAA;AAAA,EACA,IAAA;AAAA,EACA,MAAA;AAAA,EAET,YAAY,IAAA,EAKT;AACD,IAAA,KAAA,CAAM,CAAA,WAAA,EAAc,KAAK,IAAI,CAAA,YAAA,EAAe,KAAK,QAAQ,CAAA,QAAA,EAAW,IAAA,CAAK,IAAI,CAAA,CAAE,CAAA;AAC/E,IAAA,IAAA,CAAK,IAAA,GAAO,WAAA;AACZ,IAAA,IAAA,CAAK,OAAO,IAAA,CAAK,IAAA;AACjB,IAAA,IAAA,CAAK,WAAW,IAAA,CAAK,QAAA;AACrB,IAAA,IAAA,CAAK,OAAO,IAAA,CAAK,IAAA;AACjB,IAAA,IAAA,CAAK,SAAS,IAAA,CAAK,MAAA;AAAA,EACrB;AACF,CAAA;;;AC3BA,SAAS,MAAM,KAAA,EAA8B;AAC3C,EAAA,OAAO,KAAA;AACT;AAEA,IAAM,WAAW,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,KAAI,EAAG,CAAC,CAAA,EAAG,CAAA,KAAM,EAAE,QAAA,CAAS,EAAE,EAAE,QAAA,CAAS,CAAA,EAAG,GAAG,CAAC,CAAA;AAEtF,SAAS,gBAAgB,KAAA,EAA2B;AAClD,EAAA,MAAM,CAAA,GAAI,QAAA;AAEV,EAAA,OAAO,CAAA,EAAG,EAAE,KAAA,CAAM,CAAC,CAAE,CAAC,CAAA,EAAG,EAAE,KAAA,CAAM,CAAC,CAAE,CAAC,CAAA,EAAG,EAAE,KAAA,CAAM,CAAC,CAAE,CAAC,CAAA,EAAG,EAAE,KAAA,CAAM,CAAC,CAAE,CA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,IACF;AACA,IAAA,OAAO,EAAE,IAAI,IAAA,EAAM,KAAA,EAAO,MAAM,eAAA,CAAgB,QAAQ,CAAC,CAAA,EAAE;AAAA,EAC7D,CAAA;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,IAAA,EAAyB;AAC9B,IAAA,OAAO,gBAAgB,IAAI,CAAA;AAAA,EAC7B,CAAA;AAAA;AAAA;AAAA;AAAA,EAKA,MAAA,CAAO,GAAc,CAAA,EAAuB;AAC1C,IAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,EAAA,EAAI,CAAA,EAAA,EAAK;AAC3B,MAAA,IAAI,EAAE,CAAC,CAAA,KAAM,CAAA,CAAE,CAAC,GAAG,OAAO,KAAA;AAAA,IAC5B;AACA,IAAA,OAAO,IAAA;AAAA,EACT,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAA,GAAoB;AAClB,IAAA,OAAO,KAAA,CAAM,iBAAiB,CAAA;AAAA,EAChC,CAAA;AAAA;AAAA,EAGA,MAAA,CAAO,WAAsB,SAAA,EAA8B;AACzD,IAAA,OAAO,WAAA,CAAY,WAAW,SAAS,CAAA;AAAA,EACzC;AACF","file":"guid.mjs","sourcesContent":["// errors.ts — PackError class (feat-20260513-guid-asset-package-system w15)\n//\n// Four-field surface: .code / .expected / .hint / .detail\n// Structurally parallel to AssetError / RhiError / RemoteError\n// (charter proposition 5 consistent abstraction).\n//\n// .detail is narrowed per .code via PackErrorDetail discriminated union\n// (requirements §6.2 AC-07; plan-strategy §D-5).\n\nimport type { PackErrorCode, PackErrorDetail } from '@forgeax/engine-types';\n\n/**\n * Structured error for the engine-pack disk scanner fail-fast chain.\n *\n * AI users consume via exhaustive switch on .code — no default case needed:\n * ```ts\n * switch (err.code) {\n * case 'pack-guid-collision':\n * console.error(err.detail.paths);\n * break;\n * case 'pack-cyclic-reference':\n * console.error(err.detail.cycle);\n * break;\n * // ...all 8 cases\n * }\n * ```\n */\nexport class PackError extends Error {\n readonly code: PackErrorCode;\n readonly expected: string;\n readonly hint: string;\n readonly detail: PackErrorDetail;\n\n constructor(args: {\n code: PackErrorCode;\n expected: string;\n hint: string;\n detail: PackErrorDetail;\n }) {\n super(`[PackError ${args.code}] expected: ${args.expected}; hint: ${args.hint}`);\n this.name = 'PackError';\n this.code = args.code;\n this.expected = args.expected;\n this.hint = args.hint;\n this.detail = args.detail;\n }\n}\n","import { sha1 } from '@noble/hashes/legacy.js';\nimport { uuidv7obj } from 'uuidv7';\nimport { PackError } from './errors.js';\n\n/**\n * 16-byte UUID branded ABI. Prevents assignment from plain Uint8Array or string.\n * Brand field mirrors the declaration in @forgeax/engine-types for cross-package\n * structural compatibility (both use __guidBrand: 'AssetGuid').\n */\nexport type AssetGuid = Uint8Array & { readonly __guidBrand: 'AssetGuid' };\n\n/** Pack-level identity. It is intentionally not assignable to AssetGuid. */\nexport type PackageId = Uint8Array & { readonly __packageIdBrand: 'PackageId' };\n\n/** Minimal Result alias for this module (structurally compatible with ScanResult). */\nexport type GuidResult<T, E> =\n | { readonly ok: true; readonly value: T }\n | { readonly ok: false; readonly error: E };\n\nfunction brand(bytes: Uint8Array): AssetGuid {\n return bytes as AssetGuid;\n}\n\nconst HEX_BYTE = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, '0'));\n\nfunction bytesToDashForm(bytes: Uint8Array): string {\n const h = HEX_BYTE;\n // biome-ignore lint/style/noNonNullAssertion: length guaranteed 16\n return `${h[bytes[0]!]}${h[bytes[1]!]}${h[bytes[2]!]}${h[bytes[3]!]}-${h[bytes[4]!]}${h[bytes[5]!]}-${h[bytes[6]!]}${h[bytes[7]!]}-${h[bytes[8]!]}${h[bytes[9]!]}-${h[bytes[10]!]}${h[bytes[11]!]}${h[bytes[12]!]}${h[bytes[13]!]}${h[bytes[14]!]}${h[bytes[15]!]}`;\n}\n\nconst UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;\n\n/** Stable author-owned output identity. Paths and payloads are not identity inputs. */\nexport const PACK_SOURCE_KEY_RE = /^[a-z0-9][a-z0-9._-]*(\\/[a-z0-9][a-z0-9._-]*)*$/;\n\nexport function isValidPackSourceKey(value: unknown): value is string {\n return typeof value === 'string' && PACK_SOURCE_KEY_RE.test(value);\n}\n\nexport function isValidAssetGuidString(value: unknown): value is string {\n return typeof value === 'string' && UUID_RE.test(value);\n}\n\nfunction dashFormToBytes(dashForm: string): Uint8Array {\n const hex = dashForm.replace(/-/g, '');\n const bytes = new Uint8Array(16);\n for (let i = 0; i < 16; i++) {\n bytes[i] = parseInt(hex.slice(i * 2, i * 2 + 2), 16);\n }\n return bytes;\n}\n\nfunction randomUuidBytes(): Uint8Array {\n const uuid = uuidv7obj();\n const bytes = new Uint8Array(16);\n bytes.set(uuid.bytes);\n return bytes;\n}\n\nfunction packageId(value: Uint8Array): PackageId {\n return value as PackageId;\n}\n\n/** Utilities for the pack-level UUID identity. */\nexport const PackageId = {\n parse(dashForm: string): GuidResult<PackageId, PackError> {\n const parsed = AssetGuid.parse(dashForm);\n return parsed.ok ? { ok: true, value: packageId(parsed.value) } : parsed;\n },\n format(value: PackageId): string {\n return bytesToDashForm(value);\n },\n random(): PackageId {\n return packageId(randomUuidBytes());\n },\n} as const;\n\nfunction derivedGuid(namespace: PackageId, sourceKey: string): AssetGuid {\n if (!(namespace instanceof Uint8Array) || namespace.byteLength !== 16) {\n throw new TypeError('AssetGuid.derive requires a 16-byte PackageId');\n }\n if (!isValidPackSourceKey(sourceKey)) {\n const error = new TypeError(\n `AssetGuid.derive received invalid sourceKey ${JSON.stringify(sourceKey)}`,\n ) as TypeError & { readonly code?: string };\n Object.defineProperty(error, 'code', { value: 'pack-source-key-invalid' });\n throw error;\n }\n const name = new TextEncoder().encode(sourceKey);\n const input = new Uint8Array(namespace.byteLength + name.byteLength);\n input.set(namespace, 0);\n input.set(name, namespace.byteLength);\n const digest = sha1(input);\n const result = digest.slice(0, 16);\n // RFC 4122 §4.1.1 / §4.1.3: UUID version 5, RFC variant.\n result[6] = ((result[6] ?? 0) & 0x0f) | 0x50;\n result[8] = ((result[8] ?? 0) & 0x3f) | 0x80;\n return brand(result);\n}\n\n/**\n * Utilities for the AssetGuid branded 16-byte UUID type.\n * Declare the type via `import type { AssetGuid } from '@forgeax/engine-pack/guid'`\n * or `import type { AssetGuid } from '@forgeax/engine-types'`.\n */\nexport const AssetGuid = {\n /**\n * Parse a 36-char RFC 4122 dash-form UUID string into an AssetGuid.\n * Returns Ok(AssetGuid) on success or Err(PackError) with code 'pack-guid-malformed' on failure.\n * Never throws for expected failures (requirements §4.2 / §14 / charter proposition 4).\n */\n parse(dashForm: string): GuidResult<AssetGuid, PackError> {\n if (!isValidAssetGuidString(dashForm)) {\n return {\n ok: false,\n error: new PackError({\n code: 'pack-guid-malformed',\n expected: '36-char RFC 4122 dash-form UUID',\n hint: 'use AssetGuid.random() or a UUIDv7 generator; all GUID fields must be 36-char RFC 4122 dash-form',\n detail: {\n raw: dashForm,\n reason: 'expected 36-char RFC 4122 dash-form UUID',\n },\n }),\n };\n }\n return { ok: true, value: brand(dashFormToBytes(dashForm)) };\n },\n\n /**\n * Format an AssetGuid as a 36-char RFC 4122 lowercase dash-form string.\n */\n format(guid: AssetGuid): string {\n return bytesToDashForm(guid);\n },\n\n /**\n * Test byte-by-byte equality between two AssetGuids.\n */\n equals(a: AssetGuid, b: AssetGuid): boolean {\n for (let i = 0; i < 16; i++) {\n if (a[i] !== b[i]) return false;\n }\n return true;\n },\n\n /**\n * Mint a new time-ordered UUIDv7 as an AssetGuid.\n * Works in both Node.js and browser environments.\n */\n random(): AssetGuid {\n return brand(randomUuidBytes());\n },\n\n /** Derive the stable UUIDv5 projection for one Pack subject and sourceKey. */\n derive(namespace: PackageId, sourceKey: string): AssetGuid {\n return derivedGuid(namespace, sourceKey);\n },\n} as const;\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookWasmProvenance, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
1
|
+
export { type CookedMaterialRecord, collectMaterialCookRefs, createMaterialArtifactDigest, createMaterialCookIdentity, isStandardMaterialRecord, isStandardRootModule, type MaterialCookArtifact, type MaterialCookIdentity, type MaterialCookIdentityExpectation, type MaterialCookIdentityInput, type MaterialCookReceipt, type MaterialCookRecordError, type MaterialCookRefs, type MaterialCookWasmProvenance, materialLayerPlanIdentity, projectCookedMaterialRecord, serializeCookedMaterialRecord, serializeMaterialCookReceipt, validateCookedMaterialRecord, validateMaterialCookReceipt, } from './evidence/material-cook.js';
|
|
2
2
|
export { buildOfflineAssetEvidence, packageVerification } from './evidence/offline-evidence.js';
|
|
3
|
+
export { AssetGuid, isValidAssetGuidString, isValidPackSourceKey, PACK_SOURCE_KEY_RE, PackageId, } from './guid.js';
|
|
3
4
|
export { decodeMeshBinHeader, MESH_BIN_DIGEST_BYTES, MESH_BIN_HEADER_V4_BYTES, MESH_BIN_PROJECTION_VERSION, MESH_BIN_VERSION, type MeshBinContractError, type MeshBinHeaderResult, type MeshBinHeaderV4, writeMeshBinHeader, } from './mesh-bin-contract.js';
|
|
5
|
+
export * from './pack-authoring.js';
|
|
4
6
|
export { validateProducerContract, validateProducerOutputs } from './producer-contract.js';
|
|
5
|
-
export { type AssetReader, isScriptablePackAssetKind,
|
|
7
|
+
export { type AssetReader, isScriptablePackAssetKind, projectScriptablePackSceneComponents, SCRIPTABLE_PACK_ASSET_KINDS, type ScriptablePackAssetKind, type ScriptablePackReadError, type ScriptablePackSceneComponent, type ScriptablePackSceneComponentInput, type ScriptablePackSourceClosureEntry, } from './scriptable-pack.js';
|
|
6
8
|
export { calculateTopologyDiff, diffTopology } from './topology.js';
|
|
7
9
|
import { type PackV2, type PackV2Error, type Result } from '@forgeax/engine-types';
|
|
8
10
|
export type { ArtifactPathContext } from './artifact-path.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,KAAK,+BAA+B,EACpC,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,uBAAuB,EAC5B,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,EAC/B,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAChG,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,2BAA2B,EAC3B,gBAAgB,EAChB,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,eAAe,EACpB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EACL,KAAK,WAAW,EAChB,yBAAyB,EACzB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,KAAK,oBAAoB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,0BAA0B,EAC1B,wBAAwB,EACxB,oBAAoB,EACpB,KAAK,oBAAoB,EACzB,KA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