@rivetkit/next-js 2.0.15 → 2.0.17
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/dist/mod.js +2 -1
- package/dist/mod.js.map +1 -1
- package/dist/mod.mjs +2 -1
- package/dist/mod.mjs.map +1 -1
- package/package.json +3 -3
package/dist/mod.js
CHANGED
|
@@ -8,6 +8,7 @@ function logger() {
|
|
|
8
8
|
var toNextHandler = (registry, inputConfig = {}) => {
|
|
9
9
|
inputConfig.disableDefaultServer = true;
|
|
10
10
|
inputConfig.runnerKind = "serverless";
|
|
11
|
+
inputConfig.disableHealthCheck = true;
|
|
11
12
|
if (process.env.NODE_ENV !== "production") {
|
|
12
13
|
logger().debug(
|
|
13
14
|
"detected development environment, auto-starting engine and auto-configuring serverless"
|
|
@@ -15,7 +16,7 @@ var toNextHandler = (registry, inputConfig = {}) => {
|
|
|
15
16
|
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))}`));
|
|
16
17
|
inputConfig.runEngine = true;
|
|
17
18
|
inputConfig.autoConfigureServerless = {
|
|
18
|
-
url: `${publicUrl}/api/rivet
|
|
19
|
+
url: `${publicUrl}/api/rivet`
|
|
19
20
|
};
|
|
20
21
|
} else {
|
|
21
22
|
logger().debug(
|
package/dist/mod.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/Users/nathan/rivetkit/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;AEHO,IAAM,cAAA,EAAgB,CAC5B,QAAA,EACA,YAAA,EAA8B,CAAC,CAAA,EAAA,GAC3B;AAEJ,EAAA,WAAA,CAAY,qBAAA,EAAuB,IAAA;AAGnC,EAAA,WAAA,CAAY,WAAA,EAAa,YAAA;
|
|
1
|
+
{"version":3,"sources":["/Users/nathan/rivetkit/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;AEHO,IAAM,cAAA,EAAgB,CAC5B,QAAA,EACA,YAAA,EAA8B,CAAC,CAAA,EAAA,GAC3B;AAEJ,EAAA,WAAA,CAAY,qBAAA,EAAuB,IAAA;AAGnC,EAAA,WAAA,CAAY,WAAA,EAAa,YAAA;AAIzB,EAAA,WAAA,CAAY,mBAAA,EAAqB,IAAA;AAGjC,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;AAErB,IAAA;AACc,IAAA;AACpB,MAAA;AAClB,IAAA;AACM,EAAA;AACG,IAAA;AACR,MAAA;AACD,IAAA;AACD,EAAA;AAGwB,EAAA;AAEoB,EAAA;AAKvC,EAAA;AACkB,IAAA;AAEY,IAAA;AACJ,IAAA;AACY,IAAA;AAEjB,IAAA;AAC1B,EAAA;AAEO,EAAA;AACD,IAAA;AACC,IAAA;AACD,IAAA;AACE,IAAA;AACD,IAAA;AACG,IAAA;AACV,EAAA;AACD;AFrB4I;AACA;AACA","file":"/Users/nathan/rivetkit/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, RunConfigInput } from \"rivetkit\";\nimport { logger } from \"./log\";\n\nexport const toNextHandler = (\n\tregistry: Registry<any>,\n\tinputConfig: RunConfigInput = {},\n) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tinputConfig.disableDefaultServer = true;\n\n\t// Configure serverless\n\tinputConfig.runnerKind = \"serverless\";\n\n\t// TODO: We probably want to move this to the registry for all serverless runners\n\t// Metadata endpoint will not exist at 127.0.0.1:6420\n\tinputConfig.disableHealthCheck = true;\n\n\t// Auto-configure serverless runner if not in prod\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\tinputConfig.runEngine = true;\n\t\tinputConfig.autoConfigureServerless = {\n\t\t\turl: `${publicUrl}/api/rivet`,\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\tinputConfig.noWelcome = true;\n\n\tconst { fetch } = registry.start(inputConfig);\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t) => {\n\t\tconst { all } = await params;\n\n\t\tconst newUrl = new URL(request.url);\n\t\tnewUrl.pathname = all.join(\"/\");\n\t\tconst newReq = new Request(newUrl, request);\n\n\t\treturn await fetch(newReq);\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: fetchWrapper,\n\t\tPATCH: fetchWrapper,\n\t\tHEAD: fetchWrapper,\n\t\tOPTIONS: fetchWrapper,\n\t};\n};\n"]}
|
package/dist/mod.mjs
CHANGED
|
@@ -8,6 +8,7 @@ function logger() {
|
|
|
8
8
|
var toNextHandler = (registry, inputConfig = {}) => {
|
|
9
9
|
inputConfig.disableDefaultServer = true;
|
|
10
10
|
inputConfig.runnerKind = "serverless";
|
|
11
|
+
inputConfig.disableHealthCheck = true;
|
|
11
12
|
if (process.env.NODE_ENV !== "production") {
|
|
12
13
|
logger().debug(
|
|
13
14
|
"detected development environment, auto-starting engine and auto-configuring serverless"
|
|
@@ -15,7 +16,7 @@ var toNextHandler = (registry, inputConfig = {}) => {
|
|
|
15
16
|
const publicUrl = process.env.NEXT_PUBLIC_SITE_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL ?? `http://127.0.0.1:${process.env.PORT ?? 3e3}`;
|
|
16
17
|
inputConfig.runEngine = true;
|
|
17
18
|
inputConfig.autoConfigureServerless = {
|
|
18
|
-
url: `${publicUrl}/api/rivet
|
|
19
|
+
url: `${publicUrl}/api/rivet`
|
|
19
20
|
};
|
|
20
21
|
} else {
|
|
21
22
|
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, RunConfigInput } from \"rivetkit\";\nimport { logger } from \"./log\";\n\nexport const toNextHandler = (\n\tregistry: Registry<any>,\n\tinputConfig: RunConfigInput = {},\n) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tinputConfig.disableDefaultServer = true;\n\n\t// Configure serverless\n\tinputConfig.runnerKind = \"serverless\";\n\n\t// Auto-configure serverless runner if not in prod\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\tinputConfig.runEngine = true;\n\t\tinputConfig.autoConfigureServerless = {\n\t\t\turl: `${publicUrl}/api/rivet
|
|
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, RunConfigInput } from \"rivetkit\";\nimport { logger } from \"./log\";\n\nexport const toNextHandler = (\n\tregistry: Registry<any>,\n\tinputConfig: RunConfigInput = {},\n) => {\n\t// Don't run server locally since we're using the fetch handler directly\n\tinputConfig.disableDefaultServer = true;\n\n\t// Configure serverless\n\tinputConfig.runnerKind = \"serverless\";\n\n\t// TODO: We probably want to move this to the registry for all serverless runners\n\t// Metadata endpoint will not exist at 127.0.0.1:6420\n\tinputConfig.disableHealthCheck = true;\n\n\t// Auto-configure serverless runner if not in prod\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\tinputConfig.runEngine = true;\n\t\tinputConfig.autoConfigureServerless = {\n\t\t\turl: `${publicUrl}/api/rivet`,\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\tinputConfig.noWelcome = true;\n\n\tconst { fetch } = registry.start(inputConfig);\n\n\tconst fetchWrapper = async (\n\t\trequest: Request,\n\t\t{ params }: { params: Promise<{ all: string[] }> },\n\t) => {\n\t\tconst { all } = await params;\n\n\t\tconst newUrl = new URL(request.url);\n\t\tnewUrl.pathname = all.join(\"/\");\n\t\tconst newReq = new Request(newUrl, request);\n\n\t\treturn await fetch(newReq);\n\t};\n\n\treturn {\n\t\tGET: fetchWrapper,\n\t\tPOST: fetchWrapper,\n\t\tPUT: 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;;;ACDO,IAAM,gBAAgB,CAC5B,UACA,cAA8B,CAAC,MAC3B;AAEJ,cAAY,uBAAuB;AAGnC,cAAY,aAAa;AAIzB,cAAY,qBAAqB;AAGjC,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;AAE7C,gBAAY,YAAY;AACxB,gBAAY,0BAA0B;AAAA,MACrC,KAAK,GAAG,SAAS;AAAA,IAClB;AAAA,EACD,OAAO;AACN,WAAO,EAAE;AAAA,MACR;AAAA,IACD;AAAA,EACD;AAGA,cAAY,YAAY;AAExB,QAAM,EAAE,MAAM,IAAI,SAAS,MAAM,WAAW;AAE5C,QAAM,eAAe,OACpB,SACA,EAAE,OAAO,MACL;AACJ,UAAM,EAAE,IAAI,IAAI,MAAM;AAEtB,UAAM,SAAS,IAAI,IAAI,QAAQ,GAAG;AAClC,WAAO,WAAW,IAAI,KAAK,GAAG;AAC9B,UAAM,SAAS,IAAI,QAAQ,QAAQ,OAAO;AAE1C,WAAO,MAAM,MAAM,MAAM;AAAA,EAC1B;AAEA,SAAO;AAAA,IACN,KAAK;AAAA,IACL,MAAM;AAAA,IACN,KAAK;AAAA,IACL,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.0.
|
|
3
|
+
"version": "2.0.17",
|
|
4
4
|
"description": "Next.js integration for RivetKit actors and client",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
@@ -49,8 +49,8 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"hono": "^4.8.3",
|
|
52
|
-
"rivetkit": "
|
|
53
|
-
"
|
|
52
|
+
"@rivetkit/react": "2.0.17",
|
|
53
|
+
"rivetkit": "^2.0.17"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"react": "^18 || ^19",
|