@lmzhen/dsh-evolution-core 0.1.0-rc.42 → 0.1.0-rc.43

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/index.js +5 -2
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -2117,7 +2117,7 @@ var SkillLibrary = class {
2117
2117
  try {
2118
2118
  for (const source of normalizedSources) {
2119
2119
  const result = await this.archive(source, { absorbedInto: target });
2120
- if (!result.ok) return result;
2120
+ if (!result.ok) throw new Error(result.message);
2121
2121
  archived.push(source);
2122
2122
  }
2123
2123
  await this.io.writeText(join(targetDir, "SKILL.md"), merged);
@@ -2261,7 +2261,10 @@ var SkillLibrary = class {
2261
2261
  * listed in the manifest and only those names are ever read back.
2262
2262
  */
2263
2263
  async snapshotAll(reason = "pre-mutation", extras = []) {
2264
- const dest = join(join(this.root, ".backups"), `skills-${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`);
2264
+ const backupRoot = join(this.root, ".backups");
2265
+ const stamp = (/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-");
2266
+ let dest = join(backupRoot, `skills-${stamp}`);
2267
+ while (await this.io.exists(dest)) dest = join(backupRoot, `skills-${stamp}-${Math.random().toString(36).slice(2, 8)}`);
2265
2268
  const names = await listNames(this.root, this.io);
2266
2269
  for (const name of names) await this.io.copy(skillDir(this.root, name), join(dest, name));
2267
2270
  const sidecars = [];
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-core",
3
3
  "description": "Shared stores, prompts, signals and lifecycle logic for the dsh-evolution plugin family (community build)",
4
- "version": "0.1.0-rc.42",
4
+ "version": "0.1.0-rc.43",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },