@catladder/cli 0.0.0-main-c079d764 → 0.0.0-main-ecee5eea
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/apps/cli/commands/project/setup/setupCloudRun.js +7 -0
- package/dist/apps/cli/commands/project/setup/setupCloudRun.js.map +1 -1
- package/dist/bundles/catenv/index.js +2 -2
- package/dist/bundles/cli/index.js +10 -265
- package/dist/cli.js +0 -5
- package/dist/cli.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -4
- package/src/apps/cli/commands/project/setup/setupCloudRun.ts +5 -2
- package/src/cli.ts +0 -5
- package/dist/bundles/cli/check.js +0 -28
|
@@ -58,9 +58,11 @@ var setupCloudRun = function (instance, context) { return __awaiter(void 0, void
|
|
|
58
58
|
return [4 /*yield*/, (0, enableServices_1.enableGCloudServices)(["run.googleapis.com", "artifactregistry.googleapis.com"], config)];
|
|
59
59
|
case 1:
|
|
60
60
|
_b.sent();
|
|
61
|
+
instance.log("upsert artifacts registry...");
|
|
61
62
|
return [4 /*yield*/, (0, artifactsRegistry_1.upsertGcloudArtifactsRegistry)(config)];
|
|
62
63
|
case 2:
|
|
63
64
|
_b.sent();
|
|
65
|
+
instance.log("upsert deploy service account...");
|
|
64
66
|
return [4 /*yield*/, (0, serviceAccounts_1.upsertGcloudServiceAccountAndSaveSecret)(instance, context, {
|
|
65
67
|
projectId: config.projectId,
|
|
66
68
|
displayName: "Catladder gcloud deploy",
|
|
@@ -75,6 +77,11 @@ var setupCloudRun = function (instance, context) { return __awaiter(void 0, void
|
|
|
75
77
|
}, pipeline_1.GCLOUD_DEPLOY_CREDENTIALS_KEY)];
|
|
76
78
|
case 3:
|
|
77
79
|
_b.sent();
|
|
80
|
+
// gcloud run automatically gives us a hostname
|
|
81
|
+
// but the pipeline need to know it before deployment
|
|
82
|
+
// so we get this through some magic and add this as a ci/cd variable
|
|
83
|
+
// the pipeline than can use this to construct the canonical host
|
|
84
|
+
instance.log("get service domain suffix... that might take a while initially");
|
|
78
85
|
return [4 /*yield*/, (0, getCloudRunDomainSuffix_1.getCloudRunDomainSuffix)(config)];
|
|
79
86
|
case 4:
|
|
80
87
|
suffix = _b.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupCloudRun.js","sourceRoot":"","sources":["../../../../../../src/apps/cli/commands/project/setup/setupCloudRun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAI6B;AAG7B,6EAAwF;AACxF,kGAAiG;AACjG,uEAA4E;AAC5E,yEAAgG;AAChG,sDAAiE;AAE1D,IAAM,aAAa,GAAG,UAC3B,QAAyB,EACzB,OAAgB;;;;;;gBAEhB,IAAI,CAAC,IAAA,yBAAc,EAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAAE;oBACtE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;iBACnE;gBAEK,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC;gBAE9C,kBAAkB;gBAElB,QAAQ,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;gBAC3C,qBAAM,IAAA,qCAAoB,EACxB,CAAC,oBAAoB,EAAE,iCAAiC,CAAC,EACzD,MAAM,CACP,EAAA;;gBAHD,SAGC,CAAC;
|
|
1
|
+
{"version":3,"file":"setupCloudRun.js","sourceRoot":"","sources":["../../../../../../src/apps/cli/commands/project/setup/setupCloudRun.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,gDAI6B;AAG7B,6EAAwF;AACxF,kGAAiG;AACjG,uEAA4E;AAC5E,yEAAgG;AAChG,sDAAiE;AAE1D,IAAM,aAAa,GAAG,UAC3B,QAAyB,EACzB,OAAgB;;;;;;gBAEhB,IAAI,CAAC,IAAA,yBAAc,EAAC,OAAO,CAAC,eAAe,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAAE;oBACtE,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;iBACnE;gBAEK,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC;gBAE9C,kBAAkB;gBAElB,QAAQ,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;gBAC3C,qBAAM,IAAA,qCAAoB,EACxB,CAAC,oBAAoB,EAAE,iCAAiC,CAAC,EACzD,MAAM,CACP,EAAA;;gBAHD,SAGC,CAAC;gBACF,QAAQ,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;gBAC7C,qBAAM,IAAA,iDAA6B,EAAC,MAAM,CAAC,EAAA;;gBAA3C,SAA2C,CAAC;gBAE5C,QAAQ,CAAC,GAAG,CAAC,kCAAkC,CAAC,CAAC;gBACjD,qBAAM,IAAA,yDAAuC,EAC3C,QAAQ,EACR,OAAO,EACP;wBACE,SAAS,EAAE,MAAM,CAAC,SAAS;wBAC3B,WAAW,EAAE,yBAAyB;wBACtC,WAAW,EAAE,8CAA8C;wBAC3D,IAAI,EAAE,MAAM;wBACZ,yLAAyL;wBACzL,KAAK,EAAE;4BACL,kCAAkC;4BAClC,iBAAiB;4BACjB,8BAA8B;yBAC/B;qBACF,EACD,wCAA6B,CAC9B,EAAA;;gBAhBD,SAgBC,CAAC;gBAEF,+CAA+C;gBAC/C,qDAAqD;gBACrD,qEAAqE;gBACrE,iEAAiE;gBACjE,QAAQ,CAAC,GAAG,CACV,gEAAgE,CACjE,CAAC;gBACa,qBAAM,IAAA,iDAAuB,EAAC,MAAM,CAAC,EAAA;;gBAA9C,MAAM,GAAG,SAAqC;gBACpD,QAAQ,CAAC,GAAG,CAAC,iBAAiB,GAAG,MAAM,CAAC,CAAC;gBAEzC,qBAAM,IAAA,2BAAkB,EACtB,QAAQ;wBAEN,GAAC,2CAAgC,IAAG,MAAM;6BAE5C,OAAO,CAAC,WAAW,CAAC,SAAS,EAC7B,OAAO,CAAC,aAAa,CACtB,EAAA;;gBAPD,SAOC,CAAC;;;;KACH,CAAC;AAzDW,QAAA,aAAa,iBAyDxB"}
|
|
@@ -39822,7 +39822,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
39822
39822
|
|
|
39823
39823
|
exports.__esModule = true;
|
|
39824
39824
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
39825
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
39825
|
+
exports.PIPELINE_IMAGE_TAG = "main-ecee5eea" || 0;
|
|
39826
39826
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
39827
39827
|
|
|
39828
39828
|
/***/ }),
|
|
@@ -40126,7 +40126,7 @@ var getEnvironment = function (config, componentName, env, commitInfo, alreadyVi
|
|
|
40126
40126
|
envInUrl = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, ".").concat(env) : env;
|
|
40127
40127
|
domainCanonical = (mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.deploy) && (mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.deploy.type) === "kubernetes" && ((_e = mergedConfig.deploy.cluster) === null || _e === void 0 ? void 0 : _e.domainCanonical) || // 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
|
|
40128
40128
|
config.domainCanonical || "panter.cloud";
|
|
40129
|
-
HOST_CANONICAL = (0, types_1.isOfDeployType)(mergedConfig.deploy, "
|
|
40129
|
+
HOST_CANONICAL = (0, types_1.isOfDeployType)(mergedConfig.deploy, "google-cloudrun") ? fullName.toLowerCase() + "-" + process.env[(0, exports.getSecretVarName)(env, componentName, deploy_1.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)] : "".concat(componentSlug, ".").concat(envInUrl, ".").concat(config.appName, ".").concat(config.customerName, ".").concat(domainCanonical);
|
|
40130
40130
|
host = (_f = mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.host) !== null && _f !== void 0 ? _f : HOST_CANONICAL;
|
|
40131
40131
|
url = "https://".concat(host);
|
|
40132
40132
|
KUBE_APP_NAME_PREFIX = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, "-") : "";
|
|
@@ -4082,9 +4082,11 @@ var setupCloudRun = function (instance, context) { return __awaiter(void 0, void
|
|
|
4082
4082
|
return [4 /*yield*/, (0, enableServices_1.enableGCloudServices)(["run.googleapis.com", "artifactregistry.googleapis.com"], config)];
|
|
4083
4083
|
case 1:
|
|
4084
4084
|
_b.sent();
|
|
4085
|
+
instance.log("upsert artifacts registry...");
|
|
4085
4086
|
return [4 /*yield*/, (0, artifactsRegistry_1.upsertGcloudArtifactsRegistry)(config)];
|
|
4086
4087
|
case 2:
|
|
4087
4088
|
_b.sent();
|
|
4089
|
+
instance.log("upsert deploy service account...");
|
|
4088
4090
|
return [4 /*yield*/, (0, serviceAccounts_1.upsertGcloudServiceAccountAndSaveSecret)(instance, context, {
|
|
4089
4091
|
projectId: config.projectId,
|
|
4090
4092
|
displayName: "Catladder gcloud deploy",
|
|
@@ -4099,6 +4101,11 @@ var setupCloudRun = function (instance, context) { return __awaiter(void 0, void
|
|
|
4099
4101
|
}, pipeline_1.GCLOUD_DEPLOY_CREDENTIALS_KEY)];
|
|
4100
4102
|
case 3:
|
|
4101
4103
|
_b.sent();
|
|
4104
|
+
// gcloud run automatically gives us a hostname
|
|
4105
|
+
// but the pipeline need to know it before deployment
|
|
4106
|
+
// so we get this through some magic and add this as a ci/cd variable
|
|
4107
|
+
// the pipeline than can use this to construct the canonical host
|
|
4108
|
+
instance.log("get service domain suffix... that might take a while initially");
|
|
4102
4109
|
return [4 /*yield*/, (0, getCloudRunDomainSuffix_1.getCloudRunDomainSuffix)(config)];
|
|
4103
4110
|
case 4:
|
|
4104
4111
|
suffix = _b.sent();
|
|
@@ -5674,12 +5681,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5674
5681
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5675
5682
|
};
|
|
5676
5683
|
exports.__esModule = true;
|
|
5677
|
-
var update_notifier_1 = __importDefault(__nccwpck_require__(94651));
|
|
5678
5684
|
var cli_1 = __importDefault(__nccwpck_require__(93340));
|
|
5679
|
-
var packageInfos_1 = __importDefault(__nccwpck_require__(71628));
|
|
5680
|
-
(0, update_notifier_1["default"])({
|
|
5681
|
-
pkg: packageInfos_1["default"]
|
|
5682
|
-
}).notify();
|
|
5683
5685
|
(0, cli_1["default"])();
|
|
5684
5686
|
//# sourceMappingURL=cli.js.map
|
|
5685
5687
|
|
|
@@ -162906,67 +162908,6 @@ module.exports = function(stream_module) {
|
|
|
162906
162908
|
};
|
|
162907
162909
|
|
|
162908
162910
|
|
|
162909
|
-
/***/ }),
|
|
162910
|
-
|
|
162911
|
-
/***/ 74698:
|
|
162912
|
-
/***/ ((module) => {
|
|
162913
|
-
|
|
162914
|
-
"use strict";
|
|
162915
|
-
|
|
162916
|
-
const lazy = (mod, fn, id) => mod === undefined ? fn(id) : mod;
|
|
162917
|
-
|
|
162918
|
-
module.exports = fn => {
|
|
162919
|
-
return id => {
|
|
162920
|
-
let mod;
|
|
162921
|
-
|
|
162922
|
-
return function () {
|
|
162923
|
-
if (arguments.length === 0) {
|
|
162924
|
-
mod = lazy(mod, fn, id);
|
|
162925
|
-
return mod;
|
|
162926
|
-
}
|
|
162927
|
-
|
|
162928
|
-
const ret = {};
|
|
162929
|
-
|
|
162930
|
-
[].forEach.call(arguments, prop => {
|
|
162931
|
-
Object.defineProperty(ret, prop, {
|
|
162932
|
-
get: () => {
|
|
162933
|
-
mod = lazy(mod, fn, id);
|
|
162934
|
-
if (typeof mod[prop] === 'function') {
|
|
162935
|
-
return function () {
|
|
162936
|
-
return mod[prop].apply(mod, arguments);
|
|
162937
|
-
};
|
|
162938
|
-
}
|
|
162939
|
-
|
|
162940
|
-
return mod[prop];
|
|
162941
|
-
}
|
|
162942
|
-
});
|
|
162943
|
-
});
|
|
162944
|
-
|
|
162945
|
-
return ret;
|
|
162946
|
-
};
|
|
162947
|
-
};
|
|
162948
|
-
};
|
|
162949
|
-
|
|
162950
|
-
module.exports.proxy = fn => {
|
|
162951
|
-
return id => {
|
|
162952
|
-
let mod;
|
|
162953
|
-
|
|
162954
|
-
const handler = {
|
|
162955
|
-
get: (target, property) => {
|
|
162956
|
-
mod = lazy(mod, fn, id);
|
|
162957
|
-
return Reflect.get(mod, property);
|
|
162958
|
-
},
|
|
162959
|
-
apply: (target, thisArg, argumentsList) => {
|
|
162960
|
-
mod = lazy(mod, fn, id);
|
|
162961
|
-
return Reflect.apply(mod, thisArg, argumentsList);
|
|
162962
|
-
}
|
|
162963
|
-
};
|
|
162964
|
-
|
|
162965
|
-
return new Proxy(() => {}, handler);
|
|
162966
|
-
};
|
|
162967
|
-
};
|
|
162968
|
-
|
|
162969
|
-
|
|
162970
162911
|
/***/ }),
|
|
162971
162912
|
|
|
162972
162913
|
/***/ 39083:
|
|
@@ -337413,202 +337354,6 @@ exports.p = function (fn) {
|
|
|
337413
337354
|
}
|
|
337414
337355
|
|
|
337415
337356
|
|
|
337416
|
-
/***/ }),
|
|
337417
|
-
|
|
337418
|
-
/***/ 94651:
|
|
337419
|
-
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
|
|
337420
|
-
|
|
337421
|
-
"use strict";
|
|
337422
|
-
|
|
337423
|
-
const {spawn} = __nccwpck_require__(32081);
|
|
337424
|
-
const path = __nccwpck_require__(71017);
|
|
337425
|
-
const {format} = __nccwpck_require__(73837);
|
|
337426
|
-
const importLazy = __nccwpck_require__(74698)(require);
|
|
337427
|
-
|
|
337428
|
-
const configstore = importLazy('configstore');
|
|
337429
|
-
const chalk = importLazy('chalk');
|
|
337430
|
-
const semver = importLazy('semver');
|
|
337431
|
-
const semverDiff = importLazy('semver-diff');
|
|
337432
|
-
const latestVersion = importLazy('latest-version');
|
|
337433
|
-
const isNpm = importLazy('is-npm');
|
|
337434
|
-
const isInstalledGlobally = importLazy('is-installed-globally');
|
|
337435
|
-
const isYarnGlobal = importLazy('is-yarn-global');
|
|
337436
|
-
const hasYarn = importLazy('has-yarn');
|
|
337437
|
-
const boxen = importLazy('boxen');
|
|
337438
|
-
const xdgBasedir = importLazy('xdg-basedir');
|
|
337439
|
-
const isCi = importLazy('is-ci');
|
|
337440
|
-
const pupa = importLazy('pupa');
|
|
337441
|
-
|
|
337442
|
-
const ONE_DAY = 1000 * 60 * 60 * 24;
|
|
337443
|
-
|
|
337444
|
-
class UpdateNotifier {
|
|
337445
|
-
constructor(options = {}) {
|
|
337446
|
-
this.options = options;
|
|
337447
|
-
options.pkg = options.pkg || {};
|
|
337448
|
-
options.distTag = options.distTag || 'latest';
|
|
337449
|
-
|
|
337450
|
-
// Reduce pkg to the essential keys. with fallback to deprecated options
|
|
337451
|
-
// TODO: Remove deprecated options at some point far into the future
|
|
337452
|
-
options.pkg = {
|
|
337453
|
-
name: options.pkg.name || options.packageName,
|
|
337454
|
-
version: options.pkg.version || options.packageVersion
|
|
337455
|
-
};
|
|
337456
|
-
|
|
337457
|
-
if (!options.pkg.name || !options.pkg.version) {
|
|
337458
|
-
throw new Error('pkg.name and pkg.version required');
|
|
337459
|
-
}
|
|
337460
|
-
|
|
337461
|
-
this.packageName = options.pkg.name;
|
|
337462
|
-
this.packageVersion = options.pkg.version;
|
|
337463
|
-
this.updateCheckInterval = typeof options.updateCheckInterval === 'number' ? options.updateCheckInterval : ONE_DAY;
|
|
337464
|
-
this.disabled = 'NO_UPDATE_NOTIFIER' in process.env ||
|
|
337465
|
-
process.env.NODE_ENV === 'test' ||
|
|
337466
|
-
process.argv.includes('--no-update-notifier') ||
|
|
337467
|
-
isCi();
|
|
337468
|
-
this.shouldNotifyInNpmScript = options.shouldNotifyInNpmScript;
|
|
337469
|
-
|
|
337470
|
-
if (!this.disabled) {
|
|
337471
|
-
try {
|
|
337472
|
-
const ConfigStore = configstore();
|
|
337473
|
-
this.config = new ConfigStore(`update-notifier-${this.packageName}`, {
|
|
337474
|
-
optOut: false,
|
|
337475
|
-
// Init with the current time so the first check is only
|
|
337476
|
-
// after the set interval, so not to bother users right away
|
|
337477
|
-
lastUpdateCheck: Date.now()
|
|
337478
|
-
});
|
|
337479
|
-
} catch {
|
|
337480
|
-
// Expecting error code EACCES or EPERM
|
|
337481
|
-
const message =
|
|
337482
|
-
chalk().yellow(format(' %s update check failed ', options.pkg.name)) +
|
|
337483
|
-
format('\n Try running with %s or get access ', chalk().cyan('sudo')) +
|
|
337484
|
-
'\n to the local update config store via \n' +
|
|
337485
|
-
chalk().cyan(format(' sudo chown -R $USER:$(id -gn $USER) %s ', xdgBasedir().config));
|
|
337486
|
-
|
|
337487
|
-
process.on('exit', () => {
|
|
337488
|
-
console.error(boxen()(message, {align: 'center'}));
|
|
337489
|
-
});
|
|
337490
|
-
}
|
|
337491
|
-
}
|
|
337492
|
-
}
|
|
337493
|
-
|
|
337494
|
-
check() {
|
|
337495
|
-
if (
|
|
337496
|
-
!this.config ||
|
|
337497
|
-
this.config.get('optOut') ||
|
|
337498
|
-
this.disabled
|
|
337499
|
-
) {
|
|
337500
|
-
return;
|
|
337501
|
-
}
|
|
337502
|
-
|
|
337503
|
-
this.update = this.config.get('update');
|
|
337504
|
-
|
|
337505
|
-
if (this.update) {
|
|
337506
|
-
// Use the real latest version instead of the cached one
|
|
337507
|
-
this.update.current = this.packageVersion;
|
|
337508
|
-
|
|
337509
|
-
// Clear cached information
|
|
337510
|
-
this.config.delete('update');
|
|
337511
|
-
}
|
|
337512
|
-
|
|
337513
|
-
// Only check for updates on a set interval
|
|
337514
|
-
if (Date.now() - this.config.get('lastUpdateCheck') < this.updateCheckInterval) {
|
|
337515
|
-
return;
|
|
337516
|
-
}
|
|
337517
|
-
|
|
337518
|
-
// Spawn a detached process, passing the options as an environment property
|
|
337519
|
-
spawn(process.execPath, [__nccwpck_require__.ab + "check.js", JSON.stringify(this.options)], {
|
|
337520
|
-
detached: true,
|
|
337521
|
-
stdio: 'ignore'
|
|
337522
|
-
}).unref();
|
|
337523
|
-
}
|
|
337524
|
-
|
|
337525
|
-
async fetchInfo() {
|
|
337526
|
-
const {distTag} = this.options;
|
|
337527
|
-
const latest = await latestVersion()(this.packageName, {version: distTag});
|
|
337528
|
-
|
|
337529
|
-
return {
|
|
337530
|
-
latest,
|
|
337531
|
-
current: this.packageVersion,
|
|
337532
|
-
type: semverDiff()(this.packageVersion, latest) || distTag,
|
|
337533
|
-
name: this.packageName
|
|
337534
|
-
};
|
|
337535
|
-
}
|
|
337536
|
-
|
|
337537
|
-
notify(options) {
|
|
337538
|
-
const suppressForNpm = !this.shouldNotifyInNpmScript && isNpm().isNpmOrYarn;
|
|
337539
|
-
if (!process.stdout.isTTY || suppressForNpm || !this.update || !semver().gt(this.update.latest, this.update.current)) {
|
|
337540
|
-
return this;
|
|
337541
|
-
}
|
|
337542
|
-
|
|
337543
|
-
options = {
|
|
337544
|
-
isGlobal: isInstalledGlobally(),
|
|
337545
|
-
isYarnGlobal: isYarnGlobal()(),
|
|
337546
|
-
...options
|
|
337547
|
-
};
|
|
337548
|
-
|
|
337549
|
-
let installCommand;
|
|
337550
|
-
if (options.isYarnGlobal) {
|
|
337551
|
-
installCommand = `yarn global add ${this.packageName}`;
|
|
337552
|
-
} else if (options.isGlobal) {
|
|
337553
|
-
installCommand = `npm i -g ${this.packageName}`;
|
|
337554
|
-
} else if (hasYarn()()) {
|
|
337555
|
-
installCommand = `yarn add ${this.packageName}`;
|
|
337556
|
-
} else {
|
|
337557
|
-
installCommand = `npm i ${this.packageName}`;
|
|
337558
|
-
}
|
|
337559
|
-
|
|
337560
|
-
const defaultTemplate = 'Update available ' +
|
|
337561
|
-
chalk().dim('{currentVersion}') +
|
|
337562
|
-
chalk().reset(' → ') +
|
|
337563
|
-
chalk().green('{latestVersion}') +
|
|
337564
|
-
' \nRun ' + chalk().cyan('{updateCommand}') + ' to update';
|
|
337565
|
-
|
|
337566
|
-
const template = options.message || defaultTemplate;
|
|
337567
|
-
|
|
337568
|
-
options.boxenOptions = options.boxenOptions || {
|
|
337569
|
-
padding: 1,
|
|
337570
|
-
margin: 1,
|
|
337571
|
-
align: 'center',
|
|
337572
|
-
borderColor: 'yellow',
|
|
337573
|
-
borderStyle: 'round'
|
|
337574
|
-
};
|
|
337575
|
-
|
|
337576
|
-
const message = boxen()(
|
|
337577
|
-
pupa()(template, {
|
|
337578
|
-
packageName: this.packageName,
|
|
337579
|
-
currentVersion: this.update.current,
|
|
337580
|
-
latestVersion: this.update.latest,
|
|
337581
|
-
updateCommand: installCommand
|
|
337582
|
-
}),
|
|
337583
|
-
options.boxenOptions
|
|
337584
|
-
);
|
|
337585
|
-
|
|
337586
|
-
if (options.defer === false) {
|
|
337587
|
-
console.error(message);
|
|
337588
|
-
} else {
|
|
337589
|
-
process.on('exit', () => {
|
|
337590
|
-
console.error(message);
|
|
337591
|
-
});
|
|
337592
|
-
|
|
337593
|
-
process.on('SIGINT', () => {
|
|
337594
|
-
console.error('');
|
|
337595
|
-
process.exit();
|
|
337596
|
-
});
|
|
337597
|
-
}
|
|
337598
|
-
|
|
337599
|
-
return this;
|
|
337600
|
-
}
|
|
337601
|
-
}
|
|
337602
|
-
|
|
337603
|
-
module.exports = options => {
|
|
337604
|
-
const updateNotifier = new UpdateNotifier(options);
|
|
337605
|
-
updateNotifier.check();
|
|
337606
|
-
return updateNotifier;
|
|
337607
|
-
};
|
|
337608
|
-
|
|
337609
|
-
module.exports.UpdateNotifier = UpdateNotifier;
|
|
337610
|
-
|
|
337611
|
-
|
|
337612
337357
|
/***/ }),
|
|
337613
337358
|
|
|
337614
337359
|
/***/ 75264:
|
|
@@ -350847,7 +350592,7 @@ exports.readConfigSync = readConfigSync;
|
|
|
350847
350592
|
|
|
350848
350593
|
exports.__esModule = true;
|
|
350849
350594
|
exports.DOCKER_REGISTRY = exports.PIPELINE_IMAGE_TAG = void 0;
|
|
350850
|
-
exports.PIPELINE_IMAGE_TAG = "main-
|
|
350595
|
+
exports.PIPELINE_IMAGE_TAG = "main-ecee5eea" || 0;
|
|
350851
350596
|
exports.DOCKER_REGISTRY = "git.panter.ch:5001/catladder/catladder" || 0;
|
|
350852
350597
|
|
|
350853
350598
|
/***/ }),
|
|
@@ -351151,7 +350896,7 @@ var getEnvironment = function (config, componentName, env, commitInfo, alreadyVi
|
|
|
351151
350896
|
envInUrl = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, ".").concat(env) : env;
|
|
351152
350897
|
domainCanonical = (mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.deploy) && (mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.deploy.type) === "kubernetes" && ((_e = mergedConfig.deploy.cluster) === null || _e === void 0 ? void 0 : _e.domainCanonical) || // 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
|
|
351153
350898
|
config.domainCanonical || "panter.cloud";
|
|
351154
|
-
HOST_CANONICAL = (0, types_1.isOfDeployType)(mergedConfig.deploy, "
|
|
350899
|
+
HOST_CANONICAL = (0, types_1.isOfDeployType)(mergedConfig.deploy, "google-cloudrun") ? fullName.toLowerCase() + "-" + process.env[(0, exports.getSecretVarName)(env, componentName, deploy_1.GCLOUD_RUN_CANONICAL_HOST_SUFFIX)] : "".concat(componentSlug, ".").concat(envInUrl, ".").concat(config.appName, ".").concat(config.customerName, ".").concat(domainCanonical);
|
|
351155
350900
|
host = (_f = mergedConfig === null || mergedConfig === void 0 ? void 0 : mergedConfig.host) !== null && _f !== void 0 ? _f : HOST_CANONICAL;
|
|
351156
350901
|
url = "https://".concat(host);
|
|
351157
350902
|
KUBE_APP_NAME_PREFIX = envType === "review" && commitInfo ? "".concat(commitInfo.reviewSlug, "-") : "";
|
|
@@ -357087,7 +356832,7 @@ module.exports = underscoreNodeF._;
|
|
|
357087
356832
|
/***/ ((module) => {
|
|
357088
356833
|
|
|
357089
356834
|
"use strict";
|
|
357090
|
-
module.exports = JSON.parse('{"name":"@catladder/cli","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","license":"MIT","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catenv":"./bin/catenv","catladder":"./bin/catladder"},"dependencies":{"ts-node":"^10.9.1"},"engines":{"node":">=12.0.0"},"devDependencies":{"@catladder/pipeline":"0.0.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","
|
|
356835
|
+
module.exports = JSON.parse('{"name":"@catladder/cli","author":"Marco Wettstein <maw@panter.ch>","homepage":"https://git.panter.ch/catladder/catladder/#readme","bugs":"https://git.panter.ch/catladder/catladder/issues","license":"MIT","scripts":{"lint":"eslint \\"src/**/*.ts\\"","lint:fix":"eslint \\"src/**/*.ts\\" --fix","test":"yarn run lint","build":"yarn build:compile && yarn build:bundle","build:bundle":"./scripts/bundle","build:compile":"yarn tsc","build:watch":"yarn tsc -w"},"bin":{"catenv":"./bin/catenv","catladder":"./bin/catladder"},"dependencies":{"ts-node":"^10.9.1"},"engines":{"node":">=12.0.0"},"devDependencies":{"@catladder/pipeline":"0.0.0","@kubernetes/client-node":"^0.16.2","@tsconfig/node14":"^1.0.1","@types/common-tags":"^1.8.0","@types/fs-extra":"^5.0.4","@types/js-yaml":"^4.0.5","@types/lodash":"^4.14.185","@types/memoizee":"^0.4.2","@types/node-fetch":"^2.1.4","@types/request":"^2.48.1","@types/tmp":"^0.2.3","@types/update-notifier":"^2.5.0","@types/vorpal":"^1.12.0","@types/websocket":"^0.0.40","@types/yargs":"^13.0.0","child-process-promise":"^2.2.1","clipboardy":"^2.0.0","command-exists-promise":"^2.0.2","common-tags":"^1.8.0","dayjs":"^1.10.4","eslint":"^8.7.0","fs-extra":"^7.0.1","gitlab":"^4.4.1","js-yaml":"^4.1.0","lodash":"^4.17.21","memoizee":"^0.4.14","node-fetch":"^2.3.0","open":"^8.4.0","prettier":"^2.5.1","tmp-promise":"^2.0.2","typescript":"^4.5.4","vorpal":"^1.12.0"},"version":"0.0.0"}');
|
|
357091
356836
|
|
|
357092
356837
|
/***/ }),
|
|
357093
356838
|
|
package/dist/cli.js
CHANGED
|
@@ -3,11 +3,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
exports.__esModule = true;
|
|
6
|
-
var update_notifier_1 = __importDefault(require("update-notifier"));
|
|
7
6
|
var cli_1 = __importDefault(require("./apps/cli/cli"));
|
|
8
|
-
var packageInfos_1 = __importDefault(require("./packageInfos"));
|
|
9
|
-
(0, update_notifier_1["default"])({
|
|
10
|
-
pkg: packageInfos_1["default"]
|
|
11
|
-
}).notify();
|
|
12
7
|
(0, cli_1["default"])();
|
|
13
8
|
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;AAAA,uDAAiC;AAEjC,IAAA,gBAAG,GAAE,CAAC"}
|