@certik/skynet 0.17.0-beta → 0.17.0-beta2
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 +1 -0
- package/app.js +10 -5
- package/env.js +2 -6
- package/indexer.js +0 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/app.js
CHANGED
|
@@ -140,12 +140,13 @@ function indexer({ name, selector, build, env = {}, region = "skynet-dc1" }) {
|
|
|
140
140
|
},
|
|
141
141
|
onDeploy: () => {
|
|
142
142
|
const bin = detectBin();
|
|
143
|
+
const needDoppler = Object.values(env).some((v) => v === SENSITIVE_VALUE);
|
|
143
144
|
|
|
144
145
|
const { deploy } = createDeploy({
|
|
145
146
|
binaryName: `${getBinaryName()} deploy`,
|
|
146
147
|
name,
|
|
147
148
|
workingDirectory: detectWorkingDirectory(),
|
|
148
|
-
bin: `${bin} run`,
|
|
149
|
+
bin: needDoppler ? `doppler run -- ${bin} run` : `${bin} run`,
|
|
149
150
|
selector,
|
|
150
151
|
region,
|
|
151
152
|
env,
|
|
@@ -229,12 +230,13 @@ function modeIndexer({ name, selector, state, build, validate, env = {}, region
|
|
|
229
230
|
},
|
|
230
231
|
onDeploy: () => {
|
|
231
232
|
const bin = detectBin();
|
|
233
|
+
const needDoppler = Object.values(env).some((v) => v === SENSITIVE_VALUE);
|
|
232
234
|
|
|
233
235
|
const { deploy } = createModeDeploy({
|
|
234
236
|
binaryName: `${getBinaryName()} deploy`,
|
|
235
237
|
name,
|
|
236
238
|
workingDirectory: detectWorkingDirectory(),
|
|
237
|
-
bin: `${bin} run`,
|
|
239
|
+
bin: needDoppler ? `doppler run -- ${bin} run` : `${bin} run`,
|
|
238
240
|
selector,
|
|
239
241
|
region,
|
|
240
242
|
env,
|
|
@@ -323,12 +325,13 @@ function producer({ name, selector, produce, state, env = {}, region = "skynet-d
|
|
|
323
325
|
},
|
|
324
326
|
onDeploy: () => {
|
|
325
327
|
const bin = detectBin();
|
|
328
|
+
const needDoppler = Object.values(env).some((v) => v === SENSITIVE_VALUE);
|
|
326
329
|
|
|
327
330
|
const { deploy } = createDeploy({
|
|
328
331
|
binaryName: `${getBinaryName()} deploy`,
|
|
329
332
|
name,
|
|
330
333
|
workingDirectory: detectWorkingDirectory(),
|
|
331
|
-
bin: `${bin} run`,
|
|
334
|
+
bin: needDoppler ? `doppler run -- ${bin} run` : `${bin} run`,
|
|
332
335
|
selector,
|
|
333
336
|
region,
|
|
334
337
|
env: envWithDefaultValues,
|
|
@@ -395,12 +398,13 @@ function consumer({ name, selector, consume, env = {}, region = "skynet-dc1" })
|
|
|
395
398
|
},
|
|
396
399
|
onDeploy: () => {
|
|
397
400
|
const bin = detectBin();
|
|
401
|
+
const needDoppler = Object.values(env).some((v) => v === SENSITIVE_VALUE);
|
|
398
402
|
|
|
399
403
|
const { deploy } = createDeploy({
|
|
400
404
|
binaryName: `${getBinaryName()} deploy`,
|
|
401
405
|
name,
|
|
402
406
|
workingDirectory: detectWorkingDirectory(),
|
|
403
|
-
bin: `${bin} run`,
|
|
407
|
+
bin: needDoppler ? `doppler run -- ${bin} run` : `${bin} run`,
|
|
404
408
|
selector,
|
|
405
409
|
region,
|
|
406
410
|
env: envWithDefaultValues,
|
|
@@ -494,12 +498,13 @@ function api({ name, routes, serve, beforeListen, env = {}, region = "skynet-dc1
|
|
|
494
498
|
},
|
|
495
499
|
onDeploy: () => {
|
|
496
500
|
const bin = detectBin();
|
|
501
|
+
const needDoppler = Object.values(env).some((v) => v === SENSITIVE_VALUE);
|
|
497
502
|
|
|
498
503
|
const { deploy } = createDeploy({
|
|
499
504
|
binaryName: `${getBinaryName()} deploy`,
|
|
500
505
|
name,
|
|
501
506
|
workingDirectory: detectWorkingDirectory(),
|
|
502
|
-
bin: `${bin} run`,
|
|
507
|
+
bin: needDoppler ? `doppler run -- ${bin} run` : `${bin} run`,
|
|
503
508
|
selector,
|
|
504
509
|
region,
|
|
505
510
|
env,
|
package/env.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
function getAWSAccessKeyId() {
|
|
2
|
-
return
|
|
2
|
+
return getEnvOrThrow("SKYNET_AWS_ACCESS_KEY_ID");
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
function getAWSSecretAccessKey() {
|
|
6
|
-
return
|
|
6
|
+
return getEnvOrThrow("SKYNET_AWS_SECRET_ACCESS_KEY");
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
function getAWSSDKConfig() {
|
|
@@ -11,10 +11,6 @@ function getAWSSDKConfig() {
|
|
|
11
11
|
const accessKeyId = getAWSAccessKeyId();
|
|
12
12
|
const secretAccessKey = getAWSSecretAccessKey();
|
|
13
13
|
|
|
14
|
-
if (!accessKeyId || !secretAccessKey) {
|
|
15
|
-
return { region };
|
|
16
|
-
}
|
|
17
|
-
|
|
18
14
|
return {
|
|
19
15
|
region,
|
|
20
16
|
credentials: {
|
package/indexer.js
CHANGED
|
@@ -608,11 +608,6 @@ ${getSelectorDesc(selector)}
|
|
|
608
608
|
throw new Error(`[INDEXER] Build failed due to critical errors`);
|
|
609
609
|
}
|
|
610
610
|
|
|
611
|
-
await createRecord(STATE_TABLE_NAME, {
|
|
612
|
-
name: `${name}UpdatedAt(${toSelectorString(selectorFlags)})`,
|
|
613
|
-
value: new Date().toISOString(),
|
|
614
|
-
});
|
|
615
|
-
|
|
616
611
|
inline.log(`[INDEXER] build successfully in ${Date.now() - startTime}ms`);
|
|
617
612
|
}
|
|
618
613
|
|