@datapos/datapos-development 0.3.356 → 0.3.358
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { promises as ge } from "node:fs";
|
|
2
2
|
import { nanoid as Vs } from "nanoid";
|
|
3
|
-
import { fileURLToPath as Pr, URL as zs } from "node:url";
|
|
4
3
|
import Dt from "node:path";
|
|
5
|
-
import { promisify as
|
|
6
|
-
import { exec as
|
|
7
|
-
import { CONNECTOR_SOURCE_OPERATIONS as
|
|
4
|
+
import { promisify as zs } from "node:util";
|
|
5
|
+
import { exec as js, spawn as Fs } from "node:child_process";
|
|
6
|
+
import { CONNECTOR_SOURCE_OPERATIONS as $s, CONNECTOR_DESTINATION_OPERATIONS as Bs } from "@datapos/datapos-shared";
|
|
7
|
+
import { fileURLToPath as Pr, URL as Zs } from "node:url";
|
|
8
8
|
function k(e, t, i) {
|
|
9
9
|
function r(d, y) {
|
|
10
10
|
if (d._zod || Object.defineProperty(d, "_zod", {
|
|
@@ -2172,7 +2172,7 @@ function He(e, t) {
|
|
|
2172
2172
|
const Vu = /* @__PURE__ */ k("ZodObject", (e, t) => {
|
|
2173
2173
|
Ra.init(e, t), ee.init(e, t), U(e, "shape", () => t.shape), e.keyof = () => Wt(Object.keys(e._zod.def.shape)), e.catchall = (i) => e.clone({ ...e._zod.def, catchall: i }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: sr() }), e.loose = () => e.clone({ ...e._zod.def, catchall: sr() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Du() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (i) => Qs(e, i), e.safeExtend = (i) => en(e, i), e.merge = (i) => tn(e, i), e.pick = (i) => Js(e, i), e.omit = (i) => Ys(e, i), e.partial = (...i) => rn(Wr, e, i[0]), e.required = (...i) => sn(Kr, e, i[0]);
|
|
2174
2174
|
});
|
|
2175
|
-
function
|
|
2175
|
+
function Le(e, t) {
|
|
2176
2176
|
const i = {
|
|
2177
2177
|
type: "object",
|
|
2178
2178
|
shape: e ?? {},
|
|
@@ -2403,11 +2403,11 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2403
2403
|
"presenter",
|
|
2404
2404
|
"presenterPresentation",
|
|
2405
2405
|
"tool"
|
|
2406
|
-
], hc = Wt(cc), lc = ae([b("en-au"), b("en-gb"), b("en-us"), b("es-es")]), pc = be(lc, O()), fc =
|
|
2406
|
+
], hc = Wt(cc), lc = ae([b("en-au"), b("en-gb"), b("en-us"), b("es-es")]), pc = be(lc, O()), fc = Le({
|
|
2407
2407
|
id: O(),
|
|
2408
2408
|
color: ac,
|
|
2409
2409
|
label: O()
|
|
2410
|
-
}), dc =
|
|
2410
|
+
}), dc = Le({
|
|
2411
2411
|
id: O(),
|
|
2412
2412
|
label: be(O(), O()),
|
|
2413
2413
|
description: be(O(), O()),
|
|
@@ -2418,10 +2418,10 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2418
2418
|
status: fc.nullable().optional(),
|
|
2419
2419
|
statusId: uc,
|
|
2420
2420
|
typeId: hc
|
|
2421
|
-
}), mc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), yc =
|
|
2421
|
+
}), mc = ae([b("app"), b("engine"), b("connector"), b("context"), b("presenter"), b("tool")]), yc = Le({
|
|
2422
2422
|
id: O(),
|
|
2423
2423
|
label: O()
|
|
2424
|
-
}), vc =
|
|
2424
|
+
}), vc = Le({
|
|
2425
2425
|
activeConnectionCount: Me().optional(),
|
|
2426
2426
|
canDescribe: Lu().optional(),
|
|
2427
2427
|
id: O().optional(),
|
|
@@ -2489,11 +2489,11 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2489
2489
|
b("presenter"),
|
|
2490
2490
|
b("presenterPresentation"),
|
|
2491
2491
|
b("tool")
|
|
2492
|
-
]), ur = Me(), Pc =
|
|
2492
|
+
]), ur = Me(), Pc = Le({
|
|
2493
2493
|
id: O(),
|
|
2494
2494
|
color: wc,
|
|
2495
2495
|
label: O()
|
|
2496
|
-
}), Cc =
|
|
2496
|
+
}), Cc = Le({
|
|
2497
2497
|
id: O(),
|
|
2498
2498
|
label: be(O(), O()),
|
|
2499
2499
|
description: be(O(), O()),
|
|
@@ -2501,7 +2501,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2501
2501
|
iconDark: O().optional(),
|
|
2502
2502
|
order: Me(),
|
|
2503
2503
|
path: O()
|
|
2504
|
-
}), Xr =
|
|
2504
|
+
}), Xr = Le({
|
|
2505
2505
|
id: O(),
|
|
2506
2506
|
label: be(O(), O()),
|
|
2507
2507
|
description: be(O(), O()),
|
|
@@ -2556,11 +2556,11 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2556
2556
|
b("presenter"),
|
|
2557
2557
|
b("presenterPresentation"),
|
|
2558
2558
|
b("tool")
|
|
2559
|
-
]), cr = Me(), Mc =
|
|
2559
|
+
]), cr = Me(), Mc = Le({
|
|
2560
2560
|
id: O(),
|
|
2561
2561
|
color: Oc,
|
|
2562
2562
|
label: O()
|
|
2563
|
-
}), Vc =
|
|
2563
|
+
}), Vc = Le({
|
|
2564
2564
|
id: O(),
|
|
2565
2565
|
label: be(O(), O()),
|
|
2566
2566
|
description: be(O(), O()),
|
|
@@ -2568,7 +2568,7 @@ const nc = ["amber", "green", "red", "other"], ac = Wt(nc), oc = ["alpha", "beta
|
|
|
2568
2568
|
iconDark: O().optional(),
|
|
2569
2569
|
order: Me(),
|
|
2570
2570
|
path: O()
|
|
2571
|
-
}), zc =
|
|
2571
|
+
}), zc = Le({
|
|
2572
2572
|
id: O(),
|
|
2573
2573
|
label: be(O(), O()),
|
|
2574
2574
|
description: be(O(), O()),
|
|
@@ -2889,21 +2889,21 @@ var Ft = 0, Ni = 1, Fe = 2, ns = 3, as = 4, os = 5, J = function(t, i, r) {
|
|
|
2889
2889
|
var u = (n ? n + " " : "") + ai.strict;
|
|
2890
2890
|
this.reservedWordsStrict = Ze(u), this.reservedWordsStrictBind = Ze(u + " " + ai.strictBind), this.input = String(i), this.containsEsc = !1, r ? (this.pos = r, this.lineStart = this.input.lastIndexOf(`
|
|
2891
2891
|
`, r - 1) + 1, this.curLine = this.input.slice(0, this.lineStart).split(ce).length) : (this.pos = this.lineStart = 0, this.curLine = 1), this.type = l.eof, this.value = null, this.start = this.end = this.pos, this.startLoc = this.endLoc = this.curPosition(), this.lastTokEndLoc = this.lastTokStartLoc = null, this.lastTokStart = this.lastTokEnd = this.pos, this.context = this.initialContext(), this.exprAllowed = !0, this.inModule = t.sourceType === "module", this.strict = this.inModule || this.strictDirective(this.pos), this.potentialArrowAt = -1, this.potentialArrowInForAwait = !1, this.yieldPos = this.awaitPos = this.awaitIdentPos = 0, this.labels = [], this.undefinedExports = /* @__PURE__ */ Object.create(null), this.pos === 0 && t.allowHashBang && this.input.slice(0, 2) === "#!" && this.skipLineComment(2), this.scopeStack = [], this.enterScope(kt), this.regexpState = null, this.privateNameStack = [];
|
|
2892
|
-
},
|
|
2892
|
+
}, Oe = { inFunction: { configurable: !0 }, inGenerator: { configurable: !0 }, inAsync: { configurable: !0 }, canAwait: { configurable: !0 }, allowSuper: { configurable: !0 }, allowDirectSuper: { configurable: !0 }, treatFunctionsAsVar: { configurable: !0 }, allowNewDotTarget: { configurable: !0 }, inClassStaticBlock: { configurable: !0 } };
|
|
2893
2893
|
J.prototype.parse = function() {
|
|
2894
2894
|
var t = this.options.program || this.startNode();
|
|
2895
2895
|
return this.nextToken(), this.parseTopLevel(t);
|
|
2896
2896
|
};
|
|
2897
|
-
|
|
2897
|
+
Oe.inFunction.get = function() {
|
|
2898
2898
|
return (this.currentVarScope().flags & pt) > 0;
|
|
2899
2899
|
};
|
|
2900
|
-
|
|
2900
|
+
Oe.inGenerator.get = function() {
|
|
2901
2901
|
return (this.currentVarScope().flags & is) > 0;
|
|
2902
2902
|
};
|
|
2903
|
-
|
|
2903
|
+
Oe.inAsync.get = function() {
|
|
2904
2904
|
return (this.currentVarScope().flags & Ai) > 0;
|
|
2905
2905
|
};
|
|
2906
|
-
|
|
2906
|
+
Oe.canAwait.get = function() {
|
|
2907
2907
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2908
2908
|
var t = this.scopeStack[e], i = t.flags;
|
|
2909
2909
|
if (i & (et | St))
|
|
@@ -2913,17 +2913,17 @@ Re.canAwait.get = function() {
|
|
|
2913
2913
|
}
|
|
2914
2914
|
return this.inModule && this.options.ecmaVersion >= 13 || this.options.allowAwaitOutsideFunction;
|
|
2915
2915
|
};
|
|
2916
|
-
|
|
2916
|
+
Oe.allowSuper.get = function() {
|
|
2917
2917
|
var e = this.currentThisScope(), t = e.flags;
|
|
2918
2918
|
return (t & Kt) > 0 || this.options.allowSuperOutsideMethod;
|
|
2919
2919
|
};
|
|
2920
|
-
|
|
2920
|
+
Oe.allowDirectSuper.get = function() {
|
|
2921
2921
|
return (this.currentThisScope().flags & ss) > 0;
|
|
2922
2922
|
};
|
|
2923
|
-
|
|
2923
|
+
Oe.treatFunctionsAsVar.get = function() {
|
|
2924
2924
|
return this.treatFunctionsAsVarInScope(this.currentScope());
|
|
2925
2925
|
};
|
|
2926
|
-
|
|
2926
|
+
Oe.allowNewDotTarget.get = function() {
|
|
2927
2927
|
for (var e = this.scopeStack.length - 1; e >= 0; e--) {
|
|
2928
2928
|
var t = this.scopeStack[e], i = t.flags;
|
|
2929
2929
|
if (i & (et | St) || i & pt && !(i & Ei))
|
|
@@ -2931,7 +2931,7 @@ Re.allowNewDotTarget.get = function() {
|
|
|
2931
2931
|
}
|
|
2932
2932
|
return !1;
|
|
2933
2933
|
};
|
|
2934
|
-
|
|
2934
|
+
Oe.inClassStaticBlock.get = function() {
|
|
2935
2935
|
return (this.currentVarScope().flags & et) > 0;
|
|
2936
2936
|
};
|
|
2937
2937
|
J.extend = function() {
|
|
@@ -2950,7 +2950,7 @@ J.parseExpressionAt = function(t, i, r) {
|
|
|
2950
2950
|
J.tokenizer = function(t, i) {
|
|
2951
2951
|
return new this(i, t);
|
|
2952
2952
|
};
|
|
2953
|
-
Object.defineProperties(J.prototype,
|
|
2953
|
+
Object.defineProperties(J.prototype, Oe);
|
|
2954
2954
|
var he = J.prototype, eh = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
2955
2955
|
he.strictDirective = function(e) {
|
|
2956
2956
|
if (this.options.ecmaVersion < 5)
|
|
@@ -4361,17 +4361,17 @@ Zt.prototype.separatedFrom = function(t) {
|
|
|
4361
4361
|
Zt.prototype.sibling = function() {
|
|
4362
4362
|
return new Zt(this.parent, this.base);
|
|
4363
4363
|
};
|
|
4364
|
-
var
|
|
4364
|
+
var Re = function(t) {
|
|
4365
4365
|
this.parser = t, this.validFlags = "gim" + (t.options.ecmaVersion >= 6 ? "uy" : "") + (t.options.ecmaVersion >= 9 ? "s" : "") + (t.options.ecmaVersion >= 13 ? "d" : "") + (t.options.ecmaVersion >= 15 ? "v" : ""), this.unicodeProperties = _s[t.options.ecmaVersion >= 14 ? 14 : t.options.ecmaVersion], this.source = "", this.flags = "", this.start = 0, this.switchU = !1, this.switchV = !1, this.switchN = !1, this.pos = 0, this.lastIntValue = 0, this.lastStringValue = "", this.lastAssertionIsQuantifiable = !1, this.numCapturingParens = 0, this.maxBackReference = 0, this.groupNames = /* @__PURE__ */ Object.create(null), this.backReferenceNames = [], this.branchID = null;
|
|
4366
4366
|
};
|
|
4367
|
-
|
|
4367
|
+
Re.prototype.reset = function(t, i, r) {
|
|
4368
4368
|
var n = r.indexOf("v") !== -1, u = r.indexOf("u") !== -1;
|
|
4369
4369
|
this.start = t | 0, this.source = i + "", this.flags = r, n && this.parser.options.ecmaVersion >= 15 ? (this.switchU = !0, this.switchV = !0, this.switchN = !0) : (this.switchU = u && this.parser.options.ecmaVersion >= 6, this.switchV = !1, this.switchN = u && this.parser.options.ecmaVersion >= 9);
|
|
4370
4370
|
};
|
|
4371
|
-
|
|
4371
|
+
Re.prototype.raise = function(t) {
|
|
4372
4372
|
this.parser.raiseRecoverable(this.start, "Invalid regular expression: /" + this.source + "/: " + t);
|
|
4373
4373
|
};
|
|
4374
|
-
|
|
4374
|
+
Re.prototype.at = function(t, i) {
|
|
4375
4375
|
i === void 0 && (i = !1);
|
|
4376
4376
|
var r = this.source, n = r.length;
|
|
4377
4377
|
if (t >= n)
|
|
@@ -4382,7 +4382,7 @@ De.prototype.at = function(t, i) {
|
|
|
4382
4382
|
var h = r.charCodeAt(t + 1);
|
|
4383
4383
|
return h >= 56320 && h <= 57343 ? (u << 10) + h - 56613888 : u;
|
|
4384
4384
|
};
|
|
4385
|
-
|
|
4385
|
+
Re.prototype.nextIndex = function(t, i) {
|
|
4386
4386
|
i === void 0 && (i = !1);
|
|
4387
4387
|
var r = this.source, n = r.length;
|
|
4388
4388
|
if (t >= n)
|
|
@@ -4390,19 +4390,19 @@ De.prototype.nextIndex = function(t, i) {
|
|
|
4390
4390
|
var u = r.charCodeAt(t), h;
|
|
4391
4391
|
return !(i || this.switchU) || u <= 55295 || u >= 57344 || t + 1 >= n || (h = r.charCodeAt(t + 1)) < 56320 || h > 57343 ? t + 1 : t + 2;
|
|
4392
4392
|
};
|
|
4393
|
-
|
|
4393
|
+
Re.prototype.current = function(t) {
|
|
4394
4394
|
return t === void 0 && (t = !1), this.at(this.pos, t);
|
|
4395
4395
|
};
|
|
4396
|
-
|
|
4396
|
+
Re.prototype.lookahead = function(t) {
|
|
4397
4397
|
return t === void 0 && (t = !1), this.at(this.nextIndex(this.pos, t), t);
|
|
4398
4398
|
};
|
|
4399
|
-
|
|
4399
|
+
Re.prototype.advance = function(t) {
|
|
4400
4400
|
t === void 0 && (t = !1), this.pos = this.nextIndex(this.pos, t);
|
|
4401
4401
|
};
|
|
4402
|
-
|
|
4402
|
+
Re.prototype.eat = function(t, i) {
|
|
4403
4403
|
return i === void 0 && (i = !1), this.current(i) === t ? (this.advance(i), !0) : !1;
|
|
4404
4404
|
};
|
|
4405
|
-
|
|
4405
|
+
Re.prototype.eatChars = function(t, i) {
|
|
4406
4406
|
i === void 0 && (i = !1);
|
|
4407
4407
|
for (var r = this.pos, n = 0, u = t; n < u.length; n += 1) {
|
|
4408
4408
|
var h = u[n], d = this.at(r, i);
|
|
@@ -5464,7 +5464,7 @@ j.readRegexp = function() {
|
|
|
5464
5464
|
++this.pos;
|
|
5465
5465
|
var u = this.pos, h = this.readWord1();
|
|
5466
5466
|
this.containsEsc && this.unexpected(u);
|
|
5467
|
-
var d = this.regexpState || (this.regexpState = new
|
|
5467
|
+
var d = this.regexpState || (this.regexpState = new Re(this));
|
|
5468
5468
|
d.reset(i, n, h), this.validateRegExpFlags(d), this.validateRegExpPattern(d);
|
|
5469
5469
|
var y = null;
|
|
5470
5470
|
try {
|
|
@@ -7650,7 +7650,7 @@ function Fh(e) {
|
|
|
7650
7650
|
return Ms;
|
|
7651
7651
|
};
|
|
7652
7652
|
}
|
|
7653
|
-
const $h = js
|
|
7653
|
+
const $h = zs(js);
|
|
7654
7654
|
async function Bh(e) {
|
|
7655
7655
|
let t;
|
|
7656
7656
|
try {
|
|
@@ -7696,7 +7696,7 @@ async function Zh(e, t) {
|
|
|
7696
7696
|
async function Ri() {
|
|
7697
7697
|
re("Load environment variables"), (await import("dotenv")).config();
|
|
7698
7698
|
}
|
|
7699
|
-
function
|
|
7699
|
+
function De(e) {
|
|
7700
7700
|
const t = "\x1B[36m", i = "\x1B[0m", r = "─".repeat(Math.max(e.length + 60, 60));
|
|
7701
7701
|
console.info(`
|
|
7702
7702
|
${t}${r}`), console.info(`▶️ ${e}`), console.info(`${r}${i}`);
|
|
@@ -7724,9 +7724,9 @@ async function Uh(e) {
|
|
|
7724
7724
|
if (t.code !== "ENOENT") throw t;
|
|
7725
7725
|
}
|
|
7726
7726
|
}
|
|
7727
|
-
async function
|
|
7727
|
+
async function Ne(e, t, i = [], r = !1) {
|
|
7728
7728
|
return re(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
|
|
7729
|
-
|
|
7729
|
+
Fs(t, i, { stdio: "inherit" }).on("close", (d) => {
|
|
7730
7730
|
d === 0 || r ? n() : u(new Error(`${t} exited with code ${d}`));
|
|
7731
7731
|
});
|
|
7732
7732
|
});
|
|
@@ -7791,25 +7791,16 @@ const Hh = [
|
|
|
7791
7791
|
{ idPrefix: "datapos-shared", typeId: "shared", publish: !0, uploadGroupName: void 0 },
|
|
7792
7792
|
{ idPrefix: "datapos-tool", typeId: "tool", publish: !0, uploadGroupName: "tools" }
|
|
7793
7793
|
];
|
|
7794
|
-
async function
|
|
7794
|
+
async function ml() {
|
|
7795
7795
|
try {
|
|
7796
|
-
|
|
7796
|
+
De("Build Project"), await Ne("1️⃣ Bundle project", "vite", ["build"]), Ie("Project built.");
|
|
7797
7797
|
} catch (e) {
|
|
7798
7798
|
console.error("❌ Error building project.", e), process.exit(1);
|
|
7799
7799
|
}
|
|
7800
7800
|
}
|
|
7801
|
-
async function
|
|
7802
|
-
Ne("Synchronise config files");
|
|
7803
|
-
const t = Dt.dirname(Pr(import.meta.url)), i = Dt.resolve(t, "../.editorconfig"), r = await Xe(i), n = Dt.resolve(process.cwd(), ".editorconfig");
|
|
7804
|
-
if (await Xe(n) === r) {
|
|
7805
|
-
Ie("File '.editorconfig' is already up to date.");
|
|
7806
|
-
return;
|
|
7807
|
-
}
|
|
7808
|
-
await ei(n, r), Ie("File '.editorconfig' synchronised.");
|
|
7809
|
-
}
|
|
7810
|
-
async function ml() {
|
|
7801
|
+
async function yl() {
|
|
7811
7802
|
try {
|
|
7812
|
-
|
|
7803
|
+
De("Release Project"), await Ri();
|
|
7813
7804
|
const e = await de("package.json"), t = await de("config.json");
|
|
7814
7805
|
await Os("1️⃣", e);
|
|
7815
7806
|
const i = Hh.find((r) => t.id.startsWith(r.idPrefix));
|
|
@@ -7827,7 +7818,7 @@ async function ml() {
|
|
|
7827
7818
|
default:
|
|
7828
7819
|
await Gh("2️⃣", e);
|
|
7829
7820
|
}
|
|
7830
|
-
if (await
|
|
7821
|
+
if (await Ne("3️⃣ Bundle project", "vite", ["build"]), await Te("4️⃣ Stage changes", "git", ["add", "."]), await Te("5️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("6️⃣ Push changes", "git", ["push", "origin", "main:main"]), i.typeId === "app")
|
|
7831
7822
|
re("7️⃣ Register module"), await qh();
|
|
7832
7823
|
else if (i.typeId === "engine")
|
|
7833
7824
|
re("7️⃣ Register module"), await kr(t), await wr(e, `datapos-engine-eu/${i.uploadGroupName}`);
|
|
@@ -7842,7 +7833,7 @@ async function ml() {
|
|
|
7842
7833
|
const r = ".npmrc";
|
|
7843
7834
|
try {
|
|
7844
7835
|
await ei(r, `registry=https://registry.npmjs.org/
|
|
7845
|
-
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await
|
|
7836
|
+
//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN ?? ""}`), await Ne("8️⃣ Publish to npm", "npm", ["publish", "--access", "public"]);
|
|
7846
7837
|
} finally {
|
|
7847
7838
|
await Uh(r);
|
|
7848
7839
|
}
|
|
@@ -7853,18 +7844,18 @@ async function ml() {
|
|
|
7853
7844
|
console.error("❌ Error releasing project.", e), process.exit(1);
|
|
7854
7845
|
}
|
|
7855
7846
|
}
|
|
7856
|
-
async function
|
|
7847
|
+
async function vl() {
|
|
7857
7848
|
try {
|
|
7858
|
-
|
|
7849
|
+
De("Synchronise Project with GitHub");
|
|
7859
7850
|
const e = await de("package.json");
|
|
7860
7851
|
re("Bump project version"), await Os("1️⃣", e), await Te("2️⃣ Stage changes", "git", ["add", "."]), await Te("3️⃣ Commit changes", "git", ["commit", "-m", `"v${e.version}"`]), await Te("4️⃣ Push changes", "git", ["push", "origin", "main:main"]), Ie(`Project version '${e.version}' synchronised with GitHub.`);
|
|
7861
7852
|
} catch (e) {
|
|
7862
7853
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7863
7854
|
}
|
|
7864
7855
|
}
|
|
7865
|
-
function
|
|
7856
|
+
function xl() {
|
|
7866
7857
|
try {
|
|
7867
|
-
|
|
7858
|
+
De("Test Project"), console.log(`
|
|
7868
7859
|
❌ Test project is not implemented. No 'vitest' command.
|
|
7869
7860
|
`);
|
|
7870
7861
|
} catch (e) {
|
|
@@ -7917,7 +7908,7 @@ async function Os(e, t, i = "./") {
|
|
|
7917
7908
|
function Jh(e) {
|
|
7918
7909
|
let t = !1, i = !1;
|
|
7919
7910
|
for (const r of e)
|
|
7920
|
-
|
|
7911
|
+
$s.includes(r) && (t = !0), Bs.includes(r) && (i = !0);
|
|
7921
7912
|
return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
|
|
7922
7913
|
}
|
|
7923
7914
|
const Yh = {
|
|
@@ -7928,11 +7919,11 @@ const Yh = {
|
|
|
7928
7919
|
unknown: { color: "616161", label: "unknown" }
|
|
7929
7920
|
// See sample badges in ~/tests/sampleBadges.md. Also included 'info' colouring.
|
|
7930
7921
|
}, Sr = "<!-- OWASP_BADGES_START -->", Qh = "<!-- OWASP_BADGES_END -->";
|
|
7931
|
-
async function
|
|
7922
|
+
async function gl() {
|
|
7932
7923
|
try {
|
|
7933
|
-
|
|
7924
|
+
De("Audit Dependencies"), await Ri();
|
|
7934
7925
|
const e = await de("package.json");
|
|
7935
|
-
console.log(1111, process.env.OWASP_NVD_API_KEY), await
|
|
7926
|
+
console.log(1111, process.env.OWASP_NVD_API_KEY), await Ne("1️⃣", "owasp-dependency-check", [
|
|
7936
7927
|
"--out",
|
|
7937
7928
|
"dependency-check-reports",
|
|
7938
7929
|
"--project",
|
|
@@ -7941,7 +7932,7 @@ async function xl() {
|
|
|
7941
7932
|
"--nodePackageSkipDevDependencies",
|
|
7942
7933
|
"--nvdApiKey",
|
|
7943
7934
|
process.env.OWASP_NVD_API_KEY ?? ""
|
|
7944
|
-
]), await el("2️⃣"), await
|
|
7935
|
+
]), await el("2️⃣"), await Ne("3️⃣ Check using 'npm audit'", "npm", ["audit"]), Ie("Dependencies audited.");
|
|
7945
7936
|
} catch (e) {
|
|
7946
7937
|
console.error("❌ Error auditing dependencies.", e), process.exit(1);
|
|
7947
7938
|
}
|
|
@@ -7976,18 +7967,18 @@ async function tl(e) {
|
|
|
7976
7967
|
}
|
|
7977
7968
|
return i;
|
|
7978
7969
|
}
|
|
7979
|
-
async function
|
|
7970
|
+
async function bl() {
|
|
7980
7971
|
try {
|
|
7981
|
-
|
|
7972
|
+
De("Check Dependencies"), await Ne("1️⃣ Check using 'npm outdated'", "npm", ["outdated"], !0), await Ne("2️⃣ Check using 'npm-check-updates'", "npm-check-updates", ["-i"]), Ie("Dependencies checked.");
|
|
7982
7973
|
} catch (e) {
|
|
7983
7974
|
console.error("❌ Error checking dependencies.", e), process.exit(1);
|
|
7984
7975
|
}
|
|
7985
7976
|
}
|
|
7986
7977
|
const Tr = "<!-- DEPENDENCY_LICENSES_START -->", il = "<!-- DEPENDENCY_LICENSES_END -->";
|
|
7987
|
-
async function
|
|
7978
|
+
async function _l(e = [], t = !0) {
|
|
7988
7979
|
try {
|
|
7989
|
-
|
|
7990
|
-
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r = Pr(new
|
|
7980
|
+
De("Document Dependencies"), await Ri();
|
|
7981
|
+
const i = e.flatMap((n) => ["--allowed", `'${n}'`]), r = Pr(new Zs(import.meta.resolve("@datapos/datapos-development/license-report-config")));
|
|
7991
7982
|
await Te(
|
|
7992
7983
|
"1️⃣ Generate 'licenses.json' file",
|
|
7993
7984
|
"license-report",
|
|
@@ -8059,34 +8050,46 @@ function sl(e) {
|
|
|
8059
8050
|
let n = (r.getFullYear() - i.getFullYear()) * 12 + (r.getMonth() - i.getMonth());
|
|
8060
8051
|
return r.getDate() < i.getDate() && (n -= 1), n === 0 ? `this month: ${t}` : n === 1 ? `1 month ago: ${t}` : n <= 6 ? `${n} months ago: ${t}` : n <= 12 ? `${n} months ago: ${t} ⚠️` : `${n} months ago: ${t}❗`;
|
|
8061
8052
|
}
|
|
8062
|
-
async function
|
|
8053
|
+
async function kl() {
|
|
8063
8054
|
try {
|
|
8064
|
-
|
|
8055
|
+
De("Format Code"), await Ne("1️⃣ Format", "prettier", ["--write", "src/"]), Ie("Code formatted.");
|
|
8065
8056
|
} catch (e) {
|
|
8066
8057
|
console.error("❌ Error formatting code.", e), process.exit(1);
|
|
8067
8058
|
}
|
|
8068
8059
|
}
|
|
8069
|
-
async function
|
|
8060
|
+
async function wl() {
|
|
8070
8061
|
try {
|
|
8071
|
-
|
|
8062
|
+
De("Lint Code"), await Ne("1️⃣ Lint", "eslint", []), Ie("Code linted.");
|
|
8072
8063
|
} catch (e) {
|
|
8073
8064
|
console.error("❌ Error linting code.", e), process.exit(1);
|
|
8074
8065
|
}
|
|
8075
8066
|
}
|
|
8076
8067
|
const nl = ["1️⃣", "2️⃣", "3️⃣", "4️⃣", "5️⃣", "6️⃣", "7️⃣", "8️⃣", "9️⃣"];
|
|
8077
|
-
async function
|
|
8068
|
+
async function Sl(e = []) {
|
|
8078
8069
|
try {
|
|
8079
|
-
|
|
8070
|
+
De("Update '@datapos/datapos' Dependencies");
|
|
8080
8071
|
for (const [t, i] of e.entries()) {
|
|
8081
8072
|
const r = nl.at(t) ?? "🔢";
|
|
8082
|
-
await
|
|
8073
|
+
await Ne(`${r} Update '${i}'`, "npm", ["install", `@datapos/datapos-${i}@latest`]), i === "development" && await al();
|
|
8083
8074
|
}
|
|
8084
8075
|
Ie("'@datapos/datapos' dependencies updated.");
|
|
8085
8076
|
} catch (t) {
|
|
8086
8077
|
console.error("❌ Error updating '@datapos/datapos' dependencies.", t), process.exit(1);
|
|
8087
8078
|
}
|
|
8088
8079
|
}
|
|
8089
|
-
async function
|
|
8080
|
+
async function al(e) {
|
|
8081
|
+
const t = Dt.dirname(Pr(import.meta.url));
|
|
8082
|
+
await ol(t, "../", ".editorconfig");
|
|
8083
|
+
}
|
|
8084
|
+
async function ol(e, t, i) {
|
|
8085
|
+
const r = Dt.resolve(e, `${t}${i}`), n = await Xe(r), u = Dt.resolve(process.cwd(), i);
|
|
8086
|
+
if (await Xe(u) === n) {
|
|
8087
|
+
Ie(`File '${i}' is already up to date.`);
|
|
8088
|
+
return;
|
|
8089
|
+
}
|
|
8090
|
+
await ei(u, n), Ie(`File '${i}' synchronised.`);
|
|
8091
|
+
}
|
|
8092
|
+
async function Tl(e) {
|
|
8090
8093
|
try {
|
|
8091
8094
|
console.info(`🚀 Building public directory index for identifier '${e}'...`);
|
|
8092
8095
|
const t = {};
|
|
@@ -8121,17 +8124,16 @@ async function Sl(e) {
|
|
|
8121
8124
|
}
|
|
8122
8125
|
}
|
|
8123
8126
|
export {
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
wl as updateDataPosDependencies
|
|
8127
|
+
gl as auditDependencies,
|
|
8128
|
+
Tl as buildDirectoryIndex,
|
|
8129
|
+
ml as buildProject,
|
|
8130
|
+
bl as checkDependencies,
|
|
8131
|
+
_l as documentDependencies,
|
|
8132
|
+
kl as formatCode,
|
|
8133
|
+
wl as lintCode,
|
|
8134
|
+
yl as releaseProject,
|
|
8135
|
+
vl as syncProjectWithGitHub,
|
|
8136
|
+
xl as testProject,
|
|
8137
|
+
Sl as updateDataPosDependencies
|
|
8136
8138
|
};
|
|
8137
8139
|
//# sourceMappingURL=datapos-development.es.js.map
|