mirror of
				https://github.com/nonebot/nonebot2.git
				synced 2025-11-04 00:46:43 +00:00 
			
		
		
		
	📝 Update changelog
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 6m39s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 4m44s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 5m2s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 4m31s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 5m1s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 2m23s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 4m30s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 4m19s
				
			
		
			
				
	
				Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 4m33s
				
			
		
			
				
	
				Ruff Lint / Ruff Lint (push) Successful in 25s
				
			
		
			
				
	
				Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 4m47s
				
			
		
			
				
	
				Site Deploy / publish (push) Failing after 4m9s
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Has been cancelled
				
			
		
			
				
	
				Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Has been cancelled
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.10) (push) Failing after 6m39s
				
			Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.11) (push) Failing after 4m44s
				
			Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.12) (push) Failing after 5m2s
				
			Code Coverage / Test Coverage (pydantic-v1, ubuntu-latest, 3.9) (push) Failing after 4m31s
				
			Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.10) (push) Failing after 5m1s
				
			Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.11) (push) Failing after 2m23s
				
			Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.12) (push) Failing after 4m30s
				
			Code Coverage / Test Coverage (pydantic-v2, ubuntu-latest, 3.9) (push) Failing after 4m19s
				
			Pyright Lint / Pyright Lint (pydantic-v1) (push) Failing after 4m33s
				
			Ruff Lint / Ruff Lint (push) Successful in 25s
				
			Pyright Lint / Pyright Lint (pydantic-v2) (push) Failing after 4m47s
				
			Site Deploy / publish (push) Failing after 4m9s
				
			Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.10) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.11) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.12) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, macos-latest, 3.9) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.10) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.11) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.12) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v1, windows-latest, 3.9) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.10) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.11) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.12) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, macos-latest, 3.9) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.10) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.11) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.12) (push) Has been cancelled
				
			Code Coverage / Test Coverage (pydantic-v2, windows-latest, 3.9) (push) Has been cancelled
				
			This commit is contained in:
		@@ -17,6 +17,7 @@ toc_max_heading_level: 2
 | 
			
		||||
 | 
			
		||||
### 📝 文档
 | 
			
		||||
 | 
			
		||||
- Docs: 商店头像 skeleton [@StarHeartHunt](https://github.com/StarHeartHunt) ([#3362](https://github.com/nonebot/nonebot2/pull/3362))
 | 
			
		||||
- Docs: 添加 localstore `use_cwd` 配置项文档 [@yanyongyu](https://github.com/yanyongyu) ([#3345](https://github.com/nonebot/nonebot2/pull/3345))
 | 
			
		||||
- Docs: 商店插件可用性筛选 \& 更新排序 [@StarHeartHunt](https://github.com/StarHeartHunt) ([#3334](https://github.com/nonebot/nonebot2/pull/3334))
 | 
			
		||||
- Docs: 添加 微信公众平台 适配器描述 [@YangRucheng](https://github.com/YangRucheng) ([#3264](https://github.com/nonebot/nonebot2/pull/3264))
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,6 @@ import clsx from "clsx";
 | 
			
		||||
 | 
			
		||||
import "./styles.css";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import type { Resource } from "@/libs/store";
 | 
			
		||||
import { fetchRegistryData } from "@/libs/store";
 | 
			
		||||
 | 
			
		||||
@@ -64,9 +63,10 @@ export function Form({
 | 
			
		||||
    const currentStepNames = formItems[currentStep].items.map(
 | 
			
		||||
      (item) => item.name
 | 
			
		||||
    );
 | 
			
		||||
    if (currentStepNames.every((name) => result[name]))
 | 
			
		||||
      {setCurrentStep(currentStep + 1);}
 | 
			
		||||
    else {}
 | 
			
		||||
    if (currentStepNames.every((name) => result[name])) {
 | 
			
		||||
      setCurrentStep(currentStep + 1);
 | 
			
		||||
    } else {
 | 
			
		||||
    }
 | 
			
		||||
  };
 | 
			
		||||
  const onPrev = () => currentStep > 0 && setCurrentStep(currentStep - 1);
 | 
			
		||||
  const onNext = () =>
 | 
			
		||||
 
 | 
			
		||||
@@ -55,7 +55,7 @@ function MessageBox({
 | 
			
		||||
        dangerouslySetInnerHTML={{
 | 
			
		||||
          __html: msg.replace(/\n/g, "<br/>").replace(/ /g, " "),
 | 
			
		||||
        }}
 | 
			
		||||
       />
 | 
			
		||||
      />
 | 
			
		||||
    </div>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,6 @@ import { pickTextColor } from "@/libs/color";
 | 
			
		||||
 | 
			
		||||
import type { Tag } from "@/types/tag";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
import "./styles.css";
 | 
			
		||||
 | 
			
		||||
export type Props = Tag & {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,12 @@ import type { IconName } from "@fortawesome/fontawesome-common-types";
 | 
			
		||||
export const getValidStatus = (resource: Resource) => {
 | 
			
		||||
  switch (resource.resourceType) {
 | 
			
		||||
    case "plugin":
 | 
			
		||||
      if (resource.skip_test) {return ValidStatus.SKIP;}
 | 
			
		||||
      if (resource.valid) {return ValidStatus.VALID;}
 | 
			
		||||
      if (resource.skip_test) {
 | 
			
		||||
        return ValidStatus.SKIP;
 | 
			
		||||
      }
 | 
			
		||||
      if (resource.valid) {
 | 
			
		||||
        return ValidStatus.VALID;
 | 
			
		||||
      }
 | 
			
		||||
      return ValidStatus.INVALID;
 | 
			
		||||
    default:
 | 
			
		||||
      return ValidStatus.MISSING;
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@ import { ValidStatus } from "./valid";
 | 
			
		||||
 | 
			
		||||
import type { Resource } from "./store";
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
export type Filter<T extends Resource = Resource> = {
 | 
			
		||||
  type: string;
 | 
			
		||||
  id: string;
 | 
			
		||||
@@ -104,7 +103,9 @@ export const queryFilter = <T extends Resource = Resource>(
 | 
			
		||||
  id: `query-${query}`,
 | 
			
		||||
  displayName: query,
 | 
			
		||||
  filter: (resource: Resource): boolean => {
 | 
			
		||||
    if (!query) {return true;}
 | 
			
		||||
    if (!query) {
 | 
			
		||||
      return true;
 | 
			
		||||
    }
 | 
			
		||||
    const queryLower = query.toLowerCase();
 | 
			
		||||
    const pluginMatch =
 | 
			
		||||
      resource.resourceType === "plugin" &&
 | 
			
		||||
@@ -143,7 +144,9 @@ export function useFilteredResources<T extends Resource>(
 | 
			
		||||
 | 
			
		||||
  const addFilter = useCallback(
 | 
			
		||||
    (filter: Filter<T>) => {
 | 
			
		||||
      if (filters.some((f) => f.id === filter.id)) {return;}
 | 
			
		||||
      if (filters.some((f) => f.id === filter.id)) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      setFilters((filters) => [...filters, filter]);
 | 
			
		||||
    },
 | 
			
		||||
    [filters, setFilters]
 | 
			
		||||
 
 | 
			
		||||
@@ -43,7 +43,9 @@ export function useSearchControl<T extends Resource>(
 | 
			
		||||
 | 
			
		||||
      const newFilter = queryFilter<T>(newQuery);
 | 
			
		||||
      // do nothing if filter is not changed
 | 
			
		||||
      if (currentFilter?.id === newFilter.id) {return;}
 | 
			
		||||
      if (currentFilter?.id === newFilter.id) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      // remove old currentFilter
 | 
			
		||||
      currentFilter && removeFilter(currentFilter);
 | 
			
		||||
 
 | 
			
		||||
@@ -30,10 +30,11 @@ export async function fetchRegistryData<T extends RegistryDataType>(
 | 
			
		||||
  ).catch((e) => {
 | 
			
		||||
    throw new Error(`Failed to fetch ${dataType}s: ${e}`);
 | 
			
		||||
  });
 | 
			
		||||
  if (!resp.ok)
 | 
			
		||||
    {throw new Error(
 | 
			
		||||
  if (!resp.ok) {
 | 
			
		||||
    throw new Error(
 | 
			
		||||
      `Failed to fetch ${dataType}s: ${resp.status} ${resp.statusText}`
 | 
			
		||||
    );}
 | 
			
		||||
    );
 | 
			
		||||
  }
 | 
			
		||||
  const data = (await resp.json()) as RegistryDataResponseTypes[T];
 | 
			
		||||
  return data.map(
 | 
			
		||||
    (resource) => ({ ...resource, resourceType: dataType }) as ResourceTypes[T]
 | 
			
		||||
 
 | 
			
		||||
@@ -76,7 +76,9 @@ export function useToolbar<T extends Resource = Resource>({
 | 
			
		||||
    choices: Object.keys(validateStatusFilterMapping),
 | 
			
		||||
    onSubmit: (type: string) => {
 | 
			
		||||
      const validStatus = validateStatusFilterMapping[type];
 | 
			
		||||
      if (!validStatus) {return;}
 | 
			
		||||
      if (!validStatus) {
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
      addFilter(validStatusFilter(validStatus));
 | 
			
		||||
    },
 | 
			
		||||
  };
 | 
			
		||||
 
 | 
			
		||||
@@ -1,2 +1,3 @@
 | 
			
		||||
if (location.search.includes("?uwu"))
 | 
			
		||||
  {document.documentElement.setAttribute("data-uwu", "true");}
 | 
			
		||||
if (location.search.includes("?uwu")) {
 | 
			
		||||
  document.documentElement.setAttribute("data-uwu", "true");
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,7 +11,9 @@ function excludeThemeColor(
 | 
			
		||||
): { [key: string]: string } {
 | 
			
		||||
  const newObj: { [key: string]: string } = {};
 | 
			
		||||
  for (const key in theme) {
 | 
			
		||||
    if (exclude.includes(key)) {continue;}
 | 
			
		||||
    if (exclude.includes(key)) {
 | 
			
		||||
      continue;
 | 
			
		||||
    }
 | 
			
		||||
    newObj[key] = theme[key]!;
 | 
			
		||||
  }
 | 
			
		||||
  return newObj;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user