@lunora/vite 1.0.0-alpha.57 → 1.0.0-alpha.58

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.mjs CHANGED
@@ -3,7 +3,7 @@ import errorOverlayPlugin from '@visulima/vite-overlay';
3
3
  import { detectAgentRules, claimAgentRulesHint, AGENT_RULES_HINT, detectFramework } from '@lunora/config';
4
4
  export { detectFramework } from '@lunora/config';
5
5
  import { l as lunoraLine } from './packem_shared/log-BjO9EWah.mjs';
6
- import codegenPlugin from './packem_shared/codegenPlugin-Bo3IZF46.mjs';
6
+ import codegenPlugin from './packem_shared/codegenPlugin-DEfMflEi.mjs';
7
7
  import containerLogsPlugin from './packem_shared/containerLogsPlugin-DMssU3wb.mjs';
8
8
  import devStatePlugin from './packem_shared/devStatePlugin-DdjfMrhx.mjs';
9
9
  import devVariablesPlugin from './packem_shared/devVariablesPlugin-CDNSnvOP.mjs';
@@ -1,7 +1,7 @@
1
1
  import { existsSync } from 'node:fs';
2
2
  import { join, resolve, sep, basename } from 'node:path';
3
3
  import { createCodegenProject, refreshCodegenProject, runCodegen, CodegenDiagnosticError } from '@lunora/codegen';
4
- import { findWranglerFile, LUNORA_CONFIG_FILE, readWranglerJsonc, WRANGLER_FILES, collectWranglerSecretVariables, inferLunoraBindings, reconcileWranglerBindings } from '@lunora/config';
4
+ import { findWranglerFile, LUNORA_CONFIG_FILE, readWranglerJsonc, WRANGLER_FILES, collectWranglerSecretVariables, inferLunoraBindings, reconcileWranglerBindings, reconcileWranglerCompatibilityDate } from '@lunora/config';
5
5
  import { isRunnableDevEnvironment } from 'vite';
6
6
  import { reconcileWranglerCrons } from './reconcileWranglerCrons-PxGwfCp_.mjs';
7
7
  import LUNORA_API_UPDATED_EVENT from './LUNORA_API_UPDATED_EVENT-BrkWk3rr.mjs';
@@ -72,6 +72,28 @@ const reconcileBindingsSafely = async (options, logger, onExportGaps) => {
72
72
  logger.warn(`${LUNORA_TAG} binding inference skipped: ${message}`);
73
73
  }
74
74
  };
75
+ const reconcileWranglerExtras = (projectRoot, cronTriggers, logger) => {
76
+ try {
77
+ const reconciled = reconcileWranglerCrons(projectRoot, cronTriggers);
78
+ if (reconciled.changed) {
79
+ logger.info?.(`${LUNORA_TAG} synced ${cronTriggers.length.toFixed(0)} cron trigger(s) into ${reconciled.wranglerPath ?? "wrangler.jsonc"}`);
80
+ }
81
+ } catch (cronError) {
82
+ const message = cronError instanceof Error ? cronError.message : String(cronError);
83
+ logger.warn(`${LUNORA_TAG} cron trigger sync skipped: ${message}`);
84
+ }
85
+ try {
86
+ const reconciled = reconcileWranglerCompatibilityDate(projectRoot);
87
+ if (reconciled.changed) {
88
+ logger.info?.(
89
+ `${LUNORA_TAG} bumped compatibility_date to ${reconciled.date ?? "unknown"} (Workers Cache enabled) → ${reconciled.wranglerPath ?? "wrangler.jsonc"}`
90
+ );
91
+ }
92
+ } catch (dateError) {
93
+ const message = dateError instanceof Error ? dateError.message : String(dateError);
94
+ logger.warn(`${LUNORA_TAG} compatibility date sync skipped: ${message}`);
95
+ }
96
+ };
75
97
  const runCodegenSafely = (options, logger, overlay, project) => {
76
98
  const schemaPath = join(options.projectRoot, options.schemaDir, "schema.ts");
77
99
  if (!existsSync(schemaPath)) {
@@ -86,17 +108,7 @@ const runCodegenSafely = (options, logger, overlay, project) => {
86
108
  projectRoot: options.projectRoot,
87
109
  wranglerVariables: collectWranglerSecretVariables(options.projectRoot)
88
110
  });
89
- try {
90
- const reconciled = reconcileWranglerCrons(options.projectRoot, result.cronTriggers);
91
- if (reconciled.changed) {
92
- logger.info?.(
93
- `${LUNORA_TAG} synced ${result.cronTriggers.length.toFixed(0)} cron trigger(s) into ${reconciled.wranglerPath ?? "wrangler.jsonc"}`
94
- );
95
- }
96
- } catch (cronError) {
97
- const message = cronError instanceof Error ? cronError.message : String(cronError);
98
- logger.warn(`${LUNORA_TAG} cron trigger sync skipped: ${message}`);
99
- }
111
+ reconcileWranglerExtras(options.projectRoot, result.cronTriggers, logger);
100
112
  for (const advisory of result.advisories) {
101
113
  const line = advisoryLine(advisory.level, advisory.name, advisory.detail, advisory.remediation);
102
114
  if (advisory.level === "ERROR") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lunora/vite",
3
- "version": "1.0.0-alpha.57",
3
+ "version": "1.0.0-alpha.58",
4
4
  "description": "The Lunora Vite plugin: codegen, type sync, wrangler validation, and an error overlay over @cloudflare/vite-plugin",
5
5
  "keywords": [
6
6
  "cloudflare",
@@ -46,15 +46,15 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@cloudflare/vite-plugin": "1.43.0",
49
- "@lunora/codegen": "1.0.0-alpha.35",
50
- "@lunora/config": "1.0.0-alpha.57",
49
+ "@lunora/codegen": "1.0.0-alpha.36",
50
+ "@lunora/config": "1.0.0-alpha.58",
51
51
  "@lunora/errors": "1.0.0-alpha.2",
52
52
  "@visulima/vite-overlay": "2.0.0-alpha.35",
53
53
  "jsonc-parser": "^3.3.1",
54
54
  "ts-morph": "^28.0.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "@lunora/studio": "1.0.0-alpha.42",
57
+ "@lunora/studio": "1.0.0-alpha.43",
58
58
  "vite": "^8.1.3"
59
59
  },
60
60
  "peerDependenciesMeta": {