@reachu/database 1.0.84 → 1.0.86
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/dist/entity/modules/templates/AuthInfo.d.ts +5 -0
- package/dist/entity/modules/templates/AuthInfo.js +20 -0
- package/dist/entity/modules/templates/AuthInfo.js.map +1 -1
- package/dist/migrations/1687981491374-add-info-to-auth.d.ts +6 -0
- package/dist/migrations/1687981491374-add-info-to-auth.js +37 -0
- package/dist/migrations/1687981491374-add-info-to-auth.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +14 -2
- package/package.json +3 -3
- package/src/entity/modules/templates/AuthInfo.ts +15 -0
- package/src/migrations/1687981491374-add-info-to-auth.ts +22 -0
|
@@ -10,7 +10,12 @@ export default class AuthInfo extends AuditedModel {
|
|
|
10
10
|
basicAuthPassword: string;
|
|
11
11
|
oauthOneConsumerKey: string;
|
|
12
12
|
oauthOneConsumerSecret: string;
|
|
13
|
+
oauthOneTokenKey: string;
|
|
14
|
+
oauthOneTokenSecret: string;
|
|
13
15
|
oauthTwoToken: string;
|
|
14
16
|
oauthTwoPrefix: string;
|
|
17
|
+
oauthTwoClientId: string;
|
|
18
|
+
oauthTwoClientSecret: string;
|
|
19
|
+
oauthTwoClientEndpoint: string;
|
|
15
20
|
userTemplateEcommerce: UserTemplateEcommerce[];
|
|
16
21
|
}
|
|
@@ -53,6 +53,14 @@ __decorate([
|
|
|
53
53
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], AuthInfo.prototype, "oauthOneConsumerSecret", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
58
|
+
__metadata("design:type", String)
|
|
59
|
+
], AuthInfo.prototype, "oauthOneTokenKey", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], AuthInfo.prototype, "oauthOneTokenSecret", void 0);
|
|
56
64
|
__decorate([
|
|
57
65
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
58
66
|
__metadata("design:type", String)
|
|
@@ -61,6 +69,18 @@ __decorate([
|
|
|
61
69
|
typeorm_1.Column('varchar', { nullable: true }),
|
|
62
70
|
__metadata("design:type", String)
|
|
63
71
|
], AuthInfo.prototype, "oauthTwoPrefix", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], AuthInfo.prototype, "oauthTwoClientId", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], AuthInfo.prototype, "oauthTwoClientSecret", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
typeorm_1.Column('varchar', { nullable: true }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], AuthInfo.prototype, "oauthTwoClientEndpoint", void 0);
|
|
64
84
|
__decorate([
|
|
65
85
|
typeorm_1.OneToMany(() => UserTemplateEcommerce_1.default, (userTemplateEcommerce) => userTemplateEcommerce.authInfo, {
|
|
66
86
|
cascade: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AuthInfo.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/AuthInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8F;AAC9F,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,SAAQ,sBAAY;
|
|
1
|
+
{"version":3,"file":"AuthInfo.js","sourceRoot":"","sources":["../../../../src/entity/modules/templates/AuthInfo.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,qCAA8F;AAC9F,sEAA8C;AAC9C,oFAA4D;AAG5D,IAAqB,QAAQ,GAA7B,MAAqB,QAAS,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E,IAAI,EAAE,CAAC;;wDACP;AAS/B;IAPC,mBAAS,CACR,GAAG,EAAE,CAAC,+BAAqB,EAC3B,CAAC,qBAA4C,EAAE,EAAE,CAAC,qBAAqB,CAAC,QAAQ,EAChF;QACE,OAAO,EAAE,IAAI;KACd,CACF;;uDAC8C;AAxD5B,QAAQ;IAD5B,gBAAM,EAAE;GACY,QAAQ,CAyD5B;kBAzDoB,QAAQ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.addInfoToAuth1687981491374 = void 0;
|
|
13
|
+
class addInfoToAuth1687981491374 {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.name = 'addInfoToAuth1687981491374';
|
|
16
|
+
}
|
|
17
|
+
up(queryRunner) {
|
|
18
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
19
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_key\` varchar(255) NULL`);
|
|
20
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_secret\` varchar(255) NULL`);
|
|
21
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_id\` varchar(255) NULL`);
|
|
22
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_secret\` varchar(255) NULL`);
|
|
23
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_endpoint\` varchar(255) NULL`);
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
down(queryRunner) {
|
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_endpoint\``);
|
|
29
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_secret\``);
|
|
30
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_id\``);
|
|
31
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_secret\``);
|
|
32
|
+
yield queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_key\``);
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.addInfoToAuth1687981491374 = addInfoToAuth1687981491374;
|
|
37
|
+
//# sourceMappingURL=1687981491374-add-info-to-auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"1687981491374-add-info-to-auth.js","sourceRoot":"","sources":["../../src/migrations/1687981491374-add-info-to-auth.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,0BAA0B;IAAvC;QACI,SAAI,GAAG,4BAA4B,CAAA;IAkBvC,CAAC;IAhBgB,EAAE,CAAC,WAAwB;;YACpC,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,4EAA4E,CAAC,CAAC;YACtG,MAAM,WAAW,CAAC,KAAK,CAAC,yEAAyE,CAAC,CAAC;YACnG,MAAM,WAAW,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAC;YACvG,MAAM,WAAW,CAAC,KAAK,CAAC,+EAA+E,CAAC,CAAC;QAC7G,CAAC;KAAA;IAEY,IAAI,CAAC,WAAwB;;YACtC,MAAM,WAAW,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YAC/F,MAAM,WAAW,CAAC,KAAK,CAAC,mEAAmE,CAAC,CAAC;YAC7F,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;YACzF,MAAM,WAAW,CAAC,KAAK,CAAC,kEAAkE,CAAC,CAAC;YAC5F,MAAM,WAAW,CAAC,KAAK,CAAC,+DAA+D,CAAC,CAAC;QAC7F,CAAC;KAAA;CAEJ;AAnBD,gEAmBC"}
|
|
@@ -2712,8 +2712,8 @@
|
|
|
2712
2712
|
"affectsGlobalScope": false
|
|
2713
2713
|
},
|
|
2714
2714
|
"../src/entity/modules/templates/authinfo.ts": {
|
|
2715
|
-
"version": "
|
|
2716
|
-
"signature": "
|
|
2715
|
+
"version": "b46fbaf9dd73d8f3ec7dffd7abdc8ce1c97b3835283016c9320454ac12c2f2eb",
|
|
2716
|
+
"signature": "abeed7a2f2698d4b0b230ca9c6f805eef2ada06e74b2d07cdac81d96dc5f23b1",
|
|
2717
2717
|
"affectsGlobalScope": false
|
|
2718
2718
|
},
|
|
2719
2719
|
"../src/entity/translate.ts": {
|
|
@@ -3331,6 +3331,11 @@
|
|
|
3331
3331
|
"signature": "f38b307c946937bfe7732722241a7267f6fbdebea7346e2e459d318339c9d27a",
|
|
3332
3332
|
"affectsGlobalScope": false
|
|
3333
3333
|
},
|
|
3334
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": {
|
|
3335
|
+
"version": "4f5d0e5963d02f250a27b1f8651347d19fbdde4a30c7a3be4b4c6e0df44843f5",
|
|
3336
|
+
"signature": "5a1b894d97be04741932b65590ac239ce78405637426463afe0e3f8eb3adb826",
|
|
3337
|
+
"affectsGlobalScope": false
|
|
3338
|
+
},
|
|
3334
3339
|
"../src/migrations/execute/index.ts": {
|
|
3335
3340
|
"version": "8b5bf13d095aeb57afd593adf3d799681176a13c327e2f77e0028e178c4ee3b9",
|
|
3336
3341
|
"signature": "8e609bb71c20b858c77f0e9f90bb1319db8477b13f9f965f1a1e18524bf50881",
|
|
@@ -6198,6 +6203,9 @@
|
|
|
6198
6203
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
6199
6204
|
"../node_modules/typeorm/index.d.ts"
|
|
6200
6205
|
],
|
|
6206
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
6207
|
+
"../node_modules/typeorm/index.d.ts"
|
|
6208
|
+
],
|
|
6201
6209
|
"../src/migrations/execute/index.ts": [
|
|
6202
6210
|
"../src/config/connect.ts"
|
|
6203
6211
|
],
|
|
@@ -8920,6 +8928,9 @@
|
|
|
8920
8928
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts": [
|
|
8921
8929
|
"../node_modules/typeorm/index.d.ts"
|
|
8922
8930
|
],
|
|
8931
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts": [
|
|
8932
|
+
"../node_modules/typeorm/index.d.ts"
|
|
8933
|
+
],
|
|
8923
8934
|
"../src/migrations/index.ts": [
|
|
8924
8935
|
"../src/migrations/1628474597284-initialschema.ts",
|
|
8925
8936
|
"../src/migrations/1630077596132-removemangopay.ts",
|
|
@@ -9734,6 +9745,7 @@
|
|
|
9734
9745
|
"../src/migrations/1687877455406-migration-develop_01.ts",
|
|
9735
9746
|
"../src/migrations/1687877967732-migration-pre-develop.ts",
|
|
9736
9747
|
"../src/migrations/1687909776321-migration-pre-develop-shopiffy-connection.ts",
|
|
9748
|
+
"../src/migrations/1687981491374-add-info-to-auth.ts",
|
|
9737
9749
|
"../src/migrations/execute/index.ts",
|
|
9738
9750
|
"../src/migrations/index.ts",
|
|
9739
9751
|
"../src/repositories/index.ts",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reachu/database",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.86",
|
|
4
4
|
"description": "reachu-database",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"author": "reachu",
|
|
22
22
|
"license": "ISC",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@reachu/logger": "1.0.
|
|
25
|
-
"@reachu/utils": "1.0.
|
|
24
|
+
"@reachu/logger": "1.0.86",
|
|
25
|
+
"@reachu/utils": "1.0.86",
|
|
26
26
|
"dotenv": "8.0.0",
|
|
27
27
|
"express": "4.17.1",
|
|
28
28
|
"mysql2": "1.5.2",
|
|
@@ -31,12 +31,27 @@ export default class AuthInfo extends AuditedModel {
|
|
|
31
31
|
@Column('varchar', { nullable: true })
|
|
32
32
|
oauthOneConsumerSecret: string;
|
|
33
33
|
|
|
34
|
+
@Column('varchar', { nullable: true })
|
|
35
|
+
oauthOneTokenKey: string;
|
|
36
|
+
|
|
37
|
+
@Column('varchar', { nullable: true })
|
|
38
|
+
oauthOneTokenSecret: string;
|
|
39
|
+
|
|
34
40
|
@Column('varchar', { nullable: true })
|
|
35
41
|
oauthTwoToken: string;
|
|
36
42
|
|
|
37
43
|
@Column('varchar', { nullable: true })
|
|
38
44
|
oauthTwoPrefix: string;
|
|
39
45
|
|
|
46
|
+
@Column('varchar', { nullable: true })
|
|
47
|
+
oauthTwoClientId: string;
|
|
48
|
+
|
|
49
|
+
@Column('varchar', { nullable: true })
|
|
50
|
+
oauthTwoClientSecret: string;
|
|
51
|
+
|
|
52
|
+
@Column('varchar', { nullable: true })
|
|
53
|
+
oauthTwoClientEndpoint: string;
|
|
54
|
+
|
|
40
55
|
@OneToMany(
|
|
41
56
|
() => UserTemplateEcommerce,
|
|
42
57
|
(userTemplateEcommerce: UserTemplateEcommerce) => userTemplateEcommerce.authInfo,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {MigrationInterface, QueryRunner} from "typeorm";
|
|
2
|
+
|
|
3
|
+
export class addInfoToAuth1687981491374 implements MigrationInterface {
|
|
4
|
+
name = 'addInfoToAuth1687981491374'
|
|
5
|
+
|
|
6
|
+
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
7
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_key\` varchar(255) NULL`);
|
|
8
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_one_token_secret\` varchar(255) NULL`);
|
|
9
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_id\` varchar(255) NULL`);
|
|
10
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_secret\` varchar(255) NULL`);
|
|
11
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` ADD \`oauth_two_client_endpoint\` varchar(255) NULL`);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
15
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_endpoint\``);
|
|
16
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_secret\``);
|
|
17
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_two_client_id\``);
|
|
18
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_secret\``);
|
|
19
|
+
await queryRunner.query(`ALTER TABLE \`auth_info\` DROP COLUMN \`oauth_one_token_key\``);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
}
|