mm_machine 3.4.8 → 3.4.9

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.
Files changed (2) hide show
  1. package/lib/drive.js +6 -1
  2. package/package.json +1 -1
package/lib/drive.js CHANGED
@@ -306,7 +306,9 @@ Drive.prototype.getOption = function (key) {
306
306
  * @param {object} options 所有选项
307
307
  */
308
308
  Drive.prototype.setOptions = function (options) {
309
- this._options = options;
309
+ if (!options) return;
310
+ $.push(this._options, options || {});
311
+ this.setOptionsToFile();
310
312
  };
311
313
 
312
314
  /**
@@ -322,7 +324,10 @@ Drive.prototype.setOption = function (key, value) {
322
324
  this._options = {};
323
325
  }
324
326
  this._options[key] = value;
327
+ this.setOptionsToFile();
328
+ };
325
329
 
330
+ Drive.prototype.setOptionsToFile = function () {
326
331
  let cache_file = this._getOptionsFile();
327
332
  if (cache_file) {
328
333
  // 确保目录存在
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mm_machine",
3
- "version": "3.4.8",
3
+ "version": "3.4.9",
4
4
  "description": "A flexible Node.js plugin mechanism system for dynamic loading, management and execution of modules. Supports hot reload, lifecycle management, and modern JavaScript features.",
5
5
  "main": "index.js",
6
6
  "scripts": {