rook-cli 1.0.0 → 1.0.1

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/rook.js CHANGED
@@ -7,7 +7,16 @@
7
7
  * Sua única responsabilidade é inicializar a aplicação.
8
8
  */
9
9
 
10
- import 'dotenv/config';
10
+ import dotenv from 'dotenv';
11
+ import { fileURLToPath } from 'url';
12
+ import path from 'path';
13
+
14
+ // Resolve o .env relativo ao diretório do CLI (não ao cwd do usuário)
15
+ const __filename = fileURLToPath(import.meta.url);
16
+ const __dirname = path.dirname(__filename);
17
+ const cliRoot = path.resolve(__dirname, '..');
18
+ dotenv.config({ path: path.join(cliRoot, '.env') });
19
+
11
20
  import { App } from '../src/app.js';
12
21
 
13
22
  const app = new App();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rook-cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "CLI para instalar componentes Shopify de um repositório centralizado",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,7 +6,7 @@
6
6
  */
7
7
 
8
8
  /** Repositório de origem no GitHub (owner/repo) */
9
- export const GITHUB_REPO = process.env.GITHUB_REPO;
9
+ export const GITHUB_REPO = process.env.GITHUB_REPO || 'chesslabdev/rook-themes';
10
10
 
11
11
  /** URL base da API do GitHub para conteúdo do repositório */
12
12
  export const GITHUB_API_BASE = `https://api.github.com/repos/${GITHUB_REPO}/contents`;
@@ -38,3 +38,5 @@ export const REMOTE_PATHS = {
38
38
 
39
39
  /** Nome do CLI exibido nos logs */
40
40
  export const CLI_NAME = 'rook';
41
+
42
+