@things-factory/operato-board 5.0.0-alpha.45 → 5.0.0-alpha.48
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.development.js +15 -1
- package/dist-server/service/board-secret/board-resolver.js +6 -9
- package/dist-server/service/board-secret/board-resolver.js.map +1 -1
- package/dist-server/subscribers/board-subscriber.js +4 -7
- package/dist-server/subscribers/board-subscriber.js.map +1 -1
- package/package.json +43 -43
- package/server/service/board-secret/board-resolver.ts +9 -7
- package/server/subscribers/board-subscriber.ts +8 -6
package/config.development.js
CHANGED
|
@@ -8,5 +8,19 @@ module.exports = {
|
|
|
8
8
|
secretAccessKey: 'n14c8n42prH68oizEIrLbf50I5Edx3RZtU73jkrN',
|
|
9
9
|
bucketName: 'aidoop-r',
|
|
10
10
|
region: 'ap-northeast-2'
|
|
11
|
-
}
|
|
11
|
+
},
|
|
12
|
+
email: {
|
|
13
|
+
host: 'smtp.office365.com', // your sender-email smtp host
|
|
14
|
+
port: 587, // smtp server port
|
|
15
|
+
secure: false, // true for 465, false for other ports
|
|
16
|
+
auth: {
|
|
17
|
+
user: 'noreply@hatiolab.com',
|
|
18
|
+
pass: 'h@ti0LAB1008' // generated ethereal password
|
|
19
|
+
},
|
|
20
|
+
secureConnection: false,
|
|
21
|
+
tls: {
|
|
22
|
+
ciphers: 'SSLv3'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
googleFontAPIKey: 'AIzaSyAdNzZGpGL_kh4jWwFwaXP4o0bObFIfCZQ'
|
|
12
26
|
}
|
|
@@ -11,19 +11,16 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
11
11
|
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
12
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
13
|
};
|
|
14
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
15
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
16
|
-
};
|
|
17
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
15
|
exports.BoardResolver = void 0;
|
|
19
16
|
const type_graphql_1 = require("type-graphql");
|
|
20
17
|
const typeorm_1 = require("typeorm");
|
|
21
|
-
const operato_license_checker_1 = require("@things-factory/operato-license-checker");
|
|
22
18
|
const board_service_1 = require("@things-factory/board-service");
|
|
23
|
-
const
|
|
24
|
-
const domain_secret_1 = require("../domain-secret/domain-secret");
|
|
19
|
+
const operato_license_checker_1 = require("@things-factory/operato-license-checker");
|
|
25
20
|
const license_error_1 = require("../../errors/license-error");
|
|
26
|
-
const
|
|
21
|
+
const domain_secret_1 = require("../domain-secret/domain-secret");
|
|
22
|
+
const board_secret_1 = require("./board-secret");
|
|
23
|
+
const crypto = require('crypto');
|
|
27
24
|
const debug = require('debug')('things-factory:operato-board:board-resolver');
|
|
28
25
|
let BoardResolver = class BoardResolver {
|
|
29
26
|
async board(id, context) {
|
|
@@ -51,7 +48,7 @@ let BoardResolver = class BoardResolver {
|
|
|
51
48
|
// 2. if there's no domainSecret then create it
|
|
52
49
|
if (!domainSecret) {
|
|
53
50
|
var domainSecret = new domain_secret_1.DomainSecret();
|
|
54
|
-
domainSecret.id =
|
|
51
|
+
domainSecret.id = crypto.randomUUID();
|
|
55
52
|
domainSecret.domain = domain;
|
|
56
53
|
var hash = (0, operato_license_checker_1.doSomething)({ secId: domainSecret.id, id: domain.id });
|
|
57
54
|
domainSecret.secret = hash;
|
|
@@ -99,7 +96,7 @@ let BoardResolver = class BoardResolver {
|
|
|
99
96
|
// 2. if there's no boardSecret then create it
|
|
100
97
|
if (!boardSecret) {
|
|
101
98
|
var boardSecret = new board_secret_1.BoardSecret();
|
|
102
|
-
boardSecret.id =
|
|
99
|
+
boardSecret.id = crypto.randomUUID();
|
|
103
100
|
boardSecret.targetId = id;
|
|
104
101
|
boardSecret.targetType = 'board';
|
|
105
102
|
boardSecret.domain = domain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-resolver.js","sourceRoot":"","sources":["../../../server/service/board-secret/board-resolver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"board-resolver.js","sourceRoot":"","sources":["../../../server/service/board-secret/board-resolver.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAwD;AACxD,qCAAuC;AAEvC,iEAAqD;AACrD,qFAAkF;AAElF,8DAAyD;AACzD,kEAA6D;AAC7D,iDAA4C;AAE5C,MAAM,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;AAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,6CAA6C,CAAC,CAAA;AAG7E,IAAa,aAAa,GAA1B,MAAa,aAAa;IAExB,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAY;QACpD,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,IAAI,KAAK,GAAG,MAAM,IAAA,uBAAa,EAAC,qBAAK,CAAC,CAAC,OAAO,CAAC;YAC7C,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;SACtB,CAAC,CAAA;QACF,IAAI,MAAM,EAAE;YACV,sDAAsD;YACtD,IAAI,KAAK,GACP,CAAC,MAAM,IAAA,uBAAa,EAAC,4BAAY,CAAC;iBAC/B,OAAO,CAAC,kBAAkB,EAAE;iBAC5B,MAAM,CAAC,OAAO,CAAC;iBACf,IAAI,CAAC,4BAAY,EAAE,QAAQ,CAAC;iBAC5B,KAAK,CAAC,gBAAgB,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC;iBAChD,QAAQ,EAAE,CAAC,GAAG,CAAC,CAAA;YAEpB,IAAI,CAAC,IAAA,qCAAW,EAAC,KAAK,CAAC,EAAE;gBACvB,MAAM,IAAI,4BAAY,CAAC;oBACrB,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,4BAAY,CAAC,WAAW,CAAC,UAAU,CAAC;iBAC1D,CA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17 +5,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
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
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.BoardSubscriber = void 0;
|
|
13
10
|
const typeorm_1 = require("typeorm");
|
|
14
11
|
const board_service_1 = require("@things-factory/board-service");
|
|
15
|
-
const board_secret_1 = require("../service/board-secret/board-secret");
|
|
16
|
-
const license_error_1 = require("../errors/license-error");
|
|
17
12
|
const operato_license_checker_1 = require("@things-factory/operato-license-checker");
|
|
18
|
-
const
|
|
13
|
+
const license_error_1 = require("../errors/license-error");
|
|
14
|
+
const board_secret_1 = require("../service/board-secret/board-secret");
|
|
15
|
+
const crypto = require('crypto');
|
|
19
16
|
let BoardSubscriber = class BoardSubscriber {
|
|
20
17
|
listenTo() {
|
|
21
18
|
return board_service_1.Board;
|
|
@@ -40,7 +37,7 @@ let BoardSubscriber = class BoardSubscriber {
|
|
|
40
37
|
if ((0, operato_license_checker_1.checkTarget)(count)) {
|
|
41
38
|
var board = event.entity;
|
|
42
39
|
var boardSecret = new board_secret_1.BoardSecret();
|
|
43
|
-
boardSecret.id =
|
|
40
|
+
boardSecret.id = crypto.randomUUID();
|
|
44
41
|
boardSecret.targetId = board.id;
|
|
45
42
|
boardSecret.targetType = 'board';
|
|
46
43
|
boardSecret.domain = board.domain;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-subscriber.js","sourceRoot":"","sources":["../../server/subscribers/board-subscriber.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"board-subscriber.js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AA,qCAAW,EAAC,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAA;gBAC/D,WAAW,CAAC,MAAM,GAAG,IAAI,CAAA;gBAEzB,MAAM,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;aACtC;iBAAM;gBACL,MAAM,IAAI,4BAAY,CAAC;oBACrB,SAAS,EAAE,4BAAY,CAAC,WAAW,CAAC,UAAU;iBAC/C,CAAC,CAAA;aACH;SACF;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,WAAW,CAAC,KAAyB;QACzC,IAAI,aAAa,GAAG,KAAK,CAAC,OAAO,CAAA;QACjC,MAAM,aAAa,CAAC,KAAK,CACvB;;2DAEqD,CACtD,CAAA;IACH,CAAC;CACF,CAAA;AAtDY,eAAe;IAD3B,IAAA,yBAAe,GAAE;GACL,eAAe,CAsD3B;AAtDY,0CAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/operato-board",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.48",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"docker:push:cn": "docker image push hatiolab/operato-board:latest-cn && docker image push hatiolab/operato-board:$npm_package_version-cn"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@operato/attachment": "1.0.0-beta.
|
|
46
|
-
"@operato/font": "1.0.0-beta.
|
|
47
|
-
"@operato/graphql": "1.0.0-beta.
|
|
48
|
-
"@operato/help": "1.0.0-beta.
|
|
49
|
-
"@operato/i18n": "1.0.0-beta.
|
|
50
|
-
"@operato/layout": "1.0.0-beta.
|
|
51
|
-
"@operato/pull-to-refresh": "1.0.0-beta.
|
|
45
|
+
"@operato/attachment": "1.0.0-beta.18",
|
|
46
|
+
"@operato/font": "1.0.0-beta.18",
|
|
47
|
+
"@operato/graphql": "1.0.0-beta.18",
|
|
48
|
+
"@operato/help": "1.0.0-beta.18",
|
|
49
|
+
"@operato/i18n": "1.0.0-beta.18",
|
|
50
|
+
"@operato/layout": "1.0.0-beta.18",
|
|
51
|
+
"@operato/pull-to-refresh": "1.0.0-beta.18",
|
|
52
52
|
"@operato/scene-chartjs": "^1.0.0-alpha.16",
|
|
53
53
|
"@operato/scene-clock": "^1.0.0-alpha.16",
|
|
54
54
|
"@operato/scene-clone": "^1.0.0-alpha.16",
|
|
@@ -76,44 +76,44 @@
|
|
|
76
76
|
"@operato/scene-table": "^1.0.0-alpha.16",
|
|
77
77
|
"@operato/scene-timer": "^1.0.0-alpha.16",
|
|
78
78
|
"@operato/scene-wheel-sorter": "^1.0.0-alpha.16",
|
|
79
|
-
"@operato/shell": "1.0.0-beta.
|
|
80
|
-
"@operato/styles": "1.0.0-beta.
|
|
81
|
-
"@operato/utils": "1.0.0-beta.
|
|
82
|
-
"@things-factory/apptool-ui": "^5.0.0-alpha.
|
|
83
|
-
"@things-factory/attachment-ui": "^5.0.0-alpha.
|
|
84
|
-
"@things-factory/auth-ui": "^5.0.0-alpha.
|
|
85
|
-
"@things-factory/board-service": "^5.0.0-alpha.
|
|
86
|
-
"@things-factory/board-ui": "^5.0.0-alpha.
|
|
87
|
-
"@things-factory/context-ui": "^5.0.0-alpha.
|
|
88
|
-
"@things-factory/export-ui": "^5.0.0-alpha.
|
|
89
|
-
"@things-factory/fav-base": "^5.0.0-alpha.
|
|
90
|
-
"@things-factory/font-base": "^5.0.0-alpha.
|
|
91
|
-
"@things-factory/form-ui": "^5.0.0-alpha.
|
|
92
|
-
"@things-factory/help": "^5.0.0-alpha.
|
|
93
|
-
"@things-factory/i18n-base": "^5.0.0-alpha.
|
|
94
|
-
"@things-factory/import-ui": "^5.0.0-alpha.
|
|
95
|
-
"@things-factory/integration-notification": "^5.0.0-alpha.
|
|
96
|
-
"@things-factory/integration-ui": "^5.0.0-alpha.
|
|
97
|
-
"@things-factory/layout-ui": "^5.0.0-alpha.
|
|
98
|
-
"@things-factory/more-ui": "^5.0.0-alpha.
|
|
99
|
-
"@things-factory/notification": "^5.0.0-alpha.
|
|
100
|
-
"@things-factory/oauth2-client": "^5.0.0-alpha.
|
|
101
|
-
"@things-factory/offline-ui": "^5.0.0-alpha.
|
|
79
|
+
"@operato/shell": "1.0.0-beta.18",
|
|
80
|
+
"@operato/styles": "1.0.0-beta.18",
|
|
81
|
+
"@operato/utils": "1.0.0-beta.18",
|
|
82
|
+
"@things-factory/apptool-ui": "^5.0.0-alpha.48",
|
|
83
|
+
"@things-factory/attachment-ui": "^5.0.0-alpha.48",
|
|
84
|
+
"@things-factory/auth-ui": "^5.0.0-alpha.48",
|
|
85
|
+
"@things-factory/board-service": "^5.0.0-alpha.48",
|
|
86
|
+
"@things-factory/board-ui": "^5.0.0-alpha.48",
|
|
87
|
+
"@things-factory/context-ui": "^5.0.0-alpha.48",
|
|
88
|
+
"@things-factory/export-ui": "^5.0.0-alpha.48",
|
|
89
|
+
"@things-factory/fav-base": "^5.0.0-alpha.48",
|
|
90
|
+
"@things-factory/font-base": "^5.0.0-alpha.48",
|
|
91
|
+
"@things-factory/form-ui": "^5.0.0-alpha.48",
|
|
92
|
+
"@things-factory/help": "^5.0.0-alpha.48",
|
|
93
|
+
"@things-factory/i18n-base": "^5.0.0-alpha.48",
|
|
94
|
+
"@things-factory/import-ui": "^5.0.0-alpha.48",
|
|
95
|
+
"@things-factory/integration-notification": "^5.0.0-alpha.48",
|
|
96
|
+
"@things-factory/integration-ui": "^5.0.0-alpha.48",
|
|
97
|
+
"@things-factory/layout-ui": "^5.0.0-alpha.48",
|
|
98
|
+
"@things-factory/more-ui": "^5.0.0-alpha.48",
|
|
99
|
+
"@things-factory/notification": "^5.0.0-alpha.48",
|
|
100
|
+
"@things-factory/oauth2-client": "^5.0.0-alpha.48",
|
|
101
|
+
"@things-factory/offline-ui": "^5.0.0-alpha.48",
|
|
102
102
|
"@things-factory/operato-license-checker": "^3.0.4",
|
|
103
|
-
"@things-factory/pdf": "^5.0.0-alpha.
|
|
104
|
-
"@things-factory/print-service": "^5.0.0-alpha.
|
|
105
|
-
"@things-factory/print-ui": "^5.0.0-alpha.
|
|
106
|
-
"@things-factory/resource-ui": "^5.0.0-alpha.
|
|
107
|
-
"@things-factory/scene-google-map": "^5.0.0-alpha.
|
|
108
|
-
"@things-factory/scene-visualizer": "^5.0.0-alpha.
|
|
109
|
-
"@things-factory/screencast-ui": "^5.0.0-alpha.
|
|
110
|
-
"@things-factory/setting-ui": "^5.0.0-alpha.
|
|
111
|
-
"@things-factory/system-ui": "^5.0.0-alpha.
|
|
103
|
+
"@things-factory/pdf": "^5.0.0-alpha.48",
|
|
104
|
+
"@things-factory/print-service": "^5.0.0-alpha.48",
|
|
105
|
+
"@things-factory/print-ui": "^5.0.0-alpha.48",
|
|
106
|
+
"@things-factory/resource-ui": "^5.0.0-alpha.48",
|
|
107
|
+
"@things-factory/scene-google-map": "^5.0.0-alpha.48",
|
|
108
|
+
"@things-factory/scene-visualizer": "^5.0.0-alpha.48",
|
|
109
|
+
"@things-factory/screencast-ui": "^5.0.0-alpha.48",
|
|
110
|
+
"@things-factory/setting-ui": "^5.0.0-alpha.48",
|
|
111
|
+
"@things-factory/system-ui": "^5.0.0-alpha.48"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
|
-
"@things-factory/board-test": "^5.0.0-alpha.
|
|
115
|
-
"@things-factory/builder": "^5.0.0-alpha.
|
|
114
|
+
"@things-factory/board-test": "^5.0.0-alpha.48",
|
|
115
|
+
"@things-factory/builder": "^5.0.0-alpha.48"
|
|
116
116
|
},
|
|
117
117
|
"resolutions": {},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "0fa9b26abce176fa96d820fb50cc5565760d50c9"
|
|
119
119
|
}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Arg, Ctx, Query, Resolver } from 'type-graphql'
|
|
2
2
|
import { getRepository } from 'typeorm'
|
|
3
|
-
|
|
3
|
+
|
|
4
4
|
import { Board } from '@things-factory/board-service'
|
|
5
|
-
import {
|
|
6
|
-
|
|
5
|
+
import { checkTarget, doSomething } from '@things-factory/operato-license-checker'
|
|
6
|
+
|
|
7
7
|
import { LicenseError } from '../../errors/license-error'
|
|
8
|
+
import { DomainSecret } from '../domain-secret/domain-secret'
|
|
9
|
+
import { BoardSecret } from './board-secret'
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
const crypto = require('crypto')
|
|
10
12
|
|
|
11
13
|
const debug = require('debug')('things-factory:operato-board:board-resolver')
|
|
12
14
|
|
|
@@ -40,7 +42,7 @@ export class BoardResolver {
|
|
|
40
42
|
// 2. if there's no domainSecret then create it
|
|
41
43
|
if (!domainSecret) {
|
|
42
44
|
var domainSecret: DomainSecret = new DomainSecret()
|
|
43
|
-
domainSecret.id =
|
|
45
|
+
domainSecret.id = crypto.randomUUID()
|
|
44
46
|
domainSecret.domain = domain
|
|
45
47
|
var hash = doSomething({ secId: domainSecret.id, id: domain.id })
|
|
46
48
|
domainSecret.secret = hash
|
|
@@ -88,7 +90,7 @@ export class BoardResolver {
|
|
|
88
90
|
// 2. if there's no boardSecret then create it
|
|
89
91
|
if (!boardSecret) {
|
|
90
92
|
var boardSecret: BoardSecret = new BoardSecret()
|
|
91
|
-
boardSecret.id =
|
|
93
|
+
boardSecret.id = crypto.randomUUID()
|
|
92
94
|
boardSecret.targetId = id
|
|
93
95
|
boardSecret.targetType = 'board'
|
|
94
96
|
boardSecret.domain = domain
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { EntitySubscriberInterface, EventSubscriber, InsertEvent,
|
|
1
|
+
import { EntitySubscriberInterface, EventSubscriber, InsertEvent, RemoveEvent } from 'typeorm'
|
|
2
|
+
|
|
2
3
|
import { Board } from '@things-factory/board-service'
|
|
3
|
-
import {
|
|
4
|
+
import { checkTarget, doSomething, getVality } from '@things-factory/operato-license-checker'
|
|
5
|
+
|
|
4
6
|
import { LicenseError } from '../errors/license-error'
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
import { BoardSecret } from '../service/board-secret/board-secret'
|
|
8
|
+
|
|
9
|
+
const crypto = require('crypto')
|
|
8
10
|
|
|
9
11
|
@EventSubscriber()
|
|
10
12
|
export class BoardSubscriber implements EntitySubscriberInterface<Board> {
|
|
@@ -33,7 +35,7 @@ export class BoardSubscriber implements EntitySubscriberInterface<Board> {
|
|
|
33
35
|
if (checkTarget(count)) {
|
|
34
36
|
var board: Board = event.entity
|
|
35
37
|
var boardSecret: BoardSecret = new BoardSecret()
|
|
36
|
-
boardSecret.id =
|
|
38
|
+
boardSecret.id = crypto.randomUUID()
|
|
37
39
|
boardSecret.targetId = board.id
|
|
38
40
|
boardSecret.targetType = 'board'
|
|
39
41
|
boardSecret.domain = board.domain
|