@schalkneethling/miyagi-core 4.3.1 → 4.4.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/README.md +48 -1
- package/bin/miyagi.js +9 -1
- package/index.js +2 -2
- package/lib/cli/component.js +23 -5
- package/lib/cli/doctor.js +153 -0
- package/lib/cli/drupal-assets.js +44 -7
- package/lib/cli/index.js +2 -0
- package/lib/cli/lint.js +71 -27
- package/lib/cli/run.js +281 -0
- package/lib/config.js +10 -0
- package/lib/default-config.js +170 -169
- package/lib/errors.js +31 -0
- package/lib/index.js +7 -151
- package/lib/init/args.js +161 -93
- package/lib/init/engines.js +13 -4
- package/lib/init/index.js +26 -10
- package/lib/init/router.js +205 -205
- package/lib/init/watcher.js +704 -671
- package/lib/state/helpers.js +14 -9
- package/package.json +3 -3
package/lib/state/helpers.js
CHANGED
|
@@ -7,6 +7,7 @@ import path from "path";
|
|
|
7
7
|
import log from "../logger.js";
|
|
8
8
|
import { t } from "../i18n/index.js";
|
|
9
9
|
import { readdir } from "node:fs/promises";
|
|
10
|
+
import { EXIT_CODES, MiyagiError } from "../errors.js";
|
|
10
11
|
|
|
11
12
|
/**
|
|
12
13
|
* @param {string|null} dir - the directory in which to look for files
|
|
@@ -25,17 +26,21 @@ async function getFiles(dir, ignores, configPath, type, check) {
|
|
|
25
26
|
});
|
|
26
27
|
} catch (error) {
|
|
27
28
|
if (error.code === "ENOENT") {
|
|
28
|
-
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
const message = t("srcFolderNotFound")
|
|
30
|
+
.replaceAll("{{directory}}", dir)
|
|
31
|
+
.replaceAll("{{type}}", type)
|
|
32
|
+
.replaceAll("{{config}}", configPath);
|
|
33
|
+
log("error", message);
|
|
34
|
+
throw new MiyagiError(message, {
|
|
35
|
+
code: EXIT_CODES.CONFIG_ERROR,
|
|
36
|
+
logged: true,
|
|
37
|
+
});
|
|
36
38
|
} else {
|
|
37
39
|
log("error", error.toString(), error);
|
|
38
|
-
|
|
40
|
+
throw new MiyagiError(error.toString(), {
|
|
41
|
+
code: EXIT_CODES.GENERAL_ERROR,
|
|
42
|
+
logged: true,
|
|
43
|
+
});
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schalkneethling/miyagi-core",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "miyagi is a component development tool for JavaScript template engines.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "Schalk Neethling <schalkneethling@duck.com>, Michael Großklaus <mail@mgrossklaus.de> (https://www.mgrossklaus.de)",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@eslint/js": "^9.39.2",
|
|
55
55
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
56
|
-
"@rollup/plugin-terser": "^0.
|
|
56
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
57
57
|
"@types/js-yaml": "^4.0.9",
|
|
58
58
|
"@types/node": "^25.3.3",
|
|
59
59
|
"@types/yargs": "^17.0.35",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"cssnano": "^7.1.2",
|
|
62
62
|
"eslint": "^9.39.0",
|
|
63
63
|
"eslint-plugin-jsdoc": "^62.5.4",
|
|
64
|
-
"globals": "^
|
|
64
|
+
"globals": "^17.4.0",
|
|
65
65
|
"gulp": "^5.0.1",
|
|
66
66
|
"gulp-postcss": "^10.0.0",
|
|
67
67
|
"postcss": "^8.5.6",
|