@cobol-ts/cli-graph 0.0.0-stage → 0.0.59

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 CHANGED
@@ -1,3 +1,11 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
1
+ # @cobol-ts/cli-graph
2
+
3
+ Commander registration for `graph build` and `graph optimise`. Owns command flags, output destinations and diagnostic formatting; delegates composition, planning and validated optimisation to [project-graph](../project-graph/README.md). CLI regression tests cover preview, explicit writes and rejected compilation.
4
+
5
+ Optimisation previews YAML by default; `--stats` emits diagnostics and `--write` explicitly requests a validated replacement. The adapter chooses output and write policy; it does not implement the optimiser or graph compiler.
6
+
7
+ ```sh
8
+ yarn cobolts -d modules/examples/init graph optimise --stats
9
+ ```
10
+
11
+ See the [CLI reference](../cobolts/README.md) for the complete command options.
@@ -0,0 +1,2 @@
1
+ export * from './src/graph';
2
+ export * from './src/graph.optimise';
package/dist/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./src/graph"), exports);
18
+ __exportStar(require("./src/graph.optimise"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,uDAAoC"}
@@ -0,0 +1,11 @@
1
+ import type { Command } from 'commander';
2
+ import type { CliOptions } from '@cobol-ts/cli-common';
3
+ import type { Diagnostic, Output, ResolveProjectPaths, Read, Write } from '@cobol-ts/project-context';
4
+ export type GraphServices = {
5
+ readonly diagnostic: Diagnostic;
6
+ readonly output: Output;
7
+ readonly paths: ResolveProjectPaths;
8
+ readonly read: Read;
9
+ readonly write: Write;
10
+ };
11
+ export declare function addGraph(root: Command, services: GraphServices, options: () => CliOptions): void;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addGraph = addGraph;
4
+ const node_path_1 = require("node:path");
5
+ const project_graph_local_1 = require("@cobol-ts/project-graph-local");
6
+ const graph_optimise_1 = require("./graph.optimise");
7
+ function addGraph(root, services, options) {
8
+ const graph = root.command('graph').description('Compose and optimise graph.yaml authoring graphs');
9
+ (0, graph_optimise_1.addGraphOptimise)(graph, services, options);
10
+ graph.command('build')
11
+ .description('Build graph.yaml authoring nodes from an experiment dossier and optional existing graphs')
12
+ .argument('<experiments>', 'Versioned experiment YAML file (relative to the current directory)')
13
+ .option('--with <filename>', 'Include an existing graph.yaml (repeatable)', (value, previous) => [...previous, value], [])
14
+ .option('--file <filename>', 'Write the assembled graph YAML instead of stdout')
15
+ .option('--report', 'Report included and missing output characteristics to stderr')
16
+ .option('--detailed', 'Include IDs in each report category and node counts by source (implies --report)')
17
+ .action(async (experiments, flags) => {
18
+ const build = await (0, project_graph_local_1.buildProjectGraph)(services.read, (0, node_path_1.resolve)(experiments), flags.with.map(path => (0, node_path_1.resolve)(path)));
19
+ const report = flags.report || flags.detailed ? await (0, project_graph_local_1.reportProjectGraphBuild)(await services.paths(options()), services.read, build, flags.detailed) : undefined;
20
+ if (flags.file === undefined)
21
+ services.output(build.content.trimEnd());
22
+ else
23
+ await services.write((0, node_path_1.resolve)(flags.file), build.content);
24
+ if (report !== undefined)
25
+ services.diagnostic(report);
26
+ });
27
+ }
28
+ //# sourceMappingURL=graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../src/graph.ts"],"names":[],"mappings":";;AAUA,4BAiBC;AA3BD,yCAAiC;AAIjC,uEAAwF;AACxF,qDAAiD;AAKjD,SAAgB,QAAQ,CAAC,IAAY,EAAC,QAAsB,EAAC,OAAsB;IAC/E,MAAM,KAAK,GAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,kDAAkD,CAAC,CAAA;IACjG,IAAA,iCAAgB,EAAC,KAAK,EAAC,QAAQ,EAAC,OAAO,CAAC,CAAA;IACxC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC;SACjB,WAAW,CAAC,0FAA0F,CAAC;SACvG,QAAQ,CAAC,eAAe,EAAE,oEAAoE,CAAC;SAC/F,MAAM,CAAC,mBAAmB,EAAE,6CAA6C,EAAE,CAAC,KAAY,EAAC,QAAiB,EAAC,EAAE,CAAA,CAAC,GAAG,QAAQ,EAAC,KAAK,CAAC,EAAC,EAAE,CAAC;SACpI,MAAM,CAAC,mBAAmB,EAAE,kDAAkD,CAAC;SAC/E,MAAM,CAAC,UAAU,EAAE,8DAA8D,CAAC;SAClF,MAAM,CAAC,YAAY,EAAE,kFAAkF,CAAC;SACxG,MAAM,CAAC,KAAK,EAAC,WAAkB,EAAC,KAAqB,EAAC,EAAE;QACrD,MAAM,KAAK,GAAC,MAAM,IAAA,uCAAiB,EAAC,QAAQ,CAAC,IAAI,EAAC,IAAA,mBAAO,EAAC,WAAW,CAAC,EAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAA,EAAE,CAAA,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC,CAAC,CAAA;QAC3G,MAAM,MAAM,GAAC,KAAK,CAAC,MAAM,IAAE,KAAK,CAAC,QAAQ,CAAA,CAAC,CAAA,MAAM,IAAA,6CAAuB,EAAC,MAAM,QAAQ,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC,EAAC,QAAQ,CAAC,IAAI,EAAC,KAAK,EAAC,KAAK,CAAC,QAAQ,CAAC,CAAA,CAAC,CAAA,SAAS,CAAA;QACrJ,IAAG,KAAK,CAAC,IAAI,KAAG,SAAS;YAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAA;;YAC7D,MAAM,QAAQ,CAAC,KAAK,CAAC,IAAA,mBAAO,EAAC,KAAK,CAAC,IAAI,CAAC,EAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC5D,IAAG,MAAM,KAAG,SAAS;YAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAA;IACrD,CAAC,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { Command } from 'commander';
2
+ import type { GraphNodeCounts } from '@cobol-ts/cel-graph-runtime';
3
+ import type { Diagnostic, Output, ResolveProjectPaths, Read, Write } from '@cobol-ts/project-context';
4
+ import type { CliOptions } from '@cobol-ts/cli-common';
5
+ export type GraphOptimiseServices = {
6
+ readonly diagnostic: Diagnostic;
7
+ readonly output: Output;
8
+ readonly paths: ResolveProjectPaths;
9
+ readonly read: Read;
10
+ readonly write: Write;
11
+ };
12
+ export declare function formatOptimisationStats(before: GraphNodeCounts, after: GraphNodeCounts): string;
13
+ export declare function addGraphOptimise(graph: Command, services: GraphOptimiseServices, options: () => CliOptions, prepareValidator?: (base: string, catalogue?: string) => Promise<import("@cobol-ts/project-graph").ProjectGraphValidator>): void;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatOptimisationStats = formatOptimisationStats;
4
+ exports.addGraphOptimise = addGraphOptimise;
5
+ const project_graph_local_1 = require("@cobol-ts/project-graph-local");
6
+ const project_graph_local_2 = require("@cobol-ts/project-graph-local");
7
+ function formatOptimisationStats(before, after) {
8
+ const rows = [
9
+ ['CEL (scalar)', 'cel'], ['Rolling window', 'rollingWindow'], ['Aggregate', 'aggregate'],
10
+ ['Failure', 'failure'], ['Total', 'total']
11
+ ];
12
+ return ['Graph optimisation statistics', 'Node type Before After Removed',
13
+ ...rows.map(([label, key]) => `${label.padEnd(20)}${String(before[key]).padStart(6)}${String(after[key]).padStart(8)}${String(before[key] - after[key]).padStart(9)}`)
14
+ ].join('\n');
15
+ }
16
+ function addGraphOptimise(graph, services, options, prepareValidator = project_graph_local_2.prepareProjectGraphValidator) {
17
+ graph.command('optimise')
18
+ .description('Consolidate equivalent graph nodes (preview by default)')
19
+ .option('--write', 'Replace graph.yaml with the optimised graph')
20
+ .option('--stats', 'Report node counts before and after optimisation to stderr')
21
+ .action(async (flags) => {
22
+ const paths = await services.paths(options());
23
+ const optimisation = (0, project_graph_local_1.projectGraphOptimisation)(paths, services, prepareValidator);
24
+ const result = await optimisation.preview();
25
+ if (flags.stats) {
26
+ services.diagnostic(formatOptimisationStats(result.before, result.after));
27
+ for (const merge of result.accepted)
28
+ services.diagnostic(`Merged ${merge.removed} into ${merge.survivor}`);
29
+ for (const merge of result.rejected)
30
+ services.diagnostic(`Retained ${merge.removed} (candidate ${merge.survivor}): ${merge.errors.join('; ')}`);
31
+ }
32
+ if (flags.write) {
33
+ services.output(await optimisation.publish(result) ? 'Wrote graph.yaml' : 'graph.yaml is unchanged');
34
+ }
35
+ else
36
+ services.output(result.yaml.trimEnd());
37
+ });
38
+ }
39
+ //# sourceMappingURL=graph.optimise.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.optimise.js","sourceRoot":"","sources":["../../src/graph.optimise.ts"],"names":[],"mappings":";;AASA,0DAQC;AAED,4CAmBC;AApCD,uEAAsE;AACtE,uEAA0E;AAM1E,SAAgB,uBAAuB,CAAC,MAAuB,EAAE,KAA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AAM,YAAY,CAAC,OAAO,EAAE,CAAA;QAC3C,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,QAAQ,CAAC,UAAU,CAAC,uBAAuB,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAA;YACzE,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ;gBAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,KAAK,CAAC,OAAO,SAAS,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;YAC1G,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,QAAQ;gBAAE,QAAQ,CAAC,UAAU,CAAC,YAAY,KAAK,CAAC,OAAO,eAAe,KAAK,CAAC,QAAQ,MAAM,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QACnJ,CAAC;QACD,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,QAAQ,CAAC,MAAM,CAAC,MAAM,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAA;QACxG,CAAC;;YAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAA;IACjD,CAAC,CAAC,CAAA;AACV,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const node_path_1 = require("node:path");
4
+ const commander_1 = require("commander");
5
+ const graph_optimise_1 = require("./graph.optimise");
6
+ const yaml_jsyaml_1 = require("@cobol-ts/yaml-jsyaml");
7
+ const errors_1 = require("@cobol-ts/errors");
8
+ const project_graph_local_1 = require("@cobol-ts/project-graph-local");
9
+ const directory = (0, node_path_1.resolve)('example/.cobolts');
10
+ const filename = (0, node_path_1.resolve)(directory, 'graph.yaml');
11
+ const graph = {
12
+ C1: { type: 'cel', cel: 'input.amount', metadata: { type: 'number' } },
13
+ helper: { type: 'cel', cel: 'input.amount', metadata: { type: 'number' } }
14
+ };
15
+ function fixture(validationErrors = []) {
16
+ const output = [], diagnostics = [];
17
+ const writes = [];
18
+ const files = new Map([
19
+ [filename, JSON.stringify(graph)],
20
+ [(0, node_path_1.resolve)(directory, 'characteristics.yaml'), `files: .\ninput:\n sources:\n demo:\n type: yaml\n file: inputs.yaml\n path: characteristics\noutput:\n sources:\n demo:\n type: yaml\n file: outputs.yaml\n path: characteristics\n`],
21
+ [(0, node_path_1.resolve)(directory, 'inputs.yaml'), 'characteristics: {I1: {description: Input, path: input.customers.amount, keys: {customer: input.customers.id}}}'],
22
+ [(0, node_path_1.resolve)(directory, 'outputs.yaml'), 'characteristics: {C1: {description: Output}}']
23
+ ]);
24
+ const services = {
25
+ paths: async () => ({ directory, projectRoot: (0, node_path_1.resolve)('example'), catalogue: (0, node_path_1.resolve)(directory, 'files.yaml'),
26
+ data: (0, node_path_1.resolve)(directory, 'data.yaml'), policy: (0, node_path_1.resolve)(directory, 'generation.yaml'), accumulator: (0, node_path_1.resolve)(directory, 'accumulator.yaml') }),
27
+ read: async (path) => { const text = files.get(path); if (text === undefined)
28
+ throw new Error(path); return text; },
29
+ write: async (filename, content) => { writes.push({ filename, content }); },
30
+ output: line => output.push(line), diagnostic: line => diagnostics.push(line)
31
+ };
32
+ const compile = jest.fn(() => validationErrors);
33
+ const run = async (...flags) => {
34
+ const root = new commander_1.Command('graph');
35
+ (0, graph_optimise_1.addGraphOptimise)(root, services, () => ({}), async () => compile);
36
+ await root.parseAsync(['optimise', ...flags], { from: 'user' });
37
+ };
38
+ return { run, output, diagnostics, writes, compile, files, services };
39
+ }
40
+ test('previews YAML by default and prints stats separately only when requested', async () => {
41
+ const f = fixture();
42
+ await f.run();
43
+ expect((0, errors_1.valueOrThrow)(yaml_jsyaml_1.jsYamlParser.parse(f.output[0]))).toEqual({ C1: graph.C1 });
44
+ expect(f.writes).toEqual([]);
45
+ expect(f.diagnostics).toEqual([]);
46
+ expect(f.compile).not.toHaveBeenCalled();
47
+ const stats = fixture();
48
+ await stats.run('--stats');
49
+ expect((0, errors_1.valueOrThrow)(yaml_jsyaml_1.jsYamlParser.parse(stats.output[0]))).toEqual({ C1: graph.C1 });
50
+ expect(stats.diagnostics[0]).toMatch(/CEL \(scalar\)\s+2\s+1\s+1/);
51
+ expect(stats.diagnostics[0]).toMatch(/Rolling window\s+0\s+0\s+0/);
52
+ expect(stats.diagnostics[0]).toMatch(/Total\s+2\s+1\s+1/);
53
+ expect(stats.writes).toEqual([]);
54
+ });
55
+ test('writes only the validated graph when --write is explicitly supplied; flags compose', async () => {
56
+ const f = fixture();
57
+ await f.run('--write', '--stats');
58
+ expect(f.compile).toHaveBeenCalledWith({ C1: graph.C1 });
59
+ expect(f.writes).toHaveLength(1);
60
+ expect(f.writes[0].filename).toBe(filename);
61
+ expect((0, errors_1.valueOrThrow)(yaml_jsyaml_1.jsYamlParser.parse(f.writes[0].content))).toEqual({ C1: graph.C1 });
62
+ expect(f.output).toEqual(['Wrote graph.yaml']);
63
+ expect(f.diagnostics[0]).toContain('Graph optimisation statistics');
64
+ });
65
+ test('does not replace graph.yaml if compilation fails', async () => {
66
+ const f = fixture(['invalid schema']);
67
+ await expect(f.run('--write')).rejects.toThrow('Cannot publish optimised graph: invalid schema');
68
+ expect(f.writes).toEqual([]);
69
+ });
70
+ test('GUI preview needs no accumulator service; accept validates and publishes the optimised graph', async () => {
71
+ const f = fixture();
72
+ const optimisation = (0, project_graph_local_1.projectGraphOptimisation)(await f.services.paths({}), f.services, async () => f.compile);
73
+ const preview = await optimisation.preview();
74
+ expect(preview.before.total).toBe(2);
75
+ expect(preview.after.total).toBe(1);
76
+ expect(f.writes).toEqual([]);
77
+ expect(f.compile).not.toHaveBeenCalled();
78
+ expect(await optimisation.accept()).toEqual({ written: true });
79
+ expect(f.compile).toHaveBeenCalledWith({ C1: graph.C1 });
80
+ expect((0, errors_1.valueOrThrow)(yaml_jsyaml_1.jsYamlParser.parse(f.writes[0].content))).toEqual({ C1: graph.C1 });
81
+ });
82
+ test('accept optimises the current graph and never writes if compilation fails', async () => {
83
+ const f = fixture();
84
+ const optimisation = (0, project_graph_local_1.projectGraphOptimisation)(await f.services.paths({}), f.services, async () => f.compile);
85
+ await optimisation.preview();
86
+ f.files.set(filename, JSON.stringify({ ...graph, additional: { type: 'cel', cel: 'input.other', metadata: { type: 'number' } } }));
87
+ expect(await optimisation.accept()).toEqual({ written: true });
88
+ expect((0, errors_1.valueOrThrow)(yaml_jsyaml_1.jsYamlParser.parse(f.writes[0].content))).toHaveProperty('additional');
89
+ const invalid = fixture(['invalid schema']);
90
+ const other = (0, project_graph_local_1.projectGraphOptimisation)(await invalid.services.paths({}), invalid.services, async () => invalid.compile);
91
+ await expect(other.accept()).rejects.toThrow('invalid schema');
92
+ expect(invalid.writes).toEqual([]);
93
+ });
94
+ //# sourceMappingURL=graph.optimise.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.optimise.spec.js","sourceRoot":"","sources":["../../src/graph.optimise.spec.ts"],"names":[],"mappings":";;AAAA,yCAAiC;AACjC,yCAAiC;AACjC,qDAA6E;AAC7E,uDAAkD;AAClD,6CAA6C;AAC7C,uEAAsE;AAEtE,MAAM,SAAS,GAAG,IAAA,mBAAO,EAAC,kBAAkB,CAAC,CAAA;AAC7C,MAAM,QAAQ,GAAG,IAAA,mBAAO,EAAC,SAAS,EAAE,YAAY,CAAC,CAAA;AACjD,MAAM,KAAK,GAAG;IACV,EAAE,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC;IAClE,MAAM,EAAE,EAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,QAAQ,EAAE,EAAC,IAAI,EAAE,QAAQ,EAAC,EAAC;CACzE,CAAA;A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AAI,EAAE,QAAQ,EAAC,EAAC,EAAC,CAAC,CAAC,CAAA;IAC5H,MAAM,CAAC,MAAM,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAC,OAAO,EAAE,IAAI,EAAC,CAAC,CAAA;IAC5D,MAAM,CAAC,IAAA,qBAAY,EAAC,0BAAY,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,YAAY,CAAC,CAAA;IAC1F,MAAM,OAAO,GAAG,OAAO,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAA;IAC3C,MAAM,KAAK,GAAG,IAAA,8CAAwB,EAAC,MAAM,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IACvH,MAAM,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;IAC9D,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;AACtC,CAAC,CAAC,CAAA"}
package/index.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './src/graph'
2
+ export * from './src/graph.optimise'
package/package.json CHANGED
@@ -1,6 +1,69 @@
1
1
  {
2
2
  "name": "@cobol-ts/cli-graph",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "description": "Graph command delivery adapter",
4
+ "version": "0.0.59",
5
+ "main": "dist/index",
6
+ "types": "dist/index",
7
+ "browserslist": {
8
+ "development": [
9
+ "last 1 chrome version",
10
+ "last 1 firefox version",
11
+ "last 1 safari version"
12
+ ],
13
+ "production": [
14
+ ">0.2%",
15
+ "not dead",
16
+ "not op_mini all"
17
+ ]
18
+ },
19
+ "dependencies": {
20
+ "@cobol-ts/cel-graph-runtime": "0.0.59",
21
+ "@cobol-ts/cli-common": "0.0.59",
22
+ "@cobol-ts/errors": "0.0.59",
23
+ "@cobol-ts/project-context": "0.0.59",
24
+ "@cobol-ts/project-graph-local": "0.0.59",
25
+ "@cobol-ts/yaml-jsyaml": "0.0.59",
26
+ "commander": "^12.1.0"
27
+ },
28
+ "devDependencies": {
29
+ "@testing-library/jest-dom": "^6.1.4",
30
+ "@types/jest": "^29.0.0",
31
+ "@types/node": "^20.0.0",
32
+ "jest": "^29.0.0",
33
+ "ts-jest": "^29.0.0",
34
+ "typescript": "^5.2.2"
35
+ },
36
+ "eslintConfig": {
37
+ "extends": [
38
+ "react-app",
39
+ "react-app/jest"
40
+ ],
41
+ "overrides": [
42
+ {
43
+ "files": [
44
+ "**/*.stories.*"
45
+ ],
46
+ "rules": {
47
+ "import/no-anonymous-default-export": "off"
48
+ }
49
+ }
50
+ ]
51
+ },
52
+ "files": [
53
+ "dist/index.js",
54
+ "dist/index.d.ts",
55
+ "dist/src/",
56
+ "dist/",
57
+ "dist/**/*"
58
+ ],
59
+ "keywords": [
60
+ "indexing"
61
+ ],
62
+ "license": "MIT",
63
+ "module": "./index.ts",
64
+ "repository": "git@github.com:intellimaintain/intellimaintain.git",
65
+ "scripts": {
66
+ "test": "jest --config jest.config.json --env node",
67
+ "test:watch": "npm run test -- --watch"
68
+ }
6
69
  }