wikimemory 0.2.1 → 0.2.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.
|
@@ -203,9 +203,19 @@ export function initialConfig(options, account) {
|
|
|
203
203
|
}, null, 2)}\n`;
|
|
204
204
|
}
|
|
205
205
|
export function withWebAssets(config) {
|
|
206
|
-
const parsed = z
|
|
206
|
+
const parsed = z
|
|
207
|
+
.looseObject({
|
|
208
|
+
d1_databases: z.array(z.looseObject({ binding: z.string() })).optional()
|
|
209
|
+
})
|
|
210
|
+
.parse(JSON.parse(config));
|
|
211
|
+
const databases = parsed.d1_databases?.map((database) => database.binding === "DB"
|
|
212
|
+
? { ...database, migrations_dir: join(PACKAGE_ROOT, "migrations") }
|
|
213
|
+
: database);
|
|
207
214
|
return `${JSON.stringify({
|
|
208
215
|
...parsed,
|
|
216
|
+
$schema: join(PACKAGE_ROOT, "node_modules", "wrangler", "config-schema.json"),
|
|
217
|
+
main: join(PACKAGE_ROOT, "src", "index.ts"),
|
|
218
|
+
...(databases === undefined ? {} : { d1_databases: databases }),
|
|
209
219
|
assets: {
|
|
210
220
|
directory: join(PACKAGE_ROOT, "dist", "web"),
|
|
211
221
|
binding: "ASSETS",
|
|
@@ -352,7 +362,11 @@ export async function verifyEndpoint(origin, path, expectedStatus, fetcher = fet
|
|
|
352
362
|
const body = await response.text();
|
|
353
363
|
if (response.ok) {
|
|
354
364
|
const decoded = z
|
|
355
|
-
.object({
|
|
365
|
+
.object({
|
|
366
|
+
status: z.literal(expectedStatus),
|
|
367
|
+
service: z.literal("wikimemory"),
|
|
368
|
+
version: z.literal(WIKIMEMORY_VERSION)
|
|
369
|
+
})
|
|
356
370
|
.safeParse(JSON.parse(body));
|
|
357
371
|
if (decoded.success)
|
|
358
372
|
return;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const WIKIMEMORY_VERSION = "0.2.
|
|
1
|
+
export const WIKIMEMORY_VERSION = "0.2.2";
|
|
2
2
|
export const LATEST_SCHEMA_VERSION = "0004_credential_bound_registration_tokens.sql";
|
package/package.json
CHANGED
package/release-manifest.json
CHANGED
package/src/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const WIKIMEMORY_VERSION = "0.2.
|
|
1
|
+
export const WIKIMEMORY_VERSION = "0.2.2";
|
|
2
2
|
export const LATEST_SCHEMA_VERSION = "0004_credential_bound_registration_tokens.sql";
|