@lumerahq/cli 0.18.12 → 0.18.13
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.
|
@@ -166,7 +166,7 @@ async function dev(options) {
|
|
|
166
166
|
} = options;
|
|
167
167
|
const projectRoot = process.cwd();
|
|
168
168
|
const parentOrigin = getParentOrigin(apiUrl);
|
|
169
|
-
const lumeraAppUrl = `${parentOrigin}/
|
|
169
|
+
const lumeraAppUrl = `${parentOrigin}/preview_app/${appName}`;
|
|
170
170
|
if (await isPortInUse(port)) {
|
|
171
171
|
console.log(pc.yellow(` Dev server already running on port ${port}, skipping start.`));
|
|
172
172
|
return;
|
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-
|
|
222
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.plan(args.slice(1)));
|
|
223
223
|
break;
|
|
224
224
|
case "apply":
|
|
225
|
-
await import("./resources-
|
|
225
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.apply(args.slice(1)));
|
|
226
226
|
break;
|
|
227
227
|
case "pull":
|
|
228
|
-
await import("./resources-
|
|
228
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.pull(args.slice(1)));
|
|
229
229
|
break;
|
|
230
230
|
case "destroy":
|
|
231
|
-
await import("./resources-
|
|
231
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.destroy(args.slice(1)));
|
|
232
232
|
break;
|
|
233
233
|
case "list":
|
|
234
|
-
await import("./resources-
|
|
234
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.list(args.slice(1)));
|
|
235
235
|
break;
|
|
236
236
|
case "show":
|
|
237
|
-
await import("./resources-
|
|
237
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.show(args.slice(1)));
|
|
238
238
|
break;
|
|
239
239
|
case "diff":
|
|
240
|
-
await import("./resources-
|
|
240
|
+
await import("./resources-KPRAWMQN.js").then((m) => m.diff(args.slice(1)));
|
|
241
241
|
break;
|
|
242
242
|
// Development
|
|
243
243
|
case "dev":
|
|
244
|
-
await import("./dev-
|
|
244
|
+
await import("./dev-R2CZ7IYR.js").then((m) => m.dev(args.slice(1)));
|
|
245
245
|
break;
|
|
246
246
|
case "run":
|
|
247
247
|
await import("./run-JZX3E4UX.js").then((m) => m.run(args.slice(1)));
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-MVUNFAVL.js";
|
|
4
4
|
import {
|
|
5
5
|
deploy
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-SU26C4GL.js";
|
|
7
7
|
import {
|
|
8
8
|
loadEnv
|
|
9
9
|
} from "./chunk-2CR762KB.js";
|
|
@@ -665,6 +665,12 @@ function convertCollectionToApiFormat(local) {
|
|
|
665
665
|
options.collectionId = field.collection;
|
|
666
666
|
options.maxSelect = field.multiple ? 999 : 1;
|
|
667
667
|
}
|
|
668
|
+
if (field.type === "currency") {
|
|
669
|
+
if (field.defaultCurrency) options.defaultCurrency = field.defaultCurrency;
|
|
670
|
+
if (field.decimalPrecision !== void 0) {
|
|
671
|
+
options.decimalPrecision = field.decimalPrecision;
|
|
672
|
+
}
|
|
673
|
+
}
|
|
668
674
|
if (field.max !== void 0) options.max = field.max;
|
|
669
675
|
if (field.min !== void 0) options.min = field.min;
|
|
670
676
|
if (Object.keys(options).length > 0) {
|
|
@@ -692,7 +698,8 @@ function mapFieldType(type) {
|
|
|
692
698
|
relation: "relation",
|
|
693
699
|
file: "lumera_file",
|
|
694
700
|
json: "json",
|
|
695
|
-
editor: "editor"
|
|
701
|
+
editor: "editor",
|
|
702
|
+
currency: "currency"
|
|
696
703
|
};
|
|
697
704
|
return typeMap[type] || type;
|
|
698
705
|
}
|
|
@@ -716,6 +723,14 @@ function fieldsDiffer(local, remote) {
|
|
|
716
723
|
if (localMultiple && remoteMaxSelect <= 1) return true;
|
|
717
724
|
if (!localMultiple && remoteMaxSelect > 1) return true;
|
|
718
725
|
}
|
|
726
|
+
if (local.type === "currency") {
|
|
727
|
+
const localDefaultCurrency = (local.defaultCurrency || "USD").trim().toUpperCase();
|
|
728
|
+
const remoteDefaultCurrency = (opts.defaultCurrency || "USD").trim().toUpperCase();
|
|
729
|
+
if (localDefaultCurrency !== remoteDefaultCurrency) return true;
|
|
730
|
+
const localDecimalPrecision = local.decimalPrecision !== void 0 ? local.decimalPrecision : 2;
|
|
731
|
+
const remoteDecimalPrecision = opts.decimalPrecision !== void 0 ? opts.decimalPrecision : 2;
|
|
732
|
+
if (localDecimalPrecision !== remoteDecimalPrecision) return true;
|
|
733
|
+
}
|
|
719
734
|
const localMin = local.min !== void 0 ? local.min : void 0;
|
|
720
735
|
const remoteMin = opts.min !== void 0 ? opts.min : void 0;
|
|
721
736
|
if (localMin !== remoteMin) return true;
|
|
@@ -1169,6 +1184,12 @@ async function pullCollections(api, platformDir, filterName, appName) {
|
|
|
1169
1184
|
if (field.options.values) localField.values = field.options.values;
|
|
1170
1185
|
if (field.options.collectionId) localField.collection = field.options.collectionId;
|
|
1171
1186
|
if (field.options.maxSelect && field.options.maxSelect > 1) localField.multiple = true;
|
|
1187
|
+
if (field.options.defaultCurrency) {
|
|
1188
|
+
localField.defaultCurrency = field.options.defaultCurrency;
|
|
1189
|
+
}
|
|
1190
|
+
if (field.options.decimalPrecision !== void 0) {
|
|
1191
|
+
localField.decimalPrecision = field.options.decimalPrecision;
|
|
1192
|
+
}
|
|
1172
1193
|
}
|
|
1173
1194
|
return localField;
|
|
1174
1195
|
}),
|