mm_config 2.5.1 → 2.5.3

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 CHANGED
@@ -1,5 +1,5 @@
1
- # mm_config
2
-
1
+ # 配置管理器(mm_config)
2
+ ## 说明
3
3
  超级美眉配置帮助类,动态同步文件修改配置。
4
4
 
5
5
  ## 功能特点
@@ -206,58 +206,40 @@ config.description = "This supports JSON5 format";
206
206
  config.version = "1.0.0";
207
207
  ```
208
208
 
209
- ### 5. 直接使用Config类
209
+ ### 5. 直接使用Config类(键值存储)
210
210
 
211
211
  ```javascript
212
212
  const { Config } = require('mm_config');
213
213
 
214
- // 创建配置实例
215
- const cfg = new Config({
216
- debounce_time: 100,
217
- pretty: true
218
- }, {
219
- name: "directDemo"
220
- });
214
+ // 创建配置实例(固定配置,每个键只能设置一次)
215
+ const cfg = new Config({ file: './config.json' });
216
+ cfg.set('name', 'demo').set('state', 1);
221
217
 
222
- // 获取代理对象
223
- const config = cfg.getProxy();
218
+ // 读取配置
219
+ console.log('get(name):', cfg.get('name')); // demo
220
+ console.log('has(state):', cfg.has('state')); // true
221
+ console.log('配置列表:', cfg.list());
224
222
 
225
- // 使用配置
226
- config.version = "1.0.0";
223
+ // 保存到文件
224
+ cfg.save();
227
225
 
228
- // 手动调用保存方法
229
- cfg.saveSync();
230
- await cfg.saveAsync();
226
+ // 从文件重新加载(不覆盖已存在的键)
227
+ const loaded = new Config({ file: './config.json' });
228
+ loaded.load();
229
+ console.log('重新加载后 name:', loaded.get('name'));
231
230
  ```
232
231
 
233
- ### 6. 使用配置操作方法
232
+ ### 6. 使用configAdmin获取实例
234
233
 
235
234
  ```javascript
236
- const { Config } = require('mm_config');
235
+ const { configAdmin } = require('mm_config');
237
236
 
238
- const cfg = new Config({}, "./methods_config.json");
239
-
240
- async function manageConfig() {
241
- // 设置配置值
242
- await cfg.set("name", "test");
243
-
244
- // 获取配置值
245
- const name = await cfg.get("name");
246
- console.log('获取到的名称:', name); // "test"
247
-
248
- // 检查配置是否存在
249
- const hasName = await cfg.has("name");
250
- console.log('是否存在名称:', hasName); // true
251
-
252
- // 删除配置项
253
- await cfg.del("name");
254
-
255
- // 获取所有键
256
- const keys = await cfg.keys();
257
- console.log('所有键:', keys);
258
- }
237
+ // 通过管理器按作用域获取实例(相同作用域返回同一实例)
238
+ const scoped = configAdmin('app', { file: './app_config.json' });
239
+ scoped.set('version', '1.0.0');
259
240
 
260
- manageConfig();
241
+ // 读取作用域配置
242
+ console.log('get(version):', scoped.get('version')); // 1.0.0
261
243
  ```
262
244
 
263
245
  ### 7. 缓存管理功能
package/index.js CHANGED
@@ -1,335 +1,18 @@
1
- const { Base } = require('mm_expand');
1
+ const Admin = require('mm_corejs').Admin;
2
+ const Config = require('./lib/config.js');
3
+ const all = require('./lib/conf.js');
2
4
 
3
- /**
4
- * 配置字典(私有)
5
- * @type {object}
6
- */
7
- const dict = {};
5
+ let admin = new Admin();
6
+ admin.setClass(Config);
8
7
 
9
- /**
10
- * 配置类
11
- * @class
12
- */
13
- class Config extends Base {
14
- /**
15
- * 配置选项
16
- * @type {object}
17
- */
18
- static config = {
19
- debounce_time: 0, // 默认不防抖
20
- pretty: true,
21
- format: 'json',
22
- file: ''
23
- };
24
-
25
- /**
26
- * 预设选项
27
- * @type {object}
28
- */
29
- static options = {
30
-
31
- };
32
-
33
- /**
34
- * 创建配置实例
35
- * @param {object} config - 配置选项
36
- * @param {number} config.debounce_time - 防抖时间(ms)
37
- * @param {boolean} config.pretty - 是否美化输出
38
- * @param {string} config.format - 格式(json/json5)
39
- * @param {string} config.file - 配置文件路径
40
- * @param {object} options - 选项
41
- */
42
- constructor(config, options = {}) {
43
- super(config);
44
- this.options = { ...Config.options, ...options };
45
- this._promise = Promise.resolve();
46
- }
47
- }
48
-
49
- /**
50
- * 设置配置
51
- * @param {object} options - 配置对象
52
- */
53
- Config.prototype.setOptions = function (options) {
54
- $.push(this.options, options, true);
55
- };
56
-
57
- /**
58
- * 获取配置
59
- * @returns {object} 配置对象
60
- */
61
- Config.prototype.getOptions = function () {
62
- return this.options;
63
- };
64
-
65
- /**
66
- * 保存配置到文件(同步)
67
- * @returns {boolean} 保存是否成功
68
- */
69
- Config.prototype.saveSync = function () {
70
- if (!this.config.file) return false;
71
- try {
72
- this.config.file.saveJson(this.options);
73
- return true;
74
- } catch (err) {
75
- this.log('error', `Error saving options to ${this.config.file}:`, err.message);
76
- return false;
77
- }
78
- };
79
-
80
- /**
81
- * 保存配置到文件(异步)
82
- * @returns {Promise<boolean>} 保存操作是否成功
83
- */
84
- Config.prototype.saveAsync = async function () {
85
- if (!this.config.file) return Promise.resolve(true);
86
-
87
- // 确保之前的写操作完成
88
- await this._promise;
89
-
90
- this._promise = Promise.resolve()
91
- .then(() => {
92
- this.config.file.saveJson(this.options);
93
- return true;
94
- })
95
- .catch(err => {
96
- this.log('error', `Error saving options to ${this.config.file}:`, err.message);
97
- return false;
98
- });
99
-
100
- return this._promise;
101
- };
102
-
103
- /**
104
- * 获取代理对象
105
- * @returns {Proxy} 配置对象的代理实例
106
- */
107
- Config.prototype.getProxy = function () {
108
- let self = this;
109
-
110
- return new Proxy(this.options, {
111
- set(obj, prop, val) {
112
- obj[prop] = val;
113
-
114
- if (self.config.debounce_time > 0) {
115
- // 防抖处理
116
- if (self._timer) {
117
- clearTimeout(self._timer);
118
- }
119
- self._timer = setTimeout(() => {
120
- self.saveSync();
121
- }, self.config.debounce_time);
122
- } else {
123
- // 无防抖,直接保存
124
- self.saveSync();
125
- }
126
-
127
- return true;
128
- },
129
-
130
- get(obj, prop) {
131
- // 提供一些特殊属性访问
132
- if (prop === '_saveAsync') {
133
- return () => self.saveAsync();
134
- }
135
- if (prop === '_saveSync') {
136
- return () => self.saveSync();
137
- }
138
- if (prop === '_raw') {
139
- return obj;
140
- }
141
-
142
- return obj[prop];
143
- }
144
- });
145
- };
146
-
147
- /**
148
- * 获取异步代理对象
149
- * @returns {Proxy} 异步配置对象的代理实例
150
- */
151
- Config.prototype.getAsyncProxy = function () {
152
- let self = this;
153
-
154
- return new Proxy(this.options, {
155
- set(obj, prop, val) {
156
- obj[prop] = val;
157
-
158
- if (self.config.debounce_time > 0) {
159
- if (self._timer) {
160
- clearTimeout(self._timer);
161
- }
162
- self._timer = setTimeout(() => {
163
- self.saveAsync();
164
- }, self.config.debounce_time);
165
- } else {
166
- self.saveAsync();
167
- }
168
-
169
- return true;
170
- },
171
-
172
- get(obj, prop) {
173
- if (prop === '_saveAsync') {
174
- return () => self.saveAsync();
175
- }
176
- if (prop === '_saveSync') {
177
- return () => self.saveSync();
178
- }
179
- if (prop === '_raw') {
180
- return obj;
181
- }
182
-
183
- return obj[prop];
184
- }
185
- });
186
- };
187
-
188
- /**
189
- * 获取所有配置项
190
- * @returns {object} 所有配置项
191
- */
192
- Config.prototype.all = function () {
193
- return this.options;
194
- };
195
-
196
- /**
197
- * 获取配置值
198
- * @param {string} key - 配置键
199
- * @returns {*} 配置值
200
- */
201
- Config.prototype.get = function (key) {
202
- return this.options[key];
203
- };
204
-
205
- /**
206
- * 设置配置值
207
- * @param {string} key - 配置键
208
- * @param {*} value - 配置值
209
- */
210
- Config.prototype.set = function (key, value) {
211
- this.options[key] = value;
212
- };
213
-
214
- /**
215
- * 检查配置是否存在
216
- * @param {string} key - 配置键
217
- * @returns {boolean} 配置项是否存在
218
- */
219
- Config.prototype.has = async function (key) {
220
- return this.options.hasOwnProperty(key);
221
- };
222
-
223
- /**
224
- * 删除配置项
225
- * @param {string} key - 配置键
226
- */
227
- Config.prototype.del = async function (key) {
228
- delete this.options[key];
229
- };
230
-
231
- /**
232
- * 获取所有配置键
233
- * @returns {Array<string>} 配置键列表
234
- */
235
- Config.prototype.keys = async function () {
236
- let keys = [];
237
- let local_keys = Object.keys(this.options);
238
- keys = keys.concat(local_keys);
239
- return keys;
240
- };
241
-
242
- /**
243
- * 销毁
244
- */
245
- Config.prototype.destroy = function () {
246
- delete dict[this.config.file];
247
- };
248
-
249
- /**
250
- * 从配置文件加载配置
251
- * @returns {boolean} 加载是否成功
252
- */
253
- Config.prototype.load = function () {
254
- if (!this.config.file) return false;
255
- this.options = this.config.file.loadJson() || {};
256
- };
257
-
258
- /**
259
- * 创建配置(同步)
260
- * @param {string} file - 配置文件路径
261
- * @param {object} options - 配置对象
262
- * @param {object} config - 配置选项
263
- * @returns {Proxy} 配置代理对象
264
- */
265
- function create(file, options = {}, config = {}) {
266
- let f = file.fullname();
267
- let cfg = new Config({ file: f, ...config }, options);
268
- if (!file.hasFile()) {
269
- cfg.saveSync(); // 确保文件存在
270
- }
271
- // 注册配置字典
272
- dict[f] = cfg;
273
- return dict[f].getProxy();
274
- }
275
-
276
- /**
277
- * 创建配置(异步)
278
- * @param {string} file - 配置文件路径
279
- * @param {object} options - 配置对象
280
- * @param {object} config - 配置选项
281
- * @returns {Promise<Proxy>} 异步配置代理对象
282
- */
283
- async function createAsync(file, options = {}, config = {}) {
284
- let f = file.fullname();
285
- let cfg = new Config({ file: f, ...config }, options);
286
- if (!file.hasFile()) {
287
- await cfg.saveAsync(); // 确保文件存在
288
- }
289
- // 注册配置字典
290
- dict[f] = cfg;
291
- return dict[f].getAsyncProxy();
292
- }
293
-
294
- /**
295
- * 清理指定文件配置缓存
296
- * @param {string} file - 配置文件路径
297
- * @returns {void}
298
- */
299
- function clear(file) {
300
- if (!file) return clearAll();
301
- let f = file.fullname();
302
- if (dict[f]) {
303
- delete dict[f];
304
- }
305
- }
306
-
307
- /**
308
- * 清理所有配置缓存
309
- */
310
- function clearAll() {
311
- Object.keys(dict).forEach(key => {
312
- delete dict[key];
313
- });
314
- }
315
-
316
- /**
317
- * 获取配置代理对象
318
- * @param {object} options - 配置对象
319
- * @param {string} file - 配置文件路径
320
- * @param {object} config - 配置选项
321
- * @returns {Proxy} 配置代理对象
322
- */
323
- function conf(options, file, config = {}) {
324
- return create(file, options, config);
325
- }
326
-
327
- // 模块导出
328
8
  module.exports = {
9
+ ...all,
329
10
  Config,
330
- create,
331
- createAsync,
332
- clear,
333
- clearAll,
334
- conf
335
- };
11
+ admin,
12
+ configAdmin(scope, config) {
13
+ if (!scope) {
14
+ scope = 'os';
15
+ }
16
+ return admin.get(scope, config);
17
+ }
18
+ };
package/lib/conf.js ADDED
@@ -0,0 +1,380 @@
1
+ const { Base } = require('mm_mod');
2
+ const { push, fullname, hasFile, loadJson, saveJson } = require('mm_helper');
3
+
4
+ /**
5
+ * 配置字典(私有)
6
+ * @type {object}
7
+ */
8
+ const dict = {};
9
+
10
+ /**
11
+ * 配置类
12
+ * @class
13
+ */
14
+ class Config extends Base {
15
+ /**
16
+ * 配置选项
17
+ * @type {object}
18
+ */
19
+ static config = {
20
+ debounce_time: 0, // 默认不防抖
21
+ pretty: true,
22
+ format: 'json',
23
+ file: ''
24
+ };
25
+
26
+ /**
27
+ * 预设选项
28
+ * @type {object}
29
+ */
30
+ static options = {
31
+
32
+ };
33
+
34
+ /**
35
+ * 创建配置实例
36
+ * @param {object} config - 配置选项
37
+ * @param {number} config.debounce_time - 防抖时间(ms)
38
+ * @param {boolean} config.pretty - 是否美化输出
39
+ * @param {string} config.format - 格式(json/json5)
40
+ * @param {string} config.file - 配置文件路径
41
+ * @param {object} options - 选项
42
+ */
43
+ constructor(config, options = {}) {
44
+ super(config);
45
+ this.options = { ...Config.options, ...options };
46
+ this._promise = Promise.resolve();
47
+ }
48
+ }
49
+
50
+ /**
51
+ * 设置配置
52
+ * @param {object} options - 配置对象
53
+ */
54
+ Config.prototype.setOptions = function (options) {
55
+ push(this.options, options, true);
56
+ };
57
+
58
+ /**
59
+ * 获取配置
60
+ * @returns {object} 配置对象
61
+ */
62
+ Config.prototype.getOptions = function () {
63
+ return this.options;
64
+ };
65
+
66
+ /**
67
+ * 保存配置到文件(同步)
68
+ * @returns {boolean} 保存是否成功
69
+ */
70
+ Config.prototype.saveSync = function () {
71
+ if (!this.config.file) return false;
72
+ try {
73
+ saveJson(this.config.file, this.options);
74
+ return true;
75
+ } catch (err) {
76
+ this.log('error', `Error saving options to ${this.config.file}:`, err.message);
77
+ return false;
78
+ }
79
+ };
80
+
81
+ /**
82
+ * 保存配置到文件(异步)
83
+ * @returns {Promise<boolean>} 保存操作是否成功
84
+ */
85
+ Config.prototype.saveAsync = async function () {
86
+ if (!this.config.file) return Promise.resolve(true);
87
+
88
+ // 确保之前的写操作完成
89
+ await this._promise;
90
+
91
+ this._promise = Promise.resolve()
92
+ .then(() => {
93
+ saveJson(this.config.file, this.options);
94
+ return true;
95
+ })
96
+ .catch(err => {
97
+ this.log('error', `Error saving options to ${this.config.file}:`, err.message);
98
+ return false;
99
+ });
100
+
101
+ return this._promise;
102
+ };
103
+
104
+ /**
105
+ * 获取代理对象
106
+ * @returns {Proxy} 配置对象的代理实例
107
+ */
108
+ Config.prototype.getProxy = function () {
109
+ let self = this;
110
+
111
+ return new Proxy(this.options, {
112
+ set(obj, prop, val) {
113
+ obj[prop] = val;
114
+
115
+ if (self.config.debounce_time > 0) {
116
+ // 防抖处理
117
+ if (self._timer) {
118
+ clearTimeout(self._timer);
119
+ }
120
+ self._timer = setTimeout(() => {
121
+ self.saveSync();
122
+ }, self.config.debounce_time);
123
+ } else {
124
+ // 无防抖,直接保存
125
+ self.saveSync();
126
+ }
127
+
128
+ return true;
129
+ },
130
+
131
+ get(obj, prop) {
132
+ // 提供一些特殊属性访问
133
+ if (prop === '_saveAsync') {
134
+ return () => self.saveAsync();
135
+ }
136
+ if (prop === '_saveSync') {
137
+ return () => self.saveSync();
138
+ }
139
+ if (prop === '_raw') {
140
+ return obj;
141
+ }
142
+
143
+ return obj[prop];
144
+ }
145
+ });
146
+ };
147
+
148
+ /**
149
+ * 获取异步代理对象
150
+ * @returns {Proxy} 异步配置对象的代理实例
151
+ */
152
+ Config.prototype.getAsyncProxy = function () {
153
+ let self = this;
154
+
155
+ return new Proxy(this.options, {
156
+ set(obj, prop, val) {
157
+ obj[prop] = val;
158
+
159
+ if (self.config.debounce_time > 0) {
160
+ if (self._timer) {
161
+ clearTimeout(self._timer);
162
+ }
163
+ self._timer = setTimeout(() => {
164
+ self.saveAsync();
165
+ }, self.config.debounce_time);
166
+ } else {
167
+ self.saveAsync();
168
+ }
169
+
170
+ return true;
171
+ },
172
+
173
+ get(obj, prop) {
174
+ if (prop === '_saveAsync') {
175
+ return () => self.saveAsync();
176
+ }
177
+ if (prop === '_saveSync') {
178
+ return () => self.saveSync();
179
+ }
180
+ if (prop === '_raw') {
181
+ return obj;
182
+ }
183
+
184
+ return obj[prop];
185
+ }
186
+ });
187
+ };
188
+
189
+ /**
190
+ * 获取所有配置项
191
+ * @returns {object} 所有配置项
192
+ */
193
+ Config.prototype.all = function () {
194
+ return this.options;
195
+ };
196
+
197
+ /**
198
+ * 获取配置值
199
+ * @param {string} key - 配置键
200
+ * @returns {*} 配置值
201
+ */
202
+ Config.prototype.get = function (key) {
203
+ return this.options[key];
204
+ };
205
+
206
+ /**
207
+ * 获取配置分节
208
+ * @param {string} [name] - 分节名称,缺省时返回全部配置
209
+ * @returns {object} 配置分节或全部配置
210
+ */
211
+ Config.prototype.conf = function (name) {
212
+ if (name) {
213
+ return this.options[name];
214
+ }
215
+ return this.options;
216
+ };
217
+
218
+ /**
219
+ * 设置配置值
220
+ * @param {string} key - 配置键
221
+ * @param {*} value - 配置值
222
+ */
223
+ Config.prototype.set = function (key, value) {
224
+ this.options[key] = value;
225
+ };
226
+
227
+ /**
228
+ * 更新配置并保存到文件
229
+ * @param {string} [name] - 分节名称,存在时确保该分节存在后保存
230
+ * @returns {boolean} 更新是否成功
231
+ */
232
+ Config.prototype.update = function (name) {
233
+ if (name && this.options[name] === undefined) {
234
+ this.options[name] = {};
235
+ }
236
+ return this.saveSync();
237
+ };
238
+
239
+ /**
240
+ * 检查配置是否存在
241
+ * @param {string} key - 配置键
242
+ * @returns {boolean} 配置项是否存在
243
+ */
244
+ Config.prototype.has = async function (key) {
245
+ return this.options.hasOwnProperty(key);
246
+ };
247
+
248
+ /**
249
+ * 删除配置项
250
+ * @param {string} key - 配置键
251
+ */
252
+ Config.prototype.del = async function (key) {
253
+ delete this.options[key];
254
+ };
255
+
256
+ /**
257
+ * 获取所有配置键
258
+ * @returns {Array<string>} 配置键列表
259
+ */
260
+ Config.prototype.keys = async function () {
261
+ let keys = [];
262
+ let local_keys = Object.keys(this.options);
263
+ keys = keys.concat(local_keys);
264
+ return keys;
265
+ };
266
+
267
+ /**
268
+ * 销毁
269
+ */
270
+ Config.prototype.destroy = function () {
271
+ delete dict[this.config.file];
272
+ };
273
+
274
+ /**
275
+ * 从配置文件加载配置
276
+ * @returns {boolean} 加载是否成功
277
+ */
278
+ Config.prototype.load = function () {
279
+ if (!this.config.file) return false;
280
+ this.options = loadJson(this.config.file) || {};
281
+ };
282
+
283
+ /**
284
+ * 创建配置(同步)
285
+ * @param {string} file - 配置文件路径
286
+ * @param {object} options - 配置对象
287
+ * @param {object} config - 配置选项
288
+ * @returns {Proxy} 配置代理对象
289
+ */
290
+ function create(file, options = {}, config = {}) {
291
+ let f = fullname(file);
292
+ let cfg = new Config({ file: f, ...config }, options);
293
+ if (!hasFile(file)) {
294
+ cfg.saveSync(); // 确保文件存在
295
+ }
296
+ // 注册配置字典
297
+ dict[f] = cfg;
298
+ return dict[f].getProxy();
299
+ }
300
+
301
+ /**
302
+ * 创建配置(异步)
303
+ * @param {string} file - 配置文件路径
304
+ * @param {object} options - 配置对象
305
+ * @param {object} config - 配置选项
306
+ * @returns {Promise<Proxy>} 异步配置代理对象
307
+ */
308
+ async function createAsync(file, options = {}, config = {}) {
309
+ let f = fullname(file);
310
+ let cfg = new Config({ file: f, ...config }, options);
311
+ if (!hasFile(file)) {
312
+ await cfg.saveAsync(); // 确保文件存在
313
+ }
314
+ // 注册配置字典
315
+ dict[f] = cfg;
316
+ return dict[f].getAsyncProxy();
317
+ }
318
+
319
+ /**
320
+ * 清理指定文件配置缓存
321
+ * @param {string} file - 配置文件路径
322
+ * @returns {void}
323
+ */
324
+ function clear(file) {
325
+ if (!file) return clearAll();
326
+ let f = fullname(file);
327
+ if (dict[f]) {
328
+ delete dict[f];
329
+ }
330
+ }
331
+
332
+ /**
333
+ * 清理所有配置缓存
334
+ */
335
+ function clearAll() {
336
+ Object.keys(dict).forEach(key => {
337
+ delete dict[key];
338
+ });
339
+ }
340
+
341
+ /**
342
+ * 获取配置代理对象
343
+ * @param {object} options - 配置对象
344
+ * @param {string} file - 配置文件路径
345
+ * @param {object} config - 配置选项
346
+ * @returns {Proxy} 配置代理对象
347
+ */
348
+ function conf(options, file, config = {}) {
349
+ return create(file, options, config);
350
+ }
351
+
352
+ /**
353
+ * 配置实例单例
354
+ * @type {Config|null}
355
+ */
356
+ let config_instance = null;
357
+
358
+ /**
359
+ * 获取配置单例
360
+ * @param {object} options - 配置对象
361
+ * @param {object} config - 配置选项
362
+ * @returns {Config} 配置实例
363
+ */
364
+ function getConfig(options, config) {
365
+ if (!config_instance) {
366
+ config_instance = new Config(config, options);
367
+ }
368
+ return config_instance;
369
+ }
370
+
371
+ // 模块导出
372
+ module.exports = {
373
+ Config,
374
+ create,
375
+ createAsync,
376
+ clear,
377
+ clearAll,
378
+ conf,
379
+ getConfig
380
+ };
package/lib/config.js ADDED
@@ -0,0 +1,34 @@
1
+ const KvStore = require('mm_kv_store').KvStore;
2
+
3
+ /**
4
+ * 固定配置存储类,仅允许在系统启动时设置一次,设置后不能修改
5
+ * @class
6
+ * @augments {KvStore}
7
+ */
8
+ class Config extends KvStore {
9
+ /**
10
+ * 获取存储项名称
11
+ * @returns {string} 存储项名称
12
+ */
13
+ _getName() {
14
+ return '配置项';
15
+ }
16
+
17
+ /**
18
+ * 是否允许覆盖已存在的配置项
19
+ * @returns {boolean} 不允许覆盖返回 false
20
+ */
21
+ _isOverwritable() {
22
+ return false;
23
+ }
24
+
25
+ /**
26
+ * 加载时是否覆盖已存在的配置项
27
+ * @returns {boolean} 不覆盖返回 false
28
+ */
29
+ _isLoadOverwritable() {
30
+ return false;
31
+ }
32
+ }
33
+
34
+ module.exports = Config;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_config",
3
- "version": "2.5.1",
3
+ "version": "2.5.3",
4
4
  "description": "Super Meimei Configuration Synchronizer - Automatically sync configuration changes to JSON files",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,6 +13,9 @@
13
13
  "url": "git+https://gitee.com/qiuwenwu91/mm_config.git"
14
14
  },
15
15
  "keywords": [
16
+ "mm_mod",
17
+ "mm_infra",
18
+ "mm_config",
16
19
  "config",
17
20
  "JSON",
18
21
  "file",
@@ -24,6 +27,8 @@
24
27
  "settings",
25
28
  "automation"
26
29
  ],
30
+ "layer": "infra",
31
+ "group": "config",
27
32
  "author": "邱文武",
28
33
  "license": "ISC",
29
34
  "bugs": {
@@ -35,16 +40,20 @@
35
40
  },
36
41
  "files": [
37
42
  "index.js",
43
+ "lib",
38
44
  "README.md",
39
45
  "README_EN.md",
40
46
  "LICENSE"
41
47
  ],
42
48
  "dependencies": {
43
- "mm_expand": "^2.5.3"
49
+ "mm_corejs": "^1.1.4",
50
+ "mm_helper": "^1.0.0",
51
+ "mm_kv_store": "^1.0.0",
52
+ "mm_mod": "^1.0.1"
44
53
  },
45
54
  "devDependencies": {
46
- "eslint": "^10.8.1",
55
+ "eslint": "^10.9.1",
47
56
  "eslint-plugin-jsdoc": "^64.2.1",
48
- "mm_eslint": "^1.7.6"
57
+ "mm_eslint": "^1.7.7"
49
58
  }
50
59
  }