@pmate/cli 0.20.6 → 0.20.7
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/index.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20118,7 +20118,7 @@ var ServiceRuntimeRunner = class {
|
|
|
20118
20118
|
});
|
|
20119
20119
|
ui.title(`Logs for ${namespace}/${appName}`);
|
|
20120
20120
|
ui.info("Source", { mode: options.history ? "history" : "online" });
|
|
20121
|
-
this.renderPage(page);
|
|
20121
|
+
this.renderPage(page, { oldestFirst: Boolean(options.follow) });
|
|
20122
20122
|
if (options.follow) {
|
|
20123
20123
|
await this.followLogs(namespace, appName, {
|
|
20124
20124
|
page: options.page ?? 0,
|
|
@@ -20452,14 +20452,15 @@ var ServiceRuntimeRunner = class {
|
|
|
20452
20452
|
}
|
|
20453
20453
|
return payload.data;
|
|
20454
20454
|
}
|
|
20455
|
-
renderPage(page) {
|
|
20455
|
+
renderPage(page, options = {}) {
|
|
20456
20456
|
ui.info("Page", {
|
|
20457
20457
|
page: page.page,
|
|
20458
20458
|
totalPage: page.totalPage,
|
|
20459
20459
|
pageSize: page.pageSize,
|
|
20460
20460
|
items: page.data.length
|
|
20461
20461
|
});
|
|
20462
|
-
|
|
20462
|
+
const items = options.oldestFirst ? [...page.data].reverse() : page.data;
|
|
20463
|
+
for (const item of items) {
|
|
20463
20464
|
ui.plain(this.renderLogLine(item));
|
|
20464
20465
|
}
|
|
20465
20466
|
}
|