@lionweb/class-core-generator 0.7.0-beta.0 → 0.7.0-beta.2

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 +4 -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} +35 -14
  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} +3 -5
  9. package/dist/generation-headers.js.map +1 -0
  10. package/dist/{api/generator.d.ts → generator.d.ts} +0 -2
  11. package/dist/generator.d.ts.map +1 -0
  12. package/dist/{api/generator.js → generator.js} +0 -1
  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 +11 -11
  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} +1 -1
  48. package/dist/reflective-layer.templates.js.map +1 -0
  49. package/package.json +16 -12
  50. package/src/{api/entity-types.templates.ts → entity-types.templates.ts} +55 -19
  51. package/src/{api/generation-headers.ts → generation-headers.ts} +3 -5
  52. package/src/{api/generator.ts → generator.ts} +0 -3
  53. package/src/{api/helpers → helpers}/features.ts +13 -12
  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} +1 -1
  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
@@ -27,30 +27,36 @@ import {
27
27
  isReference,
28
28
  LanguageEntity,
29
29
  Link,
30
+ M3Concept,
30
31
  nameSorted,
32
+ Node,
31
33
  PrimitiveType,
32
34
  Property,
33
35
  Reference,
34
36
  SingleRef
35
37
  } from "@lionweb/core"
36
- import { LionWebId } from "@lionweb/json"
37
- import { commaSeparated, when, withNewlineAppended } from "littoral-templates"
38
-
39
- import { indent, switchOrIf, withFirstUpper, wrapInIf } from "../utils/textgen.js"
40
38
  import {
41
39
  ConceptDescription,
42
40
  Deprecated,
41
+ ioLionWebMpsSpecificAnnotationsFrom,
42
+ KeyedDescription,
43
+ ShortDescription,
44
+ VirtualPackage
45
+ } from "@lionweb/io-lionweb-mps-specific"
46
+ import { indent, switchOrIf, withFirstUpper, wrapInIf } from "@lionweb/textgen-utils"
47
+ import { commaSeparated, when, withNewlineAppended } from "littoral-templates"
48
+
49
+ import {
43
50
  entityMetaType,
44
51
  extendsFrom,
45
52
  featuresToConcretelyImplementOf,
46
53
  implementsFrom,
47
54
  Imports,
48
55
  isAbstract,
49
- MpsAnnotation,
50
56
  optionalityPostfix,
51
57
  tsFieldTypeForFeature,
52
58
  tsTypeForClassifier,
53
- tsTypeForDatatype,
59
+ tsTypeForDataType,
54
60
  tsTypeForPrimitiveType,
55
61
  tsTypeForValueManager
56
62
  } from "./helpers/index.js"
@@ -67,7 +73,7 @@ const cardinalityPrefix = (feature: Feature) => {
67
73
  const valueManagerFor = (feature: Feature) =>
68
74
  `${cardinalityPrefix(feature)}${featureMetaType(feature)}ValueManager`
69
75
 
70
- export const typeForLanguageEntity = (imports: Imports, mpsAnnotationsPerId: Record<LionWebId, MpsAnnotation[]>) => {
76
+ export const typeForLanguageEntity = (imports: Imports) => {
71
77
 
72
78
  const sortedSuperTypesCond = <T extends Classifier>(ts: T[], prefix: string): string =>
73
79
  ts.length === 0 ? `` : `${prefix}${nameSorted(ts).map((t) => imports.entity(t)).join(", ")}`
@@ -78,11 +84,12 @@ export const typeForLanguageEntity = (imports: Imports, mpsAnnotationsPerId: Rec
78
84
  const classMembersForProperty = (property: Property) => {
79
85
  const {name, type} = property
80
86
  return [
81
- `private readonly _${name}: ${imports.generic(valueManagerFor(property))}<${tsTypeForDatatype(type, imports)}>;`,
82
- `get ${name}(): ${tsTypeForDatatype(type, imports)}${optionalityPostfix(property)} {`,
87
+ `private readonly _${name}: ${imports.generic(valueManagerFor(property))}<${tsTypeForDataType(type, imports)}>;`,
88
+ jsDocFor(property),
89
+ `get ${name}(): ${tsTypeForDataType(type, imports)}${optionalityPostfix(property)} {`,
83
90
  indent(`return this._${name}.get();`),
84
91
  `}`,
85
- `set ${name}(newValue: ${tsTypeForDatatype(type, imports)}${optionalityPostfix(property)}) {`,
92
+ `set ${name}(newValue: ${tsTypeForDataType(type, imports)}${optionalityPostfix(property)}) {`,
86
93
  indent(`this._${name}.set(newValue);`),
87
94
  `}`
88
95
  ]
@@ -96,6 +103,7 @@ export const typeForLanguageEntity = (imports: Imports, mpsAnnotationsPerId: Rec
96
103
  const {name, type, multiple} = link
97
104
  return [
98
105
  `private readonly _${name}: ${imports.generic(valueManagerFor(link))}<${tsTypeForClassifier(type, imports)}>;`,
106
+ jsDocFor(link),
99
107
  `get ${name}(): ${tsTypeForLink(link)} {`,
100
108
  indent(`return this._${name}.get();`),
101
109
  `}`,
@@ -215,18 +223,46 @@ export const typeForLanguageEntity = (imports: Imports, mpsAnnotationsPerId: Rec
215
223
  const typeForPrimitiveType = (primitiveType: PrimitiveType) =>
216
224
  `export type ${primitiveType.name} = ${tsTypeForPrimitiveType(primitiveType)};`
217
225
 
218
- const jsDocFor = (entity: LanguageEntity) => {
219
- const mpsAnnotationsForEntity = mpsAnnotationsPerId[entity.id] ?? []
220
- const conceptDescription = mpsAnnotationsForEntity.find((mpsAnnotation) => mpsAnnotation instanceof ConceptDescription) as ConceptDescription
221
- const hasShortConceptDescription = !!(conceptDescription?.shortDescription)
222
- const deprecated = mpsAnnotationsForEntity.find((mpsAnnotation) => mpsAnnotation instanceof Deprecated) as Deprecated
223
- return when(hasShortConceptDescription || deprecated !== undefined)([
226
+ const jsDocFor = (entity: M3Concept) => {
227
+ const annotations = ioLionWebMpsSpecificAnnotationsFrom(entity)
228
+ const conceptDescription = annotations.find((annotation) => annotation instanceof ConceptDescription) as ConceptDescription
229
+ const deprecated = annotations.find((annotation) => annotation instanceof Deprecated) as Deprecated
230
+ const keyedDescription = annotations.find((annotation) => annotation instanceof KeyedDescription) as KeyedDescription
231
+ const shortDescription = annotations.find((annotation) => annotation instanceof ShortDescription) as ShortDescription
232
+ const virtualPackage = annotations.find((annotation) => annotation instanceof VirtualPackage) as VirtualPackage
233
+ const requiresJsDoc =
234
+ !!(conceptDescription?.conceptShortDescription)
235
+ || !!(conceptDescription?.helpUrl)
236
+ || !!(shortDescription?.description)
237
+ || keyedDescription !== undefined
238
+ || deprecated !== undefined
239
+ || !!(virtualPackage?.name)
240
+ const linkName = (node: Node) =>
241
+ node instanceof LanguageEntity
242
+ ? node.name
243
+ : "??? (not a language's entity)"
244
+ return when(requiresJsDoc)([
224
245
  `/**`,
225
- when(hasShortConceptDescription)(
226
- () => ` * ${conceptDescription.shortDescription}`
246
+ when(!!(conceptDescription?.conceptShortDescription))(
247
+ () => ` * ${conceptDescription.conceptShortDescription}`
248
+ ),
249
+ when(!!(conceptDescription?.helpUrl))(
250
+ () => ` * {@see} ${conceptDescription.helpUrl}`
251
+ ),
252
+ when(!!(shortDescription?.description))(
253
+ () => ` * ${shortDescription.description}`
254
+ ),
255
+ when(keyedDescription !== undefined)(
256
+ () => [
257
+ when(keyedDescription.documentation !== undefined)(` * ${keyedDescription.documentation}`),
258
+ keyedDescription.seeAlso.map((seeAlso) => ` * {@see} {@link ${linkName(seeAlso)}}`)
259
+ ]
227
260
  ),
228
261
  when(deprecated !== undefined)(
229
- () => ` * @deprecated ${deprecated.comment ?? ""}${deprecated.build === null ? "" : ` (build: ${deprecated.build})`}`
262
+ () => ` * @deprecated ${deprecated.comment ?? ""}${deprecated.build === undefined ? "" : ` (build: ${deprecated.build})`}`
263
+ ),
264
+ when(!!(virtualPackage?.name))(
265
+ () => `(virtual package: ${virtualPackage.name})`
230
266
  ),
231
267
  ` */`
232
268
  ])
@@ -29,19 +29,17 @@ const trumpfOriginatingApache2_0LicenseHeaderComments = `// Copyright 2025 TRUMP
29
29
  // limitations under the License.
30
30
  //
31
31
  // ${reverseString("txeTthgirypoCeliF-XDPS")}: 2025 TRUMPF Laser SE and other contributors
32
- // ${reverseString("reifitnedI-esneciL-XDPS")}: Apache-2.0
33
- `
32
+ // ${reverseString("reifitnedI-esneciL-XDPS")}: Apache-2.0`
34
33
 
35
34
  /**
36
35
  * Generic (//-styled) comments warning about code being generated.
37
36
  */
38
37
  export const generatedCodeWarningComments = `// Warning: this file is generated!
39
- // Modifying it by hand is useless at best, and sabotage at worst.
40
- `
38
+ // Modifying it by hand is useless at best, and sabotage at worst.`
41
39
 
42
40
  /**
43
41
  * The empty line-separation concatenation of the Trumpf-flavored Apache-2.0 license header and the generation warning.
44
42
  */
45
43
  export const defaultTrumpfOriginatingApache2_0LicensedHeader =
46
- asString([trumpfOriginatingApache2_0LicenseHeaderComments, ``, generatedCodeWarningComments, ``])
44
+ asString([trumpfOriginatingApache2_0LicenseHeaderComments, ``, generatedCodeWarningComments])
47
45
 
@@ -21,7 +21,6 @@ import { readFileAsJson } from "@lionweb/utilities"
21
21
  import { writeFileSync } from "fs"
22
22
  import { join } from "path"
23
23
  import { cwd } from "process"
24
- import { MpsAnnotation } from "./helpers/index.js"
25
24
 
26
25
  import { indexTsFor } from "./index-ts.js"
27
26
  import { languageFileFor } from "./language-file.templates.js"
@@ -30,14 +29,12 @@ const properGenericImportLocation = "@lionweb/class-core"
30
29
 
31
30
 
32
31
  export type GeneratorOptions = {
33
- mpsAnnotations: MpsAnnotation[]
34
32
  genericImportLocation: string
35
33
  header?: string
36
34
  }
37
35
 
38
36
 
39
37
  const withDefaults = (options?: Partial<GeneratorOptions>): GeneratorOptions => ({
40
- mpsAnnotations: options?.mpsAnnotations ?? [],
41
38
  genericImportLocation: options?.genericImportLocation ?? properGenericImportLocation,
42
39
  header: options?.header
43
40
  })
@@ -18,7 +18,7 @@
18
18
  import {
19
19
  builtinClassifiers,
20
20
  Classifier,
21
- Datatype,
21
+ DataType,
22
22
  Enumeration,
23
23
  Feature,
24
24
  isContainment,
@@ -28,7 +28,8 @@ import {
28
28
  Link,
29
29
  PrimitiveType,
30
30
  Property,
31
- SingleRef
31
+ SingleRef,
32
+ unresolved
32
33
  } from "@lionweb/core"
33
34
  import { Imports, tsTypeForPrimitiveType } from "./index.js"
34
35
 
@@ -43,23 +44,23 @@ export const typeOf = (feature: Feature): SingleRef<LanguageEntity> => {
43
44
  }
44
45
 
45
46
 
46
- export const tsTypeForDatatype = (datatype: SingleRef<Datatype>, imports: Imports) => {
47
- if (datatype === null) {
48
- return `unknown /* [ERROR] can't compute a TS type for a null datatype */`
47
+ export const tsTypeForDataType = (dataType: SingleRef<DataType>, imports: Imports) => {
48
+ if (dataType === null) {
49
+ return `unknown /* [ERROR] can't compute a TS type for a null data type */`
49
50
  }
50
- if (datatype instanceof PrimitiveType) {
51
- return tsTypeForPrimitiveType(datatype)
51
+ if (dataType instanceof PrimitiveType) {
52
+ return tsTypeForPrimitiveType(dataType)
52
53
  }
53
- if (datatype instanceof Enumeration) {
54
- return imports.entity(datatype)
54
+ if (dataType instanceof Enumeration) {
55
+ return imports.entity(dataType)
55
56
  }
56
- return `unknown /* [ERROR] can't compute a TS type for datatype ${datatype.name} that has an unhandled/-known meta-type ${datatype.constructor.name} */`
57
+ return `unknown /* [ERROR] can't compute a TS type for data type ${dataType.name} that has an unhandled/-known meta-type ${dataType.constructor.name} */`
57
58
  }
58
59
 
59
60
 
60
61
  export const tsTypeForClassifier = (classifier: SingleRef<Classifier>, imports: Imports) => {
61
- if (classifier === null) {
62
- return `unknown /* [ERROR] can't compute a TS type for a null classifier */`
62
+ if (classifier === unresolved) {
63
+ return `unknown /* [ERROR] can't compute a TS type for an unresolved classifier */`
63
64
  }
64
65
  return classifier === builtinClassifiers.node ? imports.generic("INodeBase") : imports.entity(classifier)
65
66
  }
@@ -16,7 +16,7 @@
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
18
  import { Language, LanguageEntity, lioncoreBuiltins } from "@lionweb/core"
19
- import { asJSIdentifier } from "../../utils/textgen.js"
19
+ import { asJSIdentifier } from "@lionweb/textgen-utils"
20
20
 
21
21
  export const importRenamingForLanguage = (language: Language) => asJSIdentifier(language.name)
22
22
 
@@ -16,9 +16,7 @@
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
18
  export * from "./classifiers.js"
19
- export * from "./dependencies.js"
20
19
  export * from "./entities.js"
21
20
  export * from "./features.js"
22
21
  export * from "./imports-tracking.js"
23
- export * from "./mps-annotations.js"
24
22
  export * from "./primitive-types.js"
@@ -19,13 +19,13 @@ import { builtinPrimitives, PrimitiveType } from "@lionweb/core"
19
19
 
20
20
  export const tsTypeForPrimitiveType = (primitiveType: PrimitiveType): string => {
21
21
  switch (primitiveType) {
22
- case builtinPrimitives.booleanDatatype:
22
+ case builtinPrimitives.booleanDataType:
23
23
  return `boolean`
24
- case builtinPrimitives.stringDatatype:
24
+ case builtinPrimitives.stringDataType:
25
25
  return `string`
26
- case builtinPrimitives.integerDatatype:
26
+ case builtinPrimitives.integerDataType:
27
27
  return `number`
28
- case builtinPrimitives.jsonDatatype:
28
+ case builtinPrimitives.jsonDataType:
29
29
  return `unknown`
30
30
  default:
31
31
  return `string`
@@ -15,13 +15,14 @@
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
- import { dependencyOrderOf } from "@lionweb/ts-utils"
19
18
  import { Language } from "@lionweb/core"
19
+ import { indent } from "@lionweb/textgen-utils"
20
+ import { dependencyOrderOf } from "@lionweb/ts-utils"
21
+ import { dependenciesThroughDirectInheritanceOf } from "@lionweb/utilities"
20
22
  import { asString, commaSeparated } from "littoral-templates"
21
23
 
22
- import { indent } from "../utils/textgen.js"
23
24
  import { GeneratorOptions } from "./generator.js"
24
- import { dependenciesThroughDirectInheritanceOf, importRenamingForLanguage, nameOfBaseClassForLanguage } from "./helpers/index.js"
25
+ import { importRenamingForLanguage, nameOfBaseClassForLanguage } from "./helpers/index.js"
25
26
 
26
27
  export const indexTsFor = (languages: Language[], options: GeneratorOptions) => {
27
28
  const dependenciesInOrderOfDirectInheritance = dependencyOrderOf(languages, dependenciesThroughDirectInheritanceOf)
package/src/index.ts CHANGED
@@ -15,5 +15,6 @@
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
- export * from "./api/index.js"
19
- export * from "./utils/index.js"
18
+ export { generateLanguage, generateApiFromLanguages, generateApiFromLanguagesJson } from "./generator.js"
19
+ export * from "./generation-headers.js"
20
+ export * from "./mega-factory.templates.js"
@@ -15,11 +15,10 @@
15
15
  // SPDX-FileCopyrightText: 2025 TRUMPF Laser SE and other contributors
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
- import { sortedStringsByUppercase } from "@lionweb/ts-utils"
19
18
  import { Concept, Language } from "@lionweb/core"
20
- import { dependencyOrderOf, groupBy } from "@lionweb/ts-utils"
19
+ import { indent } from "@lionweb/textgen-utils"
20
+ import { dependencyOrderOf, sortedStringsByUppercase } from "@lionweb/ts-utils"
21
21
  import { asString, commaSeparated, when, withNewlineAppended } from "littoral-templates"
22
- import { indent } from "../utils/textgen.js"
23
22
 
24
23
  import { typeForLanguageEntity } from "./entity-types.templates.js"
25
24
  import { GeneratorOptions } from "./generator.js"
@@ -41,8 +40,6 @@ export const languageFileFor = (language: Language, options: GeneratorOptions) =
41
40
  throw new Error(`language ${name} has a cycle among the graph of entities with edges formed by the inheritance dependency`)
42
41
  }
43
42
 
44
- const mpsAnnotationsPerId = groupBy(options.mpsAnnotations, ({annotatedNodeId}) => annotatedNodeId)
45
-
46
43
  const postImportsPart = [
47
44
  ``,
48
45
  reflectiveClassFor(imports)(language),
@@ -50,7 +47,7 @@ export const languageFileFor = (language: Language, options: GeneratorOptions) =
50
47
  ``,
51
48
  orderedEntities
52
49
  .filter((entity) => entity.language === language)
53
- .map(withNewlineAppended(typeForLanguageEntity(imports, mpsAnnotationsPerId)))
50
+ .map(withNewlineAppended(typeForLanguageEntity(imports)))
54
51
  ]
55
52
 
56
53
  return asString([
@@ -16,14 +16,13 @@
16
16
  // SPDX-License-Identifier: Apache-2.0
17
17
 
18
18
  import { isConcrete, Language, LanguageEntity } from "@lionweb/core"
19
+ import { Deprecated, ioLionWebMpsSpecificAnnotationsFrom } from "@lionweb/io-lionweb-mps-specific"
20
+ import { asJSIdentifier, indent } from "@lionweb/textgen-utils"
19
21
  import { asString, commaSeparated } from "littoral-templates"
20
22
 
21
- import { asJSIdentifier, indent } from "../utils/textgen.js"
22
- import { Deprecated, MpsAnnotation } from "./helpers/index.js"
23
-
24
- export const megaFactoryFor = (megaFactoryName: string, languages: Language[], mpsAnnotations: MpsAnnotation[] = [], header?: string) => {
23
+ export const megaFactoryFor = (megaFactoryName: string, languages: Language[], header?: string) => {
25
24
  const isNotDeprecated = (entity: LanguageEntity) =>
26
- !mpsAnnotations.some(mpsAnnotation => mpsAnnotation.annotatedNodeId === entity.id && mpsAnnotation instanceof Deprecated)
25
+ !ioLionWebMpsSpecificAnnotationsFrom(entity).some((annotation) => annotation instanceof Deprecated)
27
26
 
28
27
  const requiresFactoryMethod = (entity: LanguageEntity) => isConcrete(entity) && isNotDeprecated(entity)
29
28
 
@@ -35,10 +35,10 @@ import {
35
35
  Property,
36
36
  SingleRef
37
37
  } from "@lionweb/core"
38
+ import { indent, switchOrIf } from "@lionweb/textgen-utils"
38
39
  import { asArray } from "@lionweb/ts-utils"
39
40
  import { when, withNewlineAppended } from "littoral-templates"
40
41
 
41
- import { indent, switchOrIf } from "../utils/textgen.js"
42
42
  import { entityMetaType, extendsFrom, Imports, nameOfBaseClassForLanguage } from "./helpers/index.js"
43
43
 
44
44
  export const reflectiveClassFor = (imports: Imports) => {
@@ -1,5 +0,0 @@
1
- import { LanguageEntity } from "@lionweb/core";
2
- import { LionWebId } from "@lionweb/json";
3
- import { Imports, MpsAnnotation } from "./helpers/index.js";
4
- export declare const typeForLanguageEntity: (imports: Imports, mpsAnnotationsPerId: Record<LionWebId, MpsAnnotation[]>) => (entity: LanguageEntity) => import("littoral-templates").Template[];
5
- //# sourceMappingURL=entity-types.templates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-types.templates.d.ts","sourceRoot":"","sources":["../../src/api/entity-types.templates.ts"],"names":[],"mappings":"AAiBA,OAAO,EAUH,cAAc,EAOjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAIzC,OAAO,EAOH,OAAO,EAEP,aAAa,EAOhB,MAAM,oBAAoB,CAAA;AAc3B,eAAO,MAAM,qBAAqB,YAAa,OAAO,uBAAuB,OAAO,SAAS,EAAE,aAAa,EAAE,CAAC,cAqK3F,cAAc,4CAoBjC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entity-types.templates.js","sourceRoot":"","sources":["../../src/api/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,EAEX,eAAe,EACf,SAAS,EACT,aAAa,EACb,UAAU,EACV,WAAW,EAEX,IAAI,EACJ,UAAU,EACV,aAAa,EACb,QAAQ,EACR,SAAS,EAEZ,MAAM,eAAe,CAAA;AAEtB,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AAE9E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EACH,kBAAkB,EAClB,UAAU,EACV,cAAc,EACd,WAAW,EACX,+BAA+B,EAC/B,cAAc,EAEd,UAAU,EAEV,kBAAkB,EAClB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,EACxB,MAA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ACD,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 +0,0 @@
1
- {"version":3,"file":"generation-headers.d.ts","sourceRoot":"","sources":["../../src/api/generation-headers.ts"],"names":[],"mappings":"AAkCA;;GAEG;AACH,eAAO,MAAM,4BAA4B,8GAExC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,+CAA+C,QACyC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generation-headers.js","sourceRoot":"","sources":["../../src/api/generation-headers.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,EAAE;AACF,6CAA6C;AAE7C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,GAAW,EAAE,EAAE,CAClC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AAEpC;;GAEG;AACH,MAAM,+CAA+C,GAAG;;;;;;;;;;;;;;KAcnD,aAAa,CAAC,wBAAwB,CAAC;KACvC,aAAa,CAAC,yBAAyB,CAAC;CAC5C,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;;CAE3C,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,+CAA+C,GACxD,QAAQ,CAAC,CAAC,+CAA+C,EAAE,EAAE,EAAE,4BAA4B,EAAE,EAAE,CAAC,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/api/generator.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAwB,QAAQ,EAAY,MAAM,eAAe,CAAA;AAMxE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAQlD,MAAM,MAAM,gBAAgB,GAAG;IAC3B,cAAc,EAAE,aAAa,EAAE,CAAA;IAC/B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAUD,eAAO,MAAM,gBAAgB,aAAc,QAAQ,kBAAkB,MAAM,YAAY,QAAQ,gBAAgB,CAAC,KAAG,MAKlH,CAAA;AAGD,eAAO,MAAM,4BAA4B,sBAAuB,MAAM,kBAAkB,MAAM,YAAY,QAAQ,gBAAgB,CAAC,SAQlI,CAAA;AAGD,eAAO,MAAM,wBAAwB,cAAe,QAAQ,EAAE,kBAAkB,MAAM,iBAAiB,QAAQ,gBAAgB,CAAC,SAkB/H,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"generator.js","sourceRoot":"","sources":["../../src/api/generator.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,oBAAoB,EAAY,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,IAAI,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,C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E,CAAC;QAChC,OAAO,UAAU,CAAC,UAAU,CAAA;IAChC,CAAC;IACD,OAAO,EAAE,CAAA;AACb,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,UAAsB,EAAa,EAAE;IACjF,IAAI,UAAU,YAAY,SAAS,EAAE,CAAC;QAClC,OAAO,EAAE,CAAA;IACb,CAAC;IACD,MAAM,mBAAmB,GAAG,YAAY,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,+BAA+B,CAAC,CAAC,CAAA;IAC9G,OAAO,aAAa,CAAC,UAAU,CAAC;SAC3B,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,mBAAmB,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACzE,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { Language } from "@lionweb/core";
2
- /**
3
- * @return all languages that any {@link Classifier classifier} of the given {@link Language language} depends on through direct inheritance.
4
- */
5
- export declare const dependenciesThroughDirectInheritanceOf: (language: Language) => Language[];
6
- /**
7
- * @return the – currently only those arising from direct inheritance on classifier-level – dependencies of the given {@link Language languages},
8
- * as a human-readable text
9
- */
10
- export declare const verboseDependencies: (languages: Language[]) => string;
11
- //# sourceMappingURL=dependencies.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../src/api/helpers/dependencies.ts"],"names":[],"mappings":"AAiBA,OAAO,EAA4B,QAAQ,EAAsB,MAAM,eAAe,CAAA;AAMtF;;GAEG;AACH,eAAO,MAAM,sCAAsC,aAAc,QAAQ,eAOpE,CAAA;AAGL;;;GAGG;AACH,eAAO,MAAM,mBAAmB,cAAe,QAAQ,EAAE,KAAG,MAoB3D,CAAA"}
@@ -1,52 +0,0 @@
1
- // Copyright 2025 TRUMPF Laser SE and other contributors
2
- //
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
17
- import { Classifier, inheritsFrom, nameOf, nameSorted } from "@lionweb/core";
18
- import { cycleWith, uniquesAmong } from "@lionweb/ts-utils";
19
- import { asString, when } from "littoral-templates";
20
- import { indent } from "../../utils/index.js";
21
- /**
22
- * @return all languages that any {@link Classifier classifier} of the given {@link Language language} depends on through direct inheritance.
23
- */
24
- export const dependenciesThroughDirectInheritanceOf = (language) => uniquesAmong(language.entities
25
- .filter((entity) => entity instanceof Classifier)
26
- .flatMap((entity) => inheritsFrom(entity))
27
- .map((classifier) => classifier.language)
28
- .filter((depLanguage) => depLanguage !== language));
29
- /**
30
- * @return the – currently only those arising from direct inheritance on classifier-level – dependencies of the given {@link Language languages},
31
- * as a human-readable text
32
- */
33
- export const verboseDependencies = (languages) => {
34
- const nameSortedLanguages = nameSorted(languages);
35
- return asString([
36
- nameSortedLanguages.map((language) => {
37
- const deps = dependenciesThroughDirectInheritanceOf(language);
38
- const what = `direct type-wise dependencies (through inheritance)`;
39
- const cycle = cycleWith(language, dependenciesThroughDirectInheritanceOf);
40
- return deps.length === 0
41
- ? `language ${language.name} has no ${what}`
42
- : [
43
- `language ${language.name} has the following ${what}:`,
44
- indent([
45
- nameSorted(dependenciesThroughDirectInheritanceOf(language)).map(nameOf),
46
- when(cycle.length > 0)(`⚠ language "${language.name}" is part of the following cycle through type-wise (through direct inheritance): ${cycle.map(nameOf).join(" -> ")}`)
47
- ])
48
- ];
49
- })
50
- ]);
51
- };
52
- //# sourceMappingURL=dependencies.js.map
@@ -1 +0,0 @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sC,CAAC,QAAQ,CAAC,CAAA;YAC7D,MAAM,IAAI,GAAG,qDAAqD,CAAA;YAClE,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,sCAAsC,CAAC,CAAA;YACzE,OAAO,IAAI,CAAC,MAAM,KAAK,CAAC;gBACpB,CAAC,CAAC,YAAY,QAAQ,CAAC,IAAI,WAAW,IAAI,EAAE;gBAC5C,CAAC,CAAC;oBACE,YAAY,QAAQ,CAAC,IAAI,sBAAsB,IAAI,GAAG;oBACtD,MAAM,CAAC;wBACH,UAAU,CAAC,sCAAsC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC;wBACxE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAClB,eAAe,QAAQ,CAAC,IAAI,oFAAoF,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CACnJ;qBACJ,CAAC;iBACL,CAAA;QACT,CAAC,CAAC;KACL,CAAC,CAAA;AACN,CAAC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../../src/api/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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../src/api/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,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ot":"","sources":["../../../src/api/helpers/index.ts"],"names":[],"mappings":"AAiBA,cAAc,kBAAkB,CAAA;AAChC,cAAc,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/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,mBAAmB,CAAA;AACjC,cAAc,eAAe,CAAA;AAC7B,cAAc,eAAe,CAAA;AAC7B,cAAc,uBAAuB,CAAA;AACrC,cAAc,sBAAsB,CAAA;AACpC,cAAc,sBAAsB,CAAA"}
@@ -1,19 +0,0 @@
1
- import { LionWebId, LionWebJsonChunk } from "@lionweb/json";
2
- export declare abstract class MpsAnnotation {
3
- readonly annotatedNodeId: LionWebId;
4
- constructor(annotatedNodeId: LionWebId);
5
- }
6
- export declare class ConceptDescription extends MpsAnnotation {
7
- readonly shortDescription: string | null;
8
- readonly alias: string | null;
9
- constructor(annotatedNodeId: LionWebId, shortDescription: string | null, alias: string | null);
10
- toString(): string;
11
- }
12
- export declare class Deprecated extends MpsAnnotation {
13
- readonly comment: string | null;
14
- readonly build: string | null;
15
- constructor(annotatedNodeId: LionWebId, comment: string | null, build: string | null);
16
- toString(): string;
17
- }
18
- export declare const extractedMpsAnnotations: ({ nodes }: LionWebJsonChunk) => MpsAnnotation[];
19
- //# sourceMappingURL=mps-annotations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mps-annotations.d.ts","sourceRoot":"","sources":["../../../src/api/helpers/mps-annotations.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAc,MAAM,eAAe,CAAA;AAEvE,8BAAsB,aAAa;aACH,eAAe,EAAE,SAAS;gBAA1B,eAAe,EAAE,SAAS;CACzD;AAED,qBAAa,kBAAmB,SAAQ,aAAa;aACO,gBAAgB,EAAE,MAAM,GAAG,IAAI;aAAkB,KAAK,EAAE,MAAM,GAAG,IAAI;gBAAjH,eAAe,EAAE,SAAS,EAAkB,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAkB,KAAK,EAAE,MAAM,GAAG,IAAI;IAG7H,QAAQ;CAGX;AAED,qBAAa,UAAW,SAAQ,aAAa;aACe,OAAO,EAAE,MAAM,GAAG,IAAI;aAAkB,KAAK,EAAE,MAAM,GAAG,IAAI;gBAAxG,eAAe,EAAE,SAAS,EAAkB,OAAO,EAAE,MAAM,GAAG,IAAI,EAAkB,KAAK,EAAE,MAAM,GAAG,IAAI;IAGpH,QAAQ;CAGX;AAGD,eAAO,MAAM,uBAAuB,cAAa,gBAAgB,KAAG,aAAa,EAuB3E,CAAA"}