@prosopo/api-route 2.6.33 → 2.6.36

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,34 @@
1
+
2
+ > @prosopo/api-route@2.6.36 build:cjs
3
+ > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
+
5
+ ViteCommonJSConfig: .
6
+ {
7
+ tsConfigPaths: [
8
+ '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
9
+ '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
10
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
11
+ '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
12
+ '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
13
+ ]
14
+ }
15
+ {
16
+ externals: [
17
+ '@prosopo/common',
18
+ '@prosopo/locale',
19
+ '@prosopo/types',
20
+ '@prosopo/util',
21
+ '@prosopo/util-crypto'
22
+ ]
23
+ }
24
+ vite v6.4.1 building SSR bundle for production...
25
+ Bundle build started
26
+ transforming...
27
+ Build end
28
+ ✓ 4 modules transformed.
29
+ rendering chunks...
30
+ dist/cjs/.export.cjs 0.01 kB
31
+ dist/cjs/endpoint/.export.cjs 0.25 kB
32
+ dist/cjs/index.cjs 0.32 kB
33
+ dist/cjs/endpoint/apiEndpointResponseStatus.cjs 0.47 kB
34
+ ✓ built in 148ms
@@ -0,0 +1,29 @@
1
+
2
+ > @prosopo/api-route@2.6.36 build:tsc
3
+ > tsc --build --verbose
4
+
5
+ 4:56:53 PM - Projects in this build:
6
+ * ../../dev/config/tsconfig.json
7
+ * ../locale/tsconfig.json
8
+ * ../util/tsconfig.json
9
+ * ../util-crypto/tsconfig.json
10
+ * ../types/tsconfig.json
11
+ * ../common/tsconfig.json
12
+ * tsconfig.json
13
+
14
+ 4:56:53 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/dependencies.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
15
+
16
+ 4:56:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
17
+
18
+ 4:56:53 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
19
+
20
+ 4:56:53 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
21
+
22
+ 4:56:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
23
+
24
+ 4:56:53 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/logger.ts' is older than output '../common/tsconfig.tsbuildinfo'
25
+
26
+ 4:56:53 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
27
+
28
+ 4:56:53 PM - Building project '/home/runner/work/captcha/captcha/packages/api-route/tsconfig.json'...
29
+
@@ -0,0 +1,38 @@
1
+
2
+ > @prosopo/api-route@2.6.36 build
3
+ > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
+
5
+
6
+ > @prosopo/api-route@2.6.36 build:cross-env
7
+ > vite build --config vite.esm.config.ts --mode production
8
+
9
+ ViteEsmConfig: .
10
+ {
11
+ tsConfigPaths: [
12
+ '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
13
+ '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
14
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
15
+ '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
16
+ '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
17
+ ]
18
+ }
19
+ {
20
+ externals: [
21
+ '@prosopo/common',
22
+ '@prosopo/locale',
23
+ '@prosopo/types',
24
+ '@prosopo/util',
25
+ '@prosopo/util-crypto'
26
+ ]
27
+ }
28
+ vite v6.4.1 building SSR bundle for production...
29
+ Bundle build started
30
+ transforming...
31
+ Build end
32
+ ✓ 4 modules transformed.
33
+ rendering chunks...
34
+ dist/.export.js 0.00 kB
35
+ dist/endpoint/.export.js 0.12 kB
36
+ dist/index.js 0.18 kB
37
+ dist/endpoint/apiEndpointResponseStatus.js 0.36 kB
38
+ ✓ built in 159ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @prosopo/api-route
2
2
 
3
+ ## 2.6.36
4
+ ### Patch Changes
5
+
6
+ - 0a38892: feat/cross-os-testing
7
+ - a8faa9a: bump license year
8
+ - 3acc333: Release 3.3.0
9
+ - Updated dependencies [0a38892]
10
+ - Updated dependencies [a8faa9a]
11
+ - Updated dependencies [3acc333]
12
+ - @prosopo/common@3.1.28
13
+
14
+ ## 2.6.35
15
+ ### Patch Changes
16
+
17
+ - @prosopo/common@3.1.27
18
+
19
+ ## 2.6.34
20
+ ### Patch Changes
21
+
22
+ - 7d5eb3f: bump
23
+ - Updated dependencies [7d5eb3f]
24
+ - @prosopo/common@3.1.26
25
+
3
26
  ## 2.6.33
4
27
  ### Patch Changes
5
28
 
@@ -0,0 +1,2 @@
1
+ export type { ApiRoutes, ApiRoutesProvider, ApiRouteLimits, } from "./apiRoutes.js";
2
+ //# sourceMappingURL=.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":".export.d.ts","sourceRoot":"","sources":["../src/.export.ts"],"names":[],"mappings":"AAcA,YAAY,EACX,SAAS,EACT,iBAAiB,EACjB,cAAc,GACd,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":".export.js","sourceRoot":"","sources":["../src/.export.ts"],"names":[],"mappings":""}
@@ -0,0 +1,12 @@
1
+ import type { ZodType } from "zod";
2
+ import type { ApiEndpoint } from "./endpoint/apiEndpoint.js";
3
+ export type ApiRoutes = Record<string, ApiEndpoint<ZodType | undefined>>;
4
+ export interface ApiRoutesProvider {
5
+ getRoutes(): ApiRoutes;
6
+ }
7
+ export type ApiRouteLimit = {
8
+ windowMs: number;
9
+ limit: number;
10
+ };
11
+ export type ApiRouteLimits<Enum extends string | number> = Record<Enum, ApiRouteLimit>;
12
+ //# sourceMappingURL=apiRoutes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiRoutes.d.ts","sourceRoot":"","sources":["../src/apiRoutes.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC,CAAC;AAEzE,MAAM,WAAW,iBAAiB;IACjC,SAAS,IAAI,SAAS,CAAC;CACvB;AAED,MAAM,MAAM,aAAa,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,IAAI,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAChE,IAAI,EACJ,aAAa,CACb,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=apiRoutes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiRoutes.js","sourceRoot":"","sources":["../src/apiRoutes.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type { ApiEndpoint } from "./apiEndpoint.js";
2
+ export type { ApiEndpointResponse } from "./apiEndpointResponse.js";
3
+ export { ApiEndpointResponseStatus } from "./apiEndpointResponseStatus.js";
4
+ //# sourceMappingURL=.export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":".export.d.ts","sourceRoot":"","sources":["../../src/endpoint/.export.ts"],"names":[],"mappings":"AAcA,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":".export.js","sourceRoot":"","sources":["../../src/endpoint/.export.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { Logger } from "@prosopo/common";
2
+ import type { ZodType, z } from "zod";
3
+ import type { ApiEndpointResponse } from "./apiEndpointResponse.js";
4
+ interface ApiEndpoint<T extends ZodType | undefined> {
5
+ processRequest: T extends ZodType ? (args: z.infer<T>, logger?: Logger) => Promise<ApiEndpointResponse> : (logger?: Logger) => Promise<ApiEndpointResponse>;
6
+ getRequestArgsSchema(): T;
7
+ }
8
+ export type { ApiEndpoint };
9
+ //# sourceMappingURL=apiEndpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpoint.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpoint.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,UAAU,WAAW,CAAC,CAAC,SAAS,OAAO,GAAG,SAAS;IAClD,cAAc,EAAE,CAAC,SAAS,OAAO,GAC9B,CAAC,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,GACnE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;IAErD,oBAAoB,IAAI,CAAC,CAAC;CAC1B;AAED,YAAY,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=apiEndpoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpoint.js","sourceRoot":"","sources":["../../src/endpoint/apiEndpoint.ts"],"names":[],"mappings":""}
@@ -0,0 +1,8 @@
1
+ import type { ApiEndpointResponseStatus } from "./apiEndpointResponseStatus.js";
2
+ interface ApiEndpointResponse {
3
+ status: ApiEndpointResponseStatus;
4
+ data?: object;
5
+ error?: string;
6
+ }
7
+ export type { ApiEndpointResponse };
8
+ //# sourceMappingURL=apiEndpointResponse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpointResponse.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponse.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAEhF,UAAU,mBAAmB;IAC5B,MAAM,EAAE,yBAAyB,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CACf;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=apiEndpointResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpointResponse.js","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponse.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ declare enum ApiEndpointResponseStatus {
2
+ SUCCESS = "SUCCESS",
3
+ FAIL = "FAIL",
4
+ PROCESSING = "PROCESSING"
5
+ }
6
+ export { ApiEndpointResponseStatus };
7
+ //# sourceMappingURL=apiEndpointResponseStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpointResponseStatus.d.ts","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,aAAK,yBAAyB;IAC7B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,UAAU,eAAe;CACzB;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apiEndpointResponseStatus.js","sourceRoot":"","sources":["../../src/endpoint/apiEndpointResponseStatus.ts"],"names":[],"mappings":"AAcA,IAAK,yBAIJ;AAJD,WAAK,yBAAyB;IAC7B,gDAAmB,CAAA;IACnB,0CAAa,CAAA;IACb,sDAAyB,CAAA;AAC1B,CAAC,EAJI,yBAAyB,KAAzB,yBAAyB,QAI7B;AAED,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./.export.js";
2
+ export * from "./endpoint/.export.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,cAAc,cAAc,CAAC;AAC7B,cAAc,uBAAuB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/api-route",
3
- "version": "2.6.33",
3
+ "version": "2.6.36",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -17,17 +17,18 @@
17
17
  },
18
18
  "scripts": {
19
19
  "clean": "del-cli --verbose dist tsconfig.tsbuildinfo",
20
- "build": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.esm.config.ts --mode $NODE_ENV",
20
+ "build": "npm run build:cross-env -- --mode ${NODE_ENV:-development}",
21
+ "build:cross-env": "vite build --config vite.esm.config.ts",
21
22
  "build:tsc": "tsc --build --verbose",
22
23
  "build:cjs": "NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV",
23
24
  "typecheck": "tsc --project tsconfig.types.json"
24
25
  },
25
26
  "dependencies": {
26
- "@prosopo/common": "3.1.25",
27
+ "@prosopo/common": "3.1.28",
27
28
  "zod": "3.23.8"
28
29
  },
29
30
  "devDependencies": {
30
- "@prosopo/config": "3.1.25",
31
+ "@prosopo/config": "3.3.0",
31
32
  "@types/node": "22.10.2",
32
33
  "del-cli": "6.0.0"
33
34
  },
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- // Copyright 2021-2025 Prosopo (UK) Ltd.
2
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2021-2025 Prosopo (UK) Ltd.
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.