runcloud 0.2.145 → 0.2.146
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/dist/commands/misc.js +7 -2
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/runcloud-0.2.146.tgz +0 -0
- package/runcloud-0.2.145.tgz +0 -0
package/dist/commands/misc.js
CHANGED
|
@@ -5,6 +5,11 @@ export function assertDevOnly(env, command) {
|
|
|
5
5
|
throw new Error(`\`newly ${command}\` is dev-only from the CLI. Prod ${command} requires the Newly web app (a browser session).`);
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
+
export function assertKnownEnv(env, command) {
|
|
9
|
+
if (env !== 'dev' && env !== 'prod') {
|
|
10
|
+
throw new Error(`\`newly ${command}\` --env must be dev or prod (got ${JSON.stringify(env)})`);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
8
13
|
export function parseDuration(s) {
|
|
9
14
|
const m = /^(\d+)(s|m|h)$/.exec(s.trim());
|
|
10
15
|
if (!m)
|
|
@@ -128,7 +133,7 @@ export function registerMisc(program) {
|
|
|
128
133
|
.option('--project <id>', 'project id')
|
|
129
134
|
.action(async (opts) => {
|
|
130
135
|
try {
|
|
131
|
-
|
|
136
|
+
assertKnownEnv(opts.env, 'secrets list');
|
|
132
137
|
const { client, projectId } = makeClient(opts.project);
|
|
133
138
|
console.log(await listSecrets(client, projectId, opts.env, opts.service));
|
|
134
139
|
}
|
|
@@ -146,7 +151,7 @@ export function registerMisc(program) {
|
|
|
146
151
|
.option('--project <id>', 'project id')
|
|
147
152
|
.action(async (key, value, opts) => {
|
|
148
153
|
try {
|
|
149
|
-
|
|
154
|
+
assertKnownEnv(opts.env, 'secrets set');
|
|
150
155
|
const { client, projectId } = makeClient(opts.project);
|
|
151
156
|
await setSecret(client, projectId, opts.env, opts.service, key, value);
|
|
152
157
|
console.log(`Secret ${key} set for ${opts.service} (${opts.env}). Redeploy to apply.`);
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const CLI_VERSION = '0.2.
|
|
1
|
+
export const CLI_VERSION = '0.2.146';
|
package/package.json
CHANGED
|
Binary file
|
package/runcloud-0.2.145.tgz
DELETED
|
Binary file
|