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官方订阅",
"version": 6,
"id": 0,
"name": "默认订阅",
"version": 7,
"author": "lisonge",
"supportUrl": "https://github.com/gkd-kit/subscription",
"apps": [

View File

@@ -1,7 +1,7 @@
{
"name": "@gkd-kit/subscription",
"type": "module",
"version": "0.0.6",
"version": "0.0.7",
"main": "./dist/gkd.json",
"unpkg": "./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)[] = [
`id`,
`name`,
`version`,
`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));
await writeConfig(`../dist/gkd.json`, {
name: `GKD官方订阅`,
id: 0,
name: `默认订阅`,
author: `lisonge`,
supportUrl: `https://github.com/gkd-kit/subscription`,
apps,

View File

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