easywork-common-lib 1.0.10 → 1.0.12
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/entities/drive/file.entity.js +1 -0
- package/dist/entities/drive/file.entity.js.map +1 -1
- package/dist/entities/drive/folder.entity.d.ts +2 -1
- package/dist/entities/drive/folder.entity.js +2 -1
- package/dist/entities/drive/folder.entity.js.map +1 -1
- package/dist/eslint.config.d.ts +1 -1
- package/package.json +3 -11
- package/src/entities/drive/file.entity.ts +1 -0
- package/src/entities/drive/folder.entity.ts +3 -2
- package/webpack-hmr.js +0 -26
- package/webpack.config.js +0 -27
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qDAA4C;AAC5C,qCAAgE;AAChE,mDAAyC;AACzC,sEAA2D;AAGpD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAEhC,IAAI,CAAS;
|
|
1
|
+
{"version":3,"file":"file.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oDAAmD;AACnD,qDAA4C;AAC5C,qCAAgE;AAChE,mDAAyC;AACzC,sEAA2D;AAGpD,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,qBAAU;IAEhC,IAAI,CAAS;IAQb,MAAM,CAAS;IAGf,GAAG,CAAS;IAGZ,IAAI,CAAS;IAGb,QAAQ,CAAS;IAGjB,KAAK,CAAS;IAGd,SAAS,CAAU;IAOnB,MAAM,CAAgB;CACzB,CAAA;AAjCY,oBAAI;AAEb;IADC,IAAA,2BAAS,EAAC,CAAC,CAAC;;kCACA;AAQb;IANC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,sBAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE;QAC/C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACd,CAAC;IACD,IAAA,oBAAU,GAAE;8BACL,sBAAM;oCAAC;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;iCACf;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;kCACd;AAGb;IADC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCAC1B;AAGjB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;mCACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;uCACR;AAOnB;IALC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAU,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;QAC1D,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACd,CAAC;;oCACoB;eAhCb,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CAiChB"}
|
|
@@ -13,6 +13,7 @@ exports.Folder = void 0;
|
|
|
13
13
|
const database_1 = require("../../common/database");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
15
|
const typeorm_1 = require("typeorm");
|
|
16
|
+
const file_entity_1 = require("./file.entity");
|
|
16
17
|
let Folder = class Folder extends database_1.BaseEntity {
|
|
17
18
|
name;
|
|
18
19
|
parent;
|
|
@@ -33,7 +34,7 @@ __decorate([
|
|
|
33
34
|
__metadata("design:type", Folder)
|
|
34
35
|
], Folder.prototype, "parent", void 0);
|
|
35
36
|
__decorate([
|
|
36
|
-
(0, typeorm_1.ManyToOne)(() =>
|
|
37
|
+
(0, typeorm_1.ManyToOne)(() => file_entity_1.File, {
|
|
37
38
|
onDelete: "CASCADE",
|
|
38
39
|
onUpdate: "CASCADE",
|
|
39
40
|
}),
|
|
@@ -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;
|
|
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"}
|
package/dist/eslint.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _exports:
|
|
1
|
+
declare const _exports: any;
|
|
2
2
|
export = _exports;
|
package/package.json
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easywork-common-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
4
4
|
"description": "Librería común de Easywork",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "tsc"
|
|
8
|
-
"postbuild": "node -r tsconfig-paths/register dist/index.js",
|
|
9
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
7
|
+
"build": "tsc"
|
|
10
8
|
},
|
|
11
9
|
"repository": {
|
|
12
10
|
"type": "git",
|
|
@@ -26,17 +24,11 @@
|
|
|
26
24
|
"@nestjs/typeorm": "^10.0.2",
|
|
27
25
|
"class-transformer": "^0.5.1",
|
|
28
26
|
"class-validator": "^0.14.1",
|
|
29
|
-
"pg": "^8.11.5",
|
|
30
|
-
"tspath": "^2.6.8",
|
|
31
27
|
"typeorm": "^0.3.20"
|
|
32
28
|
},
|
|
33
29
|
"devDependencies": {
|
|
34
|
-
"@antfu/eslint-config": "^2.15.0",
|
|
35
30
|
"@rubiin/tsconfig": "^1.1.2",
|
|
36
31
|
"ts-loader": "^9.5.1",
|
|
37
|
-
"
|
|
38
|
-
"typescript": "^5.4.5",
|
|
39
|
-
"webpack": "^5.91.0",
|
|
40
|
-
"webpack-cli": "^5.1.4"
|
|
32
|
+
"typescript": "^5.4.5"
|
|
41
33
|
}
|
|
42
34
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseEntity } from "../../common/database";
|
|
2
2
|
import { MinLength } from "class-validator";
|
|
3
3
|
import { Column, Entity, JoinColumn, ManyToOne, OneToOne } from "typeorm";
|
|
4
|
+
import { File } from "./file.entity";
|
|
4
5
|
|
|
5
6
|
@Entity()
|
|
6
7
|
export class Folder extends BaseEntity {
|
|
@@ -15,10 +16,10 @@ export class Folder extends BaseEntity {
|
|
|
15
16
|
@JoinColumn()
|
|
16
17
|
parent: Folder;
|
|
17
18
|
|
|
18
|
-
@ManyToOne(() =>
|
|
19
|
+
@ManyToOne(() => File, {
|
|
19
20
|
onDelete: "CASCADE",
|
|
20
21
|
onUpdate: "CASCADE",
|
|
21
22
|
})
|
|
22
23
|
@JoinColumn()
|
|
23
|
-
files:
|
|
24
|
+
files: File[];
|
|
24
25
|
}
|
package/webpack-hmr.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const nodeExternals = require('webpack-node-externals');
|
|
2
|
-
const {RunScriptWebpackPlugin} = require('run-script-webpack-plugin');
|
|
3
|
-
|
|
4
|
-
module.exports = function (options, {HotModuleReplacementPlugin, WatchIgnorePlugin}) {
|
|
5
|
-
return {
|
|
6
|
-
...options,
|
|
7
|
-
entry: ['webpack/hot/poll?100', options.entry],
|
|
8
|
-
externals: [
|
|
9
|
-
nodeExternals({
|
|
10
|
-
allowlist: ['webpack/hot/poll?100'],
|
|
11
|
-
}),
|
|
12
|
-
],
|
|
13
|
-
node: {
|
|
14
|
-
__dirname: true,
|
|
15
|
-
__filename: true,
|
|
16
|
-
},
|
|
17
|
-
plugins: [
|
|
18
|
-
...options.plugins,
|
|
19
|
-
new HotModuleReplacementPlugin(),
|
|
20
|
-
new WatchIgnorePlugin({
|
|
21
|
-
paths: [/\.js$/, /\.d\.ts$/],
|
|
22
|
-
}),
|
|
23
|
-
new RunScriptWebpackPlugin({name: options.output.filename, autoRestart: false}),
|
|
24
|
-
],
|
|
25
|
-
};
|
|
26
|
-
};
|
package/webpack.config.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
const path = require("path");
|
|
2
|
-
|
|
3
|
-
module.exports = {
|
|
4
|
-
mode: "production", // Puedes cambiar a 'development' para mejor depuración
|
|
5
|
-
entry: "./src/index.ts", // Punto de entrada de tu librería
|
|
6
|
-
output: {
|
|
7
|
-
path: path.resolve(__dirname, "dist"),
|
|
8
|
-
filename: "index.js", // Nombre del archivo de salida
|
|
9
|
-
libraryTarget: "commonjs2", // Formato del módulo de salida
|
|
10
|
-
},
|
|
11
|
-
resolve: {
|
|
12
|
-
extensions: [".ts", ".js"],
|
|
13
|
-
alias: {
|
|
14
|
-
"@common": path.resolve(__dirname, "src/common"), // Ajusta según tus necesidades de alias
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
module: {
|
|
18
|
-
rules: [
|
|
19
|
-
{
|
|
20
|
-
test: /\.ts$/,
|
|
21
|
-
use: "ts-loader",
|
|
22
|
-
exclude: /node_modules/,
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
target: "node", // Asegura que Webpack compila para un entorno Node.js
|
|
27
|
-
};
|