@zapier/zapier-sdk-cli 0.81.0 → 0.81.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.
- package/CHANGELOG.md +18 -0
- package/README.md +1 -1
- package/dist/cli.cjs +20 -6
- package/dist/cli.mjs +21 -7
- package/dist/experimental.cjs +19 -5
- package/dist/experimental.mjs +22 -8
- package/dist/index.cjs +20 -6
- package/dist/index.mjs +21 -7
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# @zapier/zapier-sdk-cli
|
|
2
2
|
|
|
3
|
+
## 0.81.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f56765a: `zapier-sdk login` and `zapier-sdk signup` now apply `--debug`, and a host's `fetch` and route overrides, to the requests they make while provisioning credentials for the newly authenticated account. Those requests previously ran with default options regardless of how the CLI was invoked.
|
|
8
|
+
- Updated dependencies [f56765a]
|
|
9
|
+
- Updated dependencies [f56765a]
|
|
10
|
+
- @zapier/zapier-sdk@0.109.0
|
|
11
|
+
- @zapier/zapier-sdk-mcp@0.23.2
|
|
12
|
+
|
|
13
|
+
## 0.81.1
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [47a61ba]
|
|
18
|
+
- @zapier/zapier-sdk@0.108.1
|
|
19
|
+
- @zapier/zapier-sdk-mcp@0.23.1
|
|
20
|
+
|
|
3
21
|
## 0.81.0
|
|
4
22
|
|
|
5
23
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1270,7 +1270,7 @@ npx zapier-sdk list-connections [app] [--search] [--title] [--owner] [--connecti
|
|
|
1270
1270
|
|
|
1271
1271
|
#### `wait-for-new-connection`
|
|
1272
1272
|
|
|
1273
|
-
Wait for a new connection to appear for the given app. Polls
|
|
1273
|
+
Wait for a new connection to appear for the given app. Polls the connections list newest-first until the most recent matching row's `date` is at or after the started-at timestamp, then returns it. Pair with `get-connection-start-url` — that mints the URL the user opens, this waits for the resulting connection to land. Errors with a timeout after the configured timeout (default 5 min). Example (JS):
|
|
1274
1274
|
|
|
1275
1275
|
```ts
|
|
1276
1276
|
const {
|
package/dist/cli.cjs
CHANGED
|
@@ -602,7 +602,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
602
602
|
|
|
603
603
|
// package.json
|
|
604
604
|
var package_default = {
|
|
605
|
-
version: "0.81.
|
|
605
|
+
version: "0.81.2"};
|
|
606
606
|
var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
|
|
607
607
|
var LOCKFILES = [
|
|
608
608
|
["pnpm-lock.yaml", "pnpm"],
|
|
@@ -4163,6 +4163,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
4163
4163
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
4164
4164
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
4165
4165
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
4166
|
+
var accountCredentialsApiPlugin = zapierSdk.definePlugin({
|
|
4167
|
+
namespace: "zapierCli",
|
|
4168
|
+
name: "accountCredentialsApi",
|
|
4169
|
+
imports: [zapierSdk.apiPlugin],
|
|
4170
|
+
exports: []
|
|
4171
|
+
});
|
|
4166
4172
|
function getEntryPointLabel(entryPoint) {
|
|
4167
4173
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
4168
4174
|
}
|
|
@@ -4471,11 +4477,19 @@ async function provisionAccountCredentials({
|
|
|
4471
4477
|
isNonInteractive,
|
|
4472
4478
|
isHeadless
|
|
4473
4479
|
}) {
|
|
4474
|
-
const
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4480
|
+
const scopedSdk = zapierSdk.createSdk(accountCredentialsApiPlugin, {
|
|
4481
|
+
configuration: {
|
|
4482
|
+
[zapierSdk.SDK_OPTIONS_ID]: {
|
|
4483
|
+
credentials: accessToken,
|
|
4484
|
+
baseUrl: credentialsBaseUrl2,
|
|
4485
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
4486
|
+
debug: imports.sdkOptions?.debug,
|
|
4487
|
+
fetch: imports.sdkOptions?.fetch,
|
|
4488
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
4489
|
+
}
|
|
4490
|
+
}
|
|
4478
4491
|
});
|
|
4492
|
+
const scopedApi = zapierSdk.resolvePlugin(scopedSdk, zapierSdk.apiPluginRef);
|
|
4479
4493
|
const profile = await getProfile(scopedApi);
|
|
4480
4494
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
4481
4495
|
`);
|
|
@@ -8685,7 +8699,7 @@ function buildBoxLines(message) {
|
|
|
8685
8699
|
// package.json with { type: 'json' }
|
|
8686
8700
|
var package_default2 = {
|
|
8687
8701
|
name: "@zapier/zapier-sdk-cli",
|
|
8688
|
-
version: "0.81.
|
|
8702
|
+
version: "0.81.2"};
|
|
8689
8703
|
|
|
8690
8704
|
// src/sdk.ts
|
|
8691
8705
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
package/dist/cli.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command, CommanderError, Option, InvalidArgumentError } from 'commander';
|
|
3
|
-
import { getConnectionPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin,
|
|
3
|
+
import { getConnectionPlugin, definePlugin, apiPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin, omitExports, zapierSdkPlugin, BaseSdkOptionsSchema, disposeSdk, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk as createSdk$1, CORE_OPTIONS_ID as CORE_OPTIONS_ID$1, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin as addPlugin$1, resolvePlugin, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, DEPRECATION_NOTICE_EVENT, runWithCallerContext, isCoreCancelledSignal, getNegatable, isPositional, isZapierError, formatErrorMessage, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, isZapierConflictError, getReleaseId, getCurrentTimestamp, generateEventId, isZapierApprovalError, ZapierAuthenticationError } from '@zapier/zapier-sdk';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import inquirer from 'inquirer';
|
|
6
6
|
import chalk9 from 'chalk';
|
|
@@ -558,7 +558,7 @@ var SHARED_COMMAND_CLI_OPTIONS = [
|
|
|
558
558
|
|
|
559
559
|
// package.json
|
|
560
560
|
var package_default = {
|
|
561
|
-
version: "0.81.
|
|
561
|
+
version: "0.81.2"};
|
|
562
562
|
var PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
|
|
563
563
|
var LOCKFILES = [
|
|
564
564
|
["pnpm-lock.yaml", "pnpm"],
|
|
@@ -4119,6 +4119,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
4119
4119
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
4120
4120
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
4121
4121
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
4122
|
+
var accountCredentialsApiPlugin = definePlugin({
|
|
4123
|
+
namespace: "zapierCli",
|
|
4124
|
+
name: "accountCredentialsApi",
|
|
4125
|
+
imports: [apiPlugin],
|
|
4126
|
+
exports: []
|
|
4127
|
+
});
|
|
4122
4128
|
function getEntryPointLabel(entryPoint) {
|
|
4123
4129
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
4124
4130
|
}
|
|
@@ -4427,11 +4433,19 @@ async function provisionAccountCredentials({
|
|
|
4427
4433
|
isNonInteractive,
|
|
4428
4434
|
isHeadless
|
|
4429
4435
|
}) {
|
|
4430
|
-
const
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4436
|
+
const scopedSdk = createSdk$1(accountCredentialsApiPlugin, {
|
|
4437
|
+
configuration: {
|
|
4438
|
+
[SDK_OPTIONS_ID$1]: {
|
|
4439
|
+
credentials: accessToken,
|
|
4440
|
+
baseUrl: credentialsBaseUrl2,
|
|
4441
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
4442
|
+
debug: imports.sdkOptions?.debug,
|
|
4443
|
+
fetch: imports.sdkOptions?.fetch,
|
|
4444
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
4445
|
+
}
|
|
4446
|
+
}
|
|
4434
4447
|
});
|
|
4448
|
+
const scopedApi = resolvePlugin(scopedSdk, apiPluginRef);
|
|
4435
4449
|
const profile = await getProfile(scopedApi);
|
|
4436
4450
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
4437
4451
|
`);
|
|
@@ -8641,7 +8655,7 @@ function buildBoxLines(message) {
|
|
|
8641
8655
|
// package.json with { type: 'json' }
|
|
8642
8656
|
var package_default2 = {
|
|
8643
8657
|
name: "@zapier/zapier-sdk-cli",
|
|
8644
|
-
version: "0.81.
|
|
8658
|
+
version: "0.81.2"};
|
|
8645
8659
|
|
|
8646
8660
|
// src/sdk.ts
|
|
8647
8661
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
package/dist/experimental.cjs
CHANGED
|
@@ -2365,6 +2365,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
2365
2365
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
2366
2366
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
2367
2367
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
2368
|
+
var accountCredentialsApiPlugin = zapierSdk.definePlugin({
|
|
2369
|
+
namespace: "zapierCli",
|
|
2370
|
+
name: "accountCredentialsApi",
|
|
2371
|
+
imports: [zapierSdk.apiPlugin],
|
|
2372
|
+
exports: []
|
|
2373
|
+
});
|
|
2368
2374
|
function getEntryPointLabel(entryPoint) {
|
|
2369
2375
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
2370
2376
|
}
|
|
@@ -2673,11 +2679,19 @@ async function provisionAccountCredentials({
|
|
|
2673
2679
|
isNonInteractive,
|
|
2674
2680
|
isHeadless
|
|
2675
2681
|
}) {
|
|
2676
|
-
const
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2682
|
+
const scopedSdk = zapierSdk.createSdk(accountCredentialsApiPlugin, {
|
|
2683
|
+
configuration: {
|
|
2684
|
+
[zapierSdk.SDK_OPTIONS_ID]: {
|
|
2685
|
+
credentials: accessToken,
|
|
2686
|
+
baseUrl: credentialsBaseUrl,
|
|
2687
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
2688
|
+
debug: imports.sdkOptions?.debug,
|
|
2689
|
+
fetch: imports.sdkOptions?.fetch,
|
|
2690
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
2691
|
+
}
|
|
2692
|
+
}
|
|
2680
2693
|
});
|
|
2694
|
+
const scopedApi = zapierSdk.resolvePlugin(scopedSdk, zapierSdk.apiPluginRef);
|
|
2681
2695
|
const profile = await getProfile(scopedApi);
|
|
2682
2696
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
2683
2697
|
`);
|
|
@@ -7178,7 +7192,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
|
|
|
7178
7192
|
// package.json with { type: 'json' }
|
|
7179
7193
|
var package_default = {
|
|
7180
7194
|
name: "@zapier/zapier-sdk-cli",
|
|
7181
|
-
version: "0.81.
|
|
7195
|
+
version: "0.81.2"};
|
|
7182
7196
|
|
|
7183
7197
|
// src/sdk.ts
|
|
7184
7198
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
package/dist/experimental.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import crypto, { createHash } from 'crypto';
|
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import { resolve, join, dirname, basename, relative, extname } from 'path';
|
|
9
9
|
import * as lockfile from 'proper-lockfile';
|
|
10
|
-
import { defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin,
|
|
10
|
+
import { definePlugin, apiPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin, omitExports, zapierSdkPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk, SDK_OPTIONS_ID, resolvePlugin, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
|
|
11
11
|
import { z } from 'zod';
|
|
12
|
-
import { triggerInboxResolver, DrainTriggerInboxSchema, WatchTriggerInboxSchema, injectCliLogin as injectCliLogin$1, definePlugin as definePlugin$1, omitExports as omitExports$1, zapierExperimentalSdkPlugin, createSdk as createSdk$1, CORE_OPTIONS_ID, SDK_OPTIONS_ID, addPlugin } from '@zapier/zapier-sdk/experimental';
|
|
12
|
+
import { triggerInboxResolver, DrainTriggerInboxSchema, WatchTriggerInboxSchema, injectCliLogin as injectCliLogin$1, definePlugin as definePlugin$1, omitExports as omitExports$1, zapierExperimentalSdkPlugin, createSdk as createSdk$1, CORE_OPTIONS_ID, SDK_OPTIONS_ID as SDK_OPTIONS_ID$1, addPlugin } from '@zapier/zapier-sdk/experimental';
|
|
13
13
|
import { hostname } from 'os';
|
|
14
14
|
import inquirer4 from 'inquirer';
|
|
15
15
|
import chalk5 from 'chalk';
|
|
@@ -2324,6 +2324,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
2324
2324
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
2325
2325
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
2326
2326
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
2327
|
+
var accountCredentialsApiPlugin = definePlugin({
|
|
2328
|
+
namespace: "zapierCli",
|
|
2329
|
+
name: "accountCredentialsApi",
|
|
2330
|
+
imports: [apiPlugin],
|
|
2331
|
+
exports: []
|
|
2332
|
+
});
|
|
2327
2333
|
function getEntryPointLabel(entryPoint) {
|
|
2328
2334
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
2329
2335
|
}
|
|
@@ -2632,11 +2638,19 @@ async function provisionAccountCredentials({
|
|
|
2632
2638
|
isNonInteractive,
|
|
2633
2639
|
isHeadless
|
|
2634
2640
|
}) {
|
|
2635
|
-
const
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2641
|
+
const scopedSdk = createSdk(accountCredentialsApiPlugin, {
|
|
2642
|
+
configuration: {
|
|
2643
|
+
[SDK_OPTIONS_ID]: {
|
|
2644
|
+
credentials: accessToken,
|
|
2645
|
+
baseUrl: credentialsBaseUrl,
|
|
2646
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
2647
|
+
debug: imports.sdkOptions?.debug,
|
|
2648
|
+
fetch: imports.sdkOptions?.fetch,
|
|
2649
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
2650
|
+
}
|
|
2651
|
+
}
|
|
2639
2652
|
});
|
|
2653
|
+
const scopedApi = resolvePlugin(scopedSdk, apiPluginRef);
|
|
2640
2654
|
const profile = await getProfile(scopedApi);
|
|
2641
2655
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
2642
2656
|
`);
|
|
@@ -7137,7 +7151,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
|
|
|
7137
7151
|
// package.json with { type: 'json' }
|
|
7138
7152
|
var package_default = {
|
|
7139
7153
|
name: "@zapier/zapier-sdk-cli",
|
|
7140
|
-
version: "0.81.
|
|
7154
|
+
version: "0.81.2"};
|
|
7141
7155
|
|
|
7142
7156
|
// src/sdk.ts
|
|
7143
7157
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
|
@@ -7227,7 +7241,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
7227
7241
|
});
|
|
7228
7242
|
const sdk = createSdk$1(cliExperimentalSdkPlugin, {
|
|
7229
7243
|
configuration: {
|
|
7230
|
-
[SDK_OPTIONS_ID]: stackOptions,
|
|
7244
|
+
[SDK_OPTIONS_ID$1]: stackOptions,
|
|
7231
7245
|
[CORE_OPTIONS_ID]: cliCoreOptions,
|
|
7232
7246
|
[CLI_EXTENSIONS_ID]: extensions,
|
|
7233
7247
|
// Built by the experimental factory: `mcp` reads this to launch the
|
package/dist/index.cjs
CHANGED
|
@@ -2371,6 +2371,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
2371
2371
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
2372
2372
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
2373
2373
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
2374
|
+
var accountCredentialsApiPlugin = zapierSdk.definePlugin({
|
|
2375
|
+
namespace: "zapierCli",
|
|
2376
|
+
name: "accountCredentialsApi",
|
|
2377
|
+
imports: [zapierSdk.apiPlugin],
|
|
2378
|
+
exports: []
|
|
2379
|
+
});
|
|
2374
2380
|
function getEntryPointLabel(entryPoint) {
|
|
2375
2381
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
2376
2382
|
}
|
|
@@ -2679,11 +2685,19 @@ async function provisionAccountCredentials({
|
|
|
2679
2685
|
isNonInteractive,
|
|
2680
2686
|
isHeadless
|
|
2681
2687
|
}) {
|
|
2682
|
-
const
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2688
|
+
const scopedSdk = zapierSdk.createSdk(accountCredentialsApiPlugin, {
|
|
2689
|
+
configuration: {
|
|
2690
|
+
[zapierSdk.SDK_OPTIONS_ID]: {
|
|
2691
|
+
credentials: accessToken,
|
|
2692
|
+
baseUrl: credentialsBaseUrl,
|
|
2693
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
2694
|
+
debug: imports.sdkOptions?.debug,
|
|
2695
|
+
fetch: imports.sdkOptions?.fetch,
|
|
2696
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2686
2699
|
});
|
|
2700
|
+
const scopedApi = zapierSdk.resolvePlugin(scopedSdk, zapierSdk.apiPluginRef);
|
|
2687
2701
|
const profile = await getProfile(scopedApi);
|
|
2688
2702
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
2689
2703
|
`);
|
|
@@ -7179,7 +7193,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
|
|
|
7179
7193
|
// package.json with { type: 'json' }
|
|
7180
7194
|
var package_default = {
|
|
7181
7195
|
name: "@zapier/zapier-sdk-cli",
|
|
7182
|
-
version: "0.81.
|
|
7196
|
+
version: "0.81.2"};
|
|
7183
7197
|
|
|
7184
7198
|
// src/sdk.ts
|
|
7185
7199
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
|
@@ -7263,7 +7277,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
7263
7277
|
|
|
7264
7278
|
// package.json
|
|
7265
7279
|
var package_default2 = {
|
|
7266
|
-
version: "0.81.
|
|
7280
|
+
version: "0.81.2"};
|
|
7267
7281
|
|
|
7268
7282
|
// src/telemetry/builders.ts
|
|
7269
7283
|
function createCliBaseEvent(context = {}) {
|
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import crypto, { createHash } from 'crypto';
|
|
|
7
7
|
import * as path from 'path';
|
|
8
8
|
import { resolve, join, dirname, basename, relative, extname } from 'path';
|
|
9
9
|
import * as lockfile from 'proper-lockfile';
|
|
10
|
-
import { defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin,
|
|
10
|
+
import { definePlugin, apiPlugin, defineMethod, apiPluginRef, resolveCredentialsPluginRef, eventEmissionPluginRef, sdkOptionsPluginRef, declareOptionalProperty, OutputPropertySchema, ZapierBundleError, isZapierBundleError, DEFAULT_CONFIG_PATH, declareMethod, ZapierValidationError, isZapierValidationError, ZapierUnknownError, manifestPluginRef, defineResolver, isPermanentHttpError, isZapierAuthenticationError, ZapierApiError, defineOverride, fetchPlugin, zapierCoreOptions, injectCliLogin, omitExports, zapierSdkPlugin, getConnectionPlugin, invalidateCachedToken, batch, toSnakeCase, ZapierError, isZapierReleaseTriggerMessageSignal, createSdk, SDK_OPTIONS_ID, resolvePlugin, isCredentialsObject, getRegistryPlugin, createController, ZapierAbortDrainSignal, ZapierReleaseTriggerMessageSignal, buildApplicationLifecycleEvent, AuthMechanism, isCoreCancelledSignal, ZapierAuthenticationError, CORE_OPTIONS_ID, addPlugin, getOsInfo, getPlatformVersions, getAgent, getTtyContext, getCiPlatform, isCi, getReleaseId, getCurrentTimestamp, generateEventId, DEPRECATION_NOTICE_EVENT } from '@zapier/zapier-sdk';
|
|
11
11
|
import { z } from 'zod';
|
|
12
12
|
import chalk5 from 'chalk';
|
|
13
13
|
import { hostname } from 'os';
|
|
@@ -2330,6 +2330,12 @@ var LEGACY_JWT_UPGRADE_PROMPT = "We're upgrading your login to client credential
|
|
|
2330
2330
|
var SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup` to generate a fresh signup URL and try again.";
|
|
2331
2331
|
var HEADLESS_LOGIN_RECOVERY_MESSAGE = "Restart `zapier-sdk login --headless` to generate a fresh login URL and try again.";
|
|
2332
2332
|
var HEADLESS_SIGNUP_RECOVERY_MESSAGE = "Restart `zapier-sdk signup --headless` to generate a fresh signup URL and try again.";
|
|
2333
|
+
var accountCredentialsApiPlugin = definePlugin({
|
|
2334
|
+
namespace: "zapierCli",
|
|
2335
|
+
name: "accountCredentialsApi",
|
|
2336
|
+
imports: [apiPlugin],
|
|
2337
|
+
exports: []
|
|
2338
|
+
});
|
|
2333
2339
|
function getEntryPointLabel(entryPoint) {
|
|
2334
2340
|
return entryPoint === "signup" ? "Signup" : "Login";
|
|
2335
2341
|
}
|
|
@@ -2638,11 +2644,19 @@ async function provisionAccountCredentials({
|
|
|
2638
2644
|
isNonInteractive,
|
|
2639
2645
|
isHeadless
|
|
2640
2646
|
}) {
|
|
2641
|
-
const
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2647
|
+
const scopedSdk = createSdk(accountCredentialsApiPlugin, {
|
|
2648
|
+
configuration: {
|
|
2649
|
+
[SDK_OPTIONS_ID]: {
|
|
2650
|
+
credentials: accessToken,
|
|
2651
|
+
baseUrl: credentialsBaseUrl,
|
|
2652
|
+
callerPackage: imports.sdkOptions?.callerPackage,
|
|
2653
|
+
debug: imports.sdkOptions?.debug,
|
|
2654
|
+
fetch: imports.sdkOptions?.fetch,
|
|
2655
|
+
routeOverrides: imports.sdkOptions?.routeOverrides
|
|
2656
|
+
}
|
|
2657
|
+
}
|
|
2645
2658
|
});
|
|
2659
|
+
const scopedApi = resolvePlugin(scopedSdk, apiPluginRef);
|
|
2646
2660
|
const profile = await getProfile(scopedApi);
|
|
2647
2661
|
process.stderr.write(`${getProfileMessage(entryPoint, profile.email)}
|
|
2648
2662
|
`);
|
|
@@ -7138,7 +7152,7 @@ function collectDeprecationNoticeAndForward(event, onEvent) {
|
|
|
7138
7152
|
// package.json with { type: 'json' }
|
|
7139
7153
|
var package_default = {
|
|
7140
7154
|
name: "@zapier/zapier-sdk-cli",
|
|
7141
|
-
version: "0.81.
|
|
7155
|
+
version: "0.81.2"};
|
|
7142
7156
|
|
|
7143
7157
|
// src/sdk.ts
|
|
7144
7158
|
var warnedDeprecatedMethods = /* @__PURE__ */ new Set();
|
|
@@ -7222,7 +7236,7 @@ function createZapierCliSdk(options = {}) {
|
|
|
7222
7236
|
|
|
7223
7237
|
// package.json
|
|
7224
7238
|
var package_default2 = {
|
|
7225
|
-
version: "0.81.
|
|
7239
|
+
version: "0.81.2"};
|
|
7226
7240
|
|
|
7227
7241
|
// src/telemetry/builders.ts
|
|
7228
7242
|
function createCliBaseEvent(context = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk-cli",
|
|
3
|
-
"version": "0.81.
|
|
3
|
+
"version": "0.81.2",
|
|
4
4
|
"description": "Command line interface for Zapier SDK",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"typescript": "^5.8.3",
|
|
96
96
|
"wrap-ansi": "^10.0.0",
|
|
97
97
|
"zod": "4.3.6",
|
|
98
|
-
"@zapier/
|
|
99
|
-
"@zapier/zapier-sdk-mcp": "0.23.
|
|
100
|
-
"@zapier/
|
|
98
|
+
"@zapier/zapier-sdk": "0.109.0",
|
|
99
|
+
"@zapier/zapier-sdk-mcp": "0.23.2",
|
|
100
|
+
"@zapier/kitcore": "0.20.0"
|
|
101
101
|
},
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@types/cross-spawn": "^6.0.6",
|