@timber-js/app 0.2.0-alpha.88 → 0.2.0-alpha.89

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.
@@ -1 +1 @@
1
- {"version":3,"file":"config-validation.d.ts","sourceRoot":"","sources":["../src/config-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,EAAE,CA2JtE;AASD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAiBhE;AAeD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAOpE;AAID,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;CAC1B;AAOD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,EAAE,CAgB1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAgBnE"}
1
+ {"version":3,"file":"config-validation.d.ts","sourceRoot":"","sources":["../src/config-validation.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,gBAAgB,GAAG,WAAW,EAAE,CA2JtE;AASD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,CAiBhE;AAeD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAOpE;AAID,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;CAC1B;AAOD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,EAAE,CAmB1E;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,aAAa,EAAE,GAAG,MAAM,CAgBnE"}
package/dist/index.js CHANGED
@@ -938,6 +938,15 @@ var CSS = `
938
938
  `;
939
939
  //#endregion
940
940
  //#region src/config-validation.ts
941
+ /**
942
+ * Config validation — validates timber.config.ts at startup.
943
+ *
944
+ * Runs in the plugin's configResolved hook (once, at startup/build).
945
+ * Each check produces a clear error message with the invalid value,
946
+ * what's expected, and how to fix it.
947
+ *
948
+ * Design doc: 18-build-system.md
949
+ */
941
950
  var config_validation_exports = /* @__PURE__ */ __exportAll({
942
951
  addVirtualModuleContext: () => addVirtualModuleContext,
943
952
  checkPeerDependencies: () => checkPeerDependencies,
@@ -1096,9 +1105,9 @@ function addVirtualModuleContext(errorMessage) {
1096
1105
  */
1097
1106
  function checkPeerDependencies(projectRoot) {
1098
1107
  const results = [];
1108
+ const userRequire = createRequire(`${projectRoot}/package.json`);
1099
1109
  for (const name of REQUIRED_PEERS) try {
1100
- const { createRequire } = __require("node:module");
1101
- createRequire(`${projectRoot}/package.json`).resolve(name);
1110
+ userRequire.resolve(name);
1102
1111
  results.push({
1103
1112
  name,
1104
1113
  status: "ok"