tsoft-cli 3.7.0 → 3.7.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/CHANGELOG.md +6 -0
- package/package.json +2 -1
- package/src/commands/theme-dev.js +23 -3
- package/src/commands/theme.js +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to T-Soft CLI will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.7.1] - 2026-04-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- Theme list in `tsoft theme dev` now paginates — previously only the first page was fetched, hiding themes on large stores
|
|
12
|
+
- Node 25+ compatibility — added `main` entry in `package.json`
|
|
13
|
+
|
|
8
14
|
## [3.7.0] - 2026-04-15
|
|
9
15
|
|
|
10
16
|
### Added
|
package/package.json
CHANGED
|
@@ -10,10 +10,30 @@ import {normalizeStoreDomain, slugify, setActiveTheme, getActiveTheme, getActive
|
|
|
10
10
|
import {brandedConfirm, brandedSelect, showWarning, showError, showInfo} from '../ui/prompt-wrapper.js';
|
|
11
11
|
import { t } from '../i18n.js';
|
|
12
12
|
|
|
13
|
-
async function
|
|
13
|
+
async function fetchAllThemes() {
|
|
14
14
|
const apiClient = await createApiClient();
|
|
15
|
-
const
|
|
16
|
-
|
|
15
|
+
const all = [];
|
|
16
|
+
let page = 1;
|
|
17
|
+
|
|
18
|
+
// Server ignores per_page; we walk every page until last_page is reached.
|
|
19
|
+
// Hard cap at 20 pages to avoid accidental infinite loops.
|
|
20
|
+
for (let i = 0; i < 20; i++) {
|
|
21
|
+
const response = await apiClient.get(`/theme?per_page=500&page=${page}`);
|
|
22
|
+
const batch = response.data || [];
|
|
23
|
+
all.push(...batch);
|
|
24
|
+
|
|
25
|
+
// Laravel paginator puts last_page at the top level (not under meta).
|
|
26
|
+
// Some envelopes wrap it under meta — support both.
|
|
27
|
+
const lastPage = response.last_page ?? response.meta?.last_page ?? 1;
|
|
28
|
+
if (page >= lastPage || batch.length === 0) break;
|
|
29
|
+
page++;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return all;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function getThemeUuid(themeSlug) {
|
|
36
|
+
const themes = await fetchAllThemes();
|
|
17
37
|
|
|
18
38
|
const theme = themes.find(t => slugify(t.name) === themeSlug);
|
|
19
39
|
|
package/src/commands/theme.js
CHANGED
|
@@ -127,7 +127,8 @@ export async function themeCreateCommand() {
|
|
|
127
127
|
description: description.trim() || null,
|
|
128
128
|
active: 0,
|
|
129
129
|
hidden: 0,
|
|
130
|
-
forceUpdate: false
|
|
130
|
+
forceUpdate: false,
|
|
131
|
+
minimal: minimal,
|
|
131
132
|
};
|
|
132
133
|
|
|
133
134
|
console.log(chalk.yellow(t('theme.saving_db')));
|