@simplysf/simply-gitlab-core 0.1.0
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/README.md +76 -0
- package/lib/auth.d.ts +9 -0
- package/lib/auth.js +26 -0
- package/lib/auth.js.map +1 -0
- package/lib/cicd.d.ts +29 -0
- package/lib/cicd.js +56 -0
- package/lib/cicd.js.map +1 -0
- package/lib/commits.d.ts +34 -0
- package/lib/commits.js +101 -0
- package/lib/commits.js.map +1 -0
- package/lib/config.d.ts +21 -0
- package/lib/config.js +76 -0
- package/lib/config.js.map +1 -0
- package/lib/env-file.d.ts +11 -0
- package/lib/env-file.js +98 -0
- package/lib/env-file.js.map +1 -0
- package/lib/errors.d.ts +31 -0
- package/lib/errors.js +66 -0
- package/lib/errors.js.map +1 -0
- package/lib/gitlab-client.d.ts +137 -0
- package/lib/gitlab-client.js +250 -0
- package/lib/gitlab-client.js.map +1 -0
- package/lib/http.d.ts +82 -0
- package/lib/http.js +285 -0
- package/lib/http.js.map +1 -0
- package/lib/index.d.ts +17 -0
- package/lib/index.js +46 -0
- package/lib/index.js.map +1 -0
- package/lib/json-input.d.ts +28 -0
- package/lib/json-input.js +84 -0
- package/lib/json-input.js.map +1 -0
- package/lib/merge-requests.d.ts +40 -0
- package/lib/merge-requests.js +89 -0
- package/lib/merge-requests.js.map +1 -0
- package/lib/output.d.ts +14 -0
- package/lib/output.js +65 -0
- package/lib/output.js.map +1 -0
- package/lib/redaction.d.ts +26 -0
- package/lib/redaction.js +71 -0
- package/lib/redaction.js.map +1 -0
- package/lib/repository-files.d.ts +50 -0
- package/lib/repository-files.js +70 -0
- package/lib/repository-files.js.map +1 -0
- package/lib/search.d.ts +20 -0
- package/lib/search.js +92 -0
- package/lib/search.js.map +1 -0
- package/lib/tables.d.ts +21 -0
- package/lib/tables.js +105 -0
- package/lib/tables.js.map +1 -0
- package/lib/testing.d.ts +16 -0
- package/lib/testing.js +63 -0
- package/lib/testing.js.map +1 -0
- package/lib/text.d.ts +10 -0
- package/lib/text.js +80 -0
- package/lib/text.js.map +1 -0
- package/lib/write-safety.d.ts +19 -0
- package/lib/write-safety.js +45 -0
- package/lib/write-safety.js.map +1 -0
- package/package.json +130 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"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"}
|
package/lib/text.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function stripControl(text: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Collapses server text onto a single line, for contexts where a newline is itself the attack.
|
|
4
|
+
*
|
|
5
|
+
* `stripControl` keeps `\n` because the layout this module emits depends on it. In an error
|
|
6
|
+
* message that is the wrong trade: a link type name or issue summary containing a newline can
|
|
7
|
+
* forge extra stderr lines — including a line that mimics this CLI's own JSON error object —
|
|
8
|
+
* and an agent parsing stderr line-by-line has no way to tell the forgery from the real thing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function stripControlOneLine(text: string): string;
|
package/lib/text.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Removes anything from server-chosen text that could make the rendered output lie.
|
|
18
|
+
*
|
|
19
|
+
* Anyone able to file a ticket controls an issue summary, anyone with page-edit rights controls
|
|
20
|
+
* a page body, and anyone with an account controls their display name. Three classes of
|
|
21
|
+
* character therefore have to go.
|
|
22
|
+
*
|
|
23
|
+
* ESC, BEL, backspace and the C1 range can erase or overwrite lines already printed, so a table
|
|
24
|
+
* could show a different status or assignee than the API actually returned.
|
|
25
|
+
*
|
|
26
|
+
* A bare carriage return does the same thing with no escape sequence at all: everything before
|
|
27
|
+
* it is overwritten on screen but still reaches a caller reading the stream. That splits what a
|
|
28
|
+
* person reviewing the terminal sees from what an agent actually ingests, which is precisely the
|
|
29
|
+
* human-in-the-loop check this output exists to support.
|
|
30
|
+
*
|
|
31
|
+
* Invisible Unicode format and bidi characters can reorder or hide text visually while leaving
|
|
32
|
+
* the underlying bytes intact.
|
|
33
|
+
*
|
|
34
|
+
* Newline and tab are kept: they carry the layout this renderer emits.
|
|
35
|
+
*/
|
|
36
|
+
/** Characters that can erase or overwrite text already printed. */
|
|
37
|
+
// eslint-disable-next-line no-control-regex -- matching control characters is the entire point
|
|
38
|
+
const REWRITES_THE_SCREEN = /[\u0000-\u0008\u000B-\u000D\u000E-\u001F\u007F-\u009F]/g;
|
|
39
|
+
/**
|
|
40
|
+
* Invisible formatting and bidi characters, which reorder or hide text while leaving the bytes
|
|
41
|
+
* intact. U+2028/U+2029 are line separators that several terminals and JSON consumers treat as
|
|
42
|
+
* newlines, so they forge a break that `\n` handling would otherwise have caught.
|
|
43
|
+
*/
|
|
44
|
+
const HIDES_OR_REORDERS = /[\u00AD\u061C\u200B-\u200F\u2028\u2029\u202A-\u202E\u2060-\u206F\uFEFF]/g;
|
|
45
|
+
/**
|
|
46
|
+
* Invisible characters that carry text rather than merely hiding it.
|
|
47
|
+
*
|
|
48
|
+
* The tag block is the canonical ASCII-smuggling vector: `Done` plus a tag-encoded instruction
|
|
49
|
+
* renders as `Done` to a person and reaches a tokenizer in full, which defeats the alignment
|
|
50
|
+
* this whole module exists to keep. The Hangul fillers are the same trick for a display name
|
|
51
|
+
* that renders blank; variation selectors carry payload the same way.
|
|
52
|
+
*
|
|
53
|
+
* Held in a named constant rather than inlined because the disable below has to sit immediately
|
|
54
|
+
* above the pattern, and prettier reformats a long inline `.replaceAll(...)` across lines —
|
|
55
|
+
* which silently moved the directive off its target once already.
|
|
56
|
+
*/
|
|
57
|
+
/*
|
|
58
|
+
* A block disable, not `eslint-disable-next-line`: variation selectors are combining marks by
|
|
59
|
+
* definition so the rule fires, and stripping them individually is precisely the intent — but
|
|
60
|
+
* prettier reflows this assignment across lines, which silently moved a line-scoped directive
|
|
61
|
+
* off its target twice. A block cannot drift.
|
|
62
|
+
*/
|
|
63
|
+
/* eslint-disable no-misleading-character-class */
|
|
64
|
+
const SMUGGLES_TEXT = /[\u{E0000}-\u{E007F}\u{FE00}-\u{FE0F}\u{E0100}-\u{E01EF}\u115F\u1160\u180B-\u180E\u3164\uFFA0]/gu;
|
|
65
|
+
/* eslint-enable no-misleading-character-class */
|
|
66
|
+
export function stripControl(text) {
|
|
67
|
+
return text.replaceAll(REWRITES_THE_SCREEN, '').replaceAll(HIDES_OR_REORDERS, '').replaceAll(SMUGGLES_TEXT, '');
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Collapses server text onto a single line, for contexts where a newline is itself the attack.
|
|
71
|
+
*
|
|
72
|
+
* `stripControl` keeps `\n` because the layout this module emits depends on it. In an error
|
|
73
|
+
* message that is the wrong trade: a link type name or issue summary containing a newline can
|
|
74
|
+
* forge extra stderr lines — including a line that mimics this CLI's own JSON error object —
|
|
75
|
+
* and an agent parsing stderr line-by-line has no way to tell the forgery from the real thing.
|
|
76
|
+
*/
|
|
77
|
+
export function stripControlOneLine(text) {
|
|
78
|
+
return stripControl(text).replaceAll(/\s+/g, ' ').trim();
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=text.js.map
|
package/lib/text.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text.js","sourceRoot":"","sources":["../src/text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH;;;;;;;;;;;;;;;;;;;GAmBG;AACH,mEAAmE;AACnE,+FAA+F;AAC/F,MAAM,mBAAmB,GAAG,yDAAyD,CAAC;AAEtF;;;;GAIG;AACH,MAAM,iBAAiB,GAAG,0EAA0E,CAAC;AAErG;;;;;;;;;;;GAWG;AACH;;;;;GAKG;AACH,kDAAkD;AAClD,MAAM,aAAa,GACjB,kGAAkG,CAAC;AACrG,iDAAiD;AAEjD,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,OAAO,IAAI,CAAC,UAAU,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;AAClH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3D,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { EnvLike } from './config.js';
|
|
2
|
+
/** The environment variable that marks a context as one that does not make changes. */
|
|
3
|
+
export declare const READ_ONLY_ENV = "GITLAB_READ_ONLY";
|
|
4
|
+
/** Whether the environment says this context does not write. Any value not meaning "yes" is ignored. */
|
|
5
|
+
export declare function isReadOnly(env?: EnvLike): boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Refuses a write when the environment says this context does not write.
|
|
8
|
+
*
|
|
9
|
+
* A guardrail, not a security boundary: an agent with shell access can unset the variable. It
|
|
10
|
+
* exists for the different and real problem of a person, or an agent, running against the wrong
|
|
11
|
+
* credentials or in the wrong context — pushing a commit to the wrong project is not undoable by
|
|
12
|
+
* a delete. The boundary that actually binds is a `read_api`-scoped GitLab token, which makes the
|
|
13
|
+
* instance refuse the write server-side.
|
|
14
|
+
*
|
|
15
|
+
* Shared by the CLI (checked once in its base command before any write command runs) and the
|
|
16
|
+
* MCP server (checked before any write tool runs), so the two cannot disagree about what the
|
|
17
|
+
* variable means.
|
|
18
|
+
*/
|
|
19
|
+
export declare function assertWritesAllowed(env?: EnvLike): void;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import process from 'node:process';
|
|
17
|
+
import { ConfigError } from './errors.js';
|
|
18
|
+
/** The environment variable that marks a context as one that does not make changes. */
|
|
19
|
+
export const READ_ONLY_ENV = 'GITLAB_READ_ONLY';
|
|
20
|
+
const TRUTHY = new Set(['1', 'true', 'yes', 'on']);
|
|
21
|
+
/** Whether the environment says this context does not write. Any value not meaning "yes" is ignored. */
|
|
22
|
+
export function isReadOnly(env = process.env) {
|
|
23
|
+
const raw = env[READ_ONLY_ENV];
|
|
24
|
+
return raw !== undefined && TRUTHY.has(raw.trim().toLowerCase());
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Refuses a write when the environment says this context does not write.
|
|
28
|
+
*
|
|
29
|
+
* A guardrail, not a security boundary: an agent with shell access can unset the variable. It
|
|
30
|
+
* exists for the different and real problem of a person, or an agent, running against the wrong
|
|
31
|
+
* credentials or in the wrong context — pushing a commit to the wrong project is not undoable by
|
|
32
|
+
* a delete. The boundary that actually binds is a `read_api`-scoped GitLab token, which makes the
|
|
33
|
+
* instance refuse the write server-side.
|
|
34
|
+
*
|
|
35
|
+
* Shared by the CLI (checked once in its base command before any write command runs) and the
|
|
36
|
+
* MCP server (checked before any write tool runs), so the two cannot disagree about what the
|
|
37
|
+
* variable means.
|
|
38
|
+
*/
|
|
39
|
+
export function assertWritesAllowed(env = process.env) {
|
|
40
|
+
if (isReadOnly(env)) {
|
|
41
|
+
throw new ConfigError(`${READ_ONLY_ENV} is set, so this context does not make changes. Unset it, or pass a ` +
|
|
42
|
+
'credential file that is meant for writing, to proceed.');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=write-safety.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write-safety.js","sourceRoot":"","sources":["../src/write-safety.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,uFAAuF;AACvF,MAAM,CAAC,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAEhD,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;AAEnD,wGAAwG;AACxG,MAAM,UAAU,UAAU,CAAC,MAAe,OAAO,CAAC,GAAG;IACnD,MAAM,GAAG,GAAG,GAAG,CAAC,aAAa,CAAC,CAAC;IAC/B,OAAO,GAAG,KAAK,SAAS,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;AACnE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAAe,OAAO,CAAC,GAAG;IAC5D,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACpB,MAAM,IAAI,WAAW,CACnB,GAAG,aAAa,sEAAsE;YACpF,wDAAwD,CAC3D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@simplysf/simply-gitlab-core",
|
|
3
|
+
"description": "Configuration, authentication, HTTP client, and shared logic for working with GitLab",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": "@ClayChipps",
|
|
6
|
+
"homepage": "https://github.com/SimplySF/simply-gitlab",
|
|
7
|
+
"bugs": "https://github.com/SimplySF/simply-gitlab/issues",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/SimplySF/simply-gitlab",
|
|
11
|
+
"directory": "packages/simply-gitlab-core"
|
|
12
|
+
},
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=22.0.0"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"/lib"
|
|
18
|
+
],
|
|
19
|
+
"keywords": [
|
|
20
|
+
"gitlab",
|
|
21
|
+
"ci",
|
|
22
|
+
"merge-requests",
|
|
23
|
+
"simply"
|
|
24
|
+
],
|
|
25
|
+
"license": "Apache-2.0",
|
|
26
|
+
"type": "module",
|
|
27
|
+
"main": "./lib/index.js",
|
|
28
|
+
"types": "./lib/index.d.ts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./lib/index.d.ts",
|
|
32
|
+
"default": "./lib/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./testing": {
|
|
35
|
+
"types": "./lib/testing.d.ts",
|
|
36
|
+
"default": "./lib/testing.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"@vitest/coverage-v8": "^4.1.10",
|
|
42
|
+
"vitest": "^4.1.10"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "wireit",
|
|
49
|
+
"compile": "wireit",
|
|
50
|
+
"fix-license": "eslint src test --fix --rule \"header/header: [2]\"",
|
|
51
|
+
"format": "wireit",
|
|
52
|
+
"lint": "wireit",
|
|
53
|
+
"test": "wireit",
|
|
54
|
+
"test:coverage": "vitest run --coverage --project simply-gitlab-core",
|
|
55
|
+
"test:only": "wireit",
|
|
56
|
+
"test:watch": "vitest watch --project simply-gitlab-core"
|
|
57
|
+
},
|
|
58
|
+
"wireit": {
|
|
59
|
+
"build": {
|
|
60
|
+
"dependencies": [
|
|
61
|
+
"compile",
|
|
62
|
+
"lint"
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
"compile": {
|
|
66
|
+
"command": "tsc -p . --pretty --incremental",
|
|
67
|
+
"files": [
|
|
68
|
+
"src/**/*.ts",
|
|
69
|
+
"**/tsconfig.json",
|
|
70
|
+
"../../tsconfig.json"
|
|
71
|
+
],
|
|
72
|
+
"output": [
|
|
73
|
+
"lib/**",
|
|
74
|
+
"*.tsbuildinfo"
|
|
75
|
+
],
|
|
76
|
+
"clean": "if-file-deleted"
|
|
77
|
+
},
|
|
78
|
+
"format": {
|
|
79
|
+
"command": "prettier --write \"+(src|test)/**/*.+(ts|js|json)\"",
|
|
80
|
+
"files": [
|
|
81
|
+
"src/**/*.ts",
|
|
82
|
+
"test/**/*.ts",
|
|
83
|
+
".prettier*"
|
|
84
|
+
],
|
|
85
|
+
"output": []
|
|
86
|
+
},
|
|
87
|
+
"lint": {
|
|
88
|
+
"command": "eslint src test --color --cache --cache-location .eslintcache",
|
|
89
|
+
"files": [
|
|
90
|
+
"src/**/*.ts",
|
|
91
|
+
"test/**/*.ts",
|
|
92
|
+
"**/.eslint*",
|
|
93
|
+
"**/tsconfig.json",
|
|
94
|
+
"../../eslint.config.mjs",
|
|
95
|
+
"../../tsconfig.json"
|
|
96
|
+
],
|
|
97
|
+
"output": []
|
|
98
|
+
},
|
|
99
|
+
"test": {
|
|
100
|
+
"dependencies": [
|
|
101
|
+
"test:compile",
|
|
102
|
+
"test:only",
|
|
103
|
+
"lint"
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
"test:compile": {
|
|
107
|
+
"command": "tsc -p \"./test\" --pretty",
|
|
108
|
+
"files": [
|
|
109
|
+
"test/**/*.ts",
|
|
110
|
+
"**/tsconfig.json",
|
|
111
|
+
"../../tsconfig.json"
|
|
112
|
+
],
|
|
113
|
+
"output": []
|
|
114
|
+
},
|
|
115
|
+
"test:only": {
|
|
116
|
+
"command": "vitest run --project simply-gitlab-core",
|
|
117
|
+
"env": {
|
|
118
|
+
"FORCE_COLOR": "2"
|
|
119
|
+
},
|
|
120
|
+
"files": [
|
|
121
|
+
"test/**/*.ts",
|
|
122
|
+
"src/**/*.ts",
|
|
123
|
+
"**/tsconfig.json",
|
|
124
|
+
"../../tsconfig.json",
|
|
125
|
+
"vitest.config.ts"
|
|
126
|
+
],
|
|
127
|
+
"output": []
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|