@wraps.dev/cli 2.14.7 → 2.14.8

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 CHANGED
@@ -5560,19 +5560,19 @@ import { randomBytes as randomBytes2 } from "crypto";
5560
5560
  import { existsSync as existsSync6, mkdirSync } from "fs";
5561
5561
  import { builtinModules } from "module";
5562
5562
  import { tmpdir } from "os";
5563
- import { dirname as dirname2, join as join7 } from "path";
5563
+ import { dirname as dirname3, join as join7 } from "path";
5564
5564
  import { fileURLToPath as fileURLToPath3 } from "url";
5565
5565
  import * as aws8 from "@pulumi/aws";
5566
5566
  import * as pulumi11 from "@pulumi/pulumi";
5567
5567
  import { build } from "esbuild";
5568
5568
  function getPackageRoot() {
5569
5569
  const currentFile = fileURLToPath3(import.meta.url);
5570
- let dir = dirname2(currentFile);
5571
- while (dir !== dirname2(dir)) {
5570
+ let dir = dirname3(currentFile);
5571
+ while (dir !== dirname3(dir)) {
5572
5572
  if (existsSync6(join7(dir, "package.json"))) {
5573
5573
  return dir;
5574
5574
  }
5575
- dir = dirname2(dir);
5575
+ dir = dirname3(dir);
5576
5576
  }
5577
5577
  throw new Error("Could not find package.json");
5578
5578
  }
@@ -8703,7 +8703,7 @@ var init_dynamodb_metrics = __esm({
8703
8703
  // src/cli.ts
8704
8704
  init_esm_shims();
8705
8705
  import { readFileSync as readFileSync3 } from "fs";
8706
- import { dirname as dirname3, join as join19 } from "path";
8706
+ import { dirname as dirname4, join as join19 } from "path";
8707
8707
  import { fileURLToPath as fileURLToPath5 } from "url";
8708
8708
  import * as clack50 from "@clack/prompts";
8709
8709
  import args from "args";
@@ -9902,6 +9902,7 @@ import pc10 from "picocolors";
9902
9902
  init_esm_shims();
9903
9903
  init_errors();
9904
9904
  import { exec } from "child_process";
9905
+ import { dirname as dirname2 } from "path";
9905
9906
  import { promisify } from "util";
9906
9907
  import { PulumiCommand } from "@pulumi/pulumi/automation/index.js";
9907
9908
  var execAsync = promisify(exec);
@@ -9917,7 +9918,9 @@ async function ensurePulumiInstalled() {
9917
9918
  const isInstalled = await checkPulumiInstalled();
9918
9919
  if (!isInstalled) {
9919
9920
  try {
9920
- await PulumiCommand.install();
9921
+ const cmd = await PulumiCommand.install();
9922
+ const binDir = dirname2(cmd.command);
9923
+ process.env.PATH = `${binDir}:${process.env.PATH}`;
9921
9924
  return true;
9922
9925
  } catch (_error) {
9923
9926
  throw errors.pulumiNotInstalled();
@@ -21870,7 +21873,7 @@ async function findCliNodeModules() {
21870
21873
  const paths = [];
21871
21874
  try {
21872
21875
  const { createRequire } = await import("module");
21873
- const { dirname: dirname4 } = await import("path");
21876
+ const { dirname: dirname5 } = await import("path");
21874
21877
  for (const base of [
21875
21878
  // The current file's location (works when running from source)
21876
21879
  import.meta.url,
@@ -21880,7 +21883,7 @@ async function findCliNodeModules() {
21880
21883
  try {
21881
21884
  const req = createRequire(base);
21882
21885
  const reactPkg = req.resolve("react/package.json");
21883
- const reactNodeModules = join10(dirname4(reactPkg), "..");
21886
+ const reactNodeModules = join10(dirname5(reactPkg), "..");
21884
21887
  if (existsSync9(join10(reactNodeModules, "react"))) {
21885
21888
  paths.push(reactNodeModules);
21886
21889
  break;
@@ -35746,7 +35749,7 @@ if (nodeMajorVersion < 20) {
35746
35749
  process.exit(1);
35747
35750
  }
35748
35751
  var __filename2 = fileURLToPath5(import.meta.url);
35749
- var __dirname3 = dirname3(__filename2);
35752
+ var __dirname3 = dirname4(__filename2);
35750
35753
  var packageJson = JSON.parse(
35751
35754
  readFileSync3(join19(__dirname3, "../package.json"), "utf-8")
35752
35755
  );