@optima-chat/bi-cli 0.3.2 → 0.3.3
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/README.md +5 -5
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +9 -1
package/README.md
CHANGED
|
@@ -40,11 +40,11 @@ bi-cli auth logout
|
|
|
40
40
|
|
|
41
41
|
### Environment Configuration
|
|
42
42
|
|
|
43
|
-
| Environment | Auth URL
|
|
44
|
-
|
|
45
|
-
| production
|
|
46
|
-
| stage
|
|
47
|
-
| development | auth.optima.chat
|
|
43
|
+
| Environment | Auth URL | Backend URL |
|
|
44
|
+
| ----------- | --------------------- | ----------------------- |
|
|
45
|
+
| production | auth.optima.onl | bi-api.optima.onl |
|
|
46
|
+
| stage | auth.stage.optima.onl | bi-api.stage.optima.onl |
|
|
47
|
+
| development | auth.optima.chat | bi-api.optima.chat |
|
|
48
48
|
|
|
49
49
|
### Token Priority
|
|
50
50
|
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
3
6
|
import { createAuthCommand } from './commands/auth.js';
|
|
4
7
|
import { createSalesCommand } from './commands/sales.js';
|
|
5
8
|
import { createProductCommand } from './commands/product.js';
|
|
6
9
|
import { createTrendsCommand } from './commands/trends.js';
|
|
7
10
|
import { createAnalyticsCommand } from './commands/analytics.js';
|
|
11
|
+
// Read version from package.json
|
|
12
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = dirname(__filename);
|
|
14
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
8
15
|
const program = new Command();
|
|
9
16
|
program
|
|
10
17
|
.name('bi-cli')
|
|
11
18
|
.description('Optima BI CLI - AI-friendly business intelligence tool')
|
|
12
|
-
.version(
|
|
19
|
+
.version(pkg.version);
|
|
13
20
|
// Auth commands
|
|
14
21
|
program.addCommand(createAuthCommand());
|
|
15
22
|
// Sales commands
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,QAAQ,CAAC;KACd,WAAW,CAAC,wDAAwD,CAAC;KACrE,OAAO,CAAC,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC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AC;AACnD,CAAC,CAAC,CAAC;AAEL,mCAAmC;AACnC,OAAO;KACJ,OAAO,CAAC,WAAW,CAAC;KACpB,WAAW,CAAC,qBAAqB,CAAC;KAClC,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,GAAG,CAAC,oCAAoC,CAAC,CAAC;AACpD,CAAC,CAAC,CAAC;AAEL,+CAA+C;AAC/C,OAAO;KACJ,OAAO,CAAC,UAAU,CAAC;KACnB,WAAW,CAAC,iCAAiC,CAAC;KAC9C,MAAM,CAAC,GAAG,EAAE;IACX,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { Command } from 'commander';
|
|
4
|
+
import { readFileSync } from 'fs';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { dirname, join } from 'path';
|
|
4
7
|
import { createAuthCommand } from './commands/auth.js';
|
|
5
8
|
import { createSalesCommand } from './commands/sales.js';
|
|
6
9
|
import { createProductCommand } from './commands/product.js';
|
|
7
10
|
import { createTrendsCommand } from './commands/trends.js';
|
|
8
11
|
import { createAnalyticsCommand } from './commands/analytics.js';
|
|
9
12
|
|
|
13
|
+
// Read version from package.json
|
|
14
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
+
const __dirname = dirname(__filename);
|
|
16
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
17
|
+
|
|
10
18
|
const program = new Command();
|
|
11
19
|
|
|
12
20
|
program
|
|
13
21
|
.name('bi-cli')
|
|
14
22
|
.description('Optima BI CLI - AI-friendly business intelligence tool')
|
|
15
|
-
.version(
|
|
23
|
+
.version(pkg.version);
|
|
16
24
|
|
|
17
25
|
// Auth commands
|
|
18
26
|
program.addCommand(createAuthCommand());
|