create-mn-app 0.3.8 → 0.3.9

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": "create-mn-app",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "Create Midnight Network applications with zero configuration",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -67,8 +67,10 @@ export class EnvironmentManager {
67
67
  contractName
68
68
  );
69
69
  const keysPath = path.join(contractPath, "keys");
70
- const contractModulePath = path.join(contractPath, "contract", "index.cjs");
70
+ // Check for both .js (ESM) and .cjs (CommonJS) outputs
71
+ const contractModuleJs = path.join(contractPath, "contract", "index.js");
72
+ const contractModuleCjs = path.join(contractPath, "contract", "index.cjs");
71
73
 
72
- return fs.existsSync(keysPath) && fs.existsSync(contractModulePath);
74
+ return fs.existsSync(keysPath) && (fs.existsSync(contractModuleJs) || fs.existsSync(contractModuleCjs));
73
75
  }
74
76
  }