@infly/libs 2.0.25
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/.prettierrc +5 -0
- package/LICENSE +21 -0
- package/README.md +39 -0
- package/bin/cli.js +30 -0
- package/build/build-dist/index.js +644 -0
- package/build/build-dist/zip.js +57 -0
- package/build/webpack5/inline-runtime-plugin.js +35 -0
- package/build/webpack5/webpack.base.js +227 -0
- package/dataInit/commonTypeMap.js +31 -0
- package/dataInit/marketingActivitiesMap.js +214 -0
- package/dataInit/orderMap.js +13 -0
- package/dataInit/personalMap.js +19 -0
- package/dataInit/settlementMap.js +17 -0
- package/index.js +13 -0
- package/lib/index.js +6 -0
- package/lib/server/connect.js +3011 -0
- package/lib/server/serve-static.js +4848 -0
- package/module/Permission.js +138 -0
- package/module/REST.js +97 -0
- package/module/TokenService.js +127 -0
- package/module/Uts.js +7222 -0
- package/package.json +88 -0
- package/script/git-automation/check-packages.js +44 -0
- package/script/git-automation/git-clone.js +69 -0
- package/script/git-automation/git-submodule.js +17 -0
- package/script/git-automation/index.js +488 -0
- package/script/index.js +26 -0
- package/script/webhook/webhook.js +60 -0
- package/store/index.js +0 -0
- package/store/modules/user.js +166 -0
- package/tools/file-export.js +142 -0
- package/tools/file-process.js +49 -0
- package/tools/format.js +31 -0
- package/tools/project-preview.js +135 -0
- package/types/unused.index.d.ts +71 -0
- package/webpack.config.js +38 -0
package/.prettierrc
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kahal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# npm-package
|
|
2
|
+
|
|
3
|
+
## 介绍
|
|
4
|
+
|
|
5
|
+
基础库
|
|
6
|
+
|
|
7
|
+
## 注意事项
|
|
8
|
+
|
|
9
|
+
如需使用第三方库,推荐使用 webpack 进行打包,放入 lib/中使用
|
|
10
|
+
|
|
11
|
+
## 软件架构
|
|
12
|
+
|
|
13
|
+
infly-libs
|
|
14
|
+
├── bin - 脚本文件暴露为可直接调用的命令
|
|
15
|
+
│ └── cli.js - 命令入口调用方法判断
|
|
16
|
+
├── build - 构建相关工具库
|
|
17
|
+
│ └── build-dist - 项目构建
|
|
18
|
+
│ └───── zip.js - 压缩构建文件
|
|
19
|
+
│ └───── index.js - 构建入口
|
|
20
|
+
│ └── webpack5 - 构建配置封装
|
|
21
|
+
├── dataInit - 公共枚举
|
|
22
|
+
├── lib - 第三方库
|
|
23
|
+
├── module - 模块
|
|
24
|
+
├── script - 脚本模块
|
|
25
|
+
│ └── git-automation - git自动化
|
|
26
|
+
│ └── webhook - 机器人推送
|
|
27
|
+
├── store - 公共 vuex 模块
|
|
28
|
+
├── tools - 小工具类型方法
|
|
29
|
+
├── types - ts 类型说明
|
|
30
|
+
├── index.js - npm 包初始文件
|
|
31
|
+
├── package.json - npm 包管理配置, 正常无需 npm install 当前项目的依赖
|
|
32
|
+
├── webpack.config.js - webpack 配置实现打包第三方库减小体积
|
|
33
|
+
|
|
34
|
+
## 安装教程
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
# 项目安装
|
|
38
|
+
npm/pnpm install infly-libs
|
|
39
|
+
```
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { init: buildInit, scriptInit: buildScriptInit, beforeBuild } = require("../build/build-dist");
|
|
4
|
+
const { init: previewInit, scriptInit: previewScriptInit } = require("../tools/project-preview");
|
|
5
|
+
|
|
6
|
+
const command = process.argv[2];
|
|
7
|
+
const commandMap = {
|
|
8
|
+
afterBuild: buildInit,
|
|
9
|
+
initZip: buildInit,
|
|
10
|
+
preview: previewInit,
|
|
11
|
+
beforeBuild: beforeBuild,
|
|
12
|
+
scriptOverride: () => {
|
|
13
|
+
previewScriptInit();
|
|
14
|
+
buildScriptInit();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// 执行命令
|
|
19
|
+
if (command && commandMap[command]) {
|
|
20
|
+
commandMap[command]();
|
|
21
|
+
} else {
|
|
22
|
+
console.error(`未知命令: ${command || "未提供命令"}`);
|
|
23
|
+
console.log(
|
|
24
|
+
"可用命令: " +
|
|
25
|
+
Object.keys(commandMap)
|
|
26
|
+
.filter((cmd) => typeof commandMap[cmd] === "function")
|
|
27
|
+
.join(", ")
|
|
28
|
+
);
|
|
29
|
+
process.exit(1); // 使用非零退出码表示错误
|
|
30
|
+
}
|