mediacript 1.0.1 → 1.0.2
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/README.md +1 -1
- package/cli.mjs +6 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/cli.mjs
CHANGED
|
@@ -3,11 +3,16 @@
|
|
|
3
3
|
// Importa e executa o CLI compilado
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { dirname, join } from 'path'
|
|
6
|
+
import { pathToFileURL } from 'url'
|
|
6
7
|
|
|
7
8
|
const __filename = fileURLToPath(import.meta.url)
|
|
8
9
|
const __dirname = dirname(__filename)
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
// Converte o caminho para URL file:// (necessário no Windows)
|
|
12
|
+
const indexPath = join(__dirname, 'dist', 'index.js')
|
|
13
|
+
const indexURL = pathToFileURL(indexPath).href
|
|
14
|
+
|
|
15
|
+
import(indexURL).catch((error) => {
|
|
11
16
|
console.error('Error loading CLI:', error)
|
|
12
17
|
process.exit(1)
|
|
13
18
|
})
|