@catladder/cli 0.0.0-main-03ba8cbf → 0.0.0-main-ddb8b249
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/catenv/index.js +16 -4
- package/dist/bundles/cli/index.js +16 -4
- package/dist/pipeline/src/context/getEnvConfig.js +14 -2
- package/dist/pipeline/src/context/getEnvConfig.js.map +1 -1
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js +2 -2
- package/dist/pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.js.map +1 -1
- package/dist/pipeline/src/deploy/types/googleCloudRun.d.ts +4 -0
- package/dist/pipeline/src/types/config.d.ts +11 -6
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -3002,7 +3002,7 @@ exports.getBuildInfoVariables = getBuildInfoVariables;
|
|
|
3002
3002
|
|
|
3003
3003
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
3004
3004
|
exports.getEnvConfig = void 0;
|
|
3005
|
-
const
|
|
3005
|
+
const lodash_1 = __nccwpck_require__(3255);
|
|
3006
3006
|
const getEnvConfig = (config, componentName, env) => {
|
|
3007
3007
|
var _a, _b;
|
|
3008
3008
|
const defaultConfig = config.components[componentName];
|
|
@@ -3014,7 +3014,19 @@ const getEnvConfig = (config, componentName, env) => {
|
|
|
3014
3014
|
// env is disabled, still return the default config
|
|
3015
3015
|
return defaultConfig;
|
|
3016
3016
|
}
|
|
3017
|
-
|
|
3017
|
+
/**
|
|
3018
|
+
* env config is merged with default. Arrays are not merged.
|
|
3019
|
+
* you can customize this by providing a function that takes the default value as argument
|
|
3020
|
+
*/
|
|
3021
|
+
return (0, lodash_1.mergeWith)({}, defaultConfig, envCustomizations, (defaultValue, customValue) => {
|
|
3022
|
+
// check if custom value is a function (and default is not),
|
|
3023
|
+
// we currently don't have config options that are functions, but we might in the future
|
|
3024
|
+
if (typeof customValue === "function" &&
|
|
3025
|
+
typeof defaultValue !== "function") {
|
|
3026
|
+
return customValue(defaultValue);
|
|
3027
|
+
}
|
|
3028
|
+
return undefined;
|
|
3029
|
+
});
|
|
3018
3030
|
};
|
|
3019
3031
|
exports.getEnvConfig = getEnvConfig;
|
|
3020
3032
|
//# sourceMappingURL=getEnvConfig.js.map
|
|
@@ -3869,7 +3881,7 @@ const getDeleteJobsScripts = (context) => {
|
|
|
3869
3881
|
};
|
|
3870
3882
|
exports.getDeleteJobsScripts = getDeleteJobsScripts;
|
|
3871
3883
|
const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(context).map(({ job, fullJobName }, jobIndex) => {
|
|
3872
|
-
var _a, _b, _c, _d;
|
|
3884
|
+
var _a, _b, _c, _d, _e;
|
|
3873
3885
|
const commandArray = Array.isArray(job.command)
|
|
3874
3886
|
? job.command
|
|
3875
3887
|
: job.command.split(" ");
|
|
@@ -3886,7 +3898,7 @@ const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(c
|
|
|
3886
3898
|
parallelism: (_c = job.parallelism) !== null && _c !== void 0 ? _c : 1,
|
|
3887
3899
|
"task-timeout": (_d = job.timeout) !== null && _d !== void 0 ? _d : "10m",
|
|
3888
3900
|
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
3889
|
-
"max-retries": 0,
|
|
3901
|
+
"max-retries": (_e = job.maxRetries) !== null && _e !== void 0 ? _e : 0,
|
|
3890
3902
|
...deployArgs,
|
|
3891
3903
|
// network
|
|
3892
3904
|
"vpc-connector": job === null || job === void 0 ? void 0 : job.vpcConnector,
|
|
@@ -5934,7 +5934,7 @@ exports.getBuildInfoVariables = getBuildInfoVariables;
|
|
|
5934
5934
|
|
|
5935
5935
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
5936
5936
|
exports.getEnvConfig = void 0;
|
|
5937
|
-
const
|
|
5937
|
+
const lodash_1 = __nccwpck_require__(23255);
|
|
5938
5938
|
const getEnvConfig = (config, componentName, env) => {
|
|
5939
5939
|
var _a, _b;
|
|
5940
5940
|
const defaultConfig = config.components[componentName];
|
|
@@ -5946,7 +5946,19 @@ const getEnvConfig = (config, componentName, env) => {
|
|
|
5946
5946
|
// env is disabled, still return the default config
|
|
5947
5947
|
return defaultConfig;
|
|
5948
5948
|
}
|
|
5949
|
-
|
|
5949
|
+
/**
|
|
5950
|
+
* env config is merged with default. Arrays are not merged.
|
|
5951
|
+
* you can customize this by providing a function that takes the default value as argument
|
|
5952
|
+
*/
|
|
5953
|
+
return (0, lodash_1.mergeWith)({}, defaultConfig, envCustomizations, (defaultValue, customValue) => {
|
|
5954
|
+
// check if custom value is a function (and default is not),
|
|
5955
|
+
// we currently don't have config options that are functions, but we might in the future
|
|
5956
|
+
if (typeof customValue === "function" &&
|
|
5957
|
+
typeof defaultValue !== "function") {
|
|
5958
|
+
return customValue(defaultValue);
|
|
5959
|
+
}
|
|
5960
|
+
return undefined;
|
|
5961
|
+
});
|
|
5950
5962
|
};
|
|
5951
5963
|
exports.getEnvConfig = getEnvConfig;
|
|
5952
5964
|
//# sourceMappingURL=getEnvConfig.js.map
|
|
@@ -6801,7 +6813,7 @@ const getDeleteJobsScripts = (context) => {
|
|
|
6801
6813
|
};
|
|
6802
6814
|
exports.getDeleteJobsScripts = getDeleteJobsScripts;
|
|
6803
6815
|
const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(context).map(({ job, fullJobName }, jobIndex) => {
|
|
6804
|
-
var _a, _b, _c, _d;
|
|
6816
|
+
var _a, _b, _c, _d, _e;
|
|
6805
6817
|
const commandArray = Array.isArray(job.command)
|
|
6806
6818
|
? job.command
|
|
6807
6819
|
: job.command.split(" ");
|
|
@@ -6818,7 +6830,7 @@ const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(c
|
|
|
6818
6830
|
parallelism: (_c = job.parallelism) !== null && _c !== void 0 ? _c : 1,
|
|
6819
6831
|
"task-timeout": (_d = job.timeout) !== null && _d !== void 0 ? _d : "10m",
|
|
6820
6832
|
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
6821
|
-
"max-retries": 0,
|
|
6833
|
+
"max-retries": (_e = job.maxRetries) !== null && _e !== void 0 ? _e : 0,
|
|
6822
6834
|
...deployArgs,
|
|
6823
6835
|
// network
|
|
6824
6836
|
"vpc-connector": job === null || job === void 0 ? void 0 : job.vpcConnector,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getEnvConfig = void 0;
|
|
4
|
-
const
|
|
4
|
+
const lodash_1 = require("lodash");
|
|
5
5
|
const getEnvConfig = (config, componentName, env) => {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
const defaultConfig = config.components[componentName];
|
|
@@ -13,7 +13,19 @@ const getEnvConfig = (config, componentName, env) => {
|
|
|
13
13
|
// env is disabled, still return the default config
|
|
14
14
|
return defaultConfig;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
/**
|
|
17
|
+
* env config is merged with default. Arrays are not merged.
|
|
18
|
+
* you can customize this by providing a function that takes the default value as argument
|
|
19
|
+
*/
|
|
20
|
+
return (0, lodash_1.mergeWith)({}, defaultConfig, envCustomizations, (defaultValue, customValue) => {
|
|
21
|
+
// check if custom value is a function (and default is not),
|
|
22
|
+
// we currently don't have config options that are functions, but we might in the future
|
|
23
|
+
if (typeof customValue === "function" &&
|
|
24
|
+
typeof defaultValue !== "function") {
|
|
25
|
+
return customValue(defaultValue);
|
|
26
|
+
}
|
|
27
|
+
return undefined;
|
|
28
|
+
});
|
|
17
29
|
};
|
|
18
30
|
exports.getEnvConfig = getEnvConfig;
|
|
19
31
|
//# sourceMappingURL=getEnvConfig.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEnvConfig.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getEnvConfig.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"getEnvConfig.js","sourceRoot":"","sources":["../../../../../pipeline/src/context/getEnvConfig.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AAG5B,MAAM,YAAY,GAAG,CAC1B,MAAc,EACd,aAAqB,EACrB,GAAW,EACa,EAAE;;IAC1B,MAAM,aAAa,GAAG,MAAM,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACvD,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,aAAa,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAA,MAAA,aAAa,CAAC,GAAG,0CAAG,GAAG,CAAC,mCAAI,EAAE,CAAC;IACzD,IAAI,iBAAiB,KAAK,KAAK,EAAE,CAAC;QAChC,mDAAmD;QACnD,OAAO,aAAa,CAAC;IACvB,CAAC;IACD;;;OAGG;IACH,OAAO,IAAA,kBAAS,EACd,EAAE,EACF,aAAa,EACb,iBAAiB,EACjB,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE;QAC5B,4DAA4D;QAC5D,wFAAwF;QACxF,IACE,OAAO,WAAW,KAAK,UAAU;YACjC,OAAO,YAAY,KAAK,UAAU,EAClC,CAAC;YACD,OAAO,WAAW,CAAC,YAAY,CAAC,CAAC;QACnC,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,YAAY,gBAoCvB"}
|
|
@@ -21,7 +21,7 @@ const getDeleteJobsScripts = (context) => {
|
|
|
21
21
|
};
|
|
22
22
|
exports.getDeleteJobsScripts = getDeleteJobsScripts;
|
|
23
23
|
const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(context).map(({ job, fullJobName }, jobIndex) => {
|
|
24
|
-
var _a, _b, _c, _d;
|
|
24
|
+
var _a, _b, _c, _d, _e;
|
|
25
25
|
const commandArray = Array.isArray(job.command)
|
|
26
26
|
? job.command
|
|
27
27
|
: job.command.split(" ");
|
|
@@ -38,7 +38,7 @@ const getJobCreateScripts = (context) => (0, exports.getCloudRunJobsWithNames)(c
|
|
|
38
38
|
parallelism: (_c = job.parallelism) !== null && _c !== void 0 ? _c : 1,
|
|
39
39
|
"task-timeout": (_d = job.timeout) !== null && _d !== void 0 ? _d : "10m",
|
|
40
40
|
"env-vars-file": constants_1.ENV_VARS_FILENAME,
|
|
41
|
-
"max-retries": 0,
|
|
41
|
+
"max-retries": (_e = job.maxRetries) !== null && _e !== void 0 ? _e : 0,
|
|
42
42
|
...deployArgs,
|
|
43
43
|
// network
|
|
44
44
|
"vpc-connector": job === null || job === void 0 ? void 0 : job.vpcConnector,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cloudRunJobs.js","sourceRoot":"","sources":["../../../../../../../pipeline/src/deploy/cloudRun/createJobs/cloudRunJobs.ts"],"names":[],"mappings":";;;AAEA,0DAAuD;AACvD,0CAAwC;AAExC,gEAA6D;AAC7D,8CAAkD;AAClD,qCAMkB;AAClB,2CAAgD;AAChD,uCAA+C;AAC/C,iDAA2D;AAEpD,MAAM,oBAAoB,GAAG,CAAC,OAAyB,EAAE,EAAE;IAChE,MAAM,UAAU,GAAG,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;IAClD,MAAM,gBAAgB,GAAG,IAAA,mCAAgB,EAAC,UAAU,CAAC,CAAC;IACtD,MAAM,aAAa,GAAG,IAAA,gCAAwB,EAAC,OAAO,CAAC,CAAC;IAExD,OAAO,aAAa,CAAC,OAAO,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC;QAChD,gGAAgG;QAChG,GAAG,IAAA,qBAAY,GAAE,yBAAyB,gBAAgB,UAAU,WAAW,yCAAyC,IAAA,qBAAY,GAAE,uCAAuC,gBAAgB,EAAE;QAC/L,GAAG,IAAA,qBAAY,GAAE,gBAAgB,WAAW,IAAI,gBAAgB,EAAE;KACnE,CAAC,CAAC;AACL,CAAC,CAAC;AAVW,QAAA,oBAAoB,wBAU/B;AA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AY,GAAE,oCAAoC,sBAAsB,EAAE;QAC/E,IAAI;KACL;SACE,MAAM,CAAC,cAAM,CAAC;SACd,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC,CACF,CAAC;AAtDS,QAAA,mBAAmB,uBAsD5B;AAEG,MAAM,wBAAwB,GAAG,CAAC,OAAyB,EAAE,EAAE;;IACpE,MAAM,YAAY,GAAG,IAAA,gCAAuB,EAAC,OAAO,CAAC,CAAC;IAEtD,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,MAAA,YAAY,CAAC,IAAI,mCAAI,EAAE,CAAC;QAC3D,2BAA2B;SAC1B,MAAM,CAAC,CAAC,KAAK,EAA8C,EAAE,CAC5D,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAClB;SACA,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;QACxB,WAAW,EAAE,IAAA,wBAAc,EAAC,OAAO,EAAE,OAAO,CAAC;QAC7C,GAAG;QACH,OAAO;KACR,CAAC,CAAC,CAAC;IACN,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AAdW,QAAA,wBAAwB,4BAcnC"}
|
|
@@ -163,6 +163,10 @@ export type DeployConfigCloudRunJobBase = {
|
|
|
163
163
|
* number of tasks that may run concurrently, defaults to 1
|
|
164
164
|
*/
|
|
165
165
|
parallelism?: number;
|
|
166
|
+
/**
|
|
167
|
+
* max number of retries of the job. Defaults to 0
|
|
168
|
+
*/
|
|
169
|
+
maxRetries?: number;
|
|
166
170
|
} & DeployConfigCloudRunWithVolumes & DeployConfigCloudRunNetworkConfig;
|
|
167
171
|
type Minute = string;
|
|
168
172
|
type Hour = string;
|
|
@@ -73,6 +73,10 @@ export type DevLocalEnvConfig = {
|
|
|
73
73
|
vars?: EnvVars;
|
|
74
74
|
port?: number;
|
|
75
75
|
};
|
|
76
|
+
type AddOverrideFunction<T> = {
|
|
77
|
+
[K in keyof T]: T[K] | ((defaultValue: T[K]) => T[K]) | (T[K] extends Record<string, unknown> | undefined ? AddOverrideFunction<T[K]> : never);
|
|
78
|
+
};
|
|
79
|
+
type EnvConfigWithOverride<E extends EnvType = EnvType> = AddOverrideFunction<EnvConfig<E>>;
|
|
76
80
|
export type EnvConfig<E extends EnvType = EnvType> = {
|
|
77
81
|
/**
|
|
78
82
|
* type of the env (stage, prod, review, dev)
|
|
@@ -84,18 +88,18 @@ export type EnvConfig<E extends EnvType = EnvType> = {
|
|
|
84
88
|
host?: string;
|
|
85
89
|
} & PartialDeep<DefaultEnvConfig>;
|
|
86
90
|
export type EnvConfigWithComponent = EnvConfig<EnvType> & ComponentConfig;
|
|
87
|
-
export type CustomEnv =
|
|
91
|
+
export type CustomEnv = EnvConfigWithOverride & {
|
|
88
92
|
type: EnvType;
|
|
89
93
|
};
|
|
90
94
|
export type Env<C extends ConfigProps = never> = {
|
|
91
95
|
/**
|
|
92
96
|
* local is a special env that is only used in local development
|
|
93
97
|
*/
|
|
94
|
-
local?: DevLocalEnvConfig
|
|
95
|
-
dev?:
|
|
96
|
-
stage?:
|
|
97
|
-
review?:
|
|
98
|
-
prod?:
|
|
98
|
+
local?: AddOverrideFunction<DevLocalEnvConfig>;
|
|
99
|
+
dev?: EnvConfigWithOverride<"dev"> | false;
|
|
100
|
+
stage?: EnvConfigWithOverride<"stage"> | false;
|
|
101
|
+
review?: EnvConfigWithOverride<"review"> | false;
|
|
102
|
+
prod?: EnvConfigWithOverride<"prod"> | false;
|
|
99
103
|
} & Record<C["CustomEnvs"], CustomEnv> & Record<string, any>;
|
|
100
104
|
export type ComponentConfig<C extends ConfigProps = never> = {
|
|
101
105
|
/**
|
|
@@ -178,3 +182,4 @@ export type Config<C extends ConfigProps = never> = {
|
|
|
178
182
|
*/
|
|
179
183
|
runnerVariables?: Record<string, string>;
|
|
180
184
|
};
|
|
185
|
+
export {};
|