@furystack/rest-service 7.0.1 → 7.0.3
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/{types → esm}/actions/error-action.d.ts +1 -1
- package/{types → esm}/actions/error-action.d.ts.map +1 -1
- package/esm/actions/error-action.js +2 -2
- package/esm/actions/error-action.js.map +1 -1
- package/{types → esm}/actions/get-current-user.d.ts +1 -1
- package/{types → esm}/actions/get-current-user.d.ts.map +1 -1
- package/esm/actions/get-current-user.js +2 -2
- package/esm/actions/get-current-user.js.map +1 -1
- package/esm/actions/index.d.ts +7 -0
- package/esm/actions/index.d.ts.map +1 -0
- package/esm/actions/index.js +6 -6
- package/esm/actions/index.js.map +1 -1
- package/{types → esm}/actions/is-authenticated.d.ts +1 -1
- package/{types → esm}/actions/is-authenticated.d.ts.map +1 -1
- package/esm/actions/is-authenticated.js +1 -1
- package/esm/actions/is-authenticated.js.map +1 -1
- package/{types → esm}/actions/login.d.ts +2 -2
- package/esm/actions/login.d.ts.map +1 -0
- package/esm/actions/login.js +3 -3
- package/esm/actions/login.js.map +1 -1
- package/{types → esm}/actions/logout.d.ts +1 -1
- package/{types → esm}/actions/logout.d.ts.map +1 -1
- package/esm/actions/logout.js +2 -2
- package/esm/actions/logout.js.map +1 -1
- package/{types → esm}/actions/not-found-action.d.ts +1 -1
- package/{types → esm}/actions/not-found-action.d.ts.map +1 -1
- package/esm/actions/not-found-action.js +1 -1
- package/esm/actions/not-found-action.js.map +1 -1
- package/{types → esm}/api-manager.d.ts +4 -4
- package/{types → esm}/api-manager.d.ts.map +1 -1
- package/esm/api-manager.js +6 -6
- package/esm/api-manager.js.map +1 -1
- package/{types → esm}/authenticate.d.ts +1 -1
- package/{types → esm}/authenticate.d.ts.map +1 -1
- package/esm/authenticate.js +2 -2
- package/esm/authenticate.js.map +1 -1
- package/{types → esm}/authorize.d.ts +1 -1
- package/{types → esm}/authorize.d.ts.map +1 -1
- package/esm/authorize.js +1 -1
- package/esm/authorize.js.map +1 -1
- package/{types → esm}/endpoint-generators/create-delete-endpoint.d.ts +1 -1
- package/{types → esm}/endpoint-generators/create-delete-endpoint.d.ts.map +1 -1
- package/esm/endpoint-generators/create-delete-endpoint.js +1 -1
- package/esm/endpoint-generators/create-delete-endpoint.js.map +1 -1
- package/{types → esm}/endpoint-generators/create-get-collection-endpoint.d.ts +1 -1
- package/{types → esm}/endpoint-generators/create-get-collection-endpoint.d.ts.map +1 -1
- package/esm/endpoint-generators/create-get-collection-endpoint.js +1 -1
- package/esm/endpoint-generators/create-get-collection-endpoint.js.map +1 -1
- package/{types → esm}/endpoint-generators/create-get-entity-endpoint.d.ts +1 -1
- package/{types → esm}/endpoint-generators/create-get-entity-endpoint.d.ts.map +1 -1
- package/esm/endpoint-generators/create-get-entity-endpoint.js +1 -1
- package/esm/endpoint-generators/create-get-entity-endpoint.js.map +1 -1
- package/{types → esm}/endpoint-generators/create-patch-endpoint.d.ts +2 -2
- package/{types → esm}/endpoint-generators/create-patch-endpoint.d.ts.map +1 -1
- package/esm/endpoint-generators/create-patch-endpoint.js +2 -2
- package/esm/endpoint-generators/create-patch-endpoint.js.map +1 -1
- package/{types → esm}/endpoint-generators/create-post-endpoint.d.ts +2 -2
- package/{types → esm}/endpoint-generators/create-post-endpoint.d.ts.map +1 -1
- package/esm/endpoint-generators/create-post-endpoint.js +2 -2
- package/esm/endpoint-generators/create-post-endpoint.js.map +1 -1
- package/esm/endpoint-generators/index.d.ts +6 -0
- package/{types → esm}/endpoint-generators/index.d.ts.map +1 -1
- package/esm/endpoint-generators/index.js +5 -5
- package/esm/endpoint-generators/index.js.map +1 -1
- package/{types → esm}/endpoint-generators/utils.d.ts +1 -1
- package/{types → esm}/endpoint-generators/utils.d.ts.map +1 -1
- package/esm/endpoint-generators/utils.js +2 -2
- package/esm/endpoint-generators/utils.js.map +1 -1
- package/{types → esm}/helpers.d.ts +4 -4
- package/esm/helpers.d.ts.map +1 -0
- package/esm/helpers.js +3 -3
- package/esm/helpers.js.map +1 -1
- package/{types → esm}/http-authentication-settings.d.ts +1 -1
- package/{types → esm}/http-authentication-settings.d.ts.map +1 -1
- package/esm/http-authentication-settings.js +1 -1
- package/esm/http-authentication-settings.js.map +1 -1
- package/{types → esm}/http-user-context.d.ts +2 -2
- package/{types → esm}/http-user-context.d.ts.map +1 -1
- package/esm/http-user-context.js +1 -1
- package/esm/http-user-context.js.map +1 -1
- package/esm/incoming-message-extensions.js +1 -1
- package/esm/incoming-message-extensions.js.map +1 -1
- package/esm/index.d.ts +19 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/index.js +18 -18
- package/esm/index.js.map +1 -1
- package/esm/models/index.d.ts +3 -0
- package/esm/models/index.d.ts.map +1 -0
- package/esm/models/index.js +2 -2
- package/esm/models/index.js.map +1 -1
- package/esm/schema-validator/index.d.ts +3 -0
- package/{types → esm}/schema-validator/index.d.ts.map +1 -1
- package/esm/schema-validator/index.js +2 -2
- package/esm/schema-validator/index.js.map +1 -1
- package/esm/schema-validator/schema-validator.js +3 -3
- package/esm/schema-validator/schema-validator.js.map +1 -1
- package/{types → esm}/server-manager.d.ts +1 -1
- package/{types → esm}/server-response-extensions.d.ts +1 -1
- package/{types → esm}/server-response-extensions.d.ts.map +1 -1
- package/{types → esm}/static-server-manager.d.ts +1 -1
- package/esm/static-server-manager.js +2 -2
- package/esm/static-server-manager.js.map +1 -1
- package/{types → esm}/utils.d.ts +1 -1
- package/{types → esm}/utils.d.ts.map +1 -1
- package/{types → esm}/validate.d.ts +1 -1
- package/{types → esm}/validate.d.ts.map +1 -1
- package/esm/validate.js +1 -1
- package/esm/validate.js.map +1 -1
- package/package.json +10 -19
- package/src/actions/error-action.ts +3 -3
- package/src/actions/get-current-user.ts +3 -3
- package/src/actions/index.ts +6 -6
- package/src/actions/is-authenticated.ts +2 -2
- package/src/actions/login.ts +4 -4
- package/src/actions/logout.ts +3 -3
- package/src/actions/not-found-action.ts +2 -2
- package/src/api-manager.ts +10 -9
- package/src/authenticate.ts +3 -3
- package/src/authorize.ts +2 -2
- package/src/endpoint-generators/create-delete-endpoint.ts +2 -2
- package/src/endpoint-generators/create-get-collection-endpoint.ts +2 -2
- package/src/endpoint-generators/create-get-entity-endpoint.ts +2 -2
- package/src/endpoint-generators/create-patch-endpoint.ts +3 -3
- package/src/endpoint-generators/create-post-endpoint.ts +3 -3
- package/src/endpoint-generators/index.ts +5 -5
- package/src/endpoint-generators/utils.ts +2 -2
- package/src/helpers.ts +6 -6
- package/src/http-authentication-settings.ts +1 -1
- package/src/http-user-context.ts +2 -2
- package/src/incoming-message-extensions.ts +1 -1
- package/src/index.ts +18 -18
- package/src/models/index.ts +2 -2
- package/src/schema-validator/index.ts +2 -2
- package/src/schema-validator/schema-validator.ts +3 -3
- package/src/server-response-extensions.ts +1 -1
- package/src/static-server-manager.ts +2 -2
- package/src/utils.ts +1 -1
- package/src/validate.ts +2 -2
- package/types/actions/index.d.ts +0 -7
- package/types/actions/index.d.ts.map +0 -1
- package/types/actions/login.d.ts.map +0 -1
- package/types/endpoint-generators/index.d.ts +0 -6
- package/types/helpers.d.ts.map +0 -1
- package/types/index.d.ts +0 -19
- package/types/index.d.ts.map +0 -1
- package/types/models/index.d.ts +0 -3
- package/types/models/index.d.ts.map +0 -1
- package/types/schema-validator/index.d.ts +0 -3
- /package/{types → esm}/incoming-message-extensions.d.ts +0 -0
- /package/{types → esm}/incoming-message-extensions.d.ts.map +0 -0
- /package/{types → esm}/mime-types.d.ts +0 -0
- /package/{types → esm}/mime-types.d.ts.map +0 -0
- /package/{types → esm}/models/cors-options.d.ts +0 -0
- /package/{types → esm}/models/cors-options.d.ts.map +0 -0
- /package/{types → esm}/models/default-session.d.ts +0 -0
- /package/{types → esm}/models/default-session.d.ts.map +0 -0
- /package/{types → esm}/request-action-implementation.d.ts +0 -0
- /package/{types → esm}/request-action-implementation.d.ts.map +0 -0
- /package/{types → esm}/schema-validator/schema-validation-error.d.ts +0 -0
- /package/{types → esm}/schema-validator/schema-validation-error.d.ts.map +0 -0
- /package/{types → esm}/schema-validator/schema-validator.d.ts +0 -0
- /package/{types → esm}/schema-validator/schema-validator.d.ts.map +0 -0
- /package/{types → esm}/schema-validator/validate-examples.d.ts +0 -0
- /package/{types → esm}/schema-validator/validate-examples.d.ts.map +0 -0
- /package/{types → esm}/server-manager.d.ts.map +0 -0
- /package/{types → esm}/static-server-manager.d.ts.map +0 -0
- /package/{types → esm}/validate.integration.schema.d.ts +0 -0
- /package/{types → esm}/validate.integration.schema.d.ts.map +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addStore, InMemoryStore, User } from '@furystack/core';
|
|
2
|
-
import { DefaultSession } from '../models/default-session';
|
|
2
|
+
import { DefaultSession } from '../models/default-session.js';
|
|
3
3
|
import '@furystack/repository';
|
|
4
|
-
import '../helpers';
|
|
4
|
+
import '../helpers.js';
|
|
5
5
|
import { getRepository } from '@furystack/repository';
|
|
6
6
|
export class MockClass {
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/endpoint-generators/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/endpoint-generators/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,uBAAuB,CAAA;AAC9B,OAAO,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,MAAM,OAAO,SAAS;CAGrB;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAW,EAAE,EAAE;IAC1C,QAAQ,CACN,CAAC,EACD,IAAI,aAAa,CAAC;QAChB,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,IAAI;KACjB,CAAC,CACH;SACE,QAAQ,CACP,IAAI,aAAa,CAAC;QAChB,KAAK,EAAE,IAAI;QACX,UAAU,EAAE,UAAU;KACvB,CAAC,CACH;SACA,QAAQ,CACP,IAAI,aAAa,CAAC;QAChB,KAAK,EAAE,cAAc;QACrB,UAAU,EAAE,WAAW;KACxB,CAAC,CACH,CAAA;IACH,aAAa,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,SAAS,EAAE,IAAI,CAAC,CAAA;AACjD,CAAC,CAAA"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { User } from '@furystack/core';
|
|
2
2
|
import type { Injector } from '@furystack/inject';
|
|
3
|
-
import { HttpAuthenticationSettings } from './http-authentication-settings';
|
|
3
|
+
import { HttpAuthenticationSettings } from './http-authentication-settings.js';
|
|
4
4
|
import type { RestApi } from '@furystack/rest';
|
|
5
|
-
import type { ImplementApiOptions } from './api-manager';
|
|
6
|
-
import type { DefaultSession } from './models/default-session';
|
|
7
|
-
import type { StaticServerOptions } from './static-server-manager';
|
|
5
|
+
import type { ImplementApiOptions } from './api-manager.js';
|
|
6
|
+
import type { DefaultSession } from './models/default-session.js';
|
|
7
|
+
import type { StaticServerOptions } from './static-server-manager.js';
|
|
8
8
|
/**
|
|
9
9
|
* Sets up the @furystack/rest-service with the provided settings
|
|
10
10
|
* @param api The API implementation details
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAC9E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAGrE;;;;GAIG;AACH,eAAO,MAAM,cAAc,mEACoC,CAAA;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,kEACtB,QAAQ,sFAE+F,CAAA;AAEnH;;;;;;GAMG;AACH,eAAO,MAAM,cAAc,YAAa;IAAE,QAAQ,EAAE,QAAQ,CAAA;CAAE,GAAG,mBAAmB,kBAGnF,CAAA"}
|
package/esm/helpers.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpAuthenticationSettings } from './http-authentication-settings';
|
|
2
|
-
import { ApiManager } from './api-manager';
|
|
3
|
-
import { StaticServerManager } from './static-server-manager';
|
|
1
|
+
import { HttpAuthenticationSettings } from './http-authentication-settings.js';
|
|
2
|
+
import { ApiManager } from './api-manager.js';
|
|
3
|
+
import { StaticServerManager } from './static-server-manager.js';
|
|
4
4
|
/**
|
|
5
5
|
* Sets up the @furystack/rest-service with the provided settings
|
|
6
6
|
* @param api The API implementation details
|
package/esm/helpers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAG7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAA;AAEhE;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAqB,GAA2B,EAAE,EAAE,CACrF,MAAM,GAAG,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,CAAA;AAE/D;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,QAAkB,EAClB,QAA+D,EAC/D,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,GAAG,IAAI,0BAA0B,EAAE,EAAE,GAAG,QAAQ,EAAE,EAAE,0BAA0B,CAAC,CAAA;AAEnH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAAqD,EAAE,EAAE;IACtF,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,EAAE,GAAG,OAAO,CAAA;IACzC,OAAO,QAAQ,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAA;AAC1E,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { PhysicalStore, StoreManager } from '@furystack/core';
|
|
2
2
|
import { User } from '@furystack/core';
|
|
3
3
|
import type { Constructable } from '@furystack/inject';
|
|
4
|
-
import { DefaultSession } from './models/default-session';
|
|
4
|
+
import { DefaultSession } from './models/default-session.js';
|
|
5
5
|
/**
|
|
6
6
|
* Authentication settings object for FuryStack HTTP Api
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-authentication-settings.d.ts","sourceRoot":"","sources":["../src/http-authentication-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http-authentication-settings.d.ts","sourceRoot":"","sources":["../src/http-authentication-settings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D;;GAEG;AACH,qBACa,0BAA0B,CAAC,KAAK,SAAS,IAAI,EAAE,QAAQ,SAAS,cAAc;IAClF,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAA+B;IAE1D,YAAY,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,aAAa,CAAC,KAAK,EAAE,MAAM,KAAK,CAAC,CACzB;IAEtD,eAAe,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,aAAa,CAAC,QAAQ,EAAE,MAAM,QAAQ,CAAC,CACI;IAE5F,UAAU,SAAQ;IAClB,eAAe,UAAO;CAC9B"}
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { User } from '@furystack/core';
|
|
8
8
|
import { Injectable } from '@furystack/inject';
|
|
9
|
-
import { DefaultSession } from './models/default-session';
|
|
9
|
+
import { DefaultSession } from './models/default-session.js';
|
|
10
10
|
/**
|
|
11
11
|
* Authentication settings object for FuryStack HTTP Api
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-authentication-settings.js","sourceRoot":"","sources":["../src/http-authentication-settings.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http-authentication-settings.js","sourceRoot":"","sources":["../src/http-authentication-settings.ts"],"names":[],"mappings":";;;;;;AACA,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAE5D;;GAEG;AAEH,IAAa,0BAA0B,GAAvC,MAAa,0BAA0B;IAAvC;QACS,UAAK,GAAyB,IAA4B,CAAA;QAE1D,iBAAY,GAAsE,CAAC,EAAE,EAAE,EAAE,CAC9F,EAAE,CAAC,WAAW,CAAqB,IAAW,EAAE,UAAU,CAAC,CAAA;QAEtD,oBAAe,GAA4E,CAAC,EAAE,EAAE,EAAE,CACvG,EAAE,CAAC,WAAW,CAAC,cAAc,EAAE,WAAW,CAAuD,CAAA;QAE5F,eAAU,GAAG,KAAK,CAAA;QAClB,oBAAe,GAAG,IAAI,CAAA;IAC/B,CAAC;CAAA,CAAA;AAXY,0BAA0B;IADtC,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;GACzB,0BAA0B,CAWtC;SAXY,0BAA0B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
2
|
import type { User } from '@furystack/core';
|
|
3
|
-
import { HttpAuthenticationSettings } from './http-authentication-settings';
|
|
4
|
-
import type { DefaultSession } from './models/default-session';
|
|
3
|
+
import { HttpAuthenticationSettings } from './http-authentication-settings.js';
|
|
4
|
+
import type { DefaultSession } from './models/default-session.js';
|
|
5
5
|
/**
|
|
6
6
|
* Injectable UserContext for FuryStack HTTP Api
|
|
7
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-user-context.d.ts","sourceRoot":"","sources":["../src/http-user-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM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AAE,cAAc,CAAC,CAAA;IAGjF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAwB;CACvD"}
|
package/esm/http-user-context.js
CHANGED
|
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
};
|
|
10
10
|
import { StoreManager } from '@furystack/core';
|
|
11
11
|
import { Injectable, Injected } from '@furystack/inject';
|
|
12
|
-
import { HttpAuthenticationSettings } from './http-authentication-settings';
|
|
12
|
+
import { HttpAuthenticationSettings } from './http-authentication-settings.js';
|
|
13
13
|
import { PasswordAuthenticator, UnauthenticatedError } from '@furystack/security';
|
|
14
14
|
import { randomBytes } from 'crypto';
|
|
15
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-user-context.js","sourceRoot":"","sources":["../src/http-user-context.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http-user-context.js","sourceRoot":"","sources":["../src/http-user-context.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAC9C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAE9E,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AAEpC;;GAEG;AAEH,IAAa,eAAe,GAA5B,MAAa,eAAe;IAA5B;QACS,iBAAY,GAAG,GAAG,EAAE,CAAC,IAAI,CAAC,cAAc,CA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G,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAA;YACvF,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;SACxF;IACH,CAAC;CAUF,CAAA;AAPiB;IADf,QAAQ,CAAC,0BAA0B,CAAC;8BACJ,0BAA0B;uDAAsB;AAGhE;IADhB,QAAQ,CAAC,YAAY,CAAC;8BACS,YAAY;qDAAA;AAG3B;IADhB,QAAQ,CAAC,qBAAqB,CAAC;8BACC,qBAAqB;sDAAA;AA1J3C,eAAe;IAD3B,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;GACtB,eAAe,CA2J3B;SA3JY,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incoming-message-extensions.js","sourceRoot":"","sources":["../src/incoming-message-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"incoming-message-extensions.js","sourceRoot":"","sources":["../src/incoming-message-extensions.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAUlC,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,YAAY,GAAG,KAAK;IACjD,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;IACzB,OAAO,MAAM,KAAK,CAAC,YAAY,CAAI,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA;AAED,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,eAAe,GAAG,KAAK;IACpD,MAAM,KAAK,GAAG,IAAI,KAAK,EAAE,CAAA;IACzB,OAAO,MAAM,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;AAC1C,CAAC,CAAA"}
|
package/esm/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from './helpers.js';
|
|
2
|
+
export * from './api-manager.js';
|
|
3
|
+
export * from './actions/index.js';
|
|
4
|
+
export * from './authenticate.js';
|
|
5
|
+
export * from './authorize.js';
|
|
6
|
+
export * from './http-authentication-settings.js';
|
|
7
|
+
export * from './http-user-context.js';
|
|
8
|
+
export * from './incoming-message-extensions.js';
|
|
9
|
+
export * from './server-manager.js';
|
|
10
|
+
export * from './server-response-extensions.js';
|
|
11
|
+
export * from './utils.js';
|
|
12
|
+
export * from './models/index.js';
|
|
13
|
+
export * from './endpoint-generators/index.js';
|
|
14
|
+
export * from './schema-validator/index.js';
|
|
15
|
+
export * from './request-action-implementation.js';
|
|
16
|
+
export * from './validate.js';
|
|
17
|
+
export * from './mime-types.js';
|
|
18
|
+
export * from './static-server-manager.js';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,qBAAqB,CAAA;AACnC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oCAAoC,CAAA;AAClD,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA"}
|
package/esm/index.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
export * from './helpers';
|
|
2
|
-
export * from './api-manager';
|
|
3
|
-
export * from './actions';
|
|
4
|
-
export * from './authenticate';
|
|
5
|
-
export * from './authorize';
|
|
6
|
-
export * from './http-authentication-settings';
|
|
7
|
-
export * from './http-user-context';
|
|
8
|
-
export * from './incoming-message-extensions';
|
|
9
|
-
export * from './server-manager';
|
|
10
|
-
export * from './server-response-extensions';
|
|
11
|
-
export * from './utils';
|
|
12
|
-
export * from './models';
|
|
13
|
-
export * from './endpoint-generators';
|
|
14
|
-
export * from './schema-validator';
|
|
15
|
-
export * from './request-action-implementation';
|
|
16
|
-
export * from './validate';
|
|
17
|
-
export * from './mime-types';
|
|
18
|
-
export * from './static-server-manager';
|
|
1
|
+
export * from './helpers.js';
|
|
2
|
+
export * from './api-manager.js';
|
|
3
|
+
export * from './actions/index.js';
|
|
4
|
+
export * from './authenticate.js';
|
|
5
|
+
export * from './authorize.js';
|
|
6
|
+
export * from './http-authentication-settings.js';
|
|
7
|
+
export * from './http-user-context.js';
|
|
8
|
+
export * from './incoming-message-extensions.js';
|
|
9
|
+
export * from './server-manager.js';
|
|
10
|
+
export * from './server-response-extensions.js';
|
|
11
|
+
export * from './utils.js';
|
|
12
|
+
export * from './models/index.js';
|
|
13
|
+
export * from './endpoint-generators/index.js';
|
|
14
|
+
export * from './schema-validator/index.js';
|
|
15
|
+
export * from './request-action-implementation.js';
|
|
16
|
+
export * from './validate.js';
|
|
17
|
+
export * from './mime-types.js';
|
|
18
|
+
export * from './static-server-manager.js';
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
package/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mCAAmC,CAAA;AACjD,cAAc,wBAAwB,CAAA;AACtC,cAAc,kCAAkC,CAAA;AAChD,cAAc,qBAAqB,CAAA;AACnC,cAAc,iCAAiC,CAAA;AAC/C,cAAc,YAAY,CAAA;AAC1B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,oCAAoC,CAAA;AAClD,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,4BAA4B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA"}
|
package/esm/models/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './cors-options';
|
|
2
|
-
export * from './default-session';
|
|
1
|
+
export * from './cors-options.js';
|
|
2
|
+
export * from './default-session.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/esm/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAA;AACjC,cAAc,sBAAsB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema-validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema-validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './schema-validator';
|
|
2
|
-
export * from './schema-validation-error';
|
|
1
|
+
export * from './schema-validator.js';
|
|
2
|
+
export * from './schema-validation-error.js';
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema-validator/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import Ajv from 'ajv';
|
|
2
2
|
import useFormats from 'ajv-formats';
|
|
3
|
-
import { SchemaValidationError } from './schema-validation-error';
|
|
3
|
+
import { SchemaValidationError } from './schema-validation-error.js';
|
|
4
4
|
export class SchemaValidator {
|
|
5
5
|
constructor(schema, ajvOptions) {
|
|
6
6
|
this.schema = schema;
|
|
7
7
|
this.ajvOptions = ajvOptions;
|
|
8
|
-
this.ajv = new Ajv({
|
|
8
|
+
this.ajv = new Ajv.default({
|
|
9
9
|
allErrors: true,
|
|
10
10
|
...this.ajvOptions,
|
|
11
11
|
});
|
|
12
|
-
useFormats(this.ajv);
|
|
12
|
+
useFormats.default(this.ajv);
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* @param data The object to validate
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-validator.js","sourceRoot":"","sources":["../../src/schema-validator/schema-validator.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,UAAU,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"schema-validator.js","sourceRoot":"","sources":["../../src/schema-validator/schema-validator.ts"],"names":[],"mappings":"AACA,OAAO,GAAG,MAAM,KAAK,CAAA;AACrB,OAAO,UAAU,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAA;AAEpE,MAAM,OAAO,eAAe;IAK1B,YAA6B,MAAe,EAAmB,UAAoB;QAAtD,WAAM,GAAN,MAAM,CAAS;QAAmB,eAAU,GAAV,UAAU,CAAU;QAJlE,QAAG,GAAG,IAAI,GAAG,CAAC,OAAO,CAAC;YACrC,SAAS,EAAE,IAAI;YACf,GAAG,IAAI,CAAC,UAAU;SACnB,CAAC,CAAA;QAEA,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC9B,CAAC;IAED;;;;;;OAMG;IACI,OAAO,CAAI,IAAS,EAAE,OAAqD;QAChF,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,iBAAiB,OAAO,CAAC,UAAoB,EAAE,EAAE,CAAA;QACxF,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;QAC5C,MAAM,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;QACjC,IAAI,CAAC,OAAO,EAAE;YACZ,MAAM,IAAI,qBAAqB,CAAC,WAAW,CAAC,MAAuB,CAAC,CAAA;SACrE;QAED,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-response-extensions.d.ts","sourceRoot":"","sources":["../src/server-response-extensions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"server-response-extensions.d.ts","sourceRoot":"","sources":["../src/server-response-extensions.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAEtE,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,CAAC,CAAA;IACP,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAClC;AACD,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;CAClC;AAED,OAAO,QAAQ,MAAM,CAAC;IACpB,UAAiB,cAAc;QAC7B,gBAAgB,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;KACvD;CACF"}
|
|
@@ -10,9 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
import { Injectable, Injected } from '@furystack/inject';
|
|
11
11
|
import { createReadStream } from 'fs';
|
|
12
12
|
import { stat } from 'fs/promises';
|
|
13
|
-
import { getMimeForFile } from './mime-types';
|
|
13
|
+
import { getMimeForFile } from './mime-types.js';
|
|
14
14
|
import { join, normalize, sep } from 'path';
|
|
15
|
-
import { ServerManager } from './server-manager';
|
|
15
|
+
import { ServerManager } from './server-manager.js';
|
|
16
16
|
let StaticServerManager = class StaticServerManager {
|
|
17
17
|
constructor() {
|
|
18
18
|
this.shouldExec = (baseUrl) => ({ req }) => req.url &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static-server-manager.js","sourceRoot":"","sources":["../src/static-server-manager.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAA;AACrC,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,OAAO,EAAE,cAAc,EA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D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAA;QAEvG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;YACf,UAAU,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC;YAC5C,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,GAAG,OAAO,EAAE,CAAC;SAC1C,CAAC,CAAA;IACJ,CAAC;CACF,CAAA;AAtEkB;IADhB,QAAQ,CAAC,aAAa,CAAC;8BACS,aAAa;0DAAA;AAFnC,mBAAmB;IAD/B,UAAU,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;GACzB,mBAAmB,CAwE/B;SAxEY,mBAAmB"}
|
package/{types → esm}/utils.d.ts
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,MAAM,CAAA;AAE3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AAE3D;;GAEG;AACH,qBACa,KAAK;IACH,eAAe,CAAC,eAAe,EAAE,eAAe;IAuB7D;;;;OAIG;IACU,YAAY,CAAC,CAAC,EAAE,eAAe,EAAE,eAAe,GAAG,OAAO,CAAC,CAAC,CAAC;IAM1E;;;;;OAKG;IACI,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,cAAc;CAkB7G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,aAAa,EAAwB,MAAM,
|
|
1
|
+
{"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,aAAa,EAAwB,MAAM,oCAAoC,CAAA;AAG3G,eAAO,MAAM,QAAQ;;;;;IAEjB;;OAEG;;IAEH;;OAEG;;;YAGgB,GAAG;gDA6CvB,CAAA"}
|
package/esm/validate.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SchemaValidator } from './schema-validator';
|
|
1
|
+
import { SchemaValidator } from './schema-validator/schema-validator.js';
|
|
2
2
|
export const Validate = (validationOptions) => (action) => {
|
|
3
3
|
const schema = { ...validationOptions.schema };
|
|
4
4
|
Object.values(schema.definitions).forEach((definition) => {
|
package/esm/validate.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"validate.js","sourceRoot":"","sources":["../src/validate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAA;AAExE,MAAM,CAAC,MAAM,QAAQ,GACnB,CAAkF,iBASjF,EAAE,EAAE,CACL,CAA4B,MAAwB,EAAoB,EAAE;IACxE,MAAM,MAAM,GAAG,EAAE,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAA;IAE9C,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;QACvD,IAAI,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,CA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,CAAC,EAAE,CAAC;SAChC,EACD,EAAE,UAAU,EAAE,iBAAiB,CAAC,UAAU,EAAE,CAC7C,CAAA;QACD,OAAO,MAAM,MAAM,CAAC;YAClB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO;YACP,QAAQ,EAAE,GAAG,EAAE,CAAC,KAAK;YACrB,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG;YACvB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC;SAC9B,CAAC,CAAA;IACX,CAAC,CAAA;AACH,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furystack/rest-service",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.3",
|
|
4
4
|
"description": "Repository implementation for FuryStack",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -8,16 +8,7 @@
|
|
|
8
8
|
},
|
|
9
9
|
"exports": {
|
|
10
10
|
".": {
|
|
11
|
-
"import": "./esm/index.js"
|
|
12
|
-
"types": "./types/index.d.ts"
|
|
13
|
-
},
|
|
14
|
-
"./package.json": "./package.json"
|
|
15
|
-
},
|
|
16
|
-
"typesVersions": {
|
|
17
|
-
"*": {
|
|
18
|
-
"*": [
|
|
19
|
-
"types/*"
|
|
20
|
-
]
|
|
11
|
+
"import": "./esm/index.js"
|
|
21
12
|
}
|
|
22
13
|
},
|
|
23
14
|
"files": [
|
|
@@ -46,20 +37,20 @@
|
|
|
46
37
|
},
|
|
47
38
|
"homepage": "https://github.com/furystack/furystack",
|
|
48
39
|
"dependencies": {
|
|
49
|
-
"@furystack/core": "^12.0.
|
|
50
|
-
"@furystack/inject": "^8.0.
|
|
51
|
-
"@furystack/repository": "^7.0.
|
|
52
|
-
"@furystack/rest": "^5.0.
|
|
53
|
-
"@furystack/security": "^3.0.
|
|
54
|
-
"@furystack/utils": "^4.0.
|
|
40
|
+
"@furystack/core": "^12.0.2",
|
|
41
|
+
"@furystack/inject": "^8.0.2",
|
|
42
|
+
"@furystack/repository": "^7.0.2",
|
|
43
|
+
"@furystack/rest": "^5.0.2",
|
|
44
|
+
"@furystack/security": "^3.0.2",
|
|
45
|
+
"@furystack/utils": "^4.0.2",
|
|
55
46
|
"ajv": "^8.12.0",
|
|
56
47
|
"ajv-formats": "^2.1.1",
|
|
57
48
|
"path-to-regexp": "^6.2.1",
|
|
58
49
|
"semaphore-async-await": "^1.5.1"
|
|
59
50
|
},
|
|
60
51
|
"devDependencies": {
|
|
61
|
-
"@furystack/rest-client-fetch": "^5.0.
|
|
62
|
-
"@types/node": "^18.
|
|
52
|
+
"@furystack/rest-client-fetch": "^5.0.2",
|
|
53
|
+
"@types/node": "^18.16.2",
|
|
63
54
|
"typescript": "^5.0.4",
|
|
64
55
|
"vitest": "^0.30.1"
|
|
65
56
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { RequestError } from '@furystack/rest'
|
|
2
2
|
import { AuthorizationError } from '@furystack/core'
|
|
3
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
4
|
-
import { JsonResult } from '../request-action-implementation'
|
|
5
|
-
import { SchemaValidationError } from '../schema-validator'
|
|
3
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
4
|
+
import { JsonResult } from '../request-action-implementation.js'
|
|
5
|
+
import { SchemaValidationError } from '../schema-validator/schema-validation-error.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Action for unhandled (500) errors
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { User } from '@furystack/core'
|
|
2
2
|
import { getCurrentUser } from '@furystack/core'
|
|
3
|
-
import { Authenticate } from '../authenticate'
|
|
4
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
5
|
-
import { JsonResult } from '../request-action-implementation'
|
|
3
|
+
import { Authenticate } from '../authenticate.js'
|
|
4
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
5
|
+
import { JsonResult } from '../request-action-implementation.js'
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Action that returns the current authenticated user
|
package/src/actions/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './error-action'
|
|
2
|
-
export * from './get-current-user'
|
|
3
|
-
export * from './is-authenticated'
|
|
4
|
-
export * from './login'
|
|
5
|
-
export * from './logout'
|
|
6
|
-
export * from './not-found-action'
|
|
1
|
+
export * from './error-action.js'
|
|
2
|
+
export * from './get-current-user.js'
|
|
3
|
+
export * from './is-authenticated.js'
|
|
4
|
+
export * from './login.js'
|
|
5
|
+
export * from './logout.js'
|
|
6
|
+
export * from './not-found-action.js'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isAuthenticated } from '@furystack/core'
|
|
2
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
3
|
-
import { JsonResult } from '../request-action-implementation'
|
|
2
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
3
|
+
import { JsonResult } from '../request-action-implementation.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Action that returns if the current user is authenticated
|
package/src/actions/login.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { HttpUserContext } from '../http-user-context'
|
|
2
|
-
import '../helpers'
|
|
1
|
+
import { HttpUserContext } from '../http-user-context.js'
|
|
2
|
+
import '../helpers.js'
|
|
3
3
|
import type { User } from '@furystack/core'
|
|
4
4
|
import { RequestError } from '@furystack/rest'
|
|
5
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
6
|
-
import { JsonResult } from '../request-action-implementation'
|
|
5
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
6
|
+
import { JsonResult } from '../request-action-implementation.js'
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Action that logs in the current user
|
package/src/actions/logout.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HttpUserContext } from '../http-user-context'
|
|
2
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
3
|
-
import { EmptyResult } from '../request-action-implementation'
|
|
1
|
+
import { HttpUserContext } from '../http-user-context.js'
|
|
2
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
3
|
+
import { EmptyResult } from '../request-action-implementation.js'
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Action that logs out the current user
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { RequestAction } from '../request-action-implementation'
|
|
2
|
-
import { JsonResult } from '../request-action-implementation'
|
|
1
|
+
import type { RequestAction } from '../request-action-implementation.js'
|
|
2
|
+
import { JsonResult } from '../request-action-implementation.js'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @returns The standard Not Found action result
|
package/src/api-manager.ts
CHANGED
|
@@ -4,19 +4,20 @@ import type { Method, RestApi } from '@furystack/rest'
|
|
|
4
4
|
import { deserializeQueryString } from '@furystack/rest'
|
|
5
5
|
import type { Injector } from '@furystack/inject'
|
|
6
6
|
import { Injectable, Injected } from '@furystack/inject'
|
|
7
|
-
import type { OnRequest } from './server-manager'
|
|
8
|
-
import { ServerManager } from './server-manager'
|
|
9
7
|
import type { MatchFunction } from 'path-to-regexp'
|
|
10
8
|
import { match } from 'path-to-regexp'
|
|
11
|
-
import { NotFoundAction } from './actions/not-found-action'
|
|
12
|
-
import type { CorsOptions } from './models/cors-options'
|
|
13
|
-
import { Utils } from './utils'
|
|
14
|
-
import { ErrorAction } from './actions/error-action'
|
|
15
|
-
import './server-response-extensions'
|
|
16
9
|
import type { User } from '@furystack/core'
|
|
17
10
|
import { IdentityContext } from '@furystack/core'
|
|
18
|
-
|
|
19
|
-
import type {
|
|
11
|
+
|
|
12
|
+
import type { OnRequest } from './server-manager.js'
|
|
13
|
+
import { ServerManager } from './server-manager.js'
|
|
14
|
+
import { NotFoundAction } from './actions/not-found-action.js'
|
|
15
|
+
import type { CorsOptions } from './models/cors-options.js'
|
|
16
|
+
import { Utils } from './utils.js'
|
|
17
|
+
import { ErrorAction } from './actions/error-action.js'
|
|
18
|
+
import './server-response-extensions.js'
|
|
19
|
+
import { HttpUserContext } from './http-user-context.js'
|
|
20
|
+
import type { RequestAction } from './request-action-implementation.js'
|
|
20
21
|
|
|
21
22
|
export type RestApiImplementation<T extends RestApi> = {
|
|
22
23
|
[TMethod in keyof T]: {
|
package/src/authenticate.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { isAuthenticated } from '@furystack/core'
|
|
2
2
|
import { sleepAsync } from '@furystack/utils'
|
|
3
|
-
import { HttpUserContext } from './http-user-context'
|
|
4
|
-
import type { ActionResult, RequestAction, RequestActionOptions } from './request-action-implementation'
|
|
5
|
-
import { JsonResult } from './request-action-implementation'
|
|
3
|
+
import { HttpUserContext } from './http-user-context.js'
|
|
4
|
+
import type { ActionResult, RequestAction, RequestActionOptions } from './request-action-implementation.js'
|
|
5
|
+
import { JsonResult } from './request-action-implementation.js'
|
|
6
6
|
|
|
7
7
|
export const Authenticate =
|
|
8
8
|
() =>
|