@goodfellow-cms/gitlab 0.10.0 → 0.10.1
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.js +3 -1
- package/dist/testing.js +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1401,6 +1401,7 @@ function gitlabSetup(options = {}) {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
for (const { reader, read } of link.links.reads) {
|
|
1403
1403
|
const target = ids.get(reader);
|
|
1404
|
+
const source = ids.get(read);
|
|
1404
1405
|
await attempt({
|
|
1405
1406
|
kind: "read",
|
|
1406
1407
|
reader: link[reader],
|
|
@@ -1408,7 +1409,8 @@ function gitlabSetup(options = {}) {
|
|
|
1408
1409
|
reason: ""
|
|
1409
1410
|
}, async () => {
|
|
1410
1411
|
if (target === void 0) throw new GitApiError(404, `GitLab couldn't find ${link[reader]}.`);
|
|
1411
|
-
|
|
1412
|
+
if (source === void 0) throw new GitApiError(404, `GitLab couldn't find ${link[read]}.`);
|
|
1413
|
+
await gitlabRequest(api, `/projects/${source}/job_token_scope/allowlist`, {
|
|
1412
1414
|
method: "POST",
|
|
1413
1415
|
body: { target_project_id: target }
|
|
1414
1416
|
});
|
package/dist/testing.js
CHANGED
|
@@ -383,6 +383,7 @@ function fakeGitLab(options) {
|
|
|
383
383
|
});
|
|
384
384
|
}
|
|
385
385
|
if (rest === "/job_token_scope/allowlist" && request.method === "POST") {
|
|
386
|
+
if (!/^\d+$/.test(key)) return json({ error: "id is invalid" }, 400);
|
|
386
387
|
const body = await request.json();
|
|
387
388
|
if (options.refuseConnections?.includes("allowlist")) return json({ message: "403 Forbidden" }, 403);
|
|
388
389
|
if (![...created.values()].some((candidate) => candidate.id === body.target_project_id)) return json({ message: "404 Project Not Found" }, 404);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodfellow-cms/gitlab",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Edit a Goodfellow CMS site stored on GitLab, straight from the browser.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"goodfellow",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@goodfellow-cms/core": "0.10.
|
|
42
|
+
"@goodfellow-cms/core": "0.10.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@puckeditor/core": "0.23.0"
|