mirror of
https://github.com/AIsouler/GKD_subscription.git
synced 2025-12-19 00:05:19 +08:00
chore: v0.0.7
This commit is contained in:
5
dist/gkd.json
vendored
5
dist/gkd.json
vendored
@@ -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": [
|
||||||
|
|||||||
@@ -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",
|
||||||
|
|||||||
@@ -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`,
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
14
src/types.ts
14
src/types.ts
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user