reeeliance-skills 1.0.0 → 1.0.2

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/dist/index.js CHANGED
@@ -47,9 +47,14 @@ async function fetchText(url, token) {
47
47
  throw new Error(`Failed to fetch ${url}: ${res.status} ${res.statusText}`);
48
48
  return res.text();
49
49
  }
50
+ // Use GitLab API file endpoint (avoids Cloudflare blocking raw URLs)
51
+ async function fetchFileViaApi(filePath, token) {
52
+ const url = `${GITLAB_API}/files/${encodeURIComponent(filePath)}/raw?ref=${GITLAB_BRANCH}`;
53
+ return fetchText(url, token);
54
+ }
50
55
  async function loadRemoteManifest(token) {
51
56
  process.stdout.write(chalk.dim("Fetching skill list from GitLab…"));
52
- const text = await fetchText(`${GITLAB_RAW}/skills.json`, token);
57
+ const text = await fetchFileViaApi("skills.json", token);
53
58
  process.stdout.write(chalk.dim(" done\n"));
54
59
  return JSON.parse(text);
55
60
  }
@@ -64,8 +69,7 @@ async function installRemoteSkill(skill, targetDir, token) {
64
69
  const entries = await listRemoteTree(skill.path, token);
65
70
  const files = entries.filter((e) => e.type === "blob");
66
71
  for (const file of files) {
67
- const rawUrl = `${GITLAB_RAW}/${file.path}`;
68
- const content = await fetchText(rawUrl, token);
72
+ const content = await fetchFileViaApi(file.path, token);
69
73
  const relative = file.path.slice(skill.path.length + 1);
70
74
  const destFile = join(destDir, relative);
71
75
  mkdirSync(dirname(destFile), { recursive: true });
package/package.json CHANGED
@@ -1,13 +1,18 @@
1
1
  {
2
2
  "name": "reeeliance-skills",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "reeeliance GmbH AI skill installer — select and install skills from the library into any AI agent",
5
5
  "type": "module",
6
+ "files": [
7
+ "dist/",
8
+ "src/"
9
+ ],
6
10
  "bin": {
7
11
  "skills": "dist/index.js"
8
12
  },
9
13
  "scripts": {
10
14
  "build": "tsc",
15
+ "prepublishOnly": "npm run build",
11
16
  "dev": "tsx src/index.ts",
12
17
  "start": "node dist/index.js"
13
18
  },
package/src/index.ts CHANGED
@@ -71,9 +71,15 @@ async function fetchText(url: string, token: string): Promise<string> {
71
71
  return res.text();
72
72
  }
73
73
 
74
+ // Use GitLab API file endpoint (avoids Cloudflare blocking raw URLs)
75
+ async function fetchFileViaApi(filePath: string, token: string): Promise<string> {
76
+ const url = `${GITLAB_API}/files/${encodeURIComponent(filePath)}/raw?ref=${GITLAB_BRANCH}`;
77
+ return fetchText(url, token);
78
+ }
79
+
74
80
  async function loadRemoteManifest(token: string): Promise<Manifest> {
75
81
  process.stdout.write(chalk.dim("Fetching skill list from GitLab…"));
76
- const text = await fetchText(`${GITLAB_RAW}/skills.json`, token);
82
+ const text = await fetchFileViaApi("skills.json", token);
77
83
  process.stdout.write(chalk.dim(" done\n"));
78
84
  return JSON.parse(text);
79
85
  }
@@ -92,8 +98,7 @@ async function installRemoteSkill(skill: Skill, targetDir: string, token: string
92
98
  const files = entries.filter((e) => e.type === "blob");
93
99
 
94
100
  for (const file of files) {
95
- const rawUrl = `${GITLAB_RAW}/${file.path}`;
96
- const content = await fetchText(rawUrl, token);
101
+ const content = await fetchFileViaApi(file.path, token);
97
102
  const relative = file.path.slice(skill.path.length + 1);
98
103
  const destFile = join(destDir, relative);
99
104
  mkdirSync(dirname(destFile), { recursive: true });
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "Node16",
5
- "moduleResolution": "Node16",
6
- "outDir": "dist",
7
- "rootDir": "src",
8
- "strict": true,
9
- "esModuleInterop": true,
10
- "skipLibCheck": true
11
- },
12
- "include": ["src"]
13
- }