qubitlink_cli 1.0.0-dev.3 → 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/dist/config.js CHANGED
@@ -1,39 +1,10 @@
1
1
  import Conf from 'conf';
2
- import path from 'path';
3
- import fs from 'fs';
4
- import { fileURLToPath } from 'url';
5
- import { ENV } from './env.js';
6
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
- // Load environment variables manually to avoid verbose logging from dotenv/dotenvx
8
- const envFile = ENV === 'prod' ? '.env.production' : '.env.development';
9
- const envPath = path.resolve(process.cwd(), envFile);
10
- if (fs.existsSync(envPath)) {
11
- const envContent = fs.readFileSync(envPath, 'utf8');
12
- envContent.split('\n').forEach(line => {
13
- const [key, ...valueParts] = line.split('=');
14
- if (key && valueParts.length > 0) {
15
- const value = valueParts.join('=').trim().replace(/^["']|["']$/g, '');
16
- process.env[key.trim()] = value;
17
- }
18
- });
19
- }
20
- const CONFIGS = {
21
- dev: {
22
- webAppUrl: process.env.QUBIT_WEB_APP_URL || 'https://dev.app.qubitlink.co',
23
- apiBaseUrl: process.env.QUBIT_API_BASE_URL || 'https://dev-core.qubitlink.co/api',
24
- clientId: process.env.QUBIT_CLIENT_ID || 'ql_8a1b00a134afe05787b8c787b921cf78',
25
- },
26
- prod: {
27
- webAppUrl: process.env.QUBIT_WEB_APP_URL || 'https://app.qubitlink.co',
28
- apiBaseUrl: process.env.QUBIT_API_BASE_URL || 'https://core.qubitlink.co/api',
29
- clientId: process.env.QUBIT_CLIENT_ID || 'ql_prod_placeholder_id',
30
- }
31
- };
2
+ import { ENV, CLI_CONFIG } from './env.js';
32
3
  const persistentConfig = new Conf({ projectName: 'qubitlink-cli' });
33
4
  export function getEnv() {
34
5
  return ENV;
35
6
  }
36
7
  export function getConfig() {
37
- return CONFIGS[ENV];
8
+ return CLI_CONFIG;
38
9
  }
39
10
  export { persistentConfig as config };
package/dist/env.js CHANGED
@@ -1 +1,6 @@
1
- export const ENV = 'dev';
1
+ export const ENV = 'prod';
2
+ export const CLI_CONFIG = {
3
+ webAppUrl: 'https://app.qubitlink.co',
4
+ apiBaseUrl: 'https://core.qubitlink.co/api',
5
+ clientId: 'ql_cdefef56dcab9c1b0fbc31e3256e0cf6'
6
+ };
package/dist/index.js CHANGED
@@ -23,7 +23,7 @@ const displayHeader = () => {
23
23
  program
24
24
  .name('qubit')
25
25
  .description('QubitLink CLI - Manage your short links from the terminal')
26
- .version('1.0.0-dev.1');
26
+ .version('1.0.1');
27
27
  program.hook('preAction', (thisCommand, actionCommand) => {
28
28
  if (actionCommand.name() !== 'logout') {
29
29
  displayHeader();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qubitlink_cli",
3
- "version": "1.0.0-dev.3",
3
+ "version": "1.0.1",
4
4
  "description": "CLI tool for QubitLink",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,8 +9,8 @@
9
9
  },
10
10
  "scripts": {
11
11
  "build": "npm run build:dev",
12
- "build:dev": "node -e \"const fs = require('fs'); fs.writeFileSync('src/env.ts', 'export type QubitEnv = \\'dev\\' | \\'prod\\';\\nexport const ENV: QubitEnv = \\'dev\\';\\n')\" && tsc",
13
- "build:prod": "node -e \"const fs = require('fs'); fs.writeFileSync('src/env.ts', 'export type QubitEnv = \\'dev\\' | \\'prod\\';\\nexport const ENV: QubitEnv = \\'prod\\';\\n')\" && tsc",
12
+ "build:dev": "node scripts/build-cli.cjs dev && tsc",
13
+ "build:prod": "node scripts/build-cli.cjs prod && tsc",
14
14
  "publish:dev": "npm run build:dev && npm publish --tag dev",
15
15
  "publish:prod": "npm run build:prod && npm publish",
16
16
  "start": "node dist/index.js",