@catladder/pipeline 1.40.4 → 1.41.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.
Files changed (82) hide show
  1. package/bin/catladder-gitlab.js +1 -1
  2. package/dist/build/base/createBuildJob.d.ts +2 -2
  3. package/dist/build/base/getBuildInfo.d.ts +1 -1
  4. package/dist/build/docker.d.ts +2 -2
  5. package/dist/build/index.d.ts +3 -3
  6. package/dist/build/node/buildJob.d.ts +2 -2
  7. package/dist/build/node/cache.d.ts +2 -2
  8. package/dist/build/node/index.d.ts +1 -1
  9. package/dist/build/node/meteor.d.ts +1 -1
  10. package/dist/build/node/testJob.d.ts +2 -2
  11. package/dist/build/node/yarn.d.ts +1 -1
  12. package/dist/bundles/catladder-gitlab/index.js +15 -0
  13. package/dist/config/configruedEnvs.d.ts +1 -1
  14. package/dist/config/readConfig.d.ts +1 -1
  15. package/dist/constants.js +1 -1
  16. package/dist/context/index.d.ts +2 -2
  17. package/dist/defaults/index.d.ts +1 -1
  18. package/dist/deploy/base.d.ts +2 -2
  19. package/dist/deploy/custom/deployJob.d.ts +2 -2
  20. package/dist/deploy/custom/index.d.ts +1 -1
  21. package/dist/deploy/index.d.ts +3 -3
  22. package/dist/deploy/kubernetes/additionalSecretKeys.d.ts +1 -1
  23. package/dist/deploy/kubernetes/cloudsql.d.ts +1 -1
  24. package/dist/deploy/kubernetes/deployJob.d.ts +2 -2
  25. package/dist/deploy/kubernetes/index.d.ts +1 -1
  26. package/dist/deploy/kubernetes/kubeEnv.d.ts +1 -1
  27. package/dist/deploy/kubernetes/kubeValues.d.ts +1 -1
  28. package/dist/deploy/kubernetes/mongodb.d.ts +1 -1
  29. package/dist/deploy/utils.d.ts +2 -2
  30. package/dist/pipeline/createChildPipeline.d.ts +2 -2
  31. package/dist/pipeline/createJobs.d.ts +2 -2
  32. package/dist/pipeline/gitlab/makeGitlabJob.d.ts +2 -2
  33. package/dist/pipeline/packageManager.d.ts +1 -1
  34. package/dist/rules/index.d.ts +1 -1
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/dist/types/config.d.ts +5 -5
  37. package/dist/types/context.d.ts +1 -1
  38. package/dist/types/jobs.d.ts +1 -1
  39. package/dist/types/pipeline.d.ts +1 -1
  40. package/package.json +13 -10
  41. package/scripts/bundle +2 -0
  42. package/src/build/base/createBuildJob.ts +3 -2
  43. package/src/build/base/getBuildInfo.ts +1 -1
  44. package/src/build/docker.ts +2 -2
  45. package/src/build/index.ts +3 -3
  46. package/src/build/node/buildJob.ts +2 -2
  47. package/src/build/node/cache.ts +2 -2
  48. package/src/build/node/index.ts +1 -1
  49. package/src/build/node/meteor.ts +2 -2
  50. package/src/build/node/testJob.ts +2 -2
  51. package/src/build/node/yarn.ts +1 -1
  52. package/src/build/tests/storybook.test.ts +1 -1
  53. package/src/catladder-gitlab.ts +1 -1
  54. package/src/config/configruedEnvs.test.ts +2 -2
  55. package/src/config/configruedEnvs.ts +5 -4
  56. package/src/config/readConfig.ts +1 -1
  57. package/src/context/index.ts +5 -4
  58. package/src/defaults/index.ts +1 -1
  59. package/src/deploy/base.ts +2 -2
  60. package/src/deploy/custom/deployJob.ts +4 -3
  61. package/src/deploy/custom/index.ts +1 -1
  62. package/src/deploy/index.ts +3 -3
  63. package/src/deploy/kubernetes/additionalSecretKeys.ts +1 -1
  64. package/src/deploy/kubernetes/cloudsql.ts +2 -1
  65. package/src/deploy/kubernetes/deployJob.ts +2 -2
  66. package/src/deploy/kubernetes/index.ts +1 -1
  67. package/src/deploy/kubernetes/kubeEnv.ts +1 -1
  68. package/src/deploy/kubernetes/kubeValues.ts +2 -2
  69. package/src/deploy/kubernetes/mongodb.ts +2 -1
  70. package/src/deploy/kubernetes/processSecretsAsFiles.ts +1 -1
  71. package/src/deploy/utils.ts +3 -2
  72. package/src/pipeline/createChildPipeline.test.ts +1 -1
  73. package/src/pipeline/createChildPipeline.ts +2 -2
  74. package/src/pipeline/createJobs.ts +4 -4
  75. package/src/pipeline/gitlab/makeGitlabJob.ts +2 -2
  76. package/src/pipeline/packageManager.ts +1 -1
  77. package/src/rules/index.ts +1 -1
  78. package/src/types/config.ts +5 -5
  79. package/src/types/context.ts +1 -1
  80. package/src/types/jobs.ts +1 -1
  81. package/src/types/pipeline.ts +1 -1
  82. package/tsconfig.json +2 -0
@@ -1,9 +1,9 @@
1
1
  import { join } from "path";
2
2
  import { getRunnerImage } from "../../runner";
3
- import { GitlabJobCache } from "../../types";
3
+ import type { GitlabJobCache } from "../../types";
4
4
  import type { Context } from "../../types/context";
5
5
 
6
- import { CatladderJob } from "../../types/jobs";
6
+ import type { CatladderJob } from "../../types/jobs";
7
7
 
8
8
  import { APP_BUILD_JOB_NAME } from "../base/constants";
9
9
  import { createBuildJob } from "../base/createBuildJob";
@@ -1,6 +1,6 @@
1
1
  import { getRunnerImage } from "../../runner";
2
- import { Context } from "../../types/context";
3
- import { CatladderJob } from "../../types/jobs";
2
+ import type { Context } from "../../types/context";
3
+ import type { CatladderJob } from "../../types/jobs";
4
4
  import { ensureArray, notNil } from "../../utils";
5
5
  import { getNodeCache } from "./cache";
6
6
  import { NODE_RUNNER_BUILD_VARIABLES } from "./constants";
@@ -1,4 +1,4 @@
1
- import { Context } from "../../types";
1
+ import type { Context } from "../../types";
2
2
 
3
3
  export const getYarnInstallCommand = (
4
4
  context: Context,
@@ -1,4 +1,4 @@
1
- import { Config } from "../../types";
1
+ import type { Config } from "../../types";
2
2
  import { createChildPipeline } from "../../";
3
3
 
4
4
  describe("storybook build", () => {
@@ -3,7 +3,7 @@ import { dump } from "js-yaml";
3
3
  import { readConfigSync } from "./config";
4
4
  import { PIPELINE_IMAGE_TAG } from "./constants";
5
5
  import { createChildPipeline } from "./pipeline";
6
- import { PipelineTrigger } from "./types";
6
+ import type { PipelineTrigger } from "./types";
7
7
 
8
8
  const {
9
9
  CI_MERGE_REQUEST_ID,
@@ -1,6 +1,6 @@
1
1
  import { getAllEnvsByTrigger } from ".";
2
- import { DeployConfigKubernetesCluster } from "..";
3
- import { Config } from "../types";
2
+ import type { DeployConfigKubernetesCluster } from "..";
3
+ import type { Config } from "../types";
4
4
 
5
5
  describe("getAllEnvsByTrigger", () => {
6
6
  const cluster: DeployConfigKubernetesCluster = {
@@ -1,9 +1,10 @@
1
- import {
1
+ import type {
2
2
  Config,
3
- DEFAULT_ENV_TYPES,
4
3
  EnvType,
5
- getEnvTypesByTrigger,
6
- PipelineTrigger,
4
+ PipelineTrigger} from "../types";
5
+ import {
6
+ DEFAULT_ENV_TYPES,
7
+ getEnvTypesByTrigger
7
8
  } from "../types";
8
9
 
9
10
  const getConfiguredAndDefaultEnvs = (
@@ -1,7 +1,7 @@
1
1
  import { existsSync, readFileSync } from "fs";
2
2
  import { register } from "ts-node";
3
3
  import { load } from "js-yaml";
4
- import { Config } from "../types";
4
+ import type { Config } from "../types";
5
5
 
6
6
  // allows us to load ts files
7
7
 
@@ -1,11 +1,12 @@
1
1
  import { isObject, merge } from "lodash";
2
2
  import slugify from "slugify";
3
3
  import { BUILD_TYPES } from "../build";
4
- import { BuildConfig } from "../build/types";
4
+ import type { BuildConfig } from "../build/types";
5
5
  import { DEPLOY_TYPES, getKubernetesNamespace } from "../deploy";
6
- import { DeployConfig } from "../deploy/types";
7
- import { Config, DevLocalEnvConfig, isKnowEnvType } from "../types/config";
8
- import {
6
+ import type { DeployConfig } from "../deploy/types";
7
+ import type { Config, DevLocalEnvConfig } from "../types/config";
8
+ import { isKnowEnvType } from "../types/config";
9
+ import type {
9
10
  CommitInfo,
10
11
  Context,
11
12
  Environment,
@@ -1,4 +1,4 @@
1
- import { Retry } from "../types";
1
+ import type { Retry } from "../types";
2
2
 
3
3
  export const BASE_RETRY: Retry = {
4
4
  max: 2,
@@ -1,6 +1,6 @@
1
1
  import { getDockerImageVariables, requiresDockerBuild } from "../build/docker";
2
- import { Context } from "../types";
3
- import { CatladderJob } from "../types/jobs";
2
+ import type { Context } from "../types";
3
+ import type { CatladderJob } from "../types/jobs";
4
4
  import { contextIsStoppable } from "./utils";
5
5
 
6
6
  export const DEPLOY_JOB_NAME = "🚀 Deploy";
@@ -1,8 +1,9 @@
1
1
  import { merge } from "lodash";
2
- import { BuildConfigType, BuildTypes } from "../..";
2
+ import type { BuildConfigType } from "../..";
3
+ import { BuildTypes } from "../..";
3
4
  import { getYarnInstall } from "../../build/node/yarn";
4
- import { Context } from "../../types/context";
5
- import { CatladderJob } from "../../types/jobs";
5
+ import type { Context } from "../../types/context";
6
+ import type { CatladderJob } from "../../types/jobs";
6
7
  import { getBaseDeploymentJob } from "../base";
7
8
  import { isOfDeployType } from "../types";
8
9
 
@@ -1,4 +1,4 @@
1
- import { DeployTypeDefinition } from "..";
1
+ import type { DeployTypeDefinition } from "..";
2
2
  import { createCustomDeployJobs } from "./deployJob";
3
3
 
4
4
  export const CUSTOM_DEPLOY_TYPE: DeployTypeDefinition<"custom"> = {
@@ -1,8 +1,8 @@
1
- import { Context } from "../types/context";
2
- import { CatladderJob } from "../types/jobs";
1
+ import type { Context } from "../types/context";
2
+ import type { CatladderJob } from "../types/jobs";
3
3
  import { CUSTOM_DEPLOY_TYPE } from "./custom";
4
4
  import { KUBERNETES_DEPLOY_TYPE } from "./kubernetes";
5
- import { DeployConfigGeneric, DeployConfigType } from "./types";
5
+ import type { DeployConfigGeneric, DeployConfigType } from "./types";
6
6
  export * from "./kubernetes";
7
7
  export * from "./types";
8
8
  export * from "./utils";
@@ -1,4 +1,4 @@
1
- import { DeployConfigKubernetes } from "../types";
1
+ import type { DeployConfigKubernetes } from "../types";
2
2
 
3
3
  export const additionalKubernetesSecretKeys = (
4
4
  config: DeployConfigKubernetes
@@ -1,4 +1,5 @@
1
- import { Context, getSecretVarNameForContext } from "../..";
1
+ import type { Context} from "../..";
2
+ import { getSecretVarNameForContext } from "../..";
2
3
 
3
4
  export const createCloudsqlBaseConfig = (context: Context) => {
4
5
  return {
@@ -2,8 +2,8 @@ import { dump } from "js-yaml";
2
2
  import { merge } from "lodash";
3
3
  import { getSecretVarNameForContext } from "../..";
4
4
  import { getRunnerImage } from "../../runner";
5
- import { Context } from "../../types/context";
6
- import { CatladderJob } from "../../types/jobs";
5
+ import type { Context } from "../../types/context";
6
+ import type { CatladderJob } from "../../types/jobs";
7
7
  import {
8
8
  getBaseDeploymentJob,
9
9
  getBaseDeploymentStopJob,
@@ -1,4 +1,4 @@
1
- import { DeployTypeDefinition } from "..";
1
+ import type { DeployTypeDefinition } from "..";
2
2
  import { additionalKubernetesSecretKeys } from "./additionalSecretKeys";
3
3
  import { createKubernetesDeployJobs } from "./deployJob";
4
4
 
@@ -1,4 +1,4 @@
1
- import { Context } from "../../types";
1
+ import type { Context } from "../../types";
2
2
  import { isOfDeployType } from "../types";
3
3
 
4
4
  const shouldGoIntoSecrets = (key: string, value: string) => {
@@ -1,6 +1,6 @@
1
1
  import { merge } from "lodash";
2
- import { DeployConfigKubernetesValues } from "..";
3
- import { Context } from "../../types/context";
2
+ import type { DeployConfigKubernetesValues } from "..";
3
+ import type { Context } from "../../types/context";
4
4
  import { mergeWithMergingArrays } from "../../utils";
5
5
  import { isOfDeployType } from "../types";
6
6
  import { createCloudsqlBaseConfig } from "./cloudsql";
@@ -1,5 +1,6 @@
1
1
  import { range } from "lodash";
2
- import { Context, getSecretVarNameForContext, isOfDeployType } from "../..";
2
+ import type { Context } from "../..";
3
+ import { getSecretVarNameForContext, isOfDeployType } from "../..";
3
4
 
4
5
  const getCredentialString = (context: Context) =>
5
6
  `root:$${getSecretVarNameForContext(context, "MONGODB_ROOT_PASSWORD")}@`;
@@ -1,5 +1,5 @@
1
1
  import { omit } from "lodash";
2
- import { DeployConfigKubernetesValues } from "../types";
2
+ import type { DeployConfigKubernetesValues } from "../types";
3
3
 
4
4
  export const processSecretsAsFiles = <
5
5
  T extends {
@@ -1,5 +1,6 @@
1
- import { Config, Context } from "../types";
2
- import { DeployConfigKubernetesCluster, isOfDeployType } from "./types";
1
+ import type { Config, Context } from "../types";
2
+ import type { DeployConfigKubernetesCluster} from "./types";
3
+ import { isOfDeployType } from "./types";
3
4
 
4
5
  export const getFullKubernetesClusterName = (
5
6
  cluster: DeployConfigKubernetesCluster
@@ -1,4 +1,4 @@
1
- import { Config } from "../types";
1
+ import type { Config } from "../types";
2
2
  import { createChildPipeline } from "./createChildPipeline";
3
3
 
4
4
  describe("createChildPipeline", () => {
@@ -1,8 +1,8 @@
1
1
  import { getAllEnvsByTrigger, getAllEnvsInAllComponents } from "../config";
2
2
  import { RULES_ALWAYS } from "../rules";
3
3
  import { getRunnerImage } from "../runner";
4
- import { GitlabPipeline, Pipeline, PipelineJob, PipelineType } from "../types";
5
- import { Config, PipelineTrigger } from "../types/config";
4
+ import type { GitlabPipeline, Pipeline, PipelineJob, PipelineType } from "../types";
5
+ import type { Config, PipelineTrigger } from "../types/config";
6
6
  import { BASE_STAGES } from "../types/jobs";
7
7
  import { createJobs } from "./createJobs";
8
8
 
@@ -3,10 +3,10 @@ import { isFunction, isObject } from "lodash";
3
3
  import { BUILD_TYPES } from "../build";
4
4
  import { createContext } from "../context";
5
5
  import { DEPLOY_TYPES } from "../deploy";
6
- import { PipelineJob, PipelineType } from "../types";
7
- import { Config, PipelineTrigger } from "../types/config";
8
- import { CommitInfo, Context } from "../types/context";
9
- import { CatladderJob } from "../types/jobs";
6
+ import type { PipelineJob, PipelineType } from "../types";
7
+ import type { Config, PipelineTrigger } from "../types/config";
8
+ import type { CommitInfo, Context } from "../types/context";
9
+ import type { CatladderJob } from "../types/jobs";
10
10
  import { notNil } from "../utils";
11
11
  import { makeGitlabJob } from "./gitlab/makeGitlabJob";
12
12
  import { getPackageManagerInfo } from "./packageManager";
@@ -1,6 +1,6 @@
1
1
  import { BASE_RETRY } from "../../defaults";
2
- import { GitlabJobDef } from "../../types";
3
- import { CatladderJob } from "../../types/jobs";
2
+ import type { GitlabJobDef } from "../../types";
3
+ import type { CatladderJob } from "../../types/jobs";
4
4
 
5
5
  export const makeGitlabJob = ({
6
6
  envMode,
@@ -1,5 +1,5 @@
1
1
  import { exec } from "child-process-promise";
2
- import { Config, PackageManagerInfo } from "../types";
2
+ import type { Config, PackageManagerInfo } from "../types";
3
3
  import { pathEqual } from "path-equal";
4
4
  import memoizee from "memoizee";
5
5
  import { join } from "path";
@@ -1,4 +1,4 @@
1
- import { GitlabRule } from "../types";
1
+ import type { GitlabRule } from "../types";
2
2
 
3
3
  const NEVER_ON_RELEASE_COMMIT: GitlabRule = {
4
4
  if: "$CI_COMMIT_MESSAGE =~ /^chore\\(release\\).*/",
@@ -1,8 +1,8 @@
1
- import { BuildConfig } from "../build/types";
2
- import { DeployConfig } from "../deploy/types";
3
- import { PartialDeep } from "type-fest";
4
- import { CatladderJob } from "./jobs";
5
- import { Context } from "./context";
1
+ import type { BuildConfig } from "../build/types";
2
+ import type { DeployConfig } from "../deploy/types";
3
+ import type { PartialDeep } from "type-fest";
4
+ import type { CatladderJob } from "./jobs";
5
+ import type { Context } from "./context";
6
6
  export type PipelineTrigger = "mainBranch" | "mr" | "taggedRelease";
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- import { PipelineTrigger, ComponentConfig, Config, EnvType } from "./config";
1
+ import type { PipelineTrigger, ComponentConfig, Config, EnvType } from "./config";
2
2
 
3
3
  export type Environment = {
4
4
  host: string;
package/src/types/jobs.ts CHANGED
@@ -1,4 +1,4 @@
1
- import {
1
+ import type {
2
2
  Artifacts,
3
3
  GitlabEnvironment,
4
4
  GitlabJobCache,
@@ -1,4 +1,4 @@
1
- import { GitlabJobDef, GitlabPipeline } from "./gitlab-types";
1
+ import type { GitlabJobDef, GitlabPipeline } from "./gitlab-types";
2
2
 
3
3
  export type PipelineType = "gitlab";
4
4
 
package/tsconfig.json CHANGED
@@ -2,9 +2,11 @@
2
2
  "compilerOptions": {
3
3
  "lib": ["es2020", "DOM"],
4
4
  "strict": true,
5
+ "module": "CommonJS",
5
6
  "downlevelIteration": true,
6
7
  "declaration": true,
7
8
  "outDir": "dist",
9
+ "moduleResolution": "node",
8
10
  "esModuleInterop": true,
9
11
  "incremental": true
10
12
  },