@develit-io/backend-sdk 5.30.1 → 5.30.2

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.
@@ -225,6 +225,18 @@ class Deployment {
225
225
  resource: resource || "worker"
226
226
  });
227
227
  const workerConfig = await worker.loadWorkerConfig({ path });
228
+ const vars = worker.extractWorkerVars({
229
+ workerConfig,
230
+ environment: this.environment
231
+ });
232
+ for (const key in vars) {
233
+ const value = vars[key];
234
+ switch (typeof value) {
235
+ case "object":
236
+ vars[key] = JSON.stringify(value);
237
+ break;
238
+ }
239
+ }
228
240
  const consumers = eventSources?.map((queue) => {
229
241
  return {
230
242
  queue,
@@ -256,10 +268,7 @@ class Deployment {
256
268
  }),
257
269
  bindings: {
258
270
  ...bindings,
259
- ...worker.extractWorkerVars({
260
- workerConfig,
261
- environment: this.environment
262
- })
271
+ ...vars
263
272
  },
264
273
  eventSources: consumers
265
274
  })
@@ -1,4 +1,4 @@
1
- import { D as D1_LOCATION_HINT, Q as QUEUE_MESSAGE_RETENTION_PERIOD, b as QUEUE_DELIVERY_DELAY, R as R2_LOCATION_HINT, d as R2_JURISDICTION, f as R2_STORAGE_CLASS, l as loadWorkerConfig, g as QUEUE_MAX_BATCH_TIMEOUT, h as QUEUE_MAX_BATCH_SIZE, c as composeWorkerArguments, a as extractWorkerVars, e as extractWorkerCrons, C as COMPATIBILITY_FLAGS, i as COMPATIBILITY_DATE } from '../shared/backend-sdk.Fdiq3Ek5.mjs';
1
+ import { D as D1_LOCATION_HINT, Q as QUEUE_MESSAGE_RETENTION_PERIOD, b as QUEUE_DELIVERY_DELAY, R as R2_LOCATION_HINT, d as R2_JURISDICTION, f as R2_STORAGE_CLASS, l as loadWorkerConfig, a as extractWorkerVars, g as QUEUE_MAX_BATCH_TIMEOUT, h as QUEUE_MAX_BATCH_SIZE, c as composeWorkerArguments, e as extractWorkerCrons, C as COMPATIBILITY_FLAGS, i as COMPATIBILITY_DATE } from '../shared/backend-sdk.Fdiq3Ek5.mjs';
2
2
  import { toKebabCase } from '@std/text';
3
3
  import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Worker, Nuxt } from 'alchemy/cloudflare';
4
4
  import '../shared/backend-sdk.DXRpnctc.mjs';
@@ -223,6 +223,18 @@ class Deployment {
223
223
  resource: resource || "worker"
224
224
  });
225
225
  const workerConfig = await loadWorkerConfig({ path });
226
+ const vars = extractWorkerVars({
227
+ workerConfig,
228
+ environment: this.environment
229
+ });
230
+ for (const key in vars) {
231
+ const value = vars[key];
232
+ switch (typeof value) {
233
+ case "object":
234
+ vars[key] = JSON.stringify(value);
235
+ break;
236
+ }
237
+ }
226
238
  const consumers = eventSources?.map((queue) => {
227
239
  return {
228
240
  queue,
@@ -254,10 +266,7 @@ class Deployment {
254
266
  }),
255
267
  bindings: {
256
268
  ...bindings,
257
- ...extractWorkerVars({
258
- workerConfig,
259
- environment: this.environment
260
- })
269
+ ...vars
261
270
  },
262
271
  eventSources: consumers
263
272
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "5.30.1",
3
+ "version": "5.30.2",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",