@pipelab/core-node 1.0.0-beta.4 → 1.0.0-beta.6
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/CHANGELOG.md +18 -0
- package/package.json +4 -4
- package/scratch/simulate-updates.ts +118 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @pipelab/core-node
|
|
2
2
|
|
|
3
|
+
## 1.0.0-beta.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- beta tag
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @pipelab/constants@1.0.0-beta.5
|
|
10
|
+
- @pipelab/shared@1.0.0-beta.4
|
|
11
|
+
|
|
12
|
+
## 1.0.0-beta.5
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- bump
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
- @pipelab/constants@1.0.0-beta.4
|
|
19
|
+
- @pipelab/shared@1.0.0-beta.3
|
|
20
|
+
|
|
3
21
|
## 1.0.0-beta.4
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelab/core-node",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Pipelab automation engine for Node.js",
|
|
6
6
|
"license": "FSL-1.1-MIT",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"type-fest": "4.39.0",
|
|
41
41
|
"ws": "8.18.3",
|
|
42
42
|
"yauzl": "2.10.0",
|
|
43
|
-
"@pipelab/constants": "1.0.0-beta.
|
|
44
|
-
"@pipelab/shared": "1.0.0-beta.
|
|
43
|
+
"@pipelab/constants": "1.0.0-beta.5",
|
|
44
|
+
"@pipelab/shared": "1.0.0-beta.4"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/adm-zip": "0.5.7",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@types/yauzl": "2.10.3",
|
|
55
55
|
"tsdown": "0.21.2",
|
|
56
56
|
"typescript": "^5.0.0",
|
|
57
|
-
"@pipelab/tsconfig": "1.0.0-beta.
|
|
57
|
+
"@pipelab/tsconfig": "1.0.0-beta.4"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|
|
60
60
|
"build": "tsdown",
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import pacote from "pacote";
|
|
2
|
+
import semver from "semver";
|
|
3
|
+
import { fetchLatestDesktopRelease } from "../src/utils/github.js";
|
|
4
|
+
|
|
5
|
+
const PACKAGES = [
|
|
6
|
+
// Apps & Core
|
|
7
|
+
"@pipelab/cli",
|
|
8
|
+
"@pipelab/ui",
|
|
9
|
+
"@pipelab/shared",
|
|
10
|
+
"@pipelab/core-node",
|
|
11
|
+
"@pipelab/constants",
|
|
12
|
+
"@pipelab/migration",
|
|
13
|
+
|
|
14
|
+
// Plugins
|
|
15
|
+
"@pipelab/plugin-construct",
|
|
16
|
+
"@pipelab/plugin-core",
|
|
17
|
+
"@pipelab/plugin-discord",
|
|
18
|
+
"@pipelab/plugin-electron",
|
|
19
|
+
"@pipelab/plugin-filesystem",
|
|
20
|
+
"@pipelab/plugin-itch",
|
|
21
|
+
"@pipelab/plugin-minify",
|
|
22
|
+
"@pipelab/plugin-netlify",
|
|
23
|
+
"@pipelab/plugin-nvpatch",
|
|
24
|
+
"@pipelab/plugin-poki",
|
|
25
|
+
"@pipelab/plugin-steam",
|
|
26
|
+
"@pipelab/plugin-system",
|
|
27
|
+
"@pipelab/plugin-tauri",
|
|
28
|
+
|
|
29
|
+
// Assets
|
|
30
|
+
"@pipelab/asset-discord",
|
|
31
|
+
"@pipelab/asset-electron",
|
|
32
|
+
"@pipelab/asset-netlify",
|
|
33
|
+
"@pipelab/asset-tauri"
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
async function simulate() {
|
|
37
|
+
console.log("==========================================");
|
|
38
|
+
console.log(" PIPELAB UPDATE FLOW SIMULATOR ");
|
|
39
|
+
console.log("==========================================\n");
|
|
40
|
+
|
|
41
|
+
// 1. Simulate Desktop GitHub Release Update
|
|
42
|
+
console.log("--- 1. Simulating Desktop Application (GitHub Releases) ---");
|
|
43
|
+
try {
|
|
44
|
+
const stableApp = await fetchLatestDesktopRelease({ allowPrerelease: false });
|
|
45
|
+
const betaApp = await fetchLatestDesktopRelease({ allowPrerelease: true });
|
|
46
|
+
|
|
47
|
+
console.log(`[STABLE] Resolved version: ${stableApp ? stableApp.tag_name : "None (Stable users protected)"}`);
|
|
48
|
+
console.log(`[BETA] Resolved version: ${betaApp ? betaApp.tag_name : "None"}`);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("Failed to fetch desktop releases from GitHub:", error);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
console.log("\n--- 2. Simulating NPM Packages (CLI, UI, Plugins, Assets) ---");
|
|
54
|
+
console.log("Fetching data from NPM registry. Please wait...\n");
|
|
55
|
+
|
|
56
|
+
const results: Array<{
|
|
57
|
+
package: string;
|
|
58
|
+
stable: string;
|
|
59
|
+
beta: string;
|
|
60
|
+
notes: string;
|
|
61
|
+
}> = [];
|
|
62
|
+
|
|
63
|
+
for (const pkg of PACKAGES) {
|
|
64
|
+
try {
|
|
65
|
+
const packument = await pacote.packument(pkg);
|
|
66
|
+
const stableVersion = packument["dist-tags"]?.latest || "N/A";
|
|
67
|
+
const betaVersion = packument["dist-tags"]?.beta || "N/A";
|
|
68
|
+
|
|
69
|
+
let notes = "";
|
|
70
|
+
if (stableVersion === "N/A" && betaVersion === "N/A") {
|
|
71
|
+
notes = "⚠️ Package not published on NPM";
|
|
72
|
+
} else if (betaVersion !== "N/A" && stableVersion !== "N/A") {
|
|
73
|
+
if (betaVersion === stableVersion) {
|
|
74
|
+
notes = "Stable and Beta are in sync";
|
|
75
|
+
} else {
|
|
76
|
+
// Attempt semver comparison
|
|
77
|
+
const cleanStable = semver.coerce(stableVersion);
|
|
78
|
+
const cleanBeta = semver.coerce(betaVersion);
|
|
79
|
+
if (cleanStable && cleanBeta) {
|
|
80
|
+
const comp = semver.compare(stableVersion, betaVersion);
|
|
81
|
+
if (comp < 0) {
|
|
82
|
+
notes = "🚀 Beta is ahead";
|
|
83
|
+
} else if (comp > 0) {
|
|
84
|
+
notes = "Stable is ahead";
|
|
85
|
+
} else {
|
|
86
|
+
notes = "Stable and Beta are in sync (coerced)";
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
notes = "Different versions (non-semver)";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
} else if (betaVersion !== "N/A" && stableVersion === "N/A") {
|
|
93
|
+
notes = "Only Beta version exists";
|
|
94
|
+
} else if (stableVersion !== "N/A" && betaVersion === "N/A") {
|
|
95
|
+
notes = "No Beta tag published";
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
results.push({
|
|
99
|
+
package: pkg,
|
|
100
|
+
stable: stableVersion,
|
|
101
|
+
beta: betaVersion,
|
|
102
|
+
notes
|
|
103
|
+
});
|
|
104
|
+
} catch (error: any) {
|
|
105
|
+
results.push({
|
|
106
|
+
package: pkg,
|
|
107
|
+
stable: "ERROR",
|
|
108
|
+
beta: "ERROR",
|
|
109
|
+
notes: `Failed to fetch: ${error.message}`
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
console.table(results);
|
|
115
|
+
console.log("\n==========================================\n");
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
simulate().catch(console.error);
|