@payloadcms/figma 0.0.1-alpha.73 → 0.0.1-alpha.75

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 (309) 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 +2 -2
  6. package/dist/api/figma-api.js +33 -5
  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 +22 -6
  16. package/dist/auth/jwt-validator.js +33 -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 +6 -4
  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 +5 -2
  32. package/dist/auth/types.js +1 -3
  33. package/dist/cli.d.ts +0 -1
  34. package/dist/cli.js +7 -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 +0 -2
  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/commands/upload-schema.d.ts +8 -0
  58. package/dist/commands/upload-schema.js +91 -0
  59. package/dist/config/oauth.d.ts +0 -1
  60. package/dist/config/oauth.js +0 -2
  61. package/dist/constants.d.ts +0 -1
  62. package/dist/constants.js +0 -2
  63. package/dist/db-content-api/generated/content-api-types.d.ts +4188 -592
  64. package/dist/db-content-api/generated/content-api-types.js +0 -2
  65. package/dist/db-content-api/index.d.ts +0 -1
  66. package/dist/db-content-api/index.js +0 -2
  67. package/dist/db-content-api/temp-utilities/slug.d.ts +0 -1
  68. package/dist/db-content-api/temp-utilities/slug.js +0 -2
  69. package/dist/db-content-api/temp-utilities/sorting.d.ts +0 -1
  70. package/dist/db-content-api/temp-utilities/sorting.js +0 -2
  71. package/dist/db-content-api/temp-utilities/types.d.ts +0 -1
  72. package/dist/db-content-api/temp-utilities/types.js +0 -2
  73. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +0 -1
  74. package/dist/db-content-api/temp-utilities/unwrapDocument.js +0 -2
  75. package/dist/db-content-api/utilities/auth.d.ts +0 -1
  76. package/dist/db-content-api/utilities/auth.js +0 -2
  77. package/dist/db-content-api/utilities/data/applyDefaults.d.ts +0 -1
  78. package/dist/db-content-api/utilities/data/applyDefaults.js +0 -2
  79. package/dist/db-content-api/utilities/data/castFieldValue.d.ts +0 -1
  80. package/dist/db-content-api/utilities/data/castFieldValue.js +0 -2
  81. package/dist/db-content-api/utilities/data/index.d.ts +0 -1
  82. package/dist/db-content-api/utilities/data/index.js +0 -2
  83. package/dist/db-content-api/utilities/data/pointShape.d.ts +3 -0
  84. package/dist/db-content-api/utilities/data/pointShape.js +43 -0
  85. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +0 -1
  86. package/dist/db-content-api/utilities/data/removeVirtualFields.js +0 -2
  87. package/dist/db-content-api/utilities/data/richTextShape.d.ts +3 -0
  88. package/dist/db-content-api/utilities/data/richTextShape.js +56 -0
  89. package/dist/db-content-api/utilities/data/stripFields.d.ts +0 -1
  90. package/dist/db-content-api/utilities/data/stripFields.js +0 -2
  91. package/dist/db-content-api/utilities/data/transformPublishedLocale.d.ts +0 -1
  92. package/dist/db-content-api/utilities/data/transformPublishedLocale.js +0 -2
  93. package/dist/db-content-api/utilities/data/validateRelationships.d.ts +0 -1
  94. package/dist/db-content-api/utilities/data/validateRelationships.js +0 -2
  95. package/dist/db-content-api/utilities/joins.d.ts +0 -1
  96. package/dist/db-content-api/utilities/joins.js +0 -2
  97. package/dist/db-content-api/utilities/locale/index.d.ts +0 -1
  98. package/dist/db-content-api/utilities/locale/index.js +0 -2
  99. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts +0 -1
  100. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js +0 -2
  101. package/dist/db-content-api/utilities/meta/buildMeta.d.ts +0 -1
  102. package/dist/db-content-api/utilities/meta/buildMeta.js +0 -2
  103. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts +0 -1
  104. package/dist/db-content-api/utilities/meta/buildPathTypes.js +0 -2
  105. package/dist/db-content-api/utilities/meta/buildUniquePaths.d.ts +0 -1
  106. package/dist/db-content-api/utilities/meta/buildUniquePaths.js +0 -2
  107. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.d.ts +0 -1
  108. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.js +0 -2
  109. package/dist/db-content-api/utilities/schema/buildDocumentSchema.d.ts +56 -0
  110. package/dist/db-content-api/utilities/schema/buildDocumentSchema.js +183 -0
  111. package/dist/db-content-api/utilities/where.d.ts +0 -1
  112. package/dist/db-content-api/utilities/where.js +0 -2
  113. package/dist/deploy/schedule-extract-plugin.d.ts +0 -1
  114. package/dist/deploy/schedule-extract-plugin.js +0 -2
  115. package/dist/endpoints/health.d.ts +0 -1
  116. package/dist/endpoints/health.js +0 -2
  117. package/dist/endpoints/schema.d.ts +0 -1
  118. package/dist/endpoints/schema.js +0 -2
  119. package/dist/exports/client.d.ts +0 -1
  120. package/dist/exports/client.js +0 -2
  121. package/dist/index.d.ts +0 -1
  122. package/dist/index.js +0 -2
  123. package/dist/lib/download-skill.d.ts +0 -1
  124. package/dist/lib/download-skill.js +0 -2
  125. package/dist/oauth/components/FigmaAvatar/index.d.ts +0 -1
  126. package/dist/oauth/components/FigmaAvatar/index.js +0 -2
  127. package/dist/oauth/components/FigmaAvatarCell/index.d.ts +0 -1
  128. package/dist/oauth/components/FigmaAvatarCell/index.js +0 -2
  129. package/dist/oauth/components/FigmaAvatarPlaceholder/index.d.ts +0 -1
  130. package/dist/oauth/components/FigmaAvatarPlaceholder/index.js +0 -2
  131. package/dist/oauth/components/LoginButton/iframeAutoLogin.d.ts +0 -1
  132. package/dist/oauth/components/LoginButton/iframeAutoLogin.js +0 -2
  133. package/dist/oauth/components/LoginButton/index.d.ts +0 -1
  134. package/dist/oauth/components/LoginButton/index.js +3 -5
  135. package/dist/oauth/components/LogoutButton/index.d.ts +0 -1
  136. package/dist/oauth/components/LogoutButton/index.js +0 -2
  137. package/dist/oauth/defaults.d.ts +0 -1
  138. package/dist/oauth/defaults.js +8 -2
  139. package/dist/oauth/endpoints/getLoginEndpoint.d.ts +0 -1
  140. package/dist/oauth/endpoints/getLoginEndpoint.js +4 -8
  141. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts +0 -1
  142. package/dist/oauth/endpoints/getLogoutEndpoint.js +0 -2
  143. package/dist/oauth/endpoints/getMetaEndpoint.d.ts +0 -1
  144. package/dist/oauth/endpoints/getMetaEndpoint.js +0 -2
  145. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.d.ts +0 -1
  146. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.js +0 -2
  147. package/dist/oauth/exports/client.d.ts +0 -1
  148. package/dist/oauth/exports/client.js +0 -2
  149. package/dist/oauth/hooks/afterLogout.d.ts +0 -1
  150. package/dist/oauth/hooks/afterLogout.js +0 -2
  151. package/dist/oauth/hooks/me.d.ts +0 -1
  152. package/dist/oauth/hooks/me.js +0 -2
  153. package/dist/oauth/hooks/refresh.d.ts +0 -1
  154. package/dist/oauth/hooks/refresh.js +0 -2
  155. package/dist/oauth/index.d.ts +0 -1
  156. package/dist/oauth/index.js +0 -2
  157. package/dist/oauth/strategy/index.d.ts +0 -1
  158. package/dist/oauth/strategy/index.js +17 -19
  159. package/dist/oauth/types.d.ts +0 -1
  160. package/dist/oauth/types.js +0 -2
  161. package/dist/oauth/utilities/clearCookie.d.ts +0 -1
  162. package/dist/oauth/utilities/clearCookie.js +0 -2
  163. package/dist/oauth/utilities/createCookieOptions.d.ts +0 -1
  164. package/dist/oauth/utilities/createCookieOptions.js +0 -2
  165. package/dist/oauth/utilities/createDebugLogger.d.ts +0 -1
  166. package/dist/oauth/utilities/createDebugLogger.js +0 -2
  167. package/dist/oauth/utilities/establishSession.d.ts +4 -5
  168. package/dist/oauth/utilities/establishSession.js +9 -12
  169. package/dist/oauth/utilities/exchangeCodeForAccessToken.d.ts +0 -1
  170. package/dist/oauth/utilities/exchangeCodeForAccessToken.js +0 -2
  171. package/dist/oauth/utilities/extractOrigin.d.ts +0 -1
  172. package/dist/oauth/utilities/extractOrigin.js +0 -2
  173. package/dist/oauth/utilities/figmaHostnames.d.ts +0 -1
  174. package/dist/oauth/utilities/figmaHostnames.js +0 -2
  175. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts +0 -1
  176. package/dist/oauth/utilities/getAdminCollectionSlug.js +0 -2
  177. package/dist/oauth/utilities/getAuthorizeURL.d.ts +0 -1
  178. package/dist/oauth/utilities/getAuthorizeURL.js +0 -2
  179. package/dist/oauth/utilities/getCookieExpiration.d.ts +0 -1
  180. package/dist/oauth/utilities/getCookieExpiration.js +0 -2
  181. package/dist/oauth/utilities/getSecondsFromTokenExp.d.ts +0 -1
  182. package/dist/oauth/utilities/getSecondsFromTokenExp.js +0 -2
  183. package/dist/oauth/utilities/getTokenExp.d.ts +0 -1
  184. package/dist/oauth/utilities/getTokenExp.js +0 -2
  185. package/dist/oauth/utilities/getUsernameField.d.ts +0 -1
  186. package/dist/oauth/utilities/getUsernameField.js +0 -2
  187. package/dist/oauth/utilities/hasUserTokenPropsChanged.d.ts +0 -1
  188. package/dist/oauth/utilities/hasUserTokenPropsChanged.js +0 -2
  189. package/dist/oauth/utilities/isAbsoluteURL.d.ts +0 -1
  190. package/dist/oauth/utilities/isAbsoluteURL.js +0 -2
  191. package/dist/oauth/utilities/isDuplicateKeyError.d.ts +0 -1
  192. package/dist/oauth/utilities/isDuplicateKeyError.js +0 -2
  193. package/dist/oauth/utilities/mergeHeaders.d.ts +0 -1
  194. package/dist/oauth/utilities/mergeHeaders.js +0 -2
  195. package/dist/oauth/utilities/refreshTokens.d.ts +0 -1
  196. package/dist/oauth/utilities/refreshTokens.js +16 -12
  197. package/dist/oauth/utilities/withPartitionedCookie.d.ts +0 -1
  198. package/dist/oauth/utilities/withPartitionedCookie.js +0 -2
  199. package/dist/oauth/utils/getSearchParam.d.ts +27 -0
  200. package/dist/oauth/utils/getSearchParam.js +45 -0
  201. package/dist/plugin/adapter.d.ts +0 -1
  202. package/dist/plugin/adapter.js +0 -2
  203. package/dist/plugin/auth-preflight.d.ts +0 -1
  204. package/dist/plugin/auth-preflight.js +0 -2
  205. package/dist/plugin/bootstrap-preflight.d.ts +0 -1
  206. package/dist/plugin/bootstrap-preflight.js +0 -2
  207. package/dist/plugin/build-config.d.ts +1 -1
  208. package/dist/plugin/build-config.js +66 -3
  209. package/dist/plugin/dev-cookie-names.d.ts +0 -1
  210. package/dist/plugin/dev-cookie-names.js +0 -2
  211. package/dist/storage-content-api/api-types.d.ts +0 -1
  212. package/dist/storage-content-api/api-types.js +0 -2
  213. package/dist/storage-content-api/client-uploads/ClientUploadHandler.d.ts +0 -1
  214. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js +0 -2
  215. package/dist/storage-content-api/client-uploads/generateSignedURL.d.ts +0 -1
  216. package/dist/storage-content-api/client-uploads/generateSignedURL.js +0 -2
  217. package/dist/storage-content-api/client.d.ts +0 -1
  218. package/dist/storage-content-api/client.js +0 -2
  219. package/dist/storage-content-api/generateURL.d.ts +0 -1
  220. package/dist/storage-content-api/generateURL.js +0 -2
  221. package/dist/storage-content-api/handleDelete.d.ts +0 -1
  222. package/dist/storage-content-api/handleDelete.js +0 -2
  223. package/dist/storage-content-api/handleUpload.d.ts +0 -1
  224. package/dist/storage-content-api/handleUpload.js +0 -2
  225. package/dist/storage-content-api/index.d.ts +0 -1
  226. package/dist/storage-content-api/index.js +0 -2
  227. package/dist/storage-content-api/staticHandler.d.ts +0 -1
  228. package/dist/storage-content-api/staticHandler.js +0 -2
  229. package/dist/storage-content-api/types.d.ts +0 -1
  230. package/dist/storage-content-api/types.js +0 -2
  231. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +0 -1
  232. package/dist/storage-content-api/utilities/getSafeFilename.js +0 -2
  233. package/dist/storage-content-api/utilities/index.d.ts +0 -1
  234. package/dist/storage-content-api/utilities/index.js +0 -2
  235. package/dist/storage-content-api/utilities/parseClientUploadContext.d.ts +0 -1
  236. package/dist/storage-content-api/utilities/parseClientUploadContext.js +0 -2
  237. package/dist/types/config.d.ts +0 -1
  238. package/dist/types/config.js +0 -2
  239. package/dist/types.d.ts +0 -1
  240. package/dist/types.js +0 -2
  241. package/dist/utils/adapters/nextjs.d.ts +0 -1
  242. package/dist/utils/adapters/nextjs.js +0 -2
  243. package/dist/utils/adapters/nitro.d.ts +0 -1
  244. package/dist/utils/adapters/nitro.js +0 -2
  245. package/dist/utils/adapters/vite.d.ts +0 -1
  246. package/dist/utils/adapters/vite.js +0 -2
  247. package/dist/utils/asset-collection.d.ts +0 -1
  248. package/dist/utils/asset-collection.js +0 -2
  249. package/dist/utils/build-detection.d.ts +0 -1
  250. package/dist/utils/build-detection.js +0 -2
  251. package/dist/utils/build-lambda-zip.d.ts +0 -1
  252. package/dist/utils/build-lambda-zip.js +0 -2
  253. package/dist/utils/cache-bootstrap.d.ts +0 -1
  254. package/dist/utils/cache-bootstrap.js +0 -2
  255. package/dist/utils/config.d.ts +0 -1
  256. package/dist/utils/config.js +0 -2
  257. package/dist/utils/deploy-adapter.d.ts +0 -1
  258. package/dist/utils/deploy-adapter.js +0 -2
  259. package/dist/utils/download-template.d.ts +0 -1
  260. package/dist/utils/download-template.js +0 -2
  261. package/dist/utils/env-management.d.ts +0 -1
  262. package/dist/utils/env-management.js +0 -2
  263. package/dist/utils/format-env-suffix.d.ts +0 -1
  264. package/dist/utils/format-env-suffix.js +0 -2
  265. package/dist/utils/format.d.ts +0 -1
  266. package/dist/utils/format.js +0 -2
  267. package/dist/utils/formatter.d.ts +0 -1
  268. package/dist/utils/formatter.js +0 -2
  269. package/dist/utils/fs-utils.d.ts +0 -1
  270. package/dist/utils/fs-utils.js +0 -2
  271. package/dist/utils/git.d.ts +0 -1
  272. package/dist/utils/git.js +0 -2
  273. package/dist/utils/handle-upgrade.d.ts +0 -1
  274. package/dist/utils/handle-upgrade.js +0 -2
  275. package/dist/utils/is-debug.d.ts +0 -1
  276. package/dist/utils/is-debug.js +0 -2
  277. package/dist/utils/lambda-config.d.ts +0 -1
  278. package/dist/utils/lambda-config.js +0 -2
  279. package/dist/utils/load-payload-config.d.ts +9 -0
  280. package/dist/utils/load-payload-config.js +27 -0
  281. package/dist/utils/log.d.ts +0 -1
  282. package/dist/utils/log.js +0 -2
  283. package/dist/utils/messages.d.ts +0 -1
  284. package/dist/utils/messages.js +7 -2
  285. package/dist/utils/package-manager.d.ts +0 -1
  286. package/dist/utils/package-manager.js +0 -2
  287. package/dist/utils/parse-template-spec.d.ts +0 -1
  288. package/dist/utils/parse-template-spec.js +0 -2
  289. package/dist/utils/payload-config-ast.d.ts +0 -1
  290. package/dist/utils/payload-config-ast.js +0 -2
  291. package/dist/utils/payload-config-finder.d.ts +0 -1
  292. package/dist/utils/payload-config-finder.js +0 -2
  293. package/dist/utils/payload-config-modifier.d.ts +0 -1
  294. package/dist/utils/payload-config-modifier.js +0 -2
  295. package/dist/utils/payload-package-check.d.ts +0 -1
  296. package/dist/utils/payload-package-check.js +0 -2
  297. package/dist/utils/project.d.ts +0 -1
  298. package/dist/utils/project.js +0 -2
  299. package/dist/utils/resolve-environment.d.ts +0 -1
  300. package/dist/utils/resolve-environment.js +0 -2
  301. package/dist/utils/s3-upload.d.ts +0 -1
  302. package/dist/utils/s3-upload.js +0 -2
  303. package/dist/utils/token-display.d.ts +0 -1
  304. package/dist/utils/token-display.js +0 -2
  305. package/dist/utils/typescript-validator.d.ts +0 -1
  306. package/dist/utils/typescript-validator.js +0 -2
  307. package/dist/utils/version-check.d.ts +0 -1
  308. package/dist/utils/version-check.js +0 -2
  309. package/package.json +1 -1
@@ -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
@@ -28,5 +28,3 @@ const GITIGNORE_FILENAME = '.gitignore';
28
28
  await fs.writeFile(gitignorePath, newContent, 'utf-8');
29
29
  }
30
30
  }
31
-
32
- //# sourceMappingURL=config.js.map
@@ -43,4 +43,3 @@ export interface DeployAdapter {
43
43
  * @param override - Explicit adapter name from --adapter flag
44
44
  */
45
45
  export declare function detectAdapter(projectPath: string, override?: AdapterName): Promise<DeployAdapter>;
46
- //# sourceMappingURL=deploy-adapter.d.ts.map
@@ -54,5 +54,3 @@ async function exists(filePath) {
54
54
  return false;
55
55
  }
56
56
  }
57
-
58
- //# sourceMappingURL=deploy-adapter.js.map
@@ -20,4 +20,3 @@ export declare const DEFAULT_TEMPLATE_SOURCE: TemplateSource;
20
20
  * @throws TemplateDownloadError if download fails
21
21
  */
22
22
  export declare function downloadTemplateFromGitHub(projectDir: string, source?: Partial<TemplateSource>): Promise<void>;
23
- //# sourceMappingURL=download-template.d.ts.map
@@ -76,5 +76,3 @@ async function downloadTarStream(url) {
76
76
  }
77
77
  return Readable.from(res.body);
78
78
  }
79
-
80
- //# sourceMappingURL=download-template.js.map
@@ -30,4 +30,3 @@ export declare function addOrUpdateEnvVar(projectPath: string, key: string, valu
30
30
  * @returns true if key was found and removed, false otherwise
31
31
  */
32
32
  export declare function removeEnvVar(projectPath: string, key: string): Promise<boolean>;
33
- //# sourceMappingURL=env-management.d.ts.map
@@ -149,5 +149,3 @@ import path from 'path';
149
149
  return false;
150
150
  }
151
151
  }
152
-
153
- //# sourceMappingURL=env-management.js.map
@@ -9,4 +9,3 @@ import type { Environment } from '../constants.js';
9
9
  * @returns Formatted string or empty string for production
10
10
  */
11
11
  export declare function formatEnvSuffix(env: Environment, prefix?: string, suffix?: string): string;
12
- //# sourceMappingURL=format-env-suffix.d.ts.map
@@ -9,5 +9,3 @@
9
9
  */ export function formatEnvSuffix(env, prefix = ' to ', suffix = '') {
10
10
  return env !== 'production' ? `${prefix}${env}${suffix}` : '';
11
11
  }
12
-
13
- //# sourceMappingURL=format-env-suffix.js.map
@@ -20,4 +20,3 @@ export declare function getTimeUntilExpiry(expiresAt: number): string;
20
20
  * @returns Masked token string (e.g., "eyJh********************************mFbc")
21
21
  */
22
22
  export declare function maskToken(token: string): string;
23
- //# sourceMappingURL=format.d.ts.map
@@ -45,5 +45,3 @@
45
45
  }
46
46
  return `${token.slice(0, 4)}${'*'.repeat(Math.min(token.length - 8, 32))}${token.slice(-4)}`;
47
47
  }
48
-
49
- //# sourceMappingURL=format.js.map
@@ -8,4 +8,3 @@ export type FormatResult = {
8
8
  * Returns warning if formatting fails but does not throw
9
9
  */
10
10
  export declare function formatFile(filePath: string, packageManager: PackageManager): Promise<FormatResult>;
11
- //# sourceMappingURL=formatter.d.ts.map
@@ -55,5 +55,3 @@ import * as log from './log.js';
55
55
  }
56
56
  });
57
57
  }
58
-
59
- //# sourceMappingURL=formatter.js.map
@@ -10,4 +10,3 @@ export declare function collectFilesRecursive(dir: string, baseDir: string): Pro
10
10
  * and stat are skipped (treated as 0 bytes).
11
11
  */
12
12
  export declare function getDirectorySize(dir: string): Promise<number>;
13
- //# sourceMappingURL=fs-utils.d.ts.map
@@ -53,5 +53,3 @@ import path from 'path';
53
53
  }
54
54
  return total;
55
55
  }
56
-
57
- //# sourceMappingURL=fs-utils.js.map
@@ -12,4 +12,3 @@ export declare function isGitRepo(projectPath: string): boolean;
12
12
  * @returns True if successful, false otherwise
13
13
  */
14
14
  export declare function tryInitRepoAndCommit(projectPath: string): boolean;
15
- //# sourceMappingURL=git.d.ts.map
package/dist/utils/git.js CHANGED
@@ -88,5 +88,3 @@ import { execSync } from 'child_process';
88
88
  return false;
89
89
  }
90
90
  }
91
-
92
- //# sourceMappingURL=git.js.map
@@ -6,4 +6,3 @@ export declare function findPackageRoot(startDir: string): Promise<null | string
6
6
  * Build and pack the local @payloadcms/figma package, returning the tgz path.
7
7
  */
8
8
  export declare function packLocalPackage(pkgDir: string): string;
9
- //# sourceMappingURL=handle-upgrade.d.ts.map
@@ -37,5 +37,3 @@ import path from 'path';
37
37
  const tgzPath = path.join(pkgDir, tgzName);
38
38
  return tgzPath;
39
39
  }
40
-
41
- //# sourceMappingURL=handle-upgrade.js.map
@@ -3,4 +3,3 @@
3
3
  * @returns true if DEBUG environment variable is set to 'true'
4
4
  */
5
5
  export declare const isDebug: () => boolean;
6
- //# sourceMappingURL=is-debug.d.ts.map
@@ -4,5 +4,3 @@
4
4
  */ export const isDebug = ()=>{
5
5
  return process.env.DEBUG === 'true';
6
6
  };
7
-
8
- //# sourceMappingURL=is-debug.js.map
@@ -6,4 +6,3 @@ import type { PackageManager } from './package-manager.js';
6
6
  * @param packageManager - Package manager to use in scripts (defaults to 'npm')
7
7
  */
8
8
  export declare function applyLambdaModifications(projectPath: string, packageManager?: PackageManager): Promise<void>;
9
- //# sourceMappingURL=lambda-config.d.ts.map
@@ -137,5 +137,3 @@ NODE_ENV=production exec node server.js
137
137
  packageJson.scripts['lambda:buildzip'] = `${runCmd} build && ${execCmd} payloadcms-figma build-lambda-zip`;
138
138
  await fs.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
139
139
  }
140
-
141
- //# sourceMappingURL=lambda-config.js.map
@@ -0,0 +1,9 @@
1
+ import type { Config } from 'payload';
2
+ /**
3
+ * Load a project's Payload config without initializing Payload or connecting to its database.
4
+ *
5
+ * Payload's CLI uses tsx to evaluate TypeScript config files. Resolve that same loader from the
6
+ * project's Payload installation so this also works with strict package-manager layouts where
7
+ * tsx is not a direct dependency of @payloadcms/figma.
8
+ */
9
+ export declare function loadPayloadConfig(projectPath: string): Promise<Config>;
@@ -0,0 +1,27 @@
1
+ import { createRequire } from 'node:module';
2
+ import path from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ import { findPayloadConfig } from './payload-config-finder.js';
5
+ /**
6
+ * Load a project's Payload config without initializing Payload or connecting to its database.
7
+ *
8
+ * Payload's CLI uses tsx to evaluate TypeScript config files. Resolve that same loader from the
9
+ * project's Payload installation so this also works with strict package-manager layouts where
10
+ * tsx is not a direct dependency of @payloadcms/figma.
11
+ */ export async function loadPayloadConfig(projectPath) {
12
+ const configPath = await findPayloadConfig(projectPath);
13
+ if (!configPath) {
14
+ throw new Error('Payload config not found.');
15
+ }
16
+ const absoluteConfigPath = path.resolve(projectPath, configPath);
17
+ const { loadEnv } = await import('payload/node');
18
+ loadEnv();
19
+ const requireFromProject = createRequire(path.join(projectPath, 'package.json'));
20
+ const payloadEntryPath = requireFromProject.resolve('payload');
21
+ const requireFromPayload = createRequire(payloadEntryPath);
22
+ const tsxApiPath = requireFromPayload.resolve('tsx/esm/api');
23
+ const { tsImport } = await import(pathToFileURL(tsxApiPath).href);
24
+ const parentURL = pathToFileURL(`${projectPath}${path.sep}`).href;
25
+ const imported = await tsImport(absoluteConfigPath, parentURL);
26
+ return await (imported.default ?? imported);
27
+ }
@@ -3,4 +3,3 @@ export declare const info: (message: string) => void;
3
3
  export declare const error: (message: string) => void;
4
4
  export declare const debug: (message: string) => void;
5
5
  export declare const log: (message: string) => void;
6
- //# sourceMappingURL=log.d.ts.map
package/dist/utils/log.js CHANGED
@@ -18,5 +18,3 @@ export const debug = (message)=>{
18
18
  export const log = (message)=>{
19
19
  p.log.message(message);
20
20
  };
21
-
22
- //# sourceMappingURL=log.js.map
@@ -6,4 +6,3 @@ export declare function moveMessage(args: {
6
6
  nextAppDir: string;
7
7
  projectDir: string;
8
8
  }): string;
9
- //# sourceMappingURL=messages.d.ts.map
@@ -19,6 +19,7 @@ export function helpMessage() {
19
19
  ${pc.cyan('env')} Switch active environment
20
20
  ${pc.cyan('deploy')} Deploy your project to Figma
21
21
  ${pc.cyan('upgrade')} Run upgrade migrations
22
+ ${pc.cyan('upload-schema')} Upload collection schema to the Content API
22
23
  ${pc.cyan('build-lambda-zip')} Build Lambda deployment zip
23
24
 
24
25
  ${pc.bold('OPTIONS')}
@@ -68,6 +69,12 @@ export function helpMessage() {
68
69
  ${pc.cyan('@payloadcms/figma upgrade')} Run all upgrade migrations
69
70
  ${pc.dim('--dry-run')} Preview changes without applying
70
71
 
72
+ ${pc.bold('UPLOAD SCHEMA COMMAND')}
73
+
74
+ ${pc.cyan('@payloadcms/figma upload-schema')} Upload collection schema for the active environment
75
+ ${pc.dim('--id <project-id>')} Override FIGMA_PROJECT_ID
76
+ ${pc.dim('--env <environment>')} Override FIGMA_ENVIRONMENT_NAME
77
+
71
78
  ${pc.bold('GLOBAL OPTIONS')}
72
79
 
73
80
  ${pc.dim('--infra-env <env>')} Target infrastructure (production, staging, or devbox)
@@ -121,5 +128,3 @@ It is recommended to do this from your IDE if your app has existing file referen
121
128
  Once moved, rerun the @payloadcms/figma command again.
122
129
  `;
123
130
  }
124
-
125
- //# sourceMappingURL=messages.js.map
@@ -33,4 +33,3 @@ export declare function getRunCommand(packageManager: PackageManager): string;
33
33
  * Get the add/install command for a package manager.
34
34
  */
35
35
  export declare function getAddCommand(packageManager: PackageManager): string;
36
- //# sourceMappingURL=package-manager.d.ts.map
@@ -86,5 +86,3 @@ import path from 'path';
86
86
  return false;
87
87
  }
88
88
  }
89
-
90
- //# sourceMappingURL=package-manager.js.map
@@ -9,4 +9,3 @@ export declare class TemplateSpecParseError extends Error {
9
9
  * Shorthand: a bare token with no `#` and no `:` is treated as the template path.
10
10
  */
11
11
  export declare function parseTemplateSpec(spec: string): Partial<TemplateSource>;
12
- //# sourceMappingURL=parse-template-spec.d.ts.map
@@ -58,5 +58,3 @@ export class TemplateSpecParseError extends Error {
58
58
  result.templatePath = rest;
59
59
  return result;
60
60
  }
61
-
62
- //# sourceMappingURL=parse-template-spec.js.map
@@ -64,4 +64,3 @@ export declare function addFigmaProperty(sourceFile: SourceFile, config: FigmaPr
64
64
  * @returns true if the property was found and removed
65
65
  */
66
66
  export declare function removeFigmaContentSystemId(sourceFile: SourceFile): boolean;
67
- //# sourceMappingURL=payload-config-ast.d.ts.map
@@ -455,5 +455,3 @@ import * as log from './log.js';
455
455
  }
456
456
  return true;
457
457
  }
458
-
459
- //# sourceMappingURL=payload-config-ast.js.map
@@ -6,4 +6,3 @@
6
6
  * @returns Absolute path to config file, or null if not found
7
7
  */
8
8
  export declare function findPayloadConfig(projectPath: string): Promise<null | string>;
9
- //# sourceMappingURL=payload-config-finder.d.ts.map
@@ -61,5 +61,3 @@ const CONFIG_FILES = [
61
61
  }
62
62
  return null;
63
63
  }
64
-
65
- //# sourceMappingURL=payload-config-finder.js.map
@@ -16,4 +16,3 @@ export declare function ensurePayloadFigmaConfig(projectPath: string, packageMan
16
16
  * Display manual configuration instructions
17
17
  */
18
18
  export declare function displayManualInstructions(reason: string, packageManager?: PackageManager): void;
19
- //# sourceMappingURL=payload-config-modifier.d.ts.map
@@ -247,5 +247,3 @@ Then run: ${pc.cyan('npx @payloadcms/figma init')}`);
247
247
  // eslint-disable-next-line no-console
248
248
  console.log(message);
249
249
  }
250
-
251
- //# sourceMappingURL=payload-config-modifier.js.map
@@ -43,4 +43,3 @@ export declare function uninstallPackages(projectPath: string, packageNames: str
43
43
  * Does not throw on failure - logs warning and continues
44
44
  */
45
45
  export declare function runScript(projectPath: string, scriptName: string, packageManager: PackageManager): Promise<boolean>;
46
- //# sourceMappingURL=payload-package-check.d.ts.map
@@ -194,5 +194,3 @@ import * as log from './log.js';
194
194
  });
195
195
  });
196
196
  }
197
-
198
- //# sourceMappingURL=payload-package-check.js.map
@@ -60,4 +60,3 @@ export declare function hasRequiredDependencies(projectPath: string): Promise<bo
60
60
  * @returns True if in project directory
61
61
  */
62
62
  export declare function isInProjectDirectory(projectPath?: string): Promise<boolean>;
63
- //# sourceMappingURL=project.d.ts.map
@@ -274,5 +274,3 @@ import { getOwnVersion } from './version-check.js';
274
274
  return false;
275
275
  }
276
276
  }
277
-
278
- //# sourceMappingURL=project.js.map
@@ -11,4 +11,3 @@ export declare function resolveEnvironment(params: {
11
11
  environmentName?: string;
12
12
  environments: BootstrapEnvironment[];
13
13
  }): BootstrapEnvironment;
14
- //# sourceMappingURL=resolve-environment.d.ts.map
@@ -27,5 +27,3 @@
27
27
  }
28
28
  return matched;
29
29
  }
30
-
31
- //# sourceMappingURL=resolve-environment.js.map
@@ -45,4 +45,3 @@ export declare function uploadStaticAssets(params: {
45
45
  pathMap?: Record<string, string>;
46
46
  projectPath: string;
47
47
  }): Promise<UploadResults>;
48
- //# sourceMappingURL=s3-upload.d.ts.map
@@ -156,5 +156,3 @@ const INITIAL_RETRY_DELAY = 1000 // 1 second
156
156
  }
157
157
  return results;
158
158
  }
159
-
160
- //# sourceMappingURL=s3-upload.js.map
@@ -15,4 +15,3 @@ export declare function formatTimestamp(timestamp: number): string;
15
15
  * environment, which is independent of the infra env (production/staging).
16
16
  */
17
17
  export declare function showProjectTokens(tokenStore: TokenStore): void;
18
- //# sourceMappingURL=token-display.d.ts.map
@@ -86,5 +86,3 @@ import { isDebug } from './is-debug.js';
86
86
  ];
87
87
  p.note(projectTokenLines.join('\n'), 'Project Token');
88
88
  }
89
-
90
- //# sourceMappingURL=token-display.js.map
@@ -8,4 +8,3 @@ export type TypeScriptCheckResult = {
8
8
  * Skips silently if TypeScript not available
9
9
  */
10
10
  export declare function runTypeScriptCheck(projectPath: string, packageManager: PackageManager): Promise<TypeScriptCheckResult>;
11
- //# sourceMappingURL=typescript-validator.d.ts.map
@@ -52,5 +52,3 @@ import spawn from 'cross-spawn';
52
52
  */ function parseTypeScriptErrors(output) {
53
53
  return output.split(/\r?\n/).filter((line)=>line.includes('error TS')).map((line)=>line.trim());
54
54
  }
55
-
56
- //# sourceMappingURL=typescript-validator.js.map
@@ -1,3 +1,2 @@
1
1
  export declare function checkForUpdates(currentVersion: string): Promise<void>;
2
2
  export declare function getOwnVersion(): Promise<string>;
3
- //# sourceMappingURL=version-check.d.ts.map
@@ -34,5 +34,3 @@ export async function getOwnVersion() {
34
34
  const pkg = JSON.parse(content);
35
35
  return pkg.version;
36
36
  }
37
-
38
- //# sourceMappingURL=version-check.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@payloadcms/figma",
3
- "version": "0.0.1-alpha.73",
3
+ "version": "0.0.1-alpha.75",
4
4
  "license": "SEE LICENSE IN LICENSE.md",
5
5
  "type": "module",
6
6
  "exports": {