mz-dev 0.1.0-beta.19 → 0.1.0-beta.23
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/README.md +3 -2
- package/package.json +2 -2
- package/scripts/resolve.js +28 -4
package/README.md
CHANGED
|
@@ -27,10 +27,11 @@ Pin an exact version (`mz-dev@0.1.0-beta.N`) when reporting issues.
|
|
|
27
27
|
|
|
28
28
|
## Supported platforms
|
|
29
29
|
|
|
30
|
-
macOS on Apple silicon (`darwin-arm64`)
|
|
30
|
+
macOS on Apple silicon (`darwin-arm64`) and Intel (`darwin-x64`), Linux
|
|
31
|
+
(`linux-x64`) and Windows (`windows-x64`). Node.js 18 or newer runs the `mz`
|
|
31
32
|
launcher.
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
On other platforms `mz` says there is no build for them and exits.
|
|
34
35
|
|
|
35
36
|
## How the install works
|
|
36
37
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mz-dev",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.23",
|
|
4
4
|
"description": "Local-first developer workbench that runs your coding agents the way you would",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"flutter",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"LICENSE"
|
|
26
26
|
],
|
|
27
27
|
"optionalDependencies": {
|
|
28
|
-
"mz-dev-darwin-arm64": "0.1.0-beta.
|
|
28
|
+
"mz-dev-darwin-arm64": "0.1.0-beta.23"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=18"
|
package/scripts/resolve.js
CHANGED
|
@@ -12,19 +12,42 @@
|
|
|
12
12
|
const fs = require('fs');
|
|
13
13
|
const path = require('path');
|
|
14
14
|
|
|
15
|
-
// Platforms with a published package
|
|
16
|
-
//
|
|
15
|
+
// Platforms with a published package, built by .github/workflows/release.yml.
|
|
16
|
+
// Adding one: add it to that workflow's matrix, list it here and in
|
|
17
17
|
// package.json `optionalDependencies`.
|
|
18
18
|
const PLATFORM_MAP = {
|
|
19
19
|
'darwin:arm64': 'darwin-arm64',
|
|
20
|
+
'darwin:x64': 'darwin-x64',
|
|
21
|
+
'linux:x64': 'linux-x64',
|
|
22
|
+
'win32:x64': 'windows-x64',
|
|
20
23
|
};
|
|
21
24
|
|
|
25
|
+
/**
|
|
26
|
+
* The platforms this launcher ships: those its package.json lists in
|
|
27
|
+
* optionalDependencies (a release built without CI may list only some).
|
|
28
|
+
*/
|
|
29
|
+
function publishedPlatforms() {
|
|
30
|
+
let listed = null;
|
|
31
|
+
try {
|
|
32
|
+
const pkg = JSON.parse(
|
|
33
|
+
fs.readFileSync(path.join(packageRoot(), 'package.json'), 'utf8'),
|
|
34
|
+
);
|
|
35
|
+
listed = Object.keys(pkg.optionalDependencies ?? {});
|
|
36
|
+
} catch (_) {
|
|
37
|
+
// No manifest next to us: assume every known platform.
|
|
38
|
+
}
|
|
39
|
+
return Object.values(PLATFORM_MAP).filter(
|
|
40
|
+
dir => listed === null || listed.includes(platformPackageName(dir)),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
22
44
|
function platformDir(platform = process.platform, arch = process.arch) {
|
|
23
45
|
const dir = PLATFORM_MAP[`${platform}:${arch}`];
|
|
24
|
-
|
|
46
|
+
const available = publishedPlatforms();
|
|
47
|
+
if (!dir || !available.includes(dir)) {
|
|
25
48
|
throw new Error(
|
|
26
49
|
`mz-dev has no prebuilt binary for ${platform}-${arch} yet. ` +
|
|
27
|
-
`Available: ${
|
|
50
|
+
`Available: ${available.join(', ')}.`,
|
|
28
51
|
);
|
|
29
52
|
}
|
|
30
53
|
return dir;
|
|
@@ -73,6 +96,7 @@ function uiDir(platform = platformDir()) {
|
|
|
73
96
|
|
|
74
97
|
module.exports = {
|
|
75
98
|
PLATFORM_MAP,
|
|
99
|
+
publishedPlatforms,
|
|
76
100
|
platformDir,
|
|
77
101
|
platformPackageName,
|
|
78
102
|
binaryName,
|