@nmxjs/app 1.0.80 → 1.0.82
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.
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createNestHttpApp = void 0;
|
|
4
4
|
const helmet_1 = require("helmet");
|
|
5
5
|
const compression = require("compression");
|
|
6
|
+
const graphql_upload_ts_1 = require("graphql-upload-ts");
|
|
6
7
|
const utils_1 = require("@nmxjs/utils");
|
|
7
8
|
const types_1 = require("@nmxjs/types");
|
|
8
9
|
const core_1 = require("@nestjs/core");
|
|
@@ -16,6 +17,7 @@ async function createNestHttpApp({ service, module }) {
|
|
|
16
17
|
app.use((0, helmet_1.default)());
|
|
17
18
|
}
|
|
18
19
|
app.use(compression());
|
|
20
|
+
app.use((0, graphql_upload_ts_1.graphqlUploadExpress)());
|
|
19
21
|
const port = process.env.PORT || 3000;
|
|
20
22
|
app.enableCors({
|
|
21
23
|
origin: (0, utils_1.parseJson)({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNestHttpApp.js","sourceRoot":"","sources":["../src/createNestHttpApp.ts"],"names":[],"mappings":";;;AAAA,mCAA4B;AAC5B,2CAA2C;AAC3C,wCAAyD;AACzD,wCAA+C;AAC/C,uCAA2C;AAC3C,2CAAwC;AAExC,0CAAmD;AACnD,0CAA+D;AAE/D,6DAA0D;AAEnD,KAAK,UAAU,iBAAiB,CAAC,EAAE,OAAO,EAAE,MAAM,EAAyB;IAChF,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE7C,IAAI,IAAA,sBAAc,GAAE,KAAK,uBAAe,CAAC,UAAU,EAAE,CAAC;QACpD,GAAG,CAAC,GAAG,CAAC,IAAA,gBAAM,GAAE,CAAC,CAAC;IACpB,CAAC;IAED,GAAG,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;
|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AI,CAAC;IAE5F,IAAI,aAAa,EAAE,CAAC;QAClB,MAAM,GAAG,CAAC,mBAAmB,CAAsB,aAAa,CAAC,CAAC,MAAM,EAAE,CAAC;IAC7E,CAAC;IAED,eAAM,CAAC,GAAG,CAAC,gBAAgB,OAAO,qBAAqB,IAAI,IAAI,CAAC,CAAC;AACnE,CAAC;AAjCD,8CAiCC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { TypeOrmModuleOptions } from '@nestjs/typeorm';
|
|
2
|
+
export declare const getTypeOrmModule: (options?: Partial<TypeOrmModuleOptions>) => import("@nestjs/common").DynamicModule;
|
package/dist/getTypeOrmModule.js
CHANGED
|
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getTypeOrmModule = void 0;
|
|
4
4
|
const typeorm_1 = require("@nestjs/typeorm");
|
|
5
5
|
const config_1 = require("@nmxjs/config");
|
|
6
|
-
const getTypeOrmModule = () => typeorm_1.TypeOrmModule.forRootAsync({
|
|
7
|
-
useFactory: (config) => (Object.assign({ type: config.db.type, host: config.db.host, port: config.db.port, username: config.db.username, password: config.db.password, database: config.db.database, synchronize: true, autoLoadEntities: true }, (config.db.options ? config.db.options : {}))),
|
|
6
|
+
const getTypeOrmModule = (options) => typeorm_1.TypeOrmModule.forRootAsync({
|
|
7
|
+
useFactory: (config) => (Object.assign(Object.assign({ type: config.db.type, host: config.db.host, port: config.db.port, username: config.db.username, password: config.db.password, database: config.db.database, synchronize: true, autoLoadEntities: true }, (config.db.options ? config.db.options : {})), (options ? options : {}))),
|
|
8
8
|
inject: [config_1.configKey],
|
|
9
9
|
});
|
|
10
10
|
exports.getTypeOrmModule = getTypeOrmModule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTypeOrmModule.js","sourceRoot":"","sources":["../src/getTypeOrmModule.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"getTypeOrmModule.js","sourceRoot":"","sources":["../src/getTypeOrmModule.ts"],"names":[],"mappings":";;;AAAA,6CAAsE;AACtE,0CAAmD;AAE5C,MAAM,gBAAgB,GAAG,CAAC,OAAuC,EAAE,EAAE,CAC1E,uBAAa,CAAC,YAAY,CAAC;IACzB,UAAU,EAAE,CAAC,MAAe,EAAE,EAAE,CAAC,+BAC/B,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EACpB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EACpB,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,IAAI,EACpB,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAC5B,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAC5B,QAAQ,EAAE,MAAM,CAAC,EAAE,CAAC,QAAQ,EAC5B,WAAW,EAAE,IAAI,EACjB,gBAAgB,EAAE,IAAI,IACnB,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,GAC5C,CAAC,OAAO,CAAC,CAAC,CAAM,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,EAChC;IACF,MAAM,EAAE,CAAC,kBAAS,CAAC;CACpB,CAAC,CAAC;AAfQ,QAAA,gBAAgB,oBAexB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nmxjs/app",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"graphql": "^16.6.0",
|
|
41
41
|
"graphql-subscriptions": "^2.0.0",
|
|
42
42
|
"graphql-type-json": "^0.3.2",
|
|
43
|
+
"graphql-upload-ts": "^2.1.2",
|
|
43
44
|
"graphql-ws": "^5.11.2",
|
|
44
45
|
"helmet": "^7.1.0",
|
|
45
46
|
"typeorm": "^0.3.10"
|