@adobe/create-ccweb-add-on 2.4.2 → 3.0.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/.mocharc.json +9 -2
- package/README.md +2 -2
- package/bin/run.js +3 -2
- package/dist/app/{AddOnManager.d.ts → AddOnPackageManager.d.ts} +4 -4
- package/dist/app/AddOnPackageManager.d.ts.map +1 -0
- package/dist/app/{AddOnManager.js → AddOnPackageManager.js} +5 -6
- package/dist/app/AddOnTemplateSelector.d.ts +3 -3
- package/dist/app/AddOnTemplateSelector.d.ts.map +1 -1
- package/dist/app/AddOnTemplateSelector.js +13 -13
- package/dist/app/WxpAddOnFactory.js +5 -5
- package/dist/app/index.d.ts +1 -1
- package/dist/app/index.d.ts.map +1 -1
- package/dist/app/index.js +1 -1
- 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.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/AddOnDirectoryValidator.js +2 -2
- package/dist/validators/NodeEnvironmentValidator.js +2 -2
- package/package.json +24 -18
- package/src/app/{AddOnManager.ts → AddOnPackageManager.ts} +4 -6
- package/src/app/AddOnTemplateSelector.ts +13 -13
- package/src/app/WxpAddOnFactory.ts +5 -5
- package/src/app/index.ts +1 -1
- package/src/commands/create.ts +24 -48
- package/src/config/inversify.config.ts +2 -1
- 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/{AddOnManager.spec.ts → AddOnPackageManager.spec.ts} +8 -5
- package/src/test/app/AddOnTemplateSelector.spec.ts +30 -12
- package/src/test/app/WxpAddOnFactory.spec.ts +11 -11
- package/src/test/commands/command.spec.ts +80 -0
- package/src/test/commands/create.spec.ts +42 -16
- package/src/test/models/CLIOptions.spec.ts +3 -3
- package/src/test/validators/AddOnDirectoryValidator.spec.ts +24 -15
- package/src/test/validators/NodeEnvironmentValidator.spec.ts +5 -5
- package/src/validators/AddOnDirectoryValidator.ts +2 -2
- package/src/validators/NodeEnvironmentValidator.ts +2 -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
|
@@ -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": "0.
|
|
10
|
-
"@swc-react/theme": "0.
|
|
9
|
+
"@swc-react/button": "1.0.3",
|
|
10
|
+
"@swc-react/theme": "1.0.3",
|
|
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": "0.
|
|
10
|
-
"@swc-react/theme": "0.
|
|
9
|
+
"@swc-react/button": "1.0.3",
|
|
10
|
+
"@swc-react/theme": "1.0.3",
|
|
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.1.2",
|
|
10
|
+
"@spectrum-web-components/theme": "1.1.2",
|
|
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.1.2",
|
|
10
|
+
"@spectrum-web-components/theme": "1.1.2",
|
|
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.1.2",
|
|
10
|
+
"@spectrum-web-components/theme": "1.1.2",
|
|
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
|
}
|
package/dist/templates/swc-typescript-with-document-sandbox/template/src/ui/components/App.ts
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";
|
|
@@ -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 { DocumentSandboxApi } from "../../models/DocumentSandboxApi";
|
|
16
16
|
import { style } from "./App.css";
|
|
@@ -43,10 +43,10 @@ export class App extends LitElement {
|
|
|
43
43
|
this._sandboxProxy.createRectangle();
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
render() {
|
|
46
|
+
render(): TemplateResult {
|
|
47
47
|
// Please note that the below "<sp-theme>" component does not react to theme changes in Express.
|
|
48
48
|
// You may use "this.addOnUISdk.app.ui.theme" to get the current theme and react accordingly.
|
|
49
|
-
return html` <sp-theme
|
|
49
|
+
return html` <sp-theme system="express" color="light" scale="medium">
|
|
50
50
|
<div class="container">
|
|
51
51
|
<sp-button size="m" @click=${this._handleClick}>Create Rectangle</sp-button>
|
|
52
52
|
</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(async () => {
|
|
@@ -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.1.2",
|
|
10
|
+
"@spectrum-web-components/theme": "1.1.2",
|
|
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
|
}
|