@researchdatabox/sails-hook-redbox-storage-mongo 0.0.1-beta.10173
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/README.md +25 -0
- package/dist/config/record.d.ts +3 -0
- package/dist/config/record.js +7 -0
- package/dist/config/storage.d.ts +105 -0
- package/dist/config/storage.js +25 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +31 -0
- package/dist/models/DeletedRecord.d.ts +7 -0
- package/dist/models/DeletedRecord.js +37 -0
- package/dist/models/IntegrationAudit.d.ts +22 -0
- package/dist/models/IntegrationAudit.js +112 -0
- package/dist/models/Record.d.ts +13 -0
- package/dist/models/Record.js +64 -0
- package/dist/models/RecordAudit.d.ts +9 -0
- package/dist/models/RecordAudit.js +47 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +32 -0
- package/dist/services/MongoStorageService.d.ts +81 -0
- package/dist/services/MongoStorageService.js +1185 -0
- package/dist/services/index.d.ts +5 -0
- package/dist/services/index.js +51 -0
- package/package.json +100 -0
|
@@ -0,0 +1,51 @@
|
|
|
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 () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ServiceExports = exports.MongoStorageService = void 0;
|
|
37
|
+
const MongoStorageServiceModule = __importStar(require("./MongoStorageService"));
|
|
38
|
+
exports.MongoStorageService = MongoStorageServiceModule;
|
|
39
|
+
const serviceCache = {};
|
|
40
|
+
function getOrCreateService(name, factory) {
|
|
41
|
+
if (!serviceCache[name]) {
|
|
42
|
+
serviceCache[name] = factory();
|
|
43
|
+
}
|
|
44
|
+
return serviceCache[name];
|
|
45
|
+
}
|
|
46
|
+
exports.ServiceExports = {
|
|
47
|
+
get MongoStorageService() {
|
|
48
|
+
return getOrCreateService('MongoStorageService', () => new MongoStorageServiceModule.Services.MongoStorageService().exports());
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvc2VydmljZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsaUZBQW1FO0FBWTdCLHdEQUFtQjtBQVZ6RCxNQUFNLFlBQVksR0FBNEIsRUFBRSxDQUFDO0FBRWpELFNBQVMsa0JBQWtCLENBQUMsSUFBWSxFQUFFLE9BQXNCO0lBQzlELElBQUksQ0FBQyxZQUFZLENBQUMsSUFBSSxDQUFDLEVBQUUsQ0FBQztRQUN4QixZQUFZLENBQUMsSUFBSSxDQUFDLEdBQUcsT0FBTyxFQUFFLENBQUM7SUFDakMsQ0FBQztJQUVELE9BQU8sWUFBWSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQzVCLENBQUM7QUFJWSxRQUFBLGNBQWMsR0FBRztJQUM1QixJQUFJLG1CQUFtQjtRQUNyQixPQUFPLGtCQUFrQixDQUFDLHFCQUFxQixFQUFFLEdBQUcsRUFBRSxDQUNwRCxJQUFJLHlCQUF5QixDQUFDLFFBQVEsQ0FBQyxtQkFBbUIsRUFBRSxDQUFDLE9BQU8sRUFBRSxDQUN2RSxDQUFDO0lBQ0osQ0FBQztDQUNGLENBQUMifQ==
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@researchdatabox/sails-hook-redbox-storage-mongo",
|
|
3
|
+
"version": "0.0.1-beta.10173",
|
|
4
|
+
"description": "A MongoDB storage plugin for ReDBox.",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist",
|
|
9
|
+
"README.md"
|
|
10
|
+
],
|
|
11
|
+
"sails": {
|
|
12
|
+
"isHook": true,
|
|
13
|
+
"hasModels": true,
|
|
14
|
+
"hasServices": true,
|
|
15
|
+
"hasConfig": true
|
|
16
|
+
},
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "https://github.com/redbox-mint/sails-hook-redbox-storage-mongo.git"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"compile": "npm run build",
|
|
23
|
+
"build": "tsc -p tsconfig.json",
|
|
24
|
+
"test": "TS_NODE_PROJECT=test/tsconfig.json mocha --require ts-node/register --require test/setup.ts --extension ts --recursive test",
|
|
25
|
+
"test:coverage": "TS_NODE_PROJECT=test/tsconfig.json nyc --no-clean --report-dir ./coverage/storage-mongo --reporter=lcov --reporter=text --exclude-after-remap=false mocha --require ts-node/register --require test/setup.ts --extension ts --recursive test",
|
|
26
|
+
"test:compile": "tsc -p test/tsconfig.json",
|
|
27
|
+
"lint": "cd ../.. && oxlint packages/sails-hook-redbox-storage-mongo/src packages/sails-hook-redbox-storage-mongo/test",
|
|
28
|
+
"lint:fix": "cd ../.. && oxlint packages/sails-hook-redbox-storage-mongo/src packages/sails-hook-redbox-storage-mongo/test --fix",
|
|
29
|
+
"format:check": "prettier --check \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
30
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\""
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"sails",
|
|
34
|
+
"hook",
|
|
35
|
+
"redbox",
|
|
36
|
+
"redbox research",
|
|
37
|
+
"redbox storage",
|
|
38
|
+
"redbox mongodb"
|
|
39
|
+
],
|
|
40
|
+
"author": "QCIF Engineering dev@redboxresearchdata.com.au",
|
|
41
|
+
"license": "GPL-3.0",
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/chai": "5.2.3",
|
|
44
|
+
"@types/lodash": "4.17.24",
|
|
45
|
+
"@types/mocha": "10.0.10",
|
|
46
|
+
"@tsconfig/node24": "24.0.4",
|
|
47
|
+
"@types/sinon": "21.0.1",
|
|
48
|
+
"@types/node": "24.12.4",
|
|
49
|
+
"chai": "6.2.2",
|
|
50
|
+
"luxon": "3.7.2",
|
|
51
|
+
"mocha": "11.7.6",
|
|
52
|
+
"mocha-junit-reporter": "2.2.1",
|
|
53
|
+
"mongodb": "7.2.0",
|
|
54
|
+
"nyc": "18.0.0",
|
|
55
|
+
"sails": "1.5.17",
|
|
56
|
+
"sinon": "22.0.0",
|
|
57
|
+
"serialize-javascript": "7.0.5",
|
|
58
|
+
"stream": "0.0.3",
|
|
59
|
+
"ts-node": "10.9.2",
|
|
60
|
+
"typescript": "5.9.3",
|
|
61
|
+
"util": "0.12.5"
|
|
62
|
+
},
|
|
63
|
+
"dependencies": {
|
|
64
|
+
"@researchdatabox/redbox-core": "0.0.1-beta.10173",
|
|
65
|
+
"json2csv": "5.0.7",
|
|
66
|
+
"lodash": "4.18.1",
|
|
67
|
+
"mongodb": "7.2.0",
|
|
68
|
+
"reflect-metadata": "0.2.2",
|
|
69
|
+
"uuid": "14.0.0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"luxon": "3.7.2",
|
|
73
|
+
"rxjs": "7.8.2"
|
|
74
|
+
},
|
|
75
|
+
"overrides": {
|
|
76
|
+
"on-headers": "1.1.0",
|
|
77
|
+
"serialize-javascript": "7.0.5",
|
|
78
|
+
"uuid": "14.0.0",
|
|
79
|
+
"compression": {
|
|
80
|
+
"on-headers": "1.1.0"
|
|
81
|
+
},
|
|
82
|
+
"express-session": {
|
|
83
|
+
"on-headers": "1.1.0"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
"publishConfig": {
|
|
87
|
+
"access": "public",
|
|
88
|
+
"registry": "https://registry.npmjs.org/"
|
|
89
|
+
},
|
|
90
|
+
"nyc": {
|
|
91
|
+
"all": true,
|
|
92
|
+
"include": [
|
|
93
|
+
"src/**/*.ts"
|
|
94
|
+
],
|
|
95
|
+
"reporter": [
|
|
96
|
+
"lcov",
|
|
97
|
+
"text"
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
}
|