@distilled.cloud/cloudflare 0.15.1 → 0.16.0
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/lib/services/secrets-store.d.ts +12 -12
- package/lib/services/secrets-store.d.ts.map +1 -1
- package/lib/services/secrets-store.js +7 -15
- package/lib/services/secrets-store.js.map +1 -1
- package/lib/services/workers.d.ts +4 -4
- package/lib/services/workers.d.ts.map +1 -1
- package/lib/services/workers.js +3 -3
- package/lib/services/workers.js.map +1 -1
- package/package.json +3 -3
- package/src/services/secrets-store.ts +21 -24
- package/src/services/workers.ts +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/cloudflare",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/alchemy-run/distilled",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"fmt": "oxfmt --write src",
|
|
57
57
|
"lint": "oxlint --fix src",
|
|
58
58
|
"check": "tsgo && oxlint src && oxfmt --check src",
|
|
59
|
-
"test": "vitest run --exclude specs",
|
|
59
|
+
"test": "vitest run --exclude specs --passWithNoTests",
|
|
60
60
|
"publish:npm": "bun run build && bun publish --access public",
|
|
61
61
|
"generate": "bun run scripts/generate.ts && oxlint --fix src && oxfmt --write src && oxfmt --write src",
|
|
62
62
|
"specs:fetch": "git submodule update --force --init --recursive --depth=1 specs/cloudflare-typescript && git -C specs/cloudflare-typescript checkout -- .",
|
|
63
63
|
"specs:update": "git -C specs/cloudflare-typescript fetch && git -C specs/cloudflare-typescript checkout main && git -C specs/cloudflare-typescript pull"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@distilled.cloud/core": "0.
|
|
66
|
+
"@distilled.cloud/core": "0.16.0",
|
|
67
67
|
"effect": "4.0.0-beta.58"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
@@ -216,19 +216,15 @@ export const listStores: API.PaginatedOperationMethod<
|
|
|
216
216
|
}));
|
|
217
217
|
|
|
218
218
|
export interface CreateStoreRequest {
|
|
219
|
-
/**
|
|
219
|
+
/** Account identifier */
|
|
220
220
|
accountId: string;
|
|
221
|
-
/**
|
|
222
|
-
|
|
221
|
+
/** The name of the store */
|
|
222
|
+
name: string;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
export const CreateStoreRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
226
226
|
accountId: Schema.String.pipe(T.HttpPath("account_id")),
|
|
227
|
-
|
|
228
|
-
Schema.Struct({
|
|
229
|
-
name: Schema.String,
|
|
230
|
-
}),
|
|
231
|
-
).pipe(T.HttpBody()),
|
|
227
|
+
name: Schema.String,
|
|
232
228
|
}).pipe(
|
|
233
229
|
T.Http({
|
|
234
230
|
method: "POST",
|
|
@@ -237,38 +233,39 @@ export const CreateStoreRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
237
233
|
) as unknown as Schema.Schema<CreateStoreRequest>;
|
|
238
234
|
|
|
239
235
|
export interface CreateStoreResponse {
|
|
240
|
-
|
|
236
|
+
/** Store identifier */
|
|
237
|
+
id: string;
|
|
238
|
+
/** When the store was created */
|
|
239
|
+
created: string;
|
|
240
|
+
/** When the store was modified */
|
|
241
|
+
modified: string;
|
|
242
|
+
/** The name of the store */
|
|
243
|
+
name: string;
|
|
241
244
|
}
|
|
242
245
|
|
|
243
246
|
export const CreateStoreResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
),
|
|
252
|
-
}) as unknown as Schema.Schema<CreateStoreResponse>;
|
|
247
|
+
id: Schema.String,
|
|
248
|
+
created: Schema.String,
|
|
249
|
+
modified: Schema.String,
|
|
250
|
+
name: Schema.String,
|
|
251
|
+
}).pipe(
|
|
252
|
+
T.ResponsePath("result"),
|
|
253
|
+
) as unknown as Schema.Schema<CreateStoreResponse>;
|
|
253
254
|
|
|
254
255
|
export type CreateStoreError =
|
|
255
256
|
| DefaultErrors
|
|
256
257
|
| InvalidAccountId
|
|
257
258
|
| MaximumStoresExceeded;
|
|
258
259
|
|
|
259
|
-
export const createStore: API.
|
|
260
|
+
export const createStore: API.OperationMethod<
|
|
260
261
|
CreateStoreRequest,
|
|
261
262
|
CreateStoreResponse,
|
|
262
263
|
CreateStoreError,
|
|
263
264
|
Credentials | HttpClient.HttpClient
|
|
264
|
-
> = /*@__PURE__*/ /*#__PURE__*/ API.
|
|
265
|
+
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
265
266
|
input: CreateStoreRequest,
|
|
266
267
|
output: CreateStoreResponse,
|
|
267
268
|
errors: [InvalidAccountId, MaximumStoresExceeded],
|
|
268
|
-
pagination: {
|
|
269
|
-
mode: "single",
|
|
270
|
-
items: "result",
|
|
271
|
-
} as const,
|
|
272
269
|
}));
|
|
273
270
|
|
|
274
271
|
export interface DeleteStoreRequest {
|
package/src/services/workers.ts
CHANGED
|
@@ -93,12 +93,6 @@ export class RouteNotFound extends Schema.TaggedErrorClass<RouteNotFound>()(
|
|
|
93
93
|
) {}
|
|
94
94
|
T.applyErrorMatchers(RouteNotFound, [{ code: 10009 }]);
|
|
95
95
|
|
|
96
|
-
export class ScriptStartupError extends Schema.TaggedErrorClass<ScriptStartupError>()(
|
|
97
|
-
"ScriptStartupError",
|
|
98
|
-
{ code: Schema.Number, message: Schema.String },
|
|
99
|
-
) {}
|
|
100
|
-
T.applyErrorMatchers(ScriptStartupError, [{ code: 10021 }]);
|
|
101
|
-
|
|
102
96
|
export class ScriptModuleNotFound extends Schema.TaggedErrorClass<ScriptModuleNotFound>()(
|
|
103
97
|
"ScriptModuleNotFound",
|
|
104
98
|
{ code: Schema.Number, message: Schema.String },
|
|
@@ -107,6 +101,12 @@ T.applyErrorMatchers(ScriptModuleNotFound, [
|
|
|
107
101
|
{ code: 10021, message: { includes: "No such module" } },
|
|
108
102
|
]);
|
|
109
103
|
|
|
104
|
+
export class ScriptStartupError extends Schema.TaggedErrorClass<ScriptStartupError>()(
|
|
105
|
+
"ScriptStartupError",
|
|
106
|
+
{ code: Schema.Number, message: Schema.String },
|
|
107
|
+
) {}
|
|
108
|
+
T.applyErrorMatchers(ScriptStartupError, [{ code: 10021 }]);
|
|
109
|
+
|
|
110
110
|
export class SecretNotFound extends Schema.TaggedErrorClass<SecretNotFound>()(
|
|
111
111
|
"SecretNotFound",
|
|
112
112
|
{ code: Schema.Number, message: Schema.String },
|