@cobol-ts/projection-typescript 0.0.3 → 0.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA2C"}
@@ -0,0 +1,17 @@
1
+ import type { ProjectionAuthoring } from '@cobol-ts/cursor-loader-types';
2
+ import type { ErrorsOr } from '@cobol-ts/errors';
3
+ export interface ProjectionTypescriptOptions {
4
+ /** The module from which the generated type imports ProjectedArray. */
5
+ projectedArrayImport?: string;
6
+ /** Map a full logical path (including root) to a declared TypeScript type name. */
7
+ typeName?: (path: readonly string[]) => string;
8
+ }
9
+ /**
10
+ * Print named TypeScript types for a fully authored, recursive projection.
11
+ * The COBOL copybook AST is not involved: the projection is the authority
12
+ * about the interface exposed by the reader.
13
+ *
14
+ * Terminal fields are methods. Object and array members are readonly
15
+ * properties, matching ProjectionView and the cursor projection runtime.
16
+ */
17
+ export declare function generateProjectionTypescript(projection: ProjectionAuthoring, rootTypeName: string, options?: ProjectionTypescriptOptions): ErrorsOr<string[]>;
@@ -0,0 +1,101 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateProjectionTypescript = generateProjectionTypescript;
4
+ const identifier = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
5
+ const reserved = new Set([
6
+ 'break', 'case', 'catch', 'class', 'const', 'continue', 'debugger', 'default',
7
+ 'delete', 'do', 'else', 'enum', 'export', 'extends', 'false', 'finally',
8
+ 'for', 'function', 'if', 'import', 'in', 'instanceof', 'new', 'null',
9
+ 'return', 'super', 'switch', 'this', 'throw', 'true', 'try', 'typeof',
10
+ 'var', 'void', 'while', 'with', 'yield', 'await', 'implements', 'interface',
11
+ 'let', 'package', 'private', 'protected', 'public', 'static'
12
+ ]);
13
+ function validTypeName(name) {
14
+ return identifier.test(name) && !reserved.has(name);
15
+ }
16
+ function defaultTypeName(path) {
17
+ return path.map(segment => segment.split(/[^A-Za-z0-9]+/).filter(Boolean)
18
+ .map(word => word[0].toUpperCase() + word.slice(1)).join('')).join('');
19
+ }
20
+ /**
21
+ * Print named TypeScript types for a fully authored, recursive projection.
22
+ * The COBOL copybook AST is not involved: the projection is the authority
23
+ * about the interface exposed by the reader.
24
+ *
25
+ * Terminal fields are methods. Object and array members are readonly
26
+ * properties, matching ProjectionView and the cursor projection runtime.
27
+ */
28
+ function generateProjectionTypescript(projection, rootTypeName, options = {}) {
29
+ const errors = [];
30
+ if (!validTypeName(rootTypeName)) {
31
+ errors.push(`Invalid TypeScript projection type name ${JSON.stringify(rootTypeName)}`);
32
+ }
33
+ const arrayImport = options.projectedArrayImport ?? '@cobol-ts/arrays';
34
+ if (!arrayImport)
35
+ errors.push('ProjectedArray import must not be empty');
36
+ if (errors.length)
37
+ return { errors };
38
+ const names = new Map();
39
+ const completed = [];
40
+ const visiting = new Set();
41
+ let usesArray = false;
42
+ function renderObject(fields, path, isRoot) {
43
+ const location = path.join('.');
44
+ const typeName = isRoot ? rootTypeName : (options.typeName?.(path) ?? defaultTypeName(path));
45
+ if (!validTypeName(typeName)) {
46
+ errors.push(`Projection ${location}: Invalid TypeScript type name ${JSON.stringify(typeName)}`);
47
+ return typeName;
48
+ }
49
+ if (typeof fields !== 'object' || fields === null || Array.isArray(fields)) {
50
+ errors.push(`Projection ${location}: Expected an object of projection fields`);
51
+ return typeName;
52
+ }
53
+ if (visiting.has(fields)) {
54
+ errors.push(`Projection ${location}: Cyclic projection definition`);
55
+ return typeName;
56
+ }
57
+ const previous = names.get(typeName);
58
+ if (previous !== undefined) {
59
+ errors.push(`Projection ${location}: Type name ${JSON.stringify(typeName)} already used for ${previous}`);
60
+ return typeName;
61
+ }
62
+ names.set(typeName, location);
63
+ visiting.add(fields);
64
+ const lines = [`export type ${typeName} = {`];
65
+ for (const [key, node] of Object.entries(fields)) {
66
+ const childPath = [...path, key];
67
+ const memberLocation = childPath.join('.');
68
+ const property = identifier.test(key) ? key : JSON.stringify(key);
69
+ if (!node || typeof node !== 'object' || Array.isArray(node)) {
70
+ errors.push(`Projection ${memberLocation}: Expected a projection node`);
71
+ continue;
72
+ }
73
+ const item = node;
74
+ if (item.type === 'integer' || item.type === 'float' || item.type === 'character' || item.type === 'string') {
75
+ lines.push(` ${property}(): ${item.type === 'integer' || item.type === 'float' ? 'number' : 'string'}`);
76
+ }
77
+ else if (item.type === 'object') {
78
+ const nested = renderObject(item.fields, childPath, false);
79
+ lines.push(` readonly ${property}: ${nested}`);
80
+ }
81
+ else if (item.type === 'array') {
82
+ usesArray = true;
83
+ const element = renderObject(item.element, childPath, false);
84
+ lines.push(` readonly ${property}: ProjectedArray<${element}>`);
85
+ }
86
+ else {
87
+ errors.push(`Projection ${memberLocation}: Unsupported projection node type ${JSON.stringify(item.type)}`);
88
+ }
89
+ }
90
+ lines.push('}');
91
+ visiting.delete(fields);
92
+ completed.push(lines);
93
+ return typeName;
94
+ }
95
+ renderObject(projection, [rootTypeName], true);
96
+ if (errors.length)
97
+ return { errors };
98
+ const result = completed.flatMap((lines, index) => index ? ['', ...lines] : lines);
99
+ return { value: usesArray ? [`import type {ProjectedArray} from ${JSON.stringify(arrayImport)}`, '', ...result] : result };
100
+ }
101
+ //# sourceMappingURL=projection.typescript.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.typescript.js","sourceRoot":"","sources":["../../src/projection.typescript.ts"],"names":[],"mappings":";;AAqCA,oEAwEC;AAnGD,MAAM,UAAU,GAAG,4BAA4B,CAAA;AAC/C,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC;IACrB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS;IAC7E,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,S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K,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;IAClF,OAAO,EAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,qCAAqC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAC,CAAA;AAC5H,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,136 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const projection_typescript_1 = require("./projection.typescript");
4
+ describe('generateProjectionTypescript', () => {
5
+ describe('terminal fields', () => {
6
+ it('prints all supported terminal types without unused imports', () => {
7
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
8
+ customerId: { type: 'integer', path: ['CUSTOMER', 'ID'] },
9
+ balance: { type: 'float' },
10
+ initial: { type: 'character' },
11
+ fullName: { type: 'string' }
12
+ }, 'Customer')).toEqual({ value: [
13
+ 'export type Customer = {',
14
+ ' customerId(): number',
15
+ ' balance(): number',
16
+ ' initial(): string',
17
+ ' fullName(): string',
18
+ '}'
19
+ ] });
20
+ });
21
+ it('quotes unusual property names without altering the logical names', () => {
22
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
23
+ 'transaction-code': { type: 'string' },
24
+ 'has space': { type: 'integer' }
25
+ }, 'Transaction')).toEqual({ value: [
26
+ 'export type Transaction = {',
27
+ ' "transaction-code"(): string',
28
+ ' "has space"(): number',
29
+ '}'
30
+ ] });
31
+ });
32
+ });
33
+ describe('recursive structures', () => {
34
+ it('prints nested objects before the root with readonly getters', () => {
35
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
36
+ address: { type: 'object', path: ['CUSTOMER', 'ADDRESS'], fields: {
37
+ town: { type: 'string' },
38
+ postcode: { type: 'string' }
39
+ } },
40
+ id: { type: 'integer' }
41
+ }, 'Customer')).toEqual({ value: [
42
+ 'export type CustomerAddress = {',
43
+ ' town(): string',
44
+ ' postcode(): string',
45
+ '}',
46
+ '',
47
+ 'export type Customer = {',
48
+ ' readonly address: CustomerAddress',
49
+ ' id(): number',
50
+ '}'
51
+ ] });
52
+ });
53
+ it('prints nested arrays and imports ProjectedArray exactly once', () => {
54
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
55
+ accounts: { type: 'array', element: {
56
+ accountId: { type: 'integer' },
57
+ entries: { type: 'array', element: {
58
+ amount: { type: 'float' }
59
+ } }
60
+ } },
61
+ history: { type: 'array', element: {
62
+ date: { type: 'string' }
63
+ } }
64
+ }, 'Customer', { projectedArrayImport: './arrays' })).toEqual({ value: [
65
+ 'import type {ProjectedArray} from "./arrays"',
66
+ '',
67
+ 'export type CustomerAccountsEntries = {',
68
+ ' amount(): number',
69
+ '}',
70
+ '',
71
+ 'export type CustomerAccounts = {',
72
+ ' accountId(): number',
73
+ ' readonly entries: ProjectedArray<CustomerAccountsEntries>',
74
+ '}',
75
+ '',
76
+ 'export type CustomerHistory = {',
77
+ ' date(): string',
78
+ '}',
79
+ '',
80
+ 'export type Customer = {',
81
+ ' readonly accounts: ProjectedArray<CustomerAccounts>',
82
+ ' readonly history: ProjectedArray<CustomerHistory>',
83
+ '}'
84
+ ] });
85
+ });
86
+ it('uses caller-defined type naming for nested views', () => {
87
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
88
+ address: { type: 'object', fields: { town: { type: 'string' } } }
89
+ }, 'Customer', { typeName: path => `View${path.join('_')}` })).toEqual({ value: [
90
+ 'export type ViewCustomer_address = {',
91
+ ' town(): string',
92
+ '}',
93
+ '',
94
+ 'export type Customer = {',
95
+ ' readonly address: ViewCustomer_address',
96
+ '}'
97
+ ] });
98
+ });
99
+ });
100
+ describe('invalid definitions', () => {
101
+ it('rejects invalid root type names', () => {
102
+ expect((0, projection_typescript_1.generateProjectionTypescript)({}, 'class')).toEqual({ errors: [
103
+ 'Invalid TypeScript projection type name "class"'
104
+ ] });
105
+ });
106
+ it('rejects names that collide after conversion', () => {
107
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
108
+ 'home-address': { type: 'object', fields: {} },
109
+ homeAddress: { type: 'object', fields: {} }
110
+ }, 'Customer')).toEqual({ errors: [
111
+ 'Projection Customer.homeAddress: Type name "CustomerHomeAddress" already used for Customer.home-address'
112
+ ] });
113
+ });
114
+ it('rejects unsupported nodes with their projection paths', () => {
115
+ const invalid = { type: 'union' };
116
+ expect((0, projection_typescript_1.generateProjectionTypescript)({ field: invalid }, 'Customer')).toEqual({ errors: [
117
+ 'Projection Customer.field: Unsupported projection node type "union"'
118
+ ] });
119
+ });
120
+ it('rejects cycles without uncontrolled recursion', () => {
121
+ const fields = {};
122
+ fields.loop = { type: 'object', fields };
123
+ expect((0, projection_typescript_1.generateProjectionTypescript)(fields, 'Customer')).toEqual({ errors: [
124
+ 'Projection Customer.loop: Cyclic projection definition'
125
+ ] });
126
+ });
127
+ it('rejects a missing child projection', () => {
128
+ expect((0, projection_typescript_1.generateProjectionTypescript)({
129
+ items: { type: 'array', element: null }
130
+ }, 'Customer')).toEqual({ errors: [
131
+ 'Projection Customer.items: Expected an object of projection fields'
132
+ ] });
133
+ });
134
+ });
135
+ });
136
+ //# sourceMappingURL=projection.typescript.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projection.typescript.spec.js","sourceRoot":"","sources":["../../src/projection.typescript.spec.ts"],"names":[],"mappings":";;AACA,mEAAoE;AAEpE,QAAQ,CAAC,8BAA8B,EAAE,GAAG,EAAE;IAC1C,QAAQ,CAAC,iBAAiB,EAAE,GAAG,EAAE;QAC7B,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;YAClE,MAAM,CAAC,IAAA,oDAA4B,EAAC;gBAChC,UAAU,EAAE,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC,EAAC;gBACvD,OAAO,EAAE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xE,EAAC,CAAC,CAAA;QACP,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACrD,MAAM,MAAM,GAAgD,EAAE,CAAA;YAC9D,MAAM,CAAC,IAAI,GAAG,EAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAC,CAAA;YACtC,MAAM,CAAC,IAAA,oDAA4B,EAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,EAAC,MAAM,EAAE;oBACtE,wDAAwD;iBAC3D,EAAC,CAAC,CAAA;QACP,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC1C,MAAM,CAAC,IAAA,oDAA4B,EAAC;gBAChC,KAAK,EAAE,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAsC,EAAC;aAC1E,EAAE,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,EAAC,MAAM,EAAE;oBAC7B,oEAAoE;iBACvE,EAAC,CAAC,CAAA;QACP,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cobol-ts/projection-typescript",
3
3
  "description": "Generate named TypeScript projection view contracts from authored projection definitions",
4
- "version": "0.0.3",
4
+ "version": "0.0.5",
5
5
  "main": "dist/index",
6
6
  "types": "dist/index",
7
7
  "browserslist": {
@@ -17,9 +17,9 @@
17
17
  ]
18
18
  },
19
19
  "dependencies": {
20
- "@cobol-ts/cursor-loader-types": "0.0.3",
21
- "@cobol-ts/arrays": "0.0.3",
22
- "@cobol-ts/errors": "0.0.3"
20
+ "@cobol-ts/cursor-loader-types": "0.0.5",
21
+ "@cobol-ts/arrays": "0.0.5",
22
+ "@cobol-ts/errors": "0.0.5"
23
23
  },
24
24
  "devDependencies": {
25
25
  "typescript": "^5.2.2",
@@ -49,7 +49,8 @@
49
49
  "dist/index.js",
50
50
  "dist/index.d.ts",
51
51
  "dist/src/",
52
- "build/"
52
+ "build/",
53
+ "dist/**/*"
53
54
  ],
54
55
  "keywords": [
55
56
  "indexing"