@kumologica/sdk 3.2.0-beta22 → 3.2.0-beta24

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "productName": "Kumologica Designer",
4
4
  "copyright": "Copyright 2020 Kumologica Pty Ltd, All Rights Reserved.",
5
5
  "author": "Kumologica Pty Ltd <contact@kumologica.com>",
6
- "version": "3.2.0-beta22",
6
+ "version": "3.2.0-beta24",
7
7
  "description": "Kumologica Designer, harnessing Serverless for your cloud integration needs",
8
8
  "main": "src/app/main.js",
9
9
  "files": [
@@ -64,9 +64,9 @@
64
64
  "license": "Proprietary",
65
65
  "dependencies": {
66
66
  "@electron/remote": "^2.0.8",
67
- "@kumologica/builder": ".2.0-beta22",
68
- "@kumologica/devkit": "3.2.0-beta22",
69
- "@kumologica/runtime": "3.2.0-beta22",
67
+ "@kumologica/builder": "3.2.0-beta24",
68
+ "@kumologica/devkit": "3.2.0-beta24",
69
+ "@kumologica/runtime": "3.2.0-beta24",
70
70
  "adm-zip": "0.4.13",
71
71
  "ajv": "8.10.0",
72
72
  "archive-type": "^4.0.0",
@@ -153,7 +153,6 @@ class AWSDeployer {
153
153
  }
154
154
 
155
155
  const deploymentStart = Date.now();
156
- var lambdaArn;
157
156
 
158
157
  this.log(`Deployment to AWS Started:`);
159
158
  this.log(` ${this.chalk('#F5DEB3', 'flow:')} ${this.chalk('whiteBright', projectInfo.projectFlowName)}`, false);
@@ -212,7 +211,7 @@ class AWSDeployer {
212
211
  }
213
212
  */
214
213
 
215
- lambdaArn = stackDetails.Stacks[0].Outputs[0].OutputValue;
214
+ const res = this.parseStackOutput(stackDetails);
216
215
 
217
216
  this.log(JSON.stringify(stackDetails));
218
217
  this.log(`${this.chalk('greenBright', 'Deployment successful.')}`);
@@ -222,7 +221,7 @@ class AWSDeployer {
222
221
  )}`,
223
222
  false
224
223
  );
225
- this.log(` ${this.chalk('#F5DEB3', 'LambdaArn:')} ${this.chalk('whiteBright',lambdaArn)}`, false);
224
+ this.log(` ${this.chalk('#F5DEB3', 'LambdaArn:')} ${this.chalk('whiteBright',res.LambdaArn)}`, false);
226
225
  this.log('', false);
227
226
 
228
227
  // this call to be moved out to the terminals panel
@@ -238,38 +237,58 @@ class AWSDeployer {
238
237
  //this.s3.deleteS3Bucket(deploymentBucketName);
239
238
  }
240
239
 
241
- if (lambdaArn) {
242
- // response = await this.runTriggers(params, settings, lambdaArn);
243
- const url = `https://${response.apiId}.execute-api.${AWS.config.region}.amazonaws.com/${response.stage}`;
244
- this.printSignature(url, flowListeners, params);
245
- }
240
+ //response = await this.runTriggers(params, settings, lambdaArn);
241
+ this.printSignature(flowListeners, params);
246
242
  }
247
243
 
248
- printSignature(url, s, p) {
244
+ parseStackOutput(stackDetails) {
245
+ let res = {};
246
+ stackDetails.Stacks[0].Outputs.forEach(o => {
247
+ res[o.OutputKey] = o.OutputValue;
248
+ });
249
+ return res;
250
+ }
251
+
252
+ printSignature(s, p) {
249
253
  this.log(' ')
250
254
 
251
255
  if (s.api && s.api.length > 0) {
252
- this.log('API Gateway:');
253
- s.api.forEach(a => this.log(` ${(' ' + a.verb.toUpperCase()).slice(-6)} ${url}${a.url}`), this);
254
- this.log('');
256
+ const _api = p.events.find(e => e.source === "api");
257
+ if (_api) {
258
+ this.log('API Gateway:');
259
+
260
+ const _api = p.events.find(e => e.source === "api");
261
+ let url = `https://${_api.api}.execute-api.${AWS.config.region}.amazonaws.com/${_api.stage}`;
262
+ s.api.forEach(a => this.log(` ${(' ' + a.verb.toUpperCase()).slice(-6)} ${url}${a.url}`), this);
263
+ this.log('');
264
+ }
255
265
  }
256
266
 
257
267
  if (s.dynamodb && s.dynamodb.length > 0) {
258
- this.log('DynamoDB Streams:');
259
- s.dynamodb.forEach(a => this.log(` ${a.startingPosition} ${a.stream}`), this);
260
- this.log('');
268
+ const _ddb = p.events.find(e => e.source === "dynamodb");
269
+ if (_ddb) {
270
+ this.log('DynamoDB Streams:');
271
+ s.dynamodb.forEach(a => this.log(` ${a.startingPosition} ${a.stream}`), this);
272
+ this.log('');
273
+ }
261
274
  }
262
275
 
263
276
  if (s.s3 && s.s3.length > 0) {
264
- this.log('S3:');
265
- s.s3.forEach(a => this.log(` ${a.eventType} ${a.bucket}`), this);
266
- this.log('');
277
+ const _s3 = p.events.find(e => e.source === "s3");
278
+ if (_s3) {
279
+ this.log('S3:');
280
+ s.s3.forEach(a => this.log(` ${a.eventType} ${a.bucket}`), this);
281
+ this.log('');
282
+ }
267
283
  }
268
284
 
269
285
  if (s.sns && s.sns.length > 0) {
270
- this.log('SNS Topics:');
271
- s.sns.forEach(a => this.log(` ${a.topic}`), this);
272
- this.log('');
286
+ const _sns = p.events.find(e => e.source === "sns");
287
+ if (_sns) {
288
+ this.log('SNS Topics:');
289
+ s.sns.forEach(a => this.log(` ${a.topic}`), this);
290
+ this.log('');
291
+ }
273
292
  }
274
293
 
275
294
  if (s.iot && s.iot.length > 0) {
@@ -293,22 +312,22 @@ if (p.events && p.events.length > 0) {
293
312
  }
294
313
  }
295
314
 
296
- if (s.alexa && s.alexa.length > 0) {
297
- this.log('Alexa Skills:');
298
- s.alexa.forEach(a => this.log(` ${a.skillId}`), this);
299
- this.log('');
300
- }
301
-
302
315
  if (s.kinesis && s.kinesis.length > 0) {
303
- this.log('Kinesis:');
304
- s.kinesis.forEach(a => this.log(` ${a.startingPosition} ${a.stream}`), this);
305
- this.log('');
316
+ const _k = p.events.find(e => e.source === "kinesis");
317
+ if (_k) {
318
+ this.log('Kinesis:');
319
+ s.kinesis.forEach(a => this.log(` ${a.startingPosition} ${a.stream}`), this);
320
+ this.log('');
321
+ }
306
322
  }
307
323
 
308
324
  if (s.cwevents && s.cwevents.length > 0) {
309
- this.log('Cloud Watch Events Rules:');
310
- s.cwevents.forEach(a => this.log(` ${a.rule}`), this);
311
- this.log('');
325
+ const _ev = p.events.find(e => e.source === "event");
326
+ if (_ev) {
327
+ this.log('Cloud Watch Events Rules:');
328
+ s.cwevents.forEach(a => this.log(` ${a.rule}`), this);
329
+ this.log('');
330
+ }
312
331
  }
313
332
  }
314
333
 
@@ -31083,9 +31083,9 @@ RED.editor = (function () {
31083
31083
  resize: function (dimensions) {
31084
31084
  editTrayWidthCache[type] = dimensions.width;
31085
31085
  $('.editor-tray-content').height(dimensions.height - 50);
31086
- var form = $('.editor-tray-content form').height(
31087
- dimensions.height - 50 - 40
31088
- );
31086
+ // var form = $('.editor-tray-content form').height(
31087
+ // dimensions.height - 50 - 40
31088
+ // );
31089
31089
  if (editing_node && editing_node._def.oneditresize) {
31090
31090
  try {
31091
31091
  editing_node._def.oneditresize.call(editing_node, {