@zenbu-labs/pixel 0.0.20 → 0.0.21
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 +7 -7
- package/scripts/postinstall.mjs +21 -6
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenbu-labs/pixel",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "[placeholder copy: Electron apps that render into your terminal pane]",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/zenbu-labs/
|
|
9
|
-
"directory": "packages/pixel"
|
|
8
|
+
"url": "git+https://github.com/zenbu-labs/terminal-browser.git",
|
|
9
|
+
"directory": "pixel/packages/pixel"
|
|
10
10
|
},
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"react": "^18.3.1"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@zenbu-labs/pixel-native-darwin-arm64": "0.0.
|
|
62
|
-
"@zenbu-labs/pixel-native-darwin-x64": "0.0.
|
|
63
|
-
"@zenbu-labs/pixel-native-linux-arm64": "0.0.
|
|
64
|
-
"@zenbu-labs/pixel-native-linux-x64": "0.0.
|
|
61
|
+
"@zenbu-labs/pixel-native-darwin-arm64": "0.0.21",
|
|
62
|
+
"@zenbu-labs/pixel-native-darwin-x64": "0.0.21",
|
|
63
|
+
"@zenbu-labs/pixel-native-linux-arm64": "0.0.21",
|
|
64
|
+
"@zenbu-labs/pixel-native-linux-x64": "0.0.21"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@types/node": "^22.0.0",
|
package/scripts/postinstall.mjs
CHANGED
|
@@ -25,9 +25,15 @@ if (!platform) {
|
|
|
25
25
|
process.exit(1);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
// Patched electron builds are published as electron-v<version> releases. Newer ones live on
|
|
29
|
+
// the terminal-browser repo, where pixel now lives; older ones stayed on the archived pixel repo.
|
|
30
|
+
const mirrors = process.env.PIXEL_ELECTRON_MIRROR
|
|
31
|
+
? [process.env.PIXEL_ELECTRON_MIRROR]
|
|
32
|
+
: [
|
|
33
|
+
`https://github.com/zenbu-labs/terminal-browser/releases/download/electron-v${version}`,
|
|
34
|
+
`https://github.com/zenbu-labs/pixel/releases/download/electron-v${version}`,
|
|
35
|
+
];
|
|
36
|
+
let mirror = mirrors[0];
|
|
31
37
|
const zipName = `electron-v${version}-${platform}.zip`;
|
|
32
38
|
|
|
33
39
|
async function fetchBytes(url) {
|
|
@@ -59,9 +65,18 @@ function readMarker(file) {
|
|
|
59
65
|
fs.mkdirSync(electronDir, { recursive: true });
|
|
60
66
|
|
|
61
67
|
let shasums;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
let lastError;
|
|
69
|
+
for (const candidate of mirrors) {
|
|
70
|
+
try {
|
|
71
|
+
shasums = (await fetchBytes(`${candidate}/SHASUMS256.txt`)).toString("utf8");
|
|
72
|
+
mirror = candidate;
|
|
73
|
+
break;
|
|
74
|
+
} catch (error) {
|
|
75
|
+
lastError = error;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (!shasums) {
|
|
79
|
+
const error = lastError;
|
|
65
80
|
if (skipBinary && fs.existsSync(typesFile)) process.exit(0);
|
|
66
81
|
process.stderr.write(
|
|
67
82
|
`pixel: [placeholder copy: no patched electron v${version} is published (${error.message}). ` +
|