@qrvey/data-persistence
Advanced tools
Comparing version 0.3.6-beta.2 to 0.3.6-bundle
@@ -22,3 +22,3 @@ "use strict"; | ||
async getCrudServiceInstance() { | ||
const crudService = await crudFactory_service_1.CrudFactory.databaseClientService(this.crudSchema, this.poolClient); | ||
const crudService = await crudFactory_service_1.CrudFactory.databaseClientService(this.crudSchema); | ||
return crudService; | ||
@@ -25,0 +25,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.CrudFactory = void 0; | ||
const cruds_1 = require("./cruds/"); | ||
class CrudFactory { | ||
static async databaseClientService(crudSchema, poolClient) { | ||
static databaseClientService(crudSchema) { | ||
var _a; | ||
const isMultiPlatformMode = ((_a = process.env.PLATFORM_TYPE) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'container'; | ||
let DatabaseCrudService; | ||
if (isMultiPlatformMode) { | ||
const module = await Promise.resolve().then(() => __importStar(require('./cruds/postgresql/postgreSqlCrud.service'))); | ||
DatabaseCrudService = module.PostgreSqlCrudService; | ||
} | ||
else { | ||
const module = await Promise.resolve().then(() => __importStar(require('./cruds/dynamodb/dynamoDbCrud.service'))); | ||
DatabaseCrudService = module.DynamoDbCrudService; | ||
} | ||
return new DatabaseCrudService(crudSchema, poolClient); | ||
if (isMultiPlatformMode) | ||
return new cruds_1.PostgreSqlCrudService(crudSchema); | ||
return new cruds_1.DynamoDbCrudService(crudSchema); | ||
} | ||
@@ -42,0 +13,0 @@ } |
@@ -5,3 +5,3 @@ { | ||
"main": "dist/cjs/index.js", | ||
"version": "0.3.6-beta.2", | ||
"version": "0.3.6-bundle", | ||
"license": "MIT", | ||
@@ -31,5 +31,5 @@ "exports": { | ||
"publish-package-dev": "yarn prepare-publish && yarn publish-codeartifact", | ||
"publish-package": "yarn prepare-publish && npm publish --tag beta" | ||
"publish-package": "yarn prepare-publish && npm publish --tag beta" | ||
}, | ||
"peerDependencies": { | ||
"dependencies": { | ||
"@aws-sdk/client-dynamodb": "3.x", | ||
@@ -40,16 +40,2 @@ "@aws-sdk/lib-dynamodb": "3.x", | ||
}, | ||
"peerDependenciesMeta": { | ||
"@aws-sdk/client-dynamodb": { | ||
"optional": true | ||
}, | ||
"@aws-sdk/lib-dynamodb": { | ||
"optional": true | ||
}, | ||
"pg": { | ||
"optional": true | ||
}, | ||
"pg-format": { | ||
"optional": true | ||
} | ||
}, | ||
"devDependencies": { | ||
@@ -56,0 +42,0 @@ "@types/jest": "29.5.5", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
356291
98
3960
10
+ Added@aws-sdk/client-dynamodb@3.x
+ Added@aws-sdk/lib-dynamodb@3.x
+ Addedpg@8.11.4
+ Addedpg-format@1.0.4