@develit-io/backend-sdk 5.26.3 → 5.26.4
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.
|
@@ -149,7 +149,7 @@ class Infrastructure {
|
|
|
149
149
|
resource,
|
|
150
150
|
path,
|
|
151
151
|
assets,
|
|
152
|
-
crons,
|
|
152
|
+
crons: _crons,
|
|
153
153
|
bindings,
|
|
154
154
|
eventSources
|
|
155
155
|
} = options;
|
|
@@ -157,7 +157,6 @@ class Infrastructure {
|
|
|
157
157
|
resourceName,
|
|
158
158
|
resource: resource || "worker"
|
|
159
159
|
});
|
|
160
|
-
const workerConfig = await worker.loadWorkerConfig({ path });
|
|
161
160
|
return await cloudflare.Worker(
|
|
162
161
|
identifierName,
|
|
163
162
|
worker.composeWorkerArguments({
|
|
@@ -167,12 +166,15 @@ class Infrastructure {
|
|
|
167
166
|
resourceName: identifierName
|
|
168
167
|
}),
|
|
169
168
|
// TODO: Convert to util
|
|
170
|
-
entrypoint: `${path}/src/index.ts`,
|
|
169
|
+
entrypoint: resource === "client" ? `${path}/server/index.mjs` : `${path}/src/index.ts`,
|
|
171
170
|
assets,
|
|
172
|
-
crons:
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
// crons:
|
|
172
|
+
// crons ||
|
|
173
|
+
// extractWorkerCrons({
|
|
174
|
+
// workerConfig,
|
|
175
|
+
// environment: this.environment,
|
|
176
|
+
// }),
|
|
177
|
+
crons: [],
|
|
176
178
|
bindings,
|
|
177
179
|
eventSources
|
|
178
180
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { D as D1_LOCATION_HINT, Q as QUEUE_MESSAGE_RETENTION_PERIOD, a as QUEUE_DELIVERY_DELAY, R as R2_STORAGE_CLASS, b as R2_LOCATION_HINT, d as R2_JURISDICTION,
|
|
1
|
+
import { D as D1_LOCATION_HINT, Q as QUEUE_MESSAGE_RETENTION_PERIOD, a as QUEUE_DELIVERY_DELAY, R as R2_STORAGE_CLASS, b as R2_LOCATION_HINT, d as R2_JURISDICTION, c as composeWorkerArguments } from '../shared/backend-sdk.yptokdbb.mjs';
|
|
2
|
+
export { e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.yptokdbb.mjs';
|
|
2
3
|
import { KVNamespace, D1Database, Queue, R2Bucket, Worker } from 'alchemy/cloudflare';
|
|
3
4
|
import { E as ENVIRONMENT } from '../shared/backend-sdk.DXRpnctc.mjs';
|
|
4
5
|
import '@std/path';
|
|
@@ -147,7 +148,7 @@ class Infrastructure {
|
|
|
147
148
|
resource,
|
|
148
149
|
path,
|
|
149
150
|
assets,
|
|
150
|
-
crons,
|
|
151
|
+
crons: _crons,
|
|
151
152
|
bindings,
|
|
152
153
|
eventSources
|
|
153
154
|
} = options;
|
|
@@ -155,7 +156,6 @@ class Infrastructure {
|
|
|
155
156
|
resourceName,
|
|
156
157
|
resource: resource || "worker"
|
|
157
158
|
});
|
|
158
|
-
const workerConfig = await loadWorkerConfig({ path });
|
|
159
159
|
return await Worker(
|
|
160
160
|
identifierName,
|
|
161
161
|
composeWorkerArguments({
|
|
@@ -165,12 +165,15 @@ class Infrastructure {
|
|
|
165
165
|
resourceName: identifierName
|
|
166
166
|
}),
|
|
167
167
|
// TODO: Convert to util
|
|
168
|
-
entrypoint: `${path}/src/index.ts`,
|
|
168
|
+
entrypoint: resource === "client" ? `${path}/server/index.mjs` : `${path}/src/index.ts`,
|
|
169
169
|
assets,
|
|
170
|
-
crons:
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
// crons:
|
|
171
|
+
// crons ||
|
|
172
|
+
// extractWorkerCrons({
|
|
173
|
+
// workerConfig,
|
|
174
|
+
// environment: this.environment,
|
|
175
|
+
// }),
|
|
176
|
+
crons: [],
|
|
174
177
|
bindings,
|
|
175
178
|
eventSources
|
|
176
179
|
})
|
|
@@ -227,4 +230,4 @@ const validateEnvironment = (environment) => {
|
|
|
227
230
|
return Number(environment);
|
|
228
231
|
};
|
|
229
232
|
|
|
230
|
-
export { Infrastructure, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, composeWorkerArguments,
|
|
233
|
+
export { Infrastructure, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, composeWorkerArguments, validateEnvironment };
|