@solcreek/dew 0.4.6 → 0.4.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solcreek/dew",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "Ultra-lightweight VM + deploy tool. One Go binary for local dev and production.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -44,6 +44,31 @@ if (!existsSync(binary)) {
44
44
  }
45
45
  }
46
46
 
47
+ // Show how to invoke dew based on how the user installed the package.
48
+ // npx → `npx @solcreek/dew ...` (the binary is in a per-run cache)
49
+ // local → `npx dew ...` or `./node_modules/.bin/dew ...`
50
+ // global → `dew ...` (on PATH)
51
+ //
52
+ // We can't reliably detect "is this a global install" from inside
53
+ // postinstall, so we surface all three forms once.
54
+ function printInvocationHint() {
55
+ // Skip in CI / non-interactive shells unless DEW_INSTALL_HINT is set
56
+ if (process.env.CI && !process.env.DEW_INSTALL_HINT) return;
57
+
58
+ const npmConfig = process.env.npm_config_global === "true";
59
+ console.log("");
60
+ if (npmConfig) {
61
+ console.log("dew: installed globally — run `dew --help` from any terminal.");
62
+ } else {
63
+ console.log("dew: installed locally. Choose how to invoke:");
64
+ console.log(" • One-off: npx @solcreek/dew --help");
65
+ console.log(" • Local pkg: npx dew --help (inside this project)");
66
+ console.log(" • Global: npm i -g @solcreek/dew → then `dew --help`");
67
+ }
68
+ console.log("");
69
+ }
70
+ printInvocationHint();
71
+
47
72
  // macOS: codesign with virtualization entitlement
48
73
  if (os.platform() === "darwin" && existsSync(binary) && !binary.endsWith(".exe")) {
49
74
  const entitlements = path.join(__dirname, "entitlements.plist");