easc-cli 1.1.34 → 1.1.36
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 +6 -6
- package/script/deploy.ts +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
4
4
|
"name": "easc-cli",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"devDependencies": {},
|
|
27
27
|
"dependencies": {},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"easc-linux-x64": "0.0.0-main-
|
|
30
|
-
"easc-linux-arm64": "0.0.0-main-
|
|
31
|
-
"easc-darwin-x64": "0.0.0-main-
|
|
32
|
-
"easc-darwin-arm64": "0.0.0-main-
|
|
33
|
-
"easc-windows-x64": "0.0.0-main-
|
|
29
|
+
"easc-linux-x64": "0.0.0-main-202601241243",
|
|
30
|
+
"easc-linux-arm64": "0.0.0-main-202601241243",
|
|
31
|
+
"easc-darwin-x64": "0.0.0-main-202601241243",
|
|
32
|
+
"easc-darwin-arm64": "0.0.0-main-202601241243",
|
|
33
|
+
"easc-windows-x64": "0.0.0-main-202601241243"
|
|
34
34
|
}
|
|
35
35
|
}
|
package/script/deploy.ts
CHANGED
|
@@ -43,7 +43,7 @@ for (const pkgName of packages) {
|
|
|
43
43
|
try {
|
|
44
44
|
await $`cd ${pkgDir} && npm publish --access public`
|
|
45
45
|
console.log(` ✅ Published ${pkgJson.name}`)
|
|
46
|
-
} catch (e) {
|
|
46
|
+
} catch (e: any) {
|
|
47
47
|
console.error(` ❌ Failed to publish ${pkgJson.name}:`, e.message)
|
|
48
48
|
// We continue even if one fails, as duplicates might exist
|
|
49
49
|
}
|
|
@@ -56,6 +56,7 @@ const binaryVersion = linuxPkg.version
|
|
|
56
56
|
|
|
57
57
|
const mainPkgPath = path.join(root, "package.json")
|
|
58
58
|
const mainPkg = JSON.parse(fs.readFileSync(mainPkgPath, "utf-8"))
|
|
59
|
+
const originalMainPkg = JSON.parse(fs.readFileSync(mainPkgPath, "utf-8")) // keep original
|
|
59
60
|
|
|
60
61
|
const platforms = [
|
|
61
62
|
"easc-linux-x64", "easc-linux-arm64",
|
|
@@ -67,9 +68,6 @@ for (const p of platforms) {
|
|
|
67
68
|
mainPkg.optionalDependencies[p] = binaryVersion
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
fs.writeFileSync(mainPkgPath, JSON.stringify(mainPkg, null, 2))
|
|
71
|
-
console.log(` Updated optionalDependencies to ${binaryVersion}`)
|
|
72
|
-
|
|
73
71
|
// 4. Publish the main wrapper package
|
|
74
72
|
console.log(`\n📤 Publishing main wrapper package (easc-cli@${pkg.version})...`)
|
|
75
73
|
|
|
@@ -83,10 +81,16 @@ try {
|
|
|
83
81
|
// Ensure we are in the root of the package
|
|
84
82
|
await $`npm publish --access public`
|
|
85
83
|
console.log(`✅ Published ${pkg.name}`)
|
|
86
|
-
} catch (e) {
|
|
84
|
+
} catch (e: any) {
|
|
87
85
|
console.error(`❌ Failed to publish ${pkg.name}:`, e.message)
|
|
86
|
+
// Restore original package.json
|
|
87
|
+
fs.writeFileSync(mainPkgPath, JSON.stringify(originalMainPkg, null, 2))
|
|
88
88
|
process.exit(1)
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
// Restore original package.json with deps intact (but keep updated optionalDeps)
|
|
92
|
+
originalMainPkg.optionalDependencies = mainPkg.optionalDependencies
|
|
93
|
+
fs.writeFileSync(mainPkgPath, JSON.stringify(originalMainPkg, null, 2))
|
|
94
|
+
|
|
91
95
|
console.log("\n✨ Deployment complete! Users can now install with:")
|
|
92
|
-
console.log(" npm install -g easc")
|
|
96
|
+
console.log(" npm install -g easc-cli")
|