@payloadcms/figma 0.1.0-internal.e071575 → 0.1.0-internal.fbdc0d3

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 (350) hide show
  1. package/LICENSE.md +1 -1
  2. package/dist/{utils → adapters}/asset-collection.d.ts +17 -3
  3. package/dist/adapters/asset-collection.js +242 -0
  4. package/dist/{utils → adapters}/build-lambda-zip.d.ts +8 -7
  5. package/dist/adapters/build-lambda-zip.js +111 -0
  6. package/dist/adapters/configureNextjsCache.d.ts +8 -0
  7. package/dist/adapters/configureNextjsCache.js +55 -0
  8. package/dist/adapters/deploy-output/inspectNextjsOutput/getNextRelativeAppDir.d.ts +1 -0
  9. package/dist/adapters/deploy-output/inspectNextjsOutput/getNextRelativeAppDir.js +15 -0
  10. package/dist/adapters/deploy-output/inspectNextjsOutput.d.ts +12 -0
  11. package/dist/adapters/deploy-output/inspectNextjsOutput.js +28 -0
  12. package/dist/adapters/deploy-output/inspectNitroOutput.d.ts +9 -0
  13. package/dist/adapters/deploy-output/inspectNitroOutput.js +13 -0
  14. package/dist/adapters/deploy-output/isFile.d.ts +1 -0
  15. package/dist/adapters/deploy-output/isFile.js +4 -0
  16. package/dist/adapters/deploy-output/readJson.d.ts +1 -0
  17. package/dist/adapters/deploy-output/readJson.js +9 -0
  18. package/dist/adapters/deploy-output/resolveNitroOutputLayout.d.ts +8 -0
  19. package/dist/adapters/deploy-output/resolveNitroOutputLayout.js +16 -0
  20. package/dist/adapters/deploy-output/resolveOutputPath.d.ts +2 -0
  21. package/dist/adapters/deploy-output/resolveOutputPath.js +9 -0
  22. package/dist/adapters/deploy-output/resolveWithin.d.ts +1 -0
  23. package/dist/adapters/deploy-output/resolveWithin.js +12 -0
  24. package/dist/adapters/fs-utils.d.ts +39 -0
  25. package/dist/adapters/fs-utils.js +135 -0
  26. package/dist/adapters/index.d.ts +4 -0
  27. package/dist/adapters/index.js +3 -0
  28. package/dist/adapters/lambda-runtime/nextjs-cache.d.ts +40 -0
  29. package/dist/adapters/lambda-runtime/nextjs-cache.js +174 -0
  30. package/dist/adapters/nextjs.d.ts +12 -0
  31. package/dist/adapters/nextjs.js +67 -0
  32. package/dist/adapters/nitro.d.ts +8 -0
  33. package/dist/adapters/nitro.js +193 -0
  34. package/dist/adapters/secret-files.d.ts +25 -0
  35. package/dist/adapters/secret-files.js +50 -0
  36. package/dist/adapters/types.d.ts +42 -0
  37. package/dist/adapters/types.js +1 -0
  38. package/dist/{utils/adapters → adapters}/vite.d.ts +2 -2
  39. package/dist/adapters/vite.js +33 -0
  40. package/dist/api/check-project-subdomain-availability.d.ts +12 -0
  41. package/dist/api/check-project-subdomain-availability.js +32 -0
  42. package/dist/api/control-plane-error.d.ts +6 -0
  43. package/dist/api/control-plane-error.js +8 -0
  44. package/dist/api/control-plane-fetch.d.ts +7 -0
  45. package/dist/api/control-plane-fetch.js +37 -0
  46. package/dist/api/control-plane.d.ts +12 -9
  47. package/dist/api/control-plane.js +28 -48
  48. package/dist/api/create-project.d.ts +18 -0
  49. package/dist/api/create-project.js +37 -0
  50. package/dist/api/list-project-workspaces.d.ts +8 -0
  51. package/dist/api/list-project-workspaces.js +28 -0
  52. package/dist/api/project-resource-type.d.ts +1 -0
  53. package/dist/api/project-resource-type.js +1 -0
  54. package/dist/auth/headless-oauth-flow.d.ts +23 -0
  55. package/dist/auth/headless-oauth-flow.js +73 -0
  56. package/dist/auth/oauth-flow.d.ts +2 -0
  57. package/dist/auth/oauth-flow.js +30 -8
  58. package/dist/auth/refresh.js +12 -12
  59. package/dist/auth/requested-scopes.d.ts +1 -0
  60. package/dist/auth/requested-scopes.js +3 -0
  61. package/dist/auth/token-store.d.ts +20 -1
  62. package/dist/auth/token-store.js +47 -0
  63. package/dist/auth/types.d.ts +17 -3
  64. package/dist/cli.d.ts +39 -0
  65. package/dist/cli.js +71 -36
  66. package/dist/commands/bootstrap.js +5 -1
  67. package/dist/commands/build-lambda-zip.js +1 -1
  68. package/dist/commands/deploy.d.ts +12 -0
  69. package/dist/commands/deploy.js +63 -25
  70. package/dist/commands/detect-project-resource-type.d.ts +3 -0
  71. package/dist/commands/detect-project-resource-type.js +28 -0
  72. package/dist/commands/init.d.ts +2 -2
  73. package/dist/commands/init.js +235 -80
  74. package/dist/commands/login.d.ts +11 -1
  75. package/dist/commands/login.js +66 -4
  76. package/dist/commands/prompt-to-create-project/format-project-subdomain.d.ts +1 -0
  77. package/dist/commands/prompt-to-create-project/format-project-subdomain.js +3 -0
  78. package/dist/commands/prompt-to-create-project/format-unavailable-subdomain-reason.d.ts +1 -0
  79. package/dist/commands/prompt-to-create-project/format-unavailable-subdomain-reason.js +7 -0
  80. package/dist/commands/prompt-to-create-project/get-default-project-name.d.ts +1 -0
  81. package/dist/commands/prompt-to-create-project/get-default-project-name.js +13 -0
  82. package/dist/commands/prompt-to-create-project/prompt-for-available-subdomain.d.ts +7 -0
  83. package/dist/commands/prompt-to-create-project/prompt-for-available-subdomain.js +32 -0
  84. package/dist/commands/prompt-to-create-project/resolve-project-region.d.ts +8 -0
  85. package/dist/commands/prompt-to-create-project/resolve-project-region.js +27 -0
  86. package/dist/commands/prompt-to-create-project/resolve-project-subdomain.d.ts +9 -0
  87. package/dist/commands/prompt-to-create-project/resolve-project-subdomain.js +54 -0
  88. package/dist/commands/prompt-to-create-project/resolve-text-input.d.ts +9 -0
  89. package/dist/commands/prompt-to-create-project/resolve-text-input.js +23 -0
  90. package/dist/commands/prompt-to-create-project/resolve-workspace-plan-key.d.ts +12 -0
  91. package/dist/commands/prompt-to-create-project/resolve-workspace-plan-key.js +36 -0
  92. package/dist/commands/prompt-to-create-project/validate-subdomain.d.ts +1 -0
  93. package/dist/commands/prompt-to-create-project/validate-subdomain.js +9 -0
  94. package/dist/commands/prompt-to-create-project.d.ts +24 -0
  95. package/dist/commands/prompt-to-create-project.js +69 -0
  96. package/dist/commands/setup-agent.d.ts +12 -0
  97. package/dist/commands/setup-agent.js +123 -0
  98. package/dist/commands/upgrade.js +65 -1
  99. package/dist/commands/upload-schema.js +3 -4
  100. package/dist/commands/write-project-configuration.d.ts +12 -0
  101. package/dist/commands/write-project-configuration.js +16 -0
  102. package/dist/config/oauth.js +6 -1
  103. package/dist/constants.d.ts +0 -2
  104. package/dist/constants.js +0 -3
  105. package/dist/db-content-api/generated/content-api-types.d.ts +6 -2
  106. package/dist/db-content-api/index.d.ts +1 -1
  107. package/dist/db-content-api/index.js +121 -72
  108. package/dist/db-content-api/utilities/data/index.js +8 -2
  109. package/dist/db-content-api/utilities/data/injectGlobalType.d.ts +6 -0
  110. package/dist/db-content-api/utilities/data/injectGlobalType.js +11 -0
  111. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +3 -11
  112. package/dist/db-content-api/utilities/data/removeVirtualFields.js +12 -50
  113. package/dist/db-content-api/utilities/isRecord.d.ts +9 -0
  114. package/dist/db-content-api/utilities/isRecord.js +19 -0
  115. package/dist/db-content-api/utilities/joins.js +5 -1
  116. package/dist/db-content-api/utilities/meta/resolvesToRelationshipValue.d.ts +10 -0
  117. package/dist/db-content-api/utilities/meta/resolvesToRelationshipValue.js +95 -0
  118. package/dist/db-content-api/utilities/meta/stringifyIdsInWhere.d.ts +9 -0
  119. package/dist/db-content-api/utilities/meta/stringifyIdsInWhere.js +112 -0
  120. package/dist/db-content-api/utilities/schema/buildDocumentSchema.js +9 -4
  121. package/dist/db-content-api/utilities/schema/getDocumentSchema.d.ts +3 -0
  122. package/dist/db-content-api/utilities/schema/getDocumentSchema.js +24 -0
  123. package/dist/db-content-api/utilities/where.d.ts +2 -6
  124. package/dist/db-content-api/utilities/where.js +20 -9
  125. package/dist/exports/client.d.ts +2 -0
  126. package/dist/exports/client.js +2 -0
  127. package/dist/exports/views.d.ts +1 -0
  128. package/dist/exports/views.js +1 -0
  129. package/dist/imageSizeOptions.d.ts +23 -0
  130. package/dist/imageSizeOptions.js +26 -0
  131. package/dist/index.d.ts +2 -0
  132. package/dist/index.js +2 -0
  133. package/dist/lib/write-agent-config.d.ts +12 -0
  134. package/dist/lib/write-agent-config.js +52 -0
  135. package/dist/next/image-loader.d.ts +6 -0
  136. package/dist/next/image-loader.js +14 -0
  137. package/dist/oauth/components/LoginButton/index.js +66 -19
  138. package/dist/oauth/components/LoginButton/index.scss +121 -15
  139. package/dist/oauth/defaults.js +4 -1
  140. package/dist/oauth/endpoints/getLoginEndpoint.js +5 -2
  141. package/dist/oauth/index.js +8 -7
  142. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts +1 -1
  143. package/dist/oauth/utilities/getAuthorizeURL.d.ts +1 -0
  144. package/dist/oauth/utilities/getAuthorizeURL.js +5 -1
  145. package/dist/plugin/build-config.d.ts +13 -3
  146. package/dist/plugin/build-config.js +250 -49
  147. package/dist/plugin/cache-revalidation-hooks.d.ts +6 -0
  148. package/dist/plugin/cache-revalidation-hooks.js +69 -0
  149. package/dist/plugin/cloud-limits/CloudLimitModal/index.d.ts +9 -0
  150. package/dist/plugin/cloud-limits/CloudLimitModal/index.js +66 -0
  151. package/dist/plugin/cloud-limits/CloudLimitModal/index.scss +56 -0
  152. package/dist/plugin/cloud-limits/CloudLimitProvider/index.d.ts +4 -0
  153. package/dist/plugin/cloud-limits/CloudLimitProvider/index.js +110 -0
  154. package/dist/plugin/cloud-limits/LimitReachedView/index.css +14 -0
  155. package/dist/plugin/cloud-limits/LimitReachedView/index.d.ts +4 -0
  156. package/dist/plugin/cloud-limits/LimitReachedView/index.js +52 -0
  157. package/dist/plugin/cloud-limits/SlugRegistryContext/index.d.ts +7 -0
  158. package/dist/plugin/cloud-limits/SlugRegistryContext/index.js +3 -0
  159. package/dist/plugin/cloud-limits/SlugTracker/index.d.ts +1 -0
  160. package/dist/plugin/cloud-limits/SlugTracker/index.js +27 -0
  161. package/dist/plugin/cloud-limits/icons/ExternalLinkIcon.d.ts +3 -0
  162. package/dist/plugin/cloud-limits/icons/ExternalLinkIcon.js +30 -0
  163. package/dist/plugin/cloud-limits/routes.d.ts +2 -0
  164. package/dist/plugin/cloud-limits/routes.js +4 -0
  165. package/dist/plugin/cloud-limits/server/redirectInitialAutosaveCreate.d.ts +9 -0
  166. package/dist/plugin/cloud-limits/server/redirectInitialAutosaveCreate.js +28 -0
  167. package/dist/plugin/cloud-limits/shared.d.ts +10 -0
  168. package/dist/plugin/cloud-limits/shared.js +52 -0
  169. package/dist/plugin/cloud-limits/utilities/cloudLimitInterceptor.d.ts +2 -0
  170. package/dist/plugin/cloud-limits/utilities/cloudLimitInterceptor.js +134 -0
  171. package/dist/plugin/cloud-limits/utilities/toasts.d.ts +4 -0
  172. package/dist/plugin/cloud-limits/utilities/toasts.js +19 -0
  173. package/dist/plugin/make-permission-access/make-permission-access.d.ts +8 -0
  174. package/dist/plugin/make-permission-access/make-permission-access.js +24 -0
  175. package/dist/plugin/sandbox-upload-fetch.d.ts +22 -20
  176. package/dist/plugin/sandbox-upload-fetch.js +15 -21
  177. package/dist/skills/deploy-to-figma/SKILL.md +234 -0
  178. package/dist/skills/deploy-to-figma/references/cli-reference.md +146 -0
  179. package/dist/storage-content-api/api-types.d.ts +5 -2
  180. package/dist/storage-content-api/buildBaseMediaResponseHeaders.d.ts +1 -0
  181. package/dist/storage-content-api/buildBaseMediaResponseHeaders.js +8 -0
  182. package/dist/storage-content-api/buildClientUploadFetchBackHeaders.d.ts +12 -0
  183. package/dist/storage-content-api/buildClientUploadFetchBackHeaders.js +26 -0
  184. package/dist/storage-content-api/buildMediaRequestHeaders.d.ts +1 -0
  185. package/dist/storage-content-api/buildMediaRequestHeaders.js +14 -0
  186. package/dist/storage-content-api/buildMediaResponseHeaders.d.ts +4 -0
  187. package/dist/storage-content-api/buildMediaResponseHeaders.js +52 -0
  188. package/dist/storage-content-api/client-uploads/generate.d.ts +7 -3
  189. package/dist/storage-content-api/client-uploads/generate.js +22 -21
  190. package/dist/storage-content-api/copyFile.d.ts +16 -0
  191. package/dist/storage-content-api/copyFile.js +90 -0
  192. package/dist/storage-content-api/deleteFile.d.ts +8 -0
  193. package/dist/storage-content-api/deleteFile.js +18 -0
  194. package/dist/storage-content-api/getDownloadResponseHeaderPolicy.d.ts +11 -0
  195. package/dist/storage-content-api/getDownloadResponseHeaderPolicy.js +33 -0
  196. package/dist/storage-content-api/getMediaType.d.ts +1 -0
  197. package/dist/storage-content-api/getMediaType.js +3 -0
  198. package/dist/storage-content-api/handleUpload.d.ts +1 -2
  199. package/dist/storage-content-api/handleUpload.js +13 -157
  200. package/dist/storage-content-api/hasSupportedContentEncoding.d.ts +1 -0
  201. package/dist/storage-content-api/hasSupportedContentEncoding.js +6 -0
  202. package/dist/storage-content-api/index.js +17 -8
  203. package/dist/storage-content-api/mediaErrorResponse.d.ts +1 -0
  204. package/dist/storage-content-api/mediaErrorResponse.js +12 -0
  205. package/dist/storage-content-api/resolveDownloadResponseHeaders.d.ts +5 -0
  206. package/dist/storage-content-api/resolveDownloadResponseHeaders.js +13 -0
  207. package/dist/storage-content-api/shouldAttachMedia.d.ts +1 -0
  208. package/dist/storage-content-api/shouldAttachMedia.js +34 -0
  209. package/dist/storage-content-api/staticHandler.d.ts +2 -1
  210. package/dist/storage-content-api/staticHandler.js +87 -32
  211. package/dist/storage-content-api/types.d.ts +4 -1
  212. package/dist/storage-content-api/uploadFileData.d.ts +10 -0
  213. package/dist/storage-content-api/uploadFileData.js +145 -0
  214. package/dist/translations/ar.d.ts +12 -0
  215. package/dist/translations/ar.js +12 -0
  216. package/dist/translations/az.d.ts +12 -0
  217. package/dist/translations/az.js +12 -0
  218. package/dist/translations/bg.d.ts +12 -0
  219. package/dist/translations/bg.js +12 -0
  220. package/dist/translations/bnBd.d.ts +12 -0
  221. package/dist/translations/bnBd.js +12 -0
  222. package/dist/translations/bnIn.d.ts +12 -0
  223. package/dist/translations/bnIn.js +12 -0
  224. package/dist/translations/ca.d.ts +12 -0
  225. package/dist/translations/ca.js +12 -0
  226. package/dist/translations/cs.d.ts +12 -0
  227. package/dist/translations/cs.js +12 -0
  228. package/dist/translations/da.d.ts +12 -0
  229. package/dist/translations/da.js +12 -0
  230. package/dist/translations/de.d.ts +12 -0
  231. package/dist/translations/de.js +12 -0
  232. package/dist/translations/en.d.ts +12 -0
  233. package/dist/translations/en.js +12 -0
  234. package/dist/translations/es.d.ts +12 -0
  235. package/dist/translations/es.js +12 -0
  236. package/dist/translations/et.d.ts +12 -0
  237. package/dist/translations/et.js +12 -0
  238. package/dist/translations/fa.d.ts +12 -0
  239. package/dist/translations/fa.js +12 -0
  240. package/dist/translations/fr.d.ts +12 -0
  241. package/dist/translations/fr.js +12 -0
  242. package/dist/translations/he.d.ts +12 -0
  243. package/dist/translations/he.js +12 -0
  244. package/dist/translations/hr.d.ts +12 -0
  245. package/dist/translations/hr.js +12 -0
  246. package/dist/translations/hu.d.ts +12 -0
  247. package/dist/translations/hu.js +12 -0
  248. package/dist/translations/hy.d.ts +12 -0
  249. package/dist/translations/hy.js +12 -0
  250. package/dist/translations/id.d.ts +12 -0
  251. package/dist/translations/id.js +12 -0
  252. package/dist/translations/index.d.ts +533 -0
  253. package/dist/translations/index.js +90 -0
  254. package/dist/translations/is.d.ts +12 -0
  255. package/dist/translations/is.js +12 -0
  256. package/dist/translations/it.d.ts +12 -0
  257. package/dist/translations/it.js +12 -0
  258. package/dist/translations/ja.d.ts +12 -0
  259. package/dist/translations/ja.js +12 -0
  260. package/dist/translations/ko.d.ts +12 -0
  261. package/dist/translations/ko.js +12 -0
  262. package/dist/translations/lt.d.ts +12 -0
  263. package/dist/translations/lt.js +12 -0
  264. package/dist/translations/lv.d.ts +12 -0
  265. package/dist/translations/lv.js +12 -0
  266. package/dist/translations/my.d.ts +12 -0
  267. package/dist/translations/my.js +12 -0
  268. package/dist/translations/nb.d.ts +12 -0
  269. package/dist/translations/nb.js +12 -0
  270. package/dist/translations/nl.d.ts +12 -0
  271. package/dist/translations/nl.js +12 -0
  272. package/dist/translations/pl.d.ts +12 -0
  273. package/dist/translations/pl.js +12 -0
  274. package/dist/translations/pt.d.ts +12 -0
  275. package/dist/translations/pt.js +12 -0
  276. package/dist/translations/ro.d.ts +12 -0
  277. package/dist/translations/ro.js +12 -0
  278. package/dist/translations/rs.d.ts +12 -0
  279. package/dist/translations/rs.js +12 -0
  280. package/dist/translations/rsLatin.d.ts +12 -0
  281. package/dist/translations/rsLatin.js +12 -0
  282. package/dist/translations/ru.d.ts +12 -0
  283. package/dist/translations/ru.js +12 -0
  284. package/dist/translations/sk.d.ts +12 -0
  285. package/dist/translations/sk.js +12 -0
  286. package/dist/translations/sl.d.ts +12 -0
  287. package/dist/translations/sl.js +12 -0
  288. package/dist/translations/sv.d.ts +12 -0
  289. package/dist/translations/sv.js +12 -0
  290. package/dist/translations/ta.d.ts +12 -0
  291. package/dist/translations/ta.js +12 -0
  292. package/dist/translations/th.d.ts +12 -0
  293. package/dist/translations/th.js +12 -0
  294. package/dist/translations/tr.d.ts +12 -0
  295. package/dist/translations/tr.js +12 -0
  296. package/dist/translations/uk.d.ts +12 -0
  297. package/dist/translations/uk.js +12 -0
  298. package/dist/translations/vi.d.ts +12 -0
  299. package/dist/translations/vi.js +12 -0
  300. package/dist/translations/zh.d.ts +12 -0
  301. package/dist/translations/zh.js +12 -0
  302. package/dist/translations/zhTw.d.ts +12 -0
  303. package/dist/translations/zhTw.js +12 -0
  304. package/dist/types.d.ts +11 -0
  305. package/dist/utils/assert-never.d.ts +1 -0
  306. package/dist/utils/assert-never.js +3 -0
  307. package/dist/utils/build-detection.d.ts +6 -1
  308. package/dist/utils/build-detection.js +68 -89
  309. package/dist/utils/cache-bootstrap.js +1 -0
  310. package/dist/utils/deploy-adapter.d.ts +3 -35
  311. package/dist/utils/deploy-adapter.js +25 -14
  312. package/dist/utils/env-management.d.ts +15 -0
  313. package/dist/utils/env-management.js +47 -0
  314. package/dist/utils/lambda-config.js +18 -23
  315. package/dist/utils/load-payload-config.js +1 -6
  316. package/dist/utils/messages.js +24 -3
  317. package/dist/utils/next-image-loader-config.d.ts +2 -0
  318. package/dist/utils/next-image-loader-config.js +63 -0
  319. package/dist/utils/next-image-loader-file.d.ts +2 -0
  320. package/dist/utils/next-image-loader-file.js +11 -0
  321. package/dist/utils/payload-config-ast.d.ts +5 -0
  322. package/dist/utils/payload-config-ast.js +73 -4
  323. package/dist/utils/payload-config-modifier.js +3 -0
  324. package/dist/utils/payload-generate.d.ts +10 -0
  325. package/dist/utils/payload-generate.js +59 -0
  326. package/dist/utils/payload-secret.d.ts +28 -0
  327. package/dist/utils/payload-secret.js +34 -0
  328. package/dist/utils/pnpm-builds.d.ts +14 -0
  329. package/dist/utils/pnpm-builds.js +125 -0
  330. package/dist/utils/s3-upload.js +4 -1
  331. package/package.json +33 -8
  332. package/dist/lib/download-skill.d.ts +0 -12
  333. package/dist/lib/download-skill.js +0 -77
  334. package/dist/storage-content-api/handleDelete.d.ts +0 -7
  335. package/dist/storage-content-api/handleDelete.js +0 -15
  336. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +0 -11
  337. package/dist/storage-content-api/utilities/getSafeFilename.js +0 -59
  338. package/dist/storage-content-api/utilities/index.d.ts +0 -2
  339. package/dist/storage-content-api/utilities/index.js +0 -2
  340. package/dist/storage-content-api/utilities/parseUploadReference.d.ts +0 -17
  341. package/dist/storage-content-api/utilities/parseUploadReference.js +0 -27
  342. package/dist/utils/adapters/nextjs.d.ts +0 -8
  343. package/dist/utils/adapters/nextjs.js +0 -61
  344. package/dist/utils/adapters/nitro.d.ts +0 -8
  345. package/dist/utils/adapters/nitro.js +0 -172
  346. package/dist/utils/adapters/vite.js +0 -31
  347. package/dist/utils/asset-collection.js +0 -144
  348. package/dist/utils/build-lambda-zip.js +0 -90
  349. package/dist/utils/fs-utils.d.ts +0 -12
  350. package/dist/utils/fs-utils.js +0 -55
package/dist/types.d.ts CHANGED
@@ -1,17 +1,28 @@
1
1
  import type arg from 'arg';
2
2
  export interface Args extends arg.Spec {
3
+ '--adapter': StringConstructor;
4
+ '--callback-url': StringConstructor;
5
+ '--complete': StringConstructor;
3
6
  '--debug': BooleanConstructor;
7
+ '--description': StringConstructor;
4
8
  '--dry-run': BooleanConstructor;
5
9
  '--env': StringConstructor;
6
10
  '--environment': string;
7
11
  '--force': BooleanConstructor;
12
+ '--global': BooleanConstructor;
13
+ '--headless': BooleanConstructor;
8
14
  '--help': BooleanConstructor;
9
15
  '--id': StringConstructor;
10
16
  '--infra-env': StringConstructor;
11
17
  '--list': BooleanConstructor;
12
18
  '--logout': BooleanConstructor;
13
19
  '--name': StringConstructor;
20
+ '--output': StringConstructor;
21
+ '--project': BooleanConstructor;
22
+ '--region': StringConstructor;
23
+ '--subdomain': StringConstructor;
14
24
  '--template': StringConstructor;
25
+ '--workspace': StringConstructor;
15
26
  '--yes': BooleanConstructor;
16
27
  '-e': string;
17
28
  '-f': string;
@@ -0,0 +1 @@
1
+ export declare function assertNever(x: never): never;
@@ -0,0 +1,3 @@
1
+ export function assertNever(x) {
2
+ throw new Error('Unhandled case: ' + JSON.stringify(x));
3
+ }
@@ -1,3 +1,4 @@
1
+ import type { AdapterName } from './deploy-adapter.js';
1
2
  /**
2
3
  * Information about a detected build
3
4
  */
@@ -11,11 +12,15 @@ export interface BuildInfo {
11
12
  /** Build timestamp */
12
13
  timestamp: Date;
13
14
  }
15
+ export interface DetectBuildOptions {
16
+ adapter?: AdapterName;
17
+ output?: string;
18
+ }
14
19
  /**
15
20
  * Detect a valid build across supported frameworks.
16
21
  * Tries NextJS, then Nitro, then Vite. Returns the first match.
17
22
  */
18
- export declare function detectBuild(projectPath: string): Promise<BuildInfo | null>;
23
+ export declare function detectBuild(projectPath: string, options: DetectBuildOptions): Promise<BuildInfo | null>;
19
24
  /**
20
25
  * Get the build command from package.json
21
26
  *
@@ -1,103 +1,82 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
+ import { inspectNextjsOutput } from '../adapters/deploy-output/inspectNextjsOutput.js';
4
+ import { inspectNitroOutput } from '../adapters/deploy-output/inspectNitroOutput.js';
5
+ import { resolveOutputPath } from '../adapters/deploy-output/resolveOutputPath.js';
6
+ import { assertNever } from './assert-never.js';
3
7
  /**
4
8
  * Detect a valid build across supported frameworks.
5
9
  * Tries NextJS, then Nitro, then Vite. Returns the first match.
6
- */ export async function detectBuild(projectPath) {
7
- // Try NextJS first
8
- const nextjsBuild = await detectNextjsBuild(projectPath);
9
- if (nextjsBuild) {
10
- return nextjsBuild;
11
- }
12
- // Try Nitro
13
- const nitroBuild = await detectNitroBuild(projectPath);
14
- if (nitroBuild) {
15
- return nitroBuild;
16
- }
17
- // Try Vite
18
- const viteBuild = await detectViteBuild(projectPath);
19
- if (viteBuild) {
20
- return viteBuild;
21
- }
22
- return null;
23
- }
24
- /**
25
- * Detect NextJS standalone build (.next/standalone/server.js + .next/BUILD_ID)
26
- */ async function detectNextjsBuild(projectPath) {
27
- try {
28
- const serverPath = path.join(projectPath, '.next', 'standalone', 'server.js');
29
- const serverStat = await fs.stat(serverPath);
30
- const buildIdPath = path.join(projectPath, '.next', 'BUILD_ID');
31
- const buildId = (await fs.readFile(buildIdPath, 'utf-8')).trim();
32
- const lambdaZipPath = path.join(projectPath, 'lambda.zip');
33
- let hasLambdaZip = false;
34
- try {
35
- await fs.stat(lambdaZipPath);
36
- hasLambdaZip = true;
37
- } catch {
38
- hasLambdaZip = false;
10
+ */ export async function detectBuild(projectPath, options) {
11
+ const adapters = options.adapter ? [
12
+ options.adapter
13
+ ] : [
14
+ 'nextjs',
15
+ 'nitro',
16
+ 'vite'
17
+ ];
18
+ for (const adapter of adapters){
19
+ const outputPath = resolveOutputPath(projectPath, adapter, options.output);
20
+ const build = await detectAdapterBuild(projectPath, adapter, outputPath);
21
+ if (build) {
22
+ return build;
39
23
  }
40
- return {
41
- buildId,
42
- hasLambdaZip,
43
- path: '.next/standalone',
44
- timestamp: serverStat.mtime
45
- };
46
- } catch {
47
- return null;
48
24
  }
25
+ return null;
49
26
  }
50
- /**
51
- * Detect Nitro build (.output/server/index.mjs)
52
- * Build ID parsed from .output/nitro.json date field, or mtime of index.mjs
53
- */ async function detectNitroBuild(projectPath) {
54
- try {
55
- const indexPath = path.join(projectPath, '.output', 'server', 'index.mjs');
56
- const indexStat = await fs.stat(indexPath);
57
- let buildId = indexStat.mtime.toISOString();
58
- try {
59
- const nitroJsonPath = path.join(projectPath, '.output', 'nitro.json');
60
- const nitroJson = JSON.parse(await fs.readFile(nitroJsonPath, 'utf-8'));
61
- if (nitroJson.date) {
62
- buildId = nitroJson.date;
27
+ async function detectAdapterBuild(projectPath, adapter, outputPath) {
28
+ switch(adapter){
29
+ case 'nextjs':
30
+ {
31
+ const layout = await inspectNextjsOutput(outputPath);
32
+ if (!layout) {
33
+ return null;
34
+ }
35
+ const stat = await fs.stat(layout.serverEntryPath);
36
+ return {
37
+ buildId: layout.buildId,
38
+ hasLambdaZip: await hasLambdaZip(projectPath),
39
+ path: path.relative(projectPath, layout.standalonePath),
40
+ timestamp: stat.mtime
41
+ };
63
42
  }
64
- } catch {
65
- // nitro.json missing or unparseable — fall back to mtime
66
- }
67
- const lambdaZipPath = path.join(projectPath, 'lambda.zip');
68
- let hasLambdaZip = false;
69
- try {
70
- await fs.stat(lambdaZipPath);
71
- hasLambdaZip = true;
72
- } catch {
73
- hasLambdaZip = false;
74
- }
75
- return {
76
- buildId,
77
- hasLambdaZip,
78
- path: '.output',
79
- timestamp: indexStat.mtime
80
- };
81
- } catch {
82
- return null;
43
+ case 'nitro':
44
+ {
45
+ const layout = await inspectNitroOutput(outputPath);
46
+ if (!layout) {
47
+ return null;
48
+ }
49
+ const stat = await fs.stat(layout.serverEntryPath);
50
+ return {
51
+ buildId: layout.buildId ?? stat.mtime.toISOString(),
52
+ hasLambdaZip: await hasLambdaZip(projectPath),
53
+ path: path.relative(projectPath, outputPath),
54
+ timestamp: stat.mtime
55
+ };
56
+ }
57
+ case 'vite':
58
+ {
59
+ try {
60
+ const stat = await fs.stat(path.join(outputPath, 'index.html'));
61
+ if (!stat.isFile()) {
62
+ return null;
63
+ }
64
+ return {
65
+ buildId: stat.mtime.toISOString(),
66
+ hasLambdaZip: false,
67
+ path: path.relative(projectPath, outputPath),
68
+ timestamp: stat.mtime
69
+ };
70
+ } catch {
71
+ return null;
72
+ }
73
+ }
74
+ default:
75
+ assertNever(adapter);
83
76
  }
84
77
  }
85
- /**
86
- * Detect Vite build (dist/index.html)
87
- * Build ID is mtime of index.html as ISO string. No server, so hasLambdaZip is always false.
88
- */ async function detectViteBuild(projectPath) {
89
- try {
90
- const indexPath = path.join(projectPath, 'dist', 'index.html');
91
- const indexStat = await fs.stat(indexPath);
92
- return {
93
- buildId: indexStat.mtime.toISOString(),
94
- hasLambdaZip: false,
95
- path: 'dist',
96
- timestamp: indexStat.mtime
97
- };
98
- } catch {
99
- return null;
100
- }
78
+ async function hasLambdaZip(projectPath) {
79
+ return fs.stat(path.join(projectPath, 'lambda.zip')).then(()=>true).catch(()=>false);
101
80
  }
102
81
  /**
103
82
  * Get the build command from package.json
@@ -6,6 +6,7 @@ import * as log from './log.js';
6
6
  const { oauthCredentials } = bootstrapInfo;
7
7
  for (const env of bootstrapInfo.environments){
8
8
  tokenStore.setBootstrapData(projectId, env.name, {
9
+ contentApiUrl: env.contentApiUrl,
9
10
  contentSystemId: env.contentSystemId,
10
11
  oauthClientId: oauthCredentials.oauthClientId,
11
12
  oauthClientSecret: oauthCredentials.oauthClientSecret,
@@ -1,37 +1,5 @@
1
- export interface PageCollection {
2
- /** S3 key → relative filesystem path from project root */
3
- pathMap: Record<string, string>;
4
- /** Route → S3 upload keys for that route (e.g., { "/products": ["products.html", "products.rsc"] }) */
5
- routeAssetMap: Record<string, string[]>;
6
- /** Route paths for the manifest pages array (e.g., ["/products", "/blog"]) */
7
- routes: string[];
8
- /** S3 keys to upload (e.g., ["products.html", "products.rsc", "products.meta"]) */
9
- uploadKeys: string[];
10
- }
11
- export interface AssetCollection {
12
- /** S3 key → relative filesystem path from project root */
13
- pathMap: Record<string, string>;
14
- /** Route paths for the manifest assets array (e.g., ["/favicon.ico"]) */
15
- routes: string[];
16
- /** S3 keys to upload (same as routes for assets, without leading slash) */
17
- uploadKeys: string[];
18
- }
19
- export type AdapterName = 'nextjs' | 'nitro' | 'vite';
20
- export interface LambdaBundle {
21
- /** Total size in bytes of the bundle contents before compression. */
22
- unzippedBytes: number;
23
- /** Absolute path to the built lambda.zip. */
24
- zipPath: string;
25
- }
26
- export interface DeployAdapter {
27
- collectAssets(projectPath: string): Promise<AssetCollection>;
28
- collectPages(projectPath: string): Promise<PageCollection>;
29
- /** SPA fallback path (e.g., "/index.html"). Undefined for SSR/SSG apps. */
30
- fallback?: string;
31
- name: AdapterName;
32
- /** Assembles and zips the server bundle. Returns the bundle, or null if no server (e.g., Vite SPA). */
33
- prepareLambdaBundle(projectPath: string): Promise<LambdaBundle | null>;
34
- }
1
+ import type { AdapterName, DeployAdapter } from '../adapters/types.js';
2
+ export type { AdapterLogger, AdapterName, AssetCollection, DeployAdapter, LambdaBundle, PageCollection, PrepareLambdaBundleOptions, } from '../adapters/types.js';
35
3
  /**
36
4
  * Auto-detect the framework adapter based on build output.
37
5
  *
@@ -42,4 +10,4 @@ export interface DeployAdapter {
42
10
  * @param projectPath - Path to project root
43
11
  * @param override - Explicit adapter name from --adapter flag
44
12
  */
45
- export declare function detectAdapter(projectPath: string, override?: AdapterName): Promise<DeployAdapter>;
13
+ export declare function detectAdapter(projectPath: string, override?: AdapterName, output?: string): Promise<DeployAdapter>;
@@ -1,5 +1,13 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
+ import { inspectNextjsOutput } from '../adapters/deploy-output/inspectNextjsOutput.js';
4
+ import { inspectNitroOutput } from '../adapters/deploy-output/inspectNitroOutput.js';
5
+ import { resolveOutputPath } from '../adapters/deploy-output/resolveOutputPath.js';
6
+ import * as log from './log.js';
7
+ const adapterLogger = {
8
+ info: log.info,
9
+ warning: log.warning
10
+ };
3
11
  /**
4
12
  * Auto-detect the framework adapter based on build output.
5
13
  *
@@ -9,40 +17,43 @@ import path from 'path';
9
17
  *
10
18
  * @param projectPath - Path to project root
11
19
  * @param override - Explicit adapter name from --adapter flag
12
- */ export async function detectAdapter(projectPath, override) {
20
+ */ export async function detectAdapter(projectPath, override, output) {
13
21
  if (override) {
14
22
  return loadAdapter(override);
15
23
  }
16
- const hasNext = await exists(path.join(projectPath, '.next'));
17
- const hasNitro = await exists(path.join(projectPath, '.output', 'nitro.json'));
18
- const hasViteDist = await exists(path.join(projectPath, 'dist', 'index.html'));
19
- if (hasNext) {
24
+ const nextOutput = resolveOutputPath(projectPath, 'nextjs', output);
25
+ if (await inspectNextjsOutput(nextOutput)) {
20
26
  return loadAdapter('nextjs');
21
27
  }
22
- if (hasNitro) {
28
+ const nitroOutput = resolveOutputPath(projectPath, 'nitro', output);
29
+ if (await inspectNitroOutput(nitroOutput)) {
23
30
  return loadAdapter('nitro');
24
31
  }
25
- if (hasViteDist) {
32
+ const viteOutput = resolveOutputPath(projectPath, 'vite', output);
33
+ if (await exists(path.join(viteOutput, 'index.html'))) {
26
34
  return loadAdapter('vite');
27
35
  }
28
- throw new Error('Could not detect framework. Expected .next/ (NextJS), .output/nitro.json (Nitro), or dist/index.html (Vite). ' + 'Use --adapter to specify explicitly.');
36
+ const location = output ? ` in ${path.resolve(projectPath, output)}` : '';
37
+ throw new Error(`Could not detect framework${location}. Expected Next.js BUILD_ID + standalone server, ` + 'Nitro server entry, or Vite index.html. ' + 'Use --adapter to specify explicitly.');
29
38
  }
30
39
  async function loadAdapter(name) {
31
40
  switch(name){
32
41
  case 'nextjs':
33
42
  {
34
- const mod = await import('./adapters/nextjs.js');
35
- return mod.nextjsAdapter;
43
+ const mod = await import('../adapters/nextjs.js');
44
+ return new mod.NextjsAdapter({
45
+ logger: adapterLogger
46
+ });
36
47
  }
37
48
  case 'nitro':
38
49
  {
39
- const mod = await import('./adapters/nitro.js');
40
- return mod.nitroAdapter;
50
+ const mod = await import('../adapters/nitro.js');
51
+ return new mod.NitroAdapter();
41
52
  }
42
53
  case 'vite':
43
54
  {
44
- const mod = await import('./adapters/vite.js');
45
- return mod.viteAdapter;
55
+ const mod = await import('../adapters/vite.js');
56
+ return new mod.ViteAdapter();
46
57
  }
47
58
  }
48
59
  }
@@ -14,6 +14,8 @@ export declare function getEnvVar(projectPath: string, key: string): Promise<nul
14
14
  * @returns The value if found, null otherwise
15
15
  */
16
16
  export declare function getEnvVarSync(projectPath: string, key: string): null | string;
17
+ /** Read a dotenv-parsed value without populating process.env. */
18
+ export declare function getParsedEnvVarSync(projectPath: string, key: string): null | string;
17
19
  /**
18
20
  * Add or update an environment variable in .env file
19
21
  *
@@ -22,6 +24,19 @@ export declare function getEnvVarSync(projectPath: string, key: string): null |
22
24
  * @param value - Environment variable value
23
25
  */
24
26
  export declare function addOrUpdateEnvVar(projectPath: string, key: string, value: string): Promise<void>;
27
+ /**
28
+ * Comment out an environment variable in .env file by prepending `# ` to any
29
+ * assignment line for the given key. Preserves the value so the developer can
30
+ * uncomment it later (or move it to another env file). No-op if the key is
31
+ * absent or every occurrence is already commented.
32
+ *
33
+ * @param projectPath - Path to project directory
34
+ * @param key - Environment variable name to disable
35
+ * @param annotation - Optional trailing comment appended to each disabled
36
+ * line, so the developer knows why it was disabled
37
+ * @returns true if at least one line was commented out, false otherwise
38
+ */
39
+ export declare function commentOutEnvVar(projectPath: string, key: string, annotation?: string): Promise<boolean>;
25
40
  /**
26
41
  * Remove an environment variable from .env file
27
42
  *
@@ -1,3 +1,4 @@
1
+ import { parse } from 'dotenv';
1
2
  import fs from 'fs/promises';
2
3
  import fsSync from 'node:fs';
3
4
  import path from 'path';
@@ -54,6 +55,14 @@ import path from 'path';
54
55
  return null;
55
56
  }
56
57
  }
58
+ /** Read a dotenv-parsed value without populating process.env. */ export function getParsedEnvVarSync(projectPath, key) {
59
+ try {
60
+ const contents = fsSync.readFileSync(path.join(projectPath, '.env'), 'utf-8');
61
+ return parse(contents)[key] ?? null;
62
+ } catch {
63
+ return null;
64
+ }
65
+ }
57
66
  /**
58
67
  * Add or update an environment variable in .env file
59
68
  *
@@ -115,6 +124,44 @@ import path from 'path';
115
124
  throw new Error(`Failed to update .env file: ${error instanceof Error ? error.message : 'Unknown error'}`);
116
125
  }
117
126
  }
127
+ /**
128
+ * Comment out an environment variable in .env file by prepending `# ` to any
129
+ * assignment line for the given key. Preserves the value so the developer can
130
+ * uncomment it later (or move it to another env file). No-op if the key is
131
+ * absent or every occurrence is already commented.
132
+ *
133
+ * @param projectPath - Path to project directory
134
+ * @param key - Environment variable name to disable
135
+ * @param annotation - Optional trailing comment appended to each disabled
136
+ * line, so the developer knows why it was disabled
137
+ * @returns true if at least one line was commented out, false otherwise
138
+ */ export async function commentOutEnvVar(projectPath, key, annotation) {
139
+ const envPath = path.join(projectPath, '.env');
140
+ try {
141
+ const contents = await fs.readFile(envPath, 'utf-8');
142
+ const lines = contents.split(/\r?\n/);
143
+ let changed = false;
144
+ const updated = lines.map((line)=>{
145
+ if (!line.includes('=') || line.trim().startsWith('#')) {
146
+ return line;
147
+ }
148
+ const equalsIndex = line.indexOf('=');
149
+ const lineKey = line.substring(0, equalsIndex).trim();
150
+ if (lineKey !== key) {
151
+ return line;
152
+ }
153
+ changed = true;
154
+ const suffix = annotation ? ` # ${annotation}` : '';
155
+ return `# ${line}${suffix}`;
156
+ });
157
+ if (changed) {
158
+ await fs.writeFile(envPath, updated.join('\n'), 'utf-8');
159
+ }
160
+ return changed;
161
+ } catch {
162
+ return false;
163
+ }
164
+ }
118
165
  /**
119
166
  * Remove an environment variable from .env file
120
167
  *
@@ -1,6 +1,9 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
3
  import { IndentationText, Node, Project, SyntaxKind } from 'ts-morph';
4
+ import { addFigmaImageLoaderConfig } from './next-image-loader-config.js';
5
+ import { writeFigmaImageLoaderFile } from './next-image-loader-file.js';
6
+ import { ensurePnpmWorkspace } from './pnpm-builds.js';
4
7
  const RUN_SH_CONTENT = `#!/bin/bash -x
5
8
 
6
9
  [ ! -d '/tmp/cache' ] && mkdir -p /tmp/cache
@@ -17,23 +20,13 @@ NODE_ENV=production exec node server.js
17
20
  const runShPath = path.join(projectPath, 'run.sh');
18
21
  await fs.writeFile(runShPath, RUN_SH_CONTENT, 'utf-8');
19
22
  await fs.chmod(runShPath, 0o755);
20
- // 2. Modify next config to add standalone output
23
+ // 2. Add Next.js-specific configuration.
21
24
  await addNextConfigProperties(projectPath);
22
- // 3. Create/update .npmrc
23
- const npmrcPath = path.join(projectPath, '.npmrc');
24
- let npmrcContent = '';
25
- try {
26
- npmrcContent = await fs.readFile(npmrcPath, 'utf-8');
27
- } catch {
28
- // File doesn't exist, start fresh
29
- }
30
- if (!npmrcContent.includes('node-linker=hoisted')) {
31
- npmrcContent += npmrcContent && !npmrcContent.endsWith('\n') ? '\n' : '';
32
- npmrcContent += 'node-linker=hoisted\n';
33
- await fs.writeFile(npmrcPath, npmrcContent, 'utf-8');
34
- }
35
- // 4. Add lambda:buildzip script to package.json
25
+ await writeFigmaImageLoaderFile(projectPath);
26
+ // 3. Add lambda:buildzip script to package.json
36
27
  await addLambdaBuildScript(projectPath, packageManager);
28
+ // 4. Write pnpm-workspace.yaml (hoisted linker + build approvals)
29
+ await ensurePnpmWorkspace(projectPath);
37
30
  }
38
31
  /**
39
32
  * Find the Next.js config file, checking TS extensions first
@@ -58,6 +51,7 @@ NODE_ENV=production exec node server.js
58
51
  /**
59
52
  * Add required Next.js config properties using ts-morph AST parsing
60
53
  * - output: 'standalone' (for Lambda deployment)
54
+ * - images.loader: 'custom' and images.loaderFile for Payload media
61
55
  */ async function addNextConfigProperties(projectPath) {
62
56
  const nextConfigPath = await findNextConfigPath(projectPath);
63
57
  const project = new Project({
@@ -75,15 +69,16 @@ NODE_ENV=production exec node server.js
75
69
  if (!configObject) {
76
70
  throw new Error(`Could not find Next.js config object in ${path.basename(nextConfigPath)}. ` + `Expected either 'export default { ... }' or 'export default wrapper(configVar, ...)'`);
77
71
  }
78
- const hasOutput = configObject.getProperty('output') !== undefined;
79
- if (hasOutput) {
80
- return;
72
+ if (configObject.getProperty('output') === undefined) {
73
+ configObject.addPropertyAssignment({
74
+ name: 'output',
75
+ initializer: "'standalone'"
76
+ });
77
+ }
78
+ addFigmaImageLoaderConfig(configObject);
79
+ if (!sourceFile.isSaved()) {
80
+ await sourceFile.save();
81
81
  }
82
- configObject.addPropertyAssignment({
83
- name: 'output',
84
- initializer: "'standalone'"
85
- });
86
- await sourceFile.save();
87
82
  }
88
83
  /**
89
84
  * Find the config object literal from either:
@@ -1,4 +1,3 @@
1
- import { createRequire } from 'node:module';
2
1
  import path from 'node:path';
3
2
  import { pathToFileURL } from 'node:url';
4
3
  import { findPayloadConfig } from './payload-config-finder.js';
@@ -16,11 +15,7 @@ import { findPayloadConfig } from './payload-config-finder.js';
16
15
  const absoluteConfigPath = path.resolve(projectPath, configPath);
17
16
  const { loadEnv } = await import('payload/node');
18
17
  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);
18
+ const tsImport = (await import('tsx/esm/api')).tsImport;
24
19
  const parentURL = pathToFileURL(`${projectPath}${path.sep}`).href;
25
20
  const imported = await tsImport(absoluteConfigPath, parentURL);
26
21
  return await (imported.default ?? imported);
@@ -14,6 +14,7 @@ export function helpMessage() {
14
14
  ${pc.cyan('logout')} Clear all stored tokens
15
15
  ${pc.cyan('list-tokens')} Show stored token information
16
16
  ${pc.cyan('init')} Initialize a Figma CMS project
17
+ ${pc.cyan('setup-agent')} Install or update the Figma deploy skill
17
18
  ${pc.cyan('bootstrap')} Print bootstrap info (tenant IDs, OAuth creds) for a project
18
19
  ${pc.cyan('debug')} Show debug info for troubleshooting
19
20
  ${pc.cyan('env')} Switch active environment
@@ -31,16 +32,20 @@ export function helpMessage() {
31
32
  ${pc.bold('AUTHENTICATION')}
32
33
 
33
34
  ${pc.cyan('@payloadcms/figma login')} Authenticate with Figma
35
+ ${pc.cyan('@payloadcms/figma login --headless --json')} Start resumable login for agents
36
+ ${pc.cyan('@payloadcms/figma login --complete <id> --callback-url <url>')} Complete resumable login
37
+ ${pc.dim('--json')} Emit machine-readable login status
34
38
  ${pc.cyan('@payloadcms/figma logout')} Clear tokens for current environment
35
39
  ${pc.cyan('@payloadcms/figma list-tokens')} Display stored OAuth and project tokens
36
40
 
37
41
  ${pc.bold('INIT COMMAND')}
38
42
 
39
- ${pc.cyan('@payloadcms/figma init --id <cms-resource-id>')} Initialize project
43
+ ${pc.cyan('@payloadcms/figma init')} Create and initialize project
44
+ ${pc.cyan('@payloadcms/figma init --id <cms-resource-id>')} Connect existing project
40
45
  ${pc.cyan('@payloadcms/figma init --id <id> --env staging')} Initialize for specific environment
41
46
  ${pc.dim('--name, -n <name>')} Set project directory name (skips prompt)
42
47
  ${pc.dim('--force')} Force reconfiguration of existing project
43
- ${pc.dim('--no-skill')} Skip installing the Payload skill into .claude/skills/payload/
48
+ ${pc.dim('--no-agent')} Skip writing AI agent config files (AGENTS.md, CLAUDE.md)
44
49
  ${pc.dim('--template, -t <spec>')} Override scaffold template (e.g. main:website, owner/repo#ref:path)
45
50
  ${pc.dim('--payload-version <tag|version>')} Core Payload npm dist-tag or version (default canary; e.g. latest, 4.0.0-canary.16)
46
51
 
@@ -58,11 +63,27 @@ export function helpMessage() {
58
63
  ${pc.bold('DEPLOY COMMAND')}
59
64
 
60
65
  ${pc.cyan('@payloadcms/figma deploy')} Deploy your project to Figma
66
+ ${pc.dim(' Creates a project when not initialized')}
61
67
  ${pc.dim('--id <project-id>')} Override FIGMA_PROJECT_ID
62
68
  ${pc.dim('--env <environment>')} Override FIGMA_ENVIRONMENT_NAME
63
- ${pc.dim('--yes, -y')} Skip confirmation prompts
69
+ ${pc.dim('--yes, -y')} Skip prompts; use safe defaults for project creation
70
+ ${pc.dim('--name <name>')} New project name (default: package/directory name)
71
+ ${pc.dim('--description <description>')} New project description (default: <name> project)
72
+ ${pc.dim('--subdomain <subdomain>')} New project subdomain (default: generated from name)
73
+ ${pc.dim('--workspace <plan-key>')} Workspace plan key (default workspace if omitted)
74
+ ${pc.dim('--region <region>')} New project region (default: us-east-1 non-interactively)
64
75
  ${pc.dim('--skip-build')} Skip building and use existing build
65
76
  ${pc.dim('--skip-size-check')} Skip the client-side bundle size check
77
+ ${pc.dim('--adapter <nextjs|nitro|vite>')} Override framework detection
78
+ ${pc.dim('--output <path>')} Exact framework build output root
79
+
80
+ ${pc.bold('SETUP AGENT COMMAND')}
81
+
82
+ ${pc.cyan('@payloadcms/figma setup-agent')} Prompt for global or project installation
83
+ ${pc.cyan('@payloadcms/figma setup-agent --global')} Install/update globally
84
+ ${pc.cyan('@payloadcms/figma setup-agent --project')} Install/update in the current project
85
+ ${pc.dim('--yes, -y')} Skip skills installer prompts
86
+ ${pc.dim('Non-interactive use requires --global or --project.')}
66
87
 
67
88
  ${pc.bold('UPGRADE COMMAND')}
68
89
 
@@ -0,0 +1,2 @@
1
+ import type { ObjectLiteralExpression } from 'ts-morph';
2
+ export declare function addFigmaImageLoaderConfig(configObject: ObjectLiteralExpression): void;