@restorecommerce/facade 1.2.0 → 1.3.1
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/.eslintignore +3 -0
- package/.eslintrc.cjs +13 -0
- package/CHANGELOG.md +22 -0
- package/codegen/index.d.ts +1 -1
- package/codegen/index.js +18 -44
- package/debug-run.ts +7 -6
- package/dist/gql/index.d.ts +1 -1
- package/dist/gql/index.js +1 -17
- package/dist/gql/protos/federation.d.ts +3 -3
- package/dist/gql/protos/federation.js +16 -24
- package/dist/gql/protos/graphql.d.ts +4 -4
- package/dist/gql/protos/graphql.js +64 -42
- package/dist/gql/protos/index.d.ts +6 -6
- package/dist/gql/protos/index.js +6 -22
- package/dist/gql/protos/registry.d.ts +6 -6
- package/dist/gql/protos/registry.js +157 -176
- package/dist/gql/protos/resolvers.d.ts +3 -3
- package/dist/gql/protos/resolvers.js +78 -104
- package/dist/gql/protos/schema.d.ts +4 -4
- package/dist/gql/protos/schema.js +40 -53
- package/dist/gql/protos/types.d.ts +3 -3
- package/dist/gql/protos/types.js +1 -4
- package/dist/gql/protos/utils.d.ts +3 -3
- package/dist/gql/protos/utils.js +23 -62
- package/dist/gql/types/AccessControlTypes.js +13 -16
- package/dist/gql/types/DateType.js +4 -7
- package/dist/gql/types/FilterType.js +7 -10
- package/dist/gql/types/MetaType.js +8 -11
- package/dist/gql/types/ScopeType.js +4 -7
- package/dist/gql/types/SortType.js +5 -8
- package/dist/gql/types/StatusType.js +4 -7
- package/dist/gql/types/index.d.ts +7 -7
- package/dist/gql/types/index.js +7 -23
- package/dist/index.d.ts +14 -14
- package/dist/index.js +195 -207
- package/dist/interfaces.d.ts +8 -8
- package/dist/interfaces.js +1 -2
- package/dist/middlewares/index.d.ts +1 -1
- package/dist/middlewares/index.js +1 -17
- package/dist/middlewares/req-res-logger/index.d.ts +2 -2
- package/dist/middlewares/req-res-logger/index.js +33 -31
- package/dist/modules/access-control/gql/federation.d.ts +1 -1
- package/dist/modules/access-control/gql/federation.js +10 -17
- package/dist/modules/access-control/gql/schema.d.ts +1 -1
- package/dist/modules/access-control/gql/schema.generated.d.ts +136 -110
- package/dist/modules/access-control/gql/schema.generated.js +22 -25
- package/dist/modules/access-control/gql/schema.js +5 -9
- package/dist/modules/access-control/gql/types.d.ts +2 -2
- package/dist/modules/access-control/gql/types.js +13 -17
- package/dist/modules/access-control/grpc/index.d.ts +5 -5
- package/dist/modules/access-control/grpc/index.js +10 -14
- package/dist/modules/access-control/index.d.ts +2 -2
- package/dist/modules/access-control/index.js +20 -17
- package/dist/modules/access-control/interfaces.d.ts +3 -3
- package/dist/modules/access-control/interfaces.js +1 -4
- package/dist/modules/catalog/gql/federation.d.ts +1 -1
- package/dist/modules/catalog/gql/federation.js +10 -17
- package/dist/modules/catalog/gql/schema.d.ts +1 -1
- package/dist/modules/catalog/gql/schema.generated.d.ts +252 -226
- package/dist/modules/catalog/gql/schema.generated.js +20 -23
- package/dist/modules/catalog/gql/schema.js +5 -9
- package/dist/modules/catalog/gql/types.d.ts +2 -2
- package/dist/modules/catalog/gql/types.js +15 -19
- package/dist/modules/catalog/grpc/index.d.ts +6 -6
- package/dist/modules/catalog/grpc/index.js +12 -16
- package/dist/modules/catalog/index.d.ts +2 -2
- package/dist/modules/catalog/index.js +20 -17
- package/dist/modules/catalog/interfaces.d.ts +3 -3
- package/dist/modules/catalog/interfaces.js +1 -4
- package/dist/modules/facade-status/gql/index.js +8 -14
- package/dist/modules/facade-status/gql/resolvers.d.ts +1 -1
- package/dist/modules/facade-status/gql/resolvers.js +14 -8
- package/dist/modules/facade-status/gql/schema.d.ts +1 -1
- package/dist/modules/facade-status/gql/schema.generated.d.ts +34 -11
- package/dist/modules/facade-status/gql/schema.generated.js +1 -2
- package/dist/modules/facade-status/gql/schema.js +6 -9
- package/dist/modules/facade-status/gql/types.js +3 -6
- package/dist/modules/facade-status/index.d.ts +1 -1
- package/dist/modules/facade-status/index.js +4 -7
- package/dist/modules/facade-status/interfaces.d.ts +1 -1
- package/dist/modules/facade-status/interfaces.js +1 -2
- package/dist/modules/fulfillment/gql/federation.d.ts +1 -1
- package/dist/modules/fulfillment/gql/federation.js +10 -17
- package/dist/modules/fulfillment/gql/schema.d.ts +1 -1
- package/dist/modules/fulfillment/gql/schema.generated.d.ts +249 -223
- package/dist/modules/fulfillment/gql/schema.generated.js +20 -23
- package/dist/modules/fulfillment/gql/schema.js +5 -9
- package/dist/modules/fulfillment/gql/types.d.ts +2 -2
- package/dist/modules/fulfillment/gql/types.js +11 -15
- package/dist/modules/fulfillment/grpc/index.d.ts +3 -3
- package/dist/modules/fulfillment/grpc/index.js +6 -10
- package/dist/modules/fulfillment/index.d.ts +2 -2
- package/dist/modules/fulfillment/index.js +20 -17
- package/dist/modules/fulfillment/interfaces.d.ts +3 -3
- package/dist/modules/fulfillment/interfaces.js +1 -4
- package/dist/modules/identity/api-key/api-key.d.ts +2 -2
- package/dist/modules/identity/api-key/api-key.js +45 -65
- package/dist/modules/identity/gql/federation.d.ts +2 -2
- package/dist/modules/identity/gql/federation.js +5 -9
- package/dist/modules/identity/gql/schema.d.ts +1 -1
- package/dist/modules/identity/gql/schema.generated.d.ts +284 -255
- package/dist/modules/identity/gql/schema.generated.js +20 -23
- package/dist/modules/identity/gql/schema.js +5 -9
- package/dist/modules/identity/gql/types.d.ts +2 -2
- package/dist/modules/identity/gql/types.js +17 -21
- package/dist/modules/identity/grpc/index.d.ts +6 -6
- package/dist/modules/identity/grpc/index.js +12 -16
- package/dist/modules/identity/index.d.ts +4 -4
- package/dist/modules/identity/index.js +24 -21
- package/dist/modules/identity/interfaces.d.ts +5 -5
- package/dist/modules/identity/interfaces.js +1 -4
- package/dist/modules/identity/oauth/oauth.d.ts +4 -4
- package/dist/modules/identity/oauth/oauth.js +109 -135
- package/dist/modules/identity/oidc/adapter.d.ts +3 -3
- package/dist/modules/identity/oidc/adapter.js +111 -92
- package/dist/modules/identity/oidc/in-memory-adapter.d.ts +1 -1
- package/dist/modules/identity/oidc/in-memory-adapter.js +64 -50
- package/dist/modules/identity/oidc/index.d.ts +6 -6
- package/dist/modules/identity/oidc/index.js +29 -30
- package/dist/modules/identity/oidc/interfaces.d.ts +6 -6
- package/dist/modules/identity/oidc/interfaces.js +2 -6
- package/dist/modules/identity/oidc/password-grant.d.ts +1 -1
- package/dist/modules/identity/oidc/password-grant.js +43 -66
- package/dist/modules/identity/oidc/router.d.ts +6 -6
- package/dist/modules/identity/oidc/router.js +31 -26
- package/dist/modules/identity/oidc/templates.d.ts +1 -1
- package/dist/modules/identity/oidc/templates.js +45 -41
- package/dist/modules/identity/oidc/user.d.ts +4 -4
- package/dist/modules/identity/oidc/user.js +31 -29
- package/dist/modules/identity/oidc/utils.d.ts +2 -2
- package/dist/modules/identity/oidc/utils.js +6 -13
- package/dist/modules/index.d.ts +13 -13
- package/dist/modules/index.js +13 -29
- package/dist/modules/indexing/gql/federation.d.ts +1 -1
- package/dist/modules/indexing/gql/federation.js +10 -17
- package/dist/modules/indexing/gql/schema.d.ts +1 -1
- package/dist/modules/indexing/gql/schema.generated.d.ts +45 -19
- package/dist/modules/indexing/gql/schema.generated.js +2 -5
- package/dist/modules/indexing/gql/schema.js +5 -9
- package/dist/modules/indexing/gql/types.d.ts +2 -2
- package/dist/modules/indexing/gql/types.js +7 -11
- package/dist/modules/indexing/grpc/index.d.ts +2 -2
- package/dist/modules/indexing/grpc/index.js +4 -8
- package/dist/modules/indexing/index.d.ts +2 -2
- package/dist/modules/indexing/index.js +20 -17
- package/dist/modules/indexing/interfaces.d.ts +3 -3
- package/dist/modules/indexing/interfaces.js +1 -4
- package/dist/modules/invoicing/gql/federation.d.ts +1 -1
- package/dist/modules/invoicing/gql/federation.js +10 -17
- package/dist/modules/invoicing/gql/schema.d.ts +1 -1
- package/dist/modules/invoicing/gql/schema.generated.d.ts +209 -183
- package/dist/modules/invoicing/gql/schema.generated.js +20 -23
- package/dist/modules/invoicing/gql/schema.js +5 -9
- package/dist/modules/invoicing/gql/types.d.ts +2 -2
- package/dist/modules/invoicing/gql/types.js +7 -11
- package/dist/modules/invoicing/grpc/index.d.ts +2 -2
- package/dist/modules/invoicing/grpc/index.js +4 -8
- package/dist/modules/invoicing/index.d.ts +2 -2
- package/dist/modules/invoicing/index.js +20 -17
- package/dist/modules/invoicing/interfaces.d.ts +3 -3
- package/dist/modules/invoicing/interfaces.js +1 -4
- package/dist/modules/notification/gql/federation.d.ts +1 -1
- package/dist/modules/notification/gql/federation.js +10 -17
- package/dist/modules/notification/gql/schema.d.ts +1 -1
- package/dist/modules/notification/gql/schema.generated.d.ts +100 -74
- package/dist/modules/notification/gql/schema.generated.js +18 -21
- package/dist/modules/notification/gql/schema.js +5 -9
- package/dist/modules/notification/gql/types.d.ts +2 -2
- package/dist/modules/notification/gql/types.js +7 -11
- package/dist/modules/notification/grpc/index.d.ts +2 -2
- package/dist/modules/notification/grpc/index.js +4 -8
- package/dist/modules/notification/index.d.ts +2 -2
- package/dist/modules/notification/index.js +20 -17
- package/dist/modules/notification/interfaces.d.ts +3 -3
- package/dist/modules/notification/interfaces.js +1 -4
- package/dist/modules/ordering/gql/federation.d.ts +1 -1
- package/dist/modules/ordering/gql/federation.js +10 -17
- package/dist/modules/ordering/gql/schema.d.ts +1 -1
- package/dist/modules/ordering/gql/schema.generated.d.ts +221 -195
- package/dist/modules/ordering/gql/schema.generated.js +22 -25
- package/dist/modules/ordering/gql/schema.js +5 -9
- package/dist/modules/ordering/gql/types.d.ts +2 -2
- package/dist/modules/ordering/gql/types.js +7 -11
- package/dist/modules/ordering/grpc/index.d.ts +2 -2
- package/dist/modules/ordering/grpc/index.js +4 -8
- package/dist/modules/ordering/index.d.ts +2 -2
- package/dist/modules/ordering/index.js +20 -17
- package/dist/modules/ordering/interfaces.d.ts +3 -3
- package/dist/modules/ordering/interfaces.js +1 -4
- package/dist/modules/ostorage/gql/federation.d.ts +1 -1
- package/dist/modules/ostorage/gql/federation.js +10 -17
- package/dist/modules/ostorage/gql/schema.d.ts +1 -1
- package/dist/modules/ostorage/gql/schema.generated.d.ts +126 -94
- package/dist/modules/ostorage/gql/schema.generated.js +8 -11
- package/dist/modules/ostorage/gql/schema.js +5 -9
- package/dist/modules/ostorage/gql/types.d.ts +2 -2
- package/dist/modules/ostorage/gql/types.js +7 -11
- package/dist/modules/ostorage/grpc/index.d.ts +2 -2
- package/dist/modules/ostorage/grpc/index.js +4 -8
- package/dist/modules/ostorage/index.d.ts +2 -2
- package/dist/modules/ostorage/index.js +20 -17
- package/dist/modules/ostorage/interfaces.d.ts +3 -3
- package/dist/modules/ostorage/interfaces.js +1 -4
- package/dist/modules/payment/gql/federation.d.ts +1 -1
- package/dist/modules/payment/gql/federation.js +10 -17
- package/dist/modules/payment/gql/schema.d.ts +1 -1
- package/dist/modules/payment/gql/schema.generated.d.ts +67 -44
- package/dist/modules/payment/gql/schema.generated.js +4 -7
- package/dist/modules/payment/gql/schema.js +5 -9
- package/dist/modules/payment/gql/types.d.ts +2 -2
- package/dist/modules/payment/gql/types.js +7 -11
- package/dist/modules/payment/grpc/index.d.ts +2 -2
- package/dist/modules/payment/grpc/index.js +4 -8
- package/dist/modules/payment/index.d.ts +2 -2
- package/dist/modules/payment/index.js +20 -17
- package/dist/modules/payment/interfaces.d.ts +3 -3
- package/dist/modules/payment/interfaces.js +1 -4
- package/dist/modules/resource/gql/federation.d.ts +1 -1
- package/dist/modules/resource/gql/federation.js +10 -17
- package/dist/modules/resource/gql/schema.d.ts +1 -1
- package/dist/modules/resource/gql/schema.generated.d.ts +348 -322
- package/dist/modules/resource/gql/schema.generated.js +28 -31
- package/dist/modules/resource/gql/schema.js +5 -9
- package/dist/modules/resource/gql/types.d.ts +2 -2
- package/dist/modules/resource/gql/types.js +31 -35
- package/dist/modules/resource/grpc/index.d.ts +13 -13
- package/dist/modules/resource/grpc/index.js +28 -32
- package/dist/modules/resource/index.d.ts +2 -2
- package/dist/modules/resource/index.js +20 -17
- package/dist/modules/resource/interfaces.d.ts +3 -3
- package/dist/modules/resource/interfaces.js +1 -4
- package/dist/modules/scheduling/gql/federation.d.ts +1 -1
- package/dist/modules/scheduling/gql/federation.js +10 -17
- package/dist/modules/scheduling/gql/schema.d.ts +1 -1
- package/dist/modules/scheduling/gql/schema.generated.d.ts +109 -83
- package/dist/modules/scheduling/gql/schema.generated.js +10 -13
- package/dist/modules/scheduling/gql/schema.js +5 -9
- package/dist/modules/scheduling/gql/types.d.ts +2 -2
- package/dist/modules/scheduling/gql/types.js +7 -11
- package/dist/modules/scheduling/grpc/index.d.ts +2 -2
- package/dist/modules/scheduling/grpc/index.js +4 -8
- package/dist/modules/scheduling/index.d.ts +2 -2
- package/dist/modules/scheduling/index.js +20 -17
- package/dist/modules/scheduling/interfaces.d.ts +3 -3
- package/dist/modules/scheduling/interfaces.js +1 -4
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +4 -9
- package/generate.ts +42 -42
- package/jest.config.cjs +23 -0
- package/package.json +18 -13
- package/tsconfig-base.json +8 -0
- package/tsconfig.debug.json +5 -1
- package/tsconfig.test.json +17 -2
- package/jest.config.js +0 -14
@@ -1,56 +1,60 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
return (
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
4
9
|
};
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
const
|
10
|
-
|
10
|
+
import path from 'node:path';
|
11
|
+
import fs from 'node:fs';
|
12
|
+
import hbs from 'handlebars';
|
13
|
+
import * as url from 'node:url';
|
14
|
+
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
15
|
+
hbs.registerHelper('json', (object) => {
|
11
16
|
return `<pre>${JSON.stringify(object, null, 2)}</pre>`;
|
12
17
|
});
|
13
|
-
class OIDCTemplateEngine {
|
18
|
+
export class OIDCTemplateEngine {
|
14
19
|
constructor(templates) {
|
15
20
|
this.templates = templates;
|
16
21
|
}
|
17
|
-
|
22
|
+
layout(context) {
|
18
23
|
var _a, _b;
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
24
|
+
return __awaiter(this, void 0, void 0, function* () {
|
25
|
+
if (!this.layoutHbs) {
|
26
|
+
const layoutTpl = (_b = (_a = this.templates) === null || _a === void 0 ? void 0 : _a.login) !== null && _b !== void 0 ? _b : yield new Promise((resolve, reject) => {
|
27
|
+
fs.readFile(path.resolve(__dirname, 'views/layout.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
28
|
+
});
|
29
|
+
this.layoutHbs = hbs.compile(layoutTpl);
|
30
|
+
}
|
31
|
+
return this.layoutHbs(context);
|
32
|
+
});
|
26
33
|
}
|
27
|
-
|
34
|
+
login(context) {
|
28
35
|
var _a, _b;
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
body: html
|
36
|
+
return __awaiter(this, void 0, void 0, function* () {
|
37
|
+
if (!this.loginHbs) {
|
38
|
+
const loginTpl = (_b = (_a = this.templates) === null || _a === void 0 ? void 0 : _a.login) !== null && _b !== void 0 ? _b : yield new Promise((resolve, reject) => {
|
39
|
+
fs.readFile(path.resolve(__dirname, 'views/login.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
40
|
+
});
|
41
|
+
this.loginHbs = hbs.compile(loginTpl);
|
42
|
+
}
|
43
|
+
let html = this.loginHbs(context);
|
44
|
+
return this.layout(Object.assign(Object.assign({}, context), { body: html }));
|
39
45
|
});
|
40
46
|
}
|
41
|
-
|
47
|
+
consent(context) {
|
42
48
|
var _a, _b;
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
body: html
|
49
|
+
return __awaiter(this, void 0, void 0, function* () {
|
50
|
+
if (!this.consentHbs) {
|
51
|
+
const consentTpl = (_b = (_a = this.templates) === null || _a === void 0 ? void 0 : _a.consent) !== null && _b !== void 0 ? _b : yield new Promise((resolve, reject) => {
|
52
|
+
fs.readFile(path.resolve(__dirname, 'views/consent.hbs'), (err, data) => err ? reject(err) : resolve(data.toString()));
|
53
|
+
});
|
54
|
+
this.consentHbs = hbs.compile(consentTpl);
|
55
|
+
}
|
56
|
+
let html = this.consentHbs(context);
|
57
|
+
return this.layout(Object.assign(Object.assign({}, context), { body: html }));
|
53
58
|
});
|
54
59
|
}
|
55
60
|
}
|
56
|
-
exports.OIDCTemplateEngine = OIDCTemplateEngine;
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { OIDCBodyLoginFn, AuthUser, OIDCLoginFn, OIDCBodyLoginCredentials } from './interfaces';
|
2
|
-
import { UserServiceClient as userService } from
|
1
|
+
import { type OIDCBodyLoginFn, type AuthUser, type OIDCLoginFn, type OIDCBodyLoginCredentials } from './interfaces.js';
|
2
|
+
import { type UserServiceClient as userService } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/user.js';
|
3
|
+
export declare const loginUser: OIDCLoginFn;
|
3
4
|
export declare const loginUserBody: OIDCBodyLoginFn;
|
4
5
|
export declare const loginUserCredentials: OIDCBodyLoginCredentials;
|
5
|
-
export declare const
|
6
|
-
export declare function findUserById(service: userService, id: string): Promise<AuthUser>;
|
6
|
+
export declare const findUserById: (service: userService, id: string) => Promise<AuthUser>;
|
@@ -1,7 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { LoginRequest, FindRequest } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/user.js';
|
5
11
|
const KEY_WHITELIST = [
|
6
12
|
'id',
|
7
13
|
'name',
|
@@ -14,18 +20,14 @@ const KEY_WHITELIST = [
|
|
14
20
|
'defaultScope',
|
15
21
|
'tokens'
|
16
22
|
];
|
17
|
-
const
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
exports.loginUserBody = loginUserBody;
|
24
|
-
const loginUserCredentials = async (ctx, credentials) => {
|
25
|
-
return (0, exports.loginUser)(ctx, credentials.identifier, credentials.password || credentials.token);
|
23
|
+
const pick = (obj, keys) => {
|
24
|
+
const ret = {};
|
25
|
+
keys.forEach(key => {
|
26
|
+
ret[key] = obj[key];
|
27
|
+
});
|
28
|
+
return ret;
|
26
29
|
};
|
27
|
-
|
28
|
-
const loginUser = async (ctx, identifier, password, remember) => {
|
30
|
+
export const loginUser = (ctx, identifier, password, remember) => __awaiter(void 0, void 0, void 0, function* () {
|
29
31
|
var _a;
|
30
32
|
if (!identifier || !password) {
|
31
33
|
return {
|
@@ -38,7 +40,7 @@ const loginUser = async (ctx, identifier, password, remember) => {
|
|
38
40
|
};
|
39
41
|
}
|
40
42
|
try {
|
41
|
-
const result =
|
43
|
+
const result = yield ctx.identitySrvClient.user.Login(LoginRequest.fromPartial({
|
42
44
|
identifier,
|
43
45
|
password,
|
44
46
|
}));
|
@@ -64,10 +66,18 @@ const loginUser = async (ctx, identifier, password, remember) => {
|
|
64
66
|
}
|
65
67
|
};
|
66
68
|
}
|
67
|
-
};
|
68
|
-
|
69
|
-
|
70
|
-
const
|
69
|
+
});
|
70
|
+
export const loginUserBody = (ctx, body) => __awaiter(void 0, void 0, void 0, function* () {
|
71
|
+
const identifier = typeof (body === null || body === void 0 ? void 0 : body.identifier) === 'string' ? body.identifier : undefined;
|
72
|
+
const password = typeof (body === null || body === void 0 ? void 0 : body.password) === 'string' ? body.password : undefined;
|
73
|
+
const remember = !!(body === null || body === void 0 ? void 0 : body.remember);
|
74
|
+
return loginUser(ctx, identifier, password, remember);
|
75
|
+
});
|
76
|
+
export const loginUserCredentials = (ctx, credentials) => __awaiter(void 0, void 0, void 0, function* () {
|
77
|
+
return loginUser(ctx, credentials.identifier, credentials.password || credentials.token);
|
78
|
+
});
|
79
|
+
export const findUserById = (service, id) => __awaiter(void 0, void 0, void 0, function* () {
|
80
|
+
const result = yield service.find(FindRequest.fromPartial({
|
71
81
|
id,
|
72
82
|
}));
|
73
83
|
if (!(result === null || result === void 0 ? void 0 : result.items) || result.items.length === 0) {
|
@@ -78,12 +88,4 @@ async function findUserById(service, id) {
|
|
78
88
|
throw new Error('USER_NOT_FOUND');
|
79
89
|
}
|
80
90
|
return pick(user, KEY_WHITELIST);
|
81
|
-
}
|
82
|
-
exports.findUserById = findUserById;
|
83
|
-
function pick(obj, keys) {
|
84
|
-
const ret = {};
|
85
|
-
keys.forEach(key => {
|
86
|
-
ret[key] = obj[key];
|
87
|
-
});
|
88
|
-
return ret;
|
89
|
-
}
|
91
|
+
});
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Any } from '@restorecommerce/rc-grpc-clients';
|
2
|
-
import { AdapterPayload } from 'oidc-provider';
|
1
|
+
import { type Any } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { type AdapterPayload } from 'oidc-provider';
|
3
3
|
export declare const epochTime: (date?: number) => number;
|
4
4
|
export declare const unmarshallProtobufAny: (msg: Any) => AdapterPayload;
|
5
5
|
export declare const marshallProtobufAny: (payload: AdapterPayload) => Any;
|
@@ -1,22 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const nanoid_1 = require("nanoid");
|
5
|
-
const epochTime = (date = Date.now()) => Math.floor(date / 1000);
|
6
|
-
exports.epochTime = epochTime;
|
7
|
-
const unmarshallProtobufAny = (msg) => {
|
1
|
+
import { customAlphabet } from 'nanoid';
|
2
|
+
export const epochTime = (date = Date.now()) => Math.floor(date / 1000);
|
3
|
+
export const unmarshallProtobufAny = (msg) => {
|
8
4
|
return JSON.parse(msg.value.toString());
|
9
5
|
};
|
10
|
-
|
11
|
-
const marshallProtobufAny = (payload) => {
|
6
|
+
export const marshallProtobufAny = (payload) => {
|
12
7
|
return {
|
13
8
|
typeUrl: '',
|
14
9
|
value: Buffer.from(JSON.stringify(payload))
|
15
10
|
};
|
16
11
|
};
|
17
|
-
|
18
|
-
const
|
19
|
-
const nanoid = () => {
|
12
|
+
const generate = customAlphabet('0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-', 21);
|
13
|
+
export const nanoid = () => {
|
20
14
|
return generate();
|
21
15
|
};
|
22
|
-
exports.nanoid = nanoid;
|
package/dist/modules/index.d.ts
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
export * from './facade-status/index';
|
2
|
-
export * from './identity/index';
|
3
|
-
export * from './ordering';
|
4
|
-
export * from './payment';
|
5
|
-
export * from './resource';
|
6
|
-
export * from './catalog';
|
7
|
-
export * from './invoicing';
|
8
|
-
export * from './fulfillment';
|
9
|
-
export * from './indexing';
|
10
|
-
export * from './scheduling';
|
11
|
-
export * from './notification';
|
12
|
-
export * from './access-control';
|
13
|
-
export * from './ostorage';
|
1
|
+
export * from './facade-status/index.js';
|
2
|
+
export * from './identity/index.js';
|
3
|
+
export * from './ordering/index.js';
|
4
|
+
export * from './payment/index.js';
|
5
|
+
export * from './resource/index.js';
|
6
|
+
export * from './catalog/index.js';
|
7
|
+
export * from './invoicing/index.js';
|
8
|
+
export * from './fulfillment/index.js';
|
9
|
+
export * from './indexing/index.js';
|
10
|
+
export * from './scheduling/index.js';
|
11
|
+
export * from './notification/index.js';
|
12
|
+
export * from './access-control/index.js';
|
13
|
+
export * from './ostorage/index.js';
|
package/dist/modules/index.js
CHANGED
@@ -1,29 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
__exportStar(require("./facade-status/index"), exports);
|
18
|
-
__exportStar(require("./identity/index"), exports);
|
19
|
-
__exportStar(require("./ordering"), exports);
|
20
|
-
__exportStar(require("./payment"), exports);
|
21
|
-
__exportStar(require("./resource"), exports);
|
22
|
-
__exportStar(require("./catalog"), exports);
|
23
|
-
__exportStar(require("./invoicing"), exports);
|
24
|
-
__exportStar(require("./fulfillment"), exports);
|
25
|
-
__exportStar(require("./indexing"), exports);
|
26
|
-
__exportStar(require("./scheduling"), exports);
|
27
|
-
__exportStar(require("./notification"), exports);
|
28
|
-
__exportStar(require("./access-control"), exports);
|
29
|
-
__exportStar(require("./ostorage"), exports);
|
1
|
+
export * from './facade-status/index.js';
|
2
|
+
export * from './identity/index.js';
|
3
|
+
export * from './ordering/index.js';
|
4
|
+
export * from './payment/index.js';
|
5
|
+
export * from './resource/index.js';
|
6
|
+
export * from './catalog/index.js';
|
7
|
+
export * from './invoicing/index.js';
|
8
|
+
export * from './fulfillment/index.js';
|
9
|
+
export * from './indexing/index.js';
|
10
|
+
export * from './scheduling/index.js';
|
11
|
+
export * from './notification/index.js';
|
12
|
+
export * from './access-control/index.js';
|
13
|
+
export * from './ostorage/index.js';
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { SubSpaceServiceConfig } from '../../../gql/protos';
|
1
|
+
import { type SubSpaceServiceConfig } from '../../../gql/protos/index.js';
|
2
2
|
export declare const FederatedIndexingSchema: (cfg: SubSpaceServiceConfig) => import("graphql").GraphQLSchema;
|
@@ -1,20 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
};
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
const federation_1 = require("@apollo/federation");
|
9
|
-
const schema_1 = require("./schema");
|
10
|
-
const protos_1 = require("../../../gql/protos");
|
11
|
-
const interfaces_1 = require("../interfaces");
|
12
|
-
const graphql_1 = require("graphql");
|
13
|
-
const types_1 = require("../../access-control/gql/types");
|
1
|
+
import { gql } from 'graphql-tag';
|
2
|
+
import { buildSubgraphSchema } from '@apollo/federation';
|
3
|
+
import { schema } from './schema.js';
|
4
|
+
import { generateSubServiceResolvers } from '../../../gql/protos/index.js';
|
5
|
+
import { namespace } from '../interfaces.js';
|
6
|
+
import { printSchema } from 'graphql';
|
7
|
+
import { subServices } from '../../access-control/gql/types.js';
|
14
8
|
// TODO There is currently no way of building a federated schema from GraphQLSchema Object
|
15
9
|
// See https://github.com/apollographql/apollo-server/pull/4310
|
16
|
-
const FederatedIndexingSchema = (cfg) =>
|
17
|
-
typeDefs: (
|
18
|
-
resolvers:
|
10
|
+
export const FederatedIndexingSchema = (cfg) => buildSubgraphSchema({
|
11
|
+
typeDefs: gql(printSchema(schema(cfg))),
|
12
|
+
resolvers: generateSubServiceResolvers(subServices, cfg, namespace)
|
19
13
|
});
|
20
|
-
exports.FederatedIndexingSchema = FederatedIndexingSchema;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { SubSpaceServiceConfig } from
|
1
|
+
import { type SubSpaceServiceConfig } from '../../../gql/protos/index.js';
|
2
2
|
export declare const schema: (cfg: SubSpaceServiceConfig) => import("graphql").GraphQLSchema;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql';
|
2
|
-
import { IndexingContext } from '../interfaces';
|
2
|
+
import { IndexingContext } from '../interfaces.js';
|
3
3
|
export type Maybe<T> = T | null | undefined;
|
4
4
|
export type InputMaybe<T> = T | null | undefined;
|
5
5
|
export type Exact<T extends {
|
@@ -13,17 +13,43 @@ export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
|
|
13
13
|
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
|
14
14
|
[SubKey in K]: Maybe<T[SubKey]>;
|
15
15
|
};
|
16
|
+
export type MakeEmpty<T extends {
|
17
|
+
[key: string]: unknown;
|
18
|
+
}, K extends keyof T> = {
|
19
|
+
[_ in K]?: never;
|
20
|
+
};
|
21
|
+
export type Incremental<T> = T | {
|
22
|
+
[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
|
23
|
+
};
|
16
24
|
export type RequireFields<T, K extends keyof T> = Omit<T, K> & {
|
17
25
|
[P in K]-?: NonNullable<T[P]>;
|
18
26
|
};
|
19
27
|
/** All built-in and custom scalars, mapped to their actual values */
|
20
28
|
export type Scalars = {
|
21
|
-
ID:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
29
|
+
ID: {
|
30
|
+
input: string | number;
|
31
|
+
output: string;
|
32
|
+
};
|
33
|
+
String: {
|
34
|
+
input: string;
|
35
|
+
output: string;
|
36
|
+
};
|
37
|
+
Boolean: {
|
38
|
+
input: boolean;
|
39
|
+
output: boolean;
|
40
|
+
};
|
41
|
+
Int: {
|
42
|
+
input: number;
|
43
|
+
output: number;
|
44
|
+
};
|
45
|
+
Float: {
|
46
|
+
input: number;
|
47
|
+
output: number;
|
48
|
+
};
|
49
|
+
GoogleProtobufAnyValue: {
|
50
|
+
input: any;
|
51
|
+
output: any;
|
52
|
+
};
|
27
53
|
};
|
28
54
|
export type Mutation = {
|
29
55
|
__typename?: 'Mutation';
|
@@ -50,13 +76,13 @@ export type IoRestorecommerceSearchSearchResponse = {
|
|
50
76
|
};
|
51
77
|
export type GoogleProtobufAny = {
|
52
78
|
__typename?: 'GoogleProtobufAny';
|
53
|
-
typeUrl?: Maybe<Scalars['String']>;
|
54
|
-
value?: Maybe<Scalars['GoogleProtobufAnyValue']>;
|
79
|
+
typeUrl?: Maybe<Scalars['String']['output']>;
|
80
|
+
value?: Maybe<Scalars['GoogleProtobufAnyValue']['output']>;
|
55
81
|
};
|
56
82
|
export type IIoRestorecommerceSearchSearchRequest = {
|
57
|
-
collection?: InputMaybe<Scalars['String']>;
|
58
|
-
text?: InputMaybe<Scalars['String']>;
|
59
|
-
acls?: InputMaybe<Array<Scalars['String']>>;
|
83
|
+
collection?: InputMaybe<Scalars['String']['input']>;
|
84
|
+
text?: InputMaybe<Scalars['String']['input']>;
|
85
|
+
acls?: InputMaybe<Array<Scalars['String']['input']>>;
|
60
86
|
};
|
61
87
|
export type Subscription = {
|
62
88
|
__typename?: 'Subscription';
|
@@ -83,7 +109,7 @@ export type SubscriptionFulfillmentFulfillment_ProductsArgs = {
|
|
83
109
|
};
|
84
110
|
export type SubscriptionOutput = {
|
85
111
|
__typename?: 'SubscriptionOutput';
|
86
|
-
id?: Maybe<Scalars['String']>;
|
112
|
+
id?: Maybe<Scalars['String']['output']>;
|
87
113
|
};
|
88
114
|
export declare enum SubscriptionAction {
|
89
115
|
Created = "CREATED",
|
@@ -126,13 +152,13 @@ export type ResolversTypes = ResolversObject<{
|
|
126
152
|
ProtoIoRestorecommerceSearchSearchResponse: ResolverTypeWrapper<ProtoIoRestorecommerceSearchSearchResponse>;
|
127
153
|
IoRestorecommerceSearchSearchResponse: ResolverTypeWrapper<IoRestorecommerceSearchSearchResponse>;
|
128
154
|
GoogleProtobufAny: ResolverTypeWrapper<GoogleProtobufAny>;
|
129
|
-
String: ResolverTypeWrapper<Scalars['String']>;
|
130
|
-
GoogleProtobufAnyValue: ResolverTypeWrapper<Scalars['GoogleProtobufAnyValue']>;
|
155
|
+
String: ResolverTypeWrapper<Scalars['String']['output']>;
|
156
|
+
GoogleProtobufAnyValue: ResolverTypeWrapper<Scalars['GoogleProtobufAnyValue']['output']>;
|
131
157
|
IIoRestorecommerceSearchSearchRequest: IIoRestorecommerceSearchSearchRequest;
|
132
158
|
Subscription: ResolverTypeWrapper<{}>;
|
133
159
|
SubscriptionOutput: ResolverTypeWrapper<SubscriptionOutput>;
|
134
160
|
SubscriptionAction: SubscriptionAction;
|
135
|
-
Boolean: ResolverTypeWrapper<Scalars['Boolean']>;
|
161
|
+
Boolean: ResolverTypeWrapper<Scalars['Boolean']['output']>;
|
136
162
|
}>;
|
137
163
|
/** Mapping between all available schema types and the resolvers parents */
|
138
164
|
export type ResolversParentTypes = ResolversObject<{
|
@@ -142,12 +168,12 @@ export type ResolversParentTypes = ResolversObject<{
|
|
142
168
|
ProtoIoRestorecommerceSearchSearchResponse: ProtoIoRestorecommerceSearchSearchResponse;
|
143
169
|
IoRestorecommerceSearchSearchResponse: IoRestorecommerceSearchSearchResponse;
|
144
170
|
GoogleProtobufAny: GoogleProtobufAny;
|
145
|
-
String: Scalars['String'];
|
146
|
-
GoogleProtobufAnyValue: Scalars['GoogleProtobufAnyValue'];
|
171
|
+
String: Scalars['String']['output'];
|
172
|
+
GoogleProtobufAnyValue: Scalars['GoogleProtobufAnyValue']['output'];
|
147
173
|
IIoRestorecommerceSearchSearchRequest: IIoRestorecommerceSearchSearchRequest;
|
148
174
|
Subscription: {};
|
149
175
|
SubscriptionOutput: SubscriptionOutput;
|
150
|
-
Boolean: Scalars['Boolean'];
|
176
|
+
Boolean: Scalars['Boolean']['output'];
|
151
177
|
}>;
|
152
178
|
export type MutationResolvers<ContextType = IndexingContext, ParentType extends ResolversParentTypes['Mutation'] = ResolversParentTypes['Mutation']> = ResolversObject<{
|
153
179
|
indexing?: Resolver<ResolversTypes['IndexingMutation'], ParentType, ContextType>;
|
@@ -1,9 +1,6 @@
|
|
1
|
-
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.SubscriptionAction = void 0;
|
4
|
-
var SubscriptionAction;
|
1
|
+
export var SubscriptionAction;
|
5
2
|
(function (SubscriptionAction) {
|
6
3
|
SubscriptionAction["Created"] = "CREATED";
|
7
4
|
SubscriptionAction["Updated"] = "UPDATED";
|
8
5
|
SubscriptionAction["Deleted"] = "DELETED";
|
9
|
-
})(SubscriptionAction
|
6
|
+
})(SubscriptionAction || (SubscriptionAction = {}));
|
@@ -1,9 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const
|
6
|
-
const interfaces_1 = require("../interfaces");
|
7
|
-
(0, types_1.registerTypings)();
|
8
|
-
const schema = (cfg) => (0, protos_1.generateSubServiceSchemas)(types_1.subServices, cfg, interfaces_1.namespace, 'Indexing');
|
9
|
-
exports.schema = schema;
|
1
|
+
import { registerTypings, subServices } from './types.js';
|
2
|
+
import { generateSubServiceSchemas } from '../../../gql/protos/index.js';
|
3
|
+
import { namespace } from '../interfaces.js';
|
4
|
+
registerTypings();
|
5
|
+
export const schema = (cfg) => generateSubServiceSchemas(subServices, cfg, namespace, 'Indexing');
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { ProtoMetadata } from '../../../gql/protos';
|
2
|
-
export declare function registerTypings(): void;
|
1
|
+
import { type ProtoMetadata } from '../../../gql/protos/index.js';
|
3
2
|
export declare const subServices: ProtoMetadata[];
|
3
|
+
export declare const registerTypings: () => void;
|
@@ -1,12 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
const protos_1 = require("../../../gql/protos");
|
6
|
-
function registerTypings() {
|
7
|
-
(0, protos_1.registerPackagesRecursive)(...exports.subServices);
|
8
|
-
}
|
9
|
-
exports.registerTypings = registerTypings;
|
10
|
-
exports.subServices = [
|
11
|
-
search_1.protoMetadata
|
1
|
+
import { protoMetadata } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search.js';
|
2
|
+
import { registerPackagesRecursive } from '../../../gql/protos/index.js';
|
3
|
+
export const subServices = [
|
4
|
+
protoMetadata
|
12
5
|
];
|
6
|
+
export const registerTypings = () => {
|
7
|
+
registerPackagesRecursive(...subServices);
|
8
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
-
import { SearchServiceClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search';
|
3
|
-
import { GrpcClientConfig } from '@restorecommerce/grpc-client';
|
2
|
+
import { type SearchServiceClient } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search.js';
|
3
|
+
import { type GrpcClientConfig } from '@restorecommerce/grpc-client';
|
4
4
|
export declare class IndexingSrvGrpcClient extends RestoreCommerceGrpcClient {
|
5
5
|
readonly search: SearchServiceClient;
|
6
6
|
constructor(address: string, cfg: GrpcClientConfig);
|
@@ -1,12 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
const rc_grpc_clients_1 = require("@restorecommerce/rc-grpc-clients");
|
5
|
-
const search_1 = require("@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search");
|
6
|
-
class IndexingSrvGrpcClient extends rc_grpc_clients_1.RestoreCommerceGrpcClient {
|
1
|
+
import { RestoreCommerceGrpcClient } from '@restorecommerce/rc-grpc-clients';
|
2
|
+
import { SearchServiceDefinition } from '@restorecommerce/rc-grpc-clients/dist/generated/io/restorecommerce/search.js';
|
3
|
+
export class IndexingSrvGrpcClient extends RestoreCommerceGrpcClient {
|
7
4
|
constructor(address, cfg) {
|
8
5
|
super(address, cfg);
|
9
|
-
this.search = this.createClient(cfg,
|
6
|
+
this.search = this.createClient(cfg, SearchServiceDefinition, this.channel);
|
10
7
|
}
|
11
8
|
}
|
12
|
-
exports.IndexingSrvGrpcClient = IndexingSrvGrpcClient;
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import { IndexingConfig } from
|
2
|
-
export declare const indexingModule: import("
|
1
|
+
import { type IndexingConfig } from './interfaces.js';
|
2
|
+
export declare const indexingModule: import("../../interfaces.js").FacadeModuleFactory<IndexingConfig, import("./interfaces.js").IndexingContext>;
|
@@ -1,23 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
8
|
+
});
|
9
|
+
};
|
10
|
+
import { FederatedIndexingSchema } from './gql/federation.js';
|
11
|
+
import { namespace } from './interfaces.js';
|
12
|
+
import { IndexingSrvGrpcClient } from './grpc/index.js';
|
13
|
+
import { createFacadeModuleFactory } from '../../utils.js';
|
14
|
+
export const indexingModule = createFacadeModuleFactory(namespace, (facade, config) => {
|
9
15
|
const indexing = {
|
10
|
-
client: new
|
11
|
-
...config.config.client,
|
12
|
-
logger: facade.logger,
|
13
|
-
})
|
16
|
+
client: new IndexingSrvGrpcClient(config.config.client.address, Object.assign(Object.assign({}, config.config.client), { logger: facade.logger }))
|
14
17
|
};
|
15
18
|
facade.addApolloService({
|
16
|
-
name:
|
17
|
-
schema:
|
19
|
+
name: namespace,
|
20
|
+
schema: FederatedIndexingSchema(config.config)
|
18
21
|
});
|
19
|
-
facade.koa.use(
|
22
|
+
facade.koa.use((ctx, next) => __awaiter(void 0, void 0, void 0, function* () {
|
20
23
|
ctx.indexing = indexing;
|
21
|
-
|
22
|
-
});
|
24
|
+
yield next();
|
25
|
+
}));
|
23
26
|
});
|