farseer-cli 1.0.9 → 1.0.10
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/commands/app.js +344 -316
- package/dist/commands/apps.js +83 -103
- package/dist/commands/checkout.js +156 -134
- package/dist/commands/config.js +126 -124
- package/dist/commands/diff.js +194 -169
- package/dist/commands/dimensions.js +122 -137
- package/dist/commands/files.js +77 -88
- package/dist/commands/install.js +77 -74
- package/dist/commands/list.js +74 -89
- package/dist/commands/login.js +101 -126
- package/dist/commands/logout.js +42 -57
- package/dist/commands/mcp-server.js +24 -39
- package/dist/commands/model.js +176 -184
- package/dist/commands/pull.js +276 -248
- package/dist/commands/push.js +222 -200
- package/dist/commands/run.js +322 -274
- package/dist/commands/status.js +170 -147
- package/dist/commands/variables.js +192 -168
- package/dist/commands/whoami.js +45 -61
- package/dist/index.js +115 -117
- package/dist/mcp/index.js +17 -33
- package/dist/mcp/prompts/workflows.js +146 -191
- package/dist/mcp/resources/documentation.js +149 -158
- package/dist/mcp/server.js +34 -50
- package/dist/mcp/tools/appTools.js +278 -307
- package/dist/mcp/tools/authTools.js +123 -130
- package/dist/mcp/tools/dataTools.js +271 -275
- package/dist/mcp/tools/modelTools.js +233 -265
- package/dist/mcp/tools/runTools.js +205 -199
- package/dist/mcp/tools/syncTools.js +315 -341
- package/dist/mcp/utils/helpers.js +124 -117
- package/dist/services/appSyncService.js +438 -379
- package/dist/services/configService.js +144 -154
- package/dist/services/farseerApi.js +401 -401
- package/dist/services/farseerFactory.js +274 -208
- package/dist/services/farseerService.js +488 -455
- package/dist/services/syncService.js +732 -657
- package/dist/utils/constants.js +20 -45
- package/dist/utils/helpers.js +366 -333
- package/dist/utils/logger.js +43 -74
- package/package.json +8 -1
- package/dist/commands/app.js.map +0 -7
- package/dist/commands/apps.js.map +0 -7
- package/dist/commands/checkout.js.map +0 -7
- package/dist/commands/config.js.map +0 -7
- package/dist/commands/diff.js.map +0 -7
- package/dist/commands/dimensions.js.map +0 -7
- package/dist/commands/files.js.map +0 -7
- package/dist/commands/install.js.map +0 -7
- package/dist/commands/list.js.map +0 -7
- package/dist/commands/login.js.map +0 -7
- package/dist/commands/logout.js.map +0 -7
- package/dist/commands/mcp-server.js.map +0 -7
- package/dist/commands/model.js.map +0 -7
- package/dist/commands/pull.js.map +0 -7
- package/dist/commands/push.js.map +0 -7
- package/dist/commands/run.js.map +0 -7
- package/dist/commands/status.js.map +0 -7
- package/dist/commands/variables.js.map +0 -7
- package/dist/commands/whoami.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/mcp/index.js.map +0 -7
- package/dist/mcp/prompts/workflows.js.map +0 -7
- package/dist/mcp/resources/documentation.js.map +0 -7
- package/dist/mcp/server.js.map +0 -7
- package/dist/mcp/tools/appTools.js.map +0 -7
- package/dist/mcp/tools/authTools.js.map +0 -7
- package/dist/mcp/tools/dataTools.js.map +0 -7
- package/dist/mcp/tools/modelTools.js.map +0 -7
- package/dist/mcp/tools/runTools.js.map +0 -7
- package/dist/mcp/tools/syncTools.js.map +0 -7
- package/dist/mcp/utils/helpers.js.map +0 -7
- package/dist/services/appSyncService.js.map +0 -7
- package/dist/services/configService.js.map +0 -7
- package/dist/services/farseerApi.js.map +0 -7
- package/dist/services/farseerFactory.js.map +0 -7
- package/dist/services/farseerService.js.map +0 -7
- package/dist/services/syncService.js.map +0 -7
- package/dist/utils/constants.js.map +0 -7
- package/dist/utils/helpers.js.map +0 -7
- package/dist/utils/logger.js.map +0 -7
package/dist/commands/model.js
CHANGED
|
@@ -1,189 +1,181 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var model_exports = {};
|
|
19
|
-
__export(model_exports, {
|
|
20
|
-
registerModelCommand: () => registerModelCommand
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(model_exports);
|
|
23
|
-
var import_logger = require("../utils/logger");
|
|
24
|
-
var import_farseerFactory = require("../services/farseerFactory");
|
|
25
|
-
var import_helpers = require("../utils/helpers");
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerModelCommand = registerModelCommand;
|
|
4
|
+
const logger_1 = require("../utils/logger");
|
|
5
|
+
const farseerFactory_1 = require("../services/farseerFactory");
|
|
6
|
+
const helpers_1 = require("../utils/helpers");
|
|
26
7
|
function registerModelCommand(program) {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (options.variable) {
|
|
42
|
-
const variable = model.variables.find(
|
|
43
|
-
(v) => v.name.toLowerCase() === options.variable.toLowerCase()
|
|
44
|
-
);
|
|
45
|
-
if (!variable) {
|
|
46
|
-
import_logger.logger.error(`Variable "${options.variable}" not found.`);
|
|
47
|
-
import_logger.logger.dim("Available variables:");
|
|
48
|
-
model.variables.slice(0, 10).forEach((v) => import_logger.logger.dim(` - ${v.name}`));
|
|
49
|
-
if (model.variables.length > 10) {
|
|
50
|
-
import_logger.logger.dim(` ... and ${model.variables.length - 10} more`);
|
|
51
|
-
}
|
|
52
|
-
process.exit(1);
|
|
8
|
+
program
|
|
9
|
+
.command('model [tenant]')
|
|
10
|
+
.description('Export and display the model structure (dimensions, variables)')
|
|
11
|
+
.option('--json', 'Output raw JSON')
|
|
12
|
+
.option('--tables', 'Show only dimension tables')
|
|
13
|
+
.option('--variables', 'Show only variables')
|
|
14
|
+
.option('--variable <name>', 'Show details for specific variable')
|
|
15
|
+
.option('--table <name>', 'Show details for specific dimension table')
|
|
16
|
+
.action(async (tenantArg, options) => {
|
|
17
|
+
const { organisation, tenant } = (0, helpers_1.resolveTenantWithOrgMapping)(tenantArg);
|
|
18
|
+
const result = await (0, farseerFactory_1.getFarseerClientWithFallback)(organisation, tenant);
|
|
19
|
+
if (!result) {
|
|
20
|
+
(0, farseerFactory_1.showLoginPrompt)(tenant);
|
|
21
|
+
process.exit(1);
|
|
53
22
|
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
23
|
+
const api = result.client;
|
|
24
|
+
try {
|
|
25
|
+
const model = await api.exportModel();
|
|
26
|
+
// Raw JSON output
|
|
27
|
+
if (options.json) {
|
|
28
|
+
console.log(JSON.stringify(model, null, 2));
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
// Specific variable details
|
|
32
|
+
if (options.variable) {
|
|
33
|
+
const variable = model.variables.find((v) => v.name.toLowerCase() === options.variable.toLowerCase());
|
|
34
|
+
if (!variable) {
|
|
35
|
+
logger_1.logger.error(`Variable "${options.variable}" not found.`);
|
|
36
|
+
logger_1.logger.dim('Available variables:');
|
|
37
|
+
model.variables.slice(0, 10).forEach((v) => logger_1.logger.dim(` - ${v.name}`));
|
|
38
|
+
if (model.variables.length > 10) {
|
|
39
|
+
logger_1.logger.dim(` ... and ${model.variables.length - 10} more`);
|
|
40
|
+
}
|
|
41
|
+
process.exit(1);
|
|
42
|
+
}
|
|
43
|
+
logger_1.logger.header(`Variable: ${variable.name}`);
|
|
44
|
+
console.log();
|
|
45
|
+
if (variable.description) {
|
|
46
|
+
console.log(` Description: ${variable.description}`);
|
|
47
|
+
}
|
|
48
|
+
if (variable.formula) {
|
|
49
|
+
console.log(` Formula: ${variable.formula}`);
|
|
50
|
+
}
|
|
51
|
+
console.log(` Dimensions: ${variable.tables.join(', ')}`);
|
|
52
|
+
if (variable.members.length > 0) {
|
|
53
|
+
console.log(` Specific members: ${variable.members.join(', ')}`);
|
|
54
|
+
}
|
|
55
|
+
console.log(` Roll-up type: ${variable.rollupType}`);
|
|
56
|
+
console.log(` Data type: ${variable.dataType}`);
|
|
57
|
+
if (variable.numberFormat) {
|
|
58
|
+
console.log(` Format: ${variable.numberFormat.type}${variable.numberFormat.formatString ? ` (${variable.numberFormat.formatString})` : ''}`);
|
|
59
|
+
}
|
|
60
|
+
console.log(` Readonly: ${variable.readonly}`);
|
|
61
|
+
console.log(` Calculate on demand: ${variable.calculateOnDemand}`);
|
|
62
|
+
if (variable.folderPath) {
|
|
63
|
+
console.log(` Folder: ${variable.folderPath.join(' / ')}`);
|
|
64
|
+
}
|
|
65
|
+
if (variable.cells && variable.cells.length > 0) {
|
|
66
|
+
console.log(` Cells with data: ${variable.cells.length}`);
|
|
67
|
+
}
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
// Specific table details
|
|
71
|
+
if (options.table) {
|
|
72
|
+
const table = model.tables.find((t) => t.name.toLowerCase() === options.table.toLowerCase());
|
|
73
|
+
if (!table) {
|
|
74
|
+
logger_1.logger.error(`Table "${options.table}" not found.`);
|
|
75
|
+
logger_1.logger.dim('Available tables:');
|
|
76
|
+
model.tables.slice(0, 10).forEach((t) => logger_1.logger.dim(` - ${t.name}`));
|
|
77
|
+
if (model.tables.length > 10) {
|
|
78
|
+
logger_1.logger.dim(` ... and ${model.tables.length - 10} more`);
|
|
79
|
+
}
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
logger_1.logger.header(`Dimension Table: ${table.name}`);
|
|
83
|
+
console.log();
|
|
84
|
+
console.log(` Columns:`);
|
|
85
|
+
table.columns.forEach((col, i) => {
|
|
86
|
+
let colInfo = ` ${i + 1}. ${col.type}`;
|
|
87
|
+
if (col.name)
|
|
88
|
+
colInfo += ` (${col.name})`;
|
|
89
|
+
if (col.foreignKeyTableName)
|
|
90
|
+
colInfo += ` → ${col.foreignKeyTableName}`;
|
|
91
|
+
console.log(colInfo);
|
|
92
|
+
});
|
|
93
|
+
console.log(` Members: ${table.rows.length}`);
|
|
94
|
+
if (table.folderPath) {
|
|
95
|
+
console.log(` Folder: ${table.folderPath.join(' / ')}`);
|
|
96
|
+
}
|
|
97
|
+
if (table.rows.length > 0) {
|
|
98
|
+
console.log(` Sample members:`);
|
|
99
|
+
table.rows.slice(0, 5).forEach((row) => {
|
|
100
|
+
console.log(` - ${row[0]}`);
|
|
101
|
+
});
|
|
102
|
+
if (table.rows.length > 5) {
|
|
103
|
+
console.log(` ... and ${table.rows.length - 5} more`);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
// Tables only
|
|
109
|
+
if (options.tables) {
|
|
110
|
+
logger_1.logger.header(`Dimension Tables (${model.tables.length})`);
|
|
111
|
+
console.log();
|
|
112
|
+
for (const table of model.tables) {
|
|
113
|
+
const fkColumns = table.columns.filter((c) => c.type === 'FOREIGN_KEY');
|
|
114
|
+
let info = ` 📋 ${table.name} (${table.rows.length} members)`;
|
|
115
|
+
if (fkColumns.length > 0) {
|
|
116
|
+
info += ` → ${fkColumns.map((c) => c.foreignKeyTableName).join(', ')}`;
|
|
117
|
+
}
|
|
118
|
+
console.log(info);
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
// Variables only
|
|
123
|
+
if (options.variables) {
|
|
124
|
+
logger_1.logger.header(`Variables (${model.variables.length})`);
|
|
125
|
+
console.log();
|
|
126
|
+
for (const variable of model.variables) {
|
|
127
|
+
console.log(` 📊 ${variable.name}`);
|
|
128
|
+
console.log(` Dimensions: ${variable.tables.join(', ')}`);
|
|
129
|
+
if (variable.formula) {
|
|
130
|
+
console.log(` Formula: ${variable.formula.substring(0, 50)}${variable.formula.length > 50 ? '...' : ''}`);
|
|
131
|
+
}
|
|
132
|
+
console.log();
|
|
133
|
+
}
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
// Default: summary
|
|
137
|
+
logger_1.logger.header(`Model Summary for ${tenant}`);
|
|
138
|
+
console.log();
|
|
139
|
+
console.log(` Dimension Tables: ${model.tables.length}`);
|
|
140
|
+
console.log(` Variables: ${model.variables.length}`);
|
|
141
|
+
console.log();
|
|
142
|
+
logger_1.logger.dim('Dimension Tables:');
|
|
143
|
+
model.tables.slice(0, 10).forEach((t) => {
|
|
144
|
+
logger_1.logger.dim(` - ${t.name} (${t.rows.length} members)`);
|
|
145
|
+
});
|
|
146
|
+
if (model.tables.length > 10) {
|
|
147
|
+
logger_1.logger.dim(` ... and ${model.tables.length - 10} more`);
|
|
148
|
+
}
|
|
149
|
+
console.log();
|
|
150
|
+
logger_1.logger.dim('Variables (first 10):');
|
|
151
|
+
model.variables.slice(0, 10).forEach((v) => {
|
|
152
|
+
logger_1.logger.dim(` - ${v.name} [${v.tables.join(', ')}]`);
|
|
153
|
+
});
|
|
154
|
+
if (model.variables.length > 10) {
|
|
155
|
+
logger_1.logger.dim(` ... and ${model.variables.length - 10} more`);
|
|
156
|
+
}
|
|
157
|
+
console.log();
|
|
158
|
+
logger_1.logger.dim('Use --tables, --variables, --table <name>, or --variable <name> for details.');
|
|
159
|
+
logger_1.logger.dim('Use --json for raw JSON output.');
|
|
58
160
|
}
|
|
59
|
-
|
|
60
|
-
|
|
161
|
+
catch (error) {
|
|
162
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
163
|
+
if ((0, farseerFactory_1.isAuthError)(error)) {
|
|
164
|
+
(0, farseerFactory_1.showLoginPrompt)(tenant);
|
|
165
|
+
}
|
|
166
|
+
else if (errorMessage.includes('404')) {
|
|
167
|
+
logger_1.logger.error(`Tenant "${tenant}" not found or not accessible.`);
|
|
168
|
+
logger_1.logger.dim('Check that the tenant name is correct.');
|
|
169
|
+
}
|
|
170
|
+
else if (errorMessage.includes('ENOTFOUND') || errorMessage.includes('ECONNREFUSED')) {
|
|
171
|
+
logger_1.logger.error('Failed to connect to Farseer.');
|
|
172
|
+
logger_1.logger.dim('Check your network connection.');
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
logger_1.logger.error('Failed to export model.');
|
|
176
|
+
logger_1.logger.dim(errorMessage);
|
|
177
|
+
}
|
|
178
|
+
process.exit(1);
|
|
61
179
|
}
|
|
62
|
-
|
|
63
|
-
if (variable.members.length > 0) {
|
|
64
|
-
console.log(` Specific members: ${variable.members.join(", ")}`);
|
|
65
|
-
}
|
|
66
|
-
console.log(` Roll-up type: ${variable.rollupType}`);
|
|
67
|
-
console.log(` Data type: ${variable.dataType}`);
|
|
68
|
-
if (variable.numberFormat) {
|
|
69
|
-
console.log(` Format: ${variable.numberFormat.type}${variable.numberFormat.formatString ? ` (${variable.numberFormat.formatString})` : ""}`);
|
|
70
|
-
}
|
|
71
|
-
console.log(` Readonly: ${variable.readonly}`);
|
|
72
|
-
console.log(` Calculate on demand: ${variable.calculateOnDemand}`);
|
|
73
|
-
if (variable.folderPath) {
|
|
74
|
-
console.log(` Folder: ${variable.folderPath.join(" / ")}`);
|
|
75
|
-
}
|
|
76
|
-
if (variable.cells && variable.cells.length > 0) {
|
|
77
|
-
console.log(` Cells with data: ${variable.cells.length}`);
|
|
78
|
-
}
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (options.table) {
|
|
82
|
-
const table = model.tables.find(
|
|
83
|
-
(t) => t.name.toLowerCase() === options.table.toLowerCase()
|
|
84
|
-
);
|
|
85
|
-
if (!table) {
|
|
86
|
-
import_logger.logger.error(`Table "${options.table}" not found.`);
|
|
87
|
-
import_logger.logger.dim("Available tables:");
|
|
88
|
-
model.tables.slice(0, 10).forEach((t) => import_logger.logger.dim(` - ${t.name}`));
|
|
89
|
-
if (model.tables.length > 10) {
|
|
90
|
-
import_logger.logger.dim(` ... and ${model.tables.length - 10} more`);
|
|
91
|
-
}
|
|
92
|
-
process.exit(1);
|
|
93
|
-
}
|
|
94
|
-
import_logger.logger.header(`Dimension Table: ${table.name}`);
|
|
95
|
-
console.log();
|
|
96
|
-
console.log(` Columns:`);
|
|
97
|
-
table.columns.forEach((col, i) => {
|
|
98
|
-
let colInfo = ` ${i + 1}. ${col.type}`;
|
|
99
|
-
if (col.name) colInfo += ` (${col.name})`;
|
|
100
|
-
if (col.foreignKeyTableName) colInfo += ` \u2192 ${col.foreignKeyTableName}`;
|
|
101
|
-
console.log(colInfo);
|
|
102
|
-
});
|
|
103
|
-
console.log(` Members: ${table.rows.length}`);
|
|
104
|
-
if (table.folderPath) {
|
|
105
|
-
console.log(` Folder: ${table.folderPath.join(" / ")}`);
|
|
106
|
-
}
|
|
107
|
-
if (table.rows.length > 0) {
|
|
108
|
-
console.log(` Sample members:`);
|
|
109
|
-
table.rows.slice(0, 5).forEach((row) => {
|
|
110
|
-
console.log(` - ${row[0]}`);
|
|
111
|
-
});
|
|
112
|
-
if (table.rows.length > 5) {
|
|
113
|
-
console.log(` ... and ${table.rows.length - 5} more`);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (options.tables) {
|
|
119
|
-
import_logger.logger.header(`Dimension Tables (${model.tables.length})`);
|
|
120
|
-
console.log();
|
|
121
|
-
for (const table of model.tables) {
|
|
122
|
-
const fkColumns = table.columns.filter((c) => c.type === "FOREIGN_KEY");
|
|
123
|
-
let info = ` \u{1F4CB} ${table.name} (${table.rows.length} members)`;
|
|
124
|
-
if (fkColumns.length > 0) {
|
|
125
|
-
info += ` \u2192 ${fkColumns.map((c) => c.foreignKeyTableName).join(", ")}`;
|
|
126
|
-
}
|
|
127
|
-
console.log(info);
|
|
128
|
-
}
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
131
|
-
if (options.variables) {
|
|
132
|
-
import_logger.logger.header(`Variables (${model.variables.length})`);
|
|
133
|
-
console.log();
|
|
134
|
-
for (const variable of model.variables) {
|
|
135
|
-
console.log(` \u{1F4CA} ${variable.name}`);
|
|
136
|
-
console.log(` Dimensions: ${variable.tables.join(", ")}`);
|
|
137
|
-
if (variable.formula) {
|
|
138
|
-
console.log(` Formula: ${variable.formula.substring(0, 50)}${variable.formula.length > 50 ? "..." : ""}`);
|
|
139
|
-
}
|
|
140
|
-
console.log();
|
|
141
|
-
}
|
|
142
|
-
return;
|
|
143
|
-
}
|
|
144
|
-
import_logger.logger.header(`Model Summary for ${tenant}`);
|
|
145
|
-
console.log();
|
|
146
|
-
console.log(` Dimension Tables: ${model.tables.length}`);
|
|
147
|
-
console.log(` Variables: ${model.variables.length}`);
|
|
148
|
-
console.log();
|
|
149
|
-
import_logger.logger.dim("Dimension Tables:");
|
|
150
|
-
model.tables.slice(0, 10).forEach((t) => {
|
|
151
|
-
import_logger.logger.dim(` - ${t.name} (${t.rows.length} members)`);
|
|
152
|
-
});
|
|
153
|
-
if (model.tables.length > 10) {
|
|
154
|
-
import_logger.logger.dim(` ... and ${model.tables.length - 10} more`);
|
|
155
|
-
}
|
|
156
|
-
console.log();
|
|
157
|
-
import_logger.logger.dim("Variables (first 10):");
|
|
158
|
-
model.variables.slice(0, 10).forEach((v) => {
|
|
159
|
-
import_logger.logger.dim(` - ${v.name} [${v.tables.join(", ")}]`);
|
|
160
|
-
});
|
|
161
|
-
if (model.variables.length > 10) {
|
|
162
|
-
import_logger.logger.dim(` ... and ${model.variables.length - 10} more`);
|
|
163
|
-
}
|
|
164
|
-
console.log();
|
|
165
|
-
import_logger.logger.dim("Use --tables, --variables, --table <name>, or --variable <name> for details.");
|
|
166
|
-
import_logger.logger.dim("Use --json for raw JSON output.");
|
|
167
|
-
} catch (error) {
|
|
168
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
169
|
-
if ((0, import_farseerFactory.isAuthError)(error)) {
|
|
170
|
-
(0, import_farseerFactory.showLoginPrompt)(tenant);
|
|
171
|
-
} else if (errorMessage.includes("404")) {
|
|
172
|
-
import_logger.logger.error(`Tenant "${tenant}" not found or not accessible.`);
|
|
173
|
-
import_logger.logger.dim("Check that the tenant name is correct.");
|
|
174
|
-
} else if (errorMessage.includes("ENOTFOUND") || errorMessage.includes("ECONNREFUSED")) {
|
|
175
|
-
import_logger.logger.error("Failed to connect to Farseer.");
|
|
176
|
-
import_logger.logger.dim("Check your network connection.");
|
|
177
|
-
} else {
|
|
178
|
-
import_logger.logger.error("Failed to export model.");
|
|
179
|
-
import_logger.logger.dim(errorMessage);
|
|
180
|
-
}
|
|
181
|
-
process.exit(1);
|
|
182
|
-
}
|
|
183
|
-
});
|
|
180
|
+
});
|
|
184
181
|
}
|
|
185
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
186
|
-
0 && (module.exports = {
|
|
187
|
-
registerModelCommand
|
|
188
|
-
});
|
|
189
|
-
//# sourceMappingURL=model.js.map
|