fourth-spark 0.11.35 → 0.11.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/bin/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- const { spawn } = require("child_process")
3
- const { join, dirname } = require("path")
2
+ const { spawn } = require("node:child_process")
3
+ const { join, dirname } = require("node:path")
4
4
 
5
5
  const pkg = dirname(__dirname)
6
6
  const bin = join(pkg, "fourth-spark")
@@ -10,6 +10,7 @@ services:
10
10
  POSTGRES_DB: fourth_spark
11
11
  volumes:
12
12
  - pgdata:/var/lib/postgresql/data
13
+ - ./scripts/init-test-db.sh:/docker-entrypoint-initdb.d/init-test-db.sh
13
14
  healthcheck:
14
15
  test: ["CMD", "pg_isready", "-U", "fourth_spark"]
15
16
  interval: 5s
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "b2f49b57-00f7-4e7b-8225-1f7aa6ae4b87",
2
+ "id": "e4349276-79e9-45e2-acbd-268010917c17",
3
3
  "prevId": "894d91ca-b47b-4255-8fd4-47d73ed9526e",
4
4
  "version": "7",
5
5
  "dialect": "postgresql",
@@ -61,8 +61,8 @@
61
61
  {
62
62
  "idx": 8,
63
63
  "version": "7",
64
- "when": 1789389018609,
65
- "tag": "0008_charming_jetstream",
64
+ "when": 1789404377897,
65
+ "tag": "0008_lowly_havok",
66
66
  "breakpoints": true
67
67
  }
68
68
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fourth-spark",
3
- "version": "0.11.35",
3
+ "version": "0.11.36",
4
4
  "description": "AI Agent Platform — multi-repo agent management based on OpenCode",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -21,6 +21,13 @@
21
21
  "scripts": {
22
22
  "postinstall": "node postinstall.js"
23
23
  },
24
- "os": ["darwin", "linux", "win32"],
25
- "cpu": ["x64", "arm64"]
24
+ "os": [
25
+ "darwin",
26
+ "linux",
27
+ "win32"
28
+ ],
29
+ "cpu": [
30
+ "x64",
31
+ "arm64"
32
+ ]
26
33
  }
package/postinstall.js CHANGED
@@ -1,9 +1,8 @@
1
1
  #!/usr/bin/env node
2
- "use strict"
3
2
 
4
- const { execSync } = require("child_process")
5
- const { createWriteStream, mkdirSync, chmodSync, existsSync, unlinkSync } = require("fs")
6
- const { join } = require("path")
3
+ const { execSync } = require("node:child_process")
4
+ const { createWriteStream, mkdirSync, chmodSync, existsSync, unlinkSync } = require("node:fs")
5
+ const { join } = require("node:path")
7
6
 
8
7
  const REPO = "kinminghao/fourth-spark"
9
8
 
@@ -44,22 +43,22 @@ async function main() {
44
43
  await download(url, tmpFile)
45
44
 
46
45
  if (isWindows) {
47
- execSync(
48
- `powershell -Command "Expand-Archive -Path '${tmpFile}' -DestinationPath '${pkgDir}' -Force"`,
49
- )
46
+ execSync(`powershell -Command "Expand-Archive -Path '${tmpFile}' -DestinationPath '${pkgDir}' -Force"`)
50
47
  } else {
51
48
  execSync(`tar xzf "${tmpFile}" -C "${pkgDir}" ./fourth-spark`, { stdio: "pipe" })
52
49
  chmodSync(binaryPath, 0o755)
53
50
  }
54
51
 
55
- try { unlinkSync(tmpFile) } catch {}
52
+ try {
53
+ unlinkSync(tmpFile)
54
+ } catch {}
56
55
  console.log(`fourth-spark: ${version} installed successfully`)
57
56
  }
58
57
 
59
58
  function download(url, dest) {
60
59
  return new Promise((resolve, reject) => {
61
60
  const follow = (href) => {
62
- const mod = href.startsWith("https") ? require("https") : require("http")
61
+ const mod = href.startsWith("https") ? require("node:https") : require("node:http")
63
62
  mod
64
63
  .get(href, { headers: { "User-Agent": "fourth-spark-npm" } }, (res) => {
65
64
  if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
@@ -72,7 +71,10 @@ function download(url, dest) {
72
71
  }
73
72
  const file = createWriteStream(dest)
74
73
  res.pipe(file)
75
- file.on("finish", () => { file.close(); resolve() })
74
+ file.on("finish", () => {
75
+ file.close()
76
+ resolve()
77
+ })
76
78
  file.on("error", reject)
77
79
  })
78
80
  .on("error", reject)