duoops 0.2.3 → 0.2.4
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/commands/init.js +3 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/commands/init.js
CHANGED
|
@@ -11,6 +11,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
11
11
|
import { configManager } from '../lib/config.js';
|
|
12
12
|
import { detectGcpProject, enableApis, validateProjectAccess } from '../lib/gcloud.js';
|
|
13
13
|
import McpDeploy from './mcp/deploy.js';
|
|
14
|
+
const gitlabAuthHeaders = (token) => token.startsWith('glpat-') ? { 'PRIVATE-TOKEN': token } : { Authorization: `Bearer ${token}` };
|
|
14
15
|
const hasBinary = (command) => {
|
|
15
16
|
try {
|
|
16
17
|
execSync(`${command} --version`, { stdio: 'ignore' });
|
|
@@ -50,7 +51,7 @@ const setGitlabVariable = async (auth, projectPath, variable) => {
|
|
|
50
51
|
const apiUrl = `${base}/api/v4/projects/${project}/variables`;
|
|
51
52
|
await axios
|
|
52
53
|
.delete(`${apiUrl}/${variable.key}`, {
|
|
53
|
-
headers:
|
|
54
|
+
headers: gitlabAuthHeaders(auth.token),
|
|
54
55
|
})
|
|
55
56
|
.catch(() => { });
|
|
56
57
|
await axios.post(apiUrl, {
|
|
@@ -58,7 +59,7 @@ const setGitlabVariable = async (auth, projectPath, variable) => {
|
|
|
58
59
|
masked: Boolean(variable.masked),
|
|
59
60
|
protected: false,
|
|
60
61
|
value: variable.value,
|
|
61
|
-
}, { headers:
|
|
62
|
+
}, { headers: gitlabAuthHeaders(auth.token) });
|
|
62
63
|
};
|
|
63
64
|
const ensureServiceAccount = (projectId, serviceAccount) => {
|
|
64
65
|
try {
|
package/oclif.manifest.json
CHANGED