@hublo/sentinel 1.2.0-alpha.14 → 1.2.0-alpha.16

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.
@@ -22,7 +22,7 @@ import {
22
22
  registerAdapters,
23
23
  resolve,
24
24
  resolveBin
25
- } from "../chunk-RV34GQVH.js";
25
+ } from "../chunk-Q3ZLHHW2.js";
26
26
 
27
27
  // bin/sentinel.ts
28
28
  import { program } from "commander";
@@ -893,7 +893,7 @@ function plan(context) {
893
893
  }
894
894
  const webpackTarget = webpackBuildTarget(context.cwd);
895
895
  if (declaredBuildPreset(context.cwd) === "nest" || webpackTarget !== void 0) {
896
- return planNestService(context, configFile, webpackTarget);
896
+ return planNestService(context, webpackTarget);
897
897
  }
898
898
  if (configFile === void 0) {
899
899
  return {
@@ -947,27 +947,17 @@ function planReactApp(context, configFile) {
947
947
  }
948
948
  return { operations, notes };
949
949
  }
950
- function planNestService(context, configFile, webpackTarget) {
951
- if (webpackTarget === void 0) {
952
- return {
953
- operations: [],
954
- skipped: `already building through sentinel: ${configFile ?? NEST_CONFIG_FILE} imports the nest preset and the nx target runs it. Nothing to change.`
955
- };
956
- }
950
+ function planNestService(context, webpackTarget) {
951
+ const metadata = [
952
+ ...nxTargetMetadataOperations({ cwd: context.cwd, targets: buildTarget([NEST_CONFIG_FILE]) }),
953
+ manifestOperation(context.cwd, { [BUILD_SCRIPT_NAME]: SENTINEL_BUILD_COMMAND })
954
+ ];
955
+ if (webpackTarget === void 0) return { operations: metadata };
957
956
  const refusal = refusalFor(context.cwd, webpackTarget);
958
957
  if (refusal !== void 0) return { operations: [], blocked: refusal };
959
958
  const dropped = Object.keys(webpackTarget.configurations ?? {});
960
959
  return {
961
- operations: [
962
- ...nestAdoptionOperations(context.cwd, webpackTarget),
963
- // The same nx metadata the React path writes, and for the same reason: declaring `inputs`
964
- // at all REPLACES nx's default `['default','^default']`, so a target that declares none
965
- // runs on defaults while every other target this module has declares them. The Nest path
966
- // wrote none, which left its build the one target that could replay a stale bundle after a
967
- // dependency changed. One name, because a Nest service's config can only be `.mts`.
968
- ...nxTargetMetadataOperations({ cwd: context.cwd, targets: buildTarget([NEST_CONFIG_FILE]) }),
969
- manifestOperation(context.cwd, { [BUILD_SCRIPT_NAME]: SENTINEL_BUILD_COMMAND })
970
- ],
960
+ operations: [...nestAdoptionOperations(context.cwd, webpackTarget), ...metadata],
971
961
  notes: [
972
962
  `wrote ${NEST_CONFIG_FILE} and pointed the nx build target at sentinel. The target stays \`nx:run-commands\` with \`forwardAllArgs: false\`, so the image's \`--generatePackageJson\` still works and the Dockerfile needs no change.`,
973
963
  ...dropped.length > 0 ? [
@@ -6457,4 +6447,4 @@ export {
6457
6447
  detectFramework,
6458
6448
  dispatch
6459
6449
  };
6460
- //# sourceMappingURL=chunk-RV34GQVH.js.map
6450
+ //# sourceMappingURL=chunk-Q3ZLHHW2.js.map
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  registerAdapters,
8
8
  resolve,
9
9
  setDefaultRunner
10
- } from "./chunk-RV34GQVH.js";
10
+ } from "./chunk-Q3ZLHHW2.js";
11
11
  export {
12
12
  BaseAdapter,
13
13
  all,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hublo/sentinel",
3
- "version": "1.2.0-alpha.14",
3
+ "version": "1.2.0-alpha.16",
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",