@contrail/cli 1.0.71 → 2.0.1
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/LICENSE +21 -0
- package/README.md +1034 -5
- package/bin/dev +17 -0
- package/bin/dev.cmd +3 -0
- package/bin/run +5 -0
- package/bin/run.cmd +3 -0
- package/{lib → dist}/api/apps.d.ts +13 -13
- package/dist/api/apps.js +96 -0
- package/{lib → dist}/api/event-workflow-action-definition.d.ts +1 -1
- package/dist/api/event-workflow-action-definition.js +11 -0
- package/{lib → dist}/api/event-workflow-template-definition.d.ts +6 -6
- package/dist/api/event-workflow-template-definition.js +26 -0
- package/{lib → dist}/api/event-workflow-templates.d.ts +7 -7
- package/dist/api/event-workflow-templates.js +32 -0
- package/dist/api/types.d.ts +7 -0
- package/dist/api/types.js +52 -0
- package/{lib → dist}/auth/auth.d.ts +9 -9
- package/dist/auth/auth.js +6 -0
- package/{lib → dist}/auth/login.d.ts +2 -2
- package/{lib → dist}/auth/login.js +146 -141
- package/dist/commands/app/create.d.ts +6 -0
- package/dist/commands/app/create.js +15 -0
- package/dist/commands/app/delete.d.ts +7 -0
- package/dist/commands/app/delete.js +38 -0
- package/dist/commands/app/install.d.ts +11 -0
- package/dist/commands/app/install.js +117 -0
- package/dist/commands/app/publish.d.ts +7 -0
- package/dist/commands/app/publish.js +45 -0
- package/dist/commands/app/uninstall.d.ts +10 -0
- package/dist/commands/app/uninstall.js +58 -0
- package/dist/commands/app/upgrade.d.ts +11 -0
- package/dist/commands/app/upgrade.js +79 -0
- package/dist/commands/colors/deleteAll.d.ts +6 -0
- package/dist/commands/colors/deleteAll.js +30 -0
- package/dist/commands/colors/load.d.ts +6 -0
- package/dist/commands/colors/load.js +29 -0
- package/dist/commands/config/list.d.ts +6 -0
- package/dist/commands/config/list.js +15 -0
- package/dist/commands/config/remove.d.ts +14 -0
- package/dist/commands/config/remove.js +26 -0
- package/dist/commands/config/set.d.ts +13 -0
- package/dist/commands/config/set.js +29 -0
- package/dist/commands/loader-process/load.d.ts +9 -0
- package/dist/commands/loader-process/load.js +33 -0
- package/dist/commands/loader-process/upload-and-load.d.ts +10 -0
- package/dist/commands/loader-process/upload-and-load.js +35 -0
- package/dist/commands/projects/export.d.ts +10 -0
- package/dist/commands/projects/export.js +34 -0
- package/dist/commands/projects/list.d.ts +6 -0
- package/dist/commands/projects/list.js +34 -0
- package/dist/commands/projects/load.d.ts +9 -0
- package/{lib/projects/project-uploader.js → dist/commands/projects/load.js} +106 -105
- package/dist/commands/types/exportOptionSetHierarchies.d.ts +7 -0
- package/{lib/types/option-set-hierarchy-exporter.js → dist/commands/types/exportOptionSetHierarchies.js} +130 -113
- package/{lib/types/types-extractor.d.ts → dist/commands/types/getAll.d.ts} +29 -27
- package/{lib/types/types-extractor.js → dist/commands/types/getAll.js} +267 -318
- package/dist/commands/types/loadAll.d.ts +7 -0
- package/dist/commands/types/loadAll.js +41 -0
- package/dist/commands/types/mergeOptionSets.d.ts +9 -0
- package/{lib/types/option-set-merger.js → dist/commands/types/mergeOptionSets.js} +114 -105
- package/dist/commands/types/mergeTypeProperties.d.ts +11 -0
- package/dist/commands/types/mergeTypeProperties.js +89 -0
- package/dist/commands/types/parseOptionSetsHierarchyLocalFile.d.ts +10 -0
- package/dist/commands/types/parseOptionSetsHierarchyLocalFile.js +112 -0
- package/dist/commands/types/parseOptionSetsLocalFiles.d.ts +14 -0
- package/dist/commands/types/parseOptionSetsLocalFiles.js +153 -0
- package/dist/commands/types/parseOptionSetsToFolderStructure.d.ts +10 -0
- package/dist/commands/types/parseOptionSetsToFolderStructure.js +104 -0
- package/dist/commands/types/parseTypesFromFiles.d.ts +10 -0
- package/dist/commands/types/parseTypesFromFiles.js +34 -0
- package/dist/commands/types/parseTypesFromLocalFiles.d.ts +10 -0
- package/dist/commands/types/parseTypesFromLocalFiles.js +34 -0
- package/dist/commands/types/parseTypesFromTemplateAndDataFromLocalFiles.d.ts +11 -0
- package/dist/commands/types/parseTypesFromTemplateAndDataFromLocalFiles.js +36 -0
- package/dist/commands/types/parseTypesFromTemplateFromLocalFiles.d.ts +10 -0
- package/dist/commands/types/parseTypesFromTemplateFromLocalFiles.js +35 -0
- package/dist/commands/types/uploadOptionSetHierarchies.d.ts +7 -0
- package/{lib/types/option-set-hierarchy-uploader.js → dist/commands/types/uploadOptionSetHierarchies.js} +130 -113
- package/dist/commands/types/uploadOptionSets.d.ts +7 -0
- package/{lib/types/option-set-uploader.js → dist/commands/types/uploadOptionSets.js} +115 -98
- package/dist/commands/types/uploadOptionSetsHierarchyLocalFile.d.ts +11 -0
- package/{lib/types/option-set-hierarchy-parser.js → dist/commands/types/uploadOptionSetsHierarchyLocalFile.js} +128 -140
- package/dist/commands/types/uploadRuleSets.d.ts +7 -0
- package/{lib/types/rule-set-uploader.js → dist/commands/types/uploadRuleSets.js} +189 -172
- package/dist/commands/types/uploadTypePropertyPolicies.d.ts +7 -0
- package/{lib/types/type-property-policy-uploader.js → dist/commands/types/uploadTypePropertyPolicies.js} +195 -178
- package/dist/commands/types/uploadUsageInfo.d.ts +7 -0
- package/{lib/types/usage-info-uploader.js → dist/commands/types/uploadUsageInfo.js} +149 -132
- package/dist/commands/users/export.d.ts +9 -0
- package/dist/commands/users/export.js +60 -0
- package/dist/commands/users/upload.d.ts +9 -0
- package/dist/commands/users/upload.js +65 -0
- package/dist/commands/workflow-template-definitions/install.d.ts +6 -0
- package/dist/commands/workflow-template-definitions/install.js +17 -0
- package/dist/commands/workflow-template-definitions/list.d.ts +6 -0
- package/dist/commands/workflow-template-definitions/list.js +17 -0
- package/dist/commands/workflow-templates/delete.d.ts +6 -0
- package/dist/commands/workflow-templates/delete.js +17 -0
- package/dist/commands/workflow-templates/list.d.ts +6 -0
- package/dist/commands/workflow-templates/list.js +17 -0
- package/dist/commands/workflow-templates/load.d.ts +9 -0
- package/dist/commands/workflow-templates/load.js +21 -0
- package/{lib → dist}/common.d.ts +1 -1
- package/dist/common.js +9 -0
- package/{lib/apps/deploy-app → dist/helpers/app}/actions-deployer.d.ts +11 -11
- package/{lib/apps/deploy-app → dist/helpers/app}/actions-deployer.js +122 -114
- package/{lib/apps/deploy-app → dist/helpers/app}/app-deployer.d.ts +8 -8
- package/{lib/apps/deploy-app → dist/helpers/app}/app-deployer.js +98 -93
- package/{lib/apps/deploy-app → dist/helpers/app}/app-template-parsers.d.ts +7 -7
- package/{lib/apps/deploy-app → dist/helpers/app}/app-template-parsers.js +43 -38
- package/dist/helpers/app/load-app-config.d.ts +1 -0
- package/dist/helpers/app/load-app-config.js +18 -0
- package/dist/helpers/app/setup-template.d.ts +1 -0
- package/dist/helpers/app/setup-template.js +38 -0
- package/dist/helpers/colors/helpers.d.ts +4 -0
- package/dist/helpers/colors/helpers.js +74 -0
- package/{lib → dist/helpers}/config/config.d.ts +6 -6
- package/dist/helpers/config/config.js +76 -0
- package/dist/helpers/loader-process/helpers.d.ts +2 -0
- package/{lib/loader-process/loader-process.js → dist/helpers/loader-process/helpers.js} +98 -120
- package/dist/helpers/projects/helpers.d.ts +2 -0
- package/{lib/projects/project-exporter.js → dist/helpers/projects/helpers.js} +165 -187
- package/{lib → dist/helpers}/types/csv-parser.d.ts +1 -1
- package/{lib → dist/helpers}/types/csv-parser.js +56 -51
- package/dist/helpers/types/type-extractor.d.ts +1 -0
- package/dist/helpers/types/type-extractor.js +32 -0
- package/dist/helpers/types/type-parser.d.ts +4 -0
- package/dist/helpers/types/type-parser.js +118 -0
- package/{lib/types/types-uploader.d.ts → dist/helpers/types/type-uploader.d.ts} +1 -1
- package/{lib/types/types-uploader.js → dist/helpers/types/type-uploader.js} +244 -239
- package/{lib → dist/helpers}/workflow-template-definitions/workflow-template-definition-deployer.d.ts +12 -12
- package/{lib → dist/helpers}/workflow-template-definitions/workflow-template-definition-deployer.js +156 -151
- package/{lib/workflow-templates/local-workflow-template-deployer.d.ts → dist/helpers/workflow-templates/helper.d.ts} +17 -11
- package/dist/helpers/workflow-templates/helper.js +166 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -0
- package/{lib → dist}/interfaces.d.ts +323 -191
- package/dist/interfaces.js +63 -0
- package/{templates → dist/templates}/typescript/Dockerfile +15 -15
- package/{templates → dist/templates}/typescript/README.md +10 -10
- package/{templates → dist/templates}/typescript/app.yml +49 -49
- package/{templates → dist/templates}/typescript/docker_deploy.bat +1 -1
- package/{templates → dist/templates}/typescript/package.json +54 -54
- package/{templates → dist/templates}/typescript/src/actions/logItem.ts +25 -25
- package/{templates → dist/templates}/typescript/src/framework/action-dispatcher.ts +89 -89
- package/{templates → dist/templates}/typescript/src/framework/app-config.ts +26 -26
- package/{templates → dist/templates}/typescript/src/framework/handler.ts +11 -11
- package/{templates → dist/templates}/typescript/src/framework/index.ts +2 -2
- package/{templates → dist/templates}/typescript/src/framework/interfaces.ts +32 -32
- package/{templates → dist/templates}/typescript/src/framework/logger.ts +21 -21
- package/{templates → dist/templates}/typescript/src/framework/mock-server.ts +31 -31
- package/{templates → dist/templates}/typescript/tsconfig.json +28 -28
- package/oclif.manifest.json +821 -0
- package/package.json +116 -72
- package/.eslintrc.js +0 -53
- package/.vscode/settings.json +0 -6
- package/bin/init +0 -4
- package/lib/api/apps.js +0 -85
- package/lib/api/event-workflow-action-definition.js +0 -7
- package/lib/api/event-workflow-template-definition.js +0 -20
- package/lib/api/event-workflow-templates.js +0 -25
- package/lib/apps/create-app/create.d.ts +0 -1
- package/lib/apps/create-app/create.js +0 -60
- package/lib/apps/create-app/setup-template.d.ts +0 -1
- package/lib/apps/create-app/setup-template.js +0 -34
- package/lib/apps/deploy-app/deploy.d.ts +0 -2
- package/lib/apps/deploy-app/deploy.js +0 -58
- package/lib/apps/install-app/app-installer.d.ts +0 -2
- package/lib/apps/install-app/app-installer.js +0 -120
- package/lib/apps/upgrade-app/app-upgrader.d.ts +0 -3
- package/lib/apps/upgrade-app/app-upgrader.js +0 -126
- package/lib/auth/auth.js +0 -2
- package/lib/cli.d.ts +0 -5
- package/lib/cli.js +0 -524
- package/lib/colors/color-loader.d.ts +0 -2
- package/lib/colors/color-loader.js +0 -96
- package/lib/common.js +0 -5
- package/lib/config/config.js +0 -70
- package/lib/config/configCommands.d.ts +0 -3
- package/lib/config/configCommands.js +0 -34
- package/lib/interfaces.js +0 -25
- package/lib/loader-process/loader-process.d.ts +0 -2
- package/lib/projects/interfaces.d.ts +0 -77
- package/lib/projects/interfaces.js +0 -23
- package/lib/projects/project-exporter.d.ts +0 -2
- package/lib/projects/project-uploader.d.ts +0 -1
- package/lib/types/allUploader.d.ts +0 -1
- package/lib/types/allUploader.js +0 -24
- package/lib/types/interfaces.d.ts +0 -55
- package/lib/types/interfaces.js +0 -1
- package/lib/types/option-set-hierarchy-exporter.d.ts +0 -1
- package/lib/types/option-set-hierarchy-parser.d.ts +0 -2
- package/lib/types/option-set-hierarchy-uploader.d.ts +0 -1
- package/lib/types/option-set-merger.d.ts +0 -1
- package/lib/types/option-set-parser.d.ts +0 -3
- package/lib/types/option-set-parser.js +0 -140
- package/lib/types/option-set-uploader.d.ts +0 -1
- package/lib/types/parse-types.d.ts +0 -4
- package/lib/types/parse-types.js +0 -189
- package/lib/types/rule-set-uploader.d.ts +0 -1
- package/lib/types/type-property-policy-uploader.d.ts +0 -1
- package/lib/types/types-properties-merger.d.ts +0 -1
- package/lib/types/types-properties-merger.js +0 -75
- package/lib/types/usage-info-uploader.d.ts +0 -1
- package/lib/users/user-exporter.d.ts +0 -1
- package/lib/users/user-exporter.js +0 -41
- package/lib/users/user-uploader.d.ts +0 -1
- package/lib/users/user-uploader.js +0 -45
- package/lib/workflow-template-definitions/workflow-template-definition-commands.d.ts +0 -2
- package/lib/workflow-template-definitions/workflow-template-definition-commands.js +0 -10
- package/lib/workflow-templates/local-workflow-template-deployer.js +0 -102
- package/lib/workflow-templates/workflow-template-commands.d.ts +0 -4
- package/lib/workflow-templates/workflow-template-commands.js +0 -51
- package/lib/workflow-templates/workflow-template-deployer.d.ts +0 -4
- package/lib/workflow-templates/workflow-template-deployer.js +0 -26
- package/publish.bat +0 -5
- package/publish.sh +0 -5
- package/src/api/apps.ts +0 -97
- package/src/api/event-workflow-action-definition.ts +0 -8
- package/src/api/event-workflow-template-definition.ts +0 -23
- package/src/api/event-workflow-templates.ts +0 -29
- package/src/apps/create-app/create.ts +0 -74
- package/src/apps/create-app/setup-template.ts +0 -38
- package/src/apps/deploy-app/actions-deployer.ts +0 -140
- package/src/apps/deploy-app/app-deployer.ts +0 -105
- package/src/apps/deploy-app/app-template-parsers.ts +0 -44
- package/src/apps/deploy-app/deploy.ts +0 -66
- package/src/apps/install-app/app-installer.ts +0 -126
- package/src/apps/upgrade-app/app-upgrader.ts +0 -132
- package/src/auth/auth.ts +0 -10
- package/src/auth/login.ts +0 -155
- package/src/cli.ts +0 -540
- package/src/colors/color-loader.ts +0 -112
- package/src/colors/colors.csv +0 -866
- package/src/common.ts +0 -5
- package/src/config/config.ts +0 -74
- package/src/config/configCommands.ts +0 -38
- package/src/interfaces.ts +0 -200
- package/src/loader-process/loader-process.ts +0 -152
- package/src/projects/interfaces.ts +0 -73
- package/src/projects/project-exporter.ts +0 -225
- package/src/projects/project-uploader.ts +0 -131
- package/src/types/allUploader.ts +0 -28
- package/src/types/csv-parser.ts +0 -59
- package/src/types/interfaces.ts +0 -58
- package/src/types/option-set-hierarchy-exporter.ts +0 -125
- package/src/types/option-set-hierarchy-parser.ts +0 -169
- package/src/types/option-set-hierarchy-uploader.ts +0 -122
- package/src/types/option-set-merger.ts +0 -124
- package/src/types/option-set-parser.ts +0 -166
- package/src/types/option-set-uploader.ts +0 -108
- package/src/types/parse-types.ts +0 -227
- package/src/types/rule-set-uploader.ts +0 -187
- package/src/types/type-property-policy-uploader.ts +0 -192
- package/src/types/types-extractor.ts +0 -369
- package/src/types/types-properties-merger.ts +0 -90
- package/src/types/types-uploader.ts +0 -271
- package/src/types/usage-info-uploader.ts +0 -139
- package/src/users/user-exporter.ts +0 -52
- package/src/users/user-uploader.ts +0 -58
- package/src/workflow-template-definitions/workflow-template-definition-commands.ts +0 -13
- package/src/workflow-template-definitions/workflow-template-definition-deployer.ts +0 -184
- package/src/workflow-templates/local-workflow-template-deployer.ts +0 -126
- package/src/workflow-templates/workflow-template-commands.ts +0 -59
- package/src/workflow-templates/workflow-template-deployer.ts +0 -30
- package/templates/javascript/actions/example/action.js +0 -38
- package/templates/javascript/app.yml +0 -53
- package/templates/javascript/package.json +0 -23
- package/templates/typescript/package-lock.json +0 -14
- package/tsconfig.json +0 -32
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import inquirer from 'inquirer';
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import { App, AppDeclaration, WorkflowDefinition, WorkflowTemplate } from '../interfaces';
|
|
4
|
-
import { getInstalledApps, getWorkflowTemplateDefinitionsForApp } from '../api/apps';
|
|
5
|
-
import { createWorkflowTemplate } from '../api/event-workflow-templates';
|
|
6
|
-
import { createWorkflowTemplateDefinition, deleteWorkflowTemplateDefinition, updateWorkflowTemplateDefinition as apiUpdateWorkflowTemplateDefinition } from '../api/event-workflow-template-definition';
|
|
7
|
-
import { getActionDeclarationIdentifier, getActionsForApp } from '../apps/deploy-app/actions-deployer';
|
|
8
|
-
|
|
9
|
-
export class WorkflowTemplateDefinitionDeployer {
|
|
10
|
-
|
|
11
|
-
async cliInstallWorkflowTemplateDefinitions() {
|
|
12
|
-
const installedApps = await getInstalledApps();
|
|
13
|
-
if (!installedApps.length) {
|
|
14
|
-
console.log('%s \nNo apps are currently installed. You must install an app before installing its associated workflow template definitions.', chalk.red.bold('WORKFLOW DEFINITION'));
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const answers = await inquirer.prompt([{
|
|
19
|
-
type: 'list',
|
|
20
|
-
name: 'appIdentifier',
|
|
21
|
-
message: 'Which app\'s workflow would you like to install?',
|
|
22
|
-
choices: installedApps.map(x => x.app.identifier)
|
|
23
|
-
}]);
|
|
24
|
-
const app = installedApps.find(x => x.app.identifier === answers.appIdentifier).app;
|
|
25
|
-
const workflowTemplateDefinitions = await getWorkflowTemplateDefinitionsForApp({ appId: app.id });
|
|
26
|
-
for (const definition of workflowTemplateDefinitions) {
|
|
27
|
-
console.log(chalk.yellow.bold(`- ${definition.name}`));
|
|
28
|
-
}
|
|
29
|
-
await this.installWorkflowTemplateDefinitions(workflowTemplateDefinitions);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
async installWorkflowTemplateDefinitions(workflowTemplateDefinitions: WorkflowTemplate[]) {
|
|
33
|
-
let answers = await inquirer.prompt([{
|
|
34
|
-
type: 'checkbox',
|
|
35
|
-
name: 'workflowTemplateDefinitionsToInstall',
|
|
36
|
-
message: 'Which workflow templates would you like to install?',
|
|
37
|
-
choices: workflowTemplateDefinitions.map(x => {return {value: x.identifier, name: x.name};}),
|
|
38
|
-
}]);
|
|
39
|
-
|
|
40
|
-
const workflowTemplateDefinitionsToInstall = workflowTemplateDefinitions.filter(x => answers.workflowTemplateDefinitionsToInstall.includes(x.identifier));
|
|
41
|
-
answers = await inquirer.prompt([{
|
|
42
|
-
type: 'confirm',
|
|
43
|
-
name: 'makeActive',
|
|
44
|
-
message: 'Should the workflows be active ?(yes)',
|
|
45
|
-
default: true,
|
|
46
|
-
}]);
|
|
47
|
-
const makeActive = answers.makeActive;
|
|
48
|
-
for (const definition of workflowTemplateDefinitionsToInstall) {
|
|
49
|
-
const newObject: WorkflowTemplate = {
|
|
50
|
-
name: definition.name,
|
|
51
|
-
triggerKey: definition.triggerKey,
|
|
52
|
-
workflowDefinition: definition.workflowDefinition,
|
|
53
|
-
isActive: makeActive,
|
|
54
|
-
supportingAppId: definition.supportingAppId,
|
|
55
|
-
};
|
|
56
|
-
await createWorkflowTemplate(newObject);
|
|
57
|
-
}
|
|
58
|
-
console.log('%s \nInstalled workflows', chalk.green.bold('WORKFLOW DEFINITION'));
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
async listWorkflowTemplateDefinitions() {
|
|
62
|
-
const installedApps = await getInstalledApps();
|
|
63
|
-
const workflowTemplateDefinitions = [];
|
|
64
|
-
for (const appOrg of installedApps) {
|
|
65
|
-
workflowTemplateDefinitions.push(...await (await getWorkflowTemplateDefinitionsForApp({ appId: appOrg.appId })).map(
|
|
66
|
-
x => {
|
|
67
|
-
return {
|
|
68
|
-
appName: appOrg.app.name,
|
|
69
|
-
workflowName: x.name,
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
));
|
|
73
|
-
}
|
|
74
|
-
console.log('(app name) workflow name');
|
|
75
|
-
console.log('------------------------');
|
|
76
|
-
console.log(chalk.green.bold(workflowTemplateDefinitions.map(x => `(${x.appName}) ${x.workflowName} `).join('\n')));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
async deployWorkflowTemplateDefinitions(appDeclaration: AppDeclaration, app: App) {
|
|
80
|
-
|
|
81
|
-
// FETCH ALL WORKFLOWS FROM THE API.
|
|
82
|
-
const existingWorkflows = await getWorkflowTemplateDefinitionsForApp({ appId: app.id });
|
|
83
|
-
|
|
84
|
-
// UPSERT / DELETE BASED ON WORKFLOW IDENTIFIER
|
|
85
|
-
console.log('%s \tDeploying workflow definitions.', chalk.yellow.bold('WORKFLOW DEFINITION'));
|
|
86
|
-
|
|
87
|
-
if (appDeclaration.workflows) {
|
|
88
|
-
const localWorkflows = Object.keys(appDeclaration.workflows);
|
|
89
|
-
if (localWorkflows?.length > 0) {
|
|
90
|
-
for (const workflowKey of localWorkflows) {
|
|
91
|
-
await this.deployWorkflow(
|
|
92
|
-
workflowKey, appDeclaration.workflows[workflowKey] as WorkflowDefinition,
|
|
93
|
-
app,
|
|
94
|
-
existingWorkflows,
|
|
95
|
-
);
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// remove old templates that were removed by the app publisher
|
|
100
|
-
const localIdentifiers = localWorkflows.map(x=> this.getWorkflowDeclarationIdentifier(x, app));
|
|
101
|
-
const workflowTemplateDefinitionsToDelete = existingWorkflows.filter(x=> !localIdentifiers.includes(x.identifier));
|
|
102
|
-
for(const templateToDelete of workflowTemplateDefinitionsToDelete) {
|
|
103
|
-
await deleteWorkflowTemplateDefinition(templateToDelete.id);
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
async deployWorkflow(workflowKey: string, workflow: WorkflowDefinition, app: App, existingWorkflows: Array<any>) {
|
|
109
|
-
console.log(`%s \tDeploying workflow definitions: ${workflowKey}`, chalk.yellow.bold('WORKFLOW DEFINITION'));
|
|
110
|
-
|
|
111
|
-
const identifier = this.getWorkflowDeclarationIdentifier(workflowKey, app);
|
|
112
|
-
const existingDefinition = existingWorkflows.find(ad => ad.identifier === identifier);
|
|
113
|
-
|
|
114
|
-
if (existingDefinition) {
|
|
115
|
-
return await this.updateWorkflowTemplateDefinition(existingDefinition, workflow, app);
|
|
116
|
-
}
|
|
117
|
-
return await this.createNewWorkflowDefinition(workflowKey, workflow, app);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
private async createNewWorkflowDefinition(workflowKey: string, workflowDeclaration: WorkflowDefinition, app: App) {
|
|
121
|
-
await this.populateActionIds(workflowDeclaration, app);
|
|
122
|
-
const newObject: WorkflowDefinition = {
|
|
123
|
-
identifier: this.getWorkflowDeclarationIdentifier(workflowKey, app),
|
|
124
|
-
name: workflowDeclaration.name,
|
|
125
|
-
ownerKey: `app:${app.id}`,
|
|
126
|
-
triggerKey: workflowDeclaration.triggerKey,
|
|
127
|
-
workflowDefinition: workflowDeclaration.workflowDefinition,
|
|
128
|
-
public: workflowDeclaration.public,
|
|
129
|
-
isActive: workflowDeclaration.isActive,
|
|
130
|
-
messageGroupId: workflowDeclaration.messageGroupId,
|
|
131
|
-
parallelWorkerCount: workflowDeclaration.parallelWorkerCount,
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
const workflowTemplate = await createWorkflowTemplateDefinition(newObject);
|
|
135
|
-
|
|
136
|
-
console.log(`%s Created new workflow definition definitions: ${workflowKey}`, chalk.yellow.bold('WORKFLOW DEFINITION'));
|
|
137
|
-
|
|
138
|
-
return workflowTemplate;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
private async populateActionIds(workflowDefinition: WorkflowDefinition, app: App) {
|
|
142
|
-
const availableAppActions = await getActionsForApp(app);
|
|
143
|
-
if (!workflowDefinition.workflowDefinition?.paths) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
for (const path of workflowDefinition.workflowDefinition.paths) {
|
|
147
|
-
if (!path?.actionDefinitionConfigs) {
|
|
148
|
-
continue;
|
|
149
|
-
}
|
|
150
|
-
for (const actionConfiguration of path.actionDefinitionConfigs) {
|
|
151
|
-
const actionKey = actionConfiguration.action;
|
|
152
|
-
const action = availableAppActions.find(
|
|
153
|
-
action => action.identifier === getActionDeclarationIdentifier(actionKey, app)
|
|
154
|
-
);
|
|
155
|
-
if (!action) {
|
|
156
|
-
throw new Error(`Could not find action ${actionKey} declared in workflow definition ${workflowDefinition.name}`);
|
|
157
|
-
}
|
|
158
|
-
actionConfiguration.id = action.id;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
private async updateWorkflowTemplateDefinition(existingWorkflowDefinition: WorkflowDefinition, workflowDefinition: WorkflowDefinition, app: App) {
|
|
164
|
-
await this.populateActionIds(workflowDefinition, app);
|
|
165
|
-
const updates = Object.assign(new Object(), {
|
|
166
|
-
name: workflowDefinition.name,
|
|
167
|
-
triggerKey: workflowDefinition.triggerKey,
|
|
168
|
-
workflowDefinition: workflowDefinition.workflowDefinition,
|
|
169
|
-
messageGroupId: workflowDefinition.messageGroupId,
|
|
170
|
-
parallelWorkerCount: workflowDefinition.parallelWorkerCount,
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
const updatedWorkflowDefinition = await apiUpdateWorkflowTemplateDefinition({ id: existingWorkflowDefinition.id, updates });
|
|
174
|
-
|
|
175
|
-
console.log(`%s Updated existing workflow definition: ${updatedWorkflowDefinition.identifier}`, chalk.yellow.bold('WORKFLOW DEFINITION'));
|
|
176
|
-
|
|
177
|
-
return updatedWorkflowDefinition;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
getWorkflowDeclarationIdentifier(actionKey, app: App) {
|
|
181
|
-
return app.identifier + ':' + actionKey;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import { getEventWorkflowActionDefinition } from '../api/event-workflow-action-definition';
|
|
3
|
-
import { createWorkflowTemplate, deleteWorkflowTemplate, getExistingWorkflowTemplates, updateWorkflowTemplate as apiUpdateWorkflowTemplate } from '../api/event-workflow-templates';
|
|
4
|
-
import { WorkflowTemplate, WorkflowTemplateDeclaration } from '../interfaces';
|
|
5
|
-
|
|
6
|
-
export class LocalWorkflowTemplateDeployer {
|
|
7
|
-
async deployWorkflows(wtDeclaration: WorkflowTemplateDeclaration) {
|
|
8
|
-
|
|
9
|
-
// FETCH ALL WORKFLOWS FROM THE API.
|
|
10
|
-
const existingWorkflows = await getExistingWorkflowTemplates();
|
|
11
|
-
|
|
12
|
-
// UPSERT / DELETE BASED ON WORKFLOW TEMPLATES IDENTIFIER
|
|
13
|
-
console.log('%s \tDeploying workflow templates.', chalk.yellow.bold('WORKFLOW TEMPLATES'));
|
|
14
|
-
|
|
15
|
-
for (const workflowKey of Object.keys(wtDeclaration.workflows)) {
|
|
16
|
-
await this.deployWorkflowTemplate(
|
|
17
|
-
workflowKey,
|
|
18
|
-
wtDeclaration.workflows[workflowKey] as WorkflowTemplate,
|
|
19
|
-
existingWorkflows,
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
async deployWorkflowTemplate(workflowKey: string, workflow: WorkflowTemplate, existingWorkflows: Array<any>) {
|
|
25
|
-
console.log(`%s \tDeploying workflow: ${workflowKey}`, chalk.yellow.bold('WORKFLOW TEMPLATES'));
|
|
26
|
-
|
|
27
|
-
const identifier = getWorkflowTemplateIdentifier(workflowKey);
|
|
28
|
-
const existingTemplate = existingWorkflows.find(ad => ad.identifier === identifier);
|
|
29
|
-
|
|
30
|
-
if (existingTemplate) {
|
|
31
|
-
return await this.updateWorkflowTemplate(workflowKey, existingTemplate, workflow);
|
|
32
|
-
}
|
|
33
|
-
return await this.createNewWorkflowTemplate(workflowKey, workflow);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private async createNewWorkflowTemplate(workflowKey: string, workflowTemplate: WorkflowTemplate) {
|
|
37
|
-
await this.populateActionIds(workflowTemplate, workflowKey);
|
|
38
|
-
const newObject: WorkflowTemplate = {
|
|
39
|
-
identifier: getWorkflowTemplateIdentifier(workflowKey),
|
|
40
|
-
name: workflowTemplate.name,
|
|
41
|
-
triggerKey: workflowTemplate.triggerKey,
|
|
42
|
-
workflowDefinition: workflowTemplate.workflowDefinition,
|
|
43
|
-
isActive: workflowTemplate.isActive,
|
|
44
|
-
supportingAppId: workflowTemplate.supportingAppId,
|
|
45
|
-
messageGroupId: workflowTemplate.messageGroupId,
|
|
46
|
-
parallelWorkerCount: workflowTemplate.parallelWorkerCount,
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const newWorkflowTemplate = await createWorkflowTemplate(newObject);
|
|
50
|
-
console.log(`%s Created new workflow definition: ${workflowKey}`, chalk.yellow.bold('WORKFLOW TEMPLATES'));
|
|
51
|
-
|
|
52
|
-
return newWorkflowTemplate;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
private async populateActionIds(workflowTemplate: WorkflowTemplate, workflowKey: string) {
|
|
56
|
-
if (!workflowTemplate?.workflowDefinition?.paths) {
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
for (const path of workflowTemplate.workflowDefinition.paths) {
|
|
60
|
-
if (!path?.actionDefinitionConfigs) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
for (const actionConfiguration of path.actionDefinitionConfigs) {
|
|
64
|
-
const actionKey = actionConfiguration.action;
|
|
65
|
-
try {
|
|
66
|
-
const actionEntity: any = await getActionByIdentifier(actionKey);
|
|
67
|
-
actionConfiguration.id = actionEntity.id;
|
|
68
|
-
} catch (e) {
|
|
69
|
-
console.log(e);
|
|
70
|
-
}
|
|
71
|
-
if(!actionConfiguration.id) {
|
|
72
|
-
throw new Error(`Could not find action ${actionKey} declared in ${workflowKey}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
private async updateWorkflowTemplate(workflowKey: string, existingWorkflowTemplate: WorkflowTemplate, workflowTemplate: WorkflowTemplate) {
|
|
79
|
-
await this.populateActionIds(workflowTemplate, workflowKey);
|
|
80
|
-
const updates = Object.assign(new Object(), {
|
|
81
|
-
name: workflowTemplate.name,
|
|
82
|
-
triggerKey: workflowTemplate.triggerKey,
|
|
83
|
-
workflowDefinition: workflowTemplate.workflowDefinition
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const updatedWorkflowTemplate = await apiUpdateWorkflowTemplate({id: existingWorkflowTemplate.id, updates});
|
|
87
|
-
|
|
88
|
-
console.log(`%s Updated existing workflow template: ${updatedWorkflowTemplate.identifier}`, chalk.yellow.bold('WORKFLOW TEMPLATES'));
|
|
89
|
-
|
|
90
|
-
return updatedWorkflowTemplate;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
public async deleteWorkflowTemplates(wtDeclaration: WorkflowTemplateDeclaration) {
|
|
94
|
-
// FETCH ALL WORKFLOWS FROM THE API.
|
|
95
|
-
const existingWorkflows = await getExistingWorkflowTemplates();
|
|
96
|
-
|
|
97
|
-
// UPSERT / DELETE BASED ON WORKFLOW TEMPLATES IDENTIFIER
|
|
98
|
-
console.log('%s \tDELETING workflow templates.', chalk.yellow.bold('WORKFLOW TEMPLATES'));
|
|
99
|
-
|
|
100
|
-
for (const workflowKey of Object.keys(wtDeclaration.workflows)) {
|
|
101
|
-
const identifier = getWorkflowTemplateIdentifier(workflowKey);
|
|
102
|
-
const existingTemplate = existingWorkflows.find(ad => ad.identifier === identifier);
|
|
103
|
-
|
|
104
|
-
if (existingTemplate) {
|
|
105
|
-
try {
|
|
106
|
-
await deleteWorkflowTemplate(identifier);
|
|
107
|
-
} catch (e) {
|
|
108
|
-
console.log('%s \tFAILED to delete workflow template %s.', chalk.red.bold('WORKFLOW TEMPLATES'), identifier);
|
|
109
|
-
}
|
|
110
|
-
} else {
|
|
111
|
-
console.log('%s \tUnable to locate workflow template %s.', chalk.yellow.bold('WORKFLOW TEMPLATES'), identifier);
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
export function getWorkflowTemplateIdentifier(workflowKey: string) {
|
|
120
|
-
return workflowKey;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
export async function getActionByIdentifier(identifier: string) {
|
|
124
|
-
const result = await getEventWorkflowActionDefinition({identifier});
|
|
125
|
-
return result.length > 0? result[0]: {};
|
|
126
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import chalk from 'chalk';
|
|
3
|
-
import fs from 'fs';
|
|
4
|
-
import { authUser } from '../auth/login';
|
|
5
|
-
import { WorkflowTemplateDeclaration } from '../interfaces';
|
|
6
|
-
import { getSeparatorByPlatform } from '../common';
|
|
7
|
-
const yaml = require('js-yaml');
|
|
8
|
-
import { LocalWorkflowTemplateDeployer } from './local-workflow-template-deployer';
|
|
9
|
-
import { WorkflowTemplateDeployer } from './workflow-template-deployer';
|
|
10
|
-
|
|
11
|
-
export async function deleteWorkflowTemplates() {
|
|
12
|
-
await authUser();
|
|
13
|
-
await new WorkflowTemplateDeployer().deleteWorkflowTemplates();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export async function localDeleteWorkflowTemplate() {
|
|
17
|
-
let wtDeclaration: WorkflowTemplateDeclaration;
|
|
18
|
-
try {
|
|
19
|
-
wtDeclaration = loadTemplateConfig();
|
|
20
|
-
}
|
|
21
|
-
catch (e) {
|
|
22
|
-
console.log(`%s Workflow Deletion Failed. ${e}`, chalk.red.bold('FAIL'));
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
await authUser();
|
|
27
|
-
await new LocalWorkflowTemplateDeployer().deleteWorkflowTemplates(wtDeclaration);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export async function localDeployWorkflowTemplate() {
|
|
31
|
-
let wtDeclaration: WorkflowTemplateDeclaration;
|
|
32
|
-
try {
|
|
33
|
-
wtDeclaration = loadTemplateConfig();
|
|
34
|
-
}
|
|
35
|
-
catch (e) {
|
|
36
|
-
console.log(`%s Workflow Deletion Failed. ${e}`, chalk.red.bold('FAIL'));
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
await authUser();
|
|
41
|
-
await new LocalWorkflowTemplateDeployer().deployWorkflows(wtDeclaration);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export async function listWorkflowTemplate() {
|
|
45
|
-
await authUser();
|
|
46
|
-
return await new WorkflowTemplateDeployer().listExistingWorkflowTemplates();
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function loadTemplateConfig() {
|
|
50
|
-
const TARGET_DIR = process.cwd();
|
|
51
|
-
try {
|
|
52
|
-
const separator = getSeparatorByPlatform();
|
|
53
|
-
const doc = yaml.load(fs.readFileSync(TARGET_DIR + separator + 'workflow.yml', 'utf8'));
|
|
54
|
-
console.log(doc);
|
|
55
|
-
return doc;
|
|
56
|
-
} catch (e) {
|
|
57
|
-
throw new Error(`ERROR PARSING YAML: ${e}`);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import inquirer from 'inquirer';
|
|
3
|
-
import { deleteWorkflowTemplate as apiDeleteWorkflowTemplate } from '../api/event-workflow-templates';
|
|
4
|
-
import { getExistingWorkflowTemplates } from '../api/event-workflow-templates';
|
|
5
|
-
|
|
6
|
-
export class WorkflowTemplateDeployer {
|
|
7
|
-
|
|
8
|
-
async deleteWorkflowTemplates() {
|
|
9
|
-
|
|
10
|
-
// FETCH ALL WORKFLOWS FROM THE API.
|
|
11
|
-
const existingWorkflows = await getExistingWorkflowTemplates();
|
|
12
|
-
const answers = await inquirer.prompt([{
|
|
13
|
-
type: 'checkbox',
|
|
14
|
-
name: 'wfTemplatesToDelete',
|
|
15
|
-
message: 'Which templates would you like to delete (one or more)?',
|
|
16
|
-
choices: existingWorkflows.map(x => { return { value: x.id, name: `(${x.createdOn}) ${x.name}` }; })
|
|
17
|
-
}]);
|
|
18
|
-
for (const idToDelete of answers.wfTemplatesToDelete) {
|
|
19
|
-
await apiDeleteWorkflowTemplate(idToDelete);
|
|
20
|
-
}
|
|
21
|
-
console.log('%s \tDeleted workflow templates!', chalk.green.bold('WORKFLOW TEMPLATES'));
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public async listExistingWorkflowTemplates() {
|
|
25
|
-
const templates = await getExistingWorkflowTemplates();
|
|
26
|
-
console.log('(Date Created) (active) workflow name');
|
|
27
|
-
console.log('------------------------');
|
|
28
|
-
console.log(chalk.green.bold(templates.map(x => `(${x.createdOn}) (${x.isActive? 'active': 'inactive'}) ${x.name} `).join('\n')));
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
async function execute(config, event, Functions) {
|
|
2
|
-
const getBodyFromEvent = (config, event) => {
|
|
3
|
-
let body = Functions.stringUtil.parseVariables(config.message, event);
|
|
4
|
-
console.log('body: ', body);
|
|
5
|
-
if (config.sendDetails) {
|
|
6
|
-
const data = event;
|
|
7
|
-
const properties = {};
|
|
8
|
-
let addedProperty = false;
|
|
9
|
-
for (const property of config.fieldsToForward) {
|
|
10
|
-
const variableLevels = property.split('.');
|
|
11
|
-
let replacementValue = data;
|
|
12
|
-
for (let i = 0; i < variableLevels.length; i++) {
|
|
13
|
-
replacementValue = replacementValue[variableLevels[i]];
|
|
14
|
-
}
|
|
15
|
-
properties[property] = replacementValue;
|
|
16
|
-
addedProperty = true;
|
|
17
|
-
}
|
|
18
|
-
if (addedProperty) {
|
|
19
|
-
body = body + ' Properties: ' + JSON.stringify(properties) + '.';
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
return JSON.stringify({ text: body });
|
|
23
|
-
};
|
|
24
|
-
const body = getBodyFromEvent(config, event);
|
|
25
|
-
console.log('Sending message: ', body);
|
|
26
|
-
const response = await Functions.fetch(config.url, {
|
|
27
|
-
method: 'POST',
|
|
28
|
-
body: body,
|
|
29
|
-
headers: { 'Content-Type': 'application/json' }
|
|
30
|
-
});
|
|
31
|
-
if (!response.ok) {
|
|
32
|
-
console.log('Webhook event failed to publish');
|
|
33
|
-
console.log('Response: ', JSON.stringify(response));
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
console.log('Published!');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
appIdentifier: "@your-co/app-name"
|
|
2
|
-
appName: "Your App Name"
|
|
3
|
-
appDescription: "Your app description."
|
|
4
|
-
visibility: public
|
|
5
|
-
publisher: "Your company name"
|
|
6
|
-
version: 1.0
|
|
7
|
-
|
|
8
|
-
# eventWorkflowTriggerKeyMapping will be used to parse an incoming event into a key that can trigger workflows
|
|
9
|
-
# {} indicates a field on the event. You can use nested fields by separating the levels with a '.'
|
|
10
|
-
# i.e. an event {details: {eventType: 'apparel'}, actionType: 'create'} can be parsed to apparel|create with the following
|
|
11
|
-
eventWorkflowTriggerKeyMapping: "{details.eventType}|{actionType}"
|
|
12
|
-
|
|
13
|
-
appConfiguration:
|
|
14
|
-
apiHost:
|
|
15
|
-
label: "API Host"
|
|
16
|
-
propertyType: "string"
|
|
17
|
-
userName:
|
|
18
|
-
label: "User Name"
|
|
19
|
-
propertyType: "string"
|
|
20
|
-
password:
|
|
21
|
-
label: "Password"
|
|
22
|
-
propertyType: "string"
|
|
23
|
-
|
|
24
|
-
actions:
|
|
25
|
-
updateProduct:
|
|
26
|
-
handler: actions/example/action.js
|
|
27
|
-
name: "Update Product"
|
|
28
|
-
description: "Updates a product in the destination system."
|
|
29
|
-
actionConfiguration:
|
|
30
|
-
email:
|
|
31
|
-
label: "Email Address"
|
|
32
|
-
propertyType: "string"
|
|
33
|
-
|
|
34
|
-
triggers:
|
|
35
|
-
trigger1:
|
|
36
|
-
key: product|create
|
|
37
|
-
name: "External Product Created"
|
|
38
|
-
external: true
|
|
39
|
-
description: "Triggers on externally created products"
|
|
40
|
-
|
|
41
|
-
# workflows:
|
|
42
|
-
# workflow1:
|
|
43
|
-
# triggerKey: item|update
|
|
44
|
-
# isActive: true
|
|
45
|
-
# name: test wf from cli
|
|
46
|
-
# workflowDefinition:
|
|
47
|
-
# paths:
|
|
48
|
-
# - conditional: "true"
|
|
49
|
-
# actionDefinitionConfigs:
|
|
50
|
-
# - action: updateProduct
|
|
51
|
-
# name: handle product update
|
|
52
|
-
# config:
|
|
53
|
-
# message: "hello world"
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"bin": {
|
|
7
|
-
"@contrail/contrail-cli": "bin/init",
|
|
8
|
-
"contrail": "bin/init"
|
|
9
|
-
},
|
|
10
|
-
"publishConfig": {
|
|
11
|
-
"access": "public"
|
|
12
|
-
},
|
|
13
|
-
"scripts": {
|
|
14
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
],
|
|
18
|
-
"author": "",
|
|
19
|
-
"license": "ISC",
|
|
20
|
-
"dependencies": {
|
|
21
|
-
"chalk": "^4.0.0"
|
|
22
|
-
}
|
|
23
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "test-app",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"lockfileVersion": 1,
|
|
5
|
-
"requires": true,
|
|
6
|
-
"dependencies": {
|
|
7
|
-
"typescript": {
|
|
8
|
-
"version": "4.7.4",
|
|
9
|
-
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
|
|
10
|
-
"integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
|
|
11
|
-
"dev": true
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es2017",
|
|
4
|
-
"module": "esnext",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"esModuleInterop": true,
|
|
7
|
-
"outDir": "./lib",
|
|
8
|
-
"strict": false,
|
|
9
|
-
"experimentalDecorators": true,
|
|
10
|
-
"strictPropertyInitialization": false,
|
|
11
|
-
"noImplicitAny": false,
|
|
12
|
-
"emitDecoratorMetadata": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"moduleResolution": "node",
|
|
15
|
-
"lib": [
|
|
16
|
-
"es5",
|
|
17
|
-
"ES2015",
|
|
18
|
-
"ES2016",
|
|
19
|
-
"ES2017",
|
|
20
|
-
"ES2020",
|
|
21
|
-
"dom",
|
|
22
|
-
"esnext.asynciterable"
|
|
23
|
-
]
|
|
24
|
-
},
|
|
25
|
-
"include": [
|
|
26
|
-
"src"
|
|
27
|
-
],
|
|
28
|
-
"exclude": [
|
|
29
|
-
"node_modules",
|
|
30
|
-
"**/__tests__/*"
|
|
31
|
-
]
|
|
32
|
-
}
|