@vm0/cli 9.97.2 → 9.98.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.
- package/{chunk-YB5IZS2M.js → chunk-F2IYWURQ.js} +114 -70
- package/chunk-F2IYWURQ.js.map +1 -0
- package/index.js +10 -10
- package/package.json +1 -1
- package/zero.js +24 -3
- package/zero.js.map +1 -1
- package/chunk-YB5IZS2M.js.map +0 -1
|
@@ -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.
|
|
52
|
+
release: "9.98.1",
|
|
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.
|
|
71
|
+
version: "9.98.1",
|
|
72
72
|
command: process.argv.slice(2).join(" ")
|
|
73
73
|
});
|
|
74
74
|
Sentry.setContext("runtime", {
|
|
@@ -858,6 +858,7 @@ var logsListContract = c2.router({
|
|
|
858
858
|
search: z5.string().optional(),
|
|
859
859
|
agent: z5.string().optional(),
|
|
860
860
|
name: z5.string().optional(),
|
|
861
|
+
since: z5.coerce.number().optional(),
|
|
861
862
|
status: logStatusSchema.optional(),
|
|
862
863
|
triggerSource: triggerSourceSchema.optional(),
|
|
863
864
|
scheduleId: z5.string().uuid().optional()
|
|
@@ -5605,6 +5606,27 @@ var CONNECTOR_TYPES_DEF = {
|
|
|
5605
5606
|
},
|
|
5606
5607
|
defaultAuthMethod: "api-token"
|
|
5607
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
|
+
},
|
|
5608
5630
|
bitrix: {
|
|
5609
5631
|
label: "Bitrix24",
|
|
5610
5632
|
environmentMapping: {
|
|
@@ -8129,6 +8151,26 @@ var airtableFirewall = {
|
|
|
8129
8151
|
]
|
|
8130
8152
|
};
|
|
8131
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
|
+
|
|
8132
8174
|
// ../../packages/core/src/firewalls/apify.generated.ts
|
|
8133
8175
|
var apifyFirewall = {
|
|
8134
8176
|
name: "apify",
|
|
@@ -26911,6 +26953,7 @@ var CONNECTOR_FIREWALLS = {
|
|
|
26911
26953
|
agentmail: agentmailFirewall,
|
|
26912
26954
|
ahrefs: ahrefsFirewall,
|
|
26913
26955
|
airtable: airtableFirewall,
|
|
26956
|
+
apollo: apolloFirewall,
|
|
26914
26957
|
apify: apifyFirewall,
|
|
26915
26958
|
asana: asanaFirewall,
|
|
26916
26959
|
atlassian: atlassianFirewall,
|
|
@@ -30662,6 +30705,7 @@ async function listZeroLogs(options) {
|
|
|
30662
30705
|
query: {
|
|
30663
30706
|
agent: options?.agent,
|
|
30664
30707
|
status: options?.status,
|
|
30708
|
+
since: options?.since,
|
|
30665
30709
|
limit: options?.limit,
|
|
30666
30710
|
cursor: options?.cursor
|
|
30667
30711
|
}
|
|
@@ -31383,73 +31427,6 @@ var EventRenderer = class _EventRenderer {
|
|
|
31383
31427
|
}
|
|
31384
31428
|
};
|
|
31385
31429
|
|
|
31386
|
-
// src/lib/utils/time-parser.ts
|
|
31387
|
-
function parseTime(timeStr) {
|
|
31388
|
-
const relativeMatch = timeStr.match(/^(\d+)([smhdw])$/);
|
|
31389
|
-
if (relativeMatch) {
|
|
31390
|
-
const value = parseInt(relativeMatch[1], 10);
|
|
31391
|
-
const unit = relativeMatch[2];
|
|
31392
|
-
return parseRelativeTime(value, unit);
|
|
31393
|
-
}
|
|
31394
|
-
if (/^\d+$/.test(timeStr)) {
|
|
31395
|
-
const timestamp = parseInt(timeStr, 10);
|
|
31396
|
-
if (timestamp < 1e10) {
|
|
31397
|
-
return timestamp * 1e3;
|
|
31398
|
-
}
|
|
31399
|
-
return timestamp;
|
|
31400
|
-
}
|
|
31401
|
-
const date = new Date(timeStr);
|
|
31402
|
-
if (!isNaN(date.getTime())) {
|
|
31403
|
-
return date.getTime();
|
|
31404
|
-
}
|
|
31405
|
-
throw new Error(
|
|
31406
|
-
`Invalid time format: "${timeStr}". Supported formats: relative (5m, 2h, 1d), ISO 8601 (2024-01-15T10:30:00Z), Unix timestamp`
|
|
31407
|
-
);
|
|
31408
|
-
}
|
|
31409
|
-
function parseRelativeTime(value, unit) {
|
|
31410
|
-
const now = Date.now();
|
|
31411
|
-
const multipliers = {
|
|
31412
|
-
s: 1e3,
|
|
31413
|
-
// seconds
|
|
31414
|
-
m: 60 * 1e3,
|
|
31415
|
-
// minutes
|
|
31416
|
-
h: 60 * 60 * 1e3,
|
|
31417
|
-
// hours
|
|
31418
|
-
d: 24 * 60 * 60 * 1e3,
|
|
31419
|
-
// days
|
|
31420
|
-
w: 7 * 24 * 60 * 60 * 1e3
|
|
31421
|
-
// weeks
|
|
31422
|
-
};
|
|
31423
|
-
const multiplier = multipliers[unit];
|
|
31424
|
-
if (!multiplier) {
|
|
31425
|
-
throw new Error(`Unknown time unit: ${unit}`);
|
|
31426
|
-
}
|
|
31427
|
-
return now - value * multiplier;
|
|
31428
|
-
}
|
|
31429
|
-
|
|
31430
|
-
// src/lib/utils/paginate.ts
|
|
31431
|
-
async function paginate(options) {
|
|
31432
|
-
const { fetchPage, getTimestamp, targetCount, initialSince } = options;
|
|
31433
|
-
const collected = [];
|
|
31434
|
-
let since = initialSince;
|
|
31435
|
-
let hasMore = true;
|
|
31436
|
-
while (hasMore) {
|
|
31437
|
-
const response = await fetchPage(since);
|
|
31438
|
-
collected.push(...response.items);
|
|
31439
|
-
hasMore = response.hasMore;
|
|
31440
|
-
if (targetCount !== "all" && collected.length >= targetCount) {
|
|
31441
|
-
return collected.slice(0, targetCount);
|
|
31442
|
-
}
|
|
31443
|
-
if (response.items.length > 0) {
|
|
31444
|
-
const lastItem = response.items[response.items.length - 1];
|
|
31445
|
-
since = getTimestamp(lastItem);
|
|
31446
|
-
} else {
|
|
31447
|
-
hasMore = false;
|
|
31448
|
-
}
|
|
31449
|
-
}
|
|
31450
|
-
return collected;
|
|
31451
|
-
}
|
|
31452
|
-
|
|
31453
31430
|
// src/commands/run/shared.ts
|
|
31454
31431
|
import chalk5 from "chalk";
|
|
31455
31432
|
import * as fs from "fs";
|
|
@@ -31647,6 +31624,73 @@ function showNextSteps(result) {
|
|
|
31647
31624
|
}
|
|
31648
31625
|
}
|
|
31649
31626
|
|
|
31627
|
+
// src/lib/utils/time-parser.ts
|
|
31628
|
+
function parseTime(timeStr) {
|
|
31629
|
+
const relativeMatch = timeStr.match(/^(\d+)([smhdw])$/);
|
|
31630
|
+
if (relativeMatch) {
|
|
31631
|
+
const value = parseInt(relativeMatch[1], 10);
|
|
31632
|
+
const unit = relativeMatch[2];
|
|
31633
|
+
return parseRelativeTime(value, unit);
|
|
31634
|
+
}
|
|
31635
|
+
if (/^\d+$/.test(timeStr)) {
|
|
31636
|
+
const timestamp = parseInt(timeStr, 10);
|
|
31637
|
+
if (timestamp < 1e10) {
|
|
31638
|
+
return timestamp * 1e3;
|
|
31639
|
+
}
|
|
31640
|
+
return timestamp;
|
|
31641
|
+
}
|
|
31642
|
+
const date = new Date(timeStr);
|
|
31643
|
+
if (!isNaN(date.getTime())) {
|
|
31644
|
+
return date.getTime();
|
|
31645
|
+
}
|
|
31646
|
+
throw new Error(
|
|
31647
|
+
`Invalid time format: "${timeStr}". Supported formats: relative (5m, 2h, 1d), ISO 8601 (2024-01-15T10:30:00Z), Unix timestamp`
|
|
31648
|
+
);
|
|
31649
|
+
}
|
|
31650
|
+
function parseRelativeTime(value, unit) {
|
|
31651
|
+
const now = Date.now();
|
|
31652
|
+
const multipliers = {
|
|
31653
|
+
s: 1e3,
|
|
31654
|
+
// seconds
|
|
31655
|
+
m: 60 * 1e3,
|
|
31656
|
+
// minutes
|
|
31657
|
+
h: 60 * 60 * 1e3,
|
|
31658
|
+
// hours
|
|
31659
|
+
d: 24 * 60 * 60 * 1e3,
|
|
31660
|
+
// days
|
|
31661
|
+
w: 7 * 24 * 60 * 60 * 1e3
|
|
31662
|
+
// weeks
|
|
31663
|
+
};
|
|
31664
|
+
const multiplier = multipliers[unit];
|
|
31665
|
+
if (!multiplier) {
|
|
31666
|
+
throw new Error(`Unknown time unit: ${unit}`);
|
|
31667
|
+
}
|
|
31668
|
+
return now - value * multiplier;
|
|
31669
|
+
}
|
|
31670
|
+
|
|
31671
|
+
// src/lib/utils/paginate.ts
|
|
31672
|
+
async function paginate(options) {
|
|
31673
|
+
const { fetchPage, getTimestamp, targetCount, initialSince } = options;
|
|
31674
|
+
const collected = [];
|
|
31675
|
+
let since = initialSince;
|
|
31676
|
+
let hasMore = true;
|
|
31677
|
+
while (hasMore) {
|
|
31678
|
+
const response = await fetchPage(since);
|
|
31679
|
+
collected.push(...response.items);
|
|
31680
|
+
hasMore = response.hasMore;
|
|
31681
|
+
if (targetCount !== "all" && collected.length >= targetCount) {
|
|
31682
|
+
return collected.slice(0, targetCount);
|
|
31683
|
+
}
|
|
31684
|
+
if (response.items.length > 0) {
|
|
31685
|
+
const lastItem = response.items[response.items.length - 1];
|
|
31686
|
+
since = getTimestamp(lastItem);
|
|
31687
|
+
} else {
|
|
31688
|
+
hasMore = false;
|
|
31689
|
+
}
|
|
31690
|
+
}
|
|
31691
|
+
return collected;
|
|
31692
|
+
}
|
|
31693
|
+
|
|
31650
31694
|
export {
|
|
31651
31695
|
configureGlobalProxyFromEnv,
|
|
31652
31696
|
decodeCliTokenPayload,
|
|
@@ -31799,4 +31843,4 @@ export {
|
|
|
31799
31843
|
parseTime,
|
|
31800
31844
|
paginate
|
|
31801
31845
|
};
|
|
31802
|
-
//# sourceMappingURL=chunk-
|
|
31846
|
+
//# sourceMappingURL=chunk-F2IYWURQ.js.map
|