@zapier/zapier-sdk-cli 0.32.3 → 0.34.0

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +39 -2
  3. package/dist/cli.cjs +582 -110
  4. package/dist/cli.mjs +573 -102
  5. package/dist/index.cjs +531 -18
  6. package/dist/index.mjs +525 -15
  7. package/dist/package.json +3 -2
  8. package/dist/src/paths.d.ts +1 -0
  9. package/dist/src/paths.js +6 -0
  10. package/dist/src/plugins/index.d.ts +1 -0
  11. package/dist/src/plugins/index.js +1 -0
  12. package/dist/src/plugins/init/display.d.ts +9 -0
  13. package/dist/src/plugins/init/display.js +72 -0
  14. package/dist/src/plugins/init/index.d.ts +16 -0
  15. package/dist/src/plugins/init/index.js +61 -0
  16. package/dist/src/plugins/init/schemas.d.ts +8 -0
  17. package/dist/src/plugins/init/schemas.js +14 -0
  18. package/dist/src/plugins/init/steps.d.ts +39 -0
  19. package/dist/src/plugins/init/steps.js +141 -0
  20. package/dist/src/plugins/init/types.d.ts +31 -0
  21. package/dist/src/plugins/init/types.js +1 -0
  22. package/dist/src/plugins/init/utils.d.ts +48 -0
  23. package/dist/src/plugins/init/utils.js +135 -0
  24. package/dist/src/plugins/logout/index.js +1 -1
  25. package/dist/src/sdk.js +5 -2
  26. package/dist/src/utils/auth/login.js +33 -4
  27. package/dist/src/utils/package-manager-detector.d.ts +3 -1
  28. package/dist/src/utils/package-manager-detector.js +1 -0
  29. package/dist/src/utils/version-checker.js +1 -8
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +6 -5
  32. package/templates/basic/AGENTS.md.hbs +15 -0
  33. package/templates/basic/README.md.hbs +21 -0
  34. package/templates/basic/package.json.hbs +17 -0
  35. package/templates/basic/src/index.ts +46 -0
  36. package/templates/basic/tsconfig.json +12 -0
@@ -1,6 +1,7 @@
1
1
  import { existsSync } from "fs";
2
2
  import { join } from "path";
3
3
  import isInstalledGlobally from "is-installed-globally";
4
+ export const PACKAGE_MANAGERS = ["npm", "pnpm", "yarn", "bun"];
4
5
  /**
5
6
  * Detect which package manager is being used or configured for this project.
6
7
  *
@@ -1,16 +1,9 @@
1
1
  import packageJsonLib from "package-json";
2
2
  import chalk from "chalk";
3
3
  import log from "./log";
4
- import Conf from "conf";
4
+ import { getConfig } from "@zapier/zapier-sdk-cli-login";
5
5
  import { getUpdateCommand } from "./package-manager-detector";
6
6
  import semver from "semver";
7
- let config = null;
8
- function getConfig() {
9
- if (!config) {
10
- config = new Conf({ projectName: "zapier-sdk-cli" });
11
- }
12
- return config;
13
- }
14
7
  const ONE_DAY_MS = 24 * 60 * 60 * 1000;
15
8
  const CACHE_RESET_INTERVAL_MS = (() => {
16
9
  const { ZAPIER_SDK_UPDATE_CHECK_INTERVAL_MS = `${ONE_DAY_MS}` } = process.env;