@occam-scaly/scaly-cli 0.2.9 → 0.2.11

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/bin/scaly.js CHANGED
@@ -142,7 +142,7 @@ function main(argv) {
142
142
  }
143
143
 
144
144
  if (cmd === 'doctor') {
145
- return runDoctor(args.slice(1)).then((code) => process.exit(code));
145
+ return runDoctor(args).then((code) => process.exit(code));
146
146
  }
147
147
 
148
148
  if (cmd === 'user-groups') {
package/lib/scaly-plan.js CHANGED
@@ -92,6 +92,21 @@ async function buildPlan({ config, env, appName }) {
92
92
  const ops = [];
93
93
  const normalizedEnv = normalizeEnv(env);
94
94
 
95
+ const desiredApps = (config.apps || []).filter(Boolean);
96
+ const filteredApps = appName
97
+ ? desiredApps.filter((a) => a && a.name === appName)
98
+ : desiredApps;
99
+ if (appName && filteredApps.length === 0) {
100
+ const e = new Error(
101
+ `Unknown app '${appName}'. Available: ${(desiredApps || [])
102
+ .map((a) => a && a.name)
103
+ .filter(Boolean)
104
+ .join(', ')}`
105
+ );
106
+ e.code = 'SCALY_APP_NOT_FOUND_IN_CONFIG';
107
+ throw e;
108
+ }
109
+
95
110
  if (config?.stack?.region) {
96
111
  warnings.push(
97
112
  'config.stack.region is currently informational only (Stack has no region field in the API).'
@@ -195,21 +210,6 @@ async function buildPlan({ config, env, appName }) {
195
210
  }
196
211
  }
197
212
 
198
- const desiredApps = (config.apps || []).filter(Boolean);
199
- const filteredApps = appName
200
- ? desiredApps.filter((a) => a && a.name === appName)
201
- : desiredApps;
202
- if (appName && filteredApps.length === 0) {
203
- const e = new Error(
204
- `Unknown app '${appName}'. Available: ${(desiredApps || [])
205
- .map((a) => a && a.name)
206
- .filter(Boolean)
207
- .join(', ')}`
208
- );
209
- e.code = 'SCALY_APP_NOT_FOUND_IN_CONFIG';
210
- throw e;
211
- }
212
-
213
213
  if ((desiredApps || []).some((a) => a && a.path)) {
214
214
  warnings.push(
215
215
  'apps[].path is currently informational only (plan/apply does not inspect your source tree yet).'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@occam-scaly/scaly-cli",
3
- "version": "0.2.9",
3
+ "version": "0.2.11",
4
4
  "description": "Scaly CLI (auth + project config helpers)",
5
5
  "bin": {
6
6
  "scaly": "./bin/scaly.js"