@things-factory/shell 5.0.7 → 5.0.11
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/db.test.sqlite +0 -0
- package/dist-server/graphql-local-client.js.map +1 -1
- package/dist-server/index.js +9 -22
- package/dist-server/index.js.map +1 -1
- package/dist-server/initializers/database.js.map +1 -1
- package/dist-server/initializers/naming-strategy.js +3 -5
- package/dist-server/initializers/naming-strategy.js.map +1 -1
- package/dist-server/middlewares/domain-middleware.js +0 -4
- package/dist-server/middlewares/domain-middleware.js.map +1 -1
- package/dist-server/middlewares/index.js +2 -17
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/1000000000000-SeedDomain.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/pubsub-log-transport.js +3 -5
- package/dist-server/pubsub-log-transport.js.map +1 -1
- package/dist-server/pubsub.js +2 -6
- package/dist-server/pubsub.js.map +1 -1
- package/dist-server/routers/domain-router.js +2 -7
- package/dist-server/routers/domain-router.js.map +1 -1
- package/dist-server/routers/global-router.js +3 -7
- package/dist-server/routers/global-router.js.map +1 -1
- package/dist-server/routers/index.js +3 -16
- package/dist-server/routers/index.js.map +1 -1
- package/dist-server/schema.js.map +1 -1
- package/dist-server/server-dev.js +11 -14
- package/dist-server/server-dev.js.map +1 -1
- package/dist-server/server.js +10 -12
- package/dist-server/server.js.map +1 -1
- package/dist-server/service/common-types/index.js +7 -20
- package/dist-server/service/common-types/index.js.map +1 -1
- package/dist-server/service/common-types/list-param.js +27 -35
- package/dist-server/service/common-types/list-param.js.map +1 -1
- package/dist-server/service/common-types/log.js +10 -18
- package/dist-server/service/common-types/log.js.map +1 -1
- package/dist-server/service/common-types/object-ref.js +8 -16
- package/dist-server/service/common-types/object-ref.js.map +1 -1
- package/dist-server/service/common-types/scalar-any.js.map +1 -1
- package/dist-server/service/common-types/scalar-date.js.map +1 -1
- package/dist-server/service/common-types/scalar-object.js.map +1 -1
- package/dist-server/service/directive-transaction/index.js +2 -15
- package/dist-server/service/directive-transaction/index.js.map +1 -1
- package/dist-server/service/directive-transaction/transaction.js +2 -7
- package/dist-server/service/directive-transaction/transaction.js.map +1 -1
- package/dist-server/service/domain/domain-resolver.js +44 -55
- package/dist-server/service/domain/domain-resolver.js.map +1 -1
- package/dist-server/service/domain/domain-types.js +32 -40
- package/dist-server/service/domain/domain-types.js.map +1 -1
- package/dist-server/service/domain/domain.js +30 -38
- package/dist-server/service/domain/domain.js.map +1 -1
- package/dist-server/service/domain/index.js.map +1 -1
- package/dist-server/service/index.js +5 -18
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/subscription-data/data-resolver.js +9 -22
- package/dist-server/service/subscription-data/data-resolver.js.map +1 -1
- package/dist-server/service/subscription-data/data-types.js +8 -17
- package/dist-server/service/subscription-data/data-types.js.map +1 -1
- package/dist-server/service/subscription-data/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/dist-server/utils/condition-builder.js +2 -4
- package/dist-server/utils/condition-builder.js.map +1 -1
- package/dist-server/utils/get-domain.js +2 -5
- package/dist-server/utils/get-domain.js.map +1 -1
- package/dist-server/utils/get-query-builder-from-list-params.js +7 -8
- package/dist-server/utils/get-query-builder-from-list-params.js.map +1 -1
- package/dist-server/utils/index.js +8 -21
- package/dist-server/utils/index.js.map +1 -1
- package/dist-server/utils/list-param-adjuster.js.map +1 -1
- package/dist-server/utils/list-params-converter.js +1 -2
- package/dist-server/utils/list-params-converter.js.map +1 -1
- package/dist-server/utils/list-query-builder.js +2 -3
- package/dist-server/utils/list-query-builder.js.map +1 -1
- package/dist-server/utils/publish-progress.js.map +1 -1
- package/dist-server/webpack/koa-webpack/client.js.map +1 -1
- package/dist-server/webpack/koa-webpack/index.js.map +1 -1
- package/dist-server/webpack/koa-webpack/middleware.js.map +1 -1
- package/dist-server/webpack/koa-webpack/validate.js.map +1 -1
- package/package.json +2 -2
- package/server/middlewares/domain-middleware.ts +0 -5
- package/server/middlewares/index.ts +0 -4
- package/server/pubsub.ts +0 -4
- package/server/routers/domain-router.ts +1 -4
- package/server/routers/global-router.ts +2 -3
- package/server/server-dev.ts +0 -2
- package/server/service/directive-transaction/transaction.ts +0 -6
- package/server/service/subscription-data/data-resolver.ts +3 -6
- package/server/service/subscription-data/data-types.ts +2 -3
- package/server/utils/get-domain.ts +4 -6
- package/server/utils/get-query-builder-from-list-params.ts +13 -9
- package/server/utils/list-params-converter.ts +4 -3
- package/server/utils/list-query-builder.ts +8 -4
@@ -1,88 +1,80 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
3
|
exports.DomainList = exports.DomainPatch = exports.DomainInput = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
14
6
|
const domain_1 = require("./domain");
|
15
7
|
let DomainInput = class DomainInput {
|
16
8
|
};
|
17
|
-
__decorate([
|
9
|
+
tslib_1.__decorate([
|
18
10
|
(0, type_graphql_1.Field)(),
|
19
|
-
__metadata("design:type", String)
|
11
|
+
tslib_1.__metadata("design:type", String)
|
20
12
|
], DomainInput.prototype, "name", void 0);
|
21
|
-
__decorate([
|
13
|
+
tslib_1.__decorate([
|
22
14
|
(0, type_graphql_1.Field)({ nullable: true }),
|
23
|
-
__metadata("design:type", String)
|
15
|
+
tslib_1.__metadata("design:type", String)
|
24
16
|
], DomainInput.prototype, "description", void 0);
|
25
|
-
DomainInput = __decorate([
|
17
|
+
DomainInput = tslib_1.__decorate([
|
26
18
|
(0, type_graphql_1.InputType)()
|
27
19
|
], DomainInput);
|
28
20
|
exports.DomainInput = DomainInput;
|
29
21
|
let DomainPatch = class DomainPatch {
|
30
22
|
};
|
31
|
-
__decorate([
|
23
|
+
tslib_1.__decorate([
|
32
24
|
(0, type_graphql_1.Field)({ nullable: true }),
|
33
|
-
__metadata("design:type", String)
|
25
|
+
tslib_1.__metadata("design:type", String)
|
34
26
|
], DomainPatch.prototype, "id", void 0);
|
35
|
-
__decorate([
|
27
|
+
tslib_1.__decorate([
|
36
28
|
(0, type_graphql_1.Field)({ nullable: true }),
|
37
|
-
__metadata("design:type", String)
|
29
|
+
tslib_1.__metadata("design:type", String)
|
38
30
|
], DomainPatch.prototype, "name", void 0);
|
39
|
-
__decorate([
|
31
|
+
tslib_1.__decorate([
|
40
32
|
(0, type_graphql_1.Field)({ nullable: true }),
|
41
|
-
__metadata("design:type", String)
|
33
|
+
tslib_1.__metadata("design:type", String)
|
42
34
|
], DomainPatch.prototype, "description", void 0);
|
43
|
-
__decorate([
|
35
|
+
tslib_1.__decorate([
|
44
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
45
|
-
__metadata("design:type", String)
|
37
|
+
tslib_1.__metadata("design:type", String)
|
46
38
|
], DomainPatch.prototype, "timezone", void 0);
|
47
|
-
__decorate([
|
39
|
+
tslib_1.__decorate([
|
48
40
|
(0, type_graphql_1.Field)({ nullable: true }),
|
49
|
-
__metadata("design:type", Boolean)
|
41
|
+
tslib_1.__metadata("design:type", Boolean)
|
50
42
|
], DomainPatch.prototype, "systemFlag", void 0);
|
51
|
-
__decorate([
|
43
|
+
tslib_1.__decorate([
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
53
|
-
__metadata("design:type", String)
|
45
|
+
tslib_1.__metadata("design:type", String)
|
54
46
|
], DomainPatch.prototype, "subdomain", void 0);
|
55
|
-
__decorate([
|
47
|
+
tslib_1.__decorate([
|
56
48
|
(0, type_graphql_1.Field)({ nullable: true }),
|
57
|
-
__metadata("design:type", String)
|
49
|
+
tslib_1.__metadata("design:type", String)
|
58
50
|
], DomainPatch.prototype, "brandName", void 0);
|
59
|
-
__decorate([
|
51
|
+
tslib_1.__decorate([
|
60
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
61
|
-
__metadata("design:type", String)
|
53
|
+
tslib_1.__metadata("design:type", String)
|
62
54
|
], DomainPatch.prototype, "brandImage", void 0);
|
63
|
-
__decorate([
|
55
|
+
tslib_1.__decorate([
|
64
56
|
(0, type_graphql_1.Field)({ nullable: true }),
|
65
|
-
__metadata("design:type", String)
|
57
|
+
tslib_1.__metadata("design:type", String)
|
66
58
|
], DomainPatch.prototype, "contentImage", void 0);
|
67
|
-
__decorate([
|
59
|
+
tslib_1.__decorate([
|
68
60
|
(0, type_graphql_1.Field)({ nullable: true }),
|
69
|
-
__metadata("design:type", String)
|
61
|
+
tslib_1.__metadata("design:type", String)
|
70
62
|
], DomainPatch.prototype, "theme", void 0);
|
71
|
-
DomainPatch = __decorate([
|
63
|
+
DomainPatch = tslib_1.__decorate([
|
72
64
|
(0, type_graphql_1.InputType)()
|
73
65
|
], DomainPatch);
|
74
66
|
exports.DomainPatch = DomainPatch;
|
75
67
|
let DomainList = class DomainList {
|
76
68
|
};
|
77
|
-
__decorate([
|
69
|
+
tslib_1.__decorate([
|
78
70
|
(0, type_graphql_1.Field)(type => [domain_1.Domain], { nullable: true }),
|
79
|
-
__metadata("design:type", Array)
|
71
|
+
tslib_1.__metadata("design:type", Array)
|
80
72
|
], DomainList.prototype, "items", void 0);
|
81
|
-
__decorate([
|
73
|
+
tslib_1.__decorate([
|
82
74
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
83
|
-
__metadata("design:type", Number)
|
75
|
+
tslib_1.__metadata("design:type", Number)
|
84
76
|
], DomainList.prototype, "total", void 0);
|
85
|
-
DomainList = __decorate([
|
77
|
+
DomainList = tslib_1.__decorate([
|
86
78
|
(0, type_graphql_1.ObjectType)()
|
87
79
|
], DomainList);
|
88
80
|
exports.DomainList = DomainList;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"domain-types.js","sourceRoot":"","sources":["../../../server/service/domain/domain-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgE;AAChE,qCAAiC;AAGjC,IAAa,WAAW,GAAxB,MAAa,WAAW;CAMvB,CAAA;AAJC;IADC,IAAA,oBAAK,GAAE;;yCACI;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AALT,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CAMvB;AANY,kCAAW;AASxB,IAAa,WAAW,GAAxB,MAAa,WAAW;CA8BvB,CAAA;AA5BC;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACf;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACb;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;gDACN;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACT;AAGjB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACb,OAAO;+CAAA;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8CACR;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;+CACP;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iDACL;AAGrB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACZ;AA7BH,WAAW;IADvB,IAAA,wBAAS,GAAE;GACC,WAAW,CA8BvB;AA9BY,kCAAW;AAiCxB,IAAa,UAAU,GAAvB,MAAa,UAAU;CAMtB,CAAA;AAJC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,eAAM,CAAC,EAAE,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;AALF,UAAU;IADtB,IAAA,yBAAU,GAAE;GACA,UAAU,CAMtB;AANY,gCAAU","sourcesContent":["import { ObjectType, InputType, Field, Int } from 'type-graphql'\nimport { Domain } from './domain'\n\n@InputType()\nexport class DomainInput {\n @Field()\n name: string\n\n @Field({ nullable: true })\n description?: 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 brandName?: string\n\n @Field({ nullable: true })\n brandImage?: string\n\n @Field({ nullable: true })\n contentImage?: string\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"]}
|
@@ -1,15 +1,7 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
3
|
exports.Domain = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
13
5
|
const typeorm_1 = require("typeorm");
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
15
7
|
const env_1 = require("@things-factory/env");
|
@@ -20,7 +12,7 @@ const domainPrimaryType = domainPrimaryOption === null || domainPrimaryOption ==
|
|
20
12
|
const domainPrimaryStrategy = domainPrimaryOption === null || domainPrimaryOption === void 0 ? void 0 : domainPrimaryOption.strategy;
|
21
13
|
let Domain = class Domain {
|
22
14
|
};
|
23
|
-
__decorate([
|
15
|
+
tslib_1.__decorate([
|
24
16
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
25
17
|
(0, typeorm_1.Column)(domainPrimaryOption ?
|
26
18
|
{
|
@@ -50,94 +42,94 @@ __decorate([
|
|
50
42
|
primary: true,
|
51
43
|
generated: 'uuid'
|
52
44
|
}),
|
53
|
-
__metadata("design:type", String)
|
45
|
+
tslib_1.__metadata("design:type", String)
|
54
46
|
], Domain.prototype, "id", void 0);
|
55
|
-
__decorate([
|
47
|
+
tslib_1.__decorate([
|
56
48
|
(0, type_graphql_1.Field)(),
|
57
49
|
(0, typeorm_1.Column)({
|
58
50
|
unique: true
|
59
51
|
}),
|
60
|
-
__metadata("design:type", String)
|
52
|
+
tslib_1.__metadata("design:type", String)
|
61
53
|
], Domain.prototype, "name", void 0);
|
62
|
-
__decorate([
|
54
|
+
tslib_1.__decorate([
|
63
55
|
(0, type_graphql_1.Field)({ nullable: true }),
|
64
56
|
(0, typeorm_1.Column)({
|
65
57
|
nullable: true
|
66
58
|
}),
|
67
|
-
__metadata("design:type", String)
|
59
|
+
tslib_1.__metadata("design:type", String)
|
68
60
|
], Domain.prototype, "description", void 0);
|
69
|
-
__decorate([
|
61
|
+
tslib_1.__decorate([
|
70
62
|
(0, type_graphql_1.Field)({ nullable: true }),
|
71
63
|
(0, typeorm_1.Column)({
|
72
64
|
nullable: true
|
73
65
|
}),
|
74
|
-
__metadata("design:type", String)
|
66
|
+
tslib_1.__metadata("design:type", String)
|
75
67
|
], Domain.prototype, "extType", void 0);
|
76
|
-
__decorate([
|
68
|
+
tslib_1.__decorate([
|
77
69
|
(0, type_graphql_1.Field)({ nullable: true }),
|
78
70
|
(0, typeorm_1.Column)({
|
79
71
|
nullable: true
|
80
72
|
}),
|
81
|
-
__metadata("design:type", String)
|
73
|
+
tslib_1.__metadata("design:type", String)
|
82
74
|
], Domain.prototype, "timezone", void 0);
|
83
|
-
__decorate([
|
75
|
+
tslib_1.__decorate([
|
84
76
|
(0, type_graphql_1.Field)({ nullable: true }),
|
85
77
|
(0, typeorm_1.Column)({
|
86
78
|
default: false
|
87
79
|
}),
|
88
|
-
__metadata("design:type", Boolean)
|
80
|
+
tslib_1.__metadata("design:type", Boolean)
|
89
81
|
], Domain.prototype, "systemFlag", void 0);
|
90
|
-
__decorate([
|
82
|
+
tslib_1.__decorate([
|
91
83
|
(0, type_graphql_1.Field)({ nullable: true }),
|
92
84
|
(0, typeorm_1.Column)({
|
93
85
|
nullable: true
|
94
86
|
}),
|
95
|
-
__metadata("design:type", String)
|
87
|
+
tslib_1.__metadata("design:type", String)
|
96
88
|
], Domain.prototype, "subdomain", void 0);
|
97
|
-
__decorate([
|
89
|
+
tslib_1.__decorate([
|
98
90
|
(0, type_graphql_1.Field)({ nullable: true }),
|
99
91
|
(0, typeorm_1.Column)({
|
100
92
|
nullable: true
|
101
93
|
}),
|
102
|
-
__metadata("design:type", String)
|
94
|
+
tslib_1.__metadata("design:type", String)
|
103
95
|
], Domain.prototype, "brandName", void 0);
|
104
|
-
__decorate([
|
96
|
+
tslib_1.__decorate([
|
105
97
|
(0, type_graphql_1.Field)({ nullable: true }),
|
106
98
|
(0, typeorm_1.Column)({
|
107
99
|
nullable: true
|
108
100
|
}),
|
109
|
-
__metadata("design:type", String)
|
101
|
+
tslib_1.__metadata("design:type", String)
|
110
102
|
], Domain.prototype, "brandImage", void 0);
|
111
|
-
__decorate([
|
103
|
+
tslib_1.__decorate([
|
112
104
|
(0, type_graphql_1.Field)({ nullable: true }),
|
113
105
|
(0, typeorm_1.Column)({
|
114
106
|
nullable: true
|
115
107
|
}),
|
116
|
-
__metadata("design:type", String)
|
108
|
+
tslib_1.__metadata("design:type", String)
|
117
109
|
], Domain.prototype, "contentImage", void 0);
|
118
|
-
__decorate([
|
110
|
+
tslib_1.__decorate([
|
119
111
|
(0, type_graphql_1.Field)({ nullable: true }),
|
120
112
|
(0, typeorm_1.Column)({ nullable: true }),
|
121
|
-
__metadata("design:type", String)
|
113
|
+
tslib_1.__metadata("design:type", String)
|
122
114
|
], Domain.prototype, "owner", void 0);
|
123
|
-
__decorate([
|
115
|
+
tslib_1.__decorate([
|
124
116
|
(0, type_graphql_1.Field)({ nullable: true }),
|
125
117
|
(0, typeorm_1.Column)({
|
126
118
|
nullable: true
|
127
119
|
}),
|
128
|
-
__metadata("design:type", String)
|
120
|
+
tslib_1.__metadata("design:type", String)
|
129
121
|
], Domain.prototype, "theme", void 0);
|
130
|
-
__decorate([
|
122
|
+
tslib_1.__decorate([
|
131
123
|
(0, type_graphql_1.Field)({ nullable: true }),
|
132
124
|
(0, typeorm_1.CreateDateColumn)(),
|
133
|
-
__metadata("design:type", Date)
|
125
|
+
tslib_1.__metadata("design:type", Date)
|
134
126
|
], Domain.prototype, "createdAt", void 0);
|
135
|
-
__decorate([
|
127
|
+
tslib_1.__decorate([
|
136
128
|
(0, type_graphql_1.Field)({ nullable: true }),
|
137
129
|
(0, typeorm_1.UpdateDateColumn)(),
|
138
|
-
__metadata("design:type", Date)
|
130
|
+
tslib_1.__metadata("design:type", Date)
|
139
131
|
], Domain.prototype, "updatedAt", void 0);
|
140
|
-
Domain = __decorate([
|
132
|
+
Domain = tslib_1.__decorate([
|
141
133
|
(0, typeorm_1.Entity)(),
|
142
134
|
(0, typeorm_1.Index)('ix_domain_0', (domain) => [domain.subdomain], { unique: true }),
|
143
135
|
(0, type_graphql_1.ObjectType)()
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"domain.js","sourceRoot":"","sources":["../../../server/service/domain/domain.ts"],"names":[],"mappings":"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","sourcesContent":["import { Column, CreateDateColumn, Entity, Index, UpdateDateColumn } from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\nimport { config } from '@things-factory/env'\n\nconst numericTypes = [\"int\",\"int2\",\"int4\",\"int8\",\"integer\",\"tinyint\",\"smallint\",\"mediumint\",\"bigint\"]\nconst generatedStrategy = ['uuid','rowid',\"increment\",\"identity\"]\nconst domainPrimaryOption =config.get('domainPrimaryOption')\nconst domainPrimaryType = domainPrimaryOption?.type\nconst domainPrimaryStrategy = domainPrimaryOption?.strategy\n\n@Entity()\n@Index('ix_domain_0', (domain: Domain) => [domain.subdomain], { unique: true })\n@ObjectType()\nexport class Domain {\n @Field(type => ID)\n @Column(\n domainPrimaryOption?\n {\n type: domainPrimaryType,\n primary:true,\n transformer: {\n //from(value: DatabaseType): EntityType\n from: (value) => {\n return value\n },\n //to(value: EntityType): DatabaseType\n to: (value) => {\n if(!value){\n value = 0\n }\n if(numericTypes.indexOf(domainPrimaryType)>=0){\n return parseInt(value)\n }else{\n return value\n }\n }\n },\n generated:generatedStrategy.indexOf(domainPrimaryStrategy)>=0?domainPrimaryStrategy:false\n }:{\n type: 'uuid',\n primary:true,\n generated:'uuid'\n }\n )\n readonly id: string\n\n @Field()\n @Column({\n unique: true\n })\n name: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n description: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n extType: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n timezone: string\n\n @Field({ nullable: true })\n @Column({\n default: false\n })\n systemFlag: boolean\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n subdomain: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandName: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n brandImage: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n contentImage: string\n\n @Field({ nullable: true })\n @Column({ nullable: true })\n owner: string\n\n @Field({ nullable: true })\n @Column({\n nullable: true\n })\n theme: string\n\n @Field({ nullable: true })\n @CreateDateColumn()\n createdAt: Date\n\n @Field({ nullable: true })\n @UpdateDateColumn()\n updatedAt: Date\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/domain/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,uDAAkD;AAErC,QAAA,QAAQ,GAAG,CAAC,eAAM,CAAC,CAAA;AACnB,QAAA,SAAS,GAAG,CAAC,gCAAc,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/domain/index.ts"],"names":[],"mappings":";;;AAAA,qCAAiC;AACjC,uDAAkD;AAErC,QAAA,QAAQ,GAAG,CAAC,eAAM,CAAC,CAAA;AACnB,QAAA,SAAS,GAAG,CAAC,gCAAc,CAAC,CAAA","sourcesContent":["import { Domain } from './domain'\nimport { DomainResolver } from './domain-resolver'\n\nexport const entities = [Domain]\nexport const resolvers = [DomainResolver]\n"]}
|
@@ -1,28 +1,15 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
-
};
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
3
|
exports.schema = exports.entities = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
18
5
|
const directive_transaction_1 = require("./directive-transaction");
|
19
6
|
const domain_1 = require("./domain");
|
20
7
|
const subscription_data_1 = require("./subscription-data");
|
21
|
-
__exportStar(require("./common-types"), exports);
|
22
|
-
__exportStar(require("./domain/domain"), exports);
|
8
|
+
tslib_1.__exportStar(require("./common-types"), exports);
|
9
|
+
tslib_1.__exportStar(require("./domain/domain"), exports);
|
23
10
|
/* EXPORT TYPES */
|
24
|
-
__exportStar(require("./domain/domain-types"), exports);
|
25
|
-
__exportStar(require("./subscription-data/data-types"), exports);
|
11
|
+
tslib_1.__exportStar(require("./domain/domain-types"), exports);
|
12
|
+
tslib_1.__exportStar(require("./subscription-data/data-types"), exports);
|
26
13
|
exports.entities = [
|
27
14
|
/* Entities */
|
28
15
|
...domain_1.entities,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../server/service/index.ts"],"names":[],"mappings":";;;;AAAA,mEAAoG;AACpG,qCAKiB;AACjB,2DAA4E;AAE5E,yDAA8B;AAC9B,0DAA+B;AAE/B,kBAAkB;AAClB,gEAAqC;AACrC,yEAA8C;AAEjC,QAAA,QAAQ,GAAG;IACtB,cAAc;IACd,GAAG,iBAAY;IACf,GAAG,iBAAc;CAClB,CAAA;AACY,QAAA,MAAM,GAAG;IACpB,QAAQ,EAAE;QACR,4BAA4B,EAA5B,oDAA4B;KAC7B;IACD,eAAe,EAAE;QACf,eAAe;QACf,GAAG,kBAAa;QAChB,GAAG,kBAAe;QAClB,GAAG,6BAAyB;KAC7B;IACD,UAAU,EAAE;QACV,WAAW,EAAE,oDAA4B;KAC1C;CACF,CAAA","sourcesContent":["import { transactionDirectiveResolver, transactionDirectiveTypeDefs } from './directive-transaction'\nimport {\n entities as DataEntities,\n entities as DomainEntities,\n resolvers as DataResolvers,\n resolvers as DomainResolvers\n} from './domain'\nimport { resolvers as SubscriptionDataResolvers } from './subscription-data'\n\nexport * from './common-types'\nexport * from './domain/domain'\n\n/* EXPORT TYPES */\nexport * from './domain/domain-types'\nexport * from './subscription-data/data-types'\n\nexport const entities = [\n /* Entities */\n ...DataEntities,\n ...DomainEntities\n]\nexport const schema = {\n typeDefs: {\n transactionDirectiveTypeDefs\n },\n resolverClasses: [\n /* Resolvers */\n ...DataResolvers,\n ...DomainResolvers,\n ...SubscriptionDataResolvers\n ],\n directives: {\n transaction: transactionDirectiveResolver\n }\n}\n"]}
|
@@ -1,36 +1,23 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
13
|
-
};
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
3
|
exports.DataResolver = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
5
|
+
const graphql_subscriptions_1 = require("graphql-subscriptions");
|
16
6
|
const type_graphql_1 = require("type-graphql");
|
17
7
|
const pubsub_1 = require("../../pubsub");
|
18
|
-
const graphql_subscriptions_1 = require("graphql-subscriptions");
|
19
8
|
const data_types_1 = require("./data-types");
|
20
|
-
const debug = require('debug')('things-factory:shell:data-subscription');
|
21
9
|
let DataResolver = class DataResolver {
|
22
10
|
data(payload, tag) {
|
23
11
|
return payload.data;
|
24
12
|
}
|
25
13
|
};
|
26
|
-
__decorate([
|
14
|
+
tslib_1.__decorate([
|
27
15
|
(0, type_graphql_1.Subscription)({
|
28
16
|
subscribe: (_, args, context, info) => {
|
29
17
|
var _a;
|
30
18
|
const { domain, user } = context.state;
|
31
19
|
const { tag } = args;
|
32
20
|
const subdomain = domain === null || domain === void 0 ? void 0 : domain.subdomain;
|
33
|
-
debug('subscribe', subdomain, tag);
|
34
21
|
if (!domain || !tag) {
|
35
22
|
throw new Error('domain and tag required');
|
36
23
|
}
|
@@ -49,13 +36,13 @@ __decorate([
|
|
49
36
|
})(_, args, context, info);
|
50
37
|
}
|
51
38
|
}),
|
52
|
-
__param(0, (0, type_graphql_1.Root)()),
|
53
|
-
__param(1, (0, type_graphql_1.Arg)('tag')),
|
54
|
-
__metadata("design:type", Function),
|
55
|
-
__metadata("design:paramtypes", [Object, String]),
|
56
|
-
__metadata("design:returntype", data_types_1.Data)
|
39
|
+
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
40
|
+
tslib_1.__param(1, (0, type_graphql_1.Arg)('tag')),
|
41
|
+
tslib_1.__metadata("design:type", Function),
|
42
|
+
tslib_1.__metadata("design:paramtypes", [Object, String]),
|
43
|
+
tslib_1.__metadata("design:returntype", data_types_1.Data)
|
57
44
|
], DataResolver.prototype, "data", null);
|
58
|
-
DataResolver = __decorate([
|
45
|
+
DataResolver = tslib_1.__decorate([
|
59
46
|
(0, type_graphql_1.Resolver)()
|
60
47
|
], DataResolver);
|
61
48
|
exports.DataResolver = DataResolver;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-resolver.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"data-resolver.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-resolver.ts"],"names":[],"mappings":";;;;AAAA,iEAAkD;AAClD,+CAAgE;AAEhE,yCAAqC;AACrC,6CAAmC;AAGnC,IAAa,YAAY,GAAzB,MAAa,YAAY;IAiCvB,IAAI,CAAS,OAAuB,EAAc,GAAW;QAC3D,OAAO,OAAO,CAAC,IAAI,CAAA;IACrB,CAAC;CACF,CAAA;AAHC;IAhCC,IAAA,2BAAY,EAAC;QACZ,SAAS,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;;YACpC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;YACtC,MAAM,EAAE,GAAG,EAAE,GAAG,IAAI,CAAA;YACpB,MAAM,SAAS,GAAG,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,SAAS,CAAA;YAEnC,IAAI,CAAC,MAAM,IAAI,CAAC,GAAG,EAAE;gBACnB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAA;aAC3C;YAED,IAAI,CAAC,CAAA,MAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAA,EAAE;gBACvD,MAAM,IAAI,KAAK,CAAC,UAAU,SAAS,6BAA6B,IAAI,CAAC,KAAK,IAAI,CAAC,CAAA;aAChF;YAED,OAAO,IAAA,kCAAU,EACf,GAAG,EAAE,CAAC,eAAM,CAAC,aAAa,CAAC,MAAM,CAAC,EAClC,CAAC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE;gBACpC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAA;gBAE7C,IAAI,GAAG,KAAK,SAAS,CAAC,GAAG,EAAE;oBACzB,OAAO,KAAK,CAAA;iBACb;gBAED,IAAI,SAAS,MAAK,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,SAAS,CAAA,EAAE;oBACpC,OAAO,KAAK,CAAA;iBACb;gBAED,OAAO,IAAI,CAAA;YACb,CAAC,CACF,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,CAAC,CAAA;QAC3B,CAAC;KACF,CAAC;IACI,mBAAA,IAAA,mBAAI,GAAE,CAAA;IAA2B,mBAAA,IAAA,kBAAG,EAAC,KAAK,CAAC,CAAA;;;4CAAe,iBAAI;wCAEnE;AAnCU,YAAY;IADxB,IAAA,uBAAQ,GAAE;GACE,YAAY,CAoCxB;AApCY,oCAAY","sourcesContent":["import { withFilter } from 'graphql-subscriptions'\nimport { Arg, Resolver, Root, Subscription } from 'type-graphql'\n\nimport { pubsub } from '../../pubsub'\nimport { Data } from './data-types'\n\n@Resolver()\nexport class DataResolver {\n @Subscription({\n subscribe: (_, args, context, info) => {\n const { domain, user } = context.state\n const { tag } = args\n const subdomain = domain?.subdomain\n\n if (!domain || !tag) {\n throw new Error('domain and tag required')\n }\n\n if (!user.domains?.find(d => d.subdomain === subdomain)) {\n throw new Error(`domain(${subdomain}) is not working for user(${user.email}).`)\n }\n\n return withFilter(\n () => pubsub.asyncIterator('data'),\n (payload, variables, context, info) => {\n const { domain: pdomain, tag } = payload.data\n\n if (tag !== variables.tag) {\n return false\n }\n\n if (subdomain !== pdomain?.subdomain) {\n return false\n }\n\n return true\n }\n )(_, args, context, info)\n }\n })\n data(@Root() payload: { data: Data }, @Arg('tag') tag: string): Data {\n return payload.data\n }\n}\n"]}
|
@@ -1,34 +1,25 @@
|
|
1
1
|
"use strict";
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
7
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
3
|
exports.Data = void 0;
|
4
|
+
const tslib_1 = require("tslib");
|
13
5
|
const type_graphql_1 = require("type-graphql");
|
14
6
|
const scalar_object_1 = require("../common-types/scalar-object");
|
15
7
|
const domain_1 = require("../domain/domain");
|
16
|
-
const debug = require('debug')('things-factory:integraton-base:subscribe-data');
|
17
8
|
let Data = class Data {
|
18
9
|
};
|
19
|
-
__decorate([
|
10
|
+
tslib_1.__decorate([
|
20
11
|
(0, type_graphql_1.Field)(type => domain_1.Domain, { nullable: true, description: 'The domain where the data originated' }),
|
21
|
-
__metadata("design:type", domain_1.Domain)
|
12
|
+
tslib_1.__metadata("design:type", domain_1.Domain)
|
22
13
|
], Data.prototype, "domain", void 0);
|
23
|
-
__decorate([
|
14
|
+
tslib_1.__decorate([
|
24
15
|
(0, type_graphql_1.Field)({ description: 'Tag name attached to data' }),
|
25
|
-
__metadata("design:type", String)
|
16
|
+
tslib_1.__metadata("design:type", String)
|
26
17
|
], Data.prototype, "tag", void 0);
|
27
|
-
__decorate([
|
18
|
+
tslib_1.__decorate([
|
28
19
|
(0, type_graphql_1.Field)(type => scalar_object_1.ScalarObject, { nullable: true, description: 'Data delivered by subscription' }),
|
29
|
-
__metadata("design:type", Object)
|
20
|
+
tslib_1.__metadata("design:type", Object)
|
30
21
|
], Data.prototype, "data", void 0);
|
31
|
-
Data = __decorate([
|
22
|
+
Data = tslib_1.__decorate([
|
32
23
|
(0, type_graphql_1.ObjectType)()
|
33
24
|
], Data);
|
34
25
|
exports.Data = Data;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"data-types.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"data-types.js","sourceRoot":"","sources":["../../../server/service/subscription-data/data-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAgD;AAEhD,iEAA4D;AAC5D,6CAAyC;AAGzC,IAAa,IAAI,GAAjB,MAAa,IAAI;CAShB,CAAA;AAPC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,eAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;sCACtF,eAAM;oCAAA;AAGf;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;;iCACzC;AAGX;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,4BAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;sCACxF,MAAM;kCAAA;AARF,IAAI;IADhB,IAAA,yBAAU,GAAE;GACA,IAAI,CAShB;AATY,oBAAI","sourcesContent":["import { Field, ObjectType } from 'type-graphql'\n\nimport { ScalarObject } from '../common-types/scalar-object'\nimport { Domain } from '../domain/domain'\n\n@ObjectType()\nexport class Data {\n @Field(type => Domain, { nullable: true, description: 'The domain where the data originated' })\n domain?: Domain\n\n @Field({ description: 'Tag name attached to data' })\n tag: string\n\n @Field(type => ScalarObject, { nullable: true, description: 'Data delivered by subscription' })\n data?: Object\n}\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/subscription-data/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,SAAS,GAAG,CAAC,4BAAY,CAAC,CAAA"}
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/subscription-data/index.ts"],"names":[],"mappings":";;;AAAA,mDAA8C;AAEjC,QAAA,QAAQ,GAAG,EAAE,CAAA;AACb,QAAA,SAAS,GAAG,CAAC,4BAAY,CAAC,CAAA","sourcesContent":["import { DataResolver } from './data-resolver'\n\nexport const entities = []\nexport const resolvers = [DataResolver]\n"]}
|