@jamiexiongr/panda 0.1.0
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/README.md +3 -0
- package/dist/cli.mjs +30 -0
- package/package.json +24 -0
package/README.md
ADDED
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// release/panda/src/cli.ts
|
|
2
|
+
var printUsage = () => {
|
|
3
|
+
console.log(`panda <command>
|
|
4
|
+
|
|
5
|
+
Commands:
|
|
6
|
+
agent Start the Panda agent service
|
|
7
|
+
hub Start the Panda hub service with the bundled web UI
|
|
8
|
+
help Show this message`);
|
|
9
|
+
};
|
|
10
|
+
var main = async () => {
|
|
11
|
+
const command = process.argv[2]?.trim().toLowerCase() ?? "help";
|
|
12
|
+
if (command === "help" || command === "--help" || command === "-h") {
|
|
13
|
+
printUsage();
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
if (command === "agent") {
|
|
17
|
+
const { startJamiexiongrAgent } = await import("@jamiexiongr/panda-agent");
|
|
18
|
+
await startJamiexiongrAgent();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
if (command === "hub") {
|
|
22
|
+
const { startJamiexiongrHub } = await import("@jamiexiongr/panda-hub");
|
|
23
|
+
await startJamiexiongrHub();
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
console.error(`Unknown command: ${command}`);
|
|
27
|
+
printUsage();
|
|
28
|
+
process.exitCode = 1;
|
|
29
|
+
};
|
|
30
|
+
void main();
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@jamiexiongr/panda",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"private": false,
|
|
6
|
+
"description": "Panda combined installer",
|
|
7
|
+
"bin": {
|
|
8
|
+
"panda": "./dist/cli.mjs"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"@jamiexiongr/panda-agent": "0.1.0",
|
|
12
|
+
"@jamiexiongr/panda-hub": "0.1.0"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
17
|
+
"publishConfig": {
|
|
18
|
+
"access": "public",
|
|
19
|
+
"registry": "https://registry.npmjs.org/"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=20.19.0"
|
|
23
|
+
}
|
|
24
|
+
}
|