datai-sdk 1.1.0 → 1.1.1

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,7 +1,7 @@
1
1
  {
2
2
  "name": "datai-sdk",
3
3
  "main": "index.ts",
4
- "version": "1.1.0",
4
+ "version": "1.1.1",
5
5
  "description": "Datai SDK which has useful libraries to help building projections",
6
6
  "scripts": {
7
7
  "postinstall": "node postinstall-script.js"
@@ -9,9 +9,11 @@ const destinationFolder = path.resolve(
9
9
  );
10
10
 
11
11
  // Check if the source folder exists
12
+ // If it doesn't exist, the script was likely already run or this is an npm install
13
+ // In either case, we can safely exit without error
12
14
  if (!fs.existsSync(sourceFolder)) {
13
- console.error(`Source folder "${sourceFolder}" does not exist.`);
14
- process.exit(1);
15
+ console.log(`Source folder "${sourceFolder}" does not exist. Skipping postinstall (already configured or installed from npm).`);
16
+ process.exit(0);
15
17
  }
16
18
 
17
19
  // Create node_modules folder if it doesn't exist