@payloadcms/figma 0.1.0-alpha.1 → 0.1.0-alpha.11

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 (321) 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 +10 -9
  47. package/dist/api/control-plane.js +27 -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 +69 -0
  56. package/dist/auth/oauth-flow.d.ts +2 -0
  57. package/dist/auth/oauth-flow.js +13 -8
  58. package/dist/auth/token-store.d.ts +20 -1
  59. package/dist/auth/token-store.js +47 -0
  60. package/dist/auth/types.d.ts +12 -0
  61. package/dist/cli.d.ts +39 -0
  62. package/dist/cli.js +71 -36
  63. package/dist/commands/bootstrap.js +2 -1
  64. package/dist/commands/build-lambda-zip.js +1 -1
  65. package/dist/commands/deploy.d.ts +12 -0
  66. package/dist/commands/deploy.js +63 -25
  67. package/dist/commands/detect-project-resource-type.d.ts +3 -0
  68. package/dist/commands/detect-project-resource-type.js +28 -0
  69. package/dist/commands/init.d.ts +2 -2
  70. package/dist/commands/init.js +235 -80
  71. package/dist/commands/login.d.ts +11 -1
  72. package/dist/commands/login.js +66 -4
  73. package/dist/commands/prompt-to-create-project/format-project-subdomain.d.ts +1 -0
  74. package/dist/commands/prompt-to-create-project/format-project-subdomain.js +3 -0
  75. package/dist/commands/prompt-to-create-project/format-unavailable-subdomain-reason.d.ts +1 -0
  76. package/dist/commands/prompt-to-create-project/format-unavailable-subdomain-reason.js +7 -0
  77. package/dist/commands/prompt-to-create-project/get-default-project-name.d.ts +1 -0
  78. package/dist/commands/prompt-to-create-project/get-default-project-name.js +13 -0
  79. package/dist/commands/prompt-to-create-project/prompt-for-available-subdomain.d.ts +7 -0
  80. package/dist/commands/prompt-to-create-project/prompt-for-available-subdomain.js +32 -0
  81. package/dist/commands/prompt-to-create-project/resolve-project-region.d.ts +8 -0
  82. package/dist/commands/prompt-to-create-project/resolve-project-region.js +27 -0
  83. package/dist/commands/prompt-to-create-project/resolve-project-subdomain.d.ts +9 -0
  84. package/dist/commands/prompt-to-create-project/resolve-project-subdomain.js +54 -0
  85. package/dist/commands/prompt-to-create-project/resolve-text-input.d.ts +9 -0
  86. package/dist/commands/prompt-to-create-project/resolve-text-input.js +23 -0
  87. package/dist/commands/prompt-to-create-project/resolve-workspace-plan-key.d.ts +12 -0
  88. package/dist/commands/prompt-to-create-project/resolve-workspace-plan-key.js +36 -0
  89. package/dist/commands/prompt-to-create-project/validate-subdomain.d.ts +1 -0
  90. package/dist/commands/prompt-to-create-project/validate-subdomain.js +9 -0
  91. package/dist/commands/prompt-to-create-project.d.ts +24 -0
  92. package/dist/commands/prompt-to-create-project.js +69 -0
  93. package/dist/commands/setup-agent.d.ts +12 -0
  94. package/dist/commands/setup-agent.js +123 -0
  95. package/dist/commands/upgrade.js +65 -1
  96. package/dist/commands/write-project-configuration.d.ts +12 -0
  97. package/dist/commands/write-project-configuration.js +16 -0
  98. package/dist/db-content-api/generated/content-api-types.d.ts +6 -2
  99. package/dist/db-content-api/index.d.ts +1 -1
  100. package/dist/db-content-api/index.js +121 -72
  101. package/dist/db-content-api/utilities/data/index.js +8 -2
  102. package/dist/db-content-api/utilities/data/injectGlobalType.d.ts +6 -0
  103. package/dist/db-content-api/utilities/data/injectGlobalType.js +11 -0
  104. package/dist/db-content-api/utilities/data/removeVirtualFields.d.ts +3 -11
  105. package/dist/db-content-api/utilities/data/removeVirtualFields.js +12 -50
  106. package/dist/db-content-api/utilities/isRecord.d.ts +9 -0
  107. package/dist/db-content-api/utilities/isRecord.js +19 -0
  108. package/dist/db-content-api/utilities/joins.js +5 -1
  109. package/dist/db-content-api/utilities/meta/resolvesToRelationshipValue.d.ts +10 -0
  110. package/dist/db-content-api/utilities/meta/resolvesToRelationshipValue.js +95 -0
  111. package/dist/db-content-api/utilities/meta/stringifyIdsInWhere.d.ts +9 -0
  112. package/dist/db-content-api/utilities/meta/stringifyIdsInWhere.js +112 -0
  113. package/dist/db-content-api/utilities/schema/buildDocumentSchema.js +9 -4
  114. package/dist/db-content-api/utilities/schema/getDocumentSchema.d.ts +3 -0
  115. package/dist/db-content-api/utilities/schema/getDocumentSchema.js +24 -0
  116. package/dist/db-content-api/utilities/where.d.ts +2 -6
  117. package/dist/db-content-api/utilities/where.js +20 -9
  118. package/dist/exports/client.d.ts +2 -0
  119. package/dist/exports/client.js +2 -0
  120. package/dist/exports/views.d.ts +1 -0
  121. package/dist/exports/views.js +1 -0
  122. package/dist/imageSizeOptions.d.ts +23 -0
  123. package/dist/imageSizeOptions.js +26 -0
  124. package/dist/index.d.ts +2 -0
  125. package/dist/index.js +2 -0
  126. package/dist/lib/write-agent-config.d.ts +12 -0
  127. package/dist/lib/write-agent-config.js +52 -0
  128. package/dist/next/image-loader.d.ts +6 -0
  129. package/dist/next/image-loader.js +14 -0
  130. package/dist/oauth/components/LoginButton/index.js +66 -19
  131. package/dist/oauth/components/LoginButton/index.scss +121 -15
  132. package/dist/oauth/defaults.js +4 -1
  133. package/dist/oauth/endpoints/getLoginEndpoint.js +5 -2
  134. package/dist/oauth/index.js +8 -7
  135. package/dist/oauth/utilities/getAdminCollectionSlug.d.ts +1 -1
  136. package/dist/oauth/utilities/getAuthorizeURL.d.ts +1 -0
  137. package/dist/oauth/utilities/getAuthorizeURL.js +5 -1
  138. package/dist/plugin/build-config.d.ts +13 -3
  139. package/dist/plugin/build-config.js +181 -36
  140. package/dist/plugin/cache-revalidation-hooks.d.ts +6 -0
  141. package/dist/plugin/cache-revalidation-hooks.js +69 -0
  142. package/dist/plugin/cloud-limits/CloudLimitModal/index.d.ts +9 -0
  143. package/dist/plugin/cloud-limits/CloudLimitModal/index.js +66 -0
  144. package/dist/plugin/cloud-limits/CloudLimitModal/index.scss +56 -0
  145. package/dist/plugin/cloud-limits/CloudLimitProvider/index.d.ts +4 -0
  146. package/dist/plugin/cloud-limits/CloudLimitProvider/index.js +110 -0
  147. package/dist/plugin/cloud-limits/LimitReachedView/index.css +14 -0
  148. package/dist/plugin/cloud-limits/LimitReachedView/index.d.ts +4 -0
  149. package/dist/plugin/cloud-limits/LimitReachedView/index.js +52 -0
  150. package/dist/plugin/cloud-limits/SlugRegistryContext/index.d.ts +7 -0
  151. package/dist/plugin/cloud-limits/SlugRegistryContext/index.js +3 -0
  152. package/dist/plugin/cloud-limits/SlugTracker/index.d.ts +1 -0
  153. package/dist/plugin/cloud-limits/SlugTracker/index.js +27 -0
  154. package/dist/plugin/cloud-limits/icons/ExternalLinkIcon.d.ts +3 -0
  155. package/dist/plugin/cloud-limits/icons/ExternalLinkIcon.js +30 -0
  156. package/dist/plugin/cloud-limits/routes.d.ts +2 -0
  157. package/dist/plugin/cloud-limits/routes.js +4 -0
  158. package/dist/plugin/cloud-limits/server/redirectInitialAutosaveCreate.d.ts +9 -0
  159. package/dist/plugin/cloud-limits/server/redirectInitialAutosaveCreate.js +28 -0
  160. package/dist/plugin/cloud-limits/shared.d.ts +10 -0
  161. package/dist/plugin/cloud-limits/shared.js +52 -0
  162. package/dist/plugin/cloud-limits/utilities/cloudLimitInterceptor.d.ts +2 -0
  163. package/dist/plugin/cloud-limits/utilities/cloudLimitInterceptor.js +134 -0
  164. package/dist/plugin/cloud-limits/utilities/toasts.d.ts +4 -0
  165. package/dist/plugin/cloud-limits/utilities/toasts.js +19 -0
  166. package/dist/plugin/make-permission-access/make-permission-access.d.ts +8 -0
  167. package/dist/plugin/make-permission-access/make-permission-access.js +24 -0
  168. package/dist/plugin/sandbox-upload-fetch.d.ts +32 -0
  169. package/dist/plugin/sandbox-upload-fetch.js +53 -0
  170. package/dist/skills/deploy-to-figma/SKILL.md +234 -0
  171. package/dist/skills/deploy-to-figma/references/cli-reference.md +146 -0
  172. package/dist/storage-content-api/api-types.d.ts +3 -0
  173. package/dist/storage-content-api/buildBaseMediaResponseHeaders.d.ts +1 -0
  174. package/dist/storage-content-api/buildBaseMediaResponseHeaders.js +8 -0
  175. package/dist/storage-content-api/buildClientUploadFetchBackHeaders.d.ts +12 -0
  176. package/dist/storage-content-api/buildClientUploadFetchBackHeaders.js +26 -0
  177. package/dist/storage-content-api/buildMediaRequestHeaders.d.ts +1 -0
  178. package/dist/storage-content-api/buildMediaRequestHeaders.js +14 -0
  179. package/dist/storage-content-api/buildMediaResponseHeaders.d.ts +4 -0
  180. package/dist/storage-content-api/buildMediaResponseHeaders.js +52 -0
  181. package/dist/storage-content-api/client-uploads/generate.js +2 -1
  182. package/dist/storage-content-api/getDownloadResponseHeaderPolicy.d.ts +11 -0
  183. package/dist/storage-content-api/getDownloadResponseHeaderPolicy.js +33 -0
  184. package/dist/storage-content-api/getMediaType.d.ts +1 -0
  185. package/dist/storage-content-api/getMediaType.js +3 -0
  186. package/dist/storage-content-api/hasSupportedContentEncoding.d.ts +1 -0
  187. package/dist/storage-content-api/hasSupportedContentEncoding.js +6 -0
  188. package/dist/storage-content-api/index.js +1 -0
  189. package/dist/storage-content-api/mediaErrorResponse.d.ts +1 -0
  190. package/dist/storage-content-api/mediaErrorResponse.js +12 -0
  191. package/dist/storage-content-api/resolveDownloadResponseHeaders.d.ts +5 -0
  192. package/dist/storage-content-api/resolveDownloadResponseHeaders.js +13 -0
  193. package/dist/storage-content-api/shouldAttachMedia.d.ts +1 -0
  194. package/dist/storage-content-api/shouldAttachMedia.js +34 -0
  195. package/dist/storage-content-api/staticHandler.js +93 -25
  196. package/dist/storage-content-api/types.d.ts +4 -1
  197. package/dist/translations/ar.d.ts +12 -0
  198. package/dist/translations/ar.js +12 -0
  199. package/dist/translations/az.d.ts +12 -0
  200. package/dist/translations/az.js +12 -0
  201. package/dist/translations/bg.d.ts +12 -0
  202. package/dist/translations/bg.js +12 -0
  203. package/dist/translations/bnBd.d.ts +12 -0
  204. package/dist/translations/bnBd.js +12 -0
  205. package/dist/translations/bnIn.d.ts +12 -0
  206. package/dist/translations/bnIn.js +12 -0
  207. package/dist/translations/ca.d.ts +12 -0
  208. package/dist/translations/ca.js +12 -0
  209. package/dist/translations/cs.d.ts +12 -0
  210. package/dist/translations/cs.js +12 -0
  211. package/dist/translations/da.d.ts +12 -0
  212. package/dist/translations/da.js +12 -0
  213. package/dist/translations/de.d.ts +12 -0
  214. package/dist/translations/de.js +12 -0
  215. package/dist/translations/en.d.ts +12 -0
  216. package/dist/translations/en.js +12 -0
  217. package/dist/translations/es.d.ts +12 -0
  218. package/dist/translations/es.js +12 -0
  219. package/dist/translations/et.d.ts +12 -0
  220. package/dist/translations/et.js +12 -0
  221. package/dist/translations/fa.d.ts +12 -0
  222. package/dist/translations/fa.js +12 -0
  223. package/dist/translations/fr.d.ts +12 -0
  224. package/dist/translations/fr.js +12 -0
  225. package/dist/translations/he.d.ts +12 -0
  226. package/dist/translations/he.js +12 -0
  227. package/dist/translations/hr.d.ts +12 -0
  228. package/dist/translations/hr.js +12 -0
  229. package/dist/translations/hu.d.ts +12 -0
  230. package/dist/translations/hu.js +12 -0
  231. package/dist/translations/hy.d.ts +12 -0
  232. package/dist/translations/hy.js +12 -0
  233. package/dist/translations/id.d.ts +12 -0
  234. package/dist/translations/id.js +12 -0
  235. package/dist/translations/index.d.ts +533 -0
  236. package/dist/translations/index.js +90 -0
  237. package/dist/translations/is.d.ts +12 -0
  238. package/dist/translations/is.js +12 -0
  239. package/dist/translations/it.d.ts +12 -0
  240. package/dist/translations/it.js +12 -0
  241. package/dist/translations/ja.d.ts +12 -0
  242. package/dist/translations/ja.js +12 -0
  243. package/dist/translations/ko.d.ts +12 -0
  244. package/dist/translations/ko.js +12 -0
  245. package/dist/translations/lt.d.ts +12 -0
  246. package/dist/translations/lt.js +12 -0
  247. package/dist/translations/lv.d.ts +12 -0
  248. package/dist/translations/lv.js +12 -0
  249. package/dist/translations/my.d.ts +12 -0
  250. package/dist/translations/my.js +12 -0
  251. package/dist/translations/nb.d.ts +12 -0
  252. package/dist/translations/nb.js +12 -0
  253. package/dist/translations/nl.d.ts +12 -0
  254. package/dist/translations/nl.js +12 -0
  255. package/dist/translations/pl.d.ts +12 -0
  256. package/dist/translations/pl.js +12 -0
  257. package/dist/translations/pt.d.ts +12 -0
  258. package/dist/translations/pt.js +12 -0
  259. package/dist/translations/ro.d.ts +12 -0
  260. package/dist/translations/ro.js +12 -0
  261. package/dist/translations/rs.d.ts +12 -0
  262. package/dist/translations/rs.js +12 -0
  263. package/dist/translations/rsLatin.d.ts +12 -0
  264. package/dist/translations/rsLatin.js +12 -0
  265. package/dist/translations/ru.d.ts +12 -0
  266. package/dist/translations/ru.js +12 -0
  267. package/dist/translations/sk.d.ts +12 -0
  268. package/dist/translations/sk.js +12 -0
  269. package/dist/translations/sl.d.ts +12 -0
  270. package/dist/translations/sl.js +12 -0
  271. package/dist/translations/sv.d.ts +12 -0
  272. package/dist/translations/sv.js +12 -0
  273. package/dist/translations/ta.d.ts +12 -0
  274. package/dist/translations/ta.js +12 -0
  275. package/dist/translations/th.d.ts +12 -0
  276. package/dist/translations/th.js +12 -0
  277. package/dist/translations/tr.d.ts +12 -0
  278. package/dist/translations/tr.js +12 -0
  279. package/dist/translations/uk.d.ts +12 -0
  280. package/dist/translations/uk.js +12 -0
  281. package/dist/translations/vi.d.ts +12 -0
  282. package/dist/translations/vi.js +12 -0
  283. package/dist/translations/zh.d.ts +12 -0
  284. package/dist/translations/zh.js +12 -0
  285. package/dist/translations/zhTw.d.ts +12 -0
  286. package/dist/translations/zhTw.js +12 -0
  287. package/dist/types.d.ts +11 -0
  288. package/dist/utils/assert-never.d.ts +1 -0
  289. package/dist/utils/assert-never.js +3 -0
  290. package/dist/utils/build-detection.d.ts +6 -1
  291. package/dist/utils/build-detection.js +68 -89
  292. package/dist/utils/deploy-adapter.d.ts +3 -35
  293. package/dist/utils/deploy-adapter.js +25 -14
  294. package/dist/utils/env-management.d.ts +15 -0
  295. package/dist/utils/env-management.js +47 -0
  296. package/dist/utils/lambda-config.js +18 -23
  297. package/dist/utils/messages.js +24 -3
  298. package/dist/utils/next-image-loader-config.d.ts +2 -0
  299. package/dist/utils/next-image-loader-config.js +63 -0
  300. package/dist/utils/next-image-loader-file.d.ts +2 -0
  301. package/dist/utils/next-image-loader-file.js +11 -0
  302. package/dist/utils/payload-config-ast.js +5 -2
  303. package/dist/utils/payload-generate.d.ts +10 -0
  304. package/dist/utils/payload-generate.js +59 -0
  305. package/dist/utils/payload-secret.d.ts +28 -0
  306. package/dist/utils/payload-secret.js +34 -0
  307. package/dist/utils/pnpm-builds.d.ts +14 -0
  308. package/dist/utils/pnpm-builds.js +125 -0
  309. package/dist/utils/s3-upload.js +4 -1
  310. package/package.json +33 -7
  311. package/dist/lib/download-skill.d.ts +0 -12
  312. package/dist/lib/download-skill.js +0 -77
  313. package/dist/utils/adapters/nextjs.d.ts +0 -8
  314. package/dist/utils/adapters/nextjs.js +0 -61
  315. package/dist/utils/adapters/nitro.d.ts +0 -8
  316. package/dist/utils/adapters/nitro.js +0 -172
  317. package/dist/utils/adapters/vite.js +0 -31
  318. package/dist/utils/asset-collection.js +0 -144
  319. package/dist/utils/build-lambda-zip.js +0 -90
  320. package/dist/utils/fs-utils.d.ts +0 -12
  321. package/dist/utils/fs-utils.js +0 -55
@@ -0,0 +1,12 @@
1
+ export const thTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: 'ไม่สามารถอัปโหลดได้ กรุณาเพิ่มพื้นที่ว่างเพื่อดำเนินการต่อ',
4
+ cloudLimitDocumentCountError: 'ไม่สามารถสร้าง Document ได้ เกินขีดจำกัดการจัดเก็บข้อมูลแล้ว',
5
+ cloudLimitDocumentDataSizeError: 'ไม่สามารถบันทึกเอกสารได้ ข้อความยาวเกินไป',
6
+ cloudLimitModalBody: 'คุณได้ถึงขีดจำกัดของเอกสารแล้ว กรุณาลบเอกสารที่มีอยู่บางส่วนเพื่อดำเนินการสร้างเอกสารต่อ',
7
+ cloudLimitModalConfirm: 'ได้รับแล้ว',
8
+ cloudLimitModalHeading: 'ไม่สามารถบันทึก Document ได้',
9
+ cloudLimitModalRetry: 'ลองอีกครั้ง',
10
+ cloudLimitModalReviewCollection: 'ตรวจสอบ {{collection}}'
11
+ }
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const trTranslations: {
2
+ figma: {
3
+ cloudLimitAssetStorageError: string;
4
+ cloudLimitDocumentCountError: string;
5
+ cloudLimitDocumentDataSizeError: string;
6
+ cloudLimitModalBody: string;
7
+ cloudLimitModalConfirm: string;
8
+ cloudLimitModalHeading: string;
9
+ cloudLimitModalRetry: string;
10
+ cloudLimitModalReviewCollection: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ export const trTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: 'Yükleme yapılamıyor. Devam edebilmek için alan boşaltın.',
4
+ cloudLimitDocumentCountError: 'Belge oluşturulamıyor. Depolama sınırına ulaşıldı.',
5
+ cloudLimitDocumentDataSizeError: 'Belge kaydedilemiyor, metin çok büyük.',
6
+ cloudLimitModalBody: 'Belge limitinize ulaştınız. Yeni belgeler oluşturabilmek için mevcut belgelerden bazılarını silin.',
7
+ cloudLimitModalConfirm: 'Anlaşıldı',
8
+ cloudLimitModalHeading: 'Belge kaydedilemedi',
9
+ cloudLimitModalRetry: 'Tekrar Dene',
10
+ cloudLimitModalReviewCollection: '{{collection}}’ı inceleyin'
11
+ }
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const ukTranslations: {
2
+ figma: {
3
+ cloudLimitAssetStorageError: string;
4
+ cloudLimitDocumentCountError: string;
5
+ cloudLimitDocumentDataSizeError: string;
6
+ cloudLimitModalBody: string;
7
+ cloudLimitModalConfirm: string;
8
+ cloudLimitModalHeading: string;
9
+ cloudLimitModalRetry: string;
10
+ cloudLimitModalReviewCollection: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ export const ukTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: 'Неможливо завантажити. Звільніть місце, щоб продовжити.',
4
+ cloudLimitDocumentCountError: 'Не вдалося створити документ. Досягнуто ліміту зберігання.',
5
+ cloudLimitDocumentDataSizeError: 'Неможливо зберегти документ, текст надто великий.',
6
+ cloudLimitModalBody: 'Ви досягли межі документів. Видаліть деякі наявні документи, щоб продовжити створення.',
7
+ cloudLimitModalConfirm: 'Зрозуміло',
8
+ cloudLimitModalHeading: 'Не вдалося зберегти документ',
9
+ cloudLimitModalRetry: 'Повторити',
10
+ cloudLimitModalReviewCollection: 'Переглянути {{collection}}'
11
+ }
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const viTranslations: {
2
+ figma: {
3
+ cloudLimitAssetStorageError: string;
4
+ cloudLimitDocumentCountError: string;
5
+ cloudLimitDocumentDataSizeError: string;
6
+ cloudLimitModalBody: string;
7
+ cloudLimitModalConfirm: string;
8
+ cloudLimitModalHeading: string;
9
+ cloudLimitModalRetry: string;
10
+ cloudLimitModalReviewCollection: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ export const viTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: 'Không thể tải lên. Hãy giải phóng dung lượng để tiếp tục.',
4
+ cloudLimitDocumentCountError: 'Không thể tạo tài liệu. Đã đạt giới hạn lưu trữ.',
5
+ cloudLimitDocumentDataSizeError: 'Không thể lưu tài liệu, văn bản quá lớn.',
6
+ cloudLimitModalBody: 'Bạn đã đạt đến giới hạn tài liệu. Vui lòng xóa một số tài liệu hiện có để tiếp tục tạo mới.',
7
+ cloudLimitModalConfirm: 'Đã hiểu',
8
+ cloudLimitModalHeading: 'Không thể lưu tài liệu',
9
+ cloudLimitModalRetry: 'Thử lại',
10
+ cloudLimitModalReviewCollection: 'Xem lại {{collection}}'
11
+ }
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const zhTranslations: {
2
+ figma: {
3
+ cloudLimitAssetStorageError: string;
4
+ cloudLimitDocumentCountError: string;
5
+ cloudLimitDocumentDataSizeError: string;
6
+ cloudLimitModalBody: string;
7
+ cloudLimitModalConfirm: string;
8
+ cloudLimitModalHeading: string;
9
+ cloudLimitModalRetry: string;
10
+ cloudLimitModalReviewCollection: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ export const zhTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: '无法上传。请释放空间以继续操作。',
4
+ cloudLimitDocumentCountError: '无法创建文档。已达到存储限制。',
5
+ cloudLimitDocumentDataSizeError: '无法保存文档,文本过大。',
6
+ cloudLimitModalBody: '您已达到文档数量上限。请删除部分现有文档以继续创建。',
7
+ cloudLimitModalConfirm: '明白',
8
+ cloudLimitModalHeading: '无法保存文档',
9
+ cloudLimitModalRetry: '重试',
10
+ cloudLimitModalReviewCollection: '审核 {{collection}}'
11
+ }
12
+ };
@@ -0,0 +1,12 @@
1
+ export declare const zhTwTranslations: {
2
+ figma: {
3
+ cloudLimitAssetStorageError: string;
4
+ cloudLimitDocumentCountError: string;
5
+ cloudLimitDocumentDataSizeError: string;
6
+ cloudLimitModalBody: string;
7
+ cloudLimitModalConfirm: string;
8
+ cloudLimitModalHeading: string;
9
+ cloudLimitModalRetry: string;
10
+ cloudLimitModalReviewCollection: string;
11
+ };
12
+ };
@@ -0,0 +1,12 @@
1
+ export const zhTwTranslations = {
2
+ figma: {
3
+ cloudLimitAssetStorageError: '無法上傳。請釋放空間以繼續。',
4
+ cloudLimitDocumentCountError: '無法建立文件。已達儲存空間上限。',
5
+ cloudLimitDocumentDataSizeError: '無法儲存 Document,文字內容過長。',
6
+ cloudLimitModalBody: '您已達到文件數量上限。請刪除部分現有文件以繼續建立新文件。',
7
+ cloudLimitModalConfirm: '了解',
8
+ cloudLimitModalHeading: '無法儲存文件',
9
+ cloudLimitModalRetry: '重試',
10
+ cloudLimitModalReviewCollection: '審查{{collection}}'
11
+ }
12
+ };
package/dist/types.d.ts CHANGED
@@ -1,17 +1,28 @@
1
1
  import type arg from 'arg';
2
2
  export interface Args extends arg.Spec {
3
+ '--adapter': StringConstructor;
4
+ '--callback-url': StringConstructor;
5
+ '--complete': StringConstructor;
3
6
  '--debug': BooleanConstructor;
7
+ '--description': StringConstructor;
4
8
  '--dry-run': BooleanConstructor;
5
9
  '--env': StringConstructor;
6
10
  '--environment': string;
7
11
  '--force': BooleanConstructor;
12
+ '--global': BooleanConstructor;
13
+ '--headless': BooleanConstructor;
8
14
  '--help': BooleanConstructor;
9
15
  '--id': StringConstructor;
10
16
  '--infra-env': StringConstructor;
11
17
  '--list': BooleanConstructor;
12
18
  '--logout': BooleanConstructor;
13
19
  '--name': StringConstructor;
20
+ '--output': StringConstructor;
21
+ '--project': BooleanConstructor;
22
+ '--region': StringConstructor;
23
+ '--subdomain': StringConstructor;
14
24
  '--template': StringConstructor;
25
+ '--workspace': StringConstructor;
15
26
  '--yes': BooleanConstructor;
16
27
  '-e': string;
17
28
  '-f': string;
@@ -0,0 +1 @@
1
+ export declare function assertNever(x: never): never;
@@ -0,0 +1,3 @@
1
+ export function assertNever(x) {
2
+ throw new Error('Unhandled case: ' + JSON.stringify(x));
3
+ }
@@ -1,3 +1,4 @@
1
+ import type { AdapterName } from './deploy-adapter.js';
1
2
  /**
2
3
  * Information about a detected build
3
4
  */
@@ -11,11 +12,15 @@ export interface BuildInfo {
11
12
  /** Build timestamp */
12
13
  timestamp: Date;
13
14
  }
15
+ export interface DetectBuildOptions {
16
+ adapter?: AdapterName;
17
+ output?: string;
18
+ }
14
19
  /**
15
20
  * Detect a valid build across supported frameworks.
16
21
  * Tries NextJS, then Nitro, then Vite. Returns the first match.
17
22
  */
18
- export declare function detectBuild(projectPath: string): Promise<BuildInfo | null>;
23
+ export declare function detectBuild(projectPath: string, options: DetectBuildOptions): Promise<BuildInfo | null>;
19
24
  /**
20
25
  * Get the build command from package.json
21
26
  *
@@ -1,103 +1,82 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
+ import { inspectNextjsOutput } from '../adapters/deploy-output/inspectNextjsOutput.js';
4
+ import { inspectNitroOutput } from '../adapters/deploy-output/inspectNitroOutput.js';
5
+ import { resolveOutputPath } from '../adapters/deploy-output/resolveOutputPath.js';
6
+ import { assertNever } from './assert-never.js';
3
7
  /**
4
8
  * Detect a valid build across supported frameworks.
5
9
  * Tries NextJS, then Nitro, then Vite. Returns the first match.
6
- */ export async function detectBuild(projectPath) {
7
- // Try NextJS first
8
- const nextjsBuild = await detectNextjsBuild(projectPath);
9
- if (nextjsBuild) {
10
- return nextjsBuild;
11
- }
12
- // Try Nitro
13
- const nitroBuild = await detectNitroBuild(projectPath);
14
- if (nitroBuild) {
15
- return nitroBuild;
16
- }
17
- // Try Vite
18
- const viteBuild = await detectViteBuild(projectPath);
19
- if (viteBuild) {
20
- return viteBuild;
21
- }
22
- return null;
23
- }
24
- /**
25
- * Detect NextJS standalone build (.next/standalone/server.js + .next/BUILD_ID)
26
- */ async function detectNextjsBuild(projectPath) {
27
- try {
28
- const serverPath = path.join(projectPath, '.next', 'standalone', 'server.js');
29
- const serverStat = await fs.stat(serverPath);
30
- const buildIdPath = path.join(projectPath, '.next', 'BUILD_ID');
31
- const buildId = (await fs.readFile(buildIdPath, 'utf-8')).trim();
32
- const lambdaZipPath = path.join(projectPath, 'lambda.zip');
33
- let hasLambdaZip = false;
34
- try {
35
- await fs.stat(lambdaZipPath);
36
- hasLambdaZip = true;
37
- } catch {
38
- hasLambdaZip = false;
10
+ */ export async function detectBuild(projectPath, options) {
11
+ const adapters = options.adapter ? [
12
+ options.adapter
13
+ ] : [
14
+ 'nextjs',
15
+ 'nitro',
16
+ 'vite'
17
+ ];
18
+ for (const adapter of adapters){
19
+ const outputPath = resolveOutputPath(projectPath, adapter, options.output);
20
+ const build = await detectAdapterBuild(projectPath, adapter, outputPath);
21
+ if (build) {
22
+ return build;
39
23
  }
40
- return {
41
- buildId,
42
- hasLambdaZip,
43
- path: '.next/standalone',
44
- timestamp: serverStat.mtime
45
- };
46
- } catch {
47
- return null;
48
24
  }
25
+ return null;
49
26
  }
50
- /**
51
- * Detect Nitro build (.output/server/index.mjs)
52
- * Build ID parsed from .output/nitro.json date field, or mtime of index.mjs
53
- */ async function detectNitroBuild(projectPath) {
54
- try {
55
- const indexPath = path.join(projectPath, '.output', 'server', 'index.mjs');
56
- const indexStat = await fs.stat(indexPath);
57
- let buildId = indexStat.mtime.toISOString();
58
- try {
59
- const nitroJsonPath = path.join(projectPath, '.output', 'nitro.json');
60
- const nitroJson = JSON.parse(await fs.readFile(nitroJsonPath, 'utf-8'));
61
- if (nitroJson.date) {
62
- buildId = nitroJson.date;
27
+ async function detectAdapterBuild(projectPath, adapter, outputPath) {
28
+ switch(adapter){
29
+ case 'nextjs':
30
+ {
31
+ const layout = await inspectNextjsOutput(outputPath);
32
+ if (!layout) {
33
+ return null;
34
+ }
35
+ const stat = await fs.stat(layout.serverEntryPath);
36
+ return {
37
+ buildId: layout.buildId,
38
+ hasLambdaZip: await hasLambdaZip(projectPath),
39
+ path: path.relative(projectPath, layout.standalonePath),
40
+ timestamp: stat.mtime
41
+ };
63
42
  }
64
- } catch {
65
- // nitro.json missing or unparseable — fall back to mtime
66
- }
67
- const lambdaZipPath = path.join(projectPath, 'lambda.zip');
68
- let hasLambdaZip = false;
69
- try {
70
- await fs.stat(lambdaZipPath);
71
- hasLambdaZip = true;
72
- } catch {
73
- hasLambdaZip = false;
74
- }
75
- return {
76
- buildId,
77
- hasLambdaZip,
78
- path: '.output',
79
- timestamp: indexStat.mtime
80
- };
81
- } catch {
82
- return null;
43
+ case 'nitro':
44
+ {
45
+ const layout = await inspectNitroOutput(outputPath);
46
+ if (!layout) {
47
+ return null;
48
+ }
49
+ const stat = await fs.stat(layout.serverEntryPath);
50
+ return {
51
+ buildId: layout.buildId ?? stat.mtime.toISOString(),
52
+ hasLambdaZip: await hasLambdaZip(projectPath),
53
+ path: path.relative(projectPath, outputPath),
54
+ timestamp: stat.mtime
55
+ };
56
+ }
57
+ case 'vite':
58
+ {
59
+ try {
60
+ const stat = await fs.stat(path.join(outputPath, 'index.html'));
61
+ if (!stat.isFile()) {
62
+ return null;
63
+ }
64
+ return {
65
+ buildId: stat.mtime.toISOString(),
66
+ hasLambdaZip: false,
67
+ path: path.relative(projectPath, outputPath),
68
+ timestamp: stat.mtime
69
+ };
70
+ } catch {
71
+ return null;
72
+ }
73
+ }
74
+ default:
75
+ assertNever(adapter);
83
76
  }
84
77
  }
85
- /**
86
- * Detect Vite build (dist/index.html)
87
- * Build ID is mtime of index.html as ISO string. No server, so hasLambdaZip is always false.
88
- */ async function detectViteBuild(projectPath) {
89
- try {
90
- const indexPath = path.join(projectPath, 'dist', 'index.html');
91
- const indexStat = await fs.stat(indexPath);
92
- return {
93
- buildId: indexStat.mtime.toISOString(),
94
- hasLambdaZip: false,
95
- path: 'dist',
96
- timestamp: indexStat.mtime
97
- };
98
- } catch {
99
- return null;
100
- }
78
+ async function hasLambdaZip(projectPath) {
79
+ return fs.stat(path.join(projectPath, 'lambda.zip')).then(()=>true).catch(()=>false);
101
80
  }
102
81
  /**
103
82
  * Get the build command from package.json
@@ -1,37 +1,5 @@
1
- export interface PageCollection {
2
- /** S3 key → relative filesystem path from project root */
3
- pathMap: Record<string, string>;
4
- /** Route → S3 upload keys for that route (e.g., { "/products": ["products.html", "products.rsc"] }) */
5
- routeAssetMap: Record<string, string[]>;
6
- /** Route paths for the manifest pages array (e.g., ["/products", "/blog"]) */
7
- routes: string[];
8
- /** S3 keys to upload (e.g., ["products.html", "products.rsc", "products.meta"]) */
9
- uploadKeys: string[];
10
- }
11
- export interface AssetCollection {
12
- /** S3 key → relative filesystem path from project root */
13
- pathMap: Record<string, string>;
14
- /** Route paths for the manifest assets array (e.g., ["/favicon.ico"]) */
15
- routes: string[];
16
- /** S3 keys to upload (same as routes for assets, without leading slash) */
17
- uploadKeys: string[];
18
- }
19
- export type AdapterName = 'nextjs' | 'nitro' | 'vite';
20
- export interface LambdaBundle {
21
- /** Total size in bytes of the bundle contents before compression. */
22
- unzippedBytes: number;
23
- /** Absolute path to the built lambda.zip. */
24
- zipPath: string;
25
- }
26
- export interface DeployAdapter {
27
- collectAssets(projectPath: string): Promise<AssetCollection>;
28
- collectPages(projectPath: string): Promise<PageCollection>;
29
- /** SPA fallback path (e.g., "/index.html"). Undefined for SSR/SSG apps. */
30
- fallback?: string;
31
- name: AdapterName;
32
- /** Assembles and zips the server bundle. Returns the bundle, or null if no server (e.g., Vite SPA). */
33
- prepareLambdaBundle(projectPath: string): Promise<LambdaBundle | null>;
34
- }
1
+ import type { AdapterName, DeployAdapter } from '../adapters/types.js';
2
+ export type { AdapterLogger, AdapterName, AssetCollection, DeployAdapter, LambdaBundle, PageCollection, PrepareLambdaBundleOptions, } from '../adapters/types.js';
35
3
  /**
36
4
  * Auto-detect the framework adapter based on build output.
37
5
  *
@@ -42,4 +10,4 @@ export interface DeployAdapter {
42
10
  * @param projectPath - Path to project root
43
11
  * @param override - Explicit adapter name from --adapter flag
44
12
  */
45
- export declare function detectAdapter(projectPath: string, override?: AdapterName): Promise<DeployAdapter>;
13
+ export declare function detectAdapter(projectPath: string, override?: AdapterName, output?: string): Promise<DeployAdapter>;
@@ -1,5 +1,13 @@
1
1
  import fs from 'fs/promises';
2
2
  import path from 'path';
3
+ import { inspectNextjsOutput } from '../adapters/deploy-output/inspectNextjsOutput.js';
4
+ import { inspectNitroOutput } from '../adapters/deploy-output/inspectNitroOutput.js';
5
+ import { resolveOutputPath } from '../adapters/deploy-output/resolveOutputPath.js';
6
+ import * as log from './log.js';
7
+ const adapterLogger = {
8
+ info: log.info,
9
+ warning: log.warning
10
+ };
3
11
  /**
4
12
  * Auto-detect the framework adapter based on build output.
5
13
  *
@@ -9,40 +17,43 @@ import path from 'path';
9
17
  *
10
18
  * @param projectPath - Path to project root
11
19
  * @param override - Explicit adapter name from --adapter flag
12
- */ export async function detectAdapter(projectPath, override) {
20
+ */ export async function detectAdapter(projectPath, override, output) {
13
21
  if (override) {
14
22
  return loadAdapter(override);
15
23
  }
16
- const hasNext = await exists(path.join(projectPath, '.next'));
17
- const hasNitro = await exists(path.join(projectPath, '.output', 'nitro.json'));
18
- const hasViteDist = await exists(path.join(projectPath, 'dist', 'index.html'));
19
- if (hasNext) {
24
+ const nextOutput = resolveOutputPath(projectPath, 'nextjs', output);
25
+ if (await inspectNextjsOutput(nextOutput)) {
20
26
  return loadAdapter('nextjs');
21
27
  }
22
- if (hasNitro) {
28
+ const nitroOutput = resolveOutputPath(projectPath, 'nitro', output);
29
+ if (await inspectNitroOutput(nitroOutput)) {
23
30
  return loadAdapter('nitro');
24
31
  }
25
- if (hasViteDist) {
32
+ const viteOutput = resolveOutputPath(projectPath, 'vite', output);
33
+ if (await exists(path.join(viteOutput, 'index.html'))) {
26
34
  return loadAdapter('vite');
27
35
  }
28
- throw new Error('Could not detect framework. Expected .next/ (NextJS), .output/nitro.json (Nitro), or dist/index.html (Vite). ' + 'Use --adapter to specify explicitly.');
36
+ const location = output ? ` in ${path.resolve(projectPath, output)}` : '';
37
+ throw new Error(`Could not detect framework${location}. Expected Next.js BUILD_ID + standalone server, ` + 'Nitro server entry, or Vite index.html. ' + 'Use --adapter to specify explicitly.');
29
38
  }
30
39
  async function loadAdapter(name) {
31
40
  switch(name){
32
41
  case 'nextjs':
33
42
  {
34
- const mod = await import('./adapters/nextjs.js');
35
- return mod.nextjsAdapter;
43
+ const mod = await import('../adapters/nextjs.js');
44
+ return new mod.NextjsAdapter({
45
+ logger: adapterLogger
46
+ });
36
47
  }
37
48
  case 'nitro':
38
49
  {
39
- const mod = await import('./adapters/nitro.js');
40
- return mod.nitroAdapter;
50
+ const mod = await import('../adapters/nitro.js');
51
+ return new mod.NitroAdapter();
41
52
  }
42
53
  case 'vite':
43
54
  {
44
- const mod = await import('./adapters/vite.js');
45
- return mod.viteAdapter;
55
+ const mod = await import('../adapters/vite.js');
56
+ return new mod.ViteAdapter();
46
57
  }
47
58
  }
48
59
  }
@@ -14,6 +14,8 @@ export declare function getEnvVar(projectPath: string, key: string): Promise<nul
14
14
  * @returns The value if found, null otherwise
15
15
  */
16
16
  export declare function getEnvVarSync(projectPath: string, key: string): null | string;
17
+ /** Read a dotenv-parsed value without populating process.env. */
18
+ export declare function getParsedEnvVarSync(projectPath: string, key: string): null | string;
17
19
  /**
18
20
  * Add or update an environment variable in .env file
19
21
  *
@@ -22,6 +24,19 @@ export declare function getEnvVarSync(projectPath: string, key: string): null |
22
24
  * @param value - Environment variable value
23
25
  */
24
26
  export declare function addOrUpdateEnvVar(projectPath: string, key: string, value: string): Promise<void>;
27
+ /**
28
+ * Comment out an environment variable in .env file by prepending `# ` to any
29
+ * assignment line for the given key. Preserves the value so the developer can
30
+ * uncomment it later (or move it to another env file). No-op if the key is
31
+ * absent or every occurrence is already commented.
32
+ *
33
+ * @param projectPath - Path to project directory
34
+ * @param key - Environment variable name to disable
35
+ * @param annotation - Optional trailing comment appended to each disabled
36
+ * line, so the developer knows why it was disabled
37
+ * @returns true if at least one line was commented out, false otherwise
38
+ */
39
+ export declare function commentOutEnvVar(projectPath: string, key: string, annotation?: string): Promise<boolean>;
25
40
  /**
26
41
  * Remove an environment variable from .env file
27
42
  *
@@ -1,3 +1,4 @@
1
+ import { parse } from 'dotenv';
1
2
  import fs from 'fs/promises';
2
3
  import fsSync from 'node:fs';
3
4
  import path from 'path';
@@ -54,6 +55,14 @@ import path from 'path';
54
55
  return null;
55
56
  }
56
57
  }
58
+ /** Read a dotenv-parsed value without populating process.env. */ export function getParsedEnvVarSync(projectPath, key) {
59
+ try {
60
+ const contents = fsSync.readFileSync(path.join(projectPath, '.env'), 'utf-8');
61
+ return parse(contents)[key] ?? null;
62
+ } catch {
63
+ return null;
64
+ }
65
+ }
57
66
  /**
58
67
  * Add or update an environment variable in .env file
59
68
  *
@@ -115,6 +124,44 @@ import path from 'path';
115
124
  throw new Error(`Failed to update .env file: ${error instanceof Error ? error.message : 'Unknown error'}`);
116
125
  }
117
126
  }
127
+ /**
128
+ * Comment out an environment variable in .env file by prepending `# ` to any
129
+ * assignment line for the given key. Preserves the value so the developer can
130
+ * uncomment it later (or move it to another env file). No-op if the key is
131
+ * absent or every occurrence is already commented.
132
+ *
133
+ * @param projectPath - Path to project directory
134
+ * @param key - Environment variable name to disable
135
+ * @param annotation - Optional trailing comment appended to each disabled
136
+ * line, so the developer knows why it was disabled
137
+ * @returns true if at least one line was commented out, false otherwise
138
+ */ export async function commentOutEnvVar(projectPath, key, annotation) {
139
+ const envPath = path.join(projectPath, '.env');
140
+ try {
141
+ const contents = await fs.readFile(envPath, 'utf-8');
142
+ const lines = contents.split(/\r?\n/);
143
+ let changed = false;
144
+ const updated = lines.map((line)=>{
145
+ if (!line.includes('=') || line.trim().startsWith('#')) {
146
+ return line;
147
+ }
148
+ const equalsIndex = line.indexOf('=');
149
+ const lineKey = line.substring(0, equalsIndex).trim();
150
+ if (lineKey !== key) {
151
+ return line;
152
+ }
153
+ changed = true;
154
+ const suffix = annotation ? ` # ${annotation}` : '';
155
+ return `# ${line}${suffix}`;
156
+ });
157
+ if (changed) {
158
+ await fs.writeFile(envPath, updated.join('\n'), 'utf-8');
159
+ }
160
+ return changed;
161
+ } catch {
162
+ return false;
163
+ }
164
+ }
118
165
  /**
119
166
  * Remove an environment variable from .env file
120
167
  *