virtualcode 1.0.2 → 1.0.3

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/install.js +5 -5
  2. package/package.json +1 -1
package/install.js CHANGED
@@ -23,19 +23,19 @@ function findConfig(start) {
23
23
  function setup() {
24
24
  const configPath = findConfig(process.cwd()) || join(XDG_CONFIG, "opencode.jsonc")
25
25
 
26
- let config = { plugins: [] }
26
+ let config = { plugin: [] }
27
27
  if (existsSync(configPath)) {
28
28
  try {
29
29
  config = JSON.parse(readFileSync(configPath, "utf-8"))
30
30
  } catch {
31
- config = { plugins: [] }
31
+ config = { plugin: [] }
32
32
  }
33
33
  }
34
34
 
35
- if (!Array.isArray(config.plugins)) config.plugins = []
36
- if (config.plugins.includes("virtualcode")) return
35
+ if (!Array.isArray(config.plugin)) config.plugin = []
36
+ if (config.plugin.includes("virtualcode")) return
37
37
 
38
- config.plugins.push("virtualcode")
38
+ config.plugin.push("virtualcode")
39
39
 
40
40
  mkdirSync(dirname(configPath), { recursive: true })
41
41
  writeFileSync(configPath, JSON.stringify(config, null, 2) + "\n")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virtualcode",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "OpenCode plugin that bridges your terminal sessions with Telegram",
5
5
  "type": "module",
6
6
  "license": "MIT",