create-remix-game 1.2.1 → 1.2.2

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/auth.js CHANGED
@@ -4,6 +4,7 @@ import fs from 'fs';
4
4
  import os from 'os';
5
5
  import path from 'path';
6
6
  import prompts from 'prompts';
7
+ import { pathToFileURL } from 'url';
7
8
  export async function auth() {
8
9
  console.log(chalk.bold('\nšŸ”‘ Remix API Key Setup\n'));
9
10
  // 1. Check if already configured
@@ -74,8 +75,8 @@ export async function auth() {
74
75
  console.log(chalk.cyan(`export REMIX_API_KEY="${apiKey}"`));
75
76
  }
76
77
  }
77
- // If run directly
78
- if (import.meta.url === `file://${process.argv[1]}`) {
78
+ // If run directly (use pathToFileURL for Windows compatibility)
79
+ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
79
80
  auth().catch((error) => {
80
81
  console.error(chalk.red('Error:'), error);
81
82
  process.exit(1);
package/dist/link.js CHANGED
@@ -3,6 +3,7 @@ import chalk from 'chalk';
3
3
  import fs from 'fs';
4
4
  import path from 'path';
5
5
  import prompts from 'prompts';
6
+ import { pathToFileURL } from 'url';
6
7
  export async function link() {
7
8
  console.log(chalk.bold('\nšŸ”— Remix Game Linking\n'));
8
9
  // 1. Find remix.config.js or remix.config.ts
@@ -17,8 +18,8 @@ export async function link() {
17
18
  // 2. Read current config
18
19
  let currentConfig;
19
20
  try {
20
- // Dynamic import to read TypeScript config
21
- const configModule = await import(`file://${configPath}`);
21
+ // Dynamic import to read TypeScript config (use pathToFileURL for Windows compatibility)
22
+ const configModule = await import(pathToFileURL(configPath).href);
22
23
  currentConfig = configModule.default;
23
24
  }
24
25
  catch (error) {
@@ -101,8 +102,8 @@ export async function link() {
101
102
  process.exit(1);
102
103
  }
103
104
  }
104
- // If run directly
105
- if (import.meta.url === `file://${process.argv[1]}`) {
105
+ // If run directly (use pathToFileURL for Windows compatibility)
106
+ if (import.meta.url === pathToFileURL(process.argv[1]).href) {
106
107
  link().catch((error) => {
107
108
  console.error(chalk.red('Error:'), error);
108
109
  process.exit(1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-remix-game",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "CLI for scaffolding Remix games",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",