@bufbuild/protoc-gen-es 0.0.1-alpha.3 → 0.0.2-alpha.1
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/bin/protoc-gen-es +26 -1
- package/package.json +22 -14
package/bin/protoc-gen-es
CHANGED
|
@@ -11,7 +11,7 @@ try {
|
|
|
11
11
|
} catch (e) {
|
|
12
12
|
exitReadBasePackage(e);
|
|
13
13
|
}
|
|
14
|
-
const wantName =
|
|
14
|
+
const wantName = findPlatformPackageName(basePkg);
|
|
15
15
|
if (!basePkg.optionalDependencies[wantName]) {
|
|
16
16
|
exitUnsupportedPlatform(basePkg);
|
|
17
17
|
}
|
|
@@ -68,3 +68,28 @@ function readPackage(dir) {
|
|
|
68
68
|
}
|
|
69
69
|
return pkg;
|
|
70
70
|
}
|
|
71
|
+
|
|
72
|
+
function findPlatformPackageName() {
|
|
73
|
+
// prettier-ignore
|
|
74
|
+
const platforms = [
|
|
75
|
+
{ name: "darwin-64", npmOs: "darwin", npmCpu: "x64", },
|
|
76
|
+
{ name: "darwin-64", npmOs: "darwin", npmCpu: "x64", },
|
|
77
|
+
{ name: "darwin-arm64", npmOs: "darwin", npmCpu: "arm64", },
|
|
78
|
+
{ name: "windows-64", npmOs: "win32", npmCpu: "x64", },
|
|
79
|
+
{ name: "windows-arm64", npmOs: "win32", npmCpu: "arm64", },
|
|
80
|
+
{ name: "windows-32", npmOs: "win32", npmCpu: "ia32", },
|
|
81
|
+
{ name: "linux-64", npmOs: "linux", npmCpu: "x64", },
|
|
82
|
+
{ name: "linux-32", npmOs: "linux", npmCpu: "ia32", },
|
|
83
|
+
{ name: "linux-arm", npmOs: "linux", npmCpu: "arm", },
|
|
84
|
+
{ name: "linux-arm64", npmOs: "linux", npmCpu: "arm64", },
|
|
85
|
+
{ name: "freebsd-64", npmOs: "freebsd", npmCpu: "x64", },
|
|
86
|
+
{ name: "freebsd-arm64", npmOs: "freebsd", npmCpu: "arm64", },
|
|
87
|
+
{ name: "netbsd-64", npmOs: "netbsd", npmCpu: "x64", },
|
|
88
|
+
{ name: "openbsd-64", npmOs: "openbsd", npmCpu: "x64", },
|
|
89
|
+
];
|
|
90
|
+
const platform = platforms.find(p => p.npmOs === process.platform && p.npmCpu === process.arch);
|
|
91
|
+
if (!platform) {
|
|
92
|
+
return undefined;
|
|
93
|
+
}
|
|
94
|
+
return `${basePkg.name}-${platform.name}`;
|
|
95
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bufbuild/protoc-gen-es",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-alpha.1",
|
|
4
4
|
"description": "protoc-gen-es",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -10,19 +10,27 @@
|
|
|
10
10
|
"bin": {
|
|
11
11
|
"protoc-gen-es": "bin/protoc-gen-es"
|
|
12
12
|
},
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"@bufbuild/protobuf": "^0.0.2-alpha.1"
|
|
15
|
+
},
|
|
16
|
+
"peerDependenciesMeta": {
|
|
17
|
+
"@bufbuild/protobuf": {
|
|
18
|
+
"optional": true
|
|
19
|
+
}
|
|
20
|
+
},
|
|
13
21
|
"optionalDependencies": {
|
|
14
|
-
"@bufbuild/protoc-gen-es-darwin-64": "0.0.
|
|
15
|
-
"@bufbuild/protoc-gen-es-darwin-arm64": "0.0.
|
|
16
|
-
"@bufbuild/protoc-gen-es-windows-64": "0.0.
|
|
17
|
-
"@bufbuild/protoc-gen-es-windows-arm64": "0.0.
|
|
18
|
-
"@bufbuild/protoc-gen-es-windows-32": "0.0.
|
|
19
|
-
"@bufbuild/protoc-gen-es-linux-64": "0.0.
|
|
20
|
-
"@bufbuild/protoc-gen-es-linux-32": "0.0.
|
|
21
|
-
"@bufbuild/protoc-gen-es-linux-arm": "0.0.
|
|
22
|
-
"@bufbuild/protoc-gen-es-linux-arm64": "0.0.
|
|
23
|
-
"@bufbuild/protoc-gen-es-freebsd-64": "0.0.
|
|
24
|
-
"@bufbuild/protoc-gen-es-freebsd-arm64": "0.0.
|
|
25
|
-
"@bufbuild/protoc-gen-es-netbsd-64": "0.0.
|
|
26
|
-
"@bufbuild/protoc-gen-es-openbsd-64": "0.0.
|
|
22
|
+
"@bufbuild/protoc-gen-es-darwin-64": "0.0.2-alpha.1",
|
|
23
|
+
"@bufbuild/protoc-gen-es-darwin-arm64": "0.0.2-alpha.1",
|
|
24
|
+
"@bufbuild/protoc-gen-es-windows-64": "0.0.2-alpha.1",
|
|
25
|
+
"@bufbuild/protoc-gen-es-windows-arm64": "0.0.2-alpha.1",
|
|
26
|
+
"@bufbuild/protoc-gen-es-windows-32": "0.0.2-alpha.1",
|
|
27
|
+
"@bufbuild/protoc-gen-es-linux-64": "0.0.2-alpha.1",
|
|
28
|
+
"@bufbuild/protoc-gen-es-linux-32": "0.0.2-alpha.1",
|
|
29
|
+
"@bufbuild/protoc-gen-es-linux-arm": "0.0.2-alpha.1",
|
|
30
|
+
"@bufbuild/protoc-gen-es-linux-arm64": "0.0.2-alpha.1",
|
|
31
|
+
"@bufbuild/protoc-gen-es-freebsd-64": "0.0.2-alpha.1",
|
|
32
|
+
"@bufbuild/protoc-gen-es-freebsd-arm64": "0.0.2-alpha.1",
|
|
33
|
+
"@bufbuild/protoc-gen-es-netbsd-64": "0.0.2-alpha.1",
|
|
34
|
+
"@bufbuild/protoc-gen-es-openbsd-64": "0.0.2-alpha.1"
|
|
27
35
|
}
|
|
28
36
|
}
|