Skip to content

Commit e4abced

Browse files
committed
feat: update application with cli
2 parents aabc3cb + 272f218 commit e4abced

17 files changed

Lines changed: 1772 additions & 628 deletions

File tree

‎.github/workflows/publish.yaml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Publish to NPM
44
on:
55
push:
66
tags:
7-
- 'v[0-9]+.[0-9]+.[0-9]+'
7+
- "v[0-9]+.[0-9]+.[0-9]+"
88

99
permissions:
1010
contents: read
@@ -20,7 +20,7 @@ jobs:
2020
- name: checkout
2121
uses: actions/checkout@v6
2222
with:
23-
fetch-depth: 0 # Fetch full history for branch verification
23+
fetch-depth: 0 # Fetch full history for branch verification
2424

2525
- name: verify tag is on main branch
2626
run: |
@@ -33,8 +33,8 @@ jobs:
3333
- name: setup node
3434
uses: actions/setup-node@v6
3535
with:
36-
node-version: '20'
37-
registry-url: 'https://registry.npmjs.org'
36+
node-version: 22.x
37+
registry-url: "https://registry.npmjs.org"
3838

3939
- name: build and publish
4040
run: |

‎.github/workflows/release.yaml‎

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main, next, next-setup]
6+
permissions:
7+
id-token: write
8+
contents: write
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
node-version: ["22.x", "24.x", "26.x"]
17+
18+
name: Test on Node ${{ matrix.node-version }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v7
22+
23+
- name: Set up Docker
24+
uses: docker/setup-buildx-action@v4
25+
26+
- name: Setup Node.js ${{ matrix.node-version }}
27+
uses: actions/setup-node@v6
28+
with:
29+
node-version: ${{ matrix.node-version }}
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build
35+
run: npm run build
36+
37+
- name: Run integration tests
38+
env:
39+
SKIP_TEARDOWN: false
40+
REUSE_CONTAINER: false
41+
NODE_ENV: test
42+
FUSIONAUTH_TELEMETRY: false
43+
run: npm test
44+
timeout-minutes: 15
45+
46+
release:
47+
name: Release
48+
needs: test
49+
runs-on: ubuntu-latest
50+
defaults:
51+
run:
52+
shell: /usr/bin/bash -l -e -o pipefail {0}
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v7
56+
with:
57+
fetch-depth: 0
58+
59+
- name: Setup Node.js
60+
uses: actions/setup-node@v6
61+
with:
62+
node-version: 22.x
63+
registry-url: "https://registry.npmjs.org"
64+
65+
- name: Install dependencies
66+
run: npm ci
67+
68+
- name: Install semantic-release extra plugins
69+
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
70+
71+
# - name: Lint
72+
# run: npm run lint-fix
73+
74+
- name: Build
75+
run: npm run build
76+
77+
- name: Release
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
run: npx semantic-release
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,45 @@
1-
name: Integration Tests
1+
name: Tests
22

33
on:
4+
push:
5+
pull_request:
46
workflow_dispatch:
57
pull_request:
68
branches:
79
- main
810

911
jobs:
10-
integration-tests:
12+
test:
1113
runs-on: ubuntu-latest
12-
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
node-version: ["22.x", "24.x", "26.x"]
18+
19+
name: Test on Node ${{ matrix.node-version }}
1320
steps:
14-
- uses: actions/checkout@v6
15-
21+
- name: Checkout
22+
uses: actions/checkout@v7
23+
1624
- name: Set up Docker
1725
uses: docker/setup-buildx-action@v4
18-
19-
- name: Setup Node.js
26+
27+
- name: Setup Node.js ${{ matrix.node-version }}
2028
uses: actions/setup-node@v6
2129
with:
22-
node-version: '22'
23-
30+
node-version: ${{ matrix.node-version }}
31+
2432
- name: Install dependencies
25-
run: npm install
26-
33+
run: npm ci
34+
2735
- name: Build
2836
run: npm run build
29-
37+
3038
- name: Run integration tests
3139
env:
3240
SKIP_TEARDOWN: false
3341
REUSE_CONTAINER: false
3442
NODE_ENV: test
3543
FUSIONAUTH_TELEMETRY: false
36-
run: npm run test
44+
run: npm test
3745
timeout-minutes: 15

‎.husky/commit-msg‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no-install commitlint --edit "$1"

‎.husky/pre-commit‎

Whitespace-only changes.

‎.npmrc‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
tag-version-prefix=""
2-
min-release-age=7

‎CHANGELOG.md‎

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## [1.9.1-next-setup.2](https://github.com/FusionAuth/fusionauth-node-cli/compare/v1.9.1-next-setup.1...v1.9.1-next-setup.2) (2026-07-09)
2+
3+
4+
### Bug Fixes
5+
6+
* **release:** adds dependency of test job ([3cd41cf](https://github.com/FusionAuth/fusionauth-node-cli/commit/3cd41cf2465965658abb6d07ce5e116da402fedd))
7+
8+
## [1.9.1-next-setup.1](https://github.com/FusionAuth/fusionauth-node-cli/compare/v1.9.0...v1.9.1-next-setup.1) (2026-07-09)
9+
10+
11+
### Bug Fixes
12+
13+
* **release:** adds back github token ([cd34c52](https://github.com/FusionAuth/fusionauth-node-cli/commit/cd34c52382950ebea18dc6a6e07f68fb8b5e0697))
14+
* **release:** adds defaults ([fdac965](https://github.com/FusionAuth/fusionauth-node-cli/commit/fdac965d591b21a657fb105285b6c0898322c387))
15+
* **release:** adds permissions to action ([d66921b](https://github.com/FusionAuth/fusionauth-node-cli/commit/d66921ba6c2289bdeacb9388c2d1b48ec474845d))
16+
* **release:** brings testing job into release action ([94551bd](https://github.com/FusionAuth/fusionauth-node-cli/commit/94551bdce7c7baafaae59c615b8e375329b122f5))
17+
* **release:** fixes commitlint issues ([ac51e58](https://github.com/FusionAuth/fusionauth-node-cli/commit/ac51e588f5c879c2580f1fa0ade6c7ccfed20884))
18+
* **release:** fixes typo in workflow ([53d1443](https://github.com/FusionAuth/fusionauth-node-cli/commit/53d1443b34cd24e177f9fd8964741519a6352de8))
19+
* **release:** makes release config common js ([ccefcad](https://github.com/FusionAuth/fusionauth-node-cli/commit/ccefcad70568436994732baedbb21d4c4fabeb5d))
20+
* **release:** removes extraneous test that was causing failure in build not local ([687bbd6](https://github.com/FusionAuth/fusionauth-node-cli/commit/687bbd6e766909aae65f5f50a550449c514f0c58))
21+
* **release:** removes PR action and corrects branch for testing push ([5a1059a](https://github.com/FusionAuth/fusionauth-node-cli/commit/5a1059a0c36313b2ba5c713288735f89973faee6))
22+
* **release:** replaces inline testing with test workflow chaining ([d5b77b7](https://github.com/FusionAuth/fusionauth-node-cli/commit/d5b77b7326925295e50ac3606194033c27e70e76))
23+
* **release:** stop committing build output and drop unused deps ([d64ac2c](https://github.com/FusionAuth/fusionauth-node-cli/commit/d64ac2c3b37c3a260e3f9e5f31464a2b873a8bfd)), closes [#45](https://github.com/FusionAuth/fusionauth-node-cli/issues/45)
24+
* **release:** updates branches for workflow for main and next ([725d29c](https://github.com/FusionAuth/fusionauth-node-cli/commit/725d29c4216a3729c0d010cdcebf3b73aae508b9))
25+
* **release:** updates workflow away from quotations as per the github docs ([c6dbd1a](https://github.com/FusionAuth/fusionauth-node-cli/commit/c6dbd1a53ac9ad1d22cd11256446c9893a8ea132))
26+
27+
## [1.8.3-next-setup.2](https://github.com/FusionAuth/fusionauth-node-cli/compare/v1.8.3-next-setup.1...v1.8.3-next-setup.2) (2026-07-08)
28+
29+
30+
### Bug Fixes
31+
32+
* **release:** stop committing build output and drop unused deps ([d64ac2c](https://github.com/FusionAuth/fusionauth-node-cli/commit/d64ac2c3b37c3a260e3f9e5f31464a2b873a8bfd)), closes [#45](https://github.com/FusionAuth/fusionauth-node-cli/issues/45)
33+
34+
## [1.8.3-next-setup.1](https://github.com/FusionAuth/fusionauth-node-cli/compare/v1.8.2...v1.8.3-next-setup.1) (2026-07-08)
35+
36+
37+
### Bug Fixes
38+
39+
* **release:** adds back github token ([cd34c52](https://github.com/FusionAuth/fusionauth-node-cli/commit/cd34c52382950ebea18dc6a6e07f68fb8b5e0697))
40+
* **release:** adds defaults ([fdac965](https://github.com/FusionAuth/fusionauth-node-cli/commit/fdac965d591b21a657fb105285b6c0898322c387))
41+
* **release:** adds permissions to action ([d66921b](https://github.com/FusionAuth/fusionauth-node-cli/commit/d66921ba6c2289bdeacb9388c2d1b48ec474845d))
42+
* **release:** fixes commitlint issues ([ac51e58](https://github.com/FusionAuth/fusionauth-node-cli/commit/ac51e588f5c879c2580f1fa0ade6c7ccfed20884))
43+
* **release:** makes release config common js ([ccefcad](https://github.com/FusionAuth/fusionauth-node-cli/commit/ccefcad70568436994732baedbb21d4c4fabeb5d))
44+
* **release:** removes PR action and corrects branch for testing push ([5a1059a](https://github.com/FusionAuth/fusionauth-node-cli/commit/5a1059a0c36313b2ba5c713288735f89973faee6))

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The FusionAuth CLI is a command line tool for interacting with FusionAuth. It is
44

55
## Requirements
66

7-
* A modern version of node (tested on 19, 20 and 22)
7+
* A supported LTS version of Node.js — 22.22.0 or newer (tested in CI on 22, 24 and 26)
88
* A FusionAuth instance (download it here: https://fusionauth.io/download)
99

1010
## Installation & usage

‎__tests__/telemetry/index.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import nock from 'nock'
1111

1212
export function telemetry() {
1313
const mockedTrueConfig = {
14-
id: '8c0a77f2-27e4-4284-b5d3-5618ec2a56eb',
14+
id: '8c0a77f2-27e4-4284-b5d3-5618ec2a56eb',
1515
telemetry: true,
1616
version: '1.0'
1717
}
1818
const mockedFalseConfig = {
19-
id: '8c0a77f2-27e4-4284-b5d3-5618ec2a56eb',
19+
id: '8c0a77f2-27e4-4284-b5d3-5618ec2a56eb',
2020
telemetry: false,
2121
version: '1.0'
2222
}

‎__tests__/telemetry/telemetry.test.js‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,20 +100,6 @@ describe('telemetry runs properly', () => {
100100
delete process.env.FUSIONAUTH_TELEMETRY
101101
}
102102
})
103-
104-
test("If FUSIONAUTH_TELEMETRY === true DO run", async () => {
105-
process.env.FUSIONAUTH_TELEMETRY = 'true'
106-
nock('https://us.i.posthog.com')
107-
.post('/batch/')
108-
.reply(200)
109-
try {
110-
const response = await logEvent('test event')
111-
assert.equal(response, true, "logEvent didn't fire")
112-
} finally {
113-
nock.cleanAll()
114-
delete process.env.FUSIONAUTH_TELEMETRY
115-
}
116-
})
117103
test("If no .env, event submits", async () => {
118104
nock('https://us.i.posthog.com')
119105
.post('/batch/')

0 commit comments

Comments
 (0)