@qrvey/data-persistence 0.0.3-Rev-1-ds-support-array-v2 → 0.0.3-Rev-1-ds-support-array-v3
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.
|
@@ -1,43 +1,14 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
3
|
exports.CrudFactory = void 0;
|
|
4
|
+
const cruds_1 = require("./cruds");
|
|
27
5
|
class CrudFactory {
|
|
28
|
-
static
|
|
6
|
+
static databaseClientService(crudSchema) {
|
|
29
7
|
var _a;
|
|
30
8
|
const isMultiPlatformMode = ((_a = process.env.PLATFORM_TYPE) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === 'container';
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
DatabaseCrudService = PostgreSqlCrudService;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
const { DynamoDbCrudService } = await Promise.resolve().then(() => __importStar(require('./cruds')));
|
|
38
|
-
DatabaseCrudService = DynamoDbCrudService;
|
|
39
|
-
}
|
|
40
|
-
return new DatabaseCrudService(crudSchema);
|
|
9
|
+
if (isMultiPlatformMode)
|
|
10
|
+
return new cruds_1.PostgreSqlCrudService(crudSchema);
|
|
11
|
+
return new cruds_1.DynamoDbCrudService(crudSchema);
|
|
41
12
|
}
|
|
42
13
|
}
|
|
43
14
|
exports.CrudFactory = CrudFactory;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crudFactory.service.js","sourceRoot":"","sources":["../../../src/services/crudFactory.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crudFactory.service.js","sourceRoot":"","sources":["../../../src/services/crudFactory.service.ts"],"names":[],"mappings":";;;AAEA,mCAAqE;AACrE,MAAa,WAAW;IACpB,MAAM,CAAC,qBAAqB,CACxB,UAA6B;;QAE7B,MAAM,mBAAmB,GACrB,CAAA,MAAA,OAAO,CAAC,GAAG,CAAC,aAAa,0CAAE,WAAW,EAAE,MAAK,WAAW,CAAC;QAE7D,IAAI,mBAAmB;YACnB,OAAO,IAAI,6BAAqB,CAAI,UAAU,CAAC,CAAC;QACpD,OAAO,IAAI,2BAAmB,CAAI,UAAU,CAAC,CAAC;IAClD,CAAC;CACJ;AAXD,kCAWC"}
|
package/package.json
CHANGED