@floless/app 0.109.2 → 0.109.3
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/floless-server.cjs +10 -8
- package/package.json +1 -1
package/dist/floless-server.cjs
CHANGED
|
@@ -53792,7 +53792,7 @@ function appVersion() {
|
|
|
53792
53792
|
return resolveVersion({
|
|
53793
53793
|
isSea: isSea2(),
|
|
53794
53794
|
sqVersionXml: readSqVersionXml(),
|
|
53795
|
-
define: true ? "0.109.
|
|
53795
|
+
define: true ? "0.109.3" : void 0,
|
|
53796
53796
|
pkgVersion: readPkgVersion()
|
|
53797
53797
|
});
|
|
53798
53798
|
}
|
|
@@ -53802,7 +53802,7 @@ function resolveChannel(s) {
|
|
|
53802
53802
|
return "dev";
|
|
53803
53803
|
}
|
|
53804
53804
|
function appChannel() {
|
|
53805
|
-
return resolveChannel({ isSea: isSea2(), define: true ? "0.109.
|
|
53805
|
+
return resolveChannel({ isSea: isSea2(), define: true ? "0.109.3" : void 0 });
|
|
53806
53806
|
}
|
|
53807
53807
|
|
|
53808
53808
|
// workflow-update.ts
|
|
@@ -57673,6 +57673,11 @@ function projectDir(id) {
|
|
|
57673
57673
|
function archiveDir(id) {
|
|
57674
57674
|
return (0, import_node_path20.join)(archiveRoot(), safeProjectId(id));
|
|
57675
57675
|
}
|
|
57676
|
+
function mintProjectId(name, draw = () => (0, import_node_crypto9.randomBytes)(3).toString("hex")) {
|
|
57677
|
+
let id = `${slugify(name)}-${draw()}`;
|
|
57678
|
+
while ((0, import_node_fs22.existsSync)(projectDir(id)) || (0, import_node_fs22.existsSync)(archiveDir(id))) id = `${slugify(name)}-${draw()}`;
|
|
57679
|
+
return id;
|
|
57680
|
+
}
|
|
57676
57681
|
function projectExportsDir(id) {
|
|
57677
57682
|
return (0, import_node_path20.join)(projectDir(id), "exports");
|
|
57678
57683
|
}
|
|
@@ -57730,8 +57735,7 @@ function createProject(input) {
|
|
|
57730
57735
|
const app = typeof input.app === "string" ? input.app.trim() : "";
|
|
57731
57736
|
if (!name) throw new ProjectError("project name required");
|
|
57732
57737
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(app)) throw new ProjectError(`invalid app id: ${app || "(empty)"}`);
|
|
57733
|
-
|
|
57734
|
-
while ((0, import_node_fs22.existsSync)(projectDir(id))) id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
|
|
57738
|
+
const id = mintProjectId(name);
|
|
57735
57739
|
(0, import_node_fs22.mkdirSync)(projectDir(id), { recursive: true });
|
|
57736
57740
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
57737
57741
|
const meta = { id, uuid: (0, import_node_crypto9.randomUUID)(), name, app, createdAt: now, updatedAt: now };
|
|
@@ -57744,8 +57748,7 @@ function renameProject(id, name) {
|
|
|
57744
57748
|
if (typeof name !== "string" || !name.trim()) throw new ProjectError("project name required");
|
|
57745
57749
|
const nextName = name.trim();
|
|
57746
57750
|
if (nextName === meta.name) return meta;
|
|
57747
|
-
|
|
57748
|
-
while ((0, import_node_fs22.existsSync)(projectDir(newId)) || (0, import_node_fs22.existsSync)((0, import_node_path20.join)(archiveRoot(), newId))) newId = `${slugify(nextName)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
|
|
57751
|
+
const newId = mintProjectId(nextName);
|
|
57749
57752
|
const from = projectDir(id), to = projectDir(newId);
|
|
57750
57753
|
try {
|
|
57751
57754
|
(0, import_node_fs22.renameSync)(from, to);
|
|
@@ -57946,8 +57949,7 @@ function importProjectZip(data) {
|
|
|
57946
57949
|
for (let n = 1; takenNames.has(name); n++) name = n === 1 ? `${rawName} (imported)` : `${rawName} (imported ${n})`;
|
|
57947
57950
|
const app = typeof srcMeta.app === "string" ? srcMeta.app.trim() : "";
|
|
57948
57951
|
if (!/^[a-z0-9][a-z0-9._-]*$/i.test(app)) throw new ProjectError(`archive names an invalid app id: ${app || "(empty)"}`);
|
|
57949
|
-
|
|
57950
|
-
while ((0, import_node_fs22.existsSync)(projectDir(id)) || (0, import_node_fs22.existsSync)((0, import_node_path20.join)(archiveRoot(), id))) id = `${slugify(name)}-${(0, import_node_crypto9.randomBytes)(3).toString("hex")}`;
|
|
57952
|
+
const id = mintProjectId(name);
|
|
57951
57953
|
const relOf = (entryPath) => rootPrefix && entryPath.startsWith(rootPrefix) ? entryPath.slice(rootPrefix.length) : entryPath;
|
|
57952
57954
|
const contractEntries = Object.keys(entries2).filter((p) => relOf(p) === "contract.json");
|
|
57953
57955
|
if (contractEntries.length > 1) {
|