@ruan-cat/utils 1.3.5 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { OptionalKeysOf } from 'type-fest';
2
2
  import { Options } from 'unplugin-vue-router';
3
3
  import { RequiredPick } from 'type-plus';
4
- import { AxiosResponse, AxiosRequestConfig, AxiosInstance } from 'axios';
4
+ import { AxiosRequestConfig, AxiosResponse, AxiosInstance } from 'axios';
5
5
  import { UseAxiosOptions, UseAxiosReturn } from '@vueuse/integrations/useAxios';
6
6
  export { UseAxiosOptions } from '@vueuse/integrations/useAxios';
7
7
 
@@ -285,6 +285,27 @@ D = any> {
285
285
  */
286
286
  declare function useAxiosWrapper<T, K extends KeyAxiosRequestConfig, D = any>(params: UseAxiosWrapperParams): StrictUseAxiosReturn<T, K, AxiosResponse<T, any>, D> & Promise<StrictUseAxiosReturn<T, K, AxiosResponse<T, any>, D>>;
287
287
 
288
+ /** 包的信息 */
289
+ interface PackageInfo {
290
+ /** 包名 */
291
+ name: string;
292
+ /** 包的描述 */
293
+ description: string;
294
+ /** 带有包名的官方镜像源地址 */
295
+ url: `https://npm.im/${string}`;
296
+ }
297
+ /**
298
+ * 获得阮喵喵全部的包信息
299
+ * @description
300
+ * 这是一个node环境下的函数,用于获取阮喵喵的所有包的信息。
301
+ *
302
+ * 使用的是node的child_process模块,调用pnpm命令获取包信息。
303
+ *
304
+ * - 默认仅考虑pnpm包
305
+ * - 在node环境下运行
306
+ */
307
+ declare function getRuanCatPkgInfo(): Promise<PackageInfo[]>;
308
+
288
309
  /**
289
310
  * pnpm-workspace.yaml 文件的类型声明
290
311
  * @description
@@ -307,4 +328,4 @@ interface PnpmWorkspace {
307
328
  catalog?: string[];
308
329
  }
309
330
 
310
- export { type AttributePromptTool, type BaseTask, type Condition, type Conditions, type CreateAxiosRequestConfig, type FunctionKeys, type HandleStrategy, type KeyAxiosRequestConfig, type KeyHelper, type ParallelTasks, type PnpmWorkspace, type Prettify, type PromiseTasksConfig, type QueueTasks, type RemoveUrl, RmmvClass, type SimpleAsyncTask, type SingleTasks, type StrictUseAxiosReturn, type Task, type TaskType, type TasksConfig, type ToNumberLike, type UseAxiosWrapperParams, defaultHandleStrategy, type defaultHandleStrategy_FuncationName, definePromiseTasks, executePromiseTasks, generateSimpleAsyncTask, getRouteName, initFlag, isConditionsEvery, isConditionsSome, rmmvClassExpandTools, runPromiseByConcurrency, runPromiseByQueue, taskTypes, useAxiosWrapper };
331
+ export { type AttributePromptTool, type BaseTask, type Condition, type Conditions, type CreateAxiosRequestConfig, type FunctionKeys, type HandleStrategy, type KeyAxiosRequestConfig, type KeyHelper, type PackageInfo, type ParallelTasks, type PnpmWorkspace, type Prettify, type PromiseTasksConfig, type QueueTasks, type RemoveUrl, RmmvClass, type SimpleAsyncTask, type SingleTasks, type StrictUseAxiosReturn, type Task, type TaskType, type TasksConfig, type ToNumberLike, type UseAxiosWrapperParams, defaultHandleStrategy, type defaultHandleStrategy_FuncationName, definePromiseTasks, executePromiseTasks, generateSimpleAsyncTask, getRouteName, getRuanCatPkgInfo, initFlag, isConditionsEvery, isConditionsSome, rmmvClassExpandTools, runPromiseByConcurrency, runPromiseByQueue, taskTypes, useAxiosWrapper };