dineway 0.1.27 → 0.1.29
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/api/route-utils.d.mts +2 -2
- package/dist/api/route-utils.mjs +1 -1
- package/dist/api/schemas/index.d.mts +1 -1
- package/dist/{api-DHgai7zP.mjs → api-THnYu0ZU.mjs} +1 -1
- package/dist/astro/index.d.mts +2 -2
- package/dist/astro/index.mjs +2 -2
- package/dist/astro/middleware/auth.d.mts +2 -2
- package/dist/astro/middleware/auth.mjs +1 -1
- package/dist/astro/middleware/request-context.mjs +1 -1
- package/dist/astro/middleware/setup.mjs +1 -1
- package/dist/astro/middleware.mjs +11 -10
- package/dist/astro/routes/api/admin/api-tokens/index.mjs +1 -1
- package/dist/astro/routes/api/admin/context/_id_/history.mjs +2 -2
- package/dist/astro/routes/api/admin/context/_id_/index.mjs +2 -2
- package/dist/astro/routes/api/admin/context/_id_/review.mjs +2 -2
- package/dist/astro/routes/api/admin/context/_id_/supersede.mjs +2 -2
- package/dist/astro/routes/api/admin/context/diff.mjs +2 -2
- package/dist/astro/routes/api/admin/context/index.mjs +2 -2
- package/dist/astro/routes/api/admin/context/stale.mjs +2 -2
- package/dist/astro/routes/api/admin/hitl-requests/_id_/index.mjs +3 -3
- package/dist/astro/routes/api/admin/hitl-requests/_id_/resolve.mjs +3 -3
- package/dist/astro/routes/api/admin/hitl-requests/index.mjs +3 -3
- package/dist/astro/routes/api/admin/hooks/exclusive/_hookName_.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/_id_.mjs +2 -2
- package/dist/astro/routes/api/admin/oauth-clients/index.mjs +2 -2
- package/dist/astro/routes/api/admin/plugins/_id_/disable.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/enable.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/_id_/uninstall.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/_id_/update.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/marketplace/_id_/install.mjs +3 -3
- package/dist/astro/routes/api/admin/plugins/marketplace/index.mjs +1 -1
- package/dist/astro/routes/api/admin/plugins/updates.mjs +1 -1
- package/dist/astro/routes/api/admin/review-requests/_id_/resolve.mjs +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/_id_/index.mjs +1 -1
- package/dist/astro/routes/api/admin/themes/marketplace/index.mjs +1 -1
- package/dist/astro/routes/api/auth/invite/complete.mjs +2 -2
- package/dist/astro/routes/api/auth/invite/register-options.mjs +1 -1
- package/dist/astro/routes/api/auth/mode.mjs +2 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +3 -1
- package/dist/astro/routes/api/auth/passkey/register/options.mjs +1 -1
- package/dist/astro/routes/api/auth/passkey/register/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/passkey/verify.mjs +2 -2
- package/dist/astro/routes/api/auth/setup-token/index.mjs +4 -4
- package/dist/astro/routes/api/auth/setup-token/verify.mjs +13 -3
- package/dist/astro/routes/api/auth/signup/complete.mjs +2 -2
- package/dist/astro/routes/api/comments/_collection_/_contentId_/index.mjs +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/preview-url.mjs +1 -1
- package/dist/astro/routes/api/content/_collection_/_id_/publish.mjs +1 -1
- package/dist/astro/routes/api/health.mjs +1 -1
- package/dist/astro/routes/api/import/wordpress/execute.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/prepare.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress/rewrite-urls.mjs +2 -2
- package/dist/astro/routes/api/import/wordpress-plugin/execute.mjs +2 -2
- package/dist/astro/routes/api/manifest.mjs +3 -3
- package/dist/astro/routes/api/mcp.mjs +2 -2
- package/dist/astro/routes/api/menus/_name_/items/_id_.mjs +2 -2
- package/dist/astro/routes/api/menus/_name_/items.mjs +2 -2
- package/dist/astro/routes/api/menus/_name_/reorder.mjs +2 -2
- package/dist/astro/routes/api/menus/_name_/translations.mjs +2 -2
- package/dist/astro/routes/api/menus/_name_.mjs +2 -2
- package/dist/astro/routes/api/menus/index.mjs +2 -2
- package/dist/astro/routes/api/oauth/authorize.mjs +3 -3
- package/dist/astro/routes/api/oauth/device/authorize.mjs +2 -2
- package/dist/astro/routes/api/oauth/device/code.mjs +2 -2
- package/dist/astro/routes/api/oauth/device/token.mjs +2 -2
- package/dist/astro/routes/api/oauth/register.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/refresh.mjs +2 -2
- package/dist/astro/routes/api/oauth/token/revoke.mjs +2 -2
- package/dist/astro/routes/api/oauth/token.mjs +3 -3
- package/dist/astro/routes/api/openapi.json.mjs +1 -1
- package/dist/astro/routes/api/redirects/_id_.mjs +2 -2
- package/dist/astro/routes/api/redirects/index.mjs +2 -2
- package/dist/astro/routes/api/schema/collections/_slug_/fields/_fieldSlug_.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/index.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/fields/reorder.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/_slug_/index.mjs +1 -1
- package/dist/astro/routes/api/schema/collections/index.mjs +1 -1
- package/dist/astro/routes/api/schema/orphans/_slug_.mjs +1 -1
- package/dist/astro/routes/api/schema/orphans/index.mjs +1 -1
- package/dist/astro/routes/api/sections/_slug_.mjs +2 -2
- package/dist/astro/routes/api/sections/index.mjs +2 -2
- package/dist/astro/routes/api/settings.mjs +2 -2
- package/dist/astro/routes/api/setup/admin-verify.mjs +3 -3
- package/dist/astro/routes/api/setup/admin.mjs +1 -1
- package/dist/astro/routes/api/setup/index.mjs +1 -1
- package/dist/astro/routes/api/setup/status.mjs +1 -1
- package/dist/astro/routes/api/snapshot.mjs +1 -1
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_/translations.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/_slug_.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/_name_/terms/index.mjs +2 -2
- package/dist/astro/routes/api/taxonomies/index.mjs +2 -2
- package/dist/astro/routes/api/themes/preview.mjs +1 -1
- package/dist/astro/routes/api/well-known/auth.mjs +2 -2
- package/dist/astro/routes/api/well-known/oauth-authorization-server.mjs +1 -1
- package/dist/astro/routes/api/well-known/oauth-protected-resource.mjs +1 -1
- package/dist/astro/routes/api/widget-areas/_name_/reorder.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/widgets/_id_.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_/widgets.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/_name_.mjs +2 -2
- package/dist/astro/routes/api/widget-areas/index.mjs +2 -2
- package/dist/astro/types.d.mts +2 -2
- package/dist/{bylines-Cb7nzI9t.d.mts → bylines-CqLv_DIj.d.mts} +22 -22
- package/dist/cli/index.mjs +168 -59
- package/dist/client/index.d.mts +7 -1
- package/dist/client/index.mjs +4 -0
- package/dist/{context-DgqEfcWz.mjs → context-BnD2m5tn.mjs} +1 -1
- package/dist/{device-flow-CTS91g4A.mjs → device-flow-DDZjntgf.mjs} +2 -2
- package/dist/{hitl-requests-DaRuZ7tb.mjs → hitl-requests-Dt7JsXh5.mjs} +2 -2
- package/dist/{hitl-route-helpers-DcPySbZ3.mjs → hitl-route-helpers-F3voM_3Y.mjs} +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/media/local-runtime.d.mts +2 -2
- package/dist/{oauth-authorization-DyOFXQWq.mjs → oauth-authorization-lW9vJ_hl.mjs} +2 -2
- package/dist/{oauth-clients-BMs_bmoz.mjs → oauth-clients-D1n0ykZJ.mjs} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +2 -2
- package/dist/{runtime-Cg87dCSm.d.mts → runtime-BM9sqnzO.d.mts} +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/{site-context-DuBQk6Mp.mjs → site-context-BBX9G7FT.mjs} +1 -1
- package/dist/version-Ds94WfbP.mjs +6 -0
- package/package.json +2 -2
- package/dist/version-D-jCq-i4.mjs +0 -6
- /package/dist/{allowed-origins-3RuuoFjC.mjs → allowed-origins-U7ZavuGp.mjs} +0 -0
- /package/dist/{challenge-store-cJam-E5R.mjs → challenge-store-ChIyDxM6.mjs} +0 -0
- /package/dist/{experimental-workflows-BbZbIEZp.mjs → experimental-workflows-_I9NlZbO.mjs} +0 -0
- /package/dist/{mode-Bd55iLcP.mjs → mode-BSPqFzOJ.mjs} +0 -0
- /package/dist/{secrets-DfeNNoLa.mjs → secrets-DOkSNlfQ.mjs} +0 -0
- /package/dist/{setup-complete-C2ztsNhJ.mjs → setup-complete-DXCcwkth.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -22,9 +22,9 @@ import { i as pluginManifestSchema } from "../manifest-schema-C6fzQoWn.mjs";
|
|
|
22
22
|
import "../ssrf-KAIQS48_.mjs";
|
|
23
23
|
import { t as validateSeed } from "../validate-JE-WfUQ5.mjs";
|
|
24
24
|
import { t as applySeed } from "../apply-TIoQ00aH.mjs";
|
|
25
|
-
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-
|
|
26
|
-
import { o as convertDataForRead } from "../transport-B7kO-4ee.mjs";
|
|
25
|
+
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-DOkSNlfQ.mjs";
|
|
27
26
|
import { createHeaderAwareFetch, customHeadersInterceptor, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
27
|
+
import { o as convertDataForRead } from "../transport-B7kO-4ee.mjs";
|
|
28
28
|
import { DinewayClient } from "../client/index.mjs";
|
|
29
29
|
import { LocalStorage } from "../storage/local.mjs";
|
|
30
30
|
import { imageSize } from "image-size";
|
|
@@ -35,50 +35,13 @@ import { basename, dirname, extname, isAbsolute, join, relative, resolve } from
|
|
|
35
35
|
import { defineCommand, runCommand, runMain } from "citty";
|
|
36
36
|
import consola, { consola as consola$1 } from "consola";
|
|
37
37
|
import pc from "picocolors";
|
|
38
|
-
import { access, chmod, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
39
38
|
import { homedir } from "node:os";
|
|
39
|
+
import { access, chmod, copyFile, mkdir, readFile, readdir, rm, stat, symlink, writeFile } from "node:fs/promises";
|
|
40
40
|
import { createInterface } from "node:readline/promises";
|
|
41
41
|
import { spawn } from "node:child_process";
|
|
42
42
|
import { pipeline } from "node:stream/promises";
|
|
43
43
|
import { packTar } from "modern-tar/fs";
|
|
44
44
|
|
|
45
|
-
//#region src/cli/commands/auth.ts
|
|
46
|
-
/**
|
|
47
|
-
* Auth CLI commands
|
|
48
|
-
*/
|
|
49
|
-
/**
|
|
50
|
-
* Generate a cryptographically secure auth secret
|
|
51
|
-
*/
|
|
52
|
-
function generateAuthSecret() {
|
|
53
|
-
const bytes = new Uint8Array(32);
|
|
54
|
-
crypto.getRandomValues(bytes);
|
|
55
|
-
return encodeBase64url(bytes);
|
|
56
|
-
}
|
|
57
|
-
const secretCommand = defineCommand({
|
|
58
|
-
meta: {
|
|
59
|
-
name: "secret",
|
|
60
|
-
description: "Generate a secure auth secret"
|
|
61
|
-
},
|
|
62
|
-
run() {
|
|
63
|
-
const secret = generateAuthSecret();
|
|
64
|
-
consola$1.log("");
|
|
65
|
-
consola$1.log(pc.bold("Generated auth secret:"));
|
|
66
|
-
consola$1.log("");
|
|
67
|
-
consola$1.log(` ${pc.cyan("DINEWAY_AUTH_SECRET")}=${pc.green(secret)}`);
|
|
68
|
-
consola$1.log("");
|
|
69
|
-
consola$1.log(pc.dim("Add this to your environment variables."));
|
|
70
|
-
consola$1.log("");
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
const authCommand = defineCommand({
|
|
74
|
-
meta: {
|
|
75
|
-
name: "auth",
|
|
76
|
-
description: "Authentication utilities"
|
|
77
|
-
},
|
|
78
|
-
subCommands: { secret: secretCommand }
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
//#endregion
|
|
82
45
|
//#region src/cli/credentials.ts
|
|
83
46
|
/**
|
|
84
47
|
* Credential storage for CLI auth tokens.
|
|
@@ -223,6 +186,79 @@ function removeMarketplaceCredential(registryUrl) {
|
|
|
223
186
|
return false;
|
|
224
187
|
}
|
|
225
188
|
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/cli/project-env.ts
|
|
191
|
+
const DEFAULT_DINEWAY_URL = "http://localhost:4321";
|
|
192
|
+
const ENV_KEY_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
193
|
+
const LINE_SPLIT_PATTERN = /\r?\n/;
|
|
194
|
+
const NEWLINE_PATTERN = /\r?\n/g;
|
|
195
|
+
function parseDotenvValue(value) {
|
|
196
|
+
const trimmed = value.trim();
|
|
197
|
+
if (trimmed.startsWith("\"") && trimmed.endsWith("\"") || trimmed.startsWith("'") && trimmed.endsWith("'")) return trimmed.slice(1, -1);
|
|
198
|
+
return trimmed;
|
|
199
|
+
}
|
|
200
|
+
function parseDotenv(text) {
|
|
201
|
+
const env = {};
|
|
202
|
+
for (const line of text.split(LINE_SPLIT_PATTERN)) {
|
|
203
|
+
const trimmed = line.trim();
|
|
204
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
205
|
+
const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
|
|
206
|
+
const equalsIndex = normalized.indexOf("=");
|
|
207
|
+
if (equalsIndex <= 0) continue;
|
|
208
|
+
const key = normalized.slice(0, equalsIndex).trim();
|
|
209
|
+
if (!ENV_KEY_PATTERN.test(key)) continue;
|
|
210
|
+
env[key] = parseDotenvValue(normalized.slice(equalsIndex + 1));
|
|
211
|
+
}
|
|
212
|
+
return env;
|
|
213
|
+
}
|
|
214
|
+
function readProjectEnv(cwd = process.cwd()) {
|
|
215
|
+
const envPath = join(cwd, ".env");
|
|
216
|
+
if (!existsSync(envPath)) return {};
|
|
217
|
+
return parseDotenv(readFileSync(envPath, "utf-8"));
|
|
218
|
+
}
|
|
219
|
+
function getProjectEnvValue(name, cwd = process.cwd()) {
|
|
220
|
+
return process.env[name] ?? readProjectEnv(cwd)[name];
|
|
221
|
+
}
|
|
222
|
+
function resolveDinewayBaseUrl(url, cwd = process.cwd()) {
|
|
223
|
+
if (url && url !== DEFAULT_DINEWAY_URL) return url;
|
|
224
|
+
const projectEnv = readProjectEnv(cwd);
|
|
225
|
+
return process.env["DINEWAY_URL"] ?? process.env["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_SITE_URL"] ?? projectEnv["DINEWAY_URL"] ?? url ?? DEFAULT_DINEWAY_URL;
|
|
226
|
+
}
|
|
227
|
+
function resolveDinewayToken(token, cwd = process.cwd()) {
|
|
228
|
+
return token ?? getProjectEnvValue("DINEWAY_TOKEN", cwd);
|
|
229
|
+
}
|
|
230
|
+
function formatEnvValue(value) {
|
|
231
|
+
return value.replace(NEWLINE_PATTERN, "");
|
|
232
|
+
}
|
|
233
|
+
async function upsertProjectEnv(cwd, values) {
|
|
234
|
+
const envPath = join(cwd, ".env");
|
|
235
|
+
const existing = await readFile(envPath, "utf-8").catch(() => "");
|
|
236
|
+
const lines = existing ? existing.split(LINE_SPLIT_PATTERN) : [];
|
|
237
|
+
const seen = /* @__PURE__ */ new Set();
|
|
238
|
+
const nextLines = lines.map((line) => {
|
|
239
|
+
const trimmed = line.trim();
|
|
240
|
+
const normalized = trimmed.startsWith("export ") ? trimmed.slice(7).trim() : trimmed;
|
|
241
|
+
const equalsIndex = normalized.indexOf("=");
|
|
242
|
+
if (equalsIndex <= 0) return line;
|
|
243
|
+
const key = normalized.slice(0, equalsIndex).trim();
|
|
244
|
+
const value = values[key];
|
|
245
|
+
if (!(key in values) || value === void 0) return line;
|
|
246
|
+
seen.add(key);
|
|
247
|
+
return `${key}=${formatEnvValue(value)}`;
|
|
248
|
+
});
|
|
249
|
+
for (const [key, value] of Object.entries(values)) {
|
|
250
|
+
if (value === void 0 || seen.has(key)) continue;
|
|
251
|
+
nextLines.push(`${key}=${formatEnvValue(value)}`);
|
|
252
|
+
}
|
|
253
|
+
await writeFile(envPath, `${nextLines.filter((line, index) => line || index < nextLines.length - 1).join("\n")}\n`, "utf-8");
|
|
254
|
+
}
|
|
255
|
+
async function ensureProjectGitignoreEntry(cwd, entry) {
|
|
256
|
+
const gitignorePath = join(cwd, ".gitignore");
|
|
257
|
+
const existing = await readFile(gitignorePath, "utf-8").catch(() => "");
|
|
258
|
+
if (existing.split(LINE_SPLIT_PATTERN).map((line) => line.trim()).includes(entry)) return;
|
|
259
|
+
await writeFile(gitignorePath, `${existing}${existing && !existing.endsWith("\n") ? "\n" : ""}${entry}\n`, "utf-8");
|
|
260
|
+
}
|
|
261
|
+
|
|
226
262
|
//#endregion
|
|
227
263
|
//#region src/cli/client-factory.ts
|
|
228
264
|
var client_factory_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -238,7 +274,7 @@ const connectionArgs = {
|
|
|
238
274
|
type: "string",
|
|
239
275
|
alias: "u",
|
|
240
276
|
description: "Dineway instance URL",
|
|
241
|
-
default:
|
|
277
|
+
default: DEFAULT_DINEWAY_URL
|
|
242
278
|
},
|
|
243
279
|
token: {
|
|
244
280
|
type: "string",
|
|
@@ -270,8 +306,8 @@ const connectionArgs = {
|
|
|
270
306
|
* 3. --header CLI flags
|
|
271
307
|
*/
|
|
272
308
|
function createClientFromArgs(args) {
|
|
273
|
-
const baseUrl = args.url
|
|
274
|
-
let token = args.token
|
|
309
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
310
|
+
let token = resolveDinewayToken(args.token);
|
|
275
311
|
const isLocal = baseUrl.includes("localhost") || baseUrl.includes("127.0.0.1");
|
|
276
312
|
const cred = !token ? getCredentials(baseUrl) : null;
|
|
277
313
|
const customHeaders = {
|
|
@@ -367,6 +403,69 @@ function prettyPrint(data, indent = 0) {
|
|
|
367
403
|
consola$1.log(typeof data === "string" ? data : JSON.stringify(data));
|
|
368
404
|
}
|
|
369
405
|
|
|
406
|
+
//#endregion
|
|
407
|
+
//#region src/cli/commands/auth.ts
|
|
408
|
+
/**
|
|
409
|
+
* Auth CLI commands
|
|
410
|
+
*/
|
|
411
|
+
/**
|
|
412
|
+
* Generate a cryptographically secure auth secret
|
|
413
|
+
*/
|
|
414
|
+
function generateAuthSecret() {
|
|
415
|
+
const bytes = new Uint8Array(32);
|
|
416
|
+
crypto.getRandomValues(bytes);
|
|
417
|
+
return encodeBase64url(bytes);
|
|
418
|
+
}
|
|
419
|
+
const secretCommand = defineCommand({
|
|
420
|
+
meta: {
|
|
421
|
+
name: "secret",
|
|
422
|
+
description: "Generate a secure auth secret"
|
|
423
|
+
},
|
|
424
|
+
run() {
|
|
425
|
+
const secret = generateAuthSecret();
|
|
426
|
+
consola$1.log("");
|
|
427
|
+
consola$1.log(pc.bold("Generated auth secret:"));
|
|
428
|
+
consola$1.log("");
|
|
429
|
+
consola$1.log(` ${pc.cyan("DINEWAY_AUTH_SECRET")}=${pc.green(secret)}`);
|
|
430
|
+
consola$1.log("");
|
|
431
|
+
consola$1.log(pc.dim("Add this to your environment variables."));
|
|
432
|
+
consola$1.log("");
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
const setupLinkCommand = defineCommand({
|
|
436
|
+
meta: {
|
|
437
|
+
name: "setup-link",
|
|
438
|
+
description: "Create a one-time admin setup link"
|
|
439
|
+
},
|
|
440
|
+
args: connectionArgs,
|
|
441
|
+
async run({ args }) {
|
|
442
|
+
configureOutputMode(args);
|
|
443
|
+
try {
|
|
444
|
+
const result = await createClientFromArgs(args).createSetupLink();
|
|
445
|
+
if (args.json || !process.stdout.isTTY) {
|
|
446
|
+
output(result, args);
|
|
447
|
+
return;
|
|
448
|
+
}
|
|
449
|
+
consola$1.success("Created one-time setup link");
|
|
450
|
+
consola$1.info(`Expires: ${result.expiresAt}`);
|
|
451
|
+
consola$1.log(result.setupUrl);
|
|
452
|
+
} catch (error) {
|
|
453
|
+
consola$1.error(error instanceof Error ? error.message : "Failed to create setup link");
|
|
454
|
+
process.exit(2);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
const authCommand = defineCommand({
|
|
459
|
+
meta: {
|
|
460
|
+
name: "auth",
|
|
461
|
+
description: "Authentication utilities"
|
|
462
|
+
},
|
|
463
|
+
subCommands: {
|
|
464
|
+
secret: secretCommand,
|
|
465
|
+
"setup-link": setupLinkCommand
|
|
466
|
+
}
|
|
467
|
+
});
|
|
468
|
+
|
|
370
469
|
//#endregion
|
|
371
470
|
//#region src/cli/commands/content.ts
|
|
372
471
|
/**
|
|
@@ -1745,8 +1844,8 @@ function getSavedForgewayMetadata(pkg) {
|
|
|
1745
1844
|
async function resolveForgewayAccountEmail(options, grant, cwd, deps) {
|
|
1746
1845
|
const stored = await (deps.readCredentials ?? readForgewayCredentials)(cwd);
|
|
1747
1846
|
const storedEmail = stored?.source === "shadow-email-upgrade" && stored.placeId === grant.placeId && stored.user?.emailVerified === true && !isShadowEmail(stored.user?.email) ? stored.user?.email : void 0;
|
|
1748
|
-
const email = normalizeEmail(options.email ?? getEnv("FORGEWAY_EMAIL") ?? storedEmail ?? await promptRequired("
|
|
1749
|
-
if (!email || isShadowEmail(email)) throw new Error("
|
|
1847
|
+
const email = normalizeEmail(options.email ?? getEnv("DINEWAY_EMAIL") ?? getEnv("FORGEWAY_EMAIL") ?? storedEmail ?? await promptRequired("Dineway account email: ", void 0, deps, "Dineway account email is required. Pass --email or set DINEWAY_EMAIL."));
|
|
1848
|
+
if (!email || isShadowEmail(email)) throw new Error("Dineway account email must be a real owner email, not a shadow user email.");
|
|
1750
1849
|
return email;
|
|
1751
1850
|
}
|
|
1752
1851
|
function isStoredFormalCredentialForGrant(stored, grant, email) {
|
|
@@ -2306,15 +2405,21 @@ async function deploySiteProject(options) {
|
|
|
2306
2405
|
dinewayAdminBootstrap: createResult.dinewayAdminBootstrap
|
|
2307
2406
|
};
|
|
2308
2407
|
}
|
|
2309
|
-
function
|
|
2408
|
+
async function persistForgewayCliEnv(cwd, params) {
|
|
2409
|
+
await upsertProjectEnv(cwd, {
|
|
2410
|
+
DINEWAY_SITE_URL: params.siteUrl,
|
|
2411
|
+
DINEWAY_TOKEN: params.token
|
|
2412
|
+
});
|
|
2413
|
+
await ensureProjectGitignoreEntry(cwd, ".env");
|
|
2414
|
+
}
|
|
2415
|
+
function formatDinewayAdminBootstrapMessage(bootstrap) {
|
|
2310
2416
|
if (!bootstrap) return "";
|
|
2311
2417
|
if (bootstrap.status === "already_issued") return `Dineway admin bootstrap: ${bootstrap.message}`;
|
|
2312
2418
|
return [
|
|
2313
|
-
"Dineway admin
|
|
2314
|
-
`
|
|
2419
|
+
"Dineway admin access is ready. Local CLI defaults were saved to .env.",
|
|
2420
|
+
`Dineway admin email: ${bootstrap.adminEmail}`,
|
|
2315
2421
|
`Setup link (expires ${bootstrap.setupTokenExpiresAt}): ${bootstrap.setupUrl}`,
|
|
2316
|
-
|
|
2317
|
-
`CLI example: DINEWAY_TOKEN=${bootstrap.apiToken} dineway whoami --url ${siteUrl}`
|
|
2422
|
+
"CLI example: npx dineway whoami"
|
|
2318
2423
|
].join("\n");
|
|
2319
2424
|
}
|
|
2320
2425
|
async function deployForgeway(cwd, options, deps = {}) {
|
|
@@ -2353,7 +2458,11 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
2353
2458
|
deps
|
|
2354
2459
|
});
|
|
2355
2460
|
const url = deployment.liveUrl ?? `https://${site.domain}`;
|
|
2356
|
-
|
|
2461
|
+
await (deps.writeProjectEnv ?? persistForgewayCliEnv)(cwd, {
|
|
2462
|
+
siteUrl: url,
|
|
2463
|
+
token: deployment.dinewayAdminBootstrap?.status === "issued" ? deployment.dinewayAdminBootstrap.apiToken : void 0
|
|
2464
|
+
});
|
|
2465
|
+
const bootstrapMessage = formatDinewayAdminBootstrapMessage(deployment.dinewayAdminBootstrap);
|
|
2357
2466
|
const statusMessage = deployment.isReady ? `Deploy complete: ${url}` : `Deploy started for ${site.domain}. Check Forgeway for build status.`;
|
|
2358
2467
|
return {
|
|
2359
2468
|
url,
|
|
@@ -2891,7 +3000,7 @@ const deployCommand = defineCommand({
|
|
|
2891
3000
|
},
|
|
2892
3001
|
email: {
|
|
2893
3002
|
type: "string",
|
|
2894
|
-
description: "
|
|
3003
|
+
description: "Dineway account email for deploy authorization",
|
|
2895
3004
|
required: false
|
|
2896
3005
|
},
|
|
2897
3006
|
"restaurant-name": {
|
|
@@ -3901,7 +4010,7 @@ const loginCommand = defineCommand({
|
|
|
3901
4010
|
type: "string",
|
|
3902
4011
|
alias: "u",
|
|
3903
4012
|
description: "Dineway instance URL",
|
|
3904
|
-
default:
|
|
4013
|
+
default: DEFAULT_DINEWAY_URL
|
|
3905
4014
|
},
|
|
3906
4015
|
header: {
|
|
3907
4016
|
type: "string",
|
|
@@ -3910,7 +4019,7 @@ const loginCommand = defineCommand({
|
|
|
3910
4019
|
}
|
|
3911
4020
|
},
|
|
3912
4021
|
async run({ args }) {
|
|
3913
|
-
const baseUrl = args.url
|
|
4022
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
3914
4023
|
consola$1.start(`Connecting to ${baseUrl}...`);
|
|
3915
4024
|
const customHeaders = resolveCustomHeaders();
|
|
3916
4025
|
let headerFetch = createHeaderAwareFetch(customHeaders);
|
|
@@ -4022,10 +4131,10 @@ const logoutCommand = defineCommand({
|
|
|
4022
4131
|
type: "string",
|
|
4023
4132
|
alias: "u",
|
|
4024
4133
|
description: "Dineway instance URL",
|
|
4025
|
-
default:
|
|
4134
|
+
default: DEFAULT_DINEWAY_URL
|
|
4026
4135
|
} },
|
|
4027
4136
|
async run({ args }) {
|
|
4028
|
-
const baseUrl = args.url
|
|
4137
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
4029
4138
|
const cred = getCredentials(baseUrl);
|
|
4030
4139
|
if (!cred) {
|
|
4031
4140
|
consola$1.info("No stored credentials found for this instance.");
|
|
@@ -4053,7 +4162,7 @@ const whoamiCommand = defineCommand({
|
|
|
4053
4162
|
type: "string",
|
|
4054
4163
|
alias: "u",
|
|
4055
4164
|
description: "Dineway instance URL",
|
|
4056
|
-
default:
|
|
4165
|
+
default: DEFAULT_DINEWAY_URL
|
|
4057
4166
|
},
|
|
4058
4167
|
token: {
|
|
4059
4168
|
type: "string",
|
|
@@ -4067,8 +4176,8 @@ const whoamiCommand = defineCommand({
|
|
|
4067
4176
|
},
|
|
4068
4177
|
async run({ args }) {
|
|
4069
4178
|
configureOutputMode(args);
|
|
4070
|
-
const baseUrl = args.url
|
|
4071
|
-
let token = args.token
|
|
4179
|
+
const baseUrl = resolveDinewayBaseUrl(args.url);
|
|
4180
|
+
let token = resolveDinewayToken(args.token);
|
|
4072
4181
|
let authMethod = token ? "token" : "none";
|
|
4073
4182
|
let storedHeaders = {};
|
|
4074
4183
|
if (!token) {
|
package/dist/client/index.d.mts
CHANGED
|
@@ -182,6 +182,10 @@ interface MenuItem {
|
|
|
182
182
|
parentId?: string | null;
|
|
183
183
|
sortOrder: number;
|
|
184
184
|
}
|
|
185
|
+
interface SetupLinkResult {
|
|
186
|
+
setupUrl: string;
|
|
187
|
+
expiresAt: string;
|
|
188
|
+
}
|
|
185
189
|
/** Full schema export (returned by /api/schema) */
|
|
186
190
|
interface SchemaExport {
|
|
187
191
|
collections: Array<{
|
|
@@ -392,6 +396,8 @@ declare class DinewayClient {
|
|
|
392
396
|
menus(): Promise<Menu[]>;
|
|
393
397
|
/** Get a menu with its items */
|
|
394
398
|
menu(name: string): Promise<MenuWithItems>;
|
|
399
|
+
/** Create a one-time browser setup link for the current admin user. */
|
|
400
|
+
createSetupLink(): Promise<SetupLinkResult>;
|
|
395
401
|
/** Make a typed JSON request to the API */
|
|
396
402
|
private request;
|
|
397
403
|
/** Make a raw request — caller handles response */
|
|
@@ -402,4 +408,4 @@ declare class DinewayClient {
|
|
|
402
408
|
private getFieldSchemas;
|
|
403
409
|
}
|
|
404
410
|
//#endregion
|
|
405
|
-
export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, type PortableTextBlock, PublishContentOptions, SchemaExport, SearchResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
|
|
411
|
+
export { ApiError, ClientResponse, Collection, CollectionWithFields, ContentItem, DinewayApiError, DinewayClient, DinewayClientError, DinewayClientOptions, Field, type Interceptor, ListResult, Manifest, MediaItem, Menu, MenuItem, MenuWithItems, type PortableTextBlock, PublishContentOptions, SchemaExport, SearchResult, SetupLinkResult, Taxonomy, Term, createTransport, csrfInterceptor, devBypassInterceptor, markdownToPortableText, portableTextToMarkdown, tokenInterceptor };
|
package/dist/client/index.mjs
CHANGED
|
@@ -285,6 +285,10 @@ var DinewayClient = class {
|
|
|
285
285
|
async menu(name) {
|
|
286
286
|
return this.request("GET", `/menus/${encodeURIComponent(name)}`);
|
|
287
287
|
}
|
|
288
|
+
/** Create a one-time browser setup link for the current admin user. */
|
|
289
|
+
async createSetupLink() {
|
|
290
|
+
return this.request("POST", "/auth/setup-token");
|
|
291
|
+
}
|
|
288
292
|
/** Make a typed JSON request to the API */
|
|
289
293
|
async request(method, path, body) {
|
|
290
294
|
const response = await this.requestRaw(method, path, body);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-Jsxs587i.mjs";
|
|
2
|
-
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-
|
|
2
|
+
import { b as toPublicContextEntry, x as toPublicContextEntryPage, y as toPublicContextDiff } from "./site-context-BBX9G7FT.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/context.ts
|
|
5
5
|
async function handleContextEntryList(db, input = {}) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as withTransaction } from "./transaction-D0FOsb3X.mjs";
|
|
2
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
2
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-L0o9Bd7v.mjs";
|
|
4
|
-
import { o as lookupOAuthClient } from "./oauth-clients-
|
|
4
|
+
import { o as lookupOAuthClient } from "./oauth-clients-D1n0ykZJ.mjs";
|
|
5
5
|
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-DdcI8ZVL.mjs";
|
|
6
6
|
import { clampScopes } from "@dineway-ai/auth";
|
|
7
7
|
import { generateCodeVerifier } from "arctic";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-
|
|
2
|
-
import { n as HitlRequestService } from "./site-context-
|
|
1
|
+
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
2
|
+
import { n as HitlRequestService } from "./site-context-BBX9G7FT.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/handlers/hitl-requests.ts
|
|
5
5
|
const HITL_NOT_FOUND_RE = /not found/i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as apiError } from "./error-DLkgOP5m.mjs";
|
|
2
|
-
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-
|
|
3
|
-
import { t as WorkflowHitlCoordinator } from "./site-context-
|
|
2
|
+
import { t as ExperimentalSiteContextWorkflowDisabledError } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
3
|
+
import { t as WorkflowHitlCoordinator } from "./site-context-BBX9G7FT.mjs";
|
|
4
4
|
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-CpcTzKpF.mjs";
|
|
5
5
|
import { Role } from "@dineway-ai/auth";
|
|
6
6
|
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ContentSeoInput, c as FindManyOptions, i as ContentSeo, l as FindManyResult, n as ContentBylineCredit, o as CreateContentInput, r as ContentItem, s as DinewayValidationError, t as BylineSummary, u as UpdateContentInput } from "./types-DvwHUku7.mjs";
|
|
2
|
-
import { $ as createPluginManager, $t as SandboxOptions, A as dropSessionDatabaseTables, An as handleContentDelete, At as verifyPreviewSignature, B as GeneratePreviewTokenOptions, Bn as handleContentSchedule, Bt as prosemirrorToPortableText, C as getByline, Cn as handleRevisionList, Ct as SessionOpenOrCreateOptions, D as AppliedSnapshotMeta, Dn as handleContentCountScheduled, Dt as defaultPreviewSidecarClient, E as renderPreviewToolbar, En as handleContentCompare, Et as buildPreviewSignatureHeader, F as getPreviewToken, Fn as handleContentList, Ft as AfterCallback, G as parseContentId, Gn as CreateMediaInput, Gt as PortableTextSpan, H as VerifyPreviewTokenOptions, Hn as handleContentUnpublish, Ht as PortableTextImageBlock, I as isPreviewRequest, In as handleContentListTrashed, It as after, J as createNodeSandboxRunner, Jn as ContentRepository, Jt as ProseMirrorDocument, K as verifyPreviewToken, Kn as MediaItem, Kt as PortableTextTextBlock, L as GetPreviewUrlOptions, Ln as handleContentPermanentDelete, Lt as computeContentHash, M as Snapshot, Mn as handleContentDuplicate, Mt as getFallbackChain, N as renderPreviewLoadingPage, Nn as handleContentGet, Nt as getI18nConfig, O as ApplySnapshotToDatabaseOptions, On as handleContentCountTrashed, Ot as parsePreviewSignatureHeader, P as isBlockedInPreview, Pn as handleContentGetIncludingTrashed, Pt as isI18nEnabled, Q as PluginManager, Qt as SandboxEmailSendCallback, R as buildPreviewUrl, Rn as handleContentPublish, Rt as hashString, S as Suggestion, Sn as handleRevisionGet, St as SessionOpenOptions, T as PreviewToolbarConfig, Tn as generateManifest, Tt as PreviewSidecarSignature, U as VerifyPreviewTokenResult, Un as handleContentUnschedule, Ut as PortableTextLinkMark, V as PreviewTokenPayload, Vn as handleContentTranslations, Vt as PortableTextCodeBlock, W as generatePreviewToken, Wn as handleContentUpdate, Wt as PortableTextMarkDef, X as SandboxNotAvailableError, Xn as DinewayDatabaseError, Xt as ProseMirrorNode, Y as NoopSandboxRunner, Yn as DatabaseConfig, Yt as ProseMirrorMark, Z as createNoopSandboxRunner, Zt as SandboxEmailMessage, _ as SearchOptions, _n as handleMediaGet, _t as SessionCleanupResult, an as getSections, ar as ApiContext, at as ValidatedPluginManifest, b as SearchStats, bn as RevisionListResponse, bt as SessionDatabaseInfo, c as extractSearchableFields, cn as Section, cr as FieldDescriptor, ct as CollectionFilter$1, d as search, dn as SchemaError, en as SandboxRunner, et as PluginRouteError, f as searchCollection, fn as SchemaRegistry, g as SearchConfig, gn as handleMediaDelete, gt as FileSessionDatabaseFactoryOptions, h as CollectionSearchOptions, hn as handleMediaCreate, ht as FileSessionDatabaseFactory, in as getSection, it as createHookPipeline, j as getAppliedSnapshotMeta, jn as handleContentDiscardDraft, jt as I18nConfig, k as applySnapshotToDatabase, kn as handleContentCreate, kt as signPreviewUrl, l as getSearchStats, ln as SectionSource, lr as ListResponse, lt as EntryData, m as FTSManager, mn as MediaResponse, mt as createFilePreviewMiddleware, n as PluginDescriptor, nn as SandboxedPlugin, nt as HookPipeline, on as CreateSectionInput, or as ContentListResponse, ot as pluginManifestSchema, p as searchWithDb, pn as MediaListResponse, pt as FilePreviewMiddlewareConfig, q as NodeSandboxRunner, qn as MediaRepository, qt as PortableTextUnknownBlock, rn as SerializedRequest, rt as HookResult, s as extractPlainText, sn as GetSectionsOptions, sr as ContentResponse, st as definePlugin, tn as SandboxRunnerFactory, u as getSuggestions, un as UpdateSectionInput, ur as ManifestResponse, ut as EntryFilter, v as SearchResponse, vn as handleMediaList, vt as SessionDatabaseFactory, w as getBylineBySlug, wn as handleRevisionRestore, wt as PreviewSidecarClient, x as SuggestOptions, xn as RevisionResponse, xt as SessionDatabaseLimitError, y as SearchResult, yn as handleMediaUpdate, yt as SessionDatabaseHandle, z as getPreviewUrl, zn as handleContentRestore, zt as portableTextToProsemirror } from "./runtime-
|
|
2
|
+
import { $ as createPluginManager, $t as SandboxOptions, A as dropSessionDatabaseTables, An as handleContentDelete, At as verifyPreviewSignature, B as GeneratePreviewTokenOptions, Bn as handleContentSchedule, Bt as prosemirrorToPortableText, C as getByline, Cn as handleRevisionList, Ct as SessionOpenOrCreateOptions, D as AppliedSnapshotMeta, Dn as handleContentCountScheduled, Dt as defaultPreviewSidecarClient, E as renderPreviewToolbar, En as handleContentCompare, Et as buildPreviewSignatureHeader, F as getPreviewToken, Fn as handleContentList, Ft as AfterCallback, G as parseContentId, Gn as CreateMediaInput, Gt as PortableTextSpan, H as VerifyPreviewTokenOptions, Hn as handleContentUnpublish, Ht as PortableTextImageBlock, I as isPreviewRequest, In as handleContentListTrashed, It as after, J as createNodeSandboxRunner, Jn as ContentRepository, Jt as ProseMirrorDocument, K as verifyPreviewToken, Kn as MediaItem, Kt as PortableTextTextBlock, L as GetPreviewUrlOptions, Ln as handleContentPermanentDelete, Lt as computeContentHash, M as Snapshot, Mn as handleContentDuplicate, Mt as getFallbackChain, N as renderPreviewLoadingPage, Nn as handleContentGet, Nt as getI18nConfig, O as ApplySnapshotToDatabaseOptions, On as handleContentCountTrashed, Ot as parsePreviewSignatureHeader, P as isBlockedInPreview, Pn as handleContentGetIncludingTrashed, Pt as isI18nEnabled, Q as PluginManager, Qt as SandboxEmailSendCallback, R as buildPreviewUrl, Rn as handleContentPublish, Rt as hashString, S as Suggestion, Sn as handleRevisionGet, St as SessionOpenOptions, T as PreviewToolbarConfig, Tn as generateManifest, Tt as PreviewSidecarSignature, U as VerifyPreviewTokenResult, Un as handleContentUnschedule, Ut as PortableTextLinkMark, V as PreviewTokenPayload, Vn as handleContentTranslations, Vt as PortableTextCodeBlock, W as generatePreviewToken, Wn as handleContentUpdate, Wt as PortableTextMarkDef, X as SandboxNotAvailableError, Xn as DinewayDatabaseError, Xt as ProseMirrorNode, Y as NoopSandboxRunner, Yn as DatabaseConfig, Yt as ProseMirrorMark, Z as createNoopSandboxRunner, Zt as SandboxEmailMessage, _ as SearchOptions, _n as handleMediaGet, _t as SessionCleanupResult, an as getSections, ar as ApiContext, at as ValidatedPluginManifest, b as SearchStats, bn as RevisionListResponse, bt as SessionDatabaseInfo, c as extractSearchableFields, cn as Section, cr as FieldDescriptor, ct as CollectionFilter$1, d as search, dn as SchemaError, en as SandboxRunner, et as PluginRouteError, f as searchCollection, fn as SchemaRegistry, g as SearchConfig, gn as handleMediaDelete, gt as FileSessionDatabaseFactoryOptions, h as CollectionSearchOptions, hn as handleMediaCreate, ht as FileSessionDatabaseFactory, in as getSection, it as createHookPipeline, j as getAppliedSnapshotMeta, jn as handleContentDiscardDraft, jt as I18nConfig, k as applySnapshotToDatabase, kn as handleContentCreate, kt as signPreviewUrl, l as getSearchStats, ln as SectionSource, lr as ListResponse, lt as EntryData, m as FTSManager, mn as MediaResponse, mt as createFilePreviewMiddleware, n as PluginDescriptor, nn as SandboxedPlugin, nt as HookPipeline, on as CreateSectionInput, or as ContentListResponse, ot as pluginManifestSchema, p as searchWithDb, pn as MediaListResponse, pt as FilePreviewMiddlewareConfig, q as NodeSandboxRunner, qn as MediaRepository, qt as PortableTextUnknownBlock, rn as SerializedRequest, rt as HookResult, s as extractPlainText, sn as GetSectionsOptions, sr as ContentResponse, st as definePlugin, tn as SandboxRunnerFactory, u as getSuggestions, un as UpdateSectionInput, ur as ManifestResponse, ut as EntryFilter, v as SearchResponse, vn as handleMediaList, vt as SessionDatabaseFactory, w as getBylineBySlug, wn as handleRevisionRestore, wt as PreviewSidecarClient, x as SuggestOptions, xn as RevisionResponse, xt as SessionDatabaseLimitError, y as SearchResult, yn as handleMediaUpdate, yt as SessionDatabaseHandle, z as getPreviewUrl, zn as handleContentRestore, zt as portableTextToProsemirror } from "./runtime-BM9sqnzO.mjs";
|
|
3
3
|
import { n as MediaTable, r as UserTable, t as Database } from "./types-B1NksXAb.mjs";
|
|
4
4
|
import { $ as StandardHookEntry, A as PageMetadataContribution, B as PluginDefinition, C as MediaAccess, D as PageFragmentContribution, E as ModerationDecision, F as PluginAdminConfig, G as PortableTextBlockConfig, H as PluginManifest, I as PluginAdminExports, K as PortableTextBlockField, L as PluginAdminPage, M as PageMetadataHandler, O as PageFragmentEvent, P as PagePlacement, Q as RouteContext, R as PluginCapability, S as LogAccess, T as MediaUploadEvent, U as PluginRoute, V as PluginHooks, W as PluginStorageConfig, X as ResolvedPlugin, Y as ResolvedHook, Z as ResolvedPluginHooks, _ as FieldWidgetConfig, a as CommentAfterModerateEvent, b as HttpAccess, c as CommentBeforeCreateHandler, d as ContentAccess, et as StandardHookHandler, f as ContentDeleteEvent, i as CommentAfterCreateHandler, it as StorageCollection, j as PageMetadataEvent, k as PageFragmentHandler, l as CommentModerateEvent, m as ContentPublishStateChangeEvent, n as CollectionCommentSettings, nt as StandardRouteEntry, o as CommentAfterModerateHandler, ot as StoredComment, p as ContentHookEvent, q as PublicPageContext, r as CommentAfterCreateEvent, rt as StandardRouteHandler, s as CommentBeforeCreateEvent, st as isStandardPluginDefinition, t as BreadcrumbItem, tt as StandardPluginDefinition, u as CommentModerateHandler, v as HookConfig, x as KVAccess, y as HookName, z as PluginContext } from "./types-BIM7jwxr.mjs";
|
|
5
5
|
import { _ as RESERVED_COLLECTION_SLUGS, a as Collection, b as UpdateFieldInput, c as CollectionWithFields, d as CreateFieldInput, f as FIELD_TYPE_TO_COLUMN, g as FieldWidgetOptions, h as FieldValidation, i as SiteSettings, l as ColumnType, m as FieldType, n as SeoSettings, o as CollectionSource, p as Field, r as SiteSettingKey, s as CollectionSupport, t as MediaReference, u as CreateCollectionInput, v as RESERVED_FIELD_SLUGS, y as UpdateCollectionInput } from "./types-t7_nCCA9.mjs";
|
|
@@ -11,7 +11,7 @@ import { $ as TranslationSummary, A as MenuItem, B as getPluginSettings, C as Ta
|
|
|
11
11
|
import { _ as WxrSite, a as getAllSources, b as parseWxrString, c as getUrlSources, d as importReusableBlocksAsSections, f as WxrAttachment, g as WxrPost, h as WxrData, i as clearSources, l as probeUrl, m as WxrCategory, n as parseWxrDate, o as getFileSources, p as WxrAuthor, r as wxrSource, s as getSource, t as wordpressRestSource, u as registerSource, v as WxrTag, x as decodeSlug, y as parseWxr } from "./index-CpbixmRL.mjs";
|
|
12
12
|
import { n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder-BZpCpid_.mjs";
|
|
13
13
|
import { a as ListOptions, c as S3StorageConfig, d as Storage, f as StorageDescriptor, i as FileInfo, l as SignedUploadOptions, n as DinewayStorageError, o as ListResult, p as UploadResult, r as DownloadResult, s as LocalStorageConfig, t as CreateStorageFn, u as SignedUploadUrl } from "./types-BYjPylrZ.mjs";
|
|
14
|
-
import "./bylines-
|
|
14
|
+
import "./bylines-CqLv_DIj.mjs";
|
|
15
15
|
import { DinewayRequestContext, getRequestContext, runWithContext } from "./request-context.mjs";
|
|
16
16
|
import { adaptSandboxEntry } from "./plugins/adapt-sandbox-entry.mjs";
|
|
17
17
|
import { S as UrlInput, _ as SourceAuth, a as FileInput, b as SourceProbeResult, c as ImportContext, d as ImportSource, f as NormalizedItem, g as ProbeResult, h as PostTypeMapping, i as FieldCompatibility, l as ImportFieldDef, m as PostTypeAnalysis, n as CollectionSchemaStatus, o as ImportAnalysis, p as OAuthInput, r as FetchOptions, s as ImportConfig, t as AttachmentInfo, u as ImportResult, v as SourceCapabilities, x as SuggestedAction, y as SourceInput } from "./types-BBETcziA.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import "./byline-DpNNSjET.mjs";
|
|
|
24
24
|
import { t as normalizeMediaValue } from "./normalize-BY_EJnd9.mjs";
|
|
25
25
|
import { t as generatePlaceholder } from "./placeholder-b0Ufu0La.mjs";
|
|
26
26
|
import "./seo-BPb_reaG.mjs";
|
|
27
|
-
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-
|
|
27
|
+
import { A as handleRevisionGet, B as handleContentDuplicate, D as handleMediaGet, E as handleMediaDelete, F as handleContentCountScheduled, G as handleContentPermanentDelete, H as handleContentGetIncludingTrashed, I as handleContentCountTrashed, J as handleContentSchedule, K as handleContentPublish, L as handleContentCreate, M as handleRevisionRestore, N as generateManifest, O as handleMediaList, P as handleContentCompare, Q as handleContentUpdate, R as handleContentDelete, T as handleMediaCreate, U as handleContentList, V as handleContentGet, W as handleContentListTrashed, X as handleContentUnpublish, Y as handleContentTranslations, Z as handleContentUnschedule, j as handleRevisionList, k as handleMediaUpdate, q as handleContentRestore, z as handleContentDiscardDraft } from "./api-THnYu0ZU.mjs";
|
|
28
28
|
import "./request-cache-BpwuE2ix.mjs";
|
|
29
29
|
import "./dashboard-BC9bgPOH.mjs";
|
|
30
30
|
import "./briefing-Jsxs587i.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../runtime-
|
|
1
|
+
import "../runtime-BM9sqnzO.mjs";
|
|
2
2
|
import { t as Database } from "../types-B1NksXAb.mjs";
|
|
3
3
|
import "../types-BIM7jwxr.mjs";
|
|
4
4
|
import "../types-BgE6gMFI.mjs";
|
|
@@ -7,7 +7,7 @@ import "../runner-pAnQS6iI.mjs";
|
|
|
7
7
|
import "../index-2tBfB_8X.mjs";
|
|
8
8
|
import "../index-CpbixmRL.mjs";
|
|
9
9
|
import { d as Storage } from "../types-BYjPylrZ.mjs";
|
|
10
|
-
import "../bylines-
|
|
10
|
+
import "../bylines-CqLv_DIj.mjs";
|
|
11
11
|
import "../types-BBETcziA.mjs";
|
|
12
12
|
import "../validate-BzUCAU2a.mjs";
|
|
13
13
|
import "../index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as withTransaction } from "./transaction-D0FOsb3X.mjs";
|
|
2
|
-
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
2
|
+
import { a as filterExperimentalSiteContextWorkflowScopes, i as experimentalSiteContextWorkflowsEnabled, o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-L0o9Bd7v.mjs";
|
|
4
|
-
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-
|
|
4
|
+
import { c as validateRedirectUri, o as lookupOAuthClient, s as validateClientRedirectUri } from "./oauth-clients-D1n0ykZJ.mjs";
|
|
5
5
|
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-DdcI8ZVL.mjs";
|
|
6
6
|
import { clampScopes, computeS256Challenge, secureCompare } from "@dineway-ai/auth";
|
|
7
7
|
import { generateCodeVerifier } from "arctic";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-
|
|
1
|
+
import { o as getExperimentalSiteContextWorkflowScopesDisabledMessage, r as disabledExperimentalSiteContextWorkflowScopes } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
2
2
|
import { s as validateScopes } from "./api-tokens-L0o9Bd7v.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/api/oauth/redirect-uri.ts
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { n as PluginDescriptor } from "../runtime-
|
|
1
|
+
import { n as PluginDescriptor } from "../runtime-BM9sqnzO.mjs";
|
|
2
2
|
import "../types-B1NksXAb.mjs";
|
|
3
3
|
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-BIM7jwxr.mjs";
|
|
4
4
|
import "../types-BgE6gMFI.mjs";
|
|
5
5
|
import "../runner-pAnQS6iI.mjs";
|
|
6
6
|
import "../index-2tBfB_8X.mjs";
|
|
7
7
|
import "../index-CpbixmRL.mjs";
|
|
8
|
-
import "../bylines-
|
|
8
|
+
import "../bylines-CqLv_DIj.mjs";
|
|
9
9
|
import "../types-BBETcziA.mjs";
|
|
10
10
|
import "../validate-BzUCAU2a.mjs";
|
|
11
11
|
|
|
@@ -1787,6 +1787,7 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1787
1787
|
number: "number";
|
|
1788
1788
|
boolean: "boolean";
|
|
1789
1789
|
file: "file";
|
|
1790
|
+
image: "image";
|
|
1790
1791
|
slug: "slug";
|
|
1791
1792
|
datetime: "datetime";
|
|
1792
1793
|
text: "text";
|
|
@@ -1794,7 +1795,6 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1794
1795
|
select: "select";
|
|
1795
1796
|
multiSelect: "multiSelect";
|
|
1796
1797
|
portableText: "portableText";
|
|
1797
|
-
image: "image";
|
|
1798
1798
|
reference: "reference";
|
|
1799
1799
|
json: "json";
|
|
1800
1800
|
repeater: "repeater";
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { ct as CollectionFilter, dt as dinewayLoader, ft as getDb, lt as EntryData, ut as EntryFilter } from "./runtime-
|
|
1
|
+
import { ct as CollectionFilter, dt as dinewayLoader, ft as getDb, lt as EntryData, ut as EntryFilter } from "./runtime-BM9sqnzO.mjs";
|
|
2
2
|
import "./types-B1NksXAb.mjs";
|
|
3
3
|
import "./types-BIM7jwxr.mjs";
|
|
4
4
|
import "./types-BgE6gMFI.mjs";
|
|
5
5
|
import "./runner-pAnQS6iI.mjs";
|
|
6
6
|
import "./index-2tBfB_8X.mjs";
|
|
7
7
|
import "./index-CpbixmRL.mjs";
|
|
8
|
-
import "./bylines-
|
|
8
|
+
import "./bylines-CqLv_DIj.mjs";
|
|
9
9
|
import "./types-BBETcziA.mjs";
|
|
10
10
|
import "./validate-BzUCAU2a.mjs";
|
|
11
11
|
import { t as getMediaProvider } from "./provider-loader-BaZhx7E3.mjs";
|
|
@@ -12,7 +12,7 @@ import { a as getSiteSettingsWithDb } from "./settings-DORe02PC.mjs";
|
|
|
12
12
|
import { p as normalizeUrl } from "./utils-FEbQMgB5.mjs";
|
|
13
13
|
import { t as sanitizeWordPressImportSlug } from "./wordpress-slugs-hqItqJrQ.mjs";
|
|
14
14
|
import { s as searchCollection } from "./search-Cl9preJT.mjs";
|
|
15
|
-
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-
|
|
15
|
+
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-_I9NlZbO.mjs";
|
|
16
16
|
import { sql } from "kysely";
|
|
17
17
|
import { ulid } from "ulidx";
|
|
18
18
|
import { Role } from "@dineway-ai/auth";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dineway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.29",
|
|
4
4
|
"description": "Agentic Website builder for restaurants — structured content meets AI via the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
"ulidx": "^2.4.1",
|
|
348
348
|
"upng-js": "^2.1.0",
|
|
349
349
|
"zod": "^4.4.1",
|
|
350
|
-
"@dineway-ai/admin": "^0.1.
|
|
350
|
+
"@dineway-ai/admin": "^0.1.15",
|
|
351
351
|
"@dineway-ai/auth": "^0.1.15",
|
|
352
352
|
"@dineway-ai/gutenberg-to-portable-text": "^0.1.13"
|
|
353
353
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|