@bayoudhi/moose-lib-serverless 0.7.12 → 0.7.13

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.
@@ -303,9 +303,8 @@ function createBuildTsconfig(moduleOptions) {
303
303
  skipDefaultLibCheck: true,
304
304
  // Additional settings to handle module resolution conflicts
305
305
  allowSyntheticDefaultImports: true,
306
- // In watch mode, we want to block on errors (noEmitOnError: true)
307
- // In build mode, we allow emission with errors for Docker builds
308
- noEmitOnError: watchMode,
306
+ // Block emission on errors so build and dev behave consistently
307
+ noEmitOnError: true,
309
308
  // Enable incremental compilation for faster rebuilds
310
309
  incremental: true,
311
310
  tsBuildInfoFile: import_path3.default.join(outDir, ".tsbuildinfo")
@@ -315,7 +314,6 @@ function createBuildTsconfig(moduleOptions) {
315
314
  function runSingleCompilation(moduleSystem) {
316
315
  const moduleOptions = getModuleOptions(moduleSystem);
317
316
  const buildTsconfig = createBuildTsconfig(moduleOptions);
318
- buildTsconfig.compilerOptions.noEmitOnError = false;
319
317
  (0, import_fs3.writeFileSync)(tempTsconfigPath, JSON.stringify(buildTsconfig, null, 2));
320
318
  console.log("Created temporary tsconfig with moose plugins...");
321
319
  const tspcArgs = [
@@ -328,58 +326,11 @@ function runSingleCompilation(moduleSystem) {
328
326
  if (shouldAddOutDir) {
329
327
  tspcArgs.push("--outDir", outDir);
330
328
  }
331
- try {
332
- (0, import_child_process.execFileSync)(process.execPath, tspcArgs, {
333
- stdio: "inherit",
334
- cwd: projectRoot2
335
- });
336
- console.log("TypeScript compilation complete.");
337
- } catch (compileError) {
338
- const sourceDir = getSourceDir();
339
- const outputIndexPath = import_path3.default.join(
340
- projectRoot2,
341
- outDir,
342
- sourceDir,
343
- "index.js"
344
- );
345
- if ((0, import_fs3.existsSync)(outputIndexPath)) {
346
- console.warn("");
347
- console.warn("BUILD SAFETY WARNING");
348
- console.warn(
349
- "==============================================================="
350
- );
351
- console.warn(
352
- "TypeScript detected type errors but JavaScript was still emitted."
353
- );
354
- console.warn("");
355
- console.warn(
356
- "IMPORTANT: Type errors can indicate code that will fail at runtime."
357
- );
358
- console.warn(
359
- "While this build will succeed, the resulting code may crash when:"
360
- );
361
- console.warn(" - Functions receive unexpected argument types");
362
- console.warn(
363
- " - Properties are accessed on potentially null/undefined values"
364
- );
365
- console.warn(" - Incorrect types flow through your application logic");
366
- console.warn("");
367
- console.warn(
368
- "RECOMMENDATION: Run `npx tsc --noEmit` to review type errors before"
369
- );
370
- console.warn(
371
- "deploying to production. Fix any errors that could cause runtime issues."
372
- );
373
- console.warn(
374
- "==============================================================="
375
- );
376
- console.warn("");
377
- console.log("TypeScript compilation complete (with type warnings).");
378
- } else {
379
- console.error("Compilation failed - no output files generated.");
380
- throw compileError;
381
- }
382
- }
329
+ (0, import_child_process.execFileSync)(process.execPath, tspcArgs, {
330
+ stdio: "inherit",
331
+ cwd: projectRoot2
332
+ });
333
+ console.log("TypeScript compilation complete.");
383
334
  if (moduleSystem === "esm") {
384
335
  console.log("Post-processing ESM imports to add .js extensions...");
385
336
  const fullOutDir = import_path3.default.join(projectRoot2, outDir);