@adobe/create-ccweb-add-on 2.5.0 → 3.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.
Files changed (136) hide show
  1. package/.c8rc.json +4 -1
  2. package/.mocharc.json +9 -2
  3. package/README.md +2 -2
  4. package/bin/run.js +2 -2
  5. package/dist/app/AddOnFactory.d.ts +30 -3
  6. package/dist/app/AddOnFactory.d.ts.map +1 -1
  7. package/dist/app/AddOnFactory.js +140 -1
  8. package/dist/app/{AddOnManager.d.ts → PackageManager.d.ts} +4 -4
  9. package/dist/app/PackageManager.d.ts.map +1 -0
  10. package/dist/app/{AddOnManager.js → PackageManager.js} +5 -6
  11. package/dist/app/TemplateSelector.d.ts +20 -4
  12. package/dist/app/TemplateSelector.d.ts.map +1 -1
  13. package/dist/app/TemplateSelector.js +142 -1
  14. package/dist/app/index.d.ts +1 -3
  15. package/dist/app/index.d.ts.map +1 -1
  16. package/dist/app/index.js +1 -3
  17. package/dist/commands/create.d.ts +6 -10
  18. package/dist/commands/create.d.ts.map +1 -1
  19. package/dist/commands/create.js +11 -37
  20. package/dist/config/inversify.config.d.ts +2 -1
  21. package/dist/config/inversify.config.d.ts.map +1 -1
  22. package/dist/config/inversify.config.js +8 -6
  23. package/dist/config/inversify.types.d.ts.map +1 -1
  24. package/dist/constants.d.ts.map +1 -1
  25. package/dist/index.d.ts +25 -0
  26. package/dist/index.d.ts.map +1 -0
  27. package/dist/index.js +25 -0
  28. package/dist/models/CLIOptions.d.ts +4 -4
  29. package/dist/models/CLIOptions.d.ts.map +1 -1
  30. package/dist/models/CLIOptions.js +5 -5
  31. package/dist/templates/react-javascript/template/src/components/App.jsx +2 -2
  32. package/dist/templates/react-javascript/template/webpack.config.js +1 -0
  33. package/dist/templates/react-javascript/template.json +4 -4
  34. package/dist/templates/react-javascript-with-document-sandbox/template/src/ui/components/App.jsx +2 -2
  35. package/dist/templates/react-javascript-with-document-sandbox/template/webpack.config.js +1 -0
  36. package/dist/templates/react-javascript-with-document-sandbox/template.json +4 -4
  37. package/dist/templates/react-typescript/template/src/components/App.tsx +2 -2
  38. package/dist/templates/react-typescript/template/webpack.config.js +1 -0
  39. package/dist/templates/react-typescript/template.json +4 -4
  40. package/dist/templates/react-typescript-with-document-sandbox/template/src/ui/components/App.tsx +2 -2
  41. package/dist/templates/react-typescript-with-document-sandbox/template/webpack.config.js +1 -0
  42. package/dist/templates/react-typescript-with-document-sandbox/template.json +4 -4
  43. package/dist/templates/swc-javascript/template/src/components/App.js +2 -2
  44. package/dist/templates/swc-javascript/template/webpack.config.js +1 -0
  45. package/dist/templates/swc-javascript/template.json +4 -4
  46. package/dist/templates/swc-javascript-with-document-sandbox/template/src/ui/components/App.js +2 -2
  47. package/dist/templates/swc-javascript-with-document-sandbox/template/webpack.config.js +1 -0
  48. package/dist/templates/swc-javascript-with-document-sandbox/template.json +4 -4
  49. package/dist/templates/swc-typescript/template/src/components/App.css.ts +2 -2
  50. package/dist/templates/swc-typescript/template/src/components/App.ts +4 -4
  51. package/dist/templates/swc-typescript/template/src/index.ts +2 -2
  52. package/dist/templates/swc-typescript/template/webpack.config.js +1 -0
  53. package/dist/templates/swc-typescript/template.json +4 -4
  54. package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.css.ts +2 -2
  55. package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.ts +4 -4
  56. package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/index.ts +2 -2
  57. package/dist/templates/swc-typescript-with-document-sandbox/template/webpack.config.js +1 -0
  58. package/dist/templates/swc-typescript-with-document-sandbox/template.json +4 -4
  59. package/dist/tsconfig.tsbuildinfo +1 -1
  60. package/dist/validators/DirectoryValidator.d.ts +22 -11
  61. package/dist/validators/DirectoryValidator.d.ts.map +1 -1
  62. package/dist/validators/DirectoryValidator.js +152 -1
  63. package/dist/validators/EnvironmentValidator.d.ts +17 -2
  64. package/dist/validators/EnvironmentValidator.d.ts.map +1 -1
  65. package/dist/validators/EnvironmentValidator.js +149 -1
  66. package/dist/validators/index.d.ts +0 -2
  67. package/dist/validators/index.d.ts.map +1 -1
  68. package/dist/validators/index.js +0 -2
  69. package/package.json +26 -20
  70. package/src/app/AddOnFactory.ts +164 -4
  71. package/src/app/{AddOnManager.ts → PackageManager.ts} +4 -6
  72. package/src/app/TemplateSelector.ts +157 -5
  73. package/src/app/index.ts +1 -3
  74. package/src/commands/create.ts +24 -48
  75. package/src/config/inversify.config.ts +11 -9
  76. package/src/config/inversify.types.ts +7 -1
  77. package/src/constants.ts +2 -2
  78. package/src/index.ts +25 -0
  79. package/src/models/CLIOptions.ts +5 -5
  80. package/src/test/app/{WxpAddOnFactory.spec.ts → AddOnFactory.spec.ts} +18 -17
  81. package/src/test/app/{AddOnManager.spec.ts → PackageManager.spec.ts} +6 -6
  82. package/src/test/app/{AddOnTemplateSelector.spec.ts → TemplateSelector.spec.ts} +57 -26
  83. package/src/test/commands/command.spec.ts +80 -0
  84. package/src/test/commands/create.spec.ts +44 -18
  85. package/src/test/models/CLIOptions.spec.ts +4 -4
  86. package/src/test/validators/{AddOnDirectoryValidator.spec.ts → DirectoryValidator.spec.ts} +29 -21
  87. package/src/test/validators/{NodeEnvironmentValidator.spec.ts → EnvironmentValidator.spec.ts} +11 -24
  88. package/src/validators/DirectoryValidator.ts +172 -11
  89. package/src/validators/EnvironmentValidator.ts +157 -5
  90. package/src/validators/index.ts +0 -2
  91. package/templates/react-javascript/template/src/components/App.jsx +2 -2
  92. package/templates/react-javascript/template/webpack.config.js +1 -0
  93. package/templates/react-javascript/template.json +4 -4
  94. package/templates/react-javascript-with-document-sandbox/template/src/ui/components/App.jsx +2 -2
  95. package/templates/react-javascript-with-document-sandbox/template/webpack.config.js +1 -0
  96. package/templates/react-javascript-with-document-sandbox/template.json +4 -4
  97. package/templates/react-typescript/template/src/components/App.tsx +2 -2
  98. package/templates/react-typescript/template/webpack.config.js +1 -0
  99. package/templates/react-typescript/template.json +4 -4
  100. package/templates/react-typescript-with-document-sandbox/template/src/ui/components/App.tsx +2 -2
  101. package/templates/react-typescript-with-document-sandbox/template/webpack.config.js +1 -0
  102. package/templates/react-typescript-with-document-sandbox/template.json +4 -4
  103. package/templates/swc-javascript/template/src/components/App.js +2 -2
  104. package/templates/swc-javascript/template/webpack.config.js +1 -0
  105. package/templates/swc-javascript/template.json +4 -4
  106. package/templates/swc-javascript-with-document-sandbox/template/src/ui/components/App.js +2 -2
  107. package/templates/swc-javascript-with-document-sandbox/template/webpack.config.js +1 -0
  108. package/templates/swc-javascript-with-document-sandbox/template.json +4 -4
  109. package/templates/swc-typescript/template/src/components/App.css.ts +2 -2
  110. package/templates/swc-typescript/template/src/components/App.ts +4 -4
  111. package/templates/swc-typescript/template/src/index.ts +2 -2
  112. package/templates/swc-typescript/template/webpack.config.js +1 -0
  113. package/templates/swc-typescript/template.json +4 -4
  114. package/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.css.ts +2 -2
  115. package/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.ts +4 -4
  116. package/templates/swc-typescript-with-document-sandbox/template/src/ui/index.ts +2 -2
  117. package/templates/swc-typescript-with-document-sandbox/template/webpack.config.js +1 -0
  118. package/templates/swc-typescript-with-document-sandbox/template.json +4 -4
  119. package/tsconfig.json +3 -1
  120. package/dist/app/AddOnManager.d.ts.map +0 -1
  121. package/dist/app/AddOnTemplateSelector.d.ts +0 -54
  122. package/dist/app/AddOnTemplateSelector.d.ts.map +0 -1
  123. package/dist/app/AddOnTemplateSelector.js +0 -168
  124. package/dist/app/WxpAddOnFactory.d.ts +0 -62
  125. package/dist/app/WxpAddOnFactory.d.ts.map +0 -1
  126. package/dist/app/WxpAddOnFactory.js +0 -159
  127. package/dist/validators/AddOnDirectoryValidator.d.ts +0 -55
  128. package/dist/validators/AddOnDirectoryValidator.d.ts.map +0 -1
  129. package/dist/validators/AddOnDirectoryValidator.js +0 -176
  130. package/dist/validators/NodeEnvironmentValidator.d.ts +0 -58
  131. package/dist/validators/NodeEnvironmentValidator.d.ts.map +0 -1
  132. package/dist/validators/NodeEnvironmentValidator.js +0 -173
  133. package/src/app/AddOnTemplateSelector.ts +0 -193
  134. package/src/app/WxpAddOnFactory.ts +0 -196
  135. package/src/validators/AddOnDirectoryValidator.ts +0 -207
  136. package/src/validators/NodeEnvironmentValidator.ts +0 -197
@@ -21,10 +21,10 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
- import { CLIProgram, ITypes as IAnalyticsTypes } from "@adobe/ccweb-add-on-analytics";
24
+ import { BaseCommand, CLIProgram } from "@adobe/ccweb-add-on-analytics";
25
25
  import { UncaughtExceptionHandler } from "@adobe/ccweb-add-on-core";
26
26
  import { EntrypointType } from "@adobe/ccweb-add-on-manifest";
27
- import { Args, Command, Flags } from "@oclif/core";
27
+ import { Args, Flags } from "@oclif/core";
28
28
  import "reflect-metadata";
29
29
  import { AnalyticsErrorMarkers } from "../AnalyticsMarkers.js";
30
30
  import { IContainer, ITypes } from "../config/index.js";
@@ -33,16 +33,14 @@ import { CLIOptions } from "../models/CLIOptions.js";
33
33
  /**
34
34
  * Implementation class of the create-ccweb-add-on command.
35
35
  */
36
- export class CreateCCWebAddOn extends Command {
37
- _analyticsConsent;
38
- _analyticsService;
36
+ export class Create extends BaseCommand {
39
37
  _addOnFactory;
40
38
  static description = "Create an Adobe Creative Cloud Web Add-on.";
41
39
  static examples = ["create-ccweb-add-on <add-on-name> --template <javascript>"];
42
40
  static flags = {
43
- kind: Flags.string({
44
- char: "k",
45
- description: "Kind of Add-on (panel).",
41
+ entrypoint: Flags.string({
42
+ char: "e",
43
+ description: "Entrypoint type of Add-on (By default it is set as 'panel').",
46
44
  default: EntrypointType.PANEL,
47
45
  required: false,
48
46
  hidden: true
@@ -52,54 +50,30 @@ export class CreateCCWebAddOn extends Command {
52
50
  description: "Template to use for creating the Add-on project.",
53
51
  default: "",
54
52
  required: false
55
- }),
56
- analytics: Flags.string({
57
- char: "a",
58
- description: "Turn on/off sending analytics to Adobe.",
59
- options: ["on", "off"],
60
- required: false
61
- }),
62
- verbose: Flags.boolean({
63
- char: "v",
64
- description: "Enable verbose logging.",
65
- default: false,
66
- required: false
67
53
  })
68
54
  };
69
55
  static args = {
70
- addOnName: Args.string({
71
- name: "addOnName",
56
+ name: Args.string({
57
+ name: "name",
72
58
  description: "Name of the Add-on project.",
73
59
  required: true
74
60
  })
75
61
  };
76
62
  constructor(argv, config) {
77
- super(argv, config);
78
- this._analyticsConsent = IContainer.get(IAnalyticsTypes.AnalyticsConsent);
79
- this._analyticsService = IContainer.get(IAnalyticsTypes.AnalyticsService);
80
- this._analyticsService.program = new CLIProgram(PROGRAM_NAME, this.config.name + "@" + this.config.version);
81
- this._analyticsService.startTime = Date.now();
63
+ super(argv, config, new CLIProgram(PROGRAM_NAME, config.name + "@" + config.version));
82
64
  this._addOnFactory = IContainer.get(ITypes.AddOnFactory);
83
65
  }
84
66
  async run() {
85
67
  UncaughtExceptionHandler.registerExceptionHandler(PROGRAM_NAME);
86
- const { args: { addOnName }, flags: { kind, template, analytics, verbose } } = await this.parse(CreateCCWebAddOn);
68
+ const { args: { name }, flags: { entrypoint, template, analytics, verbose } } = await this.parse(Create);
87
69
  await this._seekAnalyticsConsent(analytics);
88
70
  console.log();
89
- const options = new CLIOptions(kind.toLowerCase(), addOnName, template.toLowerCase(), verbose);
71
+ const options = new CLIOptions(entrypoint.toLowerCase(), name, template.toLowerCase(), verbose);
90
72
  await this._addOnFactory.create(options);
91
73
  }
92
74
  async catch(error) {
93
75
  await this._analyticsService.postEvent(AnalyticsErrorMarkers.ERROR_INVALID_ARGS, error.message, false);
94
76
  throw error;
95
77
  }
96
- async _seekAnalyticsConsent(analytics) {
97
- if (analytics === undefined) {
98
- await this._analyticsConsent.get();
99
- }
100
- else {
101
- await this._analyticsConsent.set(analytics === "on");
102
- }
103
- }
104
78
  }
105
79
  //# sourceMappingURL=create.js.map
@@ -21,7 +21,8 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  ********************************************************************************/
24
+ import type { Container } from "inversify";
24
25
  import "reflect-metadata";
25
- declare const container: import("inversify").Container;
26
+ declare const container: Container;
26
27
  export { container as IContainer };
27
28
  //# sourceMappingURL=inversify.config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inversify.config.d.ts","sourceRoot":"","sources":["../../src/config/inversify.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAGlF,OAAO,kBAAkB,CAAC;AAO1B,QAAA,MAAM,SAAS,+BAAiB,CAAC;AAUjC,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"inversify.config.d.ts","sourceRoot":"","sources":["../../src/config/inversify.config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAGlF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,kBAAkB,CAAC;AAQ1B,QAAA,MAAM,SAAS,EAAE,SAA0B,CAAC;AAU5C,OAAO,EAAE,SAAS,IAAI,UAAU,EAAE,CAAC"}
@@ -23,13 +23,15 @@
23
23
  ********************************************************************************/
24
24
  import { IContainer as ICoreContainer } from "@adobe/ccweb-add-on-core";
25
25
  import "reflect-metadata";
26
- import { AddOnTemplateSelector, WxpAddOnFactory } from "../app/index.js";
27
- import { AddOnDirectoryValidator, NodeEnvironmentValidator } from "../validators/index.js";
26
+ import { AddOnFactory } from "../app/AddOnFactory.js";
27
+ import { TemplateSelector } from "../app/TemplateSelector.js";
28
+ import { DirectoryValidator } from "../validators/DirectoryValidator.js";
29
+ import { EnvironmentValidator } from "../validators/EnvironmentValidator.js";
28
30
  import { ITypes } from "./inversify.types.js";
29
31
  const container = ICoreContainer;
30
- container.bind(ITypes.AddOnFactory).to(WxpAddOnFactory).inSingletonScope();
31
- container.bind(ITypes.DirectoryValidator).to(AddOnDirectoryValidator).inSingletonScope();
32
- container.bind(ITypes.EnvironmentValidator).to(NodeEnvironmentValidator).inSingletonScope();
33
- container.bind(ITypes.TemplateSelector).to(AddOnTemplateSelector).inSingletonScope();
32
+ container.bind(ITypes.AddOnFactory).to(AddOnFactory).inSingletonScope();
33
+ container.bind(ITypes.DirectoryValidator).to(DirectoryValidator).inSingletonScope();
34
+ container.bind(ITypes.EnvironmentValidator).to(EnvironmentValidator).inSingletonScope();
35
+ container.bind(ITypes.TemplateSelector).to(TemplateSelector).inSingletonScope();
34
36
  export { container as IContainer };
35
37
  //# sourceMappingURL=inversify.config.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"inversify.types.d.ts","sourceRoot":"","sources":["../../src/config/inversify.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,eAAO,MAAM,MAAM;;;;;;CAMlB,CAAC"}
1
+ {"version":3,"file":"inversify.types.d.ts","sourceRoot":"","sources":["../../src/config/inversify.types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,eAAO,MAAM,MAAM,EAAE;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,gBAAgB,EAAE,MAAM,CAAC;CAO5B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAElD,eAAO,MAAM,gBAAgB,qBAM3B,CAAC;AAEH,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,0BAA0B,UAWtC,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,eAAO,MAAM,YAAY,wBAAwB,CAAC;AAElD,eAAO,MAAM,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAM/C,CAAC;AAEH,eAAO,MAAM,kBAAkB,cAAc,CAAC;AAE9C,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAW9C,CAAC"}
@@ -0,0 +1,25 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2025 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ export { run } from "@oclif/core";
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,25 @@
1
+ /********************************************************************************
2
+ * MIT License
3
+
4
+ * © Copyright 2025 Adobe. All rights reserved.
5
+
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ ********************************************************************************/
24
+ export { run } from "@oclif/core";
25
+ //# sourceMappingURL=index.js.map
@@ -27,9 +27,9 @@ import type { EntrypointType } from "@adobe/ccweb-add-on-manifest";
27
27
  */
28
28
  export declare class CLIOptions {
29
29
  /**
30
- * Kind of the Add-on. For example: panel.
30
+ * Entrypoint type of the Add-on. Example: 'panel'.
31
31
  */
32
- readonly addOnKind: EntrypointType;
32
+ readonly entrypointType: EntrypointType;
33
33
  /**
34
34
  * Name of the Add-on.
35
35
  */
@@ -44,12 +44,12 @@ export declare class CLIOptions {
44
44
  readonly verbose: boolean;
45
45
  /**
46
46
  * Instantiate {@link CLIOptions}.
47
- * @param addOnKind - Kind of the Add-on. For example: panel.
47
+ * @param entrypointType - Kind of the Add-on. For example: panel.
48
48
  * @param addOnName - Name of the Add-on.
49
49
  * @param templateName - Template name.
50
50
  * @param verbose - Verbose flag.
51
51
  * @returns Reference to a new {@link CLIOptions} instance.
52
52
  */
53
- constructor(addOnKind: EntrypointType, addOnName: string, templateName: string, verbose: boolean);
53
+ constructor(entrypointType: EntrypointType, addOnName: string, templateName: string, verbose: boolean);
54
54
  }
55
55
  //# sourceMappingURL=CLIOptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CLIOptions.d.ts","sourceRoot":"","sources":["../../src/models/CLIOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,qBAAa,UAAU;IACnB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,cAAc,CAAC;IAEnC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;;;;;;OAOG;gBACS,SAAS,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;CAMnG"}
1
+ {"version":3,"file":"CLIOptions.d.ts","sourceRoot":"","sources":["../../src/models/CLIOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;kFAsBkF;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE;;GAEG;AACH,qBAAa,UAAU;IACnB;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAExC;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAE1B;;;;;;;OAOG;gBACS,cAAc,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;CAMxG"}
@@ -26,9 +26,9 @@
26
26
  */
27
27
  export class CLIOptions {
28
28
  /**
29
- * Kind of the Add-on. For example: panel.
29
+ * Entrypoint type of the Add-on. Example: 'panel'.
30
30
  */
31
- addOnKind;
31
+ entrypointType;
32
32
  /**
33
33
  * Name of the Add-on.
34
34
  */
@@ -43,14 +43,14 @@ export class CLIOptions {
43
43
  verbose;
44
44
  /**
45
45
  * Instantiate {@link CLIOptions}.
46
- * @param addOnKind - Kind of the Add-on. For example: panel.
46
+ * @param entrypointType - Kind of the Add-on. For example: panel.
47
47
  * @param addOnName - Name of the Add-on.
48
48
  * @param templateName - Template name.
49
49
  * @param verbose - Verbose flag.
50
50
  * @returns Reference to a new {@link CLIOptions} instance.
51
51
  */
52
- constructor(addOnKind, addOnName, templateName, verbose) {
53
- this.addOnKind = addOnKind;
52
+ constructor(entrypointType, addOnName, templateName, verbose) {
53
+ this.entrypointType = entrypointType;
54
54
  this.addOnName = addOnName;
55
55
  this.templateName = templateName;
56
56
  this.verbose = verbose;
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -20,7 +20,7 @@ const App = ({ addOnUISdk }) => {
20
20
  return (
21
21
  // Please note that the below "<Theme>" component does not react to theme changes in Express.
22
22
  // You may use "addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
23
- <Theme theme="express" scale="medium" color="light">
23
+ <Theme system="express" scale="medium" color="light">
24
24
  <div className="container">
25
25
  <Button size="m" onClick={handleClick}>
26
26
  {buttonLabel}
@@ -12,6 +12,7 @@ module.exports = {
12
12
  outputModule: true
13
13
  },
14
14
  output: {
15
+ pathinfo: !isEnvProduction,
15
16
  path: path.resolve(__dirname, "dist"),
16
17
  module: true,
17
18
  filename: "index.js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@swc-react/button": "0.39.4",
10
- "@swc-react/theme": "0.39.4",
9
+ "@swc-react/button": "1.7.0",
10
+ "@swc-react/theme": "1.7.0",
11
11
  "react-dom": "18.2.0",
12
12
  "react": "18.2.0"
13
13
  },
@@ -20,7 +20,7 @@
20
20
  "css-loader": "6.8.1",
21
21
  "html-webpack-plugin": "5.5.3",
22
22
  "style-loader": "3.3.3",
23
- "webpack-cli": "5.1.4",
24
- "webpack": "5.89.0"
23
+ "webpack-cli": "6.0.1",
24
+ "webpack": "5.98.0"
25
25
  }
26
26
  }
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -18,7 +18,7 @@ const App = ({ addOnUISdk, sandboxProxy }) => {
18
18
  return (
19
19
  // Please note that the below "<Theme>" component does not react to theme changes in Express.
20
20
  // You may use "addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
21
- <Theme theme="express" scale="medium" color="light">
21
+ <Theme system="express" scale="medium" color="light">
22
22
  <div className="container">
23
23
  <Button size="m" onClick={handleClick}>
24
24
  Create Rectangle
@@ -15,6 +15,7 @@ module.exports = {
15
15
  outputModule: true
16
16
  },
17
17
  output: {
18
+ pathinfo: !isEnvProduction,
18
19
  path: path.resolve(__dirname, "dist"),
19
20
  module: true,
20
21
  filename: "[name].js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@swc-react/button": "0.39.4",
10
- "@swc-react/theme": "0.39.4",
9
+ "@swc-react/button": "1.7.0",
10
+ "@swc-react/theme": "1.7.0",
11
11
  "react-dom": "18.2.0",
12
12
  "react": "18.2.0"
13
13
  },
@@ -20,7 +20,7 @@
20
20
  "css-loader": "6.8.1",
21
21
  "html-webpack-plugin": "5.5.3",
22
22
  "style-loader": "3.3.3",
23
- "webpack-cli": "5.1.4",
24
- "webpack": "5.89.0"
23
+ "webpack-cli": "6.0.1",
24
+ "webpack": "5.98.0"
25
25
  }
26
26
  }
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -22,7 +22,7 @@ const App = ({ addOnUISdk }: { addOnUISdk: AddOnSDKAPI }) => {
22
22
  return (
23
23
  // Please note that the below "<Theme>" component does not react to theme changes in Express.
24
24
  // You may use "addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
25
- <Theme theme="express" scale="medium" color="light">
25
+ <Theme system="express" scale="medium" color="light">
26
26
  <div className="container">
27
27
  <Button size="m" onClick={handleClick}>
28
28
  {buttonLabel}
@@ -12,6 +12,7 @@ module.exports = {
12
12
  outputModule: true
13
13
  },
14
14
  output: {
15
+ pathinfo: !isEnvProduction,
15
16
  path: path.resolve(__dirname, "dist"),
16
17
  module: true,
17
18
  filename: "index.js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@swc-react/button": "0.39.4",
10
- "@swc-react/theme": "0.39.4",
9
+ "@swc-react/button": "1.7.0",
10
+ "@swc-react/theme": "1.7.0",
11
11
  "react-dom": "18.2.0",
12
12
  "react": "18.2.0"
13
13
  },
@@ -20,7 +20,7 @@
20
20
  "style-loader": "3.3.3",
21
21
  "ts-loader": "9.5.1",
22
22
  "typescript": "5.3.2",
23
- "webpack-cli": "5.1.4",
24
- "webpack": "5.89.0"
23
+ "webpack-cli": "6.0.1",
24
+ "webpack": "5.98.0"
25
25
  }
26
26
  }
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -21,7 +21,7 @@ const App = ({ addOnUISdk, sandboxProxy }: { addOnUISdk: AddOnSDKAPI; sandboxPro
21
21
  return (
22
22
  // Please note that the below "<Theme>" component does not react to theme changes in Express.
23
23
  // You may use "addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
24
- <Theme theme="express" scale="medium" color="light">
24
+ <Theme system="express" scale="medium" color="light">
25
25
  <div className="container">
26
26
  <Button size="m" onClick={handleClick}>
27
27
  Create Rectangle
@@ -18,6 +18,7 @@ module.exports = {
18
18
  outputModule: true
19
19
  },
20
20
  output: {
21
+ pathinfo: !isEnvProduction,
21
22
  path: path.resolve(__dirname, "dist"),
22
23
  module: true,
23
24
  filename: "[name].js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@swc-react/button": "0.39.4",
10
- "@swc-react/theme": "0.39.4",
9
+ "@swc-react/button": "1.7.0",
10
+ "@swc-react/theme": "1.7.0",
11
11
  "react-dom": "18.2.0",
12
12
  "react": "18.2.0"
13
13
  },
@@ -20,7 +20,7 @@
20
20
  "style-loader": "3.3.3",
21
21
  "ts-loader": "9.5.1",
22
22
  "typescript": "5.3.2",
23
- "webpack-cli": "5.1.4",
24
- "webpack": "5.89.0"
23
+ "webpack-cli": "6.0.1",
24
+ "webpack": "5.98.0"
25
25
  }
26
26
  }
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -33,7 +33,7 @@ export class App extends LitElement {
33
33
  render() {
34
34
  // Please note that the below "<sp-theme>" component does not react to theme changes in Express.
35
35
  // You may use "this.addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
36
- return html` <sp-theme theme="express" color="light" scale="medium">
36
+ return html` <sp-theme system="express" color="light" scale="medium">
37
37
  <div class="container">
38
38
  <sp-button size="m" @click=${this._handleClick}>${this._buttonLabel}</sp-button>
39
39
  </div>
@@ -12,6 +12,7 @@ module.exports = {
12
12
  outputModule: true
13
13
  },
14
14
  output: {
15
+ pathinfo: !isEnvProduction,
15
16
  path: path.resolve(__dirname, "dist"),
16
17
  module: true,
17
18
  filename: "index.js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@spectrum-web-components/button": "0.39.4",
10
- "@spectrum-web-components/theme": "0.39.4",
9
+ "@spectrum-web-components/button": "1.7.0",
10
+ "@spectrum-web-components/theme": "1.7.0",
11
11
  "lit": "2.8.0"
12
12
  },
13
13
  "devDependencies": {
@@ -18,7 +18,7 @@
18
18
  "css-loader": "6.8.1",
19
19
  "html-webpack-plugin": "5.5.3",
20
20
  "style-loader": "3.3.3",
21
- "webpack-cli": "5.1.4",
22
- "webpack": "5.89.0"
21
+ "webpack-cli": "6.0.1",
22
+ "webpack": "5.98.0"
23
23
  }
24
24
  }
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -45,7 +45,7 @@ export class App extends LitElement {
45
45
  render() {
46
46
  // Please note that the below "<sp-theme>" component does not react to theme changes in Express.
47
47
  // You may use "this.addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
48
- return html` <sp-theme theme="express" color="light" scale="medium">
48
+ return html` <sp-theme system="express" color="light" scale="medium">
49
49
  <div class="container">
50
50
  <sp-button size="m" @click=${this._handleClick}>Create Rectangle</sp-button>
51
51
  </div>
@@ -15,6 +15,7 @@ module.exports = {
15
15
  outputModule: true
16
16
  },
17
17
  output: {
18
+ pathinfo: !isEnvProduction,
18
19
  path: path.resolve(__dirname, "dist"),
19
20
  module: true,
20
21
  filename: "[name].js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@spectrum-web-components/button": "0.39.4",
10
- "@spectrum-web-components/theme": "0.39.4",
9
+ "@spectrum-web-components/button": "1.7.0",
10
+ "@spectrum-web-components/theme": "1.7.0",
11
11
  "lit": "2.8.0"
12
12
  },
13
13
  "devDependencies": {
@@ -18,7 +18,7 @@
18
18
  "css-loader": "6.8.1",
19
19
  "html-webpack-plugin": "5.5.3",
20
20
  "style-loader": "3.3.3",
21
- "webpack-cli": "5.1.4",
22
- "webpack": "5.89.0"
21
+ "webpack-cli": "6.0.1",
22
+ "webpack": "5.98.0"
23
23
  }
24
24
  }
@@ -1,6 +1,6 @@
1
- import { css } from "lit";
1
+ import { type CSSResult, css } from "lit";
2
2
 
3
- export const style = css`
3
+ export const style: CSSResult = css`
4
4
  .container {
5
5
  margin: 24px;
6
6
  display: flex;
@@ -1,4 +1,4 @@
1
- // To support: theme="express" scale="medium" color="light"
1
+ // To support: system="express" scale="medium" color="light"
2
2
  // import these spectrum web components modules:
3
3
  import "@spectrum-web-components/theme/express/scale-medium.js";
4
4
  import "@spectrum-web-components/theme/express/theme-light.js";
@@ -10,7 +10,7 @@ import "@spectrum-web-components/theme/theme-light.js";
10
10
  import "@spectrum-web-components/button/sp-button.js";
11
11
  import "@spectrum-web-components/theme/sp-theme.js";
12
12
 
13
- import { LitElement, html } from "lit";
13
+ import { LitElement, TemplateResult, html } from "lit";
14
14
  import { customElement, property, state } from "lit/decorators.js";
15
15
  import { style } from "./App.css";
16
16
 
@@ -32,10 +32,10 @@ export class App extends LitElement {
32
32
  this._buttonLabel = "Clicked";
33
33
  }
34
34
 
35
- render() {
35
+ render(): TemplateResult {
36
36
  // Please note that the below "<sp-theme>" component does not react to theme changes in Express.
37
37
  // You may use "this.addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
38
- return html` <sp-theme theme="express" color="light" scale="medium">
38
+ return html` <sp-theme system="express" color="light" scale="medium">
39
39
  <div class="container">
40
40
  <sp-button size="m" @click=${this._handleClick}>${this._buttonLabel}</sp-button>
41
41
  </div>
@@ -1,4 +1,4 @@
1
- import { LitElement, html } from "lit";
1
+ import { LitElement, TemplateResult, html } from "lit";
2
2
  import { customElement, state } from "lit/decorators.js";
3
3
  import { until } from "lit/directives/until.js";
4
4
  import "./components/App";
@@ -10,7 +10,7 @@ export class Root extends LitElement {
10
10
  @state()
11
11
  private _isAddOnUISdkReady = addOnUISdk.ready;
12
12
 
13
- render() {
13
+ render(): TemplateResult {
14
14
  return html`
15
15
  ${until(
16
16
  this._isAddOnUISdkReady.then(() => {
@@ -12,6 +12,7 @@ module.exports = {
12
12
  outputModule: true
13
13
  },
14
14
  output: {
15
+ pathinfo: !isEnvProduction,
15
16
  path: path.resolve(__dirname, "dist"),
16
17
  module: true,
17
18
  filename: "index.js"
@@ -6,8 +6,8 @@
6
6
  "package": "ccweb-add-on-scripts package --use webpack"
7
7
  },
8
8
  "dependencies": {
9
- "@spectrum-web-components/button": "0.39.4",
10
- "@spectrum-web-components/theme": "0.39.4",
9
+ "@spectrum-web-components/button": "1.7.0",
10
+ "@spectrum-web-components/theme": "1.7.0",
11
11
  "lit": "2.8.0"
12
12
  },
13
13
  "devDependencies": {
@@ -17,7 +17,7 @@
17
17
  "style-loader": "3.3.3",
18
18
  "ts-loader": "9.5.1",
19
19
  "typescript": "5.3.2",
20
- "webpack-cli": "5.1.4",
21
- "webpack": "5.89.0"
20
+ "webpack-cli": "6.0.1",
21
+ "webpack": "5.98.0"
22
22
  }
23
23
  }