@volcengine/tls-observer-trae-install 0.0.2
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/CHANGELOG.md +5 -0
- package/README.md +43 -0
- package/bin/tls-observer-trae-install.mjs +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +749 -0
- package/dist/installer/installer-runner.d.ts +2 -0
- package/package.json +41 -0
- package/plugins/tls-observer-trae/README.md +3 -0
- package/scripts/sync-plugin.mjs +22 -0
- package/src/index.ts +1 -0
- package/src/installer/installer-runner.ts +884 -0
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@volcengine/tls-observer-trae-install",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "One-step installer for the TLS Observer Trae runtime.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"tls-observer-trae-install": "bin/tls-observer-trae-install.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"bin",
|
|
11
|
+
"dist",
|
|
12
|
+
"src",
|
|
13
|
+
"scripts",
|
|
14
|
+
"plugins",
|
|
15
|
+
"README.md",
|
|
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": "^25.9.3",
|
|
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/installer.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
|
+
"sync-plugin": "node scripts/sync-plugin.mjs"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as fs from 'node:fs/promises';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
|
|
5
|
+
const installRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
|
6
|
+
const pluginSource = path.resolve(installRoot, '..', 'trae', 'dist-package');
|
|
7
|
+
const pluginTarget = path.join(installRoot, 'plugins', 'tls-observer-trae');
|
|
8
|
+
|
|
9
|
+
async function assertFile(filePath) {
|
|
10
|
+
await fs.access(filePath);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
await assertFile(path.join(pluginSource, 'dist', 'index.js'));
|
|
14
|
+
await assertFile(path.join(pluginSource, 'hooks', 'hooks.json'));
|
|
15
|
+
|
|
16
|
+
await fs.rm(pluginTarget, { recursive: true, force: true });
|
|
17
|
+
await fs.mkdir(pluginTarget, { recursive: true });
|
|
18
|
+
for (const entry of ['dist', 'hooks', 'README.md', 'package.json']) {
|
|
19
|
+
await fs.cp(path.join(pluginSource, entry), path.join(pluginTarget, entry), { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
console.log(`Synced ${pluginSource} -> ${pluginTarget}`);
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { run } from './installer/installer-runner';
|