@tridion-docs/extensions-cli 1.0.4 → 2.1.0

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,19 +1,72 @@
1
1
  # @tridion-docs/extensions-cli
2
2
 
3
+ ## 2.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Updated dependencies
8
+
9
+ - @tridion-docs/extensions@2.1.0
10
+
11
+ - updated check for version number. build improvements.
12
+ - Updated dependencies
13
+
14
+ - @tridion-docs/extensions@2.0.3
15
+
16
+ - Added TranslationJobs view to the list of views where extensions are possible
17
+ - Updated dependencies
18
+
19
+ - @tridion-docs/extensions@2.0.2
20
+
21
+ - added longLabel as optional property for action buttons
22
+ - Updated dependencies
23
+ - @tridion-docs/extensions@2.0.1
24
+
25
+ ## 2.0.0
26
+
27
+ ### Major Changes
28
+
29
+ - Updated dependencies
30
+
31
+ - @tridion-docs/extensions@2.0.0
32
+
33
+ - Added zIndex property to an useItemSelector hook
34
+ - Updated dependencies
35
+
36
+ - @tridion-docs/extensions@1.0.10
37
+
38
+ - Updated package dependencies
39
+ - Updated dependencies
40
+
41
+ - @tridion-docs/extensions@1.0.9
42
+
43
+ - Fixed export for ItemSelectorObjectType and PublicationObjectType
44
+ - Updated dependencies
45
+
46
+ - @tridion-docs/extensions@1.0.7
47
+
48
+ - Added support for Publication Hub
49
+ - Updated dependencies
50
+
51
+ - @tridion-docs/extensions@1.0.6
52
+
53
+ - Updated dependencies
54
+ - @tridion-docs/extensions@1.0.5
55
+
3
56
  ## 1.0.4
4
57
 
5
58
  ### Patch Changes
6
59
 
7
- - Updated dependencies
8
- - @tridion-docs/extensions@1.0.4
60
+ - Updated dependencies
61
+ - @tridion-docs/extensions@1.0.4
9
62
 
10
63
  ## 1.0.3
11
64
 
12
65
  ### Major Changes
13
66
 
14
- - Tridion Docs extensions for Organize Space
67
+ - Tridion Docs extensions for Organize Space
15
68
 
16
69
  ### Patch Changes
17
70
 
18
- - Updated dependencies
19
- - @tridion-docs/extensions@1.0.3
71
+ - Updated dependencies
72
+ - @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 (c) 2014-2023. All Rights Reserved by RWS Group for and on behalf of its affiliates and subsidiaries.
2
+ Copyright © 2024 RWS Holdings plc including its subsidiaries and affiliated companies. All rights reserved.
package/README.md CHANGED
@@ -5,11 +5,11 @@ 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 (c) 2014-2023. All Rights Reserved by RWS Group for and on behalf of its affiliates and subsidiaries.
8
+ Copyright © 2024 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.0
12
+ This version of the package is compatible with Tridion Docs 15.2
13
13
 
14
14
  # Documentation
15
15
 
@@ -80,10 +80,10 @@ const Container = styled.div`
80
80
  │ ├── theme // colors and spacing examples
81
81
  │ ├── .browserslistrc
82
82
  │ ├── .editorconfig
83
- │ ├── .eslintrc.json
84
83
  │ ├── .gitignore
85
84
  │ ├── .prettierrc
86
85
  │ ├── babel.config.js
86
+ │ ├── eslint.config.mjs
87
87
  │ ├── devServer.js // local dev server configuration
88
88
  │ ├── package.json
89
89
  │ ├── tsconfig.json
@@ -0,0 +1,45 @@
1
+ import react from "eslint-plugin-react";
2
+ import prettier from "eslint-plugin-prettier";
3
+
4
+ import typescriptEslint from "@typescript-eslint/eslint-plugin";
5
+ import globals from "globals";
6
+ import tsParser from "@typescript-eslint/parser";
7
+
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,
16
+ },
17
+
18
+ languageOptions: {
19
+ globals: {
20
+ ...globals.browser,
21
+ },
22
+
23
+ parser: tsParser,
24
+ ecmaVersion: 5,
25
+ sourceType: "script",
26
+
27
+ parserOptions: {
28
+ project: ["tsconfig.json"],
29
+ },
30
+ },
31
+
32
+ settings: {
33
+ react: {
34
+ version: "detect",
35
+ },
36
+ },
37
+
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
+ }];
@@ -17,39 +17,44 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "@tridion-docs/extensions": "{{extensionsApiVersion}}",
20
- "react": "18.2.0",
21
- "react-dom": "18.2.0"
20
+ "react": "18.3.1",
21
+ "react-dom": "18.3.1"
22
22
  },
23
23
  "devDependencies": {
24
- "@babel/core": "7.21.3",
25
- "@babel/plugin-transform-runtime": "7.21.0",
26
- "@babel/preset-env": "7.20.2",
27
- "@babel/preset-react": "7.18.6",
28
- "@babel/preset-typescript": "7.21.0",
29
- "@babel/runtime": "7.21.0",
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",
30
33
  "@tridion-docs/extensions-cli": "{{extensionsCliVersion}}",
31
- "@types/react": "18.0.31",
32
- "@types/react-dom": "18.0.11",
33
- "@typescript-eslint/eslint-plugin": "5.57.0",
34
- "@typescript-eslint/parser": "5.57.0",
35
- "autoprefixer": "10.4.14",
36
- "babel-loader": "9.1.2",
37
- "babel-plugin-styled-components": "2.0.7",
38
- "css-loader": "6.7.3",
39
- "cssnano": "5.1.15",
40
- "eslint": "8.37.0",
41
- "eslint-config-prettier": "8.8.0",
42
- "eslint-formatter-pretty": "4.1.0",
43
- "eslint-plugin-react": "7.32.2",
44
- "eslint-plugin-react-hooks": "4.6.0",
45
- "fork-ts-checker-webpack-plugin": "7.3.0",
46
- "mini-css-extract-plugin": "2.7.5",
47
- "postcss": "8.4.21",
48
- "postcss-loader": "7.1.0",
49
- "prettier": "2.8.7",
50
- "typescript": "5.0.2",
51
- "webpack": "5.75.0",
52
- "webpack-cli": "5.0.1",
53
- "webpack-dev-server": "4.13.1"
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",
40
+ "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",
57
+ "webpack-cli": "6.0.1",
58
+ "webpack-dev-server": "5.2.0"
54
59
  }
55
60
  }
@@ -46,6 +46,7 @@ export default (env) => ({
46
46
  loader: 'css-loader',
47
47
  options: {
48
48
  modules: {
49
+ namedExport: false,
49
50
  localIdentName: '[name]__[local]__[hash:base64]',
50
51
  exportLocalsConvention: 'camelCaseOnly',
51
52
  },
@@ -37,6 +37,7 @@ export default {
37
37
  loader: 'css-loader',
38
38
  options: {
39
39
  modules: {
40
+ namedExport: false,
40
41
  localIdentName: '[name]__[local]__[hash:base64]',
41
42
  exportLocalsConvention: 'camelCaseOnly',
42
43
  },
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import { existsSync, mkdirSync, readFileSync, writeFileSync, createWriteStream }
6
6
  import { resolve, dirname, basename } from 'node:path';
7
7
  import Handlebars from 'handlebars';
8
8
  import { fileURLToPath } from 'node:url';
9
- import { r as readJsonFile, A as AddonManifest } from './addonManifest-abcac368.js';
9
+ import { r as readJsonFile, A as AddonManifest } from './addonManifest-tFdjtMXO.js';
10
10
  import inquirer from 'inquirer';
11
11
  import isValidFilename from 'valid-filename';
12
12
  import * as tridionDocsExtensions from '@tridion-docs/extensions';
@@ -70,7 +70,7 @@ const copyTemplate = ({ addonId, addonRootFolderPath, author, extensionDescripti
70
70
  [
71
71
  '.browserslistrc',
72
72
  '.editorconfig',
73
- '.eslintrc.json',
73
+ 'eslint.config.mjs',
74
74
  '.gitignore',
75
75
  '.prettierrc',
76
76
  'babel.config.js',
@@ -678,14 +678,14 @@ const packCommand = ({ inputFilesPath, outputPath, manifestPath, uiFilesPath, as
678
678
  process.exit(1);
679
679
  });
680
680
  archive.on('error', error => {
681
- console.warn(chalk.red(`We were unable to create a package due to ${error}.`));
681
+ console.warn(chalk.red(`We were unable to create a package due to ${error.data} for ${error.path}.`));
682
682
  process.exit(1);
683
683
  });
684
684
  archive.pipe(stream);
685
685
  archive.file(finalManifestPath, { name: basename(finalManifestPath) });
686
686
  archive.directory(finalUiFilesPath, basename(resolve(finalUiFilesPath)));
687
687
  archive.directory(finalAssemblyFilesPath, basename(resolve(finalAssemblyFilesPath)));
688
- archive.finalize();
688
+ void archive.finalize();
689
689
  };
690
690
 
691
691
  const packageJson = getPackageJson();
@@ -8,4 +8,13 @@ export interface CreateAddonAnswers {
8
8
  extensionDescription: string;
9
9
  extensionAssemblyIncluded: boolean;
10
10
  }
11
- export declare const createAddonPrompt: () => Promise<CreateAddonAnswers>;
11
+ export declare const createAddonPrompt: () => Promise<{
12
+ url: string;
13
+ addonId: string;
14
+ addonName: string;
15
+ addonDescription: string;
16
+ extensionName: string;
17
+ author: string;
18
+ extensionDescription: string;
19
+ extensionAssemblyIncluded: boolean;
20
+ }>;
@@ -1,8 +1,11 @@
1
- import inquirer from 'inquirer';
2
1
  export type ExtensionPoint = 'mainNavigation' | 'mainNavigationLink' | 'explorerAction' | 'objectInsightItem';
3
2
  export interface CreateExtensionPointsAnswers {
4
3
  extensionPoints: ExtensionPoint[];
5
4
  }
6
- export declare const createExtensionPointsPrompt: () => Promise<CreateExtensionPointsAnswers> & {
7
- ui: inquirer.ui.Prompt<CreateExtensionPointsAnswers>;
5
+ export declare const createExtensionPointsPrompt: () => Promise<{
6
+ extensionPoints: ExtensionPoint[];
7
+ }> & {
8
+ ui: import("inquirer/dist/commonjs/ui/prompt").default<{
9
+ extensionPoints: ExtensionPoint[];
10
+ }>;
8
11
  };
@@ -1,4 +1,3 @@
1
- import inquirer from 'inquirer';
2
1
  export interface CreateExplorerActionAnswers {
3
2
  id: string;
4
3
  title: string;
@@ -6,6 +5,18 @@ export interface CreateExplorerActionAnswers {
6
5
  iconComponentName: string;
7
6
  hookName: string;
8
7
  }
9
- export declare const createExplorerActionPrompt: () => Promise<CreateExplorerActionAnswers> & {
10
- ui: inquirer.ui.Prompt<CreateExplorerActionAnswers>;
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
+ }>;
11
22
  };
@@ -1,4 +1,3 @@
1
- import inquirer from 'inquirer';
2
1
  export interface CreateMainNavigationAnswers {
3
2
  id: string;
4
3
  title: string;
@@ -7,6 +6,20 @@ export interface CreateMainNavigationAnswers {
7
6
  positioningType: string;
8
7
  componentName: string;
9
8
  }
10
- export declare const createMainNavigationPrompt: () => Promise<CreateMainNavigationAnswers> & {
11
- ui: inquirer.ui.Prompt<CreateMainNavigationAnswers>;
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
+ }>;
12
25
  };
@@ -1,4 +1,3 @@
1
- import inquirer from 'inquirer';
2
1
  export interface CreateMainNavigationLinkAnswers {
3
2
  id: string;
4
3
  title: string;
@@ -9,6 +8,24 @@ export interface CreateMainNavigationLinkAnswers {
9
8
  url: string;
10
9
  componentName: string;
11
10
  }
12
- export declare const createMainNavigationLinkPrompt: () => Promise<CreateMainNavigationLinkAnswers> & {
13
- ui: inquirer.ui.Prompt<CreateMainNavigationLinkAnswers>;
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
+ }>;
14
31
  };
@@ -1,10 +1,19 @@
1
- import inquirer from 'inquirer';
2
1
  export interface CreateObjectInsightItemAnswers {
3
2
  id: string;
4
3
  tooltip: string;
5
4
  iconComponentName: string;
6
5
  componentName: string;
7
6
  }
8
- export declare const createObjectInsightItemPrompt: () => Promise<CreateObjectInsightItemAnswers> & {
9
- ui: inquirer.ui.Prompt<CreateObjectInsightItemAnswers>;
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
+ }>;
10
19
  };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { resolve, basename } from 'node:path';
3
- import { w as writeJsonFile, r as readJsonFile, A as AddonManifest } from './addonManifest-abcac368.js';
3
+ import { w as writeJsonFile, r as readJsonFile, A as AddonManifest } from './addonManifest-tFdjtMXO.js';
4
4
  import 'node:fs';
5
5
 
6
6
  class AddonConfiguration {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tridion-docs/extensions-cli",
3
- "version": "1.0.4",
3
+ "version": "2.1.0",
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",
@@ -28,33 +28,32 @@
28
28
  "test": "docs-extensions"
29
29
  },
30
30
  "dependencies": {
31
- "@tridion-docs/extensions": "1.0.4",
32
- "archiver": "5.3.1",
33
- "chalk": "5.2.0",
34
- "commander": "9.5.0",
35
- "cross-spawn": "7.0.3",
31
+ "@tridion-docs/extensions": "2.1.0",
32
+ "archiver": "7.0.1",
33
+ "chalk": "5.4.1",
34
+ "commander": "13.1.0",
35
+ "cross-spawn": "7.0.6",
36
36
  "decamelize": "6.0.0",
37
- "fs-extra": "11.1.1",
38
- "handlebars": "4.7.7",
39
- "inquirer": "9.1.5",
37
+ "fs-extra": "11.3.0",
38
+ "handlebars": "4.7.8",
39
+ "inquirer": "12.4.2",
40
40
  "valid-filename": "4.0.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@rollup/plugin-commonjs": "24.0.1",
44
- "@rollup/plugin-node-resolve": "15.0.1",
45
- "@rollup/plugin-typescript": "11.0.0",
46
- "@types/archiver": "5.3.2",
47
- "@types/compression": "1.7.2",
48
- "@types/cross-spawn": "6.0.2",
49
- "@types/fs-extra": "9.0.13",
50
- "@types/inquirer": "9.0.3",
51
- "@types/node": "18.15.11",
52
- "@web/rollup-plugin-copy": "0.3.0",
53
- "rimraf": "3.0.2",
54
- "rollup": "3.20.2",
55
- "rollup-plugin-delete": "2.0.0",
56
- "rollup-plugin-node-externals": "5.1.2",
57
- "typescript": "5.0.2",
58
- "typescript-transform-paths": "3.4.6"
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",
48
+ "@types/cross-spawn": "6.0.6",
49
+ "@types/fs-extra": "11.0.4",
50
+ "@types/node": "22.13.4",
51
+ "@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"
59
58
  }
60
59
  }
@@ -1,33 +0,0 @@
1
- {
2
- "parser": "@typescript-eslint/parser",
3
- "parserOptions": {
4
- "project": ["tsconfig.json"]
5
- },
6
- "ignorePatterns": ["**/node_modules", "**/*.js", "**/*.jsx", "**/*.json", "**/*.d.ts"],
7
- "extends": [
8
- "eslint:recommended",
9
- "plugin:react/recommended",
10
- "plugin:@typescript-eslint/recommended",
11
- "plugin:@typescript-eslint/recommended-requiring-type-checking",
12
- "plugin:react/jsx-runtime",
13
- "plugin:react-hooks/recommended",
14
- "prettier"
15
- ],
16
- "plugins": ["react", "@typescript-eslint"],
17
- "env": {
18
- "es6": true,
19
- "browser": true
20
- },
21
- "settings": {
22
- "react": {
23
- "version": "detect"
24
- }
25
- },
26
- "rules": {
27
- "import/no-default-export": "off",
28
- "class-methods-use-this": "off",
29
- "@typescript-eslint/no-unsafe-call": "off",
30
- "@typescript-eslint/no-unused-vars": "off",
31
- "@typescript-eslint/no-floating-promises": "off"
32
- }
33
- }