@canva/cli 1.3.0 → 1.5.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 +24 -0
- package/cli.js +719 -551
- package/lib/cjs/index.cjs +1 -1
- package/lib/esm/index.mjs +1 -1
- package/package.json +5 -2
- package/templates/base/package.json +6 -6
- package/templates/base/styles/components.css +8 -8
- package/templates/base/webpack.config.ts +3 -4
- package/templates/common/jest.config.mjs +1 -1
- package/templates/dam/package.json +7 -7
- package/templates/dam/webpack.config.ts +3 -4
- package/templates/data_connector/README.md +2 -2
- package/templates/data_connector/package.json +7 -7
- package/templates/data_connector/src/api/data_source.ts +1 -0
- package/templates/data_connector/src/context/app_context.tsx +1 -1
- package/templates/data_connector/styles/components.css +8 -8
- package/templates/data_connector/webpack.config.ts +3 -4
- package/templates/gen_ai/package.json +7 -8
- package/templates/gen_ai/src/components/remaining_credits.tsx +1 -0
- package/templates/gen_ai/src/components/report_box.tsx +1 -0
- package/templates/gen_ai/src/context/app_context.tsx +1 -0
- package/templates/gen_ai/styles/components.css +8 -8
- package/templates/gen_ai/webpack.config.ts +3 -4
- package/templates/hello_world/package.json +7 -7
- package/templates/hello_world/styles/components.css +8 -8
- package/templates/hello_world/webpack.config.ts +3 -4
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
overflow-y: scroll;
|
|
5
5
|
height: 100%;
|
|
6
|
-
padding-top: var(--ui-kit-space-
|
|
7
|
-
padding-right: var(--ui-kit-space-
|
|
8
|
-
padding-bottom: var(--ui-kit-space-
|
|
6
|
+
padding-top: var(--ui-kit-space-200);
|
|
7
|
+
padding-right: var(--ui-kit-space-200);
|
|
8
|
+
padding-bottom: var(--ui-kit-space-200);
|
|
9
9
|
|
|
10
10
|
/* for firefox */
|
|
11
11
|
scrollbar-width: thin;
|
|
12
|
-
scrollbar-color: var(--ui-kit-color-
|
|
12
|
+
scrollbar-color: var(--ui-kit-color-content-placeholder-fg) transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.scrollContainer::-webkit-scrollbar {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
.scrollContainer::-webkit-scrollbar-track {
|
|
22
22
|
background: transparent;
|
|
23
23
|
width: var(--ui-kit-base-unit);
|
|
24
|
-
margin-top: var(--ui-kit-space-
|
|
25
|
-
margin-bottom: var(--ui-kit-space-
|
|
24
|
+
margin-top: var(--ui-kit-space-100);
|
|
25
|
+
margin-bottom: var(--ui-kit-space-100);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.scrollContainer::-webkit-scrollbar-thumb {
|
|
29
|
-
border-radius: var(--ui-kit-
|
|
30
|
-
background: var(--ui-kit-color-
|
|
29
|
+
border-radius: var(--ui-kit-radius-element-standard);
|
|
30
|
+
background: var(--ui-kit-color-content-placeholder-fg);
|
|
31
31
|
visibility: hidden;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -34,11 +34,10 @@ export function buildConfig({
|
|
|
34
34
|
const mode = devConfig ? "development" : "production";
|
|
35
35
|
|
|
36
36
|
if (!backendHost) {
|
|
37
|
-
console.
|
|
38
|
-
chalk.
|
|
39
|
-
`
|
|
37
|
+
console.warn(
|
|
38
|
+
chalk.yellow.bold("BACKEND_HOST is undefined."),
|
|
39
|
+
`If your app requires a backend, refer to "Customizing the backend host" in the README.md for more information.`,
|
|
40
40
|
);
|
|
41
|
-
process.exit(-1);
|
|
42
41
|
} else if (backendHost.includes("localhost") && mode === "production") {
|
|
43
42
|
console.error(
|
|
44
43
|
chalk.redBright.bold(
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@canva/app-i18n-kit": "^1.1.1",
|
|
22
|
-
"@canva/app-ui-kit": "^5.0
|
|
22
|
+
"@canva/app-ui-kit": "^5.1.0",
|
|
23
23
|
"@canva/asset": "^2.2.1",
|
|
24
|
-
"@canva/design": "^2.7.
|
|
24
|
+
"@canva/design": "^2.7.3",
|
|
25
25
|
"@canva/error": "^2.1.0",
|
|
26
26
|
"@canva/platform": "^2.2.0",
|
|
27
27
|
"@canva/user": "^2.1.1",
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"cors": "2.8.5",
|
|
30
30
|
"html-react-parser": "5.2.6",
|
|
31
31
|
"obscenity": "0.4.4",
|
|
32
|
-
"react": "19.
|
|
33
|
-
"react-dom": "19.
|
|
32
|
+
"react": "19.2.0",
|
|
33
|
+
"react-dom": "19.2.0",
|
|
34
34
|
"react-error-boundary": "6.0.0",
|
|
35
35
|
"react-intl": "7.1.11",
|
|
36
36
|
"react-router-dom": "7.8.2"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@canva/app-eslint-plugin": "^1.0.0-beta.
|
|
39
|
+
"@canva/app-eslint-plugin": "^1.0.0-beta.7",
|
|
40
40
|
"@canva/cli": ">= 0.0.1-beta.13",
|
|
41
41
|
"@formatjs/cli": "6.7.2",
|
|
42
42
|
"@formatjs/ts-transformer": "3.14.0",
|
|
@@ -54,10 +54,9 @@
|
|
|
54
54
|
"@types/node-forge": "1.3.14",
|
|
55
55
|
"@types/nodemon": "1.19.6",
|
|
56
56
|
"@types/prompts": "2.4.9",
|
|
57
|
-
"@types/react": "19.
|
|
58
|
-
"@types/react-dom": "19.1
|
|
57
|
+
"@types/react": "19.2.2",
|
|
58
|
+
"@types/react-dom": "19.2.1",
|
|
59
59
|
"@types/webpack": "5.28.5",
|
|
60
|
-
"@types/webpack-dev-server": "4.7.2",
|
|
61
60
|
"@types/webpack-env": "1.18.8",
|
|
62
61
|
"chalk": "4.1.2",
|
|
63
62
|
"cli-table3": "0.6.5",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Link, Rows, Text, TextPlaceholder } from "@canva/app-ui-kit";
|
|
2
2
|
import { getPlatformInfo, requestOpenExternalUrl } from "@canva/platform";
|
|
3
|
+
import type { JSX } from "react";
|
|
3
4
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
5
|
import { useAppContext } from "src/context";
|
|
5
6
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Box, Column, Columns, FlagIcon, Link, Text } from "@canva/app-ui-kit";
|
|
2
2
|
import { requestOpenExternalUrl } from "@canva/platform";
|
|
3
|
+
import type { JSX } from "react";
|
|
3
4
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
4
5
|
import { APP_NAME } from "src/config";
|
|
5
6
|
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
overflow-y: scroll;
|
|
5
5
|
height: 100%;
|
|
6
|
-
padding-top: var(--ui-kit-space-
|
|
7
|
-
padding-right: var(--ui-kit-space-
|
|
8
|
-
padding-bottom: var(--ui-kit-space-
|
|
6
|
+
padding-top: var(--ui-kit-space-200);
|
|
7
|
+
padding-right: var(--ui-kit-space-200);
|
|
8
|
+
padding-bottom: var(--ui-kit-space-200);
|
|
9
9
|
|
|
10
10
|
/* for firefox */
|
|
11
11
|
scrollbar-width: thin;
|
|
12
|
-
scrollbar-color: var(--ui-kit-color-
|
|
12
|
+
scrollbar-color: var(--ui-kit-color-content-placeholder-fg) transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.scrollContainer::-webkit-scrollbar {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
.scrollContainer::-webkit-scrollbar-track {
|
|
22
22
|
background: transparent;
|
|
23
23
|
width: var(--ui-kit-base-unit);
|
|
24
|
-
margin-top: var(--ui-kit-space-
|
|
25
|
-
margin-bottom: var(--ui-kit-space-
|
|
24
|
+
margin-top: var(--ui-kit-space-100);
|
|
25
|
+
margin-bottom: var(--ui-kit-space-100);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.scrollContainer::-webkit-scrollbar-thumb {
|
|
29
|
-
border-radius: var(--ui-kit-
|
|
30
|
-
background: var(--ui-kit-color-
|
|
29
|
+
border-radius: var(--ui-kit-radius-element-standard);
|
|
30
|
+
background: var(--ui-kit-color-content-placeholder-fg);
|
|
31
31
|
visibility: hidden;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -34,11 +34,10 @@ export function buildConfig({
|
|
|
34
34
|
const mode = devConfig ? "development" : "production";
|
|
35
35
|
|
|
36
36
|
if (!backendHost) {
|
|
37
|
-
console.
|
|
38
|
-
chalk.
|
|
39
|
-
`
|
|
37
|
+
console.warn(
|
|
38
|
+
chalk.yellow.bold("BACKEND_HOST is undefined."),
|
|
39
|
+
`If your app requires a backend, refer to "Customizing the backend host" in the README.md for more information.`,
|
|
40
40
|
);
|
|
41
|
-
process.exit(-1);
|
|
42
41
|
} else if (backendHost.includes("localhost") && mode === "production") {
|
|
43
42
|
console.error(
|
|
44
43
|
chalk.redBright.bold(
|
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@canva/app-i18n-kit": "^1.1.1",
|
|
23
|
-
"@canva/app-ui-kit": "^5.0
|
|
23
|
+
"@canva/app-ui-kit": "^5.1.0",
|
|
24
24
|
"@canva/asset": "^2.2.1",
|
|
25
|
-
"@canva/design": "^2.7.
|
|
25
|
+
"@canva/design": "^2.7.3",
|
|
26
26
|
"@canva/error": "^2.1.0",
|
|
27
27
|
"@canva/platform": "^2.2.0",
|
|
28
28
|
"@canva/user": "^2.1.1",
|
|
29
|
-
"react": "19.
|
|
30
|
-
"react-dom": "19.
|
|
29
|
+
"react": "19.2.0",
|
|
30
|
+
"react-dom": "19.2.0",
|
|
31
31
|
"react-intl": "7.1.11"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@canva/app-eslint-plugin": "^1.0.0-beta.
|
|
34
|
+
"@canva/app-eslint-plugin": "^1.0.0-beta.7",
|
|
35
35
|
"@canva/cli": ">= 0.0.1-beta.13",
|
|
36
36
|
"@formatjs/cli": "6.7.2",
|
|
37
37
|
"@formatjs/ts-transformer": "3.14.0",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@types/node-fetch": "2.6.13",
|
|
48
48
|
"@types/node-forge": "1.3.14",
|
|
49
49
|
"@types/nodemon": "1.19.6",
|
|
50
|
-
"@types/react": "19.
|
|
51
|
-
"@types/react-dom": "19.1
|
|
50
|
+
"@types/react": "19.2.2",
|
|
51
|
+
"@types/react-dom": "19.2.1",
|
|
52
52
|
"@types/webpack-env": "1.18.8",
|
|
53
53
|
"chalk": "4.1.2",
|
|
54
54
|
"cli-table3": "0.6.5",
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
overflow-y: scroll;
|
|
5
5
|
height: 100%;
|
|
6
|
-
padding-top: var(--ui-kit-space-
|
|
7
|
-
padding-right: var(--ui-kit-space-
|
|
8
|
-
padding-bottom: var(--ui-kit-space-
|
|
6
|
+
padding-top: var(--ui-kit-space-200);
|
|
7
|
+
padding-right: var(--ui-kit-space-200);
|
|
8
|
+
padding-bottom: var(--ui-kit-space-200);
|
|
9
9
|
|
|
10
10
|
/* for firefox */
|
|
11
11
|
scrollbar-width: thin;
|
|
12
|
-
scrollbar-color: var(--ui-kit-color-
|
|
12
|
+
scrollbar-color: var(--ui-kit-color-content-placeholder-fg) transparent;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
.scrollContainer::-webkit-scrollbar {
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
.scrollContainer::-webkit-scrollbar-track {
|
|
22
22
|
background: transparent;
|
|
23
23
|
width: var(--ui-kit-base-unit);
|
|
24
|
-
margin-top: var(--ui-kit-space-
|
|
25
|
-
margin-bottom: var(--ui-kit-space-
|
|
24
|
+
margin-top: var(--ui-kit-space-100);
|
|
25
|
+
margin-bottom: var(--ui-kit-space-100);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.scrollContainer::-webkit-scrollbar-thumb {
|
|
29
|
-
border-radius: var(--ui-kit-
|
|
30
|
-
background: var(--ui-kit-color-
|
|
29
|
+
border-radius: var(--ui-kit-radius-element-standard);
|
|
30
|
+
background: var(--ui-kit-color-content-placeholder-fg);
|
|
31
31
|
visibility: hidden;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -34,11 +34,10 @@ export function buildConfig({
|
|
|
34
34
|
const mode = devConfig ? "development" : "production";
|
|
35
35
|
|
|
36
36
|
if (!backendHost) {
|
|
37
|
-
console.
|
|
38
|
-
chalk.
|
|
39
|
-
`
|
|
37
|
+
console.warn(
|
|
38
|
+
chalk.yellow.bold("BACKEND_HOST is undefined."),
|
|
39
|
+
`If your app requires a backend, refer to "Customizing the backend host" in the README.md for more information.`,
|
|
40
40
|
);
|
|
41
|
-
process.exit(-1);
|
|
42
41
|
} else if (backendHost.includes("localhost") && mode === "production") {
|
|
43
42
|
console.error(
|
|
44
43
|
chalk.redBright.bold(
|