@medyll/idae-api 0.180.0 → 0.187.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/LICENSE +21 -21
- package/README.md +376 -376
- package/cli.js +46 -0
- package/dist/__tests__/README.md +583 -583
- package/dist/adapters/.delete_marker +1 -0
- package/dist/idae-api.d.ts +18 -18
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/openApi/redoc.html +12 -12
- package/dist/openApi/swagger-ui.html +23 -23
- package/dist/server/middleware/README.md +46 -46
- package/package.json +53 -39
- package/dist/__tests__/helpers/testUtils.d.ts +0 -153
package/cli.js
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const pkgJson = require(path.join(__dirname, 'package.json'));
|
|
8
|
+
const packageName = pkgJson.name.replace(/^@[^/]+\//, '');
|
|
9
|
+
const cmd = process.argv[2];
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
if (cmd === 'get-readme') {
|
|
13
|
+
const readmePath = path.join(__dirname, 'README.md');
|
|
14
|
+
if (fs.existsSync(readmePath)) {
|
|
15
|
+
const content = fs.readFileSync(readmePath, 'utf8');
|
|
16
|
+
console.log(content);
|
|
17
|
+
} else {
|
|
18
|
+
console.error('README.md not found in this package.');
|
|
19
|
+
process.exit(1);
|
|
20
|
+
}
|
|
21
|
+
} else if (cmd === 'install-skill') {
|
|
22
|
+
const readline = require('readline');
|
|
23
|
+
const rl = readline.createInterface({
|
|
24
|
+
input: process.stdin,
|
|
25
|
+
output: process.stdout
|
|
26
|
+
});
|
|
27
|
+
const skillSrc = path.join(__dirname, 'SKILL.md');
|
|
28
|
+
const skillDest = path.resolve(__dirname, `../../../.github/skills/${packageName}/SKILL.md`);
|
|
29
|
+
if (!fs.existsSync(skillSrc)) {
|
|
30
|
+
console.error('SKILL.md not found in this package.');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
rl.question(`This will copy SKILL.md to .github/skills/${packageName}/SKILL.md. Continue? (y/n): `, (answer) => {
|
|
34
|
+
if (answer.trim().toLowerCase() === 'y' || answer.trim().toLowerCase() === 'yes') {
|
|
35
|
+
fs.mkdirSync(path.dirname(skillDest), { recursive: true });
|
|
36
|
+
fs.copyFileSync(skillSrc, skillDest);
|
|
37
|
+
console.log(`SKILL.md installed to .github/skills/${packageName}/SKILL.md`);
|
|
38
|
+
} else {
|
|
39
|
+
console.log('Operation cancelled.');
|
|
40
|
+
}
|
|
41
|
+
rl.close();
|
|
42
|
+
});
|
|
43
|
+
} else {
|
|
44
|
+
console.log('Usage: <cli> get-readme | install-skill');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|