Skip to content

Commit a69f117

Browse files
authored
Allow duration with integer seconds (#68)
+ update typing + update dependencies + need node > 18
1 parent df2c411 commit a69f117

15 files changed

Lines changed: 4225 additions & 2813 deletions

File tree

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
fail-fast: false
8181
matrix:
8282
package: ${{ fromJson(needs.list-packages.outputs.matrix) }}
83-
node-version: [ lts/*, 16, 18, 20, latest ]
83+
node-version: [ lts/*, 18, 20, 21, 22, 23, latest ]
8484
# The type of runner that the job will run on
8585
runs-on: ubuntu-latest
8686

dev/raw/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"author": "",
1313
"license": "ISC",
1414
"dependencies": {
15-
"@types/node": "20.11.20",
15+
"@types/node": "22.7.6",
1616
"crowdsec-client": "workspace:^",
1717
"crowdsec-client-scenarios": "workspace:^",
1818
"crowdsec-http-middleware": "workspace:^"
1919
},
2020
"devDependencies": {
21-
"@types/express": "4.17.21",
21+
"@types/express": "5.0.0",
2222
"dotenv": "16.4.5",
2323
"source-map-support": "0.5.21"
2424
}

examples/express-bouncer-cjs/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
"license": "ISC",
1212
"dependencies": {
1313
"crowdsec-client": "workspace:^",
14-
"express": "^4.18.2"
14+
"express": "^4.21.1"
1515
},
1616
"devDependencies": {
17-
"@types/express": "^4.17.21",
17+
"@types/express": "^5.0.0",
1818
"dotenv": "^16.4.5",
1919
"source-map-support": "^0.5.21"
2020
}

examples/express-bouncer/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"license": "ISC",
1313
"dependencies": {
1414
"crowdsec-client": "workspace:^",
15-
"express": "^4.18.2"
15+
"express": "^4.21.1"
1616
},
1717
"devDependencies": {
18-
"@types/express": "^4.17.21",
18+
"@types/express": "^5.0.0",
1919
"dotenv": "^16.4.5",
2020
"source-map-support": "^0.5.21"
2121
}

examples/express-web-parser/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"license": "ISC",
1313
"dependencies": {
1414
"crowdsec-client": "workspace:^",
15-
"express": "^4.18.2"
15+
"express": "^4.21.1"
1616
},
1717
"devDependencies": {
18-
"@types/express": "^4.17.21",
18+
"@types/express": "^5.0.0",
1919
"dotenv": "^16.4.5",
2020
"source-map-support": "^0.5.21"
2121
}

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
{
22
"name": "node-crowdsec-client-root",
33
"engines": {
4-
"node": ">=18",
5-
"pnpm": ">=3"
4+
"node": ">=18.12",
5+
"pnpm": ">=9"
66
},
77
"license": "UNLICENSED",
88
"scripts": {
99
"generate:documentation": "typedoc"
1010
},
1111
"devDependencies": {
12-
"@tsconfig/node-lts": "20.1.1",
13-
"@types/jest": "29.5.12",
14-
"@types/node": "20.11.20",
12+
"@tsconfig/node-lts": "20.1.3",
13+
"@types/jest": "29.5.13",
14+
"@types/node": "22.7.6",
1515
"@typescript-eslint/parser": "7.0.2",
1616
"eslint": "8.57.0",
1717
"eslint-config-prettier": "9.1.0",
1818
"eslint-plugin-prettier": "5.1.3",
1919
"prettier": "3.2.5",
2020
"ts-node": "10.9.2",
21-
"typedoc": "0.25.9",
22-
"typescript": "5.3.3"
23-
}
21+
"typedoc": "0.26.10",
22+
"typescript": "5.6.3"
23+
},
24+
"packageManager": "pnpm@9.1.4+sha256.30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9"
2425
}

packages/crowdsec-client-scenarios/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@
5454
],
5555
"license": "ISC",
5656
"dependencies": {
57-
"debug": "^4.3.4",
58-
"ip-address": "^9.0.5",
59-
"lru-cache": "^10.2.0",
60-
"maxmind": "^4.3.18"
57+
"debug": "^4.3.7",
58+
"ip-address": "^10.0.1",
59+
"lru-cache": "^11.0.1",
60+
"maxmind": "^4.3.22"
6161
},
6262
"engines": {
6363
"node": ">=16"
@@ -67,13 +67,13 @@
6767
"@types/debug": "4.1.12",
6868
"crowdsec-client": "workspace:^",
6969
"dotenv": "16.4.5",
70-
"esbuild": "0.20.1",
70+
"esbuild": "0.24.0",
7171
"jest": "29.7.0",
7272
"jest-sonar": "0.2.16",
73-
"mmdb-lib": "2.1.0",
74-
"rimraf": "5.0.5",
73+
"mmdb-lib": "2.1.1",
74+
"rimraf": "6.0.1",
7575
"source-map-support": "0.5.21",
76-
"ts-jest": "29.1.2",
76+
"ts-jest": "29.2.5",
7777
"ts-node": "10.9.2"
7878
},
7979
"funding": [

packages/crowdsec-client/package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@
5555
],
5656
"license": "ISC",
5757
"dependencies": {
58-
"axios": "^1.6.7",
59-
"debug": "^4.3.4"
58+
"axios": "^1.7.7",
59+
"debug": "^4.3.7"
6060
},
6161
"engines": {
62-
"node": ">=16"
62+
"node": ">=18.12"
6363
},
6464
"devDependencies": {
6565
"@jest/globals": "29.7.0",
6666
"@types/debug": "4.1.12",
6767
"dotenv": "16.4.5",
68-
"esbuild": "0.20.1",
68+
"esbuild": "0.24.0",
6969
"jest": "29.7.0",
7070
"jest-sonar": "0.2.16",
71-
"rimraf": "5.0.5",
71+
"rimraf": "6.0.1",
7272
"source-map-support": "0.5.21",
73-
"swagger-typescript-api": "13.0.3",
74-
"ts-jest": "29.1.2",
73+
"swagger-typescript-api": "13.0.22",
74+
"ts-jest": "29.2.5",
7575
"ts-node": "10.9.2"
7676
},
7777
"funding": [

packages/crowdsec-client/src/types/generated/DecisionsRoute.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import { DecisionsStreamResponse, DeleteDecisionResponse, GetDecisionsResponse }
1313

1414
export namespace Decisions {
1515
/**
16-
* @description Returns a list of new/expired decisions. Intended for bouncers that need to "stream" decisions
17-
* @tags bouncers
16+
* @description Returns a list of new/expired decisions. Intended for remediation component that need to "stream" decisions
17+
* @tags Remediation component
1818
* @name GetDecisionsStream
1919
* @summary getDecisionsStream
2020
* @request GET:/decisions/stream
@@ -23,7 +23,7 @@ export namespace Decisions {
2323
export namespace GetDecisionsStream {
2424
export type RequestParams = {};
2525
export type RequestQuery = {
26-
/** If true, means that the bouncers is starting and a full list must be provided */
26+
/** If true, means that the remediation component is starting and a full list must be provided */
2727
startup?: boolean;
2828
/** Comma separated scopes of decisions to fetch */
2929
scopes?: string;
@@ -40,8 +40,8 @@ export namespace Decisions {
4040
}
4141

4242
/**
43-
* @description Returns a list of new/expired decisions. Intended for bouncers that need to "stream" decisions
44-
* @tags bouncers
43+
* @description Returns a list of new/expired decisions. Intended for remediation component that need to "stream" decisions
44+
* @tags Remediation component
4545
* @name HeadDecisionsStream
4646
* @summary GetDecisionsStream
4747
* @request HEAD:/decisions/stream
@@ -60,10 +60,11 @@ export namespace Decisions {
6060

6161
/**
6262
* @description Returns information about existing decisions
63-
* @tags bouncers
63+
* @tags Remediation component
6464
* @name GetDecisions
6565
* @summary getDecisions
6666
* @request GET:/decisions
67+
* @secure
6768
*/
6869
export namespace GetDecisions {
6970
export type RequestParams = {};
@@ -94,7 +95,7 @@ export namespace Decisions {
9495

9596
/**
9697
* @description Returns information about existing decisions
97-
* @tags bouncers
98+
* @tags Remediation component
9899
* @name HeadDecisions
99100
* @summary GetDecisions
100101
* @request HEAD:/decisions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/* eslint-disable */
2+
/* tslint:disable */
3+
/*
4+
* ---------------------------------------------------------------
5+
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
6+
* ## ##
7+
* ## AUTHOR: acacode ##
8+
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
9+
* ---------------------------------------------------------------
10+
*/
11+
12+
import { AllMetrics, SuccessResponse } from './data-contracts.js';
13+
14+
export namespace UsageMetrics {
15+
/**
16+
* @description Post usage metrics from a LP or a bouncer
17+
* @tags Remediation component, watchers
18+
* @name UsageMetrics
19+
* @summary Send usage metrics
20+
* @request POST:/usage-metrics
21+
* @secure
22+
*/
23+
export namespace UsageMetrics {
24+
export type RequestParams = {};
25+
export type RequestQuery = {};
26+
export type RequestBody = AllMetrics;
27+
export type RequestHeaders = {};
28+
export type ResponseBody = SuccessResponse;
29+
}
30+
}

0 commit comments

Comments
 (0)