secureagentbase 1.2.13
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/secureagentbase.js +2 -0
- package/dist/commands/destroy.d.ts +4 -0
- package/dist/commands/destroy.js +34 -0
- package/dist/commands/init.d.ts +15 -0
- package/dist/commands/init.js +426 -0
- package/dist/commands/status.d.ts +1 -0
- package/dist/commands/status.js +17 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +73 -0
- package/dist/lib/auth.d.ts +6 -0
- package/dist/lib/auth.js +136 -0
- package/dist/lib/billing.d.ts +6 -0
- package/dist/lib/billing.js +60 -0
- package/dist/lib/firebase.d.ts +13 -0
- package/dist/lib/firebase.js +84 -0
- package/dist/lib/gcp.d.ts +22 -0
- package/dist/lib/gcp.js +222 -0
- package/dist/lib/github.d.ts +17 -0
- package/dist/lib/github.js +151 -0
- package/dist/lib/startup-script.d.ts +1 -0
- package/dist/lib/startup-script.js +9 -0
- package/dist/lib/startup-script.sh +452 -0
- package/dist/utils/config.d.ts +22 -0
- package/dist/utils/config.js +25 -0
- package/dist/utils/errors.d.ts +4 -0
- package/dist/utils/errors.js +22 -0
- package/dist/utils/output.d.ts +6 -0
- package/dist/utils/output.js +21 -0
- package/package.json +48 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export class CLIError extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(message);
|
|
5
|
+
this.name = 'CLIError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export function handleError(err) {
|
|
9
|
+
if (err instanceof CLIError) {
|
|
10
|
+
console.error(chalk.red(`✖ ${err.message}`));
|
|
11
|
+
process.exit(1);
|
|
12
|
+
}
|
|
13
|
+
if (err instanceof Error) {
|
|
14
|
+
console.error(chalk.red(`✖ ${err.message}`));
|
|
15
|
+
if (process.env.DEBUG && err.stack) {
|
|
16
|
+
console.error(chalk.dim(err.stack));
|
|
17
|
+
}
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
console.error(chalk.red('✖ An unknown error occurred'));
|
|
21
|
+
process.exit(1);
|
|
22
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function info(msg: string): void;
|
|
2
|
+
export declare function success(msg: string): void;
|
|
3
|
+
export declare function warn(msg: string): void;
|
|
4
|
+
export declare function error(msg: string): void;
|
|
5
|
+
export declare function heading(msg: string): void;
|
|
6
|
+
export declare function kv(key: string, value: string): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export function info(msg) {
|
|
3
|
+
console.log(chalk.cyan('ℹ'), msg);
|
|
4
|
+
}
|
|
5
|
+
export function success(msg) {
|
|
6
|
+
console.log(chalk.green('✔'), msg);
|
|
7
|
+
}
|
|
8
|
+
export function warn(msg) {
|
|
9
|
+
console.log(chalk.yellow('⚠'), msg);
|
|
10
|
+
}
|
|
11
|
+
export function error(msg) {
|
|
12
|
+
console.log(chalk.red('✖'), msg);
|
|
13
|
+
}
|
|
14
|
+
export function heading(msg) {
|
|
15
|
+
console.log('');
|
|
16
|
+
console.log(chalk.bold.underline(msg));
|
|
17
|
+
console.log('');
|
|
18
|
+
}
|
|
19
|
+
export function kv(key, value) {
|
|
20
|
+
console.log(` ${chalk.dim(key + ':')} ${value}`);
|
|
21
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "secureagentbase",
|
|
3
|
+
"version": "1.2.13",
|
|
4
|
+
"description": "CLI tool to deploy and manage SecureAgentBase on GCP",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"secureagentbase": "./bin/secureagentbase.js"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/kallhoffa/SecureAgentBase.git"
|
|
12
|
+
},
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public",
|
|
15
|
+
"provenance": true
|
|
16
|
+
},
|
|
17
|
+
"scripts": {
|
|
18
|
+
"generate": "cp ../shared/startup-script.sh src/lib/startup-script.sh",
|
|
19
|
+
"prebuild": "npm run generate",
|
|
20
|
+
"build": "tsc && cp src/lib/startup-script.sh dist/lib/startup-script.sh 2>/dev/null || true",
|
|
21
|
+
"dev": "tsx src/index.ts",
|
|
22
|
+
"start": "node dist/index.js",
|
|
23
|
+
"prepublishOnly": "npm run build"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"chalk": "^5.3.0",
|
|
27
|
+
"commander": "^12.0.0",
|
|
28
|
+
"google-auth-library": "^9.0.0",
|
|
29
|
+
"inquirer": "^9.0.0",
|
|
30
|
+
"ora": "^8.0.0"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@types/inquirer": "^9.0.10",
|
|
34
|
+
"@types/node": "^20.0.0",
|
|
35
|
+
"tsx": "^4.0.0",
|
|
36
|
+
"typescript": "^5.4.0"
|
|
37
|
+
},
|
|
38
|
+
"overrides": {
|
|
39
|
+
"uuid": "^11.1.1"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=18"
|
|
43
|
+
},
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"bin"
|
|
47
|
+
]
|
|
48
|
+
}
|