contensis-cli 1.3.1-beta.1 → 1.3.1-beta.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/README.md +77 -5
- package/dist/commands/copy.js +2 -2
- package/dist/commands/copy.js.map +2 -2
- package/dist/commands/globalOptions.js +13 -4
- package/dist/commands/globalOptions.js.map +2 -2
- package/dist/commands/import.js +1 -1
- package/dist/commands/import.js.map +2 -2
- package/dist/commands/index.js +4 -0
- package/dist/commands/index.js.map +2 -2
- package/dist/commands/push.js +89 -0
- package/dist/commands/push.js.map +3 -3
- package/dist/commands/remove.js +13 -0
- package/dist/commands/remove.js.map +2 -2
- package/dist/commands/update.js +70 -0
- package/dist/commands/update.js.map +7 -0
- package/dist/localisation/en-GB.js +11 -1
- package/dist/localisation/en-GB.js.map +2 -2
- package/dist/models/CliService.d.js.map +1 -1
- package/dist/providers/CredentialProvider.js.map +2 -2
- package/dist/providers/SessionCacheProvider.js +18 -0
- package/dist/providers/SessionCacheProvider.js.map +2 -2
- package/dist/services/ContensisCliService.js +139 -45
- package/dist/services/ContensisCliService.js.map +3 -3
- package/dist/shell.js +21 -9
- package/dist/shell.js.map +2 -2
- package/dist/util/console.printer.js +3 -1
- package/dist/util/console.printer.js.map +2 -2
- package/dist/util/html.formatter.js +70 -0
- package/dist/util/html.formatter.js.map +7 -0
- package/dist/util/logger.js +2 -3
- package/dist/util/logger.js.map +2 -2
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/esbuild.config.js +3 -3
- package/package.json +28 -29
- package/src/commands/copy.ts +3 -1
- package/src/commands/globalOptions.ts +10 -3
- package/src/commands/import.ts +2 -0
- package/src/commands/index.ts +4 -0
- package/src/commands/push.ts +125 -1
- package/src/commands/remove.ts +20 -0
- package/src/commands/update.ts +84 -0
- package/src/localisation/en-GB.ts +16 -1
- package/src/models/CliService.d.ts +1 -1
- package/src/providers/CredentialProvider.ts +2 -2
- package/src/providers/SessionCacheProvider.ts +26 -2
- package/src/services/ContensisCliService.ts +255 -104
- package/src/shell.ts +20 -9
- package/src/util/console.printer.ts +23 -19
- package/src/util/html.formatter.ts +52 -0
- package/src/util/logger.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -49,6 +49,7 @@ var import_util = require("../util");
|
|
|
49
49
|
var import_api_ids = require("../util/api-ids");
|
|
50
50
|
var import_console = require("../util/console.printer");
|
|
51
51
|
var import_csv = require("../util/csv.formatter");
|
|
52
|
+
var import_html = require("../util/html.formatter");
|
|
52
53
|
var import_json = require("../util/json.formatter");
|
|
53
54
|
var import_xml = require("../util/xml.formatter");
|
|
54
55
|
var import_debug = require("../util/debug");
|
|
@@ -93,7 +94,7 @@ class ContensisCli {
|
|
|
93
94
|
const currentEnvironment = this.currentEnv;
|
|
94
95
|
const environments = this.cache.environments || {};
|
|
95
96
|
if (!currentEnvironment) return {};
|
|
96
|
-
else if (
|
|
97
|
+
else if (environments[currentEnvironment])
|
|
97
98
|
return environments[currentEnvironment];
|
|
98
99
|
else {
|
|
99
100
|
return {
|
|
@@ -160,7 +161,7 @@ class ContensisCli {
|
|
|
160
161
|
PrintEnvironments = async () => {
|
|
161
162
|
const { log, messages } = this;
|
|
162
163
|
const { currentEnvironment, environments = {} } = this.cache;
|
|
163
|
-
const envKeys = Object.keys(environments);
|
|
164
|
+
const envKeys = Object.keys(environments).sort();
|
|
164
165
|
log.success(messages.envs.found(envKeys.length));
|
|
165
166
|
await this.HandleFormattingAndOutput(envKeys, () => {
|
|
166
167
|
for (const env of envKeys) {
|
|
@@ -171,6 +172,30 @@ class ContensisCli {
|
|
|
171
172
|
log.help(messages.envs.tip());
|
|
172
173
|
}
|
|
173
174
|
};
|
|
175
|
+
RemoveEnvironment = async (env) => {
|
|
176
|
+
const { log, messages, session } = this;
|
|
177
|
+
const { currentEnvironment, environments = {} } = this.cache;
|
|
178
|
+
const envKeys = Object.keys(environments);
|
|
179
|
+
log.success(messages.envs.found(envKeys.length));
|
|
180
|
+
if (environments[env]) {
|
|
181
|
+
session.RemoveEnv(env);
|
|
182
|
+
const lastUserId = environments[env].lastUserId;
|
|
183
|
+
if (lastUserId) {
|
|
184
|
+
const [err, credentials] = await new import_CredentialProvider.default({
|
|
185
|
+
userId: environments[env].lastUserId,
|
|
186
|
+
alias: env
|
|
187
|
+
}).Init();
|
|
188
|
+
if (!err && credentials) await credentials.Delete();
|
|
189
|
+
}
|
|
190
|
+
log.success(messages.envs.removed(env));
|
|
191
|
+
await this.HandleFormattingAndOutput(environments[env], () => log.line());
|
|
192
|
+
} else {
|
|
193
|
+
log.warning(messages.envs.notFound(env));
|
|
194
|
+
}
|
|
195
|
+
const nextCurrentEnv = currentEnvironment === env ? void 0 : currentEnvironment;
|
|
196
|
+
if (envKeys.length === 0 || !nextCurrentEnv) log.help(messages.envs.tip());
|
|
197
|
+
return nextCurrentEnv;
|
|
198
|
+
};
|
|
174
199
|
Connect = async (environment) => {
|
|
175
200
|
var _a;
|
|
176
201
|
const { log, messages, session } = this;
|
|
@@ -237,11 +262,12 @@ class ContensisCli {
|
|
|
237
262
|
ConnectContensisImport = async ({
|
|
238
263
|
commit = false,
|
|
239
264
|
fromFile,
|
|
240
|
-
importDataType
|
|
265
|
+
importDataType,
|
|
266
|
+
importData
|
|
241
267
|
}) => {
|
|
242
268
|
var _a, _b, _c, _d, _e, _f;
|
|
243
|
-
const source = fromFile ? "file" : "contensis";
|
|
244
|
-
const fileData = fromFile ? await (0, import_file_provider.readFileAsJSON)(fromFile) || [] : [];
|
|
269
|
+
const source = fromFile || importData ? "file" : "contensis";
|
|
270
|
+
const fileData = importData || (fromFile ? await (0, import_file_provider.readFileAsJSON)(fromFile) || [] : []);
|
|
245
271
|
if (typeof fileData === "string")
|
|
246
272
|
throw new Error(`Import file format must be of type JSON`);
|
|
247
273
|
const { contensisOpts, currentEnv, env, log, messages, sourceAlias } = this;
|
|
@@ -452,7 +478,7 @@ class ContensisCli {
|
|
|
452
478
|
const contensis = await this.ConnectContensis();
|
|
453
479
|
if (contensis) {
|
|
454
480
|
const [error, token] = await (0, import_await_to_js.default)(
|
|
455
|
-
contensis.content.
|
|
481
|
+
contensis.content.source.repo.BearerToken()
|
|
456
482
|
);
|
|
457
483
|
if (token) {
|
|
458
484
|
await this.HandleFormattingAndOutput(
|
|
@@ -802,7 +828,7 @@ class ContensisCli {
|
|
|
802
828
|
const { currentEnv, log, messages } = this;
|
|
803
829
|
const contensis = await this.ConnectContensis();
|
|
804
830
|
if (contensis) {
|
|
805
|
-
const [workflowsErr, workflows] = await contensis.content.
|
|
831
|
+
const [workflowsErr, workflows] = await contensis.content.source.workflows.GetWorkflows();
|
|
806
832
|
if (Array.isArray(workflows)) {
|
|
807
833
|
log.success(messages.workflows.list(currentEnv));
|
|
808
834
|
if (!workflows.length) log.help(messages.workflows.noneExist());
|
|
@@ -854,7 +880,7 @@ class ContensisCli {
|
|
|
854
880
|
const { currentEnv, log, messages } = this;
|
|
855
881
|
const contensis = await this.ConnectContensis();
|
|
856
882
|
if (contensis) {
|
|
857
|
-
const [workflowsErr, workflows] = await contensis.content.
|
|
883
|
+
const [workflowsErr, workflows] = await contensis.content.source.workflows.GetWorkflows();
|
|
858
884
|
if (Array.isArray(workflows)) {
|
|
859
885
|
log.success(messages.workflows.list(currentEnv));
|
|
860
886
|
const workflow = (0, import_find.findByIdOrName)(workflows, workflowNameOrId);
|
|
@@ -1013,9 +1039,9 @@ class ContensisCli {
|
|
|
1013
1039
|
if (contensis) {
|
|
1014
1040
|
log.line();
|
|
1015
1041
|
if (contensis.isPreview) {
|
|
1016
|
-
|
|
1042
|
+
log.success(messages.migrate.preview());
|
|
1017
1043
|
} else {
|
|
1018
|
-
|
|
1044
|
+
log.warning(messages.migrate.commit());
|
|
1019
1045
|
}
|
|
1020
1046
|
const [migrateErr, result] = await contensis.MigrateContentModels();
|
|
1021
1047
|
if (migrateErr) (0, import_logger.logError)(migrateErr);
|
|
@@ -1180,7 +1206,7 @@ Nodes:`));
|
|
|
1180
1206
|
for (const contentType of fileData) {
|
|
1181
1207
|
contentType.projectId = currentProject;
|
|
1182
1208
|
delete contentType.uuid;
|
|
1183
|
-
const [err, , createStatus] = await contensis.models.
|
|
1209
|
+
const [err, , createStatus] = await contensis.models.targets[currentProject].repo.UpsertContentType(false, contentType);
|
|
1184
1210
|
if (err) log.error(err.message, err);
|
|
1185
1211
|
if (createStatus) {
|
|
1186
1212
|
log.success(
|
|
@@ -1330,7 +1356,7 @@ Components:`));
|
|
|
1330
1356
|
for (const component of fileData) {
|
|
1331
1357
|
component.projectId = currentProject;
|
|
1332
1358
|
delete component.uuid;
|
|
1333
|
-
const [err, , createStatus] = await contensis.models.
|
|
1359
|
+
const [err, , createStatus] = await contensis.models.targets[currentProject].repo.UpsertComponent(false, component);
|
|
1334
1360
|
if (err) log.error(err.message, err);
|
|
1335
1361
|
if (createStatus) {
|
|
1336
1362
|
log.success(
|
|
@@ -1396,20 +1422,22 @@ Components:`));
|
|
|
1396
1422
|
if (contensis) {
|
|
1397
1423
|
log.line();
|
|
1398
1424
|
const entries = await contensis.GetEntries({ withDependents });
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1425
|
+
const nodes = contensis.content.source.nodes.raw;
|
|
1426
|
+
const combinedOutput = [...entries, ...nodes];
|
|
1427
|
+
await this.HandleFormattingAndOutput(combinedOutput, () => {
|
|
1428
|
+
var _a, _b;
|
|
1429
|
+
(0, import_migratortron.logEntitiesTable)({
|
|
1430
|
+
entries,
|
|
1431
|
+
projectId: currentProject,
|
|
1432
|
+
fields: (_a = contensis.payload.query) == null ? void 0 : _a.fields
|
|
1433
|
+
});
|
|
1434
|
+
if (nodes.length)
|
|
1435
|
+
(0, import_migratortron.logEntitiesTable)({
|
|
1436
|
+
nodes,
|
|
1437
|
+
projectId: currentProject,
|
|
1438
|
+
fields: (_b = contensis.payload.query) == null ? void 0 : _b.fields
|
|
1439
|
+
});
|
|
1440
|
+
});
|
|
1413
1441
|
} else {
|
|
1414
1442
|
log.warning(messages.models.noList(currentProject));
|
|
1415
1443
|
log.help(messages.connect.tip());
|
|
@@ -1419,34 +1447,42 @@ Components:`));
|
|
|
1419
1447
|
commit,
|
|
1420
1448
|
fromFile,
|
|
1421
1449
|
logOutput,
|
|
1422
|
-
saveEntries
|
|
1450
|
+
saveEntries,
|
|
1451
|
+
data
|
|
1423
1452
|
}) => {
|
|
1424
1453
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
1425
1454
|
const { currentEnv, currentProject, log, messages } = this;
|
|
1426
1455
|
const contensis = await this.ConnectContensisImport({
|
|
1427
1456
|
commit,
|
|
1428
1457
|
fromFile,
|
|
1429
|
-
importDataType: "entries"
|
|
1458
|
+
importDataType: "entries",
|
|
1459
|
+
importData: data
|
|
1430
1460
|
});
|
|
1431
1461
|
if (contensis) {
|
|
1432
1462
|
log.line();
|
|
1433
1463
|
if (contensis.isPreview) {
|
|
1434
|
-
|
|
1464
|
+
log.success(messages.migrate.preview());
|
|
1435
1465
|
} else {
|
|
1436
|
-
|
|
1466
|
+
log.warning(messages.migrate.commit());
|
|
1437
1467
|
}
|
|
1438
1468
|
const [err, result] = await contensis.MigrateEntries();
|
|
1439
1469
|
if (err) (0, import_logger.logError)(err);
|
|
1440
1470
|
else {
|
|
1441
1471
|
const { entries, nodes } = contensis.content.targets[currentProject];
|
|
1442
|
-
const output = saveEntries ? (
|
|
1472
|
+
const output = saveEntries ? (
|
|
1473
|
+
// include entries and dependent nodes when saving entries
|
|
1474
|
+
[
|
|
1475
|
+
((_a = entries.migrate) == null ? void 0 : _a.map((me) => me.toJSON())) || [],
|
|
1476
|
+
nodes.migrateNodes.map((mn) => mn.node)
|
|
1477
|
+
].flat()
|
|
1478
|
+
) : result;
|
|
1443
1479
|
await this.HandleFormattingAndOutput(output, () => {
|
|
1444
1480
|
(0, import_console.printEntriesMigrateResult)(this, result, {
|
|
1445
1481
|
showAll: logOutput === "all",
|
|
1446
1482
|
showDiff: logOutput === "all" || logOutput === "changes",
|
|
1447
1483
|
showChanged: logOutput === "changes"
|
|
1448
1484
|
});
|
|
1449
|
-
if (["all", "changes"].includes(logOutput))
|
|
1485
|
+
if (["all", "changes"].includes(logOutput) && nodes.migrateNodes.length)
|
|
1450
1486
|
(0, import_console.printNodeTreeOutput)(
|
|
1451
1487
|
this,
|
|
1452
1488
|
{
|
|
@@ -1497,9 +1533,9 @@ Components:`));
|
|
|
1497
1533
|
if (contensis) {
|
|
1498
1534
|
log.line();
|
|
1499
1535
|
if (contensis.isPreview) {
|
|
1500
|
-
|
|
1536
|
+
log.success(messages.migrate.preview());
|
|
1501
1537
|
} else {
|
|
1502
|
-
|
|
1538
|
+
log.warning(messages.migrate.commit());
|
|
1503
1539
|
}
|
|
1504
1540
|
const [err, result] = await (0, import_await_to_js.default)(
|
|
1505
1541
|
contensis.content.copy.MigrateFieldContent()
|
|
@@ -1539,6 +1575,63 @@ Components:`));
|
|
|
1539
1575
|
log.help(messages.connect.tip());
|
|
1540
1576
|
}
|
|
1541
1577
|
};
|
|
1578
|
+
UpdateEntryField = async ({
|
|
1579
|
+
commit,
|
|
1580
|
+
fromFile,
|
|
1581
|
+
logOutput,
|
|
1582
|
+
saveEntries
|
|
1583
|
+
}) => {
|
|
1584
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1585
|
+
const { currentEnv, currentProject, log, messages } = this;
|
|
1586
|
+
const contensis = await this.ConnectContensisImport({
|
|
1587
|
+
commit,
|
|
1588
|
+
fromFile,
|
|
1589
|
+
importDataType: "entries"
|
|
1590
|
+
});
|
|
1591
|
+
if (contensis) {
|
|
1592
|
+
log.line();
|
|
1593
|
+
if (contensis.isPreview) {
|
|
1594
|
+
log.success(messages.entries.update.preview());
|
|
1595
|
+
} else {
|
|
1596
|
+
log.warning(messages.entries.update.commit());
|
|
1597
|
+
}
|
|
1598
|
+
const [err, result] = await (0, import_await_to_js.default)(
|
|
1599
|
+
contensis.content.update.UpdateFieldContent()
|
|
1600
|
+
);
|
|
1601
|
+
if (err) (0, import_logger.logError)(err);
|
|
1602
|
+
if (result) {
|
|
1603
|
+
const output = saveEntries ? (_a = contensis.content.update.targets[currentProject].entries.migrate) == null ? void 0 : _a.map((me) => me.toJSON()) : result;
|
|
1604
|
+
await this.HandleFormattingAndOutput(output, () => {
|
|
1605
|
+
(0, import_console.printEntriesMigrateResult)(this, result, {
|
|
1606
|
+
action: "update",
|
|
1607
|
+
showAll: logOutput === "all",
|
|
1608
|
+
showDiff: logOutput === "all" || logOutput === "changes",
|
|
1609
|
+
showChanged: logOutput === "changes"
|
|
1610
|
+
});
|
|
1611
|
+
});
|
|
1612
|
+
}
|
|
1613
|
+
if (result && !err && !((_b = result.errors) == null ? void 0 : _b.length) && (!commit && result.entriesToMigrate[currentProject].totalCount || commit && (((_c = result.migrateResult) == null ? void 0 : _c.created) || ((_d = result.migrateResult) == null ? void 0 : _d.updated)))) {
|
|
1614
|
+
log.success(
|
|
1615
|
+
messages.entries.update.success(
|
|
1616
|
+
currentEnv,
|
|
1617
|
+
commit,
|
|
1618
|
+
commit ? (((_e = result.migrateResult) == null ? void 0 : _e.created) || 0) + (((_f = result.migrateResult) == null ? void 0 : _f.updated) || 0) : result.entriesToMigrate[currentProject].totalCount
|
|
1619
|
+
)
|
|
1620
|
+
);
|
|
1621
|
+
if (!commit) {
|
|
1622
|
+
log.raw(``);
|
|
1623
|
+
log.help(messages.entries.commitTip());
|
|
1624
|
+
}
|
|
1625
|
+
} else {
|
|
1626
|
+
log.error(messages.entries.update.failed(currentEnv), err);
|
|
1627
|
+
if (!((_h = (_g = result == null ? void 0 : result.entriesToMigrate) == null ? void 0 : _g[currentProject]) == null ? void 0 : _h.totalCount))
|
|
1628
|
+
log.help(messages.entries.notFound(currentEnv));
|
|
1629
|
+
}
|
|
1630
|
+
} else {
|
|
1631
|
+
log.warning(messages.models.noList(currentProject));
|
|
1632
|
+
log.help(messages.connect.tip());
|
|
1633
|
+
}
|
|
1634
|
+
};
|
|
1542
1635
|
GetNodes = async (rootPath, depth = 0) => {
|
|
1543
1636
|
const { currentProject, log, messages } = this;
|
|
1544
1637
|
const contensis = await this.ConnectContensis();
|
|
@@ -1549,7 +1642,7 @@ Components:`));
|
|
|
1549
1642
|
log.error(messages.nodes.failedGet(currentProject), err);
|
|
1550
1643
|
return;
|
|
1551
1644
|
}
|
|
1552
|
-
const root = contensis.nodes.
|
|
1645
|
+
const root = contensis.nodes.source.nodes.tree;
|
|
1553
1646
|
log.success(messages.nodes.get(currentProject, rootPath, depth));
|
|
1554
1647
|
await this.HandleFormattingAndOutput(nodes, () => {
|
|
1555
1648
|
log.object({ ...root, children: void 0, language: void 0 });
|
|
@@ -1576,15 +1669,15 @@ Components:`));
|
|
|
1576
1669
|
if (contensis) {
|
|
1577
1670
|
log.line();
|
|
1578
1671
|
if (contensis.isPreview) {
|
|
1579
|
-
|
|
1672
|
+
log.success(messages.migrate.preview());
|
|
1580
1673
|
} else {
|
|
1581
|
-
|
|
1674
|
+
log.warning(messages.migrate.commit());
|
|
1582
1675
|
}
|
|
1583
1676
|
const [err, result] = await contensis.MigrateNodes();
|
|
1584
1677
|
if (err) log.raw(``);
|
|
1585
1678
|
else
|
|
1586
1679
|
await this.HandleFormattingAndOutput(result, () => {
|
|
1587
|
-
const migrateTree = contensis.nodes.
|
|
1680
|
+
const migrateTree = contensis.nodes.targets[currentProject].nodes.migrateNodesTreeView;
|
|
1588
1681
|
(0, import_console.printNodeTreeOutput)(this, migrateTree, logOutput, logLimit);
|
|
1589
1682
|
(0, import_console.printNodesMigrateResult)(this, result, {
|
|
1590
1683
|
showAll: logOutput === "all",
|
|
@@ -1642,7 +1735,7 @@ Components:`));
|
|
|
1642
1735
|
await this.HandleFormattingAndOutput(result, () => {
|
|
1643
1736
|
(0, import_console.printNodeTreeOutput)(
|
|
1644
1737
|
this,
|
|
1645
|
-
contensis.nodes.
|
|
1738
|
+
contensis.nodes.targets[currentProject].nodes.migrateNodesTreeView
|
|
1646
1739
|
);
|
|
1647
1740
|
});
|
|
1648
1741
|
}
|
|
@@ -1826,9 +1919,7 @@ Components:`));
|
|
|
1826
1919
|
console.log((0, import_json.jsonFormatter)(block));
|
|
1827
1920
|
const contensis = await this.ConnectContensis();
|
|
1828
1921
|
if (contensis) {
|
|
1829
|
-
const [err, blockVersion] = await contensis.blocks.PushBlockVersion(
|
|
1830
|
-
block
|
|
1831
|
-
);
|
|
1922
|
+
const [err, blockVersion] = await contensis.blocks.PushBlockVersion(block);
|
|
1832
1923
|
if (!err) {
|
|
1833
1924
|
log.success(
|
|
1834
1925
|
messages.blocks.pushed(
|
|
@@ -1884,9 +1975,7 @@ Components:`));
|
|
|
1884
1975
|
if (contensis) {
|
|
1885
1976
|
let actionOnBlockVersion = version;
|
|
1886
1977
|
if (action === "release" && version === "latest") {
|
|
1887
|
-
const [getErr, blockVersion2] = await this.GetLatestBlockVersion(
|
|
1888
|
-
blockId
|
|
1889
|
-
);
|
|
1978
|
+
const [getErr, blockVersion2] = await this.GetLatestBlockVersion(blockId);
|
|
1890
1979
|
if (getErr) {
|
|
1891
1980
|
throw new Error(
|
|
1892
1981
|
`${messages.blocks.noList(
|
|
@@ -2099,6 +2188,9 @@ Components:`));
|
|
|
2099
2188
|
} else if (format === "csv") {
|
|
2100
2189
|
log.raw("");
|
|
2101
2190
|
log.raw(log.infoText(await (0, import_csv.csvFormatter)((0, import_json.limitFields)(obj, fields))));
|
|
2191
|
+
} else if (format === "html") {
|
|
2192
|
+
log.raw("");
|
|
2193
|
+
log.raw(log.infoText((0, import_html.htmlFormatter)((0, import_json.limitFields)(obj, fields))));
|
|
2102
2194
|
} else if (format === "xml") {
|
|
2103
2195
|
log.raw("");
|
|
2104
2196
|
log.raw(log.infoText((0, import_xml.xmlFormatter)((0, import_json.limitFields)(obj, fields))));
|
|
@@ -2112,6 +2204,8 @@ Components:`));
|
|
|
2112
2204
|
const isText = !(0, import_util.tryParse)(obj) && typeof obj === "string";
|
|
2113
2205
|
if (format === "csv") {
|
|
2114
2206
|
writeString = await (0, import_csv.csvFormatter)((0, import_json.limitFields)(obj, fields));
|
|
2207
|
+
} else if (format === "html") {
|
|
2208
|
+
writeString = (0, import_html.htmlFormatter)((0, import_json.limitFields)(obj, fields));
|
|
2115
2209
|
} else if (format === "xml") {
|
|
2116
2210
|
writeString = (0, import_xml.xmlFormatter)((0, import_json.limitFields)(obj, fields));
|
|
2117
2211
|
} else
|