veryfront 0.1.65 → 0.1.67

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/esm/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -4,7 +4,7 @@ import { getErrorMessage } from "../errors/veryfront-error.js";
4
4
  import { INVALID_ARGUMENT } from "../errors/index.js";
5
5
  import { enhanceAdapterWithFS } from "../platform/adapters/fs/integration.js";
6
6
  import { isExtendedFSAdapter } from "../platform/adapters/fs/wrapper.js";
7
- import { getEnv } from "../platform/compat/process.js";
7
+ import { getEnv, getHostEnv } from "../platform/compat/process.js";
8
8
  import { initializeEsbuild } from "../platform/compat/esbuild.js";
9
9
  import { logger } from "../utils/index.js";
10
10
  import { isDebugEnabled } from "../utils/constants/env.js";
@@ -180,6 +180,7 @@ export async function bootstrapProd(projectDir, adapter) {
180
180
  function validateProductionEnvironment(_adapter) {
181
181
  const nodeEnv = getEnv("NODE_ENV") ?? getEnv("DENO_ENV");
182
182
  const proxyMode = getEnv("PROXY_MODE");
183
+ const controlPlanePublicKey = getHostEnv("CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY");
183
184
  // In proxy mode (deployed pods), NODE_ENV must be explicitly set to production
184
185
  if (proxyMode === "1") {
185
186
  if (!nodeEnv) {
@@ -193,6 +194,13 @@ function validateProductionEnvironment(_adapter) {
193
194
  logger.warn("[Bootstrap:Prod] NODE_ENV is set to '%s' in proxy mode. " +
194
195
  "Expected 'production'. This may enable dev features.", nodeEnv);
195
196
  }
197
+ if (!controlPlanePublicKey) {
198
+ logger.error("[Bootstrap:Prod] CRITICAL: CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY is not set in proxy mode. " +
199
+ "Hosted runtimes cannot verify control-plane requests without it.");
200
+ throw INVALID_ARGUMENT.create({
201
+ detail: "CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY must be set when running in proxy mode (PROXY_MODE=1)",
202
+ });
203
+ }
196
204
  }
197
205
  // Log effective configuration for debugging
198
206
  bootstrapProdLog.debug("Environment configuration", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.65",
3
+ "version": "0.1.67",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -10,7 +10,7 @@ import { getErrorMessage } from "../errors/veryfront-error.js";
10
10
  import { INVALID_ARGUMENT } from "../errors/index.js";
11
11
  import { enhanceAdapterWithFS } from "../platform/adapters/fs/integration.js";
12
12
  import { isExtendedFSAdapter } from "../platform/adapters/fs/wrapper.js";
13
- import { getEnv } from "../platform/compat/process.js";
13
+ import { getEnv, getHostEnv } from "../platform/compat/process.js";
14
14
  import { initializeEsbuild } from "../platform/compat/esbuild.js";
15
15
  import { logger } from "../utils/index.js";
16
16
  import { isDebugEnabled } from "../utils/constants/env.js";
@@ -256,6 +256,7 @@ export async function bootstrapProd(
256
256
  function validateProductionEnvironment(_adapter: RuntimeAdapter): void {
257
257
  const nodeEnv = getEnv("NODE_ENV") ?? getEnv("DENO_ENV");
258
258
  const proxyMode = getEnv("PROXY_MODE");
259
+ const controlPlanePublicKey = getHostEnv("CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY");
259
260
 
260
261
  // In proxy mode (deployed pods), NODE_ENV must be explicitly set to production
261
262
  if (proxyMode === "1") {
@@ -276,6 +277,17 @@ function validateProductionEnvironment(_adapter: RuntimeAdapter): void {
276
277
  nodeEnv,
277
278
  );
278
279
  }
280
+
281
+ if (!controlPlanePublicKey) {
282
+ logger.error(
283
+ "[Bootstrap:Prod] CRITICAL: CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY is not set in proxy mode. " +
284
+ "Hosted runtimes cannot verify control-plane requests without it.",
285
+ );
286
+ throw INVALID_ARGUMENT.create({
287
+ detail:
288
+ "CHANNEL_DISPATCH_SIGNING_PUBLIC_KEY must be set when running in proxy mode (PROXY_MODE=1)",
289
+ });
290
+ }
279
291
  }
280
292
 
281
293
  // Log effective configuration for debugging