| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
feat(cli): Add interactive prompts for commands (#5170) This PR improves the CLI's user experience by introducing an interactive mode for the `create`, `dryrun`, `deploy`, and `init` commands. When a user runs one of these commands without providing all the required arguments, the CLI will now launch an interactive prompt to guide them through the missing options. This makes the CLI easier to use, as it no longer requires users to memorize all command-line arguments. The interactive prompts are built using `inquirer` to provide a user-friendly selection list for known values (like function types or environments). The interactive mode is enabled by default and can be disabled with the `--no-interactive` flag or by setting the `CI` environment variable, ensuring backward compatibility and scriptability. Fixes NAN-4237 Testing: 1. Run `npm install` to add the new `inquirer` dependency. 2. Run `nango create` without any arguments. Verify that you are prompted to select a function type, integration, and provide a name. 3. Run `nango dryrun` without any arguments. Verify that you are prompted to select an environment, a function, and a connection. 4. Run `nango deploy` without an environment. Verify that you are prompted to select one. 5. Run `nango init` without a path. Verify that you are prompted to enter one. 6. Run any of the above commands with the `--no-interactive` flag to confirm that the prompts are skipped and the command fails due to missing arguments. <!-- Summary by @propel-code-bot --> --- A shared Ensure utility now orchestrates the interactive prompts, translating missing-argument errors into actionable guidance while preserving non-interactive execution when required. <details> <summary><strong>Affected Areas</strong></summary> • packages/cli/lib/index.ts • packages/cli/lib/services/interactive.service.ts • packages/cli/lib/services/ensure.service.ts • packages/cli/lib/services/function-create.service.ts • packages/cli/lib/types.ts • packages/cli/lib/services/sdk.ts • packages/cli/lib/utils/errors.ts • packages/cli/tsconfig.json • packages/cli/package.json • docs/reference/cli.mdx • package-lock.json </details> --- *This summary was automatically generated by @propel-code-bot* | 8 个月前 | |
fix(cli,dashboard): resolve symlinked integrations in pull and github links (#6632) The `nango pull` and `nango clone` commands would fail for symlinked integrations. Links to code in github would also be incorrect. This PR fixes that by: - Using the metadata already available in `flows.zero.yaml` to resolve symlinks server-side. - Doing a pre-fetch in github to check for symlinks in the CLI (it doesn't have access to the metadata, so we need to fetch). I did not try to over-optimize this, so the CLI does an extra call to github to see if it's a symlink. Keeps the diff way shorter. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/NangoHQ/nango/pull/6632?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> | 2 个月前 | |
fix(cli,dashboard): resolve symlinked integrations in pull and github links (#6632) The `nango pull` and `nango clone` commands would fail for symlinked integrations. Links to code in github would also be incorrect. This PR fixes that by: - Using the metadata already available in `flows.zero.yaml` to resolve symlinks server-side. - Doing a pre-fetch in github to check for symlinks in the CLI (it doesn't have access to the metadata, so we need to fetch). I did not try to over-optimize this, so the CLI does an extra call to github to see if it's a symlink. Keeps the diff way shorter. <!-- This is an auto-generated description by cubic. --> <a href="https://cubic.dev/pr/NangoHQ/nango/pull/6632?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="Review in cubic" src="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"></picture></a> <!-- End of auto-generated description by cubic. --> | 2 个月前 | |
feat: `nango pull` command (#6015) Adds the `nango pull` command. Format is: `nango pull <integration> <function> [-c/--catalog | -e/--env <env>] [-s/--sync | -a/--action/--on-event]` `--catalog` and `--env` are mutually exclusive (only one can be provided). If none are provided, we enter the interactive mode to select an environment. When `--catalog`, we fallback to the same behavior as `nango clone` (most of the code is extracted and reused). When `--env`(or env is selected via interactive mode), we use the new GET /functions/pull` endpoint, also added in this PR. | 4 个月前 | |
feat: `nango pull` command (#6015) Adds the `nango pull` command. Format is: `nango pull <integration> <function> [-c/--catalog | -e/--env <env>] [-s/--sync | -a/--action/--on-event]` `--catalog` and `--env` are mutually exclusive (only one can be provided). If none are provided, we enter the interactive mode to select an environment. When `--catalog`, we fallback to the same behavior as `nango clone` (most of the code is extracted and reused). When `--env`(or env is selected via interactive mode), we use the new GET /functions/pull` endpoint, also added in this PR. | 4 个月前 | |
chore: eslint pass on import order 3 (#4296) ## Changes - Last pass to activate import order rules we were definitely not getting there manually <!-- Summary by @propel-code-bot --> --- This PR performs a comprehensive, automated update to the import statements across the entire codebase to fully enforce ESLint's import/order rules, as well as related import linting conventions. The 'import/order' rule in the ESLint configuration is raised from 'warn' to 'error', and many TypeScript and JavaScript source files are modified to reorder, group, and separate import/type import statements accordingly. No business logic or functional behavior is changed; all modifications are organizational and related to linting compliance. <details> <summary><strong>Key Changes</strong></summary> • Systematic reordering and grouping of import and type import statements in all TypeScript and JavaScript files, aligning with stricter ESLint import/order rules. • ESLint configuration (eslint.config.mjs) updated: 'import/order' set to 'error' and related rules adjusted; minor tuning to linting options for clarity and performance. • No code logic, functionality, or documentation changes introduced-scope is strictly import organization and enforcement of lint rules. </details> <details> <summary><strong>Affected Areas</strong></summary> • All source code files (.ts/.js) across the repository • eslint.config.mjs (ESLint config for import/style rules) </details> *This summary was automatically generated by @propel-code-bot* | 1 年前 | |
feat(multi-api-secret): [BIG] Deprecate environment's secret_key. (#5350) Roll-forward of https://github.com/NangoHQ/nango/pull/5314 We reverted it on Friday because some code needed releasing and I didn't want to release this on a Friday. | 7 个月前 | |
fix(cli): disable ora spinner in non-interactive environments (#5376) ## Issue `nango compile` hangs indefinitely when run via pre-commit hooks due to an upstream bug in ora's `stdin-discarder` dependency (#5207). This is blocking a customer's CI/CD workflow. ## Root cause The bug was fixed in `stdin-discarder@0.3.1`, but `ora@9.1.0` (latest) still depends on `stdin-discarder@^0.2.2` and hasn't released a patched version yet. ## Fix Added a `createSpinner()` wrapper that returns a no-op spinner when running in non-interactive environments (CI, pre-commit hooks, piped output, or when `--no-interactive` flag is passed). The real ora spinner is only used when both `interactive=true` AND `process.stdout.isTTY` is true. This workaround should be removed once `ora` releases a patched version I have opened a PR to actually bump the `stdin-discarder` version on the `ora` repo (https://github.com/sindresorhus/ora/pull/251) Closes #5207 <!-- Summary by @propel-code-bot --> --- **Add resilient spinner wrapper and propagate non-interactive handling across CLI** Introduces a centralized `Spinner` utility that wraps `ora`, falls back to text-based logging when either stdin/stdout is non-TTY, and is wired through compile, dev, deploy, migrations, init, clone, and test generation flows. Global CLI options now auto-disable interactivity in CI environments (`isCI` or `--no-interactive`), ensuring commands invoked from hooks or piped executions no longer hang, while also updating `ora` to `9.2.0` and related dependencies (e.g., `stdin-discarder@0.3.1`). <details> <summary><strong>Key Changes</strong></summary> • Created `packages/cli/lib/utils/spinner.ts` implementing a Proxy-based `Spinner` class that mirrors the `Ora` interface and prints textual status when `process.stdin` or `stdout` is non-TTY. • Replaced direct `ora` usage across CLI commands (`compile`, `dev`, `deploy`, zero-yaml migrations, init, clone, tests, etc.) with the new `Spinner`, adding `interactive` parameters where needed. • Updated `packages/cli/lib/index.ts` global option handling to default to interactive mode, automatically disable it under CI, and pass the flag through to all commands. • Bumped `ora` to `9.2.0` in `packages/cli/package.json` and lockfile, pulling in the fixed `stdin-discarder@0.3.1` plus new transitive dependencies. </details> <details> <summary><strong>Affected Areas</strong></summary> • packages/cli/lib/utils/spinner.ts • packages/cli/lib/zeroYaml/* (compile, dev, deploy, migrations, init, check) • packages/cli/lib/services/{clone,test}.service.ts • packages/cli/lib/index.ts • packages/cli/package.json & package-lock.json </details> --- *This summary was automatically generated by @propel-code-bot* | 7 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 个月前 | ||
| 2 个月前 | ||
| 2 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 1 年前 | ||
| 7 个月前 | ||
| 7 个月前 |