openxiangda-devkit-core 2.34.5 → 2.36.0

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.
@@ -640,7 +640,8 @@ export function backendRuntimeRequired(config) {
640
640
  config.events?.subscriptions?.some(item => !item.execution) ||
641
641
  config.events?.timers?.length ||
642
642
  config.events?.dateTriggers?.length ||
643
- config.workflows?.providers?.length)));
643
+ config.workflows?.providers?.length ||
644
+ config.data?.concurrency?.commands.some(command => command.mode === 'durable'))));
644
645
  }
645
646
  function object(value) {
646
647
  return value && typeof value === 'object' && !Array.isArray(value)
@@ -2502,6 +2503,8 @@ export function validateAppConfig(value) {
2502
2503
  }
2503
2504
  try {
2504
2505
  const concurrencyConfig = value;
2506
+ if (concurrencyConfig.backend.enabled === false && concurrencyConfig.data?.concurrency?.commands.some(command => command.mode === 'durable'))
2507
+ throw new Error('durable commands require backend runtime');
2505
2508
  validateManagedConcurrency(concurrencyConfig.data?.concurrency, concurrencyConfig.data?.resources || [], concurrencyConfig.authz?.capabilities || []);
2506
2509
  }
2507
2510
  catch (error) {
@@ -4920,7 +4923,7 @@ export function defineOpenXiangdaApp(declaration) {
4920
4923
  enabled: Boolean(declaration.backend?.operations?.length || declaration.backend?.secrets?.length ||
4921
4924
  declaration.events?.subscriptions?.some(item => !item.execution) || declaration.events?.timers?.length ||
4922
4925
  declaration.events?.dateTriggers?.length ||
4923
- declaration.workflows?.providers?.length),
4926
+ declaration.workflows?.providers?.length || declaration.data?.concurrency?.commands.some(command => command.mode === 'durable')),
4924
4927
  ...declaration.backend,
4925
4928
  },
4926
4929
  platform: { root: 'platform', ...declaration.platform },