@certik/skynet 0.10.48-beta.2 → 0.10.48

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.48
4
+
5
+ - Fixed multiline secret production deployment bug
6
+ - Removed distributed lock used by api
7
+
3
8
  ## 0.10.47
4
9
 
5
10
  - Added killTimeout config to `app`
package/deploy.js CHANGED
@@ -24,7 +24,9 @@ const INTERVAL_ALIASES = {
24
24
  function buildEnvTemplate(additionalEnv, isProduction) {
25
25
  return Object.keys(additionalEnv)
26
26
  .map((key) => {
27
- return `${key}=${additionalEnv[key] || getEnvironmentVariableValue(key, isProduction)}`;
27
+ return `${key}=${
28
+ additionalEnv[key] ? `"${additionalEnv[key]}"` : getEnvironmentVariableValue(key, isProduction)
29
+ }`;
28
30
  })
29
31
  .join("\n");
30
32
  }
@@ -34,10 +36,10 @@ function getEnvironmentVariableValue(name, isProduction) {
34
36
  return `{{key "secrets/${name}" | toJSON}}`;
35
37
  } else {
36
38
  if (!process.env[name]) {
37
- return "";
39
+ return `""`;
38
40
  }
39
41
 
40
- return process.env[name];
42
+ return `"${process.env[name]}"`;
41
43
  }
42
44
  }
43
45
 
package/kafka.js CHANGED
@@ -5,6 +5,7 @@ const { Kafka, logLevel } = require("kafkajs");
5
5
  const { getJobName, getSelectorFlags, getSelectorDesc, toSelectorString } = require("./selector");
6
6
  const { createRecord, getRecordByKey, deleteRecordsByHashKey } = require("./dynamodb");
7
7
  const { exponentialRetry } = require("./availability");
8
+ const { useLock } = require("./distributed-lock");
8
9
  const { getBinaryName } = require("./cli");
9
10
  const { inline } = require("./log");
10
11
 
@@ -218,6 +219,8 @@ ${getSelectorDesc(selector)}
218
219
  process.exit(0);
219
220
  }
220
221
 
222
+ await useLock({ name: getJobName(name, selectorFlags), ttl: 50, verbose });
223
+
221
224
  if (!from) {
222
225
  const prevId = await getProducerLatestId(name, selectorFlags);
223
226
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.10.48-beta.2",
3
+ "version": "0.10.48",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",