@saws/cli 1.0.0 → 1.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/bin/saws.ts +13 -9
- package/package.json +4 -4
package/bin/saws.ts
CHANGED
|
@@ -26,14 +26,18 @@ program.addCommand(createExecuteCommand());
|
|
|
26
26
|
program.addCommand(createInitCommand());
|
|
27
27
|
|
|
28
28
|
(async () => {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
try {
|
|
30
|
+
const service = await getSawsConfig()
|
|
31
|
+
|
|
32
|
+
const allServices = [...new Set(service.getAllDependencies().map(service => service.constructor))]
|
|
33
|
+
|
|
34
|
+
for (const serviceClass of allServices) {
|
|
35
|
+
// @ts-expect-error Not all classes will define a getCommands static method
|
|
36
|
+
serviceClass.getCommands?.()?.forEach(command => program.addCommand(command))
|
|
37
|
+
}
|
|
38
|
+
} catch (err) {
|
|
39
|
+
// It's possible for there not to be a saws.js file yet and thus this will fail
|
|
40
|
+
} finally {
|
|
41
|
+
program.parse(process.argv);
|
|
36
42
|
}
|
|
37
|
-
|
|
38
|
-
program.parse(process.argv);
|
|
39
43
|
})()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saws/cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"bin": {
|
|
6
6
|
"saws": "./dist/bin/saws.js"
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
"commander": "^12.0.0",
|
|
13
13
|
"esbuild": "^0.20.1",
|
|
14
14
|
"find-package-json": "^1.2.0",
|
|
15
|
-
"@saws/
|
|
16
|
-
"@saws/
|
|
15
|
+
"@saws/utils": "^1.0.1",
|
|
16
|
+
"@saws/secrets": "^1.0.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/find-package-json": "^1.2.6",
|
|
20
|
-
"@saws/core": "^1.0.
|
|
20
|
+
"@saws/core": "^1.0.1"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@saws/core": ">=1.0.0"
|