@payloadcms/figma 0.0.1-alpha.7 → 0.0.1-alpha.70

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 (390) hide show
  1. package/dist/api/control-plane.d.ts +56 -6
  2. package/dist/api/control-plane.js +181 -72
  3. package/dist/api/figma-api.d.ts +22 -1
  4. package/dist/api/figma-api.js +78 -25
  5. package/dist/auth/callback-server.d.ts +19 -7
  6. package/dist/auth/callback-server.js +72 -30
  7. package/dist/auth/credentials.d.ts +21 -0
  8. package/dist/auth/credentials.js +21 -0
  9. package/dist/auth/crypto-utils.d.ts +28 -0
  10. package/dist/auth/crypto-utils.js +132 -21
  11. package/dist/auth/jwt-validator.d.ts +2 -1
  12. package/dist/auth/jwt-validator.js +2 -2
  13. package/dist/auth/oauth-flow.d.ts +19 -3
  14. package/dist/auth/oauth-flow.js +77 -22
  15. package/dist/auth/project-token.d.ts +32 -16
  16. package/dist/auth/project-token.js +171 -65
  17. package/dist/auth/refresh.d.ts +2 -1
  18. package/dist/auth/refresh.js +25 -12
  19. package/dist/auth/token-store-migration.d.ts +58 -0
  20. package/dist/auth/token-store-migration.js +156 -0
  21. package/dist/auth/token-store.d.ts +63 -97
  22. package/dist/auth/token-store.js +405 -122
  23. package/dist/auth/types.d.ts +35 -4
  24. package/dist/cli.js +93 -6
  25. package/dist/commands/bootstrap.d.ts +18 -0
  26. package/dist/commands/bootstrap.js +90 -0
  27. package/dist/commands/build-lambda-zip.d.ts +5 -0
  28. package/dist/commands/build-lambda-zip.js +19 -0
  29. package/dist/commands/debug.d.ts +8 -0
  30. package/dist/commands/debug.js +180 -0
  31. package/dist/commands/deploy.d.ts +9 -0
  32. package/dist/commands/deploy.js +180 -151
  33. package/dist/commands/dump-tokens.d.ts +12 -0
  34. package/dist/commands/dump-tokens.js +69 -0
  35. package/dist/commands/env.d.ts +13 -0
  36. package/dist/commands/env.js +88 -0
  37. package/dist/commands/init.d.ts +9 -5
  38. package/dist/commands/init.js +241 -148
  39. package/dist/commands/list-tokens.d.ts +3 -3
  40. package/dist/commands/list-tokens.js +24 -9
  41. package/dist/commands/login.d.ts +8 -1
  42. package/dist/commands/login.js +34 -16
  43. package/dist/commands/logout.d.ts +5 -4
  44. package/dist/commands/logout.js +77 -15
  45. package/dist/commands/upgrade.d.ts +5 -0
  46. package/dist/commands/upgrade.js +331 -0
  47. package/dist/config/oauth.d.ts +17 -11
  48. package/dist/config/oauth.js +38 -37
  49. package/dist/constants.d.ts +63 -18
  50. package/dist/constants.js +158 -18
  51. package/dist/db-content-api/generated/content-api-types.d.ts +3978 -0
  52. package/dist/db-content-api/generated/content-api-types.js +7 -0
  53. package/dist/db-content-api/index.d.ts +37 -0
  54. package/dist/db-content-api/index.js +923 -0
  55. package/dist/db-content-api/temp-utilities/slug.d.ts +2 -0
  56. package/dist/db-content-api/temp-utilities/slug.js +3 -0
  57. package/dist/db-content-api/temp-utilities/sorting.d.ts +3 -0
  58. package/dist/db-content-api/temp-utilities/sorting.js +39 -0
  59. package/dist/db-content-api/temp-utilities/types.d.ts +22 -0
  60. package/dist/db-content-api/temp-utilities/types.js +15 -0
  61. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +39 -0
  62. package/dist/db-content-api/temp-utilities/unwrapDocument.js +64 -0
  63. package/dist/db-content-api/utilities/auth.d.ts +30 -0
  64. package/dist/db-content-api/utilities/auth.js +84 -0
  65. package/dist/db-content-api/utilities/data/applyDefaults.d.ts +7 -0
  66. package/dist/db-content-api/utilities/data/applyDefaults.js +75 -0
  67. package/dist/db-content-api/utilities/data/castFieldValue.d.ts +11 -0
  68. package/dist/db-content-api/utilities/data/castFieldValue.js +68 -0
  69. package/dist/db-content-api/utilities/data/index.d.ts +49 -0
  70. package/dist/db-content-api/utilities/data/index.js +301 -0
  71. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +12 -0
  72. package/dist/db-content-api/utilities/data/removeVirtualFields.js +54 -0
  73. package/dist/db-content-api/utilities/data/stripFields.d.ts +48 -0
  74. package/dist/db-content-api/utilities/data/stripFields.js +195 -0
  75. package/dist/db-content-api/utilities/data/transformPublishedLocale.d.ts +23 -0
  76. package/dist/db-content-api/utilities/data/transformPublishedLocale.js +42 -0
  77. package/dist/db-content-api/utilities/data/validateRelationships.d.ts +7 -0
  78. package/dist/db-content-api/utilities/data/validateRelationships.js +102 -0
  79. package/dist/db-content-api/utilities/joins.d.ts +53 -0
  80. package/dist/db-content-api/utilities/joins.js +139 -0
  81. package/dist/db-content-api/utilities/locale/index.d.ts +10 -0
  82. package/dist/db-content-api/utilities/locale/index.js +21 -0
  83. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts +11 -0
  84. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js +74 -0
  85. package/dist/db-content-api/utilities/meta/buildMeta.d.ts +42 -0
  86. package/dist/db-content-api/utilities/meta/buildMeta.js +41 -0
  87. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts +17 -0
  88. package/dist/db-content-api/utilities/meta/buildPathTypes.js +244 -0
  89. package/dist/db-content-api/utilities/meta/buildUniquePaths.d.ts +13 -0
  90. package/dist/db-content-api/utilities/meta/buildUniquePaths.js +62 -0
  91. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.d.ts +10 -0
  92. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.js +102 -0
  93. package/dist/db-content-api/utilities/where.d.ts +20 -0
  94. package/dist/db-content-api/utilities/where.js +108 -0
  95. package/dist/deploy/schedule-extract-plugin.d.ts +11 -0
  96. package/dist/deploy/schedule-extract-plugin.js +34 -0
  97. package/dist/endpoints/health.d.ts +3 -0
  98. package/dist/endpoints/health.js +11 -0
  99. package/dist/endpoints/schema.d.ts +3 -0
  100. package/dist/endpoints/schema.js +29 -0
  101. package/dist/exports/client.d.ts +3 -0
  102. package/dist/exports/client.js +3 -0
  103. package/dist/index.d.ts +2 -1
  104. package/dist/index.js +3 -1
  105. package/dist/lib/download-skill.d.ts +13 -0
  106. package/dist/lib/download-skill.js +79 -0
  107. package/dist/oauth/components/FigmaAvatar/index.d.ts +4 -0
  108. package/dist/oauth/components/FigmaAvatar/index.js +27 -0
  109. package/dist/oauth/components/FigmaAvatar/index.scss +12 -0
  110. package/dist/oauth/components/FigmaAvatarCell/index.d.ts +5 -0
  111. package/dist/oauth/components/FigmaAvatarCell/index.js +25 -0
  112. package/dist/oauth/components/FigmaAvatarCell/index.scss +5 -0
  113. package/dist/oauth/components/FigmaAvatarPlaceholder/index.d.ts +9 -0
  114. package/dist/oauth/components/FigmaAvatarPlaceholder/index.js +37 -0
  115. package/dist/oauth/components/FigmaAvatarPlaceholder/index.scss +28 -0
  116. package/dist/oauth/components/LoginButton/iframeAutoLogin.d.ts +82 -0
  117. package/dist/oauth/components/LoginButton/iframeAutoLogin.js +170 -0
  118. package/dist/oauth/components/LoginButton/index.js +144 -11
  119. package/dist/oauth/components/LoginButton/index.scss +75 -3
  120. package/dist/oauth/components/LogoutButton/index.js +19 -6
  121. package/dist/oauth/defaults.d.ts +3 -1
  122. package/dist/oauth/defaults.js +68 -10
  123. package/dist/oauth/endpoints/getLoginEndpoint.js +72 -77
  124. package/dist/oauth/endpoints/getLogoutEndpoint.js +7 -4
  125. package/dist/oauth/endpoints/getMetaEndpoint.js +18 -3
  126. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.js +11 -2
  127. package/dist/oauth/index.js +27 -5
  128. package/dist/oauth/strategy/index.d.ts +0 -2
  129. package/dist/oauth/strategy/index.js +40 -17
  130. package/dist/oauth/types.d.ts +23 -6
  131. package/dist/oauth/utilities/establishSession.d.ts +23 -0
  132. package/dist/oauth/utilities/establishSession.js +82 -0
  133. package/dist/oauth/utilities/exchangeCodeForAccessToken.d.ts +24 -0
  134. package/dist/oauth/utilities/exchangeCodeForAccessToken.js +28 -0
  135. package/dist/oauth/utilities/figmaHostnames.d.ts +3 -0
  136. package/dist/oauth/utilities/figmaHostnames.js +26 -0
  137. package/dist/oauth/utilities/getAuthorizeURL.d.ts +65 -1
  138. package/dist/oauth/utilities/getAuthorizeURL.js +57 -2
  139. package/dist/oauth/utilities/isAbsoluteURL.d.ts +2 -0
  140. package/dist/oauth/utilities/isAbsoluteURL.js +3 -0
  141. package/dist/oauth/utilities/isDuplicateKeyError.d.ts +7 -0
  142. package/dist/oauth/utilities/isDuplicateKeyError.js +14 -0
  143. package/dist/oauth/utilities/refreshTokens.js +6 -3
  144. package/dist/plugin/auth-preflight.d.ts +8 -0
  145. package/dist/plugin/auth-preflight.js +20 -0
  146. package/dist/plugin/bootstrap-preflight.d.ts +23 -0
  147. package/dist/plugin/bootstrap-preflight.js +45 -0
  148. package/dist/plugin/build-config.d.ts +27 -15
  149. package/dist/plugin/build-config.js +327 -17
  150. package/dist/plugin/dev-cookie-names.d.ts +14 -0
  151. package/dist/plugin/dev-cookie-names.js +19 -0
  152. package/dist/storage-content-api/api-types.d.ts +168 -0
  153. package/dist/storage-content-api/api-types.js +6 -0
  154. package/dist/storage-content-api/client-uploads/ClientUploadHandler.d.ts +9 -0
  155. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js +43 -0
  156. package/dist/storage-content-api/client-uploads/generateSignedURL.d.ts +13 -0
  157. package/dist/storage-content-api/client-uploads/generateSignedURL.js +39 -0
  158. package/dist/storage-content-api/client.d.ts +6 -0
  159. package/dist/storage-content-api/client.js +39 -0
  160. package/dist/storage-content-api/generateURL.d.ts +7 -0
  161. package/dist/storage-content-api/generateURL.js +8 -0
  162. package/dist/storage-content-api/handleDelete.d.ts +8 -0
  163. package/dist/storage-content-api/handleDelete.js +17 -0
  164. package/dist/storage-content-api/handleUpload.d.ts +11 -0
  165. package/dist/storage-content-api/handleUpload.js +144 -0
  166. package/dist/storage-content-api/index.d.ts +5 -0
  167. package/dist/storage-content-api/index.js +31 -0
  168. package/dist/storage-content-api/staticHandler.d.ts +10 -0
  169. package/dist/storage-content-api/staticHandler.js +63 -0
  170. package/dist/storage-content-api/types.d.ts +10 -0
  171. package/dist/storage-content-api/types.js +3 -0
  172. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +12 -0
  173. package/dist/storage-content-api/utilities/getSafeFilename.js +61 -0
  174. package/dist/storage-content-api/utilities/index.d.ts +3 -0
  175. package/dist/storage-content-api/utilities/index.js +4 -0
  176. package/dist/storage-content-api/utilities/parseClientUploadContext.d.ts +19 -0
  177. package/dist/storage-content-api/utilities/parseClientUploadContext.js +30 -0
  178. package/dist/templates/.env.example +5 -0
  179. package/dist/templates/README.md +19 -0
  180. package/dist/types/config.d.ts +2 -1
  181. package/dist/types/config.js +0 -2
  182. package/dist/types.d.ts +10 -1
  183. package/dist/utils/adapters/nextjs.d.ts +9 -0
  184. package/dist/utils/adapters/nextjs.js +64 -0
  185. package/dist/utils/adapters/nitro.d.ts +9 -0
  186. package/dist/utils/adapters/nitro.js +169 -0
  187. package/dist/utils/adapters/vite.d.ts +10 -0
  188. package/dist/utils/adapters/vite.js +33 -0
  189. package/dist/utils/asset-collection.d.ts +27 -6
  190. package/dist/utils/asset-collection.js +59 -30
  191. package/dist/utils/build-detection.d.ts +5 -11
  192. package/dist/utils/build-detection.js +74 -11
  193. package/dist/utils/build-lambda-zip.d.ts +16 -0
  194. package/dist/utils/build-lambda-zip.js +78 -0
  195. package/dist/utils/cache-bootstrap.d.ts +8 -0
  196. package/dist/utils/cache-bootstrap.js +18 -0
  197. package/dist/utils/config.js +1 -1
  198. package/dist/utils/deploy-adapter.d.ts +40 -0
  199. package/dist/utils/deploy-adapter.js +58 -0
  200. package/dist/utils/download-template.d.ts +9 -1
  201. package/dist/utils/download-template.js +24 -18
  202. package/dist/utils/env-management.d.ts +24 -7
  203. package/dist/utils/env-management.js +119 -64
  204. package/dist/utils/format-env-suffix.d.ts +12 -0
  205. package/dist/utils/format-env-suffix.js +13 -0
  206. package/dist/utils/formatter.js +23 -11
  207. package/dist/utils/fs-utils.d.ts +6 -0
  208. package/dist/utils/fs-utils.js +27 -0
  209. package/dist/utils/handle-upgrade.d.ts +9 -0
  210. package/dist/utils/handle-upgrade.js +41 -0
  211. package/dist/utils/lambda-config.d.ts +3 -1
  212. package/dist/utils/lambda-config.js +75 -78
  213. package/dist/utils/messages.d.ts +1 -2
  214. package/dist/utils/messages.js +39 -11
  215. package/dist/utils/package-manager.d.ts +24 -0
  216. package/dist/utils/package-manager.js +53 -0
  217. package/dist/utils/parse-template-spec.d.ts +12 -0
  218. package/dist/utils/parse-template-spec.js +62 -0
  219. package/dist/utils/payload-config-ast.d.ts +27 -6
  220. package/dist/utils/payload-config-ast.js +106 -58
  221. package/dist/utils/payload-config-finder.d.ts +2 -2
  222. package/dist/utils/payload-config-finder.js +48 -9
  223. package/dist/utils/payload-config-modifier.d.ts +1 -1
  224. package/dist/utils/payload-config-modifier.js +114 -66
  225. package/dist/utils/payload-package-check.d.ts +33 -2
  226. package/dist/utils/payload-package-check.js +129 -28
  227. package/dist/utils/project.d.ts +7 -2
  228. package/dist/utils/project.js +60 -32
  229. package/dist/utils/resolve-environment.d.ts +14 -0
  230. package/dist/utils/resolve-environment.js +31 -0
  231. package/dist/utils/s3-upload.d.ts +7 -2
  232. package/dist/utils/s3-upload.js +39 -6
  233. package/dist/utils/token-display.d.ts +5 -1
  234. package/dist/utils/token-display.js +49 -22
  235. package/dist/utils/typescript-validator.js +4 -6
  236. package/dist/utils/version-check.d.ts +3 -0
  237. package/dist/utils/version-check.js +38 -0
  238. package/package.json +44 -15
  239. package/dist/api/control-plane.d.ts.map +0 -1
  240. package/dist/api/control-plane.js.map +0 -1
  241. package/dist/api/figma-api.d.ts.map +0 -1
  242. package/dist/api/figma-api.js.map +0 -1
  243. package/dist/auth/browser.d.ts.map +0 -1
  244. package/dist/auth/browser.js.map +0 -1
  245. package/dist/auth/callback-server.d.ts.map +0 -1
  246. package/dist/auth/callback-server.js.map +0 -1
  247. package/dist/auth/crypto-utils.d.ts.map +0 -1
  248. package/dist/auth/crypto-utils.js.map +0 -1
  249. package/dist/auth/jwt-validator.d.ts.map +0 -1
  250. package/dist/auth/jwt-validator.js.map +0 -1
  251. package/dist/auth/oauth-flow.d.ts.map +0 -1
  252. package/dist/auth/oauth-flow.js.map +0 -1
  253. package/dist/auth/pkce.d.ts.map +0 -1
  254. package/dist/auth/pkce.js.map +0 -1
  255. package/dist/auth/project-token.d.ts.map +0 -1
  256. package/dist/auth/project-token.js.map +0 -1
  257. package/dist/auth/refresh.d.ts.map +0 -1
  258. package/dist/auth/refresh.js.map +0 -1
  259. package/dist/auth/token-store.d.ts.map +0 -1
  260. package/dist/auth/token-store.js.map +0 -1
  261. package/dist/auth/types.d.ts.map +0 -1
  262. package/dist/auth/types.js.map +0 -1
  263. package/dist/cli.d.ts.map +0 -1
  264. package/dist/cli.js.map +0 -1
  265. package/dist/commands/deploy.d.ts.map +0 -1
  266. package/dist/commands/deploy.js.map +0 -1
  267. package/dist/commands/init.d.ts.map +0 -1
  268. package/dist/commands/init.js.map +0 -1
  269. package/dist/commands/list-tokens.d.ts.map +0 -1
  270. package/dist/commands/list-tokens.js.map +0 -1
  271. package/dist/commands/login.d.ts.map +0 -1
  272. package/dist/commands/login.js.map +0 -1
  273. package/dist/commands/logout.d.ts.map +0 -1
  274. package/dist/commands/logout.js.map +0 -1
  275. package/dist/config/oauth.d.ts.map +0 -1
  276. package/dist/config/oauth.js.map +0 -1
  277. package/dist/constants.d.ts.map +0 -1
  278. package/dist/constants.js.map +0 -1
  279. package/dist/exports/client.d.ts.map +0 -1
  280. package/dist/exports/client.js.map +0 -1
  281. package/dist/index.d.ts.map +0 -1
  282. package/dist/index.js.map +0 -1
  283. package/dist/oauth/components/LoginButton/index.d.ts.map +0 -1
  284. package/dist/oauth/components/LoginButton/index.js.map +0 -1
  285. package/dist/oauth/components/LogoutButton/index.d.ts.map +0 -1
  286. package/dist/oauth/components/LogoutButton/index.js.map +0 -1
  287. package/dist/oauth/defaults.d.ts.map +0 -1
  288. package/dist/oauth/defaults.js.map +0 -1
  289. package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +0 -1
  290. package/dist/oauth/endpoints/getLoginEndpoint.js.map +0 -1
  291. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts.map +0 -1
  292. package/dist/oauth/endpoints/getLogoutEndpoint.js.map +0 -1
  293. package/dist/oauth/endpoints/getMetaEndpoint.d.ts.map +0 -1
  294. package/dist/oauth/endpoints/getMetaEndpoint.js.map +0 -1
  295. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.d.ts.map +0 -1
  296. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.js.map +0 -1
  297. package/dist/oauth/exports/client.d.ts.map +0 -1
  298. package/dist/oauth/exports/client.js.map +0 -1
  299. package/dist/oauth/hooks/afterLogout.d.ts.map +0 -1
  300. package/dist/oauth/hooks/afterLogout.js.map +0 -1
  301. package/dist/oauth/hooks/me.d.ts.map +0 -1
  302. package/dist/oauth/hooks/me.js.map +0 -1
  303. package/dist/oauth/hooks/refresh.d.ts.map +0 -1
  304. package/dist/oauth/hooks/refresh.js.map +0 -1
  305. package/dist/oauth/index.d.ts.map +0 -1
  306. package/dist/oauth/index.js.map +0 -1
  307. package/dist/oauth/strategy/index.d.ts.map +0 -1
  308. package/dist/oauth/strategy/index.js.map +0 -1
  309. package/dist/oauth/types.d.ts.map +0 -1
  310. package/dist/oauth/types.js.map +0 -1
  311. package/dist/oauth/utilities/clearCookie.d.ts.map +0 -1
  312. package/dist/oauth/utilities/clearCookie.js.map +0 -1
  313. package/dist/oauth/utilities/createCookieOptions.d.ts.map +0 -1
  314. package/dist/oauth/utilities/createCookieOptions.js.map +0 -1
  315. package/dist/oauth/utilities/createDebugLogger.d.ts.map +0 -1
  316. package/dist/oauth/utilities/createDebugLogger.js.map +0 -1
  317. package/dist/oauth/utilities/extractOrigin.d.ts.map +0 -1
  318. package/dist/oauth/utilities/extractOrigin.js.map +0 -1
  319. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts.map +0 -1
  320. package/dist/oauth/utilities/getAdminCollectionSlug.js.map +0 -1
  321. package/dist/oauth/utilities/getAdminPath.d.ts +0 -8
  322. package/dist/oauth/utilities/getAdminPath.d.ts.map +0 -1
  323. package/dist/oauth/utilities/getAdminPath.js +0 -9
  324. package/dist/oauth/utilities/getAdminPath.js.map +0 -1
  325. package/dist/oauth/utilities/getAuthorizeURL.d.ts.map +0 -1
  326. package/dist/oauth/utilities/getAuthorizeURL.js.map +0 -1
  327. package/dist/oauth/utilities/getCookieExpiration.d.ts.map +0 -1
  328. package/dist/oauth/utilities/getCookieExpiration.js.map +0 -1
  329. package/dist/oauth/utilities/getSecondsFromTokenExp.d.ts.map +0 -1
  330. package/dist/oauth/utilities/getSecondsFromTokenExp.js.map +0 -1
  331. package/dist/oauth/utilities/getTokenExp.d.ts.map +0 -1
  332. package/dist/oauth/utilities/getTokenExp.js.map +0 -1
  333. package/dist/oauth/utilities/getUsernameField.d.ts.map +0 -1
  334. package/dist/oauth/utilities/getUsernameField.js.map +0 -1
  335. package/dist/oauth/utilities/hasUserTokenPropsChanged.d.ts.map +0 -1
  336. package/dist/oauth/utilities/hasUserTokenPropsChanged.js.map +0 -1
  337. package/dist/oauth/utilities/mergeHeaders.d.ts.map +0 -1
  338. package/dist/oauth/utilities/mergeHeaders.js.map +0 -1
  339. package/dist/oauth/utilities/refreshTokens.d.ts.map +0 -1
  340. package/dist/oauth/utilities/refreshTokens.js.map +0 -1
  341. package/dist/plugin/adapter.d.ts.map +0 -1
  342. package/dist/plugin/adapter.js.map +0 -1
  343. package/dist/plugin/build-config.d.ts.map +0 -1
  344. package/dist/plugin/build-config.js.map +0 -1
  345. package/dist/types/config.d.ts.map +0 -1
  346. package/dist/types/config.js.map +0 -1
  347. package/dist/types.d.ts.map +0 -1
  348. package/dist/types.js.map +0 -1
  349. package/dist/utils/asset-collection.d.ts.map +0 -1
  350. package/dist/utils/asset-collection.js.map +0 -1
  351. package/dist/utils/build-detection.d.ts.map +0 -1
  352. package/dist/utils/build-detection.js.map +0 -1
  353. package/dist/utils/config.d.ts.map +0 -1
  354. package/dist/utils/config.js.map +0 -1
  355. package/dist/utils/download-template.d.ts.map +0 -1
  356. package/dist/utils/download-template.js.map +0 -1
  357. package/dist/utils/env-management.d.ts.map +0 -1
  358. package/dist/utils/env-management.js.map +0 -1
  359. package/dist/utils/format.d.ts.map +0 -1
  360. package/dist/utils/format.js.map +0 -1
  361. package/dist/utils/formatter.d.ts.map +0 -1
  362. package/dist/utils/formatter.js.map +0 -1
  363. package/dist/utils/git.d.ts.map +0 -1
  364. package/dist/utils/git.js.map +0 -1
  365. package/dist/utils/is-debug.d.ts.map +0 -1
  366. package/dist/utils/is-debug.js.map +0 -1
  367. package/dist/utils/lambda-config.d.ts.map +0 -1
  368. package/dist/utils/lambda-config.js.map +0 -1
  369. package/dist/utils/log.d.ts.map +0 -1
  370. package/dist/utils/log.js.map +0 -1
  371. package/dist/utils/messages.d.ts.map +0 -1
  372. package/dist/utils/messages.js.map +0 -1
  373. package/dist/utils/package-manager.d.ts.map +0 -1
  374. package/dist/utils/package-manager.js.map +0 -1
  375. package/dist/utils/payload-config-ast.d.ts.map +0 -1
  376. package/dist/utils/payload-config-ast.js.map +0 -1
  377. package/dist/utils/payload-config-finder.d.ts.map +0 -1
  378. package/dist/utils/payload-config-finder.js.map +0 -1
  379. package/dist/utils/payload-config-modifier.d.ts.map +0 -1
  380. package/dist/utils/payload-config-modifier.js.map +0 -1
  381. package/dist/utils/payload-package-check.d.ts.map +0 -1
  382. package/dist/utils/payload-package-check.js.map +0 -1
  383. package/dist/utils/project.d.ts.map +0 -1
  384. package/dist/utils/project.js.map +0 -1
  385. package/dist/utils/s3-upload.d.ts.map +0 -1
  386. package/dist/utils/s3-upload.js.map +0 -1
  387. package/dist/utils/token-display.d.ts.map +0 -1
  388. package/dist/utils/token-display.js.map +0 -1
  389. package/dist/utils/typescript-validator.d.ts.map +0 -1
  390. package/dist/utils/typescript-validator.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,12 +1,19 @@
1
1
  import * as p from '@clack/prompts';
2
2
  import arg from 'arg';
3
3
  import pc from 'picocolors';
4
+ import { bootstrapCommand } from './commands/bootstrap.js';
5
+ import { buildLambdaZipCommand } from './commands/build-lambda-zip.js';
6
+ import { debugCommand } from './commands/debug.js';
4
7
  import { deployCommand } from './commands/deploy.js';
8
+ import { dumpTokensCommand } from './commands/dump-tokens.js';
9
+ import { envCommand } from './commands/env.js';
5
10
  import { initCommand } from './commands/init.js';
6
11
  import { listTokensCommand } from './commands/list-tokens.js';
7
12
  import { loginCommand } from './commands/login.js';
8
13
  import { logoutCommand } from './commands/logout.js';
9
- import { feedbackOutro, helpMessage } from './utils/messages.js';
14
+ import { upgradeCommand } from './commands/upgrade.js';
15
+ import { setInfraEnvironment } from './constants.js';
16
+ import { helpMessage } from './utils/messages.js';
10
17
  /**
11
18
  * Entrypoint for bin/cli.js
12
19
  */ export async function main() {
@@ -24,16 +31,35 @@ class Main {
24
31
  constructor(){
25
32
  // @ts-expect-error bad typings
26
33
  this.args = arg({
34
+ // Hidden flag — intentionally not displayed in help output yet.
35
+ // Auto-detection covers most cases; this is an escape hatch for testing.
36
+ // May expose in help text once multi-framework support is public.
37
+ '--adapter': String,
38
+ '--all': Boolean,
27
39
  '--debug': Boolean,
40
+ '--dry-run': Boolean,
41
+ '--env': String,
28
42
  '--force': Boolean,
29
43
  '--help': Boolean,
30
44
  '--id': String,
45
+ '--infra-env': String,
46
+ '--json': Boolean,
31
47
  '--name': String,
48
+ '--no-skill': Boolean,
49
+ '--payload-version': String,
32
50
  '--skip-auth': Boolean,
51
+ '--skip-build': Boolean,
52
+ '--template': String,
53
+ '--version': Boolean,
33
54
  '--yes': Boolean,
34
55
  // Aliases
56
+ '--environment': '--env',
57
+ '-e': '--env',
35
58
  '-f': '--force',
36
59
  '-h': '--help',
60
+ '-n': '--name',
61
+ '-t': '--template',
62
+ '-v': '--version',
37
63
  '-y': '--yes'
38
64
  }, {
39
65
  permissive: true
@@ -42,6 +68,21 @@ class Main {
42
68
  if (this.args['--debug']) {
43
69
  process.env.DEBUG = 'true';
44
70
  }
71
+ // Handle --infra-env flag for infrastructure environment switching
72
+ if (this.args['--infra-env']) {
73
+ const infraEnvArg = this.args['--infra-env'].toLowerCase();
74
+ if (infraEnvArg === 'prod' || infraEnvArg === 'production') {
75
+ setInfraEnvironment('production');
76
+ } else if (infraEnvArg === 'staging') {
77
+ setInfraEnvironment('staging');
78
+ } else if (infraEnvArg === 'devbox') {
79
+ setInfraEnvironment('devbox');
80
+ } else {
81
+ // eslint-disable-next-line no-console
82
+ console.error(`Invalid --infra-env value: ${this.args['--infra-env']}. Use 'production', 'staging', or 'devbox'.`);
83
+ process.exit(1);
84
+ }
85
+ }
45
86
  }
46
87
  async init() {
47
88
  try {
@@ -49,30 +90,75 @@ class Main {
49
90
  helpMessage();
50
91
  process.exit(0);
51
92
  }
93
+ if (this.args['--version']) {
94
+ const { getOwnVersion } = await import('./utils/version-check.js');
95
+ const version = await getOwnVersion();
96
+ // eslint-disable-next-line no-console
97
+ console.log(version);
98
+ process.exit(0);
99
+ }
52
100
  // Get the subcommand (first non-flag argument)
53
101
  const subcommand = this.args._[0];
102
+ if (!subcommand) {
103
+ helpMessage();
104
+ process.exit(0);
105
+ }
106
+ // Debug command outputs plain text for copy-paste — skip styled intro
107
+ if (subcommand === 'debug') {
108
+ await debugCommand();
109
+ process.exit(0);
110
+ }
111
+ // dump-tokens outputs plain text
112
+ if (subcommand === 'dump-tokens') {
113
+ await dumpTokensCommand();
114
+ process.exit(0);
115
+ }
54
116
  // eslint-disable-next-line no-console
55
117
  console.log('\n');
56
118
  p.intro(pc.bgCyan(pc.black(' @payloadcms/figma ')));
57
119
  // Route to appropriate command handler
58
120
  switch(subcommand){
121
+ case 'bootstrap':
122
+ await bootstrapCommand({
123
+ id: this.args['--id'],
124
+ env: this.args['--env'],
125
+ json: this.args['--json']
126
+ });
127
+ break;
128
+ case 'build-lambda-zip':
129
+ await buildLambdaZipCommand();
130
+ break;
59
131
  case 'deploy':
60
132
  await deployCommand({
133
+ id: this.args['--id'],
134
+ adapter: this.args['--adapter'],
61
135
  debug: this.args['--debug'],
136
+ env: this.args['--env'],
137
+ skipBuild: this.args['--skip-build'],
62
138
  yes: this.args['--yes']
63
139
  });
64
140
  break;
141
+ case 'env':
142
+ await envCommand({
143
+ name: this.args._[1]
144
+ });
145
+ break;
65
146
  case 'init':
66
147
  await initCommand({
67
148
  id: this.args['--id'],
68
149
  name: this.args['--name'],
69
150
  debug: this.args['--debug'],
151
+ env: this.args['--env'],
70
152
  force: this.args['--force'],
71
- skipAuth: this.args['--skip-auth']
153
+ noSkill: this.args['--no-skill'],
154
+ payloadVersion: this.args['--payload-version'],
155
+ skipAuth: this.args['--skip-auth'],
156
+ template: this.args['--template']
72
157
  });
73
158
  break;
74
159
  case 'list-tokens':
75
160
  listTokensCommand({
161
+ all: this.args['--all'],
76
162
  debug: this.args['--debug']
77
163
  });
78
164
  break;
@@ -81,13 +167,14 @@ class Main {
81
167
  break;
82
168
  case 'logout':
83
169
  await logoutCommand({
170
+ all: this.args['--all'],
84
171
  debug: this.args['--debug']
85
172
  });
86
173
  break;
87
- case undefined:
88
- // No subcommand - show default message
89
- p.note("Let's create a new CMS!");
90
- p.outro(feedbackOutro());
174
+ case 'upgrade':
175
+ await upgradeCommand({
176
+ isDryRun: this.args['--dry-run']
177
+ });
91
178
  break;
92
179
  default:
93
180
  p.log.error(pc.red(`Unknown command: ${subcommand}`));
@@ -0,0 +1,18 @@
1
+ export type BootstrapCommandOptions = {
2
+ /** Filter to a single environment (e.g. "production", "staging"). */
3
+ env?: string;
4
+ /** CMS Resource ID (FIGMA_PROJECT_ID, e.g. cms_…). */
5
+ id?: string;
6
+ /** Emit plain JSON instead of a styled note (handy for piping into jq). */
7
+ json?: boolean;
8
+ };
9
+ /**
10
+ * Fetch and display bootstrap info for a CMS resource.
11
+ *
12
+ * Calls the Control Plane bootstrap endpoint with the current OAuth credential
13
+ * and prints the resulting environments (`contentSystemId`, `tenantInstanceId`)
14
+ * plus OAuth client credentials. Useful for grabbing a tenant ID without having
15
+ * to `init` a project.
16
+ */
17
+ export declare function bootstrapCommand(options?: BootstrapCommandOptions): Promise<void>;
18
+ //# sourceMappingURL=bootstrap.d.ts.map
@@ -0,0 +1,90 @@
1
+ import * as p from '@clack/prompts';
2
+ import pc from 'picocolors';
3
+ import { ControlPlaneError, getBootstrapInfo } from '../api/control-plane.js';
4
+ import { getValidCredential } from '../auth/oauth-flow.js';
5
+ import { getTokenStore } from '../auth/token-store.js';
6
+ import { getInfraEnvironment } from '../constants.js';
7
+ import { isDebug } from '../utils/is-debug.js';
8
+ import { maskToken } from '../utils/token-display.js';
9
+ /**
10
+ * Fetch and display bootstrap info for a CMS resource.
11
+ *
12
+ * Calls the Control Plane bootstrap endpoint with the current OAuth credential
13
+ * and prints the resulting environments (`contentSystemId`, `tenantInstanceId`)
14
+ * plus OAuth client credentials. Useful for grabbing a tenant ID without having
15
+ * to `init` a project.
16
+ */ export async function bootstrapCommand(options = {}) {
17
+ if (!options.id) {
18
+ p.log.error(pc.red('--id <project-id> is required'));
19
+ p.note('The CMS Resource ID (FIGMA_PROJECT_ID), e.g. cms_abc123', 'Tip');
20
+ process.exit(1);
21
+ }
22
+ const tokenStore = getTokenStore(getInfraEnvironment());
23
+ let credential;
24
+ try {
25
+ credential = await getValidCredential(tokenStore);
26
+ } catch (error) {
27
+ p.log.error(pc.red(`Failed to read stored credentials: ${error instanceof Error ? error.message : 'Unknown error'}`));
28
+ p.note(`Run ${pc.cyan(`@payloadcms/figma logout --infra-env ${getInfraEnvironment()} -y`)} ` + `then ${pc.cyan(`@payloadcms/figma login --infra-env ${getInfraEnvironment()}`)} and retry.`, 'Re-authenticate');
29
+ if (isDebug() && error instanceof Error) {
30
+ // eslint-disable-next-line no-console
31
+ console.error(error);
32
+ }
33
+ process.exit(1);
34
+ }
35
+ if (!credential) {
36
+ p.log.error(pc.red('Not authenticated.'));
37
+ p.note(`Run ${pc.cyan('@payloadcms/figma login')} first`, 'Tip');
38
+ process.exit(1);
39
+ }
40
+ let info;
41
+ try {
42
+ info = await getBootstrapInfo(credential, options.id, options.env);
43
+ } catch (error) {
44
+ if (error instanceof ControlPlaneError) {
45
+ p.log.error(pc.red(`Bootstrap fetch failed: ${error.statusCode} ${error.message}`));
46
+ if (error.statusCode === 401) {
47
+ p.note(`Stored credentials for infra env ${pc.bold(getInfraEnvironment())} were rejected.\n` + `Run ${pc.cyan(`@payloadcms/figma logout --infra-env ${getInfraEnvironment()} -y`)} ` + `then ${pc.cyan(`@payloadcms/figma login --infra-env ${getInfraEnvironment()}`)} and retry.`, 'Re-authenticate');
48
+ } else if (error.statusCode === 404) {
49
+ p.note(`Resource ${pc.bold(options.id)} was not found in infra env ${pc.bold(getInfraEnvironment())}.\n` + `Try ${pc.cyan('--infra-env staging')} (or production) to target a different infra.`, 'Wrong infra environment?');
50
+ }
51
+ } else if (error instanceof Error) {
52
+ const causeMessage = error.cause instanceof Error ? `: ${error.cause.message}` : '';
53
+ p.log.error(pc.red(`${error.name}: ${error.message}${causeMessage}`));
54
+ if (isDebug()) {
55
+ // eslint-disable-next-line no-console
56
+ console.error(error);
57
+ }
58
+ } else {
59
+ p.log.error(pc.red('Unknown error'));
60
+ }
61
+ process.exit(1);
62
+ }
63
+ if (options.json) {
64
+ const showSecretsInJson = isDebug();
65
+ const payload = showSecretsInJson ? info : {
66
+ ...info,
67
+ oauthCredentials: {
68
+ ...info.oauthCredentials,
69
+ oauthClientSecret: maskToken(info.oauthCredentials.oauthClientSecret)
70
+ }
71
+ };
72
+ // eslint-disable-next-line no-console
73
+ console.log(JSON.stringify(payload, null, 2));
74
+ return;
75
+ }
76
+ const showSecret = isDebug();
77
+ const lines = [
78
+ `Project ID: ${options.id}`,
79
+ `OAuth Client ID: ${info.oauthCredentials.oauthClientId}`,
80
+ `OAuth Client Secret: ${showSecret ? info.oauthCredentials.oauthClientSecret : maskToken(info.oauthCredentials.oauthClientSecret)}`,
81
+ '',
82
+ 'Environments:'
83
+ ];
84
+ for (const env of info.environments){
85
+ lines.push(` ${pc.bold(env.name)}`, ` Tenant ID (contentSystemId): ${env.contentSystemId}`, ` Tenant Instance ID: ${env.tenantInstanceId}`);
86
+ }
87
+ p.note(lines.join('\n'), 'Bootstrap Info');
88
+ }
89
+
90
+ //# sourceMappingURL=bootstrap.js.map
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Build Lambda deployment zip from current directory
3
+ */
4
+ export declare function buildLambdaZipCommand(): Promise<void>;
5
+ //# sourceMappingURL=build-lambda-zip.d.ts.map
@@ -0,0 +1,19 @@
1
+ import * as p from '@clack/prompts';
2
+ import pc from 'picocolors';
3
+ import { buildLambdaZip } from '../utils/build-lambda-zip.js';
4
+ /**
5
+ * Build Lambda deployment zip from current directory
6
+ */ export async function buildLambdaZipCommand() {
7
+ const projectPath = process.cwd();
8
+ const s = p.spinner();
9
+ s.start('Creating lambda.zip');
10
+ try {
11
+ await buildLambdaZip(projectPath);
12
+ s.stop(pc.green('✓ Created lambda.zip'));
13
+ } catch (error) {
14
+ s.stop(pc.red('✗ Failed to create lambda.zip'));
15
+ throw error;
16
+ }
17
+ }
18
+
19
+ //# sourceMappingURL=build-lambda-zip.js.map
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Handle the `@payloadcms/figma debug` command
3
+ *
4
+ * Outputs environment, auth, project, and package info for debugging.
5
+ * All data is local — no network calls are made.
6
+ */
7
+ export declare function debugCommand(): Promise<void>;
8
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1,180 @@
1
+ import fsSync from 'node:fs';
2
+ import { createRequire } from 'node:module';
3
+ import os from 'node:os';
4
+ import path from 'node:path';
5
+ import { getEncryptionKeyHash } from '../auth/crypto-utils.js';
6
+ import { getTokenStore } from '../auth/token-store.js';
7
+ import { getInfraEnvironment } from '../constants.js';
8
+ import { getEnvVarSync } from '../utils/env-management.js';
9
+ import { maskToken } from '../utils/token-display.js';
10
+ import { getOwnVersion } from '../utils/version-check.js';
11
+ /**
12
+ * Handle the `@payloadcms/figma debug` command
13
+ *
14
+ * Outputs environment, auth, project, and package info for debugging.
15
+ * All data is local — no network calls are made.
16
+ */ export async function debugCommand() {
17
+ const env = getInfraEnvironment();
18
+ const tokenStore = getTokenStore(env);
19
+ const cwd = process.cwd();
20
+ const lines = [
21
+ 'Debug Info:',
22
+ ''
23
+ ];
24
+ appendSystemSection(lines, env);
25
+ appendAuthSection(lines, tokenStore, cwd);
26
+ appendTokenStoreDiagnostics(lines, tokenStore);
27
+ appendProjectSection(lines, tokenStore, cwd);
28
+ await appendPackagesSection(lines);
29
+ // eslint-disable-next-line no-console
30
+ console.log(lines.join('\n'));
31
+ }
32
+ function appendSystemSection(lines, env) {
33
+ lines.push(`Infra Environment: ${env}`);
34
+ lines.push(`Node: ${process.version}`);
35
+ lines.push(`OS: ${os.platform()} ${os.arch()}`);
36
+ lines.push('');
37
+ }
38
+ function appendAuthSection(lines, tokenStore, cwd) {
39
+ const tokens = tokenStore.getOauthInfo();
40
+ lines.push('Auth:');
41
+ if (!tokens) {
42
+ lines.push(' Status: Not authenticated');
43
+ lines.push('');
44
+ return;
45
+ }
46
+ const isValid = tokenStore.hasValidOauthToken();
47
+ lines.push(` Status: ${isValid ? 'Authenticated' : 'Token expired'}`);
48
+ const email = getEmailFromClaims(tokenStore, cwd);
49
+ if (email) {
50
+ lines.push(` Email: ${email}`);
51
+ } else if (tokens.userId) {
52
+ lines.push(` User ID: ${tokens.userId}`);
53
+ }
54
+ lines.push(` Token Expires: ${formatExpiryTime(tokens.expiresAt)}`);
55
+ lines.push('');
56
+ }
57
+ function appendTokenStoreDiagnostics(lines, tokenStore) {
58
+ lines.push('Token Store:');
59
+ const filePath = tokenStore.getStoragePath();
60
+ const fileExists = fsSync.existsSync(filePath);
61
+ const fileSize = fileExists ? fsSync.statSync(filePath).size : 0;
62
+ lines.push(` File: ${filePath}`);
63
+ lines.push(` File Exists: ${fileExists}`);
64
+ lines.push(` File Size: ${fileSize}B`);
65
+ const canRead = tokenStore.getOauthInfo() !== null || tokenStore.getCurrentRefreshToken() !== null;
66
+ lines.push(` Decryption: ${fileExists ? canRead || fileSize === 0 ? 'OK' : 'FAILED' : 'N/A'}`);
67
+ lines.push(` Key Hash: ${getEncryptionKeyHash()}`);
68
+ lines.push('');
69
+ }
70
+ function appendProjectSection(lines, tokenStore, cwd) {
71
+ const projectId = getEnvVarSync(cwd, 'FIGMA_PROJECT_ID');
72
+ const environmentName = getEnvVarSync(cwd, 'FIGMA_ENVIRONMENT_NAME');
73
+ lines.push('Project:');
74
+ if (!projectId) {
75
+ lines.push(" Not initialized (run 'init' first)");
76
+ lines.push('');
77
+ return;
78
+ }
79
+ lines.push(` Project ID: ${projectId}`);
80
+ lines.push(` Environment: ${environmentName ?? '(not set)'}`);
81
+ // Show bootstrap data from local store
82
+ if (projectId && environmentName) {
83
+ const bootstrapData = tokenStore.getBootstrapData(projectId, environmentName);
84
+ if (bootstrapData) {
85
+ lines.push(` Content System ID: ${bootstrapData.contentSystemId}`);
86
+ lines.push(` Tenant Instance ID: ${bootstrapData.tenantInstanceId}`);
87
+ lines.push(` OAuth Client ID: ${maskToken(bootstrapData.oauthClientId)}`);
88
+ const projectToken = tokenStore.getProjectToken({
89
+ projectInfo: {
90
+ environmentName,
91
+ projectId
92
+ }
93
+ });
94
+ if (projectToken) {
95
+ lines.push(` Project Token: ${formatExpiryTime(projectToken.expiresAt)}`);
96
+ }
97
+ } else {
98
+ lines.push(' Bootstrap Data: (not cached)');
99
+ }
100
+ }
101
+ lines.push('');
102
+ }
103
+ async function appendPackagesSection(lines) {
104
+ lines.push('Packages:');
105
+ const cliVersion = await getOwnVersion();
106
+ lines.push(` @payloadcms/figma: ${cliVersion}`);
107
+ const payloadVersion = getPayloadVersion();
108
+ lines.push(` payload: ${payloadVersion}`);
109
+ }
110
+ /**
111
+ * Resolve email from the current project + environment scoped token when available.
112
+ */ function getEmailFromClaims(tokenStore, cwd) {
113
+ const projectId = getEnvVarSync(cwd, 'FIGMA_PROJECT_ID');
114
+ const environmentName = getEnvVarSync(cwd, 'FIGMA_ENVIRONMENT_NAME');
115
+ if (projectId && environmentName) {
116
+ const bootstrapData = tokenStore.getBootstrapData(projectId, environmentName);
117
+ if (bootstrapData) {
118
+ const email = tokenStore.getProjectToken({
119
+ projectInfo: {
120
+ environmentName,
121
+ projectId
122
+ }
123
+ })?.claims?.email;
124
+ if (email) {
125
+ return email;
126
+ }
127
+ }
128
+ }
129
+ return null;
130
+ }
131
+ function getPayloadVersion() {
132
+ try {
133
+ const require = createRequire(path.join(process.cwd(), 'noop.js'));
134
+ const resolved = require.resolve('payload');
135
+ const packageJsonPath = findPackageJson(path.dirname(resolved));
136
+ if (!packageJsonPath) {
137
+ return 'not found';
138
+ }
139
+ const content = fsSync.readFileSync(packageJsonPath, 'utf-8');
140
+ return JSON.parse(content).version;
141
+ } catch {
142
+ return 'not found';
143
+ }
144
+ }
145
+ function findPackageJson(dir) {
146
+ const { root } = path.parse(dir);
147
+ while(dir !== root){
148
+ const candidate = path.join(dir, 'package.json');
149
+ if (fsSync.existsSync(candidate)) {
150
+ return candidate;
151
+ }
152
+ dir = path.dirname(dir);
153
+ }
154
+ return null;
155
+ }
156
+ /**
157
+ * Format expiry timestamp as ISO string with relative time
158
+ * e.g. "2026-02-11T10:30:00.000Z (in 23h 15m)" or "2026-02-10T08:00:00.000Z (expired 2h ago)"
159
+ */ function formatExpiryTime(expiresAt) {
160
+ const iso = new Date(expiresAt).toISOString();
161
+ const diff = expiresAt - Date.now();
162
+ if (diff < 0) {
163
+ return `${iso} (expired ${formatDuration(Math.abs(diff))} ago)`;
164
+ }
165
+ return `${iso} (in ${formatDuration(diff)})`;
166
+ }
167
+ function formatDuration(ms) {
168
+ const minutes = Math.floor(ms / 60000);
169
+ const hours = Math.floor(minutes / 60);
170
+ const days = Math.floor(hours / 24);
171
+ if (days > 0) {
172
+ return `${days}d ${hours % 24}h`;
173
+ }
174
+ if (hours > 0) {
175
+ return `${hours}h ${minutes % 60}m`;
176
+ }
177
+ return `${minutes}m`;
178
+ }
179
+
180
+ //# sourceMappingURL=debug.js.map
@@ -1,9 +1,18 @@
1
+ import type { AdapterName } from '../utils/deploy-adapter.js';
1
2
  /**
2
3
  * Options for deploy command
3
4
  */
4
5
  export interface DeployCommandOptions {
6
+ /** Framework adapter (nextjs, nitro, vite). Auto-detected if omitted. */
7
+ adapter?: AdapterName;
5
8
  /** Enable debug mode */
6
9
  debug?: boolean;
10
+ /** Figma environment name (e.g. 'production', 'staging') */
11
+ env?: string;
12
+ /** CMS Resource ID (overrides FIGMA_PROJECT_ID) */
13
+ id?: string;
14
+ /** Skip the build step (use existing build) */
15
+ skipBuild?: boolean;
7
16
  /** Skip confirmation prompts */
8
17
  yes?: boolean;
9
18
  }