@tridion-docs/extensions-cli 2.1.0 → 2.1.3

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/CHANGELOG.md CHANGED
@@ -1,26 +1,47 @@
1
1
  # @tridion-docs/extensions-cli
2
2
 
3
+ ## 2.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated types for compatibility with 15.2 and 15.3
8
+ - @tridion-docs/extensions@2.1.3
9
+
10
+ ## 2.1.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ - @tridion-docs/extensions@2.1.2
16
+
17
+ ## 2.1.1
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+ - @tridion-docs/extensions@2.1.1
23
+
3
24
  ## 2.1.0
4
25
 
5
26
  ### Minor Changes
6
27
 
7
28
  - Updated dependencies
8
29
 
9
- - @tridion-docs/extensions@2.1.0
30
+ - @tridion-docs/extensions@2.1.0
10
31
 
11
32
  - updated check for version number. build improvements.
12
33
  - Updated dependencies
13
34
 
14
- - @tridion-docs/extensions@2.0.3
35
+ - @tridion-docs/extensions@2.0.3
15
36
 
16
37
  - Added TranslationJobs view to the list of views where extensions are possible
17
38
  - Updated dependencies
18
39
 
19
- - @tridion-docs/extensions@2.0.2
40
+ - @tridion-docs/extensions@2.0.2
20
41
 
21
42
  - added longLabel as optional property for action buttons
22
43
  - Updated dependencies
23
- - @tridion-docs/extensions@2.0.1
44
+ - @tridion-docs/extensions@2.0.1
24
45
 
25
46
  ## 2.0.0
26
47
 
@@ -28,37 +49,37 @@
28
49
 
29
50
  - Updated dependencies
30
51
 
31
- - @tridion-docs/extensions@2.0.0
52
+ - @tridion-docs/extensions@2.0.0
32
53
 
33
54
  - Added zIndex property to an useItemSelector hook
34
55
  - Updated dependencies
35
56
 
36
- - @tridion-docs/extensions@1.0.10
57
+ - @tridion-docs/extensions@1.0.10
37
58
 
38
59
  - Updated package dependencies
39
60
  - Updated dependencies
40
61
 
41
- - @tridion-docs/extensions@1.0.9
62
+ - @tridion-docs/extensions@1.0.9
42
63
 
43
64
  - Fixed export for ItemSelectorObjectType and PublicationObjectType
44
65
  - Updated dependencies
45
66
 
46
- - @tridion-docs/extensions@1.0.7
67
+ - @tridion-docs/extensions@1.0.7
47
68
 
48
69
  - Added support for Publication Hub
49
70
  - Updated dependencies
50
71
 
51
- - @tridion-docs/extensions@1.0.6
72
+ - @tridion-docs/extensions@1.0.6
52
73
 
53
74
  - Updated dependencies
54
- - @tridion-docs/extensions@1.0.5
75
+ - @tridion-docs/extensions@1.0.5
55
76
 
56
77
  ## 1.0.4
57
78
 
58
79
  ### Patch Changes
59
80
 
60
81
  - Updated dependencies
61
- - @tridion-docs/extensions@1.0.4
82
+ - @tridion-docs/extensions@1.0.4
62
83
 
63
84
  ## 1.0.3
64
85
 
@@ -69,4 +90,4 @@
69
90
  ### Patch Changes
70
91
 
71
92
  - Updated dependencies
72
- - @tridion-docs/extensions@1.0.3
93
+ - @tridion-docs/extensions@1.0.3
package/LICENSE.md CHANGED
@@ -1,2 +1,2 @@
1
1
  License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
2
- Copyright © 2024 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
2
+ Copyright © 2026 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
package/README.md CHANGED
@@ -5,17 +5,17 @@ Extensions CLI is a command-line application that helps you to create/pack your
5
5
  # License
6
6
  License: https://www.rws.com/legal/terms-and-conditions/rws-technology/
7
7
 
8
- Copyright © 2024 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
8
+ Copyright © 2026 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
9
9
 
10
10
  # Compatibility
11
11
 
12
- This version of the package is compatible with Tridion Docs 15.2
12
+ This version of the package is compatible with Tridion Docs 15.2 and 15.3
13
13
 
14
14
  # Documentation
15
15
 
16
16
  ## Getting Started
17
17
 
18
- **Note:** Using this CLI assumes you have Node.js 18 installed. If you do not, you can [install it here](https://nodejs.org/en/download/).
18
+ **Note:** Using this CLI assumes you have Node.js 24 installed. If you do not, you can [install it here](https://nodejs.org/en/download/).
19
19
 
20
20
  ### Create new addon project
21
21
  Creates new addon and extension project with default server configuration and generated components.
@@ -1,45 +1,43 @@
1
- import react from "eslint-plugin-react";
1
+ import eslintReact from "@eslint-react/eslint-plugin";
2
2
  import prettier from "eslint-plugin-prettier";
3
-
4
3
  import typescriptEslint from "@typescript-eslint/eslint-plugin";
5
4
  import globals from "globals";
6
5
  import tsParser from "@typescript-eslint/parser";
7
6
 
8
- export default [{
9
- ignores: ["**/node_modules", "**/*.js", "**/*.jsx", "**/*.json", "**/*.d.ts"],
10
- }, {
11
- files: ['**/*.{tsx,ts}'],
12
- plugins: {
13
- react,
14
- prettier,
15
- "@typescript-eslint": typescriptEslint,
7
+ export default [
8
+ {
9
+ ignores: ["**/node_modules", "**/*.js", "**/*.jsx", "**/*.json", "**/*.d.ts"],
16
10
  },
17
-
18
- languageOptions: {
19
- globals: {
20
- ...globals.browser,
11
+ {
12
+ files: ['**/*.{tsx,ts}'],
13
+ ...eslintReact.configs["recommended-typescript"],
14
+ plugins: {
15
+ ...eslintReact.configs["recommended-typescript"].plugins,
16
+ prettier,
17
+ "@typescript-eslint": typescriptEslint,
21
18
  },
22
19
 
23
- parser: tsParser,
24
- ecmaVersion: 5,
25
- sourceType: "script",
20
+ languageOptions: {
21
+ globals: {
22
+ ...globals.browser,
23
+ },
26
24
 
27
- parserOptions: {
28
- project: ["tsconfig.json"],
29
- },
30
- },
25
+ parser: tsParser,
26
+ ecmaVersion: 5,
27
+ sourceType: "script",
31
28
 
32
- settings: {
33
- react: {
34
- version: "detect",
29
+ parserOptions: {
30
+ project: ["tsconfig.json"],
31
+ },
35
32
  },
36
- },
37
33
 
38
- rules: {
39
- "import/no-default-export": "off",
40
- "class-methods-use-this": "off",
41
- "@typescript-eslint/no-unsafe-call": "off",
42
- "@typescript-eslint/no-unused-vars": "off",
43
- "@typescript-eslint/no-floating-promises": "off",
44
- },
45
- }];
34
+ rules: {
35
+ ...eslintReact.configs["recommended-typescript"].rules,
36
+ "import/no-default-export": "off",
37
+ "class-methods-use-this": "off",
38
+ "@typescript-eslint/no-unsafe-call": "off",
39
+ "@typescript-eslint/no-unused-vars": "off",
40
+ "@typescript-eslint/no-floating-promises": "off",
41
+ },
42
+ }
43
+ ];
@@ -21,40 +21,39 @@
21
21
  "react-dom": "18.3.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@babel/core": "7.26.9",
25
- "@babel/plugin-transform-runtime": "7.26.9",
26
- "@babel/preset-env": "7.26.9",
27
- "@babel/preset-react": "7.26.3",
28
- "@babel/preset-typescript": "7.26.0",
29
- "@babel/runtime": "7.26.9",
30
- "@eslint/compat": "^1.2.6",
31
- "@eslint/eslintrc": "^3.2.0",
32
- "@eslint/js": "^9.20.0",
24
+ "@babel/core": "7.29.0",
25
+ "@babel/plugin-transform-runtime": "7.29.0",
26
+ "@babel/preset-env": "7.29.0",
27
+ "@babel/preset-react": "7.28.5",
28
+ "@babel/preset-typescript": "7.28.5",
29
+ "@babel/runtime": "7.28.6",
30
+ "@eslint/compat": "2.0.2",
31
+ "@eslint/eslintrc": "3.3.3",
32
+ "@eslint/js": "10.0.1",
33
+ "@eslint-react/eslint-plugin": "2.13.0",
33
34
  "@tridion-docs/extensions-cli": "{{extensionsCliVersion}}",
34
- "@types/react": "18.3.12",
35
- "@types/react-dom": "18.3.1",
36
- "@typescript-eslint/eslint-plugin": "8.24.1",
37
- "@typescript-eslint/parser": "8.24.1",
38
- "autoprefixer": "10.4.20",
39
- "babel-loader": "9.2.1",
35
+ "@types/react": "18.3.27",
36
+ "@types/react-dom": "18.3.7",
37
+ "@typescript-eslint/eslint-plugin": "8.56.0",
38
+ "@typescript-eslint/parser": "8.56.0",
39
+ "autoprefixer": "10.4.24",
40
+ "babel-loader": "10.0.0",
40
41
  "babel-plugin-styled-components": "2.1.4",
41
- "css-loader": "7.1.2",
42
- "cssnano": "7.0.6",
43
- "eslint": "9.20.1",
44
- "eslint-config-prettier": "10.0.1",
45
- "eslint-formatter-pretty": "6.0.1",
46
- "eslint-plugin-prettier": "5.2.3",
47
- "eslint-plugin-react": "7.37.4",
48
- "eslint-plugin-react-hooks": "5.1.0",
49
- "fork-ts-checker-webpack-plugin": "9.0.2",
50
- "globals": "^15.15.0",
51
- "mini-css-extract-plugin": "2.9.2",
52
- "postcss": "8.5.2",
53
- "postcss-loader": "8.1.1",
54
- "prettier": "3.5.1",
55
- "typescript": "5.7.3",
56
- "webpack": "5.98.0",
42
+ "css-loader": "7.1.4",
43
+ "cssnano": "7.1.2",
44
+ "eslint": "10.0.0",
45
+ "eslint-config-prettier": "10.1.8",
46
+ "eslint-formatter-pretty": "7.0.0",
47
+ "eslint-plugin-prettier": "5.5.5",
48
+ "fork-ts-checker-webpack-plugin": "9.1.0",
49
+ "globals": "^17.3.0",
50
+ "mini-css-extract-plugin": "2.10.0",
51
+ "postcss": "8.5.6",
52
+ "postcss-loader": "8.2.1",
53
+ "prettier": "3.8.1",
54
+ "typescript": "5.9.3",
55
+ "webpack": "5.105.2",
57
56
  "webpack-cli": "6.0.1",
58
- "webpack-dev-server": "5.2.0"
57
+ "webpack-dev-server": "5.2.3"
59
58
  }
60
- }
59
+ }
package/dist/cli.js CHANGED
@@ -7,8 +7,11 @@ import { resolve, dirname, basename } from 'node:path';
7
7
  import Handlebars from 'handlebars';
8
8
  import { fileURLToPath } from 'node:url';
9
9
  import { r as readJsonFile, A as AddonManifest } from './addonManifest-tFdjtMXO.js';
10
- import inquirer from 'inquirer';
10
+ import input from '@inquirer/input';
11
+ import confirm from '@inquirer/confirm';
11
12
  import isValidFilename from 'valid-filename';
13
+ import checkbox, { Separator } from '@inquirer/checkbox';
14
+ import select from '@inquirer/select';
12
15
  import * as tridionDocsExtensions from '@tridion-docs/extensions';
13
16
  import archiver from 'archiver';
14
17
 
@@ -150,58 +153,42 @@ const extensionNameValidation = (input) => {
150
153
  };
151
154
 
152
155
  const createAddonPrompt = async () => {
153
- return inquirer.prompt([
154
- {
155
- type: 'input',
156
- name: 'addonId',
156
+ return {
157
+ addonId: await input({
157
158
  message: 'Provide id of the addon:',
158
159
  default: 'my-addon',
159
160
  validate: idValidation,
160
- },
161
- {
162
- type: 'input',
163
- name: 'addonName',
161
+ }),
162
+ addonName: await input({
164
163
  message: 'Provide name of the addon:',
165
164
  default: 'My addon',
166
- },
167
- {
168
- type: 'input',
169
- name: 'addonDescription',
165
+ }),
166
+ addonDescription: await input({
170
167
  message: 'Provide description of the addon:',
171
168
  default: 'My addon for Tridion Docs Organize Space',
172
- },
173
- {
174
- type: 'input',
175
- name: 'author',
169
+ }),
170
+ author: await input({
176
171
  message: `Provide author's name:`,
177
172
  default: 'RWS',
178
- },
179
- {
180
- type: 'input',
181
- name: 'extensionName',
173
+ }),
174
+ extensionName: await input({
182
175
  message: 'Provide the name of the frontend extension:',
183
176
  default: 'my-extension',
184
177
  validate: extensionNameValidation,
185
- },
186
- {
187
- type: 'input',
188
- name: 'extensionDescription',
178
+ }),
179
+ extensionDescription: await input({
189
180
  message: 'Provide description of the extension:',
190
181
  default: 'My first extension',
191
- },
192
- {
193
- type: 'confirm',
194
- name: 'extensionAssemblyIncluded',
182
+ }),
183
+ extensionAssemblyIncluded: await confirm({
195
184
  message: 'Are you going to provide backend assembly?',
196
185
  default: false,
197
- },
198
- {
199
- type: 'input',
200
- name: 'url',
201
- message: `Provide the url to Tridion Docs:`,
186
+ }),
187
+ url: await input({
188
+ message: 'Provide the url to Tridion Docs:',
202
189
  validate: urlValidation,
203
- },
204
- ]);
190
+ }),
191
+ };
205
192
  };
206
193
 
207
194
  const createAddonRootFolder = ({ path, addonDescription, addonId, addonName, author, extensionName, extensionAssemblyIncluded, }) => {
@@ -255,14 +242,12 @@ const configureHandlebars = () => {
255
242
  });
256
243
  };
257
244
 
258
- const createExtensionPointsPrompt = () => {
259
- return inquirer.prompt([
260
- {
261
- type: 'checkbox',
262
- name: 'extensionPoints',
245
+ const createExtensionPointsPrompt = async () => {
246
+ return {
247
+ extensionPoints: await checkbox({
263
248
  message: 'Extensions to add:',
264
249
  choices: [
265
- new inquirer.Separator('----- Header extensions -----'),
250
+ new Separator('----- Header extensions -----'),
266
251
  {
267
252
  name: 'Main navigation item - Custom page on a separate route',
268
253
  value: 'mainNavigation',
@@ -273,21 +258,21 @@ const createExtensionPointsPrompt = () => {
273
258
  value: 'mainNavigationLink',
274
259
  short: 'Main navigation link',
275
260
  },
276
- new inquirer.Separator('----- Action extensions -----'),
261
+ new Separator('----- Action extensions -----'),
277
262
  {
278
263
  name: 'Explorer action - Custom explorer action',
279
264
  value: 'explorerAction',
280
265
  short: 'Explorer action',
281
266
  },
282
- new inquirer.Separator('----- Object Insight extensions -----'),
267
+ new Separator('----- Object Insight extensions -----'),
283
268
  {
284
269
  name: 'Object insight item - Custom object insight item',
285
270
  value: 'objectInsightItem',
286
271
  short: 'Object insight item',
287
272
  },
288
273
  ],
289
- },
290
- ]);
274
+ }),
275
+ };
291
276
  };
292
277
 
293
278
  const importLookupPattern = "import packageJson from '../package.json';";
@@ -303,39 +288,29 @@ const addExtensionPointToBuilder = ({ builderFilePath, templatePath, templatePar
303
288
  writeFileSync(builderFilePath, newIndexFileContent, { flag: 'r+' });
304
289
  };
305
290
 
306
- const createExplorerActionPrompt = () => {
307
- return inquirer.prompt([
308
- {
309
- type: 'input',
310
- name: 'id',
291
+ const createExplorerActionPrompt = async () => {
292
+ return {
293
+ id: await input({
311
294
  message: 'Explorer action id:',
312
295
  validate: idValidation,
313
- },
314
- {
315
- type: 'input',
316
- name: 'title',
296
+ }),
297
+ title: await input({
317
298
  message: 'Explorer action title:',
318
- },
319
- {
320
- type: 'input',
321
- name: 'tooltip',
299
+ }),
300
+ tooltip: await input({
322
301
  message: 'Explorer action tooltip:',
323
- },
324
- {
325
- type: 'input',
326
- name: 'iconComponentName',
302
+ }),
303
+ iconComponentName: await input({
327
304
  message: 'Icon component name:',
328
305
  default: 'CustomIcon',
329
306
  validate: componentNameValidation,
330
- },
331
- {
332
- type: 'input',
333
- name: 'hookName',
307
+ }),
308
+ hookName: await input({
334
309
  message: 'Hook name:',
335
310
  default: 'useCustomHook',
336
311
  validate: hookNameValidation,
337
- },
338
- ]);
312
+ }),
313
+ };
339
314
  };
340
315
 
341
316
  const createExplorerAction = async (extensionFolderPath) => {
@@ -377,46 +352,34 @@ const createExplorerAction = async (extensionFolderPath) => {
377
352
  };
378
353
 
379
354
  const { NavigationItemIdType } = tridionDocsExtensions;
380
- const createMainNavigationPrompt = () => {
381
- return inquirer.prompt([
382
- {
383
- type: 'input',
384
- name: 'id',
355
+ const createMainNavigationPrompt = async () => {
356
+ return {
357
+ id: await input({
385
358
  message: 'Navigation item id:',
386
359
  validate: idValidation,
387
- },
388
- {
389
- type: 'input',
390
- name: 'title',
360
+ }),
361
+ title: await input({
391
362
  message: 'Navigation item title:',
392
- },
393
- {
394
- type: 'input',
395
- name: 'path',
363
+ }),
364
+ path: await input({
396
365
  message: 'Please provide route to use for your custom page:',
397
366
  validate: pathValidation,
398
- },
399
- {
400
- type: 'input',
401
- name: 'position',
367
+ }),
368
+ position: await input({
402
369
  message: 'Please provide to which menu item navigation item should be bound:',
403
370
  default: NavigationItemIdType.settings,
404
- },
405
- {
406
- type: 'list',
407
- name: 'positioningType',
371
+ }),
372
+ positioningType: await select({
408
373
  message: 'Please choose how navigation item relates to bounded one:',
409
374
  default: 'after',
410
375
  choices: ['after', 'before'],
411
- },
412
- {
413
- type: 'input',
414
- name: 'componentName',
376
+ }),
377
+ componentName: await input({
415
378
  message: 'React component name:',
416
379
  default: 'CustomPage',
417
380
  validate: componentNameValidation,
418
- },
419
- ]);
381
+ }),
382
+ };
420
383
  };
421
384
 
422
385
  const createMainNavigation = async (extensionFolderPath) => {
@@ -453,60 +416,55 @@ const createMainNavigation = async (extensionFolderPath) => {
453
416
  });
454
417
  };
455
418
 
456
- const createMainNavigationLinkPrompt = () => {
457
- return inquirer.prompt([
458
- {
459
- type: 'input',
460
- name: 'id',
461
- message: 'Navigation link id:',
462
- validate: idValidation,
463
- },
464
- {
465
- type: 'input',
466
- name: 'title',
467
- message: 'Navigation link title:',
468
- },
469
- {
470
- type: 'input',
471
- name: 'tooltip',
472
- message: 'Navigation link tooltip:',
473
- },
474
- {
475
- type: 'confirm',
476
- name: 'hasIcon',
477
- message: 'Are you going to use icon for navigation link?',
478
- default: true,
479
- },
480
- {
481
- type: 'input',
482
- name: 'iconComponentName',
419
+ const createMainNavigationLinkPrompt = async () => {
420
+ const id = await input({
421
+ message: 'Navigation link id:',
422
+ validate: idValidation,
423
+ });
424
+ const title = await input({
425
+ message: 'Navigation link title:',
426
+ });
427
+ const tooltip = await input({
428
+ message: 'Navigation link tooltip:',
429
+ });
430
+ const hasIcon = await confirm({
431
+ message: 'Are you going to use icon for navigation link?',
432
+ default: true,
433
+ });
434
+ const iconComponentName = hasIcon
435
+ ? await input({
483
436
  message: 'Icon component name:',
484
437
  default: 'CustomIcon',
485
438
  validate: componentNameValidation,
486
- when: answers => answers.hasIcon,
487
- },
488
- {
489
- type: 'confirm',
490
- name: 'hasExternalLink',
491
- message: 'Are you going to use a link to external page?',
492
- default: true,
493
- },
494
- {
495
- type: 'input',
496
- name: 'url',
439
+ })
440
+ : '';
441
+ const hasExternalLink = await confirm({
442
+ message: 'Are you going to use a link to external page?',
443
+ default: true,
444
+ });
445
+ const url = hasExternalLink
446
+ ? await input({
497
447
  message: 'Provide link to external page:',
498
- when: answers => answers.hasExternalLink,
499
448
  validate: urlValidation,
500
- },
501
- {
502
- type: 'input',
503
- name: 'componentName',
449
+ })
450
+ : '';
451
+ const componentName = !hasExternalLink
452
+ ? await input({
504
453
  message: 'React component name:',
505
454
  default: 'CustomPage',
506
455
  validate: componentNameValidation,
507
- when: answers => !answers.hasExternalLink,
508
- },
509
- ]);
456
+ })
457
+ : '';
458
+ return {
459
+ id,
460
+ title,
461
+ tooltip,
462
+ hasIcon,
463
+ iconComponentName,
464
+ hasExternalLink,
465
+ url,
466
+ componentName,
467
+ };
510
468
  };
511
469
 
512
470
  const createMainNavigationLink = async (extensionFolderPath) => {
@@ -554,34 +512,26 @@ const createMainNavigationLink = async (extensionFolderPath) => {
554
512
  });
555
513
  };
556
514
 
557
- const createObjectInsightItemPrompt = () => {
558
- return inquirer.prompt([
559
- {
560
- type: 'input',
561
- name: 'id',
515
+ const createObjectInsightItemPrompt = async () => {
516
+ return {
517
+ id: await input({
562
518
  message: 'Object insight item id:',
563
519
  validate: idValidation,
564
- },
565
- {
566
- type: 'input',
567
- name: 'tooltip',
520
+ }),
521
+ tooltip: await input({
568
522
  message: 'Object insight item tooltip:',
569
- },
570
- {
571
- type: 'input',
572
- name: 'iconComponentName',
523
+ }),
524
+ iconComponentName: await input({
573
525
  message: 'Icon component name:',
574
526
  default: 'CustomIcon',
575
527
  validate: componentNameValidation,
576
- },
577
- {
578
- type: 'input',
579
- name: 'componentName',
528
+ }),
529
+ componentName: await input({
580
530
  message: 'Component name:',
581
531
  default: 'CustomComponent',
582
532
  validate: componentNameValidation,
583
- },
584
- ]);
533
+ }),
534
+ };
585
535
  };
586
536
 
587
537
  const createObjectInsightItem = async (extensionFolderPath) => {
@@ -9,12 +9,12 @@ export interface CreateAddonAnswers {
9
9
  extensionAssemblyIncluded: boolean;
10
10
  }
11
11
  export declare const createAddonPrompt: () => Promise<{
12
- url: string;
13
12
  addonId: string;
14
13
  addonName: string;
15
14
  addonDescription: string;
16
- extensionName: string;
17
15
  author: string;
16
+ extensionName: string;
18
17
  extensionDescription: string;
19
18
  extensionAssemblyIncluded: boolean;
19
+ url: string;
20
20
  }>;
@@ -2,10 +2,4 @@ export type ExtensionPoint = 'mainNavigation' | 'mainNavigationLink' | 'explorer
2
2
  export interface CreateExtensionPointsAnswers {
3
3
  extensionPoints: ExtensionPoint[];
4
4
  }
5
- export declare const createExtensionPointsPrompt: () => Promise<{
6
- extensionPoints: ExtensionPoint[];
7
- }> & {
8
- ui: import("inquirer/dist/commonjs/ui/prompt").default<{
9
- extensionPoints: ExtensionPoint[];
10
- }>;
11
- };
5
+ export declare const createExtensionPointsPrompt: () => Promise<CreateExtensionPointsAnswers>;
@@ -5,18 +5,4 @@ export interface CreateExplorerActionAnswers {
5
5
  iconComponentName: string;
6
6
  hookName: string;
7
7
  }
8
- export declare const createExplorerActionPrompt: () => Promise<{
9
- id: string;
10
- title: string;
11
- tooltip: string;
12
- iconComponentName: string;
13
- hookName: string;
14
- }> & {
15
- ui: import("inquirer/dist/commonjs/ui/prompt").default<{
16
- id: string;
17
- title: string;
18
- tooltip: string;
19
- iconComponentName: string;
20
- hookName: string;
21
- }>;
22
- };
8
+ export declare const createExplorerActionPrompt: () => Promise<CreateExplorerActionAnswers>;
@@ -6,20 +6,4 @@ export interface CreateMainNavigationAnswers {
6
6
  positioningType: string;
7
7
  componentName: string;
8
8
  }
9
- export declare const createMainNavigationPrompt: () => Promise<{
10
- id: string;
11
- title: string;
12
- path: string;
13
- position: string;
14
- positioningType: string;
15
- componentName: string;
16
- }> & {
17
- ui: import("inquirer/dist/commonjs/ui/prompt").default<{
18
- id: string;
19
- title: string;
20
- path: string;
21
- position: string;
22
- positioningType: string;
23
- componentName: string;
24
- }>;
25
- };
9
+ export declare const createMainNavigationPrompt: () => Promise<CreateMainNavigationAnswers>;
@@ -8,24 +8,4 @@ export interface CreateMainNavigationLinkAnswers {
8
8
  url: string;
9
9
  componentName: string;
10
10
  }
11
- export declare const createMainNavigationLinkPrompt: () => Promise<{
12
- id: string;
13
- title: string;
14
- tooltip: string;
15
- hasIcon: boolean;
16
- iconComponentName: string;
17
- hasExternalLink: boolean;
18
- url: string;
19
- componentName: string;
20
- }> & {
21
- ui: import("inquirer/dist/commonjs/ui/prompt").default<{
22
- id: string;
23
- title: string;
24
- tooltip: string;
25
- hasIcon: boolean;
26
- iconComponentName: string;
27
- hasExternalLink: boolean;
28
- url: string;
29
- componentName: string;
30
- }>;
31
- };
11
+ export declare const createMainNavigationLinkPrompt: () => Promise<CreateMainNavigationLinkAnswers>;
@@ -4,16 +4,4 @@ export interface CreateObjectInsightItemAnswers {
4
4
  iconComponentName: string;
5
5
  componentName: string;
6
6
  }
7
- export declare const createObjectInsightItemPrompt: () => Promise<{
8
- id: string;
9
- tooltip: string;
10
- iconComponentName: string;
11
- componentName: string;
12
- }> & {
13
- ui: import("inquirer/dist/commonjs/ui/prompt").default<{
14
- id: string;
15
- tooltip: string;
16
- iconComponentName: string;
17
- componentName: string;
18
- }>;
19
- };
7
+ export declare const createObjectInsightItemPrompt: () => Promise<CreateObjectInsightItemAnswers>;
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve, basename } from 'node:path';
3
3
  import { w as writeJsonFile, r as readJsonFile, A as AddonManifest } from './addonManifest-tFdjtMXO.js';
4
+ import { ExtensionType } from '@tridion-docs/extensions';
4
5
  import 'node:fs';
5
6
 
6
7
  class AddonConfiguration {
@@ -57,13 +58,16 @@ const getLocalFrontendAddon = ({ manifestPath, addonConfigPath }) => {
57
58
  const localExtensions = manifest.getFrontendExtensions();
58
59
  localExtensions.forEach(extension => {
59
60
  var _a;
60
- localAddon.configuration[extension.name] = (addonConfiguration === null || addonConfiguration === void 0 ? void 0 : addonConfiguration.configPerExtension[extension.name]) || {};
61
- const extensionFiles = extension.files.map(filePath => `${extensionsRequestBasePath}/${extension.name}/${filePath}?hash=${Date.now()}`);
62
- (_a = localAddon.extensions) === null || _a === void 0 ? void 0 : _a.push({
63
- $type: 'OrganizeSpaceExtension',
64
- name: extension.name,
65
- contents: extensionFiles,
66
- });
61
+ if (extension.name && extension.type === ExtensionType.OrganizeSpace) {
62
+ localAddon.configuration[extension.name] = (addonConfiguration === null || addonConfiguration === void 0 ? void 0 : addonConfiguration.configPerExtension[extension.name]) || {};
63
+ const extensionFiles = extension.files.map(filePath => `${extensionsRequestBasePath}/${extension.name}/${filePath}?hash=${Date.now()}`);
64
+ (_a = localAddon.extensions) === null || _a === void 0 ? void 0 : _a.push({
65
+ $type: 'OrganizeSpaceExtension',
66
+ name: extension.name,
67
+ contents: extensionFiles,
68
+ type: 'OrganizeSpaceExtension',
69
+ });
70
+ }
67
71
  });
68
72
  return localAddon;
69
73
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tridion-docs/extensions-cli",
3
- "version": "2.1.0",
3
+ "version": "2.1.3",
4
4
  "description": "CLI to develop, build and package extensions for Tridion Docs Organize Space",
5
5
  "author": "RWS Group for and on behalf of its affiliates and subsidiaries",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -23,37 +23,41 @@
23
23
  "clean": "rimraf dist",
24
24
  "build": "rollup -c",
25
25
  "release": "rollup -c",
26
- "lint": "eslint . --fix && prettier --write \"src/**/*\"",
26
+ "lint": "biome lint . --write",
27
27
  "prepublish": "yarn build",
28
28
  "test": "docs-extensions"
29
29
  },
30
30
  "dependencies": {
31
- "@tridion-docs/extensions": "2.1.0",
31
+ "@inquirer/checkbox": "5.0.7",
32
+ "@inquirer/confirm": "6.0.7",
33
+ "@inquirer/input": "5.0.7",
34
+ "@inquirer/select": "5.0.7",
35
+ "@tridion-docs/extensions": "2.1.3",
32
36
  "archiver": "7.0.1",
33
- "chalk": "5.4.1",
34
- "commander": "13.1.0",
37
+ "chalk": "5.6.2",
38
+ "commander": "14.0.3",
35
39
  "cross-spawn": "7.0.6",
36
- "decamelize": "6.0.0",
37
- "fs-extra": "11.3.0",
38
- "handlebars": "4.7.8",
39
- "inquirer": "12.4.2",
40
+ "decamelize": "6.0.1",
41
+ "fs-extra": "11.3.3",
42
+ "handlebars": "4.7.9",
40
43
  "valid-filename": "4.0.0"
41
44
  },
42
45
  "devDependencies": {
43
- "@rollup/plugin-commonjs": "28.0.2",
44
- "@rollup/plugin-node-resolve": "16.0.0",
45
- "@rollup/plugin-typescript": "12.1.2",
46
- "@types/archiver": "6.0.3",
47
- "@types/compression": "1.7.5",
46
+ "@biomejs/biome": "2.4.3",
47
+ "@rollup/plugin-commonjs": "29.0.0",
48
+ "@rollup/plugin-node-resolve": "16.0.3",
49
+ "@rollup/plugin-typescript": "12.3.0",
50
+ "@types/archiver": "7.0.0",
51
+ "@types/compression": "1.8.1",
48
52
  "@types/cross-spawn": "6.0.6",
49
53
  "@types/fs-extra": "11.0.4",
50
- "@types/node": "22.13.4",
54
+ "@types/node": "24.10.13",
51
55
  "@web/rollup-plugin-copy": "0.5.1",
52
- "rimraf": "6.0.1",
53
- "rollup": "4.34.8",
54
- "rollup-plugin-delete": "2.1.0",
55
- "rollup-plugin-node-externals": "8.0.0",
56
- "typescript": "5.7.3",
57
- "typescript-transform-paths": "3.5.3"
56
+ "rimraf": "6.1.3",
57
+ "rollup": "4.57.1",
58
+ "rollup-plugin-delete": "3.0.2",
59
+ "rollup-plugin-node-externals": "8.1.2",
60
+ "typescript": "5.9.3",
61
+ "typescript-transform-paths": "3.5.6"
58
62
  }
59
63
  }