@g3nomaly/core 0.3.0 → 0.3.2
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/LICENSE +95 -0
- package/dist/cli/commands/add.d.ts +37 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +99 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/conflict.d.ts +52 -0
- package/dist/cli/commands/conflict.d.ts.map +1 -0
- package/dist/cli/commands/conflict.js +88 -0
- package/dist/cli/commands/conflict.js.map +1 -0
- package/dist/cli/commands/installFromSources.d.ts +78 -0
- package/dist/cli/commands/installFromSources.d.ts.map +1 -0
- package/dist/cli/commands/installFromSources.js +187 -0
- package/dist/cli/commands/installFromSources.js.map +1 -0
- package/dist/cli/commands/ls.d.ts +26 -0
- package/dist/cli/commands/ls.d.ts.map +1 -0
- package/dist/cli/commands/ls.js +85 -0
- package/dist/cli/commands/ls.js.map +1 -0
- package/dist/cli/commands/remove.d.ts +19 -0
- package/dist/cli/commands/remove.d.ts.map +1 -0
- package/dist/cli/commands/remove.js +123 -0
- package/dist/cli/commands/remove.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +69 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +103 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/update.d.ts +17 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +110 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/dialogue.d.ts +126 -0
- package/dist/cli/dialogue.d.ts.map +1 -0
- package/dist/cli/dialogue.js +156 -0
- package/dist/cli/dialogue.js.map +1 -0
- package/dist/cli/index.d.ts +19 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +16 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/installDialogues.d.ts +23 -0
- package/dist/cli/installDialogues.d.ts.map +1 -0
- package/dist/cli/installDialogues.js +89 -0
- package/dist/cli/installDialogues.js.map +1 -0
- package/dist/cli/pick.d.ts +23 -0
- package/dist/cli/pick.d.ts.map +1 -0
- package/dist/cli/pick.js +44 -0
- package/dist/cli/pick.js.map +1 -0
- package/dist/cli/report.d.ts +58 -0
- package/dist/cli/report.d.ts.map +1 -0
- package/dist/cli/report.js +92 -0
- package/dist/cli/report.js.map +1 -0
- package/dist/cli/theme.d.ts +27 -0
- package/dist/cli/theme.d.ts.map +1 -0
- package/dist/cli/theme.js +29 -0
- package/dist/cli/theme.js.map +1 -0
- package/dist/cli/types.d.ts +96 -0
- package/dist/cli/types.d.ts.map +1 -0
- package/dist/cli/types.js +2 -0
- package/dist/cli/types.js.map +1 -0
- package/dist/config/config.d.ts +55 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +107 -0
- package/dist/config/config.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/types.d.ts +182 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +51 -0
- package/dist/config/types.js.map +1 -0
- package/dist/hash/hash.d.ts +23 -0
- package/dist/hash/hash.d.ts.map +1 -0
- package/dist/hash/hash.js +43 -0
- package/dist/hash/hash.js.map +1 -0
- package/dist/hash/index.d.ts +2 -0
- package/dist/hash/index.d.ts.map +1 -0
- package/dist/hash/index.js +3 -0
- package/dist/hash/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/classify.d.ts +33 -0
- package/dist/installer/classify.d.ts.map +1 -0
- package/dist/installer/classify.js +82 -0
- package/dist/installer/classify.js.map +1 -0
- package/dist/installer/files.d.ts +19 -0
- package/dist/installer/files.d.ts.map +1 -0
- package/dist/installer/files.js +23 -0
- package/dist/installer/files.js.map +1 -0
- package/dist/installer/index.d.ts +19 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +14 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/install.d.ts +25 -0
- package/dist/installer/install.d.ts.map +1 -0
- package/dist/installer/install.js +74 -0
- package/dist/installer/install.js.map +1 -0
- package/dist/installer/io.d.ts +9 -0
- package/dist/installer/io.d.ts.map +1 -0
- package/dist/installer/io.js +23 -0
- package/dist/installer/io.js.map +1 -0
- package/dist/installer/manifest.d.ts +69 -0
- package/dist/installer/manifest.d.ts.map +1 -0
- package/dist/installer/manifest.js +70 -0
- package/dist/installer/manifest.js.map +1 -0
- package/dist/installer/manifestSources.d.ts +32 -0
- package/dist/installer/manifestSources.d.ts.map +1 -0
- package/dist/installer/manifestSources.js +50 -0
- package/dist/installer/manifestSources.js.map +1 -0
- package/dist/installer/marketplace.d.ts +46 -0
- package/dist/installer/marketplace.d.ts.map +1 -0
- package/dist/installer/marketplace.js +72 -0
- package/dist/installer/marketplace.js.map +1 -0
- package/dist/installer/origin.d.ts +59 -0
- package/dist/installer/origin.d.ts.map +1 -0
- package/dist/installer/origin.js +29 -0
- package/dist/installer/origin.js.map +1 -0
- package/dist/installer/remove.d.ts +26 -0
- package/dist/installer/remove.d.ts.map +1 -0
- package/dist/installer/remove.js +49 -0
- package/dist/installer/remove.js.map +1 -0
- package/dist/installer/resolve.d.ts +127 -0
- package/dist/installer/resolve.d.ts.map +1 -0
- package/dist/installer/resolve.js +251 -0
- package/dist/installer/resolve.js.map +1 -0
- package/dist/installer/sourceRegistry.d.ts +96 -0
- package/dist/installer/sourceRegistry.d.ts.map +1 -0
- package/dist/installer/sourceRegistry.js +86 -0
- package/dist/installer/sourceRegistry.js.map +1 -0
- package/dist/installer/types.d.ts +133 -0
- package/dist/installer/types.d.ts.map +1 -0
- package/dist/installer/types.js +31 -0
- package/dist/installer/types.js.map +1 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +9 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/registry.handlers.d.ts +16 -0
- package/dist/registry/registry.handlers.d.ts.map +1 -0
- package/dist/registry/registry.handlers.js +13 -0
- package/dist/registry/registry.handlers.js.map +1 -0
- package/dist/registry/registry.io.d.ts +38 -0
- package/dist/registry/registry.io.d.ts.map +1 -0
- package/dist/registry/registry.io.js +101 -0
- package/dist/registry/registry.io.js.map +1 -0
- package/dist/registry/registry.mutations.d.ts +19 -0
- package/dist/registry/registry.mutations.d.ts.map +1 -0
- package/dist/registry/registry.mutations.js +29 -0
- package/dist/registry/registry.mutations.js.map +1 -0
- package/dist/registry/registry.selectors.d.ts +68 -0
- package/dist/registry/registry.selectors.d.ts.map +1 -0
- package/dist/registry/registry.selectors.js +91 -0
- package/dist/registry/registry.selectors.js.map +1 -0
- package/dist/registry/registry.store.d.ts +47 -0
- package/dist/registry/registry.store.d.ts.map +1 -0
- package/dist/registry/registry.store.js +36 -0
- package/dist/registry/registry.store.js.map +1 -0
- package/dist/registry/registry.template.d.ts +29 -0
- package/dist/registry/registry.template.d.ts.map +1 -0
- package/dist/registry/registry.template.js +70 -0
- package/dist/registry/registry.template.js.map +1 -0
- package/dist/registry/types.d.ts +47 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +35 -0
- package/dist/registry/types.js.map +1 -0
- package/dist/security/index.d.ts +2 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +3 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/securityParser.d.ts +15 -0
- package/dist/security/securityParser.d.ts.map +1 -0
- package/dist/security/securityParser.js +79 -0
- package/dist/security/securityParser.js.map +1 -0
- package/dist/security/securityWorker.d.ts +19 -0
- package/dist/security/securityWorker.d.ts.map +1 -0
- package/dist/security/securityWorker.js +137 -0
- package/dist/security/securityWorker.js.map +1 -0
- package/dist/sources/checkout.d.ts +20 -0
- package/dist/sources/checkout.d.ts.map +1 -0
- package/dist/sources/checkout.js +33 -0
- package/dist/sources/checkout.js.map +1 -0
- package/dist/sources/git.d.ts +11 -0
- package/dist/sources/git.d.ts.map +1 -0
- package/dist/sources/git.js +24 -0
- package/dist/sources/git.js.map +1 -0
- package/dist/sources/index.d.ts +5 -0
- package/dist/sources/index.d.ts.map +1 -0
- package/dist/sources/index.js +6 -0
- package/dist/sources/index.js.map +1 -0
- package/dist/sources/local.d.ts +12 -0
- package/dist/sources/local.d.ts.map +1 -0
- package/dist/sources/local.js +22 -0
- package/dist/sources/local.js.map +1 -0
- package/dist/sources/npm.d.ts +16 -0
- package/dist/sources/npm.d.ts.map +1 -0
- package/dist/sources/npm.js +162 -0
- package/dist/sources/npm.js.map +1 -0
- package/dist/sources/packageJson.d.ts +3 -0
- package/dist/sources/packageJson.d.ts.map +1 -0
- package/dist/sources/packageJson.js +13 -0
- package/dist/sources/packageJson.js.map +1 -0
- package/dist/sources/parse.d.ts +42 -0
- package/dist/sources/parse.d.ts.map +1 -0
- package/dist/sources/parse.js +114 -0
- package/dist/sources/parse.js.map +1 -0
- package/dist/sources/process.d.ts +21 -0
- package/dist/sources/process.d.ts.map +1 -0
- package/dist/sources/process.js +46 -0
- package/dist/sources/process.js.map +1 -0
- package/dist/sources/register.d.ts +31 -0
- package/dist/sources/register.d.ts.map +1 -0
- package/dist/sources/register.js +52 -0
- package/dist/sources/register.js.map +1 -0
- package/dist/sources/types.d.ts +108 -0
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +53 -0
- package/dist/sources/types.js.map +1 -0
- package/dist/utils/errors.d.ts +8 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +11 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +7 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/merge.d.ts +12 -0
- package/dist/utils/merge.d.ts.map +1 -0
- package/dist/utils/merge.js +28 -0
- package/dist/utils/merge.js.map +1 -0
- package/dist/utils/packageMeta.d.ts +26 -0
- package/dist/utils/packageMeta.d.ts.map +1 -0
- package/dist/utils/packageMeta.js +24 -0
- package/dist/utils/packageMeta.js.map +1 -0
- package/dist/utils/paths.d.ts +27 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +51 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/prompt.d.ts +8 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +13 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/version.d.ts +14 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +140 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +64 -3
- package/README.md +0 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { BaseRegistry, BaseRegistryEntry } from "./types";
|
|
2
|
+
import type { RegistryStore } from "./registry.store";
|
|
3
|
+
/**
|
|
4
|
+
* @brief Gets a single entry by key.
|
|
5
|
+
*
|
|
6
|
+
* @param registry - Store to read from.
|
|
7
|
+
* @param key - Key of the entry.
|
|
8
|
+
* @returns The entry, or `undefined` when not found.
|
|
9
|
+
*/
|
|
10
|
+
export declare function get<T extends BaseRegistryEntry>(registry: RegistryStore<T>, key: string): T | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* @brief Checks whether a key exists in the store.
|
|
13
|
+
*
|
|
14
|
+
* @param registry - Store to read from.
|
|
15
|
+
* @param key - Key to look for.
|
|
16
|
+
* @returns `true` when the key is present.
|
|
17
|
+
*/
|
|
18
|
+
export declare function has<T extends BaseRegistryEntry>(registry: RegistryStore<T>, key: string): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @brief Returns all entries as a plain record.
|
|
21
|
+
*
|
|
22
|
+
* @param registry - Store to read from.
|
|
23
|
+
* @returns Entries by key. This is the store's own state, not a copy.
|
|
24
|
+
*/
|
|
25
|
+
export declare function entries<T extends BaseRegistryEntry>(registry: RegistryStore<T>): BaseRegistry<T>;
|
|
26
|
+
/**
|
|
27
|
+
* @brief Returns all registered keys.
|
|
28
|
+
*
|
|
29
|
+
* @param registry - Store to read from.
|
|
30
|
+
* @returns Keys of the store's state.
|
|
31
|
+
*/
|
|
32
|
+
export declare function keys<T extends BaseRegistryEntry>(registry: RegistryStore<T>): string[];
|
|
33
|
+
/**
|
|
34
|
+
* @brief Returns all entries whose `version` equals the given string.
|
|
35
|
+
*
|
|
36
|
+
* @param registry - Store to read from.
|
|
37
|
+
* @param version - Version to match exactly.
|
|
38
|
+
* @returns Matching entries by key.
|
|
39
|
+
*/
|
|
40
|
+
export declare function getByVersion<T extends BaseRegistryEntry>(registry: RegistryStore<T>, version: string): BaseRegistry<T>;
|
|
41
|
+
/**
|
|
42
|
+
* @brief Returns the count of registered entries.
|
|
43
|
+
*
|
|
44
|
+
* @param registry - Store to read from.
|
|
45
|
+
* @returns Number of entries.
|
|
46
|
+
*/
|
|
47
|
+
export declare function size<T extends BaseRegistryEntry>(registry: RegistryStore<T>): number;
|
|
48
|
+
/**
|
|
49
|
+
* @brief Walks `registryDependencies` depth-first, starting at `key`.
|
|
50
|
+
*
|
|
51
|
+
* Every entry reached is added to `seen`. Keys without a registry entry are pushed to `unknown` and not walked further.
|
|
52
|
+
*
|
|
53
|
+
* @param key - Key to start from.
|
|
54
|
+
* @param entries - Registry to walk, by key.
|
|
55
|
+
* @param seen - Keys already reached. Filled in place.
|
|
56
|
+
* @param unknown - Keys with no registry entry. Filled in place.
|
|
57
|
+
*/
|
|
58
|
+
export declare function collectDependencies(key: string, entries: BaseRegistry, seen: Set<string>, unknown: string[]): void;
|
|
59
|
+
/**
|
|
60
|
+
* @brief Finds the candidates that depend on `key`, the entries that would break if it were removed.
|
|
61
|
+
*
|
|
62
|
+
* @param key - Key that may be needed.
|
|
63
|
+
* @param entries - Registry to read `registryDependencies` from, by key.
|
|
64
|
+
* @param candidates - Keys to check.
|
|
65
|
+
* @returns The candidates whose `registryDependencies` include `key`.
|
|
66
|
+
*/
|
|
67
|
+
export declare function entryDependencies(key: string, entries: BaseRegistry, candidates: string[]): string[];
|
|
68
|
+
//# sourceMappingURL=registry.selectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.selectors.d.ts","sourceRoot":"","sources":["../../src/registry/registry.selectors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAErD;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,iBAAiB,EAC7C,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,GACV,CAAC,GAAG,SAAS,CAEf;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,CAAC,SAAS,iBAAiB,EAC7C,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,GAAG,EAAE,MAAM,GACV,OAAO,CAET;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,CAAC,SAAS,iBAAiB,EACjD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GACzB,YAAY,CAAC,CAAC,CAAC,CAEjB;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,iBAAiB,EAC9C,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GACzB,MAAM,EAAE,CAEV;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,iBAAiB,EACtD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,OAAO,EAAE,MAAM,GACd,YAAY,CAAC,CAAC,CAAC,CAIjB;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,iBAAiB,EAC9C,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,GACzB,MAAM,CAER;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,EACjB,OAAO,EAAE,MAAM,EAAE,GAChB,IAAI,CASN;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,YAAY,EACrB,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,EAAE,CAEV"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @brief Gets a single entry by key.
|
|
3
|
+
*
|
|
4
|
+
* @param registry - Store to read from.
|
|
5
|
+
* @param key - Key of the entry.
|
|
6
|
+
* @returns The entry, or `undefined` when not found.
|
|
7
|
+
*/
|
|
8
|
+
export function get(registry, key) {
|
|
9
|
+
return registry.store.state[key];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @brief Checks whether a key exists in the store.
|
|
13
|
+
*
|
|
14
|
+
* @param registry - Store to read from.
|
|
15
|
+
* @param key - Key to look for.
|
|
16
|
+
* @returns `true` when the key is present.
|
|
17
|
+
*/
|
|
18
|
+
export function has(registry, key) {
|
|
19
|
+
return key in registry.store.state;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @brief Returns all entries as a plain record.
|
|
23
|
+
*
|
|
24
|
+
* @param registry - Store to read from.
|
|
25
|
+
* @returns Entries by key. This is the store's own state, not a copy.
|
|
26
|
+
*/
|
|
27
|
+
export function entries(registry) {
|
|
28
|
+
return registry.store.state;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* @brief Returns all registered keys.
|
|
32
|
+
*
|
|
33
|
+
* @param registry - Store to read from.
|
|
34
|
+
* @returns Keys of the store's state.
|
|
35
|
+
*/
|
|
36
|
+
export function keys(registry) {
|
|
37
|
+
return Object.keys(registry.store.state);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @brief Returns all entries whose `version` equals the given string.
|
|
41
|
+
*
|
|
42
|
+
* @param registry - Store to read from.
|
|
43
|
+
* @param version - Version to match exactly.
|
|
44
|
+
* @returns Matching entries by key.
|
|
45
|
+
*/
|
|
46
|
+
export function getByVersion(registry, version) {
|
|
47
|
+
return Object.fromEntries(Object.entries(registry.store.state).filter(([, entry]) => entry.version === version));
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @brief Returns the count of registered entries.
|
|
51
|
+
*
|
|
52
|
+
* @param registry - Store to read from.
|
|
53
|
+
* @returns Number of entries.
|
|
54
|
+
*/
|
|
55
|
+
export function size(registry) {
|
|
56
|
+
return Object.keys(registry.store.state).length;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @brief Walks `registryDependencies` depth-first, starting at `key`.
|
|
60
|
+
*
|
|
61
|
+
* Every entry reached is added to `seen`. Keys without a registry entry are pushed to `unknown` and not walked further.
|
|
62
|
+
*
|
|
63
|
+
* @param key - Key to start from.
|
|
64
|
+
* @param entries - Registry to walk, by key.
|
|
65
|
+
* @param seen - Keys already reached. Filled in place.
|
|
66
|
+
* @param unknown - Keys with no registry entry. Filled in place.
|
|
67
|
+
*/
|
|
68
|
+
export function collectDependencies(key, entries, seen, unknown) {
|
|
69
|
+
if (seen.has(key))
|
|
70
|
+
return;
|
|
71
|
+
const entry = entries[key];
|
|
72
|
+
if (!entry) {
|
|
73
|
+
unknown.push(key);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
seen.add(key);
|
|
77
|
+
for (const dep of entry.registryDependencies ?? [])
|
|
78
|
+
collectDependencies(dep, entries, seen, unknown);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @brief Finds the candidates that depend on `key`, the entries that would break if it were removed.
|
|
82
|
+
*
|
|
83
|
+
* @param key - Key that may be needed.
|
|
84
|
+
* @param entries - Registry to read `registryDependencies` from, by key.
|
|
85
|
+
* @param candidates - Keys to check.
|
|
86
|
+
* @returns The candidates whose `registryDependencies` include `key`.
|
|
87
|
+
*/
|
|
88
|
+
export function entryDependencies(key, entries, candidates) {
|
|
89
|
+
return candidates.filter((k) => entries[k]?.registryDependencies?.includes(key) ?? false);
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=registry.selectors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.selectors.js","sourceRoot":"","sources":["../../src/registry/registry.selectors.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CACjB,QAA0B,EAC1B,GAAW;IAEX,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;AAClC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,GAAG,CACjB,QAA0B,EAC1B,GAAW;IAEX,OAAO,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAA;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,OAAO,CACrB,QAA0B;IAE1B,OAAO,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAA;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAClB,QAA0B;IAE1B,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;AAC1C,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,QAA0B,EAC1B,OAAe;IAEf,OAAO,MAAM,CAAC,WAAW,CACvB,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC,CACtF,CAAA;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,IAAI,CAClB,QAA0B;IAE1B,OAAO,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAA;AACjD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,mBAAmB,CACjC,GAAW,EACX,OAAqB,EACrB,IAAiB,EACjB,OAAiB;IAEjB,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;QAAE,OAAM;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;QACjB,OAAM;IACR,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACb,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,oBAAoB,IAAI,EAAE;QAAE,mBAAmB,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;AACtG,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAC/B,GAAW,EACX,OAAqB,EACrB,UAAoB;IAEpB,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,oBAAoB,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,KAAK,CAAC,CAAA;AAC3F,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Store } from "@tanstack/store";
|
|
2
|
+
import type { BaseRegistry, BaseRegistryEntry } from "./types";
|
|
3
|
+
import type { RegistryHandler } from "./registry.handlers";
|
|
4
|
+
/**
|
|
5
|
+
* @brief Options for `createRegistryStore`.
|
|
6
|
+
*
|
|
7
|
+
* @property filePath - Absolute path to the manifest file. Used by `load()` and `flush()`.
|
|
8
|
+
* @property handler - Serialization handler. Defaults to `tsHandler`.
|
|
9
|
+
*/
|
|
10
|
+
export interface RegistryStoreOptions<T extends BaseRegistryEntry = BaseRegistryEntry> {
|
|
11
|
+
filePath?: string;
|
|
12
|
+
handler?: RegistryHandler<T>;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* @brief A registry store, passed to mutations, selectors and io helpers.
|
|
16
|
+
*
|
|
17
|
+
* @property store - The underlying TanStack Store. Subscribe, derive, or read `.state` directly.
|
|
18
|
+
* @property filePath - Absolute path this store is bound to, if any.
|
|
19
|
+
* @property handler - Serialization handler used when `load()` and `flush()` are not given one.
|
|
20
|
+
*/
|
|
21
|
+
export interface RegistryStore<T extends BaseRegistryEntry = BaseRegistryEntry> {
|
|
22
|
+
store: Store<BaseRegistry<T>>;
|
|
23
|
+
filePath?: string;
|
|
24
|
+
handler?: RegistryHandler<T>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @brief Creates a `RegistryStore` backed by TanStack Store, starting empty.
|
|
28
|
+
*
|
|
29
|
+
* Call `load()` to hydrate it from disk.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* const registry = createRegistryStore<MyEntry>({ filePath: "/abs/.g3nerate-manifest.ts" })
|
|
33
|
+
* await load(registry)
|
|
34
|
+
*
|
|
35
|
+
* @param options - Bound file path and handler. Both optional.
|
|
36
|
+
* @returns A new store with no entries.
|
|
37
|
+
*/
|
|
38
|
+
export declare function createRegistryStore<T extends BaseRegistryEntry = BaseRegistryEntry>(options?: RegistryStoreOptions<T>): RegistryStore<T>;
|
|
39
|
+
/**
|
|
40
|
+
* @brief Sets the default handler on a store.
|
|
41
|
+
*
|
|
42
|
+
* @param registry - Store to update.
|
|
43
|
+
* @param handler - Handler used for serialization and deserialization.
|
|
44
|
+
* @returns The same store, for chaining.
|
|
45
|
+
*/
|
|
46
|
+
export declare function useHandler<T extends BaseRegistryEntry>(registry: RegistryStore<T>, handler: RegistryHandler<T>): RegistryStore<T>;
|
|
47
|
+
//# sourceMappingURL=registry.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.store.d.ts","sourceRoot":"","sources":["../../src/registry/registry.store.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAM1D;;;;;GAKG;AACH,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IACnF,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;CAC7B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB;IAC5E,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,eAAe,CAAC,CAAC,CAAC,CAAA;CAC7B;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EACjF,OAAO,GAAE,oBAAoB,CAAC,CAAC,CAAM,GACpC,aAAa,CAAC,CAAC,CAAC,CAMlB;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,iBAAiB,EACpD,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,OAAO,EAAE,eAAe,CAAC,CAAC,CAAC,GAC1B,aAAa,CAAC,CAAC,CAAC,CAGlB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// packages/core/src/registry/registry.store.ts
|
|
2
|
+
import { Store } from "@tanstack/store";
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Factory
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
/**
|
|
7
|
+
* @brief Creates a `RegistryStore` backed by TanStack Store, starting empty.
|
|
8
|
+
*
|
|
9
|
+
* Call `load()` to hydrate it from disk.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const registry = createRegistryStore<MyEntry>({ filePath: "/abs/.g3nerate-manifest.ts" })
|
|
13
|
+
* await load(registry)
|
|
14
|
+
*
|
|
15
|
+
* @param options - Bound file path and handler. Both optional.
|
|
16
|
+
* @returns A new store with no entries.
|
|
17
|
+
*/
|
|
18
|
+
export function createRegistryStore(options = {}) {
|
|
19
|
+
return {
|
|
20
|
+
store: new Store({}),
|
|
21
|
+
filePath: options.filePath,
|
|
22
|
+
handler: options.handler,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @brief Sets the default handler on a store.
|
|
27
|
+
*
|
|
28
|
+
* @param registry - Store to update.
|
|
29
|
+
* @param handler - Handler used for serialization and deserialization.
|
|
30
|
+
* @returns The same store, for chaining.
|
|
31
|
+
*/
|
|
32
|
+
export function useHandler(registry, handler) {
|
|
33
|
+
registry.handler = handler;
|
|
34
|
+
return registry;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=registry.store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.store.js","sourceRoot":"","sources":["../../src/registry/registry.store.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AAgCvC,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,mBAAmB,CACjC,OAAO,GAA4B,EAAE;IAErC,OAAO;QACL,KAAK,EAAE,IAAI,KAAK,CAAkB,EAAE,CAAC;QACrC,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,OAAO,EAAE,OAAO,CAAC,OAAO;KACzB,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,QAA0B,EAC1B,OAA2B;IAE3B,QAAQ,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,OAAO,QAAQ,CAAA;AACjB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @brief Recursively serializes a value to a TypeScript object literal string.
|
|
3
|
+
*
|
|
4
|
+
* Used by `generateRegistryFile` to produce human-readable `.ts` output.
|
|
5
|
+
*
|
|
6
|
+
* @param value - Value to serialize. Objects, arrays, strings, numbers, booleans and null are written as literals.
|
|
7
|
+
* @param depth - Nesting level of `value`, used for indentation.
|
|
8
|
+
* @returns Source text of the literal.
|
|
9
|
+
*/
|
|
10
|
+
export declare function stringifyValue(value: unknown, depth?: number): string;
|
|
11
|
+
/**
|
|
12
|
+
* @brief Generates the full content of a typed `.ts` registry manifest file.
|
|
13
|
+
*
|
|
14
|
+
* @param entries - Registry entries to serialize, by key.
|
|
15
|
+
* @param typeName - TypeScript type name for the `satisfies` clause, e.g. `G3nerateRegistry`.
|
|
16
|
+
* @param importFrom - Package the type is imported from, e.g. `@g3nomaly/g3nerate`.
|
|
17
|
+
* @returns Source text of the file, ending with a newline.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* generateRegistryFile(entries, "G3nerateRegistry", "@g3nomaly/g3nerate")
|
|
21
|
+
* // →
|
|
22
|
+
* // import type { G3nerateRegistry } from "@g3nomaly/g3nerate"
|
|
23
|
+
* //
|
|
24
|
+
* // export const registry = {
|
|
25
|
+
* // "my-schema": { ... },
|
|
26
|
+
* // } as const satisfies G3nerateRegistry
|
|
27
|
+
*/
|
|
28
|
+
export declare function generateRegistryFile(entries: Record<string, unknown>, typeName: string, importFrom: string): string;
|
|
29
|
+
//# sourceMappingURL=registry.template.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.template.d.ts","sourceRoot":"","sources":["../../src/registry/registry.template.ts"],"names":[],"mappings":"AACA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,MAAM,CA2BhE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,QAAQ,EAAE,MAAM,EAChB,UAAU,EAAE,MAAM,GACjB,MAAM,CAeR"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
// packages/core/src/registry/registry.template.ts
|
|
2
|
+
/**
|
|
3
|
+
* @brief Recursively serializes a value to a TypeScript object literal string.
|
|
4
|
+
*
|
|
5
|
+
* Used by `generateRegistryFile` to produce human-readable `.ts` output.
|
|
6
|
+
*
|
|
7
|
+
* @param value - Value to serialize. Objects, arrays, strings, numbers, booleans and null are written as literals.
|
|
8
|
+
* @param depth - Nesting level of `value`, used for indentation.
|
|
9
|
+
* @returns Source text of the literal.
|
|
10
|
+
*/
|
|
11
|
+
export function stringifyValue(value, depth = 0) {
|
|
12
|
+
const indent = " ".repeat(depth);
|
|
13
|
+
const innerIndent = " ".repeat(depth + 1);
|
|
14
|
+
if (value === null)
|
|
15
|
+
return "null";
|
|
16
|
+
if (value === undefined)
|
|
17
|
+
return "undefined";
|
|
18
|
+
if (typeof value === "string")
|
|
19
|
+
return JSON.stringify(value);
|
|
20
|
+
if (typeof value === "number" || typeof value === "boolean")
|
|
21
|
+
return String(value);
|
|
22
|
+
if (Array.isArray(value)) {
|
|
23
|
+
if (value.length === 0)
|
|
24
|
+
return "[]";
|
|
25
|
+
const items = value
|
|
26
|
+
.map((v) => `${innerIndent}${stringifyValue(v, depth + 1)}`)
|
|
27
|
+
.join(",\n");
|
|
28
|
+
return `[\n${items},\n${indent}]`;
|
|
29
|
+
}
|
|
30
|
+
if (typeof value === "object") {
|
|
31
|
+
const entries = Object.entries(value);
|
|
32
|
+
if (entries.length === 0)
|
|
33
|
+
return "{}";
|
|
34
|
+
const lines = entries
|
|
35
|
+
.map(([k, v]) => `${innerIndent}${JSON.stringify(k)}: ${stringifyValue(v, depth + 1)}`)
|
|
36
|
+
.join(",\n");
|
|
37
|
+
return `{\n${lines},\n${indent}}`;
|
|
38
|
+
}
|
|
39
|
+
return String(value);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @brief Generates the full content of a typed `.ts` registry manifest file.
|
|
43
|
+
*
|
|
44
|
+
* @param entries - Registry entries to serialize, by key.
|
|
45
|
+
* @param typeName - TypeScript type name for the `satisfies` clause, e.g. `G3nerateRegistry`.
|
|
46
|
+
* @param importFrom - Package the type is imported from, e.g. `@g3nomaly/g3nerate`.
|
|
47
|
+
* @returns Source text of the file, ending with a newline.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* generateRegistryFile(entries, "G3nerateRegistry", "@g3nomaly/g3nerate")
|
|
51
|
+
* // →
|
|
52
|
+
* // import type { G3nerateRegistry } from "@g3nomaly/g3nerate"
|
|
53
|
+
* //
|
|
54
|
+
* // export const registry = {
|
|
55
|
+
* // "my-schema": { ... },
|
|
56
|
+
* // } as const satisfies G3nerateRegistry
|
|
57
|
+
*/
|
|
58
|
+
export function generateRegistryFile(entries, typeName, importFrom) {
|
|
59
|
+
const lines = [];
|
|
60
|
+
lines.push(`import type { ${typeName} } from "${importFrom}"`);
|
|
61
|
+
lines.push("");
|
|
62
|
+
lines.push("export const registry = {");
|
|
63
|
+
for (const [key, value] of Object.entries(entries)) {
|
|
64
|
+
lines.push(` ${JSON.stringify(key)}: ${stringifyValue(value, 1)},`);
|
|
65
|
+
}
|
|
66
|
+
lines.push(`} as const satisfies ${typeName}`);
|
|
67
|
+
lines.push("");
|
|
68
|
+
return lines.join("\n");
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=registry.template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.template.js","sourceRoot":"","sources":["../../src/registry/registry.template.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD;;;;;;;;GAQG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc,EAAE,KAAK,GAAG,CAAC;IACtD,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;IACjC,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,CAAA;IAE1C,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,MAAM,CAAA;IACjC,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,WAAW,CAAA;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAA;IAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;IAEjF,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QACnC,MAAM,KAAK,GAAG,KAAK;aAChB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,WAAW,GAAG,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;aAC3D,IAAI,CAAC,KAAK,CAAC,CAAA;QACd,OAAO,MAAM,KAAK,MAAM,MAAM,GAAG,CAAA;IACnC,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,CAAA;QAChE,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAA;QACrC,MAAM,KAAK,GAAG,OAAO;aAClB,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,cAAc,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC;aACtF,IAAI,CAAC,KAAK,CAAC,CAAA;QACd,OAAO,MAAM,KAAK,MAAM,MAAM,GAAG,CAAA;IACnC,CAAC;IAED,OAAO,MAAM,CAAC,KAAK,CAAC,CAAA;AACtB,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAgC,EAChC,QAAgB,EAChB,UAAkB;IAElB,MAAM,KAAK,GAAa,EAAE,CAAA;IAE1B,KAAK,CAAC,IAAI,CAAC,iBAAiB,QAAQ,YAAY,UAAU,GAAG,CAAC,CAAA;IAC9D,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IACd,KAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;IAEvC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QACnD,KAAK,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAA;IACtE,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,wBAAwB,QAAQ,EAAE,CAAC,CAAA;IAC9C,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAEd,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* @brief One file of a registry entry. Each package extends it with its own `type` values.
|
|
4
|
+
*
|
|
5
|
+
* @property path - Path of the file relative to the entry's folder.
|
|
6
|
+
* @property type - Kind of file, set by each package.
|
|
7
|
+
* @property hash - Content hash. Set at build or install time, absent in unbuilt source meta files.
|
|
8
|
+
* @property version - Version of the file. Set at build or install time, absent in unbuilt source meta files.
|
|
9
|
+
*/
|
|
10
|
+
export declare const BaseFileEntrySchema: z.ZodObject<{
|
|
11
|
+
path: z.ZodString;
|
|
12
|
+
type: z.ZodString;
|
|
13
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
14
|
+
version: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** One file of a registry entry, inferred from `BaseFileEntrySchema`. */
|
|
17
|
+
export type BaseFileEntry = z.infer<typeof BaseFileEntrySchema>;
|
|
18
|
+
/**
|
|
19
|
+
* @brief One entry of a registry. Each package extends it with its own fields.
|
|
20
|
+
*
|
|
21
|
+
* @property name - Unique name of the entry.
|
|
22
|
+
* @property description - What the entry is for.
|
|
23
|
+
* @property version - Version of the entry.
|
|
24
|
+
* @property group - Display group for `ls`. Packages derive it when the registry is built or loaded.
|
|
25
|
+
* @property registryDependencies - Keys of entries this entry needs installed alongside it.
|
|
26
|
+
* @property files - Files that make up the entry. At least one.
|
|
27
|
+
*/
|
|
28
|
+
export declare const BaseRegistryEntrySchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
description: z.ZodOptional<z.ZodString>;
|
|
31
|
+
version: z.ZodOptional<z.ZodString>;
|
|
32
|
+
group: z.ZodOptional<z.ZodString>;
|
|
33
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
34
|
+
files: z.ZodArray<z.ZodObject<{
|
|
35
|
+
path: z.ZodString;
|
|
36
|
+
type: z.ZodString;
|
|
37
|
+
hash: z.ZodOptional<z.ZodString>;
|
|
38
|
+
version: z.ZodOptional<z.ZodString>;
|
|
39
|
+
}, z.core.$strip>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
/** One registry entry, inferred from `BaseRegistryEntrySchema`. */
|
|
42
|
+
export type BaseRegistryEntry = z.infer<typeof BaseRegistryEntrySchema>;
|
|
43
|
+
/**
|
|
44
|
+
* Registry map from key to entry.
|
|
45
|
+
*/
|
|
46
|
+
export type BaseRegistry<T extends BaseRegistryEntry = BaseRegistryEntry> = Record<string, T>;
|
|
47
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB;;;;;iBAK9B,CAAA;AAEF,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAE/D;;;;;;;;;GASG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;iBAOlC,CAAA;AAEF,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAEvE;;GAEG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// packages/core/src/registry/types.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* @brief One file of a registry entry. Each package extends it with its own `type` values.
|
|
5
|
+
*
|
|
6
|
+
* @property path - Path of the file relative to the entry's folder.
|
|
7
|
+
* @property type - Kind of file, set by each package.
|
|
8
|
+
* @property hash - Content hash. Set at build or install time, absent in unbuilt source meta files.
|
|
9
|
+
* @property version - Version of the file. Set at build or install time, absent in unbuilt source meta files.
|
|
10
|
+
*/
|
|
11
|
+
export const BaseFileEntrySchema = z.object({
|
|
12
|
+
path: z.string().min(1),
|
|
13
|
+
type: z.string(),
|
|
14
|
+
hash: z.string().min(1).optional(),
|
|
15
|
+
version: z.string().min(1).optional(),
|
|
16
|
+
});
|
|
17
|
+
/**
|
|
18
|
+
* @brief One entry of a registry. Each package extends it with its own fields.
|
|
19
|
+
*
|
|
20
|
+
* @property name - Unique name of the entry.
|
|
21
|
+
* @property description - What the entry is for.
|
|
22
|
+
* @property version - Version of the entry.
|
|
23
|
+
* @property group - Display group for `ls`. Packages derive it when the registry is built or loaded.
|
|
24
|
+
* @property registryDependencies - Keys of entries this entry needs installed alongside it.
|
|
25
|
+
* @property files - Files that make up the entry. At least one.
|
|
26
|
+
*/
|
|
27
|
+
export const BaseRegistryEntrySchema = z.object({
|
|
28
|
+
name: z.string().min(1),
|
|
29
|
+
description: z.string().optional(),
|
|
30
|
+
version: z.string().optional(),
|
|
31
|
+
group: z.string().optional(),
|
|
32
|
+
registryDependencies: z.array(z.string().min(1)).optional(),
|
|
33
|
+
files: z.array(BaseFileEntrySchema).min(1),
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/registry/types.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,IAAI,EAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC1B,IAAI,EAAK,CAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAK,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACrC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;CACtC,CAAC,CAAA;AAKF;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9C,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC9B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,oBAAoB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IAC3D,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;CAC3C,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ZodType, z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* @brief Parses a TypeScript file that has a default export object literal, without running it in the main thread.
|
|
4
|
+
*
|
|
5
|
+
* Transpiles the file, extracts the object literal with a regex, evaluates it in a sandboxed Worker with a
|
|
6
|
+
* timeout, then validates the result with `schema`.
|
|
7
|
+
*
|
|
8
|
+
* @param filePath - Absolute path to the `.ts` file to parse.
|
|
9
|
+
* @param schema - Zod schema the extracted object must match.
|
|
10
|
+
* @param timeoutMs - Worker timeout in milliseconds.
|
|
11
|
+
* @returns Validated object, typed by `schema`.
|
|
12
|
+
* @throws {Error} When static analysis blocks the source, no object literal is found, the worker fails or times out, or validation fails.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getSafeObject<TSchema extends ZodType>(filePath: string, schema: TSchema, timeoutMs?: number): Promise<z.infer<TSchema>>;
|
|
15
|
+
//# sourceMappingURL=securityParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityParser.d.ts","sourceRoot":"","sources":["../../src/security/securityParser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAEtC;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,SAAS,OAAO,EACzD,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,SAAS,SAAO,GACf,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAsF3B"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// packages/core/src/security/securityParser.ts
|
|
2
|
+
import { Transpiler } from "bun";
|
|
3
|
+
/**
|
|
4
|
+
* @brief Parses a TypeScript file that has a default export object literal, without running it in the main thread.
|
|
5
|
+
*
|
|
6
|
+
* Transpiles the file, extracts the object literal with a regex, evaluates it in a sandboxed Worker with a
|
|
7
|
+
* timeout, then validates the result with `schema`.
|
|
8
|
+
*
|
|
9
|
+
* @param filePath - Absolute path to the `.ts` file to parse.
|
|
10
|
+
* @param schema - Zod schema the extracted object must match.
|
|
11
|
+
* @param timeoutMs - Worker timeout in milliseconds.
|
|
12
|
+
* @returns Validated object, typed by `schema`.
|
|
13
|
+
* @throws {Error} When static analysis blocks the source, no object literal is found, the worker fails or times out, or validation fails.
|
|
14
|
+
*/
|
|
15
|
+
export async function getSafeObject(filePath, schema, timeoutMs = 1000) {
|
|
16
|
+
const file = Bun.file(filePath);
|
|
17
|
+
const rawContent = await file.text();
|
|
18
|
+
const transpiler = new Transpiler({ loader: "ts" });
|
|
19
|
+
const jsCode = transpiler.transformSync(rawContent);
|
|
20
|
+
// Static analysis runs before evaluation, since some attacks finish before the sanitiser sees any output.
|
|
21
|
+
const DANGEROUS_PATTERNS = [
|
|
22
|
+
[/\bimport\s*\(/, "dynamic import()"],
|
|
23
|
+
[/\bimport\.meta\b/, "import.meta"],
|
|
24
|
+
[/\bnew\s+Worker\b/, "Worker construction"],
|
|
25
|
+
[/\beval\s*\(/, "eval()"],
|
|
26
|
+
[/\.constructor\s*\.\s*constructor/, "constructor.constructor chain"],
|
|
27
|
+
// Object literals skip the Object() constructor, so loops that build objects are rejected in the source.
|
|
28
|
+
[/\bfor\s*\([\s\S]{0,200}?\)\s*\{[\s\S]{0,500}?\bnested\b/,
|
|
29
|
+
"deep object construction loop"],
|
|
30
|
+
[/\bfor\s*\([^)]*\)[^{]*\{[^}]*=\s*\{/,
|
|
31
|
+
"object-building loop"],
|
|
32
|
+
[/\bwhile\s*\([^)]*\)[^{]*\{[^}]*=\s*\{/,
|
|
33
|
+
"object-building loop"],
|
|
34
|
+
// Regex literals bypass the RegExp stub in the worker, so nested quantifiers such as (x+)+ are rejected in the source.
|
|
35
|
+
[/\/[^/]*\([^)]*[+*]\)[+*]/, "catastrophic regex literal (nested quantifier)"],
|
|
36
|
+
];
|
|
37
|
+
for (const [pattern, label] of DANGEROUS_PATTERNS) {
|
|
38
|
+
if (pattern.test(jsCode)) {
|
|
39
|
+
throw new Error(`Static analysis blocked [${label}] in: ${filePath}`);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
const match = jsCode.match(/(?:export default|const \w+ =)\s*(\{[\s\S]*\})/);
|
|
43
|
+
if (!match) {
|
|
44
|
+
throw new Error(`No valid object literal found in: ${filePath}`);
|
|
45
|
+
}
|
|
46
|
+
const objectString = match[1];
|
|
47
|
+
// securityWorker sits beside this module and shares its extension (.ts in src, .js in dist)
|
|
48
|
+
const workerPath = import.meta.url.replace(/securityParser\.(\w+)$/, "securityWorker.$1");
|
|
49
|
+
const worker = new Worker(workerPath);
|
|
50
|
+
const result = await new Promise((res, rej) => {
|
|
51
|
+
const timeout = setTimeout(() => {
|
|
52
|
+
worker.terminate();
|
|
53
|
+
rej(new Error(`Security Error: Evaluation timed out after ${timeoutMs}ms — possible infinite loop in ${filePath}`));
|
|
54
|
+
}, timeoutMs);
|
|
55
|
+
worker.onmessage = (event) => {
|
|
56
|
+
clearTimeout(timeout);
|
|
57
|
+
worker.terminate();
|
|
58
|
+
const { success, data, error } = event.data;
|
|
59
|
+
if (success) {
|
|
60
|
+
res(data);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
rej(new Error(`Security or Format Error in ${filePath}: ${error}`));
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
worker.onerror = (err) => {
|
|
67
|
+
clearTimeout(timeout);
|
|
68
|
+
worker.terminate();
|
|
69
|
+
rej(new Error(`Worker Error for ${filePath}: ${err.message}`));
|
|
70
|
+
};
|
|
71
|
+
worker.postMessage({ objectString });
|
|
72
|
+
});
|
|
73
|
+
const parsed = schema.safeParse(result);
|
|
74
|
+
if (!parsed.success) {
|
|
75
|
+
throw new Error(`Schema validation failed for ${filePath}:\n${parsed.error.message}`);
|
|
76
|
+
}
|
|
77
|
+
return parsed.data;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=securityParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityParser.js","sourceRoot":"","sources":["../../src/security/securityParser.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
declare const worker: DedicatedWorkerGlobalScope;
|
|
2
|
+
declare const MAX_DEPTH = 20;
|
|
3
|
+
declare const MAX_KEYS = 1000;
|
|
4
|
+
declare const MAX_STRLEN = 100000;
|
|
5
|
+
declare let totalKeys: number;
|
|
6
|
+
/**
|
|
7
|
+
* @brief Copies evaluated sandbox data into plain values, rejecting anything that can carry code, memory or stacks.
|
|
8
|
+
*
|
|
9
|
+
* Getters and setters are dropped without running them.
|
|
10
|
+
*
|
|
11
|
+
* @param value - Value to copy. Usually the result of the sandbox evaluation.
|
|
12
|
+
* @param depth - Current nesting depth, starting at 0.
|
|
13
|
+
* @returns Plain copy of `value`.
|
|
14
|
+
* @throws {Error} When the value nests too deep, has too many keys, is a function, symbol, RegExp, buffer, error,
|
|
15
|
+
* promise or non-plain object, or is a string that is too long or looks like a stack trace.
|
|
16
|
+
*/
|
|
17
|
+
declare function sanitise(value: unknown, depth?: number): unknown;
|
|
18
|
+
declare const SANDBOX_PREAMBLE = "\n \"use strict\";\n\n const process = undefined;\n const global = undefined;\n const globalThis = Object.create(null); // isolated dummy \u2014 writes succeed but go nowhere\n const module = undefined;\n const require = undefined;\n const __dirname = undefined;\n const __filename = undefined;\n const importScripts = undefined;\n const Function = undefined;\n const Reflect = undefined;\n const Proxy = undefined;\n\n // Stub ArrayBuffer \u2014 catches IIFE allocation bombs before they run.\n const ArrayBuffer = function() {\n throw new RangeError(\"ArrayBuffer construction is not allowed in meta files\");\n };\n\n // Stub RegExp constructor \u2014 catches IIFE regex bombs constructed via\n // new RegExp(...) or RegExp(...). Regex *literals* are a different path\n // (they don't call the RegExp constructor at parse time) but executing\n // .match()/.exec() on them still goes through the engine's regex executor.\n // The Worker timeout is the backstop for literal-based regex bombs.\n const RegExp = function() {\n throw new Error(\"RegExp construction is not allowed in meta files\");\n };\n";
|
|
19
|
+
//# sourceMappingURL=securityWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"securityWorker.d.ts","sourceRoot":"","sources":["../../src/security/securityWorker.ts"],"names":[],"mappings":"AACA,QAAA,MAAM,MAAM,EAAsB,0BAA0B,CAAC;AAM7D,QAAA,MAAM,SAAS,KAAM,CAAC;AACtB,QAAA,MAAM,QAAQ,OAAU,CAAC;AACzB,QAAA,MAAM,UAAU,SAAU,CAAC;AAC3B,QAAA,IAAM,SAAS,QAAK,CAAC;AAErB;;;;;;;;;;GAUG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,SAAI,GAAG,OAAO,CAoEpD;AAWD,QAAA,MAAM,gBAAgB,uqCA4BrB,CAAC"}
|