@corva/create-app 0.28.0-0 → 0.28.0-3
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/README.md +160 -17
- package/bin/create-corva-app.js +5 -0
- package/lib/app.js +9 -0
- package/lib/bump-version.option.js +29 -0
- package/{constants → lib/constants}/cli.js +1 -0
- package/{constants → lib/constants}/manifest.js +5 -13
- package/lib/constants/messages.js +21 -0
- package/lib/constants/package.js +161 -0
- package/lib/flow.js +46 -0
- package/lib/flows/lib/create-zip-archive.js +77 -0
- package/lib/flows/lib/json.js +28 -0
- package/lib/flows/lib/manifest.js +47 -0
- package/lib/flows/lib/step-error.js +12 -0
- package/lib/flows/prepare.js +8 -0
- package/lib/flows/release.js +18 -0
- package/lib/flows/steps/prepare-load-app-files.js +18 -0
- package/lib/flows/steps/release-get-app-key.js +16 -0
- package/lib/flows/steps/release-get-config.js +30 -0
- package/lib/flows/steps/release-upload-zip-to-corva.js +34 -0
- package/lib/flows/steps/zip-cleanup.js +17 -0
- package/lib/flows/steps/zip-create-archive.js +15 -0
- package/lib/flows/steps/zip-file-list-resolve.js +185 -0
- package/lib/flows/steps/zip-prepare.js +21 -0
- package/lib/flows/steps/zip.js +15 -0
- package/lib/flows/zip-simple.js +8 -0
- package/lib/flows/zip.js +9 -0
- package/{helpers → lib/helpers}/manifest.js +11 -13
- package/lib/helpers/resolve-app-runtime.js +29 -0
- package/{helpers → lib/helpers}/utils.js +17 -17
- package/{helpers → lib/helpers}/versioning.js +0 -0
- package/lib/index.js +502 -0
- package/{scripts → lib/scripts}/utils/version.js +49 -26
- package/package.json +13 -8
- package/{template/scheduler/node → templates/javascript/scheduler}/README.md +0 -0
- package/{template/scheduler/node → templates/javascript/scheduler}/__test__/processor.test.js +0 -0
- package/{template/scheduler/node → templates/javascript/scheduler}/index.js +0 -0
- package/{template/scheduler/node → templates/javascript/scheduler}/src/processor.js +0 -0
- package/{template/stream/node → templates/javascript/stream}/README.md +0 -0
- package/{template/stream/node → templates/javascript/stream}/__test__/processor.test.js +0 -0
- package/{template/stream/node → templates/javascript/stream}/index.js +0 -0
- package/{template/stream/node → templates/javascript/stream}/src/processor.js +0 -0
- package/{template/task/node → templates/javascript/task}/README.md +0 -0
- package/{template/task/node → templates/javascript/task}/__test__/processor.test.js +0 -0
- package/{template/task/node → templates/javascript/task}/index.js +0 -0
- package/{template/task/node → templates/javascript/task}/src/processor.js +0 -0
- package/{template/ui/js → templates/javascript/ui}/.env +0 -0
- package/{template/ui/js → templates/javascript/ui}/.env.sample +0 -0
- package/{template/ui/js → templates/javascript/ui}/.eslintrc +0 -0
- package/{template/ui/js → templates/javascript/ui}/.prettierrc +0 -0
- package/{template/ui/js → templates/javascript/ui}/README.md +0 -0
- package/{template/ui/js → templates/javascript/ui}/config-overrides.js +0 -0
- package/{template/ui/js → templates/javascript/ui}/gitignore +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/App.css +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/App.js +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/AppSettings.js +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/assets/logo.svg +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/constants.js +0 -0
- package/{template/ui/js → templates/javascript/ui}/src/index.js +0 -0
- package/templates/python/scheduler/README.md +31 -0
- package/{template/scheduler/python → templates/python/scheduler}/lambda_function.py +0 -0
- package/{template/scheduler/python → templates/python/scheduler}/test/__init__.py +0 -0
- package/{template/scheduler/python → templates/python/scheduler}/test/app_test.py +0 -0
- package/templates/python/stream/README.md +31 -0
- package/{template/stream/python → templates/python/stream}/lambda_function.py +0 -0
- package/{template/stream/python → templates/python/stream}/test/__init__.py +0 -0
- package/{template/stream/python → templates/python/stream}/test/app_test.py +0 -0
- package/templates/python/task/README.md +31 -0
- package/{template/task/python → templates/python/task}/lambda_function.py +0 -0
- package/{template/task/python → templates/python/task}/test/__init__.py +0 -0
- package/{template/task/python → templates/python/task}/test/app_test.py +0 -0
- package/{template/scheduler/node-ts → templates/typescript/scheduler}/README.md +0 -0
- package/{template/scheduler/node-ts → templates/typescript/scheduler}/__test__/processor.spec.ts +0 -0
- package/{template/scheduler/node-ts → templates/typescript/scheduler}/index.ts +0 -0
- package/{template/scheduler/node-ts → templates/typescript/scheduler}/lib/processor.ts +0 -0
- package/{template/stream/node-ts → templates/typescript/stream}/README.md +0 -0
- package/{template/stream/node-ts → templates/typescript/stream}/__test__/processor.spec.ts +0 -0
- package/{template/stream/node-ts → templates/typescript/stream}/index.ts +0 -0
- package/{template/stream/node-ts → templates/typescript/stream}/lib/processor.ts +0 -0
- package/{template/task/node-ts → templates/typescript/task}/README.md +0 -0
- package/{template/task/node-ts → templates/typescript/task}/__test__/processor.spec.ts +0 -0
- package/{template/task/node-ts → templates/typescript/task}/index.ts +0 -0
- package/{template/task/node-ts → templates/typescript/task}/src/processor.ts +0 -0
- package/{template/ui/ts → templates/typescript/ui}/.env +0 -0
- package/{template/ui/ts → templates/typescript/ui}/.env.sample +0 -0
- package/{template/ui/ts → templates/typescript/ui}/.eslintrc +0 -0
- package/{template/ui/ts → templates/typescript/ui}/.prettierrc +0 -0
- package/{template/ui/ts → templates/typescript/ui}/README.md +0 -0
- package/{template/ui/ts → templates/typescript/ui}/config-overrides.js +0 -0
- package/{template/ui/ts → templates/typescript/ui}/gitignore +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/App.css +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/App.tsx +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/AppSettings.tsx +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/assets/logo.svg +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/constants.ts +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/custom.d.ts +0 -0
- package/{template/ui/ts → templates/typescript/ui}/src/index.js +0 -0
- package/{template/ui/ts → templates/typescript/ui}/tsconfig.json +0 -0
- package/constants/package.js +0 -50
- package/index.js +0 -386
- package/scripts/ui/index.js +0 -7
- package/scripts/ui/releaseAppZip.js +0 -91
- package/scripts/ui/zipAppSource.js +0 -103
- package/template/scheduler/node/gitignore +0 -21
- package/template/scheduler/node/package.json +0 -17
- package/template/scheduler/node-ts/gitignore +0 -25
- package/template/scheduler/node-ts/package.json +0 -37
- package/template/scheduler/node-ts/tsconfig.build.json +0 -11
- package/template/scheduler/node-ts/tsconfig.json +0 -34
- package/template/scheduler/python/README.md +0 -19
- package/template/scheduler/python/requirements.txt +0 -2
- package/template/stream/node/gitignore +0 -21
- package/template/stream/node/package.json +0 -17
- package/template/stream/node-ts/gitignore +0 -25
- package/template/stream/node-ts/package.json +0 -37
- package/template/stream/node-ts/tsconfig.build.json +0 -11
- package/template/stream/node-ts/tsconfig.json +0 -34
- package/template/stream/python/README.md +0 -19
- package/template/stream/python/requirements.txt +0 -2
- package/template/task/node/gitignore +0 -21
- package/template/task/node/package.json +0 -17
- package/template/task/node-ts/gitignore +0 -25
- package/template/task/node-ts/package.json +0 -37
- package/template/task/node-ts/tsconfig.build.json +0 -11
- package/template/task/node-ts/tsconfig.json +0 -34
- package/template/task/python/README.md +0 -19
- package/template/task/python/requirements.txt +0 -2
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const axios = require('axios');
|
|
4
|
-
const FormData = require('form-data');
|
|
5
|
-
const chalk = require('chalk');
|
|
6
|
-
const dotenv = require('dotenv');
|
|
7
|
-
const get = require('lodash').get;
|
|
8
|
-
const zipAppSource = require('./zipAppSource');
|
|
9
|
-
|
|
10
|
-
const SUCCESS_ICON = ' ✅ \n';
|
|
11
|
-
const ERROR_ICON = ' ❌ \n';
|
|
12
|
-
|
|
13
|
-
const CONSOLE_MESSAGES = {
|
|
14
|
-
createZip: 'Creating zip archive...\n',
|
|
15
|
-
createZipError: 'Could not create zip archive.',
|
|
16
|
-
createZipSuccess: `Zip archive has been created ${SUCCESS_ICON}`,
|
|
17
|
-
getAuthToken: 'Reading auth token...',
|
|
18
|
-
getAuthTokenError: `Could not find auth token. Please run ${chalk.cyan(
|
|
19
|
-
'yarn start'
|
|
20
|
-
)} and login to Corva`,
|
|
21
|
-
getAppKey: 'Reading app key...',
|
|
22
|
-
getAppKeyError: "Could not find app key. Please make sure it's defined in manifest.json",
|
|
23
|
-
uploadApp: 'Uploading app...',
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
function handleError(e, message) {
|
|
27
|
-
process.stdout.write(ERROR_ICON);
|
|
28
|
-
message && console.log(chalk.red(message));
|
|
29
|
-
console.error(chalk.red(e));
|
|
30
|
-
process.exit(1);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
async function releaseAppZip({ bumpVersion }) {
|
|
34
|
-
const dirname = process.cwd();
|
|
35
|
-
|
|
36
|
-
// Read auth token
|
|
37
|
-
let authToken;
|
|
38
|
-
let corvaAPIEnv = 'production';
|
|
39
|
-
try {
|
|
40
|
-
process.stdout.write(CONSOLE_MESSAGES.getAuthToken);
|
|
41
|
-
const env = await fs.promises.readFile(path.resolve(dirname, './.env'));
|
|
42
|
-
const config = dotenv.parse(env);
|
|
43
|
-
authToken = config.AUTH_TOKEN;
|
|
44
|
-
if (!authToken) throw new Error('No auth token.');
|
|
45
|
-
if (config.CORVA_API_ENV) corvaAPIEnv = config.CORVA_API_ENV;
|
|
46
|
-
process.stdout.write(SUCCESS_ICON);
|
|
47
|
-
} catch (e) {
|
|
48
|
-
handleError(e, CONSOLE_MESSAGES.getAuthTokenError);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Read app key
|
|
52
|
-
let appKey;
|
|
53
|
-
try {
|
|
54
|
-
process.stdout.write(CONSOLE_MESSAGES.getAppKey);
|
|
55
|
-
const manifest = JSON.parse(
|
|
56
|
-
await fs.promises.readFile(path.resolve(dirname, './manifest.json'))
|
|
57
|
-
);
|
|
58
|
-
appKey = manifest.application.key;
|
|
59
|
-
if (!appKey) throw new Error('No app key.');
|
|
60
|
-
process.stdout.write(SUCCESS_ICON);
|
|
61
|
-
} catch (e) {
|
|
62
|
-
handleError(e, CONSOLE_MESSAGES.getAppKeyError);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
// Zip archive
|
|
66
|
-
let zipPath;
|
|
67
|
-
try {
|
|
68
|
-
process.stdout.write(CONSOLE_MESSAGES.createZip);
|
|
69
|
-
zipPath = await zipAppSource({ silent: true, bumpVersion });
|
|
70
|
-
process.stdout.write(CONSOLE_MESSAGES.createZipSuccess);
|
|
71
|
-
} catch (e) {
|
|
72
|
-
handleError(e, CONSOLE_MESSAGES.createZipError);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
let uploadURL;
|
|
76
|
-
try {
|
|
77
|
-
process.stdout.write(CONSOLE_MESSAGES.uploadApp);
|
|
78
|
-
const form = new FormData();
|
|
79
|
-
form.append('package', fs.createReadStream(zipPath), 'archive.zip');
|
|
80
|
-
const baseURL = `https://api${corvaAPIEnv === 'production' ? '' : `.${corvaAPIEnv}`}.corva.ai`;
|
|
81
|
-
uploadURL = `${baseURL}/v2/apps/${appKey}/packages/upload`;
|
|
82
|
-
await axios.post(uploadURL, form, {
|
|
83
|
-
headers: { ...form.getHeaders(), Authorization: `Bearer ${authToken}` },
|
|
84
|
-
});
|
|
85
|
-
process.stdout.write(SUCCESS_ICON);
|
|
86
|
-
} catch (e) {
|
|
87
|
-
handleError(e, `${get(e, 'response.data.message', '')} \nPOST: ${uploadURL} failed.`);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
module.exports = releaseAppZip;
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
const archiver = require('archiver');
|
|
4
|
-
const os = require('os');
|
|
5
|
-
const chalk = require('chalk');
|
|
6
|
-
const noop = require('lodash').noop;
|
|
7
|
-
|
|
8
|
-
const { warnIfOutdated, getIncreasedVersion } = require('../utils/version');
|
|
9
|
-
|
|
10
|
-
async function compressAppToZip({ silent = false, bumpVersion } = {}) {
|
|
11
|
-
const log = silent ? noop : console.log;
|
|
12
|
-
await warnIfOutdated();
|
|
13
|
-
|
|
14
|
-
// Left only build script for package json;
|
|
15
|
-
const dirname = process.cwd();
|
|
16
|
-
const packageJsonContent = fs.readFileSync(path.resolve(dirname, 'package.json'), 'utf-8');
|
|
17
|
-
const packageJson = JSON.parse(packageJsonContent);
|
|
18
|
-
const updatedVersion = await getIncreasedVersion(packageJson.version, { bumpVersion });
|
|
19
|
-
|
|
20
|
-
const updatedPackage = {
|
|
21
|
-
...packageJson,
|
|
22
|
-
version: updatedVersion,
|
|
23
|
-
scripts: {
|
|
24
|
-
build: 'webpack --config=./config-overrides.js --mode production',
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const zipFileName = `${packageJson.name}-${updatedVersion}.zip`;
|
|
29
|
-
const zipPath = path.resolve(path.resolve(dirname, zipFileName));
|
|
30
|
-
|
|
31
|
-
var archive = archiver.create('zip', {});
|
|
32
|
-
var output = fs.createWriteStream(zipPath);
|
|
33
|
-
|
|
34
|
-
// pipe archive data to the file
|
|
35
|
-
archive.pipe(output);
|
|
36
|
-
|
|
37
|
-
output.on('close', function() {
|
|
38
|
-
log(`Created ${zipPath.replace(dirname + '/', '')}, ${archive.pointer()} bytes written\n`);
|
|
39
|
-
|
|
40
|
-
// clean up temp package.json file
|
|
41
|
-
try {
|
|
42
|
-
fs.unlinkSync(path.resolve(dirname, 'packageForSource.json'));
|
|
43
|
-
// deleteFolderRecursive(path.resolve(dirname, 'src'));
|
|
44
|
-
} catch (err) {
|
|
45
|
-
console.error(err);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
output.on('end', function() {
|
|
50
|
-
log('Data has been drained');
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
archive.on('warning', function(err) {
|
|
54
|
-
if (err.code === 'ENOENT') {
|
|
55
|
-
log(err.message);
|
|
56
|
-
} else {
|
|
57
|
-
throw err;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
archive.on('error', function(err) {
|
|
62
|
-
throw err;
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
fs.writeFileSync(
|
|
66
|
-
path.resolve(dirname, 'package.json'),
|
|
67
|
-
JSON.stringify({ ...packageJson, version: updatedVersion }, null, 2) + os.EOL
|
|
68
|
-
);
|
|
69
|
-
|
|
70
|
-
log(
|
|
71
|
-
chalk(
|
|
72
|
-
`NOTE: Version of your app was updated to ${updatedVersion} (package.json), please don't lower it.`
|
|
73
|
-
)
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
fs.writeFileSync(
|
|
77
|
-
path.resolve(dirname, 'packageForSource.json'),
|
|
78
|
-
JSON.stringify(updatedPackage, null, 2) + os.EOL
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
archive.file(path.resolve(dirname, 'packageForSource.json'), {
|
|
82
|
-
name: 'package.json',
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
['manifest.json', 'config-overrides.js', 'tsconfig.json', '.npmrc', 'yarn.lock'].forEach(
|
|
86
|
-
(name) => {
|
|
87
|
-
const file = path.resolve(dirname, name);
|
|
88
|
-
|
|
89
|
-
// not all app templates have the tsconfig, archive will raise an error with missing files, have to filter-out that
|
|
90
|
-
if (!fs.existsSync(file)) return;
|
|
91
|
-
|
|
92
|
-
archive.file(file, { name });
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
archive.directory(path.resolve(dirname, 'src'), 'src');
|
|
97
|
-
|
|
98
|
-
await archive.finalize();
|
|
99
|
-
log(zipPath);
|
|
100
|
-
return zipPath;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
module.exports = compressAppToZip;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
*.zip
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-polling-scheduler-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Polling Scheduler Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js src",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"unit": "jest"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@corva/node-sdk": "^6.2.0"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"jest": "^27.5.1"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
**/*.js
|
|
22
|
-
**/*.js.map
|
|
23
|
-
**/.d.ts
|
|
24
|
-
|
|
25
|
-
*.zip
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-polling-scheduler-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Polling Scheduler Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js lib -x '*.ts'",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json",
|
|
10
|
-
"unit": "jest"
|
|
11
|
-
},
|
|
12
|
-
"jest": {
|
|
13
|
-
"moduleFileExtensions": [
|
|
14
|
-
"js",
|
|
15
|
-
"json",
|
|
16
|
-
"ts"
|
|
17
|
-
],
|
|
18
|
-
"rootDir": ".",
|
|
19
|
-
"testEnvironment": "node",
|
|
20
|
-
"testMatch": [
|
|
21
|
-
"**/*.spec.ts"
|
|
22
|
-
],
|
|
23
|
-
"transform": {
|
|
24
|
-
"^.+\\.ts$": "ts-jest"
|
|
25
|
-
},
|
|
26
|
-
"verbose": true
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@corva/node-sdk": "^6.2.0"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/jest": "^27.4.1",
|
|
33
|
-
"jest": "^27.5.1",
|
|
34
|
-
"ts-jest": "^27.1.4",
|
|
35
|
-
"typescript": "^4.6.3"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": [
|
|
3
|
-
"lib/**/*.ts",
|
|
4
|
-
"index.ts",
|
|
5
|
-
"__tests__"
|
|
6
|
-
],
|
|
7
|
-
"exclude": [
|
|
8
|
-
"node_modules"
|
|
9
|
-
],
|
|
10
|
-
"compilerOptions": {
|
|
11
|
-
"target": "es2019",
|
|
12
|
-
"skipLibCheck": false,
|
|
13
|
-
"baseUrl": "./",
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"checkJs": false,
|
|
18
|
-
"module": "commonjs",
|
|
19
|
-
"alwaysStrict": true,
|
|
20
|
-
"noImplicitAny": true,
|
|
21
|
-
"allowSyntheticDefaultImports": true,
|
|
22
|
-
"declaration": false,
|
|
23
|
-
"sourceMap": true,
|
|
24
|
-
"types": [
|
|
25
|
-
"jest"
|
|
26
|
-
],
|
|
27
|
-
"typeRoots": [
|
|
28
|
-
"./node_modules/@types",
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"typeAcquisition": {
|
|
32
|
-
"enable": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Dev Center Python Polling Scheduler Data App
|
|
2
|
-
|
|
3
|
-
## Getting started
|
|
4
|
-
|
|
5
|
-
[Python SDK Documentation](https://corva-ai.github.io/python-sdk)
|
|
6
|
-
|
|
7
|
-
### 1. Install Dependencies
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
python -m venv venv
|
|
11
|
-
source venv/bin/activate
|
|
12
|
-
pip install -r requirements.txt
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 2. Run Tests
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
pytest
|
|
19
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
*.zip
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-real-time-stream-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Real-Time Stream Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js src",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"unit": "jest"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@corva/node-sdk": "^6.2.0"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"jest": "^27.5.1"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
**/*.js
|
|
22
|
-
**/*.js.map
|
|
23
|
-
**/.d.ts
|
|
24
|
-
|
|
25
|
-
*.zip
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-real-time-stream-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Real-Time Stream Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js lib -x '*.ts'",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json",
|
|
10
|
-
"unit": "jest"
|
|
11
|
-
},
|
|
12
|
-
"jest": {
|
|
13
|
-
"moduleFileExtensions": [
|
|
14
|
-
"js",
|
|
15
|
-
"json",
|
|
16
|
-
"ts"
|
|
17
|
-
],
|
|
18
|
-
"rootDir": ".",
|
|
19
|
-
"testEnvironment": "node",
|
|
20
|
-
"testMatch": [
|
|
21
|
-
"**/*.spec.ts"
|
|
22
|
-
],
|
|
23
|
-
"transform": {
|
|
24
|
-
"^.+\\.ts$": "ts-jest"
|
|
25
|
-
},
|
|
26
|
-
"verbose": true
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@corva/node-sdk": "^6.2.0"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/jest": "^27.4.1",
|
|
33
|
-
"jest": "^27.5.1",
|
|
34
|
-
"ts-jest": "^27.1.4",
|
|
35
|
-
"typescript": "^4.6.3"
|
|
36
|
-
}
|
|
37
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"include": [
|
|
3
|
-
"lib/**/*.ts",
|
|
4
|
-
"index.ts",
|
|
5
|
-
"__tests__"
|
|
6
|
-
],
|
|
7
|
-
"exclude": [
|
|
8
|
-
"node_modules"
|
|
9
|
-
],
|
|
10
|
-
"compilerOptions": {
|
|
11
|
-
"target": "es2019",
|
|
12
|
-
"skipLibCheck": false,
|
|
13
|
-
"baseUrl": "./",
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
"esModuleInterop": true,
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"checkJs": false,
|
|
18
|
-
"module": "commonjs",
|
|
19
|
-
"alwaysStrict": true,
|
|
20
|
-
"noImplicitAny": true,
|
|
21
|
-
"allowSyntheticDefaultImports": true,
|
|
22
|
-
"declaration": false,
|
|
23
|
-
"sourceMap": true,
|
|
24
|
-
"types": [
|
|
25
|
-
"jest"
|
|
26
|
-
],
|
|
27
|
-
"typeRoots": [
|
|
28
|
-
"./node_modules/@types",
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"typeAcquisition": {
|
|
32
|
-
"enable": true
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# Dev Center Python Real-Time Stream Data App
|
|
2
|
-
|
|
3
|
-
## Getting started
|
|
4
|
-
|
|
5
|
-
[Python SDK Documentation](https://corva-ai.github.io/python-sdk)
|
|
6
|
-
|
|
7
|
-
### 1. Install Dependencies
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
python -m venv venv
|
|
11
|
-
source venv/bin/activate
|
|
12
|
-
pip install -r requirements.txt
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### 2. Run Tests
|
|
16
|
-
|
|
17
|
-
```
|
|
18
|
-
pytest
|
|
19
|
-
```
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
*.zip
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-task-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Task Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js src",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"unit": "jest"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {
|
|
12
|
-
"@corva/node-sdk": "^6.2.0"
|
|
13
|
-
},
|
|
14
|
-
"devDependencies": {
|
|
15
|
-
"jest": "^27.5.1"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
|
2
|
-
|
|
3
|
-
# dependencies
|
|
4
|
-
/node_modules
|
|
5
|
-
|
|
6
|
-
# testing
|
|
7
|
-
/coverage
|
|
8
|
-
|
|
9
|
-
# misc
|
|
10
|
-
.env
|
|
11
|
-
.DS_Store
|
|
12
|
-
.env.local
|
|
13
|
-
.env.development.local
|
|
14
|
-
.env.test.local
|
|
15
|
-
.env.production.local
|
|
16
|
-
|
|
17
|
-
npm-debug.log*
|
|
18
|
-
yarn-debug.log*
|
|
19
|
-
yarn-error.log*
|
|
20
|
-
|
|
21
|
-
**/*.js
|
|
22
|
-
**/*.js.map
|
|
23
|
-
**/.d.ts
|
|
24
|
-
|
|
25
|
-
*.zip
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "my-dev-center-task-app",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"description": "My Dev Center Task Data App",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"bundle": "zip -r $npm_package_name-$npm_package_version.zip package.json $LOCKFILE manifest.json index.js lib -x '*.ts'",
|
|
8
|
-
"test": "npm audit --production && npm run unit",
|
|
9
|
-
"build": "tsc -p tsconfig.build.json",
|
|
10
|
-
"unit": "jest"
|
|
11
|
-
},
|
|
12
|
-
"jest": {
|
|
13
|
-
"moduleFileExtensions": [
|
|
14
|
-
"js",
|
|
15
|
-
"json",
|
|
16
|
-
"ts"
|
|
17
|
-
],
|
|
18
|
-
"rootDir": ".",
|
|
19
|
-
"testEnvironment": "node",
|
|
20
|
-
"testMatch": [
|
|
21
|
-
"**/*.spec.ts"
|
|
22
|
-
],
|
|
23
|
-
"transform": {
|
|
24
|
-
"^.+\\.ts$": "ts-jest"
|
|
25
|
-
},
|
|
26
|
-
"verbose": true
|
|
27
|
-
},
|
|
28
|
-
"dependencies": {
|
|
29
|
-
"@corva/node-sdk": "^6.2.0"
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@types/jest": "^27.4.1",
|
|
33
|
-
"jest": "^27.5.1",
|
|
34
|
-
"ts-jest": "^27.1.4",
|
|
35
|
-
"typescript": "^4.6.3"
|
|
36
|
-
}
|
|
37
|
-
}
|