prjct-cli 0.35.1 → 0.35.3

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 (368) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/core/commands/workflow.ts +25 -9
  3. package/dist/bin/prjct.mjs +22 -8
  4. package/package.json +1 -1
  5. package/templates/_bases/tracker-base.md +309 -0
  6. package/templates/agentic/orchestrator.md +211 -269
  7. package/templates/commands/github.md +9 -0
  8. package/templates/commands/history.md +296 -83
  9. package/templates/commands/jira.md +9 -0
  10. package/templates/commands/linear.md +9 -0
  11. package/templates/commands/monday.md +9 -0
  12. package/templates/commands/p.md +198 -63
  13. package/templates/commands/resume.md +68 -4
  14. package/templates/commands/sync.md +103 -0
  15. package/packages/shared/node_modules/@types/bun/LICENSE +0 -21
  16. package/packages/shared/node_modules/@types/bun/README.md +0 -20
  17. package/packages/shared/node_modules/@types/bun/index.d.ts +0 -1
  18. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/CLAUDE.md +0 -105
  19. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/README.md +0 -33
  20. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bun.d.ts +0 -7032
  21. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bun.ns.d.ts +0 -5
  22. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/bundle.d.ts +0 -74
  23. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/deprecated.d.ts +0 -184
  24. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/devserver.d.ts +0 -187
  25. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/README.md +0 -28
  26. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/bytecode.mdx +0 -465
  27. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/css.mdx +0 -1024
  28. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/esbuild.mdx +0 -298
  29. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/executables.mdx +0 -1277
  30. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/fullstack.mdx +0 -1086
  31. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/hot-reloading.mdx +0 -229
  32. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/html-static.mdx +0 -488
  33. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/index.mdx +0 -1604
  34. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/loaders.mdx +0 -451
  35. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/macros.mdx +0 -328
  36. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/minifier.mdx +0 -1286
  37. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/bundler/plugins.mdx +0 -425
  38. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/feedback.mdx +0 -75
  39. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +0 -29
  40. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +0 -26
  41. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +0 -27
  42. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +0 -17
  43. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +0 -41
  44. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +0 -16
  45. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +0 -16
  46. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +0 -16
  47. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +0 -17
  48. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +0 -16
  49. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +0 -16
  50. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +0 -16
  51. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +0 -43
  52. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +0 -27
  53. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +0 -16
  54. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +0 -17
  55. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +0 -27
  56. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +0 -18
  57. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +0 -16
  58. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +0 -16
  59. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +0 -43
  60. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +0 -18
  61. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +0 -204
  62. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +0 -161
  63. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +0 -194
  64. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/railway.mdx +0 -145
  65. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/render.mdx +0 -82
  66. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/deployment/vercel.mdx +0 -97
  67. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +0 -82
  68. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +0 -80
  69. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +0 -151
  70. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +0 -195
  71. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +0 -31
  72. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/express.mdx +0 -43
  73. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +0 -261
  74. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +0 -47
  75. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +0 -92
  76. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +0 -234
  77. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +0 -60
  78. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +0 -103
  79. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +0 -96
  80. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +0 -55
  81. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +0 -169
  82. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +0 -164
  83. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +0 -114
  84. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/react.mdx +0 -52
  85. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +0 -97
  86. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +0 -54
  87. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +0 -62
  88. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +0 -49
  89. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +0 -54
  90. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +0 -138
  91. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +0 -114
  92. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +0 -791
  93. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +0 -87
  94. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +0 -77
  95. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +0 -71
  96. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +0 -97
  97. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/cluster.mdx +0 -69
  98. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +0 -35
  99. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/fetch.mdx +0 -26
  100. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/file-uploads.mdx +0 -97
  101. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/hot.mdx +0 -28
  102. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/proxy.mdx +0 -50
  103. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/server.mdx +0 -48
  104. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/simple.mdx +0 -20
  105. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-file.mdx +0 -50
  106. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +0 -49
  107. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +0 -22
  108. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/http/tls.mdx +0 -32
  109. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/index.mdx +0 -10
  110. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-dev.mdx +0 -28
  111. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-git.mdx +0 -40
  112. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-optional.mdx +0 -27
  113. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-peer.mdx +0 -45
  114. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add-tarball.mdx +0 -35
  115. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/add.mdx +0 -44
  116. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +0 -76
  117. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/cicd.mdx +0 -43
  118. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/custom-registry.mdx +0 -32
  119. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +0 -230
  120. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +0 -48
  121. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +0 -28
  122. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/npm-alias.mdx +0 -25
  123. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/registry-scope.mdx +0 -40
  124. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/trusted.mdx +0 -52
  125. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/workspaces.mdx +0 -70
  126. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/install/yarnlock.mdx +0 -51
  127. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/argv.mdx +0 -66
  128. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +0 -18
  129. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/ipc.mdx +0 -69
  130. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +0 -15
  131. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/os-signals.mdx +0 -31
  132. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +0 -34
  133. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +0 -28
  134. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/spawn.mdx +0 -43
  135. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/process/stdin.mdx +0 -62
  136. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +0 -30
  137. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/buffer.mdx +0 -21
  138. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/exists.mdx +0 -18
  139. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/json.mdx +0 -19
  140. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/mime.mdx +0 -22
  141. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/stream.mdx +0 -28
  142. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/string.mdx +0 -24
  143. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +0 -23
  144. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/read-file/watch.mdx +0 -66
  145. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +0 -295
  146. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/cicd.mdx +0 -45
  147. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +0 -61
  148. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +0 -149
  149. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +0 -39
  150. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +0 -21
  151. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +0 -28
  152. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-html.mdx +0 -15
  153. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-json.mdx +0 -46
  154. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +0 -32
  155. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +0 -104
  156. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/read-env.mdx +0 -37
  157. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/set-env.mdx +0 -51
  158. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/shell.mdx +0 -42
  159. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/timezone.mdx +0 -38
  160. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +0 -31
  161. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/typescript.mdx +0 -51
  162. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +0 -47
  163. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +0 -103
  164. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +0 -13
  165. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +0 -13
  166. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +0 -14
  167. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +0 -14
  168. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +0 -13
  169. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-array.mdx +0 -16
  170. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +0 -16
  171. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-blob.mdx +0 -16
  172. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +0 -17
  173. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-json.mdx +0 -16
  174. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-string.mdx +0 -16
  175. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +0 -24
  176. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/bail.mdx +0 -24
  177. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +0 -146
  178. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +0 -67
  179. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/coverage.mdx +0 -49
  180. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/happy-dom.mdx +0 -73
  181. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +0 -125
  182. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/mock-clock.mdx +0 -50
  183. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/mock-functions.mdx +0 -70
  184. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/rerun-each.mdx +0 -16
  185. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/run-tests.mdx +0 -116
  186. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/skip-tests.mdx +0 -43
  187. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/snapshot.mdx +0 -102
  188. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/spy-on.mdx +0 -49
  189. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/svelte-test.mdx +0 -113
  190. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/testing-library.mdx +0 -93
  191. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/timeout.mdx +0 -17
  192. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/todo-tests.mdx +0 -74
  193. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +0 -49
  194. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/test/watch-mode.mdx +0 -24
  195. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/base64.mdx +0 -17
  196. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/deep-equals.mdx +0 -41
  197. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/deflate.mdx +0 -20
  198. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/detect-bun.mdx +0 -28
  199. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/entrypoint.mdx +0 -19
  200. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/escape-html.mdx +0 -24
  201. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +0 -16
  202. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/gzip.mdx +0 -20
  203. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +0 -56
  204. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +0 -15
  205. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +0 -15
  206. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +0 -15
  207. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +0 -25
  208. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/main.mdx +0 -43
  209. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +0 -16
  210. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/sleep.mdx +0 -24
  211. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/upgrade.mdx +0 -93
  212. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/version.mdx +0 -23
  213. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +0 -17
  214. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/compression.mdx +0 -33
  215. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/context.mdx +0 -79
  216. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +0 -43
  217. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/websocket/simple.mdx +0 -38
  218. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/append.mdx +0 -54
  219. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/basic.mdx +0 -46
  220. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/blob.mdx +0 -30
  221. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/cat.mdx +0 -19
  222. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +0 -18
  223. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/filesink.mdx +0 -54
  224. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/response.mdx +0 -19
  225. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/stdout.mdx +0 -23
  226. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/stream.mdx +0 -19
  227. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/guides/write-file/unlink.mdx +0 -18
  228. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/index.mdx +0 -133
  229. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/installation.mdx +0 -365
  230. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/bunx.mdx +0 -91
  231. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/catalogs.mdx +0 -292
  232. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/add.mdx +0 -179
  233. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/audit.mdx +0 -60
  234. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/info.mdx +0 -70
  235. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/install.mdx +0 -606
  236. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/link.mdx +0 -61
  237. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/outdated.mdx +0 -197
  238. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/patch.mdx +0 -69
  239. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/pm.mdx +0 -323
  240. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/publish.mdx +0 -131
  241. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/remove.mdx +0 -16
  242. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/update.mdx +0 -140
  243. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/cli/why.mdx +0 -84
  244. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/filter.mdx +0 -102
  245. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/global-cache.mdx +0 -72
  246. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/isolated-installs.mdx +0 -220
  247. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/lifecycle.mdx +0 -64
  248. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/lockfile.mdx +0 -64
  249. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/npmrc.mdx +0 -111
  250. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/overrides.mdx +0 -83
  251. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/scopes-registries.mdx +0 -35
  252. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/security-scanner-api.mdx +0 -95
  253. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/pm/workspaces.mdx +0 -115
  254. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/benchmarking.mdx +0 -241
  255. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/bindgen.mdx +0 -223
  256. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/building-windows.mdx +0 -133
  257. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/contributing.mdx +0 -388
  258. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/feedback.mdx +0 -20
  259. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/license.mdx +0 -78
  260. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/project/roadmap.mdx +0 -8
  261. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/quickstart.mdx +0 -251
  262. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/auto-install.mdx +0 -97
  263. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/binary-data.mdx +0 -846
  264. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/bun-apis.mdx +0 -59
  265. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/bunfig.mdx +0 -723
  266. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/c-compiler.mdx +0 -204
  267. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/child-process.mdx +0 -659
  268. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/color.mdx +0 -267
  269. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/console.mdx +0 -67
  270. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/cookies.mdx +0 -454
  271. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/debugger.mdx +0 -335
  272. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/environment-variables.mdx +0 -231
  273. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/ffi.mdx +0 -565
  274. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-io.mdx +0 -306
  275. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-system-router.mdx +0 -118
  276. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/file-types.mdx +0 -435
  277. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/glob.mdx +0 -181
  278. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/globals.mdx +0 -72
  279. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/hashing.mdx +0 -315
  280. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/html-rewriter.mdx +0 -333
  281. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/cookies.mdx +0 -79
  282. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/error-handling.mdx +0 -40
  283. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/metrics.mdx +0 -36
  284. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/routing.mdx +0 -289
  285. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/server.mdx +0 -645
  286. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/tls.mdx +0 -101
  287. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/http/websockets.mdx +0 -414
  288. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/index.mdx +0 -223
  289. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/jsx.mdx +0 -115
  290. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/module-resolution.mdx +0 -374
  291. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/dns.mdx +0 -111
  292. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/fetch.mdx +0 -484
  293. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/tcp.mdx +0 -239
  294. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/networking/udp.mdx +0 -129
  295. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/node-api.mdx +0 -19
  296. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +0 -468
  297. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/plugins.mdx +0 -419
  298. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/redis.mdx +0 -583
  299. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/s3.mdx +0 -863
  300. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/secrets.mdx +0 -340
  301. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/semver.mdx +0 -57
  302. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/shell.mdx +0 -637
  303. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/sql.mdx +0 -1404
  304. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/sqlite.mdx +0 -721
  305. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/streams.mdx +0 -232
  306. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/templating/create.mdx +0 -269
  307. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/templating/init.mdx +0 -58
  308. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/transpiler.mdx +0 -288
  309. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/typescript.mdx +0 -58
  310. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/utils.mdx +0 -922
  311. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/watch-mode.mdx +0 -161
  312. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/web-apis.mdx +0 -29
  313. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/workers.mdx +0 -314
  314. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/runtime/yaml.mdx +0 -469
  315. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/add.mdx +0 -166
  316. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/build.mdx +0 -196
  317. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/bunx.mdx +0 -49
  318. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/feedback.mdx +0 -17
  319. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/init.mdx +0 -84
  320. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/install.mdx +0 -173
  321. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/link.mdx +0 -163
  322. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/outdated.mdx +0 -140
  323. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/patch.mdx +0 -171
  324. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/publish.mdx +0 -198
  325. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/remove.mdx +0 -146
  326. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/run.mdx +0 -293
  327. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/test.mdx +0 -100
  328. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/snippets/cli/update.mdx +0 -144
  329. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/code-coverage.mdx +0 -409
  330. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/configuration.mdx +0 -514
  331. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/dates-times.mdx +0 -129
  332. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/discovery.mdx +0 -90
  333. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/dom.mdx +0 -226
  334. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/index.mdx +0 -380
  335. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/lifecycle.mdx +0 -366
  336. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/mocks.mdx +0 -637
  337. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/reporters.mdx +0 -126
  338. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/runtime-behavior.mdx +0 -342
  339. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/snapshots.mdx +0 -434
  340. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/test/writing-tests.mdx +0 -672
  341. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/docs/typescript.mdx +0 -54
  342. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/extensions.d.ts +0 -35
  343. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/fetch.d.ts +0 -79
  344. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/ffi.d.ts +0 -1154
  345. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/globals.d.ts +0 -2067
  346. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/html-rewriter.d.ts +0 -186
  347. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/index.d.ts +0 -32
  348. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/jsc.d.ts +0 -233
  349. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/overrides.d.ts +0 -376
  350. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/package.json +0 -37
  351. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/redis.d.ts +0 -3352
  352. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/s3.d.ts +0 -1299
  353. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/security.d.ts +0 -101
  354. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/serve.d.ts +0 -1296
  355. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/shell.d.ts +0 -380
  356. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/sql.d.ts +0 -887
  357. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/sqlite.d.ts +0 -1321
  358. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/test-globals.d.ts +0 -22
  359. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/test.d.ts +0 -2391
  360. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/branding.d.ts +0 -283
  361. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/index.d.ts +0 -1207
  362. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/messages.d.ts +0 -395
  363. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/overloads.d.ts +0 -669
  364. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/vendor/expect-type/utils.d.ts +0 -431
  365. package/packages/shared/node_modules/@types/bun/node_modules/bun-types/wasm.d.ts +0 -193
  366. package/packages/shared/node_modules/@types/bun/package.json +0 -53
  367. package/templates/commands/redo.md +0 -144
  368. package/templates/commands/undo.md +0 -154
@@ -1,1299 +0,0 @@
1
- declare module "bun" {
2
- /**
3
- * Fast incremental writer for files and pipes.
4
- *
5
- * This uses the same interface as {@link ArrayBufferSink}, but writes to a file or pipe.
6
- */
7
- interface FileSink {
8
- /**
9
- * Write a chunk of data to the file.
10
- *
11
- * If the file descriptor is not writable yet, the data is buffered.
12
- *
13
- * @param chunk The data to write
14
- * @returns Number of bytes written
15
- */
16
- write(chunk: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer): number;
17
- /**
18
- * Flush the internal buffer, committing the data to disk or the pipe.
19
- *
20
- * @returns Number of bytes flushed or a Promise resolving to the number of bytes
21
- */
22
- flush(): number | Promise<number>;
23
- /**
24
- * Close the file descriptor. This also flushes the internal buffer.
25
- *
26
- * @param error Optional error to associate with the close operation
27
- * @returns Number of bytes written or a Promise resolving to the number of bytes
28
- */
29
- end(error?: Error): number | Promise<number>;
30
-
31
- /**
32
- * Start the file sink with provided options.
33
- *
34
- * @param options Configuration options for the file sink
35
- */
36
- start(options?: {
37
- /**
38
- * Preallocate an internal buffer of this size
39
- * This can significantly improve performance when the chunk size is small
40
- */
41
- highWaterMark?: number;
42
- }): void;
43
-
44
- /**
45
- * For FIFOs & pipes, this lets you decide whether Bun's process should
46
- * remain alive until the pipe is closed.
47
- *
48
- * By default, it is automatically managed. While the stream is open, the
49
- * process remains alive and once the other end hangs up or the stream
50
- * closes, the process exits.
51
- *
52
- * If you previously called {@link unref}, you can call this again to re-enable automatic management.
53
- *
54
- * Internally, it will reference count the number of times this is called. By default, that number is 1
55
- *
56
- * If the file is not a FIFO or pipe, {@link ref} and {@link unref} do
57
- * nothing. If the pipe is already closed, this does nothing.
58
- */
59
- ref(): void;
60
-
61
- /**
62
- * For FIFOs & pipes, this lets you decide whether Bun's process should
63
- * remain alive until the pipe is closed.
64
- *
65
- * If you want to allow Bun's process to terminate while the stream is open,
66
- * call this.
67
- *
68
- * If the file is not a FIFO or pipe, {@link ref} and {@link unref} do
69
- * nothing. If the pipe is already closed, this does nothing.
70
- */
71
- unref(): void;
72
- }
73
-
74
- interface NetworkSink extends FileSink {
75
- /**
76
- * Write a chunk of data to the network.
77
- *
78
- * If the network is not writable yet, the data is buffered.
79
- *
80
- * @param chunk The data to write
81
- * @returns Number of bytes written
82
- */
83
- write(chunk: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer): number;
84
- /**
85
- * Flush the internal buffer, committing the data to the network.
86
- *
87
- * @returns Number of bytes flushed or a Promise resolving to the number of bytes
88
- */
89
- flush(): number | Promise<number>;
90
- /**
91
- * Finish the upload. This also flushes the internal buffer.
92
- *
93
- * @param error Optional error to associate with the end operation
94
- * @returns Number of bytes written or a Promise resolving to the number of bytes
95
- */
96
- end(error?: Error): number | Promise<number>;
97
-
98
- /**
99
- * Get the stat of the file.
100
- *
101
- * @returns Promise resolving to the file stats
102
- */
103
- stat(): Promise<import("node:fs").Stats>;
104
- }
105
-
106
- /**
107
- * Configuration options for S3 operations
108
- */
109
- interface S3Options extends BlobPropertyBag {
110
- /**
111
- * The Access Control List (ACL) policy for the file.
112
- * Controls who can access the file and what permissions they have.
113
- *
114
- * @example
115
- * // Setting public read access
116
- * const file = s3.file("public-file.txt", {
117
- * acl: "public-read",
118
- * bucket: "my-bucket"
119
- * });
120
- *
121
- * @example
122
- * // Using with presigned URLs
123
- * const url = file.presign({
124
- * acl: "public-read",
125
- * expiresIn: 3600
126
- * });
127
- */
128
- acl?:
129
- | "private"
130
- | "public-read"
131
- | "public-read-write"
132
- | "aws-exec-read"
133
- | "authenticated-read"
134
- | "bucket-owner-read"
135
- | "bucket-owner-full-control"
136
- | "log-delivery-write";
137
-
138
- /**
139
- * The S3 bucket name. Defaults to `S3_BUCKET` or `AWS_BUCKET` environment variables.
140
- *
141
- * @example
142
- * // Using explicit bucket
143
- * const file = s3.file("my-file.txt", { bucket: "my-bucket" });
144
- *
145
- * @example
146
- * // Using environment variables
147
- * // With S3_BUCKET=my-bucket in .env
148
- * const file = s3.file("my-file.txt");
149
- */
150
- bucket?: string;
151
-
152
- /**
153
- * The AWS region. Defaults to `S3_REGION` or `AWS_REGION` environment variables.
154
- *
155
- * @example
156
- * const file = s3.file("my-file.txt", {
157
- * bucket: "my-bucket",
158
- * region: "us-west-2"
159
- * });
160
- */
161
- region?: string;
162
-
163
- /**
164
- * The access key ID for authentication.
165
- * Defaults to `S3_ACCESS_KEY_ID` or `AWS_ACCESS_KEY_ID` environment variables.
166
- */
167
- accessKeyId?: string;
168
-
169
- /**
170
- * The secret access key for authentication.
171
- * Defaults to `S3_SECRET_ACCESS_KEY` or `AWS_SECRET_ACCESS_KEY` environment variables.
172
- */
173
- secretAccessKey?: string;
174
-
175
- /**
176
- * Optional session token for temporary credentials.
177
- * Defaults to `S3_SESSION_TOKEN` or `AWS_SESSION_TOKEN` environment variables.
178
- *
179
- * @example
180
- * // Using temporary credentials
181
- * const file = s3.file("my-file.txt", {
182
- * accessKeyId: tempAccessKey,
183
- * secretAccessKey: tempSecretKey,
184
- * sessionToken: tempSessionToken
185
- * });
186
- */
187
- sessionToken?: string;
188
-
189
- /**
190
- * The S3-compatible service endpoint URL.
191
- * Defaults to `S3_ENDPOINT` or `AWS_ENDPOINT` environment variables.
192
- *
193
- * @example
194
- * // AWS S3
195
- * const file = s3.file("my-file.txt", {
196
- * endpoint: "https://s3.us-east-1.amazonaws.com"
197
- * });
198
- *
199
- * @example
200
- * // Cloudflare R2
201
- * const file = s3.file("my-file.txt", {
202
- * endpoint: "https://<account-id>.r2.cloudflarestorage.com"
203
- * });
204
- *
205
- * @example
206
- * // DigitalOcean Spaces
207
- * const file = s3.file("my-file.txt", {
208
- * endpoint: "https://<region>.digitaloceanspaces.com"
209
- * });
210
- *
211
- * @example
212
- * // MinIO (local development)
213
- * const file = s3.file("my-file.txt", {
214
- * endpoint: "http://localhost:9000"
215
- * });
216
- */
217
- endpoint?: string;
218
-
219
- /**
220
- * Use virtual hosted style endpoint. default to false, when true if `endpoint` is informed it will ignore the `bucket`
221
- *
222
- * @example
223
- * // Using virtual hosted style
224
- * const file = s3.file("my-file.txt", {
225
- * virtualHostedStyle: true,
226
- * endpoint: "https://my-bucket.s3.us-east-1.amazonaws.com"
227
- * });
228
- */
229
- virtualHostedStyle?: boolean;
230
-
231
- /**
232
- * The size of each part in multipart uploads (in bytes).
233
- * - Minimum: 5 MiB
234
- * - Maximum: 5120 MiB
235
- * - Default: 5 MiB
236
- *
237
- * @example
238
- * // Configuring multipart uploads
239
- * const file = s3.file("large-file.dat", {
240
- * partSize: 10 * 1024 * 1024, // 10 MiB parts
241
- * queueSize: 4 // Upload 4 parts in parallel
242
- * });
243
- *
244
- * const writer = file.writer();
245
- * // ... write large file in chunks
246
- */
247
- partSize?: number;
248
-
249
- /**
250
- * Number of parts to upload in parallel for multipart uploads.
251
- * - Default: 5
252
- * - Maximum: 255
253
- *
254
- * Increasing this value can improve upload speeds for large files
255
- * but will use more memory.
256
- */
257
- queueSize?: number;
258
-
259
- /**
260
- * Number of retry attempts for failed uploads.
261
- * - Default: 3
262
- * - Maximum: 255
263
- *
264
- * @example
265
- * // Setting retry attempts
266
- * const file = s3.file("my-file.txt", {
267
- * retry: 5 // Retry failed uploads up to 5 times
268
- * });
269
- */
270
- retry?: number;
271
-
272
- /**
273
- * The Content-Type of the file.
274
- * Automatically set based on file extension when possible.
275
- *
276
- * @example
277
- * // Setting explicit content type
278
- * const file = s3.file("data.bin", {
279
- * type: "application/octet-stream"
280
- * });
281
- */
282
- type?: string;
283
-
284
- /**
285
- * The Content-Disposition header value.
286
- * Controls how the file is presented when downloaded.
287
- *
288
- * @example
289
- * // Setting attachment disposition with filename
290
- * const file = s3.file("report.pdf", {
291
- * contentDisposition: "attachment; filename=\"quarterly-report.pdf\""
292
- * });
293
- *
294
- * @example
295
- * // Setting inline disposition
296
- * await s3.write("image.png", imageData, {
297
- * contentDisposition: "inline"
298
- * });
299
- */
300
- contentDisposition?: string | undefined;
301
-
302
- /**
303
- * By default, Amazon S3 uses the STANDARD Storage Class to store newly created objects.
304
- *
305
- * @example
306
- * // Setting explicit Storage class
307
- * const file = s3.file("my-file.json", {
308
- * storageClass: "STANDARD_IA"
309
- * });
310
- */
311
- storageClass?:
312
- | "STANDARD"
313
- | "DEEP_ARCHIVE"
314
- | "EXPRESS_ONEZONE"
315
- | "GLACIER"
316
- | "GLACIER_IR"
317
- | "INTELLIGENT_TIERING"
318
- | "ONEZONE_IA"
319
- | "OUTPOSTS"
320
- | "REDUCED_REDUNDANCY"
321
- | "SNOW"
322
- | "STANDARD_IA";
323
-
324
- /**
325
- * @deprecated The size of the internal buffer in bytes. Defaults to 5 MiB. use `partSize` and `queueSize` instead.
326
- */
327
- highWaterMark?: number;
328
- }
329
-
330
- /**
331
- * Options for generating presigned URLs
332
- */
333
- interface S3FilePresignOptions extends S3Options {
334
- /**
335
- * Number of seconds until the presigned URL expires.
336
- * - Default: 86400 (1 day)
337
- *
338
- * @example
339
- * // Short-lived URL
340
- * const url = file.presign({
341
- * expiresIn: 3600 // 1 hour
342
- * });
343
- *
344
- * @example
345
- * // Long-lived public URL
346
- * const url = file.presign({
347
- * expiresIn: 7 * 24 * 60 * 60, // 7 days
348
- * acl: "public-read"
349
- * });
350
- */
351
- expiresIn?: number;
352
-
353
- /**
354
- * The HTTP method allowed for the presigned URL.
355
- *
356
- * @example
357
- * // GET URL for downloads
358
- * const downloadUrl = file.presign({
359
- * method: "GET",
360
- * expiresIn: 3600
361
- * });
362
- *
363
- * @example
364
- * // PUT URL for uploads
365
- * const uploadUrl = file.presign({
366
- * method: "PUT",
367
- * expiresIn: 3600,
368
- * type: "application/json"
369
- * });
370
- */
371
- method?: "GET" | "POST" | "PUT" | "DELETE" | "HEAD";
372
- }
373
-
374
- interface S3Stats {
375
- size: number;
376
- lastModified: Date;
377
- etag: string;
378
- type: string;
379
- }
380
-
381
- /**
382
- * Represents a file in an S3-compatible storage service.
383
- * Extends the Blob interface for compatibility with web APIs.
384
- *
385
- * @category Cloud Storage
386
- */
387
- interface S3File extends Blob {
388
- /**
389
- * The size of the file in bytes.
390
- * This is a Promise because it requires a network request to determine the size.
391
- *
392
- * @example
393
- * // Getting file size
394
- * const size = await file.size;
395
- * console.log(`File size: ${size} bytes`);
396
- *
397
- * @example
398
- * // Check if file is larger than 1MB
399
- * if (await file.size > 1024 * 1024) {
400
- * console.log("Large file detected");
401
- * }
402
- */
403
- /**
404
- * TODO: figure out how to get the typescript types to not error for this property.
405
- */
406
- // size: Promise<number>;
407
-
408
- /**
409
- * Creates a new S3File representing a slice of the original file.
410
- * Uses HTTP Range headers for efficient partial downloads.
411
- *
412
- * @param begin - Starting byte offset
413
- * @param end - Ending byte offset (exclusive)
414
- * @param contentType - Optional MIME type for the slice
415
- * @returns A new S3File representing the specified range
416
- *
417
- * @example
418
- * // Reading file header
419
- * const header = file.slice(0, 1024);
420
- * const headerText = await header.text();
421
- *
422
- * @example
423
- * // Reading with content type
424
- * const jsonSlice = file.slice(1024, 2048, "application/json");
425
- * const data = await jsonSlice.json();
426
- *
427
- * @example
428
- * // Reading from offset to end
429
- * const remainder = file.slice(1024);
430
- * const content = await remainder.text();
431
- */
432
- slice(begin?: number, end?: number, contentType?: string): S3File;
433
- slice(begin?: number, contentType?: string): S3File;
434
- slice(contentType?: string): S3File;
435
-
436
- /**
437
- * Creates a writable stream for uploading data.
438
- * Suitable for large files as it uses multipart upload.
439
- *
440
- * @param options - Configuration for the upload
441
- * @returns A NetworkSink for writing data
442
- *
443
- * @example
444
- * // Basic streaming write
445
- * const writer = file.writer({
446
- * type: "application/json"
447
- * });
448
- * writer.write('{"hello": ');
449
- * writer.write('"world"}');
450
- * await writer.end();
451
- *
452
- * @example
453
- * // Optimized large file upload
454
- * const writer = file.writer({
455
- * partSize: 10 * 1024 * 1024, // 10MB parts
456
- * queueSize: 4, // Upload 4 parts in parallel
457
- * retry: 3 // Retry failed parts
458
- * });
459
- *
460
- * // Write large chunks of data efficiently
461
- * for (const chunk of largeDataChunks) {
462
- * writer.write(chunk);
463
- * }
464
- * await writer.end();
465
- *
466
- * @example
467
- * // Error handling
468
- * const writer = file.writer();
469
- * try {
470
- * writer.write(data);
471
- * await writer.end();
472
- * } catch (err) {
473
- * console.error('Upload failed:', err);
474
- * // Writer will automatically abort multipart upload on error
475
- * }
476
- */
477
- writer(options?: S3Options): NetworkSink;
478
-
479
- /**
480
- * Gets a readable stream of the file's content.
481
- * Useful for processing large files without loading them entirely into memory.
482
- *
483
- * @returns A ReadableStream for the file content
484
- *
485
- * @example
486
- * // Basic streaming read
487
- * const stream = file.stream();
488
- * for await (const chunk of stream) {
489
- * console.log('Received chunk:', chunk);
490
- * }
491
- *
492
- * @example
493
- * // Piping to response
494
- * const stream = file.stream();
495
- * return new Response(stream, {
496
- * headers: { 'Content-Type': file.type }
497
- * });
498
- *
499
- * @example
500
- * // Processing large files
501
- * const stream = file.stream();
502
- * const textDecoder = new TextDecoder();
503
- * for await (const chunk of stream) {
504
- * const text = textDecoder.decode(chunk);
505
- * // Process text chunk by chunk
506
- * }
507
- */
508
- readonly readable: ReadableStream<Uint8Array<ArrayBuffer>>;
509
- stream(): ReadableStream<Uint8Array<ArrayBuffer>>;
510
-
511
- /**
512
- * The name or path of the file in the bucket.
513
- *
514
- * @example
515
- * const file = s3.file("folder/image.jpg");
516
- * console.log(file.name); // "folder/image.jpg"
517
- */
518
- readonly name?: string;
519
-
520
- /**
521
- * The bucket name containing the file.
522
- *
523
- * @example
524
- * const file = s3.file("s3://my-bucket/file.txt");
525
- * console.log(file.bucket); // "my-bucket"
526
- */
527
- readonly bucket?: string;
528
-
529
- /**
530
- * Checks if the file exists in S3.
531
- * Uses HTTP HEAD request to efficiently check existence without downloading.
532
- *
533
- * @returns Promise resolving to true if file exists, false otherwise
534
- *
535
- * @example
536
- * // Basic existence check
537
- * if (await file.exists()) {
538
- * console.log("File exists in S3");
539
- * }
540
- *
541
- * @example
542
- * // With error handling
543
- * try {
544
- * const exists = await file.exists();
545
- * if (!exists) {
546
- * console.log("File not found");
547
- * }
548
- * } catch (err) {
549
- * console.error("Error checking file:", err);
550
- * }
551
- */
552
- exists(): Promise<boolean>;
553
-
554
- /**
555
- * Uploads data to S3.
556
- * Supports various input types and automatically handles large files.
557
- *
558
- * @param data - The data to upload
559
- * @param options - Upload configuration options
560
- * @returns Promise resolving to number of bytes written
561
- *
562
- * @example
563
- * // Writing string data
564
- * await file.write("Hello World", {
565
- * type: "text/plain"
566
- * });
567
- *
568
- * @example
569
- * // Writing JSON
570
- * const data = { hello: "world" };
571
- * await file.write(JSON.stringify(data), {
572
- * type: "application/json"
573
- * });
574
- *
575
- * @example
576
- * // Writing from Response
577
- * const response = await fetch("https://example.com/data");
578
- * await file.write(response);
579
- *
580
- * @example
581
- * // Writing with ACL
582
- * await file.write(data, {
583
- * acl: "public-read",
584
- * type: "application/octet-stream"
585
- * });
586
- */
587
- write(
588
- data: string | ArrayBufferView | ArrayBuffer | SharedArrayBuffer | Request | Response | BunFile | S3File | Blob,
589
- options?: S3Options,
590
- ): Promise<number>;
591
-
592
- /**
593
- * Generates a presigned URL for the file.
594
- * Allows temporary access to the file without exposing credentials.
595
- *
596
- * @param options - Configuration for the presigned URL
597
- * @returns Presigned URL string
598
- *
599
- * @example
600
- * // Basic download URL
601
- * const url = file.presign({
602
- * expiresIn: 3600 // 1 hour
603
- * });
604
- *
605
- * @example
606
- * // Upload URL with specific content type
607
- * const uploadUrl = file.presign({
608
- * method: "PUT",
609
- * expiresIn: 3600,
610
- * type: "image/jpeg",
611
- * acl: "public-read"
612
- * });
613
- *
614
- * @example
615
- * // URL with custom permissions
616
- * const url = file.presign({
617
- * method: "GET",
618
- * expiresIn: 7 * 24 * 60 * 60, // 7 days
619
- * acl: "public-read"
620
- * });
621
- */
622
- presign(options?: S3FilePresignOptions): string;
623
-
624
- /**
625
- * Deletes the file from S3.
626
- *
627
- * @returns Promise that resolves when deletion is complete
628
- *
629
- * @example
630
- * // Basic deletion
631
- * await file.delete();
632
- *
633
- * @example
634
- * // With error handling
635
- * try {
636
- * await file.delete();
637
- * console.log("File deleted successfully");
638
- * } catch (err) {
639
- * console.error("Failed to delete file:", err);
640
- * }
641
- */
642
- delete(): Promise<void>;
643
-
644
- /**
645
- * Alias for delete() method.
646
- * Provided for compatibility with Node.js fs API naming.
647
- *
648
- * @example
649
- * await file.unlink();
650
- */
651
- unlink: S3File["delete"];
652
-
653
- /**
654
- * Get the stat of a file in an S3-compatible storage service.
655
- *
656
- * @returns Promise resolving to S3Stat
657
- */
658
- stat(): Promise<S3Stats>;
659
- }
660
-
661
- interface S3ListObjectsOptions {
662
- /** Limits the response to keys that begin with the specified prefix. */
663
- prefix?: string;
664
- /** ContinuationToken indicates to S3 that the list is being continued on this bucket with a token. ContinuationToken is obfuscated and is not a real key. You can use this ContinuationToken for pagination of the list results. */
665
- continuationToken?: string;
666
- /** A delimiter is a character that you use to group keys. */
667
- delimiter?: string;
668
- /** Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. */
669
- maxKeys?: number;
670
- /** StartAfter is where you want S3 to start listing from. S3 starts listing after this specified key. StartAfter can be any key in the bucket. */
671
- startAfter?: string;
672
- /** Encoding type used by S3 to encode the object keys in the response. Responses are encoded only in UTF-8. An object key can contain any Unicode character. However, the XML 1.0 parser can't parse certain characters, such as characters with an ASCII value from 0 to 10. For characters that aren't supported in XML 1.0, you can add this parameter to request that S3 encode the keys in the response. */
673
- encodingType?: "url";
674
- /** If you want to return the owner field with each key in the result, then set the FetchOwner field to true. */
675
- fetchOwner?: boolean;
676
- }
677
-
678
- interface S3ListObjectsResponse {
679
- /** All of the keys (up to 1,000) that share the same prefix are grouped together. When counting the total numbers of returns by this API operation, this group of keys is considered as one item.
680
- *
681
- * A response can contain CommonPrefixes only if you specify a delimiter.
682
- *
683
- * CommonPrefixes contains all (if there are any) keys between Prefix and the next occurrence of the string specified by a delimiter.
684
- *
685
- * CommonPrefixes lists keys that act like subdirectories in the directory specified by Prefix.
686
- *
687
- * For example, if the prefix is notes/ and the delimiter is a slash (/) as in notes/summer/july, the common prefix is notes/summer/. All of the keys that roll up into a common prefix count as a single return when calculating the number of returns. */
688
- commonPrefixes?: { prefix: string }[];
689
- /** Metadata about each object returned. */
690
- contents?: {
691
- /** The algorithm that was used to create a checksum of the object. */
692
- checksumAlgorithm?: "CRC32" | "CRC32C" | "SHA1" | "SHA256" | "CRC64NVME";
693
- /** The checksum type that is used to calculate the object's checksum value. */
694
- checksumType?: "COMPOSITE" | "FULL_OBJECT";
695
- /**
696
- * The entity tag is a hash of the object. The ETag reflects changes only to the contents of an object, not its metadata. The ETag may or may not be an MD5 digest of the object data. Whether or not it is depends on how the object was created and how it is encrypted as described below:
697
- *
698
- * - Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-S3 or plaintext, have ETags that are an MD5 digest of their object data.
699
- * - Objects created by the PUT Object, POST Object, or Copy operation, or through the AWS Management Console, and are encrypted by SSE-C or SSE-KMS, have ETags that are not an MD5 digest of their object data.
700
- * - If an object is created by either the Multipart Upload or Part Copy operation, the ETag is not an MD5 digest, regardless of the method of encryption. If an object is larger than 16 MB, the AWS Management Console will upload or copy that object as a Multipart Upload, and therefore the ETag will not be an MD5 digest.
701
- *
702
- * MD5 is not supported by directory buckets.
703
- */
704
- eTag?: string;
705
- /** The name that you assign to an object. You use the object key to retrieve the object. */
706
- key: string;
707
- /** Creation date of the object. */
708
- lastModified?: string;
709
- /** The owner of the object */
710
- owner?: {
711
- /** The ID of the owner. */
712
- id?: string;
713
- /** The display name of the owner. */
714
- displayName?: string;
715
- };
716
- /** Specifies the restoration status of an object. Objects in certain storage classes must be restored before they can be retrieved. */
717
- restoreStatus?: {
718
- /** Specifies whether the object is currently being restored. */
719
- isRestoreInProgress?: boolean;
720
- /** Indicates when the restored copy will expire. This value is populated only if the object has already been restored. */
721
- restoreExpiryDate?: string;
722
- };
723
- /** Size in bytes of the object */
724
- size?: number;
725
- /** The class of storage used to store the object. */
726
- storageClass?:
727
- | "STANDARD"
728
- | "REDUCED_REDUNDANCY"
729
- | "GLACIER"
730
- | "STANDARD_IA"
731
- | "ONEZONE_IA"
732
- | "INTELLIGENT_TIERING"
733
- | "DEEP_ARCHIVE"
734
- | "OUTPOSTS"
735
- | "GLACIER_IR"
736
- | "SNOW"
737
- | "EXPRESS_ONEZONE";
738
- }[];
739
- /** If ContinuationToken was sent with the request, it is included in the response. You can use the returned ContinuationToken for pagination of the list response. */
740
- continuationToken?: string;
741
- /** Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response. Each rolled-up result counts as only one return against the MaxKeys value. */
742
- delimiter?: string;
743
- /** Encoding type used by S3 to encode object key names in the XML response. */
744
- encodingType?: "url";
745
- /** Set to false if all of the results were returned. Set to true if more keys are available to return. If the number of results exceeds that specified by MaxKeys, all of the results might not be returned. */
746
- isTruncated?: boolean;
747
- /** KeyCount is the number of keys returned with this request. KeyCount will always be less than or equal to the MaxKeys field. For example, if you ask for 50 keys, your result will include 50 keys or fewer. */
748
- keyCount?: number;
749
- /** Sets the maximum number of keys returned in the response. By default, the action returns up to 1,000 key names. The response might contain fewer keys but will never contain more. */
750
- maxKeys?: number;
751
- /** The bucket name. */
752
- name?: string;
753
- /** NextContinuationToken is sent when isTruncated is true, which means there are more keys in the bucket that can be listed. The next list requests to S3 can be continued with this NextContinuationToken. NextContinuationToken is obfuscated and is not a real key. */
754
- nextContinuationToken?: string;
755
- /** Keys that begin with the indicated prefix. */
756
- prefix?: string;
757
- /** If StartAfter was sent with the request, it is included in the response. */
758
- startAfter?: string;
759
- }
760
-
761
- /**
762
- * A configured S3 bucket instance for managing files.
763
- * The instance is callable to create S3File instances and provides methods
764
- * for common operations.
765
- *
766
- * @example
767
- * // Basic bucket setup
768
- * const bucket = new S3Client({
769
- * bucket: "my-bucket",
770
- * accessKeyId: "key",
771
- * secretAccessKey: "secret"
772
- * });
773
- *
774
- * // Get file instance
775
- * const file = bucket.file("image.jpg");
776
- *
777
- * // Common operations
778
- * await bucket.write("data.json", JSON.stringify({hello: "world"}));
779
- * const url = bucket.presign("file.pdf");
780
- * await bucket.unlink("old.txt");
781
- *
782
- * @category Cloud Storage
783
- */
784
- class S3Client {
785
- /**
786
- * Create a new instance of an S3 bucket so that credentials can be managed
787
- * from a single instance instead of being passed to every method.
788
- *
789
- * @param options The default options to use for the S3 client. Can be
790
- * overriden by passing options to the methods.
791
- * @returns A new S3Client instance
792
- *
793
- * ## Keep S3 credentials in a single instance
794
- *
795
- * @example
796
- * const bucket = new Bun.S3Client({
797
- * accessKeyId: "your-access-key",
798
- * secretAccessKey: "your-secret-key",
799
- * bucket: "my-bucket",
800
- * endpoint: "https://s3.us-east-1.amazonaws.com",
801
- * sessionToken: "your-session-token",
802
- * });
803
- *
804
- * // S3Client is callable, so you can do this:
805
- * const file = bucket.file("my-file.txt");
806
- *
807
- * // or this:
808
- * await file.write("Hello Bun!");
809
- * await file.text();
810
- *
811
- * // To delete the file:
812
- * await bucket.delete("my-file.txt");
813
- *
814
- * // To write a file without returning the instance:
815
- * await bucket.write("my-file.txt", "Hello Bun!");
816
- *
817
- */
818
- constructor(options?: S3Options);
819
-
820
- /**
821
- * Creates an S3File instance for the given path.
822
- *
823
- * @param path The path to the file in the bucket
824
- * @param options Additional S3 options to override defaults
825
- * @returns An S3File instance
826
- *
827
- * @example
828
- * const file = bucket.file("image.jpg");
829
- * await file.write(imageData);
830
- *
831
- * const configFile = bucket.file("config.json", {
832
- * type: "application/json",
833
- * acl: "private"
834
- * });
835
- */
836
- file(path: string, options?: S3Options): S3File;
837
-
838
- /**
839
- * Creates an S3File instance for the given path.
840
- *
841
- * @param path The path to the file in the bucket
842
- * @param options S3 credentials and configuration options
843
- * @returns An S3File instance
844
- *
845
- * @example
846
- * const file = S3Client.file("image.jpg", credentials);
847
- * await file.write(imageData);
848
- *
849
- * const configFile = S3Client.file("config.json", {
850
- * ...credentials,
851
- * type: "application/json",
852
- * acl: "private"
853
- * });
854
- */
855
- static file(path: string, options?: S3Options): S3File;
856
-
857
- /**
858
- * Writes data directly to a path in the bucket.
859
- * Supports strings, buffers, streams, and web API types.
860
- *
861
- * @param path The path to the file in the bucket
862
- * @param data The data to write to the file
863
- * @param options Additional S3 options to override defaults
864
- * @returns The number of bytes written
865
- *
866
- * @example
867
- * // Write string
868
- * await bucket.write("hello.txt", "Hello World");
869
- *
870
- * // Write JSON with type
871
- * await bucket.write(
872
- * "data.json",
873
- * JSON.stringify({hello: "world"}),
874
- * {type: "application/json"}
875
- * );
876
- *
877
- * // Write from fetch
878
- * const res = await fetch("https://example.com/data");
879
- * await bucket.write("data.bin", res);
880
- *
881
- * // Write with ACL
882
- * await bucket.write("public.html", html, {
883
- * acl: "public-read",
884
- * type: "text/html"
885
- * });
886
- */
887
- write(
888
- path: string,
889
- data:
890
- | string
891
- | ArrayBufferView
892
- | ArrayBuffer
893
- | SharedArrayBuffer
894
- | Request
895
- | Response
896
- | BunFile
897
- | S3File
898
- | Blob
899
- | File,
900
- options?: S3Options,
901
- ): Promise<number>;
902
-
903
- /**
904
- * Writes data directly to a path in the bucket.
905
- * Supports strings, buffers, streams, and web API types.
906
- *
907
- * @param path The path to the file in the bucket
908
- * @param data The data to write to the file
909
- * @param options S3 credentials and configuration options
910
- * @returns The number of bytes written
911
- *
912
- * @example
913
- * // Write string
914
- * await S3Client.write("hello.txt", "Hello World", credentials);
915
- *
916
- * // Write JSON with type
917
- * await S3Client.write(
918
- * "data.json",
919
- * JSON.stringify({hello: "world"}),
920
- * {
921
- * ...credentials,
922
- * type: "application/json"
923
- * }
924
- * );
925
- *
926
- * // Write from fetch
927
- * const res = await fetch("https://example.com/data");
928
- * await S3Client.write("data.bin", res, credentials);
929
- *
930
- * // Write with ACL
931
- * await S3Client.write("public.html", html, {
932
- * ...credentials,
933
- * acl: "public-read",
934
- * type: "text/html"
935
- * });
936
- */
937
- static write(
938
- path: string,
939
- data:
940
- | string
941
- | ArrayBufferView
942
- | ArrayBuffer
943
- | SharedArrayBuffer
944
- | Request
945
- | Response
946
- | BunFile
947
- | S3File
948
- | Blob
949
- | File,
950
- options?: S3Options,
951
- ): Promise<number>;
952
-
953
- /**
954
- * Generate a presigned URL for temporary access to a file.
955
- * Useful for generating upload/download URLs without exposing credentials.
956
- *
957
- * @param path The path to the file in the bucket
958
- * @param options Options for generating the presigned URL
959
- * @returns A presigned URL string
960
- *
961
- * @example
962
- * // Download URL
963
- * const downloadUrl = bucket.presign("file.pdf", {
964
- * expiresIn: 3600 // 1 hour
965
- * });
966
- *
967
- * // Upload URL
968
- * const uploadUrl = bucket.presign("uploads/image.jpg", {
969
- * method: "PUT",
970
- * expiresIn: 3600,
971
- * type: "image/jpeg",
972
- * acl: "public-read"
973
- * });
974
- *
975
- * // Long-lived public URL
976
- * const publicUrl = bucket.presign("public/doc.pdf", {
977
- * expiresIn: 7 * 24 * 60 * 60, // 7 days
978
- * acl: "public-read"
979
- * });
980
- */
981
- presign(path: string, options?: S3FilePresignOptions): string;
982
-
983
- /**
984
- * Generate a presigned URL for temporary access to a file.
985
- * Useful for generating upload/download URLs without exposing credentials.
986
- *
987
- * @param path The path to the file in the bucket
988
- * @param options S3 credentials and presigned URL configuration
989
- * @returns A presigned URL string
990
- *
991
- * @example
992
- * // Download URL
993
- * const downloadUrl = S3Client.presign("file.pdf", {
994
- * ...credentials,
995
- * expiresIn: 3600 // 1 hour
996
- * });
997
- *
998
- * // Upload URL
999
- * const uploadUrl = S3Client.presign("uploads/image.jpg", {
1000
- * ...credentials,
1001
- * method: "PUT",
1002
- * expiresIn: 3600,
1003
- * type: "image/jpeg",
1004
- * acl: "public-read"
1005
- * });
1006
- *
1007
- * // Long-lived public URL
1008
- * const publicUrl = S3Client.presign("public/doc.pdf", {
1009
- * ...credentials,
1010
- * expiresIn: 7 * 24 * 60 * 60, // 7 days
1011
- * acl: "public-read"
1012
- * });
1013
- */
1014
- static presign(path: string, options?: S3FilePresignOptions): string;
1015
-
1016
- /**
1017
- * Delete a file from the bucket.
1018
- *
1019
- * @param path The path to the file in the bucket
1020
- * @param options Additional S3 options to override defaults
1021
- * @returns A promise that resolves when deletion is complete
1022
- *
1023
- * @example
1024
- * // Simple delete
1025
- * await bucket.unlink("old-file.txt");
1026
- *
1027
- * // With error handling
1028
- * try {
1029
- * await bucket.unlink("file.dat");
1030
- * console.log("File deleted");
1031
- * } catch (err) {
1032
- * console.error("Delete failed:", err);
1033
- * }
1034
- */
1035
- unlink(path: string, options?: S3Options): Promise<void>;
1036
-
1037
- /**
1038
- * Delete a file from the bucket.
1039
- *
1040
- * @param path The path to the file in the bucket
1041
- * @param options S3 credentials and configuration options
1042
- * @returns A promise that resolves when deletion is complete
1043
- *
1044
- * @example
1045
- * // Simple delete
1046
- * await S3Client.unlink("old-file.txt", credentials);
1047
- *
1048
- * // With error handling
1049
- * try {
1050
- * await S3Client.unlink("file.dat", credentials);
1051
- * console.log("File deleted");
1052
- * } catch (err) {
1053
- * console.error("Delete failed:", err);
1054
- * }
1055
- */
1056
- static unlink(path: string, options?: S3Options): Promise<void>;
1057
-
1058
- /**
1059
- * Delete a file from the bucket.
1060
- * Alias for {@link S3Client.unlink}.
1061
- *
1062
- * @param path The path to the file in the bucket
1063
- * @param options Additional S3 options to override defaults
1064
- * @returns A promise that resolves when deletion is complete
1065
- *
1066
- * @example
1067
- * // Simple delete
1068
- * await bucket.delete("old-file.txt");
1069
- *
1070
- * // With error handling
1071
- * try {
1072
- * await bucket.delete("file.dat");
1073
- * console.log("File deleted");
1074
- * } catch (err) {
1075
- * console.error("Delete failed:", err);
1076
- * }
1077
- */
1078
- delete(path: string, options?: S3Options): Promise<void>;
1079
-
1080
- /**
1081
- * Delete a file from the bucket.
1082
- * Alias for {@link S3Client.unlink}.
1083
- *
1084
- * @param path The path to the file in the bucket
1085
- * @param options S3 credentials and configuration options
1086
- * @returns A promise that resolves when deletion is complete
1087
- *
1088
- * @example
1089
- * // Simple delete
1090
- * await S3Client.delete("old-file.txt", credentials);
1091
- *
1092
- * // With error handling
1093
- * try {
1094
- * await S3Client.delete("file.dat", credentials);
1095
- * console.log("File deleted");
1096
- * } catch (err) {
1097
- * console.error("Delete failed:", err);
1098
- * }
1099
- */
1100
- static delete(path: string, options?: S3Options): Promise<void>;
1101
-
1102
- /**
1103
- * Get the size of a file in bytes.
1104
- * Uses HEAD request to efficiently get size.
1105
- *
1106
- * @param path The path to the file in the bucket
1107
- * @param options Additional S3 options to override defaults
1108
- * @returns A promise that resolves to the file size in bytes
1109
- *
1110
- * @example
1111
- * // Get size
1112
- * const bytes = await bucket.size("video.mp4");
1113
- * console.log(`Size: ${bytes} bytes`);
1114
- *
1115
- * // Check if file is large
1116
- * if (await bucket.size("data.zip") > 100 * 1024 * 1024) {
1117
- * console.log("File is larger than 100MB");
1118
- * }
1119
- */
1120
- size(path: string, options?: S3Options): Promise<number>;
1121
-
1122
- /**
1123
- * Get the size of a file in bytes.
1124
- * Uses HEAD request to efficiently get size.
1125
- *
1126
- * @param path The path to the file in the bucket
1127
- * @param options S3 credentials and configuration options
1128
- * @returns A promise that resolves to the file size in bytes
1129
- *
1130
- * @example
1131
- * // Get size
1132
- * const bytes = await S3Client.size("video.mp4", credentials);
1133
- * console.log(`Size: ${bytes} bytes`);
1134
- *
1135
- * // Check if file is large
1136
- * if (await S3Client.size("data.zip", credentials) > 100 * 1024 * 1024) {
1137
- * console.log("File is larger than 100MB");
1138
- * }
1139
- */
1140
- static size(path: string, options?: S3Options): Promise<number>;
1141
-
1142
- /**
1143
- * Check if a file exists in the bucket.
1144
- * Uses HEAD request to check existence.
1145
- *
1146
- * @param path The path to the file in the bucket
1147
- * @param options Additional S3 options to override defaults
1148
- * @returns A promise that resolves to true if the file exists, false otherwise
1149
- *
1150
- * @example
1151
- * // Check existence
1152
- * if (await bucket.exists("config.json")) {
1153
- * const file = bucket.file("config.json");
1154
- * const config = await file.json();
1155
- * }
1156
- *
1157
- * // With error handling
1158
- * try {
1159
- * if (!await bucket.exists("required.txt")) {
1160
- * throw new Error("Required file missing");
1161
- * }
1162
- * } catch (err) {
1163
- * console.error("Check failed:", err);
1164
- * }
1165
- */
1166
- exists(path: string, options?: S3Options): Promise<boolean>;
1167
-
1168
- /**
1169
- * Check if a file exists in the bucket.
1170
- * Uses HEAD request to check existence.
1171
- *
1172
- * @param path The path to the file in the bucket
1173
- * @param options S3 credentials and configuration options
1174
- * @returns A promise that resolves to true if the file exists, false otherwise
1175
- *
1176
- * @example
1177
- * // Check existence
1178
- * if (await S3Client.exists("config.json", credentials)) {
1179
- * const file = bucket.file("config.json");
1180
- * const config = await file.json();
1181
- * }
1182
- *
1183
- * // With error handling
1184
- * try {
1185
- * if (!await S3Client.exists("required.txt", credentials)) {
1186
- * throw new Error("Required file missing");
1187
- * }
1188
- * } catch (err) {
1189
- * console.error("Check failed:", err);
1190
- * }
1191
- */
1192
- static exists(path: string, options?: S3Options): Promise<boolean>;
1193
-
1194
- /**
1195
- * Get the stat of a file in an S3-compatible storage service.
1196
- *
1197
- * @param path The path to the file in the bucket
1198
- * @param options Additional S3 options to override defaults
1199
- * @returns A promise that resolves to the file stats
1200
- *
1201
- * @example
1202
- * const stat = await bucket.stat("my-file.txt");
1203
- */
1204
- stat(path: string, options?: S3Options): Promise<S3Stats>;
1205
-
1206
- /**
1207
- * Get the stat of a file in an S3-compatible storage service.
1208
- *
1209
- * @param path The path to the file in the bucket
1210
- * @param options S3 credentials and configuration options
1211
- * @returns A promise that resolves to the file stats
1212
- *
1213
- * @example
1214
- * const stat = await S3Client.stat("my-file.txt", credentials);
1215
- */
1216
- static stat(path: string, options?: S3Options): Promise<S3Stats>;
1217
-
1218
- /**
1219
- * Returns some or all (up to 1,000) of the objects in a bucket with each request.
1220
- *
1221
- * You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
1222
- *
1223
- * @param input Options for listing objects in the bucket
1224
- * @param options Additional S3 options to override defaults
1225
- * @returns A promise that resolves to the list response
1226
- *
1227
- * @example
1228
- * // List (up to) 1000 objects in the bucket
1229
- * const allObjects = await bucket.list();
1230
- *
1231
- * // List (up to) 500 objects under `uploads/` prefix, with owner field for each object
1232
- * const uploads = await bucket.list({
1233
- * prefix: 'uploads/',
1234
- * maxKeys: 500,
1235
- * fetchOwner: true,
1236
- * });
1237
- *
1238
- * // Check if more results are available
1239
- * if (uploads.isTruncated) {
1240
- * // List next batch of objects under `uploads/` prefix
1241
- * const moreUploads = await bucket.list({
1242
- * prefix: 'uploads/',
1243
- * maxKeys: 500,
1244
- * startAfter: uploads.contents!.at(-1).key
1245
- * fetchOwner: true,
1246
- * });
1247
- * }
1248
- */
1249
- list(
1250
- input?: S3ListObjectsOptions | null,
1251
- options?: Pick<S3Options, "accessKeyId" | "secretAccessKey" | "sessionToken" | "region" | "bucket" | "endpoint">,
1252
- ): Promise<S3ListObjectsResponse>;
1253
-
1254
- /**
1255
- * Returns some or all (up to 1,000) of the objects in a bucket with each request.
1256
- *
1257
- * You can use the request parameters as selection criteria to return a subset of the objects in a bucket.
1258
- *
1259
- * @param input Options for listing objects in the bucket
1260
- * @param options S3 credentials and configuration options
1261
- * @returns A promise that resolves to the list response
1262
- *
1263
- * @example
1264
- * // List (up to) 1000 objects in the bucket
1265
- * const allObjects = await S3Client.list(null, credentials);
1266
- *
1267
- * // List (up to) 500 objects under `uploads/` prefix, with owner field for each object
1268
- * const uploads = await S3Client.list({
1269
- * prefix: 'uploads/',
1270
- * maxKeys: 500,
1271
- * fetchOwner: true,
1272
- * }, credentials);
1273
- *
1274
- * // Check if more results are available
1275
- * if (uploads.isTruncated) {
1276
- * // List next batch of objects under `uploads/` prefix
1277
- * const moreUploads = await S3Client.list({
1278
- * prefix: 'uploads/',
1279
- * maxKeys: 500,
1280
- * startAfter: uploads.contents!.at(-1).key
1281
- * fetchOwner: true,
1282
- * }, credentials);
1283
- * }
1284
- */
1285
- static list(
1286
- input?: S3ListObjectsOptions | null,
1287
- options?: Pick<S3Options, "accessKeyId" | "secretAccessKey" | "sessionToken" | "region" | "bucket" | "endpoint">,
1288
- ): Promise<S3ListObjectsResponse>;
1289
- }
1290
-
1291
- /**
1292
- * A default instance of S3Client
1293
- *
1294
- * Pulls credentials from environment variables. Use `new Bun.S3Client()` if you need to explicitly set credentials.
1295
- *
1296
- * @category Cloud Storage
1297
- */
1298
- var s3: S3Client;
1299
- }