opencode-gitlab-dap 1.15.8 → 1.15.10
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/index.cjs +8 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3926,11 +3926,13 @@ async function readIndex(instanceUrl, token, scope, id, indexSlug) {
|
|
|
3926
3926
|
}
|
|
3927
3927
|
}
|
|
3928
3928
|
async function writeIndex(instanceUrl, token, scope, id, indexSlug, entries) {
|
|
3929
|
-
const content = formatIndex(entries);
|
|
3929
|
+
const content = formatIndex(entries) || "# Skills Index";
|
|
3930
3930
|
try {
|
|
3931
3931
|
await updateWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
3932
|
-
} catch {
|
|
3933
|
-
|
|
3932
|
+
} catch (updateErr) {
|
|
3933
|
+
if (!updateErr.message?.includes("not found") && !updateErr.message?.includes("404"))
|
|
3934
|
+
throw updateErr;
|
|
3935
|
+
await createWikiPage(instanceUrl, token, scope, id, indexSlug, content);
|
|
3934
3936
|
}
|
|
3935
3937
|
}
|
|
3936
3938
|
async function upsertIndexEntry(instanceUrl, token, scope, id, indexSlug, entry) {
|
|
@@ -3953,7 +3955,9 @@ async function removeIndexEntry(instanceUrl, token, scope, id, indexSlug, name)
|
|
|
3953
3955
|
async function upsertPage(instanceUrl, token, scope, id, slug, content) {
|
|
3954
3956
|
try {
|
|
3955
3957
|
await updateWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
3956
|
-
} catch {
|
|
3958
|
+
} catch (updateErr) {
|
|
3959
|
+
if (!updateErr.message?.includes("not found") && !updateErr.message?.includes("404"))
|
|
3960
|
+
throw updateErr;
|
|
3957
3961
|
await createWikiPage(instanceUrl, token, scope, id, slug, content);
|
|
3958
3962
|
}
|
|
3959
3963
|
}
|