lakutata 0.1.16 → 0.1.17

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/CLI.js +6 -6
  2. package/package.json +1 -1
package/CLI.js CHANGED
@@ -59482,7 +59482,7 @@ var ProjectInformationUpdater = class extends _chunkVZLDHNU6js.BaseObject {
59482
59482
  throw new Error("The package.json file could not be found.");
59483
59483
  if (!await _chunkTC35FNWQjs.Exists.call(void 0, this.applicationConfigFilename))
59484
59484
  throw new Error("The Config.ts file could not be found.");
59485
- this.packageJson = JSON.parse(await _promises.readFile.call(void 0, this.packageJsonFilename, { encoding: "utf-8" }));
59485
+ this.packageJson = await _promises.readFile.call(void 0, this.packageJsonFilename, { encoding: "utf-8" });
59486
59486
  this.applicationConfig = await _promises.readFile.call(void 0, this.applicationConfigFilename, { encoding: "utf-8" });
59487
59487
  if (await _chunkTC35FNWQjs.Exists.call(void 0, this.readmeFilename))
59488
59488
  await _promises.rm.call(void 0, this.readmeFilename, { recursive: true, force: true });
@@ -59501,7 +59501,7 @@ var ProjectInformationUpdater = class extends _chunkVZLDHNU6js.BaseObject {
59501
59501
  * @protected
59502
59502
  */
59503
59503
  setName(name) {
59504
- this.packageJson.name = name;
59504
+ this.packageJson = _chunkTC35FNWQjs.TextTemplate.call(void 0, this.packageJson, { name }, { ignoreMissing: true });
59505
59505
  this.applicationConfig = _chunkTC35FNWQjs.TextTemplate.call(void 0, this.applicationConfig, { name }, { ignoreMissing: true });
59506
59506
  }
59507
59507
  /**
@@ -59510,7 +59510,7 @@ var ProjectInformationUpdater = class extends _chunkVZLDHNU6js.BaseObject {
59510
59510
  * @protected
59511
59511
  */
59512
59512
  setDescription(description) {
59513
- this.packageJson.description = description;
59513
+ this.packageJson = _chunkTC35FNWQjs.TextTemplate.call(void 0, this.packageJson, { description }, { ignoreMissing: true });
59514
59514
  }
59515
59515
  /**
59516
59516
  * 设置作者名称
@@ -59518,7 +59518,7 @@ var ProjectInformationUpdater = class extends _chunkVZLDHNU6js.BaseObject {
59518
59518
  * @protected
59519
59519
  */
59520
59520
  setAuthor(author) {
59521
- this.packageJson.author = author;
59521
+ this.packageJson = _chunkTC35FNWQjs.TextTemplate.call(void 0, this.packageJson, { author }, { ignoreMissing: true });
59522
59522
  }
59523
59523
  /**
59524
59524
  * 设置许可证名字
@@ -59526,14 +59526,14 @@ var ProjectInformationUpdater = class extends _chunkVZLDHNU6js.BaseObject {
59526
59526
  * @protected
59527
59527
  */
59528
59528
  setLicense(license) {
59529
- this.packageJson.license = license.toUpperCase();
59529
+ this.packageJson = _chunkTC35FNWQjs.TextTemplate.call(void 0, this.packageJson, { license }, { ignoreMissing: true });
59530
59530
  }
59531
59531
  /**
59532
59532
  * 将项目信息进行保存
59533
59533
  * @protected
59534
59534
  */
59535
59535
  async save() {
59536
- await _promises.writeFile.call(void 0, this.packageJsonFilename, JSON.stringify(this.packageJson, null, 2), { flag: "w+" });
59536
+ await _promises.writeFile.call(void 0, this.packageJsonFilename, this.packageJson, { flag: "w+" });
59537
59537
  await _promises.writeFile.call(void 0, this.applicationConfigFilename, this.applicationConfig, { flag: "w+" });
59538
59538
  }
59539
59539
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lakutata",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "description": "An IoC-based universal application framework.",
5
5
  "main": "./Lakutata.js",
6
6
  "types": "./Lakutata.d.ts",