@abapify/adt-plugin-gcts 0.4.21 → 0.4.23

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