chore: 1.0.2 release
This commit is contained in:
@@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
本项目遵循 [语义化版本](https://semver.org/lang/zh-CN/)。
|
||||||
|
|
||||||
|
## [1.0.2] - 2026-08-06
|
||||||
|
|
||||||
|
### 变更
|
||||||
|
|
||||||
|
- `install` 默认直接覆盖已安装的 Skill,无需再加 `--force`(旧的 `--force` 仍可兼容传入)
|
||||||
|
|
||||||
## [1.0.1] - 2026-08-06
|
## [1.0.1] - 2026-08-06
|
||||||
|
|
||||||
### 新增
|
### 新增
|
||||||
|
|||||||
@@ -4,6 +4,12 @@
|
|||||||
|
|
||||||
This project follows [Semantic Versioning](https://semver.org/).
|
This project follows [Semantic Versioning](https://semver.org/).
|
||||||
|
|
||||||
|
## [1.0.2] - 2026-08-06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- `install` overwrites an existing skill by default; `--force` is no longer required (still accepted for compatibility)
|
||||||
|
|
||||||
## [1.0.1] - 2026-08-06
|
## [1.0.1] - 2026-08-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
@@ -58,16 +58,16 @@ npx open-kimi-ppt-skills install --target ~/.workbuddy/skills
|
|||||||
|
|
||||||
### 更新
|
### 更新
|
||||||
|
|
||||||
Skill 有更新时,用 `--force` 覆盖本地已安装版本即可(不要重复执行无 `--force` 的 install):
|
Skill 有更新时,再执行一次安装即可(会直接覆盖本地已安装版本):
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx open-kimi-ppt-skills@latest install --force
|
npx open-kimi-ppt-skills@latest install
|
||||||
```
|
```
|
||||||
|
|
||||||
若当初用过 `--target`,更新时带上相同路径:
|
若当初用过 `--target`,更新时带上相同路径:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx open-kimi-ppt-skills@latest install --force --target ~/.claude/skills
|
npx open-kimi-ppt-skills@latest install --target ~/.claude/skills
|
||||||
```
|
```
|
||||||
|
|
||||||
也可以对 AI 说:`帮我更新 open-kimi-ppt skill`。更新只替换 Skill 文件,不会影响已生成的 PPTD / PPTX 项目。
|
也可以对 AI 说:`帮我更新 open-kimi-ppt skill`。更新只替换 Skill 文件,不会影响已生成的 PPTD / PPTX 项目。
|
||||||
|
|||||||
+3
-3
@@ -58,16 +58,16 @@ npx open-kimi-ppt-skills install --target ~/.workbuddy/skills
|
|||||||
|
|
||||||
### Update
|
### Update
|
||||||
|
|
||||||
When the skill is updated, overwrite the local install with `--force` (do not keep re-running install without `--force`):
|
When the skill is updated, run install again — it overwrites the local installation:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx open-kimi-ppt-skills@latest install --force
|
npx open-kimi-ppt-skills@latest install
|
||||||
```
|
```
|
||||||
|
|
||||||
If you originally installed with `--target`, pass the same path again:
|
If you originally installed with `--target`, pass the same path again:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npx open-kimi-ppt-skills@latest install --force --target ~/.claude/skills
|
npx open-kimi-ppt-skills@latest install --target ~/.claude/skills
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also ask your agent: `Update the open-kimi-ppt skill for me.` Updating only replaces the skill files; it does not touch PPTD / PPTX projects you already generated.
|
You can also ask your agent: `Update the open-kimi-ppt skill for me.` Updating only replaces the skill files; it does not touch PPTD / PPTX projects you already generated.
|
||||||
|
|||||||
+11
-15
@@ -44,8 +44,8 @@ Usage:
|
|||||||
|
|
||||||
Install options:
|
Install options:
|
||||||
--target <directory> Skills directory (default: ~/.agents/skills)
|
--target <directory> Skills directory (default: ~/.agents/skills)
|
||||||
--force Replace an existing installation
|
|
||||||
|
|
||||||
|
Re-running install replaces an existing open-kimi-ppt installation.
|
||||||
Run "open-kimi-ppt-skills serve --help" for server options.
|
Run "open-kimi-ppt-skills serve --help" for server options.
|
||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
@@ -55,13 +55,13 @@ function parseArguments(arguments_) {
|
|||||||
const command = args[0] === "install" || args[0] === "serve" ? args.shift() : "install";
|
const command = args[0] === "install" || args[0] === "serve" ? args.shift() : "install";
|
||||||
const options = command === "serve"
|
const options = command === "serve"
|
||||||
? { command, open: false, port: 55173 }
|
? { command, open: false, port: 55173 }
|
||||||
: { command, force: false, target: undefined };
|
: { command, target: undefined };
|
||||||
|
|
||||||
while (args.length > 0) {
|
while (args.length > 0) {
|
||||||
const argument = args.shift();
|
const argument = args.shift();
|
||||||
|
|
||||||
|
// Accepted for backward compatibility; install always overwrites.
|
||||||
if (command === "install" && argument === "--force") {
|
if (command === "install" && argument === "--force") {
|
||||||
options.force = true;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -111,19 +111,14 @@ function defaultSkillsDirectory() {
|
|||||||
return join(homedir(), ".agents", "skills");
|
return join(homedir(), ".agents", "skills");
|
||||||
}
|
}
|
||||||
|
|
||||||
function installSkill({ force, target }) {
|
function installSkill({ target }) {
|
||||||
if (!existsSync(join(sourceDirectory, "SKILL.md"))) {
|
if (!existsSync(join(sourceDirectory, "SKILL.md"))) {
|
||||||
throw new Error(`packaged skill is incomplete: ${sourceDirectory}`);
|
throw new Error(`packaged skill is incomplete: ${sourceDirectory}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const skillsDirectory = target ?? defaultSkillsDirectory();
|
const skillsDirectory = target ?? defaultSkillsDirectory();
|
||||||
const destination = join(skillsDirectory, SKILL_NAME);
|
const destination = join(skillsDirectory, SKILL_NAME);
|
||||||
|
const replaced = existsSync(destination);
|
||||||
if (existsSync(destination) && !force) {
|
|
||||||
throw new Error(
|
|
||||||
`${destination} already exists; rerun with --force to replace it`,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
mkdirSync(skillsDirectory, { recursive: true });
|
mkdirSync(skillsDirectory, { recursive: true });
|
||||||
const stagingRoot = mkdtempSync(join(skillsDirectory, `.${SKILL_NAME}-`));
|
const stagingRoot = mkdtempSync(join(skillsDirectory, `.${SKILL_NAME}-`));
|
||||||
@@ -135,16 +130,17 @@ function installSkill({ force, target }) {
|
|||||||
filter: (source) => ![".DS_Store", "_user_meta.json"].includes(basename(source)),
|
filter: (source) => ![".DS_Store", "_user_meta.json"].includes(basename(source)),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (force) {
|
rmSync(destination, { recursive: true, force: true });
|
||||||
rmSync(destination, { recursive: true, force: true });
|
|
||||||
}
|
|
||||||
|
|
||||||
renameSync(stagedSkill, destination);
|
renameSync(stagedSkill, destination);
|
||||||
} finally {
|
} finally {
|
||||||
rmSync(stagingRoot, { recursive: true, force: true });
|
rmSync(stagingRoot, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(`Installed ${SKILL_NAME} to ${destination}`);
|
console.log(
|
||||||
|
replaced
|
||||||
|
? `Updated ${SKILL_NAME} at ${destination}`
|
||||||
|
: `Installed ${SKILL_NAME} to ${destination}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "open-kimi-ppt-skills",
|
"name": "open-kimi-ppt-skills",
|
||||||
"version": "1.0.1",
|
"version": "1.0.2",
|
||||||
"description": "Unofficial reverse-engineered Kimi Slides skill for AI coding agents with local PPTD editing and PPTX export.",
|
"description": "Unofficial reverse-engineered Kimi Slides skill for AI coding agents with local PPTD editing and PPTX export.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"author": "binaryify",
|
"author": "binaryify",
|
||||||
|
|||||||
+17
-16
@@ -43,21 +43,7 @@ test("installs into ~/.agents/skills when no target is provided", () => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
test("refuses to overwrite an existing installation without --force", () => {
|
test("overwrites an existing installation by default", () => {
|
||||||
const root = mkdtempSync(join(tmpdir(), "open-kimi-ppt-test-"));
|
|
||||||
const target = join(root, "skills");
|
|
||||||
|
|
||||||
try {
|
|
||||||
assert.equal(runCli(["--target", target]).status, 0);
|
|
||||||
const secondInstall = runCli(["--target", target]);
|
|
||||||
assert.equal(secondInstall.status, 1);
|
|
||||||
assert.match(secondInstall.stderr, /already exists/);
|
|
||||||
} finally {
|
|
||||||
rmSync(root, { recursive: true, force: true });
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
test("replaces an existing installation with --force", () => {
|
|
||||||
const root = mkdtempSync(join(tmpdir(), "open-kimi-ppt-test-"));
|
const root = mkdtempSync(join(tmpdir(), "open-kimi-ppt-test-"));
|
||||||
const target = join(root, "skills");
|
const target = join(root, "skills");
|
||||||
const skillFile = join(target, "open-kimi-ppt", "SKILL.md");
|
const skillFile = join(target, "open-kimi-ppt", "SKILL.md");
|
||||||
@@ -66,10 +52,25 @@ test("replaces an existing installation with --force", () => {
|
|||||||
assert.equal(runCli(["--target", target]).status, 0);
|
assert.equal(runCli(["--target", target]).status, 0);
|
||||||
writeFileSync(skillFile, "modified", "utf8");
|
writeFileSync(skillFile, "modified", "utf8");
|
||||||
|
|
||||||
const result = runCli(["--target", target, "--force"]);
|
const result = runCli(["--target", target]);
|
||||||
assert.equal(result.status, 0, result.stderr);
|
assert.equal(result.status, 0, result.stderr);
|
||||||
|
assert.match(result.stdout, /Updated open-kimi-ppt/);
|
||||||
assert.match(readFileSync(skillFile, "utf8"), /^---\nname: open-kimi-ppt/m);
|
assert.match(readFileSync(skillFile, "utf8"), /^---\nname: open-kimi-ppt/m);
|
||||||
} finally {
|
} finally {
|
||||||
rmSync(root, { recursive: true, force: true });
|
rmSync(root, { recursive: true, force: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("accepts legacy --force without changing overwrite behavior", () => {
|
||||||
|
const root = mkdtempSync(join(tmpdir(), "open-kimi-ppt-test-"));
|
||||||
|
const target = join(root, "skills");
|
||||||
|
|
||||||
|
try {
|
||||||
|
assert.equal(runCli(["--target", target]).status, 0);
|
||||||
|
const result = runCli(["--target", target, "--force"]);
|
||||||
|
assert.equal(result.status, 0, result.stderr);
|
||||||
|
assert.match(result.stdout, /Updated open-kimi-ppt/);
|
||||||
|
} finally {
|
||||||
|
rmSync(root, { recursive: true, force: true });
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user