windmill-cli 1.764.0 → 1.765.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.
Files changed (2) hide show
  1. package/esm/main.js +290 -25
  2. package/package.json +3 -3
package/esm/main.js CHANGED
@@ -16784,7 +16784,7 @@ var init_OpenAPI = __esm(() => {
16784
16784
  PASSWORD: undefined,
16785
16785
  TOKEN: getEnv3("WM_TOKEN"),
16786
16786
  USERNAME: undefined,
16787
- VERSION: "1.764.0",
16787
+ VERSION: "1.765.0",
16788
16788
  WITH_CREDENTIALS: true,
16789
16789
  interceptors: {
16790
16790
  request: new Interceptors,
@@ -17101,6 +17101,7 @@ __export(exports_services_gen, {
17101
17101
  updateAppRaw: () => updateAppRaw,
17102
17102
  updateAppHistory: () => updateAppHistory,
17103
17103
  updateApp: () => updateApp,
17104
+ updateAmqpTrigger: () => updateAmqpTrigger,
17104
17105
  unstar: () => unstar,
17105
17106
  unassignGhesInstallation: () => unassignGhesInstallation,
17106
17107
  unarchiveWorkspace: () => unarchiveWorkspace,
@@ -17122,6 +17123,7 @@ __export(exports_services_gen, {
17122
17123
  testAzureKvBackend: () => testAzureKvBackend,
17123
17124
  testAzureConnection: () => testAzureConnection,
17124
17125
  testAwsSmBackend: () => testAwsSmBackend,
17126
+ testAmqpConnection: () => testAmqpConnection,
17125
17127
  syncNativeTriggers: () => syncNativeTriggers,
17126
17128
  submitOnboardingData: () => submitOnboardingData,
17127
17129
  storeRawScriptTemp: () => storeRawScriptTemp,
@@ -17155,6 +17157,7 @@ __export(exports_services_gen, {
17155
17157
  setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
17156
17158
  setCaptureConfig: () => setCaptureConfig,
17157
17159
  setAzureTriggerMode: () => setAzureTriggerMode,
17160
+ setAmqpTriggerMode: () => setAmqpTriggerMode,
17158
17161
  sendStats: () => sendStats,
17159
17162
  sendMessageToConversation: () => sendMessageToConversation,
17160
17163
  searchLogsIndex: () => searchLogsIndex,
@@ -17354,6 +17357,7 @@ __export(exports_services_gen, {
17354
17357
  listDataTables: () => listDataTables,
17355
17358
  listDataTableTables: () => listDataTableTables,
17356
17359
  listDataTableSchemas: () => listDataTableSchemas,
17360
+ listDataMetrics: () => listDataMetrics,
17357
17361
  listCustomInstanceDbs: () => listCustomInstanceDbs,
17358
17362
  listConversationMessages: () => listConversationMessages,
17359
17363
  listContextualVariables: () => listContextualVariables,
@@ -17381,6 +17385,7 @@ __export(exports_services_gen, {
17381
17385
  listAssetDispatchEdges: () => listAssetDispatchEdges,
17382
17386
  listApps: () => listApps,
17383
17387
  listAppPathsFromWorkspaceRunnable: () => listAppPathsFromWorkspaceRunnable,
17388
+ listAmqpTriggers: () => listAmqpTriggers,
17384
17389
  listAllWorkspaceDependencies: () => listAllWorkspaceDependencies,
17385
17390
  listAllTgoogleTopicSubscriptions: () => listAllTgoogleTopicSubscriptions,
17386
17391
  listAllDedicatedWithDeps: () => listAllDedicatedWithDeps,
@@ -17593,6 +17598,7 @@ __export(exports_services_gen, {
17593
17598
  getAppEmbedTokenByCustomPath: () => getAppEmbedTokenByCustomPath,
17594
17599
  getAppByVersion: () => getAppByVersion,
17595
17600
  getAppByPath: () => getAppByPath,
17601
+ getAmqpTrigger: () => getAmqpTrigger,
17596
17602
  getAiSkill: () => getAiSkill,
17597
17603
  generateOpenapiSpec: () => generateOpenapiSpec,
17598
17604
  generateNativeTriggerServiceConnectUrl: () => generateNativeTriggerServiceConnectUrl,
@@ -17635,6 +17641,7 @@ __export(exports_services_gen, {
17635
17641
  existsEmail: () => existsEmail,
17636
17642
  existsAzureTrigger: () => existsAzureTrigger,
17637
17643
  existsApp: () => existsApp,
17644
+ existsAmqpTrigger: () => existsAmqpTrigger,
17638
17645
  executeComponent: () => executeComponent,
17639
17646
  encryptValue: () => encryptValue,
17640
17647
  enableDatatableMigrations: () => enableDatatableMigrations,
@@ -17719,6 +17726,7 @@ __export(exports_services_gen, {
17719
17726
  deleteAzureTrigger: () => deleteAzureTrigger,
17720
17727
  deleteAzureSubscription: () => deleteAzureSubscription,
17721
17728
  deleteApp: () => deleteApp,
17729
+ deleteAmqpTrigger: () => deleteAmqpTrigger,
17722
17730
  deleteAiSkill: () => deleteAiSkill,
17723
17731
  declineInvite: () => declineInvite,
17724
17732
  datasetStorageTestConnection: () => datasetStorageTestConnection,
@@ -17767,6 +17775,7 @@ __export(exports_services_gen, {
17767
17775
  createAzureTrigger: () => createAzureTrigger,
17768
17776
  createAppRaw: () => createAppRaw,
17769
17777
  createApp: () => createApp,
17778
+ createAmqpTrigger: () => createAmqpTrigger,
17770
17779
  createAgentToken: () => createAgentToken,
17771
17780
  createAccount: () => createAccount,
17772
17781
  countSearchLogsIndex: () => countSearchLogsIndex,
@@ -19213,6 +19222,23 @@ var backendVersion = () => {
19213
19222
  workspace: data3.workspace
19214
19223
  }
19215
19224
  });
19225
+ }, listDataMetrics = (data3) => {
19226
+ return request(OpenAPI, {
19227
+ method: "GET",
19228
+ url: "/w/{workspace}/data_metrics/list",
19229
+ path: {
19230
+ workspace: data3.workspace
19231
+ },
19232
+ query: {
19233
+ table: data3.table,
19234
+ path_prefix: data3.pathPrefix,
19235
+ per_page: data3.perPage,
19236
+ cursor_table: data3.cursorTable,
19237
+ cursor_kind: data3.cursorKind,
19238
+ cursor_name: data3.cursorName,
19239
+ cursor_script: data3.cursorScript
19240
+ }
19241
+ });
19216
19242
  }, listDataTables = (data3) => {
19217
19243
  return request(OpenAPI, {
19218
19244
  method: "GET",
@@ -23937,6 +23963,95 @@ var backendVersion = () => {
23937
23963
  body: data3.requestBody,
23938
23964
  mediaType: "application/json"
23939
23965
  });
23966
+ }, createAmqpTrigger = (data3) => {
23967
+ return request(OpenAPI, {
23968
+ method: "POST",
23969
+ url: "/w/{workspace}/amqp_triggers/create",
23970
+ path: {
23971
+ workspace: data3.workspace
23972
+ },
23973
+ body: data3.requestBody,
23974
+ mediaType: "application/json"
23975
+ });
23976
+ }, updateAmqpTrigger = (data3) => {
23977
+ return request(OpenAPI, {
23978
+ method: "POST",
23979
+ url: "/w/{workspace}/amqp_triggers/update/{path}",
23980
+ path: {
23981
+ workspace: data3.workspace,
23982
+ path: data3.path
23983
+ },
23984
+ body: data3.requestBody,
23985
+ mediaType: "application/json"
23986
+ });
23987
+ }, deleteAmqpTrigger = (data3) => {
23988
+ return request(OpenAPI, {
23989
+ method: "DELETE",
23990
+ url: "/w/{workspace}/amqp_triggers/delete/{path}",
23991
+ path: {
23992
+ workspace: data3.workspace,
23993
+ path: data3.path
23994
+ }
23995
+ });
23996
+ }, getAmqpTrigger = (data3) => {
23997
+ return request(OpenAPI, {
23998
+ method: "GET",
23999
+ url: "/w/{workspace}/amqp_triggers/get/{path}",
24000
+ path: {
24001
+ workspace: data3.workspace,
24002
+ path: data3.path
24003
+ },
24004
+ query: {
24005
+ get_draft: data3.getDraft
24006
+ }
24007
+ });
24008
+ }, listAmqpTriggers = (data3) => {
24009
+ return request(OpenAPI, {
24010
+ method: "GET",
24011
+ url: "/w/{workspace}/amqp_triggers/list",
24012
+ path: {
24013
+ workspace: data3.workspace
24014
+ },
24015
+ query: {
24016
+ page: data3.page,
24017
+ per_page: data3.perPage,
24018
+ path: data3.path,
24019
+ is_flow: data3.isFlow,
24020
+ path_start: data3.pathStart,
24021
+ label: data3.label,
24022
+ include_draft_only: data3.includeDraftOnly
24023
+ }
24024
+ });
24025
+ }, existsAmqpTrigger = (data3) => {
24026
+ return request(OpenAPI, {
24027
+ method: "GET",
24028
+ url: "/w/{workspace}/amqp_triggers/exists/{path}",
24029
+ path: {
24030
+ workspace: data3.workspace,
24031
+ path: data3.path
24032
+ }
24033
+ });
24034
+ }, setAmqpTriggerMode = (data3) => {
24035
+ return request(OpenAPI, {
24036
+ method: "POST",
24037
+ url: "/w/{workspace}/amqp_triggers/setmode/{path}",
24038
+ path: {
24039
+ workspace: data3.workspace,
24040
+ path: data3.path
24041
+ },
24042
+ body: data3.requestBody,
24043
+ mediaType: "application/json"
24044
+ });
24045
+ }, testAmqpConnection = (data3) => {
24046
+ return request(OpenAPI, {
24047
+ method: "POST",
24048
+ url: "/w/{workspace}/amqp_triggers/test",
24049
+ path: {
24050
+ workspace: data3.workspace
24051
+ },
24052
+ body: data3.requestBody,
24053
+ mediaType: "application/json"
24054
+ });
23940
24055
  }, createGcpTrigger = (data3) => {
23941
24056
  return request(OpenAPI, {
23942
24057
  method: "POST",
@@ -25840,6 +25955,7 @@ __export(exports_gen, {
25840
25955
  updateAppRaw: () => updateAppRaw,
25841
25956
  updateAppHistory: () => updateAppHistory,
25842
25957
  updateApp: () => updateApp,
25958
+ updateAmqpTrigger: () => updateAmqpTrigger,
25843
25959
  unstar: () => unstar,
25844
25960
  unassignGhesInstallation: () => unassignGhesInstallation,
25845
25961
  unarchiveWorkspace: () => unarchiveWorkspace,
@@ -25861,6 +25977,7 @@ __export(exports_gen, {
25861
25977
  testAzureKvBackend: () => testAzureKvBackend,
25862
25978
  testAzureConnection: () => testAzureConnection,
25863
25979
  testAwsSmBackend: () => testAwsSmBackend,
25980
+ testAmqpConnection: () => testAmqpConnection,
25864
25981
  syncNativeTriggers: () => syncNativeTriggers,
25865
25982
  submitOnboardingData: () => submitOnboardingData,
25866
25983
  storeRawScriptTemp: () => storeRawScriptTemp,
@@ -25894,6 +26011,7 @@ __export(exports_gen, {
25894
26011
  setDefaultErrorOrRecoveryHandler: () => setDefaultErrorOrRecoveryHandler,
25895
26012
  setCaptureConfig: () => setCaptureConfig,
25896
26013
  setAzureTriggerMode: () => setAzureTriggerMode,
26014
+ setAmqpTriggerMode: () => setAmqpTriggerMode,
25897
26015
  sendStats: () => sendStats,
25898
26016
  sendMessageToConversation: () => sendMessageToConversation,
25899
26017
  searchLogsIndex: () => searchLogsIndex,
@@ -26093,6 +26211,7 @@ __export(exports_gen, {
26093
26211
  listDataTables: () => listDataTables,
26094
26212
  listDataTableTables: () => listDataTableTables,
26095
26213
  listDataTableSchemas: () => listDataTableSchemas,
26214
+ listDataMetrics: () => listDataMetrics,
26096
26215
  listCustomInstanceDbs: () => listCustomInstanceDbs,
26097
26216
  listConversationMessages: () => listConversationMessages,
26098
26217
  listContextualVariables: () => listContextualVariables,
@@ -26120,6 +26239,7 @@ __export(exports_gen, {
26120
26239
  listAssetDispatchEdges: () => listAssetDispatchEdges,
26121
26240
  listApps: () => listApps,
26122
26241
  listAppPathsFromWorkspaceRunnable: () => listAppPathsFromWorkspaceRunnable,
26242
+ listAmqpTriggers: () => listAmqpTriggers,
26123
26243
  listAllWorkspaceDependencies: () => listAllWorkspaceDependencies,
26124
26244
  listAllTgoogleTopicSubscriptions: () => listAllTgoogleTopicSubscriptions,
26125
26245
  listAllDedicatedWithDeps: () => listAllDedicatedWithDeps,
@@ -26332,6 +26452,7 @@ __export(exports_gen, {
26332
26452
  getAppEmbedTokenByCustomPath: () => getAppEmbedTokenByCustomPath,
26333
26453
  getAppByVersion: () => getAppByVersion,
26334
26454
  getAppByPath: () => getAppByPath,
26455
+ getAmqpTrigger: () => getAmqpTrigger,
26335
26456
  getAiSkill: () => getAiSkill,
26336
26457
  generateOpenapiSpec: () => generateOpenapiSpec,
26337
26458
  generateNativeTriggerServiceConnectUrl: () => generateNativeTriggerServiceConnectUrl,
@@ -26374,6 +26495,7 @@ __export(exports_gen, {
26374
26495
  existsEmail: () => existsEmail,
26375
26496
  existsAzureTrigger: () => existsAzureTrigger,
26376
26497
  existsApp: () => existsApp,
26498
+ existsAmqpTrigger: () => existsAmqpTrigger,
26377
26499
  executeComponent: () => executeComponent,
26378
26500
  encryptValue: () => encryptValue,
26379
26501
  enableDatatableMigrations: () => enableDatatableMigrations,
@@ -26458,6 +26580,7 @@ __export(exports_gen, {
26458
26580
  deleteAzureTrigger: () => deleteAzureTrigger,
26459
26581
  deleteAzureSubscription: () => deleteAzureSubscription,
26460
26582
  deleteApp: () => deleteApp,
26583
+ deleteAmqpTrigger: () => deleteAmqpTrigger,
26461
26584
  deleteAiSkill: () => deleteAiSkill,
26462
26585
  declineInvite: () => declineInvite,
26463
26586
  datasetStorageTestConnection: () => datasetStorageTestConnection,
@@ -26506,6 +26629,7 @@ __export(exports_gen, {
26506
26629
  createAzureTrigger: () => createAzureTrigger,
26507
26630
  createAppRaw: () => createAppRaw,
26508
26631
  createApp: () => createApp,
26632
+ createAmqpTrigger: () => createAmqpTrigger,
26509
26633
  createAgentToken: () => createAgentToken,
26510
26634
  createAccount: () => createAccount,
26511
26635
  countSearchLogsIndex: () => countSearchLogsIndex,
@@ -26680,7 +26804,7 @@ var init_auth = __esm(async () => {
26680
26804
  });
26681
26805
 
26682
26806
  // src/core/constants.ts
26683
- var WM_FORK_PREFIX = "wm-fork", VERSION = "1.764.0";
26807
+ var WM_FORK_PREFIX = "wm-fork", VERSION = "1.765.0";
26684
26808
 
26685
26809
  // src/utils/git.ts
26686
26810
  var exports_git = {};
@@ -26781,18 +26905,20 @@ function computeGitSyncDeployBranch(params) {
26781
26905
  groupByFolder,
26782
26906
  clonedBranchName
26783
26907
  } = params;
26784
- if (isForkWorkspace(workspaceId, parentWorkspaceId)) {
26908
+ const isDevWorkspace = !!devWorkspaceLabel;
26909
+ if (isForkWorkspace(workspaceId, parentWorkspaceId) && !(isDevWorkspace && useIndividualBranch)) {
26785
26910
  return forkBranchName(workspaceId, clonedBranchName, devWorkspaceLabel);
26786
26911
  }
26912
+ const fallback = isDevWorkspace ? forkBranchName(workspaceId, clonedBranchName, devWorkspaceLabel) : null;
26787
26913
  if (items.length === 0)
26788
- return null;
26914
+ return fallback;
26789
26915
  const first = items[0];
26790
26916
  if (!useIndividualBranch || first.path_type === "user" || first.path_type === "group") {
26791
- return null;
26917
+ return fallback;
26792
26918
  }
26793
- const ref = first.path ?? first.parent_path;
26919
+ const ref = first.path || first.parent_path;
26794
26920
  if (!ref)
26795
- return null;
26921
+ return fallback;
26796
26922
  return groupByFolder ? `wm_deploy/${workspaceId}/${ref.split("/").slice(0, 2).join("__")}` : `wm_deploy/${workspaceId}/${first.path_type}/${ref.replaceAll("/", "__")}`;
26797
26923
  }
26798
26924
  function composeGitSyncCommitHeader(items) {
@@ -26865,6 +26991,8 @@ function gitSyncIncludePattern(pathType, path2) {
26865
26991
  return `${path2}.postgres_trigger.*`;
26866
26992
  case "mqtttrigger":
26867
26993
  return `${path2}.mqtt_trigger.*`;
26994
+ case "amqptrigger":
26995
+ return `${path2}.amqp_trigger.*`;
26868
26996
  case "sqstrigger":
26869
26997
  return `${path2}.sqs_trigger.*`;
26870
26998
  case "gcptrigger":
@@ -68922,7 +69050,7 @@ async function elementsToMap(els, ignore, json, skips, specificItems, branchOver
68922
69050
  const ext2 = json ? ".json" : ".yaml";
68923
69051
  if (!skips.includeSchedules && path13.endsWith(".schedule" + ext2))
68924
69052
  continue;
68925
- if (!skips.includeTriggers && (path13.endsWith(".http_trigger" + ext2) || path13.endsWith(".websocket_trigger" + ext2) || path13.endsWith(".kafka_trigger" + ext2) || path13.endsWith(".nats_trigger" + ext2) || path13.endsWith(".postgres_trigger" + ext2) || path13.endsWith(".mqtt_trigger" + ext2) || path13.endsWith(".sqs_trigger" + ext2) || path13.endsWith(".gcp_trigger" + ext2) || path13.endsWith(".azure_trigger" + ext2) || path13.endsWith(".email_trigger" + ext2) || path13.endsWith("_native_trigger" + ext2))) {
69053
+ if (!skips.includeTriggers && (path13.endsWith(".http_trigger" + ext2) || path13.endsWith(".websocket_trigger" + ext2) || path13.endsWith(".kafka_trigger" + ext2) || path13.endsWith(".nats_trigger" + ext2) || path13.endsWith(".postgres_trigger" + ext2) || path13.endsWith(".mqtt_trigger" + ext2) || path13.endsWith(".amqp_trigger" + ext2) || path13.endsWith(".sqs_trigger" + ext2) || path13.endsWith(".gcp_trigger" + ext2) || path13.endsWith(".azure_trigger" + ext2) || path13.endsWith(".email_trigger" + ext2) || path13.endsWith("_native_trigger" + ext2))) {
68926
69054
  continue;
68927
69055
  }
68928
69056
  if (!skips.includeUsers && path13.endsWith(".user" + ext2))
@@ -69422,7 +69550,7 @@ function getOrderFromPath(p) {
69422
69550
  return 12;
69423
69551
  } else if (typ == "schedule") {
69424
69552
  return 13;
69425
- } else if (typ == "http_trigger" || typ == "websocket_trigger" || typ == "kafka_trigger" || typ == "nats_trigger" || typ == "postgres_trigger" || typ == "mqtt_trigger" || typ == "sqs_trigger" || typ == "gcp_trigger" || typ == "azure_trigger" || typ == "email_trigger" || typ == "native_trigger") {
69553
+ } else if (typ == "http_trigger" || typ == "websocket_trigger" || typ == "kafka_trigger" || typ == "nats_trigger" || typ == "postgres_trigger" || typ == "mqtt_trigger" || typ == "amqp_trigger" || typ == "sqs_trigger" || typ == "gcp_trigger" || typ == "azure_trigger" || typ == "email_trigger" || typ == "native_trigger") {
69426
69554
  return 14;
69427
69555
  } else {
69428
69556
  return 15;
@@ -69610,8 +69738,9 @@ async function pull(opts) {
69610
69738
  }
69611
69739
  const clonedBranchName = getCurrentGitBranch() ?? "main";
69612
69740
  const targetIsFork = isForkWorkspace(workspace.workspaceId, opts.parentWorkspaceId);
69613
- const useIndividualBranch = targetIsFork ? false : !!opts.useIndividualBranch;
69614
- const groupByFolder = targetIsFork ? false : !!opts.groupByFolder;
69741
+ const forceOffPromotion = targetIsFork && !opts.devWorkspaceLabel;
69742
+ const useIndividualBranch = forceOffPromotion ? false : !!opts.useIndividualBranch;
69743
+ const groupByFolder = forceOffPromotion ? false : !!opts.groupByFolder;
69615
69744
  const parentBranch = opts.parentDevWorkspaceLabel ? opts.parentDevWorkspaceLabel : opts.parentWorkspaceId && isForkWorkspace(opts.parentWorkspaceId) ? computeGitSyncDeployBranch({
69616
69745
  workspaceId: opts.parentWorkspaceId,
69617
69746
  items: deployItems,
@@ -69892,7 +70021,7 @@ async function gitDeploy(opts) {
69892
70021
  }
69893
70022
  }
69894
70023
  const isFork = isForkWorkspace(opts.workspace ?? "", opts.parentWorkspaceId);
69895
- const useIndividualBranch = isFork ? false : !!opts.useIndividualBranch;
70024
+ const useIndividualBranch = isFork && !opts.devWorkspaceLabel ? false : !!opts.useIndividualBranch;
69896
70025
  const includes = deriveGitSyncDeployIncludes(items, useIndividualBranch);
69897
70026
  const promotion = useIndividualBranch && !opts.promotion ? getCurrentGitBranch() ?? undefined : opts.promotion;
69898
70027
  await pull({
@@ -70307,7 +70436,7 @@ Run 'wmill folder add-missing' to create them locally, then push again.`;
70307
70436
  }
70308
70437
  }
70309
70438
  const rules = folderRulesCache.get(folderName2);
70310
- const remotePath = change.path.replace(/\.(script|schedule|http_trigger|websocket_trigger|kafka_trigger|nats_trigger|postgres_trigger|mqtt_trigger|sqs_trigger|gcp_trigger|azure_trigger|email_trigger)\.(yaml|json)$/, "").replace(/(\.flow|__flow)\/flow\.(yaml|json)$/, "").replace(/\.(app|raw_app)(\/app\.(yaml|json))?$/, "");
70439
+ const remotePath = change.path.replace(/\.(script|schedule|http_trigger|websocket_trigger|kafka_trigger|nats_trigger|postgres_trigger|mqtt_trigger|amqp_trigger|sqs_trigger|gcp_trigger|azure_trigger|email_trigger)\.(yaml|json)$/, "").replace(/(\.flow|__flow)\/flow\.(yaml|json)$/, "").replace(/\.(app|raw_app)(\/app\.(yaml|json))?$/, "");
70311
70440
  const relative7 = remotePath.slice(`f/${folderName2}/`.length);
70312
70441
  if (!relative7)
70313
70442
  continue;
@@ -70723,6 +70852,12 @@ Run 'wmill folder add-missing' to create them locally, then push again.`;
70723
70852
  path: removeSuffix(target, ".mqtt_trigger.json")
70724
70853
  });
70725
70854
  break;
70855
+ case "amqp_trigger":
70856
+ await deleteAmqpTrigger({
70857
+ workspace: workspaceId,
70858
+ path: removeSuffix(target, ".amqp_trigger.json")
70859
+ });
70860
+ break;
70726
70861
  case "sqs_trigger":
70727
70862
  await deleteSqsTrigger({
70728
70863
  workspace: workspaceId,
@@ -77735,6 +77870,7 @@ async function getTrigger(triggerType, workspace, path21) {
77735
77870
  nats: getNatsTrigger,
77736
77871
  postgres: getPostgresTrigger,
77737
77872
  mqtt: getMqttTrigger,
77873
+ amqp: getAmqpTrigger,
77738
77874
  sqs: getSqsTrigger,
77739
77875
  gcp: getGcpTrigger,
77740
77876
  azure: getAzureTrigger,
@@ -77752,6 +77888,7 @@ async function updateTrigger(triggerType, workspace, path21, trigger) {
77752
77888
  nats: updateNatsTrigger,
77753
77889
  postgres: updatePostgresTrigger,
77754
77890
  mqtt: updateMqttTrigger,
77891
+ amqp: updateAmqpTrigger,
77755
77892
  sqs: updateSqsTrigger,
77756
77893
  gcp: updateGcpTrigger,
77757
77894
  azure: updateAzureTrigger,
@@ -77768,6 +77905,7 @@ async function createTrigger(triggerType, workspace, path21, trigger) {
77768
77905
  nats: createNatsTrigger,
77769
77906
  postgres: createPostgresTrigger,
77770
77907
  mqtt: createMqttTrigger,
77908
+ amqp: createAmqpTrigger,
77771
77909
  sqs: createSqsTrigger,
77772
77910
  gcp: createGcpTrigger,
77773
77911
  azure: createAzureTrigger,
@@ -78012,6 +78150,7 @@ async function list11(opts) {
78012
78150
  natsTriggers,
78013
78151
  postgresTriggers,
78014
78152
  mqttTriggers,
78153
+ amqpTriggers,
78015
78154
  sqsTriggers,
78016
78155
  gcpTriggers,
78017
78156
  azureTriggers,
@@ -78023,6 +78162,7 @@ async function list11(opts) {
78023
78162
  listOrEmpty(() => listNatsTriggers({ workspace: ws })),
78024
78163
  listOrEmpty(() => listPostgresTriggers({ workspace: ws })),
78025
78164
  listOrEmpty(() => listMqttTriggers({ workspace: ws })),
78165
+ listOrEmpty(() => listAmqpTriggers({ workspace: ws })),
78026
78166
  listOrEmpty(() => listSqsTriggers({ workspace: ws })),
78027
78167
  listOrEmpty(() => listGcpTriggers({ workspace: ws })),
78028
78168
  listOrEmpty(() => listAzureTriggers({ workspace: ws })),
@@ -78035,6 +78175,7 @@ async function list11(opts) {
78035
78175
  ...natsTriggers.map((x) => ({ path: x.path, kind: "nats" })),
78036
78176
  ...postgresTriggers.map((x) => ({ path: x.path, kind: "postgres" })),
78037
78177
  ...mqttTriggers.map((x) => ({ path: x.path, kind: "mqtt" })),
78178
+ ...amqpTriggers.map((x) => ({ path: x.path, kind: "amqp" })),
78038
78179
  ...sqsTriggers.map((x) => ({ path: x.path, kind: "sqs" })),
78039
78180
  ...gcpTriggers.map((x) => ({ path: x.path, kind: "gcp" })),
78040
78181
  ...azureTriggers.map((x) => ({ path: x.path, kind: "azure" })),
@@ -78154,6 +78295,13 @@ var init_trigger = __esm(async () => {
78154
78295
  subscribe_topics: [],
78155
78296
  enabled: false
78156
78297
  },
78298
+ amqp: {
78299
+ script_path: "",
78300
+ is_flow: false,
78301
+ amqp_resource_path: "",
78302
+ queue_name: "",
78303
+ enabled: false
78304
+ },
78157
78305
  sqs: {
78158
78306
  script_path: "",
78159
78307
  is_flow: false,
@@ -78189,7 +78337,7 @@ var init_trigger = __esm(async () => {
78189
78337
  }
78190
78338
  };
78191
78339
  TRIGGER_SKIP_FIELDS = new Set(["workspace_id", "extra_perms", "edited_by", "edited_at"]);
78192
- command20 = new Command().description("trigger related commands").option("--json", "Output as JSON (for piping to jq)").action(list11).command("list", "list all triggers").option("--json", "Output as JSON (for piping to jq)").action(list11).command("get", "get a trigger's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").option("--kind <kind:string>", "Trigger kind (http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email). Recommended for faster lookup").action(get8).command("new", "create a new trigger locally").arguments("<path:string>").option("--kind <kind:string>", "Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email)").action(newTrigger).command("push", "push a local trigger spec. This overrides any remote versions.").arguments("<file_path:string> <remote_path:string>").action(push10).command("set-permissioned-as", "Set the email (run-as user) for a trigger (requires admin or wm_deployers group)").arguments("<path:string> <email:string>").option("--kind <kind:string>", "Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email)").action(async (opts, triggerPath, email) => {
78340
+ command20 = new Command().description("trigger related commands").option("--json", "Output as JSON (for piping to jq)").action(list11).command("list", "list all triggers").option("--json", "Output as JSON (for piping to jq)").action(list11).command("get", "get a trigger's details").arguments("<path:string>").option("--json", "Output as JSON (for piping to jq)").option("--kind <kind:string>", "Trigger kind (http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email). Recommended for faster lookup").action(get8).command("new", "create a new trigger locally").arguments("<path:string>").option("--kind <kind:string>", "Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)").action(newTrigger).command("push", "push a local trigger spec. This overrides any remote versions.").arguments("<file_path:string> <remote_path:string>").action(push10).command("set-permissioned-as", "Set the email (run-as user) for a trigger (requires admin or wm_deployers group)").arguments("<path:string> <email:string>").option("--kind <kind:string>", "Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)").action(async (opts, triggerPath, email) => {
78193
78341
  const workspace = await resolveWorkspace(opts);
78194
78342
  await requireLogin(opts);
78195
78343
  if (!opts.kind) {
@@ -78336,6 +78484,8 @@ async function pushObj(workspace, p, befObj, newObj, plainSecrets, alreadySynced
78336
78484
  await pushTrigger("postgres", workspace, p, befObj, newObj, permissionedAsContext);
78337
78485
  } else if (typeEnding === "mqtt_trigger") {
78338
78486
  await pushTrigger("mqtt", workspace, p, befObj, newObj, permissionedAsContext);
78487
+ } else if (typeEnding === "amqp_trigger") {
78488
+ await pushTrigger("amqp", workspace, p, befObj, newObj, permissionedAsContext);
78339
78489
  } else if (typeEnding === "sqs_trigger") {
78340
78490
  await pushTrigger("sqs", workspace, p, befObj, newObj, permissionedAsContext);
78341
78491
  } else if (typeEnding === "gcp_trigger") {
@@ -78428,7 +78578,7 @@ function getTypeStrFromPath(p) {
78428
78578
  if (typeEnding?.endsWith("_native_trigger")) {
78429
78579
  return "native_trigger";
78430
78580
  }
78431
- if (typeEnding === "script" || typeEnding === "variable" || typeEnding === "resource" || typeEnding === "resource-type" || typeEnding === "app" || typeEnding === "schedule" || typeEnding === "http_trigger" || typeEnding === "websocket_trigger" || typeEnding === "kafka_trigger" || typeEnding === "nats_trigger" || typeEnding === "postgres_trigger" || typeEnding === "mqtt_trigger" || typeEnding === "sqs_trigger" || typeEnding === "gcp_trigger" || typeEnding === "azure_trigger" || typeEnding === "email_trigger" || typeEnding === "user" || typeEnding === "group" || typeEnding === "settings" || typeEnding === "encryption_key") {
78581
+ if (typeEnding === "script" || typeEnding === "variable" || typeEnding === "resource" || typeEnding === "resource-type" || typeEnding === "app" || typeEnding === "schedule" || typeEnding === "http_trigger" || typeEnding === "websocket_trigger" || typeEnding === "kafka_trigger" || typeEnding === "nats_trigger" || typeEnding === "postgres_trigger" || typeEnding === "mqtt_trigger" || typeEnding === "amqp_trigger" || typeEnding === "sqs_trigger" || typeEnding === "gcp_trigger" || typeEnding === "azure_trigger" || typeEnding === "email_trigger" || typeEnding === "user" || typeEnding === "group" || typeEnding === "settings" || typeEnding === "encryption_key") {
78432
78582
  return typeEnding;
78433
78583
  } else {
78434
78584
  throw new Error("Could not infer type of path " + JSON.stringify(parsed));
@@ -78502,6 +78652,7 @@ var init_types = __esm(async () => {
78502
78652
  "nats",
78503
78653
  "postgres",
78504
78654
  "mqtt",
78655
+ "amqp",
78505
78656
  "sqs",
78506
78657
  "gcp",
78507
78658
  "azure",
@@ -80460,7 +80611,7 @@ When a new app needs to be created, YOU run \`wmill app new\` yourself with \`--
80460
80611
 
80461
80612
  ## Triggers
80462
80613
 
80463
- You MUST use the \`triggers\` skill to configure HTTP routes, WebSocket, Kafka, NATS, SQS, MQTT, GCP, Azure, Email, or Postgres CDC triggers.
80614
+ You MUST use the \`triggers\` skill to configure HTTP routes, WebSocket, Kafka, NATS, SQS, MQTT, AMQP, GCP, Azure, Email, or Postgres CDC triggers.
80464
80615
 
80465
80616
  ## Schedules
80466
80617
 
@@ -87812,12 +87963,12 @@ trigger related commands
87812
87963
  - \`--json\` - Output as JSON (for piping to jq)
87813
87964
  - \`trigger get <path:string>\` - get a trigger's details
87814
87965
  - \`--json\` - Output as JSON (for piping to jq)
87815
- - \`--kind <kind:string>\` - Trigger kind (http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email). Recommended for faster lookup
87966
+ - \`--kind <kind:string>\` - Trigger kind (http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email). Recommended for faster lookup
87816
87967
  - \`trigger new <path:string>\` - create a new trigger locally
87817
- - \`--kind <kind:string>\` - Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email)
87968
+ - \`--kind <kind:string>\` - Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)
87818
87969
  - \`trigger push <file_path:string> <remote_path:string>\` - push a local trigger spec. This overrides any remote versions.
87819
87970
  - \`trigger set-permissioned-as <path:string> <email:string>\` - Set the email (run-as user) for a trigger (requires admin or wm_deployers group)
87820
- - \`--kind <kind:string>\` - Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, sqs, gcp, azure, email)
87971
+ - \`--kind <kind:string>\` - Trigger kind (required: http, websocket, kafka, nats, postgres, mqtt, amqp, sqs, gcp, azure, email)
87821
87972
 
87822
87973
  ### user
87823
87974
 
@@ -88087,6 +88238,120 @@ Both print the job result, are safe to run yourself, and don't deploy.
88087
88238
  `
88088
88239
  };
88089
88240
  SCHEMAS = {
88241
+ amqp_trigger: `type: object
88242
+ properties:
88243
+ script_path:
88244
+ type: string
88245
+ description: Path to the script or flow to execute when triggered
88246
+ permissioned_as:
88247
+ type: string
88248
+ description: The user or group this trigger runs as (permissioned_as)
88249
+ is_flow:
88250
+ type: boolean
88251
+ description: True if script_path points to a flow, false if it points to a script
88252
+ labels:
88253
+ type: array
88254
+ items:
88255
+ type: string
88256
+ draft_only:
88257
+ type: boolean
88258
+ description: 'True when this row is a per-user draft with no deployed
88259
+
88260
+ trigger at the same path. Set by list endpoints when
88261
+
88262
+ \`include_draft_only=true\` synthesizes the row from the
88263
+
88264
+ draft. Frontend renders a "Draft" badge.
88265
+
88266
+ '
88267
+ is_draft:
88268
+ type: boolean
88269
+ description: 'True when the authed user has a per-user draft at this path
88270
+
88271
+ (over a deployed row or a synthesized draft-only row).
88272
+
88273
+ Frontend appends a \`*\` to the displayed name.
88274
+
88275
+ '
88276
+ amqp_resource_path:
88277
+ type: string
88278
+ description: Path to the AMQP resource containing broker connection configuration
88279
+ queue_name:
88280
+ type: string
88281
+ description: Name of the queue to consume messages from
88282
+ exchange:
88283
+ type: object
88284
+ properties:
88285
+ exchange_name:
88286
+ type: string
88287
+ description: Name of the exchange to bind the consumed queue to
88288
+ routing_keys:
88289
+ type: array
88290
+ items:
88291
+ type: string
88292
+ description: Routing keys used to bind the queue to the exchange
88293
+ options:
88294
+ type: object
88295
+ properties:
88296
+ declare_queue:
88297
+ type: boolean
88298
+ description: Declare the queue (durable) before consuming; when false the
88299
+ queue is declared passively and must already exist
88300
+ prefetch_count:
88301
+ type: integer
88302
+ format: int32
88303
+ minimum: 1
88304
+ maximum: 65535
88305
+ description: Maximum number of unacknowledged messages the broker delivers
88306
+ at once (1-65535)
88307
+ error_handler_path:
88308
+ type: string
88309
+ description: Path to a script or flow to run when the triggered job fails
88310
+ error_handler_args:
88311
+ type: object
88312
+ description: The arguments to pass to the script or flow
88313
+ retry:
88314
+ type: object
88315
+ properties:
88316
+ constant:
88317
+ type: object
88318
+ description: Retry with constant delay between attempts
88319
+ properties:
88320
+ attempts:
88321
+ type: integer
88322
+ description: Number of retry attempts
88323
+ seconds:
88324
+ type: integer
88325
+ description: Seconds to wait between retries
88326
+ exponential:
88327
+ type: object
88328
+ description: Retry with exponential backoff (delay doubles each time)
88329
+ properties:
88330
+ attempts:
88331
+ type: integer
88332
+ description: Number of retry attempts
88333
+ multiplier:
88334
+ type: integer
88335
+ description: Multiplier for exponential backoff
88336
+ seconds:
88337
+ type: integer
88338
+ minimum: 1
88339
+ description: Initial delay in seconds
88340
+ random_factor:
88341
+ type: integer
88342
+ minimum: 0
88343
+ maximum: 100
88344
+ description: Random jitter percentage (0-100) to avoid thundering herd
88345
+ retry_if:
88346
+ $ref: '#/components/schemas/RetryIf'
88347
+ description: Retry configuration for failed module executions
88348
+ required:
88349
+ - script_path
88350
+ - permissioned_as
88351
+ - is_flow
88352
+ - amqp_resource_path
88353
+ - queue_name
88354
+ `,
88090
88355
  azure_trigger: `type: object
88091
88356
  properties:
88092
88357
  script_path:
@@ -89385,6 +89650,7 @@ required:
89385
89650
  { name: "NatsTrigger", schemaKey: "nats_trigger", filePattern: "*.nats_trigger.yaml" },
89386
89651
  { name: "PostgresTrigger", schemaKey: "postgres_trigger", filePattern: "*.postgres_trigger.yaml" },
89387
89652
  { name: "MqttTrigger", schemaKey: "mqtt_trigger", filePattern: "*.mqtt_trigger.yaml" },
89653
+ { name: "AmqpTrigger", schemaKey: "amqp_trigger", filePattern: "*.amqp_trigger.yaml" },
89388
89654
  { name: "SqsTrigger", schemaKey: "sqs_trigger", filePattern: "*.sqs_trigger.yaml" },
89389
89655
  { name: "GcpTrigger", schemaKey: "gcp_trigger", filePattern: "*.gcp_trigger.yaml" },
89390
89656
  { name: "AzureTrigger", schemaKey: "azure_trigger", filePattern: "*.azure_trigger.yaml" },
@@ -96606,6 +96872,7 @@ var assetNodeId = (kind, path24) => `${kind}:${path24}`;
96606
96872
  var NON_AUTORUN_TRIGGER_KINDS = new Set([
96607
96873
  "kafka",
96608
96874
  "mqtt",
96875
+ "amqp",
96609
96876
  "nats",
96610
96877
  "postgres",
96611
96878
  "sqs",
@@ -96620,8 +96887,7 @@ function assetUriToNodeId(uri) {
96620
96887
  return;
96621
96888
  const prefix = m3[1].toLowerCase();
96622
96889
  const kind = prefix === "s3" ? "s3object" : prefix;
96623
- const path24 = kind === "s3object" ? m3[2].replace(/^\/+/, "") : m3[2];
96624
- return `${kind}:${path24}`;
96890
+ return `${kind}:${m3[2]}`;
96625
96891
  }
96626
96892
  function addEdge(dag, a2, b2) {
96627
96893
  if (a2 === b2)
@@ -97109,6 +97375,7 @@ var NATIVE_KINDS = new Set([
97109
97375
  "email",
97110
97376
  "kafka",
97111
97377
  "mqtt",
97378
+ "amqp",
97112
97379
  "nats",
97113
97380
  "postgres",
97114
97381
  "sqs",
@@ -97144,8 +97411,7 @@ function fallbackParse(content, language) {
97144
97411
  if (uri) {
97145
97412
  const prefix = uri[1].toLowerCase();
97146
97413
  const kind = prefix === "s3" ? "s3object" : prefix;
97147
- const path25 = kind === "s3object" ? uri[2].replace(/^\/+/, "") : uri[2];
97148
- out.triggers.push({ kind: "asset", asset_kind: kind, path: path25 });
97414
+ out.triggers.push({ kind: "asset", asset_kind: kind, path: uri[2] });
97149
97415
  } else if (NATIVE_KINDS.has(firstTok) && rest === firstTok) {
97150
97416
  out.triggers.push({ kind: firstTok });
97151
97417
  }
@@ -97219,8 +97485,7 @@ function parseMuteAnnotations(content) {
97219
97485
  }
97220
97486
  for (const [prefix, kind] of MUTE_ASSET_PREFIXES) {
97221
97487
  if (arg.startsWith(prefix)) {
97222
- const p3 = kind === "s3object" ? arg.slice(prefix.length).replace(/^\/+/, "") : arg.slice(prefix.length);
97223
- muted.add(`${kind}:${p3}`);
97488
+ muted.add(`${kind}:${arg.slice(prefix.length)}`);
97224
97489
  break;
97225
97490
  }
97226
97491
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "windmill-cli",
3
- "version": "1.764.0",
3
+ "version": "1.765.0",
4
4
  "description": "CLI for Windmill",
5
5
  "license": "Apache 2.0",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  },
18
18
  "dependencies": {
19
19
  "esbuild": "0.28.0",
20
- "windmill-parser-wasm-asset": "1.749.0",
20
+ "windmill-parser-wasm-asset": "1.753.0",
21
21
  "windmill-parser-wasm-csharp": "1.510.1",
22
22
  "windmill-parser-wasm-go": "1.761.0",
23
23
  "windmill-parser-wasm-java": "1.510.1",
@@ -26,7 +26,7 @@
26
26
  "windmill-parser-wasm-py": "1.693.1",
27
27
  "windmill-parser-wasm-py-imports": "1.693.1",
28
28
  "windmill-parser-wasm-r": "1.668.1",
29
- "windmill-parser-wasm-regex": "1.692.0",
29
+ "windmill-parser-wasm-regex": "1.764.0",
30
30
  "windmill-parser-wasm-ruby": "1.526.1",
31
31
  "windmill-parser-wasm-rust": "1.647.1",
32
32
  "windmill-parser-wasm-ts": "1.695.0",