@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 CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // Import the CLI from the compiled TypeScript
4
- require("../dist/cli.js");
4
+ import "../dist/cli.js";
package/bin/zsdk.js CHANGED
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // Import the CLI from the compiled TypeScript
4
- require("../dist/cli.js");
4
+ import "../dist/cli.js";
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")
@@ -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";
@@ -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";
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- import login from "../utils/auth/login";
2
+ import login from "../utils/auth/login.js";
3
3
  import { getLoggedInUser } from "@zapier/zapier-sdk";
4
4
  export function createLoginCommand() {
5
5
  return new Command("login")
@@ -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
@@ -1,3 +1,3 @@
1
- "use strict";
1
+ export {};
2
2
  // Main exports for the CLI package
3
3
  // All CLI functionality is now schema-driven via generateCLICommands
@@ -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.2.1",
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.2.1"
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
 
@@ -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";
@@ -1,5 +1,5 @@
1
1
  import { Command } from "commander";
2
- import login from "../utils/auth/login";
2
+ import login from "../utils/auth/login.js";
3
3
  import { getLoggedInUser } from "@zapier/zapier-sdk";
4
4
 
5
5
  export function createLoginCommand(): Command {
@@ -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")
@@ -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
 
package/tsconfig.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "target": "ES2020",
4
- "module": "ES2020",
5
- "moduleResolution": "bundler",
4
+ "module": "Node16",
5
+ "moduleResolution": "node16",
6
6
  "strict": true,
7
7
  "noUnusedLocals": true,
8
8
  "noUnusedParameters": true,