@corva/create-app 0.46.0-rc.0 → 0.47.0-2

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.
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -10,7 +10,7 @@ const uiDependencies = {
10
10
  'highcharts-react-official': '2.2.2',
11
11
  'lodash': '^4.17.4',
12
12
  'mapbox.js': '3.2.1',
13
- 'moment': '2.23.0',
13
+ 'moment': '2.29.4',
14
14
  'moment-timezone': '0.5.23',
15
15
  'prop-types': '^15.6.1',
16
16
  'react': '17.0.1',
@@ -32,6 +32,7 @@ export const UPLOAD_ZIP_TO_CORVA_STEP = {
32
32
  fn: async ({ zipFileName, manifest, api, appId, dirName, options, pkg }) => {
33
33
  async function uploadAppPackage() {
34
34
  const form = new FormData();
35
+
35
36
  form.append('package', createReadStream(resolve(dirName, zipFileName)), 'package.zip');
36
37
 
37
38
  const { id: packageId } = await api.uploadPackages(manifest.manifest.application.key, form);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corva/create-app",
3
- "version": "0.46.0-rc.0",
3
+ "version": "0.47.0-2",
4
4
  "private": false,
5
5
  "description": "Create an app to use it in CORVA.AI",
6
6
  "keywords": [
@@ -29,7 +29,7 @@
29
29
  "scripts": {
30
30
  "build": "echo \"build is not configured for package \\\"×\\\", skipping.\"",
31
31
  "get-changelog": "conventional-changelog -r 2 -p angular",
32
- "lint": "eslint .",
32
+ "lint": "eslint . --resolve-plugins-relative-to $(pwd) --max-warnings 0",
33
33
  "lint:fix": "eslint . --fix",
34
34
  "release": "git add -A && standard-version -a",
35
35
  "release-rc": "npm run release -- --prerelease"
@@ -44,6 +44,7 @@
44
44
  "cross-spawn": "^7.0.3",
45
45
  "debug": "^4.3.4",
46
46
  "dotenv": "^16.0.0",
47
+ "eslint-plugin-react": "^7.32.0",
47
48
  "figlet": "^1.5.0",
48
49
  "form-data": "^4.0.0",
49
50
  "fs-extra": "9.0.1",
@@ -59,11 +60,13 @@
59
60
  "devDependencies": {
60
61
  "@babel/core": "^7.11.0",
61
62
  "@babel/eslint-parser": "^7.19.1",
63
+ "@babel/plugin-proposal-class-properties": "^7.18.6",
62
64
  "@babel/plugin-syntax-import-assertions": "^7.20.0",
65
+ "@babel/preset-react": "^7.18.6",
63
66
  "@commitlint/cli": "^17.3.0",
64
67
  "@commitlint/config-conventional": "^17.3.0",
65
- "@corva/eslint-config-browser": "^0.0.4",
66
- "@corva/eslint-config-node": "^5.0.0",
68
+ "@corva/eslint-config-browser": "^0.1.7",
69
+ "@corva/eslint-config-node": "^5.1.1",
67
70
  "@types/cross-spawn": "^6.0.2",
68
71
  "@typescript-eslint/eslint-plugin": "^5.42.1",
69
72
  "@typescript-eslint/parser": "^5.42.1",
@@ -73,9 +76,12 @@
73
76
  "eslint-config-prettier": "^8.5.0",
74
77
  "eslint-plugin-import": "^2.26.0",
75
78
  "eslint-plugin-jest": "^27.1.5",
79
+ "eslint-plugin-jsx-a11y": "^6.7.1",
76
80
  "eslint-plugin-prettier": "^4.2.1",
81
+ "eslint-plugin-react-hooks": "^4.6.0",
77
82
  "eslint-plugin-require-sort": "^1.3.0",
78
83
  "husky": "^8.0.2",
84
+ "jest": "^29.3.1",
79
85
  "prettier": "^2.0.0",
80
86
  "prettier-plugin-packagejson": "^2.3.0",
81
87
  "standard-version": "^9.0.0",
@@ -7,6 +7,7 @@ class Processor {
7
7
  async process({ event }) {
8
8
  this.logger.debug({ event }, 'Event');
9
9
 
10
+ // eslint-disable-next-line no-unused-vars
10
11
  const { asset_id: assetId, schedule_start: scheduleStart, interval } = event;
11
12
 
12
13
  this.logger.info(`Processing event. Asset: ${assetId}. Schedule start: ${scheduleStart}`);
@@ -7,6 +7,7 @@ class Processor {
7
7
  async process({ event }) {
8
8
  this.logger.debug({ event }, 'Event');
9
9
 
10
+ // eslint-disable-next-line no-unused-vars
10
11
  const { asset_id: assetId, company_id: companyId } = event;
11
12
 
12
13
  this.logger.info(`Processing event. Asset: ${assetId}`);
@@ -1,5 +1,5 @@
1
- const { merge } = require('webpack-merge');
2
1
  const { getWebpackConfig } = require('@corva/dc-platform-shared/cjs');
2
+ const { merge } = require('webpack-merge');
3
3
 
4
4
  module.exports = (env, argv) => {
5
5
  return merge(
@@ -16,5 +16,5 @@ test('process event', async () => {
16
16
 
17
17
  const processor = new Processor(fakeApiClient, fakeLogger);
18
18
 
19
- await processor.process(event);
19
+ expect(await processor.process(event)).toBeUndefined();
20
20
  });
@@ -6,6 +6,7 @@ export class Processor {
6
6
  async process(event: ScheduledLambdaEvent<{ some: string }>) {
7
7
  this.logger.debug({ event }, 'Event');
8
8
 
9
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
10
  const { asset_id: assetId, schedule_start: scheduleStart, interval } = event;
10
11
 
11
12
  this.logger.info(`Processing event. Asset: ${assetId}. Schedule start: ${scheduleStart}`);
@@ -39,5 +39,5 @@ test('process event', async () => {
39
39
  ],
40
40
  } as unknown as NormalizedStreamLambdaEvent<unknown>;
41
41
 
42
- await processor.process(event);
42
+ expect(await processor.process(event)).toBeUndefined();
43
43
  });
@@ -23,5 +23,5 @@ test('process event', async () => {
23
23
 
24
24
  const processor = new Processor(fakeApiClient, fakeLogger);
25
25
 
26
- await processor.process(event);
26
+ expect(await processor.process(event)).toBeUndefined();
27
27
  });
@@ -6,6 +6,7 @@ export class Processor {
6
6
  async process(event: Task) {
7
7
  this.logger.debug({ event }, 'Event');
8
8
 
9
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
10
  const { asset_id: assetId, company_id: companyId } = event;
10
11
 
11
12
  this.logger.info(`Processing event. Asset: ${assetId}`);
@@ -7,15 +7,21 @@
7
7
  "jsx": true
8
8
  }
9
9
  },
10
- "extends": ["@corva/eslint-config-browser", "plugin:@typescript-eslint/recommended"],
11
- "rules": {
12
- "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
13
- "@typescript-eslint/no-explicit-any": "off",
14
- /* Turned off until adopted by @corva/eslint-config-browser */
15
- "react/prop-types": 0,
16
- "react/default-props-match-prop-types": 0,
17
- "react/no-unused-prop-types": 0,
18
- "react/require-default-props": 0
19
- /* Turned off until adopted by @corva/eslint-config-browser */
20
- }
10
+ "extends": ["@corva/eslint-config-browser"],
11
+ "overrides": [
12
+ {
13
+ "files": ["*.ts", "*.tsx"],
14
+ "extends": ["@corva/eslint-config-browser", "plugin:@typescript-eslint/recommended"],
15
+ "rules": {
16
+ "@typescript-eslint/no-explicit-any": "off",
17
+ "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }],
18
+ /* Turned off until adopted by @corva/eslint-config-browser */
19
+ "react/prop-types": 0,
20
+ "react/default-props-match-prop-types": 0,
21
+ "react/no-unused-prop-types": 0,
22
+ "react/require-default-props": 0
23
+ /* Turned off until adopted by @corva/eslint-config-browser */
24
+ }
25
+ }
26
+ ]
21
27
  }
@@ -1,5 +1,5 @@
1
- const { merge } = require('webpack-merge');
2
1
  const { getWebpackConfig } = require('@corva/dc-platform-shared/cjs');
2
+ const { merge } = require('webpack-merge');
3
3
 
4
4
  module.exports = (env, argv) => {
5
5
  return merge(