@ruan-cat/utils 1.7.0 → 2.0.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.
Files changed (31) hide show
  1. package/{readme.md → README.md} +6 -0
  2. package/dist/index.d.ts +11 -22
  3. package/dist/index.js +1 -31
  4. package/dist/index.js.map +1 -1
  5. package/dist/{node.cjs → node-cjs/index.cjs} +14 -13
  6. package/dist/node-cjs/index.cjs.map +1 -0
  7. package/dist/{node.d.cts → node-cjs/index.d.cts} +2 -3
  8. package/dist/node-esm/index.d.ts +88 -0
  9. package/dist/node-esm/index.js +388 -0
  10. package/dist/node-esm/index.js.map +1 -0
  11. package/dist/node-esm/template/components.template.js +0 -0
  12. package/dist/node-esm/template/components.template.ts +21 -0
  13. package/package.json +23 -9
  14. package/src/index.ts +1 -2
  15. package/src/node-cjs/index.ts +1 -0
  16. package/src/{node.ts → node-cjs/tools.ts} +4 -2
  17. package/src/node-esm/index.ts +5 -0
  18. package/src/node-esm/scripts/clean.ts +45 -0
  19. package/src/node-esm/vite-plugin-autogeneration-import-file/README.md +11 -0
  20. package/src/node-esm/vite-plugin-autogeneration-import-file/index.ts +120 -0
  21. package/src/node-esm/vite-plugin-autogeneration-import-file/template/components.template.ts +21 -0
  22. package/src/node-esm/vite-plugin-autogeneration-import-file/vite-plugin-autogeneration-import-file.test.ts +7 -0
  23. package/src/unplugin-vue-router/index.ts +10 -0
  24. package/src/vueuse/README.md +9 -0
  25. package/src/vueuse/useAxios/README.md +53 -0
  26. package/dist/node.cjs.map +0 -1
  27. package/dist/node.d.ts +0 -43
  28. package/dist/node.js +0 -62
  29. package/dist/node.js.map +0 -1
  30. /package/src/{ruan-cat-pkg-info.ts → node-esm/ruan-cat-pkg-info.ts} +0 -0
  31. /package/src/vueuse/{useAxios.ts → useAxios/index.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ruan-cat/utils",
3
- "version": "1.7.0",
3
+ "version": "2.0.1",
4
4
  "description": "阮喵喵工具集合。一个纯typescript库,也提供纯js文件。",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -20,10 +20,14 @@
20
20
  "import": "./src/index.ts",
21
21
  "require": "./dist/index.cjs"
22
22
  },
23
- "./node": {
24
- "types": "./src/node.d.ts",
25
- "import": "./src/node.js",
26
- "require": "./dist/node.cjs"
23
+ "./node-cjs": {
24
+ "types": "./src/node-cjs/index.ts",
25
+ "import": "./src/node-cjs/index.ts",
26
+ "require": "./dist/node-cjs/index.cjs"
27
+ },
28
+ "./node-esm": {
29
+ "types": "./src/node-esm/index.ts",
30
+ "import": "./src/node-esm/index.ts"
27
31
  },
28
32
  "./src/*": "./src/*",
29
33
  "./dist/*": "./dist/*"
@@ -46,6 +50,8 @@
46
50
  "src",
47
51
  "dist/*",
48
52
  "!src/tests",
53
+ "!src/**/tests",
54
+ "!src/**/*.md",
49
55
  "tsconfig.json"
50
56
  ],
51
57
  "dependencies": {
@@ -61,14 +67,17 @@
61
67
  "tsup": "^8.3.5",
62
68
  "type-plus": "^7.6.2",
63
69
  "typedoc": "^0.27.0",
70
+ "typedoc-plugin-frontmatter": "^1.2.1",
64
71
  "typedoc-plugin-markdown": "^4.3.0",
65
72
  "typescript": "5.7.3",
66
- "unplugin-vue-router": "^0.10.8",
73
+ "unplugin-vue-router": "^0.11.2",
74
+ "vite-plugin-autogeneration-import-file": "^3.0.0",
67
75
  "@ruan-cat/vuepress-preset-config": "^0.1.19"
68
76
  },
69
77
  "peerDependencies": {
70
78
  "typescript": "5.7.3",
71
- "unplugin-vue-router": "^0.10.8"
79
+ "unplugin-vue-router": "^0.10.0",
80
+ "vite-plugin-autogeneration-import-file": ">=3"
72
81
  },
73
82
  "peerDependenciesMeta": {
74
83
  "typescript": {
@@ -77,6 +86,9 @@
77
86
  "unplugin-vue-router": {
78
87
  "optional": true
79
88
  },
89
+ "vite-plugin-autogeneration-import-file": {
90
+ "optional": true
91
+ },
80
92
  "@vueuse/integrations": {
81
93
  "optional": true
82
94
  },
@@ -85,10 +97,12 @@
85
97
  }
86
98
  },
87
99
  "scripts": {
88
- "copy-readme": "cpx readme.md docs",
100
+ "clean-docs": "rimraf -g \"docs/**/!(.vuepress)\"",
101
+ "copy-src": "cpx \"src/**/*\" docs",
102
+ "copy-readme": "cpx README.md docs",
89
103
  "copy-changelog": "cpx CHANGELOG.md docs",
90
104
  "typedoc": "typedoc --options typedoc.config.mjs",
91
- "prettier-docs-(invalid)": "prettier docs/**/*.md --write",
105
+ "changelog-yaml": "node --import=tsx ./scripts/yaml-in-md.ts --md=./docs/CHANGELOG.md",
92
106
  "docs:dev-main": "vuepress-vite dev docs --clean-cache --open",
93
107
  "docs:dev": "turbo docs:dev",
94
108
  "build:docs-main": "vuepress-vite build docs",
package/src/index.ts CHANGED
@@ -3,8 +3,7 @@ export * from "./conditions.ts";
3
3
  export * from "./unplugin-vue-router/index.ts";
4
4
  export * from "./define-promise-tasks.ts";
5
5
  export * from "./simple-promise-tools.ts";
6
- export * from "./vueuse/useAxios.ts";
7
- export * from "./ruan-cat-pkg-info.ts";
6
+ export * from "./vueuse/useAxios/index.ts";
8
7
 
9
8
  export * from "./types/pnpm-workspace.yaml.shim.ts";
10
9
  export * from "./types/Prettify.ts";
@@ -0,0 +1 @@
1
+ export * from "./tools.ts";
@@ -3,10 +3,9 @@
3
3
  */
4
4
 
5
5
  import { normalize } from "node:path";
6
- import { spawnSync } from "node:child_process";
6
+ import { spawnSync, type SpawnOptions } from "node:child_process";
7
7
 
8
8
  import { generateSimpleAsyncTask } from "@ruan-cat/utils";
9
- // import gradient from "gradient-string";
10
9
  import consola from "consola";
11
10
  // import { normalizePath } from "vite";
12
11
 
@@ -38,6 +37,7 @@ export interface SpawnSyncSimpleParams {
38
37
  * @default true
39
38
  */
40
39
  isShowCommand?: boolean;
40
+ spawnOptions?: SpawnOptions;
41
41
 
42
42
  /** 打印当前运行的命令 */
43
43
  printCurrentCommand?: (params: Pick<SpawnSyncSimpleParams, "command" | "parameters">) => void;
@@ -65,6 +65,7 @@ export function generateSpawnSync(spawnSyncSimpleParams: SpawnSyncSimpleParams)
65
65
  parameters,
66
66
  isFlow = true,
67
67
  isShowCommand = true,
68
+ spawnOptions = {},
68
69
  printCurrentCommand = defPrintCurrentCommand,
69
70
  } = spawnSyncSimpleParams;
70
71
 
@@ -82,6 +83,7 @@ export function generateSpawnSync(spawnSyncSimpleParams: SpawnSyncSimpleParams)
82
83
  */
83
84
  stdio: isFlow ? "inherit" : "pipe",
84
85
  shell: true,
86
+ ...spawnOptions,
85
87
  });
86
88
 
87
89
  // 如果不是流式输出 就直接返回返回值即可
@@ -0,0 +1,5 @@
1
+ export * from "./vite-plugin-autogeneration-import-file/index.ts";
2
+
3
+ export * from "./ruan-cat-pkg-info.ts";
4
+
5
+ export * from "./scripts/clean.ts";
@@ -0,0 +1,45 @@
1
+ import { generateSpawnSync } from "../../node-cjs/index.ts";
2
+
3
+ type GlobString = `**/{${string}}`;
4
+
5
+ export const defaultCleanTargets = <const>[
6
+ // node常见文件
7
+ "node_modules",
8
+ "yarn.lock",
9
+ "pnpm-lock.yaml",
10
+ "package-lock.json",
11
+
12
+ // 项目常见文件
13
+ "dist",
14
+
15
+ //
16
+ ".turbo",
17
+ ".vercel",
18
+
19
+ // vuepress
20
+ ".cache",
21
+ ".temp",
22
+ ];
23
+
24
+ /**
25
+ * 删除node项目的依赖项便于重新安装依赖,也包括常见的各种垃圾文件。
26
+ * @description
27
+ */
28
+ export async function clean(
29
+ /**
30
+ * 被清除的目标文件夹 也包括文件
31
+ */
32
+ targets?: string[],
33
+ ) {
34
+ const cleanTargets = targets ?? defaultCleanTargets;
35
+ const glob: GlobString = `**/{${cleanTargets.join()}}`;
36
+
37
+ console.log(" 当前运行地址 process.cwd() ", process.cwd());
38
+
39
+ const doClean = generateSpawnSync({
40
+ command: "rimraf",
41
+ parameters: ["-g", glob],
42
+ });
43
+
44
+ await doClean();
45
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ order: 30
3
+ dir:
4
+ collapsible: false
5
+ link: true
6
+ order: 30
7
+ ---
8
+
9
+ # 自动类型生成插件的二次封装
10
+
11
+ [vite-plugin-autogeneration-import-file](https://github.com/yuntian001/vite-plugin-autogeneration-import-file),这个 vite 插件可以实现自动类型导入。在实际使用过程中,需要配置很多东西,故此处对该插件的使用做一些二次封装,并讲解该如何使用。
@@ -0,0 +1,120 @@
1
+ import { dirname, join, resolve } from "node:path";
2
+ import { fileURLToPath, URL } from "node:url";
3
+ import * as fs from "node:fs";
4
+
5
+ const __filename = fileURLToPath(import.meta.url);
6
+ const __dirname = dirname(__filename);
7
+
8
+ import { upperFirst, isUndefined } from "lodash-es";
9
+ import { createPlugin, getName } from "vite-plugin-autogeneration-import-file";
10
+ import consola from "consola";
11
+
12
+ const { autoImport } = createPlugin();
13
+
14
+ /**
15
+ * 解析目录
16
+ * @description
17
+ * 用于解析目录路径 默认从项目根目录开始
18
+ *
19
+ * 这里的项目根目录默认为 process.cwd()
20
+ *
21
+ * 作为工具函数对外导出 便于用户自己整理解析的文件路径
22
+ */
23
+ export function pathResolve(dir: string) {
24
+ const resPath = resolve(process.cwd(), dir);
25
+ console.info(` 解析的文件路径: ${resPath}`);
26
+ return resPath;
27
+ }
28
+
29
+ type DirOptions = Parameters<typeof autoImport>["0"];
30
+ type DirOption = DirOptions[number];
31
+ type _DirOptionName = DirOption["name"];
32
+
33
+ type _DirOptionNameNotString = Exclude<_DirOptionName, string>;
34
+ type DirOptionName = NonNullable<_DirOptionNameNotString>;
35
+
36
+ /**
37
+ * 创建名称生成函数
38
+ * @description
39
+ * 用于诸如特定的名称前缀 便于实现模块注册
40
+ */
41
+ export function createDirOptionNameFunction(
42
+ /**
43
+ * 组件名称前缀
44
+ * @description
45
+ * 一般写成大写字母
46
+ * @example
47
+ * Components
48
+ * Page
49
+ */
50
+ prefix: string = "",
51
+ ) {
52
+ /**
53
+ * 组件名命名规则支持字符串模板和函数
54
+ * @description
55
+ * 设置首字母为大写
56
+ */
57
+ const dirOptionName: DirOptionName = function name(fileName) {
58
+ const resFileName = getName(fileName);
59
+ const resFileNameWithPrefix = <const>`${upperFirst(prefix)}${upperFirst(resFileName)}`;
60
+ return resFileNameWithPrefix;
61
+ };
62
+
63
+ return dirOptionName;
64
+ }
65
+
66
+ /**
67
+ * 默认的自动导入模板文件名
68
+ * @description
69
+ * 你可以在项目内准备一个模板文件 这个模板文件建议取名为 components.template.d.ts
70
+ * 读取模板时 会默认读取该名称的文件
71
+ * @example components.template.d.ts
72
+ */
73
+ export const defaultAutoImportTemplateFilename = <const>"components.template.ts";
74
+
75
+ /**
76
+ * 默认的自动导入模板文件路径
77
+ * @description
78
+ * 我们默认你的模板文件在项目根目录下的 template 文件夹内
79
+ */
80
+ export const defaultAutoImportTemplatePath = <const>`./template/${defaultAutoImportTemplateFilename}`;
81
+
82
+ /**
83
+ * 直接获得默认的自动导入模板
84
+ * @description
85
+ * 直接读取本项目内的 components.template.d.ts 文件
86
+ * 反正都读取默认模板了 直接获取字符串即可
87
+ */
88
+ function getDefaultAutoImportTemplate() {
89
+ /** 相对路径文件 就在旁边的文件 */
90
+ const templatePath = join(__dirname, defaultAutoImportTemplatePath);
91
+ return fs.readFileSync(templatePath, "utf-8");
92
+ }
93
+
94
+ /** 默认的自动导入模板 */
95
+ export const defaultAutoImportTemplate = getDefaultAutoImportTemplate();
96
+
97
+ /**
98
+ * 创建文件生成模板字符串
99
+ * @description
100
+ * 会生成一个字符串 用于作为生成类型声明文件的模板
101
+ */
102
+ export function createAutoImportTemplate(
103
+ /**
104
+ * 模板路径
105
+ * @description
106
+ * 你可以传入一个模板路径 默认会读取项目根目录下的 template 文件夹内的 components.template.d.ts 文件
107
+ * @default ./template/components.template.d.ts
108
+ */
109
+ path?: string,
110
+ ) {
111
+ // 如果用户没传递路径 就直接返回默认的模板
112
+ if (isUndefined(path)) {
113
+ return defaultAutoImportTemplate;
114
+ } else {
115
+ const filepath = pathResolve(path);
116
+ consola.log(` 当前读取的文件路径为: ${filepath}`);
117
+ // 否则读取用户传递的路径
118
+ return fs.readFileSync(pathResolve(path), "utf-8");
119
+ }
120
+ }
@@ -0,0 +1,21 @@
1
+ /* eslint-disable */
2
+ // @ts-nocheck
3
+
4
+ /**
5
+ * 这是特定模板
6
+ */
7
+
8
+ /* prettier-ignore */
9
+ declare module "vue" {
10
+ export interface GlobalComponents {
11
+ //code
12
+ }
13
+ }
14
+
15
+ /* prettier-ignore */
16
+ declare global {
17
+ //typeCode
18
+ }
19
+
20
+ /* prettier-ignore */
21
+ export {};
@@ -0,0 +1,7 @@
1
+ import { test } from "vitest";
2
+
3
+ import { defaultAutoImportTemplate } from "./index.js";
4
+
5
+ test("getDefaultAutoImportTemplate", () => {
6
+ console.log(defaultAutoImportTemplate);
7
+ });
@@ -10,6 +10,16 @@ type GetRouteName = NonNullable<Options["getRouteName"]>;
10
10
  * 故自定义。
11
11
  *
12
12
  * unplugin-vue-router 插件的 getRouteName 配置项
13
+ *
14
+ * FIXME: https://github.com/vitejs/vite/issues/5370
15
+ *
16
+ * 该函数设计出来是为了解决这个问题
17
+ *
18
+ * 在vite符号链接未解决时,应该直接使用js文件,如下:
19
+ * import { getRouteName } from "@ruan-cat/utils/dist/index.js";
20
+ *
21
+ * 若已经彻底解决,请直接试图用来自符号链接的ts文件,如下:
22
+ * import { getRouteName } from "@ruan-cat/utils";
13
23
  */
14
24
  export const getRouteName: GetRouteName = function _getRouteName(node): ReturnType<GetRouteName> {
15
25
  // 如果是根节点 那么没有对应的文件夹名称 返回空字符串
@@ -0,0 +1,9 @@
1
+ ---
2
+ order: 20
3
+ dir:
4
+ order: 20
5
+ ---
6
+
7
+ # vueuse
8
+
9
+ 这里对 vueuse 的函数做二次封装。
@@ -0,0 +1,53 @@
1
+ ---
2
+ order: 10
3
+ dir:
4
+ collapsible: false
5
+ link: true
6
+ order: 10
7
+ ---
8
+
9
+ # useAxios 的包装函数
10
+
11
+ useAxiosWrapper,该函数旨在于实现 useAxios 的封装。使用方式如下:
12
+
13
+ ## 准备接口返回数据的类型
14
+
15
+ 接口请求返回类型,通常是一个泛型,请根据你的业务场景准备好类似于下面的类型:
16
+
17
+ ::: details
18
+
19
+ @[code](./tests/types/ApifoxModel.ts)
20
+
21
+ :::
22
+
23
+ ## 准备简单的 axios 请求实例
24
+
25
+ 这里的本质是为了准备一个拦截器内没有解包 data 的 axios 实例,因为 useAxios 默认帮我们完成 axios 的 data 解包了。
26
+
27
+ 比如以下的简单实例:
28
+
29
+ ::: details
30
+
31
+ @[code](./tests/createAxiosInstance.ts)
32
+
33
+ :::
34
+
35
+ ## 定义接口
36
+
37
+ 如下:
38
+
39
+ ::: details
40
+
41
+ @[code](./tests/homeCategoryHead.ts)
42
+
43
+ :::
44
+
45
+ ## 使用接口
46
+
47
+ 如下:
48
+
49
+ ::: details
50
+
51
+ @[code](./tests/homeCategoryHead.test.ts)
52
+
53
+ :::
package/dist/node.cjs.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/node.ts","../src/simple-promise-tools.ts","../src/vueuse/useAxios.ts","../src/ruan-cat-pkg-info.ts"],"sourcesContent":["/**\n * 一些node环境下的工具函数\n */\n\nimport { normalize } from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\n\nimport { generateSimpleAsyncTask } from \"@ruan-cat/utils\";\n// import gradient from \"gradient-string\";\nimport consola from \"consola\";\n// import { normalizePath } from \"vite\";\n\n/**\n * 路径转换工具\n */\nexport function pathChange(path: string) {\n\treturn path.replace(/\\\\/g, \"/\");\n\t// FIXME: 无法有效地实现解析路径 测试用例不通过\n\t// return normalize(path);\n\t// FIXME: tsup打包时,无法处理好vite的依赖 会导致打包失败 不知道怎么单独使用并打包该函数\n\t// return normalizePath(path);\n}\n\nexport interface SpawnSyncSimpleParams {\n\tcommand: string;\n\tparameters: string[];\n\t/**\n\t * 是否流式输出内容\n\t * @description 默认输出的命令数据全部以流式的方式输出\n\t * @default true\n\t */\n\tisFlow?: boolean;\n\n\t/**\n\t * 是否显示命令?\n\t * @description\n\t * 是否打印目前正在执行的命令?\n\t * @default true\n\t */\n\tisShowCommand?: boolean;\n\n\t/** 打印当前运行的命令 */\n\tprintCurrentCommand?: (params: Pick<SpawnSyncSimpleParams, \"command\" | \"parameters\">) => void;\n}\n\n/**\n * 默认的打印当前运行命令 函数\n */\nexport const defPrintCurrentCommand: SpawnSyncSimpleParams[\"printCurrentCommand\"] = function (params) {\n\tconst { command, parameters } = params;\n\tconsola.info(` 当前运行的命令为: ${command} ${parameters.join(\" \")} \\n`);\n};\n\n/**\n * 生成简单的执行命令函数\n * @description\n * 对 spawnSync 做简单的包装\n *\n * 之前封装的是 execa 函数\n * @version 2\n */\nexport function generateSpawnSync(spawnSyncSimpleParams: SpawnSyncSimpleParams) {\n\tconst {\n\t\tcommand,\n\t\tparameters,\n\t\tisFlow = true,\n\t\tisShowCommand = true,\n\t\tprintCurrentCommand = defPrintCurrentCommand,\n\t} = spawnSyncSimpleParams;\n\n\tif (isShowCommand) {\n\t\tprintCurrentCommand?.({ command, parameters });\n\t}\n\n\treturn generateSimpleAsyncTask(() => {\n\t\tconst result = spawnSync(command, parameters, {\n\t\t\t/**\n\t\t\t * 是否流式输出?\n\t\t\t * 是流式输出就是继承父进程的流式输出\n\t\t\t * 否则就使用默认值\n\t\t\t * @see https://nodejs.org/api/child_process.html#optionsstdio\n\t\t\t */\n\t\t\tstdio: isFlow ? \"inherit\" : \"pipe\",\n\t\t\tshell: true,\n\t\t});\n\n\t\t// 如果不是流式输出 就直接返回返回值即可\n\t\tif (!isFlow) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (result.error) {\n\t\t\tthrow result.error;\n\t\t}\n\n\t\treturn result;\n\t});\n}\n","// import { uniqueId } from \"lodash-es\";\n// const getCounter = () => uniqueId();\n\n/** 创建简单的异步任务 */\nexport function generateSimpleAsyncTask<T extends (...args: any) => any>(func: T) {\n\t// const taskId = getCounter();\n\n\treturn function (...args: any) {\n\t\t// consola.info(` 这是第 ${taskId} 个异步任务 `);\n\t\t// consola.start(\" 这里是新创建的异步函数 检查参数: \", ...args);\n\n\t\treturn new Promise<ReturnType<T>>((resolve, reject) => {\n\t\t\t// consola.start(\" 内部promise 检查参数: \", ...args);\n\t\t\tresolve(func(...args));\n\t\t});\n\t};\n}\n\nexport type SimpleAsyncTask = ReturnType<typeof generateSimpleAsyncTask>;\n\nexport const initFlag = <const>\"initFlag\";\n\n/**\n * 以队列串行的形式 串行运行异步函数\n * @see https://github.com/ascoders/weekly/blob/master/前沿技术/77.精读《用%20Reduce%20实现%20Promise%20串行执行》.md\n * @version 1\n */\nasync function runPromiseByQueueV1<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tpromises.reduce(\n\t\tasync function (previousPromise, nextPromise, currentIndex) {\n\t\t\tconst response = await previousPromise;\n\t\t\t// consola.log(` reduce串行函数 currentIndex= ${currentIndex} res =`, response);\n\t\t\treturn await nextPromise(response);\n\t\t},\n\t\tPromise.resolve(initFlag) as Promise<any>,\n\t);\n}\n\n/**\n * 以队列串行的形式 串行运行异步函数\n * @version 2\n */\nexport async function runPromiseByQueue<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tlet response: typeof initFlag | Awaited<T> = initFlag;\n\tfor await (const promise of promises) {\n\t\tresponse = await promise(response);\n\t}\n}\n\n/**\n * 以并行的形式 并发运行异步函数\n */\nexport async function runPromiseByConcurrency<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tawait Promise.all(promises.map((promise) => promise()));\n}\n","import type { RequiredPick } from \"type-plus\";\nimport type { AxiosRequestConfig, AxiosResponse, AxiosInstance } from \"axios\";\nimport type { UseAxiosOptions, UseAxiosReturn } from \"@vueuse/integrations/useAxios\";\nimport { useAxios } from \"@vueuse/integrations/useAxios\";\n\n/** 在封装函数时 需要使用该类型 */\nexport { UseAxiosOptions };\n\n/** 拓展的类型参数 用于约束必填的字段 */\nexport type KeyAxiosRequestConfig<D = any> = keyof AxiosRequestConfig<D>;\n\n/** 填写key值的帮助类型 */\nexport type KeyHelper<K extends KeyAxiosRequestConfig> = K;\n\nexport type RemoveUrl<T extends KeyAxiosRequestConfig> = Exclude<T, \"url\">;\n\n/**\n * 创建 AxiosRequestConfig 的各种变种类型\n * @description\n * 目前需要给 AxiosRequestConfig 添加必填属性\n *\n * 故需要本工具创建各种变种类型\n *\n * @example CreateAxiosRequestConfig<\"url\", D>\n */\nexport type CreateAxiosRequestConfig<K extends keyof Target, D = any, Target = AxiosRequestConfig<D>> = RequiredPick<\n\tTarget,\n\tK\n>;\n\n/** 拓展K泛型后的类型 */\nexport interface StrictUseAxiosReturn<\n\tT,\n\t/**\n\t * 拓展的类型参数 用于约束必填的字段\n\t * @description\n\t * 这里不需要提供默认的取值\n\t */\n\tK extends KeyAxiosRequestConfig<D>,\n\tR,\n\tD,\n> extends UseAxiosReturn<T, R, D> {\n\t/**\n\t * Manually call the axios request\n\t */\n\texecute: (\n\t\turl?: string | CreateAxiosRequestConfig<K, D>,\n\t\tconfig?: CreateAxiosRequestConfig<K, D>,\n\t) => Promise<StrictUseAxiosReturn<T, K, R, D>>;\n}\n\ndeclare module \"@vueuse/integrations/useAxios\" {\n\t/**\n\t * 拓展类型参数后的 useAxios 函数\n\t * @description\n\t * 在我们的封装中 使用本类型\n\t */\n\tfunction useAxios<\n\t\tT = any,\n\t\t/** 拓展的类型参数 用于约束必填的字段 */\n\t\tK extends KeyAxiosRequestConfig<D> = \"url\",\n\t\tR = AxiosResponse<T>,\n\t\tD = any,\n\t>(\n\t\turl: string,\n\t\tconfig: AxiosRequestConfig<D>,\n\t\tinstance: AxiosInstance,\n\t\toptions?: UseAxiosOptions,\n\t): StrictUseAxiosReturn<T, K, R, D> & Promise<StrictUseAxiosReturn<T, K, R, D>>;\n}\n\n/** 包装器的参数 */\nexport interface UseAxiosWrapperParams<\n\t/**\n\t * 业务数据类型\n\t * @description\n\t * 必须先填写业务类型\n\t */\n\tT = any,\n\t/**\n\t * AxiosRequestConfig 默认必填的字段\n\t * @description\n\t * 用于约束其他类型的字段\n\t *\n\t * 然后才能填写必传的参数类型\n\t *\n\t * 默认为 必填url请求地址的 config 请求配置\n\t */\n\tK extends KeyAxiosRequestConfig<D> = \"url\",\n\t/**\n\t * UseAxiosOptions 的派生类型\n\t */\n\tUseAxiosOptionsLike extends UseAxiosOptions = UseAxiosOptions,\n\t/**\n\t * AxiosRequestConfig 用的类型\n\t * @description\n\t * 最后才可以传递此类型\n\t */\n\tD = any,\n> {\n\t/**\n\t * axios的配置类型\n\t * @description\n\t * 默认为 必填url请求地址的 config 请求配置\n\t */\n\tconfig: CreateAxiosRequestConfig<K, D>;\n\n\t/**\n\t * axios实例\n\t * @description\n\t * 对于包装器函数而言 必须传递有意义的请求实例\n\t */\n\tinstance: AxiosInstance;\n\n\t/** useAxios 的选项配置 */\n\toptions: UseAxiosOptionsLike;\n}\n\n/**\n * useAxios 的包装函数\n * @description\n * 其本质是对 useAxios 函数的封装,仅仅是包装了参数层\n *\n * 预期设计成一个万能的 通用的请求函数\n */\nexport function useAxiosWrapper<T, K extends KeyAxiosRequestConfig, D = any>(params: UseAxiosWrapperParams) {\n\tconst {\n\t\tconfig: { url },\n\t\tconfig,\n\t\tinstance,\n\t\toptions,\n\t} = params;\n\t// 跳转到 vueuse 内的函数声明\n\t// return useAxios<T, AxiosResponse<T>, D>(url, config, instance, options);\n\n\t// 跳转到我们拓展的函数声明\n\treturn useAxios<T, K, AxiosResponse<T>, D>(url, config, instance, options);\n}\n","import { spawnSync } from \"node:child_process\";\n\n/** 包的信息 */\nexport interface PackageInfo {\n\t/** 包名 */\n\tname: string;\n\t/** 包的描述 */\n\tdescription: string;\n\t/** 带有包名的官方镜像源地址 */\n\turl: `https://npm.im/${string}`;\n}\n\n/**\n * 获得阮喵喵全部的包信息\n * @description\n * 这是一个node环境下的函数,用于获取阮喵喵的所有包的信息。\n *\n * 使用的是node的child_process模块,调用pnpm命令获取包信息。\n *\n * - 默认仅考虑pnpm包\n * - 在node环境下运行\n */\nexport async function getRuanCatPkgInfo() {\n\treturn new Promise<PackageInfo[]>((resolve, reject) => {\n\t\t/**\n\t\t * pnpm s @ruan-cat/* --registry https://registry.npmmirror.com/ --json\n\t\t * 仅查询淘宝源的数据\n\t\t */\n\t\tconst result = spawnSync(\"pnpm\", [\"s\", \"@ruan-cat/*\", \"--registry\", \"https://registry.npmmirror.com/\", \"--json\"], {\n\t\t\tencoding: \"utf-8\",\n\t\t});\n\n\t\tif (result.error) {\n\t\t\tconsole.error(`Error executing command: ${result.error.message}`);\n\t\t\treject(result.error);\n\t\t\treturn;\n\t\t}\n\t\tif (result.stderr) {\n\t\t\tconsole.error(`Error in output: ${result.stderr}`);\n\t\t\treject(new Error(result.stderr));\n\t\t\treturn;\n\t\t}\n\n\t\tconst packages = <unknown[]>JSON.parse(result.stdout);\n\t\tconst res = packages.map(\n\t\t\t(pkg: any) =>\n\t\t\t\t({\n\t\t\t\t\tname: pkg.name,\n\t\t\t\t\tdescription: pkg.description,\n\t\t\t\t\turl: `https://npm.im/${pkg.name}`,\n\t\t\t\t}) satisfies PackageInfo,\n\t\t);\n\t\t// const res = packages;\n\t\tresolve(res);\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,IAAAA,6BAA0B;;;ACDnB,SAAS,wBAAyD,MAAS;AAGjF,SAAO,YAAa,MAAW;AAI9B,WAAO,IAAI,QAAuB,CAAC,SAAS,WAAW;AAEtD,cAAQ,KAAK,GAAG,IAAI,CAAC;AAAA,IACtB,CAAC;AAAA,EACF;AACD;;;ACbA,sBAAyB;;;ACHzB,gCAA0B;;;AHS1B,qBAAoB;AAMb,SAAS,WAAW,MAAc;AACxC,SAAO,KAAK,QAAQ,OAAO,GAAG;AAK/B;AA2BO,IAAM,yBAAuE,SAAU,QAAQ;AACrG,QAAM,EAAE,SAAS,WAAW,IAAI;AAChC,iBAAAC,QAAQ,KAAK,2DAAc,OAAO,IAAI,WAAW,KAAK,GAAG,CAAC;AAAA,CAAK;AAChE;AAUO,SAAS,kBAAkB,uBAA8C;AAC/E,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,sBAAsB;AAAA,EACvB,IAAI;AAEJ,MAAI,eAAe;AAClB,0BAAsB,EAAE,SAAS,WAAW,CAAC;AAAA,EAC9C;AAEA,SAAO,wBAAwB,MAAM;AACpC,UAAM,aAAS,sCAAU,SAAS,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAO7C,OAAO,SAAS,YAAY;AAAA,MAC5B,OAAO;AAAA,IACR,CAAC;AAGD,QAAI,CAAC,QAAQ;AACZ,aAAO;AAAA,IACR;AAEA,QAAI,OAAO,OAAO;AACjB,YAAM,OAAO;AAAA,IACd;AAEA,WAAO;AAAA,EACR,CAAC;AACF;","names":["import_node_child_process","consola"]}
package/dist/node.d.ts DELETED
@@ -1,43 +0,0 @@
1
- import * as child_process from 'child_process';
2
-
3
- /**
4
- * 一些node环境下的工具函数
5
- */
6
- /**
7
- * 路径转换工具
8
- */
9
- declare function pathChange(path: string): string;
10
- interface SpawnSyncSimpleParams {
11
- command: string;
12
- parameters: string[];
13
- /**
14
- * 是否流式输出内容
15
- * @description 默认输出的命令数据全部以流式的方式输出
16
- * @default true
17
- */
18
- isFlow?: boolean;
19
- /**
20
- * 是否显示命令?
21
- * @description
22
- * 是否打印目前正在执行的命令?
23
- * @default true
24
- */
25
- isShowCommand?: boolean;
26
- /** 打印当前运行的命令 */
27
- printCurrentCommand?: (params: Pick<SpawnSyncSimpleParams, "command" | "parameters">) => void;
28
- }
29
- /**
30
- * 默认的打印当前运行命令 函数
31
- */
32
- declare const defPrintCurrentCommand: SpawnSyncSimpleParams["printCurrentCommand"];
33
- /**
34
- * 生成简单的执行命令函数
35
- * @description
36
- * 对 spawnSync 做简单的包装
37
- *
38
- * 之前封装的是 execa 函数
39
- * @version 2
40
- */
41
- declare function generateSpawnSync(spawnSyncSimpleParams: SpawnSyncSimpleParams): (...args: any) => Promise<child_process.SpawnSyncReturns<Buffer<ArrayBufferLike>>>;
42
-
43
- export { type SpawnSyncSimpleParams, defPrintCurrentCommand, generateSpawnSync, pathChange };
package/dist/node.js DELETED
@@ -1,62 +0,0 @@
1
- // src/node.ts
2
- import { spawnSync } from "node:child_process";
3
-
4
- // src/simple-promise-tools.ts
5
- function generateSimpleAsyncTask(func) {
6
- return function(...args) {
7
- return new Promise((resolve, reject) => {
8
- resolve(func(...args));
9
- });
10
- };
11
- }
12
-
13
- // src/vueuse/useAxios.ts
14
- import { useAxios } from "@vueuse/integrations/useAxios";
15
-
16
- // src/node.ts
17
- import consola from "consola";
18
- function pathChange(path) {
19
- return path.replace(/\\/g, "/");
20
- }
21
- var defPrintCurrentCommand = function(params) {
22
- const { command, parameters } = params;
23
- consola.info(` \u5F53\u524D\u8FD0\u884C\u7684\u547D\u4EE4\u4E3A\uFF1A ${command} ${parameters.join(" ")}
24
- `);
25
- };
26
- function generateSpawnSync(spawnSyncSimpleParams) {
27
- const {
28
- command,
29
- parameters,
30
- isFlow = true,
31
- isShowCommand = true,
32
- printCurrentCommand = defPrintCurrentCommand
33
- } = spawnSyncSimpleParams;
34
- if (isShowCommand) {
35
- printCurrentCommand?.({ command, parameters });
36
- }
37
- return generateSimpleAsyncTask(() => {
38
- const result = spawnSync(command, parameters, {
39
- /**
40
- * 是否流式输出?
41
- * 是流式输出就是继承父进程的流式输出
42
- * 否则就使用默认值
43
- * @see https://nodejs.org/api/child_process.html#optionsstdio
44
- */
45
- stdio: isFlow ? "inherit" : "pipe",
46
- shell: true
47
- });
48
- if (!isFlow) {
49
- return result;
50
- }
51
- if (result.error) {
52
- throw result.error;
53
- }
54
- return result;
55
- });
56
- }
57
- export {
58
- defPrintCurrentCommand,
59
- generateSpawnSync,
60
- pathChange
61
- };
62
- //# sourceMappingURL=node.js.map
package/dist/node.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/node.ts","../src/simple-promise-tools.ts","../src/vueuse/useAxios.ts"],"sourcesContent":["/**\n * 一些node环境下的工具函数\n */\n\nimport { normalize } from \"node:path\";\nimport { spawnSync } from \"node:child_process\";\n\nimport { generateSimpleAsyncTask } from \"@ruan-cat/utils\";\n// import gradient from \"gradient-string\";\nimport consola from \"consola\";\n// import { normalizePath } from \"vite\";\n\n/**\n * 路径转换工具\n */\nexport function pathChange(path: string) {\n\treturn path.replace(/\\\\/g, \"/\");\n\t// FIXME: 无法有效地实现解析路径 测试用例不通过\n\t// return normalize(path);\n\t// FIXME: tsup打包时,无法处理好vite的依赖 会导致打包失败 不知道怎么单独使用并打包该函数\n\t// return normalizePath(path);\n}\n\nexport interface SpawnSyncSimpleParams {\n\tcommand: string;\n\tparameters: string[];\n\t/**\n\t * 是否流式输出内容\n\t * @description 默认输出的命令数据全部以流式的方式输出\n\t * @default true\n\t */\n\tisFlow?: boolean;\n\n\t/**\n\t * 是否显示命令?\n\t * @description\n\t * 是否打印目前正在执行的命令?\n\t * @default true\n\t */\n\tisShowCommand?: boolean;\n\n\t/** 打印当前运行的命令 */\n\tprintCurrentCommand?: (params: Pick<SpawnSyncSimpleParams, \"command\" | \"parameters\">) => void;\n}\n\n/**\n * 默认的打印当前运行命令 函数\n */\nexport const defPrintCurrentCommand: SpawnSyncSimpleParams[\"printCurrentCommand\"] = function (params) {\n\tconst { command, parameters } = params;\n\tconsola.info(` 当前运行的命令为: ${command} ${parameters.join(\" \")} \\n`);\n};\n\n/**\n * 生成简单的执行命令函数\n * @description\n * 对 spawnSync 做简单的包装\n *\n * 之前封装的是 execa 函数\n * @version 2\n */\nexport function generateSpawnSync(spawnSyncSimpleParams: SpawnSyncSimpleParams) {\n\tconst {\n\t\tcommand,\n\t\tparameters,\n\t\tisFlow = true,\n\t\tisShowCommand = true,\n\t\tprintCurrentCommand = defPrintCurrentCommand,\n\t} = spawnSyncSimpleParams;\n\n\tif (isShowCommand) {\n\t\tprintCurrentCommand?.({ command, parameters });\n\t}\n\n\treturn generateSimpleAsyncTask(() => {\n\t\tconst result = spawnSync(command, parameters, {\n\t\t\t/**\n\t\t\t * 是否流式输出?\n\t\t\t * 是流式输出就是继承父进程的流式输出\n\t\t\t * 否则就使用默认值\n\t\t\t * @see https://nodejs.org/api/child_process.html#optionsstdio\n\t\t\t */\n\t\t\tstdio: isFlow ? \"inherit\" : \"pipe\",\n\t\t\tshell: true,\n\t\t});\n\n\t\t// 如果不是流式输出 就直接返回返回值即可\n\t\tif (!isFlow) {\n\t\t\treturn result;\n\t\t}\n\n\t\tif (result.error) {\n\t\t\tthrow result.error;\n\t\t}\n\n\t\treturn result;\n\t});\n}\n","// import { uniqueId } from \"lodash-es\";\n// const getCounter = () => uniqueId();\n\n/** 创建简单的异步任务 */\nexport function generateSimpleAsyncTask<T extends (...args: any) => any>(func: T) {\n\t// const taskId = getCounter();\n\n\treturn function (...args: any) {\n\t\t// consola.info(` 这是第 ${taskId} 个异步任务 `);\n\t\t// consola.start(\" 这里是新创建的异步函数 检查参数: \", ...args);\n\n\t\treturn new Promise<ReturnType<T>>((resolve, reject) => {\n\t\t\t// consola.start(\" 内部promise 检查参数: \", ...args);\n\t\t\tresolve(func(...args));\n\t\t});\n\t};\n}\n\nexport type SimpleAsyncTask = ReturnType<typeof generateSimpleAsyncTask>;\n\nexport const initFlag = <const>\"initFlag\";\n\n/**\n * 以队列串行的形式 串行运行异步函数\n * @see https://github.com/ascoders/weekly/blob/master/前沿技术/77.精读《用%20Reduce%20实现%20Promise%20串行执行》.md\n * @version 1\n */\nasync function runPromiseByQueueV1<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tpromises.reduce(\n\t\tasync function (previousPromise, nextPromise, currentIndex) {\n\t\t\tconst response = await previousPromise;\n\t\t\t// consola.log(` reduce串行函数 currentIndex= ${currentIndex} res =`, response);\n\t\t\treturn await nextPromise(response);\n\t\t},\n\t\tPromise.resolve(initFlag) as Promise<any>,\n\t);\n}\n\n/**\n * 以队列串行的形式 串行运行异步函数\n * @version 2\n */\nexport async function runPromiseByQueue<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tlet response: typeof initFlag | Awaited<T> = initFlag;\n\tfor await (const promise of promises) {\n\t\tresponse = await promise(response);\n\t}\n}\n\n/**\n * 以并行的形式 并发运行异步函数\n */\nexport async function runPromiseByConcurrency<T>(promises: ((...args: any) => Promise<T>)[]) {\n\tawait Promise.all(promises.map((promise) => promise()));\n}\n","import type { RequiredPick } from \"type-plus\";\nimport type { AxiosRequestConfig, AxiosResponse, AxiosInstance } from \"axios\";\nimport type { UseAxiosOptions, UseAxiosReturn } from \"@vueuse/integrations/useAxios\";\nimport { useAxios } from \"@vueuse/integrations/useAxios\";\n\n/** 在封装函数时 需要使用该类型 */\nexport { UseAxiosOptions };\n\n/** 拓展的类型参数 用于约束必填的字段 */\nexport type KeyAxiosRequestConfig<D = any> = keyof AxiosRequestConfig<D>;\n\n/** 填写key值的帮助类型 */\nexport type KeyHelper<K extends KeyAxiosRequestConfig> = K;\n\nexport type RemoveUrl<T extends KeyAxiosRequestConfig> = Exclude<T, \"url\">;\n\n/**\n * 创建 AxiosRequestConfig 的各种变种类型\n * @description\n * 目前需要给 AxiosRequestConfig 添加必填属性\n *\n * 故需要本工具创建各种变种类型\n *\n * @example CreateAxiosRequestConfig<\"url\", D>\n */\nexport type CreateAxiosRequestConfig<K extends keyof Target, D = any, Target = AxiosRequestConfig<D>> = RequiredPick<\n\tTarget,\n\tK\n>;\n\n/** 拓展K泛型后的类型 */\nexport interface StrictUseAxiosReturn<\n\tT,\n\t/**\n\t * 拓展的类型参数 用于约束必填的字段\n\t * @description\n\t * 这里不需要提供默认的取值\n\t */\n\tK extends KeyAxiosRequestConfig<D>,\n\tR,\n\tD,\n> extends UseAxiosReturn<T, R, D> {\n\t/**\n\t * Manually call the axios request\n\t */\n\texecute: (\n\t\turl?: string | CreateAxiosRequestConfig<K, D>,\n\t\tconfig?: CreateAxiosRequestConfig<K, D>,\n\t) => Promise<StrictUseAxiosReturn<T, K, R, D>>;\n}\n\ndeclare module \"@vueuse/integrations/useAxios\" {\n\t/**\n\t * 拓展类型参数后的 useAxios 函数\n\t * @description\n\t * 在我们的封装中 使用本类型\n\t */\n\tfunction useAxios<\n\t\tT = any,\n\t\t/** 拓展的类型参数 用于约束必填的字段 */\n\t\tK extends KeyAxiosRequestConfig<D> = \"url\",\n\t\tR = AxiosResponse<T>,\n\t\tD = any,\n\t>(\n\t\turl: string,\n\t\tconfig: AxiosRequestConfig<D>,\n\t\tinstance: AxiosInstance,\n\t\toptions?: UseAxiosOptions,\n\t): StrictUseAxiosReturn<T, K, R, D> & Promise<StrictUseAxiosReturn<T, K, R, D>>;\n}\n\n/** 包装器的参数 */\nexport interface UseAxiosWrapperParams<\n\t/**\n\t * 业务数据类型\n\t * @description\n\t * 必须先填写业务类型\n\t */\n\tT = any,\n\t/**\n\t * AxiosRequestConfig 默认必填的字段\n\t * @description\n\t * 用于约束其他类型的字段\n\t *\n\t * 然后才能填写必传的参数类型\n\t *\n\t * 默认为 必填url请求地址的 config 请求配置\n\t */\n\tK extends KeyAxiosRequestConfig<D> = \"url\",\n\t/**\n\t * UseAxiosOptions 的派生类型\n\t */\n\tUseAxiosOptionsLike extends UseAxiosOptions = UseAxiosOptions,\n\t/**\n\t * AxiosRequestConfig 用的类型\n\t * @description\n\t * 最后才可以传递此类型\n\t */\n\tD = any,\n> {\n\t/**\n\t * axios的配置类型\n\t * @description\n\t * 默认为 必填url请求地址的 config 请求配置\n\t */\n\tconfig: CreateAxiosRequestConfig<K, D>;\n\n\t/**\n\t * axios实例\n\t * @description\n\t * 对于包装器函数而言 必须传递有意义的请求实例\n\t */\n\tinstance: AxiosInstance;\n\n\t/** useAxios 的选项配置 */\n\toptions: UseAxiosOptionsLike;\n}\n\n/**\n * useAxios 的包装函数\n * @description\n * 其本质是对 useAxios 函数的封装,仅仅是包装了参数层\n *\n * 预期设计成一个万能的 通用的请求函数\n */\nexport function useAxiosWrapper<T, K extends KeyAxiosRequestConfig, D = any>(params: UseAxiosWrapperParams) {\n\tconst {\n\t\tconfig: { url },\n\t\tconfig,\n\t\tinstance,\n\t\toptions,\n\t} = params;\n\t// 跳转到 vueuse 内的函数声明\n\t// return useAxios<T, AxiosResponse<T>, D>(url, config, instance, options);\n\n\t// 跳转到我们拓展的函数声明\n\treturn useAxios<T, K, AxiosResponse<T>, D>(url, config, instance, options);\n}\n"],"mappings":";AAKA,SAAS,iBAAiB;;;ACDnB,SAAS,wBAAyD,MAAS;AAGjF,SAAO,YAAa,MAAW;AAI9B,WAAO,IAAI,QAAuB,CAAC,SAAS,WAAW;AAEtD,cAAQ,KAAK,GAAG,IAAI,CAAC;AAAA,IACtB,CAAC;AAAA,EACF;AACD;;;ACbA,SAAS,gBAAgB;;;AFMzB,OAAO,aAAa;AAMb,SAAS,WAAW,MAAc;AACxC,SAAO,KAAK,QAAQ,OAAO,GAAG;AAK/B;AA2BO,IAAM,yBAAuE,SAAU,QAAQ;AACrG,QAAM,EAAE,SAAS,WAAW,IAAI;AAChC,UAAQ,KAAK,2DAAc,OAAO,IAAI,WAAW,KAAK,GAAG,CAAC;AAAA,CAAK;AAChE;AAUO,SAAS,kBAAkB,uBAA8C;AAC/E,QAAM;AAAA,IACL;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT,gBAAgB;AAAA,IAChB,sBAAsB;AAAA,EACvB,IAAI;AAEJ,MAAI,eAAe;AAClB,0BAAsB,EAAE,SAAS,WAAW,CAAC;AAAA,EAC9C;AAEA,SAAO,wBAAwB,MAAM;AACpC,UAAM,SAAS,UAAU,SAAS,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAO7C,OAAO,SAAS,YAAY;AAAA,MAC5B,OAAO;AAAA,IACR,CAAC;AAGD,QAAI,CAAC,QAAQ;AACZ,aAAO;AAAA,IACR;AAEA,QAAI,OAAO,OAAO;AACjB,YAAM,OAAO;AAAA,IACd;AAEA,WAAO;AAAA,EACR,CAAC;AACF;","names":[]}
File without changes