@develit-io/backend-sdk 5.26.2 → 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.
- package/dist/infrastructure/index.cjs +10 -9
- package/dist/infrastructure/index.mjs +12 -10
- package/dist/node/index.cjs +1 -2
- package/dist/node/index.mjs +1 -2
- package/dist/shared/{backend-sdk.CeeriD8t.cjs → backend-sdk.CEul1tWr.cjs} +2 -4
- package/dist/shared/{backend-sdk.DNTOq4pj.mjs → backend-sdk.yptokdbb.mjs} +2 -4
- package/package.json +1 -2
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const worker = require('../shared/backend-sdk.
|
|
3
|
+
const worker = require('../shared/backend-sdk.CEul1tWr.cjs');
|
|
4
4
|
const cloudflare = require('alchemy/cloudflare');
|
|
5
5
|
const environment_consts = require('../shared/backend-sdk.BdcrYpFD.cjs');
|
|
6
6
|
require('@std/path');
|
|
7
7
|
require('comment-json');
|
|
8
|
-
require('@std/fs');
|
|
9
8
|
|
|
10
9
|
const composeD1Arguments = ({
|
|
11
10
|
resourceName
|
|
@@ -150,7 +149,7 @@ class Infrastructure {
|
|
|
150
149
|
resource,
|
|
151
150
|
path,
|
|
152
151
|
assets,
|
|
153
|
-
crons,
|
|
152
|
+
crons: _crons,
|
|
154
153
|
bindings,
|
|
155
154
|
eventSources
|
|
156
155
|
} = options;
|
|
@@ -158,7 +157,6 @@ class Infrastructure {
|
|
|
158
157
|
resourceName,
|
|
159
158
|
resource: resource || "worker"
|
|
160
159
|
});
|
|
161
|
-
const workerConfig = await worker.loadWorkerConfig({ path });
|
|
162
160
|
return await cloudflare.Worker(
|
|
163
161
|
identifierName,
|
|
164
162
|
worker.composeWorkerArguments({
|
|
@@ -168,12 +166,15 @@ class Infrastructure {
|
|
|
168
166
|
resourceName: identifierName
|
|
169
167
|
}),
|
|
170
168
|
// TODO: Convert to util
|
|
171
|
-
entrypoint: `${path}/src/index.ts`,
|
|
169
|
+
entrypoint: resource === "client" ? `${path}/server/index.mjs` : `${path}/src/index.ts`,
|
|
172
170
|
assets,
|
|
173
|
-
crons:
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
171
|
+
// crons:
|
|
172
|
+
// crons ||
|
|
173
|
+
// extractWorkerCrons({
|
|
174
|
+
// workerConfig,
|
|
175
|
+
// environment: this.environment,
|
|
176
|
+
// }),
|
|
177
|
+
crons: [],
|
|
177
178
|
bindings,
|
|
178
179
|
eventSources
|
|
179
180
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
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';
|
|
5
6
|
import 'comment-json';
|
|
6
|
-
import '@std/fs';
|
|
7
7
|
|
|
8
8
|
const composeD1Arguments = ({
|
|
9
9
|
resourceName
|
|
@@ -148,7 +148,7 @@ class Infrastructure {
|
|
|
148
148
|
resource,
|
|
149
149
|
path,
|
|
150
150
|
assets,
|
|
151
|
-
crons,
|
|
151
|
+
crons: _crons,
|
|
152
152
|
bindings,
|
|
153
153
|
eventSources
|
|
154
154
|
} = options;
|
|
@@ -156,7 +156,6 @@ class Infrastructure {
|
|
|
156
156
|
resourceName,
|
|
157
157
|
resource: resource || "worker"
|
|
158
158
|
});
|
|
159
|
-
const workerConfig = await loadWorkerConfig({ path });
|
|
160
159
|
return await Worker(
|
|
161
160
|
identifierName,
|
|
162
161
|
composeWorkerArguments({
|
|
@@ -166,12 +165,15 @@ class Infrastructure {
|
|
|
166
165
|
resourceName: identifierName
|
|
167
166
|
}),
|
|
168
167
|
// TODO: Convert to util
|
|
169
|
-
entrypoint: `${path}/src/index.ts`,
|
|
168
|
+
entrypoint: resource === "client" ? `${path}/server/index.mjs` : `${path}/src/index.ts`,
|
|
170
169
|
assets,
|
|
171
|
-
crons:
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
170
|
+
// crons:
|
|
171
|
+
// crons ||
|
|
172
|
+
// extractWorkerCrons({
|
|
173
|
+
// workerConfig,
|
|
174
|
+
// environment: this.environment,
|
|
175
|
+
// }),
|
|
176
|
+
crons: [],
|
|
175
177
|
bindings,
|
|
176
178
|
eventSources
|
|
177
179
|
})
|
|
@@ -228,4 +230,4 @@ const validateEnvironment = (environment) => {
|
|
|
228
230
|
return Number(environment);
|
|
229
231
|
};
|
|
230
232
|
|
|
231
|
-
export { Infrastructure, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, composeWorkerArguments,
|
|
233
|
+
export { Infrastructure, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, composeWorkerArguments, validateEnvironment };
|
package/dist/node/index.cjs
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const worker = require('../shared/backend-sdk.
|
|
3
|
+
const worker = require('../shared/backend-sdk.CEul1tWr.cjs');
|
|
4
4
|
require('../shared/backend-sdk.BdcrYpFD.cjs');
|
|
5
5
|
require('@std/path');
|
|
6
6
|
require('comment-json');
|
|
7
|
-
require('@std/fs');
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.
|
|
1
|
+
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.yptokdbb.mjs';
|
|
2
2
|
import '../shared/backend-sdk.DXRpnctc.mjs';
|
|
3
3
|
import '@std/path';
|
|
4
4
|
import 'comment-json';
|
|
5
|
-
import '@std/fs';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const environment_consts = require('./backend-sdk.BdcrYpFD.cjs');
|
|
4
4
|
const path = require('@std/path');
|
|
5
5
|
const commentJson = require('comment-json');
|
|
6
|
-
const fs = require('@std/fs');
|
|
7
6
|
|
|
8
7
|
const COMPATIBILITY_DATE = "2025-06-04";
|
|
9
8
|
const COMPATIBILITY_FLAGS = ["nodejs_compat"];
|
|
@@ -16,12 +15,11 @@ const R2_LOCATION_HINT = "weur";
|
|
|
16
15
|
|
|
17
16
|
const loadWorkerConfig = async ({ path: path$1 }) => {
|
|
18
17
|
const wranglerConfigFilePath = path.join(path$1, "./wrangler.jsonc");
|
|
19
|
-
const
|
|
20
|
-
if (!
|
|
18
|
+
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
19
|
+
if (!workerConfigFile.exists()) {
|
|
21
20
|
console.log(`Could not find ${wranglerConfigFilePath}.`);
|
|
22
21
|
return {};
|
|
23
22
|
}
|
|
24
|
-
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
25
23
|
return commentJson.parse(
|
|
26
24
|
await workerConfigFile.text(),
|
|
27
25
|
null,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { E as ENVIRONMENT } from './backend-sdk.DXRpnctc.mjs';
|
|
2
2
|
import { join } from '@std/path';
|
|
3
3
|
import { parse } from 'comment-json';
|
|
4
|
-
import { exists } from '@std/fs';
|
|
5
4
|
|
|
6
5
|
const COMPATIBILITY_DATE = "2025-06-04";
|
|
7
6
|
const COMPATIBILITY_FLAGS = ["nodejs_compat"];
|
|
@@ -14,12 +13,11 @@ const R2_LOCATION_HINT = "weur";
|
|
|
14
13
|
|
|
15
14
|
const loadWorkerConfig = async ({ path }) => {
|
|
16
15
|
const wranglerConfigFilePath = join(path, "./wrangler.jsonc");
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
16
|
+
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
17
|
+
if (!workerConfigFile.exists()) {
|
|
19
18
|
console.log(`Could not find ${wranglerConfigFilePath}.`);
|
|
20
19
|
return {};
|
|
21
20
|
}
|
|
22
|
-
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
23
21
|
return parse(
|
|
24
22
|
await workerConfigFile.text(),
|
|
25
23
|
null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-io/backend-sdk",
|
|
3
|
-
"version": "5.26.
|
|
3
|
+
"version": "5.26.4",
|
|
4
4
|
"description": "Develit Backend SDK",
|
|
5
5
|
"author": "Develit.io",
|
|
6
6
|
"license": "ISC",
|
|
@@ -39,7 +39,6 @@
|
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@cloudflare/workers-types": "4.20250923.0",
|
|
42
|
-
"@std/fs": "npm:@jsr/std__fs",
|
|
43
42
|
"@std/path": "npm:@jsr/std__path",
|
|
44
43
|
"@std/text": "npm:@jsr/std__text",
|
|
45
44
|
"comment-json": "^4.2.5",
|