@cliperhq/cliper 1.0.1 → 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/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +10 -1
- package/package.json +1 -1
- package/src/commands/push.ts +12 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AASA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"push.d.ts","sourceRoot":"","sources":["../../src/commands/push.ts"],"names":[],"mappings":"AASA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAuDjD"}
|
package/dist/commands/push.js
CHANGED
|
@@ -47,6 +47,15 @@ const API_URL = "https://cliperhq.vercel.app/api/push";
|
|
|
47
47
|
async function pushCommand() {
|
|
48
48
|
const projectRoot = process.cwd();
|
|
49
49
|
const contextPath = path.join((0, config_1.getCliperDir)(projectRoot), "context.md");
|
|
50
|
+
const cliperDir = (0, config_1.getCliperDir)(projectRoot);
|
|
51
|
+
const promptClaudePath = path.join(cliperDir, "prompt-claude.md");
|
|
52
|
+
const promptGptPath = path.join(cliperDir, "prompt-gpt.md");
|
|
53
|
+
const promptClaude = fs.existsSync(promptClaudePath)
|
|
54
|
+
? fs.readFileSync(promptClaudePath, "utf-8")
|
|
55
|
+
: null;
|
|
56
|
+
const promptGpt = fs.existsSync(promptGptPath)
|
|
57
|
+
? fs.readFileSync(promptGptPath, "utf-8")
|
|
58
|
+
: null;
|
|
50
59
|
if (!fs.existsSync(contextPath)) {
|
|
51
60
|
console.error(chalk_1.default.red("\n No context doc found. Run cliper init first.\n"));
|
|
52
61
|
process.exit(1);
|
|
@@ -67,7 +76,7 @@ async function pushCommand() {
|
|
|
67
76
|
"Content-Type": "application/json",
|
|
68
77
|
"Authorization": `Bearer ${token}`,
|
|
69
78
|
},
|
|
70
|
-
body: JSON.stringify({ projectName, content }),
|
|
79
|
+
body: JSON.stringify({ projectName, content, promptClaude, promptGpt }),
|
|
71
80
|
});
|
|
72
81
|
const data = await res.json();
|
|
73
82
|
if (!res.ok) {
|
package/package.json
CHANGED
package/src/commands/push.ts
CHANGED
|
@@ -10,6 +10,16 @@ const API_URL = "https://cliperhq.vercel.app/api/push";
|
|
|
10
10
|
export async function pushCommand(): Promise<void> {
|
|
11
11
|
const projectRoot = process.cwd();
|
|
12
12
|
const contextPath = path.join(getCliperDir(projectRoot), "context.md");
|
|
13
|
+
const cliperDir = getCliperDir(projectRoot);
|
|
14
|
+
const promptClaudePath = path.join(cliperDir, "prompt-claude.md");
|
|
15
|
+
const promptGptPath = path.join(cliperDir, "prompt-gpt.md");
|
|
16
|
+
|
|
17
|
+
const promptClaude = fs.existsSync(promptClaudePath)
|
|
18
|
+
? fs.readFileSync(promptClaudePath, "utf-8")
|
|
19
|
+
: null;
|
|
20
|
+
const promptGpt = fs.existsSync(promptGptPath)
|
|
21
|
+
? fs.readFileSync(promptGptPath, "utf-8")
|
|
22
|
+
: null;
|
|
13
23
|
|
|
14
24
|
if (!fs.existsSync(contextPath)) {
|
|
15
25
|
console.error(chalk.red("\n No context doc found. Run cliper init first.\n"));
|
|
@@ -35,7 +45,8 @@ export async function pushCommand(): Promise<void> {
|
|
|
35
45
|
"Content-Type": "application/json",
|
|
36
46
|
"Authorization": `Bearer ${token}`,
|
|
37
47
|
},
|
|
38
|
-
body: JSON.stringify({ projectName, content }),
|
|
48
|
+
body: JSON.stringify({ projectName, content, promptClaude, promptGpt }),
|
|
49
|
+
|
|
39
50
|
});
|
|
40
51
|
|
|
41
52
|
const data = await res.json() as any;
|