@catladder/cli 0.0.0-main-e934b573 → 0.0.0-main-b9921f15
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.
|
@@ -40925,7 +40925,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
40925
40925
|
|
|
40926
40926
|
exports.__esModule = true;
|
|
40927
40927
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
40928
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
40928
|
+
exports.PIPELINE_IMAGE_TAG = "main-b9921f15" || 0;
|
|
40929
40929
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
40930
40930
|
|
|
40931
40931
|
/***/ }),
|
|
@@ -41356,7 +41356,7 @@ var getEnvironmentVariables = function (config, componentName, env, commitInfo,
|
|
|
41356
41356
|
alreadyVisited = {};
|
|
41357
41357
|
}
|
|
41358
41358
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
41359
|
-
var environmentContext, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, legacyFromComponents, publicEnvVarsRawWithLegacyFromComponents, publicEnvVarsRawSanitized, envVarsRaw, envVars;
|
|
41359
|
+
var environmentContext, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, HOST_INTERNAL, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, legacyFromComponents, publicEnvVarsRawWithLegacyFromComponents, publicEnvVarsRawSanitized, envVarsRaw, envVars;
|
|
41360
41360
|
var _a, _b;
|
|
41361
41361
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
41362
41362
|
return __generator(this, function (_m) {
|
|
@@ -41380,16 +41380,21 @@ var getEnvironmentVariables = function (config, componentName, env, commitInfo,
|
|
|
41380
41380
|
predefinedVariables = {
|
|
41381
41381
|
ENV_SHORT: "local",
|
|
41382
41382
|
ROOT_URL: url,
|
|
41383
|
+
HOST_INTERNAL: host,
|
|
41384
|
+
ROOT_URL_INTERNAL: "http://" + host,
|
|
41383
41385
|
PORT: port.toString()
|
|
41384
41386
|
};
|
|
41385
41387
|
} else {
|
|
41386
41388
|
additionalEnvVars = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext) : {};
|
|
41387
|
-
|
|
41389
|
+
HOST_INTERNAL = (_d = additionalEnvVars.HOST_INTERNAL) !== null && _d !== void 0 ? _d : "unknown-host.example.com";
|
|
41390
|
+
host = (_e = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _e !== void 0 ? _e : HOST_INTERNAL;
|
|
41388
41391
|
url = "https://".concat(host);
|
|
41389
41392
|
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), config.components[componentName].build.type === "rails" ? {} : {
|
|
41390
41393
|
HOST: host
|
|
41391
41394
|
}), {
|
|
41392
|
-
ROOT_URL: url
|
|
41395
|
+
ROOT_URL: url,
|
|
41396
|
+
HOST_CANONICAL: HOST_INTERNAL,
|
|
41397
|
+
ROOT_URL_INTERNAL: "https://" + HOST_INTERNAL
|
|
41393
41398
|
}), additionalEnvVars);
|
|
41394
41399
|
}
|
|
41395
41400
|
publicEnvVarsRaw = (_g = (_f = envConfigRaw.vars) === null || _f === void 0 ? void 0 : _f.public) !== null && _g !== void 0 ? _g : {};
|
|
@@ -43023,6 +43028,7 @@ var utils_1 = __nccwpck_require__(463);
|
|
|
43023
43028
|
var deployJob_1 = __nccwpck_require__(2256);
|
|
43024
43029
|
var jobName_1 = __nccwpck_require__(7311);
|
|
43025
43030
|
exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
|
|
43031
|
+
// FIXME: rename to internalHostSuffix, but this means that project-setup needs to be rerun, so its kindof a breaking change
|
|
43026
43032
|
exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = "GCLOUD_RUN_canonicalHostSuffix";
|
|
43027
43033
|
var getCloudSqlVariables = function (_a) {
|
|
43028
43034
|
var _b, _c;
|
|
@@ -43081,7 +43087,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
43081
43087
|
env = ctx.env,
|
|
43082
43088
|
componentName = ctx.componentName,
|
|
43083
43089
|
deployConfigRaw = ctx.deployConfigRaw;
|
|
43084
|
-
var
|
|
43090
|
+
var HOST_INTERNAL = fullName.toLowerCase() + "-" + ((_a = process.env[(0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)]) !== null && _a !== void 0 ? _a : "unknown-host.example.com");
|
|
43085
43091
|
var jobTriggers = deployConfigRaw && deployConfigRaw.jobs ? Object.fromEntries(Object.entries(deployConfigRaw.jobs).map(function (_a) {
|
|
43086
43092
|
var _b = __read(_a, 2),
|
|
43087
43093
|
name = _b[0],
|
|
@@ -43089,7 +43095,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
43089
43095
|
return ["CLOUD_RUN_JOB_TRIGGER_URL_" + (0, gitlab_1.sanitizeForBashVariable)(name), "https://".concat(deployConfigRaw.region, "-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/").concat(deployConfigRaw.projectId, "/jobs/").concat((0, jobName_1.getCloudRunJobName)(fullName, name), ":run")];
|
|
43090
43096
|
})) : {};
|
|
43091
43097
|
return __assign(__assign({
|
|
43092
|
-
|
|
43098
|
+
HOST_INTERNAL: HOST_INTERNAL
|
|
43093
43099
|
}, getCloudSqlVariables(ctx)), jobTriggers);
|
|
43094
43100
|
}
|
|
43095
43101
|
};
|
|
@@ -43801,12 +43807,12 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
43801
43807
|
var domainCanonical = deployConfigRaw && ((_b = deployConfigRaw.cluster) === null || _b === void 0 ? void 0 : _b.domainCanonical) ||
|
|
43802
43808
|
// for convenience, we allow clusters to define a canonical domain, because a cluster has a fixed ip and you will usually have a domain pointing to that cluster
|
|
43803
43809
|
fullConfig.domainCanonical || "panter.cloud";
|
|
43804
|
-
var
|
|
43810
|
+
var HOST_INTERNAL = "".concat(componentSlug, ".").concat(envInUrl, ".").concat(fullConfig.appName, ".").concat(fullConfig.customerName, ".").concat(domainCanonical); // default for kubernetes and rest
|
|
43805
43811
|
return {
|
|
43806
43812
|
KUBE_NAMESPACE: KUBE_NAMESPACE,
|
|
43807
43813
|
KUBE_APP_NAME: KUBE_APP_NAME,
|
|
43808
43814
|
KUBE_APP_NAME_PREFIX: KUBE_APP_NAME_PREFIX,
|
|
43809
|
-
|
|
43815
|
+
HOST_INTERNAL: HOST_INTERNAL
|
|
43810
43816
|
};
|
|
43811
43817
|
}
|
|
43812
43818
|
};
|
|
@@ -355464,7 +355464,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
355464
355464
|
|
|
355465
355465
|
exports.__esModule = true;
|
|
355466
355466
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
355467
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
355467
|
+
exports.PIPELINE_IMAGE_TAG = "main-b9921f15" || 0;
|
|
355468
355468
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
355469
355469
|
|
|
355470
355470
|
/***/ }),
|
|
@@ -355895,7 +355895,7 @@ var getEnvironmentVariables = function (config, componentName, env, commitInfo,
|
|
|
355895
355895
|
alreadyVisited = {};
|
|
355896
355896
|
}
|
|
355897
355897
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
355898
|
-
var environmentContext, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, legacyFromComponents, publicEnvVarsRawWithLegacyFromComponents, publicEnvVarsRawSanitized, envVarsRaw, envVars;
|
|
355898
|
+
var environmentContext, envConfigRaw, deployConfigRaw, buildConfigRaw, envType, basePredefinedVariables, predefinedVariables, host, url, devLocalConfig, port, additionalEnvVars, HOST_INTERNAL, publicEnvVarsRaw, additionalSecretKeys, secretEnvVarKeys, secretEnvVars, legacyFromComponents, publicEnvVarsRawWithLegacyFromComponents, publicEnvVarsRawSanitized, envVarsRaw, envVars;
|
|
355899
355899
|
var _a, _b;
|
|
355900
355900
|
var _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
355901
355901
|
return __generator(this, function (_m) {
|
|
@@ -355919,16 +355919,21 @@ var getEnvironmentVariables = function (config, componentName, env, commitInfo,
|
|
|
355919
355919
|
predefinedVariables = {
|
|
355920
355920
|
ENV_SHORT: "local",
|
|
355921
355921
|
ROOT_URL: url,
|
|
355922
|
+
HOST_INTERNAL: host,
|
|
355923
|
+
ROOT_URL_INTERNAL: "http://" + host,
|
|
355922
355924
|
PORT: port.toString()
|
|
355923
355925
|
};
|
|
355924
355926
|
} else {
|
|
355925
355927
|
additionalEnvVars = deployConfigRaw ? deploy_1.DEPLOY_TYPES[deployConfigRaw.type].getAdditionalEnvVars(environmentContext) : {};
|
|
355926
|
-
|
|
355928
|
+
HOST_INTERNAL = (_d = additionalEnvVars.HOST_INTERNAL) !== null && _d !== void 0 ? _d : "unknown-host.example.com";
|
|
355929
|
+
host = (_e = envConfigRaw === null || envConfigRaw === void 0 ? void 0 : envConfigRaw.host) !== null && _e !== void 0 ? _e : HOST_INTERNAL;
|
|
355927
355930
|
url = "https://".concat(host);
|
|
355928
355931
|
predefinedVariables = __assign(__assign(__assign(__assign({}, basePredefinedVariables), config.components[componentName].build.type === "rails" ? {} : {
|
|
355929
355932
|
HOST: host
|
|
355930
355933
|
}), {
|
|
355931
|
-
ROOT_URL: url
|
|
355934
|
+
ROOT_URL: url,
|
|
355935
|
+
HOST_CANONICAL: HOST_INTERNAL,
|
|
355936
|
+
ROOT_URL_INTERNAL: "https://" + HOST_INTERNAL
|
|
355932
355937
|
}), additionalEnvVars);
|
|
355933
355938
|
}
|
|
355934
355939
|
publicEnvVarsRaw = (_g = (_f = envConfigRaw.vars) === null || _f === void 0 ? void 0 : _f.public) !== null && _g !== void 0 ? _g : {};
|
|
@@ -357562,6 +357567,7 @@ var utils_1 = __nccwpck_require__(70463);
|
|
|
357562
357567
|
var deployJob_1 = __nccwpck_require__(82256);
|
|
357563
357568
|
var jobName_1 = __nccwpck_require__(77311);
|
|
357564
357569
|
exports.GCLOUD_DEPLOY_CREDENTIALS_KEY = "GCLOUD_DEPLOY_credentialsKey";
|
|
357570
|
+
// FIXME: rename to internalHostSuffix, but this means that project-setup needs to be rerun, so its kindof a breaking change
|
|
357565
357571
|
exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX = "GCLOUD_RUN_canonicalHostSuffix";
|
|
357566
357572
|
var getCloudSqlVariables = function (_a) {
|
|
357567
357573
|
var _b, _c;
|
|
@@ -357620,7 +357626,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
357620
357626
|
env = ctx.env,
|
|
357621
357627
|
componentName = ctx.componentName,
|
|
357622
357628
|
deployConfigRaw = ctx.deployConfigRaw;
|
|
357623
|
-
var
|
|
357629
|
+
var HOST_INTERNAL = fullName.toLowerCase() + "-" + ((_a = process.env[(0, context_1.getSecretVarName)(env, componentName, exports.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)]) !== null && _a !== void 0 ? _a : "unknown-host.example.com");
|
|
357624
357630
|
var jobTriggers = deployConfigRaw && deployConfigRaw.jobs ? Object.fromEntries(Object.entries(deployConfigRaw.jobs).map(function (_a) {
|
|
357625
357631
|
var _b = __read(_a, 2),
|
|
357626
357632
|
name = _b[0],
|
|
@@ -357628,7 +357634,7 @@ exports.GCLOUD_RUN_DEPLOY_TYPE = {
|
|
|
357628
357634
|
return ["CLOUD_RUN_JOB_TRIGGER_URL_" + (0, gitlab_1.sanitizeForBashVariable)(name), "https://".concat(deployConfigRaw.region, "-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/").concat(deployConfigRaw.projectId, "/jobs/").concat((0, jobName_1.getCloudRunJobName)(fullName, name), ":run")];
|
|
357629
357635
|
})) : {};
|
|
357630
357636
|
return __assign(__assign({
|
|
357631
|
-
|
|
357637
|
+
HOST_INTERNAL: HOST_INTERNAL
|
|
357632
357638
|
}, getCloudSqlVariables(ctx)), jobTriggers);
|
|
357633
357639
|
}
|
|
357634
357640
|
};
|
|
@@ -358340,12 +358346,12 @@ exports.KUBERNETES_DEPLOY_TYPE = {
|
|
|
358340
358346
|
var domainCanonical = deployConfigRaw && ((_b = deployConfigRaw.cluster) === null || _b === void 0 ? void 0 : _b.domainCanonical) ||
|
|
358341
358347
|
// for convenience, we allow clusters to define a canonical domain, because a cluster has a fixed ip and you will usually have a domain pointing to that cluster
|
|
358342
358348
|
fullConfig.domainCanonical || "panter.cloud";
|
|
358343
|
-
var
|
|
358349
|
+
var HOST_INTERNAL = "".concat(componentSlug, ".").concat(envInUrl, ".").concat(fullConfig.appName, ".").concat(fullConfig.customerName, ".").concat(domainCanonical); // default for kubernetes and rest
|
|
358344
358350
|
return {
|
|
358345
358351
|
KUBE_NAMESPACE: KUBE_NAMESPACE,
|
|
358346
358352
|
KUBE_APP_NAME: KUBE_APP_NAME,
|
|
358347
358353
|
KUBE_APP_NAME_PREFIX: KUBE_APP_NAME_PREFIX,
|
|
358348
|
-
|
|
358354
|
+
HOST_INTERNAL: HOST_INTERNAL
|
|
358349
358355
|
};
|
|
358350
358356
|
}
|
|
358351
358357
|
};
|
package/package.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
}
|
|
53
53
|
],
|
|
54
54
|
"license": "MIT",
|
|
55
|
-
"version": "0.0.0-main-
|
|
55
|
+
"version": "0.0.0-main-b9921f15",
|
|
56
56
|
"scripts": {
|
|
57
57
|
"lint": "eslint \"src/**/*.ts\"",
|
|
58
58
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"node": ">=12.0.0"
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
|
-
"@catladder/pipeline": "0.0.0-main-
|
|
76
|
+
"@catladder/pipeline": "0.0.0-main-b9921f15",
|
|
77
77
|
"@kubernetes/client-node": "^0.16.2",
|
|
78
78
|
"@tsconfig/node14": "^1.0.1",
|
|
79
79
|
"@types/common-tags": "^1.8.0",
|