@datapos/datapos-development 0.3.353 → 0.3.355

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.
@@ -6763,10 +6763,10 @@ function Fh(e) {
6763
6763
  a[v] = c[v];
6764
6764
  }
6765
6765
  }, f.tsParseModifiers = function(s) {
6766
- for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(K, G, X, re) {
6767
- G === X && c[re] && a.raise(K.column, N.InvalidModifiersOrder({ orderedModifiers: [X, re] }));
6768
- }, L = function(K, G, X, re) {
6769
- (c[X] && G === re || c[re] && G === X) && a.raise(K.column, N.IncompatibleModifiers({ modifiers: [X, re] }));
6766
+ for (var a = this, c = s.modified, p = s.allowedModifiers, m = s.disallowedModifiers, v = s.stopOnStartOfClassStaticBlock, x = s.errorTemplate, g = x === void 0 ? N.InvalidModifierOnTypeMember : x, _ = {}, T = function(K, G, X, ie) {
6767
+ G === X && c[ie] && a.raise(K.column, N.InvalidModifiersOrder({ orderedModifiers: [X, ie] }));
6768
+ }, L = function(K, G, X, ie) {
6769
+ (c[X] && G === ie || c[ie] && G === X) && a.raise(K.column, N.IncompatibleModifiers({ modifiers: [X, ie] }));
6770
6770
  }; ; ) {
6771
6771
  var V = this.startLoc, E = this.tsParseModifier(p.concat(m ?? []), v);
6772
6772
  if (!E) break;
@@ -7255,8 +7255,8 @@ function Fh(e) {
7255
7255
  if (L = this.cloneCurLookaheadState(), !(V = this.tryParse(function() {
7256
7256
  return G.parseMaybeAssignOrigin(s, a, c);
7257
7257
  }, L)).error) return V.node;
7258
- var X = this.context, re = X[X.length - 1];
7259
- re === y.tokContexts.tc_oTag && X[X.length - 2] === y.tokContexts.tc_expr ? (X.pop(), X.pop()) : re !== y.tokContexts.tc_oTag && re !== y.tokContexts.tc_expr || X.pop();
7258
+ var X = this.context, ie = X[X.length - 1];
7259
+ ie === y.tokContexts.tc_oTag && X[X.length - 2] === y.tokContexts.tc_expr ? (X.pop(), X.pop()) : ie !== y.tokContexts.tc_oTag && ie !== y.tokContexts.tc_expr || X.pop();
7260
7260
  }
7261
7261
  if (!((p = V) != null && p.error || this.tsMatchLeftRelational())) return this.parseMaybeAssignOrigin(s, a, c);
7262
7262
  L && !this.compareLookaheadState(L, this.getCurLookaheadState()) || (L = this.cloneCurLookaheadState());
@@ -7409,9 +7409,9 @@ function Fh(e) {
7409
7409
  }
7410
7410
  L.push(this.parseMaybeAssign(a, K, this.parseParenItem));
7411
7411
  }
7412
- var re = this.lastTokEnd, ve = this.lastTokEndLoc;
7412
+ var ie = this.lastTokEnd, ve = this.lastTokEndLoc;
7413
7413
  if (this.expect(o.parenR), this.maybeInArrowParameters = x, s && this.shouldParseArrow(L) && this.eat(o.arrow)) return this.checkPatternErrors(K, !1), this.checkYieldAwaitInDefaultParams(), this.yieldPos = G, this.awaitPos = X, this.parseParenArrowList(p, m, L, a);
7414
- L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, T)).expressions = L, this.finishNodeAt(c, "SequenceExpression", re, ve)) : c = L[0];
7414
+ L.length && !E || this.unexpected(this.lastTokStart), g && this.unexpected(g), this.checkExpressionErrors(K, !0), this.yieldPos = G || this.yieldPos, this.awaitPos = X || this.awaitPos, L.length > 1 ? ((c = this.startNodeAt(_, T)).expressions = L, this.finishNodeAt(c, "SequenceExpression", ie, ve)) : c = L[0];
7415
7415
  } else c = this.parseParenExpression();
7416
7416
  if (this.options.preserveParens) {
7417
7417
  var $e = this.startNodeAt(p, m);
@@ -7481,8 +7481,8 @@ function Fh(e) {
7481
7481
  p && G && this.raise(this.lastTokStart, "Optional chaining cannot appear in the callee of new expressions");
7482
7482
  var X = this.eat(o.bracketL);
7483
7483
  if (X || G && this.type !== o.parenL && this.type !== o.backQuote || this.eat(o.dot)) {
7484
- var re = this.startNodeAt(a, c);
7485
- re.object = s, X ? (re.property = this.parseExpression(), this.expect(o.bracketR)) : re.property = this.type === o.privateId && s.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), re.computed = !!X, K && (re.optional = G), s = this.finishNode(re, "MemberExpression");
7484
+ var ie = this.startNodeAt(a, c);
7485
+ ie.object = s, X ? (ie.property = this.parseExpression(), this.expect(o.bracketR)) : ie.property = this.type === o.privateId && s.type !== "Super" ? this.parsePrivateIdent() : this.parseIdent(this.options.allowReserved !== "never"), ie.computed = !!X, K && (ie.optional = G), s = this.finishNode(ie, "MemberExpression");
7486
7486
  } else if (!p && this.eat(o.parenL)) {
7487
7487
  var ve = this.maybeInArrowParameters;
7488
7488
  this.maybeInArrowParameters = !0;
@@ -7686,7 +7686,7 @@ function Li(e) {
7686
7686
  }
7687
7687
  async function Te(e, t, i = [], r) {
7688
7688
  const n = `${t} ${i.join(" ")}`;
7689
- e !== void 0 && ie(`${e} - exec(${n})`);
7689
+ e !== void 0 && re(`${e} - exec(${n})`);
7690
7690
  const { stdout: u, stderr: h } = await $h(n);
7691
7691
  r === void 0 ? u.trim() && console.log(u.trim()) : await ae.writeFile(r, u.trim(), "utf8"), h.trim() && console.error(h.trim());
7692
7692
  }
@@ -7694,7 +7694,7 @@ async function Zh(e, t) {
7694
7694
  return ae.readdir(e, t);
7695
7695
  }
7696
7696
  async function Oi() {
7697
- ie("Load environment variables"), (await import("dotenv")).config();
7697
+ re("Load environment variables"), (await import("dotenv")).config();
7698
7698
  }
7699
7699
  function Ne(e) {
7700
7700
  const t = "\x1B[36m", i = "\x1B[0m", r = "─".repeat(Math.max(e.length + 60, 60));
@@ -7706,7 +7706,7 @@ function Ie(e) {
7706
7706
  ✅ ${e}
7707
7707
  `);
7708
7708
  }
7709
- function ie(e) {
7709
+ function re(e) {
7710
7710
  console.info(`
7711
7711
  ${e}
7712
7712
  `);
@@ -7725,28 +7725,20 @@ async function Uh(e) {
7725
7725
  }
7726
7726
  }
7727
7727
  async function Le(e, t, i = [], r = !1) {
7728
- return ie(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
7728
+ return re(`${e} - spawn(${t} ${i.join(" ")})`), new Promise((n, u) => {
7729
7729
  $s(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
  });
7733
7733
  }
7734
7734
  async function fl() {
7735
- Ne("Synchronise .editorconfig");
7736
- const e = Dt.dirname(Pr(import.meta.url)), t = Dt.resolve(e, "../.editorconfig"), i = Dt.resolve(process.cwd(), ".editorconfig");
7737
- ie(`Template: ${t}`), ie(`Destination: ${i}`);
7738
- const r = await ae.readFile(t, "utf8");
7739
- let n;
7740
- try {
7741
- n = await ae.readFile(i, "utf8");
7742
- } catch (u) {
7743
- if (u.code !== "ENOENT") throw u;
7744
- }
7745
- if (n === r) {
7746
- Ie(".editorconfig already up to date.");
7735
+ Ne("Synchronise config files");
7736
+ const e = Dt.dirname(Pr(import.meta.url)), t = Dt.resolve(e, "../.editorconfig"), i = await ae.readFile(t, "utf8"), r = Dt.resolve(process.cwd(), ".editorconfig");
7737
+ if (await ae.readFile(r, "utf8") === i) {
7738
+ Ie("File '.editorconfig' is already up to date.");
7747
7739
  return;
7748
7740
  }
7749
- await ae.writeFile(i, r, "utf8"), Ie(".editorconfig synchronised.");
7741
+ await ae.writeFile(r, i, "utf8"), Ie("File '.editorconfig' synchronised.");
7750
7742
  }
7751
7743
  async function ut(e, t) {
7752
7744
  await ae.writeFile(e, JSON.stringify(t, void 0, 4), "utf8");
@@ -7836,13 +7828,13 @@ async function ml() {
7836
7828
  await Gh("2️⃣", e);
7837
7829
  }
7838
7830
  if (await Le("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")
7839
- ie("7️⃣ Register module"), await qh();
7831
+ re("7️⃣ Register module"), await qh();
7840
7832
  else if (i.typeId === "engine")
7841
- ie("7️⃣ Register module"), await kr(t), await wr(e, `datapos-engine-eu/${i.uploadGroupName}`);
7833
+ re("7️⃣ Register module"), await kr(t), await wr(e, `datapos-engine-eu/${i.uploadGroupName}`);
7842
7834
  else if (i.uploadGroupName === void 0)
7843
- ie("7️⃣ Registration NOT required.");
7835
+ re("7️⃣ Registration NOT required.");
7844
7836
  else {
7845
- ie("7️⃣ Register module"), await kr(t);
7837
+ re("7️⃣ Register module"), await kr(t);
7846
7838
  const r = t.id.split("-").slice(2).join("-");
7847
7839
  await wr(e, `datapos-engine-eu/${i.uploadGroupName}/${r}`);
7848
7840
  }
@@ -7855,7 +7847,7 @@ async function ml() {
7855
7847
  await Uh(r);
7856
7848
  }
7857
7849
  } else
7858
- ie(`8️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
7850
+ re(`8️⃣ Publishing NOT required for package with type identifier of '${i.typeId}'.`);
7859
7851
  Ie(`Project version '${e.version}' released.`);
7860
7852
  } catch (e) {
7861
7853
  console.error("❌ Error releasing project.", e), process.exit(1);
@@ -7865,7 +7857,7 @@ async function yl() {
7865
7857
  try {
7866
7858
  Ne("Synchronise Project with GitHub");
7867
7859
  const e = await me("package.json");
7868
- ie("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.`);
7860
+ 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.`);
7869
7861
  } catch (e) {
7870
7862
  console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
7871
7863
  }
@@ -7880,12 +7872,12 @@ function vl() {
7880
7872
  }
7881
7873
  }
7882
7874
  async function Gh(e, t) {
7883
- ie(`${e} Build project configuration`);
7875
+ re(`${e} Build project configuration`);
7884
7876
  const i = await me("config.json");
7885
7877
  t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await ut("config.json", i);
7886
7878
  }
7887
7879
  async function Wh(e, t) {
7888
- ie(`${e} Build connector project configuration`);
7880
+ re(`${e} Build connector project configuration`);
7889
7881
  const [i, r] = await Promise.all([me("config.json"), Pt("src/index.ts")]), n = kc.safeParse(i);
7890
7882
  if (!n.success) {
7891
7883
  console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
@@ -7895,7 +7887,7 @@ async function Wh(e, t) {
7895
7887
  u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), h === "unknown" ? console.warn("⚠️ No usage identified.") : console.info(`ℹ️ Supports '${h}' usage.`), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, i.usageId = h, await ut("config.json", i);
7896
7888
  }
7897
7889
  async function Kh(e, t) {
7898
- ie(`${e} Build context project configuration`);
7890
+ re(`${e} Build context project configuration`);
7899
7891
  const [i, r] = await Promise.all([me("config.json"), Pt("src/index.ts")]), n = Lc.safeParse(i);
7900
7892
  if (!n.success) {
7901
7893
  console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
@@ -7905,7 +7897,7 @@ async function Kh(e, t) {
7905
7897
  u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ut("config.json", i);
7906
7898
  }
7907
7899
  async function Xh(e, t) {
7908
- ie(`${e} Build presenter project configuration`);
7900
+ re(`${e} Build presenter project configuration`);
7909
7901
  const [i, r] = await Promise.all([me("config.json"), Pt("src/index.ts")]), n = Bc.safeParse(i);
7910
7902
  if (!n.success) {
7911
7903
  console.log("❌ Configuration is invalid:"), console.table(n.error.issues);
@@ -7915,7 +7907,7 @@ async function Xh(e, t) {
7915
7907
  u.length > 0 ? (console.info(`ℹ️ Implements ${u.length} operations:`), console.table(u)) : console.warn("⚠️ Implements no operations."), t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), i.operations = u, await ut("config.json", i);
7916
7908
  }
7917
7909
  async function Os(e, t, i = "./") {
7918
- if (ie(`${e} Bump project version`), t.version == null)
7910
+ if (re(`${e} Bump project version`), t.version == null)
7919
7911
  t.version = "0.0.001", console.warn(`⚠️ Project version initialised to '${t.version}'.`), await ut(`${i}package.json`, t);
7920
7912
  else {
7921
7913
  const r = t.version, n = t.version.split(".");
@@ -7955,7 +7947,7 @@ async function xl() {
7955
7947
  }
7956
7948
  }
7957
7949
  async function el(e) {
7958
- ie(`${e} Insert OWASP Badge(s) into 'README.md'`);
7950
+ re(`${e} Insert OWASP Badge(s) into 'README.md'`);
7959
7951
  const t = await me("dependency-check-reports/dependency-check-report.json"), i = { critical: 0, high: 0, moderate: 0, low: 0, unknown: 0 };
7960
7952
  for (const o of t.dependencies)
7961
7953
  if (o.vulnerabilities != null)
@@ -8006,7 +7998,7 @@ async function bl(e = [], t = !0) {
8006
7998
  "license-report-recursive",
8007
7999
  ["--only=prod,peer", "--output=tree", "--recurse", "--department.value=n/a", "--licensePeriod.value=n/a", "--material.value=n/a", "--relatedTo.value=n/a"],
8008
8000
  "licenses/licenseTree.json"
8009
- ), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (ie("3️⃣ Skip 'licenses/licenseTree.json' file generate"), ie("4️⃣ Skip 'licenses/licenseTree.json' file check")), await Bh("licenses/downloads"), await Te("5️⃣ Download license files", "license-downloader", [
8001
+ ), await Te("4️⃣ Check 'licenseTree.json' file", "license-report-check", ["--source", "licenses/licenseTree.json", "--output=table", ...i])) : (re("3️⃣ Skip 'licenses/licenseTree.json' file generate"), re("4️⃣ Skip 'licenses/licenseTree.json' file check")), await Bh("licenses/downloads"), await Te("5️⃣ Download license files", "license-downloader", [
8010
8002
  "--source",
8011
8003
  "licenses/licenses.json",
8012
8004
  "--licDir",
@@ -8020,7 +8012,7 @@ async function bl(e = [], t = !0) {
8020
8012
  }
8021
8013
  }
8022
8014
  async function rl(e, t) {
8023
- ie(`${e} Insert licenses into 'README.md'`);
8015
+ re(`${e} Insert licenses into 'README.md'`);
8024
8016
  const i = await Pt("./README.md"), r = i.indexOf(Tr), n = i.indexOf(il);
8025
8017
  if (r === -1 || n === -1) {
8026
8018
  console.error("❌ No dependency license markers found in 'README.md'.");
@@ -8137,7 +8129,7 @@ export {
8137
8129
  _l as formatCode,
8138
8130
  kl as lintCode,
8139
8131
  ml as releaseProject,
8140
- fl as syncEditorConfig,
8132
+ fl as syncConfigFiles,
8141
8133
  yl as syncProjectWithGitHub,
8142
8134
  vl as testProject,
8143
8135
  wl as updateDataPosDependencies