dsh-artcraft-plugin-vectorcraft 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/kit/profiles.mjs +3 -0
- package/src/kit/tools.js +6 -1
package/package.json
CHANGED
package/src/kit/profiles.mjs
CHANGED
|
@@ -261,7 +261,10 @@ export const CRAFT_PROFILES = [
|
|
|
261
261
|
cmdSeparator: '',
|
|
262
262
|
cmdStyle: 'flag-params',
|
|
263
263
|
cmdParamsFlag: '--params',
|
|
264
|
+
// VectorCraft renders documents and artifacts through one flag, so both
|
|
265
|
+
// names map to it: the kernel folds `export` into `save` when they match.
|
|
264
266
|
saveFlag: '--export',
|
|
267
|
+
exportFlag: '--export',
|
|
265
268
|
},
|
|
266
269
|
reads: [
|
|
267
270
|
{ name: 'convert', verb: 'convert', summary: 'Open any readable format and export it to another.' },
|
package/src/kit/tools.js
CHANGED
|
@@ -364,7 +364,12 @@ export function createToolSet(runtime ) {
|
|
|
364
364
|
...(profile.run.saveMode ?? 'flag') === 'flag'
|
|
365
365
|
? { save: { type: 'string', description: `Path to write the edited document to (${profile.extensions.join('/')}).` } }
|
|
366
366
|
: {},
|
|
367
|
-
|
|
367
|
+
// `export` is always advertised when the craft can render one. Where the
|
|
368
|
+
// craft writes documents and artifacts through the same flag (VectorCraft
|
|
369
|
+
// `--export`), the executor folds `export` into `save`; the parameter is
|
|
370
|
+
// still offered because naming the artifact is what a caller means, and
|
|
371
|
+
// withholding it only pushes them to `extraArgs`.
|
|
372
|
+
...profile.run.exportFlag !== undefined
|
|
368
373
|
? { export: { type: 'string', description: 'Path to export a rendered artifact to (png/svg/pdf, or the app\'s native media type).' } }
|
|
369
374
|
: {},
|
|
370
375
|
...profile.run.sampleFlag.length > 0
|