@ldsg/key-value-cache 0.2.5
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/LICENSE +22 -0
- package/README.md +1 -0
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +30 -0
- package/dist/handler.d.ts +8 -0
- package/dist/handler.d.ts.map +1 -0
- package/dist/handler.js +5 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/instantiate-resource.d.ts +5 -0
- package/dist/instantiate-resource.d.ts.map +1 -0
- package/dist/instantiate-resource.js +13 -0
- package/dist/resource.d.ts +39 -0
- package/dist/resource.d.ts.map +1 -0
- package/dist/resource.js +91 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +17 -0
- package/dist/types/specific-resource-settings.d.ts +12 -0
- package/dist/types/specific-resource-settings.d.ts.map +1 -0
- package/dist/types/specific-resource-settings.js +2 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# LDSG Key Value Cache Resource
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { HandlerSpecificResourceSettings } from "@ldsg/handler";
|
|
2
|
+
import { ResourceDefinitionSpecificResourceSettings } from "@ldsg/resource-definition";
|
|
3
|
+
import { GeneralResourceSettings } from "@ldsg/types";
|
|
4
|
+
/**
|
|
5
|
+
* Instantiate Resource Handler General Resource Settings
|
|
6
|
+
* 实例化资源处理程序普通资源配置
|
|
7
|
+
*/
|
|
8
|
+
export declare const INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS: GeneralResourceSettings;
|
|
9
|
+
/**
|
|
10
|
+
* Instantiate Resource Handler Specific Resource Settings
|
|
11
|
+
* 实例化资源处理程序特殊资源配置
|
|
12
|
+
* 框架通过此实例化此资源
|
|
13
|
+
*/
|
|
14
|
+
export declare const INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS: HandlerSpecificResourceSettings;
|
|
15
|
+
export declare const RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS: GeneralResourceSettings;
|
|
16
|
+
export declare const RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS: ResourceDefinitionSpecificResourceSettings;
|
|
17
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,0CAA0C,EAAE,MAAM,2BAA2B,CAAC;AACvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAEtD;;;GAGG;AACH,eAAO,MAAM,sDAAsD,EAAE,uBAIlE,CAAC;AAEJ;;;;GAIG;AACH,eAAO,MAAM,uDAAuD,EAAE,+BAQnE,CAAC;AAEJ,eAAO,MAAM,6CAA6C,EAAE,uBACnB,CAAC;AAE1C,eAAO,MAAM,8CAA8C,EAAE,0CAI1D,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = void 0;
|
|
4
|
+
const constants_1 = require("@ldsg/constants");
|
|
5
|
+
/**
|
|
6
|
+
* Instantiate Resource Handler General Resource Settings
|
|
7
|
+
* 实例化资源处理程序普通资源配置
|
|
8
|
+
*/
|
|
9
|
+
exports.INSTANTIATE_RESOURCE_HANDLER_GENERAL_RESOURCE_SETTINGS = {
|
|
10
|
+
title: "键值对缓存实例化资源处理程序",
|
|
11
|
+
description: "",
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Instantiate Resource Handler Specific Resource Settings
|
|
15
|
+
* 实例化资源处理程序特殊资源配置
|
|
16
|
+
* 框架通过此实例化此资源
|
|
17
|
+
*/
|
|
18
|
+
exports.INSTANTIATE_RESOURCE_HANDLER_SPECIFIC_RESOURCE_SETTINGS = {
|
|
19
|
+
code: `export * from "@ldsg/key-value-cache";`,
|
|
20
|
+
dependencies: [
|
|
21
|
+
{
|
|
22
|
+
name: "@ldsg/key-value-cache",
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
};
|
|
26
|
+
exports.RESOURCE_DEFINITION_GENERAL_RESOURCE_SETTINGS = { title: "键值对缓存资源定义", description: "" };
|
|
27
|
+
exports.RESOURCE_DEFINITION_SPECIFIC_RESOURCE_SETTINGS = {
|
|
28
|
+
kind: "key_value_cache",
|
|
29
|
+
parentKind: constants_1.ROOT_RESOURCE_KIND,
|
|
30
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Handler } from "@ldsg/handler";
|
|
2
|
+
import { InstantiateResourceParams, InstantiateResourceRes } from "@ldsg/resource";
|
|
3
|
+
import { KeyValueCacheResource } from "./resource";
|
|
4
|
+
import { KeyValueCacheSpecificResourceSettings } from "./types";
|
|
5
|
+
export declare const handler: Handler<[
|
|
6
|
+
InstantiateResourceParams<KeyValueCacheSpecificResourceSettings>
|
|
7
|
+
], InstantiateResourceRes<KeyValueCacheResource>>;
|
|
8
|
+
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../src/handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,OAAO,EAAE,OAAO,CAC3B;IAAC,yBAAyB,CAAC,qCAAqC,CAAC;CAAC,EAClE,sBAAsB,CAAC,qBAAqB,CAAC,CACxB,CAAC"}
|
package/dist/handler.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./constants"), exports);
|
|
18
|
+
__exportStar(require("./handler"), exports);
|
|
19
|
+
__exportStar(require("./instantiate-resource"), exports);
|
|
20
|
+
__exportStar(require("./resource"), exports);
|
|
21
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InstantiateResource } from "@ldsg/resource";
|
|
2
|
+
import { KeyValueCacheResource } from "./resource";
|
|
3
|
+
import { KeyValueCacheSpecificResourceSettings } from "./types";
|
|
4
|
+
export declare const instantiateResource: InstantiateResource<KeyValueCacheSpecificResourceSettings, KeyValueCacheResource>;
|
|
5
|
+
//# sourceMappingURL=instantiate-resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instantiate-resource.d.ts","sourceRoot":"","sources":["../src/instantiate-resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAEhE,eAAO,MAAM,mBAAmB,EAAE,mBAAmB,CACnD,qCAAqC,EACrC,qBAAqB,CAWtB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.instantiateResource = void 0;
|
|
4
|
+
const resource_1 = require("./resource");
|
|
5
|
+
const instantiateResource = (params) => {
|
|
6
|
+
const { resourceConstructorParams } = params;
|
|
7
|
+
const resource = new resource_1.KeyValueCacheResource(resourceConstructorParams);
|
|
8
|
+
const res = {
|
|
9
|
+
resource,
|
|
10
|
+
};
|
|
11
|
+
return res;
|
|
12
|
+
};
|
|
13
|
+
exports.instantiateResource = instantiateResource;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Resource, ResourceConstructorParams } from "@ldsg/resource";
|
|
2
|
+
import mongoose from "mongoose";
|
|
3
|
+
import { KeyValueCacheSpecificResourceSettings } from "./types";
|
|
4
|
+
export declare class KeyValueCacheResource extends Resource<KeyValueCacheSpecificResourceSettings> {
|
|
5
|
+
keyValueCacheModel: mongoose.Model<{
|
|
6
|
+
key?: string | null | undefined;
|
|
7
|
+
value?: string | null | undefined;
|
|
8
|
+
}, {}, {}, {}, mongoose.Document<unknown, {}, {
|
|
9
|
+
key?: string | null | undefined;
|
|
10
|
+
value?: string | null | undefined;
|
|
11
|
+
}, {}> & {
|
|
12
|
+
key?: string | null | undefined;
|
|
13
|
+
value?: string | null | undefined;
|
|
14
|
+
} & {
|
|
15
|
+
_id: mongoose.Types.ObjectId;
|
|
16
|
+
} & {
|
|
17
|
+
__v: number;
|
|
18
|
+
}, mongoose.Schema<any, mongoose.Model<any, any, any, any, any, any>, {}, {}, {}, {}, mongoose.DefaultSchemaOptions, {
|
|
19
|
+
key?: string | null | undefined;
|
|
20
|
+
value?: string | null | undefined;
|
|
21
|
+
}, mongoose.Document<unknown, {}, mongoose.FlatRecord<{
|
|
22
|
+
key?: string | null | undefined;
|
|
23
|
+
value?: string | null | undefined;
|
|
24
|
+
}>, {}> & mongoose.FlatRecord<{
|
|
25
|
+
key?: string | null | undefined;
|
|
26
|
+
value?: string | null | undefined;
|
|
27
|
+
}> & {
|
|
28
|
+
_id: mongoose.Types.ObjectId;
|
|
29
|
+
} & {
|
|
30
|
+
__v: number;
|
|
31
|
+
}>>;
|
|
32
|
+
constructor(params: ResourceConstructorParams<KeyValueCacheSpecificResourceSettings>);
|
|
33
|
+
getRealKeyInDatabase: (key: string) => string;
|
|
34
|
+
clear: () => Promise<void>;
|
|
35
|
+
getItem: (key: string) => Promise<string | null | undefined>;
|
|
36
|
+
setItem: (key: string, value: any) => Promise<void>;
|
|
37
|
+
removeItem: (key: string) => Promise<void>;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../src/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,yBAAyB,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,QAAoB,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,qCAAqC,EAAE,MAAM,SAAS,CAAC;AAEhE,qBAAa,qBAAsB,SAAQ,QAAQ,CAAC,qCAAqC,CAAC;IACxF,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;QAAC;gBAGjB,MAAM,EAAE,yBAAyB,CAAC,qCAAqC,CAAC;IAuB1E,oBAAoB,GAAI,KAAK,MAAM,YAMjC;IAEF,KAAK,sBAEH;IAEF,OAAO,GAAU,KAAK,MAAM,wCAU1B;IAEF,OAAO,GAAU,KAAK,MAAM,EAAE,OAAO,GAAG,mBAiBtC;IAEF,UAAU,GAAU,KAAK,MAAM,mBAM7B;CACH"}
|
package/dist/resource.js
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
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.KeyValueCacheResource = void 0;
|
|
37
|
+
const resource_1 = require("@ldsg/resource");
|
|
38
|
+
const mongoose_1 = __importStar(require("mongoose"));
|
|
39
|
+
class KeyValueCacheResource extends resource_1.Resource {
|
|
40
|
+
constructor(params) {
|
|
41
|
+
super(params);
|
|
42
|
+
this.getRealKeyInDatabase = (key) => {
|
|
43
|
+
const { keyPrefix = "" } = this.settings;
|
|
44
|
+
const res = `${keyPrefix}${key}`;
|
|
45
|
+
return res;
|
|
46
|
+
};
|
|
47
|
+
this.clear = async () => {
|
|
48
|
+
await this.keyValueCacheModel.deleteMany();
|
|
49
|
+
};
|
|
50
|
+
this.getItem = async (key) => {
|
|
51
|
+
const realKey = this.getRealKeyInDatabase(key);
|
|
52
|
+
const findOneRes = await this.keyValueCacheModel.findOne({
|
|
53
|
+
id: realKey,
|
|
54
|
+
});
|
|
55
|
+
const res = findOneRes === null || findOneRes === void 0 ? void 0 : findOneRes.value;
|
|
56
|
+
return res;
|
|
57
|
+
};
|
|
58
|
+
this.setItem = async (key, value) => {
|
|
59
|
+
const realKey = this.getRealKeyInDatabase(key);
|
|
60
|
+
await this.keyValueCacheModel.findOneAndUpdate({
|
|
61
|
+
key: realKey,
|
|
62
|
+
}, {
|
|
63
|
+
$set: {
|
|
64
|
+
value,
|
|
65
|
+
},
|
|
66
|
+
}, {
|
|
67
|
+
upsert: true,
|
|
68
|
+
new: true,
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
this.removeItem = async (key) => {
|
|
72
|
+
const realKey = this.getRealKeyInDatabase(key);
|
|
73
|
+
await this.keyValueCacheModel.deleteMany({
|
|
74
|
+
key: realKey,
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
const { collectionName = "key-value-cache" } = params.settings;
|
|
78
|
+
const keyValueCacheSchema = new mongoose_1.Schema({
|
|
79
|
+
key: {
|
|
80
|
+
type: String,
|
|
81
|
+
index: true,
|
|
82
|
+
unique: true,
|
|
83
|
+
},
|
|
84
|
+
value: {
|
|
85
|
+
type: String,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
this.keyValueCacheModel = mongoose_1.default.model(collectionName, keyValueCacheSchema);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
exports.KeyValueCacheResource = KeyValueCacheResource;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./specific-resource-settings"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SpecificResourceSettings } from "@ldsg/types";
|
|
2
|
+
export interface KeyValueCacheSpecificResourceSettings extends SpecificResourceSettings {
|
|
3
|
+
/**
|
|
4
|
+
* Collection Name
|
|
5
|
+
*/
|
|
6
|
+
collectionName?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Key Prefix
|
|
9
|
+
*/
|
|
10
|
+
keyPrefix?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=specific-resource-settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"specific-resource-settings.d.ts","sourceRoot":"","sources":["../../src/types/specific-resource-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,WAAW,qCACf,SAAQ,wBAAwB;IAChC;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ldsg/key-value-cache",
|
|
3
|
+
"version": "0.2.5",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/"
|
|
8
|
+
],
|
|
9
|
+
"types": "dist",
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "wanxger",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"express": "^4.18.2",
|
|
18
|
+
"mongoose": "^8.14.3",
|
|
19
|
+
"@ldsg/handler": "0.2.5",
|
|
20
|
+
"@ldsg/resource": "0.2.5",
|
|
21
|
+
"@ldsg/types": "0.2.5",
|
|
22
|
+
"@ldsg/resource-definition": "0.2.5"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/express": "^4.17.17",
|
|
26
|
+
"@types/node": "^20.13.0",
|
|
27
|
+
"@types/supertest": "^6.0.0",
|
|
28
|
+
"supertest": "^6.3.4"
|
|
29
|
+
},
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc --project tsconfig.build.json",
|
|
32
|
+
"clean": "rm -rf dist"
|
|
33
|
+
}
|
|
34
|
+
}
|