payload 3.15.1 → 3.15.2-canary.64ffcd8
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/auth/executeAuthStrategies.d.ts.map +1 -1
- package/dist/auth/executeAuthStrategies.js +2 -0
- package/dist/auth/executeAuthStrategies.js.map +1 -1
- package/dist/auth/extractJWT.d.ts +1 -1
- package/dist/auth/extractJWT.d.ts.map +1 -1
- package/dist/auth/extractJWT.js.map +1 -1
- package/dist/auth/strategies/jwt.d.ts +3 -0
- package/dist/auth/strategies/jwt.d.ts.map +1 -1
- package/dist/auth/strategies/jwt.js +12 -7
- package/dist/auth/strategies/jwt.js.map +1 -1
- package/dist/auth/types.d.ts +4 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/auth/types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/preferences/preferencesCollection.d.ts.map +1 -1
- package/dist/preferences/preferencesCollection.js +14 -2
- package/dist/preferences/preferencesCollection.js.map +1 -1
- package/dist/preferences/requestHandlers/update.js +1 -1
- package/dist/preferences/requestHandlers/update.js.map +1 -1
- package/dist/queues/config/types/index.d.ts +36 -3
- package/dist/queues/config/types/index.d.ts.map +1 -1
- package/dist/queues/config/types/index.js.map +1 -1
- package/dist/versions/payloadPackageList.d.ts.map +1 -1
- package/dist/versions/payloadPackageList.js +1 -0
- package/dist/versions/payloadPackageList.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executeAuthStrategies.d.ts","sourceRoot":"","sources":["../../src/auth/executeAuthStrategies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE9E,eAAO,MAAM,qBAAqB,SAC1B,wBAAwB,KAC7B,OAAO,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"executeAuthStrategies.d.ts","sourceRoot":"","sources":["../../src/auth/executeAuthStrategies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAE9E,eAAO,MAAM,qBAAqB,SAC1B,wBAAwB,KAC7B,OAAO,CAAC,kBAAkB,CAc5B,CAAA"}
|
|
@@ -2,6 +2,8 @@ export const executeAuthStrategies = async (args)=>{
|
|
|
2
2
|
return args.payload.authStrategies.reduce(async (accumulatorPromise, strategy)=>{
|
|
3
3
|
const result = await accumulatorPromise;
|
|
4
4
|
if (!result.user) {
|
|
5
|
+
// add the configured AuthStrategy `name` to the strategy function args
|
|
6
|
+
args.strategyName = strategy.name;
|
|
5
7
|
return strategy.authenticate(args);
|
|
6
8
|
}
|
|
7
9
|
return result;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auth/executeAuthStrategies.ts"],"sourcesContent":["import type { AuthStrategyFunctionArgs, AuthStrategyResult } from './index.js'\n\nexport const executeAuthStrategies = async (\n args: AuthStrategyFunctionArgs,\n): Promise<AuthStrategyResult> => {\n return args.payload.authStrategies.reduce(\n async (accumulatorPromise, strategy) => {\n const result: AuthStrategyResult = await accumulatorPromise\n if (!result.user) {\n return strategy.authenticate(args)\n }\n return result\n },\n Promise.resolve({ user: null }),\n )\n}\n"],"names":["executeAuthStrategies","args","payload","authStrategies","reduce","accumulatorPromise","strategy","result","user","authenticate","Promise","resolve"],"mappings":"AAEA,OAAO,MAAMA,wBAAwB,OACnCC;IAEA,OAAOA,KAAKC,OAAO,CAACC,cAAc,CAACC,MAAM,CACvC,OAAOC,oBAAoBC;QACzB,MAAMC,SAA6B,MAAMF;QACzC,IAAI,CAACE,OAAOC,IAAI,EAAE;YAChB,
|
|
1
|
+
{"version":3,"sources":["../../src/auth/executeAuthStrategies.ts"],"sourcesContent":["import type { AuthStrategyFunctionArgs, AuthStrategyResult } from './index.js'\n\nexport const executeAuthStrategies = async (\n args: AuthStrategyFunctionArgs,\n): Promise<AuthStrategyResult> => {\n return args.payload.authStrategies.reduce(\n async (accumulatorPromise, strategy) => {\n const result: AuthStrategyResult = await accumulatorPromise\n if (!result.user) {\n // add the configured AuthStrategy `name` to the strategy function args\n args.strategyName = strategy.name\n\n return strategy.authenticate(args)\n }\n return result\n },\n Promise.resolve({ user: null }),\n )\n}\n"],"names":["executeAuthStrategies","args","payload","authStrategies","reduce","accumulatorPromise","strategy","result","user","strategyName","name","authenticate","Promise","resolve"],"mappings":"AAEA,OAAO,MAAMA,wBAAwB,OACnCC;IAEA,OAAOA,KAAKC,OAAO,CAACC,cAAc,CAACC,MAAM,CACvC,OAAOC,oBAAoBC;QACzB,MAAMC,SAA6B,MAAMF;QACzC,IAAI,CAACE,OAAOC,IAAI,EAAE;YAChB,uEAAuE;YACvEP,KAAKQ,YAAY,GAAGH,SAASI,IAAI;YAEjC,OAAOJ,SAASK,YAAY,CAACV;QAC/B;QACA,OAAOM;IACT,GACAK,QAAQC,OAAO,CAAC;QAAEL,MAAM;IAAK;AAEjC,EAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { AuthStrategyFunctionArgs } from './index.js';
|
|
2
|
-
export declare const extractJWT: (args: AuthStrategyFunctionArgs) => null | string;
|
|
2
|
+
export declare const extractJWT: (args: Omit<AuthStrategyFunctionArgs, "strategyName">) => null | string;
|
|
3
3
|
//# sourceMappingURL=extractJWT.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractJWT.d.ts","sourceRoot":"","sources":["../../src/auth/extractJWT.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAI1D,eAAO,MAAM,UAAU,SAAU,wBAAwB,KAAG,IAAI,GAAG,
|
|
1
|
+
{"version":3,"file":"extractJWT.d.ts","sourceRoot":"","sources":["../../src/auth/extractJWT.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAA;AAI1D,eAAO,MAAM,UAAU,SAAU,IAAI,CAAC,wBAAwB,EAAE,cAAc,CAAC,KAAG,IAAI,GAAG,MA4BxF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auth/extractJWT.ts"],"sourcesContent":["import type { AuthStrategyFunctionArgs } from './index.js'\n\nimport { parseCookies } from '../utilities/parseCookies.js'\n\nexport const extractJWT = (args: AuthStrategyFunctionArgs): null | string => {\n const { headers, payload } = args\n\n const jwtFromHeader = headers.get('Authorization')\n const origin = headers.get('Origin')\n\n if (jwtFromHeader?.startsWith('JWT ')) {\n return jwtFromHeader.replace('JWT ', '')\n }\n // allow RFC6750 OAuth 2.0 compliant Bearer tokens\n // in addition to the payload default JWT format\n if (jwtFromHeader?.startsWith('Bearer ')) {\n return jwtFromHeader.replace('Bearer ', '')\n }\n\n const cookies = parseCookies(headers)\n const tokenCookieName = `${payload.config.cookiePrefix}-token`\n const cookieToken = cookies.get(tokenCookieName)\n\n if (!cookieToken) {\n return null\n }\n\n if (!origin || payload.config.csrf.length === 0 || payload.config.csrf.indexOf(origin) > -1) {\n return cookieToken\n }\n\n return null\n}\n"],"names":["parseCookies","extractJWT","args","headers","payload","jwtFromHeader","get","origin","startsWith","replace","cookies","tokenCookieName","config","cookiePrefix","cookieToken","csrf","length","indexOf"],"mappings":"AAEA,SAASA,YAAY,QAAQ,+BAA8B;AAE3D,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGF;IAE7B,MAAMG,gBAAgBF,QAAQG,GAAG,CAAC;IAClC,MAAMC,SAASJ,QAAQG,GAAG,CAAC;IAE3B,IAAID,eAAeG,WAAW,SAAS;QACrC,OAAOH,cAAcI,OAAO,CAAC,QAAQ;IACvC;IACA,kDAAkD;IAClD,gDAAgD;IAChD,IAAIJ,eAAeG,WAAW,YAAY;QACxC,OAAOH,cAAcI,OAAO,CAAC,WAAW;IAC1C;IAEA,MAAMC,UAAUV,aAAaG;IAC7B,MAAMQ,kBAAkB,GAAGP,QAAQQ,MAAM,CAACC,YAAY,CAAC,MAAM,CAAC;IAC9D,MAAMC,cAAcJ,QAAQJ,GAAG,CAACK;IAEhC,IAAI,CAACG,aAAa;QAChB,OAAO;IACT;IAEA,IAAI,CAACP,UAAUH,QAAQQ,MAAM,CAACG,IAAI,CAACC,MAAM,KAAK,KAAKZ,QAAQQ,MAAM,CAACG,IAAI,CAACE,OAAO,CAACV,UAAU,CAAC,GAAG;QAC3F,OAAOO;IACT;IAEA,OAAO;AACT,EAAC"}
|
|
1
|
+
{"version":3,"sources":["../../src/auth/extractJWT.ts"],"sourcesContent":["import type { AuthStrategyFunctionArgs } from './index.js'\n\nimport { parseCookies } from '../utilities/parseCookies.js'\n\nexport const extractJWT = (args: Omit<AuthStrategyFunctionArgs, 'strategyName'>): null | string => {\n const { headers, payload } = args\n\n const jwtFromHeader = headers.get('Authorization')\n const origin = headers.get('Origin')\n\n if (jwtFromHeader?.startsWith('JWT ')) {\n return jwtFromHeader.replace('JWT ', '')\n }\n // allow RFC6750 OAuth 2.0 compliant Bearer tokens\n // in addition to the payload default JWT format\n if (jwtFromHeader?.startsWith('Bearer ')) {\n return jwtFromHeader.replace('Bearer ', '')\n }\n\n const cookies = parseCookies(headers)\n const tokenCookieName = `${payload.config.cookiePrefix}-token`\n const cookieToken = cookies.get(tokenCookieName)\n\n if (!cookieToken) {\n return null\n }\n\n if (!origin || payload.config.csrf.length === 0 || payload.config.csrf.indexOf(origin) > -1) {\n return cookieToken\n }\n\n return null\n}\n"],"names":["parseCookies","extractJWT","args","headers","payload","jwtFromHeader","get","origin","startsWith","replace","cookies","tokenCookieName","config","cookiePrefix","cookieToken","csrf","length","indexOf"],"mappings":"AAEA,SAASA,YAAY,QAAQ,+BAA8B;AAE3D,OAAO,MAAMC,aAAa,CAACC;IACzB,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAE,GAAGF;IAE7B,MAAMG,gBAAgBF,QAAQG,GAAG,CAAC;IAClC,MAAMC,SAASJ,QAAQG,GAAG,CAAC;IAE3B,IAAID,eAAeG,WAAW,SAAS;QACrC,OAAOH,cAAcI,OAAO,CAAC,QAAQ;IACvC;IACA,kDAAkD;IAClD,gDAAgD;IAChD,IAAIJ,eAAeG,WAAW,YAAY;QACxC,OAAOH,cAAcI,OAAO,CAAC,WAAW;IAC1C;IAEA,MAAMC,UAAUV,aAAaG;IAC7B,MAAMQ,kBAAkB,GAAGP,QAAQQ,MAAM,CAACC,YAAY,CAAC,MAAM,CAAC;IAC9D,MAAMC,cAAcJ,QAAQJ,GAAG,CAACK;IAEhC,IAAI,CAACG,aAAa;QAChB,OAAO;IACT;IAEA,IAAI,CAACP,UAAUH,QAAQQ,MAAM,CAACG,IAAI,CAACC,MAAM,KAAK,KAAKZ,QAAQQ,MAAM,CAACG,IAAI,CAACE,OAAO,CAACV,UAAU,CAAC,GAAG;QAC3F,OAAOO;IACT;IAEA,OAAO;AACT,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../src/auth/strategies/jwt.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAQ,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"jwt.d.ts","sourceRoot":"","sources":["../../../src/auth/strategies/jwt.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAQ,MAAM,aAAa,CAAA;AAmE7D;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,oBA4C/B,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jwtVerify } from 'jose';
|
|
2
2
|
import { extractJWT } from '../extractJWT.js';
|
|
3
|
-
async function autoLogin({ isGraphQL, payload }) {
|
|
3
|
+
async function autoLogin({ isGraphQL, payload, strategyName = 'local-jwt' }) {
|
|
4
4
|
if (typeof payload?.config?.admin?.autoLogin !== 'object' || payload.config.admin?.autoLogin.prefillOnly || !payload?.config?.admin?.autoLogin || !payload.config.admin?.autoLogin.email && !payload.config.admin?.autoLogin.username) {
|
|
5
5
|
return {
|
|
6
6
|
user: null
|
|
@@ -34,12 +34,14 @@ async function autoLogin({ isGraphQL, payload }) {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
user.collection = collection.config.slug;
|
|
37
|
-
user._strategy =
|
|
37
|
+
user._strategy = strategyName;
|
|
38
38
|
return {
|
|
39
39
|
user: user
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
/**
|
|
43
|
+
* Authentication strategy function for JWT tokens
|
|
44
|
+
*/ export const JWTAuthentication = async ({ headers, isGraphQL = false, payload, strategyName = 'local-jwt' })=>{
|
|
43
45
|
try {
|
|
44
46
|
const token = extractJWT({
|
|
45
47
|
headers,
|
|
@@ -49,7 +51,8 @@ export const JWTAuthentication = async ({ headers, isGraphQL = false, payload })
|
|
|
49
51
|
if (headers.get('DisableAutologin') !== 'true') {
|
|
50
52
|
return await autoLogin({
|
|
51
53
|
isGraphQL,
|
|
52
|
-
payload
|
|
54
|
+
payload,
|
|
55
|
+
strategyName
|
|
53
56
|
});
|
|
54
57
|
}
|
|
55
58
|
return {
|
|
@@ -66,7 +69,7 @@ export const JWTAuthentication = async ({ headers, isGraphQL = false, payload })
|
|
|
66
69
|
});
|
|
67
70
|
if (user && (!collection.config.auth.verify || user._verified)) {
|
|
68
71
|
user.collection = collection.config.slug;
|
|
69
|
-
user._strategy =
|
|
72
|
+
user._strategy = strategyName;
|
|
70
73
|
return {
|
|
71
74
|
user: user
|
|
72
75
|
};
|
|
@@ -74,7 +77,8 @@ export const JWTAuthentication = async ({ headers, isGraphQL = false, payload })
|
|
|
74
77
|
if (headers.get('DisableAutologin') !== 'true') {
|
|
75
78
|
return await autoLogin({
|
|
76
79
|
isGraphQL,
|
|
77
|
-
payload
|
|
80
|
+
payload,
|
|
81
|
+
strategyName
|
|
78
82
|
});
|
|
79
83
|
}
|
|
80
84
|
return {
|
|
@@ -85,7 +89,8 @@ export const JWTAuthentication = async ({ headers, isGraphQL = false, payload })
|
|
|
85
89
|
if (headers.get('DisableAutologin') !== 'true') {
|
|
86
90
|
return await autoLogin({
|
|
87
91
|
isGraphQL,
|
|
88
|
-
payload
|
|
92
|
+
payload,
|
|
93
|
+
strategyName
|
|
89
94
|
});
|
|
90
95
|
}
|
|
91
96
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/auth/strategies/jwt.ts"],"sourcesContent":["import { jwtVerify } from 'jose'\n\nimport type { Payload, Where } from '../../types/index.js'\nimport type { AuthStrategyFunction, User } from '../index.js'\n\nimport { extractJWT } from '../extractJWT.js'\n\ntype JWTToken = {\n collection: string\n id: string\n}\n\nasync function autoLogin({\n isGraphQL,\n payload,\n}: {\n isGraphQL: boolean\n payload: Payload\n}): Promise<{\n user: null | User\n}> {\n if (\n typeof payload?.config?.admin?.autoLogin !== 'object' ||\n payload.config.admin?.autoLogin.prefillOnly ||\n !payload?.config?.admin?.autoLogin ||\n (!payload.config.admin?.autoLogin.email && !payload.config.admin?.autoLogin.username)\n ) {\n return { user: null }\n }\n\n const collection = payload.collections[payload.config.admin.user]\n\n const where: Where = {\n or: [],\n }\n if (payload.config.admin?.autoLogin.email) {\n where.or?.push({\n email: {\n equals: payload.config.admin?.autoLogin.email,\n },\n })\n } else if (payload.config.admin?.autoLogin.username) {\n where.or?.push({\n username: {\n equals: payload.config.admin?.autoLogin.username,\n },\n })\n }\n\n const user = (\n await payload.find({\n collection: collection.config.slug,\n depth: isGraphQL ? 0 : collection.config.auth.depth,\n where,\n })\n ).docs[0]\n\n if (!user) {\n return { user: null }\n }\n user.collection = collection.config.slug\n user._strategy =
|
|
1
|
+
{"version":3,"sources":["../../../src/auth/strategies/jwt.ts"],"sourcesContent":["import { jwtVerify } from 'jose'\n\nimport type { Payload, Where } from '../../types/index.js'\nimport type { AuthStrategyFunction, User } from '../index.js'\n\nimport { extractJWT } from '../extractJWT.js'\n\ntype JWTToken = {\n collection: string\n id: string\n}\n\nasync function autoLogin({\n isGraphQL,\n payload,\n strategyName = 'local-jwt',\n}: {\n isGraphQL: boolean\n payload: Payload\n strategyName?: string\n}): Promise<{\n user: null | User\n}> {\n if (\n typeof payload?.config?.admin?.autoLogin !== 'object' ||\n payload.config.admin?.autoLogin.prefillOnly ||\n !payload?.config?.admin?.autoLogin ||\n (!payload.config.admin?.autoLogin.email && !payload.config.admin?.autoLogin.username)\n ) {\n return { user: null }\n }\n\n const collection = payload.collections[payload.config.admin.user]\n\n const where: Where = {\n or: [],\n }\n if (payload.config.admin?.autoLogin.email) {\n where.or?.push({\n email: {\n equals: payload.config.admin?.autoLogin.email,\n },\n })\n } else if (payload.config.admin?.autoLogin.username) {\n where.or?.push({\n username: {\n equals: payload.config.admin?.autoLogin.username,\n },\n })\n }\n\n const user = (\n await payload.find({\n collection: collection.config.slug,\n depth: isGraphQL ? 0 : collection.config.auth.depth,\n where,\n })\n ).docs[0]\n\n if (!user) {\n return { user: null }\n }\n user.collection = collection.config.slug\n user._strategy = strategyName\n\n return {\n user: user as User,\n }\n}\n\n/**\n * Authentication strategy function for JWT tokens\n */\nexport const JWTAuthentication: AuthStrategyFunction = async ({\n headers,\n isGraphQL = false,\n payload,\n strategyName = 'local-jwt',\n}) => {\n try {\n const token = extractJWT({ headers, payload })\n\n if (!token) {\n if (headers.get('DisableAutologin') !== 'true') {\n return await autoLogin({ isGraphQL, payload, strategyName })\n }\n return { user: null }\n }\n\n const secretKey = new TextEncoder().encode(payload.secret)\n const { payload: decodedPayload } = await jwtVerify<JWTToken>(token, secretKey)\n const collection = payload.collections[decodedPayload.collection]\n\n const user = await payload.findByID({\n id: decodedPayload.id,\n collection: decodedPayload.collection,\n depth: isGraphQL ? 0 : collection.config.auth.depth,\n })\n\n if (user && (!collection.config.auth.verify || user._verified)) {\n user.collection = collection.config.slug\n user._strategy = strategyName\n return {\n user: user as User,\n }\n } else {\n if (headers.get('DisableAutologin') !== 'true') {\n return await autoLogin({ isGraphQL, payload, strategyName })\n }\n return { user: null }\n }\n } catch (ignore) {\n if (headers.get('DisableAutologin') !== 'true') {\n return await autoLogin({ isGraphQL, payload, strategyName })\n }\n return { user: null }\n }\n}\n"],"names":["jwtVerify","extractJWT","autoLogin","isGraphQL","payload","strategyName","config","admin","prefillOnly","email","username","user","collection","collections","where","or","push","equals","find","slug","depth","auth","docs","_strategy","JWTAuthentication","headers","token","get","secretKey","TextEncoder","encode","secret","decodedPayload","findByID","id","verify","_verified","ignore"],"mappings":"AAAA,SAASA,SAAS,QAAQ,OAAM;AAKhC,SAASC,UAAU,QAAQ,mBAAkB;AAO7C,eAAeC,UAAU,EACvBC,SAAS,EACTC,OAAO,EACPC,eAAe,WAAW,EAK3B;IAGC,IACE,OAAOD,SAASE,QAAQC,OAAOL,cAAc,YAC7CE,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUM,eAChC,CAACJ,SAASE,QAAQC,OAAOL,aACxB,CAACE,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUO,SAAS,CAACL,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUQ,UAC5E;QACA,OAAO;YAAEC,MAAM;QAAK;IACtB;IAEA,MAAMC,aAAaR,QAAQS,WAAW,CAACT,QAAQE,MAAM,CAACC,KAAK,CAACI,IAAI,CAAC;IAEjE,MAAMG,QAAe;QACnBC,IAAI,EAAE;IACR;IACA,IAAIX,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUO,OAAO;QACzCK,MAAMC,EAAE,EAAEC,KAAK;YACbP,OAAO;gBACLQ,QAAQb,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUO;YAC1C;QACF;IACF,OAAO,IAAIL,QAAQE,MAAM,CAACC,KAAK,EAAEL,UAAUQ,UAAU;QACnDI,MAAMC,EAAE,EAAEC,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,CAACC,WAAWN,MAAM,CAACe,IAAI,CAACc,MAAM,IAAIxB,KAAKyB,SAAS,AAAD,GAAI;YAC9DzB,KAAKC,UAAU,GAAGA,WAAWN,MAAM,CAACa,IAAI;YACxCR,KAAKY,SAAS,GAAGlB;YACjB,OAAO;gBACLM,MAAMA;YACR;QACF,OAAO;YACL,IAAIc,QAAQE,GAAG,CAAC,wBAAwB,QAAQ;gBAC9C,OAAO,MAAMzB,UAAU;oBAAEC;oBAAWC;oBAASC;gBAAa;YAC5D;YACA,OAAO;gBAAEM,MAAM;YAAK;QACtB;IACF,EAAE,OAAO0B,QAAQ;QACf,IAAIZ,QAAQE,GAAG,CAAC,wBAAwB,QAAQ;YAC9C,OAAO,MAAMzB,UAAU;gBAAEC;gBAAWC;gBAASC;YAAa;QAC5D;QACA,OAAO;YAAEM,MAAM;QAAK;IACtB;AACF,EAAC"}
|
package/dist/auth/types.d.ts
CHANGED
|
@@ -127,6 +127,10 @@ export type AuthStrategyFunctionArgs = {
|
|
|
127
127
|
headers: Request['headers'];
|
|
128
128
|
isGraphQL?: boolean;
|
|
129
129
|
payload: Payload;
|
|
130
|
+
/**
|
|
131
|
+
* The AuthStrategy name property from the payload config.
|
|
132
|
+
*/
|
|
133
|
+
strategyName?: string;
|
|
130
134
|
};
|
|
131
135
|
export type AuthStrategyResult = {
|
|
132
136
|
responseHeaders?: Headers;
|
package/dist/auth/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/auth/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,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AAI,CAAA;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,YAAY,EAAE,CAAA;IAC3B;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB;;;OAGG;IACH,MAAM,CAAC,EACH;QACE,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;QAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;KAClD,GACD,OAAO,CAAA;CACZ;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,iBAAiB,CAAC,EAAE,uBAAuB,CAAA;IAC3C,oBAAoB,CAAC,EAAE,0BAA0B,CAAA;CAClD,CAAA;AAED,MAAM,WAAW,IACf,SAAQ,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,GAAG,QAAQ,CAAC;IAC/F,cAAc,CAAC,EAAE;QACf,UAAU,CAAC,EAAE,MAAM,CAAA;QACnB,iBAAiB,CAAC,EAAE,+BAA+B,CAAA;QACnD,oBAAoB,CAAC,EAAE,kCAAkC,CAAA;KAC1D,CAAA;IACD,iBAAiB,EAAE,KAAK,GAAG,wBAAwB,CAAA;IACnD,MAAM,CAAC,EAAE,OAAO,GAAG,YAAY,CAAA;CAChC;AAED,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,IAAI,KAAK,CAE7E"}
|
package/dist/auth/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { CollectionSlug, GlobalSlug, Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\n/**\n * A permission object that can be used to determine if a user has access to a specific operation.\n */\nexport type Permission = {\n permission: boolean\n where?: Where\n}\n\nexport type FieldsPermissions = {\n [fieldName: string]: FieldPermissions\n}\n\nexport type BlockPermissions = {\n create: Permission\n fields: FieldsPermissions\n read: Permission\n update: Permission\n}\n\nexport type SanitizedBlockPermissions =\n | {\n fields: SanitizedFieldsPermissions\n }\n | true\n\nexport type BlocksPermissions = {\n [blockSlug: string]: BlockPermissions\n}\n\nexport type SanitizedBlocksPermissions =\n | {\n [blockSlug: string]: SanitizedBlockPermissions\n }\n | true\n\nexport type FieldPermissions = {\n blocks?: BlocksPermissions\n create: Permission\n fields?: FieldsPermissions\n read: Permission\n update: Permission\n}\n\nexport type SanitizedFieldPermissions =\n | {\n blocks?: SanitizedBlocksPermissions\n create: true\n fields?: SanitizedFieldsPermissions\n read: true\n update: true\n }\n | true\n\nexport type SanitizedFieldsPermissions =\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: FieldsPermissions\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedCollectionPermission = {\n create?: true\n delete?: true\n fields: SanitizedFieldsPermissions\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type GlobalPermission = {\n fields: FieldsPermissions\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedGlobalPermission = {\n fields: SanitizedFieldsPermissions\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\n\nexport type SanitizedDocumentPermissions = SanitizedCollectionPermission | SanitizedGlobalPermission\n\nexport type Permissions = {\n canAccessAdmin: boolean\n collections?: Record<CollectionSlug, CollectionPermission>\n globals?: Record<GlobalSlug, GlobalPermission>\n}\n\nexport type SanitizedPermissions = {\n canAccessAdmin?: boolean\n collections?: {\n [collectionSlug: string]: SanitizedCollectionPermission\n }\n globals?: {\n [globalSlug: string]: SanitizedGlobalPermission\n }\n}\n\ntype BaseUser = {\n collection: string\n email?: string\n id: number | string\n username?: string\n}\n\nexport type User = {\n [key: string]: any\n} & BaseUser\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = {\n [key: string]: any\n} & BaseUser\n\ntype GenerateVerifyEmailHTML<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateVerifyEmailSubject<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailSubject<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n}\n\nexport type AuthStrategyResult = {\n responseHeaders?: Headers\n user: null | User\n}\n\nexport type AuthStrategyFunction = (\n args: AuthStrategyFunctionArgs,\n) => AuthStrategyResult | Promise<AuthStrategyResult>\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport type LoginWithUsernameOptions =\n | {\n allowEmailLogin?: false\n requireEmail?: boolean\n // If `allowEmailLogin` is false, `requireUsername` must be true (default: true)\n requireUsername?: true\n }\n | {\n allowEmailLogin?: true\n requireEmail?: boolean\n requireUsername?: boolean\n }\n\nexport interface IncomingAuthType {\n /**\n * Set cookie options, including secure, sameSite, and domain. For advanced users.\n */\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n /**\n * How many levels deep a user document should be populated when creating the JWT and binding the user to the req. Defaults to 0 and should only be modified if absolutely necessary, as this will affect performance.\n * @default 0\n */\n depth?: number\n /**\n * Advanced - disable Payload's built-in local auth strategy. Only use this property if you have replaced Payload's auth mechanisms with your own.\n */\n disableLocalStrategy?:\n | {\n /**\n * Include auth fields on the collection even though the local strategy is disabled.\n * Useful when you do not want the database or types to vary depending on the auth configuration.\n */\n enableFields?: true\n optionalPassword?: true\n }\n | true\n /**\n * Customize the way that the forgotPassword operation functions.\n * @link https://payloadcms.com/docs/authentication/email#forgot-password\n */\n forgotPassword?: {\n /**\n * The number of milliseconds that the forgot password token should be valid for.\n * @default 3600000 // 1 hour\n */\n expiration?: number\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n /**\n * Set the time (in milliseconds) that a user should be locked out if they fail authentication more times than maxLoginAttempts allows for.\n */\n lockTime?: number\n /**\n * Ability to allow users to login with username/password.\n *\n * @link https://payloadcms.com/docs/authentication/overview#login-with-username\n */\n loginWithUsername?: boolean | LoginWithUsernameOptions\n /**\n * Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to 0 to disable.\n */\n maxLoginAttempts?: number\n /***\n * Set to true if you want to remove the token from the returned authentication API responses such as login or refresh.\n */\n removeTokenFromResponses?: true\n /**\n * Advanced - an array of custom authentification strategies to extend this collection's authentication with.\n * @link https://payloadcms.com/docs/authentication/custom-strategies\n */\n strategies?: AuthStrategy[]\n /**\n * Controls how many seconds the token will be valid for. Default is 2 hours.\n * @default 7200\n * @link https://payloadcms.com/docs/authentication/overview#config-options\n */\n tokenExpiration?: number\n /**\n * Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection.\n * @default false\n * @link https://payloadcms.com/docs/authentication/api-keys\n */\n useAPIKey?: boolean\n /**\n * Set to true or pass an object with verification options to require users to verify by email before they are allowed to log into your app.\n * @link https://payloadcms.com/docs/authentication/email#email-verification\n */\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth\n extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'loginWithUsername' | 'verify'> {\n forgotPassword?: {\n expiration?: number\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n loginWithUsername: false | LoginWithUsernameOptions\n verify?: boolean | VerifyConfig\n}\n\nexport function hasWhereAccessResult(result: boolean | Where): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/auth/types.ts"],"sourcesContent":["import type { DeepRequired } from 'ts-essentials'\n\nimport type { CollectionSlug, GlobalSlug, Payload } from '../index.js'\nimport type { PayloadRequest, Where } from '../types/index.js'\n\n/**\n * A permission object that can be used to determine if a user has access to a specific operation.\n */\nexport type Permission = {\n permission: boolean\n where?: Where\n}\n\nexport type FieldsPermissions = {\n [fieldName: string]: FieldPermissions\n}\n\nexport type BlockPermissions = {\n create: Permission\n fields: FieldsPermissions\n read: Permission\n update: Permission\n}\n\nexport type SanitizedBlockPermissions =\n | {\n fields: SanitizedFieldsPermissions\n }\n | true\n\nexport type BlocksPermissions = {\n [blockSlug: string]: BlockPermissions\n}\n\nexport type SanitizedBlocksPermissions =\n | {\n [blockSlug: string]: SanitizedBlockPermissions\n }\n | true\n\nexport type FieldPermissions = {\n blocks?: BlocksPermissions\n create: Permission\n fields?: FieldsPermissions\n read: Permission\n update: Permission\n}\n\nexport type SanitizedFieldPermissions =\n | {\n blocks?: SanitizedBlocksPermissions\n create: true\n fields?: SanitizedFieldsPermissions\n read: true\n update: true\n }\n | true\n\nexport type SanitizedFieldsPermissions =\n | {\n [fieldName: string]: SanitizedFieldPermissions\n }\n | true\n\nexport type CollectionPermission = {\n create: Permission\n delete: Permission\n fields: FieldsPermissions\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedCollectionPermission = {\n create?: true\n delete?: true\n fields: SanitizedFieldsPermissions\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type GlobalPermission = {\n fields: FieldsPermissions\n read: Permission\n readVersions?: Permission\n update: Permission\n}\n\nexport type SanitizedGlobalPermission = {\n fields: SanitizedFieldsPermissions\n read?: true\n readVersions?: true\n update?: true\n}\n\nexport type DocumentPermissions = CollectionPermission | GlobalPermission\n\nexport type SanitizedDocumentPermissions = SanitizedCollectionPermission | SanitizedGlobalPermission\n\nexport type Permissions = {\n canAccessAdmin: boolean\n collections?: Record<CollectionSlug, CollectionPermission>\n globals?: Record<GlobalSlug, GlobalPermission>\n}\n\nexport type SanitizedPermissions = {\n canAccessAdmin?: boolean\n collections?: {\n [collectionSlug: string]: SanitizedCollectionPermission\n }\n globals?: {\n [globalSlug: string]: SanitizedGlobalPermission\n }\n}\n\ntype BaseUser = {\n collection: string\n email?: string\n id: number | string\n username?: string\n}\n\nexport type User = {\n [key: string]: any\n} & BaseUser\n\n/**\n * `collection` is not available one the client. It's only available on the server (req.user)\n * On the client, you can access the collection via config.admin.user. Config can be accessed using the useConfig() hook\n */\nexport type ClientUser = {\n [key: string]: any\n} & BaseUser\n\ntype GenerateVerifyEmailHTML<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateVerifyEmailSubject<TUser = any> = (args: {\n req: PayloadRequest\n token: string\n user: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailHTML<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\ntype GenerateForgotPasswordEmailSubject<TUser = any> = (args?: {\n req?: PayloadRequest\n token?: string\n user?: TUser\n}) => Promise<string> | string\n\nexport type AuthStrategyFunctionArgs = {\n headers: Request['headers']\n isGraphQL?: boolean\n payload: Payload\n /**\n * The AuthStrategy name property from the payload config.\n */\n strategyName?: string\n}\n\nexport type AuthStrategyResult = {\n responseHeaders?: Headers\n user: null | User\n}\n\nexport type AuthStrategyFunction = (\n args: AuthStrategyFunctionArgs,\n) => AuthStrategyResult | Promise<AuthStrategyResult>\nexport type AuthStrategy = {\n authenticate: AuthStrategyFunction\n name: string\n}\n\nexport type LoginWithUsernameOptions =\n | {\n allowEmailLogin?: false\n requireEmail?: boolean\n // If `allowEmailLogin` is false, `requireUsername` must be true (default: true)\n requireUsername?: true\n }\n | {\n allowEmailLogin?: true\n requireEmail?: boolean\n requireUsername?: boolean\n }\n\nexport interface IncomingAuthType {\n /**\n * Set cookie options, including secure, sameSite, and domain. For advanced users.\n */\n cookies?: {\n domain?: string\n sameSite?: 'Lax' | 'None' | 'Strict' | boolean\n secure?: boolean\n }\n /**\n * How many levels deep a user document should be populated when creating the JWT and binding the user to the req. Defaults to 0 and should only be modified if absolutely necessary, as this will affect performance.\n * @default 0\n */\n depth?: number\n /**\n * Advanced - disable Payload's built-in local auth strategy. Only use this property if you have replaced Payload's auth mechanisms with your own.\n */\n disableLocalStrategy?:\n | {\n /**\n * Include auth fields on the collection even though the local strategy is disabled.\n * Useful when you do not want the database or types to vary depending on the auth configuration.\n */\n enableFields?: true\n optionalPassword?: true\n }\n | true\n /**\n * Customize the way that the forgotPassword operation functions.\n * @link https://payloadcms.com/docs/authentication/email#forgot-password\n */\n forgotPassword?: {\n /**\n * The number of milliseconds that the forgot password token should be valid for.\n * @default 3600000 // 1 hour\n */\n expiration?: number\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n /**\n * Set the time (in milliseconds) that a user should be locked out if they fail authentication more times than maxLoginAttempts allows for.\n */\n lockTime?: number\n /**\n * Ability to allow users to login with username/password.\n *\n * @link https://payloadcms.com/docs/authentication/overview#login-with-username\n */\n loginWithUsername?: boolean | LoginWithUsernameOptions\n /**\n * Only allow a user to attempt logging in X amount of times. Automatically locks out a user from authenticating if this limit is passed. Set to 0 to disable.\n */\n maxLoginAttempts?: number\n /***\n * Set to true if you want to remove the token from the returned authentication API responses such as login or refresh.\n */\n removeTokenFromResponses?: true\n /**\n * Advanced - an array of custom authentification strategies to extend this collection's authentication with.\n * @link https://payloadcms.com/docs/authentication/custom-strategies\n */\n strategies?: AuthStrategy[]\n /**\n * Controls how many seconds the token will be valid for. Default is 2 hours.\n * @default 7200\n * @link https://payloadcms.com/docs/authentication/overview#config-options\n */\n tokenExpiration?: number\n /**\n * Payload Authentication provides for API keys to be set on each user within an Authentication-enabled Collection.\n * @default false\n * @link https://payloadcms.com/docs/authentication/api-keys\n */\n useAPIKey?: boolean\n /**\n * Set to true or pass an object with verification options to require users to verify by email before they are allowed to log into your app.\n * @link https://payloadcms.com/docs/authentication/email#email-verification\n */\n verify?:\n | {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n }\n | boolean\n}\n\nexport type VerifyConfig = {\n generateEmailHTML?: GenerateVerifyEmailHTML\n generateEmailSubject?: GenerateVerifyEmailSubject\n}\n\nexport interface Auth\n extends Omit<DeepRequired<IncomingAuthType>, 'forgotPassword' | 'loginWithUsername' | 'verify'> {\n forgotPassword?: {\n expiration?: number\n generateEmailHTML?: GenerateForgotPasswordEmailHTML\n generateEmailSubject?: GenerateForgotPasswordEmailSubject\n }\n loginWithUsername: false | LoginWithUsernameOptions\n verify?: boolean | VerifyConfig\n}\n\nexport function hasWhereAccessResult(result: boolean | Where): result is Where {\n return result && typeof result === 'object'\n}\n"],"names":["hasWhereAccessResult","result"],"mappings":"AA0SA,OAAO,SAASA,qBAAqBC,MAAuB;IAC1D,OAAOA,UAAU,OAAOA,WAAW;AACrC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -336,6 +336,7 @@ export { registerFirstUserOperation } from './auth/operations/registerFirstUser.
|
|
|
336
336
|
export { resetPasswordOperation } from './auth/operations/resetPassword.js';
|
|
337
337
|
export { unlockOperation } from './auth/operations/unlock.js';
|
|
338
338
|
export { verifyEmailOperation } from './auth/operations/verifyEmail.js';
|
|
339
|
+
export { JWTAuthentication } from './auth/strategies/jwt.js';
|
|
339
340
|
export type { AuthStrategyFunction, AuthStrategyFunctionArgs, CollectionPermission, DocumentPermissions, FieldPermissions, GlobalPermission, IncomingAuthType, Permission, Permissions, SanitizedCollectionPermission, SanitizedDocumentPermissions, SanitizedFieldPermissions, SanitizedGlobalPermission, SanitizedPermissions, User, VerifyConfig, } from './auth/types.js';
|
|
340
341
|
export { generateImportMap } from './bin/generateImportMap/index.js';
|
|
341
342
|
export type { ImportMap } from './bin/generateImportMap/index.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAC7E,OAAO,KAAK,EAAE,OAAO,IAAI,cAAc,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAC5E,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAClC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAQ7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,KAAK,EAAE,MAAM,IAAI,oBAAoB,EAAE,MAAM,qCAAqC,CAAA;AACzF,OAAO,KAAK,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,2CAA2C,CAAA;AACjG,OAAO,KAAK,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/E,OAAO,KAAK,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0CAA0C,CAAA;AAC/F,OAAO,KAAK,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjF,OAAO,KAAK,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3F,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACvE,OAAO,KAAK,EAAE,MAAM,IAAI,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AACv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AE,wBAAwB,EAAE,MAAM,8BAA8B,CAAA;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import crypto from 'crypto';
|
|
|
3
3
|
import { fileURLToPath } from 'node:url';
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import WebSocket from 'ws';
|
|
6
|
+
import { Cron } from 'croner';
|
|
6
7
|
import { decrypt, encrypt } from './auth/crypto.js';
|
|
7
8
|
import { APIKeyAuthentication } from './auth/strategies/apiKey.js';
|
|
8
9
|
import { JWTAuthentication } from './auth/strategies/jwt.js';
|
|
@@ -341,6 +342,19 @@ let checkedDependencies = false;
|
|
|
341
342
|
await this.config.onInit(this);
|
|
342
343
|
}
|
|
343
344
|
}
|
|
345
|
+
if (this.config.jobs.autoRun) {
|
|
346
|
+
const DEFAULT_CRON = '* * * * *';
|
|
347
|
+
const DEFAULT_LIMIT = 10;
|
|
348
|
+
const cronJobs = typeof this.config.jobs.autoRun === 'function' ? await this.config.jobs.autoRun(this) : this.config.jobs.autoRun;
|
|
349
|
+
await Promise.all(cronJobs.map((cronConfig)=>{
|
|
350
|
+
new Cron(cronConfig.cron ?? DEFAULT_CRON, async ()=>{
|
|
351
|
+
await this.jobs.run({
|
|
352
|
+
limit: cronConfig.limit ?? DEFAULT_LIMIT,
|
|
353
|
+
queue: cronConfig.queue
|
|
354
|
+
});
|
|
355
|
+
});
|
|
356
|
+
}));
|
|
357
|
+
}
|
|
344
358
|
return this;
|
|
345
359
|
}
|
|
346
360
|
update(options) {
|
|
@@ -479,6 +493,7 @@ export { registerFirstUserOperation } from './auth/operations/registerFirstUser.
|
|
|
479
493
|
export { resetPasswordOperation } from './auth/operations/resetPassword.js';
|
|
480
494
|
export { unlockOperation } from './auth/operations/unlock.js';
|
|
481
495
|
export { verifyEmailOperation } from './auth/operations/verifyEmail.js';
|
|
496
|
+
export { JWTAuthentication } from './auth/strategies/jwt.js';
|
|
482
497
|
export { generateImportMap } from './bin/generateImportMap/index.js';
|
|
483
498
|
export { genImportMapIterateFields } from './bin/generateImportMap/iterateFields.js';
|
|
484
499
|
export { createClientCollectionConfig, createClientCollectionConfigs } from './collections/config/client.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { ExecutionResult, GraphQLSchema, ValidationRule } from 'graphql'\nimport type { Request as graphQLRequest, OperationArgs } from 'graphql-http'\nimport type { Logger } from 'pino'\nimport type { NonNever } from 'ts-essentials'\n\nimport { spawn } from 'child_process'\nimport crypto from 'crypto'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport WebSocket from 'ws'\n\nimport type { AuthArgs } from './auth/operations/auth.js'\nimport type { Result as ForgotPasswordResult } from './auth/operations/forgotPassword.js'\nimport type { Options as ForgotPasswordOptions } from './auth/operations/local/forgotPassword.js'\nimport type { Options as LoginOptions } from './auth/operations/local/login.js'\nimport type { Options as ResetPasswordOptions } from './auth/operations/local/resetPassword.js'\nimport type { Options as UnlockOptions } from './auth/operations/local/unlock.js'\nimport type { Options as VerifyEmailOptions } from './auth/operations/local/verifyEmail.js'\nimport type { Result as LoginResult } from './auth/operations/login.js'\nimport type { Result as ResetPasswordResult } from './auth/operations/resetPassword.js'\nimport type { AuthStrategy, User } from './auth/types.js'\nimport type {\n BulkOperationResult,\n Collection,\n DataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from './collections/config/types.js'\nimport type { Options as CountOptions } from './collections/operations/local/count.js'\nimport type { Options as CreateOptions } from './collections/operations/local/create.js'\nimport type {\n ByIDOptions as DeleteByIDOptions,\n ManyOptions as DeleteManyOptions,\n Options as DeleteOptions,\n} from './collections/operations/local/delete.js'\nimport type { Options as DuplicateOptions } from './collections/operations/local/duplicate.js'\nimport type { Options as FindOptions } from './collections/operations/local/find.js'\nimport type { Options as FindByIDOptions } from './collections/operations/local/findByID.js'\nimport type { Options as FindVersionByIDOptions } from './collections/operations/local/findVersionByID.js'\nimport type { Options as FindVersionsOptions } from './collections/operations/local/findVersions.js'\nimport type { Options as RestoreVersionOptions } from './collections/operations/local/restoreVersion.js'\nimport type {\n ByIDOptions as UpdateByIDOptions,\n ManyOptions as UpdateManyOptions,\n Options as UpdateOptions,\n} from './collections/operations/local/update.js'\nimport type { InitOptions, SanitizedConfig } from './config/types.js'\nimport type { BaseDatabaseAdapter, PaginatedDocs } from './database/types.js'\nimport type { InitializedEmailAdapter } from './email/types.js'\nimport type { DataFromGlobalSlug, Globals, SelectFromGlobalSlug } from './globals/config/types.js'\nimport type { CountGlobalVersionsOptions } from './globals/operations/local/countGlobalVersions.js'\nimport type { Options as FindGlobalOptions } from './globals/operations/local/findOne.js'\nimport type { Options as FindGlobalVersionByIDOptions } from './globals/operations/local/findVersionByID.js'\nimport type { Options as FindGlobalVersionsOptions } from './globals/operations/local/findVersions.js'\nimport type { Options as RestoreGlobalVersionOptions } from './globals/operations/local/restoreVersion.js'\nimport type { Options as UpdateGlobalOptions } from './globals/operations/local/update.js'\nimport type {\n ApplyDisableErrors,\n JsonObject,\n SelectType,\n TransformCollectionWithSelect,\n TransformGlobalWithSelect,\n} from './types/index.js'\nimport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport type { FieldState } from './admin/forms/Form.js'\nimport type { TypeWithVersion } from './versions/types.js'\n\nimport { decrypt, encrypt } from './auth/crypto.js'\nimport { APIKeyAuthentication } from './auth/strategies/apiKey.js'\nimport { JWTAuthentication } from './auth/strategies/jwt.js'\nimport { generateImportMap, type ImportMap } from './bin/generateImportMap/index.js'\nimport { checkPayloadDependencies } from './checkPayloadDependencies.js'\nimport localOperations from './collections/operations/local/index.js'\nimport { consoleEmailAdapter } from './email/consoleEmailAdapter.js'\nimport { fieldAffectsData } from './fields/config/types.js'\nimport localGlobalOperations from './globals/operations/local/index.js'\nimport { getJobsLocalAPI } from './queues/localAPI.js'\nimport { getLogger } from './utilities/logger.js'\nimport { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js'\nimport { traverseFields } from './utilities/traverseFields.js'\n\nexport type * from './admin/types.js'\nexport { default as executeAccess } from './auth/executeAccess.js'\n\nexport interface GeneratedTypes {\n authUntyped: {\n [slug: string]: {\n forgotPassword: {\n email: string\n }\n login: {\n email: string\n password: string\n }\n registerFirstUser: {\n email: string\n password: string\n }\n unlock: {\n email: string\n }\n }\n }\n\n collectionsJoinsUntyped: {\n [slug: string]: {\n [schemaPath: string]: CollectionSlug\n }\n }\n collectionsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n collectionsUntyped: {\n [slug: string]: JsonObject & TypeWithID\n }\n dbUntyped: {\n defaultIDType: number | string\n }\n globalsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n globalsUntyped: {\n [slug: string]: JsonObject\n }\n jobsUntyped: {\n tasks: {\n [slug: string]: {\n input?: JsonObject\n output?: JsonObject\n }\n }\n workflows: {\n [slug: string]: {\n input: JsonObject\n }\n }\n }\n localeUntyped: null | string\n userUntyped: User\n}\n\n// Helper type to resolve the correct type using conditional types\ntype ResolveCollectionType<T> = 'collections' extends keyof T\n ? T['collections']\n : // @ts-expect-error\n T['collectionsUntyped']\n\ntype ResolveCollectionSelectType<T> = 'collectionsSelect' extends keyof T\n ? T['collectionsSelect']\n : // @ts-expect-error\n T['collectionsSelectUntyped']\n\ntype ResolveCollectionJoinsType<T> = 'collectionsJoins' extends keyof T\n ? T['collectionsJoins']\n : // @ts-expect-error\n T['collectionsJoinsUntyped']\n\ntype ResolveGlobalType<T> = 'globals' extends keyof T\n ? T['globals']\n : // @ts-expect-error\n T['globalsUntyped']\n\ntype ResolveGlobalSelectType<T> = 'globalsSelect' extends keyof T\n ? T['globalsSelect']\n : // @ts-expect-error\n T['globalsSelectUntyped']\n\n// Applying helper types to GeneratedTypes\nexport type TypedCollection = ResolveCollectionType<GeneratedTypes>\n\nexport type TypedUploadCollection = NonNever<{\n [K in keyof TypedCollection]:\n | 'filename'\n | 'filesize'\n | 'mimeType'\n | 'url' extends keyof TypedCollection[K]\n ? TypedCollection[K]\n : never\n}>\n\nexport type TypedCollectionSelect = ResolveCollectionSelectType<GeneratedTypes>\n\nexport type TypedCollectionJoins = ResolveCollectionJoinsType<GeneratedTypes>\n\nexport type TypedGlobal = ResolveGlobalType<GeneratedTypes>\n\nexport type TypedGlobalSelect = ResolveGlobalSelectType<GeneratedTypes>\n\n// Extract string keys from the type\nexport type StringKeyOf<T> = Extract<keyof T, string>\n\n// Define the types for slugs using the appropriate collections and globals\nexport type CollectionSlug = StringKeyOf<TypedCollection>\n\nexport type UploadCollectionSlug = StringKeyOf<TypedUploadCollection>\n\ntype ResolveDbType<T> = 'db' extends keyof T\n ? T['db']\n : // @ts-expect-error\n T['dbUntyped']\n\nexport type DefaultDocumentIDType = ResolveDbType<GeneratedTypes>['defaultIDType']\nexport type GlobalSlug = StringKeyOf<TypedGlobal>\n\n// now for locale and user\n\n// @ts-expect-error\ntype ResolveLocaleType<T> = 'locale' extends keyof T ? T['locale'] : T['localeUntyped']\n// @ts-expect-error\ntype ResolveUserType<T> = 'user' extends keyof T ? T['user'] : T['userUntyped']\n\nexport type TypedLocale = ResolveLocaleType<GeneratedTypes>\nexport type TypedUser = ResolveUserType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveAuthOperationsType<T> = 'auth' extends keyof T ? T['auth'] : T['authUntyped']\nexport type TypedAuthOperations = ResolveAuthOperationsType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveJobOperationsType<T> = 'jobs' extends keyof T ? T['jobs'] : T['jobsUntyped']\nexport type TypedJobs = ResolveJobOperationsType<GeneratedTypes>\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nlet checkedDependencies = false\n\n/**\n * @description Payload\n */\nexport class BasePayload {\n /**\n * @description Authorization and Authentication using headers and cookies to run auth user strategies\n * @returns permissions: Permissions\n * @returns user: User\n */\n auth = async (options: AuthArgs) => {\n const { auth } = localOperations.auth\n return auth(this, options)\n }\n\n authStrategies: AuthStrategy[]\n\n collections: Record<CollectionSlug, Collection> = {}\n\n config: SanitizedConfig\n /**\n * @description Performs count operation\n * @param options\n * @returns count of documents satisfying query\n */\n count = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { count } = localOperations\n return count(this, options)\n }\n\n /**\n * @description Performs countGlobalVersions operation\n * @param options\n * @returns count of global document versions satisfying query\n */\n countGlobalVersions = async <T extends GlobalSlug>(\n options: CountGlobalVersionsOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { countGlobalVersions } = localGlobalOperations\n return countGlobalVersions(this, options)\n }\n\n /**\n * @description Performs countVersions operation\n * @param options\n * @returns count of document versions satisfying query\n */\n countVersions = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { countVersions } = localOperations\n return countVersions(this, options)\n }\n\n /**\n * @description Performs create operation\n * @param options\n * @returns created document\n */\n create = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: CreateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n const { create } = localOperations\n return create<TSlug, TSelect>(this, options)\n }\n\n db: DatabaseAdapter\n decrypt = decrypt\n\n duplicate = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DuplicateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n const { duplicate } = localOperations\n return duplicate<TSlug, TSelect>(this, options)\n }\n\n email: InitializedEmailAdapter\n\n encrypt = encrypt\n\n // TODO: re-implement or remove?\n // errorHandler: ErrorHandler\n\n extensions: (args: {\n args: OperationArgs<any>\n req: graphQLRequest<unknown, unknown>\n result: ExecutionResult\n }) => Promise<any>\n\n /**\n * @description Find documents with criteria\n * @param options\n * @returns documents satisfying query\n */\n find = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: FindOptions<TSlug, TSelect>,\n ): Promise<PaginatedDocs<TransformCollectionWithSelect<TSlug, TSelect>>> => {\n const { find } = localOperations\n return find<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find document by ID\n * @param options\n * @returns document with specified ID\n */\n findByID = async <\n TSlug extends CollectionSlug,\n TDisableErrors extends boolean,\n TSelect extends SelectFromCollectionSlug<TSlug>,\n >(\n options: FindByIDOptions<TSlug, TDisableErrors, TSelect>,\n ): Promise<ApplyDisableErrors<TransformCollectionWithSelect<TSlug, TSelect>, TDisableErrors>> => {\n const { findByID } = localOperations\n return findByID<TSlug, TDisableErrors, TSelect>(this, options)\n }\n\n findGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: FindGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n const { findOne } = localGlobalOperations\n return findOne<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find global version by ID\n * @param options\n * @returns global version with specified ID\n */\n findGlobalVersionByID = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromGlobalSlug<TSlug>>> => {\n const { findVersionByID } = localGlobalOperations\n return findVersionByID<TSlug>(this, options)\n }\n\n /**\n * @description Find global versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findGlobalVersions = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromGlobalSlug<TSlug>>>> => {\n const { findVersions } = localGlobalOperations\n return findVersions<TSlug>(this, options)\n }\n\n /**\n * @description Find version by ID\n * @param options\n * @returns version with specified ID\n */\n findVersionByID = async <TSlug extends CollectionSlug>(\n options: FindVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromCollectionSlug<TSlug>>> => {\n const { findVersionByID } = localOperations\n return findVersionByID<TSlug>(this, options)\n }\n\n /**\n * @description Find versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findVersions = async <TSlug extends CollectionSlug>(\n options: FindVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromCollectionSlug<TSlug>>>> => {\n const { findVersions } = localOperations\n return findVersions<TSlug>(this, options)\n }\n\n forgotPassword = async <TSlug extends CollectionSlug>(\n options: ForgotPasswordOptions<TSlug>,\n ): Promise<ForgotPasswordResult> => {\n const { forgotPassword } = localOperations.auth\n return forgotPassword<TSlug>(this, options)\n }\n\n getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`\n\n getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`\n\n globals: Globals\n\n importMap: ImportMap\n\n jobs = getJobsLocalAPI(this)\n\n logger: Logger\n\n login = async <TSlug extends CollectionSlug>(\n options: LoginOptions<TSlug>,\n ): Promise<{ user: DataFromCollectionSlug<TSlug> } & LoginResult> => {\n const { login } = localOperations.auth\n return login<TSlug>(this, options)\n }\n\n resetPassword = async <TSlug extends CollectionSlug>(\n options: ResetPasswordOptions<TSlug>,\n ): Promise<ResetPasswordResult> => {\n const { resetPassword } = localOperations.auth\n return resetPassword<TSlug>(this, options)\n }\n\n /**\n * @description Restore global version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreGlobalVersion = async <TSlug extends GlobalSlug>(\n options: RestoreGlobalVersionOptions<TSlug>,\n ): Promise<DataFromGlobalSlug<TSlug>> => {\n const { restoreVersion } = localGlobalOperations\n return restoreVersion<TSlug>(this, options)\n }\n\n /**\n * @description Restore version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreVersion = async <TSlug extends CollectionSlug>(\n options: RestoreVersionOptions<TSlug>,\n ): Promise<DataFromCollectionSlug<TSlug>> => {\n const { restoreVersion } = localOperations\n return restoreVersion<TSlug>(this, options)\n }\n\n schema: GraphQLSchema\n\n secret: string\n\n sendEmail: InitializedEmailAdapter['sendEmail']\n\n types: {\n arrayTypes: any\n blockInputTypes: any\n blockTypes: any\n fallbackLocaleInputType?: any\n groupTypes: any\n localeInputType?: any\n tabTypes: any\n }\n\n unlock = async <TSlug extends CollectionSlug>(\n options: UnlockOptions<TSlug>,\n ): Promise<boolean> => {\n const { unlock } = localOperations.auth\n return unlock<TSlug>(this, options)\n }\n\n updateGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: UpdateGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n const { update } = localGlobalOperations\n return update<TSlug, TSelect>(this, options)\n }\n\n validationRules: (args: OperationArgs<any>) => ValidationRule[]\n\n verifyEmail = async <TSlug extends CollectionSlug>(\n options: VerifyEmailOptions<TSlug>,\n ): Promise<boolean> => {\n const { verifyEmail } = localOperations.auth\n return verifyEmail(this, options)\n }\n\n versions: {\n [slug: string]: any // TODO: Type this\n } = {}\n\n async bin({\n args,\n cwd,\n log,\n }: {\n args: string[]\n cwd?: string\n log?: boolean\n }): Promise<{ code: number }> {\n return new Promise((resolve, reject) => {\n const spawned = spawn('node', [path.resolve(dirname, '../bin.js'), ...args], {\n cwd,\n stdio: log || log === undefined ? 'inherit' : 'ignore',\n })\n\n spawned.on('exit', (code) => {\n resolve({ code })\n })\n\n spawned.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n /**\n * @description delete one or more documents\n * @param options\n * @returns Updated document(s)\n */\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n const { deleteLocal } = localOperations\n return deleteLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Initializes Payload\n * @param options\n */\n async init(options: InitOptions): Promise<Payload> {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkPayloadDependencies()\n }\n\n this.importMap = options.importMap\n\n if (!options?.config) {\n throw new Error('Error: the payload config is required to initialize payload.')\n }\n\n this.config = await options.config\n this.logger = getLogger('payload', this.config.logger)\n\n if (!this.config.secret) {\n throw new Error('Error: missing secret key. A secret key is needed to secure Payload.')\n }\n\n this.secret = crypto.createHash('sha256').update(this.config.secret).digest('hex').slice(0, 32)\n\n this.globals = {\n config: this.config.globals,\n }\n\n this.config.collections.forEach((collection) => {\n let customIDType = undefined\n const findCustomID: TraverseFieldsCallback = ({ field, next }) => {\n if (\n ['array', 'blocks', 'group'].includes(field.type) ||\n (field.type === 'tab' && 'name' in field)\n ) {\n return true\n }\n\n if (!fieldAffectsData(field)) {\n return\n }\n\n if (field.name === 'id') {\n customIDType = field.type\n return true\n }\n }\n\n traverseFields({ callback: findCustomID, fields: collection.fields })\n\n this.collections[collection.slug] = {\n config: collection,\n customIDType,\n }\n })\n\n // Generate types on startup\n if (process.env.NODE_ENV !== 'production' && this.config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void this.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n this.db = this.config.db.init({ payload: this })\n this.db.payload = this\n\n if (this.db?.init) {\n await this.db.init()\n }\n\n if (!options.disableDBConnect && this.db.connect) {\n await this.db.connect()\n }\n\n // Load email adapter\n if (this.config.email instanceof Promise) {\n const awaitedAdapter = await this.config.email\n this.email = awaitedAdapter({ payload: this })\n } else if (this.config.email) {\n this.email = this.config.email({ payload: this })\n } else {\n if (process.env.NEXT_PHASE !== 'phase-production-build') {\n this.logger.warn(\n `No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.`,\n )\n }\n\n this.email = consoleEmailAdapter({ payload: this })\n }\n\n // Warn if image resizing is enabled but sharp is not installed\n if (\n !this.config.sharp &&\n this.config.collections.some((c) => c.upload.imageSizes || c.upload.formatOptions)\n ) {\n this.logger.warn(\n `Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config.`,\n )\n }\n\n // Warn if user is deploying to Vercel, and any upload collection is missing a storage adapter\n if (process.env.VERCEL) {\n const uploadCollWithoutAdapter = this.config.collections.filter(\n (c) => c.upload && c.upload.adapter === undefined, // Uploads enabled, but no storage adapter provided\n )\n\n if (uploadCollWithoutAdapter.length) {\n const slugs = uploadCollWithoutAdapter.map((c) => c.slug).join(', ')\n this.logger.warn(\n `Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,\n )\n }\n }\n\n this.sendEmail = this.email['sendEmail']\n\n serverInitTelemetry(this)\n\n // 1. loop over collections, if collection has auth strategy, initialize and push to array\n let jwtStrategyEnabled = false\n this.authStrategies = this.config.collections.reduce((authStrategies, collection) => {\n if (collection?.auth) {\n if (collection.auth.strategies.length > 0) {\n authStrategies.push(...collection.auth.strategies)\n }\n\n // 2. if api key enabled, push api key strategy into the array\n if (collection.auth?.useAPIKey) {\n authStrategies.push({\n name: `${collection.slug}-api-key`,\n authenticate: APIKeyAuthentication(collection),\n })\n }\n\n // 3. if localStrategy flag is true\n if (!collection.auth.disableLocalStrategy && !jwtStrategyEnabled) {\n jwtStrategyEnabled = true\n }\n }\n\n return authStrategies\n }, [] as AuthStrategy[])\n\n // 4. if enabled, push jwt strategy into authStrategies last\n if (jwtStrategyEnabled) {\n this.authStrategies.push({\n name: 'local-jwt',\n authenticate: JWTAuthentication,\n })\n }\n\n if (!options.disableOnInit) {\n if (typeof options.onInit === 'function') {\n await options.onInit(this)\n }\n if (typeof this.config.onInit === 'function') {\n await this.config.onInit(this)\n }\n }\n\n return this\n }\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n /**\n * @description Update one or more documents\n * @param options\n * @returns Updated document(s)\n */\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n const { update } = localOperations\n return update<TSlug, TSelect>(this, options)\n }\n}\n\nconst initialized = new BasePayload()\n\nexport default initialized\n\nlet cached: {\n payload: null | Payload\n promise: null | Promise<Payload>\n reload: boolean | Promise<void>\n ws: null | WebSocket\n} = global._payload\n\nif (!cached) {\n cached = global._payload = { payload: null, promise: null, reload: false, ws: null }\n}\n\nexport const reload = async (\n config: SanitizedConfig,\n payload: Payload,\n skipImportMapGeneration?: boolean,\n): Promise<void> => {\n if (typeof payload.db.destroy === 'function') {\n await payload.db.destroy()\n }\n\n payload.config = config\n\n payload.collections = config.collections.reduce((collections, collection) => {\n collections[collection.slug] = {\n config: collection,\n customIDType: payload.collections[collection.slug]?.customIDType,\n }\n return collections\n }, {})\n\n payload.globals = {\n config: config.globals,\n }\n\n // TODO: support HMR for other props in the future (see payload/src/index init()) that may change on Payload singleton\n\n // Generate types\n if (config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void payload.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n // Generate component map\n if (skipImportMapGeneration !== true && config.admin?.importMap?.autoGenerate !== false) {\n await generateImportMap(config, {\n log: true,\n })\n }\n\n await payload.db.init()\n if (payload.db.connect) {\n await payload.db.connect({ hotReload: true })\n }\n global._payload_clientConfig = null\n global._payload_schemaMap = null\n global._payload_clientSchemaMap = null\n global._payload_doNotCacheClientConfig = true // This will help refreshing the client config cache more reliably. If you remove this, please test HMR + client config refreshing (do new fields appear in the document?)\n global._payload_doNotCacheSchemaMap = true\n global._payload_doNotCacheClientSchemaMap = true\n}\n\nexport const getPayload = async (\n options: Pick<InitOptions, 'config' | 'importMap'>,\n): Promise<Payload> => {\n if (!options?.config) {\n throw new Error('Error: the payload config is required for getPayload to work.')\n }\n\n if (cached.payload) {\n if (cached.reload === true) {\n let resolve: () => void\n\n // getPayload is called multiple times, in parallel. However, we only want to run `await reload` once. By immediately setting cached.reload to a promise,\n // we can ensure that all subsequent calls will wait for the first reload to finish. So if we set it here, the 2nd call of getPayload\n // will reach `if (cached.reload instanceof Promise) {` which then waits for the first reload to finish.\n cached.reload = new Promise((res) => (resolve = res))\n const config = await options.config\n await reload(config, cached.payload, !options.importMap)\n\n resolve()\n }\n\n if (cached.reload instanceof Promise) {\n await cached.reload\n }\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n return cached.payload\n }\n\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!cached.promise) {\n // no need to await options.config here, as it's already awaited in the BasePayload.init\n cached.promise = new BasePayload().init(options)\n }\n\n try {\n cached.payload = await cached.promise\n\n if (\n !cached.ws &&\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n process.env.DISABLE_PAYLOAD_HMR !== 'true'\n ) {\n try {\n const port = process.env.PORT || '3000'\n\n cached.ws = new WebSocket(\n `ws://localhost:${port}${process.env.NEXT_BASE_PATH ?? ''}/_next/webpack-hmr`,\n )\n\n cached.ws.onmessage = (event) => {\n if (typeof event.data === 'string') {\n const data = JSON.parse(event.data)\n\n if ('action' in data && data.action === 'serverComponentChanges') {\n cached.reload = true\n }\n }\n }\n\n cached.ws.onerror = (_) => {\n // swallow any websocket connection error\n }\n } catch (_) {\n // swallow e\n }\n }\n } catch (e) {\n cached.promise = null\n throw e\n }\n\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n\n return cached.payload\n}\n\ntype Payload = BasePayload\n\ninterface RequestContext {\n [key: string]: unknown\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatabaseAdapter extends BaseDatabaseAdapter {}\nexport type { Payload, RequestContext }\nexport { executeAuthStrategies } from './auth/executeAuthStrategies.js'\nexport { getAccessResults } from './auth/getAccessResults.js'\nexport { getFieldsToSign } from './auth/getFieldsToSign.js'\nexport * from './auth/index.js'\nexport { accessOperation } from './auth/operations/access.js'\nexport { forgotPasswordOperation } from './auth/operations/forgotPassword.js'\nexport { initOperation } from './auth/operations/init.js'\nexport { loginOperation } from './auth/operations/login.js'\nexport { logoutOperation } from './auth/operations/logout.js'\nexport type { MeOperationResult } from './auth/operations/me.js'\nexport { meOperation } from './auth/operations/me.js'\nexport { refreshOperation } from './auth/operations/refresh.js'\nexport { registerFirstUserOperation } from './auth/operations/registerFirstUser.js'\nexport { resetPasswordOperation } from './auth/operations/resetPassword.js'\nexport { unlockOperation } from './auth/operations/unlock.js'\nexport { verifyEmailOperation } from './auth/operations/verifyEmail.js'\nexport type {\n AuthStrategyFunction,\n AuthStrategyFunctionArgs,\n CollectionPermission,\n DocumentPermissions,\n FieldPermissions,\n GlobalPermission,\n IncomingAuthType,\n Permission,\n Permissions,\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedFieldPermissions,\n SanitizedGlobalPermission,\n SanitizedPermissions,\n User,\n VerifyConfig,\n} from './auth/types.js'\n\nexport { generateImportMap } from './bin/generateImportMap/index.js'\n\nexport type { ImportMap } from './bin/generateImportMap/index.js'\nexport { genImportMapIterateFields } from './bin/generateImportMap/iterateFields.js'\n\nexport {\n type ClientCollectionConfig,\n createClientCollectionConfig,\n createClientCollectionConfigs,\n type ServerOnlyCollectionAdminProperties,\n type ServerOnlyCollectionProperties,\n type ServerOnlyUploadProperties,\n} from './collections/config/client.js'\n\nexport type {\n AfterChangeHook as CollectionAfterChangeHook,\n AfterDeleteHook as CollectionAfterDeleteHook,\n AfterErrorHook as CollectionAfterErrorHook,\n AfterForgotPasswordHook as CollectionAfterForgotPasswordHook,\n AfterLoginHook as CollectionAfterLoginHook,\n AfterLogoutHook as CollectionAfterLogoutHook,\n AfterMeHook as CollectionAfterMeHook,\n AfterOperationHook as CollectionAfterOperationHook,\n AfterReadHook as CollectionAfterReadHook,\n AfterRefreshHook as CollectionAfterRefreshHook,\n AuthCollection,\n AuthOperationsFromCollectionSlug,\n BaseListFilter,\n BeforeChangeHook as CollectionBeforeChangeHook,\n BeforeDeleteHook as CollectionBeforeDeleteHook,\n BeforeLoginHook as CollectionBeforeLoginHook,\n BeforeOperationHook as CollectionBeforeOperationHook,\n BeforeReadHook as CollectionBeforeReadHook,\n BeforeValidateHook as CollectionBeforeValidateHook,\n BulkOperationResult,\n Collection,\n CollectionAdminOptions,\n CollectionConfig,\n DataFromCollectionSlug,\n HookOperationType,\n MeHook as CollectionMeHook,\n RefreshHook as CollectionRefreshHook,\n RequiredDataFromCollection,\n RequiredDataFromCollectionSlug,\n SanitizedCollectionConfig,\n SanitizedJoins,\n TypeWithID,\n TypeWithTimestamps,\n} from './collections/config/types.js'\n\nexport { createDataloaderCacheKey, getDataLoader } from './collections/dataloader.js'\nexport { countOperation } from './collections/operations/count.js'\nexport { createOperation } from './collections/operations/create.js'\nexport { deleteOperation } from './collections/operations/delete.js'\nexport { deleteByIDOperation } from './collections/operations/deleteByID.js'\nexport { docAccessOperation } from './collections/operations/docAccess.js'\nexport { duplicateOperation } from './collections/operations/duplicate.js'\nexport { findOperation } from './collections/operations/find.js'\nexport { findByIDOperation } from './collections/operations/findByID.js'\nexport { findVersionByIDOperation } from './collections/operations/findVersionByID.js'\nexport { findVersionsOperation } from './collections/operations/findVersions.js'\nexport { restoreVersionOperation } from './collections/operations/restoreVersion.js'\nexport { updateOperation } from './collections/operations/update.js'\nexport { updateByIDOperation } from './collections/operations/updateByID.js'\nexport { buildConfig } from './config/build.js'\nexport {\n type ClientConfig,\n createClientConfig,\n serverOnlyAdminConfigProperties,\n serverOnlyConfigProperties,\n} from './config/client.js'\nexport { defaults } from './config/defaults.js'\n\nexport { sanitizeConfig } from './config/sanitize.js'\nexport type * from './config/types.js'\nexport { combineQueries } from './database/combineQueries.js'\nexport { createDatabaseAdapter } from './database/createDatabaseAdapter.js'\nexport { defaultBeginTransaction } from './database/defaultBeginTransaction.js'\nexport { default as flattenWhereToOperators } from './database/flattenWhereToOperators.js'\nexport { getLocalizedPaths } from './database/getLocalizedPaths.js'\nexport { createMigration } from './database/migrations/createMigration.js'\nexport { getMigrations } from './database/migrations/getMigrations.js'\nexport { getPredefinedMigration } from './database/migrations/getPredefinedMigration.js'\nexport { migrate } from './database/migrations/migrate.js'\nexport { migrateDown } from './database/migrations/migrateDown.js'\nexport { migrateRefresh } from './database/migrations/migrateRefresh.js'\nexport { migrateReset } from './database/migrations/migrateReset.js'\nexport { migrateStatus } from './database/migrations/migrateStatus.js'\nexport { migrationsCollection } from './database/migrations/migrationsCollection.js'\nexport { migrationTemplate } from './database/migrations/migrationTemplate.js'\nexport { readMigrationFiles } from './database/migrations/readMigrationFiles.js'\nexport { writeMigrationIndex } from './database/migrations/writeMigrationIndex.js'\nexport type * from './database/queryValidation/types.js'\nexport type { EntityPolicies, PathToQuery } from './database/queryValidation/types.js'\nexport { validateQueryPaths } from './database/queryValidation/validateQueryPaths.js'\nexport { validateSearchParam } from './database/queryValidation/validateSearchParams.js'\nexport type {\n BaseDatabaseAdapter,\n BeginTransaction,\n CommitTransaction,\n Connect,\n Count,\n CountArgs,\n CountGlobalVersions,\n CountVersions,\n Create,\n CreateArgs,\n CreateGlobal,\n CreateGlobalArgs,\n CreateGlobalVersion,\n CreateGlobalVersionArgs,\n CreateMigration,\n CreateVersion,\n CreateVersionArgs,\n DatabaseAdapterResult as DatabaseAdapterObj,\n DBIdentifierName,\n DeleteMany,\n DeleteManyArgs,\n DeleteOne,\n DeleteOneArgs,\n DeleteVersions,\n DeleteVersionsArgs,\n Destroy,\n Find,\n FindArgs,\n FindGlobal,\n FindGlobalArgs,\n FindGlobalVersions,\n FindGlobalVersionsArgs,\n FindOne,\n FindOneArgs,\n FindVersions,\n FindVersionsArgs,\n GenerateSchema,\n Init,\n Migration,\n MigrationData,\n MigrationTemplateArgs,\n PaginatedDocs,\n QueryDrafts,\n QueryDraftsArgs,\n RollbackTransaction,\n Transaction,\n UpdateGlobal,\n UpdateGlobalArgs,\n UpdateGlobalVersion,\n UpdateGlobalVersionArgs,\n UpdateOne,\n UpdateOneArgs,\n UpdateVersion,\n UpdateVersionArgs,\n Upsert,\n} from './database/types.js'\nexport type { EmailAdapter as PayloadEmailAdapter, SendEmailOptions } from './email/types.js'\nexport {\n APIError,\n APIErrorName,\n AuthenticationError,\n DuplicateCollection,\n DuplicateFieldName,\n DuplicateGlobal,\n ErrorDeletingFile,\n FileRetrievalError,\n FileUploadError,\n Forbidden,\n InvalidConfiguration,\n InvalidFieldName,\n InvalidFieldRelationship,\n Locked,\n LockedAuth,\n MissingCollectionLabel,\n MissingEditorProp,\n MissingFieldInputOptions,\n MissingFieldType,\n MissingFile,\n NotFound,\n QueryError,\n ValidationError,\n ValidationErrorName,\n} from './errors/index.js'\nexport type { ValidationFieldError } from './errors/index.js'\nexport { baseBlockFields } from './fields/baseFields/baseBlockFields.js'\n\nexport { baseIDField } from './fields/baseFields/baseIDField.js'\nexport {\n createClientField,\n createClientFields,\n type ServerOnlyFieldAdminProperties,\n type ServerOnlyFieldProperties,\n} from './fields/config/client.js'\nexport { sanitizeFields } from './fields/config/sanitize.js'\nexport type {\n AdminClient,\n ArrayField,\n ArrayFieldClient,\n BaseValidateOptions,\n Block,\n BlockJSX,\n BlocksField,\n BlocksFieldClient,\n CheckboxField,\n CheckboxFieldClient,\n ClientBlock,\n ClientField,\n ClientFieldProps,\n CodeField,\n CodeFieldClient,\n CollapsibleField,\n CollapsibleFieldClient,\n Condition,\n DateField,\n DateFieldClient,\n EmailField,\n EmailFieldClient,\n Field,\n FieldAccess,\n FieldAffectingData,\n FieldAffectingDataClient,\n FieldBase,\n FieldBaseClient,\n FieldHook,\n FieldHookArgs,\n FieldPresentationalOnly,\n FieldPresentationalOnlyClient,\n FieldTypes,\n FieldWithMany,\n FieldWithManyClient,\n FieldWithMaxDepth,\n FieldWithMaxDepthClient,\n FieldWithPath,\n FieldWithPathClient,\n FieldWithSubFields,\n FieldWithSubFieldsClient,\n FilterOptions,\n FilterOptionsProps,\n FlattenedArrayField,\n FlattenedBlock,\n FlattenedBlocksField,\n FlattenedField,\n FlattenedGroupField,\n FlattenedTabAsField,\n GroupField,\n GroupFieldClient,\n HookName,\n JoinField,\n JoinFieldClient,\n JSONField,\n JSONFieldClient,\n Labels,\n LabelsClient,\n NamedTab,\n NonPresentationalField,\n NonPresentationalFieldClient,\n NumberField,\n NumberFieldClient,\n Option,\n OptionObject,\n PointField,\n PointFieldClient,\n PolymorphicRelationshipField,\n PolymorphicRelationshipFieldClient,\n RadioField,\n RadioFieldClient,\n RelationshipField,\n RelationshipFieldClient,\n RelationshipValue,\n RichTextField,\n RichTextFieldClient,\n RowField,\n RowFieldClient,\n SelectField,\n SelectFieldClient,\n SingleRelationshipField,\n SingleRelationshipFieldClient,\n Tab,\n TabAsField,\n TabAsFieldClient,\n TabsField,\n TabsFieldClient,\n TextareaField,\n TextareaFieldClient,\n TextField,\n TextFieldClient,\n UIField,\n UIFieldClient,\n UnnamedTab,\n UploadField,\n UploadFieldClient,\n Validate,\n ValidateOptions,\n ValueWithRelation,\n} from './fields/config/types.js'\nexport { getDefaultValue } from './fields/getDefaultValue.js'\n\nexport { traverseFields as afterChangeTraverseFields } from './fields/hooks/afterChange/traverseFields.js'\nexport { promise as afterReadPromise } from './fields/hooks/afterRead/promise.js'\nexport { traverseFields as afterReadTraverseFields } from './fields/hooks/afterRead/traverseFields.js'\nexport { traverseFields as beforeChangeTraverseFields } from './fields/hooks/beforeChange/traverseFields.js'\nexport { traverseFields as beforeValidateTraverseFields } from './fields/hooks/beforeValidate/traverseFields.js'\nexport { default as sortableFieldTypes } from './fields/sortableFieldTypes.js'\nexport { validations } from './fields/validations.js'\n\nexport type {\n ArrayFieldValidation,\n BlocksFieldValidation,\n CheckboxFieldValidation,\n CodeFieldValidation,\n ConfirmPasswordFieldValidation,\n DateFieldValidation,\n EmailFieldValidation,\n JSONFieldValidation,\n NumberFieldManyValidation,\n NumberFieldSingleValidation,\n NumberFieldValidation,\n PasswordFieldValidation,\n PointFieldValidation,\n RadioFieldValidation,\n RelationshipFieldManyValidation,\n RelationshipFieldSingleValidation,\n RelationshipFieldValidation,\n RichTextFieldValidation,\n SelectFieldManyValidation,\n SelectFieldSingleValidation,\n SelectFieldValidation,\n TextareaFieldValidation,\n TextFieldManyValidation,\n TextFieldSingleValidation,\n TextFieldValidation,\n UploadFieldManyValidation,\n UploadFieldSingleValidation,\n UploadFieldValidation,\n UsernameFieldValidation,\n} from './fields/validations.js'\nexport {\n type ClientGlobalConfig,\n createClientGlobalConfig,\n createClientGlobalConfigs,\n type ServerOnlyGlobalAdminProperties,\n type ServerOnlyGlobalProperties,\n} from './globals/config/client.js'\n\nexport type {\n AfterChangeHook as GlobalAfterChangeHook,\n AfterReadHook as GlobalAfterReadHook,\n BeforeChangeHook as GlobalBeforeChangeHook,\n BeforeReadHook as GlobalBeforeReadHook,\n BeforeValidateHook as GlobalBeforeValidateHook,\n DataFromGlobalSlug,\n GlobalAdminOptions,\n GlobalConfig,\n SanitizedGlobalConfig,\n} from './globals/config/types.js'\n\nexport { docAccessOperation as docAccessOperationGlobal } from './globals/operations/docAccess.js'\n\nexport { findOneOperation } from './globals/operations/findOne.js'\nexport { findVersionByIDOperation as findVersionByIDOperationGlobal } from './globals/operations/findVersionByID.js'\nexport { findVersionsOperation as findVersionsOperationGlobal } from './globals/operations/findVersions.js'\nexport { restoreVersionOperation as restoreVersionOperationGlobal } from './globals/operations/restoreVersion.js'\nexport { updateOperation as updateOperationGlobal } from './globals/operations/update.js'\nexport type {\n CollapsedPreferences,\n DocumentPreferences,\n FieldsPreferences,\n InsideFieldsPreferences,\n PreferenceRequest,\n PreferenceUpdateRequest,\n TabsPreferences,\n} from './preferences/types.js'\nexport type { JobsConfig, RunJobAccess, RunJobAccessArgs } from './queues/config/types/index.js'\nexport type {\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerArgs,\n TaskHandlerResult,\n TaskHandlerResults,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './queues/config/types/taskTypes.js'\nexport type {\n BaseJob,\n JobLog,\n JobTaskStatus,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from './queues/config/types/workflowTypes.js'\nexport { importHandlerPath } from './queues/operations/runJobs/runJob/importHandlerPath.js'\nexport { getLocalI18n } from './translations/getLocalI18n.js'\nexport * from './types/index.js'\nexport { getFileByPath } from './uploads/getFileByPath.js'\nexport type * from './uploads/types.js'\nexport { commitTransaction } from './utilities/commitTransaction.js'\nexport {\n configToJSONSchema,\n entityToJSONSchema,\n fieldsToJSONSchema,\n withNullableJSONSchemaType,\n} from './utilities/configToJSONSchema.js'\nexport { createArrayFromCommaDelineated } from './utilities/createArrayFromCommaDelineated.js'\nexport { createLocalReq } from './utilities/createLocalReq.js'\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n} from './utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from './utilities/deepMerge.js'\nexport {\n checkDependencies,\n type CustomVersionParser,\n} from './utilities/dependencies/dependencyChecker.js'\nexport { getDependencies } from './utilities/dependencies/getDependencies.js'\nexport type { FieldSchemaJSON } from './utilities/fieldSchemaToJSON.js'\nexport {\n findUp,\n findUpSync,\n pathExistsAndIsAccessible,\n pathExistsAndIsAccessibleSync,\n} from './utilities/findUp.js'\nexport { flattenAllFields } from './utilities/flattenAllFields.js'\nexport { default as flattenTopLevelFields } from './utilities/flattenTopLevelFields.js'\nexport { formatErrors } from './utilities/formatErrors.js'\nexport { formatLabels, formatNames, toWords } from './utilities/formatLabels.js'\nexport { getCollectionIDFieldTypes } from './utilities/getCollectionIDFieldTypes.js'\nexport { getObjectDotNotation } from './utilities/getObjectDotNotation.js'\nexport { initTransaction } from './utilities/initTransaction.js'\nexport { isEntityHidden } from './utilities/isEntityHidden.js'\nexport { default as isolateObjectProperty } from './utilities/isolateObjectProperty.js'\nexport { isPlainObject } from './utilities/isPlainObject.js'\nexport { isValidID } from './utilities/isValidID.js'\nexport { killTransaction } from './utilities/killTransaction.js'\nexport { logError } from './utilities/logError.js'\nexport { defaultLoggerOptions } from './utilities/logger.js'\nexport { mapAsync } from './utilities/mapAsync.js'\nexport { sanitizeFallbackLocale } from './utilities/sanitizeFallbackLocale.js'\nexport { sanitizeJoinParams } from './utilities/sanitizeJoinParams.js'\nexport { sanitizePopulateParam } from './utilities/sanitizePopulateParam.js'\nexport { sanitizeSelectParam } from './utilities/sanitizeSelectParam.js'\nexport { traverseFields } from './utilities/traverseFields.js'\nexport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport { buildVersionCollectionFields } from './versions/buildCollectionFields.js'\nexport { buildVersionGlobalFields } from './versions/buildGlobalFields.js'\nexport { versionDefaults } from './versions/defaults.js'\nexport { deleteCollectionVersions } from './versions/deleteCollectionVersions.js'\nexport { enforceMaxVersions } from './versions/enforceMaxVersions.js'\nexport { getLatestCollectionVersion } from './versions/getLatestCollectionVersion.js'\nexport { getLatestGlobalVersion } from './versions/getLatestGlobalVersion.js'\n\nexport { saveVersion } from './versions/saveVersion.js'\nexport type { SchedulePublishTaskInput } from './versions/schedule/types.js'\nexport type { TypeWithVersion } from './versions/types.js'\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["spawn","crypto","fileURLToPath","path","WebSocket","decrypt","encrypt","APIKeyAuthentication","JWTAuthentication","generateImportMap","checkPayloadDependencies","localOperations","consoleEmailAdapter","fieldAffectsData","localGlobalOperations","getJobsLocalAPI","getLogger","serverInit","serverInitTelemetry","traverseFields","default","executeAccess","filename","url","dirname","checkedDependencies","BasePayload","auth","options","authStrategies","collections","config","count","countGlobalVersions","countVersions","create","db","duplicate","email","extensions","find","findByID","findGlobal","findOne","findGlobalVersionByID","findVersionByID","findGlobalVersions","findVersions","forgotPassword","getAdminURL","serverURL","routes","admin","getAPIURL","api","globals","importMap","jobs","logger","login","resetPassword","restoreGlobalVersion","restoreVersion","schema","secret","sendEmail","types","unlock","updateGlobal","update","validationRules","verifyEmail","versions","bin","args","cwd","log","Promise","resolve","reject","spawned","stdio","undefined","on","code","error","delete","deleteLocal","init","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","Error","createHash","digest","slice","forEach","collection","customIDType","findCustomID","field","next","includes","type","name","callback","fields","slug","typescript","autoGenerate","payload","disableDBConnect","connect","awaitedAdapter","NEXT_PHASE","warn","sharp","some","c","upload","imageSizes","formatOptions","VERCEL","uploadCollWithoutAdapter","filter","adapter","length","slugs","map","join","jwtStrategyEnabled","reduce","strategies","push","useAPIKey","authenticate","disableLocalStrategy","disableOnInit","onInit","initialized","cached","global","_payload","promise","reload","ws","skipImportMapGeneration","destroy","hotReload","_payload_clientConfig","_payload_schemaMap","_payload_clientSchemaMap","_payload_doNotCacheClientConfig","_payload_doNotCacheSchemaMap","_payload_doNotCacheClientSchemaMap","getPayload","res","DISABLE_PAYLOAD_HMR","port","PORT","NEXT_BASE_PATH","onmessage","event","data","JSON","parse","action","onerror","_","e","executeAuthStrategies","getAccessResults","getFieldsToSign","accessOperation","forgotPasswordOperation","initOperation","loginOperation","logoutOperation","meOperation","refreshOperation","registerFirstUserOperation","resetPasswordOperation","unlockOperation","verifyEmailOperation","genImportMapIterateFields","createClientCollectionConfig","createClientCollectionConfigs","createDataloaderCacheKey","getDataLoader","countOperation","createOperation","deleteOperation","deleteByIDOperation","docAccessOperation","duplicateOperation","findOperation","findByIDOperation","findVersionByIDOperation","findVersionsOperation","restoreVersionOperation","updateOperation","updateByIDOperation","buildConfig","createClientConfig","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","defaults","sanitizeConfig","combineQueries","createDatabaseAdapter","defaultBeginTransaction","flattenWhereToOperators","getLocalizedPaths","createMigration","getMigrations","getPredefinedMigration","migrate","migrateDown","migrateRefresh","migrateReset","migrateStatus","migrationsCollection","migrationTemplate","readMigrationFiles","writeMigrationIndex","validateQueryPaths","validateSearchParam","APIError","APIErrorName","AuthenticationError","DuplicateCollection","DuplicateFieldName","DuplicateGlobal","ErrorDeletingFile","FileRetrievalError","FileUploadError","Forbidden","InvalidConfiguration","InvalidFieldName","InvalidFieldRelationship","Locked","LockedAuth","MissingCollectionLabel","MissingEditorProp","MissingFieldInputOptions","MissingFieldType","MissingFile","NotFound","QueryError","ValidationError","ValidationErrorName","baseBlockFields","baseIDField","createClientField","createClientFields","sanitizeFields","getDefaultValue","afterChangeTraverseFields","afterReadPromise","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","sortableFieldTypes","validations","createClientGlobalConfig","createClientGlobalConfigs","docAccessOperationGlobal","findOneOperation","findVersionByIDOperationGlobal","findVersionsOperationGlobal","restoreVersionOperationGlobal","updateOperationGlobal","importHandlerPath","getLocalI18n","getFileByPath","commitTransaction","configToJSONSchema","entityToJSONSchema","fieldsToJSONSchema","withNullableJSONSchemaType","createArrayFromCommaDelineated","createLocalReq","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","checkDependencies","getDependencies","findUp","findUpSync","pathExistsAndIsAccessible","pathExistsAndIsAccessibleSync","flattenAllFields","flattenTopLevelFields","formatErrors","formatLabels","formatNames","toWords","getCollectionIDFieldTypes","getObjectDotNotation","initTransaction","isEntityHidden","isolateObjectProperty","isPlainObject","isValidID","killTransaction","logError","defaultLoggerOptions","mapAsync","sanitizeFallbackLocale","sanitizeJoinParams","sanitizePopulateParam","sanitizeSelectParam","buildVersionCollectionFields","buildVersionGlobalFields","versionDefaults","deleteCollectionVersions","enforceMaxVersions","getLatestCollectionVersion","getLatestGlobalVersion","saveVersion","deepMergeSimple"],"mappings":"AAKA,SAASA,KAAK,QAAQ,gBAAe;AACrC,OAAOC,YAAY,SAAQ;AAC3B,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,OAAOC,eAAe,KAAI;AA0D1B,SAASC,OAAO,EAAEC,OAAO,QAAQ,mBAAkB;AACnD,SAASC,oBAAoB,QAAQ,8BAA6B;AAClE,SAASC,iBAAiB,QAAQ,2BAA0B;AAC5D,SAASC,iBAAiB,QAAwB,mCAAkC;AACpF,SAASC,wBAAwB,QAAQ,gCAA+B;AACxE,OAAOC,qBAAqB,0CAAyC;AACrE,SAASC,mBAAmB,QAAQ,iCAAgC;AACpE,SAASC,gBAAgB,QAAQ,2BAA0B;AAC3D,OAAOC,2BAA2B,sCAAqC;AACvE,SAASC,eAAe,QAAQ,uBAAsB;AACtD,SAASC,SAAS,QAAQ,wBAAuB;AACjD,SAASC,cAAcC,mBAAmB,QAAQ,6CAA4C;AAC9F,SAASC,cAAc,QAAQ,gCAA+B;AAG9D,SAASC,WAAWC,aAAa,QAAQ,0BAAyB;AA8IlE,MAAMC,WAAWpB,cAAc,YAAYqB,GAAG;AAC9C,MAAMC,UAAUrB,KAAKqB,OAAO,CAACF;AAE7B,IAAIG,sBAAsB;AAE1B;;CAEC,GACD,OAAO,MAAMC;IAC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oC;AACxE,SAASzS,cAAc,QAAQ,gCAA+B;AAE9D,SAAS0S,4BAA4B,QAAQ,sCAAqC;AAClF,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,SAASC,eAAe,QAAQ,yBAAwB;AACxD,SAASC,wBAAwB,QAAQ,yCAAwC;AACjF,SAASC,kBAAkB,QAAQ,mCAAkC;AACrE,SAASC,0BAA0B,QAAQ,2CAA0C;AACrF,SAASC,sBAAsB,QAAQ,uCAAsC;AAE7E,SAASC,WAAW,QAAQ,4BAA2B;AAGvD,SAASC,eAAe,QAAQ,qCAAoC"}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import type { ExecutionResult, GraphQLSchema, ValidationRule } from 'graphql'\nimport type { Request as graphQLRequest, OperationArgs } from 'graphql-http'\nimport type { Logger } from 'pino'\nimport type { NonNever } from 'ts-essentials'\n\nimport { spawn } from 'child_process'\nimport crypto from 'crypto'\nimport { fileURLToPath } from 'node:url'\nimport path from 'path'\nimport WebSocket from 'ws'\n\nimport type { AuthArgs } from './auth/operations/auth.js'\nimport type { Result as ForgotPasswordResult } from './auth/operations/forgotPassword.js'\nimport type { Options as ForgotPasswordOptions } from './auth/operations/local/forgotPassword.js'\nimport type { Options as LoginOptions } from './auth/operations/local/login.js'\nimport type { Options as ResetPasswordOptions } from './auth/operations/local/resetPassword.js'\nimport type { Options as UnlockOptions } from './auth/operations/local/unlock.js'\nimport type { Options as VerifyEmailOptions } from './auth/operations/local/verifyEmail.js'\nimport type { Result as LoginResult } from './auth/operations/login.js'\nimport type { Result as ResetPasswordResult } from './auth/operations/resetPassword.js'\nimport type { AuthStrategy, User } from './auth/types.js'\nimport type {\n BulkOperationResult,\n Collection,\n DataFromCollectionSlug,\n SelectFromCollectionSlug,\n TypeWithID,\n} from './collections/config/types.js'\nimport type { Options as CountOptions } from './collections/operations/local/count.js'\nimport type { Options as CreateOptions } from './collections/operations/local/create.js'\nimport type {\n ByIDOptions as DeleteByIDOptions,\n ManyOptions as DeleteManyOptions,\n Options as DeleteOptions,\n} from './collections/operations/local/delete.js'\nimport type { Options as DuplicateOptions } from './collections/operations/local/duplicate.js'\nimport type { Options as FindOptions } from './collections/operations/local/find.js'\nimport type { Options as FindByIDOptions } from './collections/operations/local/findByID.js'\nimport type { Options as FindVersionByIDOptions } from './collections/operations/local/findVersionByID.js'\nimport type { Options as FindVersionsOptions } from './collections/operations/local/findVersions.js'\nimport type { Options as RestoreVersionOptions } from './collections/operations/local/restoreVersion.js'\nimport type {\n ByIDOptions as UpdateByIDOptions,\n ManyOptions as UpdateManyOptions,\n Options as UpdateOptions,\n} from './collections/operations/local/update.js'\nimport type { InitOptions, SanitizedConfig } from './config/types.js'\nimport type { BaseDatabaseAdapter, PaginatedDocs } from './database/types.js'\nimport type { InitializedEmailAdapter } from './email/types.js'\nimport type { DataFromGlobalSlug, Globals, SelectFromGlobalSlug } from './globals/config/types.js'\nimport type { CountGlobalVersionsOptions } from './globals/operations/local/countGlobalVersions.js'\nimport type { Options as FindGlobalOptions } from './globals/operations/local/findOne.js'\nimport type { Options as FindGlobalVersionByIDOptions } from './globals/operations/local/findVersionByID.js'\nimport type { Options as FindGlobalVersionsOptions } from './globals/operations/local/findVersions.js'\nimport type { Options as RestoreGlobalVersionOptions } from './globals/operations/local/restoreVersion.js'\nimport type { Options as UpdateGlobalOptions } from './globals/operations/local/update.js'\nimport type {\n ApplyDisableErrors,\n JsonObject,\n SelectType,\n TransformCollectionWithSelect,\n TransformGlobalWithSelect,\n} from './types/index.js'\nimport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport type { FieldState } from './admin/forms/Form.js'\nimport { Cron } from 'croner'\n\nimport type { TypeWithVersion } from './versions/types.js'\n\nimport { decrypt, encrypt } from './auth/crypto.js'\nimport { APIKeyAuthentication } from './auth/strategies/apiKey.js'\nimport { JWTAuthentication } from './auth/strategies/jwt.js'\nimport { generateImportMap, type ImportMap } from './bin/generateImportMap/index.js'\nimport { checkPayloadDependencies } from './checkPayloadDependencies.js'\nimport localOperations from './collections/operations/local/index.js'\nimport { consoleEmailAdapter } from './email/consoleEmailAdapter.js'\nimport { fieldAffectsData } from './fields/config/types.js'\nimport localGlobalOperations from './globals/operations/local/index.js'\nimport { getJobsLocalAPI } from './queues/localAPI.js'\nimport { getLogger } from './utilities/logger.js'\nimport { serverInit as serverInitTelemetry } from './utilities/telemetry/events/serverInit.js'\nimport { traverseFields } from './utilities/traverseFields.js'\n\nexport type * from './admin/types.js'\nexport { default as executeAccess } from './auth/executeAccess.js'\n\nexport interface GeneratedTypes {\n authUntyped: {\n [slug: string]: {\n forgotPassword: {\n email: string\n }\n login: {\n email: string\n password: string\n }\n registerFirstUser: {\n email: string\n password: string\n }\n unlock: {\n email: string\n }\n }\n }\n\n collectionsJoinsUntyped: {\n [slug: string]: {\n [schemaPath: string]: CollectionSlug\n }\n }\n collectionsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n collectionsUntyped: {\n [slug: string]: JsonObject & TypeWithID\n }\n dbUntyped: {\n defaultIDType: number | string\n }\n globalsSelectUntyped: {\n [slug: string]: SelectType\n }\n\n globalsUntyped: {\n [slug: string]: JsonObject\n }\n jobsUntyped: {\n tasks: {\n [slug: string]: {\n input?: JsonObject\n output?: JsonObject\n }\n }\n workflows: {\n [slug: string]: {\n input: JsonObject\n }\n }\n }\n localeUntyped: null | string\n userUntyped: User\n}\n\n// Helper type to resolve the correct type using conditional types\ntype ResolveCollectionType<T> = 'collections' extends keyof T\n ? T['collections']\n : // @ts-expect-error\n T['collectionsUntyped']\n\ntype ResolveCollectionSelectType<T> = 'collectionsSelect' extends keyof T\n ? T['collectionsSelect']\n : // @ts-expect-error\n T['collectionsSelectUntyped']\n\ntype ResolveCollectionJoinsType<T> = 'collectionsJoins' extends keyof T\n ? T['collectionsJoins']\n : // @ts-expect-error\n T['collectionsJoinsUntyped']\n\ntype ResolveGlobalType<T> = 'globals' extends keyof T\n ? T['globals']\n : // @ts-expect-error\n T['globalsUntyped']\n\ntype ResolveGlobalSelectType<T> = 'globalsSelect' extends keyof T\n ? T['globalsSelect']\n : // @ts-expect-error\n T['globalsSelectUntyped']\n\n// Applying helper types to GeneratedTypes\nexport type TypedCollection = ResolveCollectionType<GeneratedTypes>\n\nexport type TypedUploadCollection = NonNever<{\n [K in keyof TypedCollection]:\n | 'filename'\n | 'filesize'\n | 'mimeType'\n | 'url' extends keyof TypedCollection[K]\n ? TypedCollection[K]\n : never\n}>\n\nexport type TypedCollectionSelect = ResolveCollectionSelectType<GeneratedTypes>\n\nexport type TypedCollectionJoins = ResolveCollectionJoinsType<GeneratedTypes>\n\nexport type TypedGlobal = ResolveGlobalType<GeneratedTypes>\n\nexport type TypedGlobalSelect = ResolveGlobalSelectType<GeneratedTypes>\n\n// Extract string keys from the type\nexport type StringKeyOf<T> = Extract<keyof T, string>\n\n// Define the types for slugs using the appropriate collections and globals\nexport type CollectionSlug = StringKeyOf<TypedCollection>\n\nexport type UploadCollectionSlug = StringKeyOf<TypedUploadCollection>\n\ntype ResolveDbType<T> = 'db' extends keyof T\n ? T['db']\n : // @ts-expect-error\n T['dbUntyped']\n\nexport type DefaultDocumentIDType = ResolveDbType<GeneratedTypes>['defaultIDType']\nexport type GlobalSlug = StringKeyOf<TypedGlobal>\n\n// now for locale and user\n\n// @ts-expect-error\ntype ResolveLocaleType<T> = 'locale' extends keyof T ? T['locale'] : T['localeUntyped']\n// @ts-expect-error\ntype ResolveUserType<T> = 'user' extends keyof T ? T['user'] : T['userUntyped']\n\nexport type TypedLocale = ResolveLocaleType<GeneratedTypes>\nexport type TypedUser = ResolveUserType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveAuthOperationsType<T> = 'auth' extends keyof T ? T['auth'] : T['authUntyped']\nexport type TypedAuthOperations = ResolveAuthOperationsType<GeneratedTypes>\n\n// @ts-expect-error\ntype ResolveJobOperationsType<T> = 'jobs' extends keyof T ? T['jobs'] : T['jobsUntyped']\nexport type TypedJobs = ResolveJobOperationsType<GeneratedTypes>\n\nconst filename = fileURLToPath(import.meta.url)\nconst dirname = path.dirname(filename)\n\nlet checkedDependencies = false\n\n/**\n * @description Payload\n */\nexport class BasePayload {\n /**\n * @description Authorization and Authentication using headers and cookies to run auth user strategies\n * @returns permissions: Permissions\n * @returns user: User\n */\n auth = async (options: AuthArgs) => {\n const { auth } = localOperations.auth\n return auth(this, options)\n }\n\n authStrategies: AuthStrategy[]\n\n collections: Record<CollectionSlug, Collection> = {}\n\n config: SanitizedConfig\n /**\n * @description Performs count operation\n * @param options\n * @returns count of documents satisfying query\n */\n count = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { count } = localOperations\n return count(this, options)\n }\n\n /**\n * @description Performs countGlobalVersions operation\n * @param options\n * @returns count of global document versions satisfying query\n */\n countGlobalVersions = async <T extends GlobalSlug>(\n options: CountGlobalVersionsOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { countGlobalVersions } = localGlobalOperations\n return countGlobalVersions(this, options)\n }\n\n /**\n * @description Performs countVersions operation\n * @param options\n * @returns count of document versions satisfying query\n */\n countVersions = async <T extends CollectionSlug>(\n options: CountOptions<T>,\n ): Promise<{ totalDocs: number }> => {\n const { countVersions } = localOperations\n return countVersions(this, options)\n }\n\n /**\n * @description Performs create operation\n * @param options\n * @returns created document\n */\n create = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: CreateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n const { create } = localOperations\n return create<TSlug, TSelect>(this, options)\n }\n\n db: DatabaseAdapter\n decrypt = decrypt\n\n duplicate = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DuplicateOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>> => {\n const { duplicate } = localOperations\n return duplicate<TSlug, TSelect>(this, options)\n }\n\n email: InitializedEmailAdapter\n\n encrypt = encrypt\n\n // TODO: re-implement or remove?\n // errorHandler: ErrorHandler\n\n extensions: (args: {\n args: OperationArgs<any>\n req: graphQLRequest<unknown, unknown>\n result: ExecutionResult\n }) => Promise<any>\n\n /**\n * @description Find documents with criteria\n * @param options\n * @returns documents satisfying query\n */\n find = async <TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: FindOptions<TSlug, TSelect>,\n ): Promise<PaginatedDocs<TransformCollectionWithSelect<TSlug, TSelect>>> => {\n const { find } = localOperations\n return find<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find document by ID\n * @param options\n * @returns document with specified ID\n */\n findByID = async <\n TSlug extends CollectionSlug,\n TDisableErrors extends boolean,\n TSelect extends SelectFromCollectionSlug<TSlug>,\n >(\n options: FindByIDOptions<TSlug, TDisableErrors, TSelect>,\n ): Promise<ApplyDisableErrors<TransformCollectionWithSelect<TSlug, TSelect>, TDisableErrors>> => {\n const { findByID } = localOperations\n return findByID<TSlug, TDisableErrors, TSelect>(this, options)\n }\n\n findGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: FindGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n const { findOne } = localGlobalOperations\n return findOne<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Find global version by ID\n * @param options\n * @returns global version with specified ID\n */\n findGlobalVersionByID = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromGlobalSlug<TSlug>>> => {\n const { findVersionByID } = localGlobalOperations\n return findVersionByID<TSlug>(this, options)\n }\n\n /**\n * @description Find global versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findGlobalVersions = async <TSlug extends GlobalSlug>(\n options: FindGlobalVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromGlobalSlug<TSlug>>>> => {\n const { findVersions } = localGlobalOperations\n return findVersions<TSlug>(this, options)\n }\n\n /**\n * @description Find version by ID\n * @param options\n * @returns version with specified ID\n */\n findVersionByID = async <TSlug extends CollectionSlug>(\n options: FindVersionByIDOptions<TSlug>,\n ): Promise<TypeWithVersion<DataFromCollectionSlug<TSlug>>> => {\n const { findVersionByID } = localOperations\n return findVersionByID<TSlug>(this, options)\n }\n\n /**\n * @description Find versions with criteria\n * @param options\n * @returns versions satisfying query\n */\n findVersions = async <TSlug extends CollectionSlug>(\n options: FindVersionsOptions<TSlug>,\n ): Promise<PaginatedDocs<TypeWithVersion<DataFromCollectionSlug<TSlug>>>> => {\n const { findVersions } = localOperations\n return findVersions<TSlug>(this, options)\n }\n\n forgotPassword = async <TSlug extends CollectionSlug>(\n options: ForgotPasswordOptions<TSlug>,\n ): Promise<ForgotPasswordResult> => {\n const { forgotPassword } = localOperations.auth\n return forgotPassword<TSlug>(this, options)\n }\n\n getAdminURL = (): string => `${this.config.serverURL}${this.config.routes.admin}`\n\n getAPIURL = (): string => `${this.config.serverURL}${this.config.routes.api}`\n\n globals: Globals\n\n importMap: ImportMap\n\n jobs = getJobsLocalAPI(this)\n\n logger: Logger\n\n login = async <TSlug extends CollectionSlug>(\n options: LoginOptions<TSlug>,\n ): Promise<{ user: DataFromCollectionSlug<TSlug> } & LoginResult> => {\n const { login } = localOperations.auth\n return login<TSlug>(this, options)\n }\n\n resetPassword = async <TSlug extends CollectionSlug>(\n options: ResetPasswordOptions<TSlug>,\n ): Promise<ResetPasswordResult> => {\n const { resetPassword } = localOperations.auth\n return resetPassword<TSlug>(this, options)\n }\n\n /**\n * @description Restore global version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreGlobalVersion = async <TSlug extends GlobalSlug>(\n options: RestoreGlobalVersionOptions<TSlug>,\n ): Promise<DataFromGlobalSlug<TSlug>> => {\n const { restoreVersion } = localGlobalOperations\n return restoreVersion<TSlug>(this, options)\n }\n\n /**\n * @description Restore version by ID\n * @param options\n * @returns version with specified ID\n */\n restoreVersion = async <TSlug extends CollectionSlug>(\n options: RestoreVersionOptions<TSlug>,\n ): Promise<DataFromCollectionSlug<TSlug>> => {\n const { restoreVersion } = localOperations\n return restoreVersion<TSlug>(this, options)\n }\n\n schema: GraphQLSchema\n\n secret: string\n\n sendEmail: InitializedEmailAdapter['sendEmail']\n\n types: {\n arrayTypes: any\n blockInputTypes: any\n blockTypes: any\n fallbackLocaleInputType?: any\n groupTypes: any\n localeInputType?: any\n tabTypes: any\n }\n\n unlock = async <TSlug extends CollectionSlug>(\n options: UnlockOptions<TSlug>,\n ): Promise<boolean> => {\n const { unlock } = localOperations.auth\n return unlock<TSlug>(this, options)\n }\n\n updateGlobal = async <TSlug extends GlobalSlug, TSelect extends SelectFromGlobalSlug<TSlug>>(\n options: UpdateGlobalOptions<TSlug, TSelect>,\n ): Promise<TransformGlobalWithSelect<TSlug, TSelect>> => {\n const { update } = localGlobalOperations\n return update<TSlug, TSelect>(this, options)\n }\n\n validationRules: (args: OperationArgs<any>) => ValidationRule[]\n\n verifyEmail = async <TSlug extends CollectionSlug>(\n options: VerifyEmailOptions<TSlug>,\n ): Promise<boolean> => {\n const { verifyEmail } = localOperations.auth\n return verifyEmail(this, options)\n }\n\n versions: {\n [slug: string]: any // TODO: Type this\n } = {}\n\n async bin({\n args,\n cwd,\n log,\n }: {\n args: string[]\n cwd?: string\n log?: boolean\n }): Promise<{ code: number }> {\n return new Promise((resolve, reject) => {\n const spawned = spawn('node', [path.resolve(dirname, '../bin.js'), ...args], {\n cwd,\n stdio: log || log === undefined ? 'inherit' : 'ignore',\n })\n\n spawned.on('exit', (code) => {\n resolve({ code })\n })\n\n spawned.on('error', (error) => {\n reject(error)\n })\n })\n }\n\n /**\n * @description delete one or more documents\n * @param options\n * @returns Updated document(s)\n */\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n delete<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: DeleteOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n const { deleteLocal } = localOperations\n return deleteLocal<TSlug, TSelect>(this, options)\n }\n\n /**\n * @description Initializes Payload\n * @param options\n */\n async init(options: InitOptions): Promise<Payload> {\n if (\n process.env.NODE_ENV !== 'production' &&\n process.env.PAYLOAD_DISABLE_DEPENDENCY_CHECKER !== 'true' &&\n !checkedDependencies\n ) {\n checkedDependencies = true\n void checkPayloadDependencies()\n }\n\n this.importMap = options.importMap\n\n if (!options?.config) {\n throw new Error('Error: the payload config is required to initialize payload.')\n }\n\n this.config = await options.config\n this.logger = getLogger('payload', this.config.logger)\n\n if (!this.config.secret) {\n throw new Error('Error: missing secret key. A secret key is needed to secure Payload.')\n }\n\n this.secret = crypto.createHash('sha256').update(this.config.secret).digest('hex').slice(0, 32)\n\n this.globals = {\n config: this.config.globals,\n }\n\n this.config.collections.forEach((collection) => {\n let customIDType = undefined\n const findCustomID: TraverseFieldsCallback = ({ field, next }) => {\n if (\n ['array', 'blocks', 'group'].includes(field.type) ||\n (field.type === 'tab' && 'name' in field)\n ) {\n return true\n }\n\n if (!fieldAffectsData(field)) {\n return\n }\n\n if (field.name === 'id') {\n customIDType = field.type\n return true\n }\n }\n\n traverseFields({ callback: findCustomID, fields: collection.fields })\n\n this.collections[collection.slug] = {\n config: collection,\n customIDType,\n }\n })\n\n // Generate types on startup\n if (process.env.NODE_ENV !== 'production' && this.config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void this.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n this.db = this.config.db.init({ payload: this })\n this.db.payload = this\n\n if (this.db?.init) {\n await this.db.init()\n }\n\n if (!options.disableDBConnect && this.db.connect) {\n await this.db.connect()\n }\n\n // Load email adapter\n if (this.config.email instanceof Promise) {\n const awaitedAdapter = await this.config.email\n this.email = awaitedAdapter({ payload: this })\n } else if (this.config.email) {\n this.email = this.config.email({ payload: this })\n } else {\n if (process.env.NEXT_PHASE !== 'phase-production-build') {\n this.logger.warn(\n `No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview.`,\n )\n }\n\n this.email = consoleEmailAdapter({ payload: this })\n }\n\n // Warn if image resizing is enabled but sharp is not installed\n if (\n !this.config.sharp &&\n this.config.collections.some((c) => c.upload.imageSizes || c.upload.formatOptions)\n ) {\n this.logger.warn(\n `Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config.`,\n )\n }\n\n // Warn if user is deploying to Vercel, and any upload collection is missing a storage adapter\n if (process.env.VERCEL) {\n const uploadCollWithoutAdapter = this.config.collections.filter(\n (c) => c.upload && c.upload.adapter === undefined, // Uploads enabled, but no storage adapter provided\n )\n\n if (uploadCollWithoutAdapter.length) {\n const slugs = uploadCollWithoutAdapter.map((c) => c.slug).join(', ')\n this.logger.warn(\n `Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${slugs}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`,\n )\n }\n }\n\n this.sendEmail = this.email['sendEmail']\n\n serverInitTelemetry(this)\n\n // 1. loop over collections, if collection has auth strategy, initialize and push to array\n let jwtStrategyEnabled = false\n this.authStrategies = this.config.collections.reduce((authStrategies, collection) => {\n if (collection?.auth) {\n if (collection.auth.strategies.length > 0) {\n authStrategies.push(...collection.auth.strategies)\n }\n\n // 2. if api key enabled, push api key strategy into the array\n if (collection.auth?.useAPIKey) {\n authStrategies.push({\n name: `${collection.slug}-api-key`,\n authenticate: APIKeyAuthentication(collection),\n })\n }\n\n // 3. if localStrategy flag is true\n if (!collection.auth.disableLocalStrategy && !jwtStrategyEnabled) {\n jwtStrategyEnabled = true\n }\n }\n\n return authStrategies\n }, [] as AuthStrategy[])\n\n // 4. if enabled, push jwt strategy into authStrategies last\n if (jwtStrategyEnabled) {\n this.authStrategies.push({\n name: 'local-jwt',\n authenticate: JWTAuthentication,\n })\n }\n\n if (!options.disableOnInit) {\n if (typeof options.onInit === 'function') {\n await options.onInit(this)\n }\n if (typeof this.config.onInit === 'function') {\n await this.config.onInit(this)\n }\n }\n if (this.config.jobs.autoRun) {\n const DEFAULT_CRON = '* * * * *'\n const DEFAULT_LIMIT = 10\n\n const cronJobs =\n typeof this.config.jobs.autoRun === 'function'\n ? await this.config.jobs.autoRun(this)\n : this.config.jobs.autoRun\n await Promise.all(\n cronJobs.map((cronConfig) => {\n new Cron(cronConfig.cron ?? DEFAULT_CRON, async () => {\n await this.jobs.run({\n limit: cronConfig.limit ?? DEFAULT_LIMIT,\n queue: cronConfig.queue,\n })\n })\n }),\n )\n }\n\n return this\n }\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateManyOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect>>\n\n /**\n * @description Update one or more documents\n * @param options\n * @returns Updated document(s)\n */\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateByIDOptions<TSlug, TSelect>,\n ): Promise<TransformCollectionWithSelect<TSlug, TSelect>>\n\n update<TSlug extends CollectionSlug, TSelect extends SelectFromCollectionSlug<TSlug>>(\n options: UpdateOptions<TSlug, TSelect>,\n ): Promise<BulkOperationResult<TSlug, TSelect> | TransformCollectionWithSelect<TSlug, TSelect>> {\n const { update } = localOperations\n return update<TSlug, TSelect>(this, options)\n }\n}\n\nconst initialized = new BasePayload()\n\nexport default initialized\n\nlet cached: {\n payload: null | Payload\n promise: null | Promise<Payload>\n reload: boolean | Promise<void>\n ws: null | WebSocket\n} = global._payload\n\nif (!cached) {\n cached = global._payload = { payload: null, promise: null, reload: false, ws: null }\n}\n\nexport const reload = async (\n config: SanitizedConfig,\n payload: Payload,\n skipImportMapGeneration?: boolean,\n): Promise<void> => {\n if (typeof payload.db.destroy === 'function') {\n await payload.db.destroy()\n }\n\n payload.config = config\n\n payload.collections = config.collections.reduce((collections, collection) => {\n collections[collection.slug] = {\n config: collection,\n customIDType: payload.collections[collection.slug]?.customIDType,\n }\n return collections\n }, {})\n\n payload.globals = {\n config: config.globals,\n }\n\n // TODO: support HMR for other props in the future (see payload/src/index init()) that may change on Payload singleton\n\n // Generate types\n if (config.typescript.autoGenerate !== false) {\n // We cannot run it directly here, as generate-types imports json-schema-to-typescript, which breaks on turbopack.\n // see: https://github.com/vercel/next.js/issues/66723\n void payload.bin({\n args: ['generate:types'],\n log: false,\n })\n }\n\n // Generate component map\n if (skipImportMapGeneration !== true && config.admin?.importMap?.autoGenerate !== false) {\n await generateImportMap(config, {\n log: true,\n })\n }\n\n await payload.db.init()\n if (payload.db.connect) {\n await payload.db.connect({ hotReload: true })\n }\n global._payload_clientConfig = null\n global._payload_schemaMap = null\n global._payload_clientSchemaMap = null\n global._payload_doNotCacheClientConfig = true // This will help refreshing the client config cache more reliably. If you remove this, please test HMR + client config refreshing (do new fields appear in the document?)\n global._payload_doNotCacheSchemaMap = true\n global._payload_doNotCacheClientSchemaMap = true\n}\n\nexport const getPayload = async (\n options: Pick<InitOptions, 'config' | 'importMap'>,\n): Promise<Payload> => {\n if (!options?.config) {\n throw new Error('Error: the payload config is required for getPayload to work.')\n }\n\n if (cached.payload) {\n if (cached.reload === true) {\n let resolve: () => void\n\n // getPayload is called multiple times, in parallel. However, we only want to run `await reload` once. By immediately setting cached.reload to a promise,\n // we can ensure that all subsequent calls will wait for the first reload to finish. So if we set it here, the 2nd call of getPayload\n // will reach `if (cached.reload instanceof Promise) {` which then waits for the first reload to finish.\n cached.reload = new Promise((res) => (resolve = res))\n const config = await options.config\n await reload(config, cached.payload, !options.importMap)\n\n resolve()\n }\n\n if (cached.reload instanceof Promise) {\n await cached.reload\n }\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n return cached.payload\n }\n\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!cached.promise) {\n // no need to await options.config here, as it's already awaited in the BasePayload.init\n cached.promise = new BasePayload().init(options)\n }\n\n try {\n cached.payload = await cached.promise\n\n if (\n !cached.ws &&\n process.env.NODE_ENV !== 'production' &&\n process.env.NODE_ENV !== 'test' &&\n process.env.DISABLE_PAYLOAD_HMR !== 'true'\n ) {\n try {\n const port = process.env.PORT || '3000'\n\n cached.ws = new WebSocket(\n `ws://localhost:${port}${process.env.NEXT_BASE_PATH ?? ''}/_next/webpack-hmr`,\n )\n\n cached.ws.onmessage = (event) => {\n if (typeof event.data === 'string') {\n const data = JSON.parse(event.data)\n\n if ('action' in data && data.action === 'serverComponentChanges') {\n cached.reload = true\n }\n }\n }\n\n cached.ws.onerror = (_) => {\n // swallow any websocket connection error\n }\n } catch (_) {\n // swallow e\n }\n }\n } catch (e) {\n cached.promise = null\n throw e\n }\n\n if (options?.importMap) {\n cached.payload.importMap = options.importMap\n }\n\n return cached.payload\n}\n\ntype Payload = BasePayload\n\ninterface RequestContext {\n [key: string]: unknown\n}\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface DatabaseAdapter extends BaseDatabaseAdapter {}\nexport type { Payload, RequestContext }\nexport { executeAuthStrategies } from './auth/executeAuthStrategies.js'\nexport { getAccessResults } from './auth/getAccessResults.js'\nexport { getFieldsToSign } from './auth/getFieldsToSign.js'\nexport * from './auth/index.js'\nexport { accessOperation } from './auth/operations/access.js'\nexport { forgotPasswordOperation } from './auth/operations/forgotPassword.js'\nexport { initOperation } from './auth/operations/init.js'\nexport { loginOperation } from './auth/operations/login.js'\nexport { logoutOperation } from './auth/operations/logout.js'\nexport type { MeOperationResult } from './auth/operations/me.js'\nexport { meOperation } from './auth/operations/me.js'\nexport { refreshOperation } from './auth/operations/refresh.js'\nexport { registerFirstUserOperation } from './auth/operations/registerFirstUser.js'\nexport { resetPasswordOperation } from './auth/operations/resetPassword.js'\nexport { unlockOperation } from './auth/operations/unlock.js'\nexport { verifyEmailOperation } from './auth/operations/verifyEmail.js'\nexport { JWTAuthentication } from './auth/strategies/jwt.js'\nexport type {\n AuthStrategyFunction,\n AuthStrategyFunctionArgs,\n CollectionPermission,\n DocumentPermissions,\n FieldPermissions,\n GlobalPermission,\n IncomingAuthType,\n Permission,\n Permissions,\n SanitizedCollectionPermission,\n SanitizedDocumentPermissions,\n SanitizedFieldPermissions,\n SanitizedGlobalPermission,\n SanitizedPermissions,\n User,\n VerifyConfig,\n} from './auth/types.js'\n\nexport { generateImportMap } from './bin/generateImportMap/index.js'\n\nexport type { ImportMap } from './bin/generateImportMap/index.js'\nexport { genImportMapIterateFields } from './bin/generateImportMap/iterateFields.js'\n\nexport {\n type ClientCollectionConfig,\n createClientCollectionConfig,\n createClientCollectionConfigs,\n type ServerOnlyCollectionAdminProperties,\n type ServerOnlyCollectionProperties,\n type ServerOnlyUploadProperties,\n} from './collections/config/client.js'\n\nexport type {\n AfterChangeHook as CollectionAfterChangeHook,\n AfterDeleteHook as CollectionAfterDeleteHook,\n AfterErrorHook as CollectionAfterErrorHook,\n AfterForgotPasswordHook as CollectionAfterForgotPasswordHook,\n AfterLoginHook as CollectionAfterLoginHook,\n AfterLogoutHook as CollectionAfterLogoutHook,\n AfterMeHook as CollectionAfterMeHook,\n AfterOperationHook as CollectionAfterOperationHook,\n AfterReadHook as CollectionAfterReadHook,\n AfterRefreshHook as CollectionAfterRefreshHook,\n AuthCollection,\n AuthOperationsFromCollectionSlug,\n BaseListFilter,\n BeforeChangeHook as CollectionBeforeChangeHook,\n BeforeDeleteHook as CollectionBeforeDeleteHook,\n BeforeLoginHook as CollectionBeforeLoginHook,\n BeforeOperationHook as CollectionBeforeOperationHook,\n BeforeReadHook as CollectionBeforeReadHook,\n BeforeValidateHook as CollectionBeforeValidateHook,\n BulkOperationResult,\n Collection,\n CollectionAdminOptions,\n CollectionConfig,\n DataFromCollectionSlug,\n HookOperationType,\n MeHook as CollectionMeHook,\n RefreshHook as CollectionRefreshHook,\n RequiredDataFromCollection,\n RequiredDataFromCollectionSlug,\n SanitizedCollectionConfig,\n SanitizedJoins,\n TypeWithID,\n TypeWithTimestamps,\n} from './collections/config/types.js'\n\nexport { createDataloaderCacheKey, getDataLoader } from './collections/dataloader.js'\nexport { countOperation } from './collections/operations/count.js'\nexport { createOperation } from './collections/operations/create.js'\nexport { deleteOperation } from './collections/operations/delete.js'\nexport { deleteByIDOperation } from './collections/operations/deleteByID.js'\nexport { docAccessOperation } from './collections/operations/docAccess.js'\nexport { duplicateOperation } from './collections/operations/duplicate.js'\nexport { findOperation } from './collections/operations/find.js'\nexport { findByIDOperation } from './collections/operations/findByID.js'\nexport { findVersionByIDOperation } from './collections/operations/findVersionByID.js'\nexport { findVersionsOperation } from './collections/operations/findVersions.js'\nexport { restoreVersionOperation } from './collections/operations/restoreVersion.js'\nexport { updateOperation } from './collections/operations/update.js'\nexport { updateByIDOperation } from './collections/operations/updateByID.js'\nexport { buildConfig } from './config/build.js'\nexport {\n type ClientConfig,\n createClientConfig,\n serverOnlyAdminConfigProperties,\n serverOnlyConfigProperties,\n} from './config/client.js'\nexport { defaults } from './config/defaults.js'\n\nexport { sanitizeConfig } from './config/sanitize.js'\nexport type * from './config/types.js'\nexport { combineQueries } from './database/combineQueries.js'\nexport { createDatabaseAdapter } from './database/createDatabaseAdapter.js'\nexport { defaultBeginTransaction } from './database/defaultBeginTransaction.js'\nexport { default as flattenWhereToOperators } from './database/flattenWhereToOperators.js'\nexport { getLocalizedPaths } from './database/getLocalizedPaths.js'\nexport { createMigration } from './database/migrations/createMigration.js'\nexport { getMigrations } from './database/migrations/getMigrations.js'\nexport { getPredefinedMigration } from './database/migrations/getPredefinedMigration.js'\nexport { migrate } from './database/migrations/migrate.js'\nexport { migrateDown } from './database/migrations/migrateDown.js'\nexport { migrateRefresh } from './database/migrations/migrateRefresh.js'\nexport { migrateReset } from './database/migrations/migrateReset.js'\nexport { migrateStatus } from './database/migrations/migrateStatus.js'\nexport { migrationsCollection } from './database/migrations/migrationsCollection.js'\nexport { migrationTemplate } from './database/migrations/migrationTemplate.js'\nexport { readMigrationFiles } from './database/migrations/readMigrationFiles.js'\nexport { writeMigrationIndex } from './database/migrations/writeMigrationIndex.js'\nexport type * from './database/queryValidation/types.js'\nexport type { EntityPolicies, PathToQuery } from './database/queryValidation/types.js'\nexport { validateQueryPaths } from './database/queryValidation/validateQueryPaths.js'\nexport { validateSearchParam } from './database/queryValidation/validateSearchParams.js'\nexport type {\n BaseDatabaseAdapter,\n BeginTransaction,\n CommitTransaction,\n Connect,\n Count,\n CountArgs,\n CountGlobalVersions,\n CountVersions,\n Create,\n CreateArgs,\n CreateGlobal,\n CreateGlobalArgs,\n CreateGlobalVersion,\n CreateGlobalVersionArgs,\n CreateMigration,\n CreateVersion,\n CreateVersionArgs,\n DatabaseAdapterResult as DatabaseAdapterObj,\n DBIdentifierName,\n DeleteMany,\n DeleteManyArgs,\n DeleteOne,\n DeleteOneArgs,\n DeleteVersions,\n DeleteVersionsArgs,\n Destroy,\n Find,\n FindArgs,\n FindGlobal,\n FindGlobalArgs,\n FindGlobalVersions,\n FindGlobalVersionsArgs,\n FindOne,\n FindOneArgs,\n FindVersions,\n FindVersionsArgs,\n GenerateSchema,\n Init,\n Migration,\n MigrationData,\n MigrationTemplateArgs,\n PaginatedDocs,\n QueryDrafts,\n QueryDraftsArgs,\n RollbackTransaction,\n Transaction,\n UpdateGlobal,\n UpdateGlobalArgs,\n UpdateGlobalVersion,\n UpdateGlobalVersionArgs,\n UpdateOne,\n UpdateOneArgs,\n UpdateVersion,\n UpdateVersionArgs,\n Upsert,\n} from './database/types.js'\nexport type { EmailAdapter as PayloadEmailAdapter, SendEmailOptions } from './email/types.js'\nexport {\n APIError,\n APIErrorName,\n AuthenticationError,\n DuplicateCollection,\n DuplicateFieldName,\n DuplicateGlobal,\n ErrorDeletingFile,\n FileRetrievalError,\n FileUploadError,\n Forbidden,\n InvalidConfiguration,\n InvalidFieldName,\n InvalidFieldRelationship,\n Locked,\n LockedAuth,\n MissingCollectionLabel,\n MissingEditorProp,\n MissingFieldInputOptions,\n MissingFieldType,\n MissingFile,\n NotFound,\n QueryError,\n ValidationError,\n ValidationErrorName,\n} from './errors/index.js'\nexport type { ValidationFieldError } from './errors/index.js'\nexport { baseBlockFields } from './fields/baseFields/baseBlockFields.js'\n\nexport { baseIDField } from './fields/baseFields/baseIDField.js'\nexport {\n createClientField,\n createClientFields,\n type ServerOnlyFieldAdminProperties,\n type ServerOnlyFieldProperties,\n} from './fields/config/client.js'\nexport { sanitizeFields } from './fields/config/sanitize.js'\nexport type {\n AdminClient,\n ArrayField,\n ArrayFieldClient,\n BaseValidateOptions,\n Block,\n BlockJSX,\n BlocksField,\n BlocksFieldClient,\n CheckboxField,\n CheckboxFieldClient,\n ClientBlock,\n ClientField,\n ClientFieldProps,\n CodeField,\n CodeFieldClient,\n CollapsibleField,\n CollapsibleFieldClient,\n Condition,\n DateField,\n DateFieldClient,\n EmailField,\n EmailFieldClient,\n Field,\n FieldAccess,\n FieldAffectingData,\n FieldAffectingDataClient,\n FieldBase,\n FieldBaseClient,\n FieldHook,\n FieldHookArgs,\n FieldPresentationalOnly,\n FieldPresentationalOnlyClient,\n FieldTypes,\n FieldWithMany,\n FieldWithManyClient,\n FieldWithMaxDepth,\n FieldWithMaxDepthClient,\n FieldWithPath,\n FieldWithPathClient,\n FieldWithSubFields,\n FieldWithSubFieldsClient,\n FilterOptions,\n FilterOptionsProps,\n FlattenedArrayField,\n FlattenedBlock,\n FlattenedBlocksField,\n FlattenedField,\n FlattenedGroupField,\n FlattenedTabAsField,\n GroupField,\n GroupFieldClient,\n HookName,\n JoinField,\n JoinFieldClient,\n JSONField,\n JSONFieldClient,\n Labels,\n LabelsClient,\n NamedTab,\n NonPresentationalField,\n NonPresentationalFieldClient,\n NumberField,\n NumberFieldClient,\n Option,\n OptionObject,\n PointField,\n PointFieldClient,\n PolymorphicRelationshipField,\n PolymorphicRelationshipFieldClient,\n RadioField,\n RadioFieldClient,\n RelationshipField,\n RelationshipFieldClient,\n RelationshipValue,\n RichTextField,\n RichTextFieldClient,\n RowField,\n RowFieldClient,\n SelectField,\n SelectFieldClient,\n SingleRelationshipField,\n SingleRelationshipFieldClient,\n Tab,\n TabAsField,\n TabAsFieldClient,\n TabsField,\n TabsFieldClient,\n TextareaField,\n TextareaFieldClient,\n TextField,\n TextFieldClient,\n UIField,\n UIFieldClient,\n UnnamedTab,\n UploadField,\n UploadFieldClient,\n Validate,\n ValidateOptions,\n ValueWithRelation,\n} from './fields/config/types.js'\nexport { getDefaultValue } from './fields/getDefaultValue.js'\n\nexport { traverseFields as afterChangeTraverseFields } from './fields/hooks/afterChange/traverseFields.js'\nexport { promise as afterReadPromise } from './fields/hooks/afterRead/promise.js'\nexport { traverseFields as afterReadTraverseFields } from './fields/hooks/afterRead/traverseFields.js'\nexport { traverseFields as beforeChangeTraverseFields } from './fields/hooks/beforeChange/traverseFields.js'\nexport { traverseFields as beforeValidateTraverseFields } from './fields/hooks/beforeValidate/traverseFields.js'\nexport { default as sortableFieldTypes } from './fields/sortableFieldTypes.js'\nexport { validations } from './fields/validations.js'\n\nexport type {\n ArrayFieldValidation,\n BlocksFieldValidation,\n CheckboxFieldValidation,\n CodeFieldValidation,\n ConfirmPasswordFieldValidation,\n DateFieldValidation,\n EmailFieldValidation,\n JSONFieldValidation,\n NumberFieldManyValidation,\n NumberFieldSingleValidation,\n NumberFieldValidation,\n PasswordFieldValidation,\n PointFieldValidation,\n RadioFieldValidation,\n RelationshipFieldManyValidation,\n RelationshipFieldSingleValidation,\n RelationshipFieldValidation,\n RichTextFieldValidation,\n SelectFieldManyValidation,\n SelectFieldSingleValidation,\n SelectFieldValidation,\n TextareaFieldValidation,\n TextFieldManyValidation,\n TextFieldSingleValidation,\n TextFieldValidation,\n UploadFieldManyValidation,\n UploadFieldSingleValidation,\n UploadFieldValidation,\n UsernameFieldValidation,\n} from './fields/validations.js'\nexport {\n type ClientGlobalConfig,\n createClientGlobalConfig,\n createClientGlobalConfigs,\n type ServerOnlyGlobalAdminProperties,\n type ServerOnlyGlobalProperties,\n} from './globals/config/client.js'\n\nexport type {\n AfterChangeHook as GlobalAfterChangeHook,\n AfterReadHook as GlobalAfterReadHook,\n BeforeChangeHook as GlobalBeforeChangeHook,\n BeforeReadHook as GlobalBeforeReadHook,\n BeforeValidateHook as GlobalBeforeValidateHook,\n DataFromGlobalSlug,\n GlobalAdminOptions,\n GlobalConfig,\n SanitizedGlobalConfig,\n} from './globals/config/types.js'\n\nexport { docAccessOperation as docAccessOperationGlobal } from './globals/operations/docAccess.js'\n\nexport { findOneOperation } from './globals/operations/findOne.js'\nexport { findVersionByIDOperation as findVersionByIDOperationGlobal } from './globals/operations/findVersionByID.js'\nexport { findVersionsOperation as findVersionsOperationGlobal } from './globals/operations/findVersions.js'\nexport { restoreVersionOperation as restoreVersionOperationGlobal } from './globals/operations/restoreVersion.js'\nexport { updateOperation as updateOperationGlobal } from './globals/operations/update.js'\nexport type {\n CollapsedPreferences,\n DocumentPreferences,\n FieldsPreferences,\n InsideFieldsPreferences,\n PreferenceRequest,\n PreferenceUpdateRequest,\n TabsPreferences,\n} from './preferences/types.js'\nexport type { JobsConfig, RunJobAccess, RunJobAccessArgs } from './queues/config/types/index.js'\nexport type {\n RunInlineTaskFunction,\n RunTaskFunction,\n RunTaskFunctions,\n TaskConfig,\n TaskHandler,\n TaskHandlerArgs,\n TaskHandlerResult,\n TaskHandlerResults,\n TaskInput,\n TaskOutput,\n TaskType,\n} from './queues/config/types/taskTypes.js'\nexport type {\n BaseJob,\n JobLog,\n JobTaskStatus,\n RunningJob,\n SingleTaskStatus,\n WorkflowConfig,\n WorkflowHandler,\n WorkflowTypes,\n} from './queues/config/types/workflowTypes.js'\nexport { importHandlerPath } from './queues/operations/runJobs/runJob/importHandlerPath.js'\nexport { getLocalI18n } from './translations/getLocalI18n.js'\nexport * from './types/index.js'\nexport { getFileByPath } from './uploads/getFileByPath.js'\nexport type * from './uploads/types.js'\nexport { commitTransaction } from './utilities/commitTransaction.js'\nexport {\n configToJSONSchema,\n entityToJSONSchema,\n fieldsToJSONSchema,\n withNullableJSONSchemaType,\n} from './utilities/configToJSONSchema.js'\nexport { createArrayFromCommaDelineated } from './utilities/createArrayFromCommaDelineated.js'\nexport { createLocalReq } from './utilities/createLocalReq.js'\nexport {\n deepCopyObject,\n deepCopyObjectComplex,\n deepCopyObjectSimple,\n} from './utilities/deepCopyObject.js'\nexport {\n deepMerge,\n deepMergeWithCombinedArrays,\n deepMergeWithReactComponents,\n deepMergeWithSourceArrays,\n} from './utilities/deepMerge.js'\nexport {\n checkDependencies,\n type CustomVersionParser,\n} from './utilities/dependencies/dependencyChecker.js'\nexport { getDependencies } from './utilities/dependencies/getDependencies.js'\nexport type { FieldSchemaJSON } from './utilities/fieldSchemaToJSON.js'\nexport {\n findUp,\n findUpSync,\n pathExistsAndIsAccessible,\n pathExistsAndIsAccessibleSync,\n} from './utilities/findUp.js'\nexport { flattenAllFields } from './utilities/flattenAllFields.js'\nexport { default as flattenTopLevelFields } from './utilities/flattenTopLevelFields.js'\nexport { formatErrors } from './utilities/formatErrors.js'\nexport { formatLabels, formatNames, toWords } from './utilities/formatLabels.js'\nexport { getCollectionIDFieldTypes } from './utilities/getCollectionIDFieldTypes.js'\nexport { getObjectDotNotation } from './utilities/getObjectDotNotation.js'\nexport { initTransaction } from './utilities/initTransaction.js'\nexport { isEntityHidden } from './utilities/isEntityHidden.js'\nexport { default as isolateObjectProperty } from './utilities/isolateObjectProperty.js'\nexport { isPlainObject } from './utilities/isPlainObject.js'\nexport { isValidID } from './utilities/isValidID.js'\nexport { killTransaction } from './utilities/killTransaction.js'\nexport { logError } from './utilities/logError.js'\nexport { defaultLoggerOptions } from './utilities/logger.js'\nexport { mapAsync } from './utilities/mapAsync.js'\nexport { sanitizeFallbackLocale } from './utilities/sanitizeFallbackLocale.js'\nexport { sanitizeJoinParams } from './utilities/sanitizeJoinParams.js'\nexport { sanitizePopulateParam } from './utilities/sanitizePopulateParam.js'\nexport { sanitizeSelectParam } from './utilities/sanitizeSelectParam.js'\nexport { traverseFields } from './utilities/traverseFields.js'\nexport type { TraverseFieldsCallback } from './utilities/traverseFields.js'\nexport { buildVersionCollectionFields } from './versions/buildCollectionFields.js'\nexport { buildVersionGlobalFields } from './versions/buildGlobalFields.js'\nexport { versionDefaults } from './versions/defaults.js'\nexport { deleteCollectionVersions } from './versions/deleteCollectionVersions.js'\nexport { enforceMaxVersions } from './versions/enforceMaxVersions.js'\nexport { getLatestCollectionVersion } from './versions/getLatestCollectionVersion.js'\nexport { getLatestGlobalVersion } from './versions/getLatestGlobalVersion.js'\n\nexport { saveVersion } from './versions/saveVersion.js'\nexport type { SchedulePublishTaskInput } from './versions/schedule/types.js'\nexport type { TypeWithVersion } from './versions/types.js'\nexport { deepMergeSimple } from '@payloadcms/translations/utilities'\n"],"names":["spawn","crypto","fileURLToPath","path","WebSocket","Cron","decrypt","encrypt","APIKeyAuthentication","JWTAuthentication","generateImportMap","checkPayloadDependencies","localOperations","consoleEmailAdapter","fieldAffectsData","localGlobalOperations","getJobsLocalAPI","getLogger","serverInit","serverInitTelemetry","traverseFields","default","executeAccess","filename","url","dirname","checkedDependencies","BasePayload","auth","options","authStrategies","collections","config","count","countGlobalVersions","countVersions","create","db","duplicate","email","extensions","find","findByID","findGlobal","findOne","findGlobalVersionByID","findVersionByID","findGlobalVersions","findVersions","forgotPassword","getAdminURL","serverURL","routes","admin","getAPIURL","api","globals","importMap","jobs","logger","login","resetPassword","restoreGlobalVersion","restoreVersion","schema","secret","sendEmail","types","unlock","updateGlobal","update","validationRules","verifyEmail","versions","bin","args","cwd","log","Promise","resolve","reject","spawned","stdio","undefined","on","code","error","delete","deleteLocal","init","process","env","NODE_ENV","PAYLOAD_DISABLE_DEPENDENCY_CHECKER","Error","createHash","digest","slice","forEach","collection","customIDType","findCustomID","field","next","includes","type","name","callback","fields","slug","typescript","autoGenerate","payload","disableDBConnect","connect","awaitedAdapter","NEXT_PHASE","warn","sharp","some","c","upload","imageSizes","formatOptions","VERCEL","uploadCollWithoutAdapter","filter","adapter","length","slugs","map","join","jwtStrategyEnabled","reduce","strategies","push","useAPIKey","authenticate","disableLocalStrategy","disableOnInit","onInit","autoRun","DEFAULT_CRON","DEFAULT_LIMIT","cronJobs","all","cronConfig","cron","run","limit","queue","initialized","cached","global","_payload","promise","reload","ws","skipImportMapGeneration","destroy","hotReload","_payload_clientConfig","_payload_schemaMap","_payload_clientSchemaMap","_payload_doNotCacheClientConfig","_payload_doNotCacheSchemaMap","_payload_doNotCacheClientSchemaMap","getPayload","res","DISABLE_PAYLOAD_HMR","port","PORT","NEXT_BASE_PATH","onmessage","event","data","JSON","parse","action","onerror","_","e","executeAuthStrategies","getAccessResults","getFieldsToSign","accessOperation","forgotPasswordOperation","initOperation","loginOperation","logoutOperation","meOperation","refreshOperation","registerFirstUserOperation","resetPasswordOperation","unlockOperation","verifyEmailOperation","genImportMapIterateFields","createClientCollectionConfig","createClientCollectionConfigs","createDataloaderCacheKey","getDataLoader","countOperation","createOperation","deleteOperation","deleteByIDOperation","docAccessOperation","duplicateOperation","findOperation","findByIDOperation","findVersionByIDOperation","findVersionsOperation","restoreVersionOperation","updateOperation","updateByIDOperation","buildConfig","createClientConfig","serverOnlyAdminConfigProperties","serverOnlyConfigProperties","defaults","sanitizeConfig","combineQueries","createDatabaseAdapter","defaultBeginTransaction","flattenWhereToOperators","getLocalizedPaths","createMigration","getMigrations","getPredefinedMigration","migrate","migrateDown","migrateRefresh","migrateReset","migrateStatus","migrationsCollection","migrationTemplate","readMigrationFiles","writeMigrationIndex","validateQueryPaths","validateSearchParam","APIError","APIErrorName","AuthenticationError","DuplicateCollection","DuplicateFieldName","DuplicateGlobal","ErrorDeletingFile","FileRetrievalError","FileUploadError","Forbidden","InvalidConfiguration","InvalidFieldName","InvalidFieldRelationship","Locked","LockedAuth","MissingCollectionLabel","MissingEditorProp","MissingFieldInputOptions","MissingFieldType","MissingFile","NotFound","QueryError","ValidationError","ValidationErrorName","baseBlockFields","baseIDField","createClientField","createClientFields","sanitizeFields","getDefaultValue","afterChangeTraverseFields","afterReadPromise","afterReadTraverseFields","beforeChangeTraverseFields","beforeValidateTraverseFields","sortableFieldTypes","validations","createClientGlobalConfig","createClientGlobalConfigs","docAccessOperationGlobal","findOneOperation","findVersionByIDOperationGlobal","findVersionsOperationGlobal","restoreVersionOperationGlobal","updateOperationGlobal","importHandlerPath","getLocalI18n","getFileByPath","commitTransaction","configToJSONSchema","entityToJSONSchema","fieldsToJSONSchema","withNullableJSONSchemaType","createArrayFromCommaDelineated","createLocalReq","deepCopyObject","deepCopyObjectComplex","deepCopyObjectSimple","deepMerge","deepMergeWithCombinedArrays","deepMergeWithReactComponents","deepMergeWithSourceArrays","checkDependencies","getDependencies","findUp","findUpSync","pathExistsAndIsAccessible","pathExistsAndIsAccessibleSync","flattenAllFields","flattenTopLevelFields","formatErrors","formatLabels","formatNames","toWords","getCollectionIDFieldTypes","getObjectDotNotation","initTransaction","isEntityHidden","isolateObjectProperty","isPlainObject","isValidID","killTransaction","logError","defaultLoggerOptions","mapAsync","sanitizeFallbackLocale","sanitizeJoinParams","sanitizePopulateParam","sanitizeSelectParam","buildVersionCollectionFields","buildVersionGlobalFields","versionDefaults","deleteCollectionVersions","enforceMaxVersions","getLatestCollectionVersion","getLatestGlobalVersion","saveVersion","deepMergeSimple"],"mappings":"AAKA,SAASA,KAAK,QAAQ,gBAAe;AACrC,OAAOC,YAAY,SAAQ;AAC3B,SAASC,aAAa,QAAQ,WAAU;AACxC,OAAOC,UAAU,OAAM;AACvB,OAAOC,eAAe,KAAI;AAwD1B,SAASC,IAAI,QAAQ,SAAQ;AAI7B,SAASC,OAAO,EAAEC,OAAO,QAAQ,mBAAkB;AACnD,SAASC,oBAAo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c,QAAQ,gCAA+B;AAE9D,SAASoT,4BAA4B,QAAQ,sCAAqC;AAClF,SAASC,wBAAwB,QAAQ,kCAAiC;AAC1E,SAASC,eAAe,QAAQ,yBAAwB;AACxD,SAASC,wBAAwB,QAAQ,yCAAwC;AACjF,SAASC,kBAAkB,QAAQ,mCAAkC;AACrE,SAASC,0BAA0B,QAAQ,2CAA0C;AACrF,SAASC,sBAAsB,QAAQ,uCAAsC;AAE7E,SAASC,WAAW,QAAQ,4BAA2B;AAGvD,SAASC,eAAe,QAAQ,qCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preferencesCollection.d.ts","sourceRoot":"","sources":["../../src/preferences/preferencesCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,oBAAoB,CAAA;
|
|
1
|
+
{"version":3,"file":"preferencesCollection.d.ts","sourceRoot":"","sources":["../../src/preferences/preferencesCollection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,KAAK,EAAU,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAkBxD,QAAA,MAAM,wBAAwB,WAAY,MAAM,KAAG,gBAwEjD,CAAA;AAEF,eAAe,wBAAwB,CAAA"}
|
|
@@ -2,7 +2,9 @@ import { deleteHandler } from './requestHandlers/delete.js';
|
|
|
2
2
|
import { findByIDHandler } from './requestHandlers/findOne.js';
|
|
3
3
|
import { updateHandler } from './requestHandlers/update.js';
|
|
4
4
|
const preferenceAccess = ({ req })=>{
|
|
5
|
-
if (!req.user)
|
|
5
|
+
if (!req.user) {
|
|
6
|
+
return false;
|
|
7
|
+
}
|
|
6
8
|
return {
|
|
7
9
|
'user.value': {
|
|
8
10
|
equals: req?.user?.id
|
|
@@ -63,7 +65,17 @@ const getPreferencesCollection = (config)=>({
|
|
|
63
65
|
},
|
|
64
66
|
{
|
|
65
67
|
name: 'value',
|
|
66
|
-
type: 'json'
|
|
68
|
+
type: 'json',
|
|
69
|
+
validate: (value)=>{
|
|
70
|
+
if (value) {
|
|
71
|
+
try {
|
|
72
|
+
JSON.parse(JSON.stringify(value));
|
|
73
|
+
} catch {
|
|
74
|
+
return 'Invalid JSON';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return true;
|
|
78
|
+
}
|
|
67
79
|
}
|
|
68
80
|
],
|
|
69
81
|
lockDocuments: false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/preferences/preferencesCollection.ts"],"sourcesContent":["import type { CollectionConfig } from '../collections/config/types.js'\nimport type { Access, Config } from '../config/types.js'\n\nimport { deleteHandler } from './requestHandlers/delete.js'\nimport { findByIDHandler } from './requestHandlers/findOne.js'\nimport { updateHandler } from './requestHandlers/update.js'\n\nconst preferenceAccess: Access = ({ req }) => {\n if (!req.user) return false\n\n return {\n 'user.value': {\n equals: req?.user?.id,\n },\n }\n}\n\nconst getPreferencesCollection = (config: Config): CollectionConfig => ({\n slug: 'payload-preferences',\n access: {\n delete: preferenceAccess,\n read: preferenceAccess,\n },\n admin: {\n hidden: true,\n },\n endpoints: [\n {\n handler: findByIDHandler,\n method: 'get',\n path: '/:key',\n },\n {\n handler: deleteHandler,\n method: 'delete',\n path: '/:key',\n },\n {\n handler: updateHandler,\n method: 'post',\n path: '/:key',\n },\n ],\n fields: [\n {\n name: 'user',\n type: 'relationship',\n hooks: {\n beforeValidate: [\n ({ req }) => {\n if (!req?.user) {\n return null\n }\n return {\n relationTo: req?.user.collection,\n value: req?.user.id,\n }\n },\n ],\n },\n index: true,\n relationTo: config.collections\n .filter((collectionConfig) => collectionConfig.auth)\n .map((collectionConfig) => collectionConfig.slug),\n required: true,\n },\n {\n name: 'key',\n type: 'text',\n index: true,\n },\n {\n name: 'value',\n type: 'json',\n },\n ],\n lockDocuments: false,\n})\n\nexport default getPreferencesCollection\n"],"names":["deleteHandler","findByIDHandler","updateHandler","preferenceAccess","req","user","equals","id","getPreferencesCollection","config","slug","access","delete","read","admin","hidden","endpoints","handler","method","path","fields","name","type","hooks","beforeValidate","relationTo","collection","value","index","collections","filter","collectionConfig","auth","map","required","lockDocuments"],"mappings":"AAGA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,eAAe,QAAQ,+BAA8B;AAC9D,SAASC,aAAa,QAAQ,8BAA6B;AAE3D,MAAMC,mBAA2B,CAAC,EAAEC,GAAG,EAAE;IACvC,IAAI,CAACA,IAAIC,IAAI,EAAE,OAAO;
|
|
1
|
+
{"version":3,"sources":["../../src/preferences/preferencesCollection.ts"],"sourcesContent":["import type { CollectionConfig } from '../collections/config/types.js'\nimport type { Access, Config } from '../config/types.js'\n\nimport { deleteHandler } from './requestHandlers/delete.js'\nimport { findByIDHandler } from './requestHandlers/findOne.js'\nimport { updateHandler } from './requestHandlers/update.js'\n\nconst preferenceAccess: Access = ({ req }) => {\n if (!req.user) {\n return false\n }\n\n return {\n 'user.value': {\n equals: req?.user?.id,\n },\n }\n}\n\nconst getPreferencesCollection = (config: Config): CollectionConfig => ({\n slug: 'payload-preferences',\n access: {\n delete: preferenceAccess,\n read: preferenceAccess,\n },\n admin: {\n hidden: true,\n },\n endpoints: [\n {\n handler: findByIDHandler,\n method: 'get',\n path: '/:key',\n },\n {\n handler: deleteHandler,\n method: 'delete',\n path: '/:key',\n },\n {\n handler: updateHandler,\n method: 'post',\n path: '/:key',\n },\n ],\n fields: [\n {\n name: 'user',\n type: 'relationship',\n hooks: {\n beforeValidate: [\n ({ req }) => {\n if (!req?.user) {\n return null\n }\n\n return {\n relationTo: req?.user.collection,\n value: req?.user.id,\n }\n },\n ],\n },\n index: true,\n relationTo: config.collections\n .filter((collectionConfig) => collectionConfig.auth)\n .map((collectionConfig) => collectionConfig.slug),\n required: true,\n },\n {\n name: 'key',\n type: 'text',\n index: true,\n },\n {\n name: 'value',\n type: 'json',\n validate: (value) => {\n if (value) {\n try {\n JSON.parse(JSON.stringify(value))\n } catch {\n return 'Invalid JSON'\n }\n }\n\n return true\n },\n },\n ],\n lockDocuments: false,\n})\n\nexport default getPreferencesCollection\n"],"names":["deleteHandler","findByIDHandler","updateHandler","preferenceAccess","req","user","equals","id","getPreferencesCollection","config","slug","access","delete","read","admin","hidden","endpoints","handler","method","path","fields","name","type","hooks","beforeValidate","relationTo","collection","value","index","collections","filter","collectionConfig","auth","map","required","validate","JSON","parse","stringify","lockDocuments"],"mappings":"AAGA,SAASA,aAAa,QAAQ,8BAA6B;AAC3D,SAASC,eAAe,QAAQ,+BAA8B;AAC9D,SAASC,aAAa,QAAQ,8BAA6B;AAE3D,MAAMC,mBAA2B,CAAC,EAAEC,GAAG,EAAE;IACvC,IAAI,CAACA,IAAIC,IAAI,EAAE;QACb,OAAO;IACT;IAEA,OAAO;QACL,cAAc;YACZC,QAAQF,KAAKC,MAAME;QACrB;IACF;AACF;AAEA,MAAMC,2BAA2B,CAACC,SAAsC,CAAA;QACtEC,MAAM;QACNC,QAAQ;YACNC,QAAQT;YACRU,MAAMV;QACR;QACAW,OAAO;YACLC,QAAQ;QACV;QACAC,WAAW;YACT;gBACEC,SAAShB;gBACTiB,QAAQ;gBACRC,MAAM;YACR;YACA;gBACEF,SAASjB;gBACTkB,QAAQ;gBACRC,MAAM;YACR;YACA;gBACEF,SAASf;gBACTgB,QAAQ;gBACRC,MAAM;YACR;SACD;QACDC,QAAQ;YACN;gBACEC,MAAM;gBACNC,MAAM;gBACNC,OAAO;oBACLC,gBAAgB;wBACd,CAAC,EAAEpB,GAAG,EAAE;4BACN,IAAI,CAACA,KAAKC,MAAM;gCACd,OAAO;4BACT;4BAEA,OAAO;gCACLoB,YAAYrB,KAAKC,KAAKqB;gCACtBC,OAAOvB,KAAKC,KAAKE;4BACnB;wBACF;qBACD;gBACH;gBACAqB,OAAO;gBACPH,YAAYhB,OAAOoB,WAAW,CAC3BC,MAAM,CAAC,CAACC,mBAAqBA,iBAAiBC,IAAI,EAClDC,GAAG,CAAC,CAACF,mBAAqBA,iBAAiBrB,IAAI;gBAClDwB,UAAU;YACZ;YACA;gBACEb,MAAM;gBACNC,MAAM;gBACNM,OAAO;YACT;YACA;gBACEP,MAAM;gBACNC,MAAM;gBACNa,UAAU,CAACR;oBACT,IAAIA,OAAO;wBACT,IAAI;4BACFS,KAAKC,KAAK,CAACD,KAAKE,SAAS,CAACX;wBAC5B,EAAE,OAAM;4BACN,OAAO;wBACT;oBACF;oBAEA,OAAO;gBACT;YACF;SACD;QACDY,eAAe;IACjB,CAAA;AAEA,eAAe/B,yBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/preferences/requestHandlers/update.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\n\nimport { update } from '../operations/update.js'\n\nexport const updateHandler: PayloadHandler = async (incomingReq) => {\n // We cannot import the addDataAndFileToRequest utility here from the 'next' package because of dependency issues\n // However that utility should be used where possible instead of manually appending the data\n let data\n\n try {\n data = await incomingReq.json()\n } catch (
|
|
1
|
+
{"version":3,"sources":["../../../src/preferences/requestHandlers/update.ts"],"sourcesContent":["import httpStatus from 'http-status'\n\nimport type { PayloadHandler } from '../../config/types.js'\nimport type { PayloadRequest } from '../../types/index.js'\n\nimport { update } from '../operations/update.js'\n\nexport const updateHandler: PayloadHandler = async (incomingReq) => {\n // We cannot import the addDataAndFileToRequest utility here from the 'next' package because of dependency issues\n // However that utility should be used where possible instead of manually appending the data\n let data\n\n try {\n data = await incomingReq.json()\n } catch (_err) {\n data = {}\n }\n\n const reqWithData: PayloadRequest = incomingReq\n\n if (data) {\n reqWithData.data = data\n reqWithData.json = () => Promise.resolve(data)\n }\n\n const doc = await update({\n key: reqWithData.routeParams?.key as string,\n req: reqWithData,\n user: reqWithData?.user,\n value: reqWithData.data.value || reqWithData.data,\n })\n\n return Response.json(\n {\n doc,\n message: reqWithData.t('general:updatedSuccessfully'),\n },\n {\n status: httpStatus.OK,\n },\n )\n}\n"],"names":["httpStatus","update","updateHandler","incomingReq","data","json","_err","reqWithData","Promise","resolve","doc","key","routeParams","req","user","value","Response","message","t","status","OK"],"mappings":"AAAA,OAAOA,gBAAgB,cAAa;AAKpC,SAASC,MAAM,QAAQ,0BAAyB;AAEhD,OAAO,MAAMC,gBAAgC,OAAOC;IAClD,iHAAiH;IACjH,4FAA4F;IAC5F,IAAIC;IAEJ,IAAI;QACFA,OAAO,MAAMD,YAAYE,IAAI;IAC/B,EAAE,OAAOC,MAAM;QACbF,OAAO,CAAC;IACV;IAEA,MAAMG,cAA8BJ;IAEpC,IAAIC,MAAM;QACRG,YAAYH,IAAI,GAAGA;QACnBG,YAAYF,IAAI,GAAG,IAAMG,QAAQC,OAAO,CAACL;IAC3C;IAEA,MAAMM,MAAM,MAAMT,OAAO;QACvBU,KAAKJ,YAAYK,WAAW,EAAED;QAC9BE,KAAKN;QACLO,MAAMP,aAAaO;QACnBC,OAAOR,YAAYH,IAAI,CAACW,KAAK,IAAIR,YAAYH,IAAI;IACnD;IAEA,OAAOY,SAASX,IAAI,CAClB;QACEK;QACAO,SAASV,YAAYW,CAAC,CAAC;IACzB,GACA;QACEC,QAAQnB,WAAWoB,EAAE;IACvB;AAEJ,EAAC"}
|
|
@@ -1,7 +1,36 @@
|
|
|
1
1
|
import type { CollectionConfig } from '../../../index.js';
|
|
2
|
-
import type { PayloadRequest } from '../../../types/index.js';
|
|
2
|
+
import type { Payload, PayloadRequest } from '../../../types/index.js';
|
|
3
3
|
import type { TaskConfig } from './taskTypes.js';
|
|
4
4
|
import type { WorkflowConfig } from './workflowTypes.js';
|
|
5
|
+
export type CronConfig = {
|
|
6
|
+
/**
|
|
7
|
+
* The cron schedule for the job.
|
|
8
|
+
* @default '* * * * *' (every minute).
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ┌───────────── minute (0 - 59)
|
|
12
|
+
* │ ┌───────────── hour (0 - 23)
|
|
13
|
+
* │ │ ┌───────────── day of the month (1 - 31)
|
|
14
|
+
* │ │ │ ┌───────────── month (1 - 12)
|
|
15
|
+
* │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)
|
|
16
|
+
* │ │ │ │ │
|
|
17
|
+
* │ │ │ │ │
|
|
18
|
+
* - '0 * * * *' every hour at minute 0
|
|
19
|
+
* - '0 0 * * *' daily at midnight
|
|
20
|
+
* - '0 0 * * 0' weekly at midnight on Sundays
|
|
21
|
+
* - '0 0 1 * *' monthly at midnight on the 1st day of the month
|
|
22
|
+
* - '0/5 * * * *' every 5 minutes
|
|
23
|
+
*/
|
|
24
|
+
cron?: string;
|
|
25
|
+
/**
|
|
26
|
+
* The limit for the job. This can be overridden by the user. Defaults to 10.
|
|
27
|
+
*/
|
|
28
|
+
limit?: number;
|
|
29
|
+
/**
|
|
30
|
+
* The queue name for the job.
|
|
31
|
+
*/
|
|
32
|
+
queue?: string;
|
|
33
|
+
};
|
|
5
34
|
export type RunJobAccessArgs = {
|
|
6
35
|
req: PayloadRequest;
|
|
7
36
|
};
|
|
@@ -16,14 +45,18 @@ export type JobsConfig = {
|
|
|
16
45
|
*/
|
|
17
46
|
run?: RunJobAccess;
|
|
18
47
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Adds information about the parent job to the task log. This is useful for debugging and tracking the flow of tasks.
|
|
48
|
+
/** Adds information about the parent job to the task log. This is useful for debugging and tracking the flow of tasks.
|
|
21
49
|
*
|
|
22
50
|
* In 4.0, this will default to `true`.
|
|
23
51
|
*
|
|
24
52
|
* @default false
|
|
25
53
|
*/
|
|
26
54
|
addParentToTaskLog?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Queue cron jobs automatically on payload initialization.
|
|
57
|
+
* @remark this property should not be used on serverless platforms like Vercel
|
|
58
|
+
*/
|
|
59
|
+
autoRun?: ((payload: Payload) => CronConfig[] | Promise<CronConfig[]>) | CronConfig[];
|
|
27
60
|
/**
|
|
28
61
|
* Determine whether or not to delete a job after it has successfully completed.
|
|
29
62
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/queues/config/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAExD,MAAM,MAAM,UAAU,GAAG;IACvB;;;;;;;;;;;;;;;;;OAiBG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,GAAG,EAAE,cAAc,CAAA;CACpB,CAAA;AAED,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,gBAAgB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;AAEjF,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,GAAG,CAAC,EAAE,YAAY,CAAA;KACnB,CAAA;IACD;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,OAAO,KAAK,UAAU,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,GAAG,UAAU,EAAE,CAAA;IACrF;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,uBAAuB,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,qBAAqB,EAAE,gBAAgB,CAAA;KAAE,KAAK,gBAAgB,CAAA;IACjG;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,EAAE,CAAA;IACxB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,EAAE,CAAA;CAClC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/queues/config/types/index.ts"],"sourcesContent":["import type { CollectionConfig } from '../../../index.js'\nimport type { PayloadRequest } from '../../../types/index.js'\nimport type { TaskConfig } from './taskTypes.js'\nimport type { WorkflowConfig } from './workflowTypes.js'\n\nexport type RunJobAccessArgs = {\n req: PayloadRequest\n}\n\nexport type RunJobAccess = (args: RunJobAccessArgs) => boolean | Promise<boolean>\n\nexport type JobsConfig = {\n /**\n * Specify access control to determine who can interact with jobs.\n */\n access?: {\n /**\n * By default, all logged-in users can trigger jobs.\n */\n run?: RunJobAccess\n }\n
|
|
1
|
+
{"version":3,"sources":["../../../../src/queues/config/types/index.ts"],"sourcesContent":["import type { CollectionConfig } from '../../../index.js'\nimport type { Payload, PayloadRequest } from '../../../types/index.js'\nimport type { TaskConfig } from './taskTypes.js'\nimport type { WorkflowConfig } from './workflowTypes.js'\n\nexport type CronConfig = {\n /**\n * The cron schedule for the job.\n * @default '* * * * *' (every minute).\n *\n * @example\n * ┌───────────── minute (0 - 59)\n * │ ┌───────────── hour (0 - 23)\n * │ │ ┌───────────── day of the month (1 - 31)\n * │ │ │ ┌───────────── month (1 - 12)\n * │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday)\n * │ │ │ │ │\n * │ │ │ │ │\n * - '0 * * * *' every hour at minute 0\n * - '0 0 * * *' daily at midnight\n * - '0 0 * * 0' weekly at midnight on Sundays\n * - '0 0 1 * *' monthly at midnight on the 1st day of the month\n * - '0/5 * * * *' every 5 minutes\n */\n cron?: string\n /**\n * The limit for the job. This can be overridden by the user. Defaults to 10.\n */\n limit?: number\n /**\n * The queue name for the job.\n */\n queue?: string\n}\n\nexport type RunJobAccessArgs = {\n req: PayloadRequest\n}\n\nexport type RunJobAccess = (args: RunJobAccessArgs) => boolean | Promise<boolean>\n\nexport type JobsConfig = {\n /**\n * Specify access control to determine who can interact with jobs.\n */\n access?: {\n /**\n * By default, all logged-in users can trigger jobs.\n */\n run?: RunJobAccess\n }\n /** Adds information about the parent job to the task log. This is useful for debugging and tracking the flow of tasks.\n *\n * In 4.0, this will default to `true`.\n *\n * @default false\n */\n addParentToTaskLog?: boolean\n /**\n * Queue cron jobs automatically on payload initialization.\n * @remark this property should not be used on serverless platforms like Vercel\n */\n autoRun?: ((payload: Payload) => CronConfig[] | Promise<CronConfig[]>) | CronConfig[]\n /**\n * Determine whether or not to delete a job after it has successfully completed.\n */\n deleteJobOnComplete?: boolean\n /**\n * Specify depth for retrieving jobs from the queue.\n * This should be as low as possible in order for job retrieval\n * to be as efficient as possible. Defaults to 0.\n */\n depth?: number\n /**\n * Override any settings on the default Jobs collection. Accepts the default collection and allows you to return\n * a new collection.\n */\n jobsCollectionOverrides?: (args: { defaultJobsCollection: CollectionConfig }) => CollectionConfig\n /**\n * Define all possible tasks here\n */\n tasks: TaskConfig<any>[]\n /**\n * Define all the workflows here. Workflows orchestrate the flow of multiple tasks.\n */\n workflows?: WorkflowConfig<any>[]\n}\n"],"names":[],"mappings":"AAyCA,WA6CC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payloadPackageList.d.ts","sourceRoot":"","sources":["../../src/versions/payloadPackageList.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"payloadPackageList.d.ts","sourceRoot":"","sources":["../../src/versions/payloadPackageList.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,UA+BhC,CAAA"}
|
|
@@ -13,6 +13,7 @@ export const PAYLOAD_PACKAGE_LIST = [
|
|
|
13
13
|
'@payloadcms/plugin-cloud-storage',
|
|
14
14
|
'@payloadcms/payload-cloud',
|
|
15
15
|
'@payloadcms/plugin-form-builder',
|
|
16
|
+
'@payloadcms/plugin-multi-tenant',
|
|
16
17
|
'@payloadcms/plugin-nested-docs',
|
|
17
18
|
'@payloadcms/plugin-redirects',
|
|
18
19
|
'@payloadcms/plugin-search',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/versions/payloadPackageList.ts"],"sourcesContent":["export const PAYLOAD_PACKAGE_LIST = [\n 'payload',\n '@payloadcms/bundler-vite',\n '@payloadcms/bundler-webpack',\n '@payloadcms/db-mongodb',\n '@payloadcms/db-postgres',\n '@payloadcms/email-nodemailer',\n '@payloadcms/email-resend',\n '@payloadcms/graphql',\n '@payloadcms/live-preview-react',\n '@payloadcms/live-preview',\n '@payloadcms/next/utilities',\n '@payloadcms/plugin-cloud-storage',\n '@payloadcms/payload-cloud',\n '@payloadcms/plugin-form-builder',\n '@payloadcms/plugin-nested-docs',\n '@payloadcms/plugin-redirects',\n '@payloadcms/plugin-search',\n '@payloadcms/plugin-seo',\n '@payloadcms/plugin-stripe',\n '@payloadcms/plugin-zapier',\n '@payloadcms/richtext-lexical',\n '@payloadcms/richtext-slate',\n '@payloadcms/storage-azure',\n '@payloadcms/storage-gcs',\n '@payloadcms/storage-s3',\n '@payloadcms/storage-uploadthing',\n '@payloadcms/storage-vercel-blob',\n '@payloadcms/translations',\n '@payloadcms/ui/shared',\n]\n"],"names":["PAYLOAD_PACKAGE_LIST"],"mappings":"AAAA,OAAO,MAAMA,uBAAuB;IAClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../src/versions/payloadPackageList.ts"],"sourcesContent":["export const PAYLOAD_PACKAGE_LIST = [\n 'payload',\n '@payloadcms/bundler-vite',\n '@payloadcms/bundler-webpack',\n '@payloadcms/db-mongodb',\n '@payloadcms/db-postgres',\n '@payloadcms/email-nodemailer',\n '@payloadcms/email-resend',\n '@payloadcms/graphql',\n '@payloadcms/live-preview-react',\n '@payloadcms/live-preview',\n '@payloadcms/next/utilities',\n '@payloadcms/plugin-cloud-storage',\n '@payloadcms/payload-cloud',\n '@payloadcms/plugin-form-builder',\n '@payloadcms/plugin-multi-tenant',\n '@payloadcms/plugin-nested-docs',\n '@payloadcms/plugin-redirects',\n '@payloadcms/plugin-search',\n '@payloadcms/plugin-seo',\n '@payloadcms/plugin-stripe',\n '@payloadcms/plugin-zapier',\n '@payloadcms/richtext-lexical',\n '@payloadcms/richtext-slate',\n '@payloadcms/storage-azure',\n '@payloadcms/storage-gcs',\n '@payloadcms/storage-s3',\n '@payloadcms/storage-uploadthing',\n '@payloadcms/storage-vercel-blob',\n '@payloadcms/translations',\n '@payloadcms/ui/shared',\n]\n"],"names":["PAYLOAD_PACKAGE_LIST"],"mappings":"AAAA,OAAO,MAAMA,uBAAuB;IAClC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "payload",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.2-canary.64ffcd8",
|
|
4
4
|
"description": "Node, React, Headless CMS and Application Framework built on Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"admin panel",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"tsx": "4.19.2",
|
|
98
98
|
"uuid": "10.0.0",
|
|
99
99
|
"ws": "^8.16.0",
|
|
100
|
-
"@payloadcms/translations": "3.15.
|
|
100
|
+
"@payloadcms/translations": "3.15.2-canary.64ffcd8"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@hyrious/esbuild-plugin-commonjs": "^0.2.4",
|