chore: v0.0.7

This commit is contained in:
lisonge
2023-08-21 15:54:32 +08:00
parent b8d9f5a23a
commit 78905817c4
5 changed files with 17 additions and 8 deletions

5
dist/gkd.json vendored
View File

@@ -1,6 +1,7 @@
{ {
"name": "GKD官方订阅", "id": 0,
"version": 6, "name": "默认订阅",
"version": 7,
"author": "lisonge", "author": "lisonge",
"supportUrl": "https://github.com/gkd-kit/subscription", "supportUrl": "https://github.com/gkd-kit/subscription",
"apps": [ "apps": [

View File

@@ -1,7 +1,7 @@
{ {
"name": "@gkd-kit/subscription", "name": "@gkd-kit/subscription",
"type": "module", "type": "module",
"version": "0.0.6", "version": "0.0.7",
"main": "./dist/gkd.json", "main": "./dist/gkd.json",
"unpkg": "./dist/gkd.json", "unpkg": "./dist/gkd.json",
"jsdelivr": "./dist/gkd.json", "jsdelivr": "./dist/gkd.json",

View File

@@ -78,6 +78,7 @@ export const writeConfig = async (fp: string, config: SubscriptionConfig) => {
}); });
const sortKeys: (keyof SubscriptionConfig)[] = [ const sortKeys: (keyof SubscriptionConfig)[] = [
`id`,
`name`, `name`,
`version`, `version`,
`author`, `author`,

View File

@@ -12,7 +12,8 @@ for await (const tsFp of walk(relativePath('./apps'))) {
apps.sort((a, b) => (a.id > b.id ? 1 : -1)); apps.sort((a, b) => (a.id > b.id ? 1 : -1));
await writeConfig(`../dist/gkd.json`, { await writeConfig(`../dist/gkd.json`, {
name: `GKD官方订阅`, id: 0,
name: `默认订阅`,
author: `lisonge`, author: `lisonge`,
supportUrl: `https://github.com/gkd-kit/subscription`, supportUrl: `https://github.com/gkd-kit/subscription`,
apps, apps,

View File

@@ -56,20 +56,26 @@ type RuleConfig = {
} & CommonProps; } & CommonProps;
export type SubscriptionConfig = { export type SubscriptionConfig = {
name?: string; /**
* 当前订阅文件的标识, 如果新旧订阅文件id不一致则更新失败\
* 范围: `[-Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER]`\
* 建议值: `new Date().getTime()`
*/
id: number;
name: string;
version?: number; version?: number;
author?: string; author: string;
/** /**
* https url * https url
* android file path * android file path
*/ */
updateUrl?: string; updateUrl?: string;
/** /**
* https url * https url\
* android schema url, qq group * android schema url, qq group
*/ */
supportUrl?: string; supportUrl?: string;
apps?: AppConfig[]; apps: AppConfig[];
}; };
export const defineSubsConfig = (config: SubscriptionConfig) => { export const defineSubsConfig = (config: SubscriptionConfig) => {