@certik/skynet 0.9.4 → 0.9.5

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,12 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.5
4
+
5
+ - Fixed deploy issue when selector value contains special characters
6
+
3
7
  ## 0.9.4
4
8
 
5
- - Update Polygon Node to Certik Node
9
+ - Updated Polygon Node to Certik Node
6
10
 
7
11
  ## 0.9.3
8
12
 
9
- - Update BSC Archive Node to NodeReal
13
+ - Updated BSC Archive Node to NodeReal
10
14
 
11
15
  ## 0.9.2
12
16
 
package/deploy.js CHANGED
@@ -173,6 +173,10 @@ EOH
173
173
  }
174
174
  }`;
175
175
 
176
+ function normalizeSelectorValue(v) {
177
+ return v.replace(/[^A-Za-z0-9]+/g, "-");
178
+ }
179
+
176
180
  function getJobName(name, selectorFlags, mode = null) {
177
181
  const selectorNamePart = Object.keys(selectorFlags)
178
182
  .sort()
@@ -186,7 +190,8 @@ function getJobName(name, selectorFlags, mode = null) {
186
190
  }
187
191
 
188
192
  if (selectorNamePart.length > 0) {
189
- jobName += `-${selectorNamePart}`;
193
+ // handle special case
194
+ jobName += `-${normalizeSelectorValue(selectorNamePart)}`;
190
195
  }
191
196
 
192
197
  return jobName;
package/examples/indexer CHANGED
@@ -36,13 +36,17 @@ async function check({ protocol, state, verbose }) {
36
36
 
37
37
  const app = indexer({
38
38
  name: "LibSkynetExampleIndexer",
39
+
39
40
  selector: {
41
+ // for more flags check meow documentation at https://github.com/sindresorhus/meow
40
42
  protocol: {
41
43
  type: "string",
42
44
  description: "which chain to index"
43
45
  }
44
46
  },
45
47
 
48
+ env: {},
49
+
46
50
  build: {
47
51
  func: build,
48
52
  schedule: every(1).minute,
@@ -33,7 +33,16 @@ async function check({ mode, protocol, state, verbose }) {
33
33
 
34
34
  const app = modeIndexer({
35
35
  name: "LibSkynetExampleModeIndexer",
36
- selector: { protocol: { type: "string", description: "which chain to index" } },
36
+
37
+ selector: {
38
+ // for more flags check meow documentation at https://github.com/sindresorhus/meow
39
+ protocol: {
40
+ type: "string",
41
+ description: "which chain to index",
42
+ },
43
+ },
44
+
45
+ env: {},
37
46
 
38
47
  state: {
39
48
  type: "block", // can be omitted, default is block
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@certik/skynet",
3
- "version": "0.9.4",
3
+ "version": "0.9.5",
4
4
  "description": "Skynet Shared JS library",
5
5
  "main": "index.js",
6
6
  "author": "CertiK Engineering",