@pipeline-builder/api-server 4.1.14 → 4.1.16

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.
@@ -0,0 +1,39 @@
1
+ {
2
+ "package": "@pipeline-builder/api-server",
3
+ "entries": {
4
+ ".": {
5
+ "attachRequestContext": "function",
6
+ "checkQuota": "function",
7
+ "combineHealthChecks": "function",
8
+ "connectMongo": "function",
9
+ "createApp": "function",
10
+ "createAuthenticatedWithOrgRoute": "function",
11
+ "createProtectedRoute": "function",
12
+ "createSharedRateLimitStore": "function",
13
+ "currentTraceId": "function",
14
+ "getContext": "function",
15
+ "getIdempotencyStore": "function",
16
+ "incCounter": "function",
17
+ "isReady": "function",
18
+ "meterQuotaOnSuccess": "function",
19
+ "mongoHealthCheck": "function",
20
+ "observe": "function",
21
+ "postgresHealthCheck": "function",
22
+ "rateLimitByOrg": "function",
23
+ "readinessGuard": "function",
24
+ "redisHealthCheck": "function",
25
+ "registerSecretRotationGauge": "function",
26
+ "registerSseTicketChannel": "function",
27
+ "requireOrgId": "function",
28
+ "runServer": "function",
29
+ "setGauge": "function",
30
+ "setReady": "function",
31
+ "SSEManager": "class",
32
+ "startServer": "function",
33
+ "withQuotaReservation": "function",
34
+ "withRoute": "function",
35
+ "withSpan": "function",
36
+ "withTenantContext": "function"
37
+ }
38
+ }
39
+ }
package/package.json CHANGED
@@ -12,8 +12,9 @@
12
12
  "@types/cors": "2.8.19",
13
13
  "@types/express": "5.0.6",
14
14
  "@types/express-serve-static-core": "5.1.3",
15
+ "@types/hast": "3.0.4",
15
16
  "@types/jsonwebtoken": "9.0.10",
16
- "@types/node": "26.1.2",
17
+ "@types/node": "^24",
17
18
  "@types/swagger-ui-express": "4.1.8",
18
19
  "@typescript-eslint/eslint-plugin": "^8",
19
20
  "@typescript-eslint/parser": "^8",
@@ -41,11 +42,17 @@
41
42
  "helmet": "8.3.0",
42
43
  "prom-client": "15.1.3",
43
44
  "rate-limit-redis": "6.0.0",
45
+ "rehype-sanitize": "6.0.0",
46
+ "rehype-stringify": "10.0.1",
47
+ "remark-gfm": "4.0.1",
48
+ "remark-parse": "11.0.0",
49
+ "remark-rehype": "11.1.2",
44
50
  "swagger-ui-express": "5.0.1",
51
+ "unified": "11.0.5",
45
52
  "uuid": "14.0.1",
46
- "@pipeline-builder/pipeline-data": "4.1.14",
47
- "@pipeline-builder/api-core": "4.1.12",
48
- "@pipeline-builder/pipeline-core": "4.1.14"
53
+ "@pipeline-builder/api-core": "4.1.14",
54
+ "@pipeline-builder/pipeline-core": "4.1.16",
55
+ "@pipeline-builder/pipeline-data": "4.1.16"
49
56
  },
50
57
  "keywords": [
51
58
  "ci-cd",
@@ -101,7 +108,7 @@
101
108
  "access": "public",
102
109
  "registry": "https://registry.npmjs.org/"
103
110
  },
104
- "version": "4.1.14",
111
+ "version": "4.1.16",
105
112
  "bugs": {
106
113
  "url": "https://github.com/mwashburn160/pipeline-builder/issues"
107
114
  },
@@ -166,12 +173,20 @@
166
173
  "<rootDir>/../../jest-env-guard.js"
167
174
  ],
168
175
  "maxWorkers": 1,
176
+ "collectCoverageFrom": [
177
+ "src/**/*.ts",
178
+ "!src/**/*.d.ts",
179
+ "!src/testing/**",
180
+ "!src/api/index.ts",
181
+ "!src/http/index.ts",
182
+ "!src/index.ts"
183
+ ],
169
184
  "coverageThreshold": {
170
185
  "global": {
171
- "statements": 94,
172
- "branches": 87,
173
- "functions": 89,
174
- "lines": 94
186
+ "statements": 95,
187
+ "branches": 88,
188
+ "functions": 95,
189
+ "lines": 95
175
190
  }
176
191
  }
177
192
  },
@@ -183,11 +198,14 @@
183
198
  "compile": "pnpm dlx projen compile",
184
199
  "default": "pnpm dlx projen default",
185
200
  "eslint": "pnpm dlx projen eslint",
201
+ "lint:fix": "pnpm dlx projen lint:fix",
186
202
  "package": "pnpm dlx projen package",
187
203
  "post-compile": "pnpm dlx projen post-compile",
188
204
  "pre-compile": "pnpm dlx projen pre-compile",
189
205
  "test": "pnpm dlx projen test",
206
+ "test:update": "pnpm dlx projen test:update",
190
207
  "test:watch": "pnpm dlx projen test:watch",
208
+ "typecheck:tests": "pnpm dlx projen typecheck:tests",
191
209
  "watch": "pnpm dlx projen watch",
192
210
  "projen": "pnpm dlx projen"
193
211
  }
@@ -1,22 +0,0 @@
1
- import { type QuotaService, type QuotaType } from '@pipeline-builder/api-core';
2
- import type { RequestContext } from './request-types.js';
3
- /**
4
- * Increment (meter) a quota counter using values pulled from a route context.
5
- *
6
- * Wraps `incrementQuota(quotaService, orgId, type, logWarn)` so route handlers
7
- * don't have to re-derive `ctx.log.bind(null, 'WARN')` at every call site. The
8
- * increment authenticates as the calling service (see `incrementQuota`), never
9
- * with the end user's token.
10
- *
11
- * @example
12
- * ```typescript
13
- * router.get('/', withRoute(async ({ res, ctx, orgId }) => {
14
- * // ...
15
- * incrementQuotaFromCtx(quotaService, { ctx, orgId }, 'apiCalls');
16
- * }));
17
- * ```
18
- */
19
- export declare function incrementQuotaFromCtx(quotaService: QuotaService, rc: {
20
- ctx: RequestContext;
21
- orgId: string;
22
- }, type: QuotaType): void;
@@ -1,23 +0,0 @@
1
- // Copyright 2026 Pipeline Builder Contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
- import { incrementQuota } from '@pipeline-builder/api-core';
4
- /**
5
- * Increment (meter) a quota counter using values pulled from a route context.
6
- *
7
- * Wraps `incrementQuota(quotaService, orgId, type, logWarn)` so route handlers
8
- * don't have to re-derive `ctx.log.bind(null, 'WARN')` at every call site. The
9
- * increment authenticates as the calling service (see `incrementQuota`), never
10
- * with the end user's token.
11
- *
12
- * @example
13
- * ```typescript
14
- * router.get('/', withRoute(async ({ res, ctx, orgId }) => {
15
- * // ...
16
- * incrementQuotaFromCtx(quotaService, { ctx, orgId }, 'apiCalls');
17
- * }));
18
- * ```
19
- */
20
- export function incrementQuotaFromCtx(quotaService, rc, type) {
21
- incrementQuota(quotaService, rc.orgId, type, rc.ctx.log.bind(null, 'WARN'));
22
- }
23
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