forge-sql-orm 1.0.12 → 1.0.15

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.
@@ -10,9 +10,6 @@ const args = process.argv.slice(2).join(" ");
10
10
  // Resolve the path to cli.ts (your TypeScript entry file)
11
11
  const cliPath = path.resolve(__dirname, "cli.js");
12
12
 
13
- // Detect platform-specific `ts-node` binary paths
14
- const localTsNode = path.resolve(__dirname, "../node_modules/.bin/ts-node") + (os.platform() === "win32" ? ".cmd" : "");
15
-
16
13
  // Function to run a command
17
14
  const runCommand = (cmd) => {
18
15
  try {
@@ -36,15 +33,9 @@ const isGlobalTsNodeInstalled = (() => {
36
33
 
37
34
  if (isGlobalTsNodeInstalled) {
38
35
  console.log("✅ Using global ts-node");
39
- runCommand(`ts-node ${cliPath} ${args}`);
40
- }
41
-
42
- // **2. If not, check for local ts-node**
43
- if (fs.existsSync(localTsNode)) {
44
- console.log("✅ Using local ts-node");
45
- runCommand(`"${localTsNode}" ${cliPath} ${args}`);
36
+ runCommand(`node -r ts-node/register ${cliPath} ${args}`);
46
37
  }
47
38
 
48
- // **3. If neither found, fallback to npx**
39
+ // **3. fallback to npx**
49
40
  console.warn("⚠️ Neither global nor local ts-node found, using npx...");
50
- runCommand(`npx ts-node ${cliPath} ${args}`);
41
+ runCommand(`npx node -r ts-node/register ${cliPath} ${args}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "forge-sql-orm",
3
- "version": "1.0.12",
3
+ "version": "1.0.15",
4
4
  "description": "Mikro-ORM integration for Forge-SQL in Atlassian Forge applications.",
5
5
  "main": "dist/ForgeSQLORM.js",
6
6
  "module": "dist/ForgeSQLORM.mjs",