stackmem 1.0.19 → 1.0.20
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/cli.js +5 -0
- package/package.json +1 -1
- package/src/cli.ts +6 -0
package/dist/cli.js
CHANGED
|
@@ -459,6 +459,9 @@ async function cmdCompress(project) {
|
|
|
459
459
|
}
|
|
460
460
|
// --- cm fix --------------------------------------------------------------
|
|
461
461
|
async function cmdFix(project, problem, solution) {
|
|
462
|
+
if (problem.trim().length === 0 || solution.trim().length === 0) {
|
|
463
|
+
fail("Problem and solution cannot be empty.");
|
|
464
|
+
}
|
|
462
465
|
const { error } = await supabase
|
|
463
466
|
.from("execution_log")
|
|
464
467
|
.insert({ project, problem, solution, resolved: false, device_id: getDeviceId() });
|
|
@@ -947,6 +950,8 @@ dist/
|
|
|
947
950
|
.DS_Store
|
|
948
951
|
*.log
|
|
949
952
|
coverage/
|
|
953
|
+
*-memories.json
|
|
954
|
+
*.db
|
|
950
955
|
`;
|
|
951
956
|
// Returns true if the file was created, false if it already existed
|
|
952
957
|
// (and was left untouched).
|
package/package.json
CHANGED
package/src/cli.ts
CHANGED
|
@@ -544,6 +544,10 @@ async function cmdCompress(project: string) {
|
|
|
544
544
|
// --- cm fix --------------------------------------------------------------
|
|
545
545
|
|
|
546
546
|
async function cmdFix(project: string, problem: string, solution: string) {
|
|
547
|
+
if (problem.trim().length === 0 || solution.trim().length === 0) {
|
|
548
|
+
fail("Problem and solution cannot be empty.");
|
|
549
|
+
}
|
|
550
|
+
|
|
547
551
|
const { error } = await supabase
|
|
548
552
|
.from("execution_log")
|
|
549
553
|
.insert({ project, problem, solution, resolved: false, device_id: getDeviceId() });
|
|
@@ -1078,6 +1082,8 @@ dist/
|
|
|
1078
1082
|
.DS_Store
|
|
1079
1083
|
*.log
|
|
1080
1084
|
coverage/
|
|
1085
|
+
*-memories.json
|
|
1086
|
+
*.db
|
|
1081
1087
|
`;
|
|
1082
1088
|
|
|
1083
1089
|
// Returns true if the file was created, false if it already existed
|