@hublo/sentinel 1.2.0-alpha.3 → 1.2.0-alpha.4
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/bin/sentinel.js
CHANGED
|
@@ -469,7 +469,7 @@ var BUILD_CONFIG_FILES = [
|
|
|
469
469
|
];
|
|
470
470
|
var BUILD_PRESET_SPECIFIER = "@hublo/sentinel/build/react";
|
|
471
471
|
var BUILD_SCRIPT_NAME = "build";
|
|
472
|
-
var SENTINEL_BUILD_COMMAND = "sentinel --run --build";
|
|
472
|
+
var SENTINEL_BUILD_COMMAND = "sentinel --run --build --";
|
|
473
473
|
var DEV_SCRIPT_NAME = "serve";
|
|
474
474
|
var SENTINEL_DEV_COMMAND = "sentinel --run --dev";
|
|
475
475
|
function buildTarget() {
|
|
@@ -726,7 +726,9 @@ function buildScripts(cwd) {
|
|
|
726
726
|
const own2 = moduleName(cwd);
|
|
727
727
|
scripts[DEV_SCRIPT_NAME] = composeDevScript(
|
|
728
728
|
existingDev,
|
|
729
|
-
|
|
729
|
+
// Trailing `--` for the same reason as the build script: whatever the caller appends
|
|
730
|
+
// reaches Vite, not sentinel's parser. It goes after `--module`, which is sentinel's own.
|
|
731
|
+
`${selfCommand(cwd, "--run --dev") ?? SENTINEL_DEV_COMMAND} --module ${own2} --`
|
|
730
732
|
);
|
|
731
733
|
}
|
|
732
734
|
return scripts;
|
|
@@ -935,22 +937,24 @@ var ViteDevAdapter = class extends ViteRoleAdapter {
|
|
|
935
937
|
return "dev";
|
|
936
938
|
}
|
|
937
939
|
/**
|
|
938
|
-
*
|
|
940
|
+
* `--init --dev` does the same thing as `--init --build`, and now says so.
|
|
939
941
|
*
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
* comment above, and `registerBuild`).
|
|
946
|
-
*
|
|
947
|
-
* A single plan writes both scripts, so the honest answer is to name the command that does
|
|
948
|
-
* it rather than to do it under a different name.
|
|
942
|
+
* The shared plan is deliberate (see `ViteRoleAdapter.plan`): one plan writes both scripts,
|
|
943
|
+
* because adopting one without the other leaves the module half-migrated. What was missing
|
|
944
|
+
* was only the telling: the run printed a message about the build and nothing about `serve`,
|
|
945
|
+
* so a developer could believe the dev server had been adopted on its own. Refusing was the
|
|
946
|
+
* wrong correction, it added friction to a command that already produced the right result.
|
|
949
947
|
*/
|
|
950
|
-
plan() {
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
948
|
+
plan(context) {
|
|
949
|
+
const planned = super.plan(context);
|
|
950
|
+
if (planned.operations.length === 0) return planned;
|
|
951
|
+
return {
|
|
952
|
+
...planned,
|
|
953
|
+
notes: [
|
|
954
|
+
...planned.notes ?? [],
|
|
955
|
+
"--init --dev adopts the build too: one plan writes both `build` and `serve`."
|
|
956
|
+
]
|
|
957
|
+
};
|
|
954
958
|
}
|
|
955
959
|
/**
|
|
956
960
|
* Start the dev server. It does not return until stopped, so there is no verdict to report
|
|
@@ -6261,4 +6265,4 @@ export {
|
|
|
6261
6265
|
detectFramework,
|
|
6262
6266
|
dispatch
|
|
6263
6267
|
};
|
|
6264
|
-
//# sourceMappingURL=chunk-
|
|
6268
|
+
//# sourceMappingURL=chunk-6DBTDMSN.js.map
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hublo/sentinel",
|
|
3
|
-
"version": "1.2.0-alpha.
|
|
3
|
+
"version": "1.2.0-alpha.4",
|
|
4
4
|
"description": "One CLI that guards code health across Hublo repos: shared lint/typescript/build/test presets, static & dynamic analysis, and architecture checks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|