@incode-sdks/incode-integrate 0.1.0 → 0.2.0

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 +1 -1
  2. package/scanner.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incode-sdks/incode-integrate",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "CLI integration auditor and fixer for adding the Incode React Native SDK to client apps.",
5
5
  "main": "agent.js",
6
6
  "bin": {
package/scanner.js CHANGED
@@ -12,7 +12,7 @@ function readJsonIfExists(filePath) {
12
12
  return content ? JSON.parse(content) : {};
13
13
  }
14
14
 
15
- function findProjectRoot(start = path.resolve(__dirname, "..")) {
15
+ function findProjectRoot(start = process.cwd()) {
16
16
  let current = start;
17
17
 
18
18
  while (current !== path.dirname(current)) {
@@ -27,7 +27,9 @@ function findProjectRoot(start = path.resolve(__dirname, "..")) {
27
27
  current = path.dirname(current);
28
28
  }
29
29
 
30
- throw new Error("Could not find a React Native app root with package.json, ios, and android.");
30
+ throw new Error(
31
+ "Could not find a React Native app root with package.json, ios, and android. Run this command from inside the client React Native app.",
32
+ );
31
33
  }
32
34
 
33
35
  function toRelative(root, filePath) {