@open-mercato/cli 0.4.9-develop.1039.b1e5448fc8 → 0.4.9-develop.1045.7bcda4435a

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.
@@ -10,6 +10,7 @@ import {
10
10
  import {
11
11
  scanModuleDir,
12
12
  resolveModuleFile,
13
+ resolveFirstModuleFile,
13
14
  SCAN_CONFIGS
14
15
  } from "./scanner.js";
15
16
  function scanDashboardWidgetEntries(options) {
@@ -279,6 +280,8 @@ async function generateModuleRegistry(options) {
279
280
  const notificationsChecksumFile = path.join(outputDir, "notifications.generated.checksum");
280
281
  const notificationsClientOutFile = path.join(outputDir, "notifications.client.generated.ts");
281
282
  const notificationsClientChecksumFile = path.join(outputDir, "notifications.client.generated.checksum");
283
+ const paymentsClientOutFile = path.join(outputDir, "payments.client.generated.ts");
284
+ const paymentsClientChecksumFile = path.join(outputDir, "payments.client.generated.checksum");
282
285
  const notificationHandlersOutFile = path.join(outputDir, "notification-handlers.generated.ts");
283
286
  const notificationHandlersChecksumFile = path.join(outputDir, "notification-handlers.generated.checksum");
284
287
  const messageTypesOutFile = path.join(outputDir, "message-types.generated.ts");
@@ -350,6 +353,7 @@ async function generateModuleRegistry(options) {
350
353
  const notificationImports = [];
351
354
  const notificationClientTypes = [];
352
355
  const notificationClientImports = [];
356
+ const paymentsClientImports = [];
353
357
  const notificationHandlerEntries = [];
354
358
  const notificationHandlerImports = [];
355
359
  const messageTypeEntries = [];
@@ -495,6 +499,15 @@ async function generateModuleRegistry(options) {
495
499
  standaloneConfigs: notificationClientTypes,
496
500
  configExpr: (n, id) => `{ moduleId: '${id}', types: (${n}.default ?? []) }`
497
501
  });
502
+ {
503
+ const resolved = resolveFirstModuleFile(roots, imps, [
504
+ "widgets/payments/client.tsx",
505
+ "widgets/payments/client.ts"
506
+ ]);
507
+ if (resolved) {
508
+ paymentsClientImports.push(`import '${resolved.importPath}'`);
509
+ }
510
+ }
498
511
  processStandaloneConfig({
499
512
  roots,
500
513
  imps,
@@ -1118,6 +1131,9 @@ ${notificationHandlersImportSection}
1118
1131
  export const notificationHandlerEntries: NotificationHandlerEntry[] = [
1119
1132
  ${notificationHandlersEntriesLiteral ? ` ${notificationHandlersEntriesLiteral}
1120
1133
  ` : ""}]
1134
+ `;
1135
+ const paymentsClientOutput = `// AUTO-GENERATED by mercato generate registry
1136
+ ${paymentsClientImports.length ? paymentsClientImports.join("\n") + "\n" : "\n"}export const paymentGatewayClientModuleCount = ${paymentsClientImports.length}
1121
1137
  `;
1122
1138
  const messageTypeEntriesLiteral = messageTypeEntries.join(",\n ");
1123
1139
  const messageTypeImportSection = messageTypeImports.join("\n");
@@ -1329,6 +1345,7 @@ export const allAiTools = aiToolConfigEntries.flatMap(e => e.tools)
1329
1345
  writeGeneratedFile({ outFile: aiToolsOutFile, checksumFile: aiToolsChecksumFile, content: aiToolsOutput, structureChecksum, result, quiet });
1330
1346
  writeGeneratedFile({ outFile: notificationsOutFile, checksumFile: notificationsChecksumFile, content: notificationsOutput, structureChecksum, result, quiet });
1331
1347
  writeGeneratedFile({ outFile: notificationsClientOutFile, checksumFile: notificationsClientChecksumFile, content: notificationsClientOutput, structureChecksum, result, quiet });
1348
+ writeGeneratedFile({ outFile: paymentsClientOutFile, checksumFile: paymentsClientChecksumFile, content: paymentsClientOutput, structureChecksum, result, quiet });
1332
1349
  writeGeneratedFile({ outFile: notificationHandlersOutFile, checksumFile: notificationHandlersChecksumFile, content: notificationHandlersOutput, structureChecksum, result, quiet });
1333
1350
  writeGeneratedFile({ outFile: messageTypesOutFile, checksumFile: messageTypesChecksumFile, content: messageTypesOutput, structureChecksum, result, quiet });
1334
1351
  writeGeneratedFile({ outFile: messageObjectsOutFile, checksumFile: messageObjectsChecksumFile, content: messageObjectsOutput, structureChecksum, result, quiet });