@lumerahq/cli 0.18.10 → 0.18.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.
@@ -142,6 +142,9 @@ function detectRunner(projectRoot) {
142
142
  return ["bunx"];
143
143
  }
144
144
  }
145
+ function getParentOrigin(apiUrl) {
146
+ return apiUrl.replace(/\/api\/?$/, "").replace(/\/$/, "");
147
+ }
145
148
  async function dev(options) {
146
149
  const {
147
150
  token,
@@ -153,6 +156,8 @@ async function dev(options) {
153
156
  apiUrl
154
157
  } = options;
155
158
  const projectRoot = process.cwd();
159
+ const parentOrigin = getParentOrigin(apiUrl);
160
+ const lumeraAppUrl = `${parentOrigin}/custom-app/${appName}?dev`;
156
161
  if (await isPortInUse(port)) {
157
162
  console.log(pc.yellow(` Dev server already running on port ${port}, skipping start.`));
158
163
  return;
@@ -169,7 +174,7 @@ async function dev(options) {
169
174
  console.log(pc.green(" Starting dev server..."));
170
175
  console.log();
171
176
  console.log(pc.cyan(pc.bold(" Open in Lumera (dev mode):")));
172
- console.log(pc.cyan(` https://app.lumerahq.com/custom-app/${appName}?dev`));
177
+ console.log(pc.cyan(` ${lumeraAppUrl}`));
173
178
  console.log();
174
179
  const safeEnvPrefixes = ["VITE_", "LUMERA_", "NODE_", "npm_"];
175
180
  const safeEnvKeys = ["PATH", "HOME", "USER", "SHELL", "TERM", "LANG", "LC_ALL", "TMPDIR", "TZ"];
@@ -192,13 +197,14 @@ async function dev(options) {
192
197
  stdio: "inherit",
193
198
  env: {
194
199
  ...filteredEnv,
195
- VITE_PARENT_ORIGIN: "https://app.lumerahq.com",
200
+ VITE_PARENT_ORIGIN: parentOrigin,
201
+ VITE_PARENT_ORIGINS: parentOrigin,
196
202
  VITE_LUMERA_PROJECT: appName
197
203
  }
198
204
  });
199
205
  setTimeout(() => {
200
206
  console.log();
201
- console.log(pc.cyan(pc.bold(` \u279C Lumera: https://app.lumerahq.com/custom-app/${appName}?dev`)));
207
+ console.log(pc.cyan(pc.bold(` \u279C Lumera: ${lumeraAppUrl}`)));
202
208
  }, 2e3);
203
209
  vite.on("close", (code) => {
204
210
  process.exit(code || 0);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  dev
3
- } from "./chunk-5EBNGMIE.js";
3
+ } from "./chunk-JTDHLA3L.js";
4
4
  import {
5
5
  loadEnv
6
6
  } from "./chunk-2CR762KB.js";
package/dist/index.js CHANGED
@@ -219,29 +219,29 @@ async function main() {
219
219
  switch (command) {
220
220
  // Resource commands
221
221
  case "plan":
222
- await import("./resources-SMMFWICR.js").then((m) => m.plan(args.slice(1)));
222
+ await import("./resources-K6XXMEXX.js").then((m) => m.plan(args.slice(1)));
223
223
  break;
224
224
  case "apply":
225
- await import("./resources-SMMFWICR.js").then((m) => m.apply(args.slice(1)));
225
+ await import("./resources-K6XXMEXX.js").then((m) => m.apply(args.slice(1)));
226
226
  break;
227
227
  case "pull":
228
- await import("./resources-SMMFWICR.js").then((m) => m.pull(args.slice(1)));
228
+ await import("./resources-K6XXMEXX.js").then((m) => m.pull(args.slice(1)));
229
229
  break;
230
230
  case "destroy":
231
- await import("./resources-SMMFWICR.js").then((m) => m.destroy(args.slice(1)));
231
+ await import("./resources-K6XXMEXX.js").then((m) => m.destroy(args.slice(1)));
232
232
  break;
233
233
  case "list":
234
- await import("./resources-SMMFWICR.js").then((m) => m.list(args.slice(1)));
234
+ await import("./resources-K6XXMEXX.js").then((m) => m.list(args.slice(1)));
235
235
  break;
236
236
  case "show":
237
- await import("./resources-SMMFWICR.js").then((m) => m.show(args.slice(1)));
237
+ await import("./resources-K6XXMEXX.js").then((m) => m.show(args.slice(1)));
238
238
  break;
239
239
  case "diff":
240
- await import("./resources-SMMFWICR.js").then((m) => m.diff(args.slice(1)));
240
+ await import("./resources-K6XXMEXX.js").then((m) => m.diff(args.slice(1)));
241
241
  break;
242
242
  // Development
243
243
  case "dev":
244
- await import("./dev-B7K2DXCM.js").then((m) => m.dev(args.slice(1)));
244
+ await import("./dev-GYNUSRUC.js").then((m) => m.dev(args.slice(1)));
245
245
  break;
246
246
  case "run":
247
247
  await import("./run-SQM3OWD2.js").then((m) => m.run(args.slice(1)));
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-NJWVSQEL.js";
4
4
  import {
5
5
  deploy
6
- } from "./chunk-5EBNGMIE.js";
6
+ } from "./chunk-JTDHLA3L.js";
7
7
  import {
8
8
  loadEnv
9
9
  } from "./chunk-2CR762KB.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumerahq/cli",
3
- "version": "0.18.10",
3
+ "version": "0.18.11",
4
4
  "description": "CLI for building and deploying Lumera apps",
5
5
  "type": "module",
6
6
  "engines": {