routesync 1.0.43 → 1.0.44
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 +4 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8358,6 +8358,7 @@ function ora(options) {
|
|
|
8358
8358
|
var import_fs_extra = __toESM(require_lib());
|
|
8359
8359
|
var import_child_process = require("child_process");
|
|
8360
8360
|
var import_path = __toESM(require("path"));
|
|
8361
|
+
var import_os = __toESM(require("os"));
|
|
8361
8362
|
var LaravelRouteParser = class {
|
|
8362
8363
|
async parse(filePath, options = {}) {
|
|
8363
8364
|
const projectRoot = import_path.default.resolve(import_path.default.dirname(filePath), "..");
|
|
@@ -8583,7 +8584,9 @@ echo json_encode($result);
|
|
|
8583
8584
|
const scriptPath = import_path.default.join(projectRoot, "routesync-extractor-temp.php");
|
|
8584
8585
|
try {
|
|
8585
8586
|
await import_fs_extra.default.writeFile(scriptPath, phpScript);
|
|
8586
|
-
const
|
|
8587
|
+
const isWindows = import_os.default.platform() === "win32";
|
|
8588
|
+
const phpCmd = isWindows ? `php routesync-extractor-temp.php 2>NUL` : `php routesync-extractor-temp.php 2>/dev/null`;
|
|
8589
|
+
const stdout = (0, import_child_process.execSync)(phpCmd, {
|
|
8587
8590
|
cwd: projectRoot,
|
|
8588
8591
|
encoding: "utf-8",
|
|
8589
8592
|
maxBuffer: 1024 * 1024 * 10
|