dsh-shelfry 0.4.3 → 0.4.4
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/lib/shelfry-catalog.js +5 -3
- package/package.json +1 -1
package/lib/shelfry-catalog.js
CHANGED
|
@@ -20,15 +20,17 @@ import { NPM_NAME_RE } from './sources.js';
|
|
|
20
20
|
const TYPE_TO_CATEGORY = {
|
|
21
21
|
'cordis-plugin': 'plugin',
|
|
22
22
|
skill: 'skill',
|
|
23
|
+
theme: 'theme',
|
|
23
24
|
};
|
|
24
|
-
/**
|
|
25
|
+
/** 分类的本地化标签;主题分类让插件端的主题页有内容可筛。 */
|
|
25
26
|
const CATEGORY_LABELS = {
|
|
26
27
|
plugin: { zh: '插件', en: 'Plugins' },
|
|
27
28
|
skill: { zh: '技能', en: 'Skills' },
|
|
29
|
+
theme: { zh: '主题', en: 'Themes' },
|
|
28
30
|
other: { zh: '其他', en: 'Other' },
|
|
29
31
|
};
|
|
30
|
-
/**
|
|
31
|
-
const CATEGORY_ORDER = ['plugin', 'skill', 'other'];
|
|
32
|
+
/** 分类字典的输出顺序:插件、技能、主题、其他。 */
|
|
33
|
+
const CATEGORY_ORDER = ['plugin', 'skill', 'theme', 'other'];
|
|
32
34
|
/** `i` 字段的唯一合法形态:owner/repo。 */
|
|
33
35
|
const REPO_PATH_RE = /^[A-Za-z0-9_.-]+\/[A-Za-z0-9_.-]+$/u;
|
|
34
36
|
/** 安装命令的前缀,源站与本地补全都按它拼接。 */
|