@venizia/ignis-boot 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -23
- package/dist/cjs/build-info/common/constants.d.ts +1 -8
- package/dist/cjs/build-info/common/constants.d.ts.map +1 -0
- package/dist/cjs/build-info/common/constants.js +1 -10
- package/dist/cjs/build-info/common/constants.js.map +1 -1
- package/dist/cjs/build-info/common/index.d.ts +1 -1
- package/dist/cjs/build-info/common/index.d.ts.map +1 -0
- package/dist/cjs/build-info/common/index.js +0 -1
- package/dist/cjs/build-info/common/index.js.map +1 -1
- package/dist/cjs/build-info/index.d.ts +2 -7
- package/dist/cjs/build-info/index.d.ts.map +1 -0
- package/dist/cjs/build-info/index.js +1 -24
- package/dist/cjs/build-info/index.js.map +1 -1
- package/dist/cjs/build-info/resolver.d.ts +1 -0
- package/dist/cjs/build-info/resolver.d.ts.map +1 -0
- package/dist/cjs/build-info/stamp.d.ts +22 -0
- package/dist/cjs/build-info/stamp.d.ts.map +1 -0
- package/dist/cjs/build-info/stamp.js +36 -0
- package/dist/cjs/build-info/stamp.js.map +1 -0
- package/dist/cjs/bun/auto-group.d.ts +1 -0
- package/dist/cjs/bun/auto-group.d.ts.map +1 -0
- package/dist/cjs/bun/auto-loader.d.ts +1 -0
- package/dist/cjs/bun/auto-loader.d.ts.map +1 -0
- package/dist/cjs/bun/auto.d.ts +1 -0
- package/dist/cjs/bun/auto.d.ts.map +1 -0
- package/dist/cjs/bun/group-resolver.d.ts +1 -0
- package/dist/cjs/bun/group-resolver.d.ts.map +1 -0
- package/dist/cjs/bun/index.d.ts +1 -0
- package/dist/cjs/bun/index.d.ts.map +1 -0
- package/dist/cjs/bun/plugin.d.ts +1 -0
- package/dist/cjs/bun/plugin.d.ts.map +1 -0
- package/dist/cjs/bun/scan-cache.d.ts +1 -0
- package/dist/cjs/bun/scan-cache.d.ts.map +1 -0
- package/dist/cjs/bun/sources.d.ts +1 -0
- package/dist/cjs/bun/sources.d.ts.map +1 -0
- package/dist/cjs/clis/artifacts.d.ts +1 -0
- package/dist/cjs/clis/artifacts.d.ts.map +1 -0
- package/dist/cjs/common/install-quiet-logger.d.ts +1 -0
- package/dist/cjs/common/install-quiet-logger.d.ts.map +1 -0
- package/dist/cjs/common/quiet-logger.d.ts +1 -0
- package/dist/cjs/common/quiet-logger.d.ts.map +1 -0
- package/dist/cjs/generator/common/constants.d.ts +1 -0
- package/dist/cjs/generator/common/constants.d.ts.map +1 -0
- package/dist/cjs/generator/common/index.d.ts +1 -0
- package/dist/cjs/generator/common/index.d.ts.map +1 -0
- package/dist/cjs/generator/common/types.d.ts +1 -0
- package/dist/cjs/generator/common/types.d.ts.map +1 -0
- package/dist/cjs/generator/emitter.d.ts +1 -0
- package/dist/cjs/generator/emitter.d.ts.map +1 -0
- package/dist/cjs/generator/index.d.ts +1 -0
- package/dist/cjs/generator/index.d.ts.map +1 -0
- package/dist/cjs/generator/reexport.d.ts +1 -0
- package/dist/cjs/generator/reexport.d.ts.map +1 -0
- package/dist/cjs/generator/scanner.d.ts +1 -0
- package/dist/cjs/generator/scanner.d.ts.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/vite/index.d.ts +1 -0
- package/dist/cjs/vite/index.d.ts.map +1 -0
- package/dist/cjs/vite/plugin.d.ts +1 -0
- package/dist/cjs/vite/plugin.d.ts.map +1 -0
- package/dist/esm/build-info/common/constants.d.ts +1 -8
- package/dist/esm/build-info/common/constants.d.ts.map +1 -0
- package/dist/esm/build-info/common/constants.js +0 -8
- package/dist/esm/build-info/common/constants.js.map +1 -1
- package/dist/esm/build-info/common/index.d.ts +1 -1
- package/dist/esm/build-info/common/index.d.ts.map +1 -0
- package/dist/esm/build-info/common/index.js +0 -1
- package/dist/esm/build-info/common/index.js.map +1 -1
- package/dist/esm/build-info/index.d.ts +2 -7
- package/dist/esm/build-info/index.d.ts.map +1 -0
- package/dist/esm/build-info/index.js +1 -22
- package/dist/esm/build-info/index.js.map +1 -1
- package/dist/esm/build-info/resolver.d.ts +1 -0
- package/dist/esm/build-info/resolver.d.ts.map +1 -0
- package/dist/esm/build-info/stamp.d.ts +22 -0
- package/dist/esm/build-info/stamp.d.ts.map +1 -0
- package/dist/esm/build-info/stamp.js +32 -0
- package/dist/esm/build-info/stamp.js.map +1 -0
- package/dist/esm/bun/auto-group.d.ts +1 -0
- package/dist/esm/bun/auto-group.d.ts.map +1 -0
- package/dist/esm/bun/auto-loader.d.ts +1 -0
- package/dist/esm/bun/auto-loader.d.ts.map +1 -0
- package/dist/esm/bun/auto.d.ts +1 -0
- package/dist/esm/bun/auto.d.ts.map +1 -0
- package/dist/esm/bun/group-resolver.d.ts +1 -0
- package/dist/esm/bun/group-resolver.d.ts.map +1 -0
- package/dist/esm/bun/index.d.ts +1 -0
- package/dist/esm/bun/index.d.ts.map +1 -0
- package/dist/esm/bun/plugin.d.ts +1 -0
- package/dist/esm/bun/plugin.d.ts.map +1 -0
- package/dist/esm/bun/scan-cache.d.ts +1 -0
- package/dist/esm/bun/scan-cache.d.ts.map +1 -0
- package/dist/esm/bun/sources.d.ts +1 -0
- package/dist/esm/bun/sources.d.ts.map +1 -0
- package/dist/esm/clis/artifacts.d.ts +1 -0
- package/dist/esm/clis/artifacts.d.ts.map +1 -0
- package/dist/esm/common/install-quiet-logger.d.ts +1 -0
- package/dist/esm/common/install-quiet-logger.d.ts.map +1 -0
- package/dist/esm/common/quiet-logger.d.ts +1 -0
- package/dist/esm/common/quiet-logger.d.ts.map +1 -0
- package/dist/esm/generator/common/constants.d.ts +1 -0
- package/dist/esm/generator/common/constants.d.ts.map +1 -0
- package/dist/esm/generator/common/index.d.ts +1 -0
- package/dist/esm/generator/common/index.d.ts.map +1 -0
- package/dist/esm/generator/common/types.d.ts +1 -0
- package/dist/esm/generator/common/types.d.ts.map +1 -0
- package/dist/esm/generator/emitter.d.ts +1 -0
- package/dist/esm/generator/emitter.d.ts.map +1 -0
- package/dist/esm/generator/index.d.ts +1 -0
- package/dist/esm/generator/index.d.ts.map +1 -0
- package/dist/esm/generator/reexport.d.ts +1 -0
- package/dist/esm/generator/reexport.d.ts.map +1 -0
- package/dist/esm/generator/scanner.d.ts +1 -0
- package/dist/esm/generator/scanner.d.ts.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/vite/index.d.ts +1 -0
- package/dist/esm/vite/index.d.ts.map +1 -0
- package/dist/esm/vite/plugin.d.ts +1 -0
- package/dist/esm/vite/plugin.d.ts.map +1 -0
- package/package.json +5 -6
- package/dist/cjs/build-info/common/types.d.ts +0 -15
- package/dist/cjs/build-info/common/types.js +0 -3
- package/dist/cjs/build-info/common/types.js.map +0 -1
- package/dist/cjs/build-info/emitter.d.ts +0 -11
- package/dist/cjs/build-info/emitter.js +0 -26
- package/dist/cjs/build-info/emitter.js.map +0 -1
- package/dist/cjs/clis/build-info.d.ts +0 -2
- package/dist/cjs/clis/build-info.js +0 -48
- package/dist/cjs/clis/build-info.js.map +0 -1
- package/dist/esm/build-info/common/types.d.ts +0 -15
- package/dist/esm/build-info/common/types.js +0 -2
- package/dist/esm/build-info/common/types.js.map +0 -1
- package/dist/esm/build-info/emitter.d.ts +0 -11
- package/dist/esm/build-info/emitter.js +0 -22
- package/dist/esm/build-info/emitter.js.map +0 -1
- package/dist/esm/clis/build-info.d.ts +0 -2
- package/dist/esm/clis/build-info.js +0 -46
- package/dist/esm/clis/build-info.js.map +0 -1
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { type IBuildInfoOptions, type IBuildInfoResult } from './common/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Writes the stamp. Unlike the artifact index this ALWAYS writes: `builtAt` changes every run, so
|
|
4
|
-
* an unchanged-content short-circuit would be dead code that hides a stale timestamp.
|
|
5
|
-
*/
|
|
6
|
-
export declare const generateBuildInfo: (opts: IBuildInfoOptions) => Promise<IBuildInfoResult>;
|
|
7
1
|
export * from './common/index.js';
|
|
8
|
-
export * from './emitter.js';
|
|
9
2
|
export * from './resolver.js';
|
|
3
|
+
export * from './stamp.js';
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/build-info/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { BuildInfoFormats } from './common/index.js';
|
|
4
|
-
import { BuildInfoEmitter } from './emitter.js';
|
|
5
|
-
import { BuildInfoResolver } from './resolver.js';
|
|
6
|
-
/**
|
|
7
|
-
* Writes the stamp. Unlike the artifact index this ALWAYS writes: `builtAt` changes every run, so
|
|
8
|
-
* an unchanged-content short-circuit would be dead code that hides a stale timestamp.
|
|
9
|
-
*/
|
|
10
|
-
export const generateBuildInfo = async (opts) => {
|
|
11
|
-
const buildInfo = await BuildInfoResolver.getInstance().resolve({ root: opts.root });
|
|
12
|
-
const content = BuildInfoEmitter.render({
|
|
13
|
-
buildInfo,
|
|
14
|
-
format: opts.format ?? BuildInfoFormats.TS,
|
|
15
|
-
exportName: opts.exportName ?? BuildInfoEmitter.DEFAULT_EXPORT_NAME,
|
|
16
|
-
});
|
|
17
|
-
const out = resolve(opts.out);
|
|
18
|
-
mkdirSync(dirname(out), { recursive: true });
|
|
19
|
-
writeFileSync(out, content);
|
|
20
|
-
return { buildInfo, content, out };
|
|
21
|
-
};
|
|
22
1
|
export * from './common/index.js';
|
|
23
|
-
export * from './emitter.js';
|
|
24
2
|
export * from './resolver.js';
|
|
3
|
+
export * from './stamp.js';
|
|
25
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/build-info/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/build-info/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC","sourcesContent":["export * from './common';\nexport * from './resolver';\nexport * from './stamp';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver.d.ts","sourceRoot":"","sources":["../../../src/build-info/resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAqB,KAAK,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAQvF;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,UAAU;IAC/C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAoB;IAE5C,OAAO;IAIP,MAAM,CAAC,WAAW,IAAI,iBAAiB;IAIjC,OAAO,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAkClE,OAAO,CAAC,uBAAuB;IAW/B;;;OAGG;YACW,eAAe;IA4B7B,iIAAiI;IACjI,OAAO,CAAC,eAAe;CAyBxB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The build stamp, decided where it is cheap: a compile bakes it into the binary, a run from
|
|
3
|
+
* source resolves it from git when the application starts.
|
|
4
|
+
*
|
|
5
|
+
* `define()` is for the compile script, `register()` for the entrypoint. A binary that carries the
|
|
6
|
+
* stamp never runs git; the resolver is the only code here, and it needs no TypeScript scanner.
|
|
7
|
+
*/
|
|
8
|
+
export declare class BuildInfoStamp {
|
|
9
|
+
/** The identifier `define()` replaces in the bundle and `register()` reads. */
|
|
10
|
+
static readonly GLOBAL_NAME = "IGNIS_BUILD_INFO";
|
|
11
|
+
/** The `define` record for a compile: resolves the stamp now and returns it under {@link BuildInfoStamp.GLOBAL_NAME}. */
|
|
12
|
+
static define(opts?: {
|
|
13
|
+
root?: string;
|
|
14
|
+
}): Promise<Record<string, string>>;
|
|
15
|
+
/**
|
|
16
|
+
* Registers the stamp in {@link BuildInfoRegistry}: the baked value when the compile defined it,
|
|
17
|
+
* else the resolver's. Only `commit`, `branch` and `builtAt` are set - `service` and `version`
|
|
18
|
+
* stay with the application's `getAppInfo()`, which the health reporter reads when they are absent.
|
|
19
|
+
*/
|
|
20
|
+
static register(): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=stamp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stamp.d.ts","sourceRoot":"","sources":["../../../src/build-info/stamp.ts"],"names":[],"mappings":"AAOA;;;;;;GAMG;AACH,qBAAa,cAAc;IACzB,+EAA+E;IAC/E,MAAM,CAAC,QAAQ,CAAC,WAAW,sBAAsB;IAEjD,yHAAyH;WAC5G,MAAM,CAAC,IAAI,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAK9E;;;;OAIG;WACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAUvC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { BuildInfoRegistry } from '@venizia/ignis-helpers/core';
|
|
2
|
+
import { BuildInfoResolver } from './resolver.js';
|
|
3
|
+
/**
|
|
4
|
+
* The build stamp, decided where it is cheap: a compile bakes it into the binary, a run from
|
|
5
|
+
* source resolves it from git when the application starts.
|
|
6
|
+
*
|
|
7
|
+
* `define()` is for the compile script, `register()` for the entrypoint. A binary that carries the
|
|
8
|
+
* stamp never runs git; the resolver is the only code here, and it needs no TypeScript scanner.
|
|
9
|
+
*/
|
|
10
|
+
export class BuildInfoStamp {
|
|
11
|
+
/** The identifier `define()` replaces in the bundle and `register()` reads. */
|
|
12
|
+
static { this.GLOBAL_NAME = 'IGNIS_BUILD_INFO'; }
|
|
13
|
+
/** The `define` record for a compile: resolves the stamp now and returns it under {@link BuildInfoStamp.GLOBAL_NAME}. */
|
|
14
|
+
static async define(opts) {
|
|
15
|
+
const stamp = await BuildInfoResolver.getInstance().resolve(opts);
|
|
16
|
+
return { [BuildInfoStamp.GLOBAL_NAME]: JSON.stringify(stamp) };
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Registers the stamp in {@link BuildInfoRegistry}: the baked value when the compile defined it,
|
|
20
|
+
* else the resolver's. Only `commit`, `branch` and `builtAt` are set - `service` and `version`
|
|
21
|
+
* stay with the application's `getAppInfo()`, which the health reporter reads when they are absent.
|
|
22
|
+
*/
|
|
23
|
+
static async register() {
|
|
24
|
+
const stamp = typeof IGNIS_BUILD_INFO !== 'undefined'
|
|
25
|
+
? IGNIS_BUILD_INFO
|
|
26
|
+
: await BuildInfoResolver.getInstance().resolve();
|
|
27
|
+
BuildInfoRegistry.set({
|
|
28
|
+
buildInfo: { commit: stamp.commit, branch: stamp.branch, builtAt: stamp.builtAt },
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=stamp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stamp.js","sourceRoot":"","sources":["../../../src/build-info/stamp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAyB,MAAM,6BAA6B,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAM/C;;;;;;GAMG;AACH,MAAM,OAAO,cAAc;IACzB,+EAA+E;aAC/D,gBAAW,GAAG,kBAAkB,CAAC;IAEjD,yHAAyH;IACzH,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,IAAwB;QAC1C,MAAM,KAAK,GAAG,MAAM,iBAAiB,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClE,OAAO,EAAE,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;IACjE,CAAC;IAED;;;;OAIG;IACH,MAAM,CAAC,KAAK,CAAC,QAAQ;QACnB,MAAM,KAAK,GACT,OAAO,gBAAgB,KAAK,WAAW;YACrC,CAAC,CAAC,gBAAgB;YAClB,CAAC,CAAC,MAAM,iBAAiB,CAAC,WAAW,EAAE,CAAC,OAAO,EAAE,CAAC;QAEtD,iBAAiB,CAAC,GAAG,CAAC;YACpB,SAAS,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE;SAClF,CAAC,CAAC;IACL,CAAC","sourcesContent":["import { BuildInfoRegistry, type TBuildInfoRecord } from '@venizia/ignis-helpers/core';\nimport { BuildInfoResolver } from './resolver';\n\n// A compile bakes the stamp in under this name (`define`); a run from source has no such name.\n// The identifier below must spell the same as `BuildInfoStamp.GLOBAL_NAME`.\ndeclare const IGNIS_BUILD_INFO: TBuildInfoRecord | undefined;\n\n/**\n * The build stamp, decided where it is cheap: a compile bakes it into the binary, a run from\n * source resolves it from git when the application starts.\n *\n * `define()` is for the compile script, `register()` for the entrypoint. A binary that carries the\n * stamp never runs git; the resolver is the only code here, and it needs no TypeScript scanner.\n */\nexport class BuildInfoStamp {\n /** The identifier `define()` replaces in the bundle and `register()` reads. */\n static readonly GLOBAL_NAME = 'IGNIS_BUILD_INFO';\n\n /** The `define` record for a compile: resolves the stamp now and returns it under {@link BuildInfoStamp.GLOBAL_NAME}. */\n static async define(opts?: { root?: string }): Promise<Record<string, string>> {\n const stamp = await BuildInfoResolver.getInstance().resolve(opts);\n return { [BuildInfoStamp.GLOBAL_NAME]: JSON.stringify(stamp) };\n }\n\n /**\n * Registers the stamp in {@link BuildInfoRegistry}: the baked value when the compile defined it,\n * else the resolver's. Only `commit`, `branch` and `builtAt` are set - `service` and `version`\n * stay with the application's `getAppInfo()`, which the health reporter reads when they are absent.\n */\n static async register(): Promise<void> {\n const stamp =\n typeof IGNIS_BUILD_INFO !== 'undefined'\n ? IGNIS_BUILD_INFO\n : await BuildInfoResolver.getInstance().resolve();\n\n BuildInfoRegistry.set({\n buildInfo: { commit: stamp.commit, branch: stamp.branch, builtAt: stamp.builtAt },\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-group.d.ts","sourceRoot":"","sources":["../../../src/bun/auto-group.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAE5D,+RAA+R;AAC/R,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,eAAe,EAAG,IAAI,CAAU;IACzC,QAAQ,CAAC,MAAM,YAAa;IAC5B,QAAQ,CAAC,IAAI,YAAa;IAC1B,QAAQ,CAAC,OAAO,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACtD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAuD;gBAEpE,IAAI,EAAE;QAChB,OAAO,CAAC,EAAE,uBAAuB,CAAC;QAClC,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,uBAAuB,CAAC,CAAC;KAClD;IAKK,OAAO,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAYjD,OAAO,CAAC,MAAM,CAAC,UAAU;IAOzB,IAAI,cAAc,IAAI,KAAK,CAE1B;IAED,IAAI,WAAW,IAAI,KAAK,CAEvB;IAED,IAAI,UAAU,IAAI,KAAK,CAEtB;IAED,IAAI,YAAY,IAAI,KAAK,CAExB;IAED,IAAI,QAAQ,IAAI,KAAK,CAEpB;IAED,IAAI,WAAW,IAAI,KAAK,CAEvB;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto-loader.d.ts","sourceRoot":"","sources":["../../../src/bun/auto-loader.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC7B,MAAM,qBAAqB,CAAC;AAG7B,0MAA0M;AAC1M,qBAAa,mBAAmB;IAC9B,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI;WASxC,IAAI,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAyBrD,2HAA2H;WAC9G,WAAW,CAAC,IAAI,EAAE;QAC7B,SAAS,EAAE,gBAAgB,EAAE,CAAC;KAC/B,GAAG,OAAO,CAAC,uBAAuB,CAAC;CA2BrC"}
|
package/dist/esm/bun/auto.d.ts
CHANGED
|
@@ -2,3 +2,4 @@ import { AutoArtifactGroup } from './auto-group.js';
|
|
|
2
2
|
/** The application's own decorated classes, found by the scanner - pass it in `configs.artifacts`. From source the run-time plugin builds the index when artifacts are registered; in a binary built with `IgnisArtifactsPlugin` this module is replaced by one carrying the built index. */
|
|
3
3
|
declare const AutoArtifacts: AutoArtifactGroup;
|
|
4
4
|
export default AutoArtifacts;
|
|
5
|
+
//# sourceMappingURL=auto.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auto.d.ts","sourceRoot":"","sources":["../../../src/bun/auto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAOjD,6RAA6R;AAC7R,QAAA,MAAM,aAAa,mBAAuE,CAAC;AAE3F,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"group-resolver.d.ts","sourceRoot":"","sources":["../../../src/bun/group-resolver.ts"],"names":[],"mappings":"AAEA,OAAO,EAAuB,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAIxF,2OAA2O;AAC3O,qBAAa,sBAAsB;IACjC,uGAAuG;IACvG,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAA+D;WAE5E,OAAO,CAAC,IAAI,EAAE;QACzB,KAAK,EAAE;YACL,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;YAC3B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;YACzB,MAAM,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;SAChC,CAAC;KACH,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA8BpC,mIAAmI;IACnI,MAAM,CAAC,OAAO,IAAI,IAAI;CAavB"}
|
package/dist/esm/bun/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bun/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC"}
|
package/dist/esm/bun/plugin.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/bun/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAQrC,6QAA6Q;AAC7Q,qBAAa,oBAAoB;IAC/B,MAAM,CAAC,QAAQ,CAAC,IAAI,qBAAqB;IACzC,MAAM,CAAC,QAAQ,CAAC,OAAO,qBAAqB;IAC5C,MAAM,CAAC,QAAQ,CAAC,WAAW,wBAAwB;IAEnD,+IAA+I;IAC/I,MAAM,CAAC,QAAQ,CAAC,WAAW,SAC0F;IAErH,oHAAoH;IACpH,MAAM,CAAC,QAAQ,CAAC,WAAW,SAAsD;IAEjF,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAA8D;IAMjG,8GAA8G;IAC9G,MAAM,CAAC,WAAW,CAA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MAAM,CAAA;KAAE,GAAG,MAAM,EAAE;IA4D7D,kRAAkR;IAClR,MAAM,CAAC,MAAM,CACX,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAO,GACrF,SAAS;IAgEZ,gFAAgF;WACnE,eAAe,CAAC,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,IAAI,CAAC;CAO1E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan-cache.d.ts","sourceRoot":"","sources":["../../../src/bun/scan-cache.ts"],"names":[],"mappings":"AAWA,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;IAqBnE,uIAAuI;IACvI,MAAM,CAAC,KAAK,CAAC,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,gBAAgB,EAAE,CAAA;KAAE,GAAG,OAAO;CAmB7E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sources.d.ts","sourceRoot":"","sources":["../../../src/bun/sources.ts"],"names":[],"mappings":"AAGA,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,EAAE,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,gBAAgB,EAAE;IAiCtB,yFAAyF;IACzF,MAAM,CAAC,KAAK,IAAI,IAAI;CAGrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"artifacts.d.ts","sourceRoot":"","sources":["../../../src/clis/artifacts.ts"],"names":[],"mappings":";AACA,OAAO,gCAAgC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-quiet-logger.d.ts","sourceRoot":"","sources":["../../../src/common/install-quiet-logger.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quiet-logger.d.ts","sourceRoot":"","sources":["../../../src/common/quiet-logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAGtE,mMAAmM;AACnM,qBAAa,WAAY,YAAW,OAAO;IAIrB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAH1C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAkC;IAC/D,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAEhC,OAAO;IAIP,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAWlC,OAAO,CAAC,KAAK;IAIb,KAAK,IAAI,IAAI;IAEb,IAAI,IAAI,IAAI;IAEZ,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAI/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI;IAIhD,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,GA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C"}
|
|
@@ -30,3 +30,4 @@ export interface IScanReport {
|
|
|
30
30
|
}
|
|
31
31
|
/** The object a generated index exports - structurally the kernel's `IArtifactIndex` (boot does not depend on the kernel). */
|
|
32
32
|
export type TGeneratedArtifactIndex = Partial<Record<TArtifactIndexField, ReadonlyArray<TClass<AnyType>>>>;
|
|
33
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/generator/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvF,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,2CAA2C;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,aAAa,CAAC;CACrB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,0FAA0F;IAC1F,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,wKAAwK;IACxK,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,gMAAgM;IAChM,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,uDAAuD;AACvD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,4IAA4I;AAC5I,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,gBAAgB,EAAE,CAAC;IAC9B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,qGAAqG;IACrG,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAED,8HAA8H;AAC9H,MAAM,MAAM,uBAAuB,GAAG,OAAO,CAC3C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E,CAAC;YAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC;KACrF,GAAG,MAAM;IAoCV,qIAAqI;IACrI,OAAO,CAAC,MAAM,CAAC,WAAW;IAW1B,OAAO,CAAC,MAAM,CAAC,UAAU;CAU1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generator/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAI9D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,mEAAmE;IACnE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gGAAgG;IAChG,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;CAC1B;AAuBD,0GAA0G;AAC1G,eAAO,MAAM,qBAAqB,GAChC,MAAM,gBAAgB,KACrB;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,GAAG,WAa1C,CAAC;AAKF,4GAA4G;AAC5G,eAAO,MAAM,kBAAkB,GAC7B,MAAM,gBAAgB,KACrB;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAAC;CAQ7B,CAAC;AAEF,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reexport.d.ts","sourceRoot":"","sources":["../../../src/generator/reexport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,8OAA8O;AAC9O,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C/J,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW;IA8B/C,oIAAoI;IACpI,OAAO,CAAC,cAAc;IActB,OAAO,CAAC,aAAa;IAMrB,uJAAuJ;IACvJ,OAAO,CAAC,oBAAoB;IAuB5B,OAAO,CAAC,QAAQ;IAgFhB,sIAAsI;IACtI,OAAO,CAAC,wBAAwB;IAkDhC,6HAA6H;IAC7H,OAAO,CAAC,0BAA0B;IAgBlC,OAAO,CAAC,wBAAwB;IAkBhC,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,oBAAoB;IA6B5B,OAAO,CAAC,cAAc;CAMvB"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC"}
|
package/dist/esm/vite/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vite/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../../src/vite/plugin.ts"],"names":[],"mappings":"AAKA,4HAA4H;AAC5H,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,KAAK,CAAC;IACf,MAAM,EAAE,MAAM;QAAE,YAAY,EAAE;YAAE,OAAO,EAAE,MAAM,EAAE,CAAA;SAAE,CAAA;KAAE,CAAC;IACtD,cAAc,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnD,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IAC9C,IAAI,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACzC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;CAC7D;AAED,mWAAmW;AACnW,qBAAa,wBAAwB;IACnC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,SAAuC;IAMvE,6FAA6F;IAC7F,MAAM,CAAC,MAAM,CAAC,IAAI,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,gBAAgB;CAsC9D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@venizia/ignis-boot",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
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",
|
|
@@ -97,12 +97,12 @@
|
|
|
97
97
|
"test:watch": "NODE_ENV=test bun test --watch --env-file=.env.test"
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
|
-
"@venizia/ignis-helpers": "0.3.
|
|
101
|
-
"@venizia/ignis-inversion": "0.3.
|
|
100
|
+
"@venizia/ignis-helpers": "0.3.3",
|
|
101
|
+
"@venizia/ignis-inversion": "0.3.4"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@types/bun": "^1.4.1",
|
|
105
|
-
"@venizia/dev-configs": "0.3.
|
|
105
|
+
"@venizia/dev-configs": "0.3.3",
|
|
106
106
|
"eslint": "^10.10.0",
|
|
107
107
|
"oxfmt": "0.73.0",
|
|
108
108
|
"oxlint": "1.88.0",
|
|
@@ -114,7 +114,6 @@
|
|
|
114
114
|
"typescript": "^5.0.0 || ^6.0.0"
|
|
115
115
|
},
|
|
116
116
|
"bin": {
|
|
117
|
-
"ignis-artifacts": "./dist/cjs/clis/artifacts.js"
|
|
118
|
-
"ignis-build-info": "./dist/cjs/clis/build-info.js"
|
|
117
|
+
"ignis-artifacts": "./dist/cjs/clis/artifacts.js"
|
|
119
118
|
}
|
|
120
119
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';
|
|
2
|
-
import type { TBuildInfoFormat } from './constants';
|
|
3
|
-
export interface IBuildInfoOptions {
|
|
4
|
-
out: string;
|
|
5
|
-
/** Where `package.json` is read from and where `git` is asked; default the cwd. */
|
|
6
|
-
root?: string;
|
|
7
|
-
format?: TBuildInfoFormat;
|
|
8
|
-
/** Name of the exported constant in `ts` format; default `BUILD_INFO`. */
|
|
9
|
-
exportName?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IBuildInfoResult {
|
|
12
|
-
buildInfo: TBuildInfoRecord;
|
|
13
|
-
content: string;
|
|
14
|
-
out: string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/build-info/common/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';\nimport type { TBuildInfoFormat } from './constants';\n\nexport interface IBuildInfoOptions {\n out: string;\n /** Where `package.json` is read from and where `git` is asked; default the cwd. */\n root?: string;\n format?: TBuildInfoFormat;\n /** Name of the exported constant in `ts` format; default `BUILD_INFO`. */\n exportName?: string;\n}\n\nexport interface IBuildInfoResult {\n buildInfo: TBuildInfoRecord;\n content: string;\n out: string;\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';
|
|
2
|
-
import { type TBuildInfoFormat } from './common';
|
|
3
|
-
/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */
|
|
4
|
-
export declare class BuildInfoEmitter {
|
|
5
|
-
static readonly DEFAULT_EXPORT_NAME = "BUILD_INFO";
|
|
6
|
-
static render(opts: {
|
|
7
|
-
buildInfo: TBuildInfoRecord;
|
|
8
|
-
format: TBuildInfoFormat;
|
|
9
|
-
exportName: string;
|
|
10
|
-
}): string;
|
|
11
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BuildInfoEmitter = void 0;
|
|
4
|
-
const common_1 = require("./common");
|
|
5
|
-
/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */
|
|
6
|
-
class BuildInfoEmitter {
|
|
7
|
-
static { this.DEFAULT_EXPORT_NAME = 'BUILD_INFO'; }
|
|
8
|
-
static render(opts) {
|
|
9
|
-
const { buildInfo, format, exportName } = opts;
|
|
10
|
-
if (format === common_1.BuildInfoFormats.JSON) {
|
|
11
|
-
return `${JSON.stringify(buildInfo, null, 2)}\n`;
|
|
12
|
-
}
|
|
13
|
-
const fields = Object.entries(buildInfo)
|
|
14
|
-
.map(([key, value]) => ` ${key}: ${JSON.stringify(value)},`)
|
|
15
|
-
.join('\n');
|
|
16
|
-
return [
|
|
17
|
-
'// AUTO-GENERATED by @venizia/ignis-boot - do not edit. Regenerate: ignis-build-info generate',
|
|
18
|
-
`export const ${exportName} = {`,
|
|
19
|
-
fields,
|
|
20
|
-
'} as const;',
|
|
21
|
-
'',
|
|
22
|
-
].join('\n');
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.BuildInfoEmitter = BuildInfoEmitter;
|
|
26
|
-
//# sourceMappingURL=emitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../../src/build-info/emitter.ts"],"names":[],"mappings":";;;AACA,qCAAmE;AAEnE,+HAA+H;AAC/H,MAAa,gBAAgB;aACX,wBAAmB,GAAG,YAAY,CAAC;IAEnD,MAAM,CAAC,MAAM,CAAC,IAIb;QACC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE/C,IAAI,MAAM,KAAK,yBAAgB,CAAC,IAAI,EAAE,CAAC;YACrC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QACnD,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aACrC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;aAC5D,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO;YACL,+FAA+F;YAC/F,gBAAgB,UAAU,MAAM;YAChC,MAAM;YACN,aAAa;YACb,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC;;AAzBH,4CA0BC","sourcesContent":["import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';\nimport { BuildInfoFormats, type TBuildInfoFormat } from './common';\n\n/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */\nexport class BuildInfoEmitter {\n static readonly DEFAULT_EXPORT_NAME = 'BUILD_INFO';\n\n static render(opts: {\n buildInfo: TBuildInfoRecord;\n format: TBuildInfoFormat;\n exportName: string;\n }): string {\n const { buildInfo, format, exportName } = opts;\n\n if (format === BuildInfoFormats.JSON) {\n return `${JSON.stringify(buildInfo, null, 2)}\\n`;\n }\n\n const fields = Object.entries(buildInfo)\n .map(([key, value]) => ` ${key}: ${JSON.stringify(value)},`)\n .join('\\n');\n\n return [\n '// AUTO-GENERATED by @venizia/ignis-boot - do not edit. Regenerate: ignis-build-info generate',\n `export const ${exportName} = {`,\n fields,\n '} as const;',\n '',\n ].join('\\n');\n }\n}\n"]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
require("../common/install-quiet-logger");
|
|
5
|
-
const node_util_1 = require("node:util");
|
|
6
|
-
const build_info_1 = require("../build-info");
|
|
7
|
-
const USAGE = 'ignis-build-info generate [--out src/_build_info.ts] [--root .] [--format ts|json] [--export BUILD_INFO]';
|
|
8
|
-
const { positionals, values } = (0, node_util_1.parseArgs)({
|
|
9
|
-
args: process.argv.slice(2),
|
|
10
|
-
allowPositionals: true,
|
|
11
|
-
options: {
|
|
12
|
-
out: { type: 'string', default: 'src/_build_info.ts' },
|
|
13
|
-
root: { type: 'string', default: '.' },
|
|
14
|
-
format: { type: 'string', default: build_info_1.BuildInfoFormats.TS },
|
|
15
|
-
export: { type: 'string', default: build_info_1.BuildInfoEmitter.DEFAULT_EXPORT_NAME },
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
/** Exit code of the command, so the process exits in exactly one place. */
|
|
19
|
-
const run = async () => {
|
|
20
|
-
if (positionals[0] !== 'generate') {
|
|
21
|
-
console.error(USAGE);
|
|
22
|
-
return 1;
|
|
23
|
-
}
|
|
24
|
-
if (!build_info_1.BuildInfoFormats.isValid(values.format)) {
|
|
25
|
-
console.error(`invalid --format '${values.format}' | expected one of: ${[...build_info_1.BuildInfoFormats.SCHEME_SET].join(', ')}`);
|
|
26
|
-
return 1;
|
|
27
|
-
}
|
|
28
|
-
// Narrowed by comparison, never asserted: `isValid` above already refused everything else.
|
|
29
|
-
const format = values.format === build_info_1.BuildInfoFormats.JSON ? build_info_1.BuildInfoFormats.JSON : build_info_1.BuildInfoFormats.TS;
|
|
30
|
-
const result = await (0, build_info_1.generateBuildInfo)({
|
|
31
|
-
out: values.out,
|
|
32
|
-
root: values.root,
|
|
33
|
-
format,
|
|
34
|
-
exportName: values.export,
|
|
35
|
-
});
|
|
36
|
-
const { service, version, commit, branch } = result.buildInfo;
|
|
37
|
-
console.log(`wrote ${values.out} | ${service}@${version} | ${commit} (${branch})`);
|
|
38
|
-
return 0;
|
|
39
|
-
};
|
|
40
|
-
run()
|
|
41
|
-
.then(code => {
|
|
42
|
-
process.exit(code);
|
|
43
|
-
})
|
|
44
|
-
.catch(error => {
|
|
45
|
-
console.error(error);
|
|
46
|
-
process.exit(1);
|
|
47
|
-
});
|
|
48
|
-
//# sourceMappingURL=build-info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"build-info.js","sourceRoot":"","sources":["../../../src/clis/build-info.ts"],"names":[],"mappings":";;;AACA,0CAAwC;AACxC,yCAAsC;AACtC,8CAAsF;AAEtF,MAAM,KAAK,GACT,0GAA0G,CAAC;AAE7G,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,GAAG,IAAA,qBAAS,EAAC;IACxC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3B,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE;QACP,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,oBAAoB,EAAE;QACtD,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE;QACtC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,6BAAgB,CAAC,EAAE,EAAE;QACxD,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,6BAAgB,CAAC,mBAAmB,EAAE;KAC1E;CACF,CAAC,CAAC;AAEH,2EAA2E;AAC3E,MAAM,GAAG,GAAG,KAAK,IAAqB,EAAE;IACtC,IAAI,WAAW,CAAC,CAAC,CAAC,KAAK,UAAU,EAAE,CAAC;QAClC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,CAAC;IACX,CAAC;IAED,IAAI,CAAC,6BAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7C,OAAO,CAAC,KAAK,CACX,qBAAqB,MAAM,CAAC,MAAM,wBAAwB,CAAC,GAAG,6BAAgB,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACxG,CAAC;QACF,OAAO,CAAC,CAAC;IACX,CAAC;IAED,2FAA2F;IAC3F,MAAM,MAAM,GACV,MAAM,CAAC,MAAM,KAAK,6BAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,6BAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,6BAAgB,CAAC,EAAE,CAAC;IAExF,MAAM,MAAM,GAAG,MAAM,IAAA,8BAAiB,EAAC;QACrC,GAAG,EAAE,MAAM,CAAC,GAAG;QACf,IAAI,EAAE,MAAM,CAAC,IAAI;QACjB,MAAM;QACN,UAAU,EAAE,MAAM,CAAC,MAAM;KAC1B,CAAC,CAAC;IAEH,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;IAC9D,OAAO,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,MAAM,OAAO,IAAI,OAAO,MAAM,MAAM,KAAK,MAAM,GAAG,CAAC,CAAC;IAEnF,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAEF,GAAG,EAAE;KACF,IAAI,CAAC,IAAI,CAAC,EAAE;IACX,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACrB,CAAC,CAAC;KACD,KAAK,CAAC,KAAK,CAAC,EAAE;IACb,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC","sourcesContent":["#!/usr/bin/env bun\nimport '../common/install-quiet-logger';\nimport { parseArgs } from 'node:util';\nimport { BuildInfoEmitter, BuildInfoFormats, generateBuildInfo } from '../build-info';\n\nconst USAGE =\n 'ignis-build-info generate [--out src/_build_info.ts] [--root .] [--format ts|json] [--export BUILD_INFO]';\n\nconst { positionals, values } = parseArgs({\n args: process.argv.slice(2),\n allowPositionals: true,\n options: {\n out: { type: 'string', default: 'src/_build_info.ts' },\n root: { type: 'string', default: '.' },\n format: { type: 'string', default: BuildInfoFormats.TS },\n export: { type: 'string', default: BuildInfoEmitter.DEFAULT_EXPORT_NAME },\n },\n});\n\n/** Exit code of the command, so the process exits in exactly one place. */\nconst run = async (): Promise<number> => {\n if (positionals[0] !== 'generate') {\n console.error(USAGE);\n return 1;\n }\n\n if (!BuildInfoFormats.isValid(values.format)) {\n console.error(\n `invalid --format '${values.format}' | expected one of: ${[...BuildInfoFormats.SCHEME_SET].join(', ')}`,\n );\n return 1;\n }\n\n // Narrowed by comparison, never asserted: `isValid` above already refused everything else.\n const format =\n values.format === BuildInfoFormats.JSON ? BuildInfoFormats.JSON : BuildInfoFormats.TS;\n\n const result = await generateBuildInfo({\n out: values.out,\n root: values.root,\n format,\n exportName: values.export,\n });\n\n const { service, version, commit, branch } = result.buildInfo;\n console.log(`wrote ${values.out} | ${service}@${version} | ${commit} (${branch})`);\n\n return 0;\n};\n\nrun()\n .then(code => {\n process.exit(code);\n })\n .catch(error => {\n console.error(error);\n process.exit(1);\n });\n"]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';
|
|
2
|
-
import type { TBuildInfoFormat } from './constants.js';
|
|
3
|
-
export interface IBuildInfoOptions {
|
|
4
|
-
out: string;
|
|
5
|
-
/** Where `package.json` is read from and where `git` is asked; default the cwd. */
|
|
6
|
-
root?: string;
|
|
7
|
-
format?: TBuildInfoFormat;
|
|
8
|
-
/** Name of the exported constant in `ts` format; default `BUILD_INFO`. */
|
|
9
|
-
exportName?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface IBuildInfoResult {
|
|
12
|
-
buildInfo: TBuildInfoRecord;
|
|
13
|
-
content: string;
|
|
14
|
-
out: string;
|
|
15
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/build-info/common/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';\nimport type { TBuildInfoFormat } from './constants';\n\nexport interface IBuildInfoOptions {\n out: string;\n /** Where `package.json` is read from and where `git` is asked; default the cwd. */\n root?: string;\n format?: TBuildInfoFormat;\n /** Name of the exported constant in `ts` format; default `BUILD_INFO`. */\n exportName?: string;\n}\n\nexport interface IBuildInfoResult {\n buildInfo: TBuildInfoRecord;\n content: string;\n out: string;\n}\n"]}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';
|
|
2
|
-
import { type TBuildInfoFormat } from './common/index.js';
|
|
3
|
-
/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */
|
|
4
|
-
export declare class BuildInfoEmitter {
|
|
5
|
-
static readonly DEFAULT_EXPORT_NAME = "BUILD_INFO";
|
|
6
|
-
static render(opts: {
|
|
7
|
-
buildInfo: TBuildInfoRecord;
|
|
8
|
-
format: TBuildInfoFormat;
|
|
9
|
-
exportName: string;
|
|
10
|
-
}): string;
|
|
11
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { BuildInfoFormats } from './common/index.js';
|
|
2
|
-
/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */
|
|
3
|
-
export class BuildInfoEmitter {
|
|
4
|
-
static { this.DEFAULT_EXPORT_NAME = 'BUILD_INFO'; }
|
|
5
|
-
static render(opts) {
|
|
6
|
-
const { buildInfo, format, exportName } = opts;
|
|
7
|
-
if (format === BuildInfoFormats.JSON) {
|
|
8
|
-
return `${JSON.stringify(buildInfo, null, 2)}\n`;
|
|
9
|
-
}
|
|
10
|
-
const fields = Object.entries(buildInfo)
|
|
11
|
-
.map(([key, value]) => ` ${key}: ${JSON.stringify(value)},`)
|
|
12
|
-
.join('\n');
|
|
13
|
-
return [
|
|
14
|
-
'// AUTO-GENERATED by @venizia/ignis-boot - do not edit. Regenerate: ignis-build-info generate',
|
|
15
|
-
`export const ${exportName} = {`,
|
|
16
|
-
fields,
|
|
17
|
-
'} as const;',
|
|
18
|
-
'',
|
|
19
|
-
].join('\n');
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=emitter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emitter.js","sourceRoot":"","sources":["../../../src/build-info/emitter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAyB,MAAM,UAAU,CAAC;AAEnE,+HAA+H;AAC/H,MAAM,OAAO,gBAAgB;aACX,wBAAmB,GAAG,YAAY,CAAC;IAEnD,MAAM,CAAC,MAAM,CAAC,IAIb;QACC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE/C,IAAI,MAAM,KAAK,gBAAgB,CAAC,IAAI,EAAE,CAAC;YACrC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC;QACnD,CAAC;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC;aACrC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,KAAK,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;aAC5D,IAAI,CAAC,IAAI,CAAC,CAAC;QAEd,OAAO;YACL,+FAA+F;YAC/F,gBAAgB,UAAU,MAAM;YAChC,MAAM;YACN,aAAa;YACb,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACf,CAAC","sourcesContent":["import type { TBuildInfoRecord } from '@venizia/ignis-helpers/core';\nimport { BuildInfoFormats, type TBuildInfoFormat } from './common';\n\n/** Renders the stamp: a static `ts` const a bundler bakes in, or the same record as `json` for a Vite app or a Tauri shell. */\nexport class BuildInfoEmitter {\n static readonly DEFAULT_EXPORT_NAME = 'BUILD_INFO';\n\n static render(opts: {\n buildInfo: TBuildInfoRecord;\n format: TBuildInfoFormat;\n exportName: string;\n }): string {\n const { buildInfo, format, exportName } = opts;\n\n if (format === BuildInfoFormats.JSON) {\n return `${JSON.stringify(buildInfo, null, 2)}\\n`;\n }\n\n const fields = Object.entries(buildInfo)\n .map(([key, value]) => ` ${key}: ${JSON.stringify(value)},`)\n .join('\\n');\n\n return [\n '// AUTO-GENERATED by @venizia/ignis-boot - do not edit. Regenerate: ignis-build-info generate',\n `export const ${exportName} = {`,\n fields,\n '} as const;',\n '',\n ].join('\\n');\n }\n}\n"]}
|