@botpress/adk 1.2.5 → 1.3.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;CACrD;AAMD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,mBAAmB;YAO1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA6BjB,yBAAyB;YA4EzB,kBAAkB;YAKlB,oBAAoB;YAKpB,kBAAkB;YAKlB,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAQnB,8BAA8B;YAQ9B,oBAAoB;YA4EpB,uBAAuB;YAiHvB,8BAA8B;YAgC9B,4BAA4B;YAgC5B,qBAAqB;YA+TrB,gBAAgB;YAoDhB,mBAAmB;YAwBnB,gBAAgB;YA0ChB,mBAAmB;YA4BnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAocnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAczC;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../../src/bot-generator/generator.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;CACrD;AAMD,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,UAAU,CAAS;gBAEf,OAAO,EAAE,mBAAmB;YAO1B,kBAAkB;YAuBlB,sBAAsB;IAsB9B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;YA6BjB,yBAAyB;YA8EzB,kBAAkB;YAKlB,oBAAoB;YAKpB,kBAAkB;YAKlB,kBAAkB;YAKlB,qBAAqB;YAKrB,yBAAyB;YAKzB,mBAAmB;YAQnB,8BAA8B;YAQ9B,oBAAoB;YA8EpB,uBAAuB;YAiHvB,8BAA8B;YAgC9B,4BAA4B;YAgC5B,qBAAqB;YAkUrB,gBAAgB;YAoDhB,mBAAmB;YAwBnB,gBAAgB;YA0ChB,mBAAmB;YA4BnB,UAAU;YAWV,aAAa;IAgBrB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC;IAocnC,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;CAczC;AAED,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
@@ -1 +1 @@
1
- {"version":3,"file":"conversation-types.d.ts","sourceRoot":"","sources":["../../src/generators/conversation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAKjE,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CA6Ff"}
1
+ {"version":3,"file":"conversation-types.d.ts","sourceRoot":"","sources":["../../src/generators/conversation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAKjE,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC,IAAI,CAAC,CA4Ff"}
package/dist/index.js CHANGED
@@ -5363,7 +5363,6 @@ import path22 from "path";
5363
5363
  async function generateConversationTypes(project) {
5364
5364
  const conversationTypes = {};
5365
5365
  for (const conversationRef of project.conversations) {
5366
- console.log(`[ConversationTypes] Processing conversation: ${conversationRef.export}`);
5367
5366
  try {
5368
5367
  const conversationPath = path22.join(project.path, conversationRef.path);
5369
5368
  const conversationModule = await import(`${conversationPath}?t=${Date.now()}`);
@@ -6260,6 +6259,7 @@ declare module "@botpress/runtime/_types/state" {
6260
6259
  cached: def.cached
6261
6260
  };
6262
6261
  }
6262
+ const toEventName = (ename) => ename.replaceAll(/[^a-zA-Z0-9]/g, "").toLowerCase();
6263
6263
  const content = dedent`
6264
6264
  import { BotDefinition, z } from "@botpress/sdk";
6265
6265
  import {
@@ -6316,7 +6316,7 @@ declare module "@botpress/runtime/_types/state" {
6316
6316
  `)}
6317
6317
  },` : ""}
6318
6318
  ${recurringWorkflows.length > 0 ? `recurringEvents: {
6319
- ${recurringWorkflows.map((wf) => `"${wf.name}Schedule": {
6319
+ ${recurringWorkflows.map((wf) => `"${toEventName(wf.name + "Schedule")}": {
6320
6320
  type: WorkflowScheduleEvent.name,
6321
6321
  schedule: { cron: "${wf.schedule}" },
6322
6322
  payload: { workflow: "${wf.name}" },
@@ -7277,5 +7277,5 @@ export {
7277
7277
  AgentProject
7278
7278
  };
7279
7279
 
7280
- //# debugId=457481A453B1622564756E2164756E21
7280
+ //# debugId=058CF65E94A0582A64756E2164756E21
7281
7281
  //# sourceMappingURL=index.js.map