gyoshu 0.4.13 → 0.4.14
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
package/src/gyoshu-manifest.json
CHANGED
|
@@ -135,6 +135,9 @@ export interface AutoLoopState {
|
|
|
135
135
|
* // Returns: "/home/user/my-project/reports/customer-churn/auto/loop-state.json"
|
|
136
136
|
*/
|
|
137
137
|
export function getAutoLoopStatePath(reportTitle: string): string {
|
|
138
|
+
if (!reportTitle || typeof reportTitle !== "string") {
|
|
139
|
+
throw new Error("reportTitle is required for getAutoLoopStatePath");
|
|
140
|
+
}
|
|
138
141
|
return path.join(getReportDir(reportTitle), "auto", "loop-state.json");
|
|
139
142
|
}
|
|
140
143
|
|
|
@@ -161,6 +164,10 @@ export function getAutoLoopStatePath(reportTitle: string): string {
|
|
|
161
164
|
* ```
|
|
162
165
|
*/
|
|
163
166
|
export async function loadState(reportTitle: string): Promise<AutoLoopState | null> {
|
|
167
|
+
if (!reportTitle || typeof reportTitle !== "string") {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
|
|
164
171
|
const statePath = getAutoLoopStatePath(reportTitle);
|
|
165
172
|
|
|
166
173
|
try {
|