Skip to content

🎥 Make videos programmatically with React

export client

Jonny Burger0e89b5b456c5
diff --git a/packages/cloudrun/package.json b/packages/cloudrun/package.json
index 1784551ecd..da1835395e 100644
--- a/packages/cloudrun/package.json
+++ b/packages/cloudrun/package.json
@@ -52,6 +52,9 @@
],
"regions": [
"dist/regions.d.ts"
+ ],
+ "client": [
+ "dist/client.d.ts"
]
}
}
diff --git a/packages/docs/docs/cloudrun/light-client.md b/packages/docs/docs/cloudrun/light-client.md
new file mode 100644
index 0000000000..6ea850787e
--- /dev/null
+++ b/packages/docs/docs/cloudrun/light-client.md
@@ -0,0 +1,39 @@
+---
+sidebar_label: Light client
+title: Light client
+crumb: "Cloud Run"
+---
+
+_available from v4.0.84_
+
+The following methods and types can be imported from `@remotion/cloudrun/client`:
+
+```tsx twoslash
+// organize-imports-ignore
+// ---cut---
+import {
+ deleteService,
+ deleteSite,
+ getOrCreateBucket,
+ getRegions,
+ getServiceInfo,
+ getServices,
+ getSites,
+ renderMediaOnCloudrun,
+ renderStillOnCloudrun,
+ speculateServiceName
+} from "@remotion/cloudrun/client";
+import type {
+ RenderMediaOnCloudrunInput,
+ RenderStillOnCloudrunInput
+} from "@remotion/cloudrun/client"
+```
+
+
+These functions don't have any Node.JS or Bun dependencies and can be bundled with a bundler such as Webpack or ESBuild.
+
+**We don't recommend calling these functions from the browser directly, as you will leak your Google Cloud Platform credentials.**
+
+Instead, this light client is meant to reduce the bundle size and avoid problems if you are calling Remotion Cloud Run APIs from another serverless function and therefore need to bundle your function code.
+
+This import is useful for example for Next.js serverless endpoints or similar, which bundle the server-side code.
diff --git a/packages/docs/docs/lambda/light-client.md b/packages/docs/docs/lambda/light-client.md
index 20fce00ba3..e7ce5db60a 100644
--- a/packages/docs/docs/lambda/light-client.md
+++ b/packages/docs/docs/lambda/light-client.md
@@ -33,7 +33,7 @@ import {
`getServiceClient()` was included from v4.0.60 to v4.0.81 by mistake. Use [`getAwsClient()`](/docs/lambda/getawsclient) instead.
:::
-These functions don't have any Node.JS dependencies and can be bundled with a bundler such as Webpack or ESBuild.
+These functions don't have any Node.JS or Bun dependencies and can be bundled with a bundler such as Webpack or ESBuild.
**We don't recommend calling these functions from the browser directly, as you will leak your AWS credentials.**
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 8b67189bd4..401e1c8a93 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -646,6 +646,7 @@ module.exports = {
"cloudrun/instancecount",
"cloudrun/multiple-buckets",
"cloudrun/limits",
+ "cloudrun/light-client",
"cloudrun/upgrading",
"cloudrun/uninstall",
],