@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 +1 -1
- package/lib/scaly-plan.js +15 -15
- package/package.json +1 -1
package/bin/scaly.js
CHANGED
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).'
|