@initx-plugin/core 0.0.15 → 0.0.17
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/dist/index.mjs +3 -2
- package/package.json +3 -4
package/dist/index.mjs
CHANGED
|
@@ -79,7 +79,7 @@ class InitxHandler {
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
async function loadPlugins() {
|
|
82
|
-
const {
|
|
82
|
+
const { content: npmPath } = await c("npm", ["config", "get", "prefix"]);
|
|
83
83
|
const nodeModules = path.join(npmPath, "node_modules");
|
|
84
84
|
const communityPlugins = fs.readdirSync(nodeModules);
|
|
85
85
|
const officialPluginPath = path.join(nodeModules, "@initx-plugin");
|
|
@@ -90,8 +90,9 @@ async function loadPlugins() {
|
|
|
90
90
|
].filter(
|
|
91
91
|
(name) => /^(?:@initx-plugin\/|initx-plugin-)/.test(name) && !/@initx-plugin\/(?:core|utils)$/.test(name)
|
|
92
92
|
);
|
|
93
|
+
const x = await import('importx');
|
|
93
94
|
return Promise.all(pluginsName.map(async (dirname) => {
|
|
94
|
-
const InitxHandlerClass = await
|
|
95
|
+
const InitxHandlerClass = await x.import(path.join(nodeModules, dirname), import.meta.url).then((x2) => x2.default);
|
|
95
96
|
const packageAll = JSON.parse(fs.readFileSync(path.join(nodeModules, dirname, "package.json"), "utf-8"));
|
|
96
97
|
const packageInfo = {
|
|
97
98
|
name: packageAll.name,
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@initx-plugin/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.17",
|
|
5
5
|
"description": "core module for initx plugins",
|
|
6
|
-
"author": "imba97",
|
|
7
6
|
"license": "MIT",
|
|
8
7
|
"homepage": "https://github.com/initx-collective/initx#readme",
|
|
9
8
|
"repository": {
|
|
@@ -23,9 +22,9 @@
|
|
|
23
22
|
"dist"
|
|
24
23
|
],
|
|
25
24
|
"dependencies": {
|
|
26
|
-
"@initx-plugin/utils": "^0.0.11",
|
|
27
25
|
"fs-extra": "^11.2.0",
|
|
28
|
-
"importx": "^0.5.0"
|
|
26
|
+
"importx": "^0.5.0",
|
|
27
|
+
"@initx-plugin/utils": "0.0.17"
|
|
29
28
|
},
|
|
30
29
|
"devDependencies": {
|
|
31
30
|
"@types/fs-extra": "^11.0.4"
|