@payloadcms/figma 0.1.0-internal.e071575 → 1.0.0-beta.0

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 +32 -7
  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
@@ -0,0 +1,37 @@
1
+ import { getAuthHeaders } from '../auth/credentials.js';
2
+ import { getEnvConfig } from '../constants.js';
3
+ import { controlPlaneFetch } from './control-plane-fetch.js';
4
+ export async function createProject({ name, credential, description, parentPlanKey, region, resourceType, subdomain }) {
5
+ if (process.env.FIGMA_MOCK_CONTROL_PLANE === 'true') {
6
+ return {
7
+ id: `cms_${Math.random().toString(36).substring(2, 11)}`,
8
+ name,
9
+ domainName: `${subdomain}.figmasource.site`
10
+ };
11
+ }
12
+ const response = await controlPlaneFetch({
13
+ context: 'create project',
14
+ options: {
15
+ body: JSON.stringify({
16
+ name,
17
+ description,
18
+ parent_plan_key: parentPlanKey,
19
+ region,
20
+ resource_type: resourceType,
21
+ subdomain
22
+ }),
23
+ headers: {
24
+ ...getAuthHeaders(credential),
25
+ 'Content-Type': 'application/json'
26
+ },
27
+ method: 'POST'
28
+ },
29
+ url: `${getEnvConfig().apiBaseUrl}/v1/cms`
30
+ });
31
+ const projectResponse = await response.json();
32
+ return {
33
+ id: projectResponse.meta.tenant.id,
34
+ name: projectResponse.meta.tenant.name,
35
+ domainName: projectResponse.meta.tenant.domain_name
36
+ };
37
+ }
@@ -0,0 +1,8 @@
1
+ import type { AuthCredential } from '../auth/credentials.js';
2
+ interface ProjectWorkspace {
3
+ isDefault: boolean;
4
+ name: string;
5
+ planKey: string;
6
+ }
7
+ export declare function listProjectWorkspaces(credential: AuthCredential): Promise<ProjectWorkspace[]>;
8
+ export {};
@@ -0,0 +1,28 @@
1
+ import { getAuthHeaders } from '../auth/credentials.js';
2
+ import { getEnvConfig } from '../constants.js';
3
+ import { controlPlaneFetch } from './control-plane-fetch.js';
4
+ export async function listProjectWorkspaces(credential) {
5
+ if (process.env.FIGMA_MOCK_CONTROL_PLANE === 'true') {
6
+ return [
7
+ {
8
+ name: 'Mock workspace',
9
+ isDefault: true,
10
+ planKey: 'team::mock-workspace'
11
+ }
12
+ ];
13
+ }
14
+ const response = await controlPlaneFetch({
15
+ context: 'list project workspaces',
16
+ options: {
17
+ headers: getAuthHeaders(credential),
18
+ method: 'POST'
19
+ },
20
+ url: `${getEnvConfig().apiBaseUrl}/v1/cms/workspaces`
21
+ });
22
+ const workspaceResponse = await response.json();
23
+ return workspaceResponse.meta.workspaces.map((workspace)=>({
24
+ name: workspace.name,
25
+ isDefault: workspace.is_default,
26
+ planKey: workspace.plan_key
27
+ }));
28
+ }
@@ -0,0 +1 @@
1
+ export type ProjectResourceType = 'payload' | 'vite';
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,23 @@
1
+ import type { TokenStore } from './token-store.js';
2
+ export interface StartHeadlessOAuthFlowResult {
3
+ authorizationUrl: string;
4
+ expiresAt: number;
5
+ sessionId: string;
6
+ }
7
+ export declare class HeadlessOAuthFlowError extends Error {
8
+ constructor(message: string);
9
+ }
10
+ /** Start OAuth without a callback listener so another process can resume it. */
11
+ export declare function startHeadlessOAuthFlow(tokenStore: TokenStore, options?: {
12
+ now?: number;
13
+ }): StartHeadlessOAuthFlowResult;
14
+ /** Complete a previously started headless OAuth flow and store its tokens. */
15
+ export declare function completeHeadlessOAuthFlow({ callbackUrl, now, sessionId, tokenStore, }: {
16
+ callbackUrl: string;
17
+ now?: number;
18
+ sessionId: string;
19
+ tokenStore: TokenStore;
20
+ }): Promise<{
21
+ tokens: import("./types.js").FigmaTokens;
22
+ userId: string | undefined;
23
+ }>;
@@ -0,0 +1,73 @@
1
+ import crypto from 'node:crypto';
2
+ import { getOAuthConfig } from '../config/oauth.js';
3
+ import { buildAuthorizationUrl } from './browser.js';
4
+ import { parsePastedCode } from './paste-code.js';
5
+ import { generatePKCEPair } from './pkce.js';
6
+ import { exchangeCodeForTokens } from './refresh.js';
7
+ import { hasRequestedScopes } from './requested-scopes.js';
8
+ const HEADLESS_OAUTH_SESSION_TTL_MS = 10 * 60 * 1000;
9
+ export class HeadlessOAuthFlowError extends Error {
10
+ constructor(message){
11
+ super(message);
12
+ this.name = 'HeadlessOAuthFlowError';
13
+ }
14
+ }
15
+ /** Start OAuth without a callback listener so another process can resume it. */ export function startHeadlessOAuthFlow(tokenStore, options = {}) {
16
+ const oauthConfig = getOAuthConfig();
17
+ const { codeChallenge, codeChallengeMethod, codeVerifier } = generatePKCEPair();
18
+ const now = options.now ?? Date.now();
19
+ const session = {
20
+ id: crypto.randomBytes(32).toString('base64url'),
21
+ clientId: oauthConfig.clientId,
22
+ codeVerifier,
23
+ expiresAt: now + HEADLESS_OAUTH_SESSION_TTL_MS,
24
+ redirectUri: oauthConfig.redirectUri,
25
+ state: crypto.randomBytes(32).toString('base64url')
26
+ };
27
+ tokenStore.setHeadlessOAuthSession(session);
28
+ return {
29
+ authorizationUrl: buildAuthorizationUrl({
30
+ authorizationUrl: oauthConfig.authorizationUrl,
31
+ clientId: session.clientId,
32
+ codeChallenge,
33
+ codeChallengeMethod,
34
+ redirectUri: session.redirectUri,
35
+ scopes: oauthConfig.scopes,
36
+ state: session.state
37
+ }),
38
+ expiresAt: session.expiresAt,
39
+ sessionId: session.id
40
+ };
41
+ }
42
+ /** Complete a previously started headless OAuth flow and store its tokens. */ export async function completeHeadlessOAuthFlow({ callbackUrl, now = Date.now(), sessionId, tokenStore }) {
43
+ const session = tokenStore.getHeadlessOAuthSession();
44
+ if (!session) {
45
+ throw new HeadlessOAuthFlowError('No pending login found. Start login again with --headless.');
46
+ }
47
+ if (session.id !== sessionId) {
48
+ throw new HeadlessOAuthFlowError('Login session does not match. Start login again with --headless.');
49
+ }
50
+ if (now >= session.expiresAt) {
51
+ tokenStore.clearHeadlessOAuthSession();
52
+ throw new HeadlessOAuthFlowError('Login session expired. Start login again with --headless.');
53
+ }
54
+ try {
55
+ try {
56
+ new URL(callbackUrl);
57
+ } catch {
58
+ throw new HeadlessOAuthFlowError('Paste the full redirected URL so the login state can be verified.');
59
+ }
60
+ const code = parsePastedCode(callbackUrl, session.state);
61
+ const tokens = await exchangeCodeForTokens(code, session.codeVerifier, session.redirectUri, session.clientId);
62
+ if (!hasRequestedScopes(tokens.scopes, getOAuthConfig().scopes)) {
63
+ throw new HeadlessOAuthFlowError('Authorization did not grant all requested Cloud scopes');
64
+ }
65
+ tokenStore.setTokens(tokens);
66
+ return {
67
+ tokens,
68
+ userId: tokens.userId
69
+ };
70
+ } finally{
71
+ tokenStore.clearHeadlessOAuthSession();
72
+ }
73
+ }
@@ -16,6 +16,8 @@ export interface OAuthFlowOptions {
16
16
  clientId?: string;
17
17
  /** Callback server fallback ports to try after port */
18
18
  fallbackPorts?: number[];
19
+ /** Open the browser without asking for confirmation */
20
+ openBrowserWithoutPrompt?: boolean;
19
21
  /** First callback server port to try */
20
22
  port?: number;
21
23
  /** Redirect URI (defaults to config) */
@@ -7,6 +7,7 @@ import { CallbackError, CallbackServer } from './callback-server.js';
7
7
  import { parsePastedCode, validatePastedCode } from './paste-code.js';
8
8
  import { generatePKCEPair } from './pkce.js';
9
9
  import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './refresh.js';
10
+ import { hasRequestedScopes } from './requested-scopes.js';
10
11
  /**
11
12
  * Error during OAuth flow
12
13
  */ export class OAuthFlowError extends Error {
@@ -54,7 +55,7 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
54
55
  };
55
56
  }
56
57
  // REAL OAUTH IMPLEMENTATION
57
- const { clientId = oauthConfig.clientId, fallbackPorts, port, redirectUri = oauthConfig.redirectUri, scopes = oauthConfig.scopes, timeoutMs = 120000 } = options;
58
+ const { clientId = oauthConfig.clientId, fallbackPorts, openBrowserWithoutPrompt = false, port, redirectUri = oauthConfig.redirectUri, scopes = oauthConfig.scopes, timeoutMs = 120000 } = options;
58
59
  // Generate PKCE pair for enhanced security
59
60
  const { codeChallenge, codeChallengeMethod, codeVerifier } = generatePKCEPair();
60
61
  // Generate random state for CSRF protection
@@ -85,13 +86,18 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
85
86
  scopes,
86
87
  state
87
88
  });
88
- // Prompt user to open browser
89
- const shouldOpenBrowser = await p.confirm({
90
- initialValue: true,
91
- message: 'Open browser to authenticate with Figma?'
92
- });
93
- if (p.isCancel(shouldOpenBrowser)) {
94
- throw new OAuthFlowError('Authentication cancelled by user');
89
+ // Ask interactive callers before opening a browser. Automated callers have
90
+ // already accepted defaults with -y, so proceed directly to authorization.
91
+ let shouldOpenBrowser = openBrowserWithoutPrompt;
92
+ if (!openBrowserWithoutPrompt) {
93
+ const browserConfirmation = await p.confirm({
94
+ initialValue: true,
95
+ message: 'Open browser to authenticate with Figma?'
96
+ });
97
+ if (p.isCancel(browserConfirmation)) {
98
+ throw new OAuthFlowError('Authentication cancelled by user');
99
+ }
100
+ shouldOpenBrowser = browserConfirmation;
95
101
  }
96
102
  let browserOpened = false;
97
103
  if (shouldOpenBrowser) {
@@ -125,6 +131,9 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
125
131
  } catch (error) {
126
132
  throw new OAuthFlowError('Failed to exchange authorization code for tokens', error instanceof Error ? error : undefined);
127
133
  }
134
+ if (!hasRequestedScopes(tokens.scopes, scopes)) {
135
+ throw new OAuthFlowError('Authorization did not grant all requested Cloud scopes');
136
+ }
128
137
  // Store tokens
129
138
  try {
130
139
  tokenStore.setTokens(tokens);
@@ -157,6 +166,13 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
157
166
  * @returns Promise resolving to AuthCredential (wrapped access token) or null if no valid tokens
158
167
  * @throws OAuthFlowError if refresh fails
159
168
  */ export async function getValidOAuthAccessToken(tokenStore) {
169
+ const cached = tokenStore.getOauthInfo();
170
+ const requiredScopes = getOAuthConfig().scopes;
171
+ // Older cached grants lack scope metadata or the Cloud capabilities. Refreshing
172
+ // them cannot add consent, so start a new authorization flow instead.
173
+ if (cached && !hasRequestedScopes(cached.scopes, requiredScopes)) {
174
+ return null;
175
+ }
160
176
  // Check if we have valid tokens
161
177
  if (tokenStore.hasValidOauthToken()) {
162
178
  const token = tokenStore.getCurrentOauthToken();
@@ -174,6 +190,9 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
174
190
  try {
175
191
  const tokens = await refreshAccessToken(refreshToken);
176
192
  tokenStore.setTokens(tokens);
193
+ if (!hasRequestedScopes(tokens.scopes, requiredScopes)) {
194
+ return null;
195
+ }
177
196
  return {
178
197
  type: 'oauth',
179
198
  token: tokens.accessToken
@@ -185,6 +204,9 @@ import { exchangeCodeForTokens, refreshAccessToken, TokenRefreshError } from './
185
204
  try {
186
205
  const tokens = await refreshAccessToken(refreshToken);
187
206
  tokenStore.setTokens(tokens);
207
+ if (!hasRequestedScopes(tokens.scopes, requiredScopes)) {
208
+ return null;
209
+ }
188
210
  return {
189
211
  type: 'oauth',
190
212
  token: tokens.accessToken
@@ -1,5 +1,8 @@
1
1
  /* eslint-disable perfectionist/sort-objects */ import { getOAuthConfig } from '../config/oauth.js';
2
2
  import * as log from '../utils/log.js';
3
+ function parseGrantedScopes(scope) {
4
+ return scope?.split(/[\s,]+/).filter(Boolean);
5
+ }
3
6
  /**
4
7
  * Error thrown when token refresh fails
5
8
  */ export class TokenRefreshError extends Error {
@@ -50,15 +53,17 @@ import * as log from '../utils/log.js';
50
53
  }
51
54
  const data = await response.json();
52
55
  // Validate response contains required fields
53
- if (!data.access_token || !data.refresh_token || !data.expires_in) {
56
+ if (!data.access_token || !data.expires_in) {
54
57
  throw new TokenRefreshError('Invalid token response: missing required fields');
55
58
  }
56
59
  // Convert response to our internal token format
57
60
  const expiresAt = Date.now() + data.expires_in * 1000;
58
61
  return {
59
62
  accessToken: data.access_token,
60
- refreshToken: data.refresh_token,
63
+ refreshToken: data.refresh_token ?? refreshToken,
61
64
  expiresAt,
65
+ scopes: parseGrantedScopes(data.scope),
66
+ tokenType: data.token_type,
62
67
  userId: data.user_id_string
63
68
  };
64
69
  } catch (error) {
@@ -99,12 +104,7 @@ import * as log from '../utils/log.js';
99
104
  const headers = {
100
105
  'Content-Type': 'application/x-www-form-urlencoded'
101
106
  };
102
- // Debug logging
103
- log.debug(`Token exchange request: ${JSON.stringify({
104
- url: oauthConfig.tokenUrl,
105
- headers,
106
- body: params.toString()
107
- })}`);
107
+ log.debug(`Token exchange request to ${oauthConfig.tokenUrl}`);
108
108
  const response = await fetch(oauthConfig.tokenUrl, {
109
109
  method: 'POST',
110
110
  headers,
@@ -117,17 +117,15 @@ import * as log from '../utils/log.js';
117
117
  })}`);
118
118
  if (!response.ok) {
119
119
  const errorText = await response.text();
120
- log.debug(`Error response body: ${errorText}`);
120
+ log.debug(`Token exchange rejected with status ${response.status}`);
121
121
  throw new TokenRefreshError(`Token exchange failed: ${response.statusText}. ${errorText}`, response.status);
122
122
  }
123
123
  const data = await response.json();
124
124
  log.debug(`Token response: ${JSON.stringify({
125
- access_token: data.access_token,
126
125
  token_type: data.token_type,
127
126
  expires_in: data.expires_in,
128
127
  scope: data.scope,
129
- user_id_string: data.user_id_string,
130
- refresh_token: data.refresh_token?.substring(0, 10) + '...'
128
+ user_id_string: data.user_id_string
131
129
  })}`);
132
130
  // Validate response contains required fields
133
131
  if (!data.access_token || !data.refresh_token || !data.expires_in) {
@@ -139,6 +137,8 @@ import * as log from '../utils/log.js';
139
137
  accessToken: data.access_token,
140
138
  refreshToken: data.refresh_token,
141
139
  expiresAt,
140
+ scopes: parseGrantedScopes(data.scope),
141
+ tokenType: data.token_type,
142
142
  userId: data.user_id_string
143
143
  };
144
144
  } catch (error) {
@@ -0,0 +1 @@
1
+ export declare function hasRequestedScopes(granted: readonly string[] | undefined, required: readonly string[]): boolean;
@@ -0,0 +1,3 @@
1
+ export function hasRequestedScopes(granted, required) {
2
+ return !!granted && required.every((scope)=>granted.includes(scope));
3
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Environment } from '../constants.js';
2
- import type { BootstrapData, FigmaTokens, ProjectStoreScope, ProjectToken, TokenStoreConfig } from './types.js';
2
+ import type { BootstrapData, FigmaTokens, HeadlessOAuthSession, ProjectStoreScope, ProjectToken, TokenStoreConfig } from './types.js';
3
3
  /**
4
4
  * Get the singleton TokenStore instance for an environment.
5
5
  */
@@ -23,6 +23,9 @@ export declare class TokenStore {
23
23
  getOauthInfo(): FigmaTokens | null;
24
24
  setTokens(tokens: FigmaTokens): void;
25
25
  clearTokens(): void;
26
+ getHeadlessOAuthSession(): HeadlessOAuthSession | null;
27
+ setHeadlessOAuthSession(session: HeadlessOAuthSession): void;
28
+ clearHeadlessOAuthSession(): void;
26
29
  hasValidOauthToken(): boolean;
27
30
  isOauthExpired(): boolean;
28
31
  getCurrentOauthToken(): null | string;
@@ -61,6 +64,22 @@ export declare class TokenStore {
61
64
  getBootstrapData(projectId: string, environmentName: string): BootstrapData | null;
62
65
  setBootstrapData(projectId: string, environmentName: string, data: BootstrapData): void;
63
66
  clearBootstrapData(projectId: string, environmentName: string): void;
67
+ /**
68
+ * PAYLOAD_SECRET is fetched from the Control Plane during `init` and
69
+ * cached here per (projectId, environmentName). buildFigmaConfig reads
70
+ * it at local dev startup when process.env.PAYLOAD_SECRET is unset.
71
+ * Platform-injected in Lambda, so this path is never hit there.
72
+ */
73
+ getPayloadSecret({ projectInfo }?: {
74
+ projectInfo?: ProjectStoreScope;
75
+ }): null | string;
76
+ setPayloadSecret({ projectInfo, secret, }: {
77
+ projectInfo?: ProjectStoreScope;
78
+ secret: string;
79
+ }): void;
80
+ clearPayloadSecret({ projectInfo }?: {
81
+ projectInfo?: ProjectStoreScope;
82
+ }): void;
64
83
  private buildOAuthConfigName;
65
84
  private buildOAuthStoreCwd;
66
85
  private buildProjectStoreConfigName;
@@ -186,11 +186,25 @@ const PROJECT_STORE_SCHEMA_VERSION = 1;
186
186
  clearTokens() {
187
187
  this.oauthConfig.delete('accessToken');
188
188
  this.oauthConfig.delete('expiresAt');
189
+ this.oauthConfig.delete('headlessOAuthSession');
189
190
  this.oauthConfig.delete('refreshToken');
190
191
  this.oauthConfig.delete('scopes');
191
192
  this.oauthConfig.delete('tokenType');
192
193
  this.oauthConfig.delete('userId');
193
194
  }
195
+ getHeadlessOAuthSession() {
196
+ return this.safeGet({
197
+ config: this.oauthConfig,
198
+ key: 'headlessOAuthSession'
199
+ }) ?? null;
200
+ }
201
+ setHeadlessOAuthSession(session) {
202
+ this.oauthConfig.set('_schemaVersion', OAUTH_STORE_SCHEMA_VERSION);
203
+ this.oauthConfig.set('headlessOAuthSession', session);
204
+ }
205
+ clearHeadlessOAuthSession() {
206
+ this.oauthConfig.delete('headlessOAuthSession');
207
+ }
194
208
  hasValidOauthToken() {
195
209
  const tokens = this.getOauthInfo();
196
210
  if (!tokens) {
@@ -340,6 +354,39 @@ const PROJECT_STORE_SCHEMA_VERSION = 1;
340
354
  });
341
355
  config.delete('bootstrapData');
342
356
  }
357
+ /**
358
+ * PAYLOAD_SECRET is fetched from the Control Plane during `init` and
359
+ * cached here per (projectId, environmentName). buildFigmaConfig reads
360
+ * it at local dev startup when process.env.PAYLOAD_SECRET is unset.
361
+ * Platform-injected in Lambda, so this path is never hit there.
362
+ */ getPayloadSecret({ projectInfo } = {}) {
363
+ const resolvedProjectInfo = projectInfo ?? this.getProjectInfoFromEnv();
364
+ if (!resolvedProjectInfo) {
365
+ return null;
366
+ }
367
+ const config = this.getProjectStore(resolvedProjectInfo);
368
+ return this.safeGet({
369
+ config,
370
+ key: 'payloadSecret'
371
+ }) ?? null;
372
+ }
373
+ setPayloadSecret({ projectInfo, secret }) {
374
+ const resolvedProjectInfo = projectInfo ?? this.getProjectInfoFromEnv();
375
+ if (!resolvedProjectInfo) {
376
+ throw new Error('Cannot set payload secret: FIGMA_PROJECT_ID and FIGMA_ENVIRONMENT_NAME must be set');
377
+ }
378
+ const config = this.getProjectStore(resolvedProjectInfo);
379
+ config.set('_schemaVersion', PROJECT_STORE_SCHEMA_VERSION);
380
+ config.set('payloadSecret', secret);
381
+ }
382
+ clearPayloadSecret({ projectInfo } = {}) {
383
+ const resolvedProjectInfo = projectInfo ?? this.getProjectInfoFromEnv();
384
+ if (!resolvedProjectInfo) {
385
+ return;
386
+ }
387
+ const config = this.getProjectStore(resolvedProjectInfo);
388
+ config.delete('payloadSecret');
389
+ }
343
390
  buildOAuthConfigName() {
344
391
  // For test isolation: if using a custom config name, use it as-is with -oauth suffix
345
392
  // Otherwise use the standard naming that includes environment
@@ -5,7 +5,7 @@ import type { Environment } from '../constants.js';
5
5
  * Standard OAuth2 scopes for user-level permissions
6
6
  * @see https://www.figma.com/developers/api#oauth2
7
7
  */
8
- export type FigmaOAuthScope = 'current_user:read' | 'file_comments:read' | 'file_comments:write' | 'file_content:read' | 'file_dev_resources:read' | 'file_dev_resources:write' | 'file_metadata:read' | 'file_variables:read' | 'file_variables:write' | 'file_versions:read' | 'files:read' | 'library_analytics:read' | 'library_assets:read' | 'library_content:read' | 'projects:read' | 'team_library_content:read' | 'webhooks:read' | 'webhooks:write';
8
+ export type FigmaOAuthScope = 'cloud:content:read_write' | 'cloud:create' | 'cloud:deploy' | 'cloud:read' | 'cloud:secrets:read' | 'current_user:read' | 'file_comments:read' | 'file_comments:write' | 'file_content:read' | 'file_dev_resources:read' | 'file_dev_resources:write' | 'file_metadata:read' | 'file_variables:read' | 'file_variables:write' | 'file_versions:read' | 'files:read' | 'library_analytics:read' | 'library_assets:read' | 'library_content:read' | 'projects:read' | 'team_library_content:read' | 'webhooks:read' | 'webhooks:write';
9
9
  /**
10
10
  * Organization-level OAuth2 scopes
11
11
  * Requires organization admin permissions
@@ -32,6 +32,18 @@ export interface FigmaTokens {
32
32
  /** Figma user ID string */
33
33
  userId?: string;
34
34
  }
35
+ /**
36
+ * Temporary state for a resumable OAuth login. Stored encrypted on the machine
37
+ * that generated the PKCE verifier and removed after completion or expiry.
38
+ */
39
+ export interface HeadlessOAuthSession {
40
+ clientId: string;
41
+ codeVerifier: string;
42
+ expiresAt: number;
43
+ id: string;
44
+ redirectUri: string;
45
+ state: string;
46
+ }
35
47
  /**
36
48
  * Raw token response from Figma OAuth2 token endpoint
37
49
  * Response from POST https://api.figma.com/v1/oauth/token
@@ -41,8 +53,8 @@ export interface FigmaTokenResponse {
41
53
  access_token: string;
42
54
  /** Token expiration time in seconds */
43
55
  expires_in: number;
44
- /** OAuth2 refresh token */
45
- refresh_token: string;
56
+ /** OAuth2 refresh token; omitted when refreshing an existing grant */
57
+ refresh_token?: string;
46
58
  /** Space-separated list of granted scopes */
47
59
  scope?: string;
48
60
  /** Token type (typically "Bearer") */
@@ -177,6 +189,8 @@ export type FigmaUser = User;
177
189
  * Keyed by projectId:environmentName
178
190
  */
179
191
  export type BootstrapData = {
192
+ /** Regional Content API base URL. Absent in entries cached before bootstrap returned it. */
193
+ contentApiUrl?: string;
180
194
  contentSystemId: string;
181
195
  oauthClientId: string;
182
196
  oauthClientSecret: string;
package/dist/cli.d.ts CHANGED
@@ -1,3 +1,42 @@
1
+ export declare const cliArgSpec: {
2
+ readonly '--adapter': StringConstructor;
3
+ readonly '--all': BooleanConstructor;
4
+ readonly '--callback-url': StringConstructor;
5
+ readonly '--complete': StringConstructor;
6
+ readonly '--debug': BooleanConstructor;
7
+ readonly '--description': StringConstructor;
8
+ readonly '--dry-run': BooleanConstructor;
9
+ readonly '--env': StringConstructor;
10
+ readonly '--force': BooleanConstructor;
11
+ readonly '--global': BooleanConstructor;
12
+ readonly '--headless': BooleanConstructor;
13
+ readonly '--help': BooleanConstructor;
14
+ readonly '--id': StringConstructor;
15
+ readonly '--infra-env': StringConstructor;
16
+ readonly '--json': BooleanConstructor;
17
+ readonly '--name': StringConstructor;
18
+ readonly '--no-agent': BooleanConstructor;
19
+ readonly '--output': StringConstructor;
20
+ readonly '--payload-version': StringConstructor;
21
+ readonly '--project': BooleanConstructor;
22
+ readonly '--region': StringConstructor;
23
+ readonly '--skip-auth': BooleanConstructor;
24
+ readonly '--skip-build': BooleanConstructor;
25
+ readonly '--skip-size-check': BooleanConstructor;
26
+ readonly '--subdomain': StringConstructor;
27
+ readonly '--template': StringConstructor;
28
+ readonly '--version': BooleanConstructor;
29
+ readonly '--workspace': StringConstructor;
30
+ readonly '--yes': BooleanConstructor;
31
+ readonly '--environment': "--env";
32
+ readonly '-e': "--env";
33
+ readonly '-f': "--force";
34
+ readonly '-h': "--help";
35
+ readonly '-n': "--name";
36
+ readonly '-t': "--template";
37
+ readonly '-v': "--version";
38
+ readonly '-y': "--yes";
39
+ };
1
40
  /**
2
41
  * Entrypoint for bin/cli.js
3
42
  */