Skip to content

Commit

Permalink
Allow duration with integer seconds (#68)
Browse files Browse the repository at this point in the history
+ update typing
+ update dependencies
+ need node > 18
  • Loading branch information
thib3113 authored Oct 18, 2024
1 parent df2c411 commit a69f117
Show file tree
Hide file tree
Showing 15 changed files with 4,225 additions and 2,813 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
fail-fast: false
matrix:
package: ${{ fromJson(needs.list-packages.outputs.matrix) }}
node-version: [ lts/*, 16, 18, 20, latest ]
node-version: [ lts/*, 18, 20, 21, 22, 23, latest ]
# The type of runner that the job will run on
runs-on: ubuntu-latest

Expand Down
4 changes: 2 additions & 2 deletions dev/raw/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"author": "",
"license": "ISC",
"dependencies": {
"@types/node": "20.11.20",
"@types/node": "22.7.6",
"crowdsec-client": "workspace:^",
"crowdsec-client-scenarios": "workspace:^",
"crowdsec-http-middleware": "workspace:^"
},
"devDependencies": {
"@types/express": "4.17.21",
"@types/express": "5.0.0",
"dotenv": "16.4.5",
"source-map-support": "0.5.21"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/express-bouncer-cjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"license": "ISC",
"dependencies": {
"crowdsec-client": "workspace:^",
"express": "^4.18.2"
"express": "^4.21.1"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/express": "^5.0.0",
"dotenv": "^16.4.5",
"source-map-support": "^0.5.21"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/express-bouncer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"license": "ISC",
"dependencies": {
"crowdsec-client": "workspace:^",
"express": "^4.18.2"
"express": "^4.21.1"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/express": "^5.0.0",
"dotenv": "^16.4.5",
"source-map-support": "^0.5.21"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/express-web-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
"license": "ISC",
"dependencies": {
"crowdsec-client": "workspace:^",
"express": "^4.18.2"
"express": "^4.21.1"
},
"devDependencies": {
"@types/express": "^4.17.21",
"@types/express": "^5.0.0",
"dotenv": "^16.4.5",
"source-map-support": "^0.5.21"
}
Expand Down
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"name": "node-crowdsec-client-root",
"engines": {
"node": ">=18",
"pnpm": ">=3"
"node": ">=18.12",
"pnpm": ">=9"
},
"license": "UNLICENSED",
"scripts": {
"generate:documentation": "typedoc"
},
"devDependencies": {
"@tsconfig/node-lts": "20.1.1",
"@types/jest": "29.5.12",
"@types/node": "20.11.20",
"@tsconfig/node-lts": "20.1.3",
"@types/jest": "29.5.13",
"@types/node": "22.7.6",
"@typescript-eslint/parser": "7.0.2",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.1.3",
"prettier": "3.2.5",
"ts-node": "10.9.2",
"typedoc": "0.25.9",
"typescript": "5.3.3"
}
"typedoc": "0.26.10",
"typescript": "5.6.3"
},
"packageManager": "[email protected]+sha256.30a1801ac4e723779efed13a21f4c39f9eb6c9fbb4ced101bce06b422593d7c9"
}
16 changes: 8 additions & 8 deletions packages/crowdsec-client-scenarios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
],
"license": "ISC",
"dependencies": {
"debug": "^4.3.4",
"ip-address": "^9.0.5",
"lru-cache": "^10.2.0",
"maxmind": "^4.3.18"
"debug": "^4.3.7",
"ip-address": "^10.0.1",
"lru-cache": "^11.0.1",
"maxmind": "^4.3.22"
},
"engines": {
"node": ">=16"
Expand All @@ -67,13 +67,13 @@
"@types/debug": "4.1.12",
"crowdsec-client": "workspace:^",
"dotenv": "16.4.5",
"esbuild": "0.20.1",
"esbuild": "0.24.0",
"jest": "29.7.0",
"jest-sonar": "0.2.16",
"mmdb-lib": "2.1.0",
"rimraf": "5.0.5",
"mmdb-lib": "2.1.1",
"rimraf": "6.0.1",
"source-map-support": "0.5.21",
"ts-jest": "29.1.2",
"ts-jest": "29.2.5",
"ts-node": "10.9.2"
},
"funding": [
Expand Down
14 changes: 7 additions & 7 deletions packages/crowdsec-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@
],
"license": "ISC",
"dependencies": {
"axios": "^1.6.7",
"debug": "^4.3.4"
"axios": "^1.7.7",
"debug": "^4.3.7"
},
"engines": {
"node": ">=16"
"node": ">=18.12"
},
"devDependencies": {
"@jest/globals": "29.7.0",
"@types/debug": "4.1.12",
"dotenv": "16.4.5",
"esbuild": "0.20.1",
"esbuild": "0.24.0",
"jest": "29.7.0",
"jest-sonar": "0.2.16",
"rimraf": "5.0.5",
"rimraf": "6.0.1",
"source-map-support": "0.5.21",
"swagger-typescript-api": "13.0.3",
"ts-jest": "29.1.2",
"swagger-typescript-api": "13.0.22",
"ts-jest": "29.2.5",
"ts-node": "10.9.2"
},
"funding": [
Expand Down
15 changes: 8 additions & 7 deletions packages/crowdsec-client/src/types/generated/DecisionsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import { DecisionsStreamResponse, DeleteDecisionResponse, GetDecisionsResponse }

export namespace Decisions {
/**
* @description Returns a list of new/expired decisions. Intended for bouncers that need to "stream" decisions
* @tags bouncers
* @description Returns a list of new/expired decisions. Intended for remediation component that need to "stream" decisions
* @tags Remediation component
* @name GetDecisionsStream
* @summary getDecisionsStream
* @request GET:/decisions/stream
Expand All @@ -23,7 +23,7 @@ export namespace Decisions {
export namespace GetDecisionsStream {
export type RequestParams = {};
export type RequestQuery = {
/** If true, means that the bouncers is starting and a full list must be provided */
/** If true, means that the remediation component is starting and a full list must be provided */
startup?: boolean;
/** Comma separated scopes of decisions to fetch */
scopes?: string;
Expand All @@ -40,8 +40,8 @@ export namespace Decisions {
}

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

/**
* @description Returns information about existing decisions
* @tags bouncers
* @tags Remediation component
* @name GetDecisions
* @summary getDecisions
* @request GET:/decisions
* @secure
*/
export namespace GetDecisions {
export type RequestParams = {};
Expand Down Expand Up @@ -94,7 +95,7 @@ export namespace Decisions {

/**
* @description Returns information about existing decisions
* @tags bouncers
* @tags Remediation component
* @name HeadDecisions
* @summary GetDecisions
* @request HEAD:/decisions
Expand Down
30 changes: 30 additions & 0 deletions packages/crowdsec-client/src/types/generated/UsageMetricsRoute.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* eslint-disable */
/* tslint:disable */
/*
* ---------------------------------------------------------------
* ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
* ## ##
* ## AUTHOR: acacode ##
* ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
* ---------------------------------------------------------------
*/

import { AllMetrics, SuccessResponse } from './data-contracts.js';

export namespace UsageMetrics {
/**
* @description Post usage metrics from a LP or a bouncer
* @tags Remediation component, watchers
* @name UsageMetrics
* @summary Send usage metrics
* @request POST:/usage-metrics
* @secure
*/
export namespace UsageMetrics {
export type RequestParams = {};
export type RequestQuery = {};
export type RequestBody = AllMetrics;
export type RequestHeaders = {};
export type ResponseBody = SuccessResponse;
}
}
Loading

0 comments on commit a69f117

Please sign in to comment.