routesync 1.0.44 → 1.0.45
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/dist/cli.js +3 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8361,7 +8361,8 @@ var import_path = __toESM(require("path"));
|
|
|
8361
8361
|
var import_os = __toESM(require("os"));
|
|
8362
8362
|
var LaravelRouteParser = class {
|
|
8363
8363
|
async parse(filePath, options = {}) {
|
|
8364
|
-
const
|
|
8364
|
+
const resolvedFile = import_path.default.resolve(process.cwd(), filePath);
|
|
8365
|
+
const projectRoot = import_path.default.dirname(import_path.default.dirname(resolvedFile));
|
|
8365
8366
|
const extractModels = options.extractModels ? "true" : "false";
|
|
8366
8367
|
const phpScript = `<?php
|
|
8367
8368
|
error_reporting(0);
|
|
@@ -8588,6 +8589,7 @@ echo json_encode($result);
|
|
|
8588
8589
|
const phpCmd = isWindows ? `php routesync-extractor-temp.php 2>NUL` : `php routesync-extractor-temp.php 2>/dev/null`;
|
|
8589
8590
|
const stdout = (0, import_child_process.execSync)(phpCmd, {
|
|
8590
8591
|
cwd: projectRoot,
|
|
8592
|
+
shell: isWindows ? "cmd.exe" : "/bin/sh",
|
|
8591
8593
|
encoding: "utf-8",
|
|
8592
8594
|
maxBuffer: 1024 * 1024 * 10
|
|
8593
8595
|
});
|