@zapier/zapier-sdk-cli 0.2.1 → 0.3.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/bin/zapier-sdk.js +1 -1
- package/bin/zsdk.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/commands/index.d.ts +4 -4
- package/dist/commands/index.js +4 -4
- package/dist/commands/login.js +1 -1
- package/dist/commands/whoami.js +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/utils/auth/login.js +5 -5
- package/dist/utils/cli-generator.js +3 -3
- package/package.json +3 -2
- package/src/cli.ts +2 -2
- package/src/commands/index.ts +4 -4
- package/src/commands/login.ts +1 -1
- package/src/commands/whoami.ts +1 -1
- package/src/utils/auth/login.ts +5 -5
- package/src/utils/cli-generator.ts +3 -3
- package/tsconfig.json +2 -2
package/bin/zapier-sdk.js
CHANGED
package/bin/zsdk.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
3
|
import { createZapierSdk } from "@zapier/zapier-sdk";
|
|
4
|
-
import { generateCliCommands } from "./utils/cli-generator";
|
|
5
|
-
import { createLoginCommand, createLogoutCommand, createWhoamiCommand, createConfigPathCommand, } from "./commands";
|
|
4
|
+
import { generateCliCommands } from "./utils/cli-generator.js";
|
|
5
|
+
import { createLoginCommand, createLogoutCommand, createWhoamiCommand, createConfigPathCommand, } from "./commands/index.js";
|
|
6
6
|
const program = new Command();
|
|
7
7
|
program
|
|
8
8
|
.name("zapier-sdk")
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createLoginCommand } from "./login";
|
|
2
|
-
export { createLogoutCommand } from "./logout";
|
|
3
|
-
export { createWhoamiCommand } from "./whoami";
|
|
4
|
-
export { createConfigPathCommand } from "./configPath";
|
|
1
|
+
export { createLoginCommand } from "./login.js";
|
|
2
|
+
export { createLogoutCommand } from "./logout.js";
|
|
3
|
+
export { createWhoamiCommand } from "./whoami.js";
|
|
4
|
+
export { createConfigPathCommand } from "./configPath.js";
|
package/dist/commands/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createLoginCommand } from "./login";
|
|
2
|
-
export { createLogoutCommand } from "./logout";
|
|
3
|
-
export { createWhoamiCommand } from "./whoami";
|
|
4
|
-
export { createConfigPathCommand } from "./configPath";
|
|
1
|
+
export { createLoginCommand } from "./login.js";
|
|
2
|
+
export { createLogoutCommand } from "./logout.js";
|
|
3
|
+
export { createWhoamiCommand } from "./whoami.js";
|
|
4
|
+
export { createConfigPathCommand } from "./configPath.js";
|
package/dist/commands/login.js
CHANGED
package/dist/commands/whoami.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { getLoggedInUser } from "@zapier/zapier-sdk";
|
|
3
|
-
import { spinPromise } from "../utils/spinner";
|
|
3
|
+
import { spinPromise } from "../utils/spinner.js";
|
|
4
4
|
export function createWhoamiCommand() {
|
|
5
5
|
return new Command("whoami")
|
|
6
6
|
.description("Show current login status and user information")
|
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
package/dist/utils/auth/login.js
CHANGED
|
@@ -2,11 +2,11 @@ import open from "open";
|
|
|
2
2
|
import crypto from "node:crypto";
|
|
3
3
|
import express from "express";
|
|
4
4
|
import pkceChallenge from "pkce-challenge";
|
|
5
|
-
import { AUTH_MODE_HEADER, LOGIN_CLIENT_ID, LOGIN_PORTS, LOGIN_TIMEOUT_MS, ZAPIER_BASE, } from "../constants";
|
|
6
|
-
import { spinPromise } from "../spinner";
|
|
7
|
-
import log from "../log";
|
|
8
|
-
import api from "../api/client";
|
|
9
|
-
import getCallablePromise from "../getCallablePromise";
|
|
5
|
+
import { AUTH_MODE_HEADER, LOGIN_CLIENT_ID, LOGIN_PORTS, LOGIN_TIMEOUT_MS, ZAPIER_BASE, } from "../constants.js";
|
|
6
|
+
import { spinPromise } from "../spinner.js";
|
|
7
|
+
import log from "../log.js";
|
|
8
|
+
import api from "../api/client.js";
|
|
9
|
+
import getCallablePromise from "../getCallablePromise.js";
|
|
10
10
|
import { updateLogin, logout } from "@zapier/zapier-sdk";
|
|
11
11
|
const findAvailablePort = () => {
|
|
12
12
|
return new Promise((resolve, reject) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { hasResolver, isPositional } from "@zapier/zapier-sdk";
|
|
3
|
-
import { SchemaParameterResolver } from "./parameter-resolver";
|
|
4
|
-
import { createPager } from "./pager";
|
|
5
|
-
import { formatItemsFromSchema } from "./schema-formatter";
|
|
3
|
+
import { SchemaParameterResolver } from "./parameter-resolver.js";
|
|
4
|
+
import { createPager } from "./pager.js";
|
|
5
|
+
import { formatItemsFromSchema } from "./schema-formatter.js";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import util from "util";
|
|
8
8
|
// ============================================================================
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zapier/zapier-sdk-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Command line interface for Zapier SDK",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"bin": {
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"ora": "^8.2.0",
|
|
30
31
|
"pkce-challenge": "^5.0.0",
|
|
31
32
|
"zod": "^3.25.67",
|
|
32
|
-
"@zapier/zapier-sdk": "0.
|
|
33
|
+
"@zapier/zapier-sdk": "0.3.1"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
36
|
"@types/express": "^5.0.3",
|
package/src/cli.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { createZapierSdk } from "@zapier/zapier-sdk";
|
|
5
|
-
import { generateCliCommands } from "./utils/cli-generator";
|
|
5
|
+
import { generateCliCommands } from "./utils/cli-generator.js";
|
|
6
6
|
import {
|
|
7
7
|
createLoginCommand,
|
|
8
8
|
createLogoutCommand,
|
|
9
9
|
createWhoamiCommand,
|
|
10
10
|
createConfigPathCommand,
|
|
11
|
-
} from "./commands";
|
|
11
|
+
} from "./commands/index.js";
|
|
12
12
|
|
|
13
13
|
const program = new Command();
|
|
14
14
|
|
package/src/commands/index.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { createLoginCommand } from "./login";
|
|
2
|
-
export { createLogoutCommand } from "./logout";
|
|
3
|
-
export { createWhoamiCommand } from "./whoami";
|
|
4
|
-
export { createConfigPathCommand } from "./configPath";
|
|
1
|
+
export { createLoginCommand } from "./login.js";
|
|
2
|
+
export { createLogoutCommand } from "./logout.js";
|
|
3
|
+
export { createWhoamiCommand } from "./whoami.js";
|
|
4
|
+
export { createConfigPathCommand } from "./configPath.js";
|
package/src/commands/login.ts
CHANGED
package/src/commands/whoami.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { getLoggedInUser } from "@zapier/zapier-sdk";
|
|
3
|
-
import { spinPromise } from "../utils/spinner";
|
|
3
|
+
import { spinPromise } from "../utils/spinner.js";
|
|
4
4
|
|
|
5
5
|
export function createWhoamiCommand(): Command {
|
|
6
6
|
return new Command("whoami")
|
package/src/utils/auth/login.ts
CHANGED
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
LOGIN_PORTS,
|
|
10
10
|
LOGIN_TIMEOUT_MS,
|
|
11
11
|
ZAPIER_BASE,
|
|
12
|
-
} from "../constants";
|
|
13
|
-
import { spinPromise } from "../spinner";
|
|
14
|
-
import log from "../log";
|
|
15
|
-
import api from "../api/client";
|
|
16
|
-
import getCallablePromise from "../getCallablePromise";
|
|
12
|
+
} from "../constants.js";
|
|
13
|
+
import { spinPromise } from "../spinner.js";
|
|
14
|
+
import log from "../log.js";
|
|
15
|
+
import api from "../api/client.js";
|
|
16
|
+
import getCallablePromise from "../getCallablePromise.js";
|
|
17
17
|
import { updateLogin, logout } from "@zapier/zapier-sdk";
|
|
18
18
|
|
|
19
19
|
const findAvailablePort = (): Promise<number> => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { ZapierSdk, hasResolver, isPositional } from "@zapier/zapier-sdk";
|
|
4
|
-
import { SchemaParameterResolver } from "./parameter-resolver";
|
|
5
|
-
import { createPager } from "./pager";
|
|
6
|
-
import { formatItemsFromSchema } from "./schema-formatter";
|
|
4
|
+
import { SchemaParameterResolver } from "./parameter-resolver.js";
|
|
5
|
+
import { createPager } from "./pager.js";
|
|
6
|
+
import { formatItemsFromSchema } from "./schema-formatter.js";
|
|
7
7
|
import chalk from "chalk";
|
|
8
8
|
import util from "util";
|
|
9
9
|
|