@geekmidas/cli 1.10.22 → 1.10.23

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @geekmidas/cli
2
2
 
3
+ ## 1.10.23
4
+
5
+ ### Patch Changes
6
+
7
+ - 🐛 [`61ae404`](https://github.com/geekmidas/toolbox/commit/61ae404061a1061c4a724d0f187764475903b625) Thanks [@geekmidas](https://github.com/geekmidas)! - Fix tsx import
8
+
3
9
  ## 1.10.22
4
10
 
5
11
  ### Patch Changes
package/bin/gkm.mjs CHANGED
@@ -9,15 +9,24 @@ import { pathToFileURL } from 'node:url';
9
9
  const nodeOptions = process.env.NODE_OPTIONS || '';
10
10
  if (
11
11
  !nodeOptions.includes('--import tsx') &&
12
- !nodeOptions.includes('--import=tsx')
12
+ !nodeOptions.includes('--import=tsx') &&
13
+ !nodeOptions.includes('--import file:') &&
14
+ !nodeOptions.includes('--import=file:')
13
15
  ) {
16
+ // Resolve tsx from the CLI package's own node_modules, not the cwd.
17
+ // This ensures it works when the CLI is run via `pnpm dlx` in a
18
+ // directory that doesn't have tsx installed.
19
+ const { createRequire } = await import('node:module');
20
+ const require = createRequire(import.meta.url);
21
+ const tsxPath = pathToFileURL(require.resolve('tsx')).href;
22
+
14
23
  const { execFileSync } = await import('node:child_process');
15
24
  try {
16
25
  execFileSync(process.execPath, process.argv.slice(1), {
17
26
  stdio: 'inherit',
18
27
  env: {
19
28
  ...process.env,
20
- NODE_OPTIONS: `${nodeOptions} --import tsx`.trim(),
29
+ NODE_OPTIONS: `${nodeOptions} --import ${tsxPath}`.trim(),
21
30
  },
22
31
  });
23
32
  } catch (e) {
package/dist/index.cjs CHANGED
@@ -35,7 +35,7 @@ const prompts = require_chunk.__toESM(require("prompts"));
35
35
 
36
36
  //#region package.json
37
37
  var name = "@geekmidas/cli";
38
- var version = "1.10.21";
38
+ var version = "1.10.22";
39
39
  var description = "CLI tools for building Lambda handlers, server applications, and generating OpenAPI specs";
40
40
  var private$1 = false;
41
41
  var type = "module";
@@ -6845,9 +6845,9 @@ const GEEKMIDAS_VERSIONS = {
6845
6845
  "@geekmidas/audit": "~2.0.0",
6846
6846
  "@geekmidas/auth": "~2.0.0",
6847
6847
  "@geekmidas/cache": "~1.1.0",
6848
- "@geekmidas/client": "~4.0.1",
6848
+ "@geekmidas/client": "~4.0.4",
6849
6849
  "@geekmidas/cloud": "~1.0.0",
6850
- "@geekmidas/constructs": "~3.0.3",
6850
+ "@geekmidas/constructs": "~3.0.5",
6851
6851
  "@geekmidas/db": "~1.0.1",
6852
6852
  "@geekmidas/emailkit": "~1.0.0",
6853
6853
  "@geekmidas/envkit": "~1.0.4",