vibecodingmachine-core 2025.11.2-9.855 → 2025.12.1-534
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/package.json
CHANGED
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
const https = require('https');
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Compare two timestamp-based versions (YYYY.MM.DD-HHMM)
|
|
5
|
+
* Returns true if version1 is newer than version2
|
|
6
|
+
* Handles both new format (YYYY.MM.DD-HHMM) and old format (YYYY.MM.DD.HHMM)
|
|
7
|
+
*/
|
|
8
|
+
function isVersionNewer(version1, version2) {
|
|
9
|
+
// Versions are in format YYYY.MM.DD-HHMM, so string comparison works
|
|
10
|
+
// Normalize both versions (handle old format with dots too)
|
|
11
|
+
const normalize = (v) => v.replace(/\.(\d{2})(\d{2})$/, '-$1$2');
|
|
12
|
+
return normalize(version1) > normalize(version2);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Format version timestamp to YYYY.MM.DD-HHMM (TIMEZONE)
|
|
5
17
|
*/
|
|
6
18
|
function formatVersionTimestamp(versionString, date) {
|
|
7
|
-
// Version format: YYYY.MM.DD.HHMM
|
|
8
|
-
const match = versionString.match(/^(\d{4})\.(\d{2})\.(\d{2})
|
|
19
|
+
// Version format: YYYY.MM.DD-HHMM (or old format YYYY.MM.DD.HHMM for backward compat)
|
|
20
|
+
const match = versionString.match(/^(\d{4})\.(\d{2})\.(\d{2})[-.](\d{2})(\d{2})$/);
|
|
9
21
|
if (!match) return versionString;
|
|
10
22
|
|
|
11
23
|
try {
|
|
@@ -19,7 +31,9 @@ function formatVersionTimestamp(versionString, date) {
|
|
|
19
31
|
timeZoneName: 'short'
|
|
20
32
|
}).format(versionDate).split(' ').pop();
|
|
21
33
|
|
|
22
|
-
|
|
34
|
+
// Normalize to new format for display
|
|
35
|
+
const normalized = `${year}.${month}.${day}-${hour}${minute}`;
|
|
36
|
+
return `${normalized} (${timeZoneAbbr})`;
|
|
23
37
|
} catch (error) {
|
|
24
38
|
return `${versionString} (UTC)`;
|
|
25
39
|
}
|
|
@@ -27,12 +41,12 @@ function formatVersionTimestamp(versionString, date) {
|
|
|
27
41
|
|
|
28
42
|
/**
|
|
29
43
|
* Check for Electron app updates from S3 version manifest
|
|
30
|
-
* @param {string} currentVersion - Current version (e.g., '2025.11.26
|
|
44
|
+
* @param {string} currentVersion - Current version (e.g., '2025.11.26-0519')
|
|
31
45
|
* @returns {Promise<Object>} Update info or null if no update available
|
|
32
46
|
*/
|
|
33
47
|
async function checkForElectronUpdates(currentVersion) {
|
|
34
48
|
return new Promise((resolve, reject) => {
|
|
35
|
-
const manifestUrl = `https://
|
|
49
|
+
const manifestUrl = `https://d3fh7zgi8horze.cloudfront.net/downloads/version.json?t=${Date.now()}`;
|
|
36
50
|
console.log(`🔍 [UPDATE CHECK] Current version: ${currentVersion}`);
|
|
37
51
|
console.log(`📡 [UPDATE CHECK] Fetching: ${manifestUrl}`);
|
|
38
52
|
|
|
@@ -61,7 +75,7 @@ async function checkForElectronUpdates(currentVersion) {
|
|
|
61
75
|
// Detect architecture and choose appropriate download URL
|
|
62
76
|
const arch = process.arch; // 'arm64' or 'x64'
|
|
63
77
|
const platform = process.platform; // 'darwin' or 'win32'
|
|
64
|
-
const baseUrl = 'https://
|
|
78
|
+
const baseUrl = 'https://d3fh7zgi8horze.cloudfront.net/downloads';
|
|
65
79
|
|
|
66
80
|
let downloadUrl;
|
|
67
81
|
if (platform === 'darwin') {
|
|
@@ -79,7 +93,8 @@ async function checkForElectronUpdates(currentVersion) {
|
|
|
79
93
|
downloadUrl = baseUrl;
|
|
80
94
|
}
|
|
81
95
|
|
|
82
|
-
if
|
|
96
|
+
// Only show update if latest version is actually newer than current
|
|
97
|
+
if (latestVersion !== currentVersion && isVersionNewer(latestVersion, currentVersion)) {
|
|
83
98
|
console.log(`✅ [UPDATE CHECK] Update available: ${currentVersion} → ${latestVersion}`);
|
|
84
99
|
console.log(`📥 [UPDATE CHECK] Download URL: ${downloadUrl}`);
|
|
85
100
|
resolve({
|
|
@@ -62,15 +62,26 @@ async function checkForUpdates(packageName, currentVersion) {
|
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Compare two timestamp-based versions (YYYY.MM.DD-HHMM)
|
|
67
|
+
* Returns true if version1 is newer than version2
|
|
68
|
+
*/
|
|
69
|
+
function isVersionNewer(version1, version2) {
|
|
70
|
+
// Versions are in format YYYY.MM.DD-HHMM, so string comparison works
|
|
71
|
+
// Normalize both versions (handle old format with dots too)
|
|
72
|
+
const normalize = (v) => v.replace(/\.(\d{2})(\d{2})$/, '-$1$2');
|
|
73
|
+
return normalize(version1) > normalize(version2);
|
|
74
|
+
}
|
|
75
|
+
|
|
65
76
|
/**
|
|
66
77
|
* Check for CLI updates from S3 version manifest (unified with Electron)
|
|
67
78
|
* Both CLI and Electron now use the same timestamp-based versioning from git commits
|
|
68
|
-
* @param {string} currentVersion - Current CLI version (e.g., '2025.11.26
|
|
79
|
+
* @param {string} currentVersion - Current CLI version (e.g., '2025.11.26-0519')
|
|
69
80
|
* @returns {Promise<Object>} Update info or null if no update available
|
|
70
81
|
*/
|
|
71
82
|
async function checkForCLIUpdates(currentVersion) {
|
|
72
83
|
return new Promise((resolve, reject) => {
|
|
73
|
-
const manifestUrl = `https://
|
|
84
|
+
const manifestUrl = `https://d3fh7zgi8horze.cloudfront.net/downloads/version.json?t=${Date.now()}`;
|
|
74
85
|
|
|
75
86
|
https.get(manifestUrl, (res) => {
|
|
76
87
|
let data = '';
|
|
@@ -92,7 +103,8 @@ async function checkForCLIUpdates(currentVersion) {
|
|
|
92
103
|
const latestVersion = manifest.version;
|
|
93
104
|
const publishedDate = manifest.date;
|
|
94
105
|
|
|
95
|
-
if
|
|
106
|
+
// Only show update if latest version is actually newer than current
|
|
107
|
+
if (latestVersion !== currentVersion && isVersionNewer(latestVersion, currentVersion)) {
|
|
96
108
|
resolve({
|
|
97
109
|
hasUpdate: true,
|
|
98
110
|
currentVersion,
|
|
@@ -12,15 +12,16 @@ const CACHE_DURATION = 1000 * 60 * 60; // 1 hour
|
|
|
12
12
|
const VERSION_URL = 'https://vibecodingmachine-website.s3.amazonaws.com/downloads/version.json';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
* Format version timestamp to YYYY.MM.DD
|
|
15
|
+
* Format version timestamp to YYYY.MM.DD-HHMM UTC
|
|
16
16
|
*/
|
|
17
17
|
function formatVersionTimestamp(versionString) {
|
|
18
|
-
// Version format: YYYY.MM.DD.HHMM
|
|
19
|
-
const match = versionString.match(/^(\d{4})\.(\d{2})\.(\d{2})
|
|
18
|
+
// Version format: YYYY.MM.DD-HHMM (or old format YYYY.MM.DD.HHMM for backward compat)
|
|
19
|
+
const match = versionString.match(/^(\d{4})\.(\d{2})\.(\d{2})[-.](\d{2})(\d{2})$/);
|
|
20
20
|
if (!match) return versionString;
|
|
21
21
|
|
|
22
22
|
const [, year, month, day, hour, minute] = match;
|
|
23
|
-
|
|
23
|
+
// Normalize to new format for display
|
|
24
|
+
return `${year}.${month}.${day}-${hour}${minute} UTC`;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
/**
|
|
@@ -44,7 +45,7 @@ function formatLocalTime(isoTimestamp) {
|
|
|
44
45
|
hour12: false
|
|
45
46
|
}).format(date);
|
|
46
47
|
|
|
47
|
-
// Convert to YYYY.MM.DD
|
|
48
|
+
// Convert to YYYY.MM.DD-HHMM format
|
|
48
49
|
const parts = formatted.match(/(\d{2})\/(\d{2})\/(\d{4}), (\d{2}):(\d{2})/);
|
|
49
50
|
if (parts) {
|
|
50
51
|
const [, month, day, year, hour, minute] = parts;
|