@lumerahq/cli 0.19.9-dev.1 → 0.19.9-dev.2

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/index.js CHANGED
@@ -219,25 +219,25 @@ async function main() {
219
219
  switch (command) {
220
220
  // Resource commands
221
221
  case "plan":
222
- await import("./resources-5ELZGJOH.js").then((m) => m.plan(args.slice(1)));
222
+ await import("./resources-ZFGJITDH.js").then((m) => m.plan(args.slice(1)));
223
223
  break;
224
224
  case "apply":
225
- await import("./resources-5ELZGJOH.js").then((m) => m.apply(args.slice(1)));
225
+ await import("./resources-ZFGJITDH.js").then((m) => m.apply(args.slice(1)));
226
226
  break;
227
227
  case "pull":
228
- await import("./resources-5ELZGJOH.js").then((m) => m.pull(args.slice(1)));
228
+ await import("./resources-ZFGJITDH.js").then((m) => m.pull(args.slice(1)));
229
229
  break;
230
230
  case "destroy":
231
- await import("./resources-5ELZGJOH.js").then((m) => m.destroy(args.slice(1)));
231
+ await import("./resources-ZFGJITDH.js").then((m) => m.destroy(args.slice(1)));
232
232
  break;
233
233
  case "list":
234
- await import("./resources-5ELZGJOH.js").then((m) => m.list(args.slice(1)));
234
+ await import("./resources-ZFGJITDH.js").then((m) => m.list(args.slice(1)));
235
235
  break;
236
236
  case "show":
237
- await import("./resources-5ELZGJOH.js").then((m) => m.show(args.slice(1)));
237
+ await import("./resources-ZFGJITDH.js").then((m) => m.show(args.slice(1)));
238
238
  break;
239
239
  case "diff":
240
- await import("./resources-5ELZGJOH.js").then((m) => m.diff(args.slice(1)));
240
+ await import("./resources-ZFGJITDH.js").then((m) => m.diff(args.slice(1)));
241
241
  break;
242
242
  // Development
243
243
  case "dev":
@@ -142,9 +142,47 @@ function extractConfigBody(content) {
142
142
  const m = content.match(CONFIG_BLOCK_RE);
143
143
  return m ? m[1] : null;
144
144
  }
145
+ function stripJsComments(source) {
146
+ let out = "";
147
+ let inString = null;
148
+ let prev = "";
149
+ let i = 0;
150
+ while (i < source.length) {
151
+ const ch = source[i];
152
+ const next = source[i + 1];
153
+ if (inString) {
154
+ out += ch;
155
+ if (ch === inString && prev !== "\\") inString = null;
156
+ prev = ch;
157
+ i++;
158
+ continue;
159
+ }
160
+ if (ch === '"' || ch === "'" || ch === "`") {
161
+ inString = ch;
162
+ out += ch;
163
+ prev = ch;
164
+ i++;
165
+ continue;
166
+ }
167
+ if (ch === "/" && next === "/") {
168
+ while (i < source.length && source[i] !== "\n") i++;
169
+ continue;
170
+ }
171
+ if (ch === "/" && next === "*") {
172
+ i += 2;
173
+ while (i < source.length && !(source[i] === "*" && source[i + 1] === "/")) i++;
174
+ i += 2;
175
+ continue;
176
+ }
177
+ out += ch;
178
+ prev = ch;
179
+ i++;
180
+ }
181
+ return out;
182
+ }
145
183
  function extractTopLevelConfigKeys(configBody) {
146
184
  if (!configBody.startsWith("{") || !configBody.endsWith("}")) return [];
147
- const inner = configBody.slice(1, -1);
185
+ const inner = stripJsComments(configBody.slice(1, -1));
148
186
  let stripped = "";
149
187
  let depth = 0;
150
188
  let inString = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.19.9-dev.1",
3
+ "version": "0.19.9-dev.2",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {