@genesislcap/genx 15.17.0 → 15.18.0
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 +6 -0
- package/dist/commands/generate-event-types.d.ts +3 -1
- package/dist/commands/generate-event-types.d.ts.map +1 -1
- package/dist/commands/generate-event-types.js +4 -2
- package/dist/commands/index.d.ts +3 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/utils/event-types.d.ts +1 -0
- package/dist/utils/event-types.d.ts.map +1 -1
- package/dist/utils/event-types.js +7 -0
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -30,6 +30,12 @@ To enable this module in your application, follow the steps below.
|
|
|
30
30
|
|
|
31
31
|
When `eventTypes.enabled` is set in `genx.config.*` or `package.json` (`genx` / `genesis` keys), `genx build` and `genx generate event-types` emit typed `EventDetailsMap` from Kotlin handler DTOs and generated table DAOs. See [@genesislcap/event-type-codegen](../event-type-codegen/README.md) for configuration, limitations, and migration.
|
|
32
32
|
|
|
33
|
+
To generate from a live metadata dump (foundation-header **Ctrl/Cmd+Shift+E** in dev):
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
genx generate event-types --from-metadata event-metadata.json
|
|
37
|
+
```
|
|
38
|
+
|
|
33
39
|
## License
|
|
34
40
|
|
|
35
41
|
Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-event-types.d.ts","sourceRoot":"","sources":["../../src/commands/generate-event-types.ts"],"names":[],"mappings":"yBAEsB,eAAsB;
|
|
1
|
+
{"version":3,"file":"generate-event-types.d.ts","sourceRoot":"","sources":["../../src/commands/generate-event-types.ts"],"names":[],"mappings":"yBAEsB,eAAsB,EAAE,UAAU;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE;AAAjF,wBAIE"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const event_types_1 = require("../utils/event-types");
|
|
5
|
-
exports.default = (...args_1) => tslib_1.__awaiter(void 0, [...args_1], void 0, function* (folder = process.cwd()) {
|
|
6
|
-
yield (0, event_types_1.runEventTypesCodegenIfConfigured)(folder
|
|
5
|
+
exports.default = (...args_1) => tslib_1.__awaiter(void 0, [...args_1], void 0, function* (folder = process.cwd(), options) {
|
|
6
|
+
yield (0, event_types_1.runEventTypesCodegenIfConfigured)(folder, {
|
|
7
|
+
fromMetadataPath: options === null || options === void 0 ? void 0 : options.fromMetadata,
|
|
8
|
+
});
|
|
7
9
|
});
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export declare const commands: {
|
|
2
2
|
clean: () => Promise<(paths?: string[]) => Promise<void>>;
|
|
3
|
-
generateEventTypes: () => Promise<(folder?: string
|
|
3
|
+
generateEventTypes: () => Promise<(folder?: string, options?: {
|
|
4
|
+
fromMetadata?: string;
|
|
5
|
+
}) => Promise<void>>;
|
|
4
6
|
run: () => Promise<(task: any, module: any, options: any) => Promise<void>>;
|
|
5
7
|
runBuilder: () => Promise<(dir: string, options: any, env: import("@genesislcap/build-kit").ENV, command: import("@genesislcap/build-kit").COMMAND) => Promise<void>>;
|
|
6
8
|
runSeedCommand: () => Promise<(dir: any, cliOptions: any, command?: import("@genesislcap/build-kit").COMMAND) => Promise<void>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,QAAQ;;;oBAEI,CAAC;;;;;;;CAMzB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,MAAM,OAAO,QAAQ,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -28,14 +28,15 @@ cli
|
|
|
28
28
|
}));
|
|
29
29
|
cli
|
|
30
30
|
.command('generate [type] [folder]', 'Generate code (e.g. genx generate event-types)')
|
|
31
|
-
.
|
|
31
|
+
.option('--from-metadata <file>', 'Generate event types from a header-captured event-metadata.json dump')
|
|
32
|
+
.action((type, folder, options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
32
33
|
if (type === 'event-types') {
|
|
33
34
|
const action = yield commands_1.commands.generateEventTypes();
|
|
34
|
-
yield action(folder);
|
|
35
|
+
yield action(folder, { fromMetadata: options.fromMetadata });
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
38
|
if (!type) {
|
|
38
|
-
consola_1.consola.error('Missing generate type. Example: genx generate event-types [folder]');
|
|
39
|
+
consola_1.consola.error('Missing generate type. Example: genx generate event-types [folder] [--from-metadata event-metadata.json]');
|
|
39
40
|
process.exit(1);
|
|
40
41
|
}
|
|
41
42
|
consola_1.consola.error(`Unknown generate type "${type}". Supported: event-types`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../src/utils/event-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gCAAgC,GAC3C,KAAK,MAAM,EACX,UAAU;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"event-types.d.ts","sourceRoot":"","sources":["../../src/utils/event-types.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gCAAgC,GAC3C,KAAK,MAAM,EACX,UAAU;IAAE,cAAc,CAAC,EAAE,OAAO,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,sEA4BlE,CAAC"}
|
|
@@ -9,6 +9,13 @@ const runEventTypesCodegenIfConfigured = (cwd, options) => tslib_1.__awaiter(voi
|
|
|
9
9
|
const config = yield (0, build_kit_1.loadConfig)(pkg);
|
|
10
10
|
const genesis = pkg.genesis;
|
|
11
11
|
const resolved = (0, event_type_codegen_1.resolveEventTypesConfig)(cwd, config.eventTypes, genesis);
|
|
12
|
+
if (options === null || options === void 0 ? void 0 : options.fromMetadataPath) {
|
|
13
|
+
return (0, event_type_codegen_1.generateEventTypes)({
|
|
14
|
+
clientRoot: cwd,
|
|
15
|
+
config: resolved,
|
|
16
|
+
fromMetadataPath: options.fromMetadataPath,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
12
19
|
if (!resolved.enabled) {
|
|
13
20
|
return null;
|
|
14
21
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/genx",
|
|
3
3
|
"description": "Genx CLI",
|
|
4
|
-
"version": "15.
|
|
4
|
+
"version": "15.18.0",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=22.0.0"
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
"genx": "./bin/genx"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@genesislcap/build-kit": "15.
|
|
21
|
-
"@genesislcap/eslint-stylelint-builder": "15.
|
|
22
|
-
"@genesislcap/event-type-codegen": "15.
|
|
23
|
-
"@genesislcap/rollup-builder": "15.
|
|
24
|
-
"@genesislcap/ts-builder": "15.
|
|
25
|
-
"@genesislcap/uvu-playwright-builder": "15.
|
|
26
|
-
"@genesislcap/vite-builder": "15.
|
|
27
|
-
"@genesislcap/webpack-builder": "15.
|
|
20
|
+
"@genesislcap/build-kit": "15.18.0",
|
|
21
|
+
"@genesislcap/eslint-stylelint-builder": "15.18.0",
|
|
22
|
+
"@genesislcap/event-type-codegen": "15.18.0",
|
|
23
|
+
"@genesislcap/rollup-builder": "15.18.0",
|
|
24
|
+
"@genesislcap/ts-builder": "15.18.0",
|
|
25
|
+
"@genesislcap/uvu-playwright-builder": "15.18.0",
|
|
26
|
+
"@genesislcap/vite-builder": "15.18.0",
|
|
27
|
+
"@genesislcap/webpack-builder": "15.18.0",
|
|
28
28
|
"cac": "^6.7.14",
|
|
29
29
|
"consola": "^3.0.2",
|
|
30
30
|
"serve-handler": "^6.1.5"
|
|
@@ -37,5 +37,5 @@
|
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
|
-
"gitHead": "
|
|
40
|
+
"gitHead": "a92013873774dbc7f67a32d37994f10777f86383"
|
|
41
41
|
}
|