@corva/create-app 0.0.0-b560f33 → 0.0.0-ce43383
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/common/python/requirements.txt +1 -1
- package/lib/constants/package.js +7 -3
- package/lib/flows/steps/zip-file-list-resolve.js +5 -6
- package/lib/helpers/resolve-app-runtime.js +3 -3
- package/lib/main.js +1 -2
- package/package.json +107 -1
- package/templates/ui/javascript/src/__tests__/TestsExample.test.js +2 -2
- package/templates/ui/typescript/src/__tests__/TestsExample.test.tsx +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
corva-sdk==1.
|
|
1
|
+
corva-sdk==1.14.0
|
|
2
2
|
pytest==7.1.1
|
package/lib/constants/package.js
CHANGED
|
@@ -10,7 +10,7 @@ const uiDependencies = {
|
|
|
10
10
|
'@icon-park/react': '1.4.2',
|
|
11
11
|
'classnames': '2.2.6',
|
|
12
12
|
'corva-convert-units': '1.10.33',
|
|
13
|
-
'highcharts': '
|
|
13
|
+
'highcharts': '10.3.3',
|
|
14
14
|
'highcharts-react-official': '2.2.2',
|
|
15
15
|
'lodash': '^4.17.21',
|
|
16
16
|
'mapbox.js': '3.2.1',
|
|
@@ -138,6 +138,9 @@ const uiPackage = {
|
|
|
138
138
|
'lint-staged': {
|
|
139
139
|
'src/**/*.{js,jsx,ts,tsx}': 'eslint --fix',
|
|
140
140
|
},
|
|
141
|
+
'resolutions': {
|
|
142
|
+
'@noble/hashes': '1.8.0',
|
|
143
|
+
},
|
|
141
144
|
};
|
|
142
145
|
|
|
143
146
|
const tsUiPackage = {
|
|
@@ -145,13 +148,14 @@ const tsUiPackage = {
|
|
|
145
148
|
devDependencies: tsUiDevDependencies,
|
|
146
149
|
// todo: temporary solution, ref https://github.com/oppia/oppia/issues/22283#issuecomment-2756641371
|
|
147
150
|
resolutions: {
|
|
151
|
+
...uiPackage.resolutions,
|
|
148
152
|
'@types/babel__traverse': '7.20.6',
|
|
149
153
|
},
|
|
150
154
|
};
|
|
151
155
|
|
|
152
156
|
const nodeNpmScripts = {
|
|
153
157
|
'bundle': 'create-corva-app zip .',
|
|
154
|
-
'test': 'npm
|
|
158
|
+
'test': 'npm run unit',
|
|
155
159
|
'unit': 'jest',
|
|
156
160
|
'lint': 'eslint --ext .js,.ts .',
|
|
157
161
|
'lint:fix': 'eslint --ext .js,.ts --fix .',
|
|
@@ -178,7 +182,7 @@ const nodeTsDevDependencies = {
|
|
|
178
182
|
|
|
179
183
|
const nodeYarnScripts = {
|
|
180
184
|
...nodeNpmScripts,
|
|
181
|
-
test: 'yarn
|
|
185
|
+
test: 'yarn unit',
|
|
182
186
|
};
|
|
183
187
|
|
|
184
188
|
const commonTsScripts = {
|
|
@@ -98,13 +98,12 @@ const resolveDataToZipUiApp = async (itemsToZip = [], { options, pkg, dirName, m
|
|
|
98
98
|
|
|
99
99
|
itemsToSave.push({
|
|
100
100
|
name: tmpPackageForSourceName,
|
|
101
|
-
content:
|
|
102
|
-
|
|
103
|
-
{
|
|
104
|
-
build:
|
|
101
|
+
content: {
|
|
102
|
+
...pkg,
|
|
103
|
+
scripts: {
|
|
104
|
+
build: pkg.scripts?.build,
|
|
105
105
|
},
|
|
106
|
-
|
|
107
|
-
),
|
|
106
|
+
},
|
|
108
107
|
});
|
|
109
108
|
|
|
110
109
|
const itemsToRemove = [tmpPackageForSourceName];
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import debugFn from 'debug';
|
|
2
2
|
import { APP_TYPES } from '../constants/cli.js';
|
|
3
|
-
|
|
4
|
-
const debug = debugFn('cca:resolve-app-runtime');
|
|
5
|
-
|
|
6
3
|
import spawn from 'cross-spawn';
|
|
7
4
|
import { promises as fs } from 'fs';
|
|
8
5
|
import os from 'os';
|
|
9
6
|
import semver from 'semver';
|
|
10
7
|
|
|
8
|
+
const debug = debugFn('cca:resolve-app-runtime');
|
|
9
|
+
|
|
11
10
|
/**
|
|
12
11
|
*
|
|
13
12
|
* @param {string} command
|
|
@@ -69,6 +68,7 @@ const semverVersionsMapping = {
|
|
|
69
68
|
'3.9': '3.9.16',
|
|
70
69
|
'3.10': '3.10.9',
|
|
71
70
|
'3.11': '3.11.1',
|
|
71
|
+
'3.13': '3.13.7',
|
|
72
72
|
},
|
|
73
73
|
};
|
|
74
74
|
|
package/lib/main.js
CHANGED
|
@@ -58,9 +58,8 @@ export async function run() {
|
|
|
58
58
|
if (e instanceof StepError) {
|
|
59
59
|
console.error(chalk.red(`${ERROR_ICON} ${e.message}`));
|
|
60
60
|
} else {
|
|
61
|
-
debug(e);
|
|
62
|
-
|
|
63
61
|
console.error(chalk.red(`${ERROR_ICON} Unknown error occured, please contact support`));
|
|
62
|
+
console.error(e);
|
|
64
63
|
}
|
|
65
64
|
|
|
66
65
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1 +1,107 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"name": "@corva/create-app",
|
|
3
|
+
"version": "0.0.0-ce43383",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Create an app to use it in CORVA.AI",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react"
|
|
8
|
+
],
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/facebook/create-react-app/issues"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/corva-ai/create-corva-app",
|
|
15
|
+
"directory": "@corva/create-app"
|
|
16
|
+
},
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"type": "module",
|
|
19
|
+
"bin": {
|
|
20
|
+
"create-corva-app": "./bin/create-corva-app.cjs"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin/**/*.cjs",
|
|
24
|
+
"bin/**/*.js",
|
|
25
|
+
"lib/**/*.js",
|
|
26
|
+
"templates",
|
|
27
|
+
"template_extensions",
|
|
28
|
+
"common"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "echo \"build is not configured for package \\\"×\\\", skipping.\"",
|
|
32
|
+
"get-changelog": "conventional-changelog -r 2 -p angular",
|
|
33
|
+
"lint": "eslint . --resolve-plugins-relative-to $(pwd) --max-warnings 0",
|
|
34
|
+
"lint:fix": "eslint . --fix",
|
|
35
|
+
"release": "git add -A && standard-version -a",
|
|
36
|
+
"release-rc": "npm run release -- --prerelease",
|
|
37
|
+
"run:local-ui-ts-completion": "node ./bin/create-corva-app.cjs ../test-app-ui-ts-completions --appName 'TestAppUiTsCompletions' --segments 'completion' --category 'analytics' --appKey 'corva.testappuitscompletions.ui' --appType 'ui' --runtime 'ui' -t --extensions corva",
|
|
38
|
+
"run:local-ui-ts-drilling": "node ./bin/create-corva-app.cjs ../test-app-ui-ts-drilling --appName 'TestAppUiTsDrilling' --segments 'drilling' --category 'analytics' --appKey 'corva.testappuitsdrilling.ui' --appType 'ui' --runtime 'ui' -t --extensions corva",
|
|
39
|
+
"run:local-ui-ts-intervention": "node ./bin/create-corva-app.cjs ../test-app-ui-ts-intervention --appName 'TestAppUiTsIntervention' --segments 'intervention' --category 'analytics' --appKey 'corva.testappuitsintervention.ui' --appType 'ui' --runtime 'ui' -t --extensions corva",
|
|
40
|
+
"test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' jest"
|
|
41
|
+
},
|
|
42
|
+
"lint-staged": {
|
|
43
|
+
"*.js": "npm run lint:fix"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"archiver": "^5.3.0",
|
|
47
|
+
"chalk": "^4.1.0",
|
|
48
|
+
"commander": "^9.1.0",
|
|
49
|
+
"cross-spawn": "^7.0.3",
|
|
50
|
+
"debug": "^4.3.4",
|
|
51
|
+
"dotenv": "^16.0.0",
|
|
52
|
+
"figlet": "^1.5.0",
|
|
53
|
+
"form-data": "^4.0.0",
|
|
54
|
+
"fs-extra": "^9.0.1",
|
|
55
|
+
"glob": "^8.0.1",
|
|
56
|
+
"got": "^12.5.1",
|
|
57
|
+
"inquirer": "^8.2.3",
|
|
58
|
+
"is-glob": "^4.0.3",
|
|
59
|
+
"lodash": "^4.17.21",
|
|
60
|
+
"npm-api": "^1.0.0",
|
|
61
|
+
"semver": "^7.3.2",
|
|
62
|
+
"terminal-link": "^3.0.0"
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@babel/core": "^7.11.0",
|
|
66
|
+
"@babel/eslint-parser": "^7.19.1",
|
|
67
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
68
|
+
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
|
69
|
+
"@babel/preset-react": "^7.18.6",
|
|
70
|
+
"@commitlint/cli": "^17.3.0",
|
|
71
|
+
"@commitlint/config-conventional": "^17.3.0",
|
|
72
|
+
"@corva/eslint-config-browser": "^0.1.7",
|
|
73
|
+
"@corva/eslint-config-node": "^5.1.1",
|
|
74
|
+
"@corva/node-sdk": "^8.0.1",
|
|
75
|
+
"@types/cross-spawn": "^6.0.2",
|
|
76
|
+
"@types/jest": "^29.5.4",
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
|
78
|
+
"@typescript-eslint/parser": "^5.42.1",
|
|
79
|
+
"conventional-changelog-cli": "^2.1.0",
|
|
80
|
+
"eslint": "^8.2.0",
|
|
81
|
+
"eslint-config-google": "^0.14.0",
|
|
82
|
+
"eslint-config-prettier": "^8.5.0",
|
|
83
|
+
"eslint-plugin-import": "^2.26.0",
|
|
84
|
+
"eslint-plugin-jest": "^27.1.5",
|
|
85
|
+
"eslint-plugin-jsx-a11y": "^6.7.1",
|
|
86
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
87
|
+
"eslint-plugin-react": "^7.32.0",
|
|
88
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
89
|
+
"eslint-plugin-require-sort": "^1.3.0",
|
|
90
|
+
"husky": "^8.0.2",
|
|
91
|
+
"jest": "^29.6.4",
|
|
92
|
+
"prettier": "^2.0.0",
|
|
93
|
+
"prettier-plugin-packagejson": "^2.3.0",
|
|
94
|
+
"standard-version": "^9.0.0",
|
|
95
|
+
"typescript": "^4.8.4",
|
|
96
|
+
"zx": "^7.2.3"
|
|
97
|
+
},
|
|
98
|
+
"packageManager": "yarn@1.22.19+sha512.ff4579ab459bb25aa7c0ff75b62acebe576f6084b36aa842971cf250a5d8c6cd3bc9420b22ce63c7f93a0857bc6ef29291db39c3e7a23aab5adfd5a4dd6c5d71",
|
|
99
|
+
"engines": {
|
|
100
|
+
"node": ">=18"
|
|
101
|
+
},
|
|
102
|
+
"standard-version": {
|
|
103
|
+
"skip": {
|
|
104
|
+
"tag": true
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import {
|
|
3
|
+
import { components } from '@corva/ui';
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
|
|
6
6
|
const Toggle = () => {
|
|
@@ -9,7 +9,7 @@ const Toggle = () => {
|
|
|
9
9
|
return (
|
|
10
10
|
<>
|
|
11
11
|
{isOn ? 'ON' : 'OFF'}
|
|
12
|
-
<Button onClick={() => setIsOn(value => !value)}>toggle</Button>
|
|
12
|
+
<components.Button onClick={() => setIsOn(value => !value)}>toggle</components.Button>
|
|
13
13
|
</>
|
|
14
14
|
);
|
|
15
15
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { render, screen, waitFor } from '@testing-library/react';
|
|
3
|
-
import {
|
|
3
|
+
import { components } from '@corva/ui';
|
|
4
4
|
import userEvent from '@testing-library/user-event';
|
|
5
5
|
|
|
6
6
|
const Toggle = () => {
|
|
@@ -9,7 +9,7 @@ const Toggle = () => {
|
|
|
9
9
|
return (
|
|
10
10
|
<>
|
|
11
11
|
{isOn ? 'ON' : 'OFF'}
|
|
12
|
-
<Button onClick={() => setIsOn(value => !value)}>toggle</Button>
|
|
12
|
+
<components.Button onClick={() => setIsOn(value => !value)}>toggle</components.Button>
|
|
13
13
|
</>
|
|
14
14
|
);
|
|
15
15
|
};
|