@darraghor/nest-backend-libs 2.9.0 → 2.10.0
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/authz/AccessToken.js +2 -1
- package/dist/authz/AuthConfigurationService.js +15 -12
- package/dist/authz/AuthConfigurationService.js.map +1 -1
- package/dist/authz/AuthConfigurationVariables.js +4 -2
- package/dist/authz/AuthConfigurationVariables.js.map +1 -1
- package/dist/authz/ClaimsAuthorisationGuard.js +13 -7
- package/dist/authz/ClaimsAuthorisationGuard.js.map +1 -1
- package/dist/authz/DefaultAuthGuard.js +8 -5
- package/dist/authz/DefaultAuthGuard.js.map +1 -1
- package/dist/authz/MandatoryUserClaims.decorator.js +6 -2
- package/dist/authz/MandatoryUserClaims.decorator.js.map +1 -1
- package/dist/authz/RequestWithUser.js +2 -1
- package/dist/authz/authz.module.js +23 -17
- package/dist/authz/authz.module.js.map +1 -1
- package/dist/authz/authzstrategy.js +22 -16
- package/dist/authz/authzstrategy.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationService.js +13 -10
- package/dist/authzclient/AuthClientConfigurationService.js.map +1 -1
- package/dist/authzclient/AuthClientConfigurationVariables.js +4 -2
- package/dist/authzclient/AuthClientConfigurationVariables.js.map +1 -1
- package/dist/authzclient/AuthzClientProvider.js +8 -5
- package/dist/authzclient/AuthzClientProvider.js.map +1 -1
- package/dist/authzclient/UserProfile.dto.js +5 -1
- package/dist/authzclient/UserProfile.dto.js.map +1 -1
- package/dist/authzclient/authz-client.module.js +19 -13
- package/dist/authzclient/authz-client.module.js.map +1 -1
- package/dist/authzclient/authz.service.js +14 -8
- package/dist/authzclient/authz.service.js.map +1 -1
- package/dist/cli/cli.js +12 -7
- package/dist/cli/cli.js.map +1 -1
- package/dist/cli/commands/WriteApiClientCommand.js +13 -6
- package/dist/cli/commands/WriteApiClientCommand.js.map +1 -1
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js +18 -11
- package/dist/cli/commands/WriteTypeOrmConfigCommand.js.map +1 -1
- package/dist/configuration/ValidatedConfigurationService.js +8 -5
- package/dist/configuration/ValidatedConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfig.module.js +15 -9
- package/dist/core-config/CoreConfig.module.js.map +1 -1
- package/dist/core-config/CoreConfigurationService.js +25 -22
- package/dist/core-config/CoreConfigurationService.js.map +1 -1
- package/dist/core-config/CoreConfigurationVariables.js +4 -2
- package/dist/core-config/CoreConfigurationVariables.js.map +1 -1
- package/dist/database-postgres/PostgresDatabase.module.js +14 -11
- package/dist/database-postgres/PostgresDatabase.module.js.map +1 -1
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js +8 -5
- package/dist/database-postgres/PostgresDatabaseConfigurationService.js.map +1 -1
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js +12 -5
- package/dist/database-postgres/PostgresTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabase.module.js +14 -11
- package/dist/database-sqlite/SqliteDatabase.module.js.map +1 -1
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js +8 -5
- package/dist/database-sqlite/SqliteDatabaseConfigurationService.js.map +1 -1
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js +12 -5
- package/dist/database-sqlite/SqliteTypeOrmConfigurationProvider.js.map +1 -1
- package/dist/index.js +64 -30
- package/dist/index.js.map +1 -1
- package/dist/invitations/InvitationConfigurationService.js +13 -10
- package/dist/invitations/InvitationConfigurationService.js.map +1 -1
- package/dist/invitations/InvitationConfigurationVariables.js +4 -2
- package/dist/invitations/InvitationConfigurationVariables.js.map +1 -1
- package/dist/invitations/dto/create-invitation.dto.js +9 -5
- package/dist/invitations/dto/create-invitation.dto.js.map +1 -1
- package/dist/invitations/entities/invitation.entity.js +33 -30
- package/dist/invitations/entities/invitation.entity.js.map +1 -1
- package/dist/invitations/invitation.controller.js +24 -21
- package/dist/invitations/invitation.controller.js.map +1 -1
- package/dist/invitations/invitation.module.js +27 -21
- package/dist/invitations/invitation.module.js.map +1 -1
- package/dist/invitations/invitation.service.js +21 -18
- package/dist/invitations/invitation.service.js.map +1 -1
- package/dist/logger/CoreLoggerService.js +9 -7
- package/dist/logger/CoreLoggerService.js.map +1 -1
- package/dist/logger/LoggingConfigurationService.js +15 -12
- package/dist/logger/LoggingConfigurationService.js.map +1 -1
- package/dist/logger/LoggingConfigurationVariables.js +4 -2
- package/dist/logger/LoggingConfigurationVariables.js.map +1 -1
- package/dist/logger/LoggingInterceptor.js +13 -7
- package/dist/logger/LoggingInterceptor.js.map +1 -1
- package/dist/logger/logger.module.js +20 -14
- package/dist/logger/logger.module.js.map +1 -1
- package/dist/organisation/dto/RolesEnum.js +5 -2
- package/dist/organisation/dto/RolesEnum.js.map +1 -1
- package/dist/organisation/dto/create-organisation.dto.js +11 -7
- package/dist/organisation/dto/create-organisation.dto.js.map +1 -1
- package/dist/organisation/dto/update-organisation.dto.js +7 -3
- package/dist/organisation/dto/update-organisation.dto.js.map +1 -1
- package/dist/organisation/entities/member-role.entity.js +23 -20
- package/dist/organisation/entities/member-role.entity.js.map +1 -1
- package/dist/organisation/entities/organisation-membership.entity.js +40 -37
- package/dist/organisation/entities/organisation-membership.entity.js.map +1 -1
- package/dist/organisation/entities/organisation.entity.js +29 -26
- package/dist/organisation/entities/organisation.entity.js.map +1 -1
- package/dist/organisation/organisation.controller.js +32 -29
- package/dist/organisation/organisation.controller.js.map +1 -1
- package/dist/organisation/organisation.module.js +15 -12
- package/dist/organisation/organisation.module.js.map +1 -1
- package/dist/organisation/organisation.service.js +23 -20
- package/dist/organisation/organisation.service.js.map +1 -1
- package/dist/person/dto/create-person.dto.js +5 -1
- package/dist/person/dto/create-person.dto.js.map +1 -1
- package/dist/person/dto/update-person.dto.js +7 -3
- package/dist/person/dto/update-person.dto.js.map +1 -1
- package/dist/person/entities/person.entity.js +44 -41
- package/dist/person/entities/person.entity.js.map +1 -1
- package/dist/person/person.controller.js +28 -25
- package/dist/person/person.controller.js.map +1 -1
- package/dist/person/person.module.js +18 -15
- package/dist/person/person.module.js.map +1 -1
- package/dist/person/person.service.js +28 -22
- package/dist/person/person.service.js.map +1 -1
- package/dist/root-app/SwaggerGen.js +21 -15
- package/dist/root-app/SwaggerGen.js.map +1 -1
- package/dist/root-app/app.controller.js +23 -17
- package/dist/root-app/app.controller.js.map +1 -1
- package/dist/root-app/app.service.js +6 -3
- package/dist/root-app/app.service.js.map +1 -1
- package/dist/root-app/core-app.module.js +32 -26
- package/dist/root-app/core-app.module.js.map +1 -1
- package/dist/root-app/notfound.interceptor.js +9 -6
- package/dist/root-app/notfound.interceptor.js.map +1 -1
- package/dist/runningCommandLine/CliCommandService.js +14 -8
- package/dist/runningCommandLine/CliCommandService.js.map +1 -1
- package/dist/runningCommandLine/RunningCommandLine.module.js +12 -9
- package/dist/runningCommandLine/RunningCommandLine.module.js.map +1 -1
- package/dist/smtp-email-client/EmailClientProvider.js +8 -5
- package/dist/smtp-email-client/EmailClientProvider.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationService.js +27 -24
- package/dist/smtp-email-client/EmailConfigurationService.js.map +1 -1
- package/dist/smtp-email-client/EmailConfigurationVariables.js +4 -2
- package/dist/smtp-email-client/EmailConfigurationVariables.js.map +1 -1
- package/dist/smtp-email-client/email-client.service.js +21 -15
- package/dist/smtp-email-client/email-client.service.js.map +1 -1
- package/dist/smtp-email-client/email.controller.js +15 -12
- package/dist/smtp-email-client/email.controller.js.map +1 -1
- package/dist/smtp-email-client/email.entity.js +35 -32
- package/dist/smtp-email-client/email.entity.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-client.module.js +32 -26
- package/dist/smtp-email-client/smtp-email-client.module.js.map +1 -1
- package/dist/smtp-email-client/smtp-email-handler.js +21 -15
- package/dist/smtp-email-client/smtp-email-handler.js.map +1 -1
- package/dist/stripe-client/StripeClientConfigurationService.js +17 -14
- package/dist/stripe-client/StripeClientConfigurationService.js.map +1 -1
- package/dist/stripe-client/StripeClientProvider.js +11 -5
- package/dist/stripe-client/StripeClientProvider.js.map +1 -1
- package/dist/stripe-client/StripeConfigurationVariables.js +4 -2
- package/dist/stripe-client/StripeConfigurationVariables.js.map +1 -1
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js +24 -19
- package/dist/stripe-client/models/StripeCheckoutSessionParams.js.map +1 -1
- package/dist/stripe-client/services/stripe-checkout.service.js +16 -10
- package/dist/stripe-client/services/stripe-checkout.service.js.map +1 -1
- package/dist/stripe-client/services/stripe-event-handler.js +18 -12
- package/dist/stripe-client/services/stripe-event-handler.js.map +1 -1
- package/dist/stripe-client/services/stripe-webhook-handler.service.js +19 -13
- package/dist/stripe-client/services/stripe-webhook-handler.service.js.map +1 -1
- package/dist/stripe-client/stripe-account.module.js +28 -22
- package/dist/stripe-client/stripe-account.module.js.map +1 -1
- package/dist/stripe-client/stripe-controller.js +30 -27
- package/dist/stripe-client/stripe-controller.js.map +1 -1
- package/dist/testing/preRun.js +3 -1
- package/dist/testing/preRun.js.map +1 -1
- package/dist/twitter-client/TwitterClientConfigurationService.js +19 -16
- package/dist/twitter-client/TwitterClientConfigurationService.js.map +1 -1
- package/dist/twitter-client/TwitterClientProvider.js +8 -5
- package/dist/twitter-client/TwitterClientProvider.js.map +1 -1
- package/dist/twitter-client/TwitterConfigurationVariables.js +4 -2
- package/dist/twitter-client/TwitterConfigurationVariables.js.map +1 -1
- package/dist/twitter-client/services/twitter-client.service.js +14 -8
- package/dist/twitter-client/services/twitter-client.service.js.map +1 -1
- package/dist/twitter-client/twitter-account.module.js +21 -15
- package/dist/twitter-client/twitter-account.module.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WriteApiClientCommand = void 0;
|
|
7
|
+
const child_process_1 = require("child_process");
|
|
2
8
|
// eslint-disable-next-line unicorn/import-style
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
const util_1 = __importDefault(require("util"));
|
|
10
|
+
const path_1 = __importDefault(require("path"));
|
|
11
|
+
class WriteApiClientCommand {
|
|
6
12
|
command = "api:write-client";
|
|
7
13
|
describe = "Generates a new api client and installs it into frontend and integration test apps.";
|
|
8
14
|
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
@@ -33,7 +39,7 @@ export class WriteApiClientCommand {
|
|
|
33
39
|
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
34
40
|
args) {
|
|
35
41
|
// call the script
|
|
36
|
-
const execPromise =
|
|
42
|
+
const execPromise = util_1.default.promisify(child_process_1.exec);
|
|
37
43
|
const commandArguments = [
|
|
38
44
|
args.o,
|
|
39
45
|
args.fePath,
|
|
@@ -42,11 +48,12 @@ export class WriteApiClientCommand {
|
|
|
42
48
|
];
|
|
43
49
|
// if i ever use modules later
|
|
44
50
|
// const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
45
|
-
const scriptPath =
|
|
51
|
+
const scriptPath = path_1.default.join(
|
|
46
52
|
// eslint-disable-next-line unicorn/prefer-module
|
|
47
53
|
__dirname, "../../open-api-generation/generate.sh");
|
|
48
54
|
const result = await execPromise(`${scriptPath} ${commandArguments.join(" ")}`);
|
|
49
55
|
console.log(result.stdout);
|
|
50
56
|
}
|
|
51
57
|
}
|
|
58
|
+
exports.WriteApiClientCommand = WriteApiClientCommand;
|
|
52
59
|
//# sourceMappingURL=WriteApiClientCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WriteApiClientCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/WriteApiClientCommand.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"WriteApiClientCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/WriteApiClientCommand.ts"],"names":[],"mappings":";;;;;;AAEA,iDAAmC;AACnC,gDAAgD;AAChD,gDAAwB;AACxB,gDAAwB;AAaxB,MAAa,qBAAqB;IAG9B,OAAO,GAAG,kBAAkB,CAAC;IAC7B,QAAQ,GACJ,qFAAqF,CAAC;IAE1F,yDAAyD;IACzD,OAAO,CAAC,IAAgB;QACpB,OAAO,IAAI;aACN,MAAM,CAAC,GAAG,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,8BAA8B;YACvC,QAAQ,EAAE,gDAAgD;SAC7D,CAAC;aACD,MAAM,CAAC,QAAQ,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,qBAAqB;YAC9B,QAAQ,EAAE,wCAAwC;SACrD,CAAC;aACD,MAAM,CAAC,QAAQ,EAAE;YACd,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,wBAAwB;YACjC,QAAQ,EAAE,gDAAgD;SAC7D,CAAC;aACD,MAAM,CAAC,aAAa,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,YAAY,EAAE,IAAI;YAClB,QAAQ,EAAE,mCAAmC;SAChD,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,OAAO;IACT,yDAAyD;IACzD,IAA6C;QAE7C,kBAAkB;QAElB,MAAM,WAAW,GAAG,cAAI,CAAC,SAAS,CAAC,oBAAI,CAAC,CAAC;QACzC,MAAM,gBAAgB,GAAG;YACrB,IAAI,CAAC,CAAC;YACN,IAAI,CAAC,MAAM;YACX,IAAI,CAAC,MAAM;YACX,IAAI,CAAC,WAAW;SACnB,CAAC;QACF,8BAA8B;QAC9B,6DAA6D;QAE7D,MAAM,UAAU,GAAG,cAAI,CAAC,IAAI;QACxB,kDAAkD;QAClD,SAAS,EACT,uCAAuC,CAC1C,CAAC;QACF,MAAM,MAAM,GAAG,MAAM,WAAW,CAC5B,GAAG,UAAU,IAAI,gBAAgB,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAChD,CAAC;QAEF,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;CACJ;AA3DD,sDA2DC"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WriteTypeOrmConfigCommand = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const fs_1 = __importDefault(require("fs"));
|
|
9
|
+
const dotenv_1 = __importDefault(require("dotenv"));
|
|
10
|
+
const PostgresTypeOrmConfigurationProvider_1 = require("../../database-postgres/PostgresTypeOrmConfigurationProvider");
|
|
11
|
+
const SqliteTypeOrmConfigurationProvider_1 = require("../../database-sqlite/SqliteTypeOrmConfigurationProvider");
|
|
12
|
+
dotenv_1.default.config();
|
|
13
|
+
class WriteTypeOrmConfigCommand {
|
|
8
14
|
command = "db:write-config";
|
|
9
15
|
describe = "Writes the latest orm config to ormconfig.json.";
|
|
10
16
|
// eslint-disable-next-line unicorn/prevent-abbreviations
|
|
@@ -29,12 +35,13 @@ export class WriteTypeOrmConfigCommand {
|
|
|
29
35
|
// const fullPath = (args.path as string).startsWith("/")
|
|
30
36
|
// ? (args.path as string)
|
|
31
37
|
// : path.resolve(process.cwd(), args.path as string);
|
|
32
|
-
let config = PostgresTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
38
|
+
let config = PostgresTypeOrmConfigurationProvider_1.PostgresTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
33
39
|
if (args.db === "sqlite") {
|
|
34
|
-
config = SqliteTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
40
|
+
config = SqliteTypeOrmConfigurationProvider_1.SqliteTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
35
41
|
}
|
|
36
|
-
console.log(
|
|
37
|
-
|
|
42
|
+
console.log(chalk_1.default.green(`Writing config to ${args.o}`));
|
|
43
|
+
fs_1.default.writeFileSync(args.o, JSON.stringify(config, undefined, 2));
|
|
38
44
|
}
|
|
39
45
|
}
|
|
46
|
+
exports.WriteTypeOrmConfigCommand = WriteTypeOrmConfigCommand;
|
|
40
47
|
//# sourceMappingURL=WriteTypeOrmConfigCommand.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WriteTypeOrmConfigCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/WriteTypeOrmConfigCommand.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"WriteTypeOrmConfigCommand.js","sourceRoot":"","sources":["../../../src/cli/commands/WriteTypeOrmConfigCommand.ts"],"names":[],"mappings":";;;;;;AAEA,kDAA0B;AAC1B,4CAAoB;AACpB,oDAA4B;AAC5B,uHAAkH;AAClH,iHAA4G;AAC5G,gBAAM,CAAC,MAAM,EAAE,CAAC;AAOhB,MAAa,yBAAyB;IAGlC,OAAO,GAAG,iBAAiB,CAAC;IAC5B,QAAQ,GAAG,iDAAiD,CAAC;IAE7D,yDAAyD;IACzD,OAAO,CAAC,IAAgB;QACpB,OAAO,IAAI;aACN,MAAM,CAAC,GAAG,EAAE;YACT,KAAK,EAAE,gBAAgB;YACvB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,gBAAgB;YACzB,QAAQ,EACJ,0DAA0D;SACjE,CAAC;aACD,MAAM,CAAC,IAAI,EAAE;YACV,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,IAAI;YACb,QAAQ,EACJ,4IAA4I;SACnJ,CAAC,CAAC;IACX,CAAC;IAED,KAAK,CAAC,OAAO;IACT,yDAAyD;IACzD,IAA6C;QAE7C,yDAAyD;QACzD,8BAA8B;QAC9B,0DAA0D;QAE1D,IAAI,MAAM,GAAG,2EAAoC,CAAC,gBAAgB,EAAE,CAAC;QAErE,IAAI,IAAI,CAAC,EAAE,KAAK,QAAQ,EAAE;YACtB,MAAM,GAAG,uEAAkC,CAAC,gBAAgB,EAAE,CAAC;SAClE;QACD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,qBAAqB,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAExD,YAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;CACJ;AA1CD,8DA0CC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ValidatedConfigurationService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const class_validator_1 = require("class-validator");
|
|
9
12
|
let ValidatedConfigurationService = class ValidatedConfigurationService {
|
|
10
13
|
async onModuleInit() {
|
|
11
|
-
const result = await validate(this);
|
|
14
|
+
const result = await (0, class_validator_1.validate)(this);
|
|
12
15
|
if (result.length > 0) {
|
|
13
16
|
const json = JSON.stringify(result.map((v) => {
|
|
14
17
|
return {
|
|
@@ -22,8 +25,8 @@ ${json}`);
|
|
|
22
25
|
}
|
|
23
26
|
};
|
|
24
27
|
ValidatedConfigurationService = __decorate([
|
|
25
|
-
Injectable()
|
|
28
|
+
(0, common_1.Injectable)()
|
|
26
29
|
// eslint-disable-next-line @darraghor/nestjs-typed/injectable-should-be-provided
|
|
27
30
|
], ValidatedConfigurationService);
|
|
28
|
-
|
|
31
|
+
exports.ValidatedConfigurationService = ValidatedConfigurationService;
|
|
29
32
|
//# sourceMappingURL=ValidatedConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ValidatedConfigurationService.js","sourceRoot":"","sources":["../../src/configuration/ValidatedConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ValidatedConfigurationService.js","sourceRoot":"","sources":["../../src/configuration/ValidatedConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwD;AACxD,qDAAyC;AAIlC,IAAe,6BAA6B,GAA5C,MAAe,6BAA6B;IAC/C,KAAK,CAAC,YAAY;QACd,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAQ,EAAC,IAAI,CAAC,CAAC;QACpC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;YACnB,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CACvB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE;gBACb,OAAO;oBACH,QAAQ,EAAE,CAAC,CAAC,QAAQ;oBACpB,WAAW,EAAE,CAAC,CAAC,WAAW;iBAC7B,CAAC;YACN,CAAC,CAAC,EACF,SAAS,EACT,CAAC,CACJ,CAAC;YACF,MAAM,IAAI,KAAK,CACX;EACd,IAAI,EAAE,CACK,CAAC;SACL;IACL,CAAC;CACJ,CAAA;AApBqB,6BAA6B;IAFlD,IAAA,mBAAU,GAAE;IACb,iFAAiF;GAC3D,6BAA6B,CAoBlD;AApBqB,sEAA6B"}
|
|
@@ -1,21 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoreConfigModule = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const config_1 = require("@nestjs/config");
|
|
15
|
+
const CoreConfigurationService_1 = require("./CoreConfigurationService");
|
|
16
|
+
const CoreConfigurationVariables_1 = __importDefault(require("./CoreConfigurationVariables"));
|
|
11
17
|
let CoreConfigModule = class CoreConfigModule {
|
|
12
18
|
};
|
|
13
19
|
CoreConfigModule = __decorate([
|
|
14
|
-
Module({
|
|
15
|
-
imports: [ConfigModule.forFeature(
|
|
16
|
-
exports: [CoreConfigurationService],
|
|
17
|
-
providers: [CoreConfigurationService],
|
|
20
|
+
(0, common_1.Module)({
|
|
21
|
+
imports: [config_1.ConfigModule.forFeature(CoreConfigurationVariables_1.default)],
|
|
22
|
+
exports: [CoreConfigurationService_1.CoreConfigurationService],
|
|
23
|
+
providers: [CoreConfigurationService_1.CoreConfigurationService],
|
|
18
24
|
})
|
|
19
25
|
], CoreConfigModule);
|
|
20
|
-
|
|
26
|
+
exports.CoreConfigModule = CoreConfigModule;
|
|
21
27
|
//# sourceMappingURL=CoreConfig.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreConfig.module.js","sourceRoot":"","sources":["../../src/core-config/CoreConfig.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoreConfig.module.js","sourceRoot":"","sources":["../../src/core-config/CoreConfig.module.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAAsC;AACtC,2CAA4C;AAC5C,yEAAoE;AACpE,8FAA2D;AAOpD,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAAG,CAAA;AAAnB,gBAAgB;IAL5B,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE,CAAC,qBAAY,CAAC,UAAU,CAAC,oCAAe,CAAC,CAAC;QACnD,OAAO,EAAE,CAAC,mDAAwB,CAAC;QACnC,SAAS,EAAE,CAAC,mDAAwB,CAAC;KACxC,CAAC;GACW,gBAAgB,CAAG;AAAnB,4CAAgB"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -7,12 +8,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
8
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
10
|
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.CoreConfigurationService = void 0;
|
|
10
13
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
let CoreConfigurationService = class CoreConfigurationService extends ValidatedConfigurationService {
|
|
14
|
+
const common_1 = require("@nestjs/common");
|
|
15
|
+
const config_1 = require("@nestjs/config");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
const ValidatedConfigurationService_1 = require("../configuration/ValidatedConfigurationService");
|
|
18
|
+
let CoreConfigurationService = class CoreConfigurationService extends ValidatedConfigurationService_1.ValidatedConfigurationService {
|
|
16
19
|
configService;
|
|
17
20
|
constructor(configService) {
|
|
18
21
|
super();
|
|
@@ -42,50 +45,50 @@ let CoreConfigurationService = class CoreConfigurationService extends ValidatedC
|
|
|
42
45
|
}
|
|
43
46
|
};
|
|
44
47
|
__decorate([
|
|
45
|
-
IsDefined(),
|
|
46
|
-
IsBoolean(),
|
|
48
|
+
(0, class_validator_1.IsDefined)(),
|
|
49
|
+
(0, class_validator_1.IsBoolean)(),
|
|
47
50
|
__metadata("design:type", Boolean),
|
|
48
51
|
__metadata("design:paramtypes", [])
|
|
49
52
|
], CoreConfigurationService.prototype, "shouldGenerateSwagger", null);
|
|
50
53
|
__decorate([
|
|
51
|
-
IsDefined(),
|
|
52
|
-
IsBoolean(),
|
|
54
|
+
(0, class_validator_1.IsDefined)(),
|
|
55
|
+
(0, class_validator_1.IsBoolean)(),
|
|
53
56
|
__metadata("design:type", Boolean),
|
|
54
57
|
__metadata("design:paramtypes", [])
|
|
55
58
|
], CoreConfigurationService.prototype, "shouldAutomaticallyInstallApiModels", null);
|
|
56
59
|
__decorate([
|
|
57
|
-
IsDefined(),
|
|
58
|
-
IsBoolean(),
|
|
60
|
+
(0, class_validator_1.IsDefined)(),
|
|
61
|
+
(0, class_validator_1.IsBoolean)(),
|
|
59
62
|
__metadata("design:type", Boolean),
|
|
60
63
|
__metadata("design:paramtypes", [])
|
|
61
64
|
], CoreConfigurationService.prototype, "shouldUseNestCors", null);
|
|
62
65
|
__decorate([
|
|
63
|
-
IsDefined(),
|
|
64
|
-
IsInt(),
|
|
66
|
+
(0, class_validator_1.IsDefined)(),
|
|
67
|
+
(0, class_validator_1.IsInt)(),
|
|
65
68
|
__metadata("design:type", Number),
|
|
66
69
|
__metadata("design:paramtypes", [])
|
|
67
70
|
], CoreConfigurationService.prototype, "webPort", null);
|
|
68
71
|
__decorate([
|
|
69
|
-
IsDefined(),
|
|
70
|
-
IsString(),
|
|
72
|
+
(0, class_validator_1.IsDefined)(),
|
|
73
|
+
(0, class_validator_1.IsString)(),
|
|
71
74
|
__metadata("design:type", String),
|
|
72
75
|
__metadata("design:paramtypes", [])
|
|
73
76
|
], CoreConfigurationService.prototype, "appTitle", null);
|
|
74
77
|
__decorate([
|
|
75
|
-
IsDefined(),
|
|
76
|
-
IsString(),
|
|
78
|
+
(0, class_validator_1.IsDefined)(),
|
|
79
|
+
(0, class_validator_1.IsString)(),
|
|
77
80
|
__metadata("design:type", String),
|
|
78
81
|
__metadata("design:paramtypes", [])
|
|
79
82
|
], CoreConfigurationService.prototype, "frontEndAppUrl", null);
|
|
80
83
|
__decorate([
|
|
81
|
-
IsDefined(),
|
|
82
|
-
IsString(),
|
|
84
|
+
(0, class_validator_1.IsDefined)(),
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
83
86
|
__metadata("design:type", String),
|
|
84
87
|
__metadata("design:paramtypes", [])
|
|
85
88
|
], CoreConfigurationService.prototype, "nodeEnv", null);
|
|
86
89
|
CoreConfigurationService = __decorate([
|
|
87
|
-
Injectable(),
|
|
88
|
-
__metadata("design:paramtypes", [ConfigService])
|
|
90
|
+
(0, common_1.Injectable)(),
|
|
91
|
+
__metadata("design:paramtypes", [config_1.ConfigService])
|
|
89
92
|
], CoreConfigurationService);
|
|
90
|
-
|
|
93
|
+
exports.CoreConfigurationService = CoreConfigurationService;
|
|
91
94
|
//# sourceMappingURL=CoreConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreConfigurationService.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CoreConfigurationService.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6DAA6D;AAC7D,2CAA0C;AAC1C,2CAA6C;AAC7C,qDAAsE;AACtE,kGAA6F;AAGtF,IAAM,wBAAwB,GAA9B,MAAM,wBAAyB,SAAQ,6DAA6B;IACnD;IAApB,YAAoB,aAA4B;QAC5C,KAAK,EAAE,CAAC;QADQ,kBAAa,GAAb,aAAa,CAAe;IAEhD,CAAC;IAED,IAEI,qBAAqB;QACrB,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,4BAA4B,CAAC;YAC5D,MAAM,CACT,CAAC;IACN,CAAC;IAED,IAEI,mCAAmC;QACnC,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAClB,0CAA0C,CAC7C,KAAK,MAAM,CACf,CAAC;IACN,CAAC;IAED,IAEI,iBAAiB;QACjB,OAAO,CACH,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,wBAAwB,CAAC,KAAK,MAAM,CACtE,CAAC;IACN,CAAC;IAED,IAEI,OAAO;QACP,OAAO,MAAM,CAAC,QAAQ,CAClB,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE,EAC/C,EAAE,CACL,CAAC;IACN,CAAC;IAED,IAEI,QAAQ;QACR,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,eAAe,CAAE,CAAC;IAC5D,CAAC;IAED,IAEI,cAAc;QACd,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,qBAAqB,CAAE,CAAC;IAClE,CAAC;IAED,IAEI,OAAO;QACP,OAAO,IAAI,CAAC,aAAa,CAAC,GAAG,CAAS,cAAc,CAAE,CAAC;IAC3D,CAAC;CACJ,CAAA;AArDG;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;qEAMX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;mFAOX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,2BAAS,GAAE;;;iEAKX;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,uBAAK,GAAE;;;uDAMP;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;wDAGV;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;8DAGV;AAED;IAAC,IAAA,2BAAS,GAAE;IACX,IAAA,0BAAQ,GAAE;;;uDAGV;AAzDQ,wBAAwB;IADpC,IAAA,mBAAU,GAAE;qCAE0B,sBAAa;GADvC,wBAAwB,CA0DpC;AA1DY,4DAAwB"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const config_1 = require("@nestjs/config");
|
|
4
|
+
exports.default = (0, config_1.registerAs)("core", () => ({
|
|
3
5
|
loggerName: process.env.LOGGER_NAME,
|
|
4
6
|
shouldGenerateSwagger: process.env.GENERATE_SWAGGER,
|
|
5
7
|
webPort: process.env.WEB_PORT,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CoreConfigurationVariables.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationVariables.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"CoreConfigurationVariables.js","sourceRoot":"","sources":["../../src/core-config/CoreConfigurationVariables.ts"],"names":[],"mappings":";;AAAA,2CAA0C;AAE1C,kBAAe,IAAA,mBAAU,EAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW;IACnC,qBAAqB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IACnD,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ;IAC7B,cAAc,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC5C,iBAAiB,EAAE,OAAO,CAAC,GAAG,CAAC,gBAAgB;IAC/C,mCAAmC,EAAE,OAAO,CAAC,GAAG,CAAC,uBAAuB;IACxE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,SAAS;CAClC,CAAC,CAAC,CAAC"}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.PostgresDatabaseModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const PostgresDatabaseConfigurationService_1 = require("./PostgresDatabaseConfigurationService");
|
|
13
|
+
const PostgresTypeOrmConfigurationProvider_1 = require("./PostgresTypeOrmConfigurationProvider");
|
|
11
14
|
let PostgresDatabaseModule = class PostgresDatabaseModule {
|
|
12
15
|
};
|
|
13
16
|
PostgresDatabaseModule = __decorate([
|
|
14
|
-
Global(),
|
|
15
|
-
Module({
|
|
17
|
+
(0, common_1.Global)(),
|
|
18
|
+
(0, common_1.Module)({
|
|
16
19
|
imports: [
|
|
17
|
-
TypeOrmModule.forRootAsync({
|
|
18
|
-
useFactory: () => Object.assign(PostgresTypeOrmConfigurationProvider.getTypeOrmConfig(), {
|
|
20
|
+
typeorm_1.TypeOrmModule.forRootAsync({
|
|
21
|
+
useFactory: () => Object.assign(PostgresTypeOrmConfigurationProvider_1.PostgresTypeOrmConfigurationProvider.getTypeOrmConfig(), {
|
|
19
22
|
autoLoadEntities: true,
|
|
20
23
|
}),
|
|
21
24
|
}),
|
|
22
25
|
],
|
|
23
|
-
exports: [DatabaseConfigurationService, TypeOrmModule],
|
|
24
|
-
providers: [DatabaseConfigurationService],
|
|
26
|
+
exports: [PostgresDatabaseConfigurationService_1.DatabaseConfigurationService, typeorm_1.TypeOrmModule],
|
|
27
|
+
providers: [PostgresDatabaseConfigurationService_1.DatabaseConfigurationService],
|
|
25
28
|
})
|
|
26
29
|
], PostgresDatabaseModule);
|
|
27
|
-
|
|
30
|
+
exports.PostgresDatabaseModule = PostgresDatabaseModule;
|
|
28
31
|
//# sourceMappingURL=PostgresDatabase.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresDatabase.module.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabase.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostgresDatabase.module.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabase.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8C;AAC9C,6CAA8C;AAC9C,iGAAoF;AACpF,iGAA4F;AAkBrF,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;CAAG,CAAA;AAAzB,sBAAsB;IAhBlC,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,uBAAa,CAAC,YAAY,CAAC;gBACvB,UAAU,EAAE,GAAG,EAAE,CACb,MAAM,CAAC,MAAM,CACT,2EAAoC,CAAC,gBAAgB,EAAE,EACvD;oBACI,gBAAgB,EAAE,IAAI;iBACzB,CACJ;aACR,CAAC;SACL;QACD,OAAO,EAAE,CAAC,mEAA4B,EAAE,uBAAa,CAAC;QACtD,SAAS,EAAE,CAAC,mEAA4B,CAAC;KAC5C,CAAC;GACW,sBAAsB,CAAG;AAAzB,wDAAsB"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.DatabaseConfigurationService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const PostgresTypeOrmConfigurationProvider_1 = require("./PostgresTypeOrmConfigurationProvider");
|
|
9
12
|
let DatabaseConfigurationService = class DatabaseConfigurationService {
|
|
10
13
|
/**
|
|
11
14
|
* @returns {TypeOrmModuleOptions} Database config for the current env
|
|
12
15
|
*/
|
|
13
16
|
getTypeOrmConfig() {
|
|
14
|
-
return PostgresTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
17
|
+
return PostgresTypeOrmConfigurationProvider_1.PostgresTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
15
18
|
}
|
|
16
19
|
};
|
|
17
20
|
DatabaseConfigurationService = __decorate([
|
|
18
|
-
Injectable()
|
|
21
|
+
(0, common_1.Injectable)()
|
|
19
22
|
], DatabaseConfigurationService);
|
|
20
|
-
|
|
23
|
+
exports.DatabaseConfigurationService = DatabaseConfigurationService;
|
|
21
24
|
//# sourceMappingURL=PostgresDatabaseConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabaseConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PostgresDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresDatabaseConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA0C;AAE1C,iGAA4F;AAGrF,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IACrC;;OAEG;IACI,gBAAgB;QACnB,OAAO,2EAAoC,CAAC,gBAAgB,EAAE,CAAC;IACnE,CAAC;CACJ,CAAA;AAPY,4BAA4B;IADxC,IAAA,mBAAU,GAAE;GACA,4BAA4B,CAOxC;AAPY,oEAA4B"}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.PostgresTypeOrmConfigurationProvider = void 0;
|
|
7
|
+
const path_1 = __importDefault(require("path"));
|
|
8
|
+
class PostgresTypeOrmConfigurationProvider {
|
|
3
9
|
/**
|
|
4
10
|
* This method uses process.env directly because it is also used in a node script that doesn't have access
|
|
5
11
|
* to NestJS injection.
|
|
@@ -7,12 +13,12 @@ export class PostgresTypeOrmConfigurationProvider {
|
|
|
7
13
|
*/
|
|
8
14
|
static getTypeOrmConfig() {
|
|
9
15
|
console.log("DIRNAME", __dirname);
|
|
10
|
-
const nodeModuleCorePath =
|
|
16
|
+
const nodeModuleCorePath = path_1.default.join(__dirname, process.env.CORE_MODULE_ENTITY_PATH || "..", "**", "*.entity.{ts,js}");
|
|
11
17
|
console.log("Using core entity path:", nodeModuleCorePath);
|
|
12
|
-
const appModulePath =
|
|
18
|
+
const appModulePath = path_1.default.join(__dirname, process.env.APP_MODULE_ENTITY_PATH ||
|
|
13
19
|
"../../../../../apps/backend/dist", "**", "*.entity.{ts,js}");
|
|
14
20
|
console.log("Using application entity path:", appModulePath);
|
|
15
|
-
const migrationsPath =
|
|
21
|
+
const migrationsPath = path_1.default.join(__dirname, process.env.MIGRATIONS_PATH || "../../../../../apps/backend/dist", "**", "migrations", "*.{ts,js}");
|
|
16
22
|
console.log("Using migration path:", migrationsPath);
|
|
17
23
|
// database url is used in dokku
|
|
18
24
|
if (process.env.DATABASE_URL) {
|
|
@@ -48,4 +54,5 @@ export class PostgresTypeOrmConfigurationProvider {
|
|
|
48
54
|
}; // this is dynamic based on the type discriminator
|
|
49
55
|
}
|
|
50
56
|
}
|
|
57
|
+
exports.PostgresTypeOrmConfigurationProvider = PostgresTypeOrmConfigurationProvider;
|
|
51
58
|
//# sourceMappingURL=PostgresTypeOrmConfigurationProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostgresTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresTypeOrmConfigurationProvider.ts"],"names":[],"mappings":"AAGA,
|
|
1
|
+
{"version":3,"file":"PostgresTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-postgres/PostgresTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";;;;;;AAGA,gDAAwB;AAGxB,MAAa,oCAAoC;IAC7C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAClC,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAChC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAAC;QAE3D,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAC3B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,aAAa,CAAC,CAAC;QAE7D,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAC5B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kCAAkC,EACjE,IAAI,EACJ,YAAY,EACZ,WAAW,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC;QACrD,gCAAgC;QAChC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE;YAC1B,OAAO;gBACH,IAAI,EAAE,UAAU;gBAChB,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;gBAC7B,OAAO,EAAE,KAAK;gBACd,mBAAmB,EAAE,YAAY;gBACjC,aAAa,EAAE,IAAI;gBACnB,WAAW,EAAE,KAAK;gBAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;gBAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;aAC/B,CAAC;SACL;QACD,iDAAiD;QACjD,OAAO;YACH,IAAI,EAAE,UAAU;YAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;YACnC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,IAAI,MAAM,EAAE,EAAE,CAAC;YAClE,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,iBAAiB;YACvC,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC3C,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB;YAC3C,MAAM,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB;YACvC,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,IAAI;YACnB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC,CAAC,kDAAkD;IAC9E,CAAC;CACJ;AAlED,oFAkEC"}
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SqliteDatabaseModule = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const typeorm_1 = require("@nestjs/typeorm");
|
|
12
|
+
const SqliteDatabaseConfigurationService_1 = require("./SqliteDatabaseConfigurationService");
|
|
13
|
+
const SqliteTypeOrmConfigurationProvider_1 = require("./SqliteTypeOrmConfigurationProvider");
|
|
11
14
|
let SqliteDatabaseModule = class SqliteDatabaseModule {
|
|
12
15
|
};
|
|
13
16
|
SqliteDatabaseModule = __decorate([
|
|
14
|
-
Global(),
|
|
15
|
-
Module({
|
|
17
|
+
(0, common_1.Global)(),
|
|
18
|
+
(0, common_1.Module)({
|
|
16
19
|
imports: [
|
|
17
|
-
TypeOrmModule.forRootAsync({
|
|
18
|
-
useFactory: () => Object.assign(SqliteTypeOrmConfigurationProvider.getTypeOrmConfig(), {
|
|
20
|
+
typeorm_1.TypeOrmModule.forRootAsync({
|
|
21
|
+
useFactory: () => Object.assign(SqliteTypeOrmConfigurationProvider_1.SqliteTypeOrmConfigurationProvider.getTypeOrmConfig(), {
|
|
19
22
|
autoLoadEntities: true,
|
|
20
23
|
}),
|
|
21
24
|
}),
|
|
22
25
|
],
|
|
23
|
-
exports: [SqliteDatabaseConfigurationService, TypeOrmModule],
|
|
24
|
-
providers: [SqliteDatabaseConfigurationService],
|
|
26
|
+
exports: [SqliteDatabaseConfigurationService_1.SqliteDatabaseConfigurationService, typeorm_1.TypeOrmModule],
|
|
27
|
+
providers: [SqliteDatabaseConfigurationService_1.SqliteDatabaseConfigurationService],
|
|
25
28
|
})
|
|
26
29
|
], SqliteDatabaseModule);
|
|
27
|
-
|
|
30
|
+
exports.SqliteDatabaseModule = SqliteDatabaseModule;
|
|
28
31
|
//# sourceMappingURL=SqliteDatabase.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteDatabase.module.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteDatabase.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SqliteDatabase.module.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteDatabase.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA8C;AAC9C,6CAA8C;AAC9C,6FAAwF;AACxF,6FAAwF;AAkBjF,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB;CAAG,CAAA;AAAvB,oBAAoB;IAhBhC,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC;QACJ,OAAO,EAAE;YACL,uBAAa,CAAC,YAAY,CAAC;gBACvB,UAAU,EAAE,GAAG,EAAE,CACb,MAAM,CAAC,MAAM,CACT,uEAAkC,CAAC,gBAAgB,EAAE,EACrD;oBACI,gBAAgB,EAAE,IAAI;iBACzB,CACJ;aACR,CAAC;SACL;QACD,OAAO,EAAE,CAAC,uEAAkC,EAAE,uBAAa,CAAC;QAC5D,SAAS,EAAE,CAAC,uEAAkC,CAAC;KAClD,CAAC;GACW,oBAAoB,CAAG;AAAvB,oDAAoB"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
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;
|
|
5
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.SqliteDatabaseConfigurationService = void 0;
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const SqliteTypeOrmConfigurationProvider_1 = require("./SqliteTypeOrmConfigurationProvider");
|
|
9
12
|
let SqliteDatabaseConfigurationService = class SqliteDatabaseConfigurationService {
|
|
10
13
|
/**
|
|
11
14
|
* This method uses process.env directly because it is also used in a node script that doesn't have access
|
|
@@ -13,11 +16,11 @@ let SqliteDatabaseConfigurationService = class SqliteDatabaseConfigurationServic
|
|
|
13
16
|
* @returns {TypeOrmModuleOptions} Database config for the current env
|
|
14
17
|
*/
|
|
15
18
|
getTypeOrmConfig() {
|
|
16
|
-
return SqliteTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
19
|
+
return SqliteTypeOrmConfigurationProvider_1.SqliteTypeOrmConfigurationProvider.getTypeOrmConfig();
|
|
17
20
|
}
|
|
18
21
|
};
|
|
19
22
|
SqliteDatabaseConfigurationService = __decorate([
|
|
20
|
-
Injectable()
|
|
23
|
+
(0, common_1.Injectable)()
|
|
21
24
|
], SqliteDatabaseConfigurationService);
|
|
22
|
-
|
|
25
|
+
exports.SqliteDatabaseConfigurationService = SqliteDatabaseConfigurationService;
|
|
23
26
|
//# sourceMappingURL=SqliteDatabaseConfigurationService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteDatabaseConfigurationService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SqliteDatabaseConfigurationService.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteDatabaseConfigurationService.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA0C;AAE1C,6FAAwF;AAGjF,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAC3C;;;;OAIG;IACI,gBAAgB;QACnB,OAAO,uEAAkC,CAAC,gBAAgB,EAAE,CAAC;IACjE,CAAC;CACJ,CAAA;AATY,kCAAkC;IAD9C,IAAA,mBAAU,GAAE;GACA,kCAAkC,CAS9C;AATY,gFAAkC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
/* eslint-disable unicorn/prefer-module */
|
|
2
|
-
|
|
3
|
-
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.SqliteTypeOrmConfigurationProvider = void 0;
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
class SqliteTypeOrmConfigurationProvider {
|
|
4
10
|
/**
|
|
5
11
|
* This method uses process.env directly because it is also used in a node script that doesn't have access
|
|
6
12
|
* to NestJS injection.
|
|
@@ -8,12 +14,12 @@ export class SqliteTypeOrmConfigurationProvider {
|
|
|
8
14
|
*/
|
|
9
15
|
static getTypeOrmConfig() {
|
|
10
16
|
console.log("DIRNAME", __dirname);
|
|
11
|
-
const nodeModuleCorePath =
|
|
17
|
+
const nodeModuleCorePath = path_1.default.join(__dirname, process.env.CORE_MODULE_ENTITY_PATH || "..", "**", "*.entity.{ts,js}");
|
|
12
18
|
console.log("Using core entity path:", nodeModuleCorePath);
|
|
13
|
-
const appModulePath =
|
|
19
|
+
const appModulePath = path_1.default.join(__dirname, process.env.APP_MODULE_ENTITY_PATH ||
|
|
14
20
|
"../../../../../apps/backend/dist", "**", "*.entity.{ts,js}");
|
|
15
21
|
console.log("Using application entity path:", appModulePath);
|
|
16
|
-
const migrationsPath =
|
|
22
|
+
const migrationsPath = path_1.default.join(__dirname, process.env.MIGRATIONS_PATH || "../../../../../apps/backend/dist", "**", "migrations", "*.{ts,js}");
|
|
17
23
|
console.log("Using migration path:", migrationsPath);
|
|
18
24
|
return {
|
|
19
25
|
type: "sqlite",
|
|
@@ -30,4 +36,5 @@ export class SqliteTypeOrmConfigurationProvider {
|
|
|
30
36
|
};
|
|
31
37
|
}
|
|
32
38
|
}
|
|
39
|
+
exports.SqliteTypeOrmConfigurationProvider = SqliteTypeOrmConfigurationProvider;
|
|
33
40
|
//# sourceMappingURL=SqliteTypeOrmConfigurationProvider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":"AAAA,0CAA0C
|
|
1
|
+
{"version":3,"file":"SqliteTypeOrmConfigurationProvider.js","sourceRoot":"","sources":["../../src/database-sqlite/SqliteTypeOrmConfigurationProvider.ts"],"names":[],"mappings":";AAAA,0CAA0C;;;;;;AAG1C,gDAAwB;AAGxB,MAAa,kCAAkC;IAC3C;;;;OAIG;IACI,MAAM,CAAC,gBAAgB;QAC1B,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;QAClC,MAAM,kBAAkB,GAAG,cAAI,CAAC,IAAI,CAChC,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,uBAAuB,IAAI,IAAI,EAC3C,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,kBAAkB,CAAC,CAAC;QAE3D,MAAM,aAAa,GAAG,cAAI,CAAC,IAAI,CAC3B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,sBAAsB;YAC9B,kCAAkC,EACtC,IAAI,EACJ,kBAAkB,CACrB,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,gCAAgC,EAAE,aAAa,CAAC,CAAC;QAE7D,MAAM,cAAc,GAAG,cAAI,CAAC,IAAI,CAC5B,SAAS,EACT,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,kCAAkC,EACjE,IAAI,EACJ,YAAY,EACZ,WAAW,CACd,CAAC;QACF,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,cAAc,CAAC,CAAC;QAErD,OAAO;YACH,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB;YAC9C,OAAO,EAAE,KAAK;YACd,mBAAmB,EAAE,YAAY;YACjC,aAAa,EAAE,KAAK;YACpB,WAAW,EAAE,KAAK;YAClB,QAAQ,EAAE,CAAC,kBAAkB,EAAE,aAAa,CAAC;YAC7C,UAAU,EAAE,CAAC,cAAc,CAAC;YAC5B,GAAG,EAAE;gBACD,aAAa,EAAE,gBAAgB;aAClC;SACiB,CAAC;IAC3B,CAAC;CACJ;AAhDD,gFAgDC"}
|