@develit-io/backend-sdk 5.27.0 → 5.28.1
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 → deployment}/index.cjs +51 -25
- package/dist/{infrastructure → deployment}/index.d.cts +14 -13
- package/dist/{infrastructure → deployment}/index.d.mts +14 -13
- package/dist/{infrastructure → deployment}/index.d.ts +14 -13
- package/dist/{infrastructure → deployment}/index.mjs +48 -27
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/node/index.cjs +2 -2
- package/dist/node/index.d.cts +1 -1
- package/dist/node/index.d.mts +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.mjs +2 -2
- package/dist/shared/{backend-sdk.Cd67M26h.d.cts → backend-sdk.8rfqUsXi.d.cts} +1 -1
- package/dist/shared/backend-sdk.BIVnu5aA.mjs +4 -0
- package/dist/shared/{backend-sdk.Bx_rk73k.cjs → backend-sdk.BNEcLkji.cjs} +3 -5
- package/dist/shared/{backend-sdk.DhyrRk3x.d.mts → backend-sdk.BvaLhEr7.d.mts} +1 -1
- package/dist/shared/{backend-sdk.DbpLyXGp.mjs → backend-sdk.CLtx2lZQ.mjs} +2 -6
- package/dist/shared/backend-sdk.CP78x0gl.d.cts +3 -0
- package/dist/shared/backend-sdk.CP78x0gl.d.mts +3 -0
- package/dist/shared/backend-sdk.CP78x0gl.d.ts +3 -0
- package/dist/shared/{backend-sdk.DGKSH7tj.d.ts → backend-sdk.CPfRBPRs.d.ts} +1 -1
- package/dist/shared/{backend-sdk.BdcrYpFD.cjs → backend-sdk.ClVQ4AzB.cjs} +2 -0
- package/package.json +5 -5
- package/dist/shared/backend-sdk.B5vcbB2_.d.cts +0 -3
- package/dist/shared/backend-sdk.B5vcbB2_.d.mts +0 -3
- package/dist/shared/backend-sdk.B5vcbB2_.d.ts +0 -3
- package/dist/shared/backend-sdk.DXRpnctc.mjs +0 -3
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const worker = require('../shared/backend-sdk.
|
|
3
|
+
const worker = require('../shared/backend-sdk.BNEcLkji.cjs');
|
|
4
4
|
const text = require('@std/text');
|
|
5
5
|
const cloudflare = require('alchemy/cloudflare');
|
|
6
|
-
const environment_consts = require('../shared/backend-sdk.
|
|
6
|
+
const environment_consts = require('../shared/backend-sdk.ClVQ4AzB.cjs');
|
|
7
|
+
const alchemy = require('alchemy');
|
|
8
|
+
const state = require('alchemy/state');
|
|
7
9
|
require('@std/path');
|
|
8
10
|
require('comment-json');
|
|
9
11
|
|
|
12
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
13
|
+
|
|
14
|
+
const alchemy__default = /*#__PURE__*/_interopDefaultCompat(alchemy);
|
|
15
|
+
|
|
10
16
|
const composeD1Arguments = ({
|
|
11
17
|
resourceName
|
|
12
18
|
}) => {
|
|
@@ -54,25 +60,33 @@ const composeIdentifierName = ({
|
|
|
54
60
|
resource,
|
|
55
61
|
resourceName
|
|
56
62
|
}) => {
|
|
57
|
-
return text.toKebabCase(
|
|
63
|
+
return `${text.toKebabCase(resourceName).toLowerCase()}-${resource}`;
|
|
58
64
|
};
|
|
59
65
|
const composeResourceName = ({
|
|
60
66
|
project,
|
|
61
67
|
environment,
|
|
62
68
|
resourceName
|
|
63
69
|
}) => {
|
|
64
|
-
return
|
|
70
|
+
return `${project}-${text.toKebabCase(resourceName).toLowerCase()}-${environment}`;
|
|
65
71
|
};
|
|
66
72
|
|
|
67
|
-
class
|
|
73
|
+
class Deployment {
|
|
68
74
|
project;
|
|
69
75
|
environment;
|
|
76
|
+
alchemy;
|
|
70
77
|
constructor({
|
|
71
78
|
project,
|
|
72
79
|
environment
|
|
73
80
|
}) {
|
|
74
81
|
this.project = project;
|
|
75
82
|
this.environment = environment;
|
|
83
|
+
this.alchemy = alchemy__default(project, {
|
|
84
|
+
stateStore: (scope) => {
|
|
85
|
+
return new state.CloudflareStateStore(scope, {
|
|
86
|
+
scriptName: environment_consts.ALCHEMY_STATE_STORE
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
76
90
|
}
|
|
77
91
|
/**
|
|
78
92
|
* Creates an instance of Cloudflare KV.
|
|
@@ -168,7 +182,7 @@ class Infrastructure {
|
|
|
168
182
|
path,
|
|
169
183
|
domains,
|
|
170
184
|
assets,
|
|
171
|
-
crons
|
|
185
|
+
crons,
|
|
172
186
|
bindings,
|
|
173
187
|
eventSources
|
|
174
188
|
} = options;
|
|
@@ -176,6 +190,7 @@ class Infrastructure {
|
|
|
176
190
|
resourceName,
|
|
177
191
|
resource: resource || "worker"
|
|
178
192
|
});
|
|
193
|
+
const workerConfig = await worker.loadWorkerConfig({ path });
|
|
179
194
|
return await cloudflare.Worker(
|
|
180
195
|
identifierName,
|
|
181
196
|
worker.composeWorkerArguments({
|
|
@@ -185,16 +200,13 @@ class Infrastructure {
|
|
|
185
200
|
resourceName: identifierName
|
|
186
201
|
}),
|
|
187
202
|
// TODO: Convert to util
|
|
188
|
-
entrypoint:
|
|
203
|
+
entrypoint: `${path}/src/index.ts`,
|
|
189
204
|
domains,
|
|
190
205
|
assets,
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
// environment: this.environment,
|
|
196
|
-
// }),
|
|
197
|
-
crons: [],
|
|
206
|
+
crons: crons || worker.extractWorkerCrons({
|
|
207
|
+
workerConfig,
|
|
208
|
+
environment: this.environment
|
|
209
|
+
}),
|
|
198
210
|
bindings,
|
|
199
211
|
eventSources
|
|
200
212
|
})
|
|
@@ -233,16 +245,30 @@ class Infrastructure {
|
|
|
233
245
|
* Creates an instance of Cloudflare Worker as a client.
|
|
234
246
|
*/
|
|
235
247
|
async client(options) {
|
|
236
|
-
const { resourceName, domains,
|
|
237
|
-
return await
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
248
|
+
const { resourceName, domains, bindings } = options;
|
|
249
|
+
return await cloudflare.Nuxt(
|
|
250
|
+
composeIdentifierName({
|
|
251
|
+
resourceName,
|
|
252
|
+
resource: "client"
|
|
253
|
+
}),
|
|
254
|
+
{
|
|
255
|
+
name: composeResourceName({
|
|
256
|
+
project: this.project,
|
|
257
|
+
environment: this.environment,
|
|
258
|
+
resourceName
|
|
259
|
+
}),
|
|
260
|
+
compatibilityDate: worker.COMPATIBILITY_DATE,
|
|
261
|
+
compatibilityFlags: worker.COMPATIBILITY_FLAGS,
|
|
262
|
+
observability: {
|
|
263
|
+
enabled: true
|
|
264
|
+
},
|
|
265
|
+
url: false,
|
|
266
|
+
domains,
|
|
267
|
+
bindings,
|
|
268
|
+
// TODO: Convert to util
|
|
269
|
+
cwd: `./apps/${resourceName}`
|
|
270
|
+
}
|
|
271
|
+
);
|
|
246
272
|
}
|
|
247
273
|
}
|
|
248
274
|
|
|
@@ -256,7 +282,7 @@ const validateEnvironment = (environment) => {
|
|
|
256
282
|
exports.composeWorkerArguments = worker.composeWorkerArguments;
|
|
257
283
|
exports.extractWorkerCrons = worker.extractWorkerCrons;
|
|
258
284
|
exports.loadWorkerConfig = worker.loadWorkerConfig;
|
|
259
|
-
exports.
|
|
285
|
+
exports.Deployment = Deployment;
|
|
260
286
|
exports.composeD1Arguments = composeD1Arguments;
|
|
261
287
|
exports.composeIdentifierName = composeIdentifierName;
|
|
262
288
|
exports.composeKvArguments = composeKvArguments;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.cjs';
|
|
1
|
+
import * as alchemy_cloudflare from 'alchemy/cloudflare';
|
|
3
2
|
import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Bindings, Worker } from 'alchemy/cloudflare';
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { P as Project } from '../shared/backend-sdk.CP78x0gl.cjs';
|
|
4
|
+
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.cjs';
|
|
5
|
+
import { W as WorkerType$1, R as Resource } from '../shared/backend-sdk.8rfqUsXi.cjs';
|
|
6
|
+
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.8rfqUsXi.cjs';
|
|
7
|
+
import alchemy from 'alchemy';
|
|
6
8
|
|
|
7
|
-
declare class
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
declare class Deployment {
|
|
10
|
+
project: Project;
|
|
11
|
+
environment: Environment;
|
|
12
|
+
alchemy: Promise<Awaited<ReturnType<typeof alchemy>>>;
|
|
10
13
|
constructor({ project, environment, }: {
|
|
11
14
|
project: Project;
|
|
12
15
|
environment: Environment;
|
|
@@ -155,15 +158,13 @@ declare class Infrastructure {
|
|
|
155
158
|
* Custom domains to bind to the Worker.
|
|
156
159
|
*/
|
|
157
160
|
domains?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* Static assets of the Worker.
|
|
160
|
-
*/
|
|
161
|
-
assets?: Bindings;
|
|
162
161
|
/**
|
|
163
162
|
* Bindings of the Worker.
|
|
164
163
|
*/
|
|
165
164
|
bindings?: Bindings;
|
|
166
|
-
}): Promise<Worker<Bindings
|
|
165
|
+
}): Promise<Worker<Bindings & {
|
|
166
|
+
ASSETS: alchemy_cloudflare.Assets;
|
|
167
|
+
}>>;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
declare const composeD1Arguments: ({ resourceName, }: {
|
|
@@ -213,4 +214,4 @@ declare const composeResourceName: ({ project, environment, resourceName, }: {
|
|
|
213
214
|
|
|
214
215
|
declare const validateEnvironment: (environment: string) => Environment;
|
|
215
216
|
|
|
216
|
-
export {
|
|
217
|
+
export { Deployment, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, validateEnvironment };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.mjs';
|
|
1
|
+
import * as alchemy_cloudflare from 'alchemy/cloudflare';
|
|
3
2
|
import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Bindings, Worker } from 'alchemy/cloudflare';
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { P as Project } from '../shared/backend-sdk.CP78x0gl.mjs';
|
|
4
|
+
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.mjs';
|
|
5
|
+
import { W as WorkerType$1, R as Resource } from '../shared/backend-sdk.BvaLhEr7.mjs';
|
|
6
|
+
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.BvaLhEr7.mjs';
|
|
7
|
+
import alchemy from 'alchemy';
|
|
6
8
|
|
|
7
|
-
declare class
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
declare class Deployment {
|
|
10
|
+
project: Project;
|
|
11
|
+
environment: Environment;
|
|
12
|
+
alchemy: Promise<Awaited<ReturnType<typeof alchemy>>>;
|
|
10
13
|
constructor({ project, environment, }: {
|
|
11
14
|
project: Project;
|
|
12
15
|
environment: Environment;
|
|
@@ -155,15 +158,13 @@ declare class Infrastructure {
|
|
|
155
158
|
* Custom domains to bind to the Worker.
|
|
156
159
|
*/
|
|
157
160
|
domains?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* Static assets of the Worker.
|
|
160
|
-
*/
|
|
161
|
-
assets?: Bindings;
|
|
162
161
|
/**
|
|
163
162
|
* Bindings of the Worker.
|
|
164
163
|
*/
|
|
165
164
|
bindings?: Bindings;
|
|
166
|
-
}): Promise<Worker<Bindings
|
|
165
|
+
}): Promise<Worker<Bindings & {
|
|
166
|
+
ASSETS: alchemy_cloudflare.Assets;
|
|
167
|
+
}>>;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
declare const composeD1Arguments: ({ resourceName, }: {
|
|
@@ -213,4 +214,4 @@ declare const composeResourceName: ({ project, environment, resourceName, }: {
|
|
|
213
214
|
|
|
214
215
|
declare const validateEnvironment: (environment: string) => Environment;
|
|
215
216
|
|
|
216
|
-
export {
|
|
217
|
+
export { Deployment, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, validateEnvironment };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.js';
|
|
1
|
+
import * as alchemy_cloudflare from 'alchemy/cloudflare';
|
|
3
2
|
import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Bindings, Worker } from 'alchemy/cloudflare';
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { P as Project } from '../shared/backend-sdk.CP78x0gl.js';
|
|
4
|
+
import { E as Environment } from '../shared/backend-sdk.D5vSybcI.js';
|
|
5
|
+
import { W as WorkerType$1, R as Resource } from '../shared/backend-sdk.CPfRBPRs.js';
|
|
6
|
+
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.CPfRBPRs.js';
|
|
7
|
+
import alchemy from 'alchemy';
|
|
6
8
|
|
|
7
|
-
declare class
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
declare class Deployment {
|
|
10
|
+
project: Project;
|
|
11
|
+
environment: Environment;
|
|
12
|
+
alchemy: Promise<Awaited<ReturnType<typeof alchemy>>>;
|
|
10
13
|
constructor({ project, environment, }: {
|
|
11
14
|
project: Project;
|
|
12
15
|
environment: Environment;
|
|
@@ -155,15 +158,13 @@ declare class Infrastructure {
|
|
|
155
158
|
* Custom domains to bind to the Worker.
|
|
156
159
|
*/
|
|
157
160
|
domains?: string[];
|
|
158
|
-
/**
|
|
159
|
-
* Static assets of the Worker.
|
|
160
|
-
*/
|
|
161
|
-
assets?: Bindings;
|
|
162
161
|
/**
|
|
163
162
|
* Bindings of the Worker.
|
|
164
163
|
*/
|
|
165
164
|
bindings?: Bindings;
|
|
166
|
-
}): Promise<Worker<Bindings
|
|
165
|
+
}): Promise<Worker<Bindings & {
|
|
166
|
+
ASSETS: alchemy_cloudflare.Assets;
|
|
167
|
+
}>>;
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
declare const composeD1Arguments: ({ resourceName, }: {
|
|
@@ -213,4 +214,4 @@ declare const composeResourceName: ({ project, environment, resourceName, }: {
|
|
|
213
214
|
|
|
214
215
|
declare const validateEnvironment: (environment: string) => Environment;
|
|
215
216
|
|
|
216
|
-
export {
|
|
217
|
+
export { Deployment, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, validateEnvironment };
|
|
@@ -1,8 +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, c as composeWorkerArguments } from '../shared/backend-sdk.
|
|
2
|
-
export { e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.DbpLyXGp.mjs';
|
|
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, l as loadWorkerConfig, c as composeWorkerArguments, e as extractWorkerCrons, C as COMPATIBILITY_FLAGS, f as COMPATIBILITY_DATE } from '../shared/backend-sdk.CLtx2lZQ.mjs';
|
|
3
2
|
import { toKebabCase } from '@std/text';
|
|
4
|
-
import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Worker } from 'alchemy/cloudflare';
|
|
5
|
-
import { E as ENVIRONMENT } from '../shared/backend-sdk.
|
|
3
|
+
import { KVNamespace, D1Database, Queue, R2Bucket, DurableObjectNamespace, Worker, Nuxt } from 'alchemy/cloudflare';
|
|
4
|
+
import { A as ALCHEMY_STATE_STORE, E as ENVIRONMENT } from '../shared/backend-sdk.BIVnu5aA.mjs';
|
|
5
|
+
import alchemy from 'alchemy';
|
|
6
|
+
import { CloudflareStateStore } from 'alchemy/state';
|
|
6
7
|
import '@std/path';
|
|
7
8
|
import 'comment-json';
|
|
8
9
|
|
|
@@ -53,25 +54,33 @@ const composeIdentifierName = ({
|
|
|
53
54
|
resource,
|
|
54
55
|
resourceName
|
|
55
56
|
}) => {
|
|
56
|
-
return toKebabCase(
|
|
57
|
+
return `${toKebabCase(resourceName).toLowerCase()}-${resource}`;
|
|
57
58
|
};
|
|
58
59
|
const composeResourceName = ({
|
|
59
60
|
project,
|
|
60
61
|
environment,
|
|
61
62
|
resourceName
|
|
62
63
|
}) => {
|
|
63
|
-
return
|
|
64
|
+
return `${project}-${toKebabCase(resourceName).toLowerCase()}-${environment}`;
|
|
64
65
|
};
|
|
65
66
|
|
|
66
|
-
class
|
|
67
|
+
class Deployment {
|
|
67
68
|
project;
|
|
68
69
|
environment;
|
|
70
|
+
alchemy;
|
|
69
71
|
constructor({
|
|
70
72
|
project,
|
|
71
73
|
environment
|
|
72
74
|
}) {
|
|
73
75
|
this.project = project;
|
|
74
76
|
this.environment = environment;
|
|
77
|
+
this.alchemy = alchemy(project, {
|
|
78
|
+
stateStore: (scope) => {
|
|
79
|
+
return new CloudflareStateStore(scope, {
|
|
80
|
+
scriptName: ALCHEMY_STATE_STORE
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
75
84
|
}
|
|
76
85
|
/**
|
|
77
86
|
* Creates an instance of Cloudflare KV.
|
|
@@ -167,7 +176,7 @@ class Infrastructure {
|
|
|
167
176
|
path,
|
|
168
177
|
domains,
|
|
169
178
|
assets,
|
|
170
|
-
crons
|
|
179
|
+
crons,
|
|
171
180
|
bindings,
|
|
172
181
|
eventSources
|
|
173
182
|
} = options;
|
|
@@ -175,6 +184,7 @@ class Infrastructure {
|
|
|
175
184
|
resourceName,
|
|
176
185
|
resource: resource || "worker"
|
|
177
186
|
});
|
|
187
|
+
const workerConfig = await loadWorkerConfig({ path });
|
|
178
188
|
return await Worker(
|
|
179
189
|
identifierName,
|
|
180
190
|
composeWorkerArguments({
|
|
@@ -184,16 +194,13 @@ class Infrastructure {
|
|
|
184
194
|
resourceName: identifierName
|
|
185
195
|
}),
|
|
186
196
|
// TODO: Convert to util
|
|
187
|
-
entrypoint:
|
|
197
|
+
entrypoint: `${path}/src/index.ts`,
|
|
188
198
|
domains,
|
|
189
199
|
assets,
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
// environment: this.environment,
|
|
195
|
-
// }),
|
|
196
|
-
crons: [],
|
|
200
|
+
crons: crons || extractWorkerCrons({
|
|
201
|
+
workerConfig,
|
|
202
|
+
environment: this.environment
|
|
203
|
+
}),
|
|
197
204
|
bindings,
|
|
198
205
|
eventSources
|
|
199
206
|
})
|
|
@@ -232,16 +239,30 @@ class Infrastructure {
|
|
|
232
239
|
* Creates an instance of Cloudflare Worker as a client.
|
|
233
240
|
*/
|
|
234
241
|
async client(options) {
|
|
235
|
-
const { resourceName, domains,
|
|
236
|
-
return await
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
242
|
+
const { resourceName, domains, bindings } = options;
|
|
243
|
+
return await Nuxt(
|
|
244
|
+
composeIdentifierName({
|
|
245
|
+
resourceName,
|
|
246
|
+
resource: "client"
|
|
247
|
+
}),
|
|
248
|
+
{
|
|
249
|
+
name: composeResourceName({
|
|
250
|
+
project: this.project,
|
|
251
|
+
environment: this.environment,
|
|
252
|
+
resourceName
|
|
253
|
+
}),
|
|
254
|
+
compatibilityDate: COMPATIBILITY_DATE,
|
|
255
|
+
compatibilityFlags: COMPATIBILITY_FLAGS,
|
|
256
|
+
observability: {
|
|
257
|
+
enabled: true
|
|
258
|
+
},
|
|
259
|
+
url: false,
|
|
260
|
+
domains,
|
|
261
|
+
bindings,
|
|
262
|
+
// TODO: Convert to util
|
|
263
|
+
cwd: `./apps/${resourceName}`
|
|
264
|
+
}
|
|
265
|
+
);
|
|
245
266
|
}
|
|
246
267
|
}
|
|
247
268
|
|
|
@@ -252,4 +273,4 @@ const validateEnvironment = (environment) => {
|
|
|
252
273
|
return Number(environment);
|
|
253
274
|
};
|
|
254
275
|
|
|
255
|
-
export {
|
|
276
|
+
export { Deployment, composeD1Arguments, composeIdentifierName, composeKvArguments, composeQueueArguments, composeR2Arguments, composeResourceName, composeWorkerArguments, extractWorkerCrons, loadWorkerConfig, validateEnvironment };
|
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const drizzleOrm = require('drizzle-orm');
|
|
|
4
4
|
const pgCore = require('drizzle-orm/pg-core');
|
|
5
5
|
const sqliteCore = require('drizzle-orm/sqlite-core');
|
|
6
6
|
const generalCodes = require('@develit-io/general-codes');
|
|
7
|
-
const environment_consts = require('./shared/backend-sdk.
|
|
7
|
+
const environment_consts = require('./shared/backend-sdk.ClVQ4AzB.cjs');
|
|
8
8
|
const z = require('zod/v4/core');
|
|
9
9
|
require('http-status-codes');
|
|
10
10
|
const h3 = require('h3');
|
package/dist/index.d.cts
CHANGED
|
@@ -6,7 +6,7 @@ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
|
6
6
|
import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
7
7
|
import * as z from 'zod/v4/core';
|
|
8
8
|
export { E as Environment } from './shared/backend-sdk.D5vSybcI.cjs';
|
|
9
|
-
export { P as Project } from './shared/backend-sdk.
|
|
9
|
+
export { P as Project } from './shared/backend-sdk.CP78x0gl.cjs';
|
|
10
10
|
import { StatusCodes, ReasonPhrases } from 'http-status-codes';
|
|
11
11
|
export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
|
|
12
12
|
import { Queue } from '@cloudflare/workers-types';
|
package/dist/index.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
|
6
6
|
import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
7
7
|
import * as z from 'zod/v4/core';
|
|
8
8
|
export { E as Environment } from './shared/backend-sdk.D5vSybcI.mjs';
|
|
9
|
-
export { P as Project } from './shared/backend-sdk.
|
|
9
|
+
export { P as Project } from './shared/backend-sdk.CP78x0gl.mjs';
|
|
10
10
|
import { StatusCodes, ReasonPhrases } from 'http-status-codes';
|
|
11
11
|
export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
|
|
12
12
|
import { Queue } from '@cloudflare/workers-types';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
|
6
6
|
import { AnySQLiteTable } from 'drizzle-orm/sqlite-core';
|
|
7
7
|
import * as z from 'zod/v4/core';
|
|
8
8
|
export { E as Environment } from './shared/backend-sdk.D5vSybcI.js';
|
|
9
|
-
export { P as Project } from './shared/backend-sdk.
|
|
9
|
+
export { P as Project } from './shared/backend-sdk.CP78x0gl.js';
|
|
10
10
|
import { StatusCodes, ReasonPhrases } from 'http-status-codes';
|
|
11
11
|
export { ReasonPhrases as InternalResponsePhrase, StatusCodes as InternalResponseStatus } from 'http-status-codes';
|
|
12
12
|
import { Queue } from '@cloudflare/workers-types';
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { sql } from 'drizzle-orm';
|
|
|
2
2
|
import { timestamp, uuid, pgEnum, text as text$1 } from 'drizzle-orm/pg-core';
|
|
3
3
|
import { integer, text } from 'drizzle-orm/sqlite-core';
|
|
4
4
|
import { COUNTRY_CODES_2, CURRENCY_CODES, BANK_CODES } from '@develit-io/general-codes';
|
|
5
|
-
export { E as ENVIRONMENT } from './shared/backend-sdk.
|
|
5
|
+
export { E as ENVIRONMENT } from './shared/backend-sdk.BIVnu5aA.mjs';
|
|
6
6
|
import * as z from 'zod/v4/core';
|
|
7
7
|
import 'http-status-codes';
|
|
8
8
|
import { createError } from 'h3';
|
package/dist/node/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const worker = require('../shared/backend-sdk.
|
|
4
|
-
require('../shared/backend-sdk.
|
|
3
|
+
const worker = require('../shared/backend-sdk.BNEcLkji.cjs');
|
|
4
|
+
require('../shared/backend-sdk.ClVQ4AzB.cjs');
|
|
5
5
|
require('@std/path');
|
|
6
6
|
require('comment-json');
|
|
7
7
|
|
package/dist/node/index.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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.8rfqUsXi.cjs';
|
|
2
2
|
import 'alchemy/cloudflare';
|
|
3
3
|
import '../shared/backend-sdk.D5vSybcI.cjs';
|
package/dist/node/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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.BvaLhEr7.mjs';
|
|
2
2
|
import 'alchemy/cloudflare';
|
|
3
3
|
import '../shared/backend-sdk.D5vSybcI.mjs';
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
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.CPfRBPRs.js';
|
|
2
2
|
import 'alchemy/cloudflare';
|
|
3
3
|
import '../shared/backend-sdk.D5vSybcI.js';
|
package/dist/node/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.
|
|
2
|
-
import '../shared/backend-sdk.
|
|
1
|
+
export { c as composeWorkerArguments, e as extractWorkerCrons, l as loadWorkerConfig } from '../shared/backend-sdk.CLtx2lZQ.mjs';
|
|
2
|
+
import '../shared/backend-sdk.BIVnu5aA.mjs';
|
|
3
3
|
import '@std/path';
|
|
4
4
|
import 'comment-json';
|
|
@@ -18,7 +18,7 @@ interface WorkerConfig {
|
|
|
18
18
|
|
|
19
19
|
declare const loadWorkerConfig: ({ path }: {
|
|
20
20
|
path: string;
|
|
21
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<WorkerConfig>;
|
|
22
22
|
declare const extractWorkerCrons: ({ workerConfig, environment, }: {
|
|
23
23
|
workerConfig: WorkerConfig;
|
|
24
24
|
environment: Environment;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const environment_consts = require('./backend-sdk.
|
|
3
|
+
const environment_consts = require('./backend-sdk.ClVQ4AzB.cjs');
|
|
4
4
|
const path = require('@std/path');
|
|
5
5
|
const commentJson = require('comment-json');
|
|
6
6
|
|
|
@@ -16,10 +16,6 @@ const R2_LOCATION_HINT = "weur";
|
|
|
16
16
|
const loadWorkerConfig = async ({ path: path$1 }) => {
|
|
17
17
|
const wranglerConfigFilePath = path.join(path$1, "./wrangler.jsonc");
|
|
18
18
|
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
19
|
-
if (!workerConfigFile.exists()) {
|
|
20
|
-
console.log(`Could not find ${wranglerConfigFilePath}.`);
|
|
21
|
-
return {};
|
|
22
|
-
}
|
|
23
19
|
return commentJson.parse(
|
|
24
20
|
await workerConfigFile.text(),
|
|
25
21
|
null,
|
|
@@ -61,6 +57,8 @@ const composeWorkerArguments = ({
|
|
|
61
57
|
};
|
|
62
58
|
};
|
|
63
59
|
|
|
60
|
+
exports.COMPATIBILITY_DATE = COMPATIBILITY_DATE;
|
|
61
|
+
exports.COMPATIBILITY_FLAGS = COMPATIBILITY_FLAGS;
|
|
64
62
|
exports.D1_LOCATION_HINT = D1_LOCATION_HINT;
|
|
65
63
|
exports.QUEUE_DELIVERY_DELAY = QUEUE_DELIVERY_DELAY;
|
|
66
64
|
exports.QUEUE_MESSAGE_RETENTION_PERIOD = QUEUE_MESSAGE_RETENTION_PERIOD;
|
|
@@ -18,7 +18,7 @@ interface WorkerConfig {
|
|
|
18
18
|
|
|
19
19
|
declare const loadWorkerConfig: ({ path }: {
|
|
20
20
|
path: string;
|
|
21
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<WorkerConfig>;
|
|
22
22
|
declare const extractWorkerCrons: ({ workerConfig, environment, }: {
|
|
23
23
|
workerConfig: WorkerConfig;
|
|
24
24
|
environment: Environment;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as ENVIRONMENT } from './backend-sdk.
|
|
1
|
+
import { E as ENVIRONMENT } from './backend-sdk.BIVnu5aA.mjs';
|
|
2
2
|
import { join } from '@std/path';
|
|
3
3
|
import { parse } from 'comment-json';
|
|
4
4
|
|
|
@@ -14,10 +14,6 @@ const R2_LOCATION_HINT = "weur";
|
|
|
14
14
|
const loadWorkerConfig = async ({ path }) => {
|
|
15
15
|
const wranglerConfigFilePath = join(path, "./wrangler.jsonc");
|
|
16
16
|
const workerConfigFile = Bun.file(wranglerConfigFilePath);
|
|
17
|
-
if (!workerConfigFile.exists()) {
|
|
18
|
-
console.log(`Could not find ${wranglerConfigFilePath}.`);
|
|
19
|
-
return {};
|
|
20
|
-
}
|
|
21
17
|
return parse(
|
|
22
18
|
await workerConfigFile.text(),
|
|
23
19
|
null,
|
|
@@ -59,4 +55,4 @@ const composeWorkerArguments = ({
|
|
|
59
55
|
};
|
|
60
56
|
};
|
|
61
57
|
|
|
62
|
-
export { D1_LOCATION_HINT as D, QUEUE_MESSAGE_RETENTION_PERIOD as Q, R2_STORAGE_CLASS as R, QUEUE_DELIVERY_DELAY as a, R2_LOCATION_HINT as b, composeWorkerArguments as c, R2_JURISDICTION as d, extractWorkerCrons as e, loadWorkerConfig as l };
|
|
58
|
+
export { COMPATIBILITY_FLAGS as C, D1_LOCATION_HINT as D, QUEUE_MESSAGE_RETENTION_PERIOD as Q, R2_STORAGE_CLASS as R, QUEUE_DELIVERY_DELAY as a, R2_LOCATION_HINT as b, composeWorkerArguments as c, R2_JURISDICTION as d, extractWorkerCrons as e, COMPATIBILITY_DATE as f, loadWorkerConfig as l };
|
|
@@ -18,7 +18,7 @@ interface WorkerConfig {
|
|
|
18
18
|
|
|
19
19
|
declare const loadWorkerConfig: ({ path }: {
|
|
20
20
|
path: string;
|
|
21
|
-
}) => Promise<
|
|
21
|
+
}) => Promise<WorkerConfig>;
|
|
22
22
|
declare const extractWorkerCrons: ({ workerConfig, environment, }: {
|
|
23
23
|
workerConfig: WorkerConfig;
|
|
24
24
|
environment: Environment;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@develit-io/backend-sdk",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.1",
|
|
4
4
|
"description": "Develit Backend SDK",
|
|
5
5
|
"author": "Develit.io",
|
|
6
6
|
"license": "ISC",
|
|
@@ -22,10 +22,10 @@
|
|
|
22
22
|
"import": "./dist/index.mjs",
|
|
23
23
|
"require": "./dist/index.cjs"
|
|
24
24
|
},
|
|
25
|
-
"./
|
|
26
|
-
"types": "./dist/
|
|
27
|
-
"import": "./dist/
|
|
28
|
-
"require": "./dist/
|
|
25
|
+
"./deployment": {
|
|
26
|
+
"types": "./dist/deployment/index.d.ts",
|
|
27
|
+
"import": "./dist/deployment/index.mjs",
|
|
28
|
+
"require": "./dist/deployment/index.cjs"
|
|
29
29
|
},
|
|
30
30
|
"./node": {
|
|
31
31
|
"types": "./dist/node/index.d.ts",
|