@certik/skynet 0.10.64 → 0.10.66
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 +8 -0
- package/api.js +3 -3
- package/bun.lockb +0 -0
- package/deploy.js +9 -9
- package/package.json +6 -3
package/CHANGELOG.md
CHANGED
package/api.js
CHANGED
|
@@ -90,7 +90,7 @@ const apiKeyMiddleware = (key) => {
|
|
|
90
90
|
|
|
91
91
|
async function startApiApp({ binaryName, name, selector = {}, routes, serve, beforeListen }) {
|
|
92
92
|
const app = express();
|
|
93
|
-
app.use(express.json());
|
|
93
|
+
app.use(express.json({ limit: "20mb" }));
|
|
94
94
|
|
|
95
95
|
const cli = meow(
|
|
96
96
|
`
|
|
@@ -111,7 +111,7 @@ ${getSelectorDesc(selector)}
|
|
|
111
111
|
default: false,
|
|
112
112
|
},
|
|
113
113
|
},
|
|
114
|
-
}
|
|
114
|
+
},
|
|
115
115
|
);
|
|
116
116
|
|
|
117
117
|
const { verbose, ...selectorFlags } = cli.flags;
|
|
@@ -150,7 +150,7 @@ ${getSelectorDesc(selector)}
|
|
|
150
150
|
|
|
151
151
|
next();
|
|
152
152
|
},
|
|
153
|
-
logEndMiddleware
|
|
153
|
+
logEndMiddleware,
|
|
154
154
|
);
|
|
155
155
|
}
|
|
156
156
|
}
|
package/bun.lockb
ADDED
|
Binary file
|
package/deploy.js
CHANGED
|
@@ -118,7 +118,7 @@ const genConfig = ({
|
|
|
118
118
|
command = "sh"
|
|
119
119
|
args = [
|
|
120
120
|
"-c",
|
|
121
|
-
"cd \${meta.skynet_code_path}/infra-nomad/log-shipper && yarn install --silent && exec bin/shipper --path ${jobName} --opensearch"
|
|
121
|
+
"cd \${meta.skynet_code_path}/infra-nomad/log-shipper && if [ -e bun.lockb ]; then bun install --silent; else yarn install --silent; fi && exec bin/shipper --path ${jobName} --opensearch"
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -146,7 +146,7 @@ const genConfig = ({
|
|
|
146
146
|
command = "sh"
|
|
147
147
|
args = [
|
|
148
148
|
"-c",
|
|
149
|
-
"cd \${meta.skynet_code_path}/${workingDirectory} && yarn install --silent && exec ${cmd}"
|
|
149
|
+
"cd \${meta.skynet_code_path}/${workingDirectory} && if [ -e bun.lockb ]; then bun install --silent; else yarn install --silent; fi&& exec ${cmd}"
|
|
150
150
|
]
|
|
151
151
|
}
|
|
152
152
|
|
|
@@ -236,7 +236,7 @@ async function prepareNomad(isProduction) {
|
|
|
236
236
|
console.log("Deploy locally, please start nomad server in a separate terminal");
|
|
237
237
|
console.log(`You can start nomad server by running ${chalk.inverse(`${skynetDir}/infra-nomad/dev/start.sh`)}`);
|
|
238
238
|
console.log(
|
|
239
|
-
`Then you can visit ${chalk.underline("http://localhost:4646/ui/jobs")} to check submitted dev jobs.\n
|
|
239
|
+
`Then you can visit ${chalk.underline("http://localhost:4646/ui/jobs")} to check submitted dev jobs.\n`,
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
@@ -259,8 +259,8 @@ async function getNomadPath() {
|
|
|
259
259
|
} catch (missingNomad) {
|
|
260
260
|
console.log(
|
|
261
261
|
`Deploy requires ${chalk.bold("nomad")} binary, please follow ${chalk.underline(
|
|
262
|
-
"https://learn.hashicorp.com/tutorials/nomad/get-started-install"
|
|
263
|
-
)} for installation
|
|
262
|
+
"https://learn.hashicorp.com/tutorials/nomad/get-started-install",
|
|
263
|
+
)} for installation`,
|
|
264
264
|
);
|
|
265
265
|
|
|
266
266
|
throw new Error("missing nomad binary");
|
|
@@ -305,8 +305,8 @@ async function runNomadJob(nomadPath, nomadAddr, jobName, nomadJobDefinition, is
|
|
|
305
305
|
|
|
306
306
|
console.log(
|
|
307
307
|
`Failed to run ${chalk.bold("nomad")} commands, please ensure nomad server is accessible at ${chalk.bold(
|
|
308
|
-
nomadAddr
|
|
309
|
-
)}
|
|
308
|
+
nomadAddr,
|
|
309
|
+
)}`,
|
|
310
310
|
);
|
|
311
311
|
|
|
312
312
|
throw new Error("nomad execution error");
|
|
@@ -526,7 +526,7 @@ ${getSelectorDesc(selector)}
|
|
|
526
526
|
default: false,
|
|
527
527
|
},
|
|
528
528
|
},
|
|
529
|
-
}
|
|
529
|
+
},
|
|
530
530
|
);
|
|
531
531
|
|
|
532
532
|
return deployMode(cli.flags).catch((err) => {
|
|
@@ -678,7 +678,7 @@ ${getSelectorDesc(selector)}
|
|
|
678
678
|
default: false,
|
|
679
679
|
},
|
|
680
680
|
},
|
|
681
|
-
}
|
|
681
|
+
},
|
|
682
682
|
);
|
|
683
683
|
|
|
684
684
|
return deployModeless(cli.flags).catch((err) => {
|
package/package.json
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@certik/skynet",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.66",
|
|
4
4
|
"description": "Skynet Shared JS library",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "CertiK Engineering",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"lint": "eslint *.js test",
|
|
9
|
-
"test": "doppler run -- ava"
|
|
9
|
+
"test": "doppler run -- ava",
|
|
10
|
+
"format": "prettier --write '*.js' '**/*.js'",
|
|
11
|
+
"pub": "npm publish --access public"
|
|
10
12
|
},
|
|
11
13
|
"engines": {
|
|
12
14
|
"node": ">= 14"
|
|
@@ -33,7 +35,8 @@
|
|
|
33
35
|
"ava": "^5.0.1",
|
|
34
36
|
"eslint": "^8.39.0",
|
|
35
37
|
"eslint-plugin-import": "^2.27.5",
|
|
38
|
+
"prettier": "^3.0.3",
|
|
36
39
|
"sinon": "^14.0.0"
|
|
37
40
|
},
|
|
38
41
|
"license": "MIT"
|
|
39
|
-
}
|
|
42
|
+
}
|