easywork-common-lib 1.0.12 → 1.0.14

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/.gitattributes CHANGED
@@ -1,2 +1,2 @@
1
- # Auto detect text files and perform LF normalization
2
- * text=auto
1
+ # Auto detect text files and perform LF normalization
2
+ * text=auto
@@ -3,5 +3,5 @@ import { File } from "./file.entity";
3
3
  export declare class Folder extends BaseEntity {
4
4
  name: string;
5
5
  parent: Folder;
6
- files: File[];
6
+ files?: File[];
7
7
  }
@@ -34,11 +34,10 @@ __decorate([
34
34
  __metadata("design:type", Folder)
35
35
  ], Folder.prototype, "parent", void 0);
36
36
  __decorate([
37
- (0, typeorm_1.ManyToOne)(() => file_entity_1.File, {
37
+ (0, typeorm_1.OneToMany)(() => file_entity_1.File, (file) => file.folder, {
38
38
  onDelete: "CASCADE",
39
39
  onUpdate: "CASCADE",
40
40
  }),
41
- (0, typeorm_1.JoinColumn)(),
42
41
  __metadata("design:type", Array)
43
42
  ], Folder.prototype, "files", void 0);
44
43
  exports.Folder = Folder = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"folder.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/folder.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qDAA4C;AAC5C,qCAA0E;AAC1E,+CAAqC;AAG9B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,qBAAU;IAGlC,IAAI,CAAS;IAOb,MAAM,CAAS;IAOf,KAAK,CAAS;CACjB,CAAA;AAlBY,wBAAM;AAGf;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oCACZ;AAOb;IALC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACL,MAAM;sCAAC;AAOf;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE;QACnB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;IACD,IAAA,oBAAU,GAAE;;qCACC;iBAjBL,MAAM;IADlB,IAAA,gBAAM,GAAE;GACI,MAAM,CAkBlB"}
1
+ {"version":3,"file":"folder.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/folder.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qDAA4C;AAC5C,qCAA0E;AAC1E,+CAAqC;AAG9B,IAAM,MAAM,GAAZ,MAAM,MAAO,SAAQ,qBAAU;IAGlC,IAAI,CAAS;IAOb,MAAM,CAAS;IAMf,KAAK,CAAU;CAClB,CAAA;AAjBY,wBAAM;AAGf;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;oCACZ;AAOb;IALC,IAAA,kBAAQ,EAAC,GAAG,EAAE,CAAC,MAAM,EAAE;QACpB,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;IACD,IAAA,oBAAU,GAAE;8BACL,MAAM;sCAAC;AAMf;IAJC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,kBAAI,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;KACtB,CAAC;;qCACa;iBAhBN,MAAM;IADlB,IAAA,gBAAM,GAAE;GACI,MAAM,CAiBlB"}
@@ -0,0 +1,2 @@
1
+ export * from "./file.entity";
2
+ export * from "./folder.entity";
@@ -0,0 +1,19 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./file.entity"), exports);
18
+ __exportStar(require("./folder.entity"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/drive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,kDAA+B"}
@@ -15,3 +15,4 @@ export * from "./helpers/contact_email.entity";
15
15
  export * from "./helpers/contact_types.entity";
16
16
  export * from "./helpers/contact_sources.entity";
17
17
  export * from "./app_config/app-config.entity";
18
+ export * from "./drive";
@@ -31,4 +31,5 @@ __exportStar(require("./helpers/contact_email.entity"), exports);
31
31
  __exportStar(require("./helpers/contact_types.entity"), exports);
32
32
  __exportStar(require("./helpers/contact_sources.entity"), exports);
33
33
  __exportStar(require("./app_config/app-config.entity"), exports);
34
+ __exportStar(require("./drive"), exports);
34
35
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,oDAAkC;AAClC,mDAAiC;AACjC,yDAAuC;AACvC,mDAAiC;AACjC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,sDAAoC;AACpC,wDAAsC;AACtC,iDAA+B;AAC/B,iDAA+B;AAC/B,iEAA+C;AAC/C,iEAA+C;AAC/C,iEAA+C;AAC/C,mEAAiD;AACjD,iEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,oDAAkC;AAClC,mDAAiC;AACjC,yDAAuC;AACvC,mDAAiC;AACjC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,sDAAoC;AACpC,wDAAsC;AACtC,iDAA+B;AAC/B,iDAA+B;AAC/B,iEAA+C;AAC/C,iEAA+C;AAC/C,iEAA+C;AAC/C,mEAAiD;AACjD,iEAA+C;AAC/C,0CAAuB"}
package/package.json CHANGED
@@ -1,34 +1,34 @@
1
- {
2
- "name": "easywork-common-lib",
3
- "version": "1.0.12",
4
- "description": "Librería común de Easywork",
5
- "main": "dist/index.js",
6
- "scripts": {
7
- "build": "tsc"
8
- },
9
- "repository": {
10
- "type": "git",
11
- "url": "git+https://github.com/criptopreto/easywork-common-lib.git"
12
- },
13
- "keywords": [
14
- "nodejs"
15
- ],
16
- "author": "Rosmer Campos",
17
- "license": "MIT",
18
- "bugs": {
19
- "url": "https://github.com/criptopreto/easywork-common-lib/issues"
20
- },
21
- "homepage": "https://github.com/criptopreto/easywork-common-lib#readme",
22
- "dependencies": {
23
- "@nestjs/common": "^10.3.8",
24
- "@nestjs/typeorm": "^10.0.2",
25
- "class-transformer": "^0.5.1",
26
- "class-validator": "^0.14.1",
27
- "typeorm": "^0.3.20"
28
- },
29
- "devDependencies": {
30
- "@rubiin/tsconfig": "^1.1.2",
31
- "ts-loader": "^9.5.1",
32
- "typescript": "^5.4.5"
33
- }
34
- }
1
+ {
2
+ "name": "easywork-common-lib",
3
+ "version": "1.0.14",
4
+ "description": "Librería común de Easywork",
5
+ "main": "dist/index.js",
6
+ "scripts": {
7
+ "build": "tsc"
8
+ },
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+https://github.com/criptopreto/easywork-common-lib.git"
12
+ },
13
+ "keywords": [
14
+ "nodejs"
15
+ ],
16
+ "author": "Rosmer Campos",
17
+ "license": "MIT",
18
+ "bugs": {
19
+ "url": "https://github.com/criptopreto/easywork-common-lib/issues"
20
+ },
21
+ "homepage": "https://github.com/criptopreto/easywork-common-lib#readme",
22
+ "dependencies": {
23
+ "@nestjs/common": "^10.3.8",
24
+ "@nestjs/typeorm": "^10.0.2",
25
+ "class-transformer": "^0.5.1",
26
+ "class-validator": "^0.14.1",
27
+ "typeorm": "^0.3.20"
28
+ },
29
+ "devDependencies": {
30
+ "@rubiin/tsconfig": "^1.1.2",
31
+ "ts-loader": "^9.5.1",
32
+ "typescript": "^5.4.5"
33
+ }
34
+ }
@@ -1,6 +1,6 @@
1
1
  import { BaseEntity } from "../../common/database";
2
2
  import { MinLength } from "class-validator";
3
- import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm";
3
+ import { Column, Entity, JoinColumn, OneToMany, OneToOne } from "typeorm";
4
4
  import { File } from "./file.entity";
5
5
 
6
6
  @Entity()
@@ -16,10 +16,9 @@ export class Folder extends BaseEntity {
16
16
  @JoinColumn()
17
17
  parent: Folder;
18
18
 
19
- @ManyToOne(() => File, {
19
+ @OneToMany(() => File, (file) => file.folder, {
20
20
  onDelete: "CASCADE",
21
21
  onUpdate: "CASCADE",
22
22
  })
23
- @JoinColumn()
24
- files: File[];
25
- }
23
+ files?: File[];
24
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./file.entity"
2
+ export * from "./folder.entity"
@@ -15,3 +15,4 @@ export * from "./helpers/contact_email.entity";
15
15
  export * from "./helpers/contact_types.entity";
16
16
  export * from "./helpers/contact_sources.entity";
17
17
  export * from "./app_config/app-config.entity";
18
+ export * from "./drive"