@asterai/cli 0.1.1 → 0.1.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/README.md
CHANGED
|
@@ -20,7 +20,7 @@ $ npm install -g @asterai/cli
|
|
|
20
20
|
$ asterai COMMAND
|
|
21
21
|
running command...
|
|
22
22
|
$ asterai (--version)
|
|
23
|
-
@asterai/cli/0.1.
|
|
23
|
+
@asterai/cli/0.1.2 linux-x64 node-v20.12.2
|
|
24
24
|
$ asterai --help [COMMAND]
|
|
25
25
|
USAGE
|
|
26
26
|
$ asterai COMMAND
|
|
@@ -53,7 +53,7 @@ EXAMPLES
|
|
|
53
53
|
$ asterai auth
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
-
_See code: [src/commands/auth.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.
|
|
56
|
+
_See code: [src/commands/auth.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.2/src/commands/auth.ts)_
|
|
57
57
|
|
|
58
58
|
## `asterai build [INPUT]`
|
|
59
59
|
|
|
@@ -73,7 +73,7 @@ EXAMPLES
|
|
|
73
73
|
$ asterai build
|
|
74
74
|
```
|
|
75
75
|
|
|
76
|
-
_See code: [src/commands/build.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.
|
|
76
|
+
_See code: [src/commands/build.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.2/src/commands/build.ts)_
|
|
77
77
|
|
|
78
78
|
## `asterai codegen`
|
|
79
79
|
|
|
@@ -94,7 +94,7 @@ EXAMPLES
|
|
|
94
94
|
$ asterai codegen
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
_See code: [src/commands/codegen.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.
|
|
97
|
+
_See code: [src/commands/codegen.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.2/src/commands/codegen.ts)_
|
|
98
98
|
|
|
99
99
|
## `asterai deploy [INPUT]`
|
|
100
100
|
|
|
@@ -117,7 +117,7 @@ EXAMPLES
|
|
|
117
117
|
$ asterai deploy --app 66a46b12-b1a7-4b72-a64a-0e4fe21902b6
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
_See code: [src/commands/deploy.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.
|
|
120
|
+
_See code: [src/commands/deploy.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.2/src/commands/deploy.ts)_
|
|
121
121
|
|
|
122
122
|
## `asterai help [COMMAND]`
|
|
123
123
|
|
|
@@ -154,5 +154,5 @@ EXAMPLES
|
|
|
154
154
|
$ asterai init project-name
|
|
155
155
|
```
|
|
156
156
|
|
|
157
|
-
_See code: [src/commands/init.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.
|
|
157
|
+
_See code: [src/commands/init.ts](https://github.com/asterai-io/asterai-sdk/blob/v0.1.2/src/commands/init.ts)_
|
|
158
158
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "plugin",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "asterai",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"auth": "asterai auth",
|
|
9
|
+
"codegen": "asterai codegen",
|
|
10
|
+
"build": "asterai build",
|
|
11
|
+
"deploy": "asterai deploy"
|
|
12
|
+
},
|
|
13
|
+
"type": "module",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@asterai/sdk": "0.1.0"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"assemblyscript": "0.27.27"
|
|
19
|
+
}
|
|
20
|
+
}
|
package/bin/dev.js
CHANGED
|
File without changes
|
package/dist/commands/codegen.js
CHANGED
|
@@ -31,7 +31,7 @@ const ManifestFunctionSchema = z.object({
|
|
|
31
31
|
});
|
|
32
32
|
const ManifestSchema = z.object({
|
|
33
33
|
name: z.string(),
|
|
34
|
-
functions: z.array(ManifestFunctionSchema),
|
|
34
|
+
functions: z.array(ManifestFunctionSchema).optional(),
|
|
35
35
|
});
|
|
36
36
|
export default class Codegen extends Command {
|
|
37
37
|
static args = {};
|
|
@@ -55,6 +55,9 @@ export default class Codegen extends Command {
|
|
|
55
55
|
const baseDir = path.dirname(manifestPath);
|
|
56
56
|
const outDir = path.join(baseDir, flags.outputDir);
|
|
57
57
|
const manifest = ManifestSchema.parse(YAML.parse(fs.readFileSync(manifestPath, "utf8")));
|
|
58
|
+
if (!manifest.functions) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
58
61
|
if (!fs.existsSync(outDir)) {
|
|
59
62
|
fs.mkdirSync(outDir, { recursive: true });
|
|
60
63
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asterai/cli",
|
|
3
3
|
"description": "CLI for building and deploying AsterAI plugins",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.2",
|
|
5
5
|
"author": "asterai <support@asterai.io>",
|
|
6
6
|
"repository": "asterai-io/asterai-sdk",
|
|
7
7
|
"homepage": "https://github.com/asterai-io/asterai-sdk",
|
|
@@ -13,18 +13,6 @@
|
|
|
13
13
|
"license": "UNLICENSED",
|
|
14
14
|
"main": "dist/index.js",
|
|
15
15
|
"type": "module",
|
|
16
|
-
"scripts": {
|
|
17
|
-
"prepare": "cd .. && husky cli/.husky",
|
|
18
|
-
"build": "shx rm -rf dist && tsc -b",
|
|
19
|
-
"lint": "eslint . --ext .ts",
|
|
20
|
-
"postpack": "shx rm -f oclif.manifest.json",
|
|
21
|
-
"posttest": "pnpm run lint",
|
|
22
|
-
"prepack": "oclif manifest && oclif readme",
|
|
23
|
-
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
24
|
-
"version": "oclif readme && git add README.md",
|
|
25
|
-
"format": "prettier --write .",
|
|
26
|
-
"format-staged": "pretty-quick --staged"
|
|
27
|
-
},
|
|
28
16
|
"bin": {
|
|
29
17
|
"asterai": "./bin/run.js"
|
|
30
18
|
},
|
|
@@ -35,7 +23,8 @@
|
|
|
35
23
|
"files": [
|
|
36
24
|
"/bin",
|
|
37
25
|
"/dist",
|
|
38
|
-
"/oclif.manifest.json"
|
|
26
|
+
"/oclif.manifest.json",
|
|
27
|
+
"/asterai-init-plugin"
|
|
39
28
|
],
|
|
40
29
|
"oclif": {
|
|
41
30
|
"bin": "asterai",
|
|
@@ -77,5 +66,14 @@
|
|
|
77
66
|
"shx": "^0.3.3",
|
|
78
67
|
"ts-node": "^10",
|
|
79
68
|
"typescript": "^5"
|
|
69
|
+
},
|
|
70
|
+
"scripts": {
|
|
71
|
+
"build": "shx rm -rf dist && tsc -b",
|
|
72
|
+
"lint": "eslint . --ext .ts",
|
|
73
|
+
"posttest": "pnpm run lint",
|
|
74
|
+
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
75
|
+
"version": "oclif readme && git add README.md",
|
|
76
|
+
"format": "prettier --write .",
|
|
77
|
+
"format-staged": "pretty-quick --staged"
|
|
80
78
|
}
|
|
81
|
-
}
|
|
79
|
+
}
|