@camunda8/cli 3.2.0-alpha.2 → 3.2.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/CONTEXT.md +7 -15
  2. package/EXAMPLES.md +233 -1
  3. package/README.md +44 -177
  4. package/dist/command-dispatch.js +1 -1
  5. package/dist/command-dispatch.js.map +1 -1
  6. package/dist/command-registry.d.ts +19 -7
  7. package/dist/command-registry.d.ts.map +1 -1
  8. package/dist/command-registry.js +47 -7
  9. package/dist/command-registry.js.map +1 -1
  10. package/dist/commands/deploy.d.ts +13 -0
  11. package/dist/commands/deploy.d.ts.map +1 -0
  12. package/dist/commands/deploy.js +91 -0
  13. package/dist/commands/deploy.js.map +1 -0
  14. package/dist/{deployments.d.ts → commands/helpers/deploy-helpers.d.ts} +49 -12
  15. package/dist/commands/helpers/deploy-helpers.d.ts.map +1 -0
  16. package/dist/{deployments.js → commands/helpers/deploy-helpers.js} +16 -97
  17. package/dist/commands/helpers/deploy-helpers.js.map +1 -0
  18. package/dist/commands/identity-authorizations.d.ts +0 -13
  19. package/dist/commands/identity-authorizations.d.ts.map +1 -1
  20. package/dist/commands/identity-authorizations.js +1 -1
  21. package/dist/commands/identity-authorizations.js.map +1 -1
  22. package/dist/commands/identity.d.ts +1 -21
  23. package/dist/commands/identity.d.ts.map +1 -1
  24. package/dist/commands/identity.js +7 -8
  25. package/dist/commands/identity.js.map +1 -1
  26. package/dist/commands/profiles.d.ts +0 -32
  27. package/dist/commands/profiles.d.ts.map +1 -1
  28. package/dist/commands/profiles.js +5 -36
  29. package/dist/commands/profiles.js.map +1 -1
  30. package/dist/commands/watch.d.ts.map +1 -1
  31. package/dist/commands/watch.js +2 -2
  32. package/dist/commands/watch.js.map +1 -1
  33. package/dist/default-plugins/bpmn/c8ctl-plugin.js +7374 -137
  34. package/dist/default-plugins/bpmn/package.json +8 -1
  35. package/dist/default-plugins/element-template/c8ctl-plugin.js +10194 -248
  36. package/dist/default-plugins/element-template/package.json +11 -1
  37. package/dist/default-plugins/feel/c8ctl-plugin.js +14030 -584
  38. package/dist/default-plugins/feel/package.json +4 -1
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +16 -9
  41. package/dist/index.js.map +1 -1
  42. package/dist/resource-extensions.d.ts.map +1 -0
  43. package/dist/resource-extensions.js.map +1 -0
  44. package/dist/vendor/bpmnlint.cjs +25907 -0
  45. package/package.json +11 -13
  46. package/dist/commands/resource-extensions.d.ts.map +0 -1
  47. package/dist/commands/resource-extensions.js.map +0 -1
  48. package/dist/default-plugins/bpmn/c8ctl-plugin.js.map +0 -1
  49. package/dist/default-plugins/bpmn/format.js +0 -64
  50. package/dist/default-plugins/bpmn/format.js.map +0 -1
  51. package/dist/default-plugins/bpmn/lint.js +0 -323
  52. package/dist/default-plugins/bpmn/lint.js.map +0 -1
  53. package/dist/default-plugins/element-template/c8ctl-plugin.js.map +0 -1
  54. package/dist/default-plugins/element-template/commands/apply.js +0 -337
  55. package/dist/default-plugins/element-template/commands/apply.js.map +0 -1
  56. package/dist/default-plugins/element-template/commands/get-properties.js +0 -350
  57. package/dist/default-plugins/element-template/commands/get-properties.js.map +0 -1
  58. package/dist/default-plugins/element-template/commands/get.js +0 -107
  59. package/dist/default-plugins/element-template/commands/get.js.map +0 -1
  60. package/dist/default-plugins/element-template/commands/info.js +0 -196
  61. package/dist/default-plugins/element-template/commands/info.js.map +0 -1
  62. package/dist/default-plugins/element-template/commands/search.js +0 -106
  63. package/dist/default-plugins/element-template/commands/search.js.map +0 -1
  64. package/dist/default-plugins/element-template/commands/sync.js +0 -36
  65. package/dist/default-plugins/element-template/commands/sync.js.map +0 -1
  66. package/dist/default-plugins/element-template/helpers.js +0 -515
  67. package/dist/default-plugins/element-template/helpers.js.map +0 -1
  68. package/dist/default-plugins/element-template/marketplace.js +0 -597
  69. package/dist/default-plugins/element-template/marketplace.js.map +0 -1
  70. package/dist/default-plugins/element-template/template-ref.js +0 -243
  71. package/dist/default-plugins/element-template/template-ref.js.map +0 -1
  72. package/dist/default-plugins/feel/c8ctl-plugin.js.map +0 -1
  73. package/dist/default-plugins/hello-world/README.md +0 -161
  74. package/dist/default-plugins/hello-world/c8ctl-plugin.js +0 -69
  75. package/dist/default-plugins/hello-world/package.json +0 -8
  76. package/dist/deployments.d.ts.map +0 -1
  77. package/dist/deployments.js.map +0 -1
  78. /package/dist/{commands/resource-extensions.d.ts → resource-extensions.d.ts} +0 -0
  79. /package/dist/{commands/resource-extensions.js → resource-extensions.js} +0 -0
@@ -1,350 +0,0 @@
1
- /**
2
- * `c8ctl element-template get-properties` — list settable properties of a
3
- * template. Default render is a condensed table of name + description
4
- * rows grouped by section. `--detailed` swaps in per-property detail cards.
5
- */
6
- import { styleText } from "node:util";
7
- import { BINDING_TYPE_SHORTHANDS, globToRegex, parseEngineVersionFlag, } from "../helpers.js";
8
- import { loadTemplate } from "../template-ref.js";
9
- import { formatKeyedCard, parseInspectArgs } from "./info.js";
10
- if (!globalThis.c8ctl)
11
- throw new Error("c8ctl runtime not initialised");
12
- const c8ctl = globalThis.c8ctl;
13
- export async function getPropertiesSubcommand(args) {
14
- const logger = c8ctl.getLogger();
15
- const usage = "Usage: c8ctl element-template get-properties <template> [<name>...] [--group <id>...] [--detailed | -d] [--engine-version <x.y.z>]\n" +
16
- " Default: condensed list (name + description). --detailed shows full cards.\n" +
17
- " Names may include shell-style globs — quote to avoid shell expansion: 'auth*'";
18
- const { engineVersion, rest } = parseEngineVersionFlag(args, usage);
19
- const parsed = parseInspectArgs(rest, usage, {
20
- allowPropertyNames: true,
21
- allowFilters: true,
22
- });
23
- const { template, allDetails, groupLabelMap, sourceByDetail, autoResolvedVersion, engineVersionIgnoredByPinnedVersion, } = await loadTemplate(parsed.templateArg, {
24
- executionPlatformVersion: engineVersion,
25
- });
26
- if (engineVersionIgnoredByPinnedVersion && engineVersion) {
27
- logger.warn(`Ignoring --engine-version ${engineVersion} because ${parsed.templateArg} pins a template version.`);
28
- }
29
- if (autoResolvedVersion) {
30
- logger.warn(`Resolved latest version (${template.version}) of ${template.id}. ` +
31
- `Use '${template.id}@${template.version}' to pin.`);
32
- }
33
- // Resolve positional names if any (literals or globs). Each arg must
34
- // match at least one property — typos shouldn't silently produce no
35
- // output. With no positionals, default to all properties.
36
- let details = parsed.propertyArgs.length > 0
37
- ? parsed.propertyArgs.flatMap((arg) => filterByPropertyArg(allDetails, arg, parsed.templateArg))
38
- : allDetails;
39
- // --group intersects with positional matches. Validation of the
40
- // requested group ids uses the full template (allDetails) so a
41
- // valid group id on a property the name filter excluded still
42
- // counts as known — the user should see "no match" for the
43
- // combination, not "unknown group id".
44
- details = applyGroupFilter(details, allDetails, parsed.groups, groupLabelMap);
45
- // Dedupe by object reference — the same property detail object is
46
- // returned when it matches multiple positionals (e.g. `url` and
47
- // `u*` together). NOT by binding name+type: distinct properties
48
- // sometimes share those (operation-conditional duplicates that
49
- // bind to the same field with different `condition` clauses).
50
- const seen = new Set();
51
- details = details.filter((d) => {
52
- if (seen.has(d)) {
53
- return false;
54
- }
55
- seen.add(d);
56
- return true;
57
- });
58
- // Each filter is individually validated (positional names via
59
- // filterByPropertyArg, group ids via applyGroupFilter), but their
60
- // intersection can still be empty when a property exists somewhere
61
- // and a group exists, just not together. Surface that as an error
62
- // to match the README contract that filters error on no-match.
63
- if (details.length === 0 &&
64
- (parsed.propertyArgs.length > 0 || parsed.groups.length > 0)) {
65
- const nameClause = parsed.propertyArgs.length > 0
66
- ? `name${parsed.propertyArgs.length > 1 ? "s" : ""} ${parsed.propertyArgs.map((a) => `"${a}"`).join(", ")}`
67
- : "";
68
- const groupClause = parsed.groups.length > 0
69
- ? `group${parsed.groups.length > 1 ? "s" : ""} ${parsed.groups.map((g) => `"${g}"`).join(", ")}`
70
- : "";
71
- const what = [nameClause, groupClause].filter(Boolean).join(" and ");
72
- throw new Error(`No properties match ${what}.`);
73
- }
74
- const total = allDetails.length;
75
- if (c8ctl.outputMode === "json") {
76
- const projector = parsed.detailed
77
- ? buildShowProperty
78
- : buildCondensedProperty;
79
- logger.json(buildJsonPayload(template, details, projector, total, sourceByDetail));
80
- return;
81
- }
82
- // Summary line at the top — gives an at-a-glance answer to "how
83
- // many am I seeing, out of how many available". Especially useful
84
- // after a filter to confirm scope.
85
- logger.output(styleText("dim", `Showing ${details.length} of ${total} properties.`));
86
- logger.output("");
87
- if (parsed.detailed) {
88
- // Detail-card view — full per-property fields.
89
- for (let i = 0; i < details.length; i++) {
90
- for (const line of formatPropertyCard(details[i])) {
91
- logger.output(line);
92
- }
93
- if (i < details.length - 1) {
94
- logger.output("");
95
- }
96
- }
97
- return;
98
- }
99
- // Default: condensed list — group heading + name + description.
100
- renderCondensedTable(details, groupLabelMap, logger);
101
- // Trailing hint — point users at name filtering and --detailed.
102
- logger.output("");
103
- logger.output(styleText("dim", "Filter by name (supports globs):\n" +
104
- ` c8ctl element-template get-properties ${parsed.templateArg} 'auth*' url\n` +
105
- "For full details on each property:\n" +
106
- ` c8ctl element-template get-properties ${parsed.templateArg} --detailed`));
107
- }
108
- /**
109
- * Project a property into the JSON shape that mirrors the **condensed
110
- * get-properties text output** — just identification (binding) and the
111
- * descriptive text the row surfaces. Group is included so consumers
112
- * can resolve the section heading via the top-level `groups` table.
113
- */
114
- function buildCondensedProperty(prop) {
115
- return {
116
- id: prop.id,
117
- binding: prop.binding,
118
- label: prop.label,
119
- description: prop.description,
120
- group: prop.group,
121
- choices: prop.choices,
122
- };
123
- }
124
- /**
125
- * Project a property into the JSON shape that mirrors the
126
- * **--detailed get-properties card** — every field the card surfaces.
127
- * Schema field names verbatim.
128
- */
129
- function buildShowProperty(prop) {
130
- return {
131
- id: prop.id,
132
- binding: prop.binding,
133
- type: prop.type,
134
- optional: prop.optional,
135
- value: prop.value,
136
- feel: prop.feel,
137
- group: prop.group,
138
- condition: prop.condition,
139
- label: prop.label,
140
- description: prop.description,
141
- constraints: prop.constraints,
142
- choices: prop.choices,
143
- };
144
- }
145
- /**
146
- * JSON payload for `get-properties`. `projectProp` decides which
147
- * per-property shape to use (condensed vs detailed) so JSON mirrors
148
- * text density per mode.
149
- */
150
- function buildJsonPayload(template, details, projectProp, totalCount, sourceByDetail) {
151
- const properties = details
152
- .map((d) => sourceByDetail.get(d))
153
- .filter((p) => Boolean(p))
154
- .map(projectProp);
155
- return {
156
- count: properties.length,
157
- total: totalCount,
158
- groups: template.groups ?? [],
159
- properties,
160
- };
161
- }
162
- /**
163
- * Filter `details` to those whose `groupId` is in the requested list.
164
- * Empty list means no filter. Unknown group ids throw with the list of
165
- * valid ids — group ids are short and bounded so we always show them.
166
- *
167
- * `allDetails` is the unfiltered property set from the template; we
168
- * use it to compute the valid-group set so that a group id which only
169
- * appears on a property excluded by an earlier name filter still counts
170
- * as known. Without this, combining a valid name filter and a valid
171
- * group id from a template with no `groups` table would surface
172
- * "Unknown group id" rather than the intended empty-intersection error.
173
- */
174
- function applyGroupFilter(details, allDetails, groups, groupLabelMap) {
175
- if (groups.length === 0) {
176
- return details;
177
- }
178
- // Valid group IDs: the template's declared groups table PLUS any group id
179
- // referenced directly on any property in the template (templates that use
180
- // property.group without a matching groups entry still render a heading —
181
- // so the filter must accept those ids too).
182
- const validFromTemplate = new Set(groupLabelMap.keys());
183
- const validFromDetails = new Set(allDetails
184
- .map((d) => d.groupId)
185
- .filter((id) => id !== undefined));
186
- const valid = new Set([...validFromTemplate, ...validFromDetails]);
187
- for (const g of groups) {
188
- if (!valid.has(g)) {
189
- const known = [...valid].join(", ") || "(none defined on this template)";
190
- throw new Error(`Unknown group id "${g}". Use the template's group id (not its label).\n` +
191
- `Available group ids: ${known}`);
192
- }
193
- }
194
- const set = new Set(groups);
195
- return details.filter((d) => d.groupId !== undefined && set.has(d.groupId));
196
- }
197
- /**
198
- * Render the condensed one-line-per-property listing grouped by
199
- * section.
200
- */
201
- function renderCondensedTable(details, groupLabelMap, logger) {
202
- const grouped = new Map();
203
- const ungrouped = [];
204
- for (const detail of details) {
205
- if (detail.groupId) {
206
- const list = grouped.get(detail.groupId) ?? [];
207
- list.push(detail);
208
- grouped.set(detail.groupId, list);
209
- }
210
- else {
211
- ungrouped.push(detail);
212
- }
213
- }
214
- // Global name-column width so the description column anchors at the
215
- // same x-position across all groups.
216
- const nameWidth = Math.max(0, ...details.map((d) => (d.name ?? "?").length));
217
- const groupEntries = [...grouped.entries()].map(([groupId, group]) => ({ groupId, group }));
218
- if (ungrouped.length > 0) {
219
- groupEntries.push({ groupId: null, group: ungrouped });
220
- }
221
- for (let i = 0; i < groupEntries.length; i++) {
222
- const { groupId, group } = groupEntries[i];
223
- const label = groupId ? (groupLabelMap.get(groupId) ?? groupId) : "Other";
224
- // Show "Label (id)" so the --group filter token is self-documenting.
225
- // Skip the parenthetical when label and id are identical.
226
- const heading = groupId && label !== groupId
227
- ? `${styleText("bold", label)} ${styleText("dim", `(${groupId})`)}`
228
- : styleText("bold", label);
229
- logger.output(heading);
230
- for (const detail of group) {
231
- logger.output(formatCondensedRow(detail, { nameWidth }));
232
- }
233
- if (i < groupEntries.length - 1) {
234
- logger.output("");
235
- }
236
- }
237
- }
238
- /**
239
- * Build one condensed row: indent · padded name · description-or-label.
240
- */
241
- function formatCondensedRow(detail, { nameWidth }) {
242
- const NAME_INDENT = " ";
243
- const COLUMN_GAP = " ";
244
- const CONT_INDENT = " ".repeat(NAME_INDENT.length + 4);
245
- const name = (detail.name ?? "?").padEnd(nameWidth);
246
- const text = detail.description ?? detail.label ?? "";
247
- const trailing = text ? `${COLUMN_GAP}${styleText("dim", text)}` : "";
248
- const lines = [`${NAME_INDENT}${styleText("bold", name)}${trailing}`];
249
- // Surface `id` only when it adds information — i.e. it exists and
250
- // differs from the binding name. For most properties (id == name or
251
- // id missing) this stays a single-line row.
252
- if (detail.id && detail.id !== detail.name) {
253
- lines.push(styleText("dim", `${CONT_INDENT}[id: ${detail.id}]`));
254
- }
255
- if (detail.choices?.length) {
256
- const values = detail.choices.map((c) => c.value).join(", ");
257
- lines.push(styleText("dim", `${CONT_INDENT}[choices: ${values}]`));
258
- }
259
- return lines.join("\n");
260
- }
261
- /**
262
- * Detail card for a single property — keyed two-column layout.
263
- */
264
- function formatPropertyCard(detail) {
265
- const fields = [];
266
- if (detail.id) {
267
- fields.push(["Id", detail.id]);
268
- }
269
- fields.push(["Type", detail.type ?? "String"]);
270
- fields.push(["Required", detail.required ? "yes" : "no"]);
271
- if (detail.feel) {
272
- fields.push(["FEEL", detail.feel]);
273
- }
274
- if (detail.default !== undefined && detail.default !== "") {
275
- fields.push(["Default", formatBadgeValue(detail.default)]);
276
- }
277
- if (detail.bindingType) {
278
- fields.push(["Binding", detail.bindingType]);
279
- }
280
- if (detail.label || detail.description) {
281
- const text = [detail.label, detail.description].filter(Boolean).join(" — ");
282
- fields.push(["Description", text]);
283
- }
284
- if (detail.conditionText) {
285
- fields.push(["Active when", detail.conditionText]);
286
- }
287
- else if (detail.condition) {
288
- fields.push(["Conditional", "(see template definition)"]);
289
- }
290
- if (detail.pattern) {
291
- fields.push(["Pattern", detail.pattern.value]);
292
- if (detail.pattern.message) {
293
- fields.push(["", detail.pattern.message]);
294
- }
295
- }
296
- if (detail.choices?.length) {
297
- fields.push(["Choices", detail.choices.map((c) => c.value).join(", ")]);
298
- }
299
- return formatKeyedCard({
300
- title: detail.name ?? "?",
301
- subtitle: detail.group ? `(${detail.group})` : undefined,
302
- fields,
303
- });
304
- }
305
- /**
306
- * Filter properties by a `<name>` or `<binding-type>:<name>` argument.
307
- */
308
- function filterByPropertyArg(details, propertyArg, templateArg) {
309
- const colon = propertyArg.indexOf(":");
310
- let nameFilter = propertyArg;
311
- let typeFilter;
312
- if (colon !== -1) {
313
- const prefix = propertyArg.slice(0, colon);
314
- typeFilter = BINDING_TYPE_SHORTHANDS[prefix];
315
- if (!typeFilter) {
316
- const valid = Object.keys(BINDING_TYPE_SHORTHANDS).join(", ");
317
- throw new Error(`Unknown binding type prefix "${prefix}". Valid prefixes: ${valid}`);
318
- }
319
- nameFilter = propertyArg.slice(colon + 1);
320
- }
321
- const isGlob = nameFilter.includes("*");
322
- const matcher = isGlob ? globToRegex(nameFilter) : null;
323
- const matches = details.filter((d) => {
324
- if (typeFilter && d.bindingType !== typeFilter) {
325
- return false;
326
- }
327
- if (!d.name) {
328
- return false;
329
- }
330
- return matcher ? matcher.test(d.name) : d.name === nameFilter;
331
- });
332
- if (matches.length === 0) {
333
- const hint = templateArg
334
- ? `\nRun 'c8ctl element-template get-properties ${templateArg}' to list all available properties.`
335
- : "";
336
- throw new Error(`Property "${propertyArg}" not found.${hint}`);
337
- }
338
- return matches;
339
- }
340
- function formatBadgeValue(value) {
341
- if (typeof value === "string") {
342
- // Multi-line defaults (FEEL expression bodies, JSON snippets) would
343
- // otherwise wrap and break the badge layout — collapse to a single
344
- // line and truncate.
345
- const oneLine = value.replace(/\s+/g, " ").trim();
346
- return oneLine.length > 60 ? `${oneLine.slice(0, 57)}...` : oneLine;
347
- }
348
- return JSON.stringify(value);
349
- }
350
- //# sourceMappingURL=get-properties.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get-properties.js","sourceRoot":"","sources":["../../../../default-plugins/element-template/commands/get-properties.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EACN,uBAAuB,EACvB,WAAW,EAGX,sBAAsB,GAGtB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE9D,IAAI,CAAC,UAAU,CAAC,KAAK;IAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;AACxE,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;AAE/B,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,IAAc;IAC3D,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;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AI,KAAK,UAAU,CAAC;IAC/D,CAAC,CAAC,CAAC;IACH,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC1B,MAAM,IAAI,GAAG,WAAW;YACvB,CAAC,CAAC,gDAAgD,WAAW,qCAAqC;YAClG,CAAC,CAAC,EAAE,CAAC;QACN,MAAM,IAAI,KAAK,CAAC,aAAa,WAAW,eAAe,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,OAAO,CAAC;AAChB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACvC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,oEAAoE;QACpE,mEAAmE;QACnE,qBAAqB;QACrB,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QAClD,OAAO,OAAO,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC;IACrE,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -1,107 +0,0 @@
1
- /**
2
- * `c8ctl element-template get` — print the raw template JSON to stdout
3
- * (pipe-friendly).
4
- *
5
- * For local paths and URLs we pass the source bytes through unchanged (no
6
- * parse/stringify round-trip — preserves whitespace, key order, trailing
7
- * newline). For OOTB ids we don't have the upstream bytes, so we
8
- * serialize the cached object with a 2-space indent. Designed for shell
9
- * redirection:
10
- *
11
- * c8ctl element-template get <id> > template.json
12
- *
13
- * No trailing hints or colored output — they would corrupt the piped
14
- * payload.
15
- */
16
- import { installStdoutEpipeHandler, parseTemplateJson, readFileOrUrl, } from "../helpers.js";
17
- import { parseTemplateRef, resolveOotbTemplate } from "../template-ref.js";
18
- export async function getSubcommand(args) {
19
- // `get` writes raw template JSON straight to stdout; consumers that
20
- // take only a prefix (e.g. `get <id> | head -c N`) close the pipe
21
- // early and would otherwise crash the process with an unhandled
22
- // EPIPE event.
23
- installStdoutEpipeHandler();
24
- const usage = "Usage: c8ctl element-template get <template> [--no-icon]";
25
- let templateArg;
26
- let noIcon = false;
27
- for (let i = 0; i < args.length; i++) {
28
- const arg = args[i];
29
- if (arg === "--") {
30
- // All tokens after `--` are literal positionals — not flags.
31
- for (const rest of args.slice(i + 1)) {
32
- if (templateArg === undefined) {
33
- templateArg = rest;
34
- }
35
- else {
36
- throw new Error(`Unexpected argument: ${rest}. ${usage}`);
37
- }
38
- }
39
- break;
40
- }
41
- if (arg === "--no-icon") {
42
- noIcon = true;
43
- continue;
44
- }
45
- if (arg.startsWith("-")) {
46
- throw new Error(`Unknown flag: ${arg}. ${usage}`);
47
- }
48
- if (templateArg === undefined) {
49
- templateArg = arg;
50
- continue;
51
- }
52
- throw new Error(`Unexpected argument: ${arg}. ${usage}`);
53
- }
54
- if (!templateArg) {
55
- throw new Error(`Missing template argument. ${usage}`);
56
- }
57
- const ref = parseTemplateRef(templateArg);
58
- if (!ref) {
59
- throw new Error(`Missing template argument. ${usage}`);
60
- }
61
- if (ref.kind === "path" || ref.kind === "url") {
62
- const content = await readFileOrUrl(ref.value);
63
- // Pass-through preserves whitespace + key order — but --no-icon
64
- // requires a parse/strip/re-stringify round-trip, which loses
65
- // that. The user is opting in to the rewrite by asking for it.
66
- if (noIcon) {
67
- const template = parseTemplateJson(content);
68
- const stripped = stripIcon(template);
69
- process.stdout.write(`${JSON.stringify(stripped, null, 2)}\n`);
70
- return;
71
- }
72
- process.stdout.write(content);
73
- return;
74
- }
75
- // OOTB id: no upstream bytes available — stringify the cached object.
76
- // `resolveOotbTemplate` calls `requireCachePresent` under the hood, so
77
- // a missing cache surfaces with the same "run sync first" message every
78
- // other subcommand uses.
79
- const template = await resolveOotbTemplate(ref);
80
- // The cache injects `metadata.upstreamRef` (our internal pointer for
81
- // incremental sync); strip it so the output matches what you'd get
82
- // from the marketplace, not c8ctl's cache shape.
83
- let cleaned = stripInternalMetadata(template);
84
- if (noIcon) {
85
- cleaned = stripIcon(cleaned);
86
- }
87
- process.stdout.write(`${JSON.stringify(cleaned, null, 2)}\n`);
88
- }
89
- function stripInternalMetadata(template) {
90
- if (!template.metadata?.upstreamRef) {
91
- return template;
92
- }
93
- const { metadata, ...rest } = template;
94
- const { upstreamRef: _ignored, ...metaRest } = metadata;
95
- if (Object.keys(metaRest).length === 0) {
96
- return { ...rest, properties: template.properties };
97
- }
98
- return { ...rest, properties: template.properties, metadata: metaRest };
99
- }
100
- function stripIcon(template) {
101
- if (!template.icon) {
102
- return template;
103
- }
104
- const { icon: _icon, ...rest } = template;
105
- return { ...rest, properties: template.properties };
106
- }
107
- //# sourceMappingURL=get.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"get.js","sourceRoot":"","sources":["../../../../default-plugins/element-template/commands/get.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,EACN,yBAAyB,EACzB,iBAAiB,EACjB,aAAa,GAEb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAE3E,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAc;IACjD,oEAAoE;IACpE,kEAAkE;IAClE,gEAAgE;IAChE,eAAe;IACf,yBAAyB,EAAE,CAAC;IAC5B,MAAM,KAAK,GAAG,0DAA0D,CAAC;IAEzE,IAAI,WAA+B,CAAC;IACpC,IAAI,MAAM,GAAG,KAAK,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,GAAG,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,IAAI,GAAG,KAAK,IAAI,EAAE,CAAC;YAClB,6DAA6D;YAC7D,KAAK,MAAM,IAA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