chore(deps): update pnpm version and clean up package.json; remove unused dependencies and scripts

- Updated package manager to pnpm@11.22.0 in package.json.
- Removed unused dependencies and scripts from package.json and pnpm-lock.yaml.
- Cleaned up fs-store.js and other files by removing commented-out code and unused imports.
- Updated workflow configurations to use environment variables for URLs.
This commit is contained in:
2026-08-21 21:48:24 +07:00
parent e84432a492
commit 9985ff3440
13 changed files with 12 additions and 103 deletions
-9
View File
@@ -625,15 +625,6 @@ export function useOpsProcessRestart() {
});
}
export function useOpsBumpGeneration() {
const qc = useQueryClient();
return useMutation({
mutationFn: async (reason) =>
(await opsApi.post("/generation/bump", { reason })).data,
onSuccess: () => qc.invalidateQueries({ queryKey: ["ops-status"] }),
});
}
export function useWorkflowTrash() {
return useQuery({
queryKey: ["workflows", "trash"],
-6
View File
@@ -27,12 +27,6 @@ export const DEFAULT_INPUT_CONTEXT = `{
}
`;
export function normalizeScriptName(name) {
const trimmed = name.trim();
if (!trimmed) return "";
return trimmed.endsWith(".js") ? trimmed : `${trimmed}.js`;
}
export function scriptTags(meta) {
if (!Array.isArray(meta?.tags)) return [];
return meta.tags.map((t) => String(t).trim()).filter(Boolean);
-29
View File
@@ -12,35 +12,6 @@ triggers:
path: /new
`;
export function ensureWorkflowFilename(file) {
const trimmed = String(file ?? "").trim();
if (!trimmed) return "";
return /\.ya?ml$/i.test(trimmed) ? trimmed : `${trimmed}.yaml`;
}
/**
* Next unused copy filename: `track.yaml` → `track-copy.yaml`,
* `track-copy.yaml` → `track-copy-2.yaml`.
* @param {string} file
* @param {string[]} existingFiles
*/
export function suggestCopyFilename(file, existingFiles = []) {
const name = ensureWorkflowFilename(file) || "workflow.yaml";
const match = name.match(/^(.*?)(\.ya?ml)$/i);
const base = match ? match[1] : name;
const ext = match ? match[2] : ".yaml";
const existing = new Set(existingFiles);
const copyMatch = base.match(/^(.*)-copy(?:-(\d+))?$/);
const root = copyMatch ? copyMatch[1] : base;
const candidate = (i) =>
i <= 1 ? `${root}-copy${ext}` : `${root}-copy-${i}${ext}`;
let n = copyMatch ? Number(copyMatch[2] || 1) + 1 : 1;
while (existing.has(candidate(n))) n += 1;
return candidate(n);
}
let uidSeq = 0;
export function nextUiId(prefix = "ui") {