@sphereon/ssi-sdk.remote-server-rest-api 0.18.2-unstable.5 → 0.18.2-unstable.50
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-server-api-server.d.ts","sourceRoot":"","sources":["../src/remote-server-api-server.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"remote-server-api-server.d.ts","sourceRoot":"","sources":["../src/remote-server-api-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AAGrC,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAExE,qBAAa,qBAAqB;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAa;IACpC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAe;IAC/C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAqB;IAC3C,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAQ;IAErC,IAAI,KAAK,IAAI,MAAM,CAAC,GAAG,CAAC,CAEvB;IAED,IAAI,IAAI,IAAI,mBAAmB,CAE9B;IAED,IAAI,cAAc,IAAI,KAAK,CAAC,MAAM,CAAC,CAElC;IAED,IAAI,OAAO,IAAI,OAAO,CAErB;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,sBAAsB,IAAI,MAAM,CAEnC;gBAEW,IAAI,EAAE,yBAAyB;CAqB5C"}
|
|
@@ -32,7 +32,7 @@ class RemoteServerApiServer {
|
|
|
32
32
|
this._requestWithAgentRouter = (0, remote_server_1.RequestWithAgentRouter)({ agent: this._agent });
|
|
33
33
|
this._agentRouter = (0, remote_server_1.AgentRouter)({ exposedMethods: this._exposedMethods });
|
|
34
34
|
if ((_b = opts.endpointOpts) === null || _b === void 0 ? void 0 : _b.globalAuth) {
|
|
35
|
-
this._exposedMethods.forEach(method => {
|
|
35
|
+
this._exposedMethods.forEach((method) => {
|
|
36
36
|
(0, ssi_express_support_1.copyGlobalAuthToEndpoint)({ opts, key: method });
|
|
37
37
|
});
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-server-api-server.js","sourceRoot":"","sources":["../src/remote-server-api-server.ts"],"names":[],"mappings":";;;AAEA,
|
|
1
|
+
{"version":3,"file":"remote-server-api-server.js","sourceRoot":"","sources":["../src/remote-server-api-server.ts"],"names":[],"mappings":";;;AAEA,yDAA2E;AAC3E,uEAAwE;AAGxE,MAAa,qBAAqB;IAQhC,IAAI,KAAK;QACP,OAAO,IAAI,CAAC,MAAM,CAAA;IACpB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,IAAI,CAAC,eAAe,CAAA;IAC7B,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED,IAAI,WAAW;QACb,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAED,IAAI,sBAAsB;QACxB,OAAO,IAAI,CAAC,uBAAuB,CAAA;IACrC,CAAC;IAED,YAAY,IAA+B;;QACzC,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,IAAI,CAAA;QAE5C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAA;QACjB,IAAI,CAAC,eAAe,GAAG,MAAA,IAAI,CAAC,cAAc,mCAAI,EAAE,CAAA;QAChD,IAAI,CAAC,QAAQ,GAAG,cAAc,CAAC,OAAO,CAAA;QACtC,IAAI,CAAC,uBAAuB,GAAG,IAAA,sCAAsB,EAAC,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAA;QAC7E,IAAI,CAAC,YAAY,GAAG,IAAA,2BAAW,EAAC,EAAE,cAAc,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAA;QAEzE,IAAI,MAAA,IAAI,CAAC,YAAY,0CAAE,UAAU,EAAE;YACjC,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBACtC,IAAA,8CAAwB,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,CAAC,CAAA;YACjD,CAAC,CAAC,CAAA;SACH;QAED,MAAM,QAAQ,GAAG,MAAA,MAAA,IAAI,CAAC,YAAY,0CAAE,QAAQ,mCAAI,EAAE,CAAA;QAElD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA;QAC/C,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;IAChD,CAAC;CACF;AArDD,sDAqDC"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAE/E,MAAM,MAAM,2BAA2B,GAAG;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,eAAe,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7B,YAAY,CAAC,EAAE,2BAA2B,CAAA;CAC3C,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAA;IAClB,cAAc,EAAE,cAAc,CAAA;IAC9B,IAAI,EAAE,mBAAmB,CAAA;CAC1B,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sphereon/ssi-sdk.remote-server-rest-api",
|
|
3
|
-
"version": "0.18.2-unstable.
|
|
3
|
+
"version": "0.18.2-unstable.50+ae5e0192",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"start:prod": "node build/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sphereon/ssi-express-support": "0.18.2-unstable.
|
|
13
|
+
"@sphereon/ssi-express-support": "0.18.2-unstable.50+ae5e0192",
|
|
14
14
|
"@veramo/core": "4.2.0",
|
|
15
15
|
"@veramo/remote-server": "4.2.0",
|
|
16
16
|
"express": "^4.18.2"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"REST",
|
|
40
40
|
"API"
|
|
41
41
|
],
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "ae5e019292e8cf9ab528368f449f9345ae25e3d6"
|
|
43
43
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {Express, Router} from 'express'
|
|
2
|
-
import {TAgent} from '@veramo/core'
|
|
3
|
-
import {AgentRouter, RequestWithAgentRouter} from '@veramo/remote-server'
|
|
4
|
-
import {copyGlobalAuthToEndpoint} from '@sphereon/ssi-express-support'
|
|
5
|
-
import {RemoteServerApiServerArgs, RemoteServerApiOpts} from './types'
|
|
1
|
+
import { Express, Router } from 'express'
|
|
2
|
+
import { TAgent } from '@veramo/core'
|
|
3
|
+
import { AgentRouter, RequestWithAgentRouter } from '@veramo/remote-server'
|
|
4
|
+
import { copyGlobalAuthToEndpoint } from '@sphereon/ssi-express-support'
|
|
5
|
+
import { RemoteServerApiServerArgs, RemoteServerApiOpts } from './types'
|
|
6
6
|
|
|
7
7
|
export class RemoteServerApiServer {
|
|
8
8
|
private readonly _agent: TAgent<any>
|
|
@@ -47,7 +47,7 @@ export class RemoteServerApiServer {
|
|
|
47
47
|
this._agentRouter = AgentRouter({ exposedMethods: this._exposedMethods })
|
|
48
48
|
|
|
49
49
|
if (opts.endpointOpts?.globalAuth) {
|
|
50
|
-
this._exposedMethods.forEach(method => {
|
|
50
|
+
this._exposedMethods.forEach((method) => {
|
|
51
51
|
copyGlobalAuthToEndpoint({ opts, key: method })
|
|
52
52
|
})
|
|
53
53
|
}
|
package/src/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {TAgent} from '@veramo/core'
|
|
2
|
-
import {ExpressSupport, GenericAuthArgs} from '@sphereon/ssi-express-support'
|
|
1
|
+
import { TAgent } from '@veramo/core'
|
|
2
|
+
import { ExpressSupport, GenericAuthArgs } from '@sphereon/ssi-express-support'
|
|
3
3
|
|
|
4
4
|
export type RemoteServerApiEndpointOpts = {
|
|
5
5
|
basePath?: string
|