@intlpullhq/cli 0.1.3 → 0.1.5
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/README.md +50 -2
- package/dist/index.js +1534 -1325
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- **Real-time Sync** - Watch for changes and auto-update local files
|
|
26
26
|
- **Auto-detect Project** - Automatically finds `.intlpull.json` in parent directories
|
|
27
27
|
- **Multiple Output Formats** - JSON, YAML, TypeScript, Android XML, iOS Strings
|
|
28
|
-
- **CI/CD Ready** -
|
|
28
|
+
- **CI/CD Ready** - Full non-interactive mode support for automation pipelines (no TTY required)
|
|
29
29
|
- **OTA Releases** - Publish over-the-air updates for mobile/web SDKs
|
|
30
30
|
- **Enterprise Workflows** - Approval workflows for translation review
|
|
31
31
|
- **Migration Tools** - Migrate from Lokalise, Crowdin, Phrase, or local files
|
|
@@ -498,11 +498,13 @@ npx @intlpullhq/cli migrate from lokalise --api-key <key> --dry-run
|
|
|
498
498
|
**Options:**
|
|
499
499
|
| Option | Description |
|
|
500
500
|
|--------|-------------|
|
|
501
|
-
| `--api-key <key>` | API key for source platform |
|
|
501
|
+
| `--api-key <key>` | API key for source platform (required in CI/CD) |
|
|
502
502
|
| `--project-id <id>` | Specific project to migrate |
|
|
503
503
|
| `--to <id>` | Target IntlPull project ID |
|
|
504
504
|
| `--dry-run` | Preview without importing |
|
|
505
505
|
|
|
506
|
+
> **Note:** In non-interactive environments (CI/CD), the `--api-key` flag is required.
|
|
507
|
+
|
|
506
508
|
### Workflows (Enterprise)
|
|
507
509
|
|
|
508
510
|
Manage approval workflows for translation review.
|
|
@@ -642,6 +644,24 @@ npx @intlpullhq/cli zendesk disconnect
|
|
|
642
644
|
|
|
643
645
|
## CI/CD Integration
|
|
644
646
|
|
|
647
|
+
All CLI commands support **non-interactive mode** and work without a TTY. The CLI automatically detects when running in a non-interactive environment (CI/CD pipelines, Docker, scripts) and adjusts its behavior accordingly.
|
|
648
|
+
|
|
649
|
+
### Non-Interactive Mode
|
|
650
|
+
|
|
651
|
+
Commands automatically work in non-interactive environments:
|
|
652
|
+
|
|
653
|
+
| Command | Non-Interactive Behavior |
|
|
654
|
+
|---------|-------------------------|
|
|
655
|
+
| `upload` / `push` | Auto-confirms plan limit warnings |
|
|
656
|
+
| `download` / `pull` | Works with `--quiet` flag |
|
|
657
|
+
| `init` | Auto-detects framework (use `-y` for explicit) |
|
|
658
|
+
| `sync` | Full support |
|
|
659
|
+
| `check` / `fix` | Full support |
|
|
660
|
+
| `diff` | Full support |
|
|
661
|
+
| `import` / `export` | Full support |
|
|
662
|
+
| `migrate files` | Use `--yes` flag to skip prompts |
|
|
663
|
+
| `migrate from` | Requires `--api-key` flag |
|
|
664
|
+
|
|
645
665
|
### Docker
|
|
646
666
|
|
|
647
667
|
```dockerfile
|
|
@@ -654,6 +674,25 @@ RUN npx @intlpullhq/cli sync --quiet
|
|
|
654
674
|
RUN npm run build
|
|
655
675
|
```
|
|
656
676
|
|
|
677
|
+
### GitHub Actions
|
|
678
|
+
|
|
679
|
+
```yaml
|
|
680
|
+
name: Sync Translations
|
|
681
|
+
on: [push]
|
|
682
|
+
jobs:
|
|
683
|
+
sync:
|
|
684
|
+
runs-on: ubuntu-latest
|
|
685
|
+
steps:
|
|
686
|
+
- uses: actions/checkout@v4
|
|
687
|
+
- uses: actions/setup-node@v4
|
|
688
|
+
with:
|
|
689
|
+
node-version: '20'
|
|
690
|
+
- name: Sync translations
|
|
691
|
+
env:
|
|
692
|
+
INTLPULL_API_KEY: ${{ secrets.INTLPULL_API_KEY }}
|
|
693
|
+
run: npx @intlpullhq/cli sync --quiet
|
|
694
|
+
```
|
|
695
|
+
|
|
657
696
|
### GitLab CI
|
|
658
697
|
|
|
659
698
|
```yaml
|
|
@@ -682,6 +721,15 @@ npx @intlpullhq/cli sync --quiet && next build
|
|
|
682
721
|
npx @intlpullhq/cli check --source en
|
|
683
722
|
```
|
|
684
723
|
|
|
724
|
+
### Recommended CI/CD Flags
|
|
725
|
+
|
|
726
|
+
| Flag | Description |
|
|
727
|
+
|------|-------------|
|
|
728
|
+
| `--quiet` or `-q` | Suppress output except errors |
|
|
729
|
+
| `--dry-run` | Preview changes without applying |
|
|
730
|
+
| `--yes` or `-y` | Skip confirmation prompts |
|
|
731
|
+
| `--no-parallel` | Disable parallel fetching (if rate limited) |
|
|
732
|
+
|
|
685
733
|
---
|
|
686
734
|
|
|
687
735
|
## Configuration
|