@abapify/adt-plugin-gcts 0.4.21 → 0.4.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,7 +1,10 @@
1
+ import { t as __exportAll } from "./rolldown-runtime-CNh9ExCG.mjs";
1
2
  import { createPlugin, registerFormatPlugin } from "@abapify/adt-plugin";
2
3
  import { AdkClass, AdkDataElement, AdkDomain, AdkFunctionGroup, AdkInterface, AdkPackage, AdkProgram, AdkTable, AdkTableType, createAdk, getMainType, getTypeForKind } from "@abapify/adk";
3
- import { mkdirSync, writeFileSync } from "node:fs";
4
- import { dirname, join } from "node:path";
4
+ import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
5
+ import { dirname, join, resolve, sep } from "node:path";
6
+ import { fileURLToPath } from "node:url";
7
+ import Ajv2020 from "ajv/dist/2020.js";
5
8
 
6
9
  // src/lib/format/filename.ts
7
10
  /**
@@ -19,26 +22,123 @@ const TYPE_TO_SOURCE_EXT = {
19
22
  DDLS: "asddls",
20
23
  DCLS: "asdcls",
21
24
  BDEF: "abdl",
22
- SRVD: "acds"
25
+ SRVD: "acds",
26
+ DDLA: "acds",
27
+ DDLX: "acds",
28
+ DTSC: "acds",
29
+ DTIX: "acds",
30
+ DTEB: "acds",
31
+ DTDC: "acds",
32
+ DRAS: "acds",
33
+ DRTY: "acds",
34
+ DSFD: "acds",
35
+ CSNM: "csn",
36
+ SFPF: "xdp",
37
+ XSLT: "xml"
23
38
  };
24
39
  /** Metadata extension for all AFF/gCTS objects. */
25
40
  const METADATA_EXTENSION = "json";
26
41
  /** Fixed filename for package metadata (AFF / gCTS convention). */
27
42
  const PACKAGE_FILENAME = "package.devc.json";
28
43
  /**
44
+ * AFF filename-safe form of an object name: namespaces encode as brackets
45
+ * (`/NMSPC/CL_OBJECT` → `(nmspc)cl_object`, AFF spec §file-names) so a
46
+ * `/` in the name can never split the file into nested directories.
47
+ */
48
+ function affName(name) {
49
+ return name.toLowerCase().replace(/^\/([^/]+)\//, "($1)");
50
+ }
51
+ /**
29
52
  * Build the AFF/gCTS on-disk filename for an object.
30
53
  *
31
54
  * @param name Object name (case preserved — AFF normalises to lowercase)
32
55
  * @param type ABAP object type code (CLAS, INTF, ...)
33
56
  * @param kind `"metadata"` (default) or `"source"`.
34
- * @param suffix Optional sub-include suffix (e.g. `locals_def` for CLAS).
57
+ * @param suffix Optional sub-include suffix (e.g. `locals_def` for CLAS,
58
+ * or `z_func.func` for a LIMU sub-object).
59
+ * @param ext Source-file extension override — defaults to the type's
60
+ * extension (`abap`, `acds`, …). Needed for companions whose
61
+ * extension differs from the type's main source (`.json`
62
+ * LIMU metadata, `.properties` texts).
35
63
  */
36
- function gctsFilename(name, type, kind = "metadata", suffix) {
37
- const base = name.toLowerCase();
64
+ function gctsFilename(name, type, kind = "metadata", suffix, ext) {
65
+ const base = affName(name);
38
66
  const typeLower = mainType(type).toLowerCase();
39
67
  if (kind === "metadata") return `${base}.${typeLower}.${METADATA_EXTENSION}`;
40
- const ext = TYPE_TO_SOURCE_EXT[mainType(type).toUpperCase()] ?? "abap";
41
- return suffix ? `${base}.${typeLower}.${suffix}.${ext}` : `${base}.${typeLower}.${ext}`;
68
+ const sourceExt = ext ?? TYPE_TO_SOURCE_EXT[mainType(type).toUpperCase()] ?? "abap";
69
+ return suffix ? `${base}.${typeLower}.${suffix}.${sourceExt}` : `${base}.${typeLower}.${sourceExt}`;
70
+ }
71
+ /**
72
+ * LIMU sub-object type codes (AFF spec §file-names): they never appear as
73
+ * root objects — a `{parent}.{ptype}.{sub}.{stype}.{ext}` filename routes to
74
+ * the parent object with `{sub}.{stype}` as its suffix.
75
+ */
76
+ const LIMU_SUBTYPES = /* @__PURE__ */ new Set([
77
+ "func",
78
+ "reps",
79
+ "cpub",
80
+ "cpro",
81
+ "cprt",
82
+ "cpri",
83
+ "sotr",
84
+ "sotu"
85
+ ]);
86
+ /**
87
+ * The default source-file extension for an object type (`abap` fallback) —
88
+ * used to decide whether a source-key suffix carries an explicit extension.
89
+ */
90
+ function gctsSourceExt(type) {
91
+ return TYPE_TO_SOURCE_EXT[mainType(type).toUpperCase()] ?? "abap";
92
+ }
93
+ /** Source/companion extensions recognised by the spec file-name grammar. */
94
+ const KNOWN_SOURCE_EXTS = /* @__PURE__ */ new Set([
95
+ "abap",
96
+ "asddls",
97
+ "asdcls",
98
+ "abdl",
99
+ "acds",
100
+ "csn",
101
+ "xdp",
102
+ "ddic",
103
+ "properties",
104
+ "xml"
105
+ ]);
106
+ /** Every file extension the spec grammar can carry after the suffix. */
107
+ const KNOWN_FILE_EXTS = /* @__PURE__ */ new Set([...KNOWN_SOURCE_EXTS, METADATA_EXTENSION]);
108
+ /**
109
+ * Encode a companion file as a source-map key: bare `suffix` when the file
110
+ * uses the type's default source extension, `{suffix}.{ext}` when it does
111
+ * not (e.g. `z_func.func.json` → LIMU metadata, `texts.en.properties` →
112
+ * translated texts). Symmetric with `splitSourceKey`.
113
+ */
114
+ function sourceKey(type, suffix, ext) {
115
+ return !ext || ext === gctsSourceExt(type) ? suffix : `${suffix}.${ext}`;
116
+ }
117
+ /**
118
+ * Inverse of `sourceKey`: splits a source-map key into the filename suffix
119
+ * and an optional extension override (`undefined` → the type's default).
120
+ */
121
+ function splitSourceKey(key) {
122
+ if (key === "main") return {
123
+ suffix: void 0,
124
+ ext: void 0
125
+ };
126
+ if (key.startsWith("main.")) {
127
+ const tail = key.slice(5);
128
+ if (KNOWN_FILE_EXTS.has(tail)) return {
129
+ suffix: void 0,
130
+ ext: tail
131
+ };
132
+ }
133
+ const dot = key.lastIndexOf(".");
134
+ if (dot > 0 && KNOWN_FILE_EXTS.has(key.slice(dot + 1))) return {
135
+ suffix: key.slice(0, dot),
136
+ ext: key.slice(dot + 1)
137
+ };
138
+ return {
139
+ suffix: key,
140
+ ext: void 0
141
+ };
42
142
  }
43
143
  /**
44
144
  * Parse an AFF/gCTS filename back into its components.
@@ -53,23 +153,71 @@ function parseGctsFilename(filename) {
53
153
  extension: METADATA_EXTENSION
54
154
  };
55
155
  const parts = filename.split(".");
56
- if (parts.length < 3) return;
156
+ if (parts.length < 3) return void 0;
57
157
  const extension = parts.at(-1);
58
- const nameParts = (parts.length >= 4 ? parts.at(-2) : void 0) ? parts.slice(0, -3) : parts.slice(0, -2);
59
- if (nameParts.length === 0) return;
60
- if (extension === "json") return {
61
- name: nameParts.length === 0 ? "" : parts.slice(0, -2).join("."),
158
+ if (extension === "json") return parseMetadataName(parts);
159
+ if (extension === "properties") return parsePropertiesName(parts);
160
+ return parseSourceName(parts, extension);
161
+ }
162
+ /**
163
+ * `{name}.{type}.json`, plus the DOCU companion form
164
+ * `{name}.{type}.docu.json` which belongs to the parent object.
165
+ */
166
+ function parseMetadataName(parts) {
167
+ const docu = parts.at(-2) === "docu" && parts.length >= 4;
168
+ const limu = parts.length >= 5 && LIMU_SUBTYPES.has(parts.at(-2));
169
+ let offset = -2;
170
+ if (docu) offset = -3;
171
+ else if (limu) offset = -4;
172
+ const parsed = {
173
+ name: parts.slice(0, offset).join("."),
174
+ type: parts.at(offset).toUpperCase(),
175
+ extension: METADATA_EXTENSION
176
+ };
177
+ if (docu) parsed.suffix = "docu";
178
+ else if (limu) parsed.suffix = `${parts.at(-3)}.${parts.at(-2)}`;
179
+ return parsed;
180
+ }
181
+ /**
182
+ * `.properties` text files have their own grammar:
183
+ * {name}.{type}.properties — master (3 parts)
184
+ * {name}.{type}.{lang}.properties — language (4 parts)
185
+ * {name}.{type}.{content_type}.{lang}.properties — e.g. PROG
186
+ * selections/headings/texts (5 parts)
187
+ * The composite suffix (`de`, `texts.en`) stays opaque — handlers map
188
+ * suffixes to source keys via `suffixToSourceKey`.
189
+ */
190
+ function parsePropertiesName(parts) {
191
+ if (parts.length >= 5) return {
192
+ name: parts.slice(0, -4).join("."),
193
+ type: parts.at(-4).toUpperCase(),
194
+ suffix: `${parts.at(-3)}.${parts.at(-2)}`,
195
+ extension: "properties"
196
+ };
197
+ if (parts.length === 4) return {
198
+ name: parts.slice(0, -3).join("."),
199
+ type: parts.at(-3).toUpperCase(),
200
+ suffix: parts.at(-2),
201
+ extension: "properties"
202
+ };
203
+ return {
204
+ name: parts.slice(0, -2).join("."),
62
205
  type: parts.at(-2).toUpperCase(),
206
+ extension: "properties"
207
+ };
208
+ }
209
+ /**
210
+ * `{name}.{type}.{ext}` and `{name}.{type}.{suffix}.{ext}` source files —
211
+ * a suffix is present iff there are ≥4 dot-segments.
212
+ */
213
+ function parseSourceName(parts, extension) {
214
+ if (!KNOWN_SOURCE_EXTS.has(extension)) return void 0;
215
+ if (parts.length >= 5 && LIMU_SUBTYPES.has(parts.at(-2))) return {
216
+ name: parts.slice(0, -4).join("."),
217
+ type: parts.at(-4).toUpperCase(),
218
+ suffix: `${parts.at(-3)}.${parts.at(-2)}`,
63
219
  extension
64
220
  };
65
- if (!(/* @__PURE__ */ new Set([
66
- "abap",
67
- "asddls",
68
- "asdcls",
69
- "abdl",
70
- "acds",
71
- "properties"
72
- ])).has(extension)) return;
73
221
  if (parts.length >= 4) return {
74
222
  name: parts.slice(0, -3).join("."),
75
223
  type: parts.at(-3).toUpperCase(),
@@ -118,6 +266,392 @@ function mainType(type) {
118
266
  return type.split("/")[0];
119
267
  }
120
268
 
269
+ // src/lib/aff/schemas.ts
270
+ /**
271
+ * AFF schema access over the `git_modules/abap-file-formats` submodule.
272
+ *
273
+ * The submodule pin (`.gitmodules`) is the provenance record — schemas and
274
+ * examples are always read from it at the pinned upstream SHA. This module
275
+ * has no workspace dependencies (ajv + node builtins only) so schema
276
+ * conformance tests run without building the workspace.
277
+ */
278
+ const SCHEMA_RE = /^([a-z0-9]+)-v(\d+)\.json$/;
279
+ /**
280
+ * Locate the AFF schema root. Published packages ship only `dist`, so the
281
+ * bundled `aff-schemas/` copy (produced by the build) is tried first; the
282
+ * `git_modules` submodule is the dev fallback. Returns `undefined` when
283
+ * neither exists — callers degrade gracefully instead of breaking plugin
284
+ * load on installs that lack the submodule.
285
+ */
286
+ function findAffRoot() {
287
+ let dir = dirname(fileURLToPath(import.meta.url));
288
+ for (let i = 0; i < 10; i++) {
289
+ const bundled = join(dir, "aff-schemas");
290
+ if (existsSync(bundled)) return bundled;
291
+ const submodule = join(dir, "git_modules/abap-file-formats/file-formats");
292
+ if (existsSync(submodule)) return submodule;
293
+ dir = dirname(dir);
294
+ }
295
+ }
296
+ let rootCache;
297
+ /** Resolved AFF schema root, or `undefined` when unavailable. */
298
+ function affRoot() {
299
+ if (rootCache === void 0) rootCache = findAffRoot() ?? null;
300
+ return rootCache ?? void 0;
301
+ }
302
+ /** All official AFF object types (directories in `file-formats/`). */
303
+ function listAffTypes() {
304
+ const root = affRoot();
305
+ return root ? readdirSync(root, { withFileTypes: true }).filter((e) => e.isDirectory()).map((e) => e.name).sort((a, b) => a.localeCompare(b)) : [];
306
+ }
307
+ /** Format versions available for a type, newest first. */
308
+ function affVersions(ref) {
309
+ const type = ref.type.toLowerCase();
310
+ const root = affRoot();
311
+ if (!root) return [];
312
+ const dir = join(root, type);
313
+ const scoped = existsSync(dir) ? readdirSync(dir) : [];
314
+ const loose = readdirSync(root);
315
+ const nested = readdirSync(root, { withFileTypes: true }).filter((e) => e.isDirectory() && e.name !== type).flatMap((e) => {
316
+ try {
317
+ return readdirSync(join(root, e.name));
318
+ } catch {
319
+ return [];
320
+ }
321
+ });
322
+ return [...new Set([
323
+ ...scoped,
324
+ ...loose,
325
+ ...nested
326
+ ].map((f) => SCHEMA_RE.exec(f)).filter((m) => !!m && m[1] === type).map((m) => Number(m[2])))].sort((a, b) => b - a);
327
+ }
328
+ function latestAffVersion(ref) {
329
+ return affVersions(ref)[0];
330
+ }
331
+ /** `<root>/<type>/<type>-vN.json` or root-level `<type>-vN.json` (docu). */
332
+ function directSchemaFile(q) {
333
+ const stem = `${q.type}-v${q.version}.json`;
334
+ for (const file of [join(q.root, q.type, stem), join(q.root, stem)]) if (existsSync(file)) return file;
335
+ }
336
+ /** LIMU sub-object schemas nest under their parent's dir (`fugr/func-v1.json`). */
337
+ function nestedSchemaFile(q) {
338
+ for (const dir of listAffTypes()) {
339
+ if (dir === q.type) continue;
340
+ const file = join(q.root, dir, `${q.type}-v${q.version}.json`);
341
+ if (existsSync(file)) return file;
342
+ }
343
+ }
344
+ /** First existing candidate path for a type+version schema, or none. */
345
+ function findSchemaFile(q) {
346
+ return directSchemaFile(q) ?? nestedSchemaFile(q);
347
+ }
348
+ function affSchema(ref) {
349
+ const type = ref.type.toLowerCase();
350
+ const version = ref.version ?? latestAffVersion({
351
+ ...ref,
352
+ type
353
+ });
354
+ if (!version) throw new Error(`No AFF schema for ${type}`);
355
+ const root = affRoot();
356
+ if (!root) throw new Error(`No AFF schema root available for ${type}`);
357
+ const file = findSchemaFile({
358
+ root,
359
+ type,
360
+ version
361
+ });
362
+ if (!file) throw new Error(`No AFF schema ${type}-v${version} under ${root}`);
363
+ return JSON.parse(readFileSync(file, "utf8"));
364
+ }
365
+ /**
366
+ * Top-level body properties of a type's schema (everything beyond the
367
+ * mandatory `formatVersion`/`header` envelope), newest version by default.
368
+ * Empty array for header-only types or when schemas are unavailable.
369
+ */
370
+ function affBodyProps(ref) {
371
+ let schema;
372
+ try {
373
+ schema = affSchema(ref);
374
+ } catch (error) {
375
+ if (error instanceof Error && error.message.startsWith("No AFF schema")) return [];
376
+ throw error;
377
+ }
378
+ return Object.keys(schema.properties ?? {}).filter((p) => p !== "formatVersion" && p !== "header");
379
+ }
380
+ function affHeaderProps(ref) {
381
+ let schema;
382
+ try {
383
+ schema = affSchema(ref);
384
+ } catch (error) {
385
+ if (error instanceof Error && error.message.startsWith("No AFF schema")) return [];
386
+ throw error;
387
+ }
388
+ const header = (schema.properties ?? {}).header;
389
+ return Object.keys(header && typeof header === "object" && header.properties ? header.properties : {});
390
+ }
391
+ const ajv = new Ajv2020({
392
+ allErrors: true,
393
+ strict: false
394
+ });
395
+ const validators = /* @__PURE__ */ new Map();
396
+ /** Resolve a usable schema version, or `undefined` when none exists. */
397
+ function resolveAffVersion(type, v) {
398
+ const resolved = v ?? latestAffVersion({ type });
399
+ return resolved !== void 0 && Number.isInteger(resolved) && resolved > 0 ? resolved : void 0;
400
+ }
401
+ /** Compile (and cache) the AJV validator for a type+version. */
402
+ function getValidator(type, version) {
403
+ const key = `${type}-v${version}`;
404
+ const cached = validators.get(key);
405
+ if (cached) return { validator: cached };
406
+ try {
407
+ const validator = ajv.compile(affSchema({
408
+ type,
409
+ version
410
+ }));
411
+ validators.set(key, validator);
412
+ return { validator };
413
+ } catch (e) {
414
+ return { error: e instanceof Error ? e.message : String(e) };
415
+ }
416
+ }
417
+ /** Validate AFF JSON against the official schema for `ref`. */
418
+ function affValidate(ref, json) {
419
+ const type = ref.type.toLowerCase();
420
+ const v = resolveAffVersion(type, ref.version);
421
+ if (v === void 0) return {
422
+ valid: false,
423
+ errors: [`No AFF schema for type "${type}"`]
424
+ };
425
+ const { validator, error } = getValidator(type, v);
426
+ if (!validator) return {
427
+ valid: false,
428
+ errors: [error ?? "schema compile failed"]
429
+ };
430
+ return {
431
+ valid: !!validator(json),
432
+ errors: (validator.errors ?? []).map((e) => `${e.instancePath} ${e.message ?? ""}`.trim())
433
+ };
434
+ }
435
+ /**
436
+ * Example JSON files shipped with a type — recursively, relative paths.
437
+ * Companion files (`.docu.json`, LIMU sub-objects like `.reps.json`) are
438
+ * included; callers match each to its schema (see `schemaTargetForExample`).
439
+ */
440
+ function affExamples(ref) {
441
+ const root = affRoot();
442
+ if (!root) return [];
443
+ const dir = join(root, ref.type.toLowerCase(), "examples");
444
+ if (!existsSync(dir)) return [];
445
+ const out = [];
446
+ const walk = (sub) => {
447
+ for (const e of readdirSync(join(dir, sub), { withFileTypes: true })) {
448
+ const rel = sub ? `${sub}/${e.name}` : e.name;
449
+ if (e.isDirectory()) walk(rel);
450
+ else if (e.name.endsWith(".json")) out.push(rel);
451
+ }
452
+ };
453
+ walk("");
454
+ return out.sort((a, b) => a.localeCompare(b));
455
+ }
456
+ /**
457
+ * Pick the schema a given example file should validate against.
458
+ *
459
+ * - `z_x.doma.docu.json` → the `docu` schema (companion documentation)
460
+ * - otherwise → the type's own schema at the example's `formatVersion`
461
+ */
462
+ function schemaTargetForExample(ref, filename, json) {
463
+ if (/\.docu\.json$/i.test(filename) && affVersions({ type: "docu" }).length) return {
464
+ type: "docu",
465
+ companion: true
466
+ };
467
+ const declared = json?.formatVersion;
468
+ const version = declared !== void 0 ? Number(declared) : void 0;
469
+ return {
470
+ type: ref.type,
471
+ version,
472
+ companion: false
473
+ };
474
+ }
475
+ function readAffExample(ref, rel) {
476
+ const root = affRoot();
477
+ if (!root) throw new Error("No AFF schema root available");
478
+ const examplesDir = resolve(root, ref.type.toLowerCase(), "examples");
479
+ const file = resolve(examplesDir, rel);
480
+ if (file !== examplesDir && !file.startsWith(examplesDir + sep)) throw new Error(`Example path escapes examples dir: ${rel}`);
481
+ return JSON.parse(readFileSync(file, "utf8"));
482
+ }
483
+
484
+ // src/lib/aff/generic.ts
485
+ /**
486
+ * Schema-aware generic AFF emit/parse — zero workspace deps.
487
+ *
488
+ * `genericToMetadata` builds the `{formatVersion, header}` envelope for a
489
+ * type (version pinned to its latest schema) plus only the schema-
490
+ * declared top-level body properties the payload carries — arbitrary
491
+ * payload fields are NOT copied. `genericFromMetadata` is its inverse:
492
+ * header → ADK projection, body fields spread into the payload so they
493
+ * land back on `obj.data` — enabling metadata round-trips for all
494
+ * wave2-registered types.
495
+ */
496
+ /**
497
+ * Payload extraction that works for both plain objects (`data` is a
498
+ * record) and real ADK objects (`data` is an async method; the loaded
499
+ * payload lives behind the `dataSync` getter / `_data` field). Returns
500
+ * `undefined` when no usable payload is found — callers fall back to
501
+ * treating the object itself as the record.
502
+ */
503
+ function isRecord(v) {
504
+ return !!v && typeof v === "object" && !Array.isArray(v);
505
+ }
506
+ /** Narrow to string/number; objects never reach `String()` coercion. */
507
+ function str(v) {
508
+ return typeof v === "string" || typeof v === "number" ? String(v) : void 0;
509
+ }
510
+ /** ADK-object payload: `dataSync` getter (throws unloaded) or `_data`. */
511
+ function adkPayloadOf(obj) {
512
+ try {
513
+ const sync = obj.dataSync;
514
+ if (isRecord(sync)) return sync;
515
+ } catch {}
516
+ const priv = obj._data;
517
+ return isRecord(priv) ? priv : void 0;
518
+ }
519
+ function payloadOf(obj) {
520
+ const d = obj.data;
521
+ if (isRecord(d)) return d;
522
+ if (typeof d === "function") return adkPayloadOf(obj);
523
+ }
524
+ function genericToMetadata(type) {
525
+ return (obj) => {
526
+ const data = payloadOf(obj) ?? obj;
527
+ const declared = data.formatVersion;
528
+ const version = typeof declared === "string" || typeof declared === "number" ? String(declared) : String(latestAffVersion({ type }) ?? "1");
529
+ const bodyProps = affBodyProps({
530
+ type,
531
+ version: Number.isNaN(Number(version)) ? void 0 : Number(version)
532
+ });
533
+ const headerProps = affHeaderProps({
534
+ type,
535
+ version: Number.isNaN(Number(version)) ? void 0 : Number(version)
536
+ });
537
+ const meta = {
538
+ formatVersion: version,
539
+ header: { originalLanguage: (obj.originalLanguage ?? str(data.originalLanguage) ?? str(data.language) ?? str(data.masterLanguage) ?? "en").toLowerCase() }
540
+ };
541
+ if (headerProps.length === 0 || headerProps.includes("description")) meta.header.description = str(data.description) ?? obj.description ?? obj.name;
542
+ const abapLang = str(data.abapLanguageVersion) ?? obj.abapLanguageVersion;
543
+ if (abapLang && abapLang !== "standard" && (headerProps.length === 0 || headerProps.includes("abapLanguageVersion"))) meta.header.abapLanguageVersion = abapLang;
544
+ for (const prop of bodyProps) {
545
+ const value = data[prop];
546
+ if (value !== void 0) meta[prop] = value;
547
+ }
548
+ return meta;
549
+ };
550
+ }
551
+ /**
552
+ * Companion-source emit for source-bearing types (`.abap`, `.acds`,
553
+ * `.csn`, …): reads `obj.sources` — `main` emits the suffix-less file,
554
+ * other keys emit `{name}.{type}.{suffix}.{ext}`. A key ending in a file
555
+ * extension selects that extension instead of the type default
556
+ * (`z_func.func.json` → LIMU metadata, `texts.en.properties` → texts).
557
+ * Falls back to `obj.getSource()` as the single `main` source.
558
+ */
559
+ function genericGetSources(obj) {
560
+ const sources = payloadOf(obj)?.sources ?? obj.sources ?? obj._pendingSources;
561
+ const single = obj._pendingSource;
562
+ const merged = single ? {
563
+ main: single,
564
+ ...sources
565
+ } : sources;
566
+ if (merged && Object.keys(merged).length > 0) return Object.entries(merged).filter(([, content]) => !!content).map(([key, content]) => ({
567
+ ...splitSourceKey(key),
568
+ content
569
+ }));
570
+ const getSource = obj.getSource;
571
+ const src = typeof getSource === "function" ? getSource.call(obj) : void 0;
572
+ return src ? [{
573
+ suffix: void 0,
574
+ content: src
575
+ }] : [];
576
+ }
577
+ /**
578
+ * DOCU companion emit: `data.docu` carries the raw DOCU JSON document —
579
+ * emitted as `{name}.{type}.docu.json` beside the main metadata file
580
+ * (AFF spec: DOCU is companion metadata, not a standalone object).
581
+ */
582
+ function genericGetExtraFiles(type) {
583
+ return (obj) => {
584
+ const docu = payloadOf(obj)?.docu;
585
+ if (docu === void 0 || docu === null) return [];
586
+ const name = (obj.name ?? "").toLowerCase();
587
+ const content = typeof docu === "string" ? docu : JSON.stringify(docu, null, 2) + "\n";
588
+ return [{
589
+ path: `${name}.${type.toLowerCase()}.docu.json`,
590
+ content
591
+ }];
592
+ };
593
+ }
594
+ /**
595
+ * Is `obj.data` assignable? Plain test doubles have a writable (or no)
596
+ * `data` property — assignment creates/updates it. ADK objects expose
597
+ * `data` as a method or a getter-only accessor (`AdkGenericObject`), where
598
+ * assignment throws in strict mode; their mutable slot is `_data`.
599
+ */
600
+ function dataIsWritable(obj) {
601
+ let cur = obj;
602
+ while (cur) {
603
+ const d = Object.getOwnPropertyDescriptor(cur, "data");
604
+ if (d) return "value" in d ? d.writable !== false : d.set !== void 0;
605
+ cur = Object.getPrototypeOf(cur);
606
+ }
607
+ return true;
608
+ }
609
+ /** Deserialize side: stage companion sources back onto the object. */
610
+ function genericSetSources(obj, sources) {
611
+ const isAdkObject = typeof obj.data === "function" || !dataIsWritable(obj);
612
+ let data = payloadOf(obj);
613
+ if (!data) {
614
+ if (isAdkObject) {
615
+ const priv = obj;
616
+ priv._data = priv._data ?? {};
617
+ data = priv._data;
618
+ } else {
619
+ const fresh = {};
620
+ obj.data = fresh;
621
+ data = fresh;
622
+ }
623
+ }
624
+ const { docu, ...rest } = sources;
625
+ if (docu !== void 0) try {
626
+ data.docu = JSON.parse(docu);
627
+ } catch {
628
+ data.docu = docu;
629
+ }
630
+ data.sources = {
631
+ ...data.sources,
632
+ ...rest
633
+ };
634
+ if (isAdkObject) {
635
+ const pending = obj;
636
+ pending._pendingSources = {
637
+ ...pending._pendingSources,
638
+ ...rest
639
+ };
640
+ }
641
+ }
642
+ function genericFromMetadata(meta) {
643
+ const { formatVersion, header, ...body } = meta;
644
+ return {
645
+ name: "",
646
+ description: header.description,
647
+ language: header.originalLanguage?.toUpperCase(),
648
+ masterLanguage: header.originalLanguage?.toUpperCase(),
649
+ formatVersion,
650
+ ...header.abapLanguageVersion ? { abapLanguageVersion: header.abapLanguageVersion } : {},
651
+ ...body
652
+ };
653
+ }
654
+
121
655
  // src/lib/handlers/base.ts
122
656
  const handlerRegistry = /* @__PURE__ */ new Map();
123
657
  /** Look up a handler (full-type first, then main-type fallback). */
@@ -139,6 +673,67 @@ function getSupportedTypes() {
139
673
  function buildMetadataFile(meta) {
140
674
  return JSON.stringify(meta, null, 2) + "\n";
141
675
  }
676
+ /** Staged source companions → files (extension-aware keys → LIMU names). */
677
+ function sourceCompanionFiles(object, type, objectName, suffixToSourceKey) {
678
+ const payload = payloadOf(object);
679
+ const pending = object;
680
+ const map = {
681
+ ...payload?.sources,
682
+ ...pending._pendingSources
683
+ };
684
+ if (pending._pendingSource && !map.main) map.main = pending._pendingSource;
685
+ const keyToSuffix = Object.fromEntries(Object.entries(suffixToSourceKey ?? {}).map(([suffix, key]) => [key, suffix]));
686
+ const files = [];
687
+ for (const [key, content] of Object.entries(map)) {
688
+ if (content == null) continue;
689
+ const { suffix, ext } = splitSourceKey(key);
690
+ const fileSuffix = suffix ? keyToSuffix[suffix] ?? suffix : suffix;
691
+ files.push({
692
+ path: gctsFilename(objectName, type, "source", fileSuffix, ext),
693
+ content
694
+ });
695
+ }
696
+ return files;
697
+ }
698
+ /** `data.docu` → `{name}.{type}.docu.json` file (or nothing). */
699
+ function docuCompanionFile(payload, objectName, typeLower) {
700
+ const docu = payload?.docu;
701
+ if (docu === void 0 || docu === null) return [];
702
+ return [{
703
+ path: `${objectName}.${typeLower}.docu.json`,
704
+ content: typeof docu === "string" ? docu : JSON.stringify(docu, null, 2) + "\n"
705
+ }];
706
+ }
707
+ /** `data.properties` map → `.properties` files ('' key → master file). */
708
+ function propertyCompanionFiles(payload, objectName, typeLower) {
709
+ const props = payload?.properties;
710
+ const files = [];
711
+ for (const [key, content] of Object.entries(props ?? {})) {
712
+ if (content == null) continue;
713
+ files.push({
714
+ path: key ? `${objectName}.${typeLower}.${key}.properties` : `${objectName}.${typeLower}.properties`,
715
+ content
716
+ });
717
+ }
718
+ return files;
719
+ }
720
+ /**
721
+ * Universal companion preservation. Deserialization stages every
722
+ * companion a dedicated hook does not claim into `_pendingSources` /
723
+ * `data.sources` (extension-aware keys), `data.docu`, and
724
+ * `data.properties` — emitted here so handlers without a matching emit
725
+ * hook still round-trip LIMU sub-objects, DOCU texts, and translations
726
+ * instead of silently dropping them. Paths already in `emitted` win.
727
+ */
728
+ function companionFiles(object, type, objectName, emitted, suffixToSourceKey) {
729
+ const typeLower = type.split("/")[0].toLowerCase();
730
+ const payload = payloadOf(object);
731
+ return [
732
+ ...sourceCompanionFiles(object, type, objectName, suffixToSourceKey),
733
+ ...docuCompanionFile(payload, objectName, typeLower),
734
+ ...propertyCompanionFiles(payload, objectName, typeLower)
735
+ ].filter((f) => !emitted.has(f.path));
736
+ }
142
737
  function createHandler(adkClassOrType, definition) {
143
738
  let type;
144
739
  if (typeof adkClassOrType === "string") type = adkClassOrType;
@@ -167,7 +762,7 @@ function createHandler(adkClassOrType, definition) {
167
762
  const content = await resolveSource(entry);
168
763
  if (!content) continue;
169
764
  files.push({
170
- path: gctsFilename(objectName, type, "source", entry.suffix),
765
+ path: gctsFilename(objectName, type, "source", entry.suffix, entry.ext),
171
766
  content
172
767
  });
173
768
  }
@@ -195,6 +790,7 @@ function createHandler(adkClassOrType, definition) {
195
790
  });
196
791
  }
197
792
  }
793
+ files.push(...companionFiles(object, type, objectName, new Set(files.map((f) => f.path)), definition.suffixToSourceKey));
198
794
  return files;
199
795
  },
200
796
  fromAbapGit: definition.fromMetadata ? (values) => definition.fromMetadata(values) : void 0,
@@ -676,9 +1272,10 @@ const tableTypeHandler = createHandler(AdkTableType, {
676
1272
  *
677
1273
  * AFF's FUGR representation nests function modules under the group
678
1274
  * directory. This handler emits the group metadata plus per-function-module
679
- * files when function module data is available:
680
- * <fmname>.func.json — FM metadata (func-v1.json schema)
681
- * <fmname>.func.abap — FM source
1275
+ * files when function module data is available (LIMU naming keeps the
1276
+ * submodule files inside the parent's namespace):
1277
+ * <parent>.fugr.<fmname>.func.json — FM metadata (func-v1.json schema)
1278
+ * <parent>.fugr.<fmname>.func.abap — FM source
682
1279
  */
683
1280
  function buildFuncMetadata(fm) {
684
1281
  const meta = {
@@ -706,14 +1303,15 @@ const functionGroupHandler = createHandler(AdkFunctionGroup, {
706
1303
  getExtraFiles(fugr) {
707
1304
  const fms = fugr.functionModules ?? [];
708
1305
  const files = [];
1306
+ const parent = affName(fugr.name ?? "");
709
1307
  for (const fm of fms) {
710
- const fmName = fm.name.toLowerCase();
1308
+ const fmName = affName(fm.name);
711
1309
  files.push({
712
- path: `${fmName}.func.json`,
1310
+ path: `${parent}.fugr.${fmName}.func.json`,
713
1311
  content: buildFuncMetadata(fm)
714
1312
  });
715
1313
  if (fm.source) files.push({
716
- path: `${fmName}.func.abap`,
1314
+ path: `${parent}.fugr.${fmName}.func.abap`,
717
1315
  content: fm.source
718
1316
  });
719
1317
  }
@@ -954,40 +1552,18 @@ const messageClassHandler = createHandler("MSAG", {
954
1552
  /**
955
1553
  * Generic AFF handler stubs for the remaining object types.
956
1554
  *
957
- * Wave 2 mass-generates handlers for all AFF types that have JSON schemas
958
- * but no dedicated handler. Each stub emits the minimal AFF contract:
959
- * { formatVersion: "1", header: { description, originalLanguage } }
1555
+ * Wave 2 mass-registers handlers for all AFF types that have JSON schemas
1556
+ * but no dedicated handler. Each stub runs the schema-aware generic
1557
+ * emit/parse from `../../aff/generic`: the `{formatVersion, header}`
1558
+ * envelope at the type's latest schema version plus every top-level body
1559
+ * property present in the payload — schema-valid whenever the payload is.
960
1560
  *
961
- * Type-specific fields can be added later by promoting a stub to a
962
- * dedicated handler file (like clas.ts, ddls.ts, etc.) when the ADK
963
- * object model exposes richer data for that type.
1561
+ * Types needing semantic mapping, source companions, or special file
1562
+ * shapes graduate to a dedicated file (like clas.ts, ddls.ts, …).
964
1563
  *
965
1564
  * All types here are registered via the string-type form of
966
1565
  * `createHandler` — no ADK class required.
967
1566
  */
968
- function toMetadata(obj) {
969
- const lang = (obj.originalLanguage ?? "").toLowerCase();
970
- const meta = {
971
- formatVersion: "1",
972
- header: {
973
- description: obj.description ?? obj.name ?? "",
974
- originalLanguage: lang
975
- }
976
- };
977
- if (obj.abapLanguageVersion) meta.header.abapLanguageVersion = obj.abapLanguageVersion;
978
- return meta;
979
- }
980
- function fromMetadata(meta) {
981
- return {
982
- name: "",
983
- description: meta.header.description,
984
- language: meta.header.originalLanguage?.toUpperCase(),
985
- masterLanguage: meta.header.originalLanguage?.toUpperCase()
986
- };
987
- }
988
- function getSource(obj) {
989
- return typeof obj.getSource === "function" ? obj.getSource() : "";
990
- }
991
1567
  for (const type of [
992
1568
  "ADVC",
993
1569
  "AIFA",
@@ -1065,9 +1641,11 @@ for (const type of [
1065
1641
  "UIPG",
1066
1642
  "UIST"
1067
1643
  ]) createHandler(type, {
1068
- toMetadata,
1069
- getSource,
1070
- fromMetadata
1644
+ toMetadata: genericToMetadata(type.toLowerCase()),
1645
+ getSources: genericGetSources,
1646
+ getExtraFiles: genericGetExtraFiles(type.toLowerCase()),
1647
+ fromMetadata: genericFromMetadata,
1648
+ setSources: genericSetSources
1071
1649
  });
1072
1650
 
1073
1651
  // src/lib/format/gcts-format.ts
@@ -1086,11 +1664,19 @@ const gctsFormatPlugin = {
1086
1664
  };
1087
1665
 
1088
1666
  // src/lib/deserializer.ts
1089
- /** Source-file extensions emitted by gCTS handlers. */
1667
+ /** Source-file extensions emitted by gCTS handlers. `.properties`
1668
+ * translation files are deliberately excluded — they are companions
1669
+ * routed into `data.properties`, never ABAP source staging. */
1090
1670
  const SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
1091
1671
  "abap",
1092
1672
  "asddls",
1093
- "asdcls"
1673
+ "asdcls",
1674
+ "acds",
1675
+ "abdl",
1676
+ "csn",
1677
+ "xdp",
1678
+ "ddic",
1679
+ "xml"
1094
1680
  ]);
1095
1681
  /**
1096
1682
  * Map numeric abapLanguageVersion codes (`'5'` etc.) to the descriptive
@@ -1131,9 +1717,28 @@ async function* deserialize(fileTree, client, options) {
1131
1717
  if (!objectMap.has(key)) objectMap.set(key, {
1132
1718
  name: parsed.name.toUpperCase(),
1133
1719
  type: parsed.type.toUpperCase(),
1134
- sourceFiles: []
1720
+ sourceFiles: [],
1721
+ propertyFiles: []
1722
+ });
1723
+ if (parsed.suffix === "docu") objectMap.get(key).docuFile = jsonPath;
1724
+ else if (parsed.suffix) {
1725
+ objectMap.get(key).sourceFiles.push({
1726
+ path: jsonPath,
1727
+ suffix: parsed.suffix,
1728
+ ext: "json"
1729
+ });
1730
+ continue;
1731
+ } else objectMap.get(key).metadataFile = jsonPath;
1732
+ }
1733
+ for (const path of await fileTree.glob("**/*.properties")) {
1734
+ const filename = path.split("/").pop();
1735
+ const parsed = parseGctsFilename(filename);
1736
+ if (!parsed) continue;
1737
+ const key = `${parsed.name.toUpperCase()}:${parsed.type.toUpperCase()}`;
1738
+ objectMap.get(key)?.propertyFiles.push({
1739
+ path,
1740
+ suffix: parsed.suffix
1135
1741
  });
1136
- objectMap.get(key).metadataFile = jsonPath;
1137
1742
  }
1138
1743
  for (const ext of SOURCE_EXTENSIONS) {
1139
1744
  const paths = await fileTree.glob(`**/*.${ext}`);
@@ -1146,51 +1751,128 @@ async function* deserialize(fileTree, client, options) {
1146
1751
  if (!obj) continue;
1147
1752
  obj.sourceFiles.push({
1148
1753
  path,
1149
- suffix: parsed.suffix
1754
+ suffix: parsed.suffix,
1755
+ ext: parsed.extension
1150
1756
  });
1151
1757
  }
1152
1758
  }
1759
+ const fileContents = /* @__PURE__ */ new Map();
1760
+ const readErrors = /* @__PURE__ */ new Map();
1761
+ const companionPaths = [...objectMap.values()].flatMap((o) => [
1762
+ ...o.docuFile ? [o.docuFile] : [],
1763
+ ...o.propertyFiles.map((f) => f.path),
1764
+ ...o.sourceFiles.map((f) => f.path)
1765
+ ]);
1766
+ const READ_BATCH = 32;
1767
+ let cursor = 0;
1768
+ const readNext = async () => {
1769
+ const path = companionPaths[cursor++];
1770
+ if (path === void 0) return;
1771
+ try {
1772
+ fileContents.set(path, await fileTree.read(path));
1773
+ } catch (error) {
1774
+ readErrors.set(path, error);
1775
+ }
1776
+ return readNext();
1777
+ };
1778
+ await Promise.all(Array.from({ length: Math.min(READ_BATCH, companionPaths.length) }, readNext));
1153
1779
  for (const [, objFiles] of objectMap) {
1154
1780
  if (!objFiles.metadataFile) continue;
1155
1781
  const handler = getHandler(objFiles.type);
1156
1782
  if (!handler) continue;
1157
1783
  try {
1158
1784
  const raw = await fileTree.read(objFiles.metadataFile);
1159
- const metadata = handler.schema.parse(raw);
1160
- const sources = {};
1161
- for (const { path, suffix } of objFiles.sourceFiles) {
1162
- const content = await fileTree.read(path);
1163
- const sourceKey = suffix ? handler.suffixToSourceKey?.[suffix] ?? suffix : "main";
1164
- sources[sourceKey] = content;
1165
- }
1166
- const payload = handler.fromAbapGit ? handler.fromAbapGit(metadata) : { name: objFiles.name };
1167
- const objectName = payload.name || objFiles.name;
1168
- const fullData = {
1169
- ...payload,
1170
- name: objectName
1171
- };
1172
- const adkType = typeof payload.type === "string" ? payload.type : objFiles.type;
1173
- const adkObject = adk.getWithData(fullData, adkType);
1174
- if (Object.keys(sources).length > 0) {
1175
- if (handler.setSources) handler.setSources(adkObject, sources);
1176
- else if (sources.main) adkObject._pendingSource = sources.main;
1177
- }
1178
- if (payload.description) adkObject._pendingDescription = payload.description;
1179
- adkObject._relDir = objFiles.metadataFile.split("/").slice(0, -1).join("/");
1180
- if (options?.rootPackage) {
1181
- const data = adkObject._data;
1182
- if (data && !data.packageRef) data.packageRef = { name: options.rootPackage };
1183
- }
1184
- if (options?.abapLanguageVersion) {
1185
- const data = adkObject._data;
1186
- if (data && !data.abapLanguageVersion) data.abapLanguageVersion = abapLangVerToAdt(options.abapLanguageVersion) ?? options.abapLanguageVersion;
1187
- }
1188
- yield adkObject;
1785
+ yield objectFromFiles(objFiles, handler, handler.schema.parse(raw), fileContents, readErrors, adk, options);
1189
1786
  } catch (error) {
1190
1787
  console.error(`Failed to deserialize ${objFiles.type} ${objFiles.name}:`, error);
1191
1788
  }
1192
1789
  }
1193
1790
  }
1791
+ /**
1792
+ * Read the collected source/companion files into a source-key map.
1793
+ * Companions whose extension differs from the type's default encode it
1794
+ * into the key (`{suffix}.{ext}`) — LIMU `.json` metadata and
1795
+ * `.properties` texts stay distinguishable from `.abap` sources.
1796
+ */
1797
+ function collectSources(objFiles, handler, contents) {
1798
+ const sources = {};
1799
+ for (const { path, suffix, ext } of objFiles.sourceFiles) {
1800
+ const content = contents.get(path);
1801
+ if (content === void 0) continue;
1802
+ let key;
1803
+ if (suffix) key = sourceKey(objFiles.type, handler.suffixToSourceKey?.[suffix] ?? suffix, ext ?? "");
1804
+ else if (ext && ext !== "json") key = sourceKey(objFiles.type, "main", ext);
1805
+ else key = "main";
1806
+ sources[key] = content;
1807
+ }
1808
+ return sources;
1809
+ }
1810
+ /**
1811
+ * Stage companion keys on an ADK object without a dedicated
1812
+ * `setSources` hook — everything lands on `_pendingSources` /
1813
+ * `_pendingSource` so the shared emit path in `base.ts` re-emits
1814
+ * LIMU/sub-object files instead of silently dropping them.
1815
+ */
1816
+ function stagePendingSources(adkObject, sources) {
1817
+ const staged = adkObject;
1818
+ const { main, ...rest } = sources;
1819
+ if (main !== void 0) staged._pendingSource = main;
1820
+ if (Object.keys(rest).length > 0) staged._pendingSources = {
1821
+ ...staged._pendingSources,
1822
+ ...rest
1823
+ };
1824
+ }
1825
+ /** Build the payload record: handler projection + docu + properties. */
1826
+ function buildPayload(objFiles, handler, metadata, contents) {
1827
+ const payload = handler.fromAbapGit ? handler.fromAbapGit(metadata) : { name: objFiles.name };
1828
+ const docuRaw = objFiles.docuFile ? contents.get(objFiles.docuFile) : void 0;
1829
+ if (docuRaw !== void 0) try {
1830
+ payload.docu = JSON.parse(docuRaw);
1831
+ } catch {
1832
+ payload.docu = docuRaw;
1833
+ }
1834
+ if (objFiles.propertyFiles.length > 0) {
1835
+ const props = {};
1836
+ for (const { path, suffix } of objFiles.propertyFiles) {
1837
+ const content = contents.get(path);
1838
+ if (content !== void 0) props[suffix ?? ""] = content;
1839
+ }
1840
+ payload.properties = props;
1841
+ }
1842
+ return payload;
1843
+ }
1844
+ /** Merge `data.packageRef`/`abapLanguageVersion` fallbacks onto the object. */
1845
+ function applyOptionsFallbacks(adkObject, options) {
1846
+ const data = adkObject._data;
1847
+ if (!data) return;
1848
+ if (options?.rootPackage && !data.packageRef) data.packageRef = { name: options.rootPackage };
1849
+ if (options?.abapLanguageVersion && !data.abapLanguageVersion) data.abapLanguageVersion = abapLangVerToAdt(options.abapLanguageVersion) ?? options.abapLanguageVersion;
1850
+ }
1851
+ /** Metadata + collected files → a staged ADK object. */
1852
+ function objectFromFiles(objFiles, handler, metadata, contents, readErrors, adk, options) {
1853
+ for (const path of [
1854
+ ...objFiles.docuFile ? [objFiles.docuFile] : [],
1855
+ ...objFiles.propertyFiles.map((f) => f.path),
1856
+ ...objFiles.sourceFiles.map((f) => f.path)
1857
+ ]) if (readErrors.has(path)) throw readErrors.get(path);
1858
+ const sources = collectSources(objFiles, handler, contents);
1859
+ const payload = buildPayload(objFiles, handler, metadata, contents);
1860
+ const objectName = payload.name || objFiles.name;
1861
+ const fullData = {
1862
+ ...payload,
1863
+ name: objectName
1864
+ };
1865
+ const adkType = typeof payload.type === "string" ? payload.type : objFiles.type;
1866
+ const adkObject = adk.getWithData(fullData, adkType);
1867
+ if (Object.keys(sources).length > 0) {
1868
+ if (handler.setSources) handler.setSources(adkObject, sources);
1869
+ else stagePendingSources(adkObject, sources);
1870
+ }
1871
+ if (payload.description) adkObject._pendingDescription = payload.description;
1872
+ adkObject._relDir = objFiles.metadataFile.split("/").slice(0, -1).join("/");
1873
+ applyOptionsFallbacks(adkObject, options);
1874
+ return adkObject;
1875
+ }
1194
1876
 
1195
1877
  // src/lib/gcts-plugin.ts
1196
1878
  /**
@@ -1251,6 +1933,382 @@ const gctsPlugin = createPlugin({
1251
1933
  }
1252
1934
  });
1253
1935
 
1936
+ // src/schemas/generated/advc-v1.ts
1937
+ var advc_v1_exports = /* @__PURE__ */ __exportAll({});
1938
+
1939
+ // src/schemas/generated/aifa-v1.ts
1940
+ var aifa_v1_exports = /* @__PURE__ */ __exportAll({});
1941
+
1942
+ // src/schemas/generated/aifd-v1.ts
1943
+ var aifd_v1_exports = /* @__PURE__ */ __exportAll({});
1944
+
1945
+ // src/schemas/generated/aiff-v1.ts
1946
+ var aiff_v1_exports = /* @__PURE__ */ __exportAll({});
1947
+
1948
+ // src/schemas/generated/aifi-v1.ts
1949
+ var aifi_v1_exports = /* @__PURE__ */ __exportAll({});
1950
+
1951
+ // src/schemas/generated/aifn-v1.ts
1952
+ var aifn_v1_exports = /* @__PURE__ */ __exportAll({});
1953
+
1954
+ // src/schemas/generated/aifp-v1.ts
1955
+ var aifp_v1_exports = /* @__PURE__ */ __exportAll({});
1956
+
1957
+ // src/schemas/generated/aifr-v1.ts
1958
+ var aifr_v1_exports = /* @__PURE__ */ __exportAll({});
1959
+
1960
+ // src/schemas/generated/aobj-v1.ts
1961
+ var aobj_v1_exports = /* @__PURE__ */ __exportAll({});
1962
+
1963
+ // src/schemas/generated/apic-v1.ts
1964
+ var apic_v1_exports = /* @__PURE__ */ __exportAll({});
1965
+
1966
+ // src/schemas/generated/aplo-v1.ts
1967
+ var aplo_v1_exports = /* @__PURE__ */ __exportAll({});
1968
+
1969
+ // src/schemas/generated/apob-v1.ts
1970
+ var apob_v1_exports = /* @__PURE__ */ __exportAll({});
1971
+
1972
+ // src/schemas/generated/bdef-v1.ts
1973
+ var bdef_v1_exports = /* @__PURE__ */ __exportAll({});
1974
+
1975
+ // src/schemas/generated/bgqc-v1.ts
1976
+ var bgqc_v1_exports = /* @__PURE__ */ __exportAll({});
1977
+
1978
+ // src/schemas/generated/cdbo-v1.ts
1979
+ var cdbo_v1_exports = /* @__PURE__ */ __exportAll({});
1980
+
1981
+ // src/schemas/generated/cfdf-v1.ts
1982
+ var cfdf_v1_exports = /* @__PURE__ */ __exportAll({});
1983
+
1984
+ // src/schemas/generated/cfdf-v2.ts
1985
+ var cfdf_v2_exports = /* @__PURE__ */ __exportAll({});
1986
+
1987
+ // src/schemas/generated/chdo-v1.ts
1988
+ var chdo_v1_exports = /* @__PURE__ */ __exportAll({});
1989
+
1990
+ // src/schemas/generated/chkc-v1.ts
1991
+ var chkc_v1_exports = /* @__PURE__ */ __exportAll({});
1992
+
1993
+ // src/schemas/generated/chko-v1.ts
1994
+ var chko_v1_exports = /* @__PURE__ */ __exportAll({});
1995
+
1996
+ // src/schemas/generated/chkv-v1.ts
1997
+ var chkv_v1_exports = /* @__PURE__ */ __exportAll({});
1998
+
1999
+ // src/schemas/generated/clas-v1.ts
2000
+ var clas_v1_exports = /* @__PURE__ */ __exportAll({});
2001
+
2002
+ // src/schemas/generated/cota-v1.ts
2003
+ var cota_v1_exports = /* @__PURE__ */ __exportAll({});
2004
+
2005
+ // src/schemas/generated/csnm-v1.ts
2006
+ var csnm_v1_exports = /* @__PURE__ */ __exportAll({});
2007
+
2008
+ // src/schemas/generated/dcat-v1.ts
2009
+ var dcat_v1_exports = /* @__PURE__ */ __exportAll({});
2010
+
2011
+ // src/schemas/generated/dcls-v1.ts
2012
+ var dcls_v1_exports = /* @__PURE__ */ __exportAll({});
2013
+
2014
+ // src/schemas/generated/ddla-v1.ts
2015
+ var ddla_v1_exports = /* @__PURE__ */ __exportAll({});
2016
+
2017
+ // src/schemas/generated/ddls-v1.ts
2018
+ var ddls_v1_exports = /* @__PURE__ */ __exportAll({});
2019
+
2020
+ // src/schemas/generated/ddlx-v1.ts
2021
+ var ddlx_v1_exports = /* @__PURE__ */ __exportAll({});
2022
+
2023
+ // src/schemas/generated/desd-v1.ts
2024
+ var desd_v1_exports = /* @__PURE__ */ __exportAll({});
2025
+
2026
+ // src/schemas/generated/dmon-v1.ts
2027
+ var dmon_v1_exports = /* @__PURE__ */ __exportAll({});
2028
+
2029
+ // src/schemas/generated/dobj-v1.ts
2030
+ var dobj_v1_exports = /* @__PURE__ */ __exportAll({});
2031
+
2032
+ // src/schemas/generated/docu-v1.ts
2033
+ var docu_v1_exports = /* @__PURE__ */ __exportAll({});
2034
+
2035
+ // src/schemas/generated/doma-v1.ts
2036
+ var doma_v1_exports = /* @__PURE__ */ __exportAll({});
2037
+
2038
+ // src/schemas/generated/dras-v1.ts
2039
+ var dras_v1_exports = /* @__PURE__ */ __exportAll({});
2040
+
2041
+ // src/schemas/generated/drty-v1.ts
2042
+ var drty_v1_exports = /* @__PURE__ */ __exportAll({});
2043
+
2044
+ // src/schemas/generated/dsfd-v1.ts
2045
+ var dsfd_v1_exports = /* @__PURE__ */ __exportAll({});
2046
+
2047
+ // src/schemas/generated/dsfi-v1.ts
2048
+ var dsfi_v1_exports = /* @__PURE__ */ __exportAll({});
2049
+
2050
+ // src/schemas/generated/dtdc-v1.ts
2051
+ var dtdc_v1_exports = /* @__PURE__ */ __exportAll({});
2052
+
2053
+ // src/schemas/generated/dteb-v1.ts
2054
+ var dteb_v1_exports = /* @__PURE__ */ __exportAll({});
2055
+
2056
+ // src/schemas/generated/dtel-v1.ts
2057
+ var dtel_v1_exports = /* @__PURE__ */ __exportAll({});
2058
+
2059
+ // src/schemas/generated/dtix-v1.ts
2060
+ var dtix_v1_exports = /* @__PURE__ */ __exportAll({});
2061
+
2062
+ // src/schemas/generated/dtsc-v1.ts
2063
+ var dtsc_v1_exports = /* @__PURE__ */ __exportAll({});
2064
+
2065
+ // src/schemas/generated/edcc-v1.ts
2066
+ var edcc_v1_exports = /* @__PURE__ */ __exportAll({});
2067
+
2068
+ // src/schemas/generated/edck-v1.ts
2069
+ var edck_v1_exports = /* @__PURE__ */ __exportAll({});
2070
+
2071
+ // src/schemas/generated/edcr-v1.ts
2072
+ var edcr_v1_exports = /* @__PURE__ */ __exportAll({});
2073
+
2074
+ // src/schemas/generated/edoi-v1.ts
2075
+ var edoi_v1_exports = /* @__PURE__ */ __exportAll({});
2076
+
2077
+ // src/schemas/generated/eeec-v1.ts
2078
+ var eeec_v1_exports = /* @__PURE__ */ __exportAll({});
2079
+
2080
+ // src/schemas/generated/enho-v1.ts
2081
+ var enho_v1_exports = /* @__PURE__ */ __exportAll({});
2082
+
2083
+ // src/schemas/generated/enhs-v1.ts
2084
+ var enhs_v1_exports = /* @__PURE__ */ __exportAll({});
2085
+
2086
+ // src/schemas/generated/enqu-v1.ts
2087
+ var enqu_v1_exports = /* @__PURE__ */ __exportAll({});
2088
+
2089
+ // src/schemas/generated/evtb-v1.ts
2090
+ var evtb_v1_exports = /* @__PURE__ */ __exportAll({});
2091
+
2092
+ // src/schemas/generated/evto-v1.ts
2093
+ var evto_v1_exports = /* @__PURE__ */ __exportAll({});
2094
+
2095
+ // src/schemas/generated/fugr-v1.ts
2096
+ var fugr_v1_exports = /* @__PURE__ */ __exportAll({});
2097
+
2098
+ // src/schemas/generated/func-v1.ts
2099
+ var func_v1_exports = /* @__PURE__ */ __exportAll({});
2100
+
2101
+ // src/schemas/generated/gsmp-v1.ts
2102
+ var gsmp_v1_exports = /* @__PURE__ */ __exportAll({});
2103
+
2104
+ // src/schemas/generated/http-v1.ts
2105
+ var http_v1_exports = /* @__PURE__ */ __exportAll({});
2106
+
2107
+ // src/schemas/generated/ilmb-v1.ts
2108
+ var ilmb_v1_exports = /* @__PURE__ */ __exportAll({});
2109
+
2110
+ // src/schemas/generated/intf-v1.ts
2111
+ var intf_v1_exports = /* @__PURE__ */ __exportAll({});
2112
+
2113
+ // src/schemas/generated/intm-v1.ts
2114
+ var intm_v1_exports = /* @__PURE__ */ __exportAll({});
2115
+
2116
+ // src/schemas/generated/ints-v1.ts
2117
+ var ints_v1_exports = /* @__PURE__ */ __exportAll({});
2118
+
2119
+ // src/schemas/generated/iwng-v1.ts
2120
+ var iwng_v1_exports = /* @__PURE__ */ __exportAll({});
2121
+
2122
+ // src/schemas/generated/msag-v1.ts
2123
+ var msag_v1_exports = /* @__PURE__ */ __exportAll({});
2124
+
2125
+ // src/schemas/generated/nont-v1.ts
2126
+ var nont_v1_exports = /* @__PURE__ */ __exportAll({});
2127
+
2128
+ // src/schemas/generated/nrob-v1.ts
2129
+ var nrob_v1_exports = /* @__PURE__ */ __exportAll({});
2130
+
2131
+ // src/schemas/generated/ntta-v1.ts
2132
+ var ntta_v1_exports = /* @__PURE__ */ __exportAll({});
2133
+
2134
+ // src/schemas/generated/ntty-v1.ts
2135
+ var ntty_v1_exports = /* @__PURE__ */ __exportAll({});
2136
+
2137
+ // src/schemas/generated/prog-v1.ts
2138
+ var prog_v1_exports = /* @__PURE__ */ __exportAll({});
2139
+
2140
+ // src/schemas/generated/reps-v1.ts
2141
+ var reps_v1_exports = /* @__PURE__ */ __exportAll({});
2142
+
2143
+ // src/schemas/generated/ront-v1.ts
2144
+ var ront_v1_exports = /* @__PURE__ */ __exportAll({});
2145
+
2146
+ // src/schemas/generated/rvbc-v1.ts
2147
+ var rvbc_v1_exports = /* @__PURE__ */ __exportAll({});
2148
+
2149
+ // src/schemas/generated/saia-v1.ts
2150
+ var saia_v1_exports = /* @__PURE__ */ __exportAll({});
2151
+
2152
+ // src/schemas/generated/sajc-v1.ts
2153
+ var sajc_v1_exports = /* @__PURE__ */ __exportAll({});
2154
+
2155
+ // src/schemas/generated/sajt-v1.ts
2156
+ var sajt_v1_exports = /* @__PURE__ */ __exportAll({});
2157
+
2158
+ // src/schemas/generated/scp1-v1.ts
2159
+ var scp1_v1_exports = /* @__PURE__ */ __exportAll({});
2160
+
2161
+ // src/schemas/generated/sfpf-v1.ts
2162
+ var sfpf_v1_exports = /* @__PURE__ */ __exportAll({});
2163
+
2164
+ // src/schemas/generated/siad-v1.ts
2165
+ var siad_v1_exports = /* @__PURE__ */ __exportAll({});
2166
+
2167
+ // src/schemas/generated/sito-v1.ts
2168
+ var sito_v1_exports = /* @__PURE__ */ __exportAll({});
2169
+
2170
+ // src/schemas/generated/sito-v2.ts
2171
+ var sito_v2_exports = /* @__PURE__ */ __exportAll({});
2172
+
2173
+ // src/schemas/generated/smbc-v1.ts
2174
+ var smbc_v1_exports = /* @__PURE__ */ __exportAll({});
2175
+
2176
+ // src/schemas/generated/smtg-v1.ts
2177
+ var smtg_v1_exports = /* @__PURE__ */ __exportAll({});
2178
+
2179
+ // src/schemas/generated/sprv-v1.ts
2180
+ var sprv_v1_exports = /* @__PURE__ */ __exportAll({});
2181
+
2182
+ // src/schemas/generated/srvb-v1.ts
2183
+ var srvb_v1_exports = /* @__PURE__ */ __exportAll({});
2184
+
2185
+ // src/schemas/generated/srvc-v1.ts
2186
+ var srvc_v1_exports = /* @__PURE__ */ __exportAll({});
2187
+
2188
+ // src/schemas/generated/srvd-v1.ts
2189
+ var srvd_v1_exports = /* @__PURE__ */ __exportAll({});
2190
+
2191
+ // src/schemas/generated/suco-v1.ts
2192
+ var suco_v1_exports = /* @__PURE__ */ __exportAll({});
2193
+
2194
+ // src/schemas/generated/susi-v1.ts
2195
+ var susi_v1_exports = /* @__PURE__ */ __exportAll({});
2196
+
2197
+ // src/schemas/generated/swcr-v1.ts
2198
+ var swcr_v1_exports = /* @__PURE__ */ __exportAll({});
2199
+
2200
+ // src/schemas/generated/sxtg-v1.ts
2201
+ var sxtg_v1_exports = /* @__PURE__ */ __exportAll({});
2202
+
2203
+ // src/schemas/generated/uiad-v1.ts
2204
+ var uiad_v1_exports = /* @__PURE__ */ __exportAll({});
2205
+
2206
+ // src/schemas/generated/uiad-v2.ts
2207
+ var uiad_v2_exports = /* @__PURE__ */ __exportAll({});
2208
+
2209
+ // src/schemas/generated/uipg-v1.ts
2210
+ var uipg_v1_exports = /* @__PURE__ */ __exportAll({});
2211
+
2212
+ // src/schemas/generated/uist-v1.ts
2213
+ var uist_v1_exports = /* @__PURE__ */ __exportAll({});
2214
+
2215
+ // src/schemas/generated/index.ts
2216
+ var generated_exports = /* @__PURE__ */ __exportAll({
2217
+ AdvcV1: () => advc_v1_exports,
2218
+ AifaV1: () => aifa_v1_exports,
2219
+ AifdV1: () => aifd_v1_exports,
2220
+ AiffV1: () => aiff_v1_exports,
2221
+ AifiV1: () => aifi_v1_exports,
2222
+ AifnV1: () => aifn_v1_exports,
2223
+ AifpV1: () => aifp_v1_exports,
2224
+ AifrV1: () => aifr_v1_exports,
2225
+ AobjV1: () => aobj_v1_exports,
2226
+ ApicV1: () => apic_v1_exports,
2227
+ AploV1: () => aplo_v1_exports,
2228
+ ApobV1: () => apob_v1_exports,
2229
+ BdefV1: () => bdef_v1_exports,
2230
+ BgqcV1: () => bgqc_v1_exports,
2231
+ CdboV1: () => cdbo_v1_exports,
2232
+ CfdfV1: () => cfdf_v1_exports,
2233
+ CfdfV2: () => cfdf_v2_exports,
2234
+ ChdoV1: () => chdo_v1_exports,
2235
+ ChkcV1: () => chkc_v1_exports,
2236
+ ChkoV1: () => chko_v1_exports,
2237
+ ChkvV1: () => chkv_v1_exports,
2238
+ ClasV1: () => clas_v1_exports,
2239
+ CotaV1: () => cota_v1_exports,
2240
+ CsnmV1: () => csnm_v1_exports,
2241
+ DcatV1: () => dcat_v1_exports,
2242
+ DclsV1: () => dcls_v1_exports,
2243
+ DdlaV1: () => ddla_v1_exports,
2244
+ DdlsV1: () => ddls_v1_exports,
2245
+ DdlxV1: () => ddlx_v1_exports,
2246
+ DesdV1: () => desd_v1_exports,
2247
+ DmonV1: () => dmon_v1_exports,
2248
+ DobjV1: () => dobj_v1_exports,
2249
+ DocuV1: () => docu_v1_exports,
2250
+ DomaV1: () => doma_v1_exports,
2251
+ DrasV1: () => dras_v1_exports,
2252
+ DrtyV1: () => drty_v1_exports,
2253
+ DsfdV1: () => dsfd_v1_exports,
2254
+ DsfiV1: () => dsfi_v1_exports,
2255
+ DtdcV1: () => dtdc_v1_exports,
2256
+ DtebV1: () => dteb_v1_exports,
2257
+ DtelV1: () => dtel_v1_exports,
2258
+ DtixV1: () => dtix_v1_exports,
2259
+ DtscV1: () => dtsc_v1_exports,
2260
+ EdccV1: () => edcc_v1_exports,
2261
+ EdckV1: () => edck_v1_exports,
2262
+ EdcrV1: () => edcr_v1_exports,
2263
+ EdoiV1: () => edoi_v1_exports,
2264
+ EeecV1: () => eeec_v1_exports,
2265
+ EnhoV1: () => enho_v1_exports,
2266
+ EnhsV1: () => enhs_v1_exports,
2267
+ EnquV1: () => enqu_v1_exports,
2268
+ EvtbV1: () => evtb_v1_exports,
2269
+ EvtoV1: () => evto_v1_exports,
2270
+ FugrV1: () => fugr_v1_exports,
2271
+ FuncV1: () => func_v1_exports,
2272
+ GsmpV1: () => gsmp_v1_exports,
2273
+ HttpV1: () => http_v1_exports,
2274
+ IlmbV1: () => ilmb_v1_exports,
2275
+ IntfV1: () => intf_v1_exports,
2276
+ IntmV1: () => intm_v1_exports,
2277
+ IntsV1: () => ints_v1_exports,
2278
+ IwngV1: () => iwng_v1_exports,
2279
+ MsagV1: () => msag_v1_exports,
2280
+ NontV1: () => nont_v1_exports,
2281
+ NrobV1: () => nrob_v1_exports,
2282
+ NttaV1: () => ntta_v1_exports,
2283
+ NttyV1: () => ntty_v1_exports,
2284
+ ProgV1: () => prog_v1_exports,
2285
+ RepsV1: () => reps_v1_exports,
2286
+ RontV1: () => ront_v1_exports,
2287
+ RvbcV1: () => rvbc_v1_exports,
2288
+ SaiaV1: () => saia_v1_exports,
2289
+ SajcV1: () => sajc_v1_exports,
2290
+ SajtV1: () => sajt_v1_exports,
2291
+ Scp1V1: () => scp1_v1_exports,
2292
+ SfpfV1: () => sfpf_v1_exports,
2293
+ SiadV1: () => siad_v1_exports,
2294
+ SitoV1: () => sito_v1_exports,
2295
+ SitoV2: () => sito_v2_exports,
2296
+ SmbcV1: () => smbc_v1_exports,
2297
+ SmtgV1: () => smtg_v1_exports,
2298
+ SprvV1: () => sprv_v1_exports,
2299
+ SrvbV1: () => srvb_v1_exports,
2300
+ SrvcV1: () => srvc_v1_exports,
2301
+ SrvdV1: () => srvd_v1_exports,
2302
+ SucoV1: () => suco_v1_exports,
2303
+ SusiV1: () => susi_v1_exports,
2304
+ SwcrV1: () => swcr_v1_exports,
2305
+ SxtgV1: () => sxtg_v1_exports,
2306
+ UiadV1: () => uiad_v1_exports,
2307
+ UiadV2: () => uiad_v2_exports,
2308
+ UipgV1: () => uipg_v1_exports,
2309
+ UistV1: () => uist_v1_exports
2310
+ });
2311
+
1254
2312
  // src/index.ts
1255
2313
  /**
1256
2314
  * @abapify/adt-plugin-gcts — gCTS / AFF format plugin entry point.
@@ -1265,5 +2323,5 @@ registerFormatPlugin({
1265
2323
  id: "aff"
1266
2324
  });
1267
2325
 
1268
- export { gctsPlugin as GctsPlugin, gctsPlugin as default, gctsPlugin, METADATA_EXTENSION, PACKAGE_FILENAME, adtUriToGctsPath, createHandler, gctsFilename, gctsFormatPlugin, getHandler, getSupportedTypes, isSupported, parseGctsFilename };
2326
+ export { generated_exports as AffGenerated, gctsPlugin as GctsPlugin, gctsPlugin as default, gctsPlugin, LIMU_SUBTYPES, METADATA_EXTENSION, PACKAGE_FILENAME, adtUriToGctsPath, affBodyProps, affExamples, affRoot, affSchema, affValidate, affVersions, createHandler, gctsFilename, gctsFormatPlugin, gctsSourceExt, getHandler, getSupportedTypes, isSupported, latestAffVersion, listAffTypes, parseGctsFilename, readAffExample, schemaTargetForExample, sourceKey, splitSourceKey };
1269
2327
  //# sourceMappingURL=index.mjs.map