@kumologica/sdk 3.6.0-beta14 → 3.6.0-beta16

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": "@kumologica/sdk",
3
- "version": "3.6.0-beta14",
3
+ "version": "3.6.0-beta16",
4
4
  "productName": "Kumologica Designer",
5
5
  "copyright": "Copyright 2020 Kumologica Pty Ltd, All Rights Reserved.",
6
6
  "author": "Kumologica Pty Ltd <contact@kumologica.com>",
@@ -83,9 +83,9 @@
83
83
  "@aws-sdk/credential-providers": "^3.556.0",
84
84
  "@aws-sdk/lib-dynamodb": "^3.549.0",
85
85
  "@electron/remote": "^2.0.8",
86
- "@kumologica/builder": "3.6.0-beta14",
87
- "@kumologica/devkit": "3.6.0-beta14",
88
- "@kumologica/runtime": "3.6.0-beta14",
86
+ "@kumologica/builder": "3.6.0-beta16",
87
+ "@kumologica/devkit": "3.6.0-beta16",
88
+ "@kumologica/runtime": "3.6.0-beta16",
89
89
  "adm-zip": "0.4.13",
90
90
  "ajv": "8.10.0",
91
91
  "archive-type": "^4.0.0",
@@ -1,10 +1,12 @@
1
1
  // check-global-install.js
2
+ const isGlobal = process.env.npm_config_global; // Detect global install
3
+ const isNpx = process.env.npm_execpath && process.env.npm_execpath.includes("npx"); // Detect NPX execution
2
4
 
3
- if (!process.env.npm_config_global) {
5
+ if (!isGlobal && !isNpx) {
4
6
  console.error(
5
7
  "\x1b[31m%s\x1b[0m",
6
- "Error: This package must be installed globally using the -g flag. \n Example: npm install -g @kumologica/sdk"
7
- );
8
+ "Error: This package must be installed globally. Use: ");
9
+ console.error(" npm install -g @kumologica/sdk");
8
10
  process.exit(1); // Exit with a failure code
9
11
  }
10
12
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  const fs = require('fs');
4
4
 
5
- fs.readFile('./fixtures/welcome.txt', 'utf8', (err, content) => {
5
+ fs.readFile('../fixtures/welcome.txt', 'utf8', (err, content) => {
6
6
  console.log(content);
7
7
  });