@volcengine/tls-observer-opencode-install 0.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.
@@ -0,0 +1,2 @@
1
+ declare function run(argv?: string[]): Promise<void>;
2
+ export { run };
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "@volcengine/tls-observer-opencode-install",
3
+ "version": "0.0.3",
4
+ "description": "One-step installer for the TLS Observer OpenCode plugin.",
5
+ "type": "module",
6
+ "bin": {
7
+ "tls-observer-opencode-install": "bin/tls-observer-opencode-install.mjs"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "dist",
12
+ "src",
13
+ "scripts",
14
+ "README.md",
15
+ "LICENCE",
16
+ "CHANGELOG.md"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ },
21
+ "dependencies": {
22
+ "@volcengine/openapi": "^1.36.1"
23
+ },
24
+ "devDependencies": {
25
+ "@rslib/core": "^0.21.5",
26
+ "@types/node": "^24.10.9",
27
+ "prettier": "^3.4.2",
28
+ "typescript": "^6.0.3"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "scripts": {
34
+ "build": "rslib build",
35
+ "check": "tsc --noEmit",
36
+ "test": "npm run build && node test/aksk-install.mjs",
37
+ "format": "prettier --write \"bin/**/*.mjs\" \"scripts/**/*.mjs\" \"src/**/*.ts\" \"test/**/*.mjs\" \"*.json\"",
38
+ "format:check": "prettier --check \"bin/**/*.mjs\" \"scripts/**/*.mjs\" \"src/**/*.ts\" \"test/**/*.mjs\" \"*.json\""
39
+ }
40
+ }
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import * as fs from 'node:fs/promises';
3
+ import * as path from 'node:path';
4
+ import { fileURLToPath } from 'node:url';
5
+
6
+ const installRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
7
+ const pluginSource = path.resolve(installRoot, '..', 'opencode', 'dist-package');
8
+ const pluginTarget = path.join(installRoot, 'plugins', 'tls-observer-opencode');
9
+
10
+ async function assertFile(filePath) {
11
+ const stat = await fs.stat(filePath);
12
+ if (!stat.isFile()) throw new Error(`${filePath} is not a file`);
13
+ }
14
+
15
+ await assertFile(path.join(pluginSource, 'dist', 'index.js'));
16
+ await assertFile(path.join(pluginSource, 'package.json'));
17
+
18
+ await fs.rm(pluginTarget, { recursive: true, force: true });
19
+ await fs.mkdir(pluginTarget, { recursive: true });
20
+
21
+ for (const entry of ['dist', 'README.md', 'package.json']) {
22
+ const source = path.join(pluginSource, entry);
23
+ const target = path.join(pluginTarget, entry);
24
+ await fs.cp(source, target, {
25
+ recursive: true,
26
+ filter: (sourcePath) => !sourcePath.split(path.sep).includes('node_modules'),
27
+ });
28
+ }
29
+
30
+ console.log(`Synced ${pluginSource} -> ${pluginTarget}`);
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { run } from './installer/installer-runner.js';