@catladder/cli 0.0.0-refactor-cli-add-improved-git-utilities-916545cc → 0.0.0-refactor-remove-rails-hosts-60f9538c
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/bundles/catci/index.js +43322 -44345
- package/dist/bundles/catenv/index.js +27564 -43997
- package/dist/bundles/cli/index.js +149115 -143958
- package/dist/cli/src/apps/catenv/catenv.js +1 -1
- package/dist/cli/src/apps/catenv/catenv.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/index.js +0 -4
- package/dist/cli/src/apps/cli/commands/project/index.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.d.ts +1 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js +3 -11
- package/dist/cli/src/apps/cli/commands/project/setup/setupAccessTokens.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js +2 -4
- package/dist/cli/src/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.d.ts +1 -2
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js +9 -23
- package/dist/cli/src/apps/cli/commands/project/setup/setupKubernetes.js.map +1 -1
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js +4 -6
- package/dist/cli/src/apps/cli/commands/project/setup/setupTopic.js.map +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.d.ts +1 -1
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js +4 -3
- package/dist/cli/src/apps/cli/utils/getGoogleAuthUserNumber.js.map +1 -1
- package/dist/cli/src/packageInfos.js +0 -1
- package/dist/cli/src/packageInfos.js.map +1 -1
- package/dist/cli/src/utils/gitlab.d.ts +7 -10
- package/dist/cli/src/utils/gitlab.js +45 -67
- package/dist/cli/src/utils/gitlab.js.map +1 -1
- package/dist/cli/src/utils/preferences/index.d.ts +3 -0
- package/dist/cli/src/utils/preferences/index.js +35 -0
- package/dist/cli/src/utils/preferences/index.js.map +1 -0
- package/dist/pipeline/src/build/cache/createJobCache.js +2 -2
- package/dist/pipeline/src/build/cache/createJobCache.js.map +1 -1
- package/dist/pipeline/src/build/sbom.js +2 -2
- package/dist/pipeline/src/build/sbom.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +3 -3
- package/dist/pipeline/src/config/readConfig.js +0 -1
- package/dist/pipeline/src/config/readConfig.js.map +1 -1
- package/dist/pipeline/src/context/createComponentContext.js +1 -1
- package/dist/pipeline/src/context/createComponentContext.js.map +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.d.ts +1 -1
- package/dist/pipeline/src/context/getEnvironmentVariables.js +1 -5
- package/dist/pipeline/src/context/getEnvironmentVariables.js.map +1 -1
- package/dist/pipeline/src/deploy/base/deploy.js +3 -3
- package/dist/pipeline/src/deploy/base/deploy.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +2 -10
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js +2 -4
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunServices.js.map +1 -1
- package/dist/pipeline/src/deploy/types/index.d.ts +3 -3
- package/dist/pipeline/src/pipeline/createMainPipeline.js +13 -7
- package/dist/pipeline/src/pipeline/createMainPipeline.js.map +1 -1
- package/dist/pipeline/src/pipeline/generatePipelineFiles.d.ts +7 -40
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js +69 -42
- package/dist/pipeline/src/pipeline/generatePipelineFiles.js.map +1 -1
- package/dist/pipeline/src/pipeline/gitlab/createGitlabJobs.d.ts +6 -4
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.d.ts +0 -2
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js +2 -4
- package/dist/pipeline/src/pipeline/gitlab/gitlabReleaseJobs.js.map +1 -1
- package/dist/pipeline/src/pipeline/index.d.ts +0 -1
- package/dist/pipeline/src/pipeline/index.js +0 -1
- package/dist/pipeline/src/pipeline/index.js.map +1 -1
- package/dist/pipeline/src/types/config.d.ts +3 -3
- package/dist/pipeline/src/types/gitlab-types.d.ts +2 -1
- package/dist/pipeline/src/types/pipeline.d.ts +0 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +15 -14
- package/src/apps/catenv/catenv.ts +1 -1
- package/src/apps/cli/commands/project/index.ts +1 -6
- package/src/apps/cli/commands/project/setup/setupAccessTokens.ts +6 -16
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +2 -4
- package/src/apps/cli/commands/project/setup/setupKubernetes.ts +27 -30
- package/src/apps/cli/commands/project/setup/setupTopic.ts +11 -6
- package/src/apps/cli/utils/getGoogleAuthUserNumber.ts +4 -6
- package/src/packageInfos.ts +0 -1
- package/src/utils/gitlab.ts +101 -99
- package/src/utils/preferences/index.ts +36 -0
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.d.ts +0 -7
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.js +0 -46
- package/dist/cli/src/apps/cli/commands/project/commandMigrateHelm3.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandOpenCostDashboard.js.map +0 -1
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.d.ts +0 -3
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js +0 -22
- package/dist/cli/src/apps/cli/commands/project/commandOpenDashboard.js.map +0 -1
- package/dist/cli/src/git/getGitConfigVars.d.ts +0 -4
- package/dist/cli/src/git/getGitConfigVars.js +0 -14
- package/dist/cli/src/git/getGitConfigVars.js.map +0 -1
- package/dist/cli/src/git/getGitRemoteHostAndPath.d.ts +0 -9
- package/dist/cli/src/git/getGitRemoteHostAndPath.js +0 -23
- package/dist/cli/src/git/getGitRemoteHostAndPath.js.map +0 -1
- package/dist/cli/src/git/getProjectRootPath.d.ts +0 -1
- package/dist/cli/src/git/getProjectRootPath.js +0 -10
- package/dist/cli/src/git/getProjectRootPath.js.map +0 -1
- package/dist/cli/src/git/gitConfig.d.ts +0 -23
- package/dist/cli/src/git/gitConfig.js +0 -60
- package/dist/cli/src/git/gitConfig.js.map +0 -1
- package/dist/cli/src/git/index.d.ts +0 -4
- package/dist/cli/src/git/index.js +0 -21
- package/dist/cli/src/git/index.js.map +0 -1
- package/dist/cli/src/gitlab/apiClient.d.ts +0 -5
- package/dist/cli/src/gitlab/apiClient.js +0 -21
- package/dist/cli/src/gitlab/apiClient.js.map +0 -1
- package/dist/cli/src/gitlab/getGitlabProjectId.d.ts +0 -4
- package/dist/cli/src/gitlab/getGitlabProjectId.js +0 -29
- package/dist/cli/src/gitlab/getGitlabProjectId.js.map +0 -1
- package/dist/cli/src/gitlab/gitlabToken.d.ts +0 -10
- package/dist/cli/src/gitlab/gitlabToken.js +0 -42
- package/dist/cli/src/gitlab/gitlabToken.js.map +0 -1
- package/dist/cli/src/gitlab/index.d.ts +0 -3
- package/dist/cli/src/gitlab/index.js +0 -20
- package/dist/cli/src/gitlab/index.js.map +0 -1
- package/dist/cli/src/utils/preferences.d.ts +0 -15
- package/dist/cli/src/utils/preferences.js +0 -61
- package/dist/cli/src/utils/preferences.js.map +0 -1
- package/dist/cli/src/utils/projectPreferences.d.ts +0 -5
- package/dist/cli/src/utils/projectPreferences.js +0 -54
- package/dist/cli/src/utils/projectPreferences.js.map +0 -1
- package/dist/pipeline/src/pipeline/createChildPipeline.d.ts +0 -3
- package/dist/pipeline/src/pipeline/createChildPipeline.js +0 -30
- package/dist/pipeline/src/pipeline/createChildPipeline.js.map +0 -1
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.d.ts +0 -1
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js +0 -32
- package/dist/pipeline/src/pipeline/gitlab/getPipelineTriggerForGitlabChildPipeline.js.map +0 -1
- package/src/apps/cli/commands/project/commandMigrateHelm3.ts +0 -63
- package/src/apps/cli/commands/project/commandOpenCostDashboard.ts +0 -32
- package/src/apps/cli/commands/project/commandOpenDashboard.ts +0 -28
- package/src/git/getGitConfigVars.ts +0 -11
- package/src/git/getGitRemoteHostAndPath.ts +0 -28
- package/src/git/getProjectRootPath.ts +0 -6
- package/src/git/gitConfig.ts +0 -86
- package/src/git/index.ts +0 -4
- package/src/gitlab/apiClient.ts +0 -23
- package/src/gitlab/getGitlabProjectId.ts +0 -32
- package/src/gitlab/gitlabToken.ts +0 -52
- package/src/gitlab/index.ts +0 -3
- package/src/utils/preferences.ts +0 -85
- package/src/utils/projectPreferences.ts +0 -78
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const child_process_promise_1 = require("child-process-promise");
|
|
4
|
-
const getProjectConfig_1 = require("../../../../config/getProjectConfig");
|
|
5
|
-
const log_1 = require("../../../../utils/log");
|
|
6
|
-
const autocompletions_1 = require("./utils/autocompletions");
|
|
7
|
-
/**
|
|
8
|
-
* Error: rendered manifests contain a resource that already exists.
|
|
9
|
-
* Unable to continue with install: ConfigMap "web-app-env" in namespace "pvl-bike2school-dev" exists and cannot be imported into the current release: invalid ownership metadata; label validation error: missing key "app.kubernetes.io/managed-by": must be set to "Helm"; annotation validation error: missing key "meta.helm.sh/release-name": must be set to "pvl-bike2school-dev-web"; annotation validation error: missing key "meta.helm.sh/release-namespace": must be set to "pvl-bike2school-dev"
|
|
10
|
-
*/
|
|
11
|
-
exports.default = async (vorpal) => vorpal
|
|
12
|
-
.command("project-migrate-helm3 <envComponent>", "Do manual step for helm2 to helm3 migration")
|
|
13
|
-
.autocomplete((await (0, autocompletions_1.envAndComponents)()).filter((e) => !e.startsWith("local") && !e.startsWith("review")))
|
|
14
|
-
.action(async function ({ envComponent }) {
|
|
15
|
-
try {
|
|
16
|
-
const { env, componentName } = (0, getProjectConfig_1.parseChoice)(envComponent);
|
|
17
|
-
const result = await (0, child_process_promise_1.exec)("helm version --short");
|
|
18
|
-
const version = result.stdout;
|
|
19
|
-
this.log(`your helm version: ${version}`);
|
|
20
|
-
if (!version.startsWith("v3")) {
|
|
21
|
-
throw new Error("no helm3");
|
|
22
|
-
}
|
|
23
|
-
try {
|
|
24
|
-
await (0, child_process_promise_1.exec)("helm plugin install https://github.com/helm/helm-2to3.git");
|
|
25
|
-
this.log("successfully installed plugin https://github.com/helm/helm-2to3.git");
|
|
26
|
-
}
|
|
27
|
-
catch (e) {
|
|
28
|
-
// ignore
|
|
29
|
-
}
|
|
30
|
-
// we use the app full name as the release name
|
|
31
|
-
const releaseName = (await (0, getProjectConfig_1.getEnvironment)(env, componentName)).fullName;
|
|
32
|
-
this.log(`helm release name: ${releaseName}`);
|
|
33
|
-
this.log("");
|
|
34
|
-
this.log("migrating now... 😼. This may take a moment");
|
|
35
|
-
this.log("");
|
|
36
|
-
const r = await (0, child_process_promise_1.exec)(`helm 2to3 convert --delete-v2-releases ${releaseName}`);
|
|
37
|
-
this.log(r);
|
|
38
|
-
}
|
|
39
|
-
catch (e) {
|
|
40
|
-
(0, log_1.logError)(this, e.message);
|
|
41
|
-
this.log("make sure that you have installed latest helm3 locally");
|
|
42
|
-
this.log("(e.g. brew upgrade helm)");
|
|
43
|
-
this.log("");
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=commandMigrateHelm3.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandMigrateHelm3.js","sourceRoot":"","sources":["../../../../../../../src/apps/cli/commands/project/commandMigrateHelm3.ts"],"names":[],"mappings":";;AAAA,iEAA6C;AAE7C,0EAG6C;AAC7C,+CAAiD;AAEjD,6DAA2D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AAC,CAAC;QACxD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,MAAM,CAAC,GAAG,MAAM,IAAA,4BAAI,EAClB,0CAA0C,WAAW,EAAE,CACxD,CAAC;QACF,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAA,cAAQ,EAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;QAC1B,IAAI,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;QACnE,IAAI,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;QACrC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACf,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const open_1 = __importDefault(require("open"));
|
|
7
|
-
const constants_1 = require("../../../../config/constants");
|
|
8
|
-
const portForward_1 = require("../../../../kubernetes/portForward");
|
|
9
|
-
const projects_1 = require("../../../../utils/projects");
|
|
10
|
-
const autocompletions_1 = require("./utils/autocompletions");
|
|
11
|
-
const ensureCluster_1 = __importDefault(require("./utils/ensureCluster"));
|
|
12
|
-
exports.default = async (vorpal) => vorpal
|
|
13
|
-
.command("project-check-costs <envComponent>", "Shows you how much you're spending")
|
|
14
|
-
.autocomplete(await (0, autocompletions_1.envAndComponents)())
|
|
15
|
-
.action(async function ({ envComponent }) {
|
|
16
|
-
await ensureCluster_1.default.call(this, envComponent);
|
|
17
|
-
const namespace = await (0, projects_1.getProjectNamespace)(envComponent);
|
|
18
|
-
const url = `http://localhost:${constants_1.GRAFANA_PROXY_LOCAL_PORT}/namespace.html?name=${namespace}`;
|
|
19
|
-
await (0, portForward_1.startKubePortForward)("deployment/kubecost-cost-analyzer", constants_1.GRAFANA_PROXY_LOCAL_PORT, constants_1.GRAFANA_PROXY_TARGET_PORT, "kubecost");
|
|
20
|
-
(0, open_1.default)(url);
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=commandOpenCostDashboard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandOpenCostDashboard.js","sourceRoot":"","sources":["../../../../../../../src/apps/cli/commands/project/commandOpenCostDashboard.ts"],"names":[],"mappings":";;;;;AAAA,gDAAwB;AAExB,4DAGsC;AAEtC,oEAA0E;AAE1E,yDAAiE;AAEjE,6DAA2D;AAC3D,0EAAkD;AAClD,kBAAe,KAAK,EAAE,MAAc,EAAE,EAAE,CACtC,MAAM;KACH,OAAO,CACN,oCAAoC,EACpC,oCAAoC,CACrC;KACA,YAAY,CAAC,MAAM,IAAA,kCAAgB,GAAE,CAAC;KACtC,MAAM,CAAC,KAAK,WAAW,EAAE,YAAY,EAAE;IACtC,MAAM,uBAAa,CAAC,IAAI,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,MAAM,IAAA,8BAAmB,EAAC,YAAY,CAAC,CAAC;IAC1D,MAAM,GAAG,GAAG,oBAAoB,oCAAwB,wBAAwB,SAAS,EAAE,CAAC;IAC5F,MAAM,IAAA,kCAAoB,EACxB,mCAAmC,EACnC,oCAAwB,EACxB,qCAAyB,EACzB,UAAU,CACX,CAAC;IACF,IAAA,cAAI,EAAC,GAAG,CAAC,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const pipeline_1 = require("../../../../../../pipeline/src/index.js");
|
|
4
|
-
const getProjectConfig_1 = require("../../../../config/getProjectConfig");
|
|
5
|
-
const openCloudRunDashboards_1 = require("../../../../gcloud/cloudRun/openCloudRunDashboards");
|
|
6
|
-
const openKubernetesDashboards_1 = require("../../../../kubernetes/openKubernetesDashboards");
|
|
7
|
-
const autocompletions_1 = require("./utils/autocompletions");
|
|
8
|
-
exports.default = async (vorpal) => vorpal
|
|
9
|
-
.command("project-open-dashboard <envComponent>", "open an apps dashboard (kubernetes or cloudrun)")
|
|
10
|
-
.autocomplete(await (0, autocompletions_1.envAndComponents)())
|
|
11
|
-
.action(async function ({ envComponent }) {
|
|
12
|
-
var _a, _b;
|
|
13
|
-
const { env, componentName } = (0, getProjectConfig_1.parseChoice)(envComponent);
|
|
14
|
-
const context = await (0, getProjectConfig_1.getPipelineContextByChoice)(env, componentName);
|
|
15
|
-
if ((0, pipeline_1.isOfDeployType)((_a = context.deploy) === null || _a === void 0 ? void 0 : _a.config, "kubernetes")) {
|
|
16
|
-
await (0, openKubernetesDashboards_1.openGoogleCloudKubernetesDashboard)(this, context);
|
|
17
|
-
}
|
|
18
|
-
if ((0, pipeline_1.isOfDeployType)((_b = context.deploy) === null || _b === void 0 ? void 0 : _b.config, "google-cloudrun")) {
|
|
19
|
-
await (0, openCloudRunDashboards_1.openGoogleCloudRunDashboard)(this, context);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
//# sourceMappingURL=commandOpenDashboard.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commandOpenDashboard.js","sourceRoot":"","sources":["../../../../../../../src/apps/cli/commands/project/commandOpenDashboard.ts"],"names":[],"mappings":";;AAAA,kDAAqD;AAErD,0EAG6C;AAC7C,+FAAiG;AACjG,8FAAqG;AAErG,6DAA2D;AAE3D,kBAAe,KAAK,EAAE,MAAc,EAAE,EAAE,CACtC,MAAM;KACH,OAAO,CACN,uCAAuC,EACvC,iDAAiD,CAClD;KACA,YAAY,CAAC,MAAM,IAAA,kCAAgB,GAAE,CAAC;KACtC,MAAM,CAAC,KAAK,WAAW,EAAE,YAAY,EAAE;;IACtC,MAAM,EAAE,GAAG,EAAE,aAAa,EAAE,GAAG,IAAA,8BAAW,EAAC,YAAY,CAAC,CAAC;IACzD,MAAM,OAAO,GAAG,MAAM,IAAA,6CAA0B,EAAC,GAAG,EAAE,aAAa,CAAC,CAAC;IACrE,IAAI,IAAA,yBAAc,EAAC,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,EAAE,YAAY,CAAC,EAAE,CAAC;QACzD,MAAM,IAAA,6DAAkC,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IACD,IAAI,IAAA,yBAAc,EAAC,MAAA,OAAO,CAAC,MAAM,0CAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,CAAC;QAC9D,MAAM,IAAA,oDAA2B,EAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGitConfigVars = void 0;
|
|
4
|
-
const getGitRemoteHostAndPath_1 = require("./getGitRemoteHostAndPath");
|
|
5
|
-
const getProjectRootPath_1 = require("./getProjectRootPath");
|
|
6
|
-
const getGitConfigVars = async () => {
|
|
7
|
-
const [{ gitRemoteHost: GIT_REMOTE_HOST }, PROJECT_ROOT_PATH] = await Promise.all([(0, getGitRemoteHostAndPath_1.getGitRemoteHostAndPath)(), (0, getProjectRootPath_1.getProjectRootPath)()]);
|
|
8
|
-
return {
|
|
9
|
-
PROJECT_ROOT_PATH,
|
|
10
|
-
GIT_REMOTE_HOST,
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
exports.getGitConfigVars = getGitConfigVars;
|
|
14
|
-
//# sourceMappingURL=getGitConfigVars.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGitConfigVars.js","sourceRoot":"","sources":["../../../../src/git/getGitConfigVars.ts"],"names":[],"mappings":";;;AAAA,uEAAoE;AACpE,6DAA0D;AAEnD,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;IACzC,MAAM,CAAC,EAAE,aAAa,EAAE,eAAe,EAAE,EAAE,iBAAiB,CAAC,GAC3D,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,IAAA,iDAAuB,GAAE,EAAE,IAAA,uCAAkB,GAAE,CAAC,CAAC,CAAC;IACvE,OAAO;QACL,iBAAiB;QACjB,eAAe;KAChB,CAAC;AACJ,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Gets the git remote host and path from cat-cli config or else from the git config.
|
|
3
|
-
*
|
|
4
|
-
* Writes the values to the cat-cli config file.
|
|
5
|
-
*/
|
|
6
|
-
export declare function getGitRemoteHostAndPath(): Promise<{
|
|
7
|
-
gitRemoteHost: string;
|
|
8
|
-
gitRemotePath: string;
|
|
9
|
-
}>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGitRemoteHostAndPath = void 0;
|
|
4
|
-
const gitConfig_1 = require("./gitConfig");
|
|
5
|
-
/**
|
|
6
|
-
* Gets the git remote host and path from cat-cli config or else from the git config.
|
|
7
|
-
*
|
|
8
|
-
* Writes the values to the cat-cli config file.
|
|
9
|
-
*/
|
|
10
|
-
async function getGitRemoteHostAndPath() {
|
|
11
|
-
const gitRemoteOriginUrl = await (0, gitConfig_1.gitConfigGet)("remote.origin.url");
|
|
12
|
-
const match = gitRemoteOriginUrl.match(/(https:\/\/|git@)([^:/]+)[:/]([^.]*)(\.git)?/);
|
|
13
|
-
if (!match || !match.length) {
|
|
14
|
-
throw new Error(`Could not find gitlab instance url from git! ${gitRemoteOriginUrl}`);
|
|
15
|
-
}
|
|
16
|
-
const [, , gitRemoteHost, gitRemotePath] = match;
|
|
17
|
-
if (!(gitRemoteHost === null || gitRemoteHost === void 0 ? void 0 : gitRemoteHost.length) || !(gitRemotePath === null || gitRemotePath === void 0 ? void 0 : gitRemotePath.length)) {
|
|
18
|
-
throw new Error(`Could not get gitlab hostname and project path from git config! ${gitRemoteOriginUrl}`);
|
|
19
|
-
}
|
|
20
|
-
return { gitRemoteHost, gitRemotePath };
|
|
21
|
-
}
|
|
22
|
-
exports.getGitRemoteHostAndPath = getGitRemoteHostAndPath;
|
|
23
|
-
//# sourceMappingURL=getGitRemoteHostAndPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGitRemoteHostAndPath.js","sourceRoot":"","sources":["../../../../src/git/getGitRemoteHostAndPath.ts"],"names":[],"mappings":";;;AAAA,2CAA2C;AAE3C;;;;GAIG;AACI,KAAK,UAAU,uBAAuB;IAI3C,MAAM,kBAAkB,GAAG,MAAM,IAAA,wBAAY,EAAC,mBAAmB,CAAC,CAAC;IACnE,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAK,CACpC,8CAA8C,CAC/C,CAAC;IACF,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CACb,gDAAgD,kBAAkB,EAAE,CACrE,CAAC;IACJ,CAAC;IACD,MAAM,CAAC,EAAE,AAAD,EAAG,aAAa,EAAE,aAAa,CAAC,GAAG,KAAK,CAAC;IACjD,IAAI,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,IAAI,CAAC,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,MAAM,CAAA,EAAE,CAAC;QACrD,MAAM,IAAI,KAAK,CACb,mEAAmE,kBAAkB,EAAE,CACxF,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC;AAC1C,CAAC;AApBD,0DAoBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getProjectRootPath(): Promise<string>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getProjectRootPath = void 0;
|
|
4
|
-
const child_process_promise_1 = require("child-process-promise");
|
|
5
|
-
async function getProjectRootPath() {
|
|
6
|
-
const execResult = await (0, child_process_promise_1.exec)(`git rev-parse --show-toplevel`);
|
|
7
|
-
return execResult.stdout.trim();
|
|
8
|
-
}
|
|
9
|
-
exports.getProjectRootPath = getProjectRootPath;
|
|
10
|
-
//# sourceMappingURL=getProjectRootPath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getProjectRootPath.js","sourceRoot":"","sources":["../../../../src/git/getProjectRootPath.ts"],"names":[],"mappings":";;;AAAA,iEAA6C;AAEtC,KAAK,UAAU,kBAAkB;IACtC,MAAM,UAAU,GAAG,MAAM,IAAA,4BAAI,EAAC,+BAA+B,CAAC,CAAC;IAC/D,OAAO,UAAU,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;AAClC,CAAC;AAHD,gDAGC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
declare const scopes: readonly ["global", "local", "system", "worktree"];
|
|
2
|
-
type LocationScope = (typeof scopes)[number];
|
|
3
|
-
type LocationOption = {
|
|
4
|
-
location?: LocationScope;
|
|
5
|
-
};
|
|
6
|
-
export declare function gitConfigGet(key: string, options?: LocationOption): Promise<string>;
|
|
7
|
-
type CommentOption = {
|
|
8
|
-
comment?: string;
|
|
9
|
-
};
|
|
10
|
-
export declare function gitConfigSet(key: string, value: string, options?: LocationOption & CommentOption): Promise<{
|
|
11
|
-
stdout: string;
|
|
12
|
-
}>;
|
|
13
|
-
type ByScope = {
|
|
14
|
-
[scope in LocationScope]?: Record<string, string>;
|
|
15
|
-
};
|
|
16
|
-
export declare function gitConfigList({ byScope, location, }?: {
|
|
17
|
-
/**
|
|
18
|
-
* Returns the config values by location scope.
|
|
19
|
-
* Only has an effect if the location is set.
|
|
20
|
-
*/
|
|
21
|
-
byScope?: boolean;
|
|
22
|
-
} & LocationOption): Promise<Record<string, string> | ByScope>;
|
|
23
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gitConfigList = exports.gitConfigSet = exports.gitConfigGet = void 0;
|
|
4
|
-
const child_process_promise_1 = require("child-process-promise");
|
|
5
|
-
const scopes = ["global", "local", "system", "worktree"];
|
|
6
|
-
async function gitConfigGet(key, options = {}) {
|
|
7
|
-
const optArgs = [options.location ? `--${options.location}` : undefined]
|
|
8
|
-
.filter(Boolean)
|
|
9
|
-
.join(" ");
|
|
10
|
-
const execResult = await (0, child_process_promise_1.exec)(`git config get ${optArgs} ${key}`);
|
|
11
|
-
return execResult.stdout.trim();
|
|
12
|
-
}
|
|
13
|
-
exports.gitConfigGet = gitConfigGet;
|
|
14
|
-
function gitConfigSet(key, value, options = {}) {
|
|
15
|
-
const optArgs = [
|
|
16
|
-
options.location ? `--${options.location}` : undefined,
|
|
17
|
-
options.comment ? `--comment=${options.comment}` : undefined,
|
|
18
|
-
]
|
|
19
|
-
.filter(Boolean)
|
|
20
|
-
.join(" ");
|
|
21
|
-
return (0, child_process_promise_1.exec)(`git config set ${optArgs} ${key} ${value}`);
|
|
22
|
-
}
|
|
23
|
-
exports.gitConfigSet = gitConfigSet;
|
|
24
|
-
const reduceScopelessConfigList = (configList) => configList.reduce((acc, line) => {
|
|
25
|
-
const [key, value] = line.split("=");
|
|
26
|
-
if (!(key === null || key === void 0 ? void 0 : key.length)) {
|
|
27
|
-
return acc;
|
|
28
|
-
}
|
|
29
|
-
return { ...acc, [key]: value };
|
|
30
|
-
}, {});
|
|
31
|
-
const reduceScopedConfigList = (configList) => configList.reduce((acc, line) => {
|
|
32
|
-
const [scopeSplit, key_val] = line.split("\t");
|
|
33
|
-
const scope = scopeSplit.trim();
|
|
34
|
-
if (!(key_val === null || key_val === void 0 ? void 0 : key_val.length) || !(scope === null || scope === void 0 ? void 0 : scope.length)) {
|
|
35
|
-
return acc;
|
|
36
|
-
}
|
|
37
|
-
const [key, value] = key_val.split("=");
|
|
38
|
-
if (!(key === null || key === void 0 ? void 0 : key.length)) {
|
|
39
|
-
return acc;
|
|
40
|
-
}
|
|
41
|
-
acc[scope] = acc[scope] || {};
|
|
42
|
-
acc[scope][key] = value;
|
|
43
|
-
return acc;
|
|
44
|
-
}, {});
|
|
45
|
-
async function gitConfigList({ byScope = false, location, } = {}) {
|
|
46
|
-
const showScope = !location && byScope;
|
|
47
|
-
const optArgs = [
|
|
48
|
-
location ? `--${location}` : undefined,
|
|
49
|
-
showScope ? "--show-scope" : undefined,
|
|
50
|
-
]
|
|
51
|
-
.filter(Boolean)
|
|
52
|
-
.join(" ");
|
|
53
|
-
const configListOutput = await (0, child_process_promise_1.exec)(`git config list ${optArgs}`);
|
|
54
|
-
const configList = configListOutput.stdout.trim().split("\n");
|
|
55
|
-
return showScope
|
|
56
|
-
? reduceScopedConfigList(configList)
|
|
57
|
-
: reduceScopelessConfigList(configList);
|
|
58
|
-
}
|
|
59
|
-
exports.gitConfigList = gitConfigList;
|
|
60
|
-
//# sourceMappingURL=gitConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gitConfig.js","sourceRoot":"","sources":["../../../../src/git/gitConfig.ts"],"names":[],"mappings":";;;AAAA,iEAA6C;AAE7C,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAU,CAAC;AAO3D,KAAK,UAAU,YAAY,CAAC,GAAW,EAAE,UAA0B,EAAE;IAC1E,MAAM,OAAO,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;SACrE,MAAM,CAAC,OAAO,CAAC;SACf,IAAI,CAAC,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E,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC9D,OAAO,SAAS;QACd,CAAC,CAAC,sBAAsB,CAAC,UAAU,CAAC;QACpC,CAAC,CAAC,yBAAyB,CAAC,UAAU,CAAC,CAAC;AAC5C,CAAC;AAtBD,sCAsBC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./getGitConfigVars"), exports);
|
|
18
|
-
__exportStar(require("./getGitRemoteHostAndPath"), exports);
|
|
19
|
-
__exportStar(require("./getProjectRootPath"), exports);
|
|
20
|
-
__exportStar(require("./gitConfig"), exports);
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/git/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,4DAA0C;AAC1C,uDAAqC;AACrC,8CAA4B"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gitlabApiClient = void 0;
|
|
4
|
-
const rest_1 = require("@gitbeaker/rest");
|
|
5
|
-
const gitlabToken_1 = require("./gitlabToken");
|
|
6
|
-
const gitlabApiClient = async ({ gitlabHost, } = {}) => {
|
|
7
|
-
const { token, gitRemoteHost } = await (0, gitlabToken_1.getGitlabToken)(gitlabHost);
|
|
8
|
-
if (typeof token !== "string") {
|
|
9
|
-
throw new Error("Gitlab personal access token is missing!");
|
|
10
|
-
}
|
|
11
|
-
if (!gitRemoteHost) {
|
|
12
|
-
throw new Error("no gitlab host found");
|
|
13
|
-
}
|
|
14
|
-
return new rest_1.Gitlab({
|
|
15
|
-
token,
|
|
16
|
-
host: `https://${gitRemoteHost}`,
|
|
17
|
-
camelize: false,
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
exports.gitlabApiClient = gitlabApiClient;
|
|
21
|
-
//# sourceMappingURL=apiClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"apiClient.js","sourceRoot":"","sources":["../../../../src/gitlab/apiClient.ts"],"names":[],"mappings":";;;AAAA,0CAAyC;AACzC,+CAA+C;AAIxC,MAAM,eAAe,GAAG,KAAK,EAAE,EACpC,UAAU,MAGR,EAAE,EAA6B,EAAE;IACnC,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,4BAAc,EAAC,UAAU,CAAC,CAAC;IAClE,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,IAAI,aAAM,CAAC;QAChB,KAAK;QACL,IAAI,EAAE,WAAW,aAAa,EAAE;QAChC,QAAQ,EAAE,KAAK;KAChB,CAAC,CAAC;AACL,CAAC,CAAC;AAjBW,QAAA,eAAe,mBAiB1B"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ProjectSchema } from "@gitbeaker/rest";
|
|
2
|
-
import type { GitlabRestClient } from "./apiClient";
|
|
3
|
-
export declare const getGitlabProjectInfo: (existingInstance?: GitlabRestClient) => Promise<ProjectSchema>;
|
|
4
|
-
export declare const getGitlabProjectId: () => Promise<number>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getGitlabProjectId = exports.getGitlabProjectInfo = void 0;
|
|
4
|
-
const getGitRemoteHostAndPath_1 = require("../git/getGitRemoteHostAndPath");
|
|
5
|
-
const apiClient_1 = require("./apiClient");
|
|
6
|
-
const projectPreferences_1 = require("../utils/projectPreferences");
|
|
7
|
-
const getGitlabProjectInfo = async (existingInstance) => {
|
|
8
|
-
const api = existingInstance !== null && existingInstance !== void 0 ? existingInstance : (await (0, apiClient_1.gitlabApiClient)());
|
|
9
|
-
const { gitRemotePath } = await (0, getGitRemoteHostAndPath_1.getGitRemoteHostAndPath)();
|
|
10
|
-
const projectInfo = await api.Projects.show(gitRemotePath, {
|
|
11
|
-
statistics: false,
|
|
12
|
-
withCustomAttributes: false,
|
|
13
|
-
license: false,
|
|
14
|
-
});
|
|
15
|
-
// write unawaited intentionally
|
|
16
|
-
(0, projectPreferences_1.upsertProjectPerferences)({ gitlabProjectId: projectInfo.id });
|
|
17
|
-
return projectInfo;
|
|
18
|
-
};
|
|
19
|
-
exports.getGitlabProjectInfo = getGitlabProjectInfo;
|
|
20
|
-
const getGitlabProjectId = async () => {
|
|
21
|
-
const { gitlabProjectId } = await (0, projectPreferences_1.getProjectPreferences)();
|
|
22
|
-
if (gitlabProjectId) {
|
|
23
|
-
return gitlabProjectId;
|
|
24
|
-
}
|
|
25
|
-
const projectInfo = await (0, exports.getGitlabProjectInfo)();
|
|
26
|
-
return projectInfo.id;
|
|
27
|
-
};
|
|
28
|
-
exports.getGitlabProjectId = getGitlabProjectId;
|
|
29
|
-
//# sourceMappingURL=getGitlabProjectId.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getGitlabProjectId.js","sourceRoot":"","sources":["../../../../src/gitlab/getGitlabProjectId.ts"],"names":[],"mappings":";;;AACA,4EAAyE;AAEzE,2CAA8C;AAC9C,oEAGqC;AAE9B,MAAM,oBAAoB,GAAG,KAAK,EACvC,gBAAmC,EACX,EAAE;IAC1B,MAAM,GAAG,GAAG,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,CAAC,MAAM,IAAA,2BAAe,GAAE,CAAC,CAAC;IAC1D,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,IAAA,iDAAuB,GAAE,CAAC;IAC1D,MAAM,WAAW,GAAG,MAAM,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,aAAa,EAAE;QACzD,UAAU,EAAE,KAAK;QACjB,oBAAoB,EAAE,KAAK;QAC3B,OAAO,EAAE,KAAK;KACf,CAAC,CAAC;IACH,gCAAgC;IAChC,IAAA,6CAAwB,EAAC,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,CAAC;IAC9D,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC;AAbW,QAAA,oBAAoB,wBAa/B;AAEK,MAAM,kBAAkB,GAAG,KAAK,IAAqB,EAAE;IAC5D,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,IAAA,0CAAqB,GAAE,CAAC;IAC1D,IAAI,eAAe,EAAE,CAAC;QACpB,OAAO,eAAe,CAAC;IACzB,CAAC;IACD,MAAM,WAAW,GAAG,MAAM,IAAA,4BAAoB,GAAE,CAAC;IACjD,OAAO,WAAW,CAAC,EAAE,CAAC;AACxB,CAAC,CAAC;AAPW,QAAA,kBAAkB,sBAO7B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare function getGitlabToken(hostname?: string): Promise<{
|
|
2
|
-
token: string;
|
|
3
|
-
gitRemoteHost: string;
|
|
4
|
-
}>;
|
|
5
|
-
export declare function setGitlabToken(token: string, { hostname, currentTokens, }?: {
|
|
6
|
-
hostname?: string;
|
|
7
|
-
currentTokens?: {
|
|
8
|
-
[host in string]?: string;
|
|
9
|
-
};
|
|
10
|
-
}): Promise<string>;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setGitlabToken = exports.getGitlabToken = void 0;
|
|
4
|
-
const git_1 = require("../git");
|
|
5
|
-
const preferences_1 = require("../utils/preferences");
|
|
6
|
-
async function getGitlabToken(hostname) {
|
|
7
|
-
var _a, _b, _c, _d;
|
|
8
|
-
const [{ gitRemoteHost }, preferences] = await Promise.all([
|
|
9
|
-
(hostname === null || hostname === void 0 ? void 0 : hostname.length)
|
|
10
|
-
? Promise.resolve({ gitRemoteHost: hostname })
|
|
11
|
-
: (0, git_1.getGitRemoteHostAndPath)(),
|
|
12
|
-
(0, preferences_1.getPreferences)(),
|
|
13
|
-
]);
|
|
14
|
-
const gitlabTokens = (_a = preferences.gitlabTokens) !== null && _a !== void 0 ? _a : {};
|
|
15
|
-
const currentPerferencesToken = gitlabTokens[gitRemoteHost];
|
|
16
|
-
const token = (_b = currentPerferencesToken !== null && currentPerferencesToken !== void 0 ? currentPerferencesToken : preferences["gitlab-personal-access-token"]) !== null && _b !== void 0 ? _b : process.env.GITLAB_TOKEN;
|
|
17
|
-
if ((((_c = preferences["gitlab-personal-access-token"]) === null || _c === void 0 ? void 0 : _c.length) ||
|
|
18
|
-
((_d = process.env.GITLAB_TOKEN) === null || _d === void 0 ? void 0 : _d.length)) &&
|
|
19
|
-
!(currentPerferencesToken === null || currentPerferencesToken === void 0 ? void 0 : currentPerferencesToken.length)) {
|
|
20
|
-
await setGitlabToken(token, {
|
|
21
|
-
hostname: gitRemoteHost,
|
|
22
|
-
currentTokens: gitlabTokens,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
return { token, gitRemoteHost };
|
|
26
|
-
}
|
|
27
|
-
exports.getGitlabToken = getGitlabToken;
|
|
28
|
-
async function setGitlabToken(token, { hostname, currentTokens, } = {}) {
|
|
29
|
-
const [{ gitRemoteHost }, storedTokens] = await Promise.all([
|
|
30
|
-
(hostname === null || hostname === void 0 ? void 0 : hostname.length)
|
|
31
|
-
? Promise.resolve({ gitRemoteHost: hostname })
|
|
32
|
-
: (0, git_1.getGitRemoteHostAndPath)(),
|
|
33
|
-
currentTokens
|
|
34
|
-
? Promise.resolve(currentTokens)
|
|
35
|
-
: (0, preferences_1.getPreference)("gitlabTokens"),
|
|
36
|
-
]);
|
|
37
|
-
const gitlabTokens = { ...(storedTokens !== null && storedTokens !== void 0 ? storedTokens : {}), [gitRemoteHost]: token };
|
|
38
|
-
await (0, preferences_1.setPreference)("gitlabTokens", gitlabTokens);
|
|
39
|
-
return gitlabTokens[gitRemoteHost];
|
|
40
|
-
}
|
|
41
|
-
exports.setGitlabToken = setGitlabToken;
|
|
42
|
-
//# sourceMappingURL=gitlabToken.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gitlabToken.js","sourceRoot":"","sources":["../../../../src/gitlab/gitlabToken.ts"],"names":[],"mappings":";;;AAAA,gCAAiD;AACjD,sDAI8B;AAEvB,KAAK,UAAU,cAAc,CAAC,QAAiB;;IACpD,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACzD,CAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,MAAM;YACd,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC;YAC9C,CAAC,CAAC,IAAA,6BAAuB,GAAE;QAC7B,IAAA,4BAAc,GAAE;KACjB,CAAC,CAAC;IACH,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Y,GAAI,EAAE,CAAC,EAAE,CAAC,aAAa,CAAC,EAAE,KAAK,EAAE,CAAC;IACzE,MAAM,IAAA,2BAAa,EAAC,cAAc,EAAE,YAAY,CAAC,CAAC;IAClD,OAAO,YAAY,CAAC,aAAa,CAAC,CAAC;AACrC,CAAC;AAlBD,wCAkBC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./apiClient"), exports);
|
|
18
|
-
__exportStar(require("./getGitlabProjectId"), exports);
|
|
19
|
-
__exportStar(require("./gitlabToken"), exports);
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/gitlab/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,uDAAqC;AACrC,gDAA8B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type CatladderCliPreferences = {
|
|
2
|
-
"gitlab-personal-access-token": string | null;
|
|
3
|
-
googleAuthUserNumber: number | null;
|
|
4
|
-
gitlabTokens: {
|
|
5
|
-
[hostname in string]?: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
type PreferenceKey = keyof CatladderCliPreferences;
|
|
9
|
-
export declare const getPreferences: () => Promise<CatladderCliPreferences>;
|
|
10
|
-
export declare const hasPreference: (key: PreferenceKey) => Promise<boolean>;
|
|
11
|
-
export declare const getPreference: <K extends keyof CatladderCliPreferences>(key: K) => Promise<CatladderCliPreferences[K] | null>;
|
|
12
|
-
export declare const setPreference: (key: PreferenceKey, value: string | number | {
|
|
13
|
-
[x: string]: string;
|
|
14
|
-
}) => Promise<void>;
|
|
15
|
-
export {};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setPreference = exports.getPreference = exports.hasPreference = exports.getPreferences = void 0;
|
|
4
|
-
const promises_1 = require("fs/promises");
|
|
5
|
-
const fs_1 = require("fs");
|
|
6
|
-
const os_1 = require("os");
|
|
7
|
-
const yaml_1 = require("yaml");
|
|
8
|
-
const path_1 = require("path");
|
|
9
|
-
const directory = (0, path_1.join)((0, os_1.homedir)(), ".catladder");
|
|
10
|
-
const file = (0, path_1.join)(directory, "preferences.yml");
|
|
11
|
-
const perfKeys = [
|
|
12
|
-
"gitlab-personal-access-token",
|
|
13
|
-
"googleAuthUserNumber",
|
|
14
|
-
"gitlabTokens",
|
|
15
|
-
];
|
|
16
|
-
const fallbackValues = {
|
|
17
|
-
"gitlab-personal-access-token": null,
|
|
18
|
-
gitlabTokens: {},
|
|
19
|
-
googleAuthUserNumber: null,
|
|
20
|
-
};
|
|
21
|
-
const perferencesWithParsed = (parsed) => perfKeys.reduce((acc, key) => { var _a; return Object.assign(acc, { [key]: (_a = parsed[key]) !== null && _a !== void 0 ? _a : fallbackValues[key] }); }, {});
|
|
22
|
-
const encoding = "utf-8";
|
|
23
|
-
const readPreferences = () => (0, promises_1.readFile)(file, { encoding });
|
|
24
|
-
const writePreferences = (preferences) => (0, promises_1.writeFile)(file, (0, yaml_1.stringify)(preferences), { encoding, mode: 0o600 });
|
|
25
|
-
const ensureDir = async () => (0, fs_1.existsSync)(directory)
|
|
26
|
-
? directory
|
|
27
|
-
: (0, promises_1.mkdir)(directory, { recursive: true, mode: 0o700 });
|
|
28
|
-
const ensureFile = async () => {
|
|
29
|
-
if ((0, fs_1.existsSync)(file)) {
|
|
30
|
-
return file;
|
|
31
|
-
}
|
|
32
|
-
await ensureDir();
|
|
33
|
-
return writePreferences(perferencesWithParsed({}));
|
|
34
|
-
};
|
|
35
|
-
const getPreferences = async () => {
|
|
36
|
-
var _a;
|
|
37
|
-
await ensureFile();
|
|
38
|
-
const fileString = await readPreferences();
|
|
39
|
-
const fileParsed = (_a = (0, yaml_1.parse)(fileString || "---\nnull")) !== null && _a !== void 0 ? _a : {};
|
|
40
|
-
return perferencesWithParsed(fileParsed);
|
|
41
|
-
};
|
|
42
|
-
exports.getPreferences = getPreferences;
|
|
43
|
-
const hasPreference = async (key) => {
|
|
44
|
-
const preferences = await (0, exports.getPreferences)();
|
|
45
|
-
return preferences[key] !== null && preferences[key] !== undefined;
|
|
46
|
-
};
|
|
47
|
-
exports.hasPreference = hasPreference;
|
|
48
|
-
const getPreference = async (key) => {
|
|
49
|
-
const preferences = await (0, exports.getPreferences)();
|
|
50
|
-
if (key in preferences) {
|
|
51
|
-
return preferences[key];
|
|
52
|
-
}
|
|
53
|
-
return null;
|
|
54
|
-
};
|
|
55
|
-
exports.getPreference = getPreference;
|
|
56
|
-
const setPreference = async (key, value) => {
|
|
57
|
-
const preferences = await (0, exports.getPreferences)();
|
|
58
|
-
return writePreferences({ ...preferences, [key]: value });
|
|
59
|
-
};
|
|
60
|
-
exports.setPreference = setPreference;
|
|
61
|
-
//# sourceMappingURL=preferences.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"preferences.js","sourceRoot":"","sources":["../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;IACF,MAAM,WAAW,GAAG,MAAM,IAAA,sBAAc,GAAE,CAAC;IAC3C,OAAO,gBAAgB,CAAC,EAAE,GAAG,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC5D,CAAC,CAAC;AANW,QAAA,aAAa,iBAMxB"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type CatladderCliProjectPreferences = {
|
|
2
|
-
gitlabProjectId?: number | null;
|
|
3
|
-
};
|
|
4
|
-
export declare const getProjectPreferences: (givenFilePath?: string) => Promise<CatladderCliProjectPreferences>;
|
|
5
|
-
export declare const upsertProjectPerferences: (newPerfs?: Partial<CatladderCliProjectPreferences>, givenFilePath?: string) => Promise<void>;
|