@rivetkit/next-js 2.2.0 → 2.2.1-pr.4600.b74ff3b

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.
package/README.md CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  RivetKit Next.js is a framework for building serverless and edge applications using Next.js, leveraging RivetKit's actor model for scalable and efficient microservices.
4
4
 
5
- [Learn More →](https://github.com/rivet-dev/rivetkit)
5
+ [Learn More →](https://github.com/rivet-dev/rivet)
6
6
 
7
- [Discord](https://rivet.dev/discord) — [Documentation](https://rivetkit.org) — [Issues](https://github.com/rivet-dev/rivetkit/issues)
7
+ [Discord](https://rivet.dev/discord) — [Documentation](https://rivetkit.org) — [Issues](https://github.com/rivet-dev/rivet/issues)
8
8
 
9
9
  ## License
10
10
 
11
- Apache 2.0
11
+ Apache 2.0
package/dist/mod.js CHANGED
@@ -5,7 +5,7 @@ function logger() {
5
5
  }
6
6
 
7
7
  // src/mod.ts
8
- var DEV_RUNNER_VERSION = Math.floor(Date.now() / 1e3);
8
+ var DEV_ENVOY_VERSION = Math.floor(Date.now() / 1e3);
9
9
  var toNextHandler = (registry) => {
10
10
  registry.config.serveManager = false;
11
11
  registry.config.serverless = {
@@ -18,17 +18,18 @@ var toNextHandler = (registry) => {
18
18
  );
19
19
  const publicUrl = _nullishCoalesce(_nullishCoalesce(process.env.NEXT_PUBLIC_SITE_URL, () => ( process.env.NEXT_PUBLIC_VERCEL_URL)), () => ( `http://127.0.0.1:${_nullishCoalesce(process.env.PORT, () => ( 3e3))}`));
20
20
  registry.config.serverless.spawnEngine = true;
21
- registry.config.serverless.configureRunnerPool = {
21
+ registry.config.serverless.configurePool = {
22
22
  url: `${publicUrl}/api/rivet`,
23
+ requestLifespan: 300,
24
+ maxConcurrentActors: 1e5,
25
+ metadata: { provider: "next-js" },
23
26
  minRunners: 0,
24
27
  maxRunners: 1e5,
25
- requestLifespan: 300,
26
- slotsPerRunner: 1,
27
- metadata: { provider: "next-js" }
28
+ slotsPerRunner: 1
28
29
  };
29
- registry.config.runner = {
30
- ...registry.config.runner,
31
- version: DEV_RUNNER_VERSION
30
+ registry.config.envoy = {
31
+ ...registry.config.envoy,
32
+ version: DEV_ENVOY_VERSION
32
33
  };
33
34
  } else {
34
35
  logger().debug(
package/dist/mod.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/next-js/dist/mod.js","../src/log.ts","../src/mod.ts"],"names":[],"mappings":"AAAA;ACAA,mCAA0B;AAEnB,SAAS,MAAA,CAAA,EAAS;AACxB,EAAA,OAAO,4BAAA,gBAA0B,CAAA;AAClC;ADCA;AACA;AEIA,IAAM,mBAAA,EAAqB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,EAAA,EAAI,GAAI,CAAA;AAEhD,IAAM,cAAA,EAAgB,CAAC,QAAA,EAAA,GAA4B;AAEzD,EAAA,QAAA,CAAS,MAAA,CAAO,aAAA,EAAe,KAAA;AAG/B,EAAA,QAAA,CAAS,MAAA,CAAO,WAAA,EAAa;AAAA,IAC5B,GAAG,QAAA,CAAS,MAAA,CAAO,UAAA;AAAA,IACnB,QAAA,EAAU;AAAA,EACX,CAAA;AAEA,EAAA,GAAA,CAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,IAAa,YAAA,EAAc;AAC1C,IAAA,MAAA,CAAO,CAAA,CAAE,KAAA;AAAA,MACR;AAAA,IACD,CAAA;AAEA,IAAA,MAAM,UAAA,oCACL,OAAA,CAAQ,GAAA,CAAI,oBAAA,UACZ,OAAA,CAAQ,GAAA,CAAI,wBAAA,UACZ,CAAA,iBAAA,mBAAoB,OAAA,CAAQ,GAAA,CAAI,IAAA,UAAQ,KAAI,CAAA,GAAA;AAIJ,IAAA;AACQ,IAAA;AAC/B,MAAA;AACL,MAAA;AACA,MAAA;AACK,MAAA;AACD,MAAA;AACgB,MAAA;AACjC,IAAA;AAGyB,IAAA;AACL,MAAA;AACV,MAAA;AACV,IAAA;AACM,EAAA;AACG,IAAA;AACR,MAAA;AACD,IAAA;AACD,EAAA;AAG4B,EAAA;AAKJ,EAAA;AACD,IAAA;AACe,IAAA;AACC,IAAA;AAEuB,IAAA;AAC9D,EAAA;AAEO,EAAA;AACD,IAAA;AACC,IAAA;AACD,IAAA;AACG,IAAA;AACD,IAAA;AACD,IAAA;AACG,IAAA;AACV,EAAA;AACD;AFxB4I;AACA;AACA","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/next-js/dist/mod.js","sourcesContent":[null,"import { getLogger } from \"rivetkit/log\";\n\nexport function logger() {\n\treturn getLogger(\"driver-next-js\");\n}\n","import type { Registry } from \"rivetkit\";\nimport { logger } from \"./log\";\n\n// Runner version set to seconds since epoch when the module loads in development mode.\n//\n// This creates a version number that increments each time the code is updated\n// and the module reloads, allowing the engine to detect code changes via the\n// /metadata endpoint and hot-reload all actors by draining older runners.\n//\n// We use seconds (not milliseconds) because the runner version is a u32 on the engine side.\nconst DEV_RUNNER_VERSION = Math.floor(Date.now() / 1000);\n\nexport const toNextHandler = (registry: Registry<any>) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tregistry.config.serveManager = false;\n\n\t// Set basePath to \"/\" since Next.js route strips the /api/rivet prefix\n\tregistry.config.serverless = {\n\t\t...registry.config.serverless,\n\t\tbasePath: \"/\",\n\t};\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tlogger().debug(\n\t\t\t\"detected development environment, auto-starting engine and auto-configuring serverless\",\n\t\t);\n\n\t\tconst publicUrl =\n\t\t\tprocess.env.NEXT_PUBLIC_SITE_URL ??\n\t\t\tprocess.env.NEXT_PUBLIC_VERCEL_URL ??\n\t\t\t`http://127.0.0.1:${process.env.PORT ?? 3000}`;\n\n\t\t// Set these on the registry's config directly since the legacy inputConfig\n\t\t// isn't used by the serverless router\n\t\tregistry.config.serverless.spawnEngine = true;\n\t\tregistry.config.serverless.configureRunnerPool = {\n\t\t\turl: `${publicUrl}/api/rivet`,\n\t\t\tminRunners: 0,\n\t\t\tmaxRunners: 100_000,\n\t\t\trequestLifespan: 300,\n\t\t\tslotsPerRunner: 1,\n\t\t\tmetadata: { provider: \"next-js\" },\n\t\t};\n\n\t\t// Set runner version to enable hot-reloading on code changes\n\t\tregistry.config.runner = {\n\t\t\t...registry.config.runner,\n\t\t\tversion: DEV_RUNNER_VERSION,\n\t\t};\n\t} else {\n\t\tlogger().debug(\n\t\t\t\"detected production environment, will not auto-start engine and auto-configure serverless\",\n\t\t);\n\t}\n\n\t// Next logs this on every request\n\tregistry.config.noWelcome = true;\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t): Promise<Response> => {\n\t\tconst { all } = await params;\n\t\tconst targetUrl = new URL(request.url);\n\t\ttargetUrl.pathname = `/${all.join(\"/\")}`;\n\n\t\treturn await registry.handler(new Request(targetUrl, request));\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: fetchWrapper,\n\t\tDELETE: fetchWrapper,\n\t\tPATCH: fetchWrapper,\n\t\tHEAD: fetchWrapper,\n\t\tOPTIONS: fetchWrapper,\n\t};\n};\n"]}
1
+ {"version":3,"sources":["/home/runner/work/rivet/rivet/rivetkit-typescript/packages/next-js/dist/mod.js","../src/log.ts","../src/mod.ts"],"names":[],"mappings":"AAAA;ACAA,mCAA0B;AAEnB,SAAS,MAAA,CAAA,EAAS;AACxB,EAAA,OAAO,4BAAA,gBAA0B,CAAA;AAClC;ADCA;AACA;AEIA,IAAM,kBAAA,EAAoB,IAAA,CAAK,KAAA,CAAM,IAAA,CAAK,GAAA,CAAI,EAAA,EAAI,GAAI,CAAA;AAE/C,IAAM,cAAA,EAAgB,CAAC,QAAA,EAAA,GAA4B;AAEzD,EAAA,QAAA,CAAS,MAAA,CAAO,aAAA,EAAe,KAAA;AAG/B,EAAA,QAAA,CAAS,MAAA,CAAO,WAAA,EAAa;AAAA,IAC5B,GAAG,QAAA,CAAS,MAAA,CAAO,UAAA;AAAA,IACnB,QAAA,EAAU;AAAA,EACX,CAAA;AAEA,EAAA,GAAA,CAAI,OAAA,CAAQ,GAAA,CAAI,SAAA,IAAa,YAAA,EAAc;AAC1C,IAAA,MAAA,CAAO,CAAA,CAAE,KAAA;AAAA,MACR;AAAA,IACD,CAAA;AAEA,IAAA,MAAM,UAAA,oCACL,OAAA,CAAQ,GAAA,CAAI,oBAAA,UACZ,OAAA,CAAQ,GAAA,CAAI,wBAAA,UACZ,CAAA,iBAAA,mBAAoB,OAAA,CAAQ,GAAA,CAAI,IAAA,UAAQ,KAAI,CAAA,GAAA;AAIJ,IAAA;AACE,IAAA;AACzB,MAAA;AACA,MAAA;AACI,MAAA;AACW,MAAA;AAEpB,MAAA;AACA,MAAA;AACI,MAAA;AACjB,IAAA;AAGwB,IAAA;AACJ,MAAA;AACV,MAAA;AACV,IAAA;AACM,EAAA;AACG,IAAA;AACR,MAAA;AACD,IAAA;AACD,EAAA;AAG4B,EAAA;AAKJ,EAAA;AACD,IAAA;AACe,IAAA;AACC,IAAA;AAEuB,IAAA;AAC9D,EAAA;AAEO,EAAA;AACD,IAAA;AACC,IAAA;AACD,IAAA;AACG,IAAA;AACD,IAAA;AACD,IAAA;AACG,IAAA;AACV,EAAA;AACD;AFzB4I;AACA;AACA","file":"/home/runner/work/rivet/rivet/rivetkit-typescript/packages/next-js/dist/mod.js","sourcesContent":[null,"import { getLogger } from \"rivetkit/log\";\n\nexport function logger() {\n\treturn getLogger(\"driver-next-js\");\n}\n","import type { Registry } from \"rivetkit\";\nimport { logger } from \"./log\";\n\n// Envoy version set to seconds since epoch when the module loads in development mode.\n//\n// This creates a version number that increments each time the code is updated\n// and the module reloads, allowing the engine to detect code changes via the\n// /metadata endpoint and hot-reload all actors by draining older envoys.\n//\n// We use seconds (not milliseconds) because the envoy version is a u32 on the engine side.\nconst DEV_ENVOY_VERSION = Math.floor(Date.now() / 1000);\n\nexport const toNextHandler = (registry: Registry<any>) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tregistry.config.serveManager = false;\n\n\t// Set basePath to \"/\" since Next.js route strips the /api/rivet prefix\n\tregistry.config.serverless = {\n\t\t...registry.config.serverless,\n\t\tbasePath: \"/\",\n\t};\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tlogger().debug(\n\t\t\t\"detected development environment, auto-starting engine and auto-configuring serverless\",\n\t\t);\n\n\t\tconst publicUrl =\n\t\t\tprocess.env.NEXT_PUBLIC_SITE_URL ??\n\t\t\tprocess.env.NEXT_PUBLIC_VERCEL_URL ??\n\t\t\t`http://127.0.0.1:${process.env.PORT ?? 3000}`;\n\n\t\t// Set these on the registry's config directly since the legacy inputConfig\n\t\t// isn't used by the serverless router\n\t\tregistry.config.serverless.spawnEngine = true;\n\t\tregistry.config.serverless.configurePool = {\n\t\t\turl: `${publicUrl}/api/rivet`,\n\t\t\trequestLifespan: 300,\n\t\t\tmaxConcurrentActors: 100_000,\n\t\t\tmetadata: { provider: \"next-js\" },\n\n\t\t\tminRunners: 0,\n\t\t\tmaxRunners: 100_000,\n\t\t\tslotsPerRunner: 1,\n\t\t};\n\n\t\t// Set envoy version to enable hot-reloading on code changes\n\t\tregistry.config.envoy = {\n\t\t\t...registry.config.envoy,\n\t\t\tversion: DEV_ENVOY_VERSION,\n\t\t};\n\t} else {\n\t\tlogger().debug(\n\t\t\t\"detected production environment, will not auto-start engine and auto-configure serverless\",\n\t\t);\n\t}\n\n\t// Next logs this on every request\n\tregistry.config.noWelcome = true;\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t): Promise<Response> => {\n\t\tconst { all } = await params;\n\t\tconst targetUrl = new URL(request.url);\n\t\ttargetUrl.pathname = `/${all.join(\"/\")}`;\n\n\t\treturn await registry.handler(new Request(targetUrl, request));\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: fetchWrapper,\n\t\tDELETE: fetchWrapper,\n\t\tPATCH: fetchWrapper,\n\t\tHEAD: fetchWrapper,\n\t\tOPTIONS: fetchWrapper,\n\t};\n};\n"]}
package/dist/mod.mjs CHANGED
@@ -5,7 +5,7 @@ function logger() {
5
5
  }
6
6
 
7
7
  // src/mod.ts
8
- var DEV_RUNNER_VERSION = Math.floor(Date.now() / 1e3);
8
+ var DEV_ENVOY_VERSION = Math.floor(Date.now() / 1e3);
9
9
  var toNextHandler = (registry) => {
10
10
  registry.config.serveManager = false;
11
11
  registry.config.serverless = {
@@ -18,17 +18,18 @@ var toNextHandler = (registry) => {
18
18
  );
19
19
  const publicUrl = process.env.NEXT_PUBLIC_SITE_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL ?? `http://127.0.0.1:${process.env.PORT ?? 3e3}`;
20
20
  registry.config.serverless.spawnEngine = true;
21
- registry.config.serverless.configureRunnerPool = {
21
+ registry.config.serverless.configurePool = {
22
22
  url: `${publicUrl}/api/rivet`,
23
+ requestLifespan: 300,
24
+ maxConcurrentActors: 1e5,
25
+ metadata: { provider: "next-js" },
23
26
  minRunners: 0,
24
27
  maxRunners: 1e5,
25
- requestLifespan: 300,
26
- slotsPerRunner: 1,
27
- metadata: { provider: "next-js" }
28
+ slotsPerRunner: 1
28
29
  };
29
- registry.config.runner = {
30
- ...registry.config.runner,
31
- version: DEV_RUNNER_VERSION
30
+ registry.config.envoy = {
31
+ ...registry.config.envoy,
32
+ version: DEV_ENVOY_VERSION
32
33
  };
33
34
  } else {
34
35
  logger().debug(
package/dist/mod.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/log.ts","../src/mod.ts"],"sourcesContent":["import { getLogger } from \"rivetkit/log\";\n\nexport function logger() {\n\treturn getLogger(\"driver-next-js\");\n}\n","import type { Registry } from \"rivetkit\";\nimport { logger } from \"./log\";\n\n// Runner version set to seconds since epoch when the module loads in development mode.\n//\n// This creates a version number that increments each time the code is updated\n// and the module reloads, allowing the engine to detect code changes via the\n// /metadata endpoint and hot-reload all actors by draining older runners.\n//\n// We use seconds (not milliseconds) because the runner version is a u32 on the engine side.\nconst DEV_RUNNER_VERSION = Math.floor(Date.now() / 1000);\n\nexport const toNextHandler = (registry: Registry<any>) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tregistry.config.serveManager = false;\n\n\t// Set basePath to \"/\" since Next.js route strips the /api/rivet prefix\n\tregistry.config.serverless = {\n\t\t...registry.config.serverless,\n\t\tbasePath: \"/\",\n\t};\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tlogger().debug(\n\t\t\t\"detected development environment, auto-starting engine and auto-configuring serverless\",\n\t\t);\n\n\t\tconst publicUrl =\n\t\t\tprocess.env.NEXT_PUBLIC_SITE_URL ??\n\t\t\tprocess.env.NEXT_PUBLIC_VERCEL_URL ??\n\t\t\t`http://127.0.0.1:${process.env.PORT ?? 3000}`;\n\n\t\t// Set these on the registry's config directly since the legacy inputConfig\n\t\t// isn't used by the serverless router\n\t\tregistry.config.serverless.spawnEngine = true;\n\t\tregistry.config.serverless.configureRunnerPool = {\n\t\t\turl: `${publicUrl}/api/rivet`,\n\t\t\tminRunners: 0,\n\t\t\tmaxRunners: 100_000,\n\t\t\trequestLifespan: 300,\n\t\t\tslotsPerRunner: 1,\n\t\t\tmetadata: { provider: \"next-js\" },\n\t\t};\n\n\t\t// Set runner version to enable hot-reloading on code changes\n\t\tregistry.config.runner = {\n\t\t\t...registry.config.runner,\n\t\t\tversion: DEV_RUNNER_VERSION,\n\t\t};\n\t} else {\n\t\tlogger().debug(\n\t\t\t\"detected production environment, will not auto-start engine and auto-configure serverless\",\n\t\t);\n\t}\n\n\t// Next logs this on every request\n\tregistry.config.noWelcome = true;\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t): Promise<Response> => {\n\t\tconst { all } = await params;\n\t\tconst targetUrl = new URL(request.url);\n\t\ttargetUrl.pathname = `/${all.join(\"/\")}`;\n\n\t\treturn await registry.handler(new Request(targetUrl, request));\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: fetchWrapper,\n\t\tDELETE: fetchWrapper,\n\t\tPATCH: fetchWrapper,\n\t\tHEAD: fetchWrapper,\n\t\tOPTIONS: fetchWrapper,\n\t};\n};\n"],"mappings":";AAAA,SAAS,iBAAiB;AAEnB,SAAS,SAAS;AACxB,SAAO,UAAU,gBAAgB;AAClC;;;ACMA,IAAM,qBAAqB,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;AAEhD,IAAM,gBAAgB,CAAC,aAA4B;AAEzD,WAAS,OAAO,eAAe;AAG/B,WAAS,OAAO,aAAa;AAAA,IAC5B,GAAG,SAAS,OAAO;AAAA,IACnB,UAAU;AAAA,EACX;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AAC1C,WAAO,EAAE;AAAA,MACR;AAAA,IACD;AAEA,UAAM,YACL,QAAQ,IAAI,wBACZ,QAAQ,IAAI,0BACZ,oBAAoB,QAAQ,IAAI,QAAQ,GAAI;AAI7C,aAAS,OAAO,WAAW,cAAc;AACzC,aAAS,OAAO,WAAW,sBAAsB;AAAA,MAChD,KAAK,GAAG,SAAS;AAAA,MACjB,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,iBAAiB;AAAA,MACjB,gBAAgB;AAAA,MAChB,UAAU,EAAE,UAAU,UAAU;AAAA,IACjC;AAGA,aAAS,OAAO,SAAS;AAAA,MACxB,GAAG,SAAS,OAAO;AAAA,MACnB,SAAS;AAAA,IACV;AAAA,EACD,OAAO;AACN,WAAO,EAAE;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAGA,WAAS,OAAO,YAAY;AAE5B,QAAM,eAAe,OACpB,SACA,EAAE,OAAO,MACc;AACvB,UAAM,EAAE,IAAI,IAAI,MAAM;AACtB,UAAM,YAAY,IAAI,IAAI,QAAQ,GAAG;AACrC,cAAU,WAAW,IAAI,IAAI,KAAK,GAAG,CAAC;AAEtC,WAAO,MAAM,SAAS,QAAQ,IAAI,QAAQ,WAAW,OAAO,CAAC;AAAA,EAC9D;AAEA,SAAO;AAAA,IACN,KAAK;AAAA,IACL,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACD;","names":[]}
1
+ {"version":3,"sources":["../src/log.ts","../src/mod.ts"],"sourcesContent":["import { getLogger } from \"rivetkit/log\";\n\nexport function logger() {\n\treturn getLogger(\"driver-next-js\");\n}\n","import type { Registry } from \"rivetkit\";\nimport { logger } from \"./log\";\n\n// Envoy version set to seconds since epoch when the module loads in development mode.\n//\n// This creates a version number that increments each time the code is updated\n// and the module reloads, allowing the engine to detect code changes via the\n// /metadata endpoint and hot-reload all actors by draining older envoys.\n//\n// We use seconds (not milliseconds) because the envoy version is a u32 on the engine side.\nconst DEV_ENVOY_VERSION = Math.floor(Date.now() / 1000);\n\nexport const toNextHandler = (registry: Registry<any>) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tregistry.config.serveManager = false;\n\n\t// Set basePath to \"/\" since Next.js route strips the /api/rivet prefix\n\tregistry.config.serverless = {\n\t\t...registry.config.serverless,\n\t\tbasePath: \"/\",\n\t};\n\n\tif (process.env.NODE_ENV !== \"production\") {\n\t\tlogger().debug(\n\t\t\t\"detected development environment, auto-starting engine and auto-configuring serverless\",\n\t\t);\n\n\t\tconst publicUrl =\n\t\t\tprocess.env.NEXT_PUBLIC_SITE_URL ??\n\t\t\tprocess.env.NEXT_PUBLIC_VERCEL_URL ??\n\t\t\t`http://127.0.0.1:${process.env.PORT ?? 3000}`;\n\n\t\t// Set these on the registry's config directly since the legacy inputConfig\n\t\t// isn't used by the serverless router\n\t\tregistry.config.serverless.spawnEngine = true;\n\t\tregistry.config.serverless.configurePool = {\n\t\t\turl: `${publicUrl}/api/rivet`,\n\t\t\trequestLifespan: 300,\n\t\t\tmaxConcurrentActors: 100_000,\n\t\t\tmetadata: { provider: \"next-js\" },\n\n\t\t\tminRunners: 0,\n\t\t\tmaxRunners: 100_000,\n\t\t\tslotsPerRunner: 1,\n\t\t};\n\n\t\t// Set envoy version to enable hot-reloading on code changes\n\t\tregistry.config.envoy = {\n\t\t\t...registry.config.envoy,\n\t\t\tversion: DEV_ENVOY_VERSION,\n\t\t};\n\t} else {\n\t\tlogger().debug(\n\t\t\t\"detected production environment, will not auto-start engine and auto-configure serverless\",\n\t\t);\n\t}\n\n\t// Next logs this on every request\n\tregistry.config.noWelcome = true;\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t): Promise<Response> => {\n\t\tconst { all } = await params;\n\t\tconst targetUrl = new URL(request.url);\n\t\ttargetUrl.pathname = `/${all.join(\"/\")}`;\n\n\t\treturn await registry.handler(new Request(targetUrl, request));\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: fetchWrapper,\n\t\tDELETE: fetchWrapper,\n\t\tPATCH: fetchWrapper,\n\t\tHEAD: fetchWrapper,\n\t\tOPTIONS: fetchWrapper,\n\t};\n};\n"],"mappings":";AAAA,SAAS,iBAAiB;AAEnB,SAAS,SAAS;AACxB,SAAO,UAAU,gBAAgB;AAClC;;;ACMA,IAAM,oBAAoB,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI;AAE/C,IAAM,gBAAgB,CAAC,aAA4B;AAEzD,WAAS,OAAO,eAAe;AAG/B,WAAS,OAAO,aAAa;AAAA,IAC5B,GAAG,SAAS,OAAO;AAAA,IACnB,UAAU;AAAA,EACX;AAEA,MAAI,QAAQ,IAAI,aAAa,cAAc;AAC1C,WAAO,EAAE;AAAA,MACR;AAAA,IACD;AAEA,UAAM,YACL,QAAQ,IAAI,wBACZ,QAAQ,IAAI,0BACZ,oBAAoB,QAAQ,IAAI,QAAQ,GAAI;AAI7C,aAAS,OAAO,WAAW,cAAc;AACzC,aAAS,OAAO,WAAW,gBAAgB;AAAA,MAC1C,KAAK,GAAG,SAAS;AAAA,MACjB,iBAAiB;AAAA,MACjB,qBAAqB;AAAA,MACrB,UAAU,EAAE,UAAU,UAAU;AAAA,MAEhC,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,gBAAgB;AAAA,IACjB;AAGA,aAAS,OAAO,QAAQ;AAAA,MACvB,GAAG,SAAS,OAAO;AAAA,MACnB,SAAS;AAAA,IACV;AAAA,EACD,OAAO;AACN,WAAO,EAAE;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAGA,WAAS,OAAO,YAAY;AAE5B,QAAM,eAAe,OACpB,SACA,EAAE,OAAO,MACc;AACvB,UAAM,EAAE,IAAI,IAAI,MAAM;AACtB,UAAM,YAAY,IAAI,IAAI,QAAQ,GAAG;AACrC,cAAU,WAAW,IAAI,IAAI,KAAK,GAAG,CAAC;AAEtC,WAAO,MAAM,SAAS,QAAQ,IAAI,QAAQ,WAAW,OAAO,CAAC;AAAA,EAC9D;AAEA,SAAO;AAAA,IACN,KAAK;AAAA,IACL,MAAM;AAAA,IACN,KAAK;AAAA,IACL,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,SAAS;AAAA,EACV;AACD;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/next-js",
3
- "version": "2.2.0",
3
+ "version": "2.2.1-pr.4600.b74ff3b",
4
4
  "description": "Next.js integration for RivetKit actors and client",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -48,9 +48,9 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
+ "@rivetkit/react": "2.2.1-pr.4600.b74ff3b",
51
52
  "hono": "^4.8.3",
52
- "@rivetkit/react": "2.2.0",
53
- "rivetkit": "^2.2.0"
53
+ "rivetkit": "^2.2.1-pr.4600.b74ff3b"
54
54
  },
55
55
  "peerDependencies": {
56
56
  "react": "^18 || ^19",