@naisys/erp 3.0.0-beta.22 → 3.0.0-beta.24
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/client-dist/assets/{index-BJzK1WXg.js → index-DycEn-R_.js} +53 -25
- package/client-dist/assets/{vendor-DlmcA82d.js → vendor-MNFI7PUp.js} +1339 -1
- package/client-dist/index.html +2 -2
- package/dist/erpServer.js +21 -45
- package/dist/userService.js +15 -42
- package/npm-shrinkwrap.json +4537 -0
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as __toESM } from "./rolldown-runtime-CvHMtSRF.js";
|
|
2
|
-
import { $ as
|
|
2
|
+
import { $ as unknown, $t as ScrollArea, A as IconLogout, At as Textarea, B as IconApi, Bt as Badge, C as useForm, Ct as SegmentedControl, D as IconTrash, Dt as NumberInput, E as IconUpload, Et as Pagination, F as IconFile, Ft as Container, G as _enum, Gt as Text, H as IconAlertCircle, Ht as Checkbox, I as IconEye$1, It as Code, J as number, Jt as Group, K as array, Kt as Alert, L as IconChevronDown, Lt as Center, M as IconLayoutSidebarLeftExpand, Mt as FileButton, N as IconLayoutSidebarLeftCollapse, Nt as Drawer, O as IconPlus, Ot as Modal, P as IconInfoCircle, Pt as Divider, Q as union, Qt as UnstyledButton, R as IconCheck, Rt as Card, S as IconCopy, St as Select, T as IconUser, Tt as PasswordInput, U as require_semver, Ut as AppShell, V as IconAlertTriangle, Vt as Autocomplete, W as ZodIssueCode, Wt as Anchor, X as record, Xt as Loader, Y as object, Yt as ActionIcon, Z as string, Zt as Popover, _ as IconRefresh, _t as TextInput, a as _undefined, an as require_client, at as Routes, b as IconEyeOff, bt as Switch, c as boolean$1, ct as useOutletContext, d as object$1, dt as Notifications, en as Box, et as BrowserRouter, f as string$1, ft as notifications, g as Markdown, gt as Title, h as remarkGfm, ht as DatesProvider, i as _null, in as require_jsx_runtime, it as Route, j as IconListDetails, jt as Image, k as IconNote, kt as Menu, l as literal, lt as useParams, m as datetime, mt as DateInput, n as string$2, nn as useDisclosure, nt as Navigate, o as any, on as require_react, ot as useLocation, p as union$1, pt as DateTimePicker, q as boolean, qt as Accordion, r as _enum$1, rn as useDebouncedValue, rt as Outlet, s as array$1, st as useNavigate, t as number$2, tn as MantineProvider, tt as Link, u as number$1, ut as useSearchParams, v as IconPhoto, vt as Tabs, w as IconX, wt as Tooltip, x as IconDownload, xt as Stack, y as IconEye, yt as Table, z as IconArrowBackUp, zt as Button } from "./vendor-MNFI7PUp.js";
|
|
3
3
|
//#region \0vite/modulepreload-polyfill.js
|
|
4
4
|
(function polyfill() {
|
|
5
5
|
const relList = document.createElement("link").relList;
|
|
@@ -155,46 +155,58 @@ function formatFileSize(bytes) {
|
|
|
155
155
|
}
|
|
156
156
|
//#endregion
|
|
157
157
|
//#region ../../../packages/common/dist/formatVersion.js
|
|
158
|
+
var import_semver = /* @__PURE__ */ __toESM(require_semver(), 1);
|
|
158
159
|
/**
|
|
159
|
-
* Parse a version string that may contain "
|
|
160
|
-
* "1.2.3
|
|
161
|
-
* "1.2.3"
|
|
162
|
-
* "
|
|
160
|
+
* Parse a version string that may contain ">=" operator and/or "/commitHash".
|
|
161
|
+
* ">=1.2.3" → { operator: ">=", npm: "1.2.3", hash: "" }
|
|
162
|
+
* "1.2.3/abc123..." → { operator: "", npm: "1.2.3", hash: "abc123..." }
|
|
163
|
+
* "1.2.3" → { operator: "", npm: "1.2.3", hash: "" }
|
|
164
|
+
* "/abc123..." → { operator: "", npm: "", hash: "abc123..." }
|
|
163
165
|
*/
|
|
164
166
|
function parseVersion(version) {
|
|
165
|
-
|
|
167
|
+
let operator = "";
|
|
168
|
+
let rest = version;
|
|
169
|
+
if (rest.startsWith(">=")) {
|
|
170
|
+
operator = ">=";
|
|
171
|
+
rest = rest.substring(2);
|
|
172
|
+
}
|
|
173
|
+
const slashIndex = rest.indexOf("/");
|
|
166
174
|
if (slashIndex === -1) return {
|
|
167
|
-
|
|
175
|
+
operator,
|
|
176
|
+
npm: rest,
|
|
168
177
|
hash: ""
|
|
169
178
|
};
|
|
170
179
|
return {
|
|
171
|
-
|
|
172
|
-
|
|
180
|
+
operator,
|
|
181
|
+
npm: rest.substring(0, slashIndex),
|
|
182
|
+
hash: rest.substring(slashIndex + 1)
|
|
173
183
|
};
|
|
174
184
|
}
|
|
175
185
|
/**
|
|
176
186
|
* Format a version string for display.
|
|
177
|
-
* "1.2.3
|
|
178
|
-
* "1.2.3"
|
|
179
|
-
* "
|
|
187
|
+
* ">=1.2.3" → ">=1.2.3"
|
|
188
|
+
* "1.2.3/abc123def456…" → "1.2.3 (abc123de)"
|
|
189
|
+
* "1.2.3" → "1.2.3"
|
|
190
|
+
* "/abc123def456…" → "abc123de"
|
|
180
191
|
*/
|
|
181
192
|
function formatVersion(version) {
|
|
182
|
-
const { npm, hash } = parseVersion(version);
|
|
183
|
-
if (!hash) return npm
|
|
193
|
+
const { operator, npm, hash } = parseVersion(version);
|
|
194
|
+
if (!hash) return `${operator}${npm}`;
|
|
184
195
|
const shortHash = hash.substring(0, 8);
|
|
185
|
-
if (npm) return `${npm} (${shortHash})`;
|
|
196
|
+
if (npm) return `${operator}${npm} (${shortHash})`;
|
|
186
197
|
return shortHash;
|
|
187
198
|
}
|
|
188
199
|
/**
|
|
189
|
-
* Check if an instance version
|
|
190
|
-
*
|
|
191
|
-
* - If target has
|
|
192
|
-
* - Otherwise, npm
|
|
200
|
+
* Check if an instance version satisfies the target version.
|
|
201
|
+
* - If target has a hash, the instance must have the same hash.
|
|
202
|
+
* - If target npm has ">=" operator, instance npm must be >= target npm.
|
|
203
|
+
* - Otherwise, npm versions must match exactly.
|
|
193
204
|
*/
|
|
194
205
|
function versionsMatch(instanceVersion, targetVersion) {
|
|
195
206
|
const target = parseVersion(targetVersion);
|
|
196
207
|
const instance = parseVersion(instanceVersion);
|
|
197
208
|
if (target.hash) return instance.hash === target.hash;
|
|
209
|
+
if (target.operator === ">=") return import_semver.default.gte(instance.npm, target.npm);
|
|
198
210
|
return instance.npm === target.npm;
|
|
199
211
|
}
|
|
200
212
|
//#endregion
|
|
@@ -908,6 +920,18 @@ var ServerLogViewer = ({ fetchLogs: fetchLogsFn, logFiles }) => {
|
|
|
908
920
|
] });
|
|
909
921
|
};
|
|
910
922
|
//#endregion
|
|
923
|
+
//#region ../../../packages/common-browser/dist/VersionBadge.js
|
|
924
|
+
var VersionBadge = ({ version, size = "sm" }) => {
|
|
925
|
+
if (!version) return null;
|
|
926
|
+
const isGit = version.includes("/");
|
|
927
|
+
return (0, import_jsx_runtime.jsx)(Badge, {
|
|
928
|
+
size,
|
|
929
|
+
variant: "light",
|
|
930
|
+
color: isGit ? "grape" : "cyan",
|
|
931
|
+
children: isGit ? "git" : "npm"
|
|
932
|
+
});
|
|
933
|
+
};
|
|
934
|
+
//#endregion
|
|
911
935
|
//#region ../../../packages/common-browser/dist/zodResolver.js
|
|
912
936
|
function zodResolver(schema) {
|
|
913
937
|
return (values) => {
|
|
@@ -2390,12 +2414,16 @@ var AdminPage = () => {
|
|
|
2390
2414
|
children: "ERP Version"
|
|
2391
2415
|
}), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table.Td, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Group, {
|
|
2392
2416
|
gap: "xs",
|
|
2393
|
-
children: [
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2417
|
+
children: [
|
|
2418
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: formatVersion(data.erpVersion) }),
|
|
2419
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(VersionBadge, { version: data.erpVersion }),
|
|
2420
|
+
data.targetVersion && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Badge, {
|
|
2421
|
+
size: "sm",
|
|
2422
|
+
variant: "light",
|
|
2423
|
+
color: versionsMatch(data.erpVersion, data.targetVersion) ? "green" : "red",
|
|
2424
|
+
children: ["target: ", formatVersion(data.targetVersion)]
|
|
2425
|
+
})
|
|
2426
|
+
]
|
|
2399
2427
|
}) })] }),
|
|
2400
2428
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Table.Tr, { children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Table.Td, {
|
|
2401
2429
|
fw: 600,
|