@luckystack/devkit 0.2.1 → 0.2.3

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/index.js CHANGED
@@ -4270,8 +4270,9 @@ import path12 from "path";
4270
4270
  import { spawn } from "child_process";
4271
4271
  import { ROOT_DIR as ROOT_DIR6, tryCatch as tryCatch2 } from "@luckystack/core";
4272
4272
  var GENERATED_CLIENT_DIR = path12.join(ROOT_DIR6, "node_modules", ".prisma", "client");
4273
+ var GENERATED_CLIENT_MARKER = path12.join(GENERATED_CLIENT_DIR, "schema.prisma");
4273
4274
  var DEFAULT_SCHEMA_PATH = path12.join(ROOT_DIR6, "prisma", "schema.prisma");
4274
- var isPrismaClientMissing = () => fs9.existsSync(DEFAULT_SCHEMA_PATH) && !fs9.existsSync(GENERATED_CLIENT_DIR);
4275
+ var isPrismaClientMissing = () => fs9.existsSync(DEFAULT_SCHEMA_PATH) && !fs9.existsSync(GENERATED_CLIENT_MARKER);
4275
4276
  var runPrismaGenerate = async () => tryCatch2(
4276
4277
  () => new Promise((resolve, reject) => {
4277
4278
  const child = spawn("npx", ["prisma", "generate"], {
@@ -4705,7 +4706,7 @@ var setupWatchers = () => {
4705
4706
  generateTypeMapFile({ quiet: true });
4706
4707
  });
4707
4708
  if (err) {
4708
- const hint = isPrismaClientMissing() ? "\n \u2192 This usually means @prisma/client is not generated. Run `npm run prisma:generate` and restart." : "";
4709
+ const hint = /unresolved type identifiers/i.test(String(err)) ? "\n \u2192 This usually means @prisma/client is not generated. Run `npm run prisma:generate` (no database needed) and restart." : "";
4709
4710
  console.log(`[HotReload] initial type map generation failed: ${String(err)}${hint}`, "red");
4710
4711
  } else {
4711
4712
  console.log(`[HotReload] type map ready in background`, "green");