@thieung/agentkit-helper 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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/scripts/check.mjs +16 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thieung/agentkit-helper",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Community helper for installing and updating AgentKit kits by runtime and channel",
5
5
  "type": "module",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "bin/",
12
12
  "lib/",
13
+ "scripts/",
13
14
  "assets/",
14
15
  "README.md",
15
16
  "README.vi.md",
@@ -17,7 +18,7 @@
17
18
  ],
18
19
  "scripts": {
19
20
  "test": "node --test --test-concurrency=1 test/*.test.mjs",
20
- "check": "node --check bin/agentkit-helper.mjs && node --check lib/*.mjs"
21
+ "check": "node scripts/check.mjs"
21
22
  },
22
23
  "engines": {
23
24
  "node": ">=20.12"
@@ -0,0 +1,16 @@
1
+ import { spawnSync } from "node:child_process";
2
+ import { readdirSync } from "node:fs";
3
+
4
+ const files = [
5
+ "bin/agentkit-helper.mjs",
6
+ ...readdirSync("lib")
7
+ .filter((name) => name.endsWith(".mjs"))
8
+ .sort()
9
+ .map((name) => `lib/${name}`),
10
+ ];
11
+
12
+ for (const file of files) {
13
+ const result = spawnSync(process.execPath, ["--check", file], { stdio: "inherit" });
14
+ if (result.error) throw result.error;
15
+ if (result.status !== 0) process.exit(result.status ?? 1);
16
+ }