@lionweb/class-core-generator 0.7.0-alpha.1 → 0.7.0-alpha.11

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.
Files changed (130) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/entity-types.templates.d.ts +4 -0
  3. package/dist/entity-types.templates.d.ts.map +1 -0
  4. package/dist/{api/entity-types.templates.js → entity-types.templates.js} +59 -26
  5. package/dist/entity-types.templates.js.map +1 -0
  6. package/dist/{api/generation-headers.d.ts → generation-headers.d.ts} +1 -1
  7. package/dist/generation-headers.d.ts.map +1 -0
  8. package/dist/{api/generation-headers.js → generation-headers.js} +19 -13
  9. package/dist/generation-headers.js.map +1 -0
  10. package/dist/{api/generator.d.ts → generator.d.ts} +3 -4
  11. package/dist/generator.d.ts.map +1 -0
  12. package/dist/{api/generator.js → generator.js} +19 -14
  13. package/dist/generator.js.map +1 -0
  14. package/dist/helpers/classifiers.d.ts.map +1 -0
  15. package/dist/helpers/classifiers.js.map +1 -0
  16. package/dist/helpers/entities.d.ts.map +1 -0
  17. package/dist/helpers/entities.js.map +1 -0
  18. package/dist/{api/helpers → helpers}/features.d.ts +3 -3
  19. package/dist/helpers/features.d.ts.map +1 -0
  20. package/dist/{api/helpers → helpers}/features.js +8 -8
  21. package/dist/helpers/features.js.map +1 -0
  22. package/dist/helpers/imports-tracking.d.ts.map +1 -0
  23. package/dist/{api/helpers → helpers}/imports-tracking.js +1 -1
  24. package/dist/helpers/imports-tracking.js.map +1 -0
  25. package/dist/{api/helpers → helpers}/index.d.ts +0 -2
  26. package/dist/helpers/index.d.ts.map +1 -0
  27. package/dist/{api/helpers → helpers}/index.js +0 -2
  28. package/dist/helpers/index.js.map +1 -0
  29. package/dist/helpers/primitive-types.d.ts.map +1 -0
  30. package/dist/{api/helpers → helpers}/primitive-types.js +4 -4
  31. package/dist/helpers/primitive-types.js.map +1 -0
  32. package/dist/index-ts.d.ts.map +1 -0
  33. package/dist/{api/index-ts.js → index-ts.js} +3 -2
  34. package/dist/index-ts.js.map +1 -0
  35. package/dist/index.d.ts +3 -2
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +3 -2
  38. package/dist/index.js.map +1 -1
  39. package/dist/language-file.templates.d.ts.map +1 -0
  40. package/dist/{api/language-file.templates.js → language-file.templates.js} +3 -5
  41. package/dist/language-file.templates.js.map +1 -0
  42. package/dist/mega-factory.templates.d.ts +3 -0
  43. package/dist/mega-factory.templates.d.ts.map +1 -0
  44. package/dist/{api/mega-factory.templates.js → mega-factory.templates.js} +4 -4
  45. package/dist/mega-factory.templates.js.map +1 -0
  46. package/dist/reflective-layer.templates.d.ts.map +1 -0
  47. package/dist/{api/reflective-layer.templates.js → reflective-layer.templates.js} +9 -5
  48. package/dist/reflective-layer.templates.js.map +1 -0
  49. package/package.json +10 -9
  50. package/src/{api/entity-types.templates.ts → entity-types.templates.ts} +83 -33
  51. package/src/{api/generation-headers.ts → generation-headers.ts} +19 -15
  52. package/src/{api/generator.ts → generator.ts} +23 -16
  53. package/src/{api/helpers → helpers}/features.ts +9 -9
  54. package/src/{api/helpers → helpers}/imports-tracking.ts +1 -1
  55. package/src/{api/helpers → helpers}/index.ts +0 -2
  56. package/src/{api/helpers → helpers}/primitive-types.ts +4 -4
  57. package/src/{api/index-ts.ts → index-ts.ts} +4 -3
  58. package/src/index.ts +3 -2
  59. package/src/{api/language-file.templates.ts → language-file.templates.ts} +3 -6
  60. package/src/{api/mega-factory.templates.ts → mega-factory.templates.ts} +4 -5
  61. package/src/{api/reflective-layer.templates.ts → reflective-layer.templates.ts} +9 -4
  62. package/dist/api/entity-types.templates.d.ts +0 -5
  63. package/dist/api/entity-types.templates.d.ts.map +0 -1
  64. package/dist/api/entity-types.templates.js.map +0 -1
  65. package/dist/api/generation-headers.d.ts.map +0 -1
  66. package/dist/api/generation-headers.js.map +0 -1
  67. package/dist/api/generator.d.ts.map +0 -1
  68. package/dist/api/generator.js.map +0 -1
  69. package/dist/api/helpers/classifiers.d.ts.map +0 -1
  70. package/dist/api/helpers/classifiers.js.map +0 -1
  71. package/dist/api/helpers/dependencies.d.ts +0 -11
  72. package/dist/api/helpers/dependencies.d.ts.map +0 -1
  73. package/dist/api/helpers/dependencies.js +0 -52
  74. package/dist/api/helpers/dependencies.js.map +0 -1
  75. package/dist/api/helpers/entities.d.ts.map +0 -1
  76. package/dist/api/helpers/entities.js.map +0 -1
  77. package/dist/api/helpers/features.d.ts.map +0 -1
  78. package/dist/api/helpers/features.js.map +0 -1
  79. package/dist/api/helpers/imports-tracking.d.ts.map +0 -1
  80. package/dist/api/helpers/imports-tracking.js.map +0 -1
  81. package/dist/api/helpers/index.d.ts.map +0 -1
  82. package/dist/api/helpers/index.js.map +0 -1
  83. package/dist/api/helpers/mps-annotations.d.ts +0 -19
  84. package/dist/api/helpers/mps-annotations.d.ts.map +0 -1
  85. package/dist/api/helpers/mps-annotations.js +0 -65
  86. package/dist/api/helpers/mps-annotations.js.map +0 -1
  87. package/dist/api/helpers/primitive-types.d.ts.map +0 -1
  88. package/dist/api/helpers/primitive-types.js.map +0 -1
  89. package/dist/api/index-ts.d.ts.map +0 -1
  90. package/dist/api/index-ts.js.map +0 -1
  91. package/dist/api/index.d.ts +0 -5
  92. package/dist/api/index.d.ts.map +0 -1
  93. package/dist/api/index.js +0 -21
  94. package/dist/api/index.js.map +0 -1
  95. package/dist/api/language-file.templates.d.ts.map +0 -1
  96. package/dist/api/language-file.templates.js.map +0 -1
  97. package/dist/api/mega-factory.templates.d.ts +0 -4
  98. package/dist/api/mega-factory.templates.d.ts.map +0 -1
  99. package/dist/api/mega-factory.templates.js.map +0 -1
  100. package/dist/api/reflective-layer.templates.d.ts.map +0 -1
  101. package/dist/api/reflective-layer.templates.js.map +0 -1
  102. package/dist/utils/index.d.ts +0 -3
  103. package/dist/utils/index.d.ts.map +0 -1
  104. package/dist/utils/index.js +0 -19
  105. package/dist/utils/index.js.map +0 -1
  106. package/dist/utils/json-as-ts.d.ts +0 -2
  107. package/dist/utils/json-as-ts.d.ts.map +0 -1
  108. package/dist/utils/json-as-ts.js +0 -18
  109. package/dist/utils/json-as-ts.js.map +0 -1
  110. package/dist/utils/textgen.d.ts +0 -21
  111. package/dist/utils/textgen.d.ts.map +0 -1
  112. package/dist/utils/textgen.js +0 -67
  113. package/dist/utils/textgen.js.map +0 -1
  114. package/src/api/helpers/dependencies.ts +0 -62
  115. package/src/api/helpers/mps-annotations.ts +0 -67
  116. package/src/api/index.ts +0 -21
  117. package/src/utils/index.ts +0 -20
  118. package/src/utils/json-as-ts.ts +0 -20
  119. package/src/utils/textgen.ts +0 -89
  120. /package/dist/{api/helpers → helpers}/classifiers.d.ts +0 -0
  121. /package/dist/{api/helpers → helpers}/classifiers.js +0 -0
  122. /package/dist/{api/helpers → helpers}/entities.d.ts +0 -0
  123. /package/dist/{api/helpers → helpers}/entities.js +0 -0
  124. /package/dist/{api/helpers → helpers}/imports-tracking.d.ts +0 -0
  125. /package/dist/{api/helpers → helpers}/primitive-types.d.ts +0 -0
  126. /package/dist/{api/index-ts.d.ts → index-ts.d.ts} +0 -0
  127. /package/dist/{api/language-file.templates.d.ts → language-file.templates.d.ts} +0 -0
  128. /package/dist/{api/reflective-layer.templates.d.ts → reflective-layer.templates.d.ts} +0 -0
  129. /package/src/{api/helpers → helpers}/classifiers.ts +0 -0
  130. /package/src/{api/helpers → helpers}/entities.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -2,3 +2,10 @@
2
2
 
3
3
  ## 0.7.0
4
4
 
5
+ * Move `dependenciesThroughDirectInheritanceOf` and `verboseDependencies` functions from `class-core-generator` to `utilities` package.
6
+ * Remove everything specific to annotations coming from the `io.lionweb.mps.specific` language, in favor of using the types and functionality provided by the `@lionweb/io-lionweb-mps-specific` package.
7
+ **Note**: this slightly breaks the API of the generator, but in such a trivial way (because of the use of defaults) that it doesn't warrant an increment in major version, IOHO.
8
+ * Partition concepts are now marked as such in their `ILanguageBase` implementation.
9
+ * Constructors of abstract concepts are now declared `protected` instead of `public`.
10
+ * Make `console.log` verbosity of the generator calls `generateApiFromLanguages[Json]` (for language**s**) configurable, through an extra property `verbose` of the `GeneratorOptions` which defaults to `true`.
11
+
@@ -0,0 +1,4 @@
1
+ import { LanguageEntity } from "@lionweb/core";
2
+ import { Imports } from "./helpers/index.js";
3
+ export declare const typeForLanguageEntity: (imports: Imports) => (entity: LanguageEntity) => import("littoral-templates").Template[];
4
+ //# sourceMappingURL=entity-types.templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-types.templates.d.ts","sourceRoot":"","sources":["../src/entity-types.templates.ts"],"names":[],"mappings":"AAiBA,OAAO,EAWH,cAAc,EASjB,MAAM,eAAe,CAAA;AAYtB,OAAO,EAKH,OAAO,EAQV,MAAM,oBAAoB,CAAA;AAc3B,eAAO,MAAM,qBAAqB,YAAa,OAAO,cAgNlC,cAAc,4CAoBjC,CAAA"}
@@ -14,10 +14,11 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
- import { builtinClassifiers, Classifier, Enumeration, featureMetaType, Interface, isContainment, isProperty, isReference, Link, nameSorted, PrimitiveType, Property, Reference } from "@lionweb/core";
17
+ import { builtinClassifiers, Classifier, Containment, Enumeration, featureMetaType, Interface, isContainment, isProperty, isReference, LanguageEntity, Link, nameSorted, PrimitiveType, Property, Reference } from "@lionweb/core";
18
+ import { ConceptDescription, Deprecated, ioLionWebMpsSpecificAnnotationsFrom, KeyedDescription, ShortDescription, VirtualPackage } from "@lionweb/io-lionweb-mps-specific";
19
+ import { indent, switchOrIf, withFirstUpper, wrapInIf } from "@lionweb/textgen-utils";
18
20
  import { commaSeparated, when, withNewlineAppended } from "littoral-templates";
19
- import { indent, switchOrIf, withFirstUpper, wrapInIf } from "../utils/textgen.js";
20
- import { ConceptDescription, Deprecated, entityMetaType, extendsFrom, featuresToConcretelyImplementOf, implementsFrom, isAbstract, optionalityPostfix, tsFieldTypeForFeature, tsTypeForClassifier, tsTypeForDatatype, tsTypeForPrimitiveType, tsTypeForValueManager } from "./helpers/index.js";
21
+ import { entityMetaType, extendsFrom, featuresToConcretelyImplementOf, implementsFrom, isAbstract, optionalityPostfix, tsFieldTypeForFeature, tsTypeForClassifier, tsTypeForDataType, tsTypeForPrimitiveType, tsTypeForValueManager } from "./helpers/index.js";
21
22
  const cardinalityPrefix = (feature) => {
22
23
  if (feature instanceof Property) {
23
24
  return feature.optional ? "Optional" : "Required";
@@ -27,48 +28,62 @@ const cardinalityPrefix = (feature) => {
27
28
  }
28
29
  };
29
30
  const valueManagerFor = (feature) => `${cardinalityPrefix(feature)}${featureMetaType(feature)}ValueManager`;
30
- export const typeForLanguageEntity = (imports, mpsAnnotationsPerId) => {
31
+ export const typeForLanguageEntity = (imports) => {
31
32
  const sortedSuperTypesCond = (ts, prefix) => ts.length === 0 ? `` : `${prefix}${nameSorted(ts).map((t) => imports.entity(t)).join(", ")}`;
32
33
  const extendsCond = (ref) => ` extends ${ref === builtinClassifiers.node ? imports.generic("NodeBase") : imports.entity(ref)}`;
33
34
  const classMembersForProperty = (property) => {
34
35
  const { name, type } = property;
35
36
  return [
36
- `private readonly _${name}: ${imports.generic(valueManagerFor(property))}<${tsTypeForDatatype(type, imports)}>;`,
37
- `get ${name}(): ${tsTypeForDatatype(type, imports)}${optionalityPostfix(property)} {`,
37
+ `private readonly _${name}: ${imports.generic(valueManagerFor(property))}<${tsTypeForDataType(type, imports)}>;`,
38
+ jsDocFor(property),
39
+ `get ${name}(): ${tsTypeForDataType(type, imports)}${optionalityPostfix(property)} {`,
38
40
  indent(`return this._${name}.get();`),
39
41
  `}`,
40
- `set ${name}(newValue: ${tsTypeForDatatype(type, imports)}${optionalityPostfix(property)}) {`,
42
+ `set ${name}(newValue: ${tsTypeForDataType(type, imports)}${optionalityPostfix(property)}) {`,
41
43
  indent(`this._${name}.set(newValue);`),
42
44
  `}`
43
45
  ];
44
46
  };
45
- const tsTypeForLink = (link) => wrapInIf(link instanceof Reference, () => `${imports.core("SingleRef")}<`, ">")(tsTypeForClassifier(link.type, imports))
46
- + (link.multiple ? "[]" : optionalityPostfix(link));
47
47
  const classMembersForLink = (link) => {
48
48
  const { name, type, multiple } = link;
49
+ const nameWithFirstUpper = withFirstUpper(name);
50
+ const tsTypeForClassifier_ = tsTypeForClassifier(type, imports);
51
+ const tsTypeForLink_ = wrapInIf(link instanceof Reference, () => `${imports.core("SingleRef")}<`, ">")(tsTypeForClassifier_)
52
+ + (link.multiple ? "[]" : optionalityPostfix(link));
49
53
  return [
50
- `private readonly _${name}: ${imports.generic(valueManagerFor(link))}<${tsTypeForClassifier(type, imports)}>;`,
51
- `get ${name}(): ${tsTypeForLink(link)} {`,
54
+ `private readonly _${name}: ${imports.generic(valueManagerFor(link))}<${tsTypeForClassifier_}>;`,
55
+ jsDocFor(link),
56
+ `get ${name}(): ${tsTypeForLink_} {`,
52
57
  indent(`return this._${name}.get();`),
53
58
  `}`,
54
59
  when(!multiple)([
55
- `set ${name}(newValue: ${tsTypeForLink(link)}) {`,
60
+ `set ${name}(newValue: ${tsTypeForLink_}) {`,
56
61
  indent(`this._${name}.set(newValue);`),
57
- `}`
62
+ `}`,
63
+ when(link instanceof Containment)([
64
+ `replace${nameWithFirstUpper}With(newValue: ${tsTypeForClassifier_}) {`,
65
+ indent(`this._${name}.replaceWith(newValue);`),
66
+ `}`
67
+ ])
58
68
  ]),
59
69
  when(multiple)([
60
- `add${withFirstUpper(name)}(newValue: ${tsTypeForClassifier(type, imports)}) {`,
70
+ `add${nameWithFirstUpper}(newValue: ${tsTypeForClassifier_}) {`,
61
71
  indent(`this._${name}.add(newValue);`),
62
72
  `}`,
63
- `remove${withFirstUpper(name)}(valueToRemove: ${tsTypeForClassifier(type, imports)}) {`,
73
+ `remove${nameWithFirstUpper}(valueToRemove: ${tsTypeForClassifier_}) {`,
64
74
  indent(`this._${name}.remove(valueToRemove);`),
65
75
  `}`,
66
- `add${withFirstUpper(name)}AtIndex(newValue: ${tsTypeForClassifier(type, imports)}, index: number) {`,
76
+ `add${nameWithFirstUpper}AtIndex(newValue: ${tsTypeForClassifier_}, index: number) {`,
67
77
  indent(`this._${name}.insertAtIndex(newValue, index);`),
68
78
  `}`,
69
- `move${withFirstUpper(name)}(oldIndex: number, newIndex: number) {`,
79
+ `move${nameWithFirstUpper}(oldIndex: number, newIndex: number) {`,
70
80
  indent(`this._${name}.move(oldIndex, newIndex);`),
71
- `}`
81
+ `}`,
82
+ when(link instanceof Containment)([
83
+ `replace${nameWithFirstUpper}AtIndex(movedChild: ${tsTypeForClassifier_}, newIndex: number) {`,
84
+ indent(`this._${name}.replaceAtIndex(movedChild, newIndex);`),
85
+ `}`
86
+ ])
72
87
  ])
73
88
  ];
74
89
  };
@@ -110,7 +125,7 @@ export const typeForLanguageEntity = (imports, mpsAnnotationsPerId) => {
110
125
  when(features.length > 0)(() => [
111
126
  ``,
112
127
  features.map(withNewlineAppended(classMembersForFeature)),
113
- `public constructor(classifier: ${imports.core("Classifier")}, id: ${imports.json("LionWebId")}, handleDelta?: ${imports.generic("DeltaHandler")}, parentInfo?: ${imports.generic("Parentage")}) {`,
128
+ `${isAbstract(classifier) ? "protected" : "public"} constructor(classifier: ${imports.core("Classifier")}, id: ${imports.json("LionWebId")}, handleDelta?: ${imports.generic("DeltaHandler")}, parentInfo?: ${imports.generic("Parentage")}) {`,
114
129
  indent([
115
130
  `super(classifier, id, handleDelta, parentInfo);`,
116
131
  features.map((feature) => `this._${feature.name} = new ${imports.generic(valueManagerFor(feature))}<${tsTypeForValueManager(feature, imports)}>(${imports.language(feature.classifier.language)}.INSTANCE.${feature.classifier.name}_${feature.name}, this);`)
@@ -138,14 +153,32 @@ export const typeForLanguageEntity = (imports, mpsAnnotationsPerId) => {
138
153
  ];
139
154
  const typeForPrimitiveType = (primitiveType) => `export type ${primitiveType.name} = ${tsTypeForPrimitiveType(primitiveType)};`;
140
155
  const jsDocFor = (entity) => {
141
- const mpsAnnotationsForEntity = mpsAnnotationsPerId[entity.id] ?? [];
142
- const conceptDescription = mpsAnnotationsForEntity.find((mpsAnnotation) => mpsAnnotation instanceof ConceptDescription);
143
- const hasShortConceptDescription = !!(conceptDescription?.shortDescription);
144
- const deprecated = mpsAnnotationsForEntity.find((mpsAnnotation) => mpsAnnotation instanceof Deprecated);
145
- return when(hasShortConceptDescription || deprecated !== undefined)([
156
+ const annotations = ioLionWebMpsSpecificAnnotationsFrom(entity);
157
+ const conceptDescription = annotations.find((annotation) => annotation instanceof ConceptDescription);
158
+ const deprecated = annotations.find((annotation) => annotation instanceof Deprecated);
159
+ const keyedDescription = annotations.find((annotation) => annotation instanceof KeyedDescription);
160
+ const shortDescription = annotations.find((annotation) => annotation instanceof ShortDescription);
161
+ const virtualPackage = annotations.find((annotation) => annotation instanceof VirtualPackage);
162
+ const requiresJsDoc = !!(conceptDescription?.conceptShortDescription)
163
+ || !!(conceptDescription?.helpUrl)
164
+ || !!(shortDescription?.description)
165
+ || keyedDescription !== undefined
166
+ || deprecated !== undefined
167
+ || !!(virtualPackage?.name);
168
+ const linkName = (node) => node instanceof LanguageEntity
169
+ ? node.name
170
+ : "??? (not a language's entity)";
171
+ return when(requiresJsDoc)([
146
172
  `/**`,
147
- when(hasShortConceptDescription)(() => ` * ${conceptDescription.shortDescription}`),
148
- when(deprecated !== undefined)(() => ` * @deprecated ${deprecated.comment ?? ""}${deprecated.build === null ? "" : ` (build: ${deprecated.build})`}`),
173
+ when(!!(conceptDescription?.conceptShortDescription))(() => ` * ${conceptDescription.conceptShortDescription}`),
174
+ when(!!(conceptDescription?.helpUrl))(() => ` * {@see} ${conceptDescription.helpUrl}`),
175
+ when(!!(shortDescription?.description))(() => ` * ${shortDescription.description}`),
176
+ when(keyedDescription !== undefined)(() => [
177
+ when(keyedDescription.documentation !== undefined)(` * ${keyedDescription.documentation}`),
178
+ keyedDescription.seeAlso.map((seeAlso) => ` * {@see} {@link ${linkName(seeAlso)}}`)
179
+ ]),
180
+ when(deprecated !== undefined)(() => ` * @deprecated ${deprecated.comment ?? ""}${deprecated.build === undefined ? "" : ` (build: ${deprecated.build})`}`),
181
+ when(!!(virtualPackage?.name))(() => `(virtual package: ${virtualPackage.name})`),
149
182
  ` */`
150
183
  ]);
151
184
  };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-types.templates.js","sourceRoot":"","sources":["../src/entity-types.templates.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EACH,kBAAkB,EAClB,UAAU,EACV,WAAW,EACX,WAAW,EAEX,eAAe,EACf,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EACX,cAAc,EACd,IAAI,EAEJ,UAAU,EAEV,aAAa,EACb,QAAQ,EACR,SAAS,EAEZ,MAAM,eAAe,CAAA;AACtB,OAAO,EACH,kBAAkB,EAClB,UAAU,EACV,mCAAmC,EACnC,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACjB,MAAM,kCAAkC,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AACrF,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE9E,OAAO,EACH,cAAc,EACd,WAAW,EACX,+BAA+B,EAC/B,cAAc,EAEd,UAAU,EACV,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACxB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,iBAAiB,GAAG,CAAC,OAAgB,EAAE,EAAE;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,CAAC,CAAC,CAAC,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAC1B,GAAG,EAAE,CAAC,qBAAqB,cAAc,CAAC,IAAI,GAAG,CACpD;YACD,KAAK;SACR,CAAC,CAAA;IACN,CAAC,CAAA;IAED,OAAO,CAAC,MAAsB,EAAE,EAAE,CAC9B;QACI,QAAQ,CAAC,MAAM,CAAC;QAChB,CAAC,GAAG,EAAE;YACF,IAAI,MAAM,YAAY,SAAS,EAAE,CAAC;gBAC9B,OAAO,YAAY,CAAC,MAAM,CAAC,CAAA;YAC/B,CAAC;YACD,IAAI,MAAM,YAAY,UAAU,EAAE,CAAC;gBAC/B,OAAO,0BAA0B,CAAC,MAAM,CAAC,CAAA;YAC7C,CAAC;YACD,IAAI,MAAM,YAAY,WAAW,EAAE,CAAC;gBAChC,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAA;YACrC,CAAC;YACD,IAAI,MAAM,YAAY,aAAa,EAAE,CAAC;gBAClC,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;YACvC,CAAC;YACD,OAAO,iCAAiC,cAAc,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,IAAI,GAAG,CAAA;QACrF,CAAC,CAAC,EAAE;KACP,CAAA;AAET,CAAC,CAAA"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Generic (//-styled) comments warning about code being generated.
3
3
  */
4
- export declare const generatedCodeWarningComments = "// Warning: this file is generated!\n// Modifying it by hand is useless at best, and sabotage at worst.\n";
4
+ export declare const generatedCodeWarningComments = "// Warning: this file is generated!\n// Modifying it by hand is useless at best, and sabotage at worst.";
5
5
  /**
6
6
  * The empty line-separation concatenation of the Trumpf-flavored Apache-2.0 license header and the generation warning.
7
7
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-headers.d.ts","sourceRoot":"","sources":["../src/generation-headers.ts"],"names":[],"mappings":"AAuCA;;GAEG;AACH,eAAO,MAAM,4BAA4B,4GAC0B,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,+CAA+C,QACqC,CAAA"}
@@ -1,12 +1,20 @@
1
- // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE
1
+ // Copyright 2025 TRUMPF Laser SE and other contributors
2
2
  //
3
- // SPDX-License-Identifier: LicenseRef-TRUMPF
3
+ // Licensed under the Apache License, Version 2.0 (the "License")
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ //
15
+ // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
+ // SPDX-License-Identifier: Apache-2.0
4
17
  import { asString } from "littoral-templates";
5
- /**
6
- * @return the given string, reversed — "abc" -> "cba"
7
- * Note: only used to hack around the REUSE compliance checker!
8
- */
9
- const reverseString = (str) => str.split("").reverse().join("");
10
18
  /**
11
19
  * The license header (as //-styled comments) for code originating from Trumpf Laser SE, licensed under Apache-2.0.
12
20
  */
@@ -24,17 +32,15 @@ const trumpfOriginatingApache2_0LicenseHeaderComments = `// Copyright 2025 TRUMP
24
32
  // See the License for the specific language governing permissions and
25
33
  // limitations under the License.
26
34
  //
27
- // ${reverseString("txeTthgirypoCeliF-XDPS")}: 2025 TRUMPF Laser SE and other contributors
28
- // ${reverseString("reifitnedI-esneciL-XDPS")}: Apache-2.0
29
- `;
35
+ // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
36
+ // SPDX-License-Identifier: Apache-2.0`;
30
37
  /**
31
38
  * Generic (//-styled) comments warning about code being generated.
32
39
  */
33
40
  export const generatedCodeWarningComments = `// Warning: this file is generated!
34
- // Modifying it by hand is useless at best, and sabotage at worst.
35
- `;
41
+ // Modifying it by hand is useless at best, and sabotage at worst.`;
36
42
  /**
37
43
  * The empty line-separation concatenation of the Trumpf-flavored Apache-2.0 license header and the generation warning.
38
44
  */
39
- export const defaultTrumpfOriginatingApache2_0LicensedHeader = asString([trumpfOriginatingApache2_0LicenseHeaderComments, ``, generatedCodeWarningComments, ``]);
45
+ export const defaultTrumpfOriginatingApache2_0LicensedHeader = asString([trumpfOriginatingApache2_0LicenseHeaderComments, ``, generatedCodeWarningComments]);
40
46
  //# sourceMappingURL=generation-headers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generation-headers.js","sourceRoot":"","sources":["../src/generation-headers.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C;;GAEG;AACH,MAAM,+CAA+C,GAAG;;;;;;;;;;;;;;;uCAejB,CAAA;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;mEACuB,CAAA;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,+CAA+C,GACxD,QAAQ,CAAC,CAAC,+CAA+C,EAAE,EAAE,EAAE,4BAA4B,CAAC,CAAC,CAAA"}
@@ -1,11 +1,10 @@
1
1
  import { Language } from "@lionweb/core";
2
- import { MpsAnnotation } from "./helpers/index.js";
3
2
  export type GeneratorOptions = {
4
- mpsAnnotations: MpsAnnotation[];
5
3
  genericImportLocation: string;
6
4
  header?: string;
5
+ verbose: boolean;
7
6
  };
8
- export declare const generateLanguage: (language: Language, generationPath: string, options?: Partial<GeneratorOptions>) => string;
9
- export declare const generateApiFromLanguagesJson: (languagesJsonPath: string, generationPath: string, options?: Partial<GeneratorOptions>) => void;
7
+ export declare const generateLanguage: (language: Language, generationPath: string, mayBeOptions?: Partial<GeneratorOptions>) => string;
8
+ export declare const generateApiFromLanguagesJson: (languagesJsonPath: string, generationPath: string, mayBeOptions?: Partial<GeneratorOptions>) => void;
10
9
  export declare const generateApiFromLanguages: (languages: Language[], generationPath: string, maybeOptions?: Partial<GeneratorOptions>) => void;
11
10
  //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,QAAQ,EAAY,MAAM,eAAe,CAAA;AAaxE,MAAM,MAAM,gBAAgB,GAAG;IAC3B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,OAAO,CAAA;CACnB,CAAA;AAUD,eAAO,MAAM,gBAAgB,aAAc,QAAQ,kBAAkB,MAAM,iBAAiB,QAAQ,gBAAgB,CAAC,KAAG,MAKvH,CAAA;AASD,eAAO,MAAM,4BAA4B,sBAAuB,MAAM,kBAAkB,MAAM,iBAAiB,QAAQ,gBAAgB,CAAC,SASvI,CAAA;AAGD,eAAO,MAAM,wBAAwB,cAAe,QAAQ,EAAE,kBAAkB,MAAM,iBAAiB,QAAQ,gBAAgB,CAAC,SAmB/H,CAAA"}
@@ -23,37 +23,42 @@ import { indexTsFor } from "./index-ts.js";
23
23
  import { languageFileFor } from "./language-file.templates.js";
24
24
  const properGenericImportLocation = "@lionweb/class-core";
25
25
  const withDefaults = (options) => ({
26
- mpsAnnotations: options?.mpsAnnotations ?? [],
27
26
  genericImportLocation: options?.genericImportLocation ?? properGenericImportLocation,
28
- header: options?.header
27
+ header: options?.header,
28
+ verbose: options?.verbose ?? true
29
29
  });
30
- export const generateLanguage = (language, generationPath, options) => {
30
+ export const generateLanguage = (language, generationPath, mayBeOptions) => {
31
31
  const { name } = language;
32
32
  const fileName = `${name}.g.ts`;
33
- writeFileSync(join(generationPath, fileName), languageFileFor(language, withDefaults(options)));
33
+ writeFileSync(join(generationPath, fileName), languageFileFor(language, withDefaults(mayBeOptions)));
34
34
  return fileName;
35
35
  };
36
- export const generateApiFromLanguagesJson = (languagesJsonPath, generationPath, options) => {
37
- console.log(`Running API generator with cwd: ${cwd()}`);
38
- console.log(` Path to languages: ${languagesJsonPath}`);
39
- console.log(` Generation path: ${generationPath}`);
36
+ const logger = (verbose) => (verbose ?? true)
37
+ ? (_text) => { }
38
+ : (text) => { console.log(text ?? ``); };
39
+ export const generateApiFromLanguagesJson = (languagesJsonPath, generationPath, mayBeOptions) => {
40
+ const log = logger(mayBeOptions?.verbose);
41
+ log(`Running API generator with cwd: ${cwd()}`);
42
+ log(` Path to languages: ${languagesJsonPath}`);
43
+ log(` Generation path: ${generationPath}`);
40
44
  const languagesJson = readFileAsJson(languagesJsonPath);
41
45
  const languages = deserializeLanguages(languagesJson, lioncore);
42
- generateApiFromLanguages(languages, generationPath, options);
46
+ generateApiFromLanguages(languages, generationPath, mayBeOptions);
43
47
  };
44
48
  export const generateApiFromLanguages = (languages, generationPath, maybeOptions) => {
45
- console.log(` Generated:`);
49
+ const log = logger(maybeOptions?.verbose);
50
+ log(` Generated:`);
46
51
  const options = withDefaults(maybeOptions);
47
52
  if (languages.length > 1) {
48
53
  writeFileSync(join(generationPath, "index.g.ts"), indexTsFor(languages, options));
49
- console.log(` index.g.ts`);
54
+ log(` index.g.ts`);
50
55
  }
51
56
  languages.forEach((language) => {
52
57
  const { name, version, key, id } = language;
53
58
  const fileName = generateLanguage(language, generationPath, options);
54
- console.log(` ${fileName} -> language: ${name} (version=${version}, key=${key}, id=${id})`);
59
+ log(` ${fileName} -> language: ${name} (version=${version}, key=${key}, id=${id})`);
55
60
  });
56
- console.log(`[done]`);
57
- console.log();
61
+ log(`[done]`);
62
+ log();
58
63
  };
59
64
  //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceR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AAmB,CAAC,CAAA;IAC5B,CAAC;IAED,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAC3B,MAAM,EAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,EAAE,EAAC,GAAG,QAAQ,CAAA;QACzC,MAAM,QAAQ,GAAG,gBAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,CAAA;QACpE,GAAG,CAAC,UAAU,QAAQ,iBAAiB,IAAI,aAAa,OAAO,SAAS,GAAG,QAAQ,EAAE,GAAG,CAAC,CAAA;IAC7F,CAAC,CAAC,CAAA;IAEF,GAAG,CAAC,QAAQ,CAAC,CAAA;IACb,GAAG,EAAE,CAAA;AACT,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifiers.d.ts","sourceRoot":"","sources":["../../src/helpers/classifiers.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA8C,UAAU,EAAW,OAAO,EAAa,QAAQ,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAGxI,eAAO,MAAM,UAAU,eAAgB,UAAU,KAAG,OAA+D,CAAA;AAMnH,eAAO,MAAM,WAAW,eAAgB,UAAU,KAAG,UAAU,UAAU,CAAC,GAAG,SAQ5E,CAAA;AAED,eAAO,MAAM,cAAc,eAAgB,UAAU,KAAG,SAAS,UAAU,CAQ1E,CAAA;AAED,eAAO,MAAM,+BAA+B,eAAgB,UAAU,KAAG,OAAO,EAO/E,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifiers.js","sourceRoot":"","sources":["../../src/helpers/classifiers.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AA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,CAAC,CAAA;AACzE,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/helpers/entities.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAkC,cAAc,EAAiB,MAAM,eAAe,CAAA;AAE7F,KAAK,cAAc,GAAG,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,WAAW,GAAG,eAAe,CAAA;AAE9F,eAAO,MAAM,cAAc,WAAY,cAAc,KAAG,cAcvD,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/helpers/entities.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,EAAkB,aAAa,EAAE,MAAM,eAAe,CAAA;AAI7F,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAsB,EAAkB,EAAE;IACrE,IAAI,MAAM,YAAY,UAAU,EAAE,CAAC;QAC/B,OAAO,YAAY,CAAA;IACvB,CAAC;IACD,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;QAC5B,OAAO,SAAS,CAAA;IACpB,CAAC;IACD,IAAI,MAAM,YAAY,SAAS,EAAE,CAAC;QAC9B,OAAO,WAAW,CAAA;IACtB,CAAC;IACD,IAAI,MAAM,YAAY,aAAa,EAAE,CAAC;QAClC,OAAO,eAAe,CAAA;IAC1B,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,qCAAqC,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAA;AACnF,CAAC,CAAA"}
@@ -1,9 +1,9 @@
1
- import { Classifier, Datatype, Feature, LanguageEntity, SingleRef } from "@lionweb/core";
1
+ import { Classifier, DataType, Feature, LanguageEntity, SingleRef } from "@lionweb/core";
2
2
  import { Imports } from "./index.js";
3
3
  export declare const typeOf: (feature: Feature) => SingleRef<LanguageEntity>;
4
- export declare const tsTypeForDatatype: (datatype: SingleRef<Datatype>, imports: Imports) => string;
4
+ export declare const tsTypeForDataType: (dataType: SingleRef<DataType>, imports: Imports) => string;
5
5
  export declare const tsTypeForClassifier: (classifier: SingleRef<Classifier>, imports: Imports) => string;
6
- export declare const optionalityPostfix: (feature: Feature) => "" | " | undefined";
6
+ export declare const optionalityPostfix: (feature: Feature) => " | undefined" | "";
7
7
  export declare const tsFieldTypeForFeature: (feature: Feature, imports: Imports) => string;
8
8
  export declare const tsTypeForValueManager: (feature: Feature, imports: Imports) => string;
9
9
  //# sourceMappingURL=features.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/helpers/features.ts"],"names":[],"mappings":"AAiBA,OAAO,EAEH,UAAU,EACV,QAAQ,EAER,OAAO,EAIP,cAAc,EAId,SAAS,EAEZ,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,OAAO,EAA0B,MAAM,YAAY,CAAA;AAE5D,eAAO,MAAM,MAAM,YAAa,OAAO,KAAG,UAAU,cAAc,CAQjE,CAAA;AAGD,eAAO,MAAM,iBAAiB,aAAc,UAAU,QAAQ,CAAC,WAAW,OAAO,WAWhF,CAAA;AAGD,eAAO,MAAM,mBAAmB,eAAgB,UAAU,UAAU,CAAC,WAAW,OAAO,WAKtF,CAAA;AAGD,eAAO,MAAM,kBAAkB,YAAa,OAAO,wBAA2C,CAAA;AAE9F,eAAO,MAAM,qBAAqB,YAAa,OAAO,WAAW,OAAO,KAAG,MA0B1E,CAAA;AAED,eAAO,MAAM,qBAAqB,YAAa,OAAO,WAAW,OAAO,KAAG,MAqB1E,CAAA"}
@@ -25,17 +25,17 @@ export const typeOf = (feature) => {
25
25
  }
26
26
  return null;
27
27
  };
28
- export const tsTypeForDatatype = (datatype, imports) => {
29
- if (datatype === null) {
30
- return `unknown /* [ERROR] can't compute a TS type for a null datatype */`;
28
+ export const tsTypeForDataType = (dataType, imports) => {
29
+ if (dataType === null) {
30
+ return `unknown /* [ERROR] can't compute a TS type for a null data type */`;
31
31
  }
32
- if (datatype instanceof PrimitiveType) {
33
- return tsTypeForPrimitiveType(datatype);
32
+ if (dataType instanceof PrimitiveType) {
33
+ return tsTypeForPrimitiveType(dataType);
34
34
  }
35
- if (datatype instanceof Enumeration) {
36
- return imports.entity(datatype);
35
+ if (dataType instanceof Enumeration) {
36
+ return imports.entity(dataType);
37
37
  }
38
- return `unknown /* [ERROR] can't compute a TS type for datatype ${datatype.name} that has an unhandled/-known meta-type ${datatype.constructor.name} */`;
38
+ return `unknown /* [ERROR] can't compute a TS type for data type ${dataType.name} that has an unhandled/-known meta-type ${dataType.constructor.name} */`;
39
39
  };
40
40
  export const tsTypeForClassifier = (classifier, imports) => {
41
41
  if (classifier === unresolved) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/helpers/features.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EACH,kBAAkB,EAGlB,WAAW,EAEX,aAAa,EACb,UAAU,EACV,WAAW,EAEX,IAAI,EACJ,aAAa,EACb,QAAQ,EAER,UAAU,EACb,MAAM,eAAe,CAAA;AACtB,OAAO,EAAW,sBAAsB,EAAE,MAAM,YAAY,CAAA;AAE5D,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,OAAgB,EAA6B,EAAE;IAClE,IAAI,OAAO,YAAY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,QAAQ,EAAE,QAAQ;CAY9B"}
@@ -15,7 +15,7 @@
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
  import { lioncoreBuiltins } from "@lionweb/core";
18
- import { asJSIdentifier } from "../../utils/textgen.js";
18
+ import { asJSIdentifier } from "@lionweb/textgen-utils";
19
19
  export const importRenamingForLanguage = (language) => asJSIdentifier(language.name);
20
20
  export const nameOfBaseClassForLanguage = (language) => asJSIdentifier(language.name) + "Base";
21
21
  const lionCoreBuiltinsIdentifier = nameOfBaseClassForLanguage(lioncoreBuiltins);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imports-tracking.js","sourceRoot":"","sources":["../../src/helpers/imports-tracking.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAA4B,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,QAAkB,EAAE,EAAE,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;AAE9F,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAkB,EAAE,EAAE,CAC7D,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,MAAM,CAAA;AAG1C,MAAM,0BAA0B,GAAG,0BAA0B,CAAC,gBAAgB,CAAC,CAAA;AAG/E,MAAM,OAAO,OAAO;IAEhB,YAA4B,YAAsB;QAAtB,iBAAY,GAAZ,YAAY,CAAU;QAWjC,iBAAY,GAAG,IAAI,GAAG,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ACrC,OAAO,MAAM,CAAC,IAAI,CAAA;QACtB,CAAC;QACD,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;YACxC,OAAO,MAAM,CAAC,IAAI,CAAA;QACtB,CAAC;QACD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,yBAAyB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAA;QACrE,OAAO,GAAG,yBAAyB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,CAAA;IACzE,CAAC;IAGD,IAAI,eAAe;QACf,OAAO,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,CAAA;IACrC,CAAC;IACD,QAAQ,CAAC,QAAkB;QACvB,IAAI,QAAQ,KAAK,gBAAgB,EAAE,CAAC;YAChC,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACpD,OAAO,0BAA0B,CAAA;QACrC,CAAC;QACD,MAAM,YAAY,GAAG,yBAAyB,CAAC,QAAQ,CAAC,CAAA;QACxD,IAAI,QAAQ,KAAK,IAAI,CAAC,YAAY,EAAE,CAAC;YACjC,OAAO,0BAA0B,CAAC,QAAQ,CAAC,CAAA;QAC/C,CAAC;QACD,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAA;QACvC,OAAO,GAAG,YAAY,IAAI,0BAA0B,CAAC,QAAQ,CAAC,EAAE,CAAA;IACpE,CAAC;CACJ"}
@@ -1,8 +1,6 @@
1
1
  export * from "./classifiers.js";
2
- export * from "./dependencies.js";
3
2
  export * from "./entities.js";
4
3
  export * from "./features.js";
5
4
  export * from "./imports-tracking.js";
6
- export * from "./mps-annotations.js";
7
5
  export * from "./primitive-types.js";
8
6
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAiBA,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA"}
@@ -15,10 +15,8 @@
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
  export * from "./classifiers.js";
18
- export * from "./dependencies.js";
19
18
  export * from "./entities.js";
20
19
  export * from "./features.js";
21
20
  export * from "./imports-tracking.js";
22
- export * from "./mps-annotations.js";
23
21
  export * from "./primitive-types.js";
24
22
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-types.d.ts","sourceRoot":"","sources":["../../src/helpers/primitive-types.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAqB,aAAa,EAAE,MAAM,eAAe,CAAA;AAEhE,eAAO,MAAM,sBAAsB,kBAAmB,aAAa,KAAG,MAarE,CAAA"}
@@ -17,13 +17,13 @@
17
17
  import { builtinPrimitives } from "@lionweb/core";
18
18
  export const tsTypeForPrimitiveType = (primitiveType) => {
19
19
  switch (primitiveType) {
20
- case builtinPrimitives.booleanDatatype:
20
+ case builtinPrimitives.booleanDataType:
21
21
  return `boolean`;
22
- case builtinPrimitives.stringDatatype:
22
+ case builtinPrimitives.stringDataType:
23
23
  return `string`;
24
- case builtinPrimitives.integerDatatype:
24
+ case builtinPrimitives.integerDataType:
25
25
  return `number`;
26
- case builtinPrimitives.jsonDatatype:
26
+ case builtinPrimitives.jsonDataType:
27
27
  return `unknown`;
28
28
  default:
29
29
  return `string`;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"primitive-types.js","sourceRoot":"","sources":["../../src/helpers/primitive-types.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,eAAe,CAAA;AAEhE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,aAA4B,EAAU,EAAE;IAC3E,QAAQ,aAAa,EAAE,CAAC;QACpB,KAAK,iBAAiB,CAAC,eAAe;YAClC,OAAO,SAAS,CAAA;QACpB,KAAK,iBAAiB,CAAC,cAAc;YACjC,OAAO,QAAQ,CAAA;QACnB,KAAK,iBAAiB,CAAC,eAAe;YAClC,OAAO,QAAQ,CAAA;QACnB,KAAK,iBAAiB,CAAC,YAAY;YAC/B,OAAO,SAAS,CAAA;QACpB;YACI,OAAO,QAAQ,CAAA;IACvB,CAAC;AACL,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ts.d.ts","sourceRoot":"","sources":["../src/index-ts.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAMxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGjD,eAAO,MAAM,UAAU,cAAe,QAAQ,EAAE,WAAW,gBAAgB,WA0C1E,CAAA"}
@@ -14,10 +14,11 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
+ import { indent } from "@lionweb/textgen-utils";
17
18
  import { dependencyOrderOf } from "@lionweb/ts-utils";
19
+ import { dependenciesThroughDirectInheritanceOf } from "@lionweb/utilities";
18
20
  import { asString, commaSeparated } from "littoral-templates";
19
- import { indent } from "../utils/textgen.js";
20
- import { dependenciesThroughDirectInheritanceOf, importRenamingForLanguage, nameOfBaseClassForLanguage } from "./helpers/index.js";
21
+ import { importRenamingForLanguage, nameOfBaseClassForLanguage } from "./helpers/index.js";
21
22
  export const indexTsFor = (languages, options) => {
22
23
  const dependenciesInOrderOfDirectInheritance = dependencyOrderOf(languages, dependenciesThroughDirectInheritanceOf);
23
24
  if (dependenciesInOrderOfDirectInheritance === false) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-ts.js","sourceRoot":"","sources":["../src/index-ts.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAGtC,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AACrD,OAAO,EAAE,sCAAsC,EAAE,MAAM,oBAAoB,CAAA;AAC3E,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAG7D,OAAO,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAE1F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,SAAqB,EAAE,OAAyB,EAAE,EAAE;IAC3E,MAAM,s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AI;QACJ,EAAE;QACF,UAAU;QACV,MAAM,CAAC,cAAc,CAAC,SAAS,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,CAAC;QAChE,IAAI;QACJ,EAAE;KACL,CAAC,CAAA;AACN,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from "./api/index.js";
2
- export * from "./utils/index.js";
1
+ export { generateLanguage, generateApiFromLanguages, generateApiFromLanguagesJson } from "./generator.js";
2
+ export * from "./generation-headers.js";
3
+ export * from "./mega-factory.templates.js";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AACzG,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA"}
package/dist/index.js CHANGED
@@ -14,6 +14,7 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
- export * from "./api/index.js";
18
- export * from "./utils/index.js";
17
+ export { generateLanguage, generateApiFromLanguages, generateApiFromLanguagesJson } from "./generator.js";
18
+ export * from "./generation-headers.js";
19
+ export * from "./mega-factory.templates.js";
19
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,EAAE;AACF,iEAAiE;AACjE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,sCAAsC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAA;AACzG,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"language-file.templates.d.ts","sourceRoot":"","sources":["../src/language-file.templates.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAW,QAAQ,EAAE,MAAM,eAAe,CAAA;AAMjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAQjD,eAAO,MAAM,eAAe,aAAc,QAAQ,WAAW,gBAAgB,WAsC5E,CAAA"}
@@ -14,11 +14,10 @@
14
14
  //
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
- import { sortedStringsByUppercase } from "@lionweb/ts-utils";
18
17
  import { Concept } from "@lionweb/core";
19
- import { dependencyOrderOf, groupBy } from "@lionweb/ts-utils";
18
+ import { indent } from "@lionweb/textgen-utils";
19
+ import { dependencyOrderOf, sortedStringsByUppercase } from "@lionweb/ts-utils";
20
20
  import { asString, commaSeparated, when, withNewlineAppended } from "littoral-templates";
21
- import { indent } from "../utils/textgen.js";
22
21
  import { typeForLanguageEntity } from "./entity-types.templates.js";
23
22
  import { Imports } from "./helpers/index.js";
24
23
  import { reflectiveClassFor } from "./reflective-layer.templates.js";
@@ -30,7 +29,6 @@ export const languageFileFor = (language, options) => {
30
29
  if (typeof orderedEntities === "boolean") {
31
30
  throw new Error(`language ${name} has a cycle among the graph of entities with edges formed by the inheritance dependency`);
32
31
  }
33
- const mpsAnnotationsPerId = groupBy(options.mpsAnnotations, ({ annotatedNodeId }) => annotatedNodeId);
34
32
  const postImportsPart = [
35
33
  ``,
36
34
  reflectiveClassFor(imports)(language),
@@ -38,7 +36,7 @@ export const languageFileFor = (language, options) => {
38
36
  ``,
39
37
  orderedEntities
40
38
  .filter((entity) => entity.language === language)
41
- .map(withNewlineAppended(typeForLanguageEntity(imports, mpsAnnotationsPerId)))
39
+ .map(withNewlineAppended(typeForLanguageEntity(imports)))
42
40
  ];
43
41
  return asString([
44
42
  options?.header ?? [],