@datapos/datapos-development 0.3.225 → 0.3.227
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.
|
@@ -7638,11 +7638,11 @@ function Ih(e) {
|
|
|
7638
7638
|
Mr.includes(s) && (t = !0), Or.includes(s) && (i = !0);
|
|
7639
7639
|
return t && i ? "bidirectional" : t ? "source" : i ? "destination" : "unknown";
|
|
7640
7640
|
}
|
|
7641
|
-
async function _e(e, t = [],
|
|
7642
|
-
const
|
|
7643
|
-
We(
|
|
7644
|
-
const { stdout:
|
|
7645
|
-
|
|
7641
|
+
async function _e(e, t, i = [], s) {
|
|
7642
|
+
const a = `${t} ${i.join(" ")}`;
|
|
7643
|
+
We(`${e}. Execute command: '${a}'`);
|
|
7644
|
+
const { stdout: o, stderr: h } = await Eh(a);
|
|
7645
|
+
o.trim() && console.log(o.trim()), h.trim() && console.error(h.trim());
|
|
7646
7646
|
}
|
|
7647
7647
|
async function Nh() {
|
|
7648
7648
|
We("Load environment variables"), (await import("dotenv")).config();
|
|
@@ -7704,7 +7704,7 @@ async function Uh(e = !1) {
|
|
|
7704
7704
|
try {
|
|
7705
7705
|
Ne("Release Project");
|
|
7706
7706
|
const t = await St("package.json");
|
|
7707
|
-
await _r(t), await Lh(t), await Ae("3️⃣ Bundle project.", "vite", ["build"]), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${t.version}"`]), await _e("git", ["push", "origin", "main:main"]), await Ae("", "npm", ["publish", "--access", "public"]), Ve(`Project version ${t.version} released.`);
|
|
7707
|
+
await _r("1️⃣", t), await Lh("2️⃣", t), await Ae("3️⃣ Bundle project.", "vite", ["build"]), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${t.version}"`]), await _e("git", ["push", "origin", "main:main"]), await Ae("", "npm", ["publish", "--access", "public"]), Ve(`Project version ${t.version} released.`);
|
|
7708
7708
|
} catch (t) {
|
|
7709
7709
|
console.error("❌ Error releasing project.", t), process.exit(1);
|
|
7710
7710
|
}
|
|
@@ -7713,7 +7713,7 @@ async function Zh() {
|
|
|
7713
7713
|
try {
|
|
7714
7714
|
Ne("Synchronise Project with GitHub");
|
|
7715
7715
|
const e = await St("package.json");
|
|
7716
|
-
We("Bump project version"), await _r(e), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${e.version}"`]), await _e("git", ["push", "origin", "main:main"]), Ve(`Project version ${e.version} synchronised with GitHub.`);
|
|
7716
|
+
We("Bump project version"), await _r("1️⃣", e), await _e("git", ["add", "."]), await _e("git", ["commit", "-m", `"v${e.version}"`]), await _e("git", ["push", "origin", "main:main"]), Ve(`Project version ${e.version} synchronised with GitHub.`);
|
|
7717
7717
|
} catch (e) {
|
|
7718
7718
|
console.error("❌ Error synchronising project with GitHub.", e), process.exit(1);
|
|
7719
7719
|
}
|
|
@@ -7727,17 +7727,17 @@ function qh() {
|
|
|
7727
7727
|
console.error("❌ Error testing project.", e), process.exit(1);
|
|
7728
7728
|
}
|
|
7729
7729
|
}
|
|
7730
|
-
async function Lh(e) {
|
|
7731
|
-
We(
|
|
7732
|
-
const
|
|
7733
|
-
|
|
7730
|
+
async function Lh(e, t) {
|
|
7731
|
+
We(`${e} Build project configuration`);
|
|
7732
|
+
const i = await St("config.json");
|
|
7733
|
+
t.name != null && (i.id = t.name.replace("@datapos/", "").replace("@data-positioning/", "")), t.version != null && (i.version = t.version), await di("config.json", i), console.info("✔️ Configuration built.");
|
|
7734
7734
|
}
|
|
7735
|
-
async function _r(e, t = "./") {
|
|
7736
|
-
if (We(
|
|
7737
|
-
|
|
7735
|
+
async function _r(e, t, i = "./") {
|
|
7736
|
+
if (We(`${e} Bump project version`), t.version == null)
|
|
7737
|
+
t.version = "0.0.001", console.warn(`⚠️ Project version initialised to ${t.version}.`), await di(`${i}package.json`, t);
|
|
7738
7738
|
else {
|
|
7739
|
-
const
|
|
7740
|
-
|
|
7739
|
+
const s = t.version, a = t.version.split(".");
|
|
7740
|
+
t.version = `${a[0]}.${a[1]}.${Number(a[2]) + 1}`, console.info(`✔️ Project version bumped from ${s} to ${t.version}.`), await di(`${i}package.json`, t);
|
|
7741
7741
|
}
|
|
7742
7742
|
}
|
|
7743
7743
|
const Oh = ["critical", "high", "moderate", "low", "unknown"];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ConnectorOperation, ConnectorUsageId } from '@datapos/datapos-shared';
|
|
2
2
|
declare function extractOperationsFromSource<T>(source: string): T[];
|
|
3
3
|
declare function determineConnectorUsageId(operations: ConnectorOperation[]): ConnectorUsageId;
|
|
4
|
-
declare function execCommand(command_: string, arguments_?: string[], outputFilePath?: string): Promise<void>;
|
|
4
|
+
declare function execCommand(label: string, command_: string, arguments_?: string[], outputFilePath?: string): Promise<void>;
|
|
5
5
|
declare function loadEnvironmentVariables(): Promise<void>;
|
|
6
6
|
declare function logOperationHeader(text: string): void;
|
|
7
7
|
declare function logOperationSuccess(message: string): void;
|
package/package.json
CHANGED