@meetploy/cli 1.11.2 → 1.11.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.
Files changed (2) hide show
  1. package/dist/index.js +8 -28
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -3998,21 +3998,11 @@ async function authCommand(options) {
3998
3998
 
3999
3999
  // src/commands/build.ts
4000
4000
  init_cli();
4001
- function detectPackageManager() {
4002
- let dir = process.cwd();
4003
- while (dir !== "/") {
4004
- if (existsSync(join(dir, "pnpm-lock.yaml"))) {
4005
- return "pnpm";
4006
- }
4007
- if (existsSync(join(dir, "yarn.lock"))) {
4008
- return "yarn";
4009
- }
4010
- if (existsSync(join(dir, "package-lock.json"))) {
4011
- return "npm";
4012
- }
4013
- dir = join(dir, "..");
4014
- }
4015
- return "npm";
4001
+ function getWranglerBinPath() {
4002
+ const wranglerMain = import.meta.resolve("wrangler");
4003
+ const wranglerMainPath = fileURLToPath(wranglerMain);
4004
+ const wranglerPackageDir = dirname(dirname(wranglerMainPath));
4005
+ return join(wranglerPackageDir, "bin", "wrangler.js");
4016
4006
  }
4017
4007
  function readExistingWranglerConfig(cwd) {
4018
4008
  const jsonPath = join(cwd, "wrangler.json");
@@ -4031,7 +4021,6 @@ function readExistingWranglerConfig(cwd) {
4031
4021
  function runWranglerBuild(entrypoint, ployConfig) {
4032
4022
  return new Promise((resolve, reject) => {
4033
4023
  const cwd = process.cwd();
4034
- const packageManager = detectPackageManager();
4035
4024
  const existingConfig = readExistingWranglerConfig(cwd);
4036
4025
  const relativeEntrypoint = relative(cwd, entrypoint);
4037
4026
  const compatibilityFlags = getCompatibilityFlags(ployConfig);
@@ -4048,18 +4037,9 @@ function runWranglerBuild(entrypoint, ployConfig) {
4048
4037
  };
4049
4038
  const tempConfigPath = join(cwd, ".wrangler-ploy-build.json");
4050
4039
  writeFileSync(tempConfigPath, JSON.stringify(wranglerConfig, null, " "));
4051
- let command2;
4052
- let args2;
4053
- if (packageManager === "npm") {
4054
- command2 = "npx";
4055
- args2 = ["wrangler", "build", "--config", tempConfigPath];
4056
- } else if (packageManager === "yarn") {
4057
- command2 = "yarn";
4058
- args2 = ["dlx", "wrangler", "build", "--config", tempConfigPath];
4059
- } else {
4060
- command2 = "pnpm";
4061
- args2 = ["exec", "wrangler", "build", "--config", tempConfigPath];
4062
- }
4040
+ const wranglerBin = getWranglerBinPath();
4041
+ const command2 = "node";
4042
+ const args2 = [wranglerBin, "build", "--config", tempConfigPath];
4063
4043
  console.log(`Running: ${command2} ${args2.join(" ")}`);
4064
4044
  const child = spawn(command2, args2, {
4065
4045
  cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meetploy/cli",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,8 +41,8 @@
41
41
  "esbuild": "^0.24.0",
42
42
  "hono": "^4.7.0",
43
43
  "openapi-fetch": "0.14.0",
44
- "workerd": "catalog:",
45
- "wrangler": "catalog:",
44
+ "workerd": "1.20260117.0",
45
+ "wrangler": "4.59.2",
46
46
  "yaml": "2.8.1"
47
47
  },
48
48
  "devDependencies": {