@uxf/scripts 11.61.0 → 11.61.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/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/scripts",
|
|
3
|
-
"version": "11.61.
|
|
3
|
+
"version": "11.61.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"uxf-audit": "bin/uxf-audit.js",
|
|
8
|
+
"uxf-claude-sync": "bin/uxf-claude-sync.js",
|
|
8
9
|
"uxf-lunch": "bin/uxf-lunch.js",
|
|
9
10
|
"uxf-push-notifier": "bin/uxf-push-notifier.js",
|
|
10
11
|
"uxf-release": "bin/uxf-release.js",
|
|
@@ -14,12 +14,17 @@ Usage:
|
|
|
14
14
|
type: "string",
|
|
15
15
|
group: "Options",
|
|
16
16
|
})
|
|
17
|
+
.option("fileName", {
|
|
18
|
+
describe: "Claude file name",
|
|
19
|
+
type: "string",
|
|
20
|
+
group: "Options",
|
|
21
|
+
})
|
|
17
22
|
.option("h", { alias: "help", group: "Options" })
|
|
18
23
|
.strict(false)
|
|
19
24
|
.exitProcess(false);
|
|
20
25
|
|
|
21
26
|
try {
|
|
22
|
-
const { help, url, ...options } = cli.parse(argv.slice(2));
|
|
27
|
+
const { help, url, fileName, ...options } = cli.parse(argv.slice(2));
|
|
23
28
|
|
|
24
29
|
if (Boolean(help)) {
|
|
25
30
|
return 0;
|
|
@@ -27,6 +32,7 @@ Usage:
|
|
|
27
32
|
|
|
28
33
|
await require("./index")(
|
|
29
34
|
url,
|
|
35
|
+
fileName,
|
|
30
36
|
);
|
|
31
37
|
} catch (e) {
|
|
32
38
|
console.error(e);
|
|
@@ -2,7 +2,6 @@ const fs = require('fs');
|
|
|
2
2
|
const https = require('https');
|
|
3
3
|
const http = require('http');
|
|
4
4
|
|
|
5
|
-
const fileName = 'CLAUDE.md';
|
|
6
5
|
const header = '# Global guidelines';
|
|
7
6
|
|
|
8
7
|
// Funkce pro stažení obsahu z URL
|
|
@@ -31,7 +30,7 @@ function downloadContent(url) {
|
|
|
31
30
|
}
|
|
32
31
|
|
|
33
32
|
// Funkce pro úpravu souboru
|
|
34
|
-
function processFile(content) {
|
|
33
|
+
function processFile(content, fileName = "CLAUDE.md") {
|
|
35
34
|
try {
|
|
36
35
|
// Kontrola, zda soubor existuje
|
|
37
36
|
let fileContent = '';
|
|
@@ -65,12 +64,12 @@ function processFile(content) {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
module.exports = async function(url) {
|
|
67
|
+
module.exports = async function(url, fileName) {
|
|
69
68
|
console.log(`Stahuji obsah z ${url}...`);
|
|
70
69
|
|
|
71
70
|
try {
|
|
72
71
|
const content = await downloadContent(url);
|
|
73
|
-
processFile(content);
|
|
72
|
+
processFile(content, fileName);
|
|
74
73
|
} catch (error) {
|
|
75
74
|
console.error(`Chyba: ${error.message}`);
|
|
76
75
|
process.exit(1);
|