@vaharoni/devops 1.2.10 → 1.2.12

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.
@@ -1,5 +1,5 @@
1
1
  import chalk from "chalk";
2
- import { globSync } from "glob";
2
+ import fs from "fs";
3
3
  import path from "path";
4
4
  import { nodeWorkspaces } from "./process-package-json";
5
5
  import { pythonWorkspaces } from "./process-pyproject-toml";
@@ -61,5 +61,7 @@ export function globEnvYamlFiles() {
61
61
  const workspacePaths = [
62
62
  ...new Set(Object.values(allWorkspaces).map((w) => w.rootPath)),
63
63
  ];
64
- return workspacePaths.flatMap((wsPath) => globSync(path.join(rootPath, wsPath, "**/env.yaml")));
64
+ return workspacePaths
65
+ .map((wsPath) => path.join(rootPath, wsPath, "env.yaml"))
66
+ .filter((p) => fs.existsSync(p));
65
67
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vaharoni/devops",
3
3
  "type": "module",
4
- "version": "1.2.10",
4
+ "version": "1.2.12",
5
5
  "description": "Devops utility",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
@@ -1,5 +1,5 @@
1
1
  import chalk from "chalk";
2
- import { globSync } from "glob";
2
+ import fs from "fs";
3
3
  import path from "path";
4
4
  import { nodeWorkspaces } from "./process-package-json";
5
5
  import { pythonWorkspaces } from "./process-pyproject-toml";
@@ -68,7 +68,7 @@ export function globEnvYamlFiles(): string[] {
68
68
  const workspacePaths = [
69
69
  ...new Set(Object.values(allWorkspaces).map((w) => w.rootPath)),
70
70
  ];
71
- return workspacePaths.flatMap((wsPath) =>
72
- globSync(path.join(rootPath, wsPath, "**/env.yaml"))
73
- );
71
+ return workspacePaths
72
+ .map((wsPath) => path.join(rootPath, wsPath, "env.yaml"))
73
+ .filter((p) => fs.existsSync(p));
74
74
  }
@@ -56,9 +56,9 @@ export async function POST(request: Request) {
56
56
 
57
57
  ## Testing a secure endpoint in local development
58
58
 
59
- Make sure your `config/.env.global` has something like:
59
+ Make sure your `config/.env.global` has something like the following. This represents hex of 32 bytes. When creating a namespace, devops properly set these for you in a k8s secret. Locally, something like this suffices.
60
60
  ```text
61
- MONOREPO_BASE_SECRET=123456789abcdef
61
+ MONOREPO_BASE_SECRET=0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff
62
62
  ```
63
63
 
64
64
  Then run:
@@ -1,4 +1,4 @@
1
1
  # Add here env variables that are global to all environments
2
2
 
3
3
  # This should remain locally on your machine. There is no need to set this in the remote environment.
4
- MONOREPO_BASE_SECRET=123456789abcdef
4
+ MONOREPO_BASE_SECRET=0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff