@mainsoft/agent-cms 0.10.1 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +7 -0
- package/dist/bin.js +1 -1
- package/dist/{chunk-ZCUJ4MPT.js → chunk-5FMVVBDR.js} +1 -1
- package/dist/{chunk-QMPSOLLH.js → chunk-5ODZ2ZJF.js} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.js +1 -1
- package/dist/http.cjs +16 -6
- package/dist/http.d.cts +16 -2
- package/dist/http.d.ts +16 -2
- package/dist/http.js +16 -7
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/mcp.cjs +1 -1
- package/dist/mcp.js +2 -2
- package/dist/tables.d.cts +6 -6
- package/dist/tables.d.ts +6 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.10.2
|
|
4
|
+
|
|
5
|
+
- **Fix (REST):** a signed-in person's writes were refused with `cross_site` ("Cross-site request refused") whenever the app was reached through an address other than the one the server listens on: behind a reverse proxy or a preview tunnel, in a container, or simply by opening a `next start` server as `127.0.0.1` instead of `localhost`. The check compared the page's `Origin` only with `req.url`, which under `next start` holds the listening address. It now also reads the address from `Host` and `X-Forwarded-Host`, the way Next.js does for Server Actions. A page on another site still cannot change any of the three, so the protection is the same. Apps on Vercel were not affected.
|
|
6
|
+
- **New:** `createCmsHandler({ trustedOrigins: ["https://admin.example.com"] })` lets pages at other addresses write with a person's session, for an admin served from its own domain. The app's own address needs no entry.
|
|
7
|
+
|
|
3
8
|
## 0.10.1
|
|
4
9
|
|
|
5
10
|
- **Fix (cms-doc-editor):** saving or publishing a new document lost its confirmation line ("Saved v1", "Published v1") when the app answered `onCreated` by moving to the document's own address, which is what the examples do. The line now waits for the editor that opens next and shows there once. Update the copy with `npx agent-cms add cms-doc-editor --update`.
|
package/README.md
CHANGED
|
@@ -139,6 +139,13 @@ That gives you REST under `/api/cms/...` (route list at the top of
|
|
|
139
139
|
`ETag: "v<n>"`; send it back as `If-Match` on PATCH/DELETE (or pass
|
|
140
140
|
`expectedVersion`). `requireIfMatch: true` refuses writes without one (428).
|
|
141
141
|
|
|
142
|
+
A write that rides on a person's session must come from a page of the app
|
|
143
|
+
itself: the handler compares the browser's `Origin` with the address of the
|
|
144
|
+
request (`Host`, or `X-Forwarded-Host` behind a proxy) and answers 403
|
|
145
|
+
`cross_site` otherwise. Requests with an API key are not checked. If the
|
|
146
|
+
admin lives at another address, list it:
|
|
147
|
+
`createCmsHandler({ ..., trustedOrigins: ["https://admin.example.com"] })`.
|
|
148
|
+
|
|
142
149
|
## Admin screens
|
|
143
150
|
|
|
144
151
|
The screens are source files you copy into your app and then own, like
|
package/dist/bin.js
CHANGED
|
@@ -5057,7 +5057,7 @@ import { basename, dirname, join, relative, resolve } from "path";
|
|
|
5057
5057
|
import { fileURLToPath } from "url";
|
|
5058
5058
|
|
|
5059
5059
|
// src/version.ts
|
|
5060
|
-
var VERSION = "0.10.
|
|
5060
|
+
var VERSION = "0.10.2";
|
|
5061
5061
|
|
|
5062
5062
|
// src/registry.ts
|
|
5063
5063
|
var sha = (s) => createHash3("sha256").update(s).digest("hex");
|
package/dist/cli.cjs
CHANGED
|
@@ -5097,7 +5097,7 @@ var import_node_path = require("path");
|
|
|
5097
5097
|
var import_node_url = require("url");
|
|
5098
5098
|
|
|
5099
5099
|
// src/version.ts
|
|
5100
|
-
var VERSION = "0.10.
|
|
5100
|
+
var VERSION = "0.10.2";
|
|
5101
5101
|
|
|
5102
5102
|
// src/registry.ts
|
|
5103
5103
|
var sha = (s) => (0, import_node_crypto3.createHash)("sha256").update(s).digest("hex");
|
package/dist/cli.js
CHANGED
package/dist/http.cjs
CHANGED
|
@@ -24,6 +24,7 @@ __export(http_exports, {
|
|
|
24
24
|
errorResponse: () => errorResponse,
|
|
25
25
|
json: () => json,
|
|
26
26
|
resolveActor: () => resolveActor,
|
|
27
|
+
sameSite: () => sameSite,
|
|
27
28
|
versionFromIfMatch: () => versionFromIfMatch
|
|
28
29
|
});
|
|
29
30
|
module.exports = __toCommonJS(http_exports);
|
|
@@ -957,7 +958,7 @@ async function runTool(cms, actor, name, args = {}, opts = {}) {
|
|
|
957
958
|
}
|
|
958
959
|
|
|
959
960
|
// src/version.ts
|
|
960
|
-
var VERSION = "0.10.
|
|
961
|
+
var VERSION = "0.10.2";
|
|
961
962
|
|
|
962
963
|
// src/mcp.ts
|
|
963
964
|
var ANONYMOUS_READ_TOOLS = ["list_collections", "search_documents", "read_for_answer", "list_documents", "get_document"];
|
|
@@ -1204,7 +1205,17 @@ function errorResponse(err, cms) {
|
|
|
1204
1205
|
return json({ error: "internal", kind: "internal", message: formatMessage(core?.messages, "internal"), params: {} }, 500);
|
|
1205
1206
|
}
|
|
1206
1207
|
var MAX_BODY_BYTES2 = 512 * 1024;
|
|
1207
|
-
|
|
1208
|
+
function sameSite(req, trusted = []) {
|
|
1209
|
+
const origin = req.headers.get("origin");
|
|
1210
|
+
const from = origin ? safeHost(origin) : null;
|
|
1211
|
+
if (from && trusted.some((o) => safeHost(o) === from || o === from)) return true;
|
|
1212
|
+
if (req.headers.get("sec-fetch-site") === "cross-site") return false;
|
|
1213
|
+
if (!origin) return true;
|
|
1214
|
+
if (!from) return false;
|
|
1215
|
+
const own = [safeHost(req.url), req.headers.get("x-forwarded-host")?.split(",")[0]?.trim() || null, req.headers.get("host")];
|
|
1216
|
+
return own.some((h) => !!h && h.toLowerCase() === from.toLowerCase());
|
|
1217
|
+
}
|
|
1218
|
+
async function resolveActor(cms, req, resolveUser, trustedOrigins) {
|
|
1208
1219
|
const core = coreOf(cms);
|
|
1209
1220
|
const raw = keyFromHeader(req.headers.get("authorization"));
|
|
1210
1221
|
if (raw) {
|
|
@@ -1215,9 +1226,7 @@ async function resolveActor(cms, req, resolveUser) {
|
|
|
1215
1226
|
if (/\bsgk_/.test(req.headers.get("authorization") ?? "")) throw new CmsError("invalid_key", {}, { messages: core.messages });
|
|
1216
1227
|
const user = await resolveUser(req);
|
|
1217
1228
|
if (user && !["GET", "HEAD"].includes(req.method.toUpperCase())) {
|
|
1218
|
-
|
|
1219
|
-
const origin = req.headers.get("origin");
|
|
1220
|
-
if (site === "cross-site" || origin && new URL(req.url).host !== safeHost(origin)) throw new CmsError("cross_site", {}, { messages: core.messages });
|
|
1229
|
+
if (!sameSite(req, trustedOrigins)) throw new CmsError("cross_site", {}, { messages: core.messages });
|
|
1221
1230
|
}
|
|
1222
1231
|
if (!user) return { kind: "anonymous" };
|
|
1223
1232
|
const { agent: _agent, ...person } = user;
|
|
@@ -1277,7 +1286,7 @@ function createCmsHandler(opts) {
|
|
|
1277
1286
|
return json(await core.runScheduled());
|
|
1278
1287
|
}
|
|
1279
1288
|
const client = req.headers.get("x-agent-cms-client");
|
|
1280
|
-
const who = await resolveActor(core, req, opts.resolveUser);
|
|
1289
|
+
const who = await resolveActor(core, req, opts.resolveUser, opts.trustedOrigins);
|
|
1281
1290
|
const actor = { ...who, via: seg[0] === "mcp" ? client === "cli" ? "cli" : "mcp" : client === "cli" ? "cli" : "rest" };
|
|
1282
1291
|
const q = url.searchParams;
|
|
1283
1292
|
const expected = (fromBody) => versionFromIfMatch(req.headers.get("if-match")) ?? fromBody;
|
|
@@ -1647,5 +1656,6 @@ function createCmsHandler(opts) {
|
|
|
1647
1656
|
errorResponse,
|
|
1648
1657
|
json,
|
|
1649
1658
|
resolveActor,
|
|
1659
|
+
sameSite,
|
|
1650
1660
|
versionFromIfMatch
|
|
1651
1661
|
});
|
package/dist/http.d.cts
CHANGED
|
@@ -107,6 +107,12 @@ interface CmsHandlerOptions {
|
|
|
107
107
|
basePath?: string;
|
|
108
108
|
/** Refuse PATCH and DELETE of a document without If-Match / expectedVersion (428). Default false. */
|
|
109
109
|
requireIfMatch?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Other addresses whose pages may write with a person's session, e.g.
|
|
112
|
+
* `["https://admin.example.com"]`. The app's own address needs no entry:
|
|
113
|
+
* it is read from the request (`Host`, `X-Forwarded-Host`).
|
|
114
|
+
*/
|
|
115
|
+
trustedOrigins?: readonly string[];
|
|
110
116
|
/**
|
|
111
117
|
* MCP options. `anonymous: "read"` lets requests without a key use the MCP
|
|
112
118
|
* endpoint with read tools only (published documents of collections anyone
|
|
@@ -116,9 +122,17 @@ interface CmsHandlerOptions {
|
|
|
116
122
|
}
|
|
117
123
|
declare function json(data: unknown, status?: number, headers?: Record<string, string>): Response;
|
|
118
124
|
declare function errorResponse(err: unknown, cms?: CmsLike): Response;
|
|
119
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Is this write from a page of the app itself? Browsers put the page's
|
|
127
|
+
* address in `Origin`; a page elsewhere cannot change it, nor `Host`, nor
|
|
128
|
+
* add `X-Forwarded-Host`. Behind a proxy (and under `next start`) `req.url`
|
|
129
|
+
* holds the address the server listens on, not the one people open, so the
|
|
130
|
+
* address is also read from those two headers.
|
|
131
|
+
*/
|
|
132
|
+
declare function sameSite(req: Request, trusted?: readonly string[]): boolean;
|
|
133
|
+
declare function resolveActor(cms: CmsLike, req: Request, resolveUser: CmsHandlerOptions["resolveUser"], trustedOrigins?: readonly string[]): Promise<Actor>;
|
|
120
134
|
/** `If-Match: "v12"` (or W/"v12", or 12) → 12. */
|
|
121
135
|
declare function versionFromIfMatch(h: string | null): number | undefined;
|
|
122
136
|
declare function createCmsHandler(opts: CmsHandlerOptions): (req: Request) => Promise<Response>;
|
|
123
137
|
|
|
124
|
-
export { type CmsHandlerOptions, createCmsHandler, errorResponse, json, resolveActor, versionFromIfMatch };
|
|
138
|
+
export { type CmsHandlerOptions, createCmsHandler, errorResponse, json, resolveActor, sameSite, versionFromIfMatch };
|
package/dist/http.d.ts
CHANGED
|
@@ -107,6 +107,12 @@ interface CmsHandlerOptions {
|
|
|
107
107
|
basePath?: string;
|
|
108
108
|
/** Refuse PATCH and DELETE of a document without If-Match / expectedVersion (428). Default false. */
|
|
109
109
|
requireIfMatch?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* Other addresses whose pages may write with a person's session, e.g.
|
|
112
|
+
* `["https://admin.example.com"]`. The app's own address needs no entry:
|
|
113
|
+
* it is read from the request (`Host`, `X-Forwarded-Host`).
|
|
114
|
+
*/
|
|
115
|
+
trustedOrigins?: readonly string[];
|
|
110
116
|
/**
|
|
111
117
|
* MCP options. `anonymous: "read"` lets requests without a key use the MCP
|
|
112
118
|
* endpoint with read tools only (published documents of collections anyone
|
|
@@ -116,9 +122,17 @@ interface CmsHandlerOptions {
|
|
|
116
122
|
}
|
|
117
123
|
declare function json(data: unknown, status?: number, headers?: Record<string, string>): Response;
|
|
118
124
|
declare function errorResponse(err: unknown, cms?: CmsLike): Response;
|
|
119
|
-
|
|
125
|
+
/**
|
|
126
|
+
* Is this write from a page of the app itself? Browsers put the page's
|
|
127
|
+
* address in `Origin`; a page elsewhere cannot change it, nor `Host`, nor
|
|
128
|
+
* add `X-Forwarded-Host`. Behind a proxy (and under `next start`) `req.url`
|
|
129
|
+
* holds the address the server listens on, not the one people open, so the
|
|
130
|
+
* address is also read from those two headers.
|
|
131
|
+
*/
|
|
132
|
+
declare function sameSite(req: Request, trusted?: readonly string[]): boolean;
|
|
133
|
+
declare function resolveActor(cms: CmsLike, req: Request, resolveUser: CmsHandlerOptions["resolveUser"], trustedOrigins?: readonly string[]): Promise<Actor>;
|
|
120
134
|
/** `If-Match: "v12"` (or W/"v12", or 12) → 12. */
|
|
121
135
|
declare function versionFromIfMatch(h: string | null): number | undefined;
|
|
122
136
|
declare function createCmsHandler(opts: CmsHandlerOptions): (req: Request) => Promise<Response>;
|
|
123
137
|
|
|
124
|
-
export { type CmsHandlerOptions, createCmsHandler, errorResponse, json, resolveActor, versionFromIfMatch };
|
|
138
|
+
export { type CmsHandlerOptions, createCmsHandler, errorResponse, json, resolveActor, sameSite, versionFromIfMatch };
|
package/dist/http.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handleMcp,
|
|
3
3
|
toJsonSchema
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-5FMVVBDR.js";
|
|
5
|
+
import "./chunk-5ODZ2ZJF.js";
|
|
6
6
|
import "./chunk-DSJETZT4.js";
|
|
7
7
|
import "./chunk-BFVBHIHV.js";
|
|
8
8
|
import "./chunk-7Y6TU2UA.js";
|
|
@@ -65,7 +65,17 @@ function errorResponse(err, cms) {
|
|
|
65
65
|
return json({ error: "internal", kind: "internal", message: formatMessage(core?.messages, "internal"), params: {} }, 500);
|
|
66
66
|
}
|
|
67
67
|
var MAX_BODY_BYTES = 512 * 1024;
|
|
68
|
-
|
|
68
|
+
function sameSite(req, trusted = []) {
|
|
69
|
+
const origin = req.headers.get("origin");
|
|
70
|
+
const from = origin ? safeHost(origin) : null;
|
|
71
|
+
if (from && trusted.some((o) => safeHost(o) === from || o === from)) return true;
|
|
72
|
+
if (req.headers.get("sec-fetch-site") === "cross-site") return false;
|
|
73
|
+
if (!origin) return true;
|
|
74
|
+
if (!from) return false;
|
|
75
|
+
const own = [safeHost(req.url), req.headers.get("x-forwarded-host")?.split(",")[0]?.trim() || null, req.headers.get("host")];
|
|
76
|
+
return own.some((h) => !!h && h.toLowerCase() === from.toLowerCase());
|
|
77
|
+
}
|
|
78
|
+
async function resolveActor(cms, req, resolveUser, trustedOrigins) {
|
|
69
79
|
const core = coreOf(cms);
|
|
70
80
|
const raw = keyFromHeader(req.headers.get("authorization"));
|
|
71
81
|
if (raw) {
|
|
@@ -76,9 +86,7 @@ async function resolveActor(cms, req, resolveUser) {
|
|
|
76
86
|
if (/\bsgk_/.test(req.headers.get("authorization") ?? "")) throw new CmsError("invalid_key", {}, { messages: core.messages });
|
|
77
87
|
const user = await resolveUser(req);
|
|
78
88
|
if (user && !["GET", "HEAD"].includes(req.method.toUpperCase())) {
|
|
79
|
-
|
|
80
|
-
const origin = req.headers.get("origin");
|
|
81
|
-
if (site === "cross-site" || origin && new URL(req.url).host !== safeHost(origin)) throw new CmsError("cross_site", {}, { messages: core.messages });
|
|
89
|
+
if (!sameSite(req, trustedOrigins)) throw new CmsError("cross_site", {}, { messages: core.messages });
|
|
82
90
|
}
|
|
83
91
|
if (!user) return { kind: "anonymous" };
|
|
84
92
|
const { agent: _agent, ...person } = user;
|
|
@@ -138,7 +146,7 @@ function createCmsHandler(opts) {
|
|
|
138
146
|
return json(await core.runScheduled());
|
|
139
147
|
}
|
|
140
148
|
const client = req.headers.get("x-agent-cms-client");
|
|
141
|
-
const who = await resolveActor(core, req, opts.resolveUser);
|
|
149
|
+
const who = await resolveActor(core, req, opts.resolveUser, opts.trustedOrigins);
|
|
142
150
|
const actor = { ...who, via: seg[0] === "mcp" ? client === "cli" ? "cli" : "mcp" : client === "cli" ? "cli" : "rest" };
|
|
143
151
|
const q = url.searchParams;
|
|
144
152
|
const expected = (fromBody) => versionFromIfMatch(req.headers.get("if-match")) ?? fromBody;
|
|
@@ -507,5 +515,6 @@ export {
|
|
|
507
515
|
errorResponse,
|
|
508
516
|
json,
|
|
509
517
|
resolveActor,
|
|
518
|
+
sameSite,
|
|
510
519
|
versionFromIfMatch
|
|
511
520
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -6176,7 +6176,7 @@ function docFromMarkdown(text2, fallbackSlug) {
|
|
|
6176
6176
|
}
|
|
6177
6177
|
|
|
6178
6178
|
// src/version.ts
|
|
6179
|
-
var VERSION = "0.10.
|
|
6179
|
+
var VERSION = "0.10.2";
|
|
6180
6180
|
// Annotate the CommonJS export names for ESM import in node:
|
|
6181
6181
|
0 && (module.exports = {
|
|
6182
6182
|
ASSET_KINDS,
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/mcp.cjs
CHANGED
|
@@ -705,7 +705,7 @@ async function runTool(cms, actor, name, args = {}, opts = {}) {
|
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
// src/version.ts
|
|
708
|
-
var VERSION = "0.10.
|
|
708
|
+
var VERSION = "0.10.2";
|
|
709
709
|
|
|
710
710
|
// src/mcp.ts
|
|
711
711
|
var ANONYMOUS_READ_TOOLS = ["list_collections", "search_documents", "read_for_answer", "list_documents", "get_document"];
|
package/dist/mcp.js
CHANGED
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
createMcpServer,
|
|
6
6
|
handleMcp,
|
|
7
7
|
toJsonSchema
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-5FMVVBDR.js";
|
|
9
|
+
import "./chunk-5ODZ2ZJF.js";
|
|
10
10
|
import "./chunk-DSJETZT4.js";
|
|
11
11
|
import "./chunk-BFVBHIHV.js";
|
|
12
12
|
import "./chunk-7Y6TU2UA.js";
|
package/dist/tables.d.cts
CHANGED
|
@@ -887,7 +887,7 @@ declare function cmsTables(o?: CmsTablesOptions): {
|
|
|
887
887
|
tableName: string;
|
|
888
888
|
dataType: "json";
|
|
889
889
|
columnType: "PgJsonb";
|
|
890
|
-
data: ("
|
|
890
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
891
891
|
driverParam: unknown;
|
|
892
892
|
notNull: true;
|
|
893
893
|
hasDefault: false;
|
|
@@ -899,7 +899,7 @@ declare function cmsTables(o?: CmsTablesOptions): {
|
|
|
899
899
|
identity: undefined;
|
|
900
900
|
generated: undefined;
|
|
901
901
|
}, {}, {
|
|
902
|
-
$type: ("
|
|
902
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
903
903
|
}>;
|
|
904
904
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
905
905
|
name: "collections";
|
|
@@ -3473,7 +3473,7 @@ declare const defaultTables: {
|
|
|
3473
3473
|
tableName: string;
|
|
3474
3474
|
dataType: "json";
|
|
3475
3475
|
columnType: "PgJsonb";
|
|
3476
|
-
data: ("
|
|
3476
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
3477
3477
|
driverParam: unknown;
|
|
3478
3478
|
notNull: true;
|
|
3479
3479
|
hasDefault: false;
|
|
@@ -3485,7 +3485,7 @@ declare const defaultTables: {
|
|
|
3485
3485
|
identity: undefined;
|
|
3486
3486
|
generated: undefined;
|
|
3487
3487
|
}, {}, {
|
|
3488
|
-
$type: ("
|
|
3488
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
3489
3489
|
}>;
|
|
3490
3490
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
3491
3491
|
name: "collections";
|
|
@@ -6056,7 +6056,7 @@ declare const cmsApiKeys: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6056
6056
|
tableName: string;
|
|
6057
6057
|
dataType: "json";
|
|
6058
6058
|
columnType: "PgJsonb";
|
|
6059
|
-
data: ("
|
|
6059
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
6060
6060
|
driverParam: unknown;
|
|
6061
6061
|
notNull: true;
|
|
6062
6062
|
hasDefault: false;
|
|
@@ -6068,7 +6068,7 @@ declare const cmsApiKeys: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6068
6068
|
identity: undefined;
|
|
6069
6069
|
generated: undefined;
|
|
6070
6070
|
}, {}, {
|
|
6071
|
-
$type: ("
|
|
6071
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
6072
6072
|
}>;
|
|
6073
6073
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
6074
6074
|
name: "collections";
|
package/dist/tables.d.ts
CHANGED
|
@@ -887,7 +887,7 @@ declare function cmsTables(o?: CmsTablesOptions): {
|
|
|
887
887
|
tableName: string;
|
|
888
888
|
dataType: "json";
|
|
889
889
|
columnType: "PgJsonb";
|
|
890
|
-
data: ("
|
|
890
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
891
891
|
driverParam: unknown;
|
|
892
892
|
notNull: true;
|
|
893
893
|
hasDefault: false;
|
|
@@ -899,7 +899,7 @@ declare function cmsTables(o?: CmsTablesOptions): {
|
|
|
899
899
|
identity: undefined;
|
|
900
900
|
generated: undefined;
|
|
901
901
|
}, {}, {
|
|
902
|
-
$type: ("
|
|
902
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
903
903
|
}>;
|
|
904
904
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
905
905
|
name: "collections";
|
|
@@ -3473,7 +3473,7 @@ declare const defaultTables: {
|
|
|
3473
3473
|
tableName: string;
|
|
3474
3474
|
dataType: "json";
|
|
3475
3475
|
columnType: "PgJsonb";
|
|
3476
|
-
data: ("
|
|
3476
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
3477
3477
|
driverParam: unknown;
|
|
3478
3478
|
notNull: true;
|
|
3479
3479
|
hasDefault: false;
|
|
@@ -3485,7 +3485,7 @@ declare const defaultTables: {
|
|
|
3485
3485
|
identity: undefined;
|
|
3486
3486
|
generated: undefined;
|
|
3487
3487
|
}, {}, {
|
|
3488
|
-
$type: ("
|
|
3488
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
3489
3489
|
}>;
|
|
3490
3490
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
3491
3491
|
name: "collections";
|
|
@@ -6056,7 +6056,7 @@ declare const cmsApiKeys: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6056
6056
|
tableName: string;
|
|
6057
6057
|
dataType: "json";
|
|
6058
6058
|
columnType: "PgJsonb";
|
|
6059
|
-
data: ("
|
|
6059
|
+
data: ("write" | "publish" | "read" | "admin")[];
|
|
6060
6060
|
driverParam: unknown;
|
|
6061
6061
|
notNull: true;
|
|
6062
6062
|
hasDefault: false;
|
|
@@ -6068,7 +6068,7 @@ declare const cmsApiKeys: drizzle_orm_pg_core.PgTableWithColumns<{
|
|
|
6068
6068
|
identity: undefined;
|
|
6069
6069
|
generated: undefined;
|
|
6070
6070
|
}, {}, {
|
|
6071
|
-
$type: ("
|
|
6071
|
+
$type: ("write" | "publish" | "read" | "admin")[];
|
|
6072
6072
|
}>;
|
|
6073
6073
|
collections: drizzle_orm_pg_core.PgColumn<{
|
|
6074
6074
|
name: "collections";
|
package/package.json
CHANGED