@vaharoni/devops 1.3.2 → 1.3.4

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/devops.js CHANGED
@@ -2096,8 +2096,13 @@ function copyRegistrySecretToNamespace(monorepoEnv) {
2096
2096
  metadata: { name, namespace: envToNamespace(monorepoEnv) },
2097
2097
  type
2098
2098
  };
2099
+ const redactedParts = {
2100
+ ...relevantParts,
2101
+ data: "**REDACTED**"
2102
+ };
2099
2103
  const copyCmd = `echo '${JSON.stringify(relevantParts)}' | kubectl apply -f -`;
2100
- new CommandExecutor(copyCmd, { quiet: true }).exec();
2104
+ const redactedCommand = `echo '${JSON.stringify(redactedParts)}' | kubectl apply -f -`;
2105
+ new CommandExecutor(copyCmd, { quiet: true, redactedCommand }).exec();
2101
2106
  }
2102
2107
  function patchServiceAccountImagePullSecret(monorepoEnv) {
2103
2108
  const secretName2 = getSecretName();
@@ -2125,7 +2130,7 @@ GENERAL USAGE
2125
2130
  'create' does the following:
2126
2131
  1. Creates the namepace
2127
2132
  2. Creates a secret to hold environment variables (used by devops env) and the base cryptographic secret
2128
- 3. If use-image-pull-secret is true, copies the external-registry-secret to the namespace and patches the default service account to use it
2133
+ 3. If image-pull-secret-name is set, copies the named secret to the namespace and patches the default service account to use it
2129
2134
 
2130
2135
  'delete' removes the namespace in kubernetes, which deletes all entities within it.
2131
2136
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vaharoni/devops",
3
3
  "type": "module",
4
- "version": "1.3.2",
4
+ "version": "1.3.4",
5
5
  "description": "Devops utility",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -24,7 +24,8 @@
24
24
  },
25
25
  "scripts": {
26
26
  "build": "tsup",
27
- "test": "vitest run"
27
+ "test": "vitest run",
28
+ "verify": "tsc --noEmit"
28
29
  },
29
30
  "repository": {
30
31
  "type": "git",
@@ -1,8 +1,8 @@
1
- import { CLICommandParser, printUsageAndExit, StrongParams } from "../../../src/cli/common";
1
+ import { CLICommandParser, printUsageAndExit, StrongParams } from "../common";
2
2
  import {
3
3
  copyRegistrySecretToNamespace,
4
4
  patchServiceAccountImagePullSecret,
5
- } from "../../../src/libs/registry/image-pull-secret";
5
+ } from "../../libs/registry/image-pull-secret";
6
6
  import { checkEnvSetup, createEmptyEnvSecret, createNamespace, deleteNamespace, patchBaseSecret } from "../../libs/k8s-namespace";
7
7
 
8
8
  const oneLiner = "Creates the basic prerequisites for a monorepo";
@@ -21,7 +21,7 @@ GENERAL USAGE
21
21
  'create' does the following:
22
22
  1. Creates the namepace
23
23
  2. Creates a secret to hold environment variables (used by devops env) and the base cryptographic secret
24
- 3. If use-image-pull-secret is true, copies the external-registry-secret to the namespace and patches the default service account to use it
24
+ 3. If image-pull-secret-name is set, copies the named secret to the namespace and patches the default service account to use it
25
25
 
26
26
  'delete' removes the namespace in kubernetes, which deletes all entities within it.
27
27
 
@@ -35,9 +35,15 @@ export function copyRegistrySecretToNamespace(monorepoEnv: string) {
35
35
  metadata: { name, namespace: envToNamespace(monorepoEnv) },
36
36
  type,
37
37
  };
38
+ const redactedParts = {
39
+ ...relevantParts,
40
+ data: "**REDACTED**",
41
+ };
38
42
  // prettier-ignore
39
43
  const copyCmd = `echo '${JSON.stringify(relevantParts)}' | kubectl apply -f -`;
40
- new CommandExecutor(copyCmd, { quiet: true }).exec();
44
+ // prettier-ignore
45
+ const redactedCommand = `echo '${JSON.stringify(redactedParts)}' | kubectl apply -f -`;
46
+ new CommandExecutor(copyCmd, { quiet: true, redactedCommand }).exec();
41
47
  }
42
48
 
43
49
  export function patchServiceAccountImagePullSecret(monorepoEnv: string) {