safelaunch 1.0.29 → 1.0.30

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 (2) hide show
  1. package/package.json +2 -2
  2. package/src/postinstall.js +27 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "safelaunch",
3
- "version": "1.0.29",
3
+ "version": "1.0.30",
4
4
  "description": "Backend Reliability Infrastructure - catch what breaks production before it breaks",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "scripts": {
10
10
  "test": "echo \"Error: no test specified\" && exit 1",
11
- "postinstall": "node ./bin/safelaunch.js hook install --silent || true"
11
+ "postinstall": "node ./src/postinstall.js || true"
12
12
  },
13
13
  "keywords": [
14
14
  "deployment",
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+
3
+ const c = {
4
+ reset: "\x1b[0m", bold: "\x1b[1m",
5
+ green: "\x1b[32m", cyan: "\x1b[36m", gray: "\x1b[90m",
6
+ };
7
+ const green = (s) => `${c.green}${c.bold}${s}${c.reset}`;
8
+ const cyan = (s) => `${c.cyan}${s}${c.reset}`;
9
+ const gray = (s) => `${c.gray}${s}${c.reset}`;
10
+ const bold = (s) => `${c.bold}${s}${c.reset}`;
11
+
12
+ const box = `
13
+ ┌─────────────────────────────────────────────────┐
14
+ │ │
15
+ │ ${bold("safelaunch installed")} │
16
+ │ │
17
+ │ Run this in your project to get protected: │
18
+ │ │
19
+ │ ${cyan("npx safelaunch setup")} │
20
+ │ │
21
+ │ Scans your project and blocks bad pushes │
22
+ │ automatically before they reach production. │
23
+ │ │
24
+ └─────────────────────────────────────────────────┘
25
+ `;
26
+
27
+ process.stdout.write(box);