@payloadcms/figma 0.0.1-alpha.72 → 0.0.1-alpha.74

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.
Files changed (299) hide show
  1. package/dist/api/control-plane.d.ts +0 -1
  2. package/dist/api/control-plane.js +0 -2
  3. package/dist/api/error-response.d.ts +0 -1
  4. package/dist/api/error-response.js +0 -2
  5. package/dist/api/figma-api.d.ts +0 -1
  6. package/dist/api/figma-api.js +0 -2
  7. package/dist/auth/browser.d.ts +0 -1
  8. package/dist/auth/browser.js +0 -2
  9. package/dist/auth/callback-server.d.ts +0 -1
  10. package/dist/auth/callback-server.js +0 -2
  11. package/dist/auth/credentials.d.ts +0 -1
  12. package/dist/auth/credentials.js +0 -2
  13. package/dist/auth/crypto-utils.d.ts +0 -1
  14. package/dist/auth/crypto-utils.js +0 -2
  15. package/dist/auth/jwt-validator.d.ts +12 -6
  16. package/dist/auth/jwt-validator.js +15 -7
  17. package/dist/auth/oauth-flow.d.ts +0 -1
  18. package/dist/auth/oauth-flow.js +0 -2
  19. package/dist/auth/paste-code.d.ts +0 -1
  20. package/dist/auth/paste-code.js +0 -2
  21. package/dist/auth/pkce.d.ts +0 -1
  22. package/dist/auth/pkce.js +0 -2
  23. package/dist/auth/project-token.d.ts +0 -1
  24. package/dist/auth/project-token.js +4 -3
  25. package/dist/auth/refresh.d.ts +0 -1
  26. package/dist/auth/refresh.js +0 -2
  27. package/dist/auth/token-store-migration.d.ts +0 -1
  28. package/dist/auth/token-store-migration.js +0 -2
  29. package/dist/auth/token-store.d.ts +0 -1
  30. package/dist/auth/token-store.js +0 -2
  31. package/dist/auth/types.d.ts +0 -1
  32. package/dist/auth/types.js +0 -2
  33. package/dist/cli.d.ts +0 -1
  34. package/dist/cli.js +0 -2
  35. package/dist/commands/bootstrap.d.ts +0 -1
  36. package/dist/commands/bootstrap.js +0 -2
  37. package/dist/commands/build-lambda-zip.d.ts +0 -1
  38. package/dist/commands/build-lambda-zip.js +0 -2
  39. package/dist/commands/debug.d.ts +0 -1
  40. package/dist/commands/debug.js +0 -2
  41. package/dist/commands/deploy.d.ts +0 -1
  42. package/dist/commands/deploy.js +0 -2
  43. package/dist/commands/dump-tokens.d.ts +0 -1
  44. package/dist/commands/dump-tokens.js +0 -2
  45. package/dist/commands/env.d.ts +0 -1
  46. package/dist/commands/env.js +0 -2
  47. package/dist/commands/init.d.ts +0 -1
  48. package/dist/commands/init.js +2 -4
  49. package/dist/commands/list-tokens.d.ts +0 -1
  50. package/dist/commands/list-tokens.js +0 -2
  51. package/dist/commands/login.d.ts +0 -1
  52. package/dist/commands/login.js +0 -2
  53. package/dist/commands/logout.d.ts +0 -1
  54. package/dist/commands/logout.js +0 -2
  55. package/dist/commands/upgrade.d.ts +0 -1
  56. package/dist/commands/upgrade.js +0 -2
  57. package/dist/config/oauth.d.ts +0 -1
  58. package/dist/config/oauth.js +0 -2
  59. package/dist/constants.d.ts +0 -1
  60. package/dist/constants.js +0 -2
  61. package/dist/db-content-api/generated/content-api-types.d.ts +0 -1
  62. package/dist/db-content-api/generated/content-api-types.js +0 -2
  63. package/dist/db-content-api/index.d.ts +0 -1
  64. package/dist/db-content-api/index.js +0 -2
  65. package/dist/db-content-api/temp-utilities/slug.d.ts +0 -1
  66. package/dist/db-content-api/temp-utilities/slug.js +0 -2
  67. package/dist/db-content-api/temp-utilities/sorting.d.ts +0 -1
  68. package/dist/db-content-api/temp-utilities/sorting.js +0 -2
  69. package/dist/db-content-api/temp-utilities/types.d.ts +0 -1
  70. package/dist/db-content-api/temp-utilities/types.js +0 -2
  71. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +0 -1
  72. package/dist/db-content-api/temp-utilities/unwrapDocument.js +0 -2
  73. package/dist/db-content-api/utilities/auth.d.ts +0 -1
  74. package/dist/db-content-api/utilities/auth.js +0 -2
  75. package/dist/db-content-api/utilities/data/applyDefaults.d.ts +0 -1
  76. package/dist/db-content-api/utilities/data/applyDefaults.js +0 -2
  77. package/dist/db-content-api/utilities/data/castFieldValue.d.ts +0 -1
  78. package/dist/db-content-api/utilities/data/castFieldValue.js +0 -2
  79. package/dist/db-content-api/utilities/data/index.d.ts +0 -1
  80. package/dist/db-content-api/utilities/data/index.js +0 -2
  81. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +0 -1
  82. package/dist/db-content-api/utilities/data/removeVirtualFields.js +0 -2
  83. package/dist/db-content-api/utilities/data/stripFields.d.ts +0 -1
  84. package/dist/db-content-api/utilities/data/stripFields.js +0 -2
  85. package/dist/db-content-api/utilities/data/transformPublishedLocale.d.ts +0 -1
  86. package/dist/db-content-api/utilities/data/transformPublishedLocale.js +0 -2
  87. package/dist/db-content-api/utilities/data/validateRelationships.d.ts +0 -1
  88. package/dist/db-content-api/utilities/data/validateRelationships.js +0 -2
  89. package/dist/db-content-api/utilities/joins.d.ts +0 -1
  90. package/dist/db-content-api/utilities/joins.js +0 -2
  91. package/dist/db-content-api/utilities/locale/index.d.ts +0 -1
  92. package/dist/db-content-api/utilities/locale/index.js +0 -2
  93. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts +0 -1
  94. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js +0 -2
  95. package/dist/db-content-api/utilities/meta/buildMeta.d.ts +0 -1
  96. package/dist/db-content-api/utilities/meta/buildMeta.js +0 -2
  97. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts +0 -1
  98. package/dist/db-content-api/utilities/meta/buildPathTypes.js +0 -2
  99. package/dist/db-content-api/utilities/meta/buildUniquePaths.d.ts +0 -1
  100. package/dist/db-content-api/utilities/meta/buildUniquePaths.js +0 -2
  101. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.d.ts +0 -1
  102. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.js +0 -2
  103. package/dist/db-content-api/utilities/where.d.ts +0 -1
  104. package/dist/db-content-api/utilities/where.js +0 -2
  105. package/dist/deploy/schedule-extract-plugin.d.ts +0 -1
  106. package/dist/deploy/schedule-extract-plugin.js +0 -2
  107. package/dist/endpoints/health.d.ts +0 -1
  108. package/dist/endpoints/health.js +0 -2
  109. package/dist/endpoints/schema.d.ts +0 -1
  110. package/dist/endpoints/schema.js +0 -2
  111. package/dist/exports/client.d.ts +0 -1
  112. package/dist/exports/client.js +0 -2
  113. package/dist/index.d.ts +0 -1
  114. package/dist/index.js +0 -2
  115. package/dist/lib/download-skill.d.ts +0 -1
  116. package/dist/lib/download-skill.js +0 -2
  117. package/dist/oauth/components/FigmaAvatar/index.d.ts +0 -1
  118. package/dist/oauth/components/FigmaAvatar/index.js +0 -2
  119. package/dist/oauth/components/FigmaAvatarCell/index.d.ts +0 -1
  120. package/dist/oauth/components/FigmaAvatarCell/index.js +0 -2
  121. package/dist/oauth/components/FigmaAvatarPlaceholder/index.d.ts +0 -1
  122. package/dist/oauth/components/FigmaAvatarPlaceholder/index.js +0 -2
  123. package/dist/oauth/components/LoginButton/iframeAutoLogin.d.ts +0 -1
  124. package/dist/oauth/components/LoginButton/iframeAutoLogin.js +0 -2
  125. package/dist/oauth/components/LoginButton/index.d.ts +0 -1
  126. package/dist/oauth/components/LoginButton/index.js +3 -5
  127. package/dist/oauth/components/LogoutButton/index.d.ts +0 -1
  128. package/dist/oauth/components/LogoutButton/index.js +0 -2
  129. package/dist/oauth/defaults.d.ts +0 -1
  130. package/dist/oauth/defaults.js +0 -2
  131. package/dist/oauth/endpoints/getLoginEndpoint.d.ts +0 -1
  132. package/dist/oauth/endpoints/getLoginEndpoint.js +0 -2
  133. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts +0 -1
  134. package/dist/oauth/endpoints/getLogoutEndpoint.js +0 -2
  135. package/dist/oauth/endpoints/getMetaEndpoint.d.ts +0 -1
  136. package/dist/oauth/endpoints/getMetaEndpoint.js +0 -2
  137. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.d.ts +0 -1
  138. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.js +0 -2
  139. package/dist/oauth/exports/client.d.ts +0 -1
  140. package/dist/oauth/exports/client.js +0 -2
  141. package/dist/oauth/hooks/afterLogout.d.ts +0 -1
  142. package/dist/oauth/hooks/afterLogout.js +0 -2
  143. package/dist/oauth/hooks/me.d.ts +0 -1
  144. package/dist/oauth/hooks/me.js +0 -2
  145. package/dist/oauth/hooks/refresh.d.ts +0 -1
  146. package/dist/oauth/hooks/refresh.js +0 -2
  147. package/dist/oauth/index.d.ts +0 -1
  148. package/dist/oauth/index.js +0 -2
  149. package/dist/oauth/strategy/index.d.ts +0 -1
  150. package/dist/oauth/strategy/index.js +9 -3
  151. package/dist/oauth/types.d.ts +0 -1
  152. package/dist/oauth/types.js +0 -2
  153. package/dist/oauth/utilities/clearCookie.d.ts +0 -1
  154. package/dist/oauth/utilities/clearCookie.js +0 -2
  155. package/dist/oauth/utilities/createCookieOptions.d.ts +0 -1
  156. package/dist/oauth/utilities/createCookieOptions.js +0 -2
  157. package/dist/oauth/utilities/createDebugLogger.d.ts +0 -1
  158. package/dist/oauth/utilities/createDebugLogger.js +0 -2
  159. package/dist/oauth/utilities/establishSession.d.ts +0 -1
  160. package/dist/oauth/utilities/establishSession.js +0 -2
  161. package/dist/oauth/utilities/exchangeCodeForAccessToken.d.ts +0 -1
  162. package/dist/oauth/utilities/exchangeCodeForAccessToken.js +0 -2
  163. package/dist/oauth/utilities/extractOrigin.d.ts +0 -1
  164. package/dist/oauth/utilities/extractOrigin.js +0 -2
  165. package/dist/oauth/utilities/figmaHostnames.d.ts +0 -1
  166. package/dist/oauth/utilities/figmaHostnames.js +0 -2
  167. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts +0 -1
  168. package/dist/oauth/utilities/getAdminCollectionSlug.js +0 -2
  169. package/dist/oauth/utilities/getAuthorizeURL.d.ts +0 -1
  170. package/dist/oauth/utilities/getAuthorizeURL.js +0 -2
  171. package/dist/oauth/utilities/getCookieExpiration.d.ts +0 -1
  172. package/dist/oauth/utilities/getCookieExpiration.js +0 -2
  173. package/dist/oauth/utilities/getSecondsFromTokenExp.d.ts +0 -1
  174. package/dist/oauth/utilities/getSecondsFromTokenExp.js +0 -2
  175. package/dist/oauth/utilities/getTokenExp.d.ts +0 -1
  176. package/dist/oauth/utilities/getTokenExp.js +0 -2
  177. package/dist/oauth/utilities/getUsernameField.d.ts +0 -1
  178. package/dist/oauth/utilities/getUsernameField.js +0 -2
  179. package/dist/oauth/utilities/hasUserTokenPropsChanged.d.ts +0 -1
  180. package/dist/oauth/utilities/hasUserTokenPropsChanged.js +0 -2
  181. package/dist/oauth/utilities/isAbsoluteURL.d.ts +0 -1
  182. package/dist/oauth/utilities/isAbsoluteURL.js +0 -2
  183. package/dist/oauth/utilities/isDuplicateKeyError.d.ts +0 -1
  184. package/dist/oauth/utilities/isDuplicateKeyError.js +0 -2
  185. package/dist/oauth/utilities/mergeHeaders.d.ts +0 -1
  186. package/dist/oauth/utilities/mergeHeaders.js +0 -2
  187. package/dist/oauth/utilities/refreshTokens.d.ts +0 -1
  188. package/dist/oauth/utilities/refreshTokens.js +9 -3
  189. package/dist/oauth/utilities/withPartitionedCookie.d.ts +0 -1
  190. package/dist/oauth/utilities/withPartitionedCookie.js +0 -2
  191. package/dist/oauth/utils/getSearchParam.d.ts +27 -0
  192. package/dist/oauth/utils/getSearchParam.js +45 -0
  193. package/dist/plugin/adapter.d.ts +0 -1
  194. package/dist/plugin/adapter.js +0 -2
  195. package/dist/plugin/auth-preflight.d.ts +0 -1
  196. package/dist/plugin/auth-preflight.js +0 -2
  197. package/dist/plugin/bootstrap-preflight.d.ts +0 -1
  198. package/dist/plugin/bootstrap-preflight.js +0 -2
  199. package/dist/plugin/build-config.d.ts +0 -1
  200. package/dist/plugin/build-config.js +0 -2
  201. package/dist/plugin/dev-cookie-names.d.ts +0 -1
  202. package/dist/plugin/dev-cookie-names.js +0 -2
  203. package/dist/storage-content-api/api-types.d.ts +0 -1
  204. package/dist/storage-content-api/api-types.js +0 -2
  205. package/dist/storage-content-api/client-uploads/ClientUploadHandler.d.ts +0 -1
  206. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js +0 -2
  207. package/dist/storage-content-api/client-uploads/generateSignedURL.d.ts +0 -1
  208. package/dist/storage-content-api/client-uploads/generateSignedURL.js +0 -2
  209. package/dist/storage-content-api/client.d.ts +0 -1
  210. package/dist/storage-content-api/client.js +0 -2
  211. package/dist/storage-content-api/generateURL.d.ts +0 -1
  212. package/dist/storage-content-api/generateURL.js +0 -2
  213. package/dist/storage-content-api/handleDelete.d.ts +0 -1
  214. package/dist/storage-content-api/handleDelete.js +0 -2
  215. package/dist/storage-content-api/handleUpload.d.ts +0 -1
  216. package/dist/storage-content-api/handleUpload.js +0 -2
  217. package/dist/storage-content-api/index.d.ts +0 -1
  218. package/dist/storage-content-api/index.js +0 -2
  219. package/dist/storage-content-api/staticHandler.d.ts +0 -1
  220. package/dist/storage-content-api/staticHandler.js +0 -2
  221. package/dist/storage-content-api/types.d.ts +0 -1
  222. package/dist/storage-content-api/types.js +0 -2
  223. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +0 -1
  224. package/dist/storage-content-api/utilities/getSafeFilename.js +0 -2
  225. package/dist/storage-content-api/utilities/index.d.ts +0 -1
  226. package/dist/storage-content-api/utilities/index.js +0 -2
  227. package/dist/storage-content-api/utilities/parseClientUploadContext.d.ts +0 -1
  228. package/dist/storage-content-api/utilities/parseClientUploadContext.js +0 -2
  229. package/dist/types/config.d.ts +0 -1
  230. package/dist/types/config.js +0 -2
  231. package/dist/types.d.ts +0 -1
  232. package/dist/types.js +0 -2
  233. package/dist/utils/adapters/nextjs.d.ts +0 -1
  234. package/dist/utils/adapters/nextjs.js +0 -2
  235. package/dist/utils/adapters/nitro.d.ts +0 -1
  236. package/dist/utils/adapters/nitro.js +0 -2
  237. package/dist/utils/adapters/vite.d.ts +0 -1
  238. package/dist/utils/adapters/vite.js +0 -2
  239. package/dist/utils/asset-collection.d.ts +0 -1
  240. package/dist/utils/asset-collection.js +0 -2
  241. package/dist/utils/build-detection.d.ts +0 -1
  242. package/dist/utils/build-detection.js +0 -2
  243. package/dist/utils/build-lambda-zip.d.ts +0 -1
  244. package/dist/utils/build-lambda-zip.js +0 -2
  245. package/dist/utils/cache-bootstrap.d.ts +0 -1
  246. package/dist/utils/cache-bootstrap.js +0 -2
  247. package/dist/utils/config.d.ts +0 -1
  248. package/dist/utils/config.js +0 -2
  249. package/dist/utils/deploy-adapter.d.ts +0 -1
  250. package/dist/utils/deploy-adapter.js +0 -2
  251. package/dist/utils/download-template.d.ts +0 -1
  252. package/dist/utils/download-template.js +0 -2
  253. package/dist/utils/env-management.d.ts +0 -1
  254. package/dist/utils/env-management.js +0 -2
  255. package/dist/utils/format-env-suffix.d.ts +0 -1
  256. package/dist/utils/format-env-suffix.js +0 -2
  257. package/dist/utils/format.d.ts +0 -1
  258. package/dist/utils/format.js +0 -2
  259. package/dist/utils/formatter.d.ts +0 -1
  260. package/dist/utils/formatter.js +0 -2
  261. package/dist/utils/fs-utils.d.ts +0 -1
  262. package/dist/utils/fs-utils.js +0 -2
  263. package/dist/utils/git.d.ts +0 -1
  264. package/dist/utils/git.js +0 -2
  265. package/dist/utils/handle-upgrade.d.ts +0 -1
  266. package/dist/utils/handle-upgrade.js +0 -2
  267. package/dist/utils/is-debug.d.ts +0 -1
  268. package/dist/utils/is-debug.js +0 -2
  269. package/dist/utils/lambda-config.d.ts +0 -1
  270. package/dist/utils/lambda-config.js +0 -2
  271. package/dist/utils/log.d.ts +0 -1
  272. package/dist/utils/log.js +0 -2
  273. package/dist/utils/messages.d.ts +0 -1
  274. package/dist/utils/messages.js +0 -2
  275. package/dist/utils/package-manager.d.ts +0 -1
  276. package/dist/utils/package-manager.js +0 -2
  277. package/dist/utils/parse-template-spec.d.ts +0 -1
  278. package/dist/utils/parse-template-spec.js +0 -2
  279. package/dist/utils/payload-config-ast.d.ts +0 -1
  280. package/dist/utils/payload-config-ast.js +0 -2
  281. package/dist/utils/payload-config-finder.d.ts +0 -1
  282. package/dist/utils/payload-config-finder.js +0 -2
  283. package/dist/utils/payload-config-modifier.d.ts +0 -1
  284. package/dist/utils/payload-config-modifier.js +0 -2
  285. package/dist/utils/payload-package-check.d.ts +0 -1
  286. package/dist/utils/payload-package-check.js +0 -2
  287. package/dist/utils/project.d.ts +1 -2
  288. package/dist/utils/project.js +2 -4
  289. package/dist/utils/resolve-environment.d.ts +0 -1
  290. package/dist/utils/resolve-environment.js +0 -2
  291. package/dist/utils/s3-upload.d.ts +0 -1
  292. package/dist/utils/s3-upload.js +0 -2
  293. package/dist/utils/token-display.d.ts +0 -1
  294. package/dist/utils/token-display.js +0 -2
  295. package/dist/utils/typescript-validator.d.ts +0 -1
  296. package/dist/utils/typescript-validator.js +0 -2
  297. package/dist/utils/version-check.d.ts +0 -1
  298. package/dist/utils/version-check.js +0 -2
  299. package/package.json +1 -1
@@ -22,5 +22,3 @@ export const isFigmaOrigin = (origin)=>{
22
22
  return false;
23
23
  }
24
24
  };
25
-
26
- //# sourceMappingURL=figmaHostnames.js.map
@@ -1,3 +1,2 @@
1
1
  import type { Config } from 'payload';
2
2
  export declare const getAdminCollectionSlug: (config: Config) => string;
3
- //# sourceMappingURL=getAdminCollectionSlug.d.ts.map
@@ -14,5 +14,3 @@ export const getAdminCollectionSlug = (config)=>{
14
14
  // Otherwise, assume that it'll be the built-in auth
15
15
  return 'users';
16
16
  };
17
-
18
- //# sourceMappingURL=getAdminCollectionSlug.js.map
@@ -78,4 +78,3 @@ export declare const buildCsrfCookieHeader: (nonce: string) => string;
78
78
  */
79
79
  export declare const buildCsrfCookieClearHeader: () => string;
80
80
  export {};
81
- //# sourceMappingURL=getAuthorizeURL.d.ts.map
@@ -96,5 +96,3 @@ export const getAuthorizeURL = async ({ collection, collectionOptions, endpointS
96
96
  'Path=/',
97
97
  'Max-Age=0'
98
98
  ].join('; ');
99
-
100
- //# sourceMappingURL=getAuthorizeURL.js.map
@@ -1,4 +1,3 @@
1
1
  type CookieExpires = Date | number | string | undefined;
2
2
  export declare const getCookieExpiration: (expires?: CookieExpires) => Date;
3
3
  export {};
4
- //# sourceMappingURL=getCookieExpiration.d.ts.map
@@ -7,5 +7,3 @@ export const getCookieExpiration = (expires)=>{
7
7
  currentTime.setSeconds(currentTime.getSeconds() + seconds);
8
8
  return currentTime;
9
9
  };
10
-
11
- //# sourceMappingURL=getCookieExpiration.js.map
@@ -1,2 +1 @@
1
1
  export declare function getSecondsFromTokenExp(futureUnixTimestamp: number): number;
2
- //# sourceMappingURL=getSecondsFromTokenExp.d.ts.map
@@ -3,5 +3,3 @@ export function getSecondsFromTokenExp(futureUnixTimestamp) {
3
3
  ;
4
4
  return futureUnixTimestamp - now;
5
5
  }
6
-
7
- //# sourceMappingURL=getSecondsFromTokenExp.js.map
@@ -3,4 +3,3 @@ export declare const getTokenExp: ({ debugLogger, token, }: {
3
3
  debugLogger: DebugLogger;
4
4
  token: string;
5
5
  }) => number | undefined;
6
- //# sourceMappingURL=getTokenExp.d.ts.map
@@ -16,5 +16,3 @@ export const getTokenExp = ({ debugLogger, token })=>{
16
16
  }
17
17
  return undefined;
18
18
  };
19
-
20
- //# sourceMappingURL=getTokenExp.js.map
@@ -6,4 +6,3 @@ interface Args {
6
6
  }
7
7
  export declare const getUsernameField: ({ collection, collectionOptions, }: Args) => EmailField | TextField;
8
8
  export {};
9
- //# sourceMappingURL=getUsernameField.d.ts.map
@@ -16,5 +16,3 @@ export const getUsernameField = ({ collection, collectionOptions })=>{
16
16
  }
17
17
  return collectionOptions.usernameField;
18
18
  };
19
-
20
- //# sourceMappingURL=getUsernameField.js.map
@@ -5,4 +5,3 @@ type User = Record<string, unknown>;
5
5
  */
6
6
  export declare const hasUserTokenPropsChanged: (user: User, token: Record<string, unknown>) => boolean;
7
7
  export {};
8
- //# sourceMappingURL=hasUserTokenPropsChanged.d.ts.map
@@ -21,5 +21,3 @@ function compareValues(userVal, tokenVal) {
21
21
  }
22
22
  return userVal !== tokenVal;
23
23
  }
24
-
25
- //# sourceMappingURL=hasUserTokenPropsChanged.js.map
@@ -1,2 +1 @@
1
1
  export declare const isAbsoluteURL: (url: string) => boolean;
2
- //# sourceMappingURL=isAbsoluteURL.d.ts.map
@@ -1,3 +1 @@
1
1
  export const isAbsoluteURL = (url)=>/^[a-z][a-z\d+.-]*:/.test(url);
2
-
3
- //# sourceMappingURL=isAbsoluteURL.js.map
@@ -4,4 +4,3 @@
4
4
  * Content API returns HTTP 409 with "conflict" or "already exists" in the message.
5
5
  */
6
6
  export declare function isDuplicateKeyError(error: unknown): boolean;
7
- //# sourceMappingURL=isDuplicateKeyError.d.ts.map
@@ -10,5 +10,3 @@
10
10
  const message = typeof err.message === 'string' ? err.message : '';
11
11
  return message.includes('409') || message.toLowerCase().includes('conflict') || message.toLowerCase().includes('already exists');
12
12
  }
13
-
14
- //# sourceMappingURL=isDuplicateKeyError.js.map
@@ -1,2 +1 @@
1
1
  export declare function mergeHeaders(sourceHeaders: Headers, destinationHeaders: Headers): void;
2
- //# sourceMappingURL=mergeHeaders.d.ts.map
@@ -33,5 +33,3 @@ export function mergeHeaders(sourceHeaders, destinationHeaders) {
33
33
  destinationHeaders.append(key, value);
34
34
  });
35
35
  }
36
-
37
- //# sourceMappingURL=mergeHeaders.js.map
@@ -13,4 +13,3 @@ type Result = {
13
13
  } | false;
14
14
  export declare const refreshTokens: ({ payload, refreshToken, strategy }: Args) => Promise<Result>;
15
15
  export {};
16
- //# sourceMappingURL=refreshTokens.d.ts.map
@@ -52,7 +52,15 @@ export const refreshTokens = async ({ payload, refreshToken, strategy })=>{
52
52
  value: token
53
53
  });
54
54
  headers.append('Set-Cookie', withPartitionedCookie(tokenCookie));
55
- const decodedOauthToken = await validateProjectToken(token, getInfraEnvironment());
55
+ const audience = payload.config.custom.figma.contentSystemId;
56
+ if (!audience) {
57
+ throw new Error('Cannot validate token audience: contentSystemId is not configured');
58
+ }
59
+ const decodedOauthToken = await validateProjectToken({
60
+ audience,
61
+ environment: getInfraEnvironment(),
62
+ token
63
+ });
56
64
  return {
57
65
  decodedOauthToken,
58
66
  headers,
@@ -67,5 +75,3 @@ export const refreshTokens = async ({ payload, refreshToken, strategy })=>{
67
75
  }
68
76
  return false;
69
77
  };
70
-
71
- //# sourceMappingURL=refreshTokens.js.map
@@ -17,4 +17,3 @@
17
17
  * future/hand-built `Secure=false` can't get `Partitioned` (which requires Secure).
18
18
  */
19
19
  export declare const withPartitionedCookie: (cookie: string) => string;
20
- //# sourceMappingURL=withPartitionedCookie.d.ts.map
@@ -24,5 +24,3 @@
24
24
  }
25
25
  return `${cookie}; Partitioned`;
26
26
  };
27
-
28
- //# sourceMappingURL=withPartitionedCookie.js.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Retrieves a single search-parameter value from the return type of
3
+ * `@payloadcms/ui`'s `useSearchParams` hook in a version-agnostic way.
4
+ *
5
+ * The hook's return shape changed between Payload v3 and v4:
6
+ *
7
+ * **v3** — returns a context object; params are accessed via `searchParams[key]` (`ParsedQs`):
8
+ * ```ts
9
+ * import { useSearchParams } from '@payloadcms/ui'
10
+ * const { searchParams } = useSearchParams()
11
+ * const value = searchParams['redirect'] // string | string[] | ParsedQs | …
12
+ * ```
13
+ *
14
+ * **v4** — returns a `URLSearchParams`-like object directly; params are accessed via `.get(key)`:
15
+ * ```ts
16
+ * import { useSearchParams } from '@payloadcms/ui'
17
+ * const searchParams = useSearchParams()
18
+ * const value = searchParams.get('redirect') // string | null
19
+ * ```
20
+ *
21
+ * Pass the raw hook return value here and it handles both shapes transparently.
22
+ *
23
+ * @param searchParamsHookResult - Raw return value of `useSearchParams()` from `@payloadcms/ui`.
24
+ * @param key - The query-string parameter name to read.
25
+ * @returns The first string value for `key`, or `undefined` if absent.
26
+ */
27
+ export declare const getSearchParam: (searchParamsHookResult: unknown, key: string) => string | undefined;
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Retrieves a single search-parameter value from the return type of
3
+ * `@payloadcms/ui`'s `useSearchParams` hook in a version-agnostic way.
4
+ *
5
+ * The hook's return shape changed between Payload v3 and v4:
6
+ *
7
+ * **v3** — returns a context object; params are accessed via `searchParams[key]` (`ParsedQs`):
8
+ * ```ts
9
+ * import { useSearchParams } from '@payloadcms/ui'
10
+ * const { searchParams } = useSearchParams()
11
+ * const value = searchParams['redirect'] // string | string[] | ParsedQs | …
12
+ * ```
13
+ *
14
+ * **v4** — returns a `URLSearchParams`-like object directly; params are accessed via `.get(key)`:
15
+ * ```ts
16
+ * import { useSearchParams } from '@payloadcms/ui'
17
+ * const searchParams = useSearchParams()
18
+ * const value = searchParams.get('redirect') // string | null
19
+ * ```
20
+ *
21
+ * Pass the raw hook return value here and it handles both shapes transparently.
22
+ *
23
+ * @param searchParamsHookResult - Raw return value of `useSearchParams()` from `@payloadcms/ui`.
24
+ * @param key - The query-string parameter name to read.
25
+ * @returns The first string value for `key`, or `undefined` if absent.
26
+ */ export const getSearchParam = (searchParamsHookResult, key)=>{
27
+ // v4 / next/navigation: result is URLSearchParams-like, access via .get()
28
+ if (searchParamsHookResult && typeof searchParamsHookResult === 'object' && 'get' in searchParamsHookResult && typeof searchParamsHookResult.get === 'function') {
29
+ const value = searchParamsHookResult.get(key);
30
+ return typeof value === 'string' ? value : undefined;
31
+ }
32
+ // v3: result is { searchParams: ParsedQs; … }, access via .searchParams[key]
33
+ if (searchParamsHookResult && typeof searchParamsHookResult === 'object' && 'searchParams' in searchParamsHookResult) {
34
+ const legacySearchParams = searchParamsHookResult.searchParams;
35
+ const value = legacySearchParams?.[key];
36
+ if (typeof value === 'string') {
37
+ return value;
38
+ }
39
+ // ParsedQs may parse repeated params as an array — take the first entry
40
+ if (Array.isArray(value) && typeof value[0] === 'string') {
41
+ return value[0];
42
+ }
43
+ }
44
+ return undefined;
45
+ };
@@ -2,4 +2,3 @@ import type { DatabaseAdapterObj } from 'payload';
2
2
  export interface FigmaContentSystemOptions {
3
3
  }
4
4
  export declare function figmaContentSystem(options?: FigmaContentSystemOptions): DatabaseAdapterObj;
5
- //# sourceMappingURL=adapter.d.ts.map
@@ -135,5 +135,3 @@ export function figmaContentSystem(options = {}) {
135
135
  init: adapter
136
136
  };
137
137
  }
138
-
139
- //# sourceMappingURL=adapter.js.map
@@ -5,4 +5,3 @@ import type { TokenStore } from '../auth/token-store.js';
5
5
  * actionable instead of relying on per-request middleware errors.
6
6
  */
7
7
  export declare function logMissingCliAuth(tokenStore: TokenStore): void;
8
- //# sourceMappingURL=auth-preflight.d.ts.map
@@ -16,5 +16,3 @@ import pc from 'picocolors';
16
16
  ];
17
17
  p.note(lines.join('\n'), pc.yellow('Figma authentication required'));
18
18
  }
19
-
20
- //# sourceMappingURL=auth-preflight.js.map
@@ -20,4 +20,3 @@ export type MissingContentSystemIdReason = {
20
20
  * actionable step is visible above the stack trace.
21
21
  */
22
22
  export declare function logMissingContentSystemId(reason: MissingContentSystemIdReason): void;
23
- //# sourceMappingURL=bootstrap-preflight.d.ts.map
@@ -41,5 +41,3 @@ function buildBody(reason) {
41
41
  `Run ${initForceCmd} to reconfigure, or set FIGMA_ENVIRONMENT_NAME to a valid environment.`
42
42
  ];
43
43
  }
44
-
45
- //# sourceMappingURL=bootstrap-preflight.js.map
@@ -52,4 +52,3 @@ export type FigmaConfig = {
52
52
  };
53
53
  } & Omit<Config, 'db' | 'editor' | 'secret'> & Partial<Pick<Config, 'db'>>;
54
54
  export declare function buildFigmaConfig(config: FigmaConfig): Promise<SanitizedConfig>;
55
- //# sourceMappingURL=build-config.d.ts.map
@@ -359,5 +359,3 @@ export async function buildFigmaConfig(config) {
359
359
  // Delegate to Payload's buildConfig
360
360
  return await payloadBuildConfig(configWithFigmaDefaults);
361
361
  }
362
-
363
- //# sourceMappingURL=build-config.js.map
@@ -11,4 +11,3 @@ export declare function getDevCookieNames(contentSystemId: string): {
11
11
  cookieName: string;
12
12
  userInfoCookieName: string;
13
13
  };
14
- //# sourceMappingURL=dev-cookie-names.d.ts.map
@@ -15,5 +15,3 @@ import { getEnvVarSync } from '../utils/env-management.js';
15
15
  userInfoCookieName: `figma-${suffix}-user-info`
16
16
  };
17
17
  }
18
-
19
- //# sourceMappingURL=dev-cookie-names.js.map
@@ -165,4 +165,3 @@ export type UploadPaths = {
165
165
  };
166
166
  };
167
167
  };
168
- //# sourceMappingURL=api-types.d.ts.map
@@ -2,5 +2,3 @@
2
2
  * Upload API types extracted from Content API OpenAPI spec.
3
3
  * These are kept separate to avoid breaking changes when the main spec is regenerated.
4
4
  */ export { };
5
-
6
- //# sourceMappingURL=api-types.js.map
@@ -6,4 +6,3 @@ export declare const ContentApiClientUploadHandler: ({ children, collectionSlug,
6
6
  prefix?: string;
7
7
  serverHandlerPath: `/${string}`;
8
8
  }) => import("react").JSX.Element;
9
- //# sourceMappingURL=ClientUploadHandler.d.ts.map
@@ -39,5 +39,3 @@ export const ContentApiClientUploadHandler = createClientUploadHandler({
39
39
  };
40
40
  }
41
41
  });
42
-
43
- //# sourceMappingURL=ClientUploadHandler.js.map
@@ -10,4 +10,3 @@ type Args = {
10
10
  };
11
11
  export declare const getGenerateSignedURLHandler: ({ access, client, }: Args) => PayloadHandler;
12
12
  export {};
13
- //# sourceMappingURL=generateSignedURL.d.ts.map
@@ -35,5 +35,3 @@ export const getGenerateSignedURLHandler = ({ access = defaultAccess, client })=
35
35
  });
36
36
  };
37
37
  };
38
-
39
- //# sourceMappingURL=generateSignedURL.js.map
@@ -3,4 +3,3 @@ import type { UploadPaths } from './api-types.js';
3
3
  import type { StorageClientConfig } from './types.js';
4
4
  export type StorageClient = ReturnType<typeof createClient<UploadPaths>>;
5
5
  export declare function createStorageClient(config: StorageClientConfig): StorageClient;
6
- //# sourceMappingURL=client.d.ts.map
@@ -35,5 +35,3 @@ function createStorageAuthMiddleware(config) {
35
35
  }
36
36
  };
37
37
  }
38
-
39
- //# sourceMappingURL=client.js.map
@@ -4,4 +4,3 @@ type Args = {
4
4
  };
5
5
  export declare const getGenerateURL: ({ baseUrl }: Args) => GenerateURL;
6
6
  export {};
7
- //# sourceMappingURL=generateURL.d.ts.map
@@ -4,5 +4,3 @@ export const getGenerateURL = ({ baseUrl })=>({ collection, filename, prefix = '
4
4
  const fileKey = path.posix.join(prefix, filename);
5
5
  return `${baseUrl}/api/v0/uploads/download/${collectionId}/${encodeURIComponent(fileKey)}`;
6
6
  };
7
-
8
- //# sourceMappingURL=generateURL.js.map
@@ -5,4 +5,3 @@ type Args = {
5
5
  };
6
6
  export declare const getHandleDelete: ({ client }: Args) => HandleDelete;
7
7
  export {};
8
- //# sourceMappingURL=handleDelete.d.ts.map
@@ -13,5 +13,3 @@ export const getHandleDelete = ({ client })=>{
13
13
  });
14
14
  };
15
15
  };
16
-
17
- //# sourceMappingURL=handleDelete.js.map
@@ -8,4 +8,3 @@ type Args = {
8
8
  };
9
9
  export declare const getHandleUpload: ({ client, collection, prefix }: Args) => HandleUpload;
10
10
  export {};
11
- //# sourceMappingURL=handleUpload.d.ts.map
@@ -140,5 +140,3 @@ async function uploadMultipart({ client, collectionId, fileData, fileKey, mimeTy
140
140
  throw error;
141
141
  }
142
142
  }
143
-
144
- //# sourceMappingURL=handleUpload.js.map
@@ -2,4 +2,3 @@ import type { Adapter } from '@payloadcms/plugin-cloud-storage/types';
2
2
  import type { StorageClientConfig } from './types.js';
3
3
  export type { StorageClientConfig } from './types.js';
4
4
  export declare function contentApiStorageAdapter(config: StorageClientConfig): Adapter;
5
- //# sourceMappingURL=index.d.ts.map
@@ -27,5 +27,3 @@ export function contentApiStorageAdapter(config) {
27
27
  };
28
28
  };
29
29
  }
30
-
31
- //# sourceMappingURL=index.js.map
@@ -7,4 +7,3 @@ type Args = {
7
7
  };
8
8
  export declare const getHandler: ({ client, collection }: Args) => StaticHandler;
9
9
  export {};
10
- //# sourceMappingURL=staticHandler.d.ts.map
@@ -59,5 +59,3 @@ export const getHandler = ({ client, collection })=>{
59
59
  }
60
60
  };
61
61
  };
62
-
63
- //# sourceMappingURL=staticHandler.js.map
@@ -7,4 +7,3 @@ export type StorageClientConfig = {
7
7
  baseUrl: string;
8
8
  contentApiKey: string;
9
9
  };
10
- //# sourceMappingURL=types.d.ts.map
@@ -1,3 +1 @@
1
1
  export { };
2
-
3
- //# sourceMappingURL=types.js.map
@@ -9,4 +9,3 @@ export declare function getSafeFilename({ collectionSlug, desiredFilename, prefi
9
9
  prefix?: string;
10
10
  req: PayloadRequest;
11
11
  }): Promise<string>;
12
- //# sourceMappingURL=getSafeFilename.d.ts.map
@@ -57,5 +57,3 @@ import sanitize from 'sanitize-filename';
57
57
  }
58
58
  return modifiedFilename;
59
59
  }
60
-
61
- //# sourceMappingURL=getSafeFilename.js.map
@@ -1,3 +1,2 @@
1
1
  export { getSafeFilename } from './getSafeFilename.js';
2
2
  export { type ContentApiClientUploadContext, parseClientUploadContext, } from './parseClientUploadContext.js';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,2 @@
1
1
  export { getSafeFilename } from './getSafeFilename.js';
2
2
  export { parseClientUploadContext } from './parseClientUploadContext.js';
3
-
4
- //# sourceMappingURL=index.js.map
@@ -16,4 +16,3 @@ export type ContentApiClientUploadContext = {
16
16
  * an empty object for any non-object input.
17
17
  */
18
18
  export declare const parseClientUploadContext: (context: unknown) => ContentApiClientUploadContext;
19
- //# sourceMappingURL=parseClientUploadContext.d.ts.map
@@ -26,5 +26,3 @@
26
26
  }
27
27
  return result;
28
28
  };
29
-
30
- //# sourceMappingURL=parseClientUploadContext.js.map
@@ -32,4 +32,3 @@ export interface ProjectInfo {
32
32
  /** Payload version if installed */
33
33
  payloadVersion?: string;
34
34
  }
35
- //# sourceMappingURL=config.d.ts.map
@@ -3,5 +3,3 @@
3
3
  */ /**
4
4
  * Project information from detection
5
5
  */ export { };
6
-
7
- //# sourceMappingURL=config.js.map
package/dist/types.d.ts CHANGED
@@ -66,4 +66,3 @@ export type NextAppDetails = {
66
66
  export type NextConfigType = 'cjs' | 'esm' | 'ts';
67
67
  export type StorageAdapterType = 'localDisk' | 'r2Storage' | 'vercelBlobStorage';
68
68
  export {};
69
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js CHANGED
@@ -1,3 +1 @@
1
1
  export { };
2
-
3
- //# sourceMappingURL=types.js.map
@@ -6,4 +6,3 @@ export declare class NextjsAdapter implements DeployAdapter {
6
6
  prepareLambdaBundle(projectPath: string): Promise<LambdaBundle>;
7
7
  }
8
8
  export declare const nextjsAdapter: NextjsAdapter;
9
- //# sourceMappingURL=nextjs.d.ts.map
@@ -59,5 +59,3 @@ export class NextjsAdapter {
59
59
  }
60
60
  }
61
61
  export const nextjsAdapter = new NextjsAdapter();
62
-
63
- //# sourceMappingURL=nextjs.js.map
@@ -6,4 +6,3 @@ export declare class NitroAdapter implements DeployAdapter {
6
6
  prepareLambdaBundle(projectPath: string): Promise<LambdaBundle>;
7
7
  }
8
8
  export declare const nitroAdapter: NitroAdapter;
9
- //# sourceMappingURL=nitro.d.ts.map
@@ -170,5 +170,3 @@ async function createZip(zipPath, entries) {
170
170
  void archive.finalize();
171
171
  });
172
172
  }
173
-
174
- //# sourceMappingURL=nitro.js.map
@@ -7,4 +7,3 @@ export declare class ViteAdapter implements DeployAdapter {
7
7
  prepareLambdaBundle(): Promise<LambdaBundle | null>;
8
8
  }
9
9
  export declare const viteAdapter: ViteAdapter;
10
- //# sourceMappingURL=vite.d.ts.map
@@ -29,5 +29,3 @@ export class ViteAdapter {
29
29
  }
30
30
  }
31
31
  export const viteAdapter = new ViteAdapter();
32
-
33
- //# sourceMappingURL=vite.js.map
@@ -48,4 +48,3 @@ export declare function collectSSGAssets(projectPath: string): Promise<SSGAssets
48
48
  * @throws Error if build missing or zip creation fails
49
49
  */
50
50
  export declare function createLambdaZip(projectPath: string): Promise<void>;
51
- //# sourceMappingURL=asset-collection.d.ts.map
@@ -142,5 +142,3 @@ const MAX_ASSET_SIZE = 50 * 1024 * 1024 // 50MB
142
142
  */ export async function createLambdaZip(projectPath) {
143
143
  await buildLambdaZip(projectPath);
144
144
  }
145
-
146
- //# sourceMappingURL=asset-collection.js.map
@@ -23,4 +23,3 @@ export declare function detectBuild(projectPath: string): Promise<BuildInfo | nu
23
23
  * @returns Build command string if found, null otherwise
24
24
  */
25
25
  export declare function getBuildCommand(projectPath: string): Promise<null | string>;
26
- //# sourceMappingURL=build-detection.d.ts.map
@@ -114,5 +114,3 @@ import path from 'path';
114
114
  return null;
115
115
  }
116
116
  }
117
-
118
- //# sourceMappingURL=build-detection.js.map
@@ -23,4 +23,3 @@ export declare const LAMBDA_MAX_UNZIPPED_BYTES: number;
23
23
  * @throws Error if standalone directory missing or zip creation fails
24
24
  */
25
25
  export declare function buildLambdaZip(projectPath: string): Promise<LambdaBundle>;
26
- //# sourceMappingURL=build-lambda-zip.d.ts.map
@@ -88,5 +88,3 @@ function createZip(sourceDir, zipPath) {
88
88
  void archive.finalize();
89
89
  });
90
90
  }
91
-
92
- //# sourceMappingURL=build-lambda-zip.js.map
@@ -5,4 +5,3 @@ import type { TokenStore } from '../auth/token-store.js';
5
5
  * Called from init, env, and build-config to keep the store populated.
6
6
  */
7
7
  export declare function cacheAllEnvironments(tokenStore: TokenStore, projectId: string, bootstrapInfo: BootstrapInfo): void;
8
- //# sourceMappingURL=cache-bootstrap.d.ts.map
@@ -14,5 +14,3 @@ import * as log from './log.js';
14
14
  }
15
15
  log.debug(`Cached bootstrap data for environments: ${bootstrapInfo.environments.map((e)=>e.name).join(', ')}`);
16
16
  }
17
-
18
- //# sourceMappingURL=cache-bootstrap.js.map
@@ -8,4 +8,3 @@
8
8
  * @param entries - Optional entries to add to .gitignore
9
9
  */
10
10
  export declare function ensureGitignore(projectPath: string, entries?: string[]): Promise<void>;
11
- //# sourceMappingURL=config.d.ts.map