@volcengine/tls-observer-pi-install 0.0.1
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/LICENCE +13 -0
- package/README.md +70 -0
- package/bin/tls-observer-pi-install.mjs +9 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +649 -0
- package/dist/installer/installer-runner.d.ts +51 -0
- package/package.json +53 -0
- package/src/index.ts +15 -0
- package/src/installer/installer-runner.ts +808 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
type InstallOptions = {
|
|
2
|
+
help: boolean;
|
|
3
|
+
nonInteractive: boolean;
|
|
4
|
+
force: boolean;
|
|
5
|
+
beta: boolean;
|
|
6
|
+
dryRun: boolean;
|
|
7
|
+
skipTlsConfig: boolean;
|
|
8
|
+
piBin: string;
|
|
9
|
+
registry: string;
|
|
10
|
+
pluginPackage: string;
|
|
11
|
+
pluginVersion?: string;
|
|
12
|
+
envTarget: string;
|
|
13
|
+
dataRoot: string;
|
|
14
|
+
region?: string;
|
|
15
|
+
traceTopicId?: string;
|
|
16
|
+
apiKey?: string;
|
|
17
|
+
ak?: string;
|
|
18
|
+
sk?: string;
|
|
19
|
+
authMode: string;
|
|
20
|
+
exportTimeoutMs: string;
|
|
21
|
+
captureContent: string;
|
|
22
|
+
tlsEndpoint?: string;
|
|
23
|
+
projectId?: string;
|
|
24
|
+
projectName?: string;
|
|
25
|
+
logAppId?: string;
|
|
26
|
+
logAppName?: string;
|
|
27
|
+
logAppType: string;
|
|
28
|
+
templateName: string;
|
|
29
|
+
templateId?: string;
|
|
30
|
+
};
|
|
31
|
+
type PluginInstallResult = {
|
|
32
|
+
source: string;
|
|
33
|
+
target: string;
|
|
34
|
+
packageSpec?: string;
|
|
35
|
+
version?: string;
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
};
|
|
38
|
+
declare function applyDerivedDefaults(options: InstallOptions): void;
|
|
39
|
+
declare function parseCliOptions(argv?: string[]): InstallOptions;
|
|
40
|
+
declare function validateBaseTlsConfig(options: InstallOptions): void;
|
|
41
|
+
declare function validateTlsConfig(options: InstallOptions): void;
|
|
42
|
+
declare function pluginPackageSpec(options: InstallOptions): string;
|
|
43
|
+
declare function findLocalPluginSource(): Promise<string | undefined>;
|
|
44
|
+
declare function installPlugin(options: InstallOptions): Promise<PluginInstallResult>;
|
|
45
|
+
declare function buildTlsEnv(options: InstallOptions): string;
|
|
46
|
+
declare function writeTlsEnv(options: InstallOptions): Promise<string | null>;
|
|
47
|
+
declare function run(argv?: string[]): Promise<void>;
|
|
48
|
+
declare function writeEnvFile(options: InstallOptions): Promise<void>;
|
|
49
|
+
declare const runInstaller: typeof run;
|
|
50
|
+
declare const installPiPackage: typeof installPlugin;
|
|
51
|
+
export { applyDerivedDefaults, buildTlsEnv, findLocalPluginSource, installPiPackage, installPlugin, parseCliOptions, pluginPackageSpec, run, runInstaller, validateBaseTlsConfig, validateTlsConfig, writeEnvFile, writeTlsEnv, };
|
package/package.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@volcengine/tls-observer-pi-install",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "One-step installer for the TLS Observer Pi plugin.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"tls-observer-pi-install": "bin/tls-observer-pi-install.mjs"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"bin",
|
|
19
|
+
"dist",
|
|
20
|
+
"src",
|
|
21
|
+
"README.md",
|
|
22
|
+
"LICENCE"
|
|
23
|
+
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=18"
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"pi",
|
|
29
|
+
"observability",
|
|
30
|
+
"opentelemetry",
|
|
31
|
+
"tls"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"license": "Apache-2.0",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@volcengine/openapi": "^1.36.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@rslib/core": "^0.21.5",
|
|
42
|
+
"@types/node": "^24.10.9",
|
|
43
|
+
"prettier": "^3.4.2",
|
|
44
|
+
"typescript": "^6.0.3"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "rslib build",
|
|
48
|
+
"check": "tsc --noEmit",
|
|
49
|
+
"test": "npm run build && node test/installer.mjs",
|
|
50
|
+
"format": "prettier --write \"bin/**/*.mjs\" \"src/**/*.ts\" \"test/**/*.mjs\" \"*.json\"",
|
|
51
|
+
"format:check": "prettier --check \"bin/**/*.mjs\" \"src/**/*.ts\" \"test/**/*.mjs\" \"*.json\""
|
|
52
|
+
}
|
|
53
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export {
|
|
2
|
+
applyDerivedDefaults,
|
|
3
|
+
buildTlsEnv,
|
|
4
|
+
findLocalPluginSource,
|
|
5
|
+
installPiPackage,
|
|
6
|
+
installPlugin,
|
|
7
|
+
parseCliOptions,
|
|
8
|
+
pluginPackageSpec,
|
|
9
|
+
run,
|
|
10
|
+
runInstaller,
|
|
11
|
+
validateBaseTlsConfig,
|
|
12
|
+
validateTlsConfig,
|
|
13
|
+
writeEnvFile,
|
|
14
|
+
writeTlsEnv,
|
|
15
|
+
} from './installer/installer-runner';
|