Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
26806d7
refactor: modernize toolchain, migrate to ESM, and remove axios/lodash
mateuscardosodeveloper Apr 22, 2026
963e949
refactor(change-bucket-type): drop dead `throw false` after errorHandler
mateuscardosodeveloper Apr 22, 2026
bea9b78
test: add 71 unit test files to reach 80% line coverage
mateuscardosodeveloper Apr 22, 2026
2c95af1
test: raise branch coverage above 80% and wire CI to test:coverage
mateuscardosodeveloper Apr 22, 2026
75d6699
refactor: add tsBuildInfoFile option to TypeScript configuration
mateuscardosodeveloper Apr 22, 2026
fffc9da
chore: update GitHub Actions to use checkout and setup-node v6
mateuscardosodeveloper Apr 22, 2026
7025357
feat(deploy): add --all and -t/--token flags for CI/CD
mateuscardosodeveloper Apr 22, 2026
844e2e1
docs(readme): add CI/CD pipelines section
mateuscardosodeveloper Apr 22, 2026
93d094a
test(deploy): cover --all, -t/--token, and legacy "all" rejection
mateuscardosodeveloper Apr 22, 2026
170ee17
test(deploy): add tests for interactive analysis selection and confir…
mateuscardosodeveloper Apr 22, 2026
2dc2d77
refactor(deploy): move IDeployOptions interface definition for better…
mateuscardosodeveloper Apr 22, 2026
f9fe7a4
chore(fmt): add oxfmt config and format scripts
mateuscardosodeveloper Apr 22, 2026
ca42d92
chore(vscode): commit workspace settings for format-on-save
mateuscardosodeveloper Apr 22, 2026
ae697bd
chore(lint): port Biome rules to oxlint, silence warnings in npm script
mateuscardosodeveloper Apr 23, 2026
9c7d4d2
refactor: remove dead returns after errorHandler, enforce TS7027
mateuscardosodeveloper Apr 23, 2026
7001106
Merge branch 'feat/cli-refactoring-deps' into feat/cli-refactoring-tests
mateuscardosodeveloper Apr 23, 2026
3a60a2c
refactor(tests): enforce return type for errorHandlerMock and clean u…
mateuscardosodeveloper Apr 23, 2026
73fc688
Merge branch 'feat/cli-refactoring-tests' into feat/cli-refactoring-c…
mateuscardosodeveloper Apr 23, 2026
60c5792
fix(run): use Node's native type-stripping, drop removed @swc-node/re…
mateuscardosodeveloper Apr 24, 2026
85cf615
fix(docs): update example commands to use short options for consistency
mateuscardosodeveloper Apr 24, 2026
56d8929
fix(run): switch to tsx loader for CJS-compatible TS execution
mateuscardosodeveloper Apr 24, 2026
b94b707
feat(backup): restore device params and serial tokens on restore
mateuscardosodeveloper Apr 24, 2026
32dbc0e
feat(restore): enhance param restoration logic to skip existing keys …
mateuscardosodeveloper Apr 24, 2026
8bd56d6
Merge pull request #32 from tago-io/feat/cli-refactoring-ci-cd
vitorfdl Apr 27, 2026
57d756f
Merge pull request #31 from tago-io/feat/cli-refactoring-tests
vitorfdl Apr 27, 2026
816909d
refactor(output): adopt clig.dev stdout/stderr split for status messages
bgelatti Apr 28, 2026
2a3efd1
fix(deploy): wrap execSync in try/catch and use infoMSG banners
bgelatti Apr 28, 2026
61b6017
fix(analysis-mode): honor -m/--mode flag instead of reading filterMode
bgelatti Apr 28, 2026
02548df
fix(run-analysis): correct success message format
bgelatti Apr 28, 2026
9abe9c1
fix(device-list): emit valid JSON and restore the bare-table path
bgelatti Apr 28, 2026
f79ebcf
fix(device-info, data): emit parseable JSON in --json/--stringify modes
bgelatti Apr 28, 2026
9ca7493
fix(device-type): graceful error when device ID is invalid
bgelatti Apr 28, 2026
5e30b56
fix(device-backup): use real path in success message and add EOF newline
bgelatti Apr 28, 2026
e191261
fix(change-network): preserve serie_number when recreating tokens
bgelatti Apr 28, 2026
b19f924
fix(copy-tab): error when zero widgets are eligible to copy
bgelatti Apr 28, 2026
2a0386c
fix(export): graceful error on devices.create and devices.edit
bgelatti Apr 28, 2026
5b78324
test(coverage): exercise the new try/catch error branches
bgelatti Apr 28, 2026
3f39205
fix(device-copy): announce only after the user confirms the copy
bgelatti Apr 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [ 24.x ]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run linter
- run: npm test
- run: npm run test:coverage
- run: npm run build --if-present
env:
CI: true
10 changes: 5 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish to NPM

on:
release:
types: [published]
types: [ published ]

jobs:
build:
Expand All @@ -12,11 +12,11 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
node-version: "24.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm run linter
- run: npm run test
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,8 @@ src/analysis
.tago-lock.ty.lock
.tagoio
.tago-lock.dev.lock
*.lock
exportBackup
.tago-lock.dev-ue.lock
.tago-lock.dev-ue-2.lock
.tago-lock.dev-1.lock
8 changes: 8 additions & 0 deletions .oxfmtrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxfmt/configuration_schema.json",
"useTabs": false,
"tabWidth": 2,
"endOfLine": "lf",
"printWidth": 160,
"singleAttributePerLine": false
}
29 changes: 29 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"ignorePatterns": ["build/**", ".tagoio/**", "coverage/**"],
"env": {
"node": true,
"es2024": true
},
"rules": {
"typescript/no-explicit-any": "warn",
"unicorn/prefer-node-protocol": "warn",
"eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_", "varsIgnorePattern": "^_", "destructuredArrayIgnorePattern": "^_" }],

"no-empty": "error",
"no-fallthrough": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"getter-return": "error",
"curly": "error",

"typescript/no-namespace": "error",
"typescript/no-empty-object-type": "warn",
"typescript/no-unnecessary-type-constraint": "error",

"unicorn/no-array-for-each": "warn",
"unicorn/prefer-array-flat-map": "warn",

"import/no-default-export": "warn"
}
}
23 changes: 0 additions & 23 deletions .swcrc

This file was deleted.

7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"[typescript]": {
"editor.defaultFormatter": "oxc.oxc-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file"
},
}
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Analysis.use(startAnalysis, { token: process.env.T_ANALYSIS_TOKEN });

```

If you want to use the Debugger with -D, make sure you have a **.swcrc** file with sourceMaps activated. This repository contains a .swcrc.example file if you prefer to just copy to your folder.
`tagoio run` executes your TypeScript file directly using Node's native experimental-transform-types runtime, so no build step or loader configuration is required. The `-d` flag forwards to Node so you can attach a debugger.

## Working with Environments

Expand Down Expand Up @@ -198,6 +198,37 @@ Having a `tagoconfig.json` file is essential for executing several commands, suc
```


## Using in CI/CD Pipelines

Deploy every analysis from `tagoconfig.json` directly from a GitHub Actions workflow — no need to maintain a custom deploy script per project:

```yaml
- name: Install TagoIO CLI and builder
run: npm install -g @tago-io/cli @tago-io/builder

- name: Deploy analyses to TagoIO
run: tagoio deploy --all --env production -t ${{ secrets.TAGOIO_TOKEN }} --silent
```

The flag combination:
- `--all` — deploys every analysis registered in `tagoconfig.json` without any interactive prompt
- `--env, --environment` — picks the environment block from `tagoconfig.json`
- `-t, --token` — a TagoIO token. Accepts either a **profile token** or an **external-analysis token** (see permissions below). Bypasses the local `.tago-lock` file, which doesn't exist in CI runners
- `--silent` — skips confirmation prompts

Together, the command runs fully non-interactively — suitable for any CI/CD system. No call to `tagoio init` or `tagoio login` is required before deploy, but your repository **must** include a pre-configured `tagoconfig.json` mapping each analysis file to its analysis ID.

### Required permissions when using an external-analysis token

Profile tokens always have full access and need no extra setup. If you'd rather use a scoped external-analysis token (recommended for least-privilege CI pipelines), create an Access Management rule in TagoIO with the **Analysis** resource type and the following permissions enabled:

- **Access Analysis**
- **Edit Analysis**
- **Upload Analysis Script**

Attach that rule to the token you pass via `-t, --token`. Without these permissions, `tagoio deploy` will fail with an Authorization Denied error from the TagoIO API.


## License

TagoIO SDK for JavaScript in the browser and Node.js is released under the [Apache-2.0 License](https://github.com/tagoio-cli/blob/master/LICENSE.md).
103 changes: 0 additions & 103 deletions biome.json

This file was deleted.

Loading
Loading