@venizia/ignis-boot 0.4.7-3 → 0.4.7-5
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.
|
@@ -2,6 +2,15 @@ import { type IScannedArtifact } from '../generator/common/index.js';
|
|
|
2
2
|
/** The scanner's answer for one `src`, kept under the package's `node_modules/.cache` and valid while no `.ts` file under `src`, the package manifest or the lockfile changed - a hit skips TypeScript entirely. */
|
|
3
3
|
export declare class ArtifactScanCache {
|
|
4
4
|
static readonly VERSION = 2;
|
|
5
|
+
/**
|
|
6
|
+
* A 128-bit hash of `text` as 32 hex characters (cyrb128: four 32-bit lanes, public domain). It names a cache file and
|
|
7
|
+
* tells a changed tree from an unchanged one; nothing here is a secret, so it needs no cryptographic strength. It is
|
|
8
|
+
* plain arithmetic on purpose: this file runs under Vite, which runs under Node, where `Bun` and `node:crypto`
|
|
9
|
+
* (removed from the sources) are not available, and under Bun alike. The same text gives the same string on both.
|
|
10
|
+
*/
|
|
11
|
+
static digest(opts: {
|
|
12
|
+
text: string;
|
|
13
|
+
}): string;
|
|
5
14
|
static location(opts: {
|
|
6
15
|
root: string;
|
|
7
16
|
}): string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-cache.d.ts","sourceRoot":"","sources":["../../../src/bun/scan-cache.ts"],"names":[],"mappings":"AAUA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,oNAAoN;AACpN,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,QAAQ,CAAC,OAAO,KAAK;IAE5B,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAM/C,4KAA4K;IAC5K,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAmClD,iGAAiG;IACjG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB,EAAE,GAAG,SAAS;IAsBnE,uIAAuI;IACvI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,gBAAgB,EAAE,CAAA;KAAE,GAAG,OAAO;CAoB7E"}
|
|
1
|
+
{"version":3,"file":"scan-cache.d.ts","sourceRoot":"","sources":["../../../src/bun/scan-cache.ts"],"names":[],"mappings":"AAUA,OAAO,EAAuB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEjF,oNAAoN;AACpN,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,QAAQ,CAAC,OAAO,KAAK;IAE5B;;;;;OAKG;IACH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IA0B7C,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAM/C,4KAA4K;IAC5K,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,MAAM;IAmClD,iGAAiG;IACjG,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,gBAAgB,EAAE,GAAG,SAAS;IAsBnE,uIAAuI;IACvI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,gBAAgB,EAAE,CAAA;KAAE,GAAG,OAAO;CAoB7E"}
|
|
@@ -4,9 +4,37 @@ import { ArtifactStereotypes } from '../generator/common/index.js';
|
|
|
4
4
|
/** The scanner's answer for one `src`, kept under the package's `node_modules/.cache` and valid while no `.ts` file under `src`, the package manifest or the lockfile changed - a hit skips TypeScript entirely. */
|
|
5
5
|
export class ArtifactScanCache {
|
|
6
6
|
static { this.VERSION = 2; }
|
|
7
|
+
/**
|
|
8
|
+
* A 128-bit hash of `text` as 32 hex characters (cyrb128: four 32-bit lanes, public domain). It names a cache file and
|
|
9
|
+
* tells a changed tree from an unchanged one; nothing here is a secret, so it needs no cryptographic strength. It is
|
|
10
|
+
* plain arithmetic on purpose: this file runs under Vite, which runs under Node, where `Bun` and `node:crypto`
|
|
11
|
+
* (removed from the sources) are not available, and under Bun alike. The same text gives the same string on both.
|
|
12
|
+
*/
|
|
13
|
+
static digest(opts) {
|
|
14
|
+
let h1 = 1779033703;
|
|
15
|
+
let h2 = 3144134277;
|
|
16
|
+
let h3 = 1013904242;
|
|
17
|
+
let h4 = 2773480762;
|
|
18
|
+
for (let index = 0; index < opts.text.length; index++) {
|
|
19
|
+
const code = opts.text.charCodeAt(index);
|
|
20
|
+
h1 = h2 ^ Math.imul(h1 ^ code, 597399067);
|
|
21
|
+
h2 = h3 ^ Math.imul(h2 ^ code, 2869860233);
|
|
22
|
+
h3 = h4 ^ Math.imul(h3 ^ code, 951274213);
|
|
23
|
+
h4 = h1 ^ Math.imul(h4 ^ code, 2716044179);
|
|
24
|
+
}
|
|
25
|
+
h1 = Math.imul(h3 ^ (h1 >>> 18), 597399067);
|
|
26
|
+
h2 = Math.imul(h4 ^ (h2 >>> 22), 2869860233);
|
|
27
|
+
h3 = Math.imul(h1 ^ (h3 >>> 17), 951274213);
|
|
28
|
+
h4 = Math.imul(h2 ^ (h4 >>> 19), 2716044179);
|
|
29
|
+
h1 ^= h2 ^ h3 ^ h4;
|
|
30
|
+
h2 ^= h1;
|
|
31
|
+
h3 ^= h1;
|
|
32
|
+
h4 ^= h1;
|
|
33
|
+
return [h1, h2, h3, h4].map((lane) => (lane >>> 0).toString(16).padStart(8, '0')).join('');
|
|
34
|
+
}
|
|
7
35
|
static location(opts) {
|
|
8
36
|
const root = resolve(opts.root);
|
|
9
|
-
const key =
|
|
37
|
+
const key = ArtifactScanCache.digest({ text: root }).slice(0, 16);
|
|
10
38
|
return join(dirname(root), 'node_modules', '.cache', 'ignis-artifacts', `${key}.json`);
|
|
11
39
|
}
|
|
12
40
|
/** Path, size and mtime of every `.ts`/`.tsx` under `root`, plus the package manifest and the nearest lockfile (a dependency upgrade can change which decorators count). */
|
|
@@ -38,9 +66,9 @@ export class ArtifactScanCache {
|
|
|
38
66
|
const stats = statSync(file);
|
|
39
67
|
entries.push(`${file}:${stats.size}:${stats.mtimeMs}`);
|
|
40
68
|
}
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
69
|
+
return ArtifactScanCache.digest({
|
|
70
|
+
text: `${ArtifactScanCache.VERSION}\n${entries.join('\n')}`,
|
|
71
|
+
});
|
|
44
72
|
}
|
|
45
73
|
/** The cached scan, or `undefined` for a missing, stale or unreadable cache - never an error. */
|
|
46
74
|
static read(opts) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scan-cache.js","sourceRoot":"","sources":["../../../src/bun/scan-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAyB,MAAM,qBAAqB,CAAC;AAEjF,oNAAoN;AACpN,MAAM,OAAO,iBAAiB;aACZ,YAAO,GAAG,CAAC,CAAC;IAE5B,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"scan-cache.js","sourceRoot":"","sources":["../../../src/bun/scan-cache.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,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;YAC5B,OAAO,IAAI,CAAC;YACZ,uKAAuK;QACzK,CAAC;QAAC,MAAM,CAAC;YACP,oGAAoG;YACpG,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC","sourcesContent":["import {\n existsSync,\n globSync,\n mkdirSync,\n readFileSync,\n renameSync,\n statSync,\n writeFileSync,\n} from 'node:fs';\nimport { dirname, join, resolve } from 'node:path';\nimport { ArtifactStereotypes, type IScannedArtifact } from '../generator/common';\n\n/** The scanner's answer for one `src`, kept under the package's `node_modules/.cache` and valid while no `.ts` file under `src`, the package manifest or the lockfile changed - a hit skips TypeScript entirely. */\nexport class ArtifactScanCache {\n static readonly VERSION = 2;\n\n /**\n * A 128-bit hash of `text` as 32 hex characters (cyrb128: four 32-bit lanes, public domain). It names a cache file and\n * tells a changed tree from an unchanged one; nothing here is a secret, so it needs no cryptographic strength. It is\n * plain arithmetic on purpose: this file runs under Vite, which runs under Node, where `Bun` and `node:crypto`\n * (removed from the sources) are not available, and under Bun alike. The same text gives the same string on both.\n */\n static digest(opts: { text: string }): string {\n let h1 = 1779033703;\n let h2 = 3144134277;\n let h3 = 1013904242;\n let h4 = 2773480762;\n\n for (let index = 0; index < opts.text.length; index++) {\n const code = opts.text.charCodeAt(index);\n h1 = h2 ^ Math.imul(h1 ^ code, 597399067);\n h2 = h3 ^ Math.imul(h2 ^ code, 2869860233);\n h3 = h4 ^ Math.imul(h3 ^ code, 951274213);\n h4 = h1 ^ Math.imul(h4 ^ code, 2716044179);\n }\n\n h1 = Math.imul(h3 ^ (h1 >>> 18), 597399067);\n h2 = Math.imul(h4 ^ (h2 >>> 22), 2869860233);\n h3 = Math.imul(h1 ^ (h3 >>> 17), 951274213);\n h4 = Math.imul(h2 ^ (h4 >>> 19), 2716044179);\n h1 ^= h2 ^ h3 ^ h4;\n h2 ^= h1;\n h3 ^= h1;\n h4 ^= h1;\n\n return [h1, h2, h3, h4].map((lane) => (lane >>> 0).toString(16).padStart(8, '0')).join('');\n }\n\n static location(opts: { root: string }): string {\n const root = resolve(opts.root);\n const key = ArtifactScanCache.digest({ text: root }).slice(0, 16);\n return join(dirname(root), 'node_modules', '.cache', 'ignis-artifacts', `${key}.json`);\n }\n\n /** Path, size and mtime of every `.ts`/`.tsx` under `root`, plus the package manifest and the nearest lockfile (a dependency upgrade can change which decorators count). */\n static fingerprint(opts: { root: string }): string {\n const root = resolve(opts.root);\n const entries: string[] = [];\n for (const relativePath of globSync(ArtifactStereotypes.SOURCE_GLOB, { cwd: root })) {\n const stats = statSync(join(root, relativePath));\n entries.push(`${relativePath}:${stats.size}:${stats.mtimeMs}`);\n }\n entries.sort();\n\n const extras = [join(dirname(root), 'package.json')];\n let directory = dirname(root);\n while (true) {\n const lockfile = ['bun.lock', 'bun.lockb', 'package-lock.json']\n .map((name) => join(directory, name))\n .find(existsSync);\n if (lockfile) {\n extras.push(lockfile);\n break;\n }\n const parent = dirname(directory);\n if (parent === directory) {\n break;\n }\n directory = parent;\n }\n for (const file of extras.filter(existsSync)) {\n const stats = statSync(file);\n entries.push(`${file}:${stats.size}:${stats.mtimeMs}`);\n }\n\n return ArtifactScanCache.digest({\n text: `${ArtifactScanCache.VERSION}\\n${entries.join('\\n')}`,\n });\n }\n\n /** The cached scan, or `undefined` for a missing, stale or unreadable cache - never an error. */\n static read(opts: { root: string }): IScannedArtifact[] | undefined {\n const file = ArtifactScanCache.location(opts);\n if (!existsSync(file)) {\n return undefined;\n }\n let stored: { fingerprint?: unknown; artifacts?: unknown };\n try {\n stored = JSON.parse(readFileSync(file, 'utf8'));\n // eslint-disable-next-line venizia/no-silent-catch -- a corrupt cache is a miss; the cause is not reported and the only cost is one fresh scan\n } catch {\n // A corrupt cache is a miss: the caller scans and rewrites it.\n return undefined;\n }\n if (\n stored.fingerprint !== ArtifactScanCache.fingerprint(opts) ||\n !Array.isArray(stored.artifacts)\n ) {\n return undefined;\n }\n return stored.artifacts;\n }\n\n /** Stores a scan; `false` when the cache directory cannot be written (a read-only install), which only costs the next start a scan. */\n static write(opts: { root: string; artifacts: IScannedArtifact[] }): boolean {\n const file = ArtifactScanCache.location(opts);\n const temporary = `${file}.${process.pid}.tmp`;\n try {\n mkdirSync(dirname(file), { recursive: true });\n writeFileSync(\n temporary,\n JSON.stringify({\n fingerprint: ArtifactScanCache.fingerprint(opts),\n artifacts: opts.artifacts,\n }),\n );\n renameSync(temporary, file);\n return true;\n // eslint-disable-next-line venizia/no-silent-catch -- the `false` returned below is the report; the cause of the failed write is lost and the next start pays one scan\n } catch {\n // Caching is an optimisation; reporting `false` lets the caller go on with the scan it already has.\n return false;\n }\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-boot",
|
|
3
|
-
"version": "0.4.7-
|
|
3
|
+
"version": "0.4.7-5",
|
|
4
4
|
"description": "Build-time artifact index generator for IGNIS applications: scans decorated classes with the TypeScript AST and emits one static registration file per package, so bun build --compile sees plain imports.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"artifact-index",
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
"test": "bun test ./src"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@venizia/ignis-helpers": "0.4.7-
|
|
82
|
+
"@venizia/ignis-helpers": "0.4.7-4",
|
|
83
83
|
"@venizia/ignis-inversion": "0.4.6-1"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@types/bun": "^1.4.3",
|
|
87
|
-
"@venizia/dev-configs": "0.4.7-
|
|
87
|
+
"@venizia/dev-configs": "0.4.7-4",
|
|
88
88
|
"eslint": "^10.13.0",
|
|
89
89
|
"oxlint": "1.89.0",
|
|
90
90
|
"oxlint-tsgolint": "7.0.2004",
|