plac-micro-common 1.3.74 → 1.3.75
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.
|
@@ -0,0 +1,59 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.AppDataSource = void 0;
|
|
37
|
+
const dotenv = __importStar(require("dotenv"));
|
|
38
|
+
const typeorm_1 = require("typeorm");
|
|
39
|
+
dotenv.config();
|
|
40
|
+
const core_1 = require("../models/core");
|
|
41
|
+
const quotation_1 = require("../models/quotation");
|
|
42
|
+
const application_1 = require("../models/application");
|
|
43
|
+
const customer_1 = require("../models/customer");
|
|
44
|
+
exports.AppDataSource = new typeorm_1.DataSource({
|
|
45
|
+
type: "postgres",
|
|
46
|
+
host: process.env.DB_HOST || "localhost",
|
|
47
|
+
port: Number(process.env.DB_PORT) || 5432,
|
|
48
|
+
username: process.env.DB_USERNAME,
|
|
49
|
+
password: process.env.DB_PASSWORD,
|
|
50
|
+
database: process.env.DB_NAME,
|
|
51
|
+
entities: [
|
|
52
|
+
...core_1.CORE_ENTITIES,
|
|
53
|
+
...quotation_1.QUOTATION_ENTITIES,
|
|
54
|
+
...application_1.APPLICATION_ENTITIES,
|
|
55
|
+
...customer_1.CUSTOMER_ENTITIES,
|
|
56
|
+
],
|
|
57
|
+
migrations: ["src/database/migrations/*.ts"],
|
|
58
|
+
migrationsTableName: "typeorm_migrations",
|
|
59
|
+
});
|
|
@@ -56,7 +56,7 @@ __decorate([
|
|
|
56
56
|
], PremiumRateConditionEntity.prototype, "product", void 0);
|
|
57
57
|
__decorate([
|
|
58
58
|
(0, typeorm_1.OneToOne)(() => rider_entity_1.RiderEntity, { nullable: true }),
|
|
59
|
-
(0, typeorm_1.JoinColumn)({}),
|
|
59
|
+
(0, typeorm_1.JoinColumn)({ name: "rider_id" }),
|
|
60
60
|
__metadata("design:type", Object)
|
|
61
61
|
], PremiumRateConditionEntity.prototype, "rider", void 0);
|
|
62
62
|
exports.PremiumRateConditionEntity = PremiumRateConditionEntity = __decorate([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plac-micro-common",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.75",
|
|
4
4
|
"types": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
"v:minor": "npm version minor",
|
|
10
10
|
"v:major": "npm version major",
|
|
11
11
|
"publish:public": "npm publish --access public",
|
|
12
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
13
|
+
"migration:generate": "typeorm-ts-node-commonjs migration:generate src/database/migrations/$MIGRATION_NAME -d src/database/data-source.ts",
|
|
14
|
+
"migration:run": "typeorm-ts-node-commonjs migration:run -d src/database/data-source.ts",
|
|
15
|
+
"migration:apply": "typeorm-ts-node-commonjs migration:generate src/database/migrations/$MIGRATION_NAME -d src/database/data-source.ts && typeorm-ts-node-commonjs migration:run -d src/database/data-source.ts",
|
|
16
|
+
"migration:revert": "typeorm-ts-node-commonjs migration:revert -d src/database/data-source.ts",
|
|
17
|
+
"migration:show": "typeorm-ts-node-commonjs migration:show -d src/database/data-source.ts"
|
|
13
18
|
},
|
|
14
19
|
"keywords": [],
|
|
15
20
|
"author": "",
|
|
@@ -17,7 +22,11 @@
|
|
|
17
22
|
"description": "",
|
|
18
23
|
"devDependencies": {
|
|
19
24
|
"@types/ejs": "^3.1.5",
|
|
25
|
+
"@types/pg": "^8.11.10",
|
|
26
|
+
"dotenv": "^16.4.7",
|
|
27
|
+
"pg": "^8.13.3",
|
|
20
28
|
"ts-node": "^10.9.2",
|
|
29
|
+
"typeorm": "^0.3.28",
|
|
21
30
|
"typescript": "^5.9.3"
|
|
22
31
|
},
|
|
23
32
|
"dependencies": {
|