@payloadcms/figma 0.0.1-alpha.6 → 0.0.1-alpha.61

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 (352) hide show
  1. package/dist/api/control-plane.d.ts +52 -6
  2. package/dist/api/control-plane.js +174 -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.js +2 -1
  6. package/dist/auth/credentials.d.ts +21 -0
  7. package/dist/auth/credentials.js +21 -0
  8. package/dist/auth/crypto-utils.d.ts +6 -0
  9. package/dist/auth/crypto-utils.js +16 -14
  10. package/dist/auth/jwt-validator.d.ts +2 -1
  11. package/dist/auth/jwt-validator.js +2 -2
  12. package/dist/auth/oauth-flow.d.ts +17 -3
  13. package/dist/auth/oauth-flow.js +63 -16
  14. package/dist/auth/project-token.js +16 -11
  15. package/dist/auth/refresh.d.ts +2 -1
  16. package/dist/auth/refresh.js +25 -12
  17. package/dist/auth/token-store.d.ts +42 -1
  18. package/dist/auth/token-store.js +118 -14
  19. package/dist/auth/types.d.ts +17 -4
  20. package/dist/cli.js +68 -5
  21. package/dist/commands/build-lambda-zip.d.ts +5 -0
  22. package/dist/commands/build-lambda-zip.js +19 -0
  23. package/dist/commands/debug.d.ts +8 -0
  24. package/dist/commands/debug.js +176 -0
  25. package/dist/commands/deploy.d.ts +9 -0
  26. package/dist/commands/deploy.js +178 -151
  27. package/dist/commands/env.d.ts +13 -0
  28. package/dist/commands/env.js +88 -0
  29. package/dist/commands/init.d.ts +3 -5
  30. package/dist/commands/init.js +165 -148
  31. package/dist/commands/list-tokens.d.ts +3 -3
  32. package/dist/commands/list-tokens.js +22 -7
  33. package/dist/commands/login.d.ts +8 -1
  34. package/dist/commands/login.js +33 -15
  35. package/dist/commands/logout.d.ts +5 -4
  36. package/dist/commands/logout.js +56 -13
  37. package/dist/commands/upgrade.d.ts +5 -0
  38. package/dist/commands/upgrade.js +331 -0
  39. package/dist/config/oauth.d.ts +4 -14
  40. package/dist/config/oauth.js +18 -40
  41. package/dist/constants.d.ts +44 -19
  42. package/dist/constants.js +73 -20
  43. package/dist/db-content-api/README.md +98 -0
  44. package/dist/db-content-api/generated/content-api-types.d.ts +3972 -0
  45. package/dist/db-content-api/generated/content-api-types.js +7 -0
  46. package/dist/db-content-api/index.d.ts +21 -0
  47. package/dist/db-content-api/index.js +914 -0
  48. package/dist/db-content-api/temp-utilities/slug.d.ts +2 -0
  49. package/dist/db-content-api/temp-utilities/slug.js +3 -0
  50. package/dist/db-content-api/temp-utilities/sorting.d.ts +3 -0
  51. package/dist/db-content-api/temp-utilities/sorting.js +39 -0
  52. package/dist/db-content-api/temp-utilities/types.d.ts +22 -0
  53. package/dist/db-content-api/temp-utilities/types.js +15 -0
  54. package/dist/db-content-api/temp-utilities/unwrapDocument.d.ts +39 -0
  55. package/dist/db-content-api/temp-utilities/unwrapDocument.js +59 -0
  56. package/dist/db-content-api/utilities/auth.d.ts +30 -0
  57. package/dist/db-content-api/utilities/auth.js +81 -0
  58. package/dist/db-content-api/utilities/data/applyDefaults.d.ts +7 -0
  59. package/dist/db-content-api/utilities/data/applyDefaults.js +75 -0
  60. package/dist/db-content-api/utilities/data/castFieldValue.d.ts +11 -0
  61. package/dist/db-content-api/utilities/data/castFieldValue.js +68 -0
  62. package/dist/db-content-api/utilities/data/index.d.ts +49 -0
  63. package/dist/db-content-api/utilities/data/index.js +301 -0
  64. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +12 -0
  65. package/dist/db-content-api/utilities/data/removeVirtualFields.js +54 -0
  66. package/dist/db-content-api/utilities/data/stripFields.d.ts +48 -0
  67. package/dist/db-content-api/utilities/data/stripFields.js +195 -0
  68. package/dist/db-content-api/utilities/data/transformPublishedLocale.d.ts +23 -0
  69. package/dist/db-content-api/utilities/data/transformPublishedLocale.js +42 -0
  70. package/dist/db-content-api/utilities/joins.d.ts +53 -0
  71. package/dist/db-content-api/utilities/joins.js +139 -0
  72. package/dist/db-content-api/utilities/locale/index.d.ts +10 -0
  73. package/dist/db-content-api/utilities/locale/index.js +21 -0
  74. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.d.ts +11 -0
  75. package/dist/db-content-api/utilities/meta/buildLocalizedPaths.js +74 -0
  76. package/dist/db-content-api/utilities/meta/buildMeta.d.ts +42 -0
  77. package/dist/db-content-api/utilities/meta/buildMeta.js +41 -0
  78. package/dist/db-content-api/utilities/meta/buildPathTypes.d.ts +17 -0
  79. package/dist/db-content-api/utilities/meta/buildPathTypes.js +244 -0
  80. package/dist/db-content-api/utilities/meta/buildUniquePaths.d.ts +13 -0
  81. package/dist/db-content-api/utilities/meta/buildUniquePaths.js +62 -0
  82. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.d.ts +10 -0
  83. package/dist/db-content-api/utilities/meta/normalizeLocaleInWhere.js +102 -0
  84. package/dist/db-content-api/utilities/where.d.ts +20 -0
  85. package/dist/db-content-api/utilities/where.js +108 -0
  86. package/dist/deploy/schedule-extract-plugin.d.ts +11 -0
  87. package/dist/deploy/schedule-extract-plugin.js +34 -0
  88. package/dist/endpoints/health.d.ts +3 -0
  89. package/dist/endpoints/health.js +11 -0
  90. package/dist/endpoints/schema.d.ts +3 -0
  91. package/dist/endpoints/schema.js +29 -0
  92. package/dist/exports/client.d.ts +3 -0
  93. package/dist/exports/client.js +3 -0
  94. package/dist/index.d.ts +2 -1
  95. package/dist/index.js +3 -1
  96. package/dist/oauth/components/FigmaAvatar/index.d.ts +4 -0
  97. package/dist/oauth/components/FigmaAvatar/index.js +27 -0
  98. package/dist/oauth/components/FigmaAvatar/index.scss +12 -0
  99. package/dist/oauth/components/FigmaAvatarCell/index.d.ts +5 -0
  100. package/dist/oauth/components/FigmaAvatarCell/index.js +25 -0
  101. package/dist/oauth/components/FigmaAvatarCell/index.scss +5 -0
  102. package/dist/oauth/components/FigmaAvatarPlaceholder/index.d.ts +9 -0
  103. package/dist/oauth/components/FigmaAvatarPlaceholder/index.js +37 -0
  104. package/dist/oauth/components/FigmaAvatarPlaceholder/index.scss +28 -0
  105. package/dist/oauth/components/LoginButton/index.js +50 -6
  106. package/dist/oauth/components/LoginButton/index.scss +50 -3
  107. package/dist/oauth/components/LogoutButton/index.js +5 -4
  108. package/dist/oauth/defaults.js +67 -10
  109. package/dist/oauth/endpoints/getLoginEndpoint.js +77 -24
  110. package/dist/oauth/endpoints/getLogoutEndpoint.js +7 -4
  111. package/dist/oauth/index.js +40 -13
  112. package/dist/oauth/strategy/index.d.ts +0 -2
  113. package/dist/oauth/strategy/index.js +40 -17
  114. package/dist/oauth/types.d.ts +6 -6
  115. package/dist/oauth/utilities/isDuplicateKeyError.d.ts +7 -0
  116. package/dist/oauth/utilities/isDuplicateKeyError.js +14 -0
  117. package/dist/oauth/utilities/refreshTokens.js +6 -3
  118. package/dist/plugin/build-config.d.ts +18 -15
  119. package/dist/plugin/build-config.js +213 -18
  120. package/dist/storage-content-api/api-types.d.ts +168 -0
  121. package/dist/storage-content-api/api-types.js +6 -0
  122. package/dist/storage-content-api/client-uploads/ClientUploadHandler.d.ts +9 -0
  123. package/dist/storage-content-api/client-uploads/ClientUploadHandler.js +42 -0
  124. package/dist/storage-content-api/client-uploads/generateSignedURL.d.ts +13 -0
  125. package/dist/storage-content-api/client-uploads/generateSignedURL.js +39 -0
  126. package/dist/storage-content-api/client.d.ts +6 -0
  127. package/dist/storage-content-api/client.js +36 -0
  128. package/dist/storage-content-api/generateURL.d.ts +7 -0
  129. package/dist/storage-content-api/generateURL.js +8 -0
  130. package/dist/storage-content-api/handleDelete.d.ts +8 -0
  131. package/dist/storage-content-api/handleDelete.js +17 -0
  132. package/dist/storage-content-api/handleUpload.d.ts +11 -0
  133. package/dist/storage-content-api/handleUpload.js +144 -0
  134. package/dist/storage-content-api/index.d.ts +5 -0
  135. package/dist/storage-content-api/index.js +31 -0
  136. package/dist/storage-content-api/staticHandler.d.ts +10 -0
  137. package/dist/storage-content-api/staticHandler.js +56 -0
  138. package/dist/storage-content-api/types.d.ts +10 -0
  139. package/dist/storage-content-api/types.js +3 -0
  140. package/dist/storage-content-api/utilities/getSafeFilename.d.ts +12 -0
  141. package/dist/storage-content-api/utilities/getSafeFilename.js +61 -0
  142. package/dist/storage-content-api/utilities/index.d.ts +2 -0
  143. package/dist/storage-content-api/utilities/index.js +3 -0
  144. package/dist/templates/.env.example +5 -0
  145. package/dist/templates/README.md +19 -0
  146. package/dist/types/config.d.ts +2 -1
  147. package/dist/types/config.js +0 -2
  148. package/dist/types.d.ts +8 -1
  149. package/dist/utils/adapters/nextjs.d.ts +9 -0
  150. package/dist/utils/adapters/nextjs.js +64 -0
  151. package/dist/utils/adapters/nitro.d.ts +9 -0
  152. package/dist/utils/adapters/nitro.js +169 -0
  153. package/dist/utils/adapters/vite.d.ts +10 -0
  154. package/dist/utils/adapters/vite.js +33 -0
  155. package/dist/utils/asset-collection.d.ts +27 -6
  156. package/dist/utils/asset-collection.js +59 -30
  157. package/dist/utils/build-detection.d.ts +5 -11
  158. package/dist/utils/build-detection.js +74 -11
  159. package/dist/utils/build-lambda-zip.d.ts +14 -0
  160. package/dist/utils/build-lambda-zip.js +81 -0
  161. package/dist/utils/cache-bootstrap.d.ts +8 -0
  162. package/dist/utils/cache-bootstrap.js +18 -0
  163. package/dist/utils/config.js +1 -1
  164. package/dist/utils/deploy-adapter.d.ts +40 -0
  165. package/dist/utils/deploy-adapter.js +58 -0
  166. package/dist/utils/download-template.js +3 -2
  167. package/dist/utils/env-management.d.ts +24 -7
  168. package/dist/utils/env-management.js +119 -64
  169. package/dist/utils/format-env-suffix.d.ts +12 -0
  170. package/dist/utils/format-env-suffix.js +13 -0
  171. package/dist/utils/formatter.js +23 -11
  172. package/dist/utils/fs-utils.d.ts +6 -0
  173. package/dist/utils/fs-utils.js +27 -0
  174. package/dist/utils/handle-upgrade.d.ts +9 -0
  175. package/dist/utils/handle-upgrade.js +41 -0
  176. package/dist/utils/lambda-config.d.ts +3 -1
  177. package/dist/utils/lambda-config.js +75 -78
  178. package/dist/utils/messages.d.ts +1 -2
  179. package/dist/utils/messages.js +29 -11
  180. package/dist/utils/package-manager.d.ts +24 -0
  181. package/dist/utils/package-manager.js +53 -0
  182. package/dist/utils/payload-config-ast.d.ts +27 -6
  183. package/dist/utils/payload-config-ast.js +106 -58
  184. package/dist/utils/payload-config-finder.d.ts +2 -2
  185. package/dist/utils/payload-config-finder.js +48 -9
  186. package/dist/utils/payload-config-modifier.d.ts +1 -1
  187. package/dist/utils/payload-config-modifier.js +70 -11
  188. package/dist/utils/payload-package-check.d.ts +12 -1
  189. package/dist/utils/payload-package-check.js +63 -5
  190. package/dist/utils/project.d.ts +3 -2
  191. package/dist/utils/project.js +29 -15
  192. package/dist/utils/resolve-environment.d.ts +14 -0
  193. package/dist/utils/resolve-environment.js +31 -0
  194. package/dist/utils/s3-upload.d.ts +7 -2
  195. package/dist/utils/s3-upload.js +39 -6
  196. package/dist/utils/token-display.js +11 -5
  197. package/dist/utils/typescript-validator.js +4 -6
  198. package/dist/utils/version-check.d.ts +3 -0
  199. package/dist/utils/version-check.js +38 -0
  200. package/package.json +33 -15
  201. package/dist/api/control-plane.d.ts.map +0 -1
  202. package/dist/api/control-plane.js.map +0 -1
  203. package/dist/api/figma-api.d.ts.map +0 -1
  204. package/dist/api/figma-api.js.map +0 -1
  205. package/dist/auth/browser.d.ts.map +0 -1
  206. package/dist/auth/browser.js.map +0 -1
  207. package/dist/auth/callback-server.d.ts.map +0 -1
  208. package/dist/auth/callback-server.js.map +0 -1
  209. package/dist/auth/crypto-utils.d.ts.map +0 -1
  210. package/dist/auth/crypto-utils.js.map +0 -1
  211. package/dist/auth/jwt-validator.d.ts.map +0 -1
  212. package/dist/auth/jwt-validator.js.map +0 -1
  213. package/dist/auth/oauth-flow.d.ts.map +0 -1
  214. package/dist/auth/oauth-flow.js.map +0 -1
  215. package/dist/auth/pkce.d.ts.map +0 -1
  216. package/dist/auth/pkce.js.map +0 -1
  217. package/dist/auth/project-token.d.ts.map +0 -1
  218. package/dist/auth/project-token.js.map +0 -1
  219. package/dist/auth/refresh.d.ts.map +0 -1
  220. package/dist/auth/refresh.js.map +0 -1
  221. package/dist/auth/token-store.d.ts.map +0 -1
  222. package/dist/auth/token-store.js.map +0 -1
  223. package/dist/auth/types.d.ts.map +0 -1
  224. package/dist/auth/types.js.map +0 -1
  225. package/dist/cli.d.ts.map +0 -1
  226. package/dist/cli.js.map +0 -1
  227. package/dist/commands/deploy.d.ts.map +0 -1
  228. package/dist/commands/deploy.js.map +0 -1
  229. package/dist/commands/init.d.ts.map +0 -1
  230. package/dist/commands/init.js.map +0 -1
  231. package/dist/commands/list-tokens.d.ts.map +0 -1
  232. package/dist/commands/list-tokens.js.map +0 -1
  233. package/dist/commands/login.d.ts.map +0 -1
  234. package/dist/commands/login.js.map +0 -1
  235. package/dist/commands/logout.d.ts.map +0 -1
  236. package/dist/commands/logout.js.map +0 -1
  237. package/dist/config/oauth.d.ts.map +0 -1
  238. package/dist/config/oauth.js.map +0 -1
  239. package/dist/constants.d.ts.map +0 -1
  240. package/dist/constants.js.map +0 -1
  241. package/dist/exports/client.d.ts.map +0 -1
  242. package/dist/exports/client.js.map +0 -1
  243. package/dist/index.d.ts.map +0 -1
  244. package/dist/index.js.map +0 -1
  245. package/dist/oauth/components/LoginButton/index.d.ts.map +0 -1
  246. package/dist/oauth/components/LoginButton/index.js.map +0 -1
  247. package/dist/oauth/components/LogoutButton/index.d.ts.map +0 -1
  248. package/dist/oauth/components/LogoutButton/index.js.map +0 -1
  249. package/dist/oauth/defaults.d.ts.map +0 -1
  250. package/dist/oauth/defaults.js.map +0 -1
  251. package/dist/oauth/endpoints/getLoginEndpoint.d.ts.map +0 -1
  252. package/dist/oauth/endpoints/getLoginEndpoint.js.map +0 -1
  253. package/dist/oauth/endpoints/getLogoutEndpoint.d.ts.map +0 -1
  254. package/dist/oauth/endpoints/getLogoutEndpoint.js.map +0 -1
  255. package/dist/oauth/endpoints/getMetaEndpoint.d.ts.map +0 -1
  256. package/dist/oauth/endpoints/getMetaEndpoint.js.map +0 -1
  257. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.d.ts.map +0 -1
  258. package/dist/oauth/endpoints/getRedirectToLoginEndpoint.js.map +0 -1
  259. package/dist/oauth/exports/client.d.ts.map +0 -1
  260. package/dist/oauth/exports/client.js.map +0 -1
  261. package/dist/oauth/hooks/afterLogout.d.ts.map +0 -1
  262. package/dist/oauth/hooks/afterLogout.js.map +0 -1
  263. package/dist/oauth/hooks/me.d.ts.map +0 -1
  264. package/dist/oauth/hooks/me.js.map +0 -1
  265. package/dist/oauth/hooks/refresh.d.ts.map +0 -1
  266. package/dist/oauth/hooks/refresh.js.map +0 -1
  267. package/dist/oauth/index.d.ts.map +0 -1
  268. package/dist/oauth/index.js.map +0 -1
  269. package/dist/oauth/strategy/index.d.ts.map +0 -1
  270. package/dist/oauth/strategy/index.js.map +0 -1
  271. package/dist/oauth/types.d.ts.map +0 -1
  272. package/dist/oauth/types.js.map +0 -1
  273. package/dist/oauth/utilities/clearCookie.d.ts.map +0 -1
  274. package/dist/oauth/utilities/clearCookie.js.map +0 -1
  275. package/dist/oauth/utilities/createCookieOptions.d.ts.map +0 -1
  276. package/dist/oauth/utilities/createCookieOptions.js.map +0 -1
  277. package/dist/oauth/utilities/createDebugLogger.d.ts.map +0 -1
  278. package/dist/oauth/utilities/createDebugLogger.js.map +0 -1
  279. package/dist/oauth/utilities/extractOrigin.d.ts.map +0 -1
  280. package/dist/oauth/utilities/extractOrigin.js.map +0 -1
  281. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts.map +0 -1
  282. package/dist/oauth/utilities/getAdminCollectionSlug.js.map +0 -1
  283. package/dist/oauth/utilities/getAdminPath.d.ts +0 -8
  284. package/dist/oauth/utilities/getAdminPath.d.ts.map +0 -1
  285. package/dist/oauth/utilities/getAdminPath.js +0 -9
  286. package/dist/oauth/utilities/getAdminPath.js.map +0 -1
  287. package/dist/oauth/utilities/getAuthorizeURL.d.ts.map +0 -1
  288. package/dist/oauth/utilities/getAuthorizeURL.js.map +0 -1
  289. package/dist/oauth/utilities/getCookieExpiration.d.ts.map +0 -1
  290. package/dist/oauth/utilities/getCookieExpiration.js.map +0 -1
  291. package/dist/oauth/utilities/getSecondsFromTokenExp.d.ts.map +0 -1
  292. package/dist/oauth/utilities/getSecondsFromTokenExp.js.map +0 -1
  293. package/dist/oauth/utilities/getTokenExp.d.ts.map +0 -1
  294. package/dist/oauth/utilities/getTokenExp.js.map +0 -1
  295. package/dist/oauth/utilities/getUsernameField.d.ts.map +0 -1
  296. package/dist/oauth/utilities/getUsernameField.js.map +0 -1
  297. package/dist/oauth/utilities/hasUserTokenPropsChanged.d.ts.map +0 -1
  298. package/dist/oauth/utilities/hasUserTokenPropsChanged.js.map +0 -1
  299. package/dist/oauth/utilities/mergeHeaders.d.ts.map +0 -1
  300. package/dist/oauth/utilities/mergeHeaders.js.map +0 -1
  301. package/dist/oauth/utilities/refreshTokens.d.ts.map +0 -1
  302. package/dist/oauth/utilities/refreshTokens.js.map +0 -1
  303. package/dist/plugin/adapter.d.ts.map +0 -1
  304. package/dist/plugin/adapter.js.map +0 -1
  305. package/dist/plugin/build-config.d.ts.map +0 -1
  306. package/dist/plugin/build-config.js.map +0 -1
  307. package/dist/types/config.d.ts.map +0 -1
  308. package/dist/types/config.js.map +0 -1
  309. package/dist/types.d.ts.map +0 -1
  310. package/dist/types.js.map +0 -1
  311. package/dist/utils/asset-collection.d.ts.map +0 -1
  312. package/dist/utils/asset-collection.js.map +0 -1
  313. package/dist/utils/build-detection.d.ts.map +0 -1
  314. package/dist/utils/build-detection.js.map +0 -1
  315. package/dist/utils/config.d.ts.map +0 -1
  316. package/dist/utils/config.js.map +0 -1
  317. package/dist/utils/download-template.d.ts.map +0 -1
  318. package/dist/utils/download-template.js.map +0 -1
  319. package/dist/utils/env-management.d.ts.map +0 -1
  320. package/dist/utils/env-management.js.map +0 -1
  321. package/dist/utils/format.d.ts.map +0 -1
  322. package/dist/utils/format.js.map +0 -1
  323. package/dist/utils/formatter.d.ts.map +0 -1
  324. package/dist/utils/formatter.js.map +0 -1
  325. package/dist/utils/git.d.ts.map +0 -1
  326. package/dist/utils/git.js.map +0 -1
  327. package/dist/utils/is-debug.d.ts.map +0 -1
  328. package/dist/utils/is-debug.js.map +0 -1
  329. package/dist/utils/lambda-config.d.ts.map +0 -1
  330. package/dist/utils/lambda-config.js.map +0 -1
  331. package/dist/utils/log.d.ts.map +0 -1
  332. package/dist/utils/log.js.map +0 -1
  333. package/dist/utils/messages.d.ts.map +0 -1
  334. package/dist/utils/messages.js.map +0 -1
  335. package/dist/utils/package-manager.d.ts.map +0 -1
  336. package/dist/utils/package-manager.js.map +0 -1
  337. package/dist/utils/payload-config-ast.d.ts.map +0 -1
  338. package/dist/utils/payload-config-ast.js.map +0 -1
  339. package/dist/utils/payload-config-finder.d.ts.map +0 -1
  340. package/dist/utils/payload-config-finder.js.map +0 -1
  341. package/dist/utils/payload-config-modifier.d.ts.map +0 -1
  342. package/dist/utils/payload-config-modifier.js.map +0 -1
  343. package/dist/utils/payload-package-check.d.ts.map +0 -1
  344. package/dist/utils/payload-package-check.js.map +0 -1
  345. package/dist/utils/project.d.ts.map +0 -1
  346. package/dist/utils/project.js.map +0 -1
  347. package/dist/utils/s3-upload.d.ts.map +0 -1
  348. package/dist/utils/s3-upload.js.map +0 -1
  349. package/dist/utils/token-display.d.ts.map +0 -1
  350. package/dist/utils/token-display.js.map +0 -1
  351. package/dist/utils/typescript-validator.d.ts.map +0 -1
  352. package/dist/utils/typescript-validator.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ import sanitize from 'sanitize-filename';
2
+ /**
3
+ * Check if a document with the given filename already exists in the database
4
+ * Matches Payload's docWithFilenameExists
5
+ */ async function docWithFilenameExists({ collectionSlug, filename, prefix, req }) {
6
+ const where = {
7
+ filename: {
8
+ equals: filename
9
+ }
10
+ };
11
+ if (prefix) {
12
+ where.prefix = {
13
+ equals: prefix
14
+ };
15
+ }
16
+ const doc = await req.payload.db.findOne({
17
+ collection: collectionSlug,
18
+ req,
19
+ where
20
+ });
21
+ return !!doc;
22
+ }
23
+ /**
24
+ * Increment filename by adding -1, -2, etc. suffix
25
+ * photo.jpg → photo-1.jpg
26
+ * photo-1.jpg → photo-2.jpg
27
+ * Matches Payload's incrementName
28
+ */ function incrementFilename(name) {
29
+ const extension = name.split('.').pop();
30
+ const baseFilename = sanitize(name.substring(0, name.lastIndexOf('.')) || name);
31
+ let incrementedName = baseFilename;
32
+ const regex = /(.*)-(\d+)$/;
33
+ const found = baseFilename.match(regex);
34
+ if (found === null) {
35
+ incrementedName += '-1';
36
+ } else {
37
+ const matchedName = found[1];
38
+ const matchedNumber = found[2];
39
+ const incremented = Number(matchedNumber) + 1;
40
+ incrementedName = `${matchedName}-${incremented}`;
41
+ }
42
+ return `${incrementedName}.${extension}`;
43
+ }
44
+ /**
45
+ * Get a safe filename that doesn't collide with existing documents
46
+ * Similar to Payload's getSafeFileName
47
+ */ export async function getSafeFilename({ collectionSlug, desiredFilename, prefix, req }) {
48
+ let modifiedFilename = desiredFilename;
49
+ // Keep incrementing until we find a filename that doesn't exist
50
+ while(await docWithFilenameExists({
51
+ collectionSlug,
52
+ filename: modifiedFilename,
53
+ prefix,
54
+ req
55
+ })){
56
+ modifiedFilename = incrementFilename(modifiedFilename);
57
+ }
58
+ return modifiedFilename;
59
+ }
60
+
61
+ //# sourceMappingURL=getSafeFilename.js.map
@@ -0,0 +1,2 @@
1
+ export { getSafeFilename } from './getSafeFilename.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ export { getSafeFilename } from './getSafeFilename.js';
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,5 @@
1
+ # Figma Project ID (CMS Resource ID)
2
+ FIGMA_PROJECT_ID=
3
+
4
+ # Environment name (e.g., production, staging)
5
+ FIGMA_ENVIRONMENT_NAME=production
@@ -0,0 +1,19 @@
1
+ # {{PROJECT_NAME}}
2
+
3
+ A Payload project configured for running on Figma infrastructure.
4
+
5
+ ## Getting Started
6
+
7
+ {{RUN_COMMAND}} dev
8
+
9
+ Open http://localhost:3000/admin to access the admin panel.
10
+
11
+ ## Deployment
12
+
13
+ npx @payloadcms/figma deploy
14
+
15
+ Deploys to Figma infrastructure.
16
+
17
+ ## Resources
18
+
19
+ - [Payload Docs](https://payloadcms.com/docs)
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Figma CMS Configuration Types
3
3
  */
4
+ import type { PackageManager } from '../utils/package-manager.js';
4
5
  /**
5
6
  * Tenant instance from Control Plane API
6
7
  */
@@ -25,7 +26,7 @@ export interface ProjectInfo {
25
26
  /** Whether Payload is installed */
26
27
  hasPayload: boolean;
27
28
  /** Package manager detected (npm, pnpm, yarn) */
28
- packageManager?: 'npm' | 'pnpm' | 'yarn';
29
+ packageManager?: PackageManager;
29
30
  /** Project root path */
30
31
  path: string;
31
32
  /** Payload version if installed */
@@ -1,8 +1,6 @@
1
1
  /**
2
2
  * Figma CMS Configuration Types
3
3
  */ /**
4
- * Tenant instance from Control Plane API
5
- */ /**
6
4
  * Project information from detection
7
5
  */ export { };
8
6
 
package/dist/types.d.ts CHANGED
@@ -1,13 +1,21 @@
1
1
  import type arg from 'arg';
2
2
  export interface Args extends arg.Spec {
3
3
  '--debug': BooleanConstructor;
4
+ '--dry-run': BooleanConstructor;
5
+ '--env': StringConstructor;
6
+ '--environment': string;
4
7
  '--force': BooleanConstructor;
5
8
  '--help': BooleanConstructor;
9
+ '--id': StringConstructor;
10
+ '--infra-env': StringConstructor;
6
11
  '--list': BooleanConstructor;
7
12
  '--logout': BooleanConstructor;
13
+ '--name': StringConstructor;
8
14
  '--yes': BooleanConstructor;
15
+ '-e': string;
9
16
  '-f': string;
10
17
  '-h': string;
18
+ '-n': string;
11
19
  '-y': string;
12
20
  }
13
21
  export type CliArgs = arg.Result<Args>;
@@ -37,7 +45,6 @@ interface Template {
37
45
  name: string;
38
46
  type: ProjectTemplate['type'];
39
47
  }
40
- export type PackageManager = 'bun' | 'npm' | 'pnpm' | 'yarn';
41
48
  export type DbType = 'd1-sqlite' | 'mongodb' | 'postgres' | 'sqlite' | 'vercel-postgres';
42
49
  export type DbDetails = {
43
50
  dbUri?: string;
@@ -0,0 +1,9 @@
1
+ import type { AssetCollection, DeployAdapter, PageCollection } from '../deploy-adapter.js';
2
+ export declare class NextjsAdapter implements DeployAdapter {
3
+ name: "nextjs";
4
+ collectAssets(projectPath: string): Promise<AssetCollection>;
5
+ collectPages(projectPath: string): Promise<PageCollection>;
6
+ prepareLambdaBundle(projectPath: string): Promise<string>;
7
+ }
8
+ export declare const nextjsAdapter: NextjsAdapter;
9
+ //# sourceMappingURL=nextjs.d.ts.map
@@ -0,0 +1,64 @@
1
+ import fs from 'fs/promises';
2
+ import path from 'path';
3
+ import { collectSSGAssets, collectStaticAssets } from '../asset-collection.js';
4
+ import { buildLambdaZip } from '../build-lambda-zip.js';
5
+ import { collectFilesRecursive } from '../fs-utils.js';
6
+ export class NextjsAdapter {
7
+ name = 'nextjs';
8
+ async collectAssets(projectPath) {
9
+ // Bundle assets: .next/static/ → _next/static/
10
+ const staticAssets = await collectStaticAssets(projectPath);
11
+ // Public assets: public/ directory
12
+ const publicDir = path.join(projectPath, 'public');
13
+ let publicAssets = [];
14
+ try {
15
+ await fs.stat(publicDir);
16
+ publicAssets = await collectFilesRecursive(publicDir, publicDir);
17
+ } catch {
18
+ // No public directory
19
+ }
20
+ const allKeys = [
21
+ ...staticAssets,
22
+ ...publicAssets
23
+ ];
24
+ const pathMap = {};
25
+ for (const key of staticAssets){
26
+ pathMap[key] = key.replace(/^_next\//, '.next/');
27
+ }
28
+ for (const key of publicAssets){
29
+ pathMap[key] = path.join('public', key);
30
+ }
31
+ return {
32
+ pathMap,
33
+ routes: allKeys.map((k)=>`/${k}`),
34
+ uploadKeys: allKeys
35
+ };
36
+ }
37
+ async collectPages(projectPath) {
38
+ const ssg = await collectSSGAssets(projectPath);
39
+ // Build route → asset keys mapping and extract unique routes
40
+ const routeAssetMap = {};
41
+ for (const key of ssg.keys){
42
+ // Strip extension to get the base, then derive the route
43
+ const base = key.replace(/\.(?:html|rsc|meta)$/, '');
44
+ const route = base === 'index' ? '/' : `/${base}`;
45
+ if (!routeAssetMap[route]) {
46
+ routeAssetMap[route] = [];
47
+ }
48
+ routeAssetMap[route].push(key);
49
+ }
50
+ return {
51
+ pathMap: ssg.pathMap,
52
+ routeAssetMap,
53
+ routes: Object.keys(routeAssetMap),
54
+ uploadKeys: ssg.keys
55
+ };
56
+ }
57
+ async prepareLambdaBundle(projectPath) {
58
+ await buildLambdaZip(projectPath);
59
+ return path.join(projectPath, 'lambda.zip');
60
+ }
61
+ }
62
+ export const nextjsAdapter = new NextjsAdapter();
63
+
64
+ //# sourceMappingURL=nextjs.js.map
@@ -0,0 +1,9 @@
1
+ import type { AssetCollection, DeployAdapter, PageCollection } from '../deploy-adapter.js';
2
+ export declare class NitroAdapter implements DeployAdapter {
3
+ name: "nitro";
4
+ collectAssets(projectPath: string): Promise<AssetCollection>;
5
+ collectPages(projectPath: string): Promise<PageCollection>;
6
+ prepareLambdaBundle(projectPath: string): Promise<string>;
7
+ }
8
+ export declare const nitroAdapter: NitroAdapter;
9
+ //# sourceMappingURL=nitro.d.ts.map
@@ -0,0 +1,169 @@
1
+ import archiver from 'archiver';
2
+ import { createWriteStream, statSync } from 'fs';
3
+ import fs from 'fs/promises';
4
+ import path from 'path';
5
+ import { collectFilesRecursive } from '../fs-utils.js';
6
+ const RUN_SCRIPT = `#!/bin/bash -x
7
+ [ ! -d '/tmp/cache' ] && mkdir -p /tmp/cache
8
+ NODE_ENV=production exec node server/index.mjs
9
+ `;
10
+ /** Directories in .output/public/ that are NOT pre-rendered pages */ const NON_PAGE_DIRS = new Set([
11
+ '_next',
12
+ 'assets'
13
+ ]);
14
+ export class NitroAdapter {
15
+ name = 'nitro';
16
+ async collectAssets(projectPath) {
17
+ const publicDir = path.join(projectPath, '.output', 'public');
18
+ const assets = [];
19
+ const pathMap = {};
20
+ // Collect flat files in .output/public/ (public dir assets)
21
+ try {
22
+ const entries = await fs.readdir(publicDir, {
23
+ withFileTypes: true
24
+ });
25
+ for (const entry of entries){
26
+ if (entry.isFile()) {
27
+ assets.push(entry.name);
28
+ pathMap[entry.name] = path.join('.output', 'public', entry.name);
29
+ }
30
+ }
31
+ } catch {
32
+ // No public directory
33
+ }
34
+ // Collect bundle assets from .output/public/_next/static/
35
+ const bundleDir = path.join(publicDir, '_next', 'static');
36
+ try {
37
+ const bundleFiles = await collectFilesRecursive(bundleDir, bundleDir);
38
+ for (const file of bundleFiles){
39
+ const key = `_next/static/${file}`;
40
+ assets.push(key);
41
+ pathMap[key] = path.join('.output', 'public', '_next', 'static', file);
42
+ }
43
+ } catch {
44
+ // No bundle directory
45
+ }
46
+ return {
47
+ pathMap,
48
+ routes: assets.map((k)=>`/${k}`),
49
+ uploadKeys: assets
50
+ };
51
+ }
52
+ async collectPages(projectPath) {
53
+ const publicDir = path.join(projectPath, '.output', 'public');
54
+ const pages = await scanForPages(publicDir, publicDir);
55
+ const routes = pages.map((p)=>p === 'index' ? '/' : `/${p}`);
56
+ const uploadKeys = pages.map((p)=>p === 'index' ? 'index.html' : `${p}/index.html`);
57
+ const pathMap = {};
58
+ const routeAssetMap = {};
59
+ for(let i = 0; i < uploadKeys.length; i++){
60
+ pathMap[uploadKeys[i]] = path.join('.output', 'public', uploadKeys[i]);
61
+ routeAssetMap[routes[i]] = [
62
+ uploadKeys[i]
63
+ ];
64
+ }
65
+ return {
66
+ pathMap,
67
+ routeAssetMap,
68
+ routes,
69
+ uploadKeys
70
+ };
71
+ }
72
+ async prepareLambdaBundle(projectPath) {
73
+ const zipPath = path.join(projectPath, 'lambda.zip');
74
+ const serverDir = path.join(projectPath, '.output', 'server');
75
+ const publicDir = path.join(projectPath, '.output', 'public');
76
+ // Verify server directory exists
77
+ try {
78
+ await fs.stat(serverDir);
79
+ } catch {
80
+ throw new Error('Nitro server build not found at .output/server. Run build first.');
81
+ }
82
+ // Write run.sh to a temp location
83
+ const runShPath = path.join(projectPath, '.output', 'run.sh');
84
+ await fs.writeFile(runShPath, RUN_SCRIPT, {
85
+ mode: 0o755
86
+ });
87
+ // Create zip: server/ + public/ + run.sh
88
+ await createZip(zipPath, [
89
+ {
90
+ prefix: 'server/',
91
+ source: serverDir
92
+ },
93
+ {
94
+ prefix: 'public/',
95
+ source: publicDir
96
+ },
97
+ {
98
+ prefix: '',
99
+ source: runShPath
100
+ }
101
+ ]);
102
+ // Clean up temp run.sh
103
+ await fs.rm(runShPath, {
104
+ force: true
105
+ });
106
+ return zipPath;
107
+ }
108
+ }
109
+ export const nitroAdapter = new NitroAdapter();
110
+ /**
111
+ * Recursively scan for pre-rendered pages (directories containing index.html).
112
+ * Skips known non-page directories (_next/, assets/).
113
+ */ async function scanForPages(dir, baseDir) {
114
+ const pages = [];
115
+ // Check if this directory has an index.html (it's a page)
116
+ const indexPath = path.join(dir, 'index.html');
117
+ try {
118
+ await fs.stat(indexPath);
119
+ const relative = path.relative(baseDir, dir);
120
+ pages.push(relative || 'index'); // root dir -> 'index'
121
+ } catch {
122
+ // Not a page directory
123
+ }
124
+ // Recurse into subdirectories
125
+ try {
126
+ const entries = await fs.readdir(dir, {
127
+ withFileTypes: true
128
+ });
129
+ for (const entry of entries){
130
+ if (entry.isDirectory() && !NON_PAGE_DIRS.has(entry.name)) {
131
+ const subPages = await scanForPages(path.join(dir, entry.name), baseDir);
132
+ pages.push(...subPages);
133
+ }
134
+ }
135
+ } catch {
136
+ // Directory not readable
137
+ }
138
+ return pages;
139
+ }
140
+ async function createZip(zipPath, entries) {
141
+ return new Promise((resolve, reject)=>{
142
+ const output = createWriteStream(zipPath);
143
+ const archive = archiver('zip', {
144
+ zlib: {
145
+ level: 9
146
+ }
147
+ });
148
+ output.on('close', ()=>resolve());
149
+ archive.on('error', (err)=>reject(err));
150
+ archive.pipe(output);
151
+ for (const entry of entries){
152
+ try {
153
+ const stat = statSync(entry.source);
154
+ if (stat.isDirectory()) {
155
+ archive.directory(entry.source, entry.prefix.replace(/\/$/, '') || false);
156
+ } else {
157
+ archive.file(entry.source, {
158
+ name: entry.prefix + path.basename(entry.source)
159
+ });
160
+ }
161
+ } catch {
162
+ // Skip missing entries
163
+ }
164
+ }
165
+ void archive.finalize();
166
+ });
167
+ }
168
+
169
+ //# sourceMappingURL=nitro.js.map
@@ -0,0 +1,10 @@
1
+ import type { AssetCollection, DeployAdapter, PageCollection } from '../deploy-adapter.js';
2
+ export declare class ViteAdapter implements DeployAdapter {
3
+ fallback: string;
4
+ name: "vite";
5
+ collectAssets(projectPath: string): Promise<AssetCollection>;
6
+ collectPages(): Promise<PageCollection>;
7
+ prepareLambdaBundle(): Promise<null>;
8
+ }
9
+ export declare const viteAdapter: ViteAdapter;
10
+ //# sourceMappingURL=vite.d.ts.map
@@ -0,0 +1,33 @@
1
+ import path from 'path';
2
+ import { collectFilesRecursive } from '../fs-utils.js';
3
+ export class ViteAdapter {
4
+ fallback = '/index.html';
5
+ name = 'vite';
6
+ async collectAssets(projectPath) {
7
+ const distDir = path.join(projectPath, 'dist');
8
+ const files = await collectFilesRecursive(distDir, distDir);
9
+ const pathMap = {};
10
+ for (const file of files){
11
+ pathMap[file] = path.join('dist', file);
12
+ }
13
+ return {
14
+ pathMap,
15
+ routes: files.map((k)=>`/${k}`),
16
+ uploadKeys: files
17
+ };
18
+ }
19
+ collectPages() {
20
+ return Promise.resolve({
21
+ pathMap: {},
22
+ routeAssetMap: {},
23
+ routes: [],
24
+ uploadKeys: []
25
+ });
26
+ }
27
+ prepareLambdaBundle() {
28
+ return Promise.resolve(null);
29
+ }
30
+ }
31
+ export const viteAdapter = new ViteAdapter();
32
+
33
+ //# sourceMappingURL=vite.js.map
@@ -16,15 +16,36 @@ export declare function getFileSize(filePath: string): Promise<number>;
16
16
  */
17
17
  export declare function collectStaticAssets(projectPath: string): Promise<string[]>;
18
18
  /**
19
- * Create Lambda deployment zip using build_for_lambda.sh
19
+ * Result from collecting SSG assets
20
+ */
21
+ export type SSGAssets = {
22
+ /** S3 keys for all SSG files (route-path based, no leading slash) */
23
+ keys: string[];
24
+ /** Map of S3 key → relative filesystem path from project root */
25
+ pathMap: Record<string, string>;
26
+ };
27
+ /**
28
+ * Collect SSG asset paths by parsing .next/prerender-manifest.json
29
+ *
30
+ * For each route in the manifest's `routes` object, collects three files:
31
+ * - {route}.html (full HTML)
32
+ * - {route}.rsc (React Server Components payload)
33
+ * - {route}.meta (response headers JSON)
34
+ *
35
+ * S3 keys use the route path without leading slash.
36
+ * Filesystem paths point to .next/server/app/{route}.{ext}
37
+ *
38
+ * @param projectPath - Path to project root
39
+ * @returns SSG asset keys and a pathMap for filesystem resolution
40
+ */
41
+ export declare function collectSSGAssets(projectPath: string): Promise<SSGAssets>;
42
+ /**
43
+ * Create Lambda deployment zip
20
44
  *
21
- * This script:
22
- * - Copies static files to standalone build
23
- * - Creates lambda.zip from .next/standalone/
24
- * - Places zip at project root
45
+ * Uses cross-platform Node.js implementation instead of shell script.
25
46
  *
26
47
  * @param projectPath - Path to project root
27
- * @throws Error if script missing or execution fails
48
+ * @throws Error if build missing or zip creation fails
28
49
  */
29
50
  export declare function createLambdaZip(projectPath: string): Promise<void>;
30
51
  //# sourceMappingURL=asset-collection.d.ts.map
@@ -1,9 +1,7 @@
1
- import { exec } from 'child_process';
2
1
  import fs from 'fs/promises';
3
2
  import path from 'path';
4
- import { promisify } from 'util';
3
+ import { buildLambdaZip } from './build-lambda-zip.js';
5
4
  import * as log from './log.js';
6
- const execAsync = promisify(exec);
7
5
  // Maximum file size for static assets (S3 limitation)
8
6
  const MAX_ASSET_SIZE = 50 * 1024 * 1024 // 50MB
9
7
  ;
@@ -75,43 +73,74 @@ const MAX_ASSET_SIZE = 50 * 1024 * 1024 // 50MB
75
73
  return [];
76
74
  }
77
75
  const files = await collectFiles(staticDir, projectPath);
78
- // Convert .next/static to _next/static (Next.js convention)
79
- return files.map((file)=>file.replace(/^\.next\//, '_next/'));
76
+ // Normalize paths to forward slashes (cross-platform) and convert prefix
77
+ return files.map((file)=>{
78
+ const normalized = file.split(path.sep).join('/');
79
+ return normalized.replace(/^\.next\//, '_next/');
80
+ });
80
81
  }
81
82
  /**
82
- * Create Lambda deployment zip using build_for_lambda.sh
83
+ * Collect SSG asset paths by parsing .next/prerender-manifest.json
83
84
  *
84
- * This script:
85
- * - Copies static files to standalone build
86
- * - Creates lambda.zip from .next/standalone/
87
- * - Places zip at project root
85
+ * For each route in the manifest's `routes` object, collects three files:
86
+ * - {route}.html (full HTML)
87
+ * - {route}.rsc (React Server Components payload)
88
+ * - {route}.meta (response headers JSON)
89
+ *
90
+ * S3 keys use the route path without leading slash.
91
+ * Filesystem paths point to .next/server/app/{route}.{ext}
88
92
  *
89
93
  * @param projectPath - Path to project root
90
- * @throws Error if script missing or execution fails
91
- */ export async function createLambdaZip(projectPath) {
92
- const scriptPath = path.join(projectPath, 'build_for_lambda.sh');
93
- // Check if script exists
94
+ * @returns SSG asset keys and a pathMap for filesystem resolution
95
+ */ export async function collectSSGAssets(projectPath) {
96
+ const manifestPath = path.join(projectPath, '.next', 'prerender-manifest.json');
97
+ let manifest;
94
98
  try {
95
- await fs.stat(scriptPath);
99
+ const raw = await fs.readFile(manifestPath, 'utf-8');
100
+ manifest = JSON.parse(raw);
96
101
  } catch {
97
- throw new Error('build_for_lambda.sh not found. Run init command to set up project.');
102
+ return {
103
+ keys: [],
104
+ pathMap: {}
105
+ };
98
106
  }
99
- // Execute script
100
- try {
101
- await execAsync('./build_for_lambda.sh', {
102
- cwd: projectPath
103
- });
104
- } catch (error) {
105
- const message = error instanceof Error ? error.message : 'Unknown error';
106
- throw new Error(`Failed to create Lambda zip: ${message}`);
107
+ if (!manifest.routes || typeof manifest.routes !== 'object') {
108
+ return {
109
+ keys: [],
110
+ pathMap: {}
111
+ };
107
112
  }
108
- // Verify zip was created
109
- const zipPath = path.join(projectPath, 'lambda.zip');
110
- try {
111
- await fs.stat(zipPath);
112
- } catch {
113
- throw new Error('lambda.zip was not created by build_for_lambda.sh');
113
+ const keys = [];
114
+ const pathMap = {};
115
+ const extensions = [
116
+ '.html',
117
+ '.rsc',
118
+ '.meta'
119
+ ];
120
+ for (const routeKey of Object.keys(manifest.routes)){
121
+ // Strip leading slash for S3 key; handle root "/" → "index"
122
+ const stripped = routeKey === '/' ? 'index' : routeKey.replace(/^\//, '');
123
+ for (const ext of extensions){
124
+ const s3Key = `${stripped}${ext}`;
125
+ const fsPath = path.join('.next', 'server', 'app', `${stripped}${ext}`);
126
+ keys.push(s3Key);
127
+ pathMap[s3Key] = fsPath;
128
+ }
114
129
  }
130
+ return {
131
+ keys,
132
+ pathMap
133
+ };
134
+ }
135
+ /**
136
+ * Create Lambda deployment zip
137
+ *
138
+ * Uses cross-platform Node.js implementation instead of shell script.
139
+ *
140
+ * @param projectPath - Path to project root
141
+ * @throws Error if build missing or zip creation fails
142
+ */ export async function createLambdaZip(projectPath) {
143
+ await buildLambdaZip(projectPath);
115
144
  }
116
145
 
117
146
  //# sourceMappingURL=asset-collection.js.map
@@ -2,24 +2,18 @@
2
2
  * Information about a detected build
3
3
  */
4
4
  export interface BuildInfo {
5
- /** Build ID from .next/BUILD_ID */
5
+ /** Build identifier */
6
6
  buildId: string;
7
7
  /** Whether lambda.zip already exists */
8
8
  hasLambdaZip: boolean;
9
- /** Path to .next/standalone */
9
+ /** Path to build output directory */
10
10
  path: string;
11
- /** Build timestamp from server.js mtime */
11
+ /** Build timestamp */
12
12
  timestamp: Date;
13
13
  }
14
14
  /**
15
- * Detect if a valid Lambda-ready build exists
16
- *
17
- * Checks for:
18
- * - .next/standalone/server.js (required for Lambda)
19
- * - .next/BUILD_ID (Next.js build identifier)
20
- *
21
- * @param projectPath - Path to project root
22
- * @returns Build info if valid build found, null otherwise
15
+ * Detect a valid build across supported frameworks.
16
+ * Tries NextJS, then Nitro, then Vite. Returns the first match.
23
17
  */
24
18
  export declare function detectBuild(projectPath: string): Promise<BuildInfo | null>;
25
19
  /**