glooit 0.5.3 → 0.5.4

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/bin/glooit-linux CHANGED
Binary file
package/bin/glooit-macos CHANGED
Binary file
Binary file
package/dist/cli/index.js CHANGED
@@ -2856,7 +2856,23 @@ class ConfigLoader {
2856
2856
  throw new Error(`No configuration file found. Looking for: ${this.DEFAULT_CONFIG_PATHS.join(", ")}`);
2857
2857
  }
2858
2858
  try {
2859
- const configModule = await import(join4(process.cwd(), configPath));
2859
+ const fullPath = join4(process.cwd(), configPath);
2860
+ let configModule;
2861
+ if (configPath.endsWith(".ts")) {
2862
+ try {
2863
+ const { createJiti } = await import("jiti");
2864
+ const jiti = createJiti(import.meta.url);
2865
+ configModule = await jiti.import(fullPath);
2866
+ } catch (jitiError) {
2867
+ throw new Error(`Failed to load TypeScript config. Please either:
2868
+ 1. Use 'bunx glooit' instead of 'npx glooit'
2869
+ 2. Rename ${configPath} to ${configPath.replace(".ts", ".js")}
2870
+ 3. Use JavaScript config: npx glooit init --js
2871
+ Original error: ${jitiError}`);
2872
+ }
2873
+ } else {
2874
+ configModule = await import(fullPath);
2875
+ }
2860
2876
  const config = configModule.default || configModule;
2861
2877
  if (typeof config === "function") {
2862
2878
  const result = config();
@@ -3335,7 +3351,7 @@ function constructCommand(value, args) {
3335
3351
  import { execSync } from "child_process";
3336
3352
  import { createInterface } from "readline";
3337
3353
  // package.json
3338
- var version = "0.5.3";
3354
+ var version = "0.5.4";
3339
3355
 
3340
3356
  // src/cli/index.ts
3341
3357
  var args = process.argv.slice(2);