@vm0/cli 9.98.0 → 9.98.2

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.
@@ -49,7 +49,7 @@ if (DSN) {
49
49
  Sentry.init({
50
50
  dsn: DSN,
51
51
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
52
- release: "9.98.0",
52
+ release: "9.98.2",
53
53
  sendDefaultPii: false,
54
54
  tracesSampleRate: 0,
55
55
  shutdownTimeout: 500,
@@ -68,7 +68,7 @@ if (DSN) {
68
68
  }
69
69
  });
70
70
  Sentry.setContext("cli", {
71
- version: "9.98.0",
71
+ version: "9.98.2",
72
72
  command: process.argv.slice(2).join(" ")
73
73
  });
74
74
  Sentry.setContext("runtime", {
@@ -5606,6 +5606,27 @@ var CONNECTOR_TYPES_DEF = {
5606
5606
  },
5607
5607
  defaultAuthMethod: "api-token"
5608
5608
  },
5609
+ apollo: {
5610
+ label: "Apollo",
5611
+ environmentMapping: {
5612
+ APOLLO_TOKEN: "$secrets.APOLLO_TOKEN"
5613
+ },
5614
+ helpText: "Connect your Apollo account to search prospects, enrich contacts, manage accounts, deals, sequences, and more",
5615
+ authMethods: {
5616
+ "api-token": {
5617
+ label: "API Key",
5618
+ helpText: "1. Log in to [Apollo](https://app.apollo.io)\n2. Go to **Settings > Integrations**\n3. Click **Connect** beside Apollo API\n4. Select **API Keys > Create new key**\n5. Enter a name, select endpoint access (or toggle **Set as master key**)\n6. Copy the API key",
5619
+ secrets: {
5620
+ APOLLO_TOKEN: {
5621
+ label: "API Key",
5622
+ required: true,
5623
+ placeholder: "your-apollo-api-key"
5624
+ }
5625
+ }
5626
+ }
5627
+ },
5628
+ defaultAuthMethod: "api-token"
5629
+ },
5609
5630
  bitrix: {
5610
5631
  label: "Bitrix24",
5611
5632
  environmentMapping: {
@@ -8130,6 +8151,26 @@ var airtableFirewall = {
8130
8151
  ]
8131
8152
  };
8132
8153
 
8154
+ // ../../packages/core/src/firewalls/apollo.generated.ts
8155
+ var apolloFirewall = {
8156
+ name: "apollo",
8157
+ description: "Apollo",
8158
+ placeholders: {
8159
+ APOLLO_TOKEN: "CoffeeSafeLocalCoffeeSafeLocalCoffee00"
8160
+ },
8161
+ apis: [
8162
+ {
8163
+ base: "https://api.apollo.io",
8164
+ auth: {
8165
+ headers: {
8166
+ "X-Api-Key": "${{ secrets.APOLLO_TOKEN }}"
8167
+ }
8168
+ },
8169
+ permissions: []
8170
+ }
8171
+ ]
8172
+ };
8173
+
8133
8174
  // ../../packages/core/src/firewalls/apify.generated.ts
8134
8175
  var apifyFirewall = {
8135
8176
  name: "apify",
@@ -26912,6 +26953,7 @@ var CONNECTOR_FIREWALLS = {
26912
26953
  agentmail: agentmailFirewall,
26913
26954
  ahrefs: ahrefsFirewall,
26914
26955
  airtable: airtableFirewall,
26956
+ apollo: apolloFirewall,
26915
26957
  apify: apifyFirewall,
26916
26958
  asana: asanaFirewall,
26917
26959
  atlassian: atlassianFirewall,
@@ -27106,7 +27148,40 @@ function matchFirewallPath(path, pattern) {
27106
27148
  if (pi !== pathSegs.length) return null;
27107
27149
  return params;
27108
27150
  }
27109
- function findMatchingPermissions(method, path, config) {
27151
+ function parseGraphQLRule(rest) {
27152
+ const gqlIdx = rest.indexOf(" GraphQL");
27153
+ if (gqlIdx === -1) return null;
27154
+ const path = gqlIdx > 0 ? rest.slice(0, gqlIdx) : "/";
27155
+ const suffixParts = rest.slice(gqlIdx + 1).split(/\s+/);
27156
+ let typeFilter = null;
27157
+ let opFilter = null;
27158
+ for (let i = 1; i < suffixParts.length; i++) {
27159
+ const part = suffixParts[i];
27160
+ if (part.startsWith("type:")) {
27161
+ typeFilter = part.slice(5);
27162
+ } else if (part.startsWith("operationName:")) {
27163
+ opFilter = part.slice(14);
27164
+ }
27165
+ }
27166
+ return { path, typeFilter, opFilter };
27167
+ }
27168
+ function matchGraphQLBody(body, typeFilter, opFilter) {
27169
+ if (!body) return false;
27170
+ if (typeFilter !== null && body.type !== typeFilter) {
27171
+ return false;
27172
+ }
27173
+ if (opFilter !== null) {
27174
+ const opName = body.operationName;
27175
+ if (!opName) return false;
27176
+ if (opFilter.endsWith("*")) {
27177
+ if (!opName.startsWith(opFilter.slice(0, -1))) return false;
27178
+ } else if (opName !== opFilter) {
27179
+ return false;
27180
+ }
27181
+ }
27182
+ return true;
27183
+ }
27184
+ function findMatchingPermissions(method, path, config, graphqlBody) {
27110
27185
  const upperMethod = method.toUpperCase();
27111
27186
  const matched = /* @__PURE__ */ new Set();
27112
27187
  for (const api of config.apis) {
@@ -27117,9 +27192,14 @@ function findMatchingPermissions(method, path, config) {
27117
27192
  const spaceIdx = rule.indexOf(" ");
27118
27193
  if (spaceIdx === -1) continue;
27119
27194
  const ruleMethod = rule.slice(0, spaceIdx).toUpperCase();
27120
- const rulePath = rule.slice(spaceIdx + 1);
27195
+ const rest = rule.slice(spaceIdx + 1);
27121
27196
  if (ruleMethod !== "ANY" && ruleMethod !== upperMethod) continue;
27197
+ const gql = parseGraphQLRule(rest);
27198
+ const rulePath = gql ? gql.path : rest;
27122
27199
  if (matchFirewallPath(path, rulePath) !== null) {
27200
+ if (gql && (gql.typeFilter !== null || gql.opFilter !== null) && !matchGraphQLBody(graphqlBody, gql.typeFilter, gql.opFilter)) {
27201
+ continue;
27202
+ }
27123
27203
  matched.add(perm.name);
27124
27204
  break;
27125
27205
  }
@@ -31801,4 +31881,4 @@ export {
31801
31881
  parseTime,
31802
31882
  paginate
31803
31883
  };
31804
- //# sourceMappingURL=chunk-HNN3VAZK.js.map
31884
+ //# sourceMappingURL=chunk-3S6PEJ3G.js.map