@orxataguy/tyr 1.3.0 → 1.4.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orxataguy/tyr",
3
- "version": "1.3.0",
3
+ "version": "1.4.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "tyr": "./bin/tyr.js"
@@ -1,7 +1,7 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import yaml from 'js-yaml';
4
- import { fileURLToPath } from 'url';
4
+ import { fileURLToPath, pathToFileURL } from 'url';
5
5
  import { homedir } from 'os';
6
6
  import { Container } from './Container';
7
7
 
@@ -172,7 +172,9 @@ export class Kernel {
172
172
  ? scriptPath
173
173
  : path.resolve(this.frameworkRoot, scriptPath);
174
174
 
175
- const module = await import(absolutePath);
175
+ // Convert to file:// URL — required by ESM on Windows for absolute paths
176
+ const moduleUrl = pathToFileURL(absolutePath).href;
177
+ const module = await import(moduleUrl);
176
178
 
177
179
  if (typeof module.default !== 'function') {
178
180
  throw new Error(`File ${scriptPath} does not export a default function.`);