@hublo/sentinel 1.2.0-alpha.17 → 1.2.0-alpha.18
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
|
@@ -526,6 +526,9 @@ function selfCommand(cwd, flags) {
|
|
|
526
526
|
if (!isSelfAdoption(cwd) || !own.bin) return void 0;
|
|
527
527
|
return `node ${own.bin.replace(/^\.\//, "")} ${flags}`;
|
|
528
528
|
}
|
|
529
|
+
function adoptedPackageName(cwd) {
|
|
530
|
+
return readProjectPackageJson(cwd).name ?? readNxProjectName(cwd) ?? basename2(cwd);
|
|
531
|
+
}
|
|
529
532
|
function manifestOperation(cwd, scripts) {
|
|
530
533
|
const own = readOwnPackage();
|
|
531
534
|
const value = {
|
|
@@ -538,7 +541,7 @@ function manifestOperation(cwd, scripts) {
|
|
|
538
541
|
return {
|
|
539
542
|
kind: "merge-json",
|
|
540
543
|
path: "package.json",
|
|
541
|
-
value: { name:
|
|
544
|
+
value: { name: adoptedPackageName(cwd), private: true, ...value }
|
|
542
545
|
};
|
|
543
546
|
}
|
|
544
547
|
|
|
@@ -829,13 +832,9 @@ function rewriteBuildImports(source, fileName = "vite.config.ts") {
|
|
|
829
832
|
}
|
|
830
833
|
|
|
831
834
|
// src/roles/build/plan.ts
|
|
832
|
-
function packageNameFor(cwd) {
|
|
833
|
-
return readProjectPackageJson(cwd).name;
|
|
834
|
-
}
|
|
835
835
|
function candidateOutputs() {
|
|
836
836
|
return BUILD_OUTPUT_CANDIDATES.map((name) => `{projectRoot}/${name}`);
|
|
837
837
|
}
|
|
838
|
-
var NO_PACKAGE_NAME = `this module's package.json declares no \`name\`, so the nx build target would have no way to reach it: the command is \`pnpm --filter <name> run build\`, and an unnamed package matches nothing. Name the package and re-run; nothing was written.`;
|
|
839
838
|
function ownedBuildDependencies(cwd) {
|
|
840
839
|
const manifest = readProjectPackageJson(cwd);
|
|
841
840
|
const keys = [];
|
|
@@ -908,8 +907,6 @@ function planReactApp(context, configFile) {
|
|
|
908
907
|
const operations = [];
|
|
909
908
|
const notEsm = esmBlocker(configFile, readProjectPackageJson(context.cwd).type);
|
|
910
909
|
if (notEsm !== void 0) return { operations: [], skipped: notEsm };
|
|
911
|
-
const packageName = packageNameFor(context.cwd);
|
|
912
|
-
if (packageName === void 0) return { operations: [], skipped: NO_PACKAGE_NAME };
|
|
913
910
|
const rewrite = rewriteBuildImports(readConfigSource(context.cwd, configFile), configFile);
|
|
914
911
|
if (rewrite.kind === "blocked") {
|
|
915
912
|
return {
|
|
@@ -942,7 +939,10 @@ function planReactApp(context, configFile) {
|
|
|
942
939
|
operations.push(
|
|
943
940
|
...nxTargetOperations({
|
|
944
941
|
cwd: context.cwd,
|
|
945
|
-
targets: buildTarget({
|
|
942
|
+
targets: buildTarget({
|
|
943
|
+
moduleName: adoptedPackageName(context.cwd),
|
|
944
|
+
outputs: candidateOutputs()
|
|
945
|
+
})
|
|
946
946
|
})
|
|
947
947
|
);
|
|
948
948
|
const owned = ownedBuildDependencies(context.cwd);
|
|
@@ -955,8 +955,6 @@ function planReactApp(context, configFile) {
|
|
|
955
955
|
return { operations, notes };
|
|
956
956
|
}
|
|
957
957
|
function planNestService(context, webpackTarget) {
|
|
958
|
-
const packageName = packageNameFor(context.cwd);
|
|
959
|
-
if (packageName === void 0) return { operations: [], skipped: NO_PACKAGE_NAME };
|
|
960
958
|
const outputs = webpackTarget === void 0 ? nestOutputsFromConfig(context.cwd) : nestBuildOutputs(webpackTarget);
|
|
961
959
|
if (outputs === void 0) {
|
|
962
960
|
return {
|
|
@@ -968,7 +966,7 @@ function planNestService(context, webpackTarget) {
|
|
|
968
966
|
...nxTargetOperations({
|
|
969
967
|
cwd: context.cwd,
|
|
970
968
|
targets: buildTarget({
|
|
971
|
-
moduleName:
|
|
969
|
+
moduleName: adoptedPackageName(context.cwd),
|
|
972
970
|
configFiles: [NEST_CONFIG_FILE],
|
|
973
971
|
outputs
|
|
974
972
|
})
|
|
@@ -6518,4 +6516,4 @@ export {
|
|
|
6518
6516
|
detectFramework,
|
|
6519
6517
|
dispatch
|
|
6520
6518
|
};
|
|
6521
|
-
//# sourceMappingURL=chunk-
|
|
6519
|
+
//# sourceMappingURL=chunk-MJ3S7LQT.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.18",
|
|
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",
|