@undefineds.co/xpod 0.3.3 → 0.3.4

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.
@@ -6,12 +6,17 @@ function registerInngestRoutes(server, options) {
6
6
  if (options.runtimeConfig?.enabled !== true) {
7
7
  return;
8
8
  }
9
+ const functionEndpoint = options.runtimeConfig.functionEndpoint
10
+ ? new URL(options.runtimeConfig.functionEndpoint)
11
+ : undefined;
9
12
  const handler = (0, node_1.serve)({
10
13
  client: options.backend.getClient(),
11
14
  functions: [
12
15
  options.backend.agentRunFunction,
13
16
  ...(options.taskScheduler?.getFunctions() ?? []),
14
17
  ],
18
+ serveOrigin: functionEndpoint?.origin,
19
+ servePath: functionEndpoint?.pathname,
15
20
  });
16
21
  const routeHandler = async (req, res) => {
17
22
  handler(req, res);
@@ -1 +1 @@
1
- {"version":3,"file":"InngestHandler.js","sourceRoot":"","sources":["../../../src/api/handlers/InngestHandler.ts"],"names":[],"mappings":";;AAaA,sDAkBC;AA/BD,uCAAqC;AAarC,SAAgB,qBAAqB,CAAC,MAAiB,EAAE,OAA8B;IACrF,IAAI,OAAO,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC;QACpB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE;QACnC,SAAS,EAAE;YACT,OAAO,CAAC,OAAO,CAAC,gBAAgB;YAChC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;SACxC;KACX,CAAC,CAAC;IACH,MAAM,YAAY,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { serve } from 'inngest/node';\nimport type { ApiServer, RouteHandler } from '../ApiServer';\nimport type { InngestRunExecutionBackend } from '../runs/InngestRunExecutionBackend';\nimport type { EmbeddedInngestRuntimeConfig } from '../runs/EmbeddedInngestService';\nimport type { InngestTaskScheduler } from '../tasks/InngestTaskScheduler';\nimport type { StoreContext } from '../chatkit/store';\n\nexport interface InngestHandlerOptions {\n backend: InngestRunExecutionBackend;\n taskScheduler?: InngestTaskScheduler<StoreContext>;\n runtimeConfig?: EmbeddedInngestRuntimeConfig;\n}\n\nexport function registerInngestRoutes(server: ApiServer, options: InngestHandlerOptions): void {\n if (options.runtimeConfig?.enabled !== true) {\n return;\n }\n\n const handler = serve({\n client: options.backend.getClient(),\n functions: [\n options.backend.agentRunFunction,\n ...(options.taskScheduler?.getFunctions() ?? []),\n ] as any[],\n });\n const routeHandler: RouteHandler = async (req, res) => {\n handler(req, res);\n };\n\n server.all('/api/inngest', routeHandler, { public: true });\n server.all('/api/inngest/*path', routeHandler, { public: true });\n}\n"]}
1
+ {"version":3,"file":"InngestHandler.js","sourceRoot":"","sources":["../../../src/api/handlers/InngestHandler.ts"],"names":[],"mappings":";;AAaA,sDAuBC;AApCD,uCAAqC;AAarC,SAAgB,qBAAqB,CAAC,MAAiB,EAAE,OAA8B;IACrF,IAAI,OAAO,CAAC,aAAa,EAAE,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5C,OAAO;IACT,CAAC;IAED,MAAM,gBAAgB,GAAG,OAAO,CAAC,aAAa,CAAC,gBAAgB;QAC7D,CAAC,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC,gBAAgB,CAAC;QACjD,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,OAAO,GAAG,IAAA,YAAK,EAAC;QACpB,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE;QACnC,SAAS,EAAE;YACT,OAAO,CAAC,OAAO,CAAC,gBAAgB;YAChC,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;SACxC;QACV,WAAW,EAAE,gBAAgB,EAAE,MAAM;QACrC,SAAS,EAAE,gBAAgB,EAAE,QAAQ;KACtC,CAAC,CAAC;IACH,MAAM,YAAY,GAAiB,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,CAAC,GAAG,CAAC,cAAc,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3D,MAAM,CAAC,GAAG,CAAC,oBAAoB,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { serve } from 'inngest/node';\nimport type { ApiServer, RouteHandler } from '../ApiServer';\nimport type { InngestRunExecutionBackend } from '../runs/InngestRunExecutionBackend';\nimport type { EmbeddedInngestRuntimeConfig } from '../runs/EmbeddedInngestService';\nimport type { InngestTaskScheduler } from '../tasks/InngestTaskScheduler';\nimport type { StoreContext } from '../chatkit/store';\n\nexport interface InngestHandlerOptions {\n backend: InngestRunExecutionBackend;\n taskScheduler?: InngestTaskScheduler<StoreContext>;\n runtimeConfig?: EmbeddedInngestRuntimeConfig;\n}\n\nexport function registerInngestRoutes(server: ApiServer, options: InngestHandlerOptions): void {\n if (options.runtimeConfig?.enabled !== true) {\n return;\n }\n\n const functionEndpoint = options.runtimeConfig.functionEndpoint\n ? new URL(options.runtimeConfig.functionEndpoint)\n : undefined;\n const handler = serve({\n client: options.backend.getClient(),\n functions: [\n options.backend.agentRunFunction,\n ...(options.taskScheduler?.getFunctions() ?? []),\n ] as any[],\n serveOrigin: functionEndpoint?.origin,\n servePath: functionEndpoint?.pathname,\n });\n const routeHandler: RouteHandler = async (req, res) => {\n handler(req, res);\n };\n\n server.all('/api/inngest', routeHandler, { public: true });\n server.all('/api/inngest/*path', routeHandler, { public: true });\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@undefineds.co/xpod",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Xpod is an extended Community Solid Server, offering rich-feature, production-level Solid Pod and identity management.",
5
5
  "repository": "https://github.com/undefinedsco/xpod",
6
6
  "author": "developer@undefineds.co",