dineway 0.1.23 → 0.1.25
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-CX_et2bh.mjs → api-BRxIrKsY.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 +6 -6
- 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 +1 -1
- package/dist/astro/routes/api/auth/passkey/options.mjs +1 -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/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-BIldBr7o.d.mts → bylines-DXqaE0d1.d.mts} +20 -20
- package/dist/cli/index.mjs +172 -28
- package/dist/{context-CUJ2Qwb4.mjs → context-CnrsB3lh.mjs} +1 -1
- package/dist/{device-flow-Pab2PQTA.mjs → device-flow-AsTA1k4t.mjs} +2 -2
- package/dist/{hitl-requests-D5CLRMGC.mjs → hitl-requests-DcTPiuog.mjs} +2 -2
- package/dist/{hitl-route-helpers-SRAfZqf9.mjs → hitl-route-helpers-CNqNbune.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-CFcMq7NJ.mjs → oauth-authorization-CRwAJzzA.mjs} +2 -2
- package/dist/{oauth-clients-CS1nQbC3.mjs → oauth-clients-BlHrNh_u.mjs} +1 -1
- package/dist/plugins/adapt-sandbox-entry.d.mts +2 -2
- package/dist/{runtime-CbnJMIeq.d.mts → runtime-fyApolZR.d.mts} +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/{site-context-CDnyARws.mjs → site-context-Dr_5pFHr.mjs} +1 -1
- package/dist/version-pVYv71Mu.mjs +6 -0
- package/package.json +3 -3
- package/dist/version-Ch9I7B2B.mjs +0 -6
- /package/dist/{allowed-origins-CIP5fh83.mjs → allowed-origins-3nAx5Xeo.mjs} +0 -0
- /package/dist/{challenge-store-cJam-E5R.mjs → challenge-store-B9odzfeh.mjs} +0 -0
- /package/dist/{experimental-workflows-BbZbIEZp.mjs → experimental-workflows-C7o_9V7S.mjs} +0 -0
- /package/dist/{mode-Bd55iLcP.mjs → mode-BI1kRvlT.mjs} +0 -0
- /package/dist/{secrets-DfeNNoLa.mjs → secrets-BIrqds5c.mjs} +0 -0
- /package/dist/{setup-complete-DgsQYTC2.mjs → setup-complete-BvSeN5Wh.mjs} +0 -0
package/dist/cli/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { i as pluginManifestSchema } from "../manifest-schema-CU0XL_ZK.mjs";
|
|
|
22
22
|
import "../ssrf-z3oH8wjK.mjs";
|
|
23
23
|
import { t as validateSeed } from "../validate-BGpmNtMe.mjs";
|
|
24
24
|
import { t as applySeed } from "../apply-D7vu4aFn.mjs";
|
|
25
|
-
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-
|
|
25
|
+
import { n as fingerprintKey, r as generateEncryptionKey, t as DinewaySecretsError } from "../secrets-BIrqds5c.mjs";
|
|
26
26
|
import { o as convertDataForRead } from "../transport-Dt7A12-i.mjs";
|
|
27
27
|
import { createHeaderAwareFetch, customHeadersInterceptor, isRedirectResponse, resolveCustomHeaders } from "../client/external-auth-headers.mjs";
|
|
28
28
|
import { DinewayClient } from "../client/index.mjs";
|
|
@@ -840,10 +840,34 @@ const VERCEL_ADAPTER_VERSION = "^10.0.6";
|
|
|
840
840
|
const NODE_IMPORT_PATTERN = /^import\s+node\s+from\s+["']@astrojs\/node["'];\n?/m;
|
|
841
841
|
const VERCEL_IMPORT_PATTERN = /^import\s+vercel\s+from\s+["']@astrojs\/vercel["'];\n?/m;
|
|
842
842
|
const CONDITIONAL_ADAPTER_FLAG_PATTERN = /^const\s+isVercelDeploy\s*=\s*process\.env\.VERCEL\s*===\s*["']1["']\s*\|\|\s*process\.env\.DINEWAY_DEPLOY_TARGET\s*===\s*["']forgeway["'];\n?/m;
|
|
843
|
-
const CONDITIONAL_ADAPTER_PATTERN = /adapter:\s*isVercelDeploy\s*\?\s*vercel\(\)\s*:\s*node\(\{\s*mode:\s*["']standalone["']\s*\}\),/s;
|
|
844
|
-
const NODE_ADAPTER_PATTERN = /adapter:\s*node\(\{\s*mode:\s*["']standalone["']\s*\}\),/s;
|
|
845
|
-
const VERCEL_ADAPTER_PATTERN = /adapter:\s*vercel\(\),/s;
|
|
846
843
|
const SERVER_OUTPUT_PATTERN = /output:\s*["']server["'],/;
|
|
844
|
+
const KNOWN_ADAPTER_FLAG_PATTERN = /\bisVercelDeploy\b/;
|
|
845
|
+
const KNOWN_ADAPTER_CALL_PATTERN = /\b(?:node|vercel)\s*\(/;
|
|
846
|
+
const ADAPTER_PROPERTY_PATTERN = /\n?[ \t]*adapter\s*:/g;
|
|
847
|
+
const COLLECT_UPLOAD_FUNCTION_PATTERN = /\bfunction\s+collectUploadIncludeFiles\s*\(/;
|
|
848
|
+
const TRAILING_NEWLINES_PATTERN = /\n+$/;
|
|
849
|
+
const GENERATED_UPLOAD_HELPER_IMPORTS = [
|
|
850
|
+
`import { existsSync as dinewayUploadsExistsSync, readdirSync as dinewayUploadsReaddirSync } from "node:fs";`,
|
|
851
|
+
`import { join as dinewayUploadsJoin, relative as dinewayUploadsRelative } from "node:path";`,
|
|
852
|
+
`import { fileURLToPath as dinewayUploadsFileURLToPath } from "node:url";`
|
|
853
|
+
];
|
|
854
|
+
const GENERATED_UPLOAD_HELPER_ROOT_DECLARATION = `const dinewayForgewayProjectRoot = dinewayUploadsFileURLToPath(new URL(".", import.meta.url));`;
|
|
855
|
+
const GENERATED_UPLOAD_HELPER_SOURCE = `${GENERATED_UPLOAD_HELPER_ROOT_DECLARATION}
|
|
856
|
+
|
|
857
|
+
function collectUploadIncludeFiles(directory = dinewayUploadsJoin(dinewayForgewayProjectRoot, "uploads")) {
|
|
858
|
+
\tif (!dinewayUploadsExistsSync(directory)) return [];
|
|
859
|
+
|
|
860
|
+
\treturn dinewayUploadsReaddirSync(directory, { withFileTypes: true }).flatMap((entry) => {
|
|
861
|
+
\t\tconst absolutePath = dinewayUploadsJoin(directory, entry.name);
|
|
862
|
+
\t\tif (entry.isDirectory()) {
|
|
863
|
+
\t\t\treturn collectUploadIncludeFiles(absolutePath);
|
|
864
|
+
\t\t}
|
|
865
|
+
\t\tif (!entry.isFile()) return [];
|
|
866
|
+
|
|
867
|
+
\t\treturn dinewayUploadsRelative(dinewayForgewayProjectRoot, absolutePath).split("\\\\").join("/");
|
|
868
|
+
\t});
|
|
869
|
+
}
|
|
870
|
+
`;
|
|
847
871
|
async function fileExists$11(path) {
|
|
848
872
|
try {
|
|
849
873
|
await access(path);
|
|
@@ -859,13 +883,131 @@ function insertImport(source, statement) {
|
|
|
859
883
|
lines.splice(insertAt, 0, statement);
|
|
860
884
|
return lines.join("\n");
|
|
861
885
|
}
|
|
886
|
+
function insertAfterImports(source, block) {
|
|
887
|
+
const lines = source.split("\n");
|
|
888
|
+
let insertAt = 0;
|
|
889
|
+
while (insertAt < lines.length && lines[insertAt]?.startsWith("import ")) insertAt += 1;
|
|
890
|
+
lines.splice(insertAt, 0, block.trimEnd(), "");
|
|
891
|
+
return lines.join("\n");
|
|
892
|
+
}
|
|
893
|
+
function createVercelAdapterConfig() {
|
|
894
|
+
return `adapter: vercel({
|
|
895
|
+
\t\tincludeFiles: collectUploadIncludeFiles(),
|
|
896
|
+
\t}),`;
|
|
897
|
+
}
|
|
898
|
+
function findBlockEnd(source, start) {
|
|
899
|
+
let depth = 0;
|
|
900
|
+
let quote;
|
|
901
|
+
let escaped = false;
|
|
902
|
+
for (let index = start; index < source.length; index += 1) {
|
|
903
|
+
const char = source[index];
|
|
904
|
+
if (quote) {
|
|
905
|
+
if (escaped) escaped = false;
|
|
906
|
+
else if (char === "\\") escaped = true;
|
|
907
|
+
else if (char === quote) quote = void 0;
|
|
908
|
+
continue;
|
|
909
|
+
}
|
|
910
|
+
if (char === "\"" || char === "'" || char === "`") {
|
|
911
|
+
quote = char;
|
|
912
|
+
continue;
|
|
913
|
+
}
|
|
914
|
+
if (char === "{") {
|
|
915
|
+
depth += 1;
|
|
916
|
+
continue;
|
|
917
|
+
}
|
|
918
|
+
if (char === "}") {
|
|
919
|
+
depth -= 1;
|
|
920
|
+
if (depth === 0) return index + 1;
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
function findPropertyEnd(source, start) {
|
|
925
|
+
let depth = 0;
|
|
926
|
+
let quote;
|
|
927
|
+
let escaped = false;
|
|
928
|
+
for (let index = start; index < source.length; index += 1) {
|
|
929
|
+
const char = source[index];
|
|
930
|
+
if (quote) {
|
|
931
|
+
if (escaped) escaped = false;
|
|
932
|
+
else if (char === "\\") escaped = true;
|
|
933
|
+
else if (char === quote) quote = void 0;
|
|
934
|
+
continue;
|
|
935
|
+
}
|
|
936
|
+
if (char === "\"" || char === "'" || char === "`") {
|
|
937
|
+
quote = char;
|
|
938
|
+
continue;
|
|
939
|
+
}
|
|
940
|
+
if (char === "(" || char === "{" || char === "[") {
|
|
941
|
+
depth += 1;
|
|
942
|
+
continue;
|
|
943
|
+
}
|
|
944
|
+
if (char === ")" || char === "}" || char === "]") {
|
|
945
|
+
depth -= 1;
|
|
946
|
+
continue;
|
|
947
|
+
}
|
|
948
|
+
if (char === "," && depth === 0) return index + 1;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
function isKnownAdapterExpression(expression) {
|
|
952
|
+
return KNOWN_ADAPTER_FLAG_PATTERN.test(expression) || KNOWN_ADAPTER_CALL_PATTERN.test(expression);
|
|
953
|
+
}
|
|
954
|
+
function replaceKnownAdapterEntries(source, wantedAdapter) {
|
|
955
|
+
let result = "";
|
|
956
|
+
let lastIndex = 0;
|
|
957
|
+
let replaced = false;
|
|
958
|
+
ADAPTER_PROPERTY_PATTERN.lastIndex = 0;
|
|
959
|
+
let match;
|
|
960
|
+
while ((match = ADAPTER_PROPERTY_PATTERN.exec(source)) !== null) {
|
|
961
|
+
const start = match.index;
|
|
962
|
+
const expressionStart = ADAPTER_PROPERTY_PATTERN.lastIndex;
|
|
963
|
+
const end = findPropertyEnd(source, expressionStart);
|
|
964
|
+
if (end === void 0) continue;
|
|
965
|
+
if (!isKnownAdapterExpression(source.slice(expressionStart, end - 1))) continue;
|
|
966
|
+
result += source.slice(lastIndex, start);
|
|
967
|
+
if (!replaced) {
|
|
968
|
+
result += `\n\t${wantedAdapter}`;
|
|
969
|
+
replaced = true;
|
|
970
|
+
}
|
|
971
|
+
lastIndex = end;
|
|
972
|
+
ADAPTER_PROPERTY_PATTERN.lastIndex = end;
|
|
973
|
+
}
|
|
974
|
+
return {
|
|
975
|
+
source: result + source.slice(lastIndex),
|
|
976
|
+
replaced
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
function ensureGeneratedVercelUploadHelper(source) {
|
|
980
|
+
let next = source;
|
|
981
|
+
for (const statement of GENERATED_UPLOAD_HELPER_IMPORTS) if (!next.includes(statement)) next = insertImport(next, statement);
|
|
982
|
+
if (!COLLECT_UPLOAD_FUNCTION_PATTERN.test(next)) next = insertAfterImports(next, GENERATED_UPLOAD_HELPER_SOURCE);
|
|
983
|
+
return next;
|
|
984
|
+
}
|
|
985
|
+
function removeGeneratedVercelUploadHelper(source) {
|
|
986
|
+
let next = source;
|
|
987
|
+
const rootStart = next.indexOf(GENERATED_UPLOAD_HELPER_ROOT_DECLARATION);
|
|
988
|
+
const functionStart = rootStart === -1 ? -1 : next.indexOf("function collectUploadIncludeFiles", rootStart);
|
|
989
|
+
if (rootStart !== -1 && functionStart !== -1) {
|
|
990
|
+
const openBrace = next.indexOf("{", functionStart);
|
|
991
|
+
const functionEnd = openBrace === -1 ? void 0 : findBlockEnd(next, openBrace);
|
|
992
|
+
if (functionEnd !== void 0) {
|
|
993
|
+
let removeEnd = functionEnd;
|
|
994
|
+
while (next[removeEnd] === "\n") removeEnd += 1;
|
|
995
|
+
next = next.slice(0, rootStart).replace(TRAILING_NEWLINES_PATTERN, "\n\n") + next.slice(removeEnd);
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
for (const statement of GENERATED_UPLOAD_HELPER_IMPORTS) next = next.replace(`${statement}\n`, "");
|
|
999
|
+
return next;
|
|
1000
|
+
}
|
|
862
1001
|
function configureAstroConfigSource(source, adapter) {
|
|
863
1002
|
let next = source.replace(CONDITIONAL_ADAPTER_FLAG_PATTERN, "").replace(adapter === "vercel" ? NODE_IMPORT_PATTERN : VERCEL_IMPORT_PATTERN, "");
|
|
1003
|
+
if (adapter === "node") next = removeGeneratedVercelUploadHelper(next);
|
|
864
1004
|
const wantedImport = adapter === "vercel" ? `import vercel from "${VERCEL_ADAPTER_PACKAGE}";` : `import node from "${NODE_ADAPTER_PACKAGE}";`;
|
|
865
|
-
const wantedAdapter = adapter === "vercel" ?
|
|
1005
|
+
const wantedAdapter = adapter === "vercel" ? createVercelAdapterConfig() : "adapter: node({ mode: \"standalone\" }),";
|
|
866
1006
|
if (!next.includes(wantedImport)) next = insertImport(next, wantedImport);
|
|
867
|
-
|
|
868
|
-
|
|
1007
|
+
if (adapter === "vercel") next = ensureGeneratedVercelUploadHelper(next);
|
|
1008
|
+
const adapterReplacement = replaceKnownAdapterEntries(next, wantedAdapter);
|
|
1009
|
+
next = adapterReplacement.source;
|
|
1010
|
+
if (!adapterReplacement.replaced) {
|
|
869
1011
|
if (!SERVER_OUTPUT_PATTERN.test(next)) throw new Error("astro.config.mjs must include output: \"server\" before deploy adapter setup.");
|
|
870
1012
|
next = next.replace(SERVER_OUTPUT_PATTERN, (match) => `${match}\n\t${wantedAdapter}`);
|
|
871
1013
|
}
|
|
@@ -1335,15 +1477,11 @@ async function writeDeployTarget(cwd, target) {
|
|
|
1335
1477
|
};
|
|
1336
1478
|
await writeFile(pkgPath, JSON.stringify(pkg, null, " ") + "\n", "utf-8");
|
|
1337
1479
|
}
|
|
1338
|
-
async function writeForgewayDeployMetadata(cwd, metadata
|
|
1480
|
+
async function writeForgewayDeployMetadata(cwd, metadata) {
|
|
1339
1481
|
const pkgPath = join(cwd, "package.json");
|
|
1340
1482
|
const pkg = await readDeployPackageJson(cwd);
|
|
1341
1483
|
pkg.dineway = {
|
|
1342
1484
|
...pkg.dineway,
|
|
1343
|
-
...restaurant ? { restaurant: {
|
|
1344
|
-
...pkg.dineway?.restaurant,
|
|
1345
|
-
...restaurant
|
|
1346
|
-
} } : {},
|
|
1347
1485
|
deploy: {
|
|
1348
1486
|
...pkg.dineway?.deploy,
|
|
1349
1487
|
forgeway: {
|
|
@@ -1740,7 +1878,7 @@ async function resolveAdminProjectContext(cwd, options, deps) {
|
|
|
1740
1878
|
ossHost
|
|
1741
1879
|
};
|
|
1742
1880
|
}
|
|
1743
|
-
async function resolveShadowProjectContext(cwd, options,
|
|
1881
|
+
async function resolveShadowProjectContext(cwd, options, deps) {
|
|
1744
1882
|
const pkg = await readDeployPackageJson(cwd).catch(() => null);
|
|
1745
1883
|
const saved = pkg ? getSavedForgewayMetadata(pkg) : {};
|
|
1746
1884
|
const platformApiUrl = normalizePlatformApiUrl(getEnv("DINEWAY_API_BASE_URL") ?? getEnv("FORGEWAY_API_URL") ?? (typeof saved.platformApiUrl === "string" ? saved.platformApiUrl : void 0));
|
|
@@ -1748,14 +1886,14 @@ async function resolveShadowProjectContext(cwd, options, seedPath, deps) {
|
|
|
1748
1886
|
let grant = await (deps.readShadowGrant ?? readForgewayShadowGrant)(platformApiUrl, savedPlaceId, cwd);
|
|
1749
1887
|
let restaurant;
|
|
1750
1888
|
if (!grant) {
|
|
1751
|
-
|
|
1752
|
-
|
|
1889
|
+
const shadowRestaurant = await resolveShadowRestaurantInfo(options, deps);
|
|
1890
|
+
restaurant = shadowRestaurant;
|
|
1753
1891
|
if (options.dryRun) throw new Error("Forgeway deploy needs a Dineway shadow deploy grant. Run without --dry-run to create it.");
|
|
1754
1892
|
grant = await createShadowGrant({
|
|
1755
1893
|
platformApiUrl,
|
|
1756
1894
|
placeId: savedPlaceId,
|
|
1757
|
-
restaurantName:
|
|
1758
|
-
city:
|
|
1895
|
+
restaurantName: shadowRestaurant.name,
|
|
1896
|
+
city: shadowRestaurant.city,
|
|
1759
1897
|
cwd,
|
|
1760
1898
|
deps
|
|
1761
1899
|
});
|
|
@@ -1778,10 +1916,10 @@ async function resolveShadowProjectContext(cwd, options, seedPath, deps) {
|
|
|
1778
1916
|
restaurant
|
|
1779
1917
|
};
|
|
1780
1918
|
}
|
|
1781
|
-
async function resolveProjectContext(cwd, options,
|
|
1919
|
+
async function resolveProjectContext(cwd, options, deps) {
|
|
1782
1920
|
const adminContext = await resolveAdminProjectContext(cwd, options, deps);
|
|
1783
1921
|
if (adminContext) return { context: adminContext };
|
|
1784
|
-
return await resolveShadowProjectContext(cwd, options,
|
|
1922
|
+
return await resolveShadowProjectContext(cwd, options, deps);
|
|
1785
1923
|
}
|
|
1786
1924
|
function unwrapProjectPayload(payload) {
|
|
1787
1925
|
if (isRecord(payload) && "project" in payload) {
|
|
@@ -1964,20 +2102,25 @@ async function readSeedTitle(seedPath) {
|
|
|
1964
2102
|
return;
|
|
1965
2103
|
}
|
|
1966
2104
|
}
|
|
1967
|
-
async function resolveRestaurantInfo(
|
|
1968
|
-
const savedRestaurant = (await readDeployPackageJson(cwd).catch(() => null))?.dineway?.restaurant;
|
|
2105
|
+
async function resolveRestaurantInfo(options, seedPath, deps, requireForSlug, useSeedTitle = true) {
|
|
1969
2106
|
const seedTitle = useSeedTitle ? await readSeedTitle(seedPath) : void 0;
|
|
1970
|
-
let name = options.restaurantName ??
|
|
1971
|
-
let city = options.city
|
|
2107
|
+
let name = options.restaurantName ?? seedTitle;
|
|
2108
|
+
let city = options.city;
|
|
1972
2109
|
if (requireForSlug) {
|
|
1973
|
-
if (!name) name = await promptRequired("Restaurant name: ", void 0, deps, "Restaurant name is required. Pass --restaurant-name
|
|
1974
|
-
if (!city) city = await promptRequired("City: ", void 0, deps, "City is required. Pass --city
|
|
2110
|
+
if (!name) name = await promptRequired("Restaurant name: ", void 0, deps, "Restaurant name is required. Pass --restaurant-name.");
|
|
2111
|
+
if (!city) city = await promptRequired("City: ", void 0, deps, "City is required. Pass --city.");
|
|
1975
2112
|
}
|
|
1976
2113
|
return {
|
|
1977
2114
|
name,
|
|
1978
2115
|
city
|
|
1979
2116
|
};
|
|
1980
2117
|
}
|
|
2118
|
+
async function resolveShadowRestaurantInfo(options, deps) {
|
|
2119
|
+
return {
|
|
2120
|
+
name: options.restaurantName ?? await promptRequired("Restaurant name: ", void 0, deps, "Restaurant name is required. Pass --restaurant-name."),
|
|
2121
|
+
city: options.city ?? await promptRequired("City: ", void 0, deps, "City is required. Pass --city.")
|
|
2122
|
+
};
|
|
2123
|
+
}
|
|
1981
2124
|
function normalizeSiteDetail(payload) {
|
|
1982
2125
|
if (payload.site) return payload.site;
|
|
1983
2126
|
if (!payload.id || !payload.slug || !payload.domain || !payload.framework) throw new Error("Forgeway site response was missing required fields.");
|
|
@@ -2014,7 +2157,7 @@ async function resolveDeploymentSite(cwd, context, options, seedPath, deps, preR
|
|
|
2014
2157
|
const explicitSite = options.site;
|
|
2015
2158
|
const savedSite = typeof saved.siteId === "string" ? saved.siteId : saved.siteSlug;
|
|
2016
2159
|
const siteRef = explicitSite ?? savedSite;
|
|
2017
|
-
const restaurant = preResolvedRestaurant?.name && preResolvedRestaurant.city ? preResolvedRestaurant : await resolveRestaurantInfo(
|
|
2160
|
+
const restaurant = preResolvedRestaurant?.name && preResolvedRestaurant.city ? preResolvedRestaurant : await resolveRestaurantInfo(options, seedPath, deps, !siteRef);
|
|
2018
2161
|
const targetSlug = siteRef ?? deriveForgewaySiteSlug(restaurant.name || "", restaurant.city || "");
|
|
2019
2162
|
let site = await getDeploymentSite(context, targetSlug, deps);
|
|
2020
2163
|
if (!site) site = await createDeploymentSite(context, {
|
|
@@ -2027,7 +2170,7 @@ async function resolveDeploymentSite(cwd, context, options, seedPath, deps, preR
|
|
|
2027
2170
|
siteSlug: site.slug,
|
|
2028
2171
|
siteDomain: site.domain,
|
|
2029
2172
|
...context.placeId ? { placeId: context.placeId } : {}
|
|
2030
|
-
}
|
|
2173
|
+
});
|
|
2031
2174
|
return {
|
|
2032
2175
|
site,
|
|
2033
2176
|
restaurant
|
|
@@ -2241,7 +2384,7 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
2241
2384
|
if (!(await stat(sourceDir).catch(() => null))?.isDirectory()) throw new Error(`"${sourceDir}" is not a valid directory.`);
|
|
2242
2385
|
if (EXCLUDE_PATTERNS.includes(basename(sourceDir))) throw new Error(`"${basename(sourceDir)}" is an excluded directory and cannot be deployed.`);
|
|
2243
2386
|
const seedPath = await resolveSeedPath$1(cwd, options.seed);
|
|
2244
|
-
const { context, restaurant } = await resolveProjectContext(cwd, options,
|
|
2387
|
+
const { context, restaurant } = await resolveProjectContext(cwd, options, deps);
|
|
2245
2388
|
const { site } = await resolveDeploymentSite(cwd, context, options, seedPath, deps, restaurant);
|
|
2246
2389
|
const database = parseDatabaseMode(options.database);
|
|
2247
2390
|
if (database !== "none") {
|
|
@@ -2262,6 +2405,7 @@ async function deployForgeway(cwd, options, deps = {}) {
|
|
|
2262
2405
|
throw error;
|
|
2263
2406
|
}
|
|
2264
2407
|
}
|
|
2408
|
+
await configureAstroDeployAdapter(cwd, "vercel", false);
|
|
2265
2409
|
const deployment = await deploySiteProject({
|
|
2266
2410
|
context,
|
|
2267
2411
|
siteId: site.id,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as ContextRepository, i as parseSiteBriefingScope, n as SiteBriefingError } from "./briefing-Dk4I4VC8.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-Dr_5pFHr.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-qfqpPVpu.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-C7o_9V7S.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-BZ9aAeCo.mjs";
|
|
4
|
-
import { o as lookupOAuthClient } from "./oauth-clients-
|
|
4
|
+
import { o as lookupOAuthClient } from "./oauth-clients-BlHrNh_u.mjs";
|
|
5
5
|
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-B7-6YI3R.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-C7o_9V7S.mjs";
|
|
2
|
+
import { n as HitlRequestService } from "./site-context-Dr_5pFHr.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-Dyf9fGZE.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-C7o_9V7S.mjs";
|
|
3
|
+
import { t as WorkflowHitlCoordinator } from "./site-context-Dr_5pFHr.mjs";
|
|
4
4
|
import { T as resolveActorIdentity, p as logSiteActivitySafely } from "./activity-events-CjOgr0Uv.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-Brp7Hv9S.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-fyApolZR.mjs";
|
|
3
3
|
import { n as MediaTable, r as UserTable, t as Database } from "./types-DwIXYH8s.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-DzBAohLy.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-CsX_6h1v.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-DUurmpun.mjs";
|
|
12
12
|
import { n as generatePlaceholder, r as normalizeMediaValue, t as PlaceholderData } from "./placeholder-2N6m2_O6.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-B7Uld4FZ.mjs";
|
|
14
|
-
import "./bylines-
|
|
14
|
+
import "./bylines-DXqaE0d1.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-DbtpYtHx.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import "./byline-9WeA8b0a.mjs";
|
|
|
23
23
|
import { t as normalizeMediaValue } from "./normalize-ba36HTxZ.mjs";
|
|
24
24
|
import { t as generatePlaceholder } from "./placeholder-BAy3k441.mjs";
|
|
25
25
|
import "./seo-DASNc4gD.mjs";
|
|
26
|
-
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-
|
|
26
|
+
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-BRxIrKsY.mjs";
|
|
27
27
|
import "./request-cache-BzuhyUXj.mjs";
|
|
28
28
|
import "./dashboard-DdqRifyu.mjs";
|
|
29
29
|
import "./briefing-Dk4I4VC8.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../runtime-
|
|
1
|
+
import "../runtime-fyApolZR.mjs";
|
|
2
2
|
import { t as Database } from "../types-DwIXYH8s.mjs";
|
|
3
3
|
import "../types-DzBAohLy.mjs";
|
|
4
4
|
import "../types-BSP1HbdT.mjs";
|
|
@@ -7,7 +7,7 @@ import "../runner-BJm_NJr2.mjs";
|
|
|
7
7
|
import "../index-CxVXYBXq.mjs";
|
|
8
8
|
import "../index-DUurmpun.mjs";
|
|
9
9
|
import { d as Storage } from "../types-B7Uld4FZ.mjs";
|
|
10
|
-
import "../bylines-
|
|
10
|
+
import "../bylines-DXqaE0d1.mjs";
|
|
11
11
|
import "../types-DbtpYtHx.mjs";
|
|
12
12
|
import "../validate-BikB29gc.mjs";
|
|
13
13
|
import "../index.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as withTransaction } from "./transaction-qfqpPVpu.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-C7o_9V7S.mjs";
|
|
3
3
|
import { a as hashApiToken, n as TOKEN_PREFIXES, r as generatePrefixedToken, t as ALL_VALID_SCOPES } from "./api-tokens-BZ9aAeCo.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-BlHrNh_u.mjs";
|
|
5
5
|
import { t as lookupUserRoleAndStatus } from "./oauth-user-lookup-B7-6YI3R.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-C7o_9V7S.mjs";
|
|
2
2
|
import { o as validateScopes } from "./api-tokens-BZ9aAeCo.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-fyApolZR.mjs";
|
|
2
2
|
import "../types-DwIXYH8s.mjs";
|
|
3
3
|
import { X as ResolvedPlugin, tt as StandardPluginDefinition } from "../types-DzBAohLy.mjs";
|
|
4
4
|
import "../types-BSP1HbdT.mjs";
|
|
5
5
|
import "../runner-BJm_NJr2.mjs";
|
|
6
6
|
import "../index-CxVXYBXq.mjs";
|
|
7
7
|
import "../index-DUurmpun.mjs";
|
|
8
|
-
import "../bylines-
|
|
8
|
+
import "../bylines-DXqaE0d1.mjs";
|
|
9
9
|
import "../types-DbtpYtHx.mjs";
|
|
10
10
|
import "../validate-BikB29gc.mjs";
|
|
11
11
|
|
|
@@ -1787,9 +1787,9 @@ declare const pluginManifestSchema: z.ZodObject<{
|
|
|
1787
1787
|
number: "number";
|
|
1788
1788
|
boolean: "boolean";
|
|
1789
1789
|
file: "file";
|
|
1790
|
-
image: "image";
|
|
1791
1790
|
slug: "slug";
|
|
1792
1791
|
datetime: "datetime";
|
|
1792
|
+
image: "image";
|
|
1793
1793
|
text: "text";
|
|
1794
1794
|
integer: "integer";
|
|
1795
1795
|
select: "select";
|
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-fyApolZR.mjs";
|
|
2
2
|
import "./types-DwIXYH8s.mjs";
|
|
3
3
|
import "./types-DzBAohLy.mjs";
|
|
4
4
|
import "./types-BSP1HbdT.mjs";
|
|
5
5
|
import "./runner-BJm_NJr2.mjs";
|
|
6
6
|
import "./index-CxVXYBXq.mjs";
|
|
7
7
|
import "./index-DUurmpun.mjs";
|
|
8
|
-
import "./bylines-
|
|
8
|
+
import "./bylines-DXqaE0d1.mjs";
|
|
9
9
|
import "./types-DbtpYtHx.mjs";
|
|
10
10
|
import "./validate-BikB29gc.mjs";
|
|
11
11
|
import { t as getMediaProvider } from "./provider-loader-DJ5sLxNP.mjs";
|
|
@@ -12,7 +12,7 @@ import { a as getSiteSettingsWithDb } from "./settings-D2k1JraC.mjs";
|
|
|
12
12
|
import { p as normalizeUrl } from "./utils-BftjFpR0.mjs";
|
|
13
13
|
import { t as sanitizeWordPressImportSlug } from "./wordpress-slugs-BzMv9U-N.mjs";
|
|
14
14
|
import { s as searchCollection } from "./search-DjaP_Dw-.mjs";
|
|
15
|
-
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-
|
|
15
|
+
import { n as assertExperimentalSiteContextWorkflowsEnabled } from "./experimental-workflows-C7o_9V7S.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.25",
|
|
4
4
|
"description": "Agentic Website builder for restaurants — structured content meets AI via the Model Context Protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -344,8 +344,8 @@
|
|
|
344
344
|
"upng-js": "^2.1.0",
|
|
345
345
|
"zod": "^4.4.1",
|
|
346
346
|
"@dineway-ai/admin": "^0.1.13",
|
|
347
|
-
"@dineway-ai/
|
|
348
|
-
"@dineway-ai/
|
|
347
|
+
"@dineway-ai/auth": "^0.1.14",
|
|
348
|
+
"@dineway-ai/gutenberg-to-portable-text": "^0.1.13"
|
|
349
349
|
},
|
|
350
350
|
"optionalDependencies": {
|
|
351
351
|
"@aws-sdk/client-s3": "^3.1049.0",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|