@volcanicminds/typeorm 0.0.2 → 0.0.4
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/README.md +21 -1
- package/TODO.md +0 -2
- package/dist/index.js +17 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/loader/entities.js +0 -3
- package/dist/lib/loader/entities.js.map +1 -1
- package/dist/start.js +0 -1
- package/dist/start.js.map +1 -1
- package/index.ts +20 -10
- package/lib/loader/entities.ts +0 -5
- package/package.json +1 -1
- package/start.ts +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/lib/entities/cat.e.js +0 -35
- package/dist/lib/entities/cat.e.js.map +0 -1
- package/dist/lib/entities/dog.e.js +0 -35
- package/dist/lib/entities/dog.e.js.map +0 -1
- package/dist/lib/schema/cat.entity.d.ts +0 -7
- package/dist/lib/schema/cat.entity.d.ts.map +0 -1
- package/dist/lib/schema/cat.entity.js +0 -36
- package/dist/lib/schema/cat.entity.js.map +0 -1
- package/dist/start.d.ts +0 -1
- package/dist/start.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[](https://opensource.org/licenses/MIT)
|
|
2
2
|
[](https://en.wikipedia.org/wiki/Open_source)
|
|
3
3
|
[](https://github.com/volcanicminds/volcanic-backend)
|
|
4
|
-
[](https://www.npmjs.com/package/@volcanicminds/
|
|
4
|
+
[](https://www.npmjs.com/package/@volcanicminds/typeorm)
|
|
5
5
|
|
|
6
6
|
# volcanic-database-typeorm
|
|
7
7
|
|
|
@@ -29,6 +29,9 @@ yarn upgrade-deps
|
|
|
29
29
|
|
|
30
30
|
[typeorm postgres: database schema / column types](https://github.com/typeorm/typeorm/blob/master/test/functional/database-schema/column-types/postgres/entity/Post.ts)
|
|
31
31
|
|
|
32
|
+
[postgres data types: all](https://www.postgresql.org/docs/current/datatype.html)
|
|
33
|
+
[postgres data types: numeric](https://www.postgresql.org/docs/current/datatype-numeric.html)
|
|
34
|
+
|
|
32
35
|
## Entities
|
|
33
36
|
|
|
34
37
|
For example, under `/src/entities` create the following:
|
|
@@ -61,3 +64,20 @@ module.exports = Player
|
|
|
61
64
|
```
|
|
62
65
|
|
|
63
66
|
For more info and possibilities see [typeorm decorators](https://typeorm.io/decorator-reference)
|
|
67
|
+
|
|
68
|
+
## Enviroment
|
|
69
|
+
|
|
70
|
+
```rb
|
|
71
|
+
# or automatically use LOG_LEVEL
|
|
72
|
+
LOG_DB_LEVEL=warn
|
|
73
|
+
LOG_COLORIZE=true
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Log levels:
|
|
77
|
+
|
|
78
|
+
- **trace**: useful and useless messages, verbose mode
|
|
79
|
+
- **debug**: well, for debugging purposes.. you know what I mean
|
|
80
|
+
- **info**: minimal logs necessary for understand that everything is working fine
|
|
81
|
+
- **warn**: useful warnings if the environment is controlled
|
|
82
|
+
- **error**: print out errors even if not blocking/fatal errors
|
|
83
|
+
- **fatal**: ok you are dead now, but you want to know
|
package/TODO.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -47,15 +47,29 @@ function start(options) {
|
|
|
47
47
|
password: 'vminds',
|
|
48
48
|
database: 'vminds',
|
|
49
49
|
synchronize: true,
|
|
50
|
-
logging: true
|
|
50
|
+
logging: true,
|
|
51
|
+
logger: ''
|
|
51
52
|
};
|
|
52
|
-
console.log('options ' + JSON.stringify(options));
|
|
53
53
|
}
|
|
54
54
|
if (options == null || Object.keys(options).length == 0) {
|
|
55
55
|
throw Error('Volcanic Database: options not specified');
|
|
56
56
|
}
|
|
57
|
+
const { LOG_DB_LEVEL = process.env.LOG_LEVEL || 'trace', LOG_COLORIZE = true } = process.env;
|
|
58
|
+
const logLevel = LOG_DB_LEVEL === 'trace'
|
|
59
|
+
? 'all'
|
|
60
|
+
: LOG_DB_LEVEL === 'debug'
|
|
61
|
+
? 'query'
|
|
62
|
+
: LOG_DB_LEVEL === 'info'
|
|
63
|
+
? 'info'
|
|
64
|
+
: LOG_DB_LEVEL === 'warn'
|
|
65
|
+
? 'warn'
|
|
66
|
+
: LOG_DB_LEVEL === 'error'
|
|
67
|
+
? 'error'
|
|
68
|
+
: false;
|
|
57
69
|
const { classes, repositories, entities } = loaderEntities.load();
|
|
58
70
|
options.entities = [...(options.entities || []), ...(entities || [])];
|
|
71
|
+
options.logger = LOG_COLORIZE ? 'advanced-console' : 'simple-console';
|
|
72
|
+
options.logging = logLevel;
|
|
59
73
|
new typeorm_1.DataSource(options)
|
|
60
74
|
.initialize()
|
|
61
75
|
.then((ds) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -67,10 +81,7 @@ function start(options) {
|
|
|
67
81
|
};
|
|
68
82
|
return resolve(ds);
|
|
69
83
|
}))
|
|
70
|
-
.catch((error) =>
|
|
71
|
-
console.log(error);
|
|
72
|
-
reject(error);
|
|
73
|
-
});
|
|
84
|
+
.catch((error) => reject(error));
|
|
74
85
|
});
|
|
75
86
|
});
|
|
76
87
|
}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEZ,4BAAyB;AACzB,qCAAoC;AACpC,sEAAuD;AAEvD,SAAe,KAAK,CAAC,OAAO;;QAC1B,OAAO,IAAI,OAAO,CAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACjD,IAAI,MAAM,CAAC,qBAAqB,EAAE;gBAChC,OAAO,GAAG;oBACR,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,WAAW;oBACjB,IAAI,EAAE,IAAI;oBACV,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,QAAQ;oBAClB,QAAQ,EAAE,QAAQ;oBAClB,WAAW,EAAE,IAAI;oBACjB,OAAO,EAAE,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","s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
|
11
11
|
patterns.forEach((pattern) => {
|
|
12
|
-
console.log('Looking for ' + pattern);
|
|
13
12
|
glob.sync(pattern, { nodir: true, nosort: true, stat: false }).forEach((f) => {
|
|
14
|
-
console.log(f);
|
|
15
13
|
const entityClass = require(f);
|
|
16
14
|
classes[entityClass.name] = entityClass;
|
|
17
15
|
repositories[pluralize(entityClass.name.toLowerCase())] = entityClass;
|
|
18
16
|
entities.push(entityClass);
|
|
19
17
|
});
|
|
20
18
|
});
|
|
21
|
-
console.log('Entities loaded: ' + entities.length);
|
|
22
19
|
return { classes, repositories, entities };
|
|
23
20
|
}
|
|
24
21
|
exports.load = load;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../lib/loader/entities.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"entities.js","sourceRoot":"","sources":["../../../lib/loader/entities.ts"],"names":[],"mappings":";;;AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AAEtC,SAAgB,IAAI;IAClB,MAAM,OAAO,GAAQ,EAAE,CAAA;IACvB,MAAM,YAAY,GAAQ,EAAE,CAAA;IAC5B,MAAM,QAAQ,GAAU,EAAE,CAAA;IAE1B,MAAM,QAAQ,GAAG,CAAC,GAAG,SAAS,0BAA0B,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,2BAA2B,CAAC,CAAA;IACtG,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAS,EAAE,EAAE;YACnF,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA;YAC9B,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,WAAW,CAAA;YACvC,YAAY,CAAC,SAAS,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,GAAG,WAAW,CAAA;YACrE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC5B,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;IAEF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAA;AAC5C,CAAC;AAhBD,oBAgBC"}
|
package/dist/start.js
CHANGED
|
@@ -10,7 +10,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
global.npmDebugServerStarted = true;
|
|
12
12
|
require('./index')().then((AppDataSource) => __awaiter(void 0, void 0, void 0, function* () {
|
|
13
|
-
console.log('bbb');
|
|
14
13
|
const c1 = new global.database.model.User();
|
|
15
14
|
c1.breed = 'nread2';
|
|
16
15
|
c1.age = 'young';
|
package/dist/start.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start.js","sourceRoot":"","sources":["../start.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;AAEZ,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAA;AACnC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAO,aAAa,EAAE,EAAE;IAChD,
|
|
1
|
+
{"version":3,"file":"start.js","sourceRoot":"","sources":["../start.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;;;;;;;;;;AAEZ,MAAM,CAAC,qBAAqB,GAAG,IAAI,CAAA;AACnC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,IAAI,CAAC,CAAO,aAAa,EAAE,EAAE;IAChD,MAAM,EAAE,GAAG,IAAI,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAA;IAC3C,EAAE,CAAC,KAAK,GAAG,QAAQ,CAAA;IACnB,EAAE,CAAC,GAAG,GAAG,OAAO,CAAA;IAChB,EAAE,CAAC,IAAI,GAAG,OAAO,CAAA;IACjB,MAAM,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;AACjD,CAAC,CAAA,CAAC,CAAA"}
|
package/index.ts
CHANGED
|
@@ -15,21 +15,34 @@ async function start(options) {
|
|
|
15
15
|
password: 'vminds',
|
|
16
16
|
database: 'vminds',
|
|
17
17
|
synchronize: true,
|
|
18
|
-
logging: true
|
|
19
|
-
//
|
|
20
|
-
// subscribers: [],
|
|
21
|
-
// migrations: []
|
|
18
|
+
logging: true, // query, error, schema, warn, info, all
|
|
19
|
+
logger: '' // advanced-console, simple-console
|
|
22
20
|
}
|
|
23
|
-
console.log('options ' + JSON.stringify(options))
|
|
24
21
|
}
|
|
25
22
|
|
|
26
23
|
if (options == null || Object.keys(options).length == 0) {
|
|
27
24
|
throw Error('Volcanic Database: options not specified')
|
|
28
25
|
}
|
|
29
26
|
|
|
30
|
-
|
|
27
|
+
const { LOG_DB_LEVEL = process.env.LOG_LEVEL || 'trace', LOG_COLORIZE = true } = process.env
|
|
28
|
+
|
|
29
|
+
const logLevel: string | boolean =
|
|
30
|
+
LOG_DB_LEVEL === 'trace'
|
|
31
|
+
? 'all'
|
|
32
|
+
: LOG_DB_LEVEL === 'debug'
|
|
33
|
+
? 'query'
|
|
34
|
+
: LOG_DB_LEVEL === 'info'
|
|
35
|
+
? 'info'
|
|
36
|
+
: LOG_DB_LEVEL === 'warn'
|
|
37
|
+
? 'warn'
|
|
38
|
+
: LOG_DB_LEVEL === 'error'
|
|
39
|
+
? 'error'
|
|
40
|
+
: false
|
|
41
|
+
|
|
31
42
|
const { classes, repositories, entities } = loaderEntities.load()
|
|
32
43
|
options.entities = [...(options.entities || []), ...(entities || [])]
|
|
44
|
+
options.logger = LOG_COLORIZE ? 'advanced-console' : 'simple-console'
|
|
45
|
+
options.logging = logLevel
|
|
33
46
|
|
|
34
47
|
new DataSource(options)
|
|
35
48
|
.initialize()
|
|
@@ -45,10 +58,7 @@ async function start(options) {
|
|
|
45
58
|
|
|
46
59
|
return resolve(ds)
|
|
47
60
|
})
|
|
48
|
-
.catch((error) =>
|
|
49
|
-
console.log(error)
|
|
50
|
-
reject(error)
|
|
51
|
-
})
|
|
61
|
+
.catch((error) => reject(error))
|
|
52
62
|
})
|
|
53
63
|
}
|
|
54
64
|
|
package/lib/loader/entities.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const glob = require('glob')
|
|
2
2
|
const pluralize = require('pluralize')
|
|
3
|
-
// const path = require('path')
|
|
4
3
|
|
|
5
4
|
export function load() {
|
|
6
5
|
const classes: any = {}
|
|
@@ -9,10 +8,7 @@ export function load() {
|
|
|
9
8
|
|
|
10
9
|
const patterns = [`${__dirname}/../entities/*.e.{ts,js}`, `${process.cwd()}/src/entities/*.e.{ts,js}`]
|
|
11
10
|
patterns.forEach((pattern) => {
|
|
12
|
-
console.log('Looking for ' + pattern)
|
|
13
11
|
glob.sync(pattern, { nodir: true, nosort: true, stat: false }).forEach((f: string) => {
|
|
14
|
-
console.log(f)
|
|
15
|
-
|
|
16
12
|
const entityClass = require(f)
|
|
17
13
|
classes[entityClass.name] = entityClass
|
|
18
14
|
repositories[pluralize(entityClass.name.toLowerCase())] = entityClass
|
|
@@ -20,6 +16,5 @@ export function load() {
|
|
|
20
16
|
})
|
|
21
17
|
})
|
|
22
18
|
|
|
23
|
-
console.log('Entities loaded: ' + entities.length)
|
|
24
19
|
return { classes, repositories, entities }
|
|
25
20
|
}
|
package/package.json
CHANGED
package/start.ts
CHANGED
package/dist/index.d.ts
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAEA,OAAO,kBAAkB,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const typeorm_1 = require("typeorm");
|
|
13
|
-
let Cat = class Cat {
|
|
14
|
-
};
|
|
15
|
-
__decorate([
|
|
16
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
17
|
-
__metadata("design:type", Number)
|
|
18
|
-
], Cat.prototype, "id", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.Column)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], Cat.prototype, "name", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], Cat.prototype, "breed", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Cat.prototype, "age", void 0);
|
|
31
|
-
Cat = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)()
|
|
33
|
-
], Cat);
|
|
34
|
-
module.exports = Cat;
|
|
35
|
-
//# sourceMappingURL=cat.e.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cat.e.js","sourceRoot":"","sources":["../../../lib/entities/cat.e.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAgE;AAGhE,IAAM,GAAG,GAAT,MAAM,GAAG;CAYR,CAAA;AAXC;IAAC,IAAA,gCAAsB,GAAE;;+BACf;AAEV;IAAC,IAAA,gBAAM,GAAE;;iCACG;AAEZ;IAAC,IAAA,gBAAM,GAAE;;kCACI;AAEb;IAAC,IAAA,gBAAM,GAAE;;gCACE;AAXP,GAAG;IADR,IAAA,gBAAM,GAAE;GACH,GAAG,CAYR;AAED,MAAM,CAAC,OAAO,GAAG,GAAG,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
const typeorm_1 = require("typeorm");
|
|
13
|
-
let Dog = class Dog {
|
|
14
|
-
};
|
|
15
|
-
__decorate([
|
|
16
|
-
(0, typeorm_1.PrimaryGeneratedColumn)(),
|
|
17
|
-
__metadata("design:type", Number)
|
|
18
|
-
], Dog.prototype, "id", void 0);
|
|
19
|
-
__decorate([
|
|
20
|
-
(0, typeorm_1.Column)(),
|
|
21
|
-
__metadata("design:type", String)
|
|
22
|
-
], Dog.prototype, "name", void 0);
|
|
23
|
-
__decorate([
|
|
24
|
-
(0, typeorm_1.Column)(),
|
|
25
|
-
__metadata("design:type", String)
|
|
26
|
-
], Dog.prototype, "color", void 0);
|
|
27
|
-
__decorate([
|
|
28
|
-
(0, typeorm_1.Column)(),
|
|
29
|
-
__metadata("design:type", String)
|
|
30
|
-
], Dog.prototype, "age", void 0);
|
|
31
|
-
Dog = __decorate([
|
|
32
|
-
(0, typeorm_1.Entity)()
|
|
33
|
-
], Dog);
|
|
34
|
-
module.exports = Dog;
|
|
35
|
-
//# sourceMappingURL=dog.e.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dog.e.js","sourceRoot":"","sources":["../../../lib/entities/dog.e.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,qCAAgE;AAGhE,IAAM,GAAG,GAAT,MAAM,GAAG;CAYR,CAAA;AAXC;IAAC,IAAA,gCAAsB,GAAE;;+BACf;AAEV;IAAC,IAAA,gBAAM,GAAE;;iCACG;AAEZ;IAAC,IAAA,gBAAM,GAAE;;kCACI;AAEb;IAAC,IAAA,gBAAM,GAAE;;gCACE;AAXP,GAAG;IADR,IAAA,gBAAM,GAAE;GACH,GAAG,CAYR;AAED,MAAM,CAAC,OAAO,GAAG,GAAG,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cat.entity.d.ts","sourceRoot":"","sources":["../../../lib/schema/cat.entity.ts"],"names":[],"mappings":"AAEA,qBACa,GAAG;IAEd,EAAE,EAAE,MAAM,CAAA;IAGV,IAAI,EAAE,MAAM,CAAA;IAGZ,KAAK,EAAE,MAAM,CAAA;IAGb,GAAG,EAAE,MAAM,CAAA;CACZ"}
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.Cat = void 0;
|
|
13
|
-
const typeorm_1 = require("typeorm");
|
|
14
|
-
let Cat = class Cat {
|
|
15
|
-
};
|
|
16
|
-
__decorate([
|
|
17
|
-
(0, typeorm_1.Column)(),
|
|
18
|
-
__metadata("design:type", Number)
|
|
19
|
-
], Cat.prototype, "id", void 0);
|
|
20
|
-
__decorate([
|
|
21
|
-
(0, typeorm_1.Column)(),
|
|
22
|
-
__metadata("design:type", String)
|
|
23
|
-
], Cat.prototype, "name", void 0);
|
|
24
|
-
__decorate([
|
|
25
|
-
(0, typeorm_1.Column)(),
|
|
26
|
-
__metadata("design:type", String)
|
|
27
|
-
], Cat.prototype, "breed", void 0);
|
|
28
|
-
__decorate([
|
|
29
|
-
(0, typeorm_1.Column)(),
|
|
30
|
-
__metadata("design:type", String)
|
|
31
|
-
], Cat.prototype, "age", void 0);
|
|
32
|
-
Cat = __decorate([
|
|
33
|
-
(0, typeorm_1.Entity)()
|
|
34
|
-
], Cat);
|
|
35
|
-
exports.Cat = Cat;
|
|
36
|
-
//# sourceMappingURL=cat.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cat.entity.js","sourceRoot":"","sources":["../../../lib/schema/cat.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAwC;AAGjC,IAAM,GAAG,GAAT,MAAM,GAAG;CAYf,CAAA;AAXC;IAAC,IAAA,gBAAM,GAAE;;+BACC;AAEV;IAAC,IAAA,gBAAM,GAAE;;iCACG;AAEZ;IAAC,IAAA,gBAAM,GAAE;;kCACI;AAEb;IAAC,IAAA,gBAAM,GAAE;;gCACE;AAXA,GAAG;IADf,IAAA,gBAAM,GAAE;GACI,GAAG,CAYf;AAZY,kBAAG"}
|
package/dist/start.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=start.d.ts.map
|
package/dist/start.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start.d.ts","sourceRoot":"","sources":["../start.ts"],"names":[],"mappings":""}
|