mkt-skills 1.3.0 → 1.3.1
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 +4 -0
- package/bin/mkt-skills.mjs +1 -1
- package/lib/api.mjs +1 -1
- package/lib/paths.mjs +6 -0
- package/lib/video.mjs +6 -7
- package/package.json +7 -3
package/README.md
CHANGED
package/bin/mkt-skills.mjs
CHANGED
package/lib/api.mjs
CHANGED
package/lib/paths.mjs
CHANGED
|
@@ -4,7 +4,13 @@ import { readdir } from 'fs/promises';
|
|
|
4
4
|
|
|
5
5
|
const SKILLS_ROOT = join(homedir(), '.claude', 'skills');
|
|
6
6
|
|
|
7
|
+
const SLUG_RE = /^[a-z0-9][a-z0-9-]*$/;
|
|
8
|
+
|
|
9
|
+
// Slugs come from the user and from the server. Never let one escape SKILLS_ROOT.
|
|
7
10
|
export function skillDir(slug) {
|
|
11
|
+
if (typeof slug !== 'string' || !SLUG_RE.test(slug)) {
|
|
12
|
+
throw new Error(`Invalid skill slug: ${JSON.stringify(slug)}`);
|
|
13
|
+
}
|
|
8
14
|
return join(SKILLS_ROOT, slug);
|
|
9
15
|
}
|
|
10
16
|
|
package/lib/video.mjs
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { createInterface } from "readline";
|
|
2
|
-
import { mkdir, rm, writeFile, readFile } from "fs/promises";
|
|
2
|
+
import { mkdir, mkdtemp, rm, writeFile, readFile } from "fs/promises";
|
|
3
3
|
import { existsSync } from "fs";
|
|
4
4
|
import { join, dirname } from "path";
|
|
5
|
-
import { execSync } from "child_process";
|
|
5
|
+
import { execSync, execFileSync } from "child_process";
|
|
6
|
+
import { tmpdir } from "os";
|
|
6
7
|
import { bold, dim, green, red, cyan } from "./ui.mjs";
|
|
7
8
|
|
|
8
9
|
const TEMPLATE_REPO = "https://github.com/sandeepkelvadi/tm-videogen-template.git";
|
|
9
10
|
const TEMPLATE_BRANCH = "main";
|
|
10
|
-
|
|
11
|
+
let TEMPLATE_DIR; // private temp dir, created per run in cloneTemplate()
|
|
11
12
|
|
|
12
13
|
async function question(query) {
|
|
13
14
|
const rl = createInterface({ input: process.stdin, output: process.stdout });
|
|
@@ -105,10 +106,8 @@ function exec(cmd, cwd) {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
async function cloneTemplate() {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
execSync(`git clone --depth=1 --branch ${TEMPLATE_BRANCH} ${TEMPLATE_REPO} "${TEMPLATE_DIR}"`, { stdio: "pipe" });
|
|
109
|
+
TEMPLATE_DIR = await mkdtemp(join(tmpdir(), "tm-videogen-"));
|
|
110
|
+
execFileSync("git", ["clone", "--depth=1", "--branch", TEMPLATE_BRANCH, TEMPLATE_REPO, TEMPLATE_DIR], { stdio: "pipe" });
|
|
112
111
|
}
|
|
113
112
|
|
|
114
113
|
export async function video(args) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mkt-skills",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Install Claude Code marketing skills from marketingskills.directory",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -33,7 +33,11 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"repository": {
|
|
35
35
|
"type": "git",
|
|
36
|
-
"url": "git+https://github.com/sandeepkelvadi/mkt-skills
|
|
36
|
+
"url": "git+https://github.com/sandeepkelvadi/mkt-skills.git",
|
|
37
|
+
"directory": "cli"
|
|
37
38
|
},
|
|
38
|
-
"homepage": "https://marketingskills.directory"
|
|
39
|
+
"homepage": "https://marketingskills.directory",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/sandeepkelvadi/mkt-skills/issues"
|
|
42
|
+
}
|
|
39
43
|
}
|