@gallop.software/studio 2.3.85 → 2.3.86
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/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CA7jbs-1.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
package/dist/server/index.js
CHANGED
|
@@ -1944,8 +1944,8 @@ async function handlePushUpdatesStream(request) {
|
|
|
1944
1944
|
controller.close();
|
|
1945
1945
|
return;
|
|
1946
1946
|
}
|
|
1947
|
-
const { paths, operationId } = await request.json();
|
|
1948
|
-
if (!
|
|
1947
|
+
const { paths: inputPaths, operationId } = await request.json();
|
|
1948
|
+
if (!inputPaths || !Array.isArray(inputPaths) || inputPaths.length === 0) {
|
|
1949
1949
|
sendEvent({ type: "error", message: "No paths provided" });
|
|
1950
1950
|
controller.close();
|
|
1951
1951
|
return;
|
|
@@ -1959,10 +1959,30 @@ async function handlePushUpdatesStream(request) {
|
|
|
1959
1959
|
const meta = await loadMeta();
|
|
1960
1960
|
const cdnUrls = getCdnUrls(meta);
|
|
1961
1961
|
const r2PublicUrl = publicUrl.replace(/\/$/, "");
|
|
1962
|
+
const paths = [];
|
|
1963
|
+
for (const inputPath of inputPaths) {
|
|
1964
|
+
const key = inputPath.startsWith("public/") ? "/" + inputPath.slice(7) : inputPath;
|
|
1965
|
+
const isFolder = !key.match(/\.[a-zA-Z0-9]+$/);
|
|
1966
|
+
if (isFolder) {
|
|
1967
|
+
const folderPrefix = key.endsWith("/") ? key : key + "/";
|
|
1968
|
+
for (const [metaKey, entry] of Object.entries(meta)) {
|
|
1969
|
+
if (metaKey.startsWith(folderPrefix) && entry && typeof entry === "object" && "u" in entry && entry.u === 1) {
|
|
1970
|
+
paths.push(metaKey);
|
|
1971
|
+
}
|
|
1972
|
+
}
|
|
1973
|
+
} else {
|
|
1974
|
+
paths.push(inputPath);
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1962
1977
|
const pushed = [];
|
|
1963
1978
|
const skipped = [];
|
|
1964
1979
|
const errors = [];
|
|
1965
1980
|
const total = paths.length;
|
|
1981
|
+
if (total === 0) {
|
|
1982
|
+
sendEvent({ type: "complete", pushed: 0, message: "No files with pending updates found." });
|
|
1983
|
+
controller.close();
|
|
1984
|
+
return;
|
|
1985
|
+
}
|
|
1966
1986
|
sendEvent({ type: "start", total });
|
|
1967
1987
|
for (let i = 0; i < paths.length; i++) {
|
|
1968
1988
|
if (isCancelled()) {
|
|
@@ -2102,11 +2122,26 @@ async function handleCancelStreamOperation(request) {
|
|
|
2102
2122
|
}
|
|
2103
2123
|
async function handleCancelUpdates(request) {
|
|
2104
2124
|
try {
|
|
2105
|
-
const { paths } = await request.json();
|
|
2106
|
-
if (!
|
|
2125
|
+
const { paths: inputPaths } = await request.json();
|
|
2126
|
+
if (!inputPaths || !Array.isArray(inputPaths) || inputPaths.length === 0) {
|
|
2107
2127
|
return jsonResponse({ error: "No paths provided" }, { status: 400 });
|
|
2108
2128
|
}
|
|
2109
2129
|
const meta = await loadMeta();
|
|
2130
|
+
const paths = [];
|
|
2131
|
+
for (const inputPath of inputPaths) {
|
|
2132
|
+
const key = inputPath.startsWith("public/") ? "/" + inputPath.slice(7) : inputPath;
|
|
2133
|
+
const isFolder = !key.match(/\.[a-zA-Z0-9]+$/);
|
|
2134
|
+
if (isFolder) {
|
|
2135
|
+
const folderPrefix = key.endsWith("/") ? key : key + "/";
|
|
2136
|
+
for (const [metaKey, entry] of Object.entries(meta)) {
|
|
2137
|
+
if (metaKey.startsWith(folderPrefix) && entry && typeof entry === "object" && "u" in entry && entry.u === 1) {
|
|
2138
|
+
paths.push(metaKey);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
} else {
|
|
2142
|
+
paths.push(inputPath);
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2110
2145
|
const cancelled = [];
|
|
2111
2146
|
const skipped = [];
|
|
2112
2147
|
const errors = [];
|