@ha-bits/cortex 1.0.2 → 1.0.3

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": "@ha-bits/cortex",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Cortex - Habits Workflow Executor CLI",
5
5
  "main": "./server/main.cjs",
6
6
  "bin": {
package/server/main.cjs CHANGED
@@ -308,9 +308,17 @@ async function installNpmModule(moduleDefinition, targetDir) {
308
308
  installedPackagePath = path2.join(tempDir, "node_modules", packageName);
309
309
  }
310
310
  if (fs.existsSync(installedPackagePath)) {
311
+ const parentDir = path2.dirname(modulePath);
312
+ if (!fs.existsSync(parentDir)) {
313
+ fs.mkdirSync(parentDir, { recursive: true });
314
+ }
311
315
  fs.renameSync(installedPackagePath, modulePath);
312
316
  } else {
313
317
  const nodeModulesPath = path2.join(tempDir, "node_modules");
318
+ const parentDir = path2.dirname(modulePath);
319
+ if (!fs.existsSync(parentDir)) {
320
+ fs.mkdirSync(parentDir, { recursive: true });
321
+ }
314
322
  if (packageName.startsWith("@")) {
315
323
  const [scope] = packageName.split("/");
316
324
  const scopedDir = path2.join(nodeModulesPath, scope);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ha-bits/cortex",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Cortex - Habits Workflow Executor CLI",
5
5
  "main": "./server/main.cjs",
6
6
  "bin": {