@things-factory/shell 8.0.2 → 8.0.8
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/config/config.development.js +1 -1
- package/config/config.production.js +1 -14
- package/dist-server/middlewares/domain-middleware.js +3 -3
- package/dist-server/middlewares/domain-middleware.js.map +1 -1
- package/dist-server/service/domain/domain-query.d.ts +4 -3
- package/dist-server/service/domain/domain-query.js +27 -15
- package/dist-server/service/domain/domain-query.js.map +1 -1
- package/dist-server/service/domain/domain-types.d.ts +2 -0
- package/dist-server/service/domain/domain-types.js +8 -0
- package/dist-server/service/domain/domain-types.js.map +1 -1
- package/dist-server/service/domain/domain.js +4 -38
- package/dist-server/service/domain/domain.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/dist-server/utils/get-domain.d.ts +3 -10
- package/dist-server/utils/get-domain.js +52 -71
- package/dist-server/utils/get-domain.js.map +1 -1
- package/dist-server/utils/get-query-builder-from-list-params.d.ts +2 -2
- package/dist-server/utils/get-query-builder-from-list-params.js +5 -5
- package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
- package/package.json +4 -4
- package/server/middlewares/domain-middleware.ts +3 -3
- package/server/service/domain/domain-query.ts +11 -4
- package/server/service/domain/domain-types.ts +6 -0
- package/server/service/domain/domain.ts +4 -39
- package/server/utils/get-domain.ts +60 -73
- package/server/utils/get-query-builder-from-list-params.ts +3 -3
@@ -1,5 +1,5 @@
|
|
1
1
|
module.exports = {
|
2
|
-
|
2
|
+
domainTypes: ['domain'],
|
3
3
|
port: 3000,
|
4
4
|
subdomainOffset: 2,
|
5
5
|
keepAliveTimeout: 65000,
|
@@ -98,19 +98,6 @@ module.exports = {
|
|
98
98
|
* }
|
99
99
|
**/
|
100
100
|
|
101
|
-
/**
|
102
|
-
* Domain Primary Colulumn Configuration
|
103
|
-
* support
|
104
|
-
* Types : "int","int2","int4","int8","integer","tinyint","smallint","mediumint","bigint",'uuid'
|
105
|
-
* Strategy = 'uuid','rowid',"increment","identity"
|
106
|
-
* by defualt use uuid auto generated id
|
107
|
-
* ie.
|
108
|
-
* domainPrimaryOption:{
|
109
|
-
* type:'int8',
|
110
|
-
* strategy:null
|
111
|
-
* }
|
112
|
-
*/
|
113
|
-
|
114
101
|
/*
|
115
102
|
* pubsub configuration
|
116
103
|
* ie.
|
@@ -8,9 +8,9 @@ async function domainMiddleware(context, next) {
|
|
8
8
|
var { domain } = context.state;
|
9
9
|
if (!domain) {
|
10
10
|
/*
|
11
|
-
* The
|
12
|
-
* For purposes such as API calls, the target
|
13
|
-
* So, we don't check
|
11
|
+
* The domainTypes should be checked only when signin and checkin.
|
12
|
+
* For purposes such as API calls, the target domainTypes may be different from the system domainTypes.
|
13
|
+
* So, we don't check domainTypes here.
|
14
14
|
*/
|
15
15
|
domain = await (0, utils_1.getDomainFromURL)(context);
|
16
16
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-middleware.js","sourceRoot":"","sources":["../../server/middlewares/domain-middleware.ts"],"names":[],"mappings":";;AAGA,4CAwDC;;AA3DD,oEAAkC;AAClC,oCAA2C;AAEpC,KAAK,UAAU,gBAAgB,CAAC,OAAY,EAAE,IAAS;IAC5D,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ;;;;WAIG;QACH,MAAM,GAAG,MAAM,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,EAAE,GAAG,oBAAS,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC7C,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;QAEnG,IAAI,KAAK,CA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AC,MAAM,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,EAAE,CAAA;AACf,CAAC","sourcesContent":["import requestIp from 'request-ip'\nimport { getDomainFromURL } from '../utils'\n\nexport async function domainMiddleware(context: any, next: any) {\n var { domain } = context.state\n if (!domain) {\n /*\n * The
|
1
|
+
{"version":3,"file":"domain-middleware.js","sourceRoot":"","sources":["../../server/middlewares/domain-middleware.ts"],"names":[],"mappings":";;AAGA,4CAwDC;;AA3DD,oEAAkC;AAClC,oCAA2C;AAEpC,KAAK,UAAU,gBAAgB,CAAC,OAAY,EAAE,IAAS;IAC5D,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;IAC9B,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ;;;;WAIG;QACH,MAAM,GAAG,MAAM,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACX,MAAM,EAAE,GAAG,oBAAS,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;QAC7C,MAAM,EAAE,SAAS,GAAG,EAAE,EAAE,SAAS,GAAG,EAAE,EAAE,aAAa,GAAG,EAAE,EAAE,UAAU,GAAG,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAA;QAEnG,IAAI,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACrD,kBAAkB;YAClB,MAAM,WAAW,GACf,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACxB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBACpB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;gBAClC,CAAC,CAAC,CAAA;YAEJ,IAAI,CAAC,WAAW,EAAE,CAAC;gBACjB,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;gBACpB,OAAM;YACR,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,WAAW,GACf,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC;gBACxB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBACpB,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;gBAClC,CAAC,CAAC,CAAA;YAEJ,IAAI,WAAW,EAAE,CAAC;gBAChB,OAAO,CAAC,MAAM,GAAG,GAAG,CAAA;gBACpB,OAAM;YACR,CAAC;QACH,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7D,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;gBACrC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YAClC,CAAC,CAAC,CAAA;YAEF,OAAO,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,IAAI,CAAA;YAE9B,IAAI,CAAC,IAAI,EAAE,CAAC;gBACV,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,UAAU,CAAA;YACjD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAA;IAE7B,OAAO,IAAI,EAAE,CAAA;AACf,CAAC","sourcesContent":["import requestIp from 'request-ip'\nimport { getDomainFromURL } from '../utils'\n\nexport async function domainMiddleware(context: any, next: any) {\n var { domain } = context.state\n if (!domain) {\n /*\n * The domainTypes should be checked only when signin and checkin.\n * For purposes such as API calls, the target domainTypes may be different from the system domainTypes.\n * So, we don't check domainTypes here.\n */\n domain = await getDomainFromURL(context)\n }\n\n if (domain) {\n const ip = requestIp.getClientIp(context.req)\n const { whitelist = [], blacklist = [], protectedlist = [], privileges = [] } = domain.iplist || {}\n\n if (Array.isArray(whitelist) && whitelist.length > 0) {\n /* whitelist 우선 */\n const whitelisted =\n Array.isArray(whitelist) &&\n whitelist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (!whitelisted) {\n context.status = 403\n return\n }\n } else {\n const blacklisted =\n Array.isArray(blacklist) &&\n blacklist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n if (blacklisted) {\n context.status = 403\n return\n }\n }\n\n if (Array.isArray(protectedlist) && protectedlist.length > 0) {\n const safe = protectedlist.some(item => {\n return new RegExp(item).test(ip)\n })\n\n context.state.unsafeIP = !safe\n\n if (!safe) {\n context.state.prohibitedPrivileges = privileges\n }\n }\n }\n\n context.state.domain = domain\n\n return next()\n}\n"]}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { ListParam } from '../common-types/list-param';
|
2
|
-
import { Domain, IPList } from './domain';
|
3
|
-
import { DomainList } from './domain-types';
|
1
|
+
import { ListParam } from '../common-types/list-param.js';
|
2
|
+
import { Domain, IPList } from './domain.js';
|
3
|
+
import { DomainList } from './domain-types.js';
|
4
4
|
export declare class DomainQuery {
|
5
|
+
domainTypes(context: any): Promise<String[]>;
|
5
6
|
domain(id: string, context: any): Promise<Domain>;
|
6
7
|
domains(params: ListParam, context: any): Promise<DomainList>;
|
7
8
|
secureIPList(context: any): Promise<IPList | null>;
|
@@ -5,18 +5,22 @@ const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
6
6
|
const database_1 = require("../../initializers/database");
|
7
7
|
const get_query_builder_from_list_params_1 = require("../../utils/get-query-builder-from-list-params");
|
8
|
-
const
|
9
|
-
const
|
10
|
-
const
|
11
|
-
const
|
8
|
+
const list_param_js_1 = require("../common-types/list-param.js");
|
9
|
+
const domain_js_1 = require("./domain.js");
|
10
|
+
const domain_types_js_1 = require("./domain-types.js");
|
11
|
+
const scalar_object_js_1 = require("../common-types/scalar-object.js");
|
12
|
+
const env_1 = require("@things-factory/env");
|
12
13
|
let DomainQuery = class DomainQuery {
|
14
|
+
async domainTypes(context) {
|
15
|
+
return env_1.config.get('domainTypes') || ['domain'];
|
16
|
+
}
|
13
17
|
async domain(id, context) {
|
14
|
-
const repository = (0, database_1.getRepository)(
|
18
|
+
const repository = (0, database_1.getRepository)(domain_js_1.Domain);
|
15
19
|
return await repository.findOneBy({ id });
|
16
20
|
}
|
17
21
|
async domains(params, context) {
|
18
22
|
const queryBuilder = await (0, get_query_builder_from_list_params_1.getQueryBuilderFromListParams)({
|
19
|
-
repository: (0, database_1.getRepository)(
|
23
|
+
repository: (0, database_1.getRepository)(domain_js_1.Domain),
|
20
24
|
alias: 'ContactPoint',
|
21
25
|
params,
|
22
26
|
searchables: ['name', 'description', 'subdomain']
|
@@ -29,13 +33,21 @@ let DomainQuery = class DomainQuery {
|
|
29
33
|
return domain.iplist;
|
30
34
|
}
|
31
35
|
async parent(domain) {
|
32
|
-
return domain.parentId && (await (0, database_1.getRepository)(
|
36
|
+
return domain.parentId && (await (0, database_1.getRepository)(domain_js_1.Domain).findOneBy({ id: domain.parentId }));
|
33
37
|
}
|
34
38
|
};
|
35
39
|
exports.DomainQuery = DomainQuery;
|
36
40
|
tslib_1.__decorate([
|
37
41
|
(0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
|
38
|
-
(0, type_graphql_1.Query)(returns =>
|
42
|
+
(0, type_graphql_1.Query)(returns => [String], { description: 'To fetch domain' }),
|
43
|
+
tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
|
44
|
+
tslib_1.__metadata("design:type", Function),
|
45
|
+
tslib_1.__metadata("design:paramtypes", [Object]),
|
46
|
+
tslib_1.__metadata("design:returntype", Promise)
|
47
|
+
], DomainQuery.prototype, "domainTypes", null);
|
48
|
+
tslib_1.__decorate([
|
49
|
+
(0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
|
50
|
+
(0, type_graphql_1.Query)(returns => domain_js_1.Domain, { description: 'To fetch domain' }),
|
39
51
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
40
52
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
41
53
|
tslib_1.__metadata("design:type", Function),
|
@@ -44,29 +56,29 @@ tslib_1.__decorate([
|
|
44
56
|
], DomainQuery.prototype, "domain", null);
|
45
57
|
tslib_1.__decorate([
|
46
58
|
(0, type_graphql_1.Directive)('@privilege(superUserGranted: true)'),
|
47
|
-
(0, type_graphql_1.Query)(returns =>
|
48
|
-
tslib_1.__param(0, (0, type_graphql_1.Args)(type =>
|
59
|
+
(0, type_graphql_1.Query)(returns => domain_types_js_1.DomainList, { description: 'To fetch all domains (Only superuser is granted this privilege.)' }),
|
60
|
+
tslib_1.__param(0, (0, type_graphql_1.Args)(type => list_param_js_1.ListParam)),
|
49
61
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
50
62
|
tslib_1.__metadata("design:type", Function),
|
51
|
-
tslib_1.__metadata("design:paramtypes", [
|
63
|
+
tslib_1.__metadata("design:paramtypes", [list_param_js_1.ListParam, Object]),
|
52
64
|
tslib_1.__metadata("design:returntype", Promise)
|
53
65
|
], DomainQuery.prototype, "domains", null);
|
54
66
|
tslib_1.__decorate([
|
55
67
|
(0, type_graphql_1.Directive)('@privilege(category: "security", privilege: "query", domainOwnerGranted: true, superUserGranted: true)'),
|
56
|
-
(0, type_graphql_1.Query)(returns =>
|
68
|
+
(0, type_graphql_1.Query)(returns => scalar_object_js_1.ScalarObject, { nullable: true, description: 'To fetch domain' }),
|
57
69
|
tslib_1.__param(0, (0, type_graphql_1.Ctx)()),
|
58
70
|
tslib_1.__metadata("design:type", Function),
|
59
71
|
tslib_1.__metadata("design:paramtypes", [Object]),
|
60
72
|
tslib_1.__metadata("design:returntype", Promise)
|
61
73
|
], DomainQuery.prototype, "secureIPList", null);
|
62
74
|
tslib_1.__decorate([
|
63
|
-
(0, type_graphql_1.FieldResolver)(type =>
|
75
|
+
(0, type_graphql_1.FieldResolver)(type => domain_js_1.Domain),
|
64
76
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
65
77
|
tslib_1.__metadata("design:type", Function),
|
66
|
-
tslib_1.__metadata("design:paramtypes", [
|
78
|
+
tslib_1.__metadata("design:paramtypes", [domain_js_1.Domain]),
|
67
79
|
tslib_1.__metadata("design:returntype", Promise)
|
68
80
|
], DomainQuery.prototype, "parent", null);
|
69
81
|
exports.DomainQuery = DomainQuery = tslib_1.__decorate([
|
70
|
-
(0, type_graphql_1.Resolver)(
|
82
|
+
(0, type_graphql_1.Resolver)(domain_js_1.Domain)
|
71
83
|
], DomainQuery);
|
72
84
|
//# sourceMappingURL=domain-query.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-query.js","sourceRoot":"","sources":["../../../server/service/domain/domain-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAwG;AAGxG,0DAA2D;AAC3D,uGAA8F;AAE9F,
|
1
|
+
{"version":3,"file":"domain-query.js","sourceRoot":"","sources":["../../../server/service/domain/domain-query.ts"],"names":[],"mappings":";;;;AAAA,+CAAwG;AAGxG,0DAA2D;AAC3D,uGAA8F;AAE9F,iEAAyD;AACzD,2CAA4C;AAC5C,uDAA8C;AAC9C,uEAA+D;AAC/D,6CAA4C;AAGrC,IAAM,WAAW,GAAjB,MAAM,WAAW;IAGhB,AAAN,KAAK,CAAC,WAAW,CAAQ,OAAY;QACnC,OAAO,YAAM,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAChD,CAAC;IAIK,AAAN,KAAK,CAAC,MAAM,CAAY,EAAU,EAAS,OAAY;QACrD,MAAM,UAAU,GAAG,IAAA,wBAAa,EAAC,kBAAM,CAAC,CAAA;QAExC,OAAO,MAAM,UAAU,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IAC3C,CAAC;IAIK,AAAN,KAAK,CAAC,OAAO,CAA0B,MAAiB,EAAS,OAAY;QAC3E,MAAM,YAAY,GAAG,MAAM,IAAA,kEAA6B,EAAC;YACvD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OAAO,CAAC,EAAE,CAAC,4BAAU,EAAE,EAAE,WAAW,EAAE,kEAAkE,EAAE,CAAC;IACnG,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,yBAAS,CAAC,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,yBAAS;;0CAWvD;AAIK;IAFL,IAAA,wBAAS,EAAC,wGAAwG,CAAC;IACnH,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,+BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;IAC/D,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;+CAGxB;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAM,CAAC;IAChB,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAS,kBAAM;;yCAElC;sBAxCU,WAAW;IADvB,IAAA,uBAAQ,EAAC,kBAAM,CAAC;GACJ,WAAW,CAyCvB","sourcesContent":["import { Arg, Args, Ctx, Directive, Mutation, Query, Resolver, FieldResolver, Root } from 'type-graphql'\nimport { In, Repository } from 'typeorm'\n\nimport { getRepository } from '../../initializers/database'\nimport { getQueryBuilderFromListParams } from '../../utils/get-query-builder-from-list-params'\n\nimport { ListParam } from '../common-types/list-param.js'\nimport { Domain, IPList } from './domain.js'\nimport { DomainList } from './domain-types.js'\nimport { ScalarObject } from '../common-types/scalar-object.js'\nimport { config } from '@things-factory/env'\n\n@Resolver(Domain)\nexport class DomainQuery {\n @Directive('@privilege(superUserGranted: true)')\n @Query(returns => [String], { description: 'To fetch domain' })\n async domainTypes(@Ctx() context: any): Promise<String[]> {\n return config.get('domainTypes') || ['domain']\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Query(returns => Domain, { description: 'To fetch domain' })\n async domain(@Arg('id') id: string, @Ctx() context: any): Promise<Domain> {\n const repository = getRepository(Domain)\n\n return await repository.findOneBy({ id })\n }\n\n @Directive('@privilege(superUserGranted: true)')\n @Query(returns => DomainList, { description: 'To fetch all domains (Only superuser is granted this privilege.)' })\n async domains(@Args(type => ListParam) params: ListParam, @Ctx() context: any): Promise<DomainList> {\n const queryBuilder = await getQueryBuilderFromListParams({\n repository: getRepository(Domain),\n alias: 'ContactPoint',\n params,\n searchables: ['name', 'description', 'subdomain']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @Directive('@privilege(category: \"security\", privilege: \"query\", domainOwnerGranted: true, superUserGranted: true)')\n @Query(returns => ScalarObject, { nullable: true, description: 'To fetch domain' })\n async secureIPList(@Ctx() context: any): Promise<IPList | null> {\n const { domain } = context.state\n return domain.iplist\n }\n\n @FieldResolver(type => Domain)\n async parent(@Root() domain: Domain): Promise<Domain> {\n return domain.parentId && (await getRepository(Domain).findOneBy({ id: domain.parentId }))\n }\n}\n"]}
|
@@ -3,6 +3,7 @@ import { ObjectRef } from '../common-types';
|
|
3
3
|
export declare class DomainInput {
|
4
4
|
name: string;
|
5
5
|
description?: string;
|
6
|
+
extType?: string;
|
6
7
|
}
|
7
8
|
export declare class DomainPatch {
|
8
9
|
id?: string;
|
@@ -16,6 +17,7 @@ export declare class DomainPatch {
|
|
16
17
|
brandName?: string;
|
17
18
|
brandImage?: string;
|
18
19
|
contentImage?: string;
|
20
|
+
extType?: string;
|
19
21
|
attributes?: any;
|
20
22
|
theme?: string;
|
21
23
|
}
|
@@ -16,6 +16,10 @@ tslib_1.__decorate([
|
|
16
16
|
(0, type_graphql_1.Field)({ nullable: true }),
|
17
17
|
tslib_1.__metadata("design:type", String)
|
18
18
|
], DomainInput.prototype, "description", void 0);
|
19
|
+
tslib_1.__decorate([
|
20
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
21
|
+
tslib_1.__metadata("design:type", String)
|
22
|
+
], DomainInput.prototype, "extType", void 0);
|
19
23
|
exports.DomainInput = DomainInput = tslib_1.__decorate([
|
20
24
|
(0, type_graphql_1.InputType)()
|
21
25
|
], DomainInput);
|
@@ -66,6 +70,10 @@ tslib_1.__decorate([
|
|
66
70
|
(0, type_graphql_1.Field)({ nullable: true }),
|
67
71
|
tslib_1.__metadata("design:type", String)
|
68
72
|
], DomainPatch.prototype, "contentImage", void 0);
|
73
|
+
tslib_1.__decorate([
|
74
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
75
|
+
tslib_1.__metadata("design:type", String)
|
76
|
+
], DomainPatch.prototype, "extType", void 0);
|
69
77
|
tslib_1.__decorate([
|
70
78
|
(0, type_graphql_1.Field)(type => common_types_1.ScalarObject, { nullable: true }),
|
71
79
|
tslib_1.__metadata("design:type", Object)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,qCAAyC;AACzC,kDAAyD;AAGlD,IAAM,WAAW,GAAjB,MAAM,WAAW;
|
1
|
+
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,qCAAyC;AACzC,kDAAyD;AAGlD,IAAM,WAAW,GAAjB,MAAM,WAAW;CASvB,CAAA;AATY,kCAAW;AAEtB;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACV;sBARL,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CASvB;AAGM,IAAM,WAAW,GAAjB,MAAM,WAAW;CA0CvB,CAAA;AA1CY,kCAAW;AAEtB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,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AAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC7B;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCAC1B;qBALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain, IPList } from './domain'\nimport { ObjectRef, ScalarObject } from '../common-types'\n\n@InputType()\nexport class DomainInput {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n extType?: string\n}\n\n@InputType()\nexport class DomainPatch {\n @Field({ nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n timezone?: string\n\n @Field({ nullable: true })\n systemFlag?: Boolean\n\n @Field({ nullable: true })\n subdomain?: string\n\n @Field({ nullable: true })\n owner?: string\n\n @Field(type => ObjectRef, { nullable: true })\n parent?: ObjectRef\n\n @Field({ nullable: true })\n brandName?: string\n\n @Field({ nullable: true })\n brandImage?: string\n\n @Field({ nullable: true })\n contentImage?: string\n\n @Field({ nullable: true })\n extType?: string\n\n @Field(type => ScalarObject, { nullable: true })\n attributes?: any\n\n @Field({ nullable: true })\n theme?: string\n}\n\n@ObjectType()\nexport class DomainList {\n @Field(type => [Domain], { nullable: true })\n items: Domain[]\n\n @Field(type => Int, { nullable: true })\n total: number\n}\n"]}
|
@@ -4,47 +4,13 @@ exports.Domain = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const typeorm_1 = require("typeorm");
|
6
6
|
const type_graphql_1 = require("type-graphql");
|
7
|
-
const
|
8
|
-
const common_types_1 = require("../common-types");
|
9
|
-
const numericTypes = ['int', 'int2', 'int4', 'int8', 'integer', 'tinyint', 'smallint', 'mediumint', 'bigint'];
|
10
|
-
const generatedStrategy = ['uuid', 'rowid', 'increment', 'identity'];
|
11
|
-
const domainPrimaryOption = env_1.config.get('domainPrimaryOption');
|
12
|
-
const domainPrimaryType = domainPrimaryOption === null || domainPrimaryOption === void 0 ? void 0 : domainPrimaryOption.type;
|
13
|
-
const domainPrimaryStrategy = domainPrimaryOption === null || domainPrimaryOption === void 0 ? void 0 : domainPrimaryOption.strategy;
|
7
|
+
const scalar_object_js_1 = require("../common-types/scalar-object.js");
|
14
8
|
let Domain = class Domain {
|
15
9
|
};
|
16
10
|
exports.Domain = Domain;
|
17
11
|
tslib_1.__decorate([
|
12
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
18
13
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
19
|
-
(0, typeorm_1.Column)(domainPrimaryOption
|
20
|
-
? {
|
21
|
-
type: domainPrimaryType,
|
22
|
-
primary: true,
|
23
|
-
transformer: {
|
24
|
-
//from(value: DatabaseType): EntityType
|
25
|
-
from: value => {
|
26
|
-
return value;
|
27
|
-
},
|
28
|
-
//to(value: EntityType): DatabaseType
|
29
|
-
to: value => {
|
30
|
-
if (!value) {
|
31
|
-
value = 0;
|
32
|
-
}
|
33
|
-
if (numericTypes.indexOf(domainPrimaryType) >= 0) {
|
34
|
-
return parseInt(value);
|
35
|
-
}
|
36
|
-
else {
|
37
|
-
return value;
|
38
|
-
}
|
39
|
-
}
|
40
|
-
},
|
41
|
-
generated: generatedStrategy.indexOf(domainPrimaryStrategy) >= 0 ? domainPrimaryStrategy : false
|
42
|
-
}
|
43
|
-
: {
|
44
|
-
type: 'uuid',
|
45
|
-
primary: true,
|
46
|
-
generated: 'uuid'
|
47
|
-
}),
|
48
14
|
tslib_1.__metadata("design:type", String)
|
49
15
|
], Domain.prototype, "id", void 0);
|
50
16
|
tslib_1.__decorate([
|
@@ -119,12 +85,12 @@ tslib_1.__decorate([
|
|
119
85
|
], Domain.prototype, "theme", void 0);
|
120
86
|
tslib_1.__decorate([
|
121
87
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
122
|
-
(0, type_graphql_1.Field)(type =>
|
88
|
+
(0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true }),
|
123
89
|
tslib_1.__metadata("design:type", Object)
|
124
90
|
], Domain.prototype, "iplist", void 0);
|
125
91
|
tslib_1.__decorate([
|
126
92
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
127
|
-
(0, type_graphql_1.Field)(type =>
|
93
|
+
(0, type_graphql_1.Field)(type => scalar_object_js_1.ScalarObject, { nullable: true }),
|
128
94
|
tslib_1.__metadata("design:type", Object)
|
129
95
|
], Domain.prototype, "attributes", void 0);
|
130
96
|
tslib_1.__decorate([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,
|
1
|
+
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":";;;;AAAA,qCAWgB;AAChB,+CAA+D;AAC/D,uEAA+D;AAkBxD,IAAM,MAAM,GAAZ,MAAM,MAAM;CAgFlB,CAAA;AAhFY,wBAAM;AAGR;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;kCACC;AAInB;IAFC,IAAA,oBAAK,GAAE;IACP,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oCACb;AAIZ;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;2CACR;AAInB;IAFC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACzB,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACZ;AAIf;IAFC,IA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CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,SAAS,CAAC,EAAE;QAC9E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;IACD,IAAA,yBAAU,GAAE;GACA,MAAM,CAgFlB","sourcesContent":["import {\n Column,\n CreateDateColumn,\n ManyToOne,\n OneToMany,\n RelationId,\n Entity,\n Index,\n UpdateDateColumn,\n DeleteDateColumn,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Directive, Field, ID } from 'type-graphql'\nimport { ScalarObject } from '../common-types/scalar-object.js'\n\nexport type IPList = {\n whitelist?: string[]\n blacklist?: string[]\n protectedlist?: string[]\n privileges?: {\n category: string\n privilege: string\n }[]\n}\n\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain, domain.deletedAt], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType()\nexport class Domain {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @Field()\n @Column({ unique: true })\n name: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n description: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n extType: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n timezone: string\n\n @Directive('@deprecated(reason: \"Use `parent`\")')\n @Field({ nullable: true })\n @Column({ default: false })\n systemFlag: boolean\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n subdomain: string\n\n @Field({ nullable: true })\n @ManyToOne(type => Domain, { nullable: true })\n parent: Domain\n\n @RelationId((domain: Domain) => domain.parent)\n parentId?: string\n\n @OneToMany(type => Domain, domain => domain.parent)\n @Field(type => Domain, { nullable: true })\n children: Domain[]\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n brandName: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n brandImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n contentImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n theme: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n iplist?: IPList\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, { nullable: true })\n attributes?: any\n\n @Field({ nullable: true })\n @CreateDateColumn()\n createdAt: Date\n\n @Field({ nullable: true })\n @UpdateDateColumn()\n updatedAt: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true })\n deletedAt?: Date\n}\n"]}
|