@costrict/cs 3.0.7 → 3.0.9

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.
Files changed (2) hide show
  1. package/package.json +11 -12
  2. package/postinstall.mjs +8 -2
package/package.json CHANGED
@@ -6,19 +6,18 @@
6
6
  "scripts": {
7
7
  "postinstall": "bun ./postinstall.mjs || node ./postinstall.mjs"
8
8
  },
9
- "version": "3.0.7",
9
+ "version": "3.0.9",
10
10
  "license": "MIT",
11
11
  "optionalDependencies": {
12
- "@costrict/cs-linux-arm64": "3.0.7",
13
- "@costrict/cs-linux-x64": "3.0.7",
14
- "@costrict/cs-linux-x64-baseline": "3.0.7",
15
- "@costrict/cs-linux-arm64-musl": "3.0.7",
16
- "@costrict/cs-linux-x64-musl": "3.0.7",
17
- "@costrict/cs-linux-x64-baseline-musl": "3.0.7",
18
- "@costrict/cs-darwin-arm64": "3.0.7",
19
- "@costrict/cs-darwin-x64": "3.0.7",
20
- "@costrict/cs-darwin-x64-baseline": "3.0.7",
21
- "@costrict/cs-windows-x64": "3.0.7",
22
- "@costrict/cs-windows-x64-baseline": "3.0.7"
12
+ "@costrict/cs-linux-arm64": "3.0.9",
13
+ "@costrict/cs-linux-x64": "3.0.9",
14
+ "@costrict/cs-linux-x64-baseline": "3.0.9",
15
+ "@costrict/cs-linux-arm64-musl": "3.0.9",
16
+ "@costrict/cs-linux-x64-musl": "3.0.9",
17
+ "@costrict/cs-linux-x64-baseline-musl": "3.0.9",
18
+ "@costrict/cs-darwin-arm64": "3.0.9",
19
+ "@costrict/cs-darwin-x64": "3.0.9",
20
+ "@costrict/cs-windows-x64": "3.0.9",
21
+ "@costrict/cs-windows-x64-baseline": "3.0.9"
23
22
  }
24
23
  }
package/postinstall.mjs CHANGED
@@ -119,8 +119,14 @@ async function main() {
119
119
  // On non-Windows platforms, just verify the binary package exists
120
120
  // Don't replace the wrapper script - it handles binary execution
121
121
  const { binaryPath } = findBinary()
122
- console.log(`Platform binary verified at: ${binaryPath}`)
123
- console.log("Wrapper script will handle binary execution")
122
+ const target = path.join(__dirname, "bin", ".opencode")
123
+ if (fs.existsSync(target)) fs.unlinkSync(target)
124
+ try {
125
+ fs.linkSync(binaryPath, target)
126
+ } catch {
127
+ fs.copyFileSync(binaryPath, target)
128
+ }
129
+ fs.chmodSync(target, 0o755)
124
130
  } catch (error) {
125
131
  console.error("Failed to setup cs binary:", error.message)
126
132
  process.exit(1)