@kumologica/sdk 3.5.0-beta8 → 3.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/cli/commands/open.js +16 -7
- package/package.json +4 -4
- package/src/app/lib/github/index.js +2 -0
- package/src/app/lib/serverless/index.js +10 -18
- package/src/app/ui/editor-client/public/red/red.js +3 -1
- package/src/app/ui/editor-client/public/red/red.min.js +1 -1
- package/src/app/ui/editor-client/public/red/style.min.css +1 -1
- package/src/app/ui/editor-client/src/js/ui/footer.js +2 -0
- package/src/app/ui/editor-client/src/js/ui/tab-awsDeploy.js +1 -1
- package/src/app/ui/editor-client/src/sass/editor.scss +0 -1
- package/src/app/ui/editor-client/templates/index.mst +5 -5
package/cli/commands/open.js
CHANGED
|
@@ -41,20 +41,29 @@ async function updater(projectDir) {
|
|
|
41
41
|
|
|
42
42
|
const updater = new Updater(projectDir);
|
|
43
43
|
const updates = updater.updatesAvailable();
|
|
44
|
+
|
|
44
45
|
if (updates.v3) {
|
|
45
46
|
console.log("");
|
|
46
|
-
console.log("This project uses deprecated
|
|
47
|
+
console.log("This project uses the deprecated aws-sdk v2. Migration to aws-sdk v3 is available.");
|
|
47
48
|
console.log("");
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
console.warn("WARNING !!!");
|
|
51
|
-
console.warn("This project has function nodes that use \"aws-sdk\" package. Those functions can not be automatically converted by this command. Manual conversion is required.");
|
|
52
|
-
console.warn("");
|
|
53
|
-
}
|
|
54
|
-
const answer = await confirm({ message: 'Do you wish to upgrade project to aws js sdk v3?' });
|
|
50
|
+
const answer = await confirm({ message: 'Do you wish to migrate the project to aws-sdk v3?' });
|
|
55
51
|
if (!answer) {
|
|
56
52
|
return;
|
|
57
53
|
}
|
|
54
|
+
|
|
55
|
+
if (updater.checkFunctionAWS()) {
|
|
56
|
+
console.log("");
|
|
57
|
+
console.warn("WARNING");
|
|
58
|
+
console.warn("This project contains function nodes that use aws-sdk v2. These functions can not be automatically migrated to aws-sdk v3.");
|
|
59
|
+
console.warn("Manual migration is required. For details, see: https://github.com/aws/aws-sdk-js-v3/blob/main/UPGRADING.md");
|
|
60
|
+
console.warn("");
|
|
61
|
+
const res = await confirm({ message: 'Do you wish to continue with the project migration to aws-sdk v3?' });
|
|
62
|
+
if (!res) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
await updater.update();
|
|
59
68
|
}
|
|
60
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kumologica/sdk",
|
|
3
|
-
"version": "3.5.0
|
|
3
|
+
"version": "3.5.0",
|
|
4
4
|
"productName": "Kumologica Designer",
|
|
5
5
|
"copyright": "Copyright 2020 Kumologica Pty Ltd, All Rights Reserved.",
|
|
6
6
|
"author": "Kumologica Pty Ltd <contact@kumologica.com>",
|
|
@@ -75,9 +75,9 @@
|
|
|
75
75
|
"@aws-sdk/client-sqs": "^3.556.0",
|
|
76
76
|
"@aws-sdk/credential-providers": "^3.556.0",
|
|
77
77
|
"@electron/remote": "^2.0.8",
|
|
78
|
-
"@kumologica/builder": "3.5.0
|
|
79
|
-
"@kumologica/devkit": "3.5.0
|
|
80
|
-
"@kumologica/runtime": "3.5.0
|
|
78
|
+
"@kumologica/builder": "3.5.0",
|
|
79
|
+
"@kumologica/devkit": "3.5.0",
|
|
80
|
+
"@kumologica/runtime": "3.5.0",
|
|
81
81
|
"adm-zip": "0.4.13",
|
|
82
82
|
"ajv": "8.10.0",
|
|
83
83
|
"archive-type": "^4.0.0",
|
|
@@ -57,6 +57,8 @@ class GithubDeployer {
|
|
|
57
57
|
args.region = awsSettings.region;
|
|
58
58
|
args["bucket-name"] = awsSettings.bucket;
|
|
59
59
|
args["output-file-name"] = path.join(projectInfo.projectDir, '.github', 'workflows', 'workflow.yaml');
|
|
60
|
+
args["project-directory"] = projectInfo.projectDir;
|
|
61
|
+
args["flow-file-name"] = projectInfo.projectFlowName;
|
|
60
62
|
|
|
61
63
|
const wfDir = exp("github", "aws", args, console.log);
|
|
62
64
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const fs = require('fs-extra');
|
|
2
2
|
const path = require('path');
|
|
3
|
-
//const AWS = require('aws-sdk');
|
|
4
3
|
const yaml = require('js-yaml');
|
|
5
4
|
const AWSProfile = require('../aws/aws-profile');
|
|
6
5
|
const CASQS = require('../aws/ca-sqs-api');
|
|
@@ -18,18 +17,13 @@ class ServerlessDeployer {
|
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
async initAWS(profile) {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
AWS.config.apiVersions = {
|
|
25
|
-
cloudformation: '2010-05-15'
|
|
20
|
+
const { fromIni } = require("@aws-sdk/credential-providers");
|
|
21
|
+
const config = {
|
|
22
|
+
credentials: fromIni({profile: profile})
|
|
26
23
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
AWS.config.update({region: region});
|
|
32
|
-
this.sqs = new CASQS(this.log.bind(this));
|
|
24
|
+
|
|
25
|
+
this.region = await this.awsProfile.getRegion(profile);
|
|
26
|
+
this.sqs = new CASQS(config, this.log.bind(this));
|
|
33
27
|
}
|
|
34
28
|
|
|
35
29
|
log(text, calog = true) {
|
|
@@ -90,17 +84,15 @@ class ServerlessDeployer {
|
|
|
90
84
|
|
|
91
85
|
await this.initAWS(profile);
|
|
92
86
|
|
|
93
|
-
console.log(`AWS.config = ${JSON.stringify(AWS.config)}`);
|
|
94
|
-
|
|
95
87
|
try {
|
|
96
88
|
this.log('Generating serverless.yml file');
|
|
97
|
-
this.log(` AWS profile: ${
|
|
98
|
-
this.log(` AWS region: ${
|
|
89
|
+
this.log(` AWS profile: ${profile}`, false);
|
|
90
|
+
this.log(` AWS region: ${this.region}`, false);
|
|
99
91
|
|
|
100
92
|
const settings = this.prepare(projectInfo.projectDir, projectInfo.projectFlowName, params.functionName, params.description);
|
|
101
93
|
const nodes = this.loadFlow(path.join(projectInfo.projectDir, projectInfo.projectFlowName));
|
|
102
94
|
|
|
103
|
-
const serverlessTemplate = await this.createServerlessTemplate(params, settings, nodes,
|
|
95
|
+
const serverlessTemplate = await this.createServerlessTemplate(params, settings, nodes, this.region);
|
|
104
96
|
this.createFile(projectInfo.projectDir, `serverless.yml`, serverlessTemplate);
|
|
105
97
|
|
|
106
98
|
const scriptFileName = path.join(projectInfo.projectDir, `serverless.yml`);
|
|
@@ -122,7 +114,7 @@ class ServerlessDeployer {
|
|
|
122
114
|
|
|
123
115
|
provider: {
|
|
124
116
|
name: "aws",
|
|
125
|
-
runtime: "
|
|
117
|
+
runtime: "nodejs18.x",
|
|
126
118
|
deploymentPrefix: "kumologica-sls"
|
|
127
119
|
},
|
|
128
120
|
functions: {},
|
|
@@ -22541,7 +22541,7 @@ RED.view.tools = (function() {
|
|
|
22541
22541
|
|
|
22542
22542
|
$(itemId).on('input', function() {
|
|
22543
22543
|
let id = $(this).val(); // api id
|
|
22544
|
-
|
|
22544
|
+
// alert("Make Ajax call here.2");
|
|
22545
22545
|
|
|
22546
22546
|
$(`#${dataListId}`).find("option").each(function() {
|
|
22547
22547
|
console.log($(this).val() + "<>" + id);
|
|
@@ -26856,6 +26856,8 @@ RED.sidebar.azure = (function () {
|
|
|
26856
26856
|
|
|
26857
26857
|
const initRuntimeVerWidget = () => {
|
|
26858
26858
|
let $runtimeVer = $('#footer-runtime-ver');
|
|
26859
|
+
$('#footer-runtime-value').text(window.__kumologica.runtime.version);
|
|
26860
|
+
|
|
26859
26861
|
RED.popover.create({
|
|
26860
26862
|
target: $runtimeVer,
|
|
26861
26863
|
trigger: 'hover',
|