@catladder/pipeline 4.2.1 → 4.2.2
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/bash/bashEscape.js +1 -1
- package/dist/bash/getInjectVarsScript.js +2 -2
- package/dist/build/artifacts/createBuildJobArtifact.js +2 -2
- package/dist/build/base/createAppBuildJob.js +2 -2
- package/dist/build/base/writeDotEnv.js +2 -2
- package/dist/build/docker.js +2 -2
- package/dist/build/node/cache.js +2 -2
- package/dist/config/readConfig.js +6 -7
- package/dist/constants.js +1 -1
- package/dist/context/createComponentContext.js +2 -2
- package/dist/context/createWorkspaceContext.js +2 -2
- package/dist/context/getEnvConfig.js +3 -3
- package/dist/context/utils/envVars.js +2 -2
- package/dist/deploy/cloudRun/createJobs/getCloudRunDeployScripts.js +2 -2
- package/dist/deploy/cloudRun/utils/createArgsString.js +2 -2
- package/dist/deploy/kubernetes/kubeValues.js +2 -2
- package/dist/deploy/kubernetes/mongodb.js +2 -2
- package/dist/pipeline/gitlab/createGitlabJobs.js +7 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/utils/index.js +3 -3
- package/examples/rails-k8s-with-worker-dockerfile.test.ts +1 -1
- package/package.json +5 -7
- package/src/bash/getInjectVarsScript.ts +1 -1
- package/src/build/artifacts/createBuildJobArtifact.ts +1 -1
- package/src/build/base/createAppBuildJob.ts +1 -1
- package/src/build/base/writeDotEnv.ts +1 -1
- package/src/build/docker.ts +1 -1
- package/src/build/node/cache.ts +1 -1
- package/src/config/readConfig.ts +7 -12
- package/src/context/createComponentContext.ts +1 -1
- package/src/context/createWorkspaceContext.ts +1 -1
- package/src/context/getEnvConfig.ts +1 -1
- package/src/context/utils/envVars.ts +1 -1
- package/src/deploy/cloudRun/createJobs/getCloudRunDeployScripts.ts +1 -1
- package/src/deploy/cloudRun/utils/createArgsString.ts +1 -1
- package/src/deploy/kubernetes/kubeValues.ts +1 -1
- package/src/deploy/kubernetes/mongodb.ts +1 -1
- package/src/pipeline/gitlab/createGitlabJobs.ts +1 -1
- package/src/utils/index.ts +1 -1
package/dist/utils/index.js
CHANGED
|
@@ -35,13 +35,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
35
35
|
value: true
|
|
36
36
|
});
|
|
37
37
|
exports.mergeWithMergingArrays = exports.ensureArray = exports.ensureArrayOrNull = exports.notNil = void 0;
|
|
38
|
-
var
|
|
38
|
+
var lodash_es_1 = require("lodash-es");
|
|
39
39
|
function notNil(value) {
|
|
40
40
|
return value !== null && value !== undefined;
|
|
41
41
|
}
|
|
42
42
|
exports.notNil = notNil;
|
|
43
43
|
var ensureArrayOrNull = function (s) {
|
|
44
|
-
return (0,
|
|
44
|
+
return (0, lodash_es_1.isNil)(s) ? null : Array.isArray(s) ? s : [s];
|
|
45
45
|
};
|
|
46
46
|
exports.ensureArrayOrNull = ensureArrayOrNull;
|
|
47
47
|
var ensureArray = function (s) {
|
|
@@ -51,7 +51,7 @@ var ensureArray = function (s) {
|
|
|
51
51
|
exports.ensureArray = ensureArray;
|
|
52
52
|
// see https://github.com/lodash/lodash/issues/5384
|
|
53
53
|
var mergeWithMergingArrays = function (obj1, obj2) {
|
|
54
|
-
return (0,
|
|
54
|
+
return (0, lodash_es_1.mergeWith)({}, obj1, obj2, function (prop1, prop2) {
|
|
55
55
|
return Array.isArray(prop1) && Array.isArray(prop2) ? __spreadArray(__spreadArray([], __read(prop1), false), __read(prop2), false) : undefined;
|
|
56
56
|
});
|
|
57
57
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, rm, writeFile } from "fs/promises";
|
|
2
2
|
import { createYamlLocalPipeline } from "./__utils__/helpers";
|
|
3
3
|
import config from "./rails-k8s-with-worker";
|
|
4
|
-
import { merge } from "lodash";
|
|
4
|
+
import { merge } from "lodash-es";
|
|
5
5
|
import { join } from "path";
|
|
6
6
|
|
|
7
7
|
it("matches snapshot with a Dockerfile", async () => {
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
],
|
|
55
55
|
"license": "MIT",
|
|
56
|
-
"version": "4.2.
|
|
56
|
+
"version": "4.2.2",
|
|
57
57
|
"scripts": {
|
|
58
58
|
"build:tsc": "yarn tsc",
|
|
59
59
|
"build": "yarn build:compile && yarn build:inline-variables",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"lint": "eslint \"src/**/*.ts\"",
|
|
64
64
|
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
65
65
|
"generate:gitlab-ci-yml-types": "ts-node ./scripts/generate-gitlab-ci-types.ts",
|
|
66
|
-
"generate:examples-test": "
|
|
66
|
+
"generate:examples-test": "jiti scripts/generate-examples-test.ts"
|
|
67
67
|
},
|
|
68
68
|
"types": "dist/index.d.ts",
|
|
69
69
|
"main": "dist/index.js",
|
|
@@ -74,20 +74,18 @@
|
|
|
74
74
|
"@babel/plugin-syntax-typescript": "^7.25.4",
|
|
75
75
|
"@babel/preset-typescript": "^7.24.7",
|
|
76
76
|
"@types/child-process-promise": "^2.2.6",
|
|
77
|
-
"@types/lodash": "^4.17.
|
|
77
|
+
"@types/lodash-es": "^4.17.12",
|
|
78
78
|
"@types/node": "^22.5.1",
|
|
79
79
|
"babel-plugin-transform-inline-environment-variables": "^0.4.3",
|
|
80
80
|
"child-process-promise": "^2.2.1",
|
|
81
81
|
"glob": "^11.0.0",
|
|
82
|
+
"jiti": "^2",
|
|
82
83
|
"json-schema-to-typescript": "^13.0.2",
|
|
83
|
-
"lodash": "^4.
|
|
84
|
+
"lodash-es": "^4.18.1",
|
|
84
85
|
"memoizee": "^0.4.17",
|
|
85
86
|
"path-equal": "1.2.5",
|
|
86
87
|
"slugify": "^1.6.6",
|
|
87
88
|
"typescript": "^5.4.5",
|
|
88
89
|
"yaml": "^2.5.0"
|
|
89
|
-
},
|
|
90
|
-
"dependencies": {
|
|
91
|
-
"tsx": "^4.21.0"
|
|
92
90
|
}
|
|
93
91
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
type Context,
|
|
6
6
|
} from "../../types";
|
|
7
7
|
import type { CatladderJob } from "../../types/jobs";
|
|
8
|
-
import { uniq } from "lodash";
|
|
8
|
+
import { uniq } from "lodash-es";
|
|
9
9
|
import { componentContextNeedsBuildTimeDotEnv } from "../base/writeDotEnv";
|
|
10
10
|
|
|
11
11
|
const uniqueAndAlphabeticalSort = (arr: string[]): string[] => {
|
package/src/build/docker.ts
CHANGED
package/src/build/node/cache.ts
CHANGED
package/src/config/readConfig.ts
CHANGED
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from "fs";
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
4
|
-
const tsx = require("tsx/cjs/api");
|
|
2
|
+
import { createJiti } from "jiti";
|
|
5
3
|
|
|
6
4
|
import { parse } from "yaml";
|
|
7
5
|
import type { Config } from "../types";
|
|
8
6
|
|
|
9
|
-
// allows us to load ts files
|
|
10
|
-
|
|
11
7
|
const fullPath = (directory: string, ext: string) =>
|
|
12
8
|
directory + "/catladder." + ext;
|
|
13
9
|
|
|
@@ -21,14 +17,14 @@ const readConfigInternal = async (
|
|
|
21
17
|
if (found) {
|
|
22
18
|
const filePath = fullPath(directory, found);
|
|
23
19
|
if (found === "ts" || found === "js") {
|
|
24
|
-
const
|
|
20
|
+
const jiti = createJiti(directory);
|
|
21
|
+
const result = await jiti.import(filePath);
|
|
25
22
|
|
|
26
|
-
|
|
27
|
-
const config = result.default.default || result.default;
|
|
23
|
+
const config = (result as any).default || result;
|
|
28
24
|
return {
|
|
29
25
|
path: filePath,
|
|
30
26
|
ext: found,
|
|
31
|
-
config,
|
|
27
|
+
config: config as Config,
|
|
32
28
|
};
|
|
33
29
|
} else {
|
|
34
30
|
return {
|
|
@@ -51,9 +47,8 @@ export const readConfig = async (
|
|
|
51
47
|
console.error(`
|
|
52
48
|
This may happen due to various reasons:
|
|
53
49
|
- Syntax errors in your catladder.ts file
|
|
54
|
-
-
|
|
55
|
-
If your project uses newer TypeScript/JavaScript syntax, you may need to update catladder
|
|
56
|
-
to get a newer version of tsx that supports it.
|
|
50
|
+
- The TypeScript loader (jiti) used by catladder needs to understand the syntax in your project.
|
|
51
|
+
If your project uses newer TypeScript/JavaScript syntax, you may need to update catladder.
|
|
57
52
|
- Missing or incorrect dependencies in your project
|
|
58
53
|
- TypeScript configuration issues in your tsconfig.json
|
|
59
54
|
`);
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "..";
|
|
8
8
|
import { getPackageManagerInfoBase } from "../pipeline/packageManager";
|
|
9
9
|
import { mergeWithMergingArrays } from "../utils";
|
|
10
|
-
import { uniq } from "lodash";
|
|
10
|
+
import { uniq } from "lodash-es";
|
|
11
11
|
|
|
12
12
|
export async function createWorkspaceContext({
|
|
13
13
|
env,
|
package/src/utils/index.ts
CHANGED