@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.
- package/.c8rc.json +4 -1
- package/.mocharc.json +9 -2
- package/README.md +2 -2
- package/bin/run.js +2 -2
- package/dist/app/AddOnFactory.d.ts +30 -3
- package/dist/app/AddOnFactory.d.ts.map +1 -1
- package/dist/app/AddOnFactory.js +140 -1
- package/dist/app/{AddOnManager.d.ts → PackageManager.d.ts} +4 -4
- package/dist/app/PackageManager.d.ts.map +1 -0
- package/dist/app/{AddOnManager.js → PackageManager.js} +5 -6
- package/dist/app/TemplateSelector.d.ts +20 -4
- package/dist/app/TemplateSelector.d.ts.map +1 -1
- package/dist/app/TemplateSelector.js +142 -1
- package/dist/app/index.d.ts +1 -3
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +1 -3
- package/dist/commands/create.d.ts +6 -10
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +11 -37
- package/dist/config/inversify.config.d.ts +2 -1
- package/dist/config/inversify.config.d.ts.map +1 -1
- package/dist/config/inversify.config.js +8 -6
- package/dist/config/inversify.types.d.ts.map +1 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +25 -0
- package/dist/models/CLIOptions.d.ts +4 -4
- package/dist/models/CLIOptions.d.ts.map +1 -1
- package/dist/models/CLIOptions.js +5 -5
- package/dist/templates/react-javascript/template/src/components/App.jsx +2 -2
- package/dist/templates/react-javascript/template/webpack.config.js +1 -0
- package/dist/templates/react-javascript/template.json +4 -4
- package/dist/templates/react-javascript-with-document-sandbox/template/src/ui/components/App.jsx +2 -2
- package/dist/templates/react-javascript-with-document-sandbox/template/webpack.config.js +1 -0
- package/dist/templates/react-javascript-with-document-sandbox/template.json +4 -4
- package/dist/templates/react-typescript/template/src/components/App.tsx +2 -2
- package/dist/templates/react-typescript/template/webpack.config.js +1 -0
- package/dist/templates/react-typescript/template.json +4 -4
- package/dist/templates/react-typescript-with-document-sandbox/template/src/ui/components/App.tsx +2 -2
- package/dist/templates/react-typescript-with-document-sandbox/template/webpack.config.js +1 -0
- package/dist/templates/react-typescript-with-document-sandbox/template.json +4 -4
- package/dist/templates/swc-javascript/template/src/components/App.js +2 -2
- package/dist/templates/swc-javascript/template/webpack.config.js +1 -0
- package/dist/templates/swc-javascript/template.json +4 -4
- package/dist/templates/swc-javascript-with-document-sandbox/template/src/ui/components/App.js +2 -2
- package/dist/templates/swc-javascript-with-document-sandbox/template/webpack.config.js +1 -0
- package/dist/templates/swc-javascript-with-document-sandbox/template.json +4 -4
- package/dist/templates/swc-typescript/template/src/components/App.css.ts +2 -2
- package/dist/templates/swc-typescript/template/src/components/App.ts +4 -4
- package/dist/templates/swc-typescript/template/src/index.ts +2 -2
- package/dist/templates/swc-typescript/template/webpack.config.js +1 -0
- package/dist/templates/swc-typescript/template.json +4 -4
- package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.css.ts +2 -2
- package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.ts +4 -4
- package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/index.ts +2 -2
- package/dist/templates/swc-typescript-with-document-sandbox/template/webpack.config.js +1 -0
- package/dist/templates/swc-typescript-with-document-sandbox/template.json +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/validators/DirectoryValidator.d.ts +22 -11
- package/dist/validators/DirectoryValidator.d.ts.map +1 -1
- package/dist/validators/DirectoryValidator.js +152 -1
- package/dist/validators/EnvironmentValidator.d.ts +17 -2
- package/dist/validators/EnvironmentValidator.d.ts.map +1 -1
- package/dist/validators/EnvironmentValidator.js +149 -1
- package/dist/validators/index.d.ts +0 -2
- package/dist/validators/index.d.ts.map +1 -1
- package/dist/validators/index.js +0 -2
- package/package.json +26 -20
- package/src/app/AddOnFactory.ts +164 -4
- package/src/app/{AddOnManager.ts → PackageManager.ts} +4 -6
- package/src/app/TemplateSelector.ts +157 -5
- package/src/app/index.ts +1 -3
- package/src/commands/create.ts +24 -48
- package/src/config/inversify.config.ts +11 -9
- package/src/config/inversify.types.ts +7 -1
- package/src/constants.ts +2 -2
- package/src/index.ts +25 -0
- package/src/models/CLIOptions.ts +5 -5
- package/src/test/app/{WxpAddOnFactory.spec.ts → AddOnFactory.spec.ts} +18 -17
- package/src/test/app/{AddOnManager.spec.ts → PackageManager.spec.ts} +6 -6
- package/src/test/app/{AddOnTemplateSelector.spec.ts → TemplateSelector.spec.ts} +57 -26
- package/src/test/commands/command.spec.ts +80 -0
- package/src/test/commands/create.spec.ts +44 -18
- package/src/test/models/CLIOptions.spec.ts +4 -4
- package/src/test/validators/{AddOnDirectoryValidator.spec.ts → DirectoryValidator.spec.ts} +29 -21
- package/src/test/validators/{NodeEnvironmentValidator.spec.ts → EnvironmentValidator.spec.ts} +11 -24
- package/src/validators/DirectoryValidator.ts +172 -11
- package/src/validators/EnvironmentValidator.ts +157 -5
- package/src/validators/index.ts +0 -2
- package/templates/react-javascript/template/src/components/App.jsx +2 -2
- package/templates/react-javascript/template/webpack.config.js +1 -0
- package/templates/react-javascript/template.json +4 -4
- package/templates/react-javascript-with-document-sandbox/template/src/ui/components/App.jsx +2 -2
- package/templates/react-javascript-with-document-sandbox/template/webpack.config.js +1 -0
- package/templates/react-javascript-with-document-sandbox/template.json +4 -4
- package/templates/react-typescript/template/src/components/App.tsx +2 -2
- package/templates/react-typescript/template/webpack.config.js +1 -0
- package/templates/react-typescript/template.json +4 -4
- package/templates/react-typescript-with-document-sandbox/template/src/ui/components/App.tsx +2 -2
- package/templates/react-typescript-with-document-sandbox/template/webpack.config.js +1 -0
- package/templates/react-typescript-with-document-sandbox/template.json +4 -4
- package/templates/swc-javascript/template/src/components/App.js +2 -2
- package/templates/swc-javascript/template/webpack.config.js +1 -0
- package/templates/swc-javascript/template.json +4 -4
- package/templates/swc-javascript-with-document-sandbox/template/src/ui/components/App.js +2 -2
- package/templates/swc-javascript-with-document-sandbox/template/webpack.config.js +1 -0
- package/templates/swc-javascript-with-document-sandbox/template.json +4 -4
- package/templates/swc-typescript/template/src/components/App.css.ts +2 -2
- package/templates/swc-typescript/template/src/components/App.ts +4 -4
- package/templates/swc-typescript/template/src/index.ts +2 -2
- package/templates/swc-typescript/template/webpack.config.js +1 -0
- package/templates/swc-typescript/template.json +4 -4
- package/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.css.ts +2 -2
- package/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.ts +4 -4
- package/templates/swc-typescript-with-document-sandbox/template/src/ui/index.ts +2 -2
- package/templates/swc-typescript-with-document-sandbox/template/webpack.config.js +1 -0
- package/templates/swc-typescript-with-document-sandbox/template.json +4 -4
- package/tsconfig.json +3 -1
- package/dist/app/AddOnManager.d.ts.map +0 -1
- package/dist/app/AddOnTemplateSelector.d.ts +0 -54
- package/dist/app/AddOnTemplateSelector.d.ts.map +0 -1
- package/dist/app/AddOnTemplateSelector.js +0 -168
- package/dist/app/WxpAddOnFactory.d.ts +0 -62
- package/dist/app/WxpAddOnFactory.d.ts.map +0 -1
- package/dist/app/WxpAddOnFactory.js +0 -159
- package/dist/validators/AddOnDirectoryValidator.d.ts +0 -55
- package/dist/validators/AddOnDirectoryValidator.d.ts.map +0 -1
- package/dist/validators/AddOnDirectoryValidator.js +0 -176
- package/dist/validators/NodeEnvironmentValidator.d.ts +0 -58
- package/dist/validators/NodeEnvironmentValidator.d.ts.map +0 -1
- package/dist/validators/NodeEnvironmentValidator.js +0 -173
- package/src/app/AddOnTemplateSelector.ts +0 -193
- package/src/app/WxpAddOnFactory.ts +0 -196
- package/src/validators/AddOnDirectoryValidator.ts +0 -207
- package/src/validators/NodeEnvironmentValidator.ts +0 -197
package/dist/commands/create.js
CHANGED
|
@@ -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 {
|
|
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,
|
|
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
|
|
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
|
-
|
|
44
|
-
char: "
|
|
45
|
-
description: "
|
|
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
|
-
|
|
71
|
-
name: "
|
|
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: {
|
|
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(
|
|
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:
|
|
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;
|
|
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 {
|
|
27
|
-
import {
|
|
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(
|
|
31
|
-
container.bind(ITypes.DirectoryValidator).to(
|
|
32
|
-
container.bind(ITypes.EnvironmentValidator).to(
|
|
33
|
-
container.bind(ITypes.TemplateSelector).to(
|
|
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
|
|
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"}
|
package/dist/constants.d.ts.map
CHANGED
|
@@ -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,
|
|
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"}
|
package/dist/index.d.ts
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.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
|
-
*
|
|
30
|
+
* Entrypoint type of the Add-on. Example: 'panel'.
|
|
31
31
|
*/
|
|
32
|
-
readonly
|
|
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
|
|
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(
|
|
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,
|
|
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
|
-
*
|
|
29
|
+
* Entrypoint type of the Add-on. Example: 'panel'.
|
|
30
30
|
*/
|
|
31
|
-
|
|
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
|
|
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(
|
|
53
|
-
this.
|
|
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:
|
|
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
|
|
23
|
+
<Theme system="express" scale="medium" color="light">
|
|
24
24
|
<div className="container">
|
|
25
25
|
<Button size="m" onClick={handleClick}>
|
|
26
26
|
{buttonLabel}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@swc-react/button": "
|
|
10
|
-
"@swc-react/theme": "
|
|
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": "
|
|
24
|
-
"webpack": "5.
|
|
23
|
+
"webpack-cli": "6.0.1",
|
|
24
|
+
"webpack": "5.98.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/templates/react-javascript-with-document-sandbox/template/src/ui/components/App.jsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
21
|
+
<Theme system="express" scale="medium" color="light">
|
|
22
22
|
<div className="container">
|
|
23
23
|
<Button size="m" onClick={handleClick}>
|
|
24
24
|
Create Rectangle
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@swc-react/button": "
|
|
10
|
-
"@swc-react/theme": "
|
|
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": "
|
|
24
|
-
"webpack": "5.
|
|
23
|
+
"webpack-cli": "6.0.1",
|
|
24
|
+
"webpack": "5.98.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
25
|
+
<Theme system="express" scale="medium" color="light">
|
|
26
26
|
<div className="container">
|
|
27
27
|
<Button size="m" onClick={handleClick}>
|
|
28
28
|
{buttonLabel}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@swc-react/button": "
|
|
10
|
-
"@swc-react/theme": "
|
|
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": "
|
|
24
|
-
"webpack": "5.
|
|
23
|
+
"webpack-cli": "6.0.1",
|
|
24
|
+
"webpack": "5.98.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/dist/templates/react-typescript-with-document-sandbox/template/src/ui/components/App.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
24
|
+
<Theme system="express" scale="medium" color="light">
|
|
25
25
|
<div className="container">
|
|
26
26
|
<Button size="m" onClick={handleClick}>
|
|
27
27
|
Create Rectangle
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@swc-react/button": "
|
|
10
|
-
"@swc-react/theme": "
|
|
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": "
|
|
24
|
-
"webpack": "5.
|
|
23
|
+
"webpack-cli": "6.0.1",
|
|
24
|
+
"webpack": "5.98.0"
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
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>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/button": "
|
|
10
|
-
"@spectrum-web-components/theme": "
|
|
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": "
|
|
22
|
-
"webpack": "5.
|
|
21
|
+
"webpack-cli": "6.0.1",
|
|
22
|
+
"webpack": "5.98.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
package/dist/templates/swc-javascript-with-document-sandbox/template/src/ui/components/App.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
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>
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/button": "
|
|
10
|
-
"@spectrum-web-components/theme": "
|
|
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": "
|
|
22
|
-
"webpack": "5.
|
|
21
|
+
"webpack-cli": "6.0.1",
|
|
22
|
+
"webpack": "5.98.0"
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// To support:
|
|
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
|
|
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(() => {
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"package": "ccweb-add-on-scripts package --use webpack"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@spectrum-web-components/button": "
|
|
10
|
-
"@spectrum-web-components/theme": "
|
|
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": "
|
|
21
|
-
"webpack": "5.
|
|
20
|
+
"webpack-cli": "6.0.1",
|
|
21
|
+
"webpack": "5.98.0"
|
|
22
22
|
}
|
|
23
23
|
}
|