@g3nomaly/core 0.3.0 → 0.3.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/LICENSE +95 -0
- package/dist/cli/commands/add.d.ts +17 -0
- package/dist/cli/commands/add.d.ts.map +1 -0
- package/dist/cli/commands/add.js +76 -0
- package/dist/cli/commands/add.js.map +1 -0
- package/dist/cli/commands/installFromSources.d.ts +49 -0
- package/dist/cli/commands/installFromSources.d.ts.map +1 -0
- package/dist/cli/commands/installFromSources.js +138 -0
- package/dist/cli/commands/installFromSources.js.map +1 -0
- package/dist/cli/commands/ls.d.ts +16 -0
- package/dist/cli/commands/ls.d.ts.map +1 -0
- package/dist/cli/commands/ls.js +65 -0
- package/dist/cli/commands/ls.js.map +1 -0
- package/dist/cli/commands/remove.d.ts +13 -0
- package/dist/cli/commands/remove.d.ts.map +1 -0
- package/dist/cli/commands/remove.js +109 -0
- package/dist/cli/commands/remove.js.map +1 -0
- package/dist/cli/commands/sources.d.ts +45 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +89 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/update.d.ts +10 -0
- package/dist/cli/commands/update.d.ts.map +1 -0
- package/dist/cli/commands/update.js +92 -0
- package/dist/cli/commands/update.js.map +1 -0
- package/dist/cli/dialogue.d.ts +74 -0
- package/dist/cli/dialogue.d.ts.map +1 -0
- package/dist/cli/dialogue.js +117 -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 +15 -0
- package/dist/cli/installDialogues.d.ts.map +1 -0
- package/dist/cli/installDialogues.js +72 -0
- package/dist/cli/installDialogues.js.map +1 -0
- package/dist/cli/pick.d.ts +14 -0
- package/dist/cli/pick.d.ts.map +1 -0
- package/dist/cli/pick.js +35 -0
- package/dist/cli/pick.js.map +1 -0
- package/dist/cli/report.d.ts +34 -0
- package/dist/cli/report.d.ts.map +1 -0
- package/dist/cli/report.js +71 -0
- package/dist/cli/report.js.map +1 -0
- package/dist/cli/theme.d.ts +23 -0
- package/dist/cli/theme.d.ts.map +1 -0
- package/dist/cli/theme.js +25 -0
- package/dist/cli/theme.js.map +1 -0
- package/dist/cli/types.d.ts +45 -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 +30 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +77 -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 +124 -0
- package/dist/config/types.d.ts.map +1 -0
- package/dist/config/types.js +61 -0
- package/dist/config/types.js.map +1 -0
- package/dist/hash/hash.d.ts +25 -0
- package/dist/hash/hash.d.ts.map +1 -0
- package/dist/hash/hash.js +44 -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 +2 -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 +2 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/classify.d.ts +7 -0
- package/dist/installer/classify.d.ts.map +1 -0
- package/dist/installer/classify.js +47 -0
- package/dist/installer/classify.js.map +1 -0
- package/dist/installer/files.d.ts +15 -0
- package/dist/installer/files.d.ts.map +1 -0
- package/dist/installer/files.js +22 -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 +13 -0
- package/dist/installer/install.d.ts.map +1 -0
- package/dist/installer/install.js +61 -0
- package/dist/installer/install.js.map +1 -0
- package/dist/installer/io.d.ts +4 -0
- package/dist/installer/io.d.ts.map +1 -0
- package/dist/installer/io.js +18 -0
- package/dist/installer/io.js.map +1 -0
- package/dist/installer/manifest.d.ts +59 -0
- package/dist/installer/manifest.d.ts.map +1 -0
- package/dist/installer/manifest.js +60 -0
- package/dist/installer/manifest.js.map +1 -0
- package/dist/installer/manifestSources.d.ts +21 -0
- package/dist/installer/manifestSources.d.ts.map +1 -0
- package/dist/installer/manifestSources.js +39 -0
- package/dist/installer/manifestSources.js.map +1 -0
- package/dist/installer/marketplace.d.ts +34 -0
- package/dist/installer/marketplace.d.ts.map +1 -0
- package/dist/installer/marketplace.js +64 -0
- package/dist/installer/marketplace.js.map +1 -0
- package/dist/installer/origin.d.ts +43 -0
- package/dist/installer/origin.d.ts.map +1 -0
- package/dist/installer/origin.js +22 -0
- package/dist/installer/origin.js.map +1 -0
- package/dist/installer/remove.d.ts +14 -0
- package/dist/installer/remove.d.ts.map +1 -0
- package/dist/installer/remove.js +37 -0
- package/dist/installer/remove.js.map +1 -0
- package/dist/installer/resolve.d.ts +78 -0
- package/dist/installer/resolve.d.ts.map +1 -0
- package/dist/installer/resolve.js +184 -0
- package/dist/installer/resolve.js.map +1 -0
- package/dist/installer/sourceRegistry.d.ts +59 -0
- package/dist/installer/sourceRegistry.d.ts.map +1 -0
- package/dist/installer/sourceRegistry.js +71 -0
- package/dist/installer/sourceRegistry.js.map +1 -0
- package/dist/installer/types.d.ts +80 -0
- package/dist/installer/types.d.ts.map +1 -0
- package/dist/installer/types.js +21 -0
- package/dist/installer/types.js.map +1 -0
- package/dist/registry/index.d.ts +12 -0
- package/dist/registry/index.d.ts.map +1 -0
- package/dist/registry/index.js +12 -0
- package/dist/registry/index.js.map +1 -0
- package/dist/registry/registry.handlers.d.ts +9 -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 +22 -0
- package/dist/registry/registry.io.d.ts.map +1 -0
- package/dist/registry/registry.io.js +78 -0
- package/dist/registry/registry.io.js.map +1 -0
- package/dist/registry/registry.mutations.d.ts +12 -0
- package/dist/registry/registry.mutations.d.ts.map +1 -0
- package/dist/registry/registry.mutations.js +22 -0
- package/dist/registry/registry.mutations.js.map +1 -0
- package/dist/registry/registry.selectors.d.ts +38 -0
- package/dist/registry/registry.selectors.d.ts.map +1 -0
- package/dist/registry/registry.selectors.js +61 -0
- package/dist/registry/registry.selectors.js.map +1 -0
- package/dist/registry/registry.store.d.ts +34 -0
- package/dist/registry/registry.store.d.ts.map +1 -0
- package/dist/registry/registry.store.js +27 -0
- package/dist/registry/registry.store.js.map +1 -0
- package/dist/registry/registry.template.d.ts +23 -0
- package/dist/registry/registry.template.d.ts.map +1 -0
- package/dist/registry/registry.template.js +63 -0
- package/dist/registry/registry.template.js.map +1 -0
- package/dist/registry/types.d.ts +33 -0
- package/dist/registry/types.d.ts.map +1 -0
- package/dist/registry/types.js +25 -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 +2 -0
- package/dist/security/index.js.map +1 -0
- package/dist/security/securityParser.d.ts +14 -0
- package/dist/security/securityParser.d.ts.map +1 -0
- package/dist/security/securityParser.js +89 -0
- package/dist/security/securityParser.js.map +1 -0
- package/dist/security/securityWorker.d.ts +8 -0
- package/dist/security/securityWorker.d.ts.map +1 -0
- package/dist/security/securityWorker.js +158 -0
- package/dist/security/securityWorker.js.map +1 -0
- package/dist/sources/checkout.d.ts +14 -0
- package/dist/sources/checkout.d.ts.map +1 -0
- package/dist/sources/checkout.js +27 -0
- package/dist/sources/checkout.js.map +1 -0
- package/dist/sources/git.d.ts +9 -0
- package/dist/sources/git.d.ts.map +1 -0
- package/dist/sources/git.js +22 -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 +10 -0
- package/dist/sources/local.d.ts.map +1 -0
- package/dist/sources/local.js +20 -0
- package/dist/sources/local.js.map +1 -0
- package/dist/sources/npm.d.ts +13 -0
- package/dist/sources/npm.d.ts.map +1 -0
- package/dist/sources/npm.js +128 -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 +34 -0
- package/dist/sources/parse.d.ts.map +1 -0
- package/dist/sources/parse.js +92 -0
- package/dist/sources/parse.js.map +1 -0
- package/dist/sources/process.d.ts +18 -0
- package/dist/sources/process.d.ts.map +1 -0
- package/dist/sources/process.js +43 -0
- package/dist/sources/process.js.map +1 -0
- package/dist/sources/register.d.ts +16 -0
- package/dist/sources/register.d.ts.map +1 -0
- package/dist/sources/register.js +37 -0
- package/dist/sources/register.js.map +1 -0
- package/dist/sources/types.d.ts +73 -0
- package/dist/sources/types.d.ts.map +1 -0
- package/dist/sources/types.js +36 -0
- package/dist/sources/types.js.map +1 -0
- package/dist/utils/errors.d.ts +3 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +6 -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 +6 -0
- package/dist/utils/merge.d.ts.map +1 -0
- package/dist/utils/merge.js +21 -0
- package/dist/utils/merge.js.map +1 -0
- package/dist/utils/packageMeta.d.ts +12 -0
- package/dist/utils/packageMeta.d.ts.map +1 -0
- package/dist/utils/packageMeta.js +20 -0
- package/dist/utils/packageMeta.js.map +1 -0
- package/dist/utils/paths.d.ts +16 -0
- package/dist/utils/paths.d.ts.map +1 -0
- package/dist/utils/paths.js +40 -0
- package/dist/utils/paths.js.map +1 -0
- package/dist/utils/prompt.d.ts +3 -0
- package/dist/utils/prompt.d.ts.map +1 -0
- package/dist/utils/prompt.js +8 -0
- package/dist/utils/prompt.js.map +1 -0
- package/dist/utils/version.d.ts +9 -0
- package/dist/utils/version.d.ts.map +1 -0
- package/dist/utils/version.js +103 -0
- package/dist/utils/version.js.map +1 -0
- package/package.json +64 -3
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAEA,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEnD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,sEAAsE;AACtE,MAAM,UAAU,YAAY,CAAC,KAAc;IACzC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { findPackageRoot, findUp, findGitRoot } from "./paths";
|
|
2
|
+
export { warnIfOutdated } from "./version";
|
|
3
|
+
export { guardCancel } from "./prompt";
|
|
4
|
+
export { errorMessage } from "./errors";
|
|
5
|
+
export { readPackageMeta } from "./packageMeta";
|
|
6
|
+
export type { PackageMetadata } from "./packageMeta";
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// packages/core/src/utils/index.ts
|
|
2
|
+
export { findPackageRoot, findUp, findGitRoot } from "./paths";
|
|
3
|
+
export { warnIfOutdated } from "./version";
|
|
4
|
+
export { guardCancel } from "./prompt";
|
|
5
|
+
export { errorMessage } from "./errors";
|
|
6
|
+
export { readPackageMeta } from "./packageMeta";
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../src/utils/merge.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,CAAC,CAUvD"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// packages/core/src/utils/merge.ts
|
|
2
|
+
function isPlainObject(value) {
|
|
3
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Recursively merges `patch` into `base` without mutating either.
|
|
7
|
+
* Plain objects merge key-wise; arrays and primitives replace.
|
|
8
|
+
*/
|
|
9
|
+
export function deepMerge(base, patch) {
|
|
10
|
+
if (!isPlainObject(base) || !isPlainObject(patch)) {
|
|
11
|
+
return (patch === undefined ? base : patch);
|
|
12
|
+
}
|
|
13
|
+
const out = { ...base };
|
|
14
|
+
for (const [key, value] of Object.entries(patch)) {
|
|
15
|
+
if (value === undefined)
|
|
16
|
+
continue;
|
|
17
|
+
out[key] = deepMerge(out[key], value);
|
|
18
|
+
}
|
|
19
|
+
return out;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=merge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/utils/merge.ts"],"names":[],"mappings":"AAAA,mCAAmC;AAEnC,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAI,IAAO,EAAE,KAAc;IAClD,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC;QAClD,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAM,CAAC;IACnD,CAAC;IACD,MAAM,GAAG,GAA4B,EAAE,GAAG,IAAI,EAAE,CAAC;IACjD,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACjD,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,GAAG,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,GAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface PackageMetadata {
|
|
2
|
+
name: string;
|
|
3
|
+
version: string;
|
|
4
|
+
description: string;
|
|
5
|
+
license: string;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Live metadata of the package that owns `entryUrl` (pass `import.meta.url`),
|
|
9
|
+
* read from its `package.json` on every call so it never goes stale.
|
|
10
|
+
*/
|
|
11
|
+
export declare function readPackageMeta(entryUrl: string): PackageMetadata;
|
|
12
|
+
//# sourceMappingURL=packageMeta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageMeta.d.ts","sourceRoot":"","sources":["../../src/utils/packageMeta.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAS,MAAM,CAAC;IACpB,OAAO,EAAM,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAM,MAAM,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,eAAe,CASjE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// packages/core/src/utils/packageMeta.ts
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { findPackageRoot } from "./paths";
|
|
6
|
+
/**
|
|
7
|
+
* Live metadata of the package that owns `entryUrl` (pass `import.meta.url`),
|
|
8
|
+
* read from its `package.json` on every call so it never goes stale.
|
|
9
|
+
*/
|
|
10
|
+
export function readPackageMeta(entryUrl) {
|
|
11
|
+
const root = findPackageRoot(dirname(fileURLToPath(entryUrl)));
|
|
12
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
13
|
+
return {
|
|
14
|
+
name: typeof pkg.name === "string" ? pkg.name : "",
|
|
15
|
+
version: typeof pkg.version === "string" ? pkg.version : "0.0.0",
|
|
16
|
+
description: typeof pkg.description === "string" ? pkg.description : "",
|
|
17
|
+
license: typeof pkg.license === "string" ? pkg.license : "",
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=packageMeta.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageMeta.js","sourceRoot":"","sources":["../../src/utils/packageMeta.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAS1C;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,QAAgB;IAC9C,MAAM,IAAI,GAAG,eAAe,CAAC,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC/D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,MAAM,CAAC,CAA4B,CAAC;IACpG,OAAO;QACL,IAAI,EAAS,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;QACzD,OAAO,EAAM,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO;QACpE,WAAW,EAAE,OAAO,GAAG,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;QACvE,OAAO,EAAM,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;KAChE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nearest directory at or above `fromDir` that holds a `package.json`.
|
|
3
|
+
* Pass `import.meta.dir` to get the root of the package the caller lives in,
|
|
4
|
+
* from `src/` and `dist/` alike.
|
|
5
|
+
*
|
|
6
|
+
* @throws when no package.json exists on the way up to the filesystem root
|
|
7
|
+
*/
|
|
8
|
+
export declare function findPackageRoot(fromDir: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Nearest directory at or above `fromDir` containing `marker` as a direct
|
|
11
|
+
* entry (file or directory). Returns null when no ancestor holds it.
|
|
12
|
+
*/
|
|
13
|
+
export declare function findUp(fromDir: string, marker: string): string | null;
|
|
14
|
+
/** Root of the git repository containing `fromDir`, or null outside a repo. */
|
|
15
|
+
export declare function findGitRoot(fromDir: string): string | null;
|
|
16
|
+
//# sourceMappingURL=paths.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAQvD;AAED;;;GAGG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAQrE;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE1D"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// packages/core/src/utils/paths.ts
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { dirname, join } from "node:path";
|
|
4
|
+
/**
|
|
5
|
+
* Nearest directory at or above `fromDir` that holds a `package.json`.
|
|
6
|
+
* Pass `import.meta.dir` to get the root of the package the caller lives in,
|
|
7
|
+
* from `src/` and `dist/` alike.
|
|
8
|
+
*
|
|
9
|
+
* @throws when no package.json exists on the way up to the filesystem root
|
|
10
|
+
*/
|
|
11
|
+
export function findPackageRoot(fromDir) {
|
|
12
|
+
let dir = fromDir;
|
|
13
|
+
while (!existsSync(join(dir, "package.json"))) {
|
|
14
|
+
const parent = dirname(dir);
|
|
15
|
+
if (parent === dir)
|
|
16
|
+
throw new Error(`no package.json found above ${fromDir}`);
|
|
17
|
+
dir = parent;
|
|
18
|
+
}
|
|
19
|
+
return dir;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Nearest directory at or above `fromDir` containing `marker` as a direct
|
|
23
|
+
* entry (file or directory). Returns null when no ancestor holds it.
|
|
24
|
+
*/
|
|
25
|
+
export function findUp(fromDir, marker) {
|
|
26
|
+
let dir = fromDir;
|
|
27
|
+
while (true) {
|
|
28
|
+
if (existsSync(join(dir, marker)))
|
|
29
|
+
return dir;
|
|
30
|
+
const parent = dirname(dir);
|
|
31
|
+
if (parent === dir)
|
|
32
|
+
return null;
|
|
33
|
+
dir = parent;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/** Root of the git repository containing `fromDir`, or null outside a repo. */
|
|
37
|
+
export function findGitRoot(fromDir) {
|
|
38
|
+
return findUp(fromDir, ".git");
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=paths.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paths.js","sourceRoot":"","sources":["../../src/utils/paths.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe;IAC7C,IAAI,GAAG,GAAG,OAAO,CAAC;IAClB,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,OAAO,EAAE,CAAC,CAAC;QAC9E,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,MAAM,CAAC,OAAe,EAAE,MAAc;IACpD,IAAI,GAAG,GAAG,OAAO,CAAC;IAClB,OAAO,IAAI,EAAE,CAAC;QACZ,IAAI,UAAU,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;YAAE,OAAO,GAAG,CAAC;QAC9C,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,MAAM,KAAK,GAAG;YAAE,OAAO,IAAI,CAAC;QAChC,GAAG,GAAG,MAAM,CAAC;IACf,CAAC;AACH,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,WAAW,CAAC,OAAe;IACzC,OAAO,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.d.ts","sourceRoot":"","sources":["../../src/utils/prompt.ts"],"names":[],"mappings":"AAEA,6FAA6F;AAC7F,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,MAAM,GAAG,CAAC,CAGpD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// packages/core/src/utils/prompt.ts
|
|
2
|
+
/** Exits the process when a prompt returned a cancel symbol, otherwise returns its value. */
|
|
3
|
+
export function guardCancel(result) {
|
|
4
|
+
if (typeof result === "symbol")
|
|
5
|
+
process.exit(0);
|
|
6
|
+
return result;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../../src/utils/prompt.ts"],"names":[],"mappings":"AAAA,oCAAoC;AAEpC,6FAA6F;AAC7F,MAAM,UAAU,WAAW,CAAI,MAAkB;IAC/C,IAAI,OAAO,MAAM,KAAK,QAAQ;QAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IAC/C,OAAO,MAAW,CAAA;AACpB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Warns on stderr when a newer version of `pkgName` exists on the registry.
|
|
3
|
+
* When the process runs from a stale `bunx <pkg>@latest` cache, that cache
|
|
4
|
+
* directory is removed on exit so the next invocation reinstalls fresh.
|
|
5
|
+
* Checks the registry at most once per hour; no-op when offline or when
|
|
6
|
+
* G3N_NO_UPDATE_CHECK is set.
|
|
7
|
+
*/
|
|
8
|
+
export declare function warnIfOutdated(pkgName: string, currentVersion: string, entryUrl: string): Promise<void>;
|
|
9
|
+
//# sourceMappingURL=version.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"AA8DA;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoC7G"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// packages/core/src/utils/version.ts
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import os from "node:os";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
6
|
+
const REGISTRY = "https://registry.npmjs.org";
|
|
7
|
+
const CHECK_INTERVAL_MS = 60 * 60 * 1000;
|
|
8
|
+
const FETCH_TIMEOUT_MS = 1500;
|
|
9
|
+
function throttleFile(pkgName) {
|
|
10
|
+
return path.join(os.tmpdir(), `.g3n-update-${pkgName.replace(/[^a-z0-9-]/gi, "_")}.json`);
|
|
11
|
+
}
|
|
12
|
+
function readState(file) {
|
|
13
|
+
try {
|
|
14
|
+
const raw = JSON.parse(fs.readFileSync(file, "utf8"));
|
|
15
|
+
return typeof raw.checkedAt === "number" && typeof raw.latest === "string" ? raw : null;
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
async function fetchLatest(pkgName) {
|
|
22
|
+
try {
|
|
23
|
+
const res = await fetch(`${REGISTRY}/${pkgName}/latest`, { signal: AbortSignal.timeout(FETCH_TIMEOUT_MS) });
|
|
24
|
+
if (!res.ok)
|
|
25
|
+
return null;
|
|
26
|
+
const data = (await res.json());
|
|
27
|
+
return typeof data.version === "string" ? data.version : null;
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function isOutdated(current, latest) {
|
|
34
|
+
const a = current.split("-")[0].split(".").map(Number);
|
|
35
|
+
const b = latest.split("-")[0].split(".").map(Number);
|
|
36
|
+
for (let i = 0; i < 3; i++) {
|
|
37
|
+
if ((b[i] ?? 0) > (a[i] ?? 0))
|
|
38
|
+
return true;
|
|
39
|
+
if ((b[i] ?? 0) < (a[i] ?? 0))
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
/** Root of the `bunx <pkg>@latest` cache dir `entryUrl` runs from, or null when not running from one. */
|
|
45
|
+
function bunxLatestCacheRoot(entryUrl) {
|
|
46
|
+
let entryPath;
|
|
47
|
+
try {
|
|
48
|
+
entryPath = fileURLToPath(entryUrl);
|
|
49
|
+
}
|
|
50
|
+
catch {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
const marker = entryPath.indexOf("@latest" + path.sep);
|
|
54
|
+
if (marker === -1 || !entryPath.startsWith(os.tmpdir()) || !entryPath.includes("bunx-"))
|
|
55
|
+
return null;
|
|
56
|
+
return entryPath.slice(0, marker + "@latest".length);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Warns on stderr when a newer version of `pkgName` exists on the registry.
|
|
60
|
+
* When the process runs from a stale `bunx <pkg>@latest` cache, that cache
|
|
61
|
+
* directory is removed on exit so the next invocation reinstalls fresh.
|
|
62
|
+
* Checks the registry at most once per hour; no-op when offline or when
|
|
63
|
+
* G3N_NO_UPDATE_CHECK is set.
|
|
64
|
+
*/
|
|
65
|
+
export async function warnIfOutdated(pkgName, currentVersion, entryUrl) {
|
|
66
|
+
if (process.env.G3N_NO_UPDATE_CHECK !== undefined)
|
|
67
|
+
return;
|
|
68
|
+
const file = throttleFile(pkgName);
|
|
69
|
+
const cached = readState(file);
|
|
70
|
+
let latest;
|
|
71
|
+
if (cached !== null && Date.now() - cached.checkedAt < CHECK_INTERVAL_MS) {
|
|
72
|
+
latest = cached.latest;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const fetched = await fetchLatest(pkgName);
|
|
76
|
+
if (fetched === null)
|
|
77
|
+
return;
|
|
78
|
+
latest = fetched;
|
|
79
|
+
try {
|
|
80
|
+
fs.writeFileSync(file, JSON.stringify({ checkedAt: Date.now(), latest }));
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
// throttle state is best-effort; the warning below still works
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
if (!isOutdated(currentVersion, latest))
|
|
87
|
+
return;
|
|
88
|
+
const cacheRoot = bunxLatestCacheRoot(entryUrl);
|
|
89
|
+
if (cacheRoot !== null) {
|
|
90
|
+
process.once("exit", () => {
|
|
91
|
+
try {
|
|
92
|
+
fs.rmSync(cacheRoot, { recursive: true, force: true });
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
// cache dir may already be gone; next run resolves fresh either way
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
console.error(`[g3n] ${pkgName} ${currentVersion} is outdated (latest ${latest}) — stale bunx cache cleared, the next run uses ${latest}.`);
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
console.error(`[g3n] ${pkgName} ${currentVersion} is outdated (latest ${latest}) — update with: bun install -g ${pkgName}@${latest}`);
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/utils/version.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g3nomaly/core",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Shared runtime for @g3n packages — hashing, registry, security, config",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./hash": {
|
|
13
|
+
"types": "./dist/hash/index.d.ts",
|
|
14
|
+
"default": "./dist/hash/index.js"
|
|
15
|
+
},
|
|
16
|
+
"./registry": {
|
|
17
|
+
"types": "./dist/registry/index.d.ts",
|
|
18
|
+
"default": "./dist/registry/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./security": {
|
|
21
|
+
"types": "./dist/security/index.d.ts",
|
|
22
|
+
"default": "./dist/security/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./config": {
|
|
25
|
+
"types": "./dist/config/index.d.ts",
|
|
26
|
+
"default": "./dist/config/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./installer": {
|
|
29
|
+
"types": "./dist/installer/index.d.ts",
|
|
30
|
+
"default": "./dist/installer/index.js"
|
|
31
|
+
},
|
|
32
|
+
"./cli": {
|
|
33
|
+
"types": "./dist/cli/index.d.ts",
|
|
34
|
+
"default": "./dist/cli/index.js"
|
|
35
|
+
},
|
|
36
|
+
"./sources": {
|
|
37
|
+
"types": "./dist/sources/index.d.ts",
|
|
38
|
+
"default": "./dist/sources/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./utils": {
|
|
41
|
+
"types": "./dist/utils/index.d.ts",
|
|
42
|
+
"default": "./dist/utils/index.js"
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
"files": [
|
|
47
|
+
"dist"
|
|
48
|
+
],
|
|
49
|
+
"scripts": {
|
|
50
|
+
"build": "rm -rf dist && tsc --project tsconfig.build.json",
|
|
51
|
+
"typecheck": "tsc --noEmit"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@clack/prompts": "^1.7.0",
|
|
55
|
+
"@tanstack/store": "^0.11.1",
|
|
56
|
+
"chalk": "^6.0.0",
|
|
57
|
+
"zod": "^4.4.3"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@types/bun": "^1.4.0",
|
|
61
|
+
"typescript": "~7.0.2"
|
|
62
|
+
},
|
|
63
|
+
"license": "Elastic-2.0",
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public"
|
|
66
|
+
}
|
|
6
67
|
}
|
package/README.md
DELETED