@tsed/cli-core 7.0.0-beta.7 → 7.0.0-beta.8
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.
|
@@ -29,7 +29,10 @@ let YarnBerryManager = class YarnBerryManager extends BaseManager {
|
|
|
29
29
|
nodeLinker: "node-modules"
|
|
30
30
|
});
|
|
31
31
|
// then switch to berry
|
|
32
|
-
|
|
32
|
+
try {
|
|
33
|
+
this.cliExeca.runSync(this.cmd, ["set", "version", "berry"]);
|
|
34
|
+
}
|
|
35
|
+
catch (er) { }
|
|
33
36
|
}
|
|
34
37
|
add(deps, options) {
|
|
35
38
|
return this.run("add", [...deps], options);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { injector, lazyInject, logger } from "@tsed/di";
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import figures from "figures";
|
|
4
4
|
import { CliFs } from "../services/CliFs.js";
|
|
@@ -14,22 +14,31 @@ export async function loadPlugins() {
|
|
|
14
14
|
.filter((mod) => mod.startsWith(`@${name}/cli-plugin`) || mod.includes(`${name}-cli-plugin`))
|
|
15
15
|
.map(async (mod) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
if (provider?.imports.length) {
|
|
21
|
-
await all(provider.imports.map(async (token) => {
|
|
22
|
-
$inj.add(token, GlobalProviders.get(token)?.clone());
|
|
23
|
-
if ($inj.settings.get("loaded")) {
|
|
24
|
-
await $inj.invoke(token);
|
|
25
|
-
}
|
|
26
|
-
}));
|
|
27
|
-
}
|
|
28
|
-
$inj.add(plugin, provider);
|
|
29
|
-
if ($inj.settings.get("loaded")) {
|
|
30
|
-
await $inj.invoke(plugin);
|
|
31
|
-
}
|
|
17
|
+
if ($inj.settings.get("loaded")) {
|
|
18
|
+
logger().info("Try to load ", mod);
|
|
19
|
+
await lazyInject(() => fs.importModule(mod, rootDir));
|
|
32
20
|
}
|
|
21
|
+
// if (!$inj.has(plugin)) {
|
|
22
|
+
// const provider = GlobalProviders.get(plugin)?.clone();
|
|
23
|
+
//
|
|
24
|
+
// if (provider?.imports.length) {
|
|
25
|
+
// await all(
|
|
26
|
+
// provider.imports.map(async (token: any) => {
|
|
27
|
+
// $inj.add(token, GlobalProviders.get(token)?.clone());
|
|
28
|
+
//
|
|
29
|
+
// if ($inj.settings.get("loaded")) {
|
|
30
|
+
// await $inj.invoke(token);
|
|
31
|
+
// }
|
|
32
|
+
// })
|
|
33
|
+
// );
|
|
34
|
+
// }
|
|
35
|
+
//
|
|
36
|
+
// $inj.add(plugin, provider);
|
|
37
|
+
//
|
|
38
|
+
// if ($inj.settings.get("loaded")) {
|
|
39
|
+
// await $inj.invoke(plugin);
|
|
40
|
+
// }
|
|
41
|
+
// }
|
|
33
42
|
logger().info(chalk.green(figures.tick), mod, "module loaded");
|
|
34
43
|
}
|
|
35
44
|
catch (er) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli-core",
|
|
3
3
|
"description": "Build your CLI with TypeScript and Decorators",
|
|
4
|
-
"version": "7.0.0-beta.
|
|
4
|
+
"version": "7.0.0-beta.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"uuid": "^10.0.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@tsed/typescript": "7.0.0-beta.
|
|
68
|
+
"@tsed/typescript": "7.0.0-beta.8",
|
|
69
69
|
"@types/commander": "2.12.2",
|
|
70
70
|
"@types/figures": "3.0.1",
|
|
71
71
|
"@types/fs-extra": "^11.0.4",
|