Skip to content

Commit

Permalink
feat: appExtList
Browse files Browse the repository at this point in the history
  • Loading branch information
adproqwq committed Apr 4, 2024
1 parent 64d8e13 commit de85d62
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion AppExtList.json5

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions patch.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PatchApp } from './src/types';
import { PatchApps } from './src/types';

export const PatchAppList: PatchApp = [
export const PatchAppList: PatchApps = [

];
10 changes: 6 additions & 4 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
export type Root = RawApp[];

export type PatchApp = RawPatchApp[];
export type PatchApps = RawPatchApp[];

type RawApp = {
export type LogApps = LogRawApp[];

export type RawApp = {
/**
* 应用包名
*/
Expand All @@ -19,7 +21,7 @@ type RawApp = {
hash: string;
};

type RawPatchApp = {
export type RawPatchApp = {
/**
* 应用包名
*/
Expand All @@ -31,7 +33,7 @@ type RawPatchApp = {
appName: string;
};

export interface LogRawApp {
export type LogRawApp = {
/**
* 包名
*/
Expand Down
4 changes: 2 additions & 2 deletions src/writeAppList.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createRequire } from "module";
import type { Root } from "./types";
import type { Root, RawPatchApp } from "./types";
import { RawApp } from '@gkd-kit/api';
import { PatchAppList } from '../patch';
import { getJsonArrayLength } from "./method";
Expand Down Expand Up @@ -29,7 +29,7 @@ export const writeList = async() => {

let PatchCount = getJsonArrayLength(PatchAppList);
if(PatchCount != 0){
PatchAppList.forEach((a) => {
PatchAppList.forEach((a: RawPatchApp) => {
if(id.indexOf(a.packageName) == -1){
id.push(a.packageName);
name.push(a.appName);
Expand Down

0 comments on commit de85d62

Please sign in to comment.