@aeriajs/server 0.0.177 → 0.0.179

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.
package/dist/init.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { RouteContext, Collection, GenericRequest, ApiConfig, AuthenticatedToken, NonCircularJsonSchema } from '@aeriajs/types';
2
- import { ACError } from '@aeriajs/types';
2
+ import { ACError, HTTPStatus } from '@aeriajs/types';
3
3
  import { type createRouter } from '@aeriajs/http';
4
4
  import { DEFAULT_API_CONFIG } from './constants.js';
5
5
  export type InitApiConfig = Omit<ApiConfig, keyof typeof DEFAULT_API_CONFIG> & Partial<Pick<ApiConfig, keyof typeof DEFAULT_API_CONFIG>>;
@@ -119,6 +119,7 @@ export declare const getToken: (request: GenericRequest, context: RouteContext)
119
119
  } | {
120
120
  readonly _tag: "Error";
121
121
  readonly error: {
122
+ readonly httpStatus: HTTPStatus.Unauthorized;
122
123
  readonly code: ACError.AuthenticationError;
123
124
  };
124
125
  readonly result: undefined;
package/dist/init.js CHANGED
@@ -40,6 +40,7 @@ const getToken = async (request, context) => {
40
40
  console.trace(err);
41
41
  }
42
42
  return (0, common_1.endpointError)({
43
+ httpStatus: types_1.HTTPStatus.Unauthorized,
43
44
  code: types_1.ACError.AuthenticationError,
44
45
  });
45
46
  }
package/dist/init.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- import { Result, ACError } from "@aeriajs/types";
2
+ import { Result, ACError, HTTPStatus } from "@aeriajs/types";
3
3
  import { endpointError, throwIfError, deepMerge } from "@aeriajs/common";
4
4
  import { defineServerOptions, cors, wrapRouteExecution } from "@aeriajs/http";
5
5
  import { registerServer } from "@aeriajs/node-http";
@@ -35,6 +35,7 @@ export const getToken = async (request, context) => {
35
35
  console.trace(err);
36
36
  }
37
37
  return endpointError({
38
+ httpStatus: HTTPStatus.Unauthorized,
38
39
  code: ACError.AuthenticationError
39
40
  });
40
41
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/server",
3
- "version": "0.0.177",
3
+ "version": "0.0.179",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,14 +33,14 @@
33
33
  "mongodb": "^6.5.0"
34
34
  },
35
35
  "peerDependencies": {
36
- "@aeriajs/core": "^0.0.175",
37
- "@aeriajs/builtins": "^0.0.175",
38
- "@aeriajs/common": "^0.0.105",
39
- "@aeriajs/entrypoint": "^0.0.108",
40
- "@aeriajs/http": "^0.0.119",
41
- "@aeriajs/node-http": "^0.0.119",
42
- "@aeriajs/server": "^0.0.177",
43
- "@aeriajs/types": "^0.0.88",
36
+ "@aeriajs/core": "^0.0.177",
37
+ "@aeriajs/builtins": "^0.0.177",
38
+ "@aeriajs/common": "^0.0.107",
39
+ "@aeriajs/entrypoint": "^0.0.110",
40
+ "@aeriajs/http": "^0.0.121",
41
+ "@aeriajs/node-http": "^0.0.121",
42
+ "@aeriajs/server": "^0.0.179",
43
+ "@aeriajs/types": "^0.0.90",
44
44
  "mongodb": "^6.5.0"
45
45
  },
46
46
  "scripts": {