anncic-api 3.7.18 → 3.7.20
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/config/config.default.d.ts +47 -47
- package/dist/config/config.default.js +1 -1
- package/dist/config/config.local.d.ts +6 -6
- package/dist/config/config.local.js +1 -1
- package/dist/config/config.production.d.ts +5 -5
- package/dist/config/config.production.js +1 -1
- package/dist/configuration.d.ts +17 -17
- package/dist/configuration.js +1 -1
- package/dist/decorator/Action.d.ts +14 -14
- package/dist/decorator/Action.js +1 -1
- package/dist/decorator/ActionApitest.d.ts +2 -2
- package/dist/decorator/ActionApitest.js +1 -1
- package/dist/decorator/Intercept.d.ts +5 -5
- package/dist/decorator/Intercept.js +1 -1
- package/dist/exception/ApiError.d.ts +9 -8
- package/dist/exception/ApiError.js +1 -1
- package/dist/helper/getAppsConfig.d.ts +1 -1
- package/dist/helper/getAppsConfig.js +1 -1
- package/dist/helper/getRoutes.d.ts +11 -11
- package/dist/helper/getRoutes.js +1 -1
- package/dist/helper/getSwaggerJson.d.ts +40 -40
- package/dist/helper/getSwaggerJson.js +1 -1
- package/dist/index.d.ts +21 -21
- package/dist/index.js +1 -1
- package/dist/service/ApiService.d.ts +12 -12
- package/dist/service/ApiService.js +1 -1
- package/dist/service/ApitestService.d.ts +19 -19
- package/dist/service/ApitestService.js +1 -1
- package/dist/service/ExcelService.d.ts +46 -46
- package/dist/service/ExcelService.js +1 -1
- package/dist/service/ExcelStream.d.ts +48 -47
- package/dist/service/ExcelStream.js +1 -1
- package/dist/types/action.d.ts +47 -47
- package/dist/types/action.js +1 -1
- package/dist/types/common.d.ts +14 -13
- package/dist/types/common.js +1 -1
- package/dist/types/intercept.d.ts +3 -3
- package/dist/types/intercept.js +1 -1
- package/package.json +9 -9
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import * as exceljs from 'exceljs';
|
|
2
|
-
import { IMidwayApplication } from '@midwayjs/core';
|
|
3
|
-
import { ExcelStream } from './ExcelStream';
|
|
4
|
-
interface ExcelColumn {
|
|
5
|
-
key: string;
|
|
6
|
-
header: string;
|
|
7
|
-
}
|
|
8
|
-
interface ExcelColumnParse extends ExcelColumn {
|
|
9
|
-
onRead?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
|
|
10
|
-
handler?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
|
|
11
|
-
}
|
|
12
|
-
interface ExcelColumnExport extends ExcelColumn {
|
|
13
|
-
onWrite?: (row: any, options?: {
|
|
14
|
-
row: exceljs.Row;
|
|
15
|
-
col: exceljs.Column;
|
|
16
|
-
cell: exceljs.Cell;
|
|
17
|
-
sheet: exceljs.Worksheet;
|
|
18
|
-
}) => any | Promise<any>;
|
|
19
|
-
handler?: (row: any, options?: {
|
|
20
|
-
row: exceljs.Row;
|
|
21
|
-
col: exceljs.Column;
|
|
22
|
-
cell: exceljs.Cell;
|
|
23
|
-
sheet: exceljs.Worksheet;
|
|
24
|
-
}) => any | Promise<any>;
|
|
25
|
-
}
|
|
26
|
-
export declare class ExcelService {
|
|
27
|
-
protected app: IMidwayApplication;
|
|
28
|
-
parse(filepath: string, column: ExcelColumnParse[], sheets?: Array<number | string>): Promise<Array<{
|
|
29
|
-
[key: string]: any;
|
|
30
|
-
}>>;
|
|
31
|
-
export(filename: string, column: Array<ExcelColumnExport>, tmpEntitys: Array<{
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
}>, savepath?: string, beforSave?: (options: {
|
|
34
|
-
workbook: exceljs.Workbook;
|
|
35
|
-
worksheet: exceljs.Worksheet;
|
|
36
|
-
}) => Promise<void>): Promise<{
|
|
37
|
-
filename: string;
|
|
38
|
-
filepath: string;
|
|
39
|
-
}>;
|
|
40
|
-
stream(file: string, option?: {
|
|
41
|
-
rootpath?: string;
|
|
42
|
-
suffix?: string[];
|
|
43
|
-
}): Promise<ExcelStream>;
|
|
44
|
-
download(ctx: any, filepath: string): Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
export {};
|
|
1
|
+
import * as exceljs from 'exceljs';
|
|
2
|
+
import { IMidwayApplication } from '@midwayjs/core';
|
|
3
|
+
import { ExcelStream } from './ExcelStream';
|
|
4
|
+
interface ExcelColumn {
|
|
5
|
+
key: string;
|
|
6
|
+
header: string;
|
|
7
|
+
}
|
|
8
|
+
interface ExcelColumnParse extends ExcelColumn {
|
|
9
|
+
onRead?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
|
|
10
|
+
handler?: (row: any, rowCell?: exceljs.CellModel) => any | Promise<any>;
|
|
11
|
+
}
|
|
12
|
+
interface ExcelColumnExport extends ExcelColumn {
|
|
13
|
+
onWrite?: (row: any, options?: {
|
|
14
|
+
row: exceljs.Row;
|
|
15
|
+
col: exceljs.Column;
|
|
16
|
+
cell: exceljs.Cell;
|
|
17
|
+
sheet: exceljs.Worksheet;
|
|
18
|
+
}) => any | Promise<any>;
|
|
19
|
+
handler?: (row: any, options?: {
|
|
20
|
+
row: exceljs.Row;
|
|
21
|
+
col: exceljs.Column;
|
|
22
|
+
cell: exceljs.Cell;
|
|
23
|
+
sheet: exceljs.Worksheet;
|
|
24
|
+
}) => any | Promise<any>;
|
|
25
|
+
}
|
|
26
|
+
export declare class ExcelService {
|
|
27
|
+
protected app: IMidwayApplication;
|
|
28
|
+
parse(filepath: string, column: ExcelColumnParse[], sheets?: Array<number | string>): Promise<Array<{
|
|
29
|
+
[key: string]: any;
|
|
30
|
+
}>>;
|
|
31
|
+
export(filename: string, column: Array<ExcelColumnExport>, tmpEntitys: Array<{
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
}>, savepath?: string, beforSave?: (options: {
|
|
34
|
+
workbook: exceljs.Workbook;
|
|
35
|
+
worksheet: exceljs.Worksheet;
|
|
36
|
+
}) => Promise<void>): Promise<{
|
|
37
|
+
filename: string;
|
|
38
|
+
filepath: string;
|
|
39
|
+
}>;
|
|
40
|
+
stream(file: string, option?: {
|
|
41
|
+
rootpath?: string;
|
|
42
|
+
suffix?: string[];
|
|
43
|
+
}): Promise<ExcelStream>;
|
|
44
|
+
download(ctx: any, filepath: string): Promise<void>;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a14_0x4376f6=a14_0x5b49;(function(_0x1d0845,_0x104f53){const _0x2eed2f=a14_0x5b49,_0x50572c=_0x1d0845();while(!![]){try{const _0x2ddbea=parseInt(_0x2eed2f(0x1c7))/0x1+parseInt(_0x2eed2f(0x1cd))/0x2+-parseInt(_0x2eed2f(0x1e6))/0x3+parseInt(_0x2eed2f(0x1f7))/0x4+parseInt(_0x2eed2f(0x1f9))/0x5*(parseInt(_0x2eed2f(0x20e))/0x6)+parseInt(_0x2eed2f(0x1de))/0x7+-parseInt(_0x2eed2f(0x1d0))/0x8;if(_0x2ddbea===_0x104f53)break;else _0x50572c['push'](_0x50572c['shift']());}catch(_0x58b4ab){_0x50572c['push'](_0x50572c['shift']());}}}(a14_0x550e,0xccbb1));function a14_0x550e(){const _0xa67d5f=['instance','columns','apply','Sheet\x201','Scope','set','handler','function','findRows','\x20is\x20read\x20fail','__decorate','values','Provide','addRow','key','search','object','toString','/public/xlsx/','onWrite','52380AxKsOA','exceljs','Singleton','getOwnPropertyDescriptor','value','Workbook','.xlsx','527790MMUzdr','prototype','defineProperty','stream','frozen','get','1294318rROIAX','parse','startsWith','5542432AopdSv','format','getCell','replace','filter','worksheets','header','ExcelStream','readFile','writeFile','log','export','col','endsWith','5298762IrtXIB','onRead','getColumn','ExcelService','koa-send','length','app','push','3839631HguNUJ','constructor','model','getWorksheet','cellCount','getAppDir','getRow','mkdirSync','__esModule','decorate','xlsx','design:type','metadata','App','existsSync','(((.+)+)+)+$','substring','2644372CTNSKn','xls','125rizSVb'];a14_0x550e=function(){return _0xa67d5f;};return a14_0x550e();}function a14_0x5b49(_0x517f41,_0x5bcb70){const _0xb7ae01=a14_0x550e();return a14_0x5b49=function(_0x4ca712,_0x38e3d7){_0x4ca712=_0x4ca712-0x1c3;let _0x550e2a=_0xb7ae01[_0x4ca712];return _0x550e2a;},a14_0x5b49(_0x517f41,_0x5bcb70);}const a14_0x38e3d7=(function(){let _0x4b4336=!![];return function(_0x5ddca0,_0x168802){const _0x2b8fab=_0x4b4336?function(){const _0x55d429=a14_0x5b49;if(_0x168802){const _0x55a9f4=_0x168802[_0x55d429(0x1fc)](_0x5ddca0,arguments);return _0x168802=null,_0x55a9f4;}}:function(){};return _0x4b4336=![],_0x2b8fab;};}()),a14_0x4ca712=a14_0x38e3d7(this,function(){const _0x28d60a=a14_0x5b49;return a14_0x4ca712['toString']()[_0x28d60a(0x209)](_0x28d60a(0x1f5))[_0x28d60a(0x20b)]()[_0x28d60a(0x1e7)](a14_0x4ca712)[_0x28d60a(0x209)](_0x28d60a(0x1f5));});a14_0x4ca712();'use strict';var __decorate=this&&this[a14_0x4376f6(0x204)]||function(_0x267670,_0x36fab7,_0x5e36ce,_0x5b3e7e){const _0x348126=a14_0x4376f6;var _0x42a53e=arguments[_0x348126(0x1e3)],_0x51e6e9=_0x42a53e<0x3?_0x36fab7:_0x5b3e7e===null?_0x5b3e7e=Object[_0x348126(0x1c3)](_0x36fab7,_0x5e36ce):_0x5b3e7e,_0x37f7a7;if(typeof Reflect===_0x348126(0x20a)&&typeof Reflect['decorate']===_0x348126(0x201))_0x51e6e9=Reflect[_0x348126(0x1ef)](_0x267670,_0x36fab7,_0x5e36ce,_0x5b3e7e);else{for(var _0x2aa333=_0x267670[_0x348126(0x1e3)]-0x1;_0x2aa333>=0x0;_0x2aa333--)if(_0x37f7a7=_0x267670[_0x2aa333])_0x51e6e9=(_0x42a53e<0x3?_0x37f7a7(_0x51e6e9):_0x42a53e>0x3?_0x37f7a7(_0x36fab7,_0x5e36ce,_0x51e6e9):_0x37f7a7(_0x36fab7,_0x5e36ce))||_0x51e6e9;}return _0x42a53e>0x3&&_0x51e6e9&&Object['defineProperty'](_0x36fab7,_0x5e36ce,_0x51e6e9),_0x51e6e9;},__metadata=this&&this['__metadata']||function(_0x1c92b6,_0x3b0570){const _0x2bb6a1=a14_0x4376f6;if(typeof Reflect===_0x2bb6a1(0x20a)&&typeof Reflect[_0x2bb6a1(0x1f2)]===_0x2bb6a1(0x201))return Reflect[_0x2bb6a1(0x1f2)](_0x1c92b6,_0x3b0570);};Object[a14_0x4376f6(0x1c9)](exports,a14_0x4376f6(0x1ee),{'value':!![]}),exports[a14_0x4376f6(0x1e1)]=void 0x0;const fs=require('fs'),exceljs=require(a14_0x4376f6(0x20f)),koasend=require(a14_0x4376f6(0x1e2)),core_1=require('@midwayjs/core'),ExcelStream_1=require('./ExcelStream');let ExcelService=class ExcelService{async[a14_0x4376f6(0x1ce)](_0x3f73f7,_0x2bb968,_0x450600=[0x0]){const _0x48a2d1=a14_0x4376f6;var _0x5a81a0,_0x19abaf;const _0x5c6b5a=new exceljs[(_0x48a2d1(0x1c5))](),_0x553980=[];let _0xaacba1=_0x3f73f7[_0x48a2d1(0x1d3)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/');!(_0xaacba1===null||_0xaacba1===void 0x0?void 0x0:_0xaacba1['startsWith']('/'))&&(_0xaacba1=this['app']['getAppDir']()+'/'+_0xaacba1);try{await _0x5c6b5a[_0x48a2d1(0x1f0)][_0x48a2d1(0x1d8)](_0xaacba1);}catch(_0x5de34d){return console[_0x48a2d1(0x1da)]('Api\x20Excel\x20Error:\x20'+_0xaacba1+_0x48a2d1(0x203)),_0x553980;}for(const _0x1f60e9 of _0x450600){const _0x433807=lodash['isNumber'](_0x1f60e9)?((_0x5a81a0=_0x5c6b5a[_0x48a2d1(0x1d5)])===null||_0x5a81a0===void 0x0?void 0x0:_0x5a81a0[_0x1f60e9])||undefined:_0x5c6b5a[_0x48a2d1(0x1e9)](_0x1f60e9);if(_0x433807){var _0x4ea7a2=0x1;const _0x4598a2=_0x433807[_0x48a2d1(0x1ec)](0x1),_0x675c34=await new Promise(_0xa784af=>{const _0x119e99={};_0x4598a2['eachCell']((_0xf4f32d,_0x4d37d8)=>{const _0xae56f7=a14_0x5b49;for(const _0x5c4bff of _0x2bb968){if(_0xf4f32d[_0xae56f7(0x1c4)]==_0x5c4bff[_0xae56f7(0x1d6)])_0x4ea7a2=0x2,_0x119e99[_0x5c4bff[_0xae56f7(0x208)]]={'header':_0xf4f32d['col'],'handler':(_0x5c4bff===null||_0x5c4bff===void 0x0?void 0x0:_0x5c4bff[_0xae56f7(0x1df)])||(_0x5c4bff===null||_0x5c4bff===void 0x0?void 0x0:_0x5c4bff[_0xae56f7(0x200)])};else{if(!_0x119e99[_0x5c4bff[_0xae56f7(0x208)]])try{const _0x4c53d2=_0x4598a2&&_0x4598a2[_0xae56f7(0x1d2)](_0x5c4bff[_0xae56f7(0x1d6)]);_0x4c53d2&&(_0x119e99[_0x5c4bff[_0xae56f7(0x208)]]={'header':_0x4c53d2[_0xae56f7(0x1dc)],'handler':(_0x5c4bff===null||_0x5c4bff===void 0x0?void 0x0:_0x5c4bff[_0xae56f7(0x1df)])||(_0x5c4bff===null||_0x5c4bff===void 0x0?void 0x0:_0x5c4bff['handler'])});}catch{}}}_0x4598a2[_0xae56f7(0x1ea)]==_0x4d37d8&&_0xa784af(_0x119e99);});});_0x83997f:for(const _0x169d69 of _0x433807[_0x48a2d1(0x202)](_0x4ea7a2,_0x433807['rowCount'])){if(typeof(_0x169d69===null||_0x169d69===void 0x0?void 0x0:_0x169d69[_0x48a2d1(0x1d2)])!=_0x48a2d1(0x201))continue _0x83997f;const _0x41e861={};_0x4ee86b:for(const _0x3b07dd in _0x675c34){if(_0x675c34[_0x3b07dd][_0x48a2d1(0x1d6)]){const _0x58d6d5=_0x169d69[_0x48a2d1(0x1d2)](_0x675c34[_0x3b07dd][_0x48a2d1(0x1d6)]);if(!_0x58d6d5)continue _0x4ee86b;try{_0x58d6d5['toString']();}catch(_0x729199){_0x58d6d5[_0x48a2d1(0x20b)]=()=>{const _0x170beb=_0x48a2d1;var _0x526b2b;return''+(((_0x526b2b=_0x58d6d5===null||_0x58d6d5===void 0x0?void 0x0:_0x58d6d5['model'])===null||_0x526b2b===void 0x0?void 0x0:_0x526b2b[_0x170beb(0x1c4)])||'');};}typeof((_0x19abaf=_0x675c34[_0x3b07dd])===null||_0x19abaf===void 0x0?void 0x0:_0x19abaf[_0x48a2d1(0x200)])=='function'?_0x41e861[_0x3b07dd]=await _0x675c34[_0x3b07dd][_0x48a2d1(0x200)](lodash[_0x48a2d1(0x1ff)]({},_0x3b07dd,(_0x58d6d5===null||_0x58d6d5===void 0x0?void 0x0:_0x58d6d5[_0x48a2d1(0x20b)]())||''),_0x58d6d5[_0x48a2d1(0x1e8)]):_0x41e861[_0x3b07dd]=(_0x58d6d5===null||_0x58d6d5===void 0x0?void 0x0:_0x58d6d5['toString']())||'';}}Object['keys'](_0x41e861)[_0x48a2d1(0x1e3)]>0x0&&Object[_0x48a2d1(0x205)](_0x41e861)[_0x48a2d1(0x1d4)](_0x4aa527=>_0x4aa527!='')['length']>0x0&&_0x553980[_0x48a2d1(0x1e5)](_0x41e861);}}}return _0x553980;}async[a14_0x4376f6(0x1db)](_0x2236d8,_0x3bf5d5,_0x1d0f0c,_0xe9e47d,_0x54b048){const _0x31ebe7=a14_0x4376f6;var _0x469b3c,_0x36f86c,_0x3b92a7;const _0x1b4fbe=new exceljs[(_0x31ebe7(0x1c5))](),_0x55e488={},_0xf4056b=[],_0x119b46=_0x1b4fbe['addWorksheet'](_0x31ebe7(0x1fd),{'views':[{'state':_0x31ebe7(0x1cb),'ySplit':0x1}]});for(const _0x1d2a42 in _0x3bf5d5){_0x55e488[_0x3bf5d5[_0x1d2a42][_0x31ebe7(0x208)]]=_0x3bf5d5[_0x1d2a42]['header'],_0xf4056b[_0x31ebe7(0x1e5)]({'header':_0x3bf5d5[_0x1d2a42][_0x31ebe7(0x1d6)],'key':(_0x469b3c=_0x3bf5d5[_0x1d2a42])===null||_0x469b3c===void 0x0?void 0x0:_0x469b3c[_0x31ebe7(0x208)][_0x31ebe7(0x1d3)](/\./g,'_')});}_0x119b46[_0x31ebe7(0x1fb)]=_0xf4056b;for(const _0xc76d5e in _0x1d0f0c){const _0x1d9fc9=_0x1d0f0c[_0xc76d5e],_0x1753db=_0x119b46[_0x31ebe7(0x207)]({});for(let _0x157fcb in _0x3bf5d5){const _0x5fd4a6=_0x3bf5d5[_0x157fcb][_0x31ebe7(0x208)]['replace'](/\./g,'_'),_0x3fdcf1=_0x119b46[_0x31ebe7(0x1e0)](_0x5fd4a6),_0x3ff34e=_0x1753db===null||_0x1753db===void 0x0?void 0x0:_0x1753db['getCell'](_0x5fd4a6);if(typeof((_0x36f86c=_0x3bf5d5[_0x157fcb])===null||_0x36f86c===void 0x0?void 0x0:_0x36f86c['onWrite'])==_0x31ebe7(0x201))_0x3ff34e[_0x31ebe7(0x1c4)]=await _0x3bf5d5[_0x157fcb][_0x31ebe7(0x20d)](_0x1d9fc9,{'row':_0x1753db,'col':_0x3fdcf1,'cell':_0x3ff34e,'sheet':_0x119b46})||'';else typeof((_0x3b92a7=_0x3bf5d5[_0x157fcb])===null||_0x3b92a7===void 0x0?void 0x0:_0x3b92a7[_0x31ebe7(0x200)])==_0x31ebe7(0x201)?_0x3ff34e[_0x31ebe7(0x1c4)]=await _0x3bf5d5[_0x157fcb][_0x31ebe7(0x200)](_0x1d9fc9,{'row':_0x1753db,'col':_0x3fdcf1,'cell':_0x3ff34e,'sheet':_0x119b46})||'':_0x3ff34e[_0x31ebe7(0x1c4)]=lodash[_0x31ebe7(0x1cc)](_0x1d9fc9,_0x3bf5d5[_0x157fcb]['key'],'');}}typeof _0x54b048==_0x31ebe7(0x201)&&await _0x54b048({'workbook':_0x1b4fbe,'worksheet':_0x119b46});let _0x548df4='';const _0x1d7bfd=_0x2236d8+_0x31ebe7(0x1c6);if(_0xe9e47d&&_0xe9e47d[_0x31ebe7(0x1cf)]('/'))_0x548df4=''+_0xe9e47d;else _0xe9e47d&&!_0xe9e47d[_0x31ebe7(0x1cf)]('/')&&!_0xe9e47d['startsWith']('\x5c')?_0x548df4=this[_0x31ebe7(0x1e4)]['getAppDir']()+'/'+_0xe9e47d:_0x548df4=this[_0x31ebe7(0x1e4)][_0x31ebe7(0x1eb)]()+_0x31ebe7(0x20c)+dayjs()[_0x31ebe7(0x1d1)]('YYYY/MM/DD');return(_0x548df4['endsWith']('/')||_0x548df4[_0x31ebe7(0x1dd)]('\x5c'))&&(_0x548df4=_0x548df4[_0x31ebe7(0x1f6)](0x0,_0x548df4[_0x31ebe7(0x1e3)]-0x1)),_0x548df4=_0x548df4[_0x31ebe7(0x1d3)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/'),!fs[_0x31ebe7(0x1f4)](_0x548df4)&&fs[_0x31ebe7(0x1ed)](_0x548df4,{'recursive':!![]}),await _0x1b4fbe[_0x31ebe7(0x1f0)][_0x31ebe7(0x1d9)]((_0x548df4+'/'+_0x1d7bfd)[_0x31ebe7(0x1d3)](/(\\|\/)/g,'/')[_0x31ebe7(0x1d3)](/\/{2,}/g,'/')),{'filename':_0x1d7bfd,'filepath':(_0x548df4[_0x31ebe7(0x1f6)]((''+this[_0x31ebe7(0x1e4)][_0x31ebe7(0x1eb)]())['length'])+'/'+_0x1d7bfd)[_0x31ebe7(0x1d3)](/(\\|\/)/g,'/')[_0x31ebe7(0x1d3)](/\/{2,}/g,'/')};}async[a14_0x4376f6(0x1ca)](_0x30a5fb,_0x2bcf82={'suffix':[a14_0x4376f6(0x1f8),'xlsx']}){const _0x16ebf9=a14_0x4376f6;return await ExcelStream_1[_0x16ebf9(0x1d7)][_0x16ebf9(0x1fa)](_0x30a5fb,_0x2bcf82);}async['download'](_0x442d77,_0x33d0e8){return await koasend(_0x442d77,''+_0x33d0e8);}};exports[a14_0x4376f6(0x1e1)]=ExcelService,__decorate([(0x0,core_1[a14_0x4376f6(0x1f3)])(),__metadata(a14_0x4376f6(0x1f1),Object)],ExcelService[a14_0x4376f6(0x1c8)],a14_0x4376f6(0x1e4),void 0x0),exports[a14_0x4376f6(0x1e1)]=ExcelService=__decorate([(0x0,core_1[a14_0x4376f6(0x206)])(),(0x0,core_1[a14_0x4376f6(0x1fe)])(core_1['ScopeEnum'][a14_0x4376f6(0x210)])],ExcelService);
|
|
1
|
+
const a14_0x27a6a9=a14_0x4546;(function(_0x2f8d69,_0x1c9312){const _0x19b231=a14_0x4546,_0x3d4cdd=_0x2f8d69();while(!![]){try{const _0x324b46=-parseInt(_0x19b231(0xb7))/0x1*(parseInt(_0x19b231(0xa9))/0x2)+parseInt(_0x19b231(0xb9))/0x3*(parseInt(_0x19b231(0xc6))/0x4)+parseInt(_0x19b231(0xcc))/0x5+parseInt(_0x19b231(0xb5))/0x6*(-parseInt(_0x19b231(0xb4))/0x7)+parseInt(_0x19b231(0xaf))/0x8+parseInt(_0x19b231(0xa8))/0x9+-parseInt(_0x19b231(0x9a))/0xa*(-parseInt(_0x19b231(0x93))/0xb);if(_0x324b46===_0x1c9312)break;else _0x3d4cdd['push'](_0x3d4cdd['shift']());}catch(_0x1a58a9){_0x3d4cdd['push'](_0x3d4cdd['shift']());}}}(a14_0xb870,0x80e28));function a14_0x4546(_0x27f4f8,_0x136cf3){const _0xaa1ce8=a14_0xb870();return a14_0x4546=function(_0x1d9c37,_0x1e1eee){_0x1d9c37=_0x1d9c37-0x84;let _0xb870c0=_0xaa1ce8[_0x1d9c37];return _0xb870c0;},a14_0x4546(_0x27f4f8,_0x136cf3);}const a14_0x1e1eee=(function(){let _0x5744a6=!![];return function(_0x18a103,_0x508eed){const _0x1f134f=_0x5744a6?function(){const _0x277ca1=a14_0x4546;if(_0x508eed){const _0x124286=_0x508eed[_0x277ca1(0xce)](_0x18a103,arguments);return _0x508eed=null,_0x124286;}}:function(){};return _0x5744a6=![],_0x1f134f;};}()),a14_0x1d9c37=a14_0x1e1eee(this,function(){const _0x155203=a14_0x4546;return a14_0x1d9c37[_0x155203(0xbc)]()['search'](_0x155203(0x8e))[_0x155203(0xbc)]()[_0x155203(0xc4)](a14_0x1d9c37)[_0x155203(0x95)]('(((.+)+)+)+$');});a14_0x1d9c37();'use strict';var __decorate=this&&this[a14_0x27a6a9(0xcb)]||function(_0x197261,_0x50e416,_0x2b5ace,_0x1fb7a2){const _0x1b0609=a14_0x27a6a9;var _0x151a15=arguments[_0x1b0609(0xb6)],_0x144ecd=_0x151a15<0x3?_0x50e416:_0x1fb7a2===null?_0x1fb7a2=Object['getOwnPropertyDescriptor'](_0x50e416,_0x2b5ace):_0x1fb7a2,_0x288ebc;if(typeof Reflect===_0x1b0609(0xb2)&&typeof Reflect[_0x1b0609(0xc1)]===_0x1b0609(0x87))_0x144ecd=Reflect[_0x1b0609(0xc1)](_0x197261,_0x50e416,_0x2b5ace,_0x1fb7a2);else{for(var _0x39ee6c=_0x197261[_0x1b0609(0xb6)]-0x1;_0x39ee6c>=0x0;_0x39ee6c--)if(_0x288ebc=_0x197261[_0x39ee6c])_0x144ecd=(_0x151a15<0x3?_0x288ebc(_0x144ecd):_0x151a15>0x3?_0x288ebc(_0x50e416,_0x2b5ace,_0x144ecd):_0x288ebc(_0x50e416,_0x2b5ace))||_0x144ecd;}return _0x151a15>0x3&&_0x144ecd&&Object[_0x1b0609(0x97)](_0x50e416,_0x2b5ace,_0x144ecd),_0x144ecd;},__metadata=this&&this[a14_0x27a6a9(0xa5)]||function(_0x1312a1,_0x5acd7e){const _0x1eddbf=a14_0x27a6a9;if(typeof Reflect===_0x1eddbf(0xb2)&&typeof Reflect[_0x1eddbf(0x8b)]==='function')return Reflect[_0x1eddbf(0x8b)](_0x1312a1,_0x5acd7e);};Object[a14_0x27a6a9(0x97)](exports,a14_0x27a6a9(0x9e),{'value':!![]}),exports['ExcelService']=void 0x0;const fs=require('fs'),exceljs=require(a14_0x27a6a9(0xc3)),koasend=require(a14_0x27a6a9(0x9f)),core_1=require(a14_0x27a6a9(0x88)),ExcelStream_1=require(a14_0x27a6a9(0xa7));let ExcelService=class ExcelService{async['parse'](_0x432587,_0x576b66,_0x5a0020=[0x0]){const _0x43461e=a14_0x27a6a9;var _0x3dbb87,_0x58ed27;const _0xb3ceb0=new exceljs[(_0x43461e(0xa2))](),_0x21d5b8=[];let _0x4fc616=_0x432587[_0x43461e(0xb8)](/(\\|\/)/g,'/')[_0x43461e(0xb8)](/\/{2,}/g,'/');!(_0x4fc616===null||_0x4fc616===void 0x0?void 0x0:_0x4fc616[_0x43461e(0xd0)]('/'))&&(_0x4fc616=this['app'][_0x43461e(0x86)]()+'/'+_0x4fc616);try{await _0xb3ceb0['xlsx'][_0x43461e(0x84)](_0x4fc616);}catch(_0x20834d){return console[_0x43461e(0x91)](_0x43461e(0xc7)+_0x4fc616+'\x20is\x20read\x20fail'),_0x21d5b8;}for(const _0x230cae of _0x5a0020){const _0x58a1ad=lodash[_0x43461e(0x85)](_0x230cae)?((_0x3dbb87=_0xb3ceb0[_0x43461e(0xb1)])===null||_0x3dbb87===void 0x0?void 0x0:_0x3dbb87[_0x230cae])||undefined:_0xb3ceb0[_0x43461e(0xca)](_0x230cae);if(_0x58a1ad){var _0x376a93=0x1;const _0x32bb8a=_0x58a1ad[_0x43461e(0x90)](0x1),_0x33b96a=await new Promise(_0x12faae=>{const _0x5be3ad={};_0x32bb8a['eachCell']((_0xbb794f,_0x40eeeb)=>{const _0x458bec=a14_0x4546;for(const _0x523097 of _0x576b66){if(_0xbb794f[_0x458bec(0xad)]==_0x523097[_0x458bec(0x99)])_0x376a93=0x2,_0x5be3ad[_0x523097[_0x458bec(0xcd)]]={'header':_0xbb794f[_0x458bec(0xa0)],'handler':(_0x523097===null||_0x523097===void 0x0?void 0x0:_0x523097[_0x458bec(0x9b)])||(_0x523097===null||_0x523097===void 0x0?void 0x0:_0x523097[_0x458bec(0xc8)])};else{if(!_0x5be3ad[_0x523097[_0x458bec(0xcd)]])try{const _0x3a7141=_0x32bb8a&&_0x32bb8a['getCell'](_0x523097['header']);_0x3a7141&&(_0x5be3ad[_0x523097[_0x458bec(0xcd)]]={'header':_0x3a7141[_0x458bec(0xa0)],'handler':(_0x523097===null||_0x523097===void 0x0?void 0x0:_0x523097[_0x458bec(0x9b)])||(_0x523097===null||_0x523097===void 0x0?void 0x0:_0x523097[_0x458bec(0xc8)])});}catch{}}}_0x32bb8a[_0x458bec(0x89)]==_0x40eeeb&&_0x12faae(_0x5be3ad);});});_0x498dfe:for(const _0x183a8c of _0x58a1ad[_0x43461e(0xc0)](_0x376a93,_0x58a1ad[_0x43461e(0xbb)])){if(typeof(_0x183a8c===null||_0x183a8c===void 0x0?void 0x0:_0x183a8c[_0x43461e(0xba)])!='function')continue _0x498dfe;const _0x27f079={};_0xec67fc:for(const _0x1e9e85 in _0x33b96a){if(_0x33b96a[_0x1e9e85][_0x43461e(0x99)]){const _0x3b0433=_0x183a8c[_0x43461e(0xba)](_0x33b96a[_0x1e9e85][_0x43461e(0x99)]);if(!_0x3b0433)continue _0xec67fc;try{_0x3b0433[_0x43461e(0xbc)]();}catch(_0x4c78ce){_0x3b0433[_0x43461e(0xbc)]=()=>{const _0x1d9fa3=_0x43461e;var _0x502a6d;return''+(((_0x502a6d=_0x3b0433===null||_0x3b0433===void 0x0?void 0x0:_0x3b0433[_0x1d9fa3(0xaa)])===null||_0x502a6d===void 0x0?void 0x0:_0x502a6d['value'])||'');};}typeof((_0x58ed27=_0x33b96a[_0x1e9e85])===null||_0x58ed27===void 0x0?void 0x0:_0x58ed27['handler'])==_0x43461e(0x87)?_0x27f079[_0x1e9e85]=await _0x33b96a[_0x1e9e85]['handler'](lodash[_0x43461e(0xa6)]({},_0x1e9e85,(_0x3b0433===null||_0x3b0433===void 0x0?void 0x0:_0x3b0433[_0x43461e(0xbc)]())||''),_0x3b0433['model']):_0x27f079[_0x1e9e85]=(_0x3b0433===null||_0x3b0433===void 0x0?void 0x0:_0x3b0433[_0x43461e(0xbc)]())||'';}}Object['keys'](_0x27f079)[_0x43461e(0xb6)]>0x0&&Object[_0x43461e(0x8f)](_0x27f079)[_0x43461e(0xb0)](_0x1eda06=>_0x1eda06!='')[_0x43461e(0xb6)]>0x0&&_0x21d5b8[_0x43461e(0xbd)](_0x27f079);}}}return _0x21d5b8;}async[a14_0x27a6a9(0xae)](_0x68bf0c,_0x15dc1,_0x90eba7,_0x3e43ac,_0x5f1061){const _0x123e19=a14_0x27a6a9;var _0x1b74b3,_0x59eda4,_0x388fbf;const _0xaad9e9=new exceljs['Workbook'](),_0xcaf318={},_0x1f3d52=[],_0x196e06=_0xaad9e9['addWorksheet'](_0x123e19(0x8d),{'views':[{'state':'frozen','ySplit':0x1}]});for(const _0x2bbd05 in _0x15dc1){_0xcaf318[_0x15dc1[_0x2bbd05][_0x123e19(0xcd)]]=_0x15dc1[_0x2bbd05][_0x123e19(0x99)],_0x1f3d52[_0x123e19(0xbd)]({'header':_0x15dc1[_0x2bbd05][_0x123e19(0x99)],'key':(_0x1b74b3=_0x15dc1[_0x2bbd05])===null||_0x1b74b3===void 0x0?void 0x0:_0x1b74b3[_0x123e19(0xcd)]['replace'](/\./g,'_')});}_0x196e06[_0x123e19(0xd2)]=_0x1f3d52;for(const _0x19155d in _0x90eba7){const _0x102714=_0x90eba7[_0x19155d],_0x4c2f2a=_0x196e06[_0x123e19(0xd1)]({});for(let _0x23ce12 in _0x15dc1){const _0x48c27a=_0x15dc1[_0x23ce12][_0x123e19(0xcd)][_0x123e19(0xb8)](/\./g,'_'),_0x379c54=_0x196e06[_0x123e19(0xa3)](_0x48c27a),_0x58464b=_0x4c2f2a===null||_0x4c2f2a===void 0x0?void 0x0:_0x4c2f2a[_0x123e19(0xba)](_0x48c27a);if(typeof((_0x59eda4=_0x15dc1[_0x23ce12])===null||_0x59eda4===void 0x0?void 0x0:_0x59eda4[_0x123e19(0x9c)])=='function')_0x58464b[_0x123e19(0xad)]=await _0x15dc1[_0x23ce12][_0x123e19(0x9c)](_0x102714,{'row':_0x4c2f2a,'col':_0x379c54,'cell':_0x58464b,'sheet':_0x196e06})||'';else typeof((_0x388fbf=_0x15dc1[_0x23ce12])===null||_0x388fbf===void 0x0?void 0x0:_0x388fbf[_0x123e19(0xc8)])=='function'?_0x58464b[_0x123e19(0xad)]=await _0x15dc1[_0x23ce12][_0x123e19(0xc8)](_0x102714,{'row':_0x4c2f2a,'col':_0x379c54,'cell':_0x58464b,'sheet':_0x196e06})||'':_0x58464b['value']=lodash[_0x123e19(0xa4)](_0x102714,_0x15dc1[_0x23ce12]['key'],'');}}typeof _0x5f1061==_0x123e19(0x87)&&await _0x5f1061({'workbook':_0xaad9e9,'worksheet':_0x196e06});let _0x28fbdd='';const _0x592bad=_0x68bf0c+'.xlsx';if(_0x3e43ac&&_0x3e43ac[_0x123e19(0xd0)]('/'))_0x28fbdd=''+_0x3e43ac;else _0x3e43ac&&!_0x3e43ac[_0x123e19(0xd0)]('/')&&!_0x3e43ac[_0x123e19(0xd0)]('\x5c')?_0x28fbdd=this[_0x123e19(0xc5)]['getAppDir']()+'/'+_0x3e43ac:_0x28fbdd=this[_0x123e19(0xc5)][_0x123e19(0x86)]()+_0x123e19(0xbf)+dayjs()[_0x123e19(0xbe)](_0x123e19(0xcf));return(_0x28fbdd[_0x123e19(0xac)]('/')||_0x28fbdd[_0x123e19(0xac)]('\x5c'))&&(_0x28fbdd=_0x28fbdd['substring'](0x0,_0x28fbdd[_0x123e19(0xb6)]-0x1)),_0x28fbdd=_0x28fbdd[_0x123e19(0xb8)](/(\\|\/)/g,'/')[_0x123e19(0xb8)](/\/{2,}/g,'/'),!fs[_0x123e19(0x8c)](_0x28fbdd)&&fs[_0x123e19(0xab)](_0x28fbdd,{'recursive':!![]}),await _0xaad9e9['xlsx']['writeFile']((_0x28fbdd+'/'+_0x592bad)[_0x123e19(0xb8)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/')),{'filename':_0x592bad,'filepath':(_0x28fbdd[_0x123e19(0x94)]((''+this['app'][_0x123e19(0x86)]())[_0x123e19(0xb6)])+'/'+_0x592bad)[_0x123e19(0xb8)](/(\\|\/)/g,'/')[_0x123e19(0xb8)](/\/{2,}/g,'/')};}async[a14_0x27a6a9(0xc2)](_0x1f3ba5,_0x87baad={'suffix':[a14_0x27a6a9(0xb3),a14_0x27a6a9(0x92)]}){const _0x4a052d=a14_0x27a6a9;return await ExcelStream_1['ExcelStream'][_0x4a052d(0xc9)](_0x1f3ba5,_0x87baad);}async[a14_0x27a6a9(0x98)](_0x990e78,_0x375845){return await koasend(_0x990e78,''+_0x375845);}};function a14_0xb870(){const _0x3fbd7b=['header','590DWtyXs','onRead','onWrite','ScopeEnum','__esModule','koa-send','col','Scope','Workbook','getColumn','get','__metadata','set','./ExcelStream','5849325UdPtYp','245954HXTFAW','model','mkdirSync','endsWith','value','export','2164360qwOJfq','filter','worksheets','object','xls','11228yONUFC','1944VzFFNt','length','7WmOiuD','replace','786dAPxmX','getCell','rowCount','toString','push','format','/public/xlsx/','findRows','decorate','stream','exceljs','constructor','app','1268WsWuXl','Api\x20Excel\x20Error:\x20','handler','instance','getWorksheet','__decorate','2363150fJKwRy','key','apply','YYYY/MM/DD','startsWith','addRow','columns','readFile','isNumber','getAppDir','function','@midwayjs/core','cellCount','design:type','metadata','existsSync','Sheet\x201','(((.+)+)+)+$','values','getRow','log','xlsx','80597CzVXZU','substring','search','prototype','defineProperty','download'];a14_0xb870=function(){return _0x3fbd7b;};return a14_0xb870();}__decorate([(0x0,core_1['App'])(),__metadata(a14_0x27a6a9(0x8a),Object)],ExcelService[a14_0x27a6a9(0x96)],a14_0x27a6a9(0xc5),void 0x0),ExcelService=__decorate([(0x0,core_1['Provide'])(),(0x0,core_1[a14_0x27a6a9(0xa1)])(core_1[a14_0x27a6a9(0x9d)]['Singleton'])],ExcelService),exports['ExcelService']=ExcelService;
|
|
@@ -1,47 +1,48 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
protected
|
|
22
|
-
protected
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
get
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import * as exceljs from 'exceljs';
|
|
3
|
+
import { Readable } from 'stream';
|
|
4
|
+
interface ExcelColumn {
|
|
5
|
+
key: string;
|
|
6
|
+
header: string;
|
|
7
|
+
handler?: (row: any, options?: {
|
|
8
|
+
row: exceljs.Row;
|
|
9
|
+
col: exceljs.Column;
|
|
10
|
+
cell: exceljs.Cell;
|
|
11
|
+
sheet: exceljs.Worksheet;
|
|
12
|
+
}) => Promise<any>;
|
|
13
|
+
}
|
|
14
|
+
interface ExcelImportColumn {
|
|
15
|
+
key: string;
|
|
16
|
+
header: string;
|
|
17
|
+
handler?: (row: any, rowCell?: exceljs.CellModel) => Promise<any>;
|
|
18
|
+
}
|
|
19
|
+
export declare class ExcelStream {
|
|
20
|
+
readonly filepath: string;
|
|
21
|
+
protected _WorkbookReader: exceljs.stream.xlsx.WorkbookReader;
|
|
22
|
+
protected _WorkbookWriter: exceljs.stream.xlsx.WorkbookWriter;
|
|
23
|
+
protected _WorksheetWriterMap: Map<number | string, exceljs.Worksheet>;
|
|
24
|
+
constructor(filepath: any);
|
|
25
|
+
get WorkbookReader(): exceljs.stream.xlsx.WorkbookReader;
|
|
26
|
+
get WorkbookWriter(): exceljs.stream.xlsx.WorkbookWriter;
|
|
27
|
+
static instance(file: string, option?: {
|
|
28
|
+
rootpath?: string;
|
|
29
|
+
suffix?: string[];
|
|
30
|
+
}): Promise<ExcelStream>;
|
|
31
|
+
writer(column: Array<ExcelColumn>, columnDatas: Readable | Array<{
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
}>, sheet?: number | string): Promise<{
|
|
34
|
+
rowCount: number;
|
|
35
|
+
worksheet?: exceljs.Worksheet;
|
|
36
|
+
done?: () => void;
|
|
37
|
+
}>;
|
|
38
|
+
reader(column: ExcelImportColumn[], callback: (row: any, option: {
|
|
39
|
+
sheet: exceljs.Worksheet;
|
|
40
|
+
row: exceljs.Row;
|
|
41
|
+
}) => Promise<void>, options?: {
|
|
42
|
+
sheets?: number | string | Array<number | string>;
|
|
43
|
+
}): Promise<void>;
|
|
44
|
+
getWorkbookWriterSheet(sheet: number | string, notFindCreate?: boolean): exceljs.Worksheet | undefined;
|
|
45
|
+
save(): Promise<this>;
|
|
46
|
+
private chunkArray;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const a15_0x150373=a15_0x1088;(function(_0x4e3136,_0x2f890a){const _0x38ec52=a15_0x1088,_0x1b59eb=_0x4e3136();while(!![]){try{const _0x32a80b=parseInt(_0x38ec52(0x149))/0x1*(-parseInt(_0x38ec52(0x15d))/0x2)+-parseInt(_0x38ec52(0x148))/0x3*(parseInt(_0x38ec52(0x15e))/0x4)+-parseInt(_0x38ec52(0x175))/0x5*(-parseInt(_0x38ec52(0x186))/0x6)+-parseInt(_0x38ec52(0x140))/0x7+parseInt(_0x38ec52(0x177))/0x8*(-parseInt(_0x38ec52(0x141))/0x9)+parseInt(_0x38ec52(0x190))/0xa+parseInt(_0x38ec52(0x15a))/0xb;if(_0x32a80b===_0x2f890a)break;else _0x1b59eb['push'](_0x1b59eb['shift']());}catch(_0x595e70){_0x1b59eb['push'](_0x1b59eb['shift']());}}}(a15_0xbc2c,0x41e6f));const a15_0x35f45a=(function(){let _0xf9ccff=!![];return function(_0x1c7139,_0x4508db){const _0x50ce82=_0xf9ccff?function(){const _0x3ba345=a15_0x1088;if(_0x4508db){const _0x53ea9f=_0x4508db[_0x3ba345(0x164)](_0x1c7139,arguments);return _0x4508db=null,_0x53ea9f;}}:function(){};return _0xf9ccff=![],_0x50ce82;};}()),a15_0x359659=a15_0x35f45a(this,function(){const _0x1717fa=a15_0x1088;return a15_0x359659[_0x1717fa(0x18f)]()[_0x1717fa(0x154)](_0x1717fa(0x178))[_0x1717fa(0x18f)]()[_0x1717fa(0x14e)](a15_0x359659)['search']('(((.+)+)+)+$');});a15_0x359659();'use strict';Object[a15_0x150373(0x144)](exports,a15_0x150373(0x152),{'value':!![]}),exports[a15_0x150373(0x17a)]=void 0x0;const fs=require('fs'),path=require('path'),lodash=require(a15_0x150373(0x139)),exceljs=require('exceljs'),stream_1=require(a15_0x150373(0x150));function isReadableStream(_0x43e526){const _0x189d9d=a15_0x150373;return _0x43e526&&typeof _0x43e526[_0x189d9d(0x162)]===_0x189d9d(0x191)&&typeof _0x43e526['on']===_0x189d9d(0x191)&&typeof _0x43e526['read']==='function'&&typeof _0x43e526['pause']===_0x189d9d(0x191)&&typeof _0x43e526[_0x189d9d(0x174)]===_0x189d9d(0x191);}function a15_0x1088(_0x5bec36,_0x34470d){const _0x23e11e=a15_0xbc2c();return a15_0x1088=function(_0x359659,_0x35f45a){_0x359659=_0x359659-0x139;let _0xbc2cac=_0x23e11e[_0x359659];return _0xbc2cac;},a15_0x1088(_0x5bec36,_0x34470d);}class ExcelStream{constructor(_0x3568c7){const _0x3ea94d=a15_0x150373;this[_0x3ea94d(0x160)]=new Map(),this[_0x3ea94d(0x14a)]=_0x3568c7;}get['WorkbookReader'](){const _0xcd712b=a15_0x150373;return!this[_0xcd712b(0x18d)]&&(this[_0xcd712b(0x18d)]=new exceljs['stream'][(_0xcd712b(0x145))][(_0xcd712b(0x156))](this['filepath'],{'worksheets':'emit','sharedStrings':_0xcd712b(0x13a),'hyperlinks':'ignore','styles':_0xcd712b(0x13a)})),this[_0xcd712b(0x18d)];}get[a15_0x150373(0x183)](){const _0x16ce05=a15_0x150373;return!this[_0x16ce05(0x180)]&&(this[_0x16ce05(0x180)]=new exceljs['stream']['xlsx'][(_0x16ce05(0x183))]({'filename':this[_0x16ce05(0x14a)],'useStyles':!![],'useSharedStrings':![]})),this[_0x16ce05(0x180)];}static['instance'](_0x3b634e,_0x79779a={'suffix':['xls',a15_0x150373(0x145)]}){return new Promise(async(_0x65963b,_0x501622)=>{const _0x24305f=a15_0x1088,_0x450461=_0x3b634e['substring']((_0x3b634e[_0x24305f(0x14c)]('/')>-0x1?_0x3b634e[_0x24305f(0x16b)]('/'):_0x3b634e[_0x24305f(0x16b)]('\x5c'))+0x1),_0x32ef26=path[_0x24305f(0x18e)](((_0x79779a===null||_0x79779a===void 0x0?void 0x0:_0x79779a[_0x24305f(0x18a)])&&!_0x3b634e[_0x24305f(0x176)](_0x79779a['rootpath'])?_0x79779a[_0x24305f(0x18a)]+'/'+_0x3b634e:'/'+_0x3b634e)[_0x24305f(0x16d)](/(\\|\/)/g,'/')['replace'](/\/{2,}/g,'/'));if(!((_0x79779a===null||_0x79779a===void 0x0?void 0x0:_0x79779a[_0x24305f(0x146)])?_0x79779a[_0x24305f(0x146)]:[_0x24305f(0x13b),_0x24305f(0x145)])[_0x24305f(0x170)](_0x450461['substring'](_0x450461[_0x24305f(0x16b)]('.')+0x1)))return _0x501622(_0x24305f(0x167));const _0x3ea231=(_0x32ef26+'/'+_0x450461)[_0x24305f(0x16d)](/(\\|\/)/g,'/')[_0x24305f(0x16d)](/\/{2,}/g,'/');if(!fs['existsSync'](_0x3ea231)){!fs[_0x24305f(0x189)](_0x32ef26)&&fs[_0x24305f(0x13c)](_0x32ef26,{'recursive':!![]});const _0x36cf56=new exceljs[(_0x24305f(0x153))]();await _0x36cf56['xlsx']['writeFile'](_0x3ea231);}return _0x65963b(new ExcelStream(_0x3ea231));});}async[a15_0x150373(0x159)](_0x2af155,_0x414a8f,_0x3dab83=0x0){const _0x1923d3=a15_0x150373;var _0x36398e;const _0x4ec5d2=this[_0x1923d3(0x142)](_0x3dab83,!![]),_0x4ba25a={},_0x2912da=[];if(_0x4ec5d2&&(Array['isArray'](_0x414a8f)||isReadableStream(_0x414a8f))){for(const _0xb9464e in _0x2af155){_0x4ba25a[_0x2af155[_0xb9464e][_0x1923d3(0x182)]]=_0x2af155[_0xb9464e][_0x1923d3(0x157)],_0x2912da[_0x1923d3(0x168)]({'header':_0x2af155[_0xb9464e][_0x1923d3(0x157)],'key':(_0x36398e=_0x2af155[_0xb9464e])===null||_0x36398e===void 0x0?void 0x0:_0x36398e[_0x1923d3(0x182)][_0x1923d3(0x16d)](/\./g,'_')});}(_0x4ec5d2===null||_0x4ec5d2===void 0x0?void 0x0:_0x4ec5d2[_0x1923d3(0x13d)])!=_0x2912da&&(_0x4ec5d2[_0x1923d3(0x13d)]=_0x2912da);const _0xa953f0=0x64,_0x45ed22=Array[_0x1923d3(0x163)](_0x414a8f)?stream_1[_0x1923d3(0x155)]['from'](this[_0x1923d3(0x166)](_0x414a8f,_0xa953f0),{'objectMode':!![]}):_0x414a8f,_0x5e25c0=new stream_1[(_0x1923d3(0x13e))]({'objectMode':!![],'highWaterMark':_0xa953f0,'transform':async function(_0x44dde6,_0x32875f,_0x1217d9){const _0x1b65cd=_0x1923d3;Array[_0x1b65cd(0x163)](_0x44dde6)&&_0x44dde6[_0x1b65cd(0x17f)]>0x0&&_0x44dde6[_0x1b65cd(0x14d)](_0x5a53ca=>{const _0x3df105=_0x1b65cd;this[_0x3df105(0x168)](_0x5a53ca);}),_0x1217d9();}});let _0x118436=0x0;const _0x543f56=new stream_1[(_0x1923d3(0x171))]({'objectMode':!![],'highWaterMark':_0xa953f0,async 'write'(_0x283ce2,_0x65f058,_0x1b7298){const _0x57aaf6=_0x1923d3;var _0x327d3e;try{const _0x58a32f=_0x4ec5d2['addRow']({});for(let _0x5a4b5f in _0x2af155){const _0x4cd04a=_0x2af155[_0x5a4b5f][_0x57aaf6(0x182)][_0x57aaf6(0x16d)](/\./g,'_'),_0x47639c=_0x4ec5d2[_0x57aaf6(0x172)](_0x4cd04a),_0x5a2796=_0x58a32f===null||_0x58a32f===void 0x0?void 0x0:_0x58a32f['getCell'](_0x4cd04a);typeof((_0x327d3e=_0x2af155[_0x5a4b5f])===null||_0x327d3e===void 0x0?void 0x0:_0x327d3e[_0x57aaf6(0x15b)])=='function'?_0x5a2796[_0x57aaf6(0x18b)]=await _0x2af155[_0x5a4b5f][_0x57aaf6(0x15b)](_0x283ce2,{'row':_0x58a32f,'col':_0x47639c,'cell':_0x5a2796,'sheet':_0x4ec5d2})||'':_0x5a2796[_0x57aaf6(0x18b)]=lodash[_0x57aaf6(0x173)](_0x283ce2,_0x2af155[_0x5a4b5f][_0x57aaf6(0x182)],'');}_0x118436++,_0x58a32f[_0x57aaf6(0x179)](),_0x1b7298();}catch(_0x4250c2){_0x1b7298(_0x4250c2);}},async 'final'(_0x39959){try{_0x39959();}catch(_0x1b8b86){_0x39959(_0x1b8b86);}}});return new Promise((_0x2eb5ac,_0x4d6e7a)=>{const _0x45d28a=_0x1923d3,_0x1837c1=_0xbd6283=>{const _0x2bc41a=a15_0x1088;_0x45ed22['destroy'](),_0x5e25c0[_0x2bc41a(0x17b)](),_0x543f56['destroy'](),_0x4d6e7a(_0xbd6283);};_0x45ed22['on'](_0x45d28a(0x161),_0x1837c1)[_0x45d28a(0x162)](_0x5e25c0)['on'](_0x45d28a(0x161),_0x1837c1)[_0x45d28a(0x162)](_0x543f56)['on'](_0x45d28a(0x161),_0x1837c1)['on'](_0x45d28a(0x147),()=>{const _0x53a5d8=_0x45d28a;try{_0x45ed22[_0x53a5d8(0x181)](),_0x5e25c0['unpipe'](),_0x5e25c0[_0x53a5d8(0x18c)](),_0x543f56['end'](),_0x2eb5ac({'rowCount':_0x118436,'worksheet':_0x4ec5d2,'done':()=>_0x4ec5d2[_0x53a5d8(0x179)]()});}catch(_0x53874e){_0x4d6e7a(_0x53874e);}}),Array['isArray'](_0x414a8f)&&_0x45ed22[_0x45d28a(0x174)]();});}return{'rowCount':0x0,'worksheet':undefined,'done':()=>void 0x0};}async[a15_0x150373(0x184)](_0x4d78c0,_0x4f1da1,_0x1557f6={'sheets':0x0}){const _0x1bee10=a15_0x150373;var _0x12ea45,_0x40cfb5,_0x52837d;const _0x563aa9=(_0x1557f6===null||_0x1557f6===void 0x0?void 0x0:_0x1557f6[_0x1bee10(0x14b)])?Array[_0x1bee10(0x163)](_0x1557f6[_0x1bee10(0x14b)])?_0x1557f6['sheets']:[_0x1557f6['sheets']]:[0x0],_0x12d122=_0x331c3c=>new Promise(async(_0x45a3f7,_0x1b5314)=>{const _0x25f0c8=_0x1bee10,_0x52a1cc=_0x331c3c[_0x25f0c8(0x158)](0x1),_0x273ca8=await new Promise(_0x4b884d=>{const _0x5c9bb8=_0x25f0c8,_0x39486a={};_0x52a1cc[_0x5c9bb8(0x185)]((_0x229921,_0x30430b)=>{const _0x424c72=_0x5c9bb8;for(const _0x43ad3d of _0x4d78c0){if(_0x229921[_0x424c72(0x18b)]==_0x43ad3d[_0x424c72(0x157)])_0x39486a[_0x43ad3d[_0x424c72(0x182)]]={'header':_0x229921[_0x424c72(0x16f)],'handler':_0x43ad3d[_0x424c72(0x15b)]};else{if(!_0x39486a[_0x43ad3d['key']])try{const _0x495652=_0x52a1cc&&_0x52a1cc[_0x424c72(0x17e)](_0x43ad3d[_0x424c72(0x157)]);_0x495652&&(_0x39486a[_0x43ad3d['key']]={'header':_0x495652[_0x424c72(0x16f)],'handler':_0x43ad3d[_0x424c72(0x15b)]});}catch{}}}_0x52a1cc[_0x424c72(0x15c)]==_0x30430b&&_0x4b884d(_0x39486a);});});_0x331c3c['on'](_0x25f0c8(0x17c),_0x3d3f4b=>_0x45a3f7(_0x331c3c)),_0x331c3c['on'](_0x25f0c8(0x161),_0xba2e6b=>_0x1b5314(_0xba2e6b)),_0x331c3c['on'](_0x25f0c8(0x187),async _0x49f234=>{const _0x5962f1=_0x25f0c8;var _0x35a77d;if(typeof(_0x49f234===null||_0x49f234===void 0x0?void 0x0:_0x49f234[_0x5962f1(0x17e)])==_0x5962f1(0x191)){const _0x568a2f={};_0x4059b5:for(const _0x426d9d in _0x273ca8){if(_0x273ca8[_0x426d9d]['header']){const _0x3d318c=_0x49f234['getCell'](_0x273ca8[_0x426d9d]['header']);if(!_0x3d318c)continue _0x4059b5;try{_0x3d318c[_0x5962f1(0x18f)]();}catch(_0x349572){_0x3d318c[_0x5962f1(0x18f)]=()=>{const _0x191d5f=_0x5962f1;var _0x3b6de1;return''+(((_0x3b6de1=_0x3d318c===null||_0x3d318c===void 0x0?void 0x0:_0x3d318c[_0x191d5f(0x16a)])===null||_0x3b6de1===void 0x0?void 0x0:_0x3b6de1[_0x191d5f(0x18b)])||'');};}typeof((_0x35a77d=_0x273ca8[_0x426d9d])===null||_0x35a77d===void 0x0?void 0x0:_0x35a77d[_0x5962f1(0x15b)])==_0x5962f1(0x191)?_0x568a2f[_0x426d9d]=await _0x273ca8[_0x426d9d][_0x5962f1(0x15b)](lodash['set']({},_0x426d9d,(_0x3d318c===null||_0x3d318c===void 0x0?void 0x0:_0x3d318c[_0x5962f1(0x18f)]())||''),_0x3d318c[_0x5962f1(0x16a)]):_0x568a2f[_0x426d9d]=(_0x3d318c===null||_0x3d318c===void 0x0?void 0x0:_0x3d318c[_0x5962f1(0x18f)]())||'';}}Object[_0x5962f1(0x188)](_0x568a2f)[_0x5962f1(0x17f)]>0x0&&Object[_0x5962f1(0x165)](_0x568a2f)[_0x5962f1(0x151)](_0x11ccb2=>_0x11ccb2!='')[_0x5962f1(0x17f)]>0x0&&await _0x4f1da1(_0x568a2f,{'sheet':_0x331c3c,'row':_0x49f234});}}),await _0x331c3c[_0x25f0c8(0x143)]();});for(const _0x13d1c2 of _0x563aa9){const _0xc92965=lodash[_0x1bee10(0x169)](_0x13d1c2)?((_0x40cfb5=(_0x12ea45=this[_0x1bee10(0x156)])===null||_0x12ea45===void 0x0?void 0x0:_0x12ea45[_0x1bee10(0x16e)])===null||_0x40cfb5===void 0x0?void 0x0:_0x40cfb5[_0x13d1c2])||undefined:(_0x52837d=this[_0x1bee10(0x156)])===null||_0x52837d===void 0x0?void 0x0:_0x52837d['getWorksheet'](_0x13d1c2);_0xc92965&&await _0x12d122(_0xc92965);}}['getWorkbookWriterSheet'](_0x5efb3f,_0x99f7c8=![]){const _0x56d609=a15_0x150373;var _0x3c399f,_0x30d9c2;let _0x109304=this['_WorksheetWriterMap'][_0x56d609(0x15f)](_0x5efb3f)?this['_WorksheetWriterMap']['get'](_0x5efb3f):(_0x3c399f=this[_0x56d609(0x183)])===null||_0x3c399f===void 0x0?void 0x0:_0x3c399f[_0x56d609(0x16c)](_0x5efb3f);return!_0x109304&&_0x99f7c8&&(_0x109304=(_0x30d9c2=this[_0x56d609(0x183)])===null||_0x30d9c2===void 0x0?void 0x0:_0x30d9c2[_0x56d609(0x13f)](lodash['isNumber'](_0x5efb3f)?undefined:''+_0x5efb3f,{'views':[{'state':'frozen','ySplit':0x1}]}),this[_0x56d609(0x160)]['set'](_0x5efb3f,_0x109304)),_0x109304;}async[a15_0x150373(0x14f)](){const _0x1f94b7=a15_0x150373;var _0x24257e;return await((_0x24257e=this[_0x1f94b7(0x183)])===null||_0x24257e===void 0x0?void 0x0:_0x24257e['commit']()),this;}*['chunkArray'](_0x4da208,_0xefd905){const _0xc3ce9b=a15_0x150373;for(let _0x337f4b=0x0;_0x337f4b<_0x4da208['length'];_0x337f4b+=_0xefd905){yield _0x4da208[_0xc3ce9b(0x17d)](_0x337f4b,_0x337f4b+_0xefd905);}}}function a15_0xbc2c(){const _0x29c01f=['destroy','finished','slice','getCell','length','_WorkbookWriter','unpipe','key','WorkbookWriter','reader','eachCell','2272668IfSPdp','row','keys','existsSync','rootpath','value','end','_WorkbookReader','dirname','toString','3033310AJxSMY','function','lodash','ignore','xls','mkdirSync','columns','Transform','addWorksheet','276276hoAdFO','99aozpwq','getWorkbookWriterSheet','read','defineProperty','xlsx','suffix','finish','452967jyHUFg','295JzDGwU','filepath','sheets','indexOf','forEach','constructor','save','stream','filter','__esModule','Workbook','search','Readable','WorkbookReader','header','getRow','writer','8699636czDeEC','handler','cellCount','1338fdgUPp','12WjKjMa','has','_WorksheetWriterMap','error','pipe','isArray','apply','values','chunkArray','文件名格式错误','push','isNumber','model','lastIndexOf','getWorksheet','replace','worksheets','col','includes','Writable','getColumn','get','resume','5xuGKZP','startsWith','373280gPlBap','(((.+)+)+)+$','commit','ExcelStream'];a15_0xbc2c=function(){return _0x29c01f;};return a15_0xbc2c();}exports[a15_0x150373(0x17a)]=ExcelStream;
|
|
1
|
+
const a15_0x4cc2b5=a15_0x4059;(function(_0x2d3f9b,_0x15dfa5){const _0x401595=a15_0x4059,_0x56582f=_0x2d3f9b();while(!![]){try{const _0x2628be=-parseInt(_0x401595(0x115))/0x1*(-parseInt(_0x401595(0xf1))/0x2)+-parseInt(_0x401595(0x10f))/0x3*(parseInt(_0x401595(0xf6))/0x4)+parseInt(_0x401595(0x110))/0x5*(parseInt(_0x401595(0x11a))/0x6)+-parseInt(_0x401595(0x101))/0x7+parseInt(_0x401595(0xf0))/0x8+-parseInt(_0x401595(0x116))/0x9+-parseInt(_0x401595(0xe5))/0xa;if(_0x2628be===_0x15dfa5)break;else _0x56582f['push'](_0x56582f['shift']());}catch(_0x357b05){_0x56582f['push'](_0x56582f['shift']());}}}(a15_0x4927,0x462ee));const a15_0x557e08=(function(){let _0x4da135=!![];return function(_0x30146e,_0x335c74){const _0x54160e=_0x4da135?function(){const _0x1aa90f=a15_0x4059;if(_0x335c74){const _0x20e7de=_0x335c74[_0x1aa90f(0xf4)](_0x30146e,arguments);return _0x335c74=null,_0x20e7de;}}:function(){};return _0x4da135=![],_0x54160e;};}()),a15_0x5e6f57=a15_0x557e08(this,function(){const _0x7b6f7e=a15_0x4059;return a15_0x5e6f57[_0x7b6f7e(0xef)]()[_0x7b6f7e(0xd1)]('(((.+)+)+)+$')[_0x7b6f7e(0xef)]()[_0x7b6f7e(0x111)](a15_0x5e6f57)[_0x7b6f7e(0xd1)](_0x7b6f7e(0xe4));});a15_0x5e6f57();'use strict';Object[a15_0x4cc2b5(0xfb)](exports,a15_0x4cc2b5(0xf7),{'value':!![]}),exports[a15_0x4cc2b5(0xdc)]=void 0x0;const fs=require('fs'),path=require('path'),lodash=require('lodash'),exceljs=require(a15_0x4cc2b5(0xec)),stream_1=require('stream');function isReadableStream(_0x523298){const _0x1dbdae=a15_0x4cc2b5;return _0x523298&&typeof _0x523298[_0x1dbdae(0xd6)]===_0x1dbdae(0xc8)&&typeof _0x523298['on']==='function'&&typeof _0x523298[_0x1dbdae(0xf3)]===_0x1dbdae(0xc8)&&typeof _0x523298[_0x1dbdae(0x103)]==='function'&&typeof _0x523298[_0x1dbdae(0xd3)]==='function';}class ExcelStream{constructor(_0x50c27f){const _0x409a24=a15_0x4cc2b5;this[_0x409a24(0xdd)]=new Map(),this['filepath']=_0x50c27f;}get[a15_0x4cc2b5(0xeb)](){const _0x2acbda=a15_0x4cc2b5;return!this[_0x2acbda(0xff)]&&(this[_0x2acbda(0xff)]=new exceljs[(_0x2acbda(0xe2))]['xlsx'][(_0x2acbda(0xeb))](this[_0x2acbda(0x10e)],{'worksheets':'emit','sharedStrings':_0x2acbda(0x105),'hyperlinks':_0x2acbda(0x105),'styles':'ignore'})),this[_0x2acbda(0xff)];}get[a15_0x4cc2b5(0xd7)](){const _0x69ff18=a15_0x4cc2b5;return!this[_0x69ff18(0xcc)]&&(this[_0x69ff18(0xcc)]=new exceljs[(_0x69ff18(0xe2))]['xlsx'][(_0x69ff18(0xd7))]({'filename':this[_0x69ff18(0x10e)],'useStyles':!![],'useSharedStrings':![]})),this[_0x69ff18(0xcc)];}static['instance'](_0x413e2f,_0x557682={'suffix':[a15_0x4cc2b5(0x109),'xlsx']}){return new Promise(async(_0x1542a7,_0x318c73)=>{const _0xc08ce8=a15_0x4059,_0x4ac638=_0x413e2f['substring']((_0x413e2f[_0xc08ce8(0xdb)]('/')>-0x1?_0x413e2f[_0xc08ce8(0xe0)]('/'):_0x413e2f[_0xc08ce8(0xe0)]('\x5c'))+0x1),_0x9faa9a=path[_0xc08ce8(0x113)](((_0x557682===null||_0x557682===void 0x0?void 0x0:_0x557682[_0xc08ce8(0xd8)])&&!_0x413e2f[_0xc08ce8(0xf5)](_0x557682[_0xc08ce8(0xd8)])?_0x557682[_0xc08ce8(0xd8)]+'/'+_0x413e2f:'/'+_0x413e2f)[_0xc08ce8(0xde)](/(\\|\/)/g,'/')[_0xc08ce8(0xde)](/\/{2,}/g,'/'));if(!((_0x557682===null||_0x557682===void 0x0?void 0x0:_0x557682[_0xc08ce8(0x117)])?_0x557682['suffix']:[_0xc08ce8(0x109),_0xc08ce8(0xfa)])[_0xc08ce8(0xd5)](_0x4ac638[_0xc08ce8(0xc7)](_0x4ac638['lastIndexOf']('.')+0x1)))return _0x318c73(_0xc08ce8(0xd9));const _0x4ac7e1=(_0x9faa9a+'/'+_0x4ac638)['replace'](/(\\|\/)/g,'/')[_0xc08ce8(0xde)](/\/{2,}/g,'/');if(!fs[_0xc08ce8(0x108)](_0x4ac7e1)){!fs['existsSync'](_0x9faa9a)&&fs['mkdirSync'](_0x9faa9a,{'recursive':!![]});const _0x5e266f=new exceljs[(_0xc08ce8(0xca))]();await _0x5e266f[_0xc08ce8(0xfa)][_0xc08ce8(0xf8)](_0x4ac7e1);}return _0x1542a7(new ExcelStream(_0x4ac7e1));});}async['writer'](_0x3f29ce,_0x20d01b,_0x1c665f=0x0){const _0x37d4b6=a15_0x4cc2b5;var _0x26d83b;const _0xb13ce=this[_0x37d4b6(0xcd)](_0x1c665f,!![]),_0x335f75={},_0x13661a=[];if(_0xb13ce&&(Array[_0x37d4b6(0xe6)](_0x20d01b)||isReadableStream(_0x20d01b))){for(const _0x1cc1ae in _0x3f29ce){_0x335f75[_0x3f29ce[_0x1cc1ae][_0x37d4b6(0x10a)]]=_0x3f29ce[_0x1cc1ae][_0x37d4b6(0x119)],_0x13661a[_0x37d4b6(0xcb)]({'header':_0x3f29ce[_0x1cc1ae]['header'],'key':(_0x26d83b=_0x3f29ce[_0x1cc1ae])===null||_0x26d83b===void 0x0?void 0x0:_0x26d83b[_0x37d4b6(0x10a)][_0x37d4b6(0xde)](/\./g,'_')});}(_0xb13ce===null||_0xb13ce===void 0x0?void 0x0:_0xb13ce[_0x37d4b6(0xfd)])!=_0x13661a&&(_0xb13ce[_0x37d4b6(0xfd)]=_0x13661a);const _0x216aaf=0x64,_0x5d2f15=Array[_0x37d4b6(0xe6)](_0x20d01b)?stream_1[_0x37d4b6(0xdf)][_0x37d4b6(0x11b)](this['chunkArray'](_0x20d01b,_0x216aaf),{'objectMode':!![]}):_0x20d01b,_0x4c32fd=new stream_1[(_0x37d4b6(0x11c))]({'objectMode':!![],'highWaterMark':_0x216aaf,'transform':async function(_0x3f9bc2,_0x4b3d63,_0x209824){const _0x15d270=_0x37d4b6;Array['isArray'](_0x3f9bc2)&&_0x3f9bc2[_0x15d270(0xea)]>0x0&&_0x3f9bc2[_0x15d270(0xcf)](_0x15f6c8=>{this['push'](_0x15f6c8);}),_0x209824();}});let _0x15c608=0x0;const _0x351c67=new stream_1[(_0x37d4b6(0x107))]({'objectMode':!![],'highWaterMark':_0x216aaf,async 'write'(_0x2156c8,_0x5d08f9,_0x1858b3){const _0x598951=_0x37d4b6;var _0x154dec;try{const _0x1f14c8=_0xb13ce[_0x598951(0x118)]({});for(let _0x192027 in _0x3f29ce){const _0x44511e=_0x3f29ce[_0x192027][_0x598951(0x10a)][_0x598951(0xde)](/\./g,'_'),_0x2f7ec6=_0xb13ce[_0x598951(0xe3)](_0x44511e),_0x354485=_0x1f14c8===null||_0x1f14c8===void 0x0?void 0x0:_0x1f14c8[_0x598951(0xf2)](_0x44511e);typeof((_0x154dec=_0x3f29ce[_0x192027])===null||_0x154dec===void 0x0?void 0x0:_0x154dec['handler'])=='function'?_0x354485[_0x598951(0xf9)]=await _0x3f29ce[_0x192027][_0x598951(0xd2)](_0x2156c8,{'row':_0x1f14c8,'col':_0x2f7ec6,'cell':_0x354485,'sheet':_0xb13ce})||'':_0x354485[_0x598951(0xf9)]=lodash[_0x598951(0xfc)](_0x2156c8,_0x3f29ce[_0x192027][_0x598951(0x10a)],'');}_0x15c608++,_0x1f14c8[_0x598951(0xc9)](),_0x1858b3();}catch(_0x139e55){_0x1858b3(_0x139e55);}},async 'final'(_0x23faeb){try{_0x23faeb();}catch(_0x63fe92){_0x23faeb(_0x63fe92);}}});return new Promise((_0x38c5d2,_0x7a2b9a)=>{const _0x38245d=_0x37d4b6,_0x46c9ab=_0x39e8dd=>{const _0x906009=a15_0x4059;_0x5d2f15[_0x906009(0xd0)](),_0x4c32fd[_0x906009(0xd0)](),_0x351c67[_0x906009(0xd0)](),_0x7a2b9a(_0x39e8dd);};_0x5d2f15['on'](_0x38245d(0xee),_0x46c9ab)[_0x38245d(0xd6)](_0x4c32fd)['on'](_0x38245d(0xee),_0x46c9ab)[_0x38245d(0xd6)](_0x351c67)['on'](_0x38245d(0xee),_0x46c9ab)['on']('finish',()=>{const _0x35f61e=_0x38245d;try{_0x5d2f15[_0x35f61e(0xfe)](),_0x4c32fd[_0x35f61e(0xfe)](),_0x4c32fd['end'](),_0x351c67['end'](),_0x38c5d2({'rowCount':_0x15c608,'worksheet':_0xb13ce,'done':()=>_0xb13ce[_0x35f61e(0xc9)]()});}catch(_0x295ebd){_0x7a2b9a(_0x295ebd);}}),Array[_0x38245d(0xe6)](_0x20d01b)&&_0x5d2f15[_0x38245d(0xd3)]();});}return{'rowCount':0x0,'worksheet':undefined,'done':()=>void 0x0};}async[a15_0x4cc2b5(0x104)](_0x4b4c4e,_0x481fe6,_0x26b239={'sheets':0x0}){const _0x56e1f5=a15_0x4cc2b5;var _0x301618,_0x110a1e,_0x2b72cc;const _0x4f7947=(_0x26b239===null||_0x26b239===void 0x0?void 0x0:_0x26b239[_0x56e1f5(0xed)])?Array[_0x56e1f5(0xe6)](_0x26b239[_0x56e1f5(0xed)])?_0x26b239[_0x56e1f5(0xed)]:[_0x26b239[_0x56e1f5(0xed)]]:[0x0],_0xeed166=_0x15f7f5=>new Promise(async(_0x149b96,_0x1866c3)=>{const _0x4ebca7=_0x56e1f5,_0x43a372=_0x15f7f5['getRow'](0x1),_0x178c3b=await new Promise(_0x5f53f6=>{const _0x3c9242=a15_0x4059,_0x2ab123={};_0x43a372[_0x3c9242(0x114)]((_0x27e15c,_0x5640e0)=>{const _0x2dd541=_0x3c9242;for(const _0x27d39c of _0x4b4c4e){if(_0x27e15c[_0x2dd541(0xf9)]==_0x27d39c[_0x2dd541(0x119)])_0x2ab123[_0x27d39c[_0x2dd541(0x10a)]]={'header':_0x27e15c[_0x2dd541(0x10d)],'handler':_0x27d39c[_0x2dd541(0xd2)]};else{if(!_0x2ab123[_0x27d39c['key']])try{const _0x553781=_0x43a372&&_0x43a372[_0x2dd541(0xf2)](_0x27d39c[_0x2dd541(0x119)]);_0x553781&&(_0x2ab123[_0x27d39c['key']]={'header':_0x553781[_0x2dd541(0x10d)],'handler':_0x27d39c['handler']});}catch{}}}_0x43a372[_0x2dd541(0x102)]==_0x5640e0&&_0x5f53f6(_0x2ab123);});});_0x15f7f5['on'](_0x4ebca7(0xda),_0x22757c=>_0x149b96(_0x15f7f5)),_0x15f7f5['on']('error',_0x449474=>_0x1866c3(_0x449474)),_0x15f7f5['on'](_0x4ebca7(0xe1),async _0x473b31=>{const _0x441d89=_0x4ebca7;var _0xccde82;if(typeof(_0x473b31===null||_0x473b31===void 0x0?void 0x0:_0x473b31[_0x441d89(0xf2)])==_0x441d89(0xc8)){const _0xdc40b6={};_0x5e1259:for(const _0x40750a in _0x178c3b){if(_0x178c3b[_0x40750a][_0x441d89(0x119)]){const _0x1a93c3=_0x473b31[_0x441d89(0xf2)](_0x178c3b[_0x40750a][_0x441d89(0x119)]);if(!_0x1a93c3)continue _0x5e1259;try{_0x1a93c3[_0x441d89(0xef)]();}catch(_0x16edd5){_0x1a93c3[_0x441d89(0xef)]=()=>{const _0x41d71f=_0x441d89;var _0xd6d041;return''+(((_0xd6d041=_0x1a93c3===null||_0x1a93c3===void 0x0?void 0x0:_0x1a93c3[_0x41d71f(0xe8)])===null||_0xd6d041===void 0x0?void 0x0:_0xd6d041[_0x41d71f(0xf9)])||'');};}typeof((_0xccde82=_0x178c3b[_0x40750a])===null||_0xccde82===void 0x0?void 0x0:_0xccde82['handler'])==_0x441d89(0xc8)?_0xdc40b6[_0x40750a]=await _0x178c3b[_0x40750a][_0x441d89(0xd2)](lodash['set']({},_0x40750a,(_0x1a93c3===null||_0x1a93c3===void 0x0?void 0x0:_0x1a93c3[_0x441d89(0xef)]())||''),_0x1a93c3[_0x441d89(0xe8)]):_0xdc40b6[_0x40750a]=(_0x1a93c3===null||_0x1a93c3===void 0x0?void 0x0:_0x1a93c3['toString']())||'';}}Object[_0x441d89(0x106)](_0xdc40b6)[_0x441d89(0xea)]>0x0&&Object[_0x441d89(0xe9)](_0xdc40b6)[_0x441d89(0xe7)](_0x3b1c3e=>_0x3b1c3e!='')['length']>0x0&&await _0x481fe6(_0xdc40b6,{'sheet':_0x15f7f5,'row':_0x473b31});}}),await _0x15f7f5[_0x4ebca7(0xf3)]();});for(const _0x5ddf8c of _0x4f7947){const _0x2b77af=lodash[_0x56e1f5(0xd4)](_0x5ddf8c)?((_0x110a1e=(_0x301618=this[_0x56e1f5(0xeb)])===null||_0x301618===void 0x0?void 0x0:_0x301618[_0x56e1f5(0xce)])===null||_0x110a1e===void 0x0?void 0x0:_0x110a1e[_0x5ddf8c])||undefined:(_0x2b72cc=this['WorkbookReader'])===null||_0x2b72cc===void 0x0?void 0x0:_0x2b72cc[_0x56e1f5(0x10b)](_0x5ddf8c);_0x2b77af&&await _0xeed166(_0x2b77af);}}[a15_0x4cc2b5(0xcd)](_0x1466af,_0x72f7b9=![]){const _0x593a2a=a15_0x4cc2b5;var _0x5cf8b6,_0x27d1e9;let _0x32d336=this[_0x593a2a(0xdd)][_0x593a2a(0x112)](_0x1466af)?this[_0x593a2a(0xdd)][_0x593a2a(0xfc)](_0x1466af):(_0x5cf8b6=this[_0x593a2a(0xd7)])===null||_0x5cf8b6===void 0x0?void 0x0:_0x5cf8b6[_0x593a2a(0x10b)](_0x1466af);return!_0x32d336&&_0x72f7b9&&(_0x32d336=(_0x27d1e9=this['WorkbookWriter'])===null||_0x27d1e9===void 0x0?void 0x0:_0x27d1e9[_0x593a2a(0x10c)](lodash[_0x593a2a(0xd4)](_0x1466af)?undefined:''+_0x1466af,{'views':[{'state':_0x593a2a(0x100),'ySplit':0x1}]}),this[_0x593a2a(0xdd)]['set'](_0x1466af,_0x32d336)),_0x32d336;}async['save'](){const _0x4f41d1=a15_0x4cc2b5;var _0x264eb1;return await((_0x264eb1=this['WorkbookWriter'])===null||_0x264eb1===void 0x0?void 0x0:_0x264eb1[_0x4f41d1(0xc9)]()),this;}*['chunkArray'](_0x5e6064,_0x271f7b){const _0x88a070=a15_0x4cc2b5;for(let _0x57e3f5=0x0;_0x57e3f5<_0x5e6064[_0x88a070(0xea)];_0x57e3f5+=_0x271f7b){yield _0x5e6064['slice'](_0x57e3f5,_0x57e3f5+_0x271f7b);}}}function a15_0x4927(){const _0x19994f=['defineProperty','get','columns','unpipe','_WorkbookReader','frozen','666589ruTWiF','cellCount','pause','reader','ignore','keys','Writable','existsSync','xls','key','getWorksheet','addWorksheet','col','filepath','108957UsbvZt','16620neuWYz','constructor','has','dirname','eachCell','1zUBxDL','404883EfSRKB','suffix','addRow','header','636YdibuN','from','Transform','substring','function','commit','Workbook','push','_WorkbookWriter','getWorkbookWriterSheet','worksheets','forEach','destroy','search','handler','resume','isNumber','includes','pipe','WorkbookWriter','rootpath','文件名格式错误','finished','indexOf','ExcelStream','_WorksheetWriterMap','replace','Readable','lastIndexOf','row','stream','getColumn','(((.+)+)+)+$','5027430OzYqOC','isArray','filter','model','values','length','WorkbookReader','exceljs','sheets','error','toString','4418280yoGWoB','124234eOHjpa','getCell','read','apply','startsWith','4BLeSKf','__esModule','writeFile','value','xlsx'];a15_0x4927=function(){return _0x19994f;};return a15_0x4927();}function a15_0x4059(_0x469d7a,_0x32f59e){const _0x56cd9f=a15_0x4927();return a15_0x4059=function(_0x5e6f57,_0x557e08){_0x5e6f57=_0x5e6f57-0xc7;let _0x492733=_0x56cd9f[_0x5e6f57];return _0x492733;},a15_0x4059(_0x469d7a,_0x32f59e);}exports[a15_0x4cc2b5(0xdc)]=ExcelStream;
|
package/dist/types/action.d.ts
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import { ValidatorOptions } from "@anncic-api/validator";
|
|
2
|
-
import { MiddlewareParamArray } from '@midwayjs/core';
|
|
3
|
-
export declare const ACTION_KEY = "anncic-api:action";
|
|
4
|
-
export declare const ACTION_ROUTE_KEY = "anncic-api:action:route";
|
|
5
|
-
export declare const ACTION_RESPONSE_KEY = "anncic-api:action:response";
|
|
6
|
-
export declare const APPSCONFIG_KEY = "anncic-api:apps:config";
|
|
7
|
-
export interface ResponseProperty {
|
|
8
|
-
key: string;
|
|
9
|
-
type: string;
|
|
10
|
-
description?: string;
|
|
11
|
-
children?: ResponseProperty[];
|
|
12
|
-
}
|
|
13
|
-
export interface ErrorResponse {
|
|
14
|
-
code: number;
|
|
15
|
-
message: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface ActionResponseOption {
|
|
19
|
-
format?: 'default' | 'custom';
|
|
20
|
-
type?: 'object' | 'array' | 'page';
|
|
21
|
-
description?: string;
|
|
22
|
-
properties?: ResponseProperty[];
|
|
23
|
-
errors?: ErrorResponse[];
|
|
24
|
-
}
|
|
25
|
-
export interface ActionOption {
|
|
26
|
-
prefix?: string;
|
|
27
|
-
alias?: string[];
|
|
28
|
-
tagName?: string;
|
|
29
|
-
sensitive?: boolean;
|
|
30
|
-
description?: string;
|
|
31
|
-
middleware?: MiddlewareParamArray;
|
|
32
|
-
IgnoreMiddleware?: MiddlewareParamArray;
|
|
33
|
-
ignoreGlobalPrefix?: boolean;
|
|
34
|
-
}
|
|
35
|
-
export interface ActionApiOption {
|
|
36
|
-
apimit?: boolean;
|
|
37
|
-
intercept?: boolean;
|
|
38
|
-
routerName?: string;
|
|
39
|
-
description?: string;
|
|
40
|
-
validate?: ValidatorOptions;
|
|
41
|
-
middleware?: MiddlewareParamArray;
|
|
42
|
-
middlewareIgnore?: MiddlewareParamArray;
|
|
43
|
-
ignoreGlobalPrefix?: boolean;
|
|
44
|
-
response?: ActionResponseOption;
|
|
45
|
-
}
|
|
46
|
-
export declare class AppsConfigTmp {
|
|
47
|
-
}
|
|
1
|
+
import { ValidatorOptions } from "@anncic-api/validator";
|
|
2
|
+
import { MiddlewareParamArray } from '@midwayjs/core';
|
|
3
|
+
export declare const ACTION_KEY = "anncic-api:action";
|
|
4
|
+
export declare const ACTION_ROUTE_KEY = "anncic-api:action:route";
|
|
5
|
+
export declare const ACTION_RESPONSE_KEY = "anncic-api:action:response";
|
|
6
|
+
export declare const APPSCONFIG_KEY = "anncic-api:apps:config";
|
|
7
|
+
export interface ResponseProperty {
|
|
8
|
+
key: string;
|
|
9
|
+
type: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
children?: ResponseProperty[];
|
|
12
|
+
}
|
|
13
|
+
export interface ErrorResponse {
|
|
14
|
+
code: number;
|
|
15
|
+
message: string;
|
|
16
|
+
description?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface ActionResponseOption {
|
|
19
|
+
format?: 'default' | 'custom';
|
|
20
|
+
type?: 'object' | 'array' | 'page';
|
|
21
|
+
description?: string;
|
|
22
|
+
properties?: ResponseProperty[];
|
|
23
|
+
errors?: ErrorResponse[];
|
|
24
|
+
}
|
|
25
|
+
export interface ActionOption {
|
|
26
|
+
prefix?: string;
|
|
27
|
+
alias?: string[];
|
|
28
|
+
tagName?: string;
|
|
29
|
+
sensitive?: boolean;
|
|
30
|
+
description?: string;
|
|
31
|
+
middleware?: MiddlewareParamArray;
|
|
32
|
+
IgnoreMiddleware?: MiddlewareParamArray;
|
|
33
|
+
ignoreGlobalPrefix?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export interface ActionApiOption {
|
|
36
|
+
apimit?: boolean;
|
|
37
|
+
intercept?: boolean;
|
|
38
|
+
routerName?: string;
|
|
39
|
+
description?: string;
|
|
40
|
+
validate?: ValidatorOptions;
|
|
41
|
+
middleware?: MiddlewareParamArray;
|
|
42
|
+
middlewareIgnore?: MiddlewareParamArray;
|
|
43
|
+
ignoreGlobalPrefix?: boolean;
|
|
44
|
+
response?: ActionResponseOption;
|
|
45
|
+
}
|
|
46
|
+
export declare class AppsConfigTmp {
|
|
47
|
+
}
|
package/dist/types/action.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a16_0x33ee(_0x4ebec1,_0x29c60b){var _0x58b8dd=a16_0x5e71();return a16_0x33ee=function(_0x5c5cac,_0x31b264){_0x5c5cac=_0x5c5cac-0xd3;var _0x5e7164=_0x58b8dd[_0x5c5cac];return _0x5e7164;},a16_0x33ee(_0x4ebec1,_0x29c60b);}var a16_0x1ae29c=a16_0x33ee;(function(_0x4d411f,_0x5ef90f){var _0x518c28=a16_0x33ee,_0x1c3b51=_0x4d411f();while(!![]){try{var _0x356ffc=-parseInt(_0x518c28(0xeb))/0x1*(-parseInt(_0x518c28(0xe4))/0x2)+-parseInt(_0x518c28(0xe6))/0x3+-parseInt(_0x518c28(0xd9))/0x4*(parseInt(_0x518c28(0xdc))/0x5)+parseInt(_0x518c28(0xde))/0x6*(-parseInt(_0x518c28(0xec))/0x7)+parseInt(_0x518c28(0xda))/0x8+parseInt(_0x518c28(0xd6))/0x9*(-parseInt(_0x518c28(0xe2))/0xa)+parseInt(_0x518c28(0xea))/0xb*(parseInt(_0x518c28(0xd3))/0xc);if(_0x356ffc===_0x5ef90f)break;else _0x1c3b51['push'](_0x1c3b51['shift']());}catch(_0x1ed717){_0x1c3b51['push'](_0x1c3b51['shift']());}}}(a16_0x5e71,0xa453a));var a16_0x31b264=(function(){var _0x4dee9a=!![];return function(_0x4b338e,_0x12720b){var _0x14eb0f=_0x4dee9a?function(){var _0x83415b=a16_0x33ee;if(_0x12720b){var _0x1f9566=_0x12720b[_0x83415b(0xe0)](_0x4b338e,arguments);return _0x12720b=null,_0x1f9566;}}:function(){};return _0x4dee9a=![],_0x14eb0f;};}()),a16_0x5c5cac=a16_0x31b264(this,function(){var _0x37c2bc=a16_0x33ee;return a16_0x5c5cac[_0x37c2bc(0xd7)]()['search'](_0x37c2bc(0xdd))[_0x37c2bc(0xd7)]()[_0x37c2bc(0xd4)](a16_0x5c5cac)[_0x37c2bc(0xe8)]('(((.+)+)+)+$');});a16_0x5c5cac();'use strict';Object['defineProperty'](exports,a16_0x1ae29c(0xd8),{'value':!![]}),exports[a16_0x1ae29c(0xe3)]=exports['APPSCONFIG_KEY']=exports[a16_0x1ae29c(0xdb)]=exports['ACTION_ROUTE_KEY']=exports[a16_0x1ae29c(0xe5)]=void 0x0,exports[a16_0x1ae29c(0xe5)]=a16_0x1ae29c(0xe9),exports[a16_0x1ae29c(0xe1)]=a16_0x1ae29c(0xe7),exports[a16_0x1ae29c(0xdb)]=a16_0x1ae29c(0xdf),exports[a16_0x1ae29c(0xd5)]='anncic-api:apps:config';class AppsConfigTmp{}exports[a16_0x1ae29c(0xe3)]=AppsConfigTmp;function a16_0x5e71(){var _0x1f3618=['anncic-api:action:route','search','anncic-api:action','15499iLBQtH','105bBiRqj','14iSYobl','14436qblYqD','constructor','APPSCONFIG_KEY','9BInvtq','toString','__esModule','1128452GMzTWV','9805464BMXmRt','ACTION_RESPONSE_KEY','10MIMTKs','(((.+)+)+)+$','3277896kmuFem','anncic-api:action:response','apply','ACTION_ROUTE_KEY','4919030AZxpeo','AppsConfigTmp','13844fOXVte','ACTION_KEY','2477031VGAuvR'];a16_0x5e71=function(){return _0x1f3618;};return a16_0x5e71();}
|
package/dist/types/common.d.ts
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Readable } from "stream";
|
|
3
|
+
export declare class PageDTO {
|
|
4
|
+
_page?: number;
|
|
5
|
+
_size?: number;
|
|
6
|
+
_order?: string;
|
|
7
|
+
_isreverse?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface UploadFileInfo<T> {
|
|
10
|
+
filename: string;
|
|
11
|
+
fieldName: string;
|
|
12
|
+
mimeType: string;
|
|
13
|
+
data: T extends string ? string : Readable;
|
|
14
|
+
}
|
package/dist/types/common.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var a17_0x3f0d7a=a17_0x2966;(function(_0x237b10,_0x108d93){var _0x1fc570=a17_0x2966,_0x5ea291=_0x237b10();while(!![]){try{var _0x596d2c=parseInt(_0x1fc570(0xa8))/0x1+-parseInt(_0x1fc570(0x9f))/0x2*(-parseInt(_0x1fc570(0xac))/0x3)+-parseInt(_0x1fc570(0xb0))/0x4*(parseInt(_0x1fc570(0x97))/0x5)+parseInt(_0x1fc570(0xbc))/0x6*(parseInt(_0x1fc570(0xa1))/0x7)+-parseInt(_0x1fc570(0xab))/0x8+parseInt(_0x1fc570(0xad))/0x9+-parseInt(_0x1fc570(0xb6))/0xa;if(_0x596d2c===_0x108d93)break;else _0x5ea291['push'](_0x5ea291['shift']());}catch(_0x53fc27){_0x5ea291['push'](_0x5ea291['shift']());}}}(a17_0xa3c0,0xbba1a));var a17_0x2a0ed3=(function(){var _0x53b3d6=!![];return function(_0x2f8bdc,_0x4e621d){var _0x3c1e2c=_0x53b3d6?function(){var _0x1f3f38=a17_0x2966;if(_0x4e621d){var _0x420a48=_0x4e621d[_0x1f3f38(0xb3)](_0x2f8bdc,arguments);return _0x4e621d=null,_0x420a48;}}:function(){};return _0x53b3d6=![],_0x3c1e2c;};}()),a17_0x2e6533=a17_0x2a0ed3(this,function(){var _0x389cb0=a17_0x2966;return a17_0x2e6533['toString']()['search']('(((.+)+)+)+$')[_0x389cb0(0x9b)]()[_0x389cb0(0xb2)](a17_0x2e6533)[_0x389cb0(0xaa)](_0x389cb0(0xae));});a17_0x2e6533();function a17_0x2966(_0x37d3e5,_0x3d2e7e){var _0x5147ea=a17_0xa3c0();return a17_0x2966=function(_0x2e6533,_0x2a0ed3){_0x2e6533=_0x2e6533-0x97;var _0xa3c0fb=_0x5147ea[_0x2e6533];return _0xa3c0fb;},a17_0x2966(_0x37d3e5,_0x3d2e7e);}'use strict';var __decorate=this&&this[a17_0x3f0d7a(0xbf)]||function(_0x3d52ef,_0x5c8954,_0x19689e,_0x1b464d){var _0xd26101=a17_0x3f0d7a,_0x3cfdc3=arguments[_0xd26101(0xaf)],_0x5d48ec=_0x3cfdc3<0x3?_0x5c8954:_0x1b464d===null?_0x1b464d=Object[_0xd26101(0x99)](_0x5c8954,_0x19689e):_0x1b464d,_0x5aad6f;if(typeof Reflect===_0xd26101(0x9c)&&typeof Reflect[_0xd26101(0xa0)]===_0xd26101(0xa4))_0x5d48ec=Reflect[_0xd26101(0xa0)](_0x3d52ef,_0x5c8954,_0x19689e,_0x1b464d);else{for(var _0x5b11d9=_0x3d52ef[_0xd26101(0xaf)]-0x1;_0x5b11d9>=0x0;_0x5b11d9--)if(_0x5aad6f=_0x3d52ef[_0x5b11d9])_0x5d48ec=(_0x3cfdc3<0x3?_0x5aad6f(_0x5d48ec):_0x3cfdc3>0x3?_0x5aad6f(_0x5c8954,_0x19689e,_0x5d48ec):_0x5aad6f(_0x5c8954,_0x19689e))||_0x5d48ec;}return _0x3cfdc3>0x3&&_0x5d48ec&&Object['defineProperty'](_0x5c8954,_0x19689e,_0x5d48ec),_0x5d48ec;},__metadata=this&&this[a17_0x3f0d7a(0xb1)]||function(_0x3d6fbb,_0x410d5f){var _0x2cfddb=a17_0x3f0d7a;if(typeof Reflect===_0x2cfddb(0x9c)&&typeof Reflect['metadata']===_0x2cfddb(0xa4))return Reflect[_0x2cfddb(0xba)](_0x3d6fbb,_0x410d5f);};Object['defineProperty'](exports,a17_0x3f0d7a(0xa2),{'value':!![]}),exports['PageDTO']=void 0x0;function a17_0xa3c0(){var _0x2088e9=['apply','1:是;0:否','_size','22042240UAorsq','_order','design:type','trim','metadata','min','1053738NsaPqW','number','RuleType','__decorate','73765CtcFoq','_page','getOwnPropertyDescriptor','integer','toString','object','prototype','_isreverse','6JTqWNe','decorate','56kTyWMo','__esModule','是否倒序','function','@anncic-api/validator','第一页为1,第二页为2','Rule','1501882yFEygf','PageDTO','search','5969800Kzkhpi','1298967ejuwLT','8763309BZFquG','(((.+)+)+)+$','length','396IoFbhD','__metadata','constructor'];a17_0xa3c0=function(){return _0x2088e9;};return a17_0xa3c0();}const validator_1=require(a17_0x3f0d7a(0xa5));class PageDTO{}__decorate([(0x0,validator_1[a17_0x3f0d7a(0xa7)])('分页',validator_1[a17_0x3f0d7a(0xbe)]['number']()[a17_0x3f0d7a(0x9a)]()[a17_0x3f0d7a(0xbb)](0x1),a17_0x3f0d7a(0xa6)),__metadata(a17_0x3f0d7a(0xb8),Number)],PageDTO[a17_0x3f0d7a(0x9d)],a17_0x3f0d7a(0x98),void 0x0),__decorate([(0x0,validator_1[a17_0x3f0d7a(0xa7)])('分页数量',validator_1[a17_0x3f0d7a(0xbe)][a17_0x3f0d7a(0xbd)]()[a17_0x3f0d7a(0x9a)]()['min'](0x1)),__metadata(a17_0x3f0d7a(0xb8),Number)],PageDTO[a17_0x3f0d7a(0x9d)],a17_0x3f0d7a(0xb5),void 0x0),__decorate([(0x0,validator_1[a17_0x3f0d7a(0xa7)])('排序方式',validator_1[a17_0x3f0d7a(0xbe)]['string']()[a17_0x3f0d7a(0xb9)]()),__metadata(a17_0x3f0d7a(0xb8),String)],PageDTO[a17_0x3f0d7a(0x9d)],a17_0x3f0d7a(0xb7),void 0x0),__decorate([(0x0,validator_1[a17_0x3f0d7a(0xa7)])(a17_0x3f0d7a(0xa3),validator_1[a17_0x3f0d7a(0xbe)]['number']()[a17_0x3f0d7a(0x9a)]()['valid'](0x0,0x1),a17_0x3f0d7a(0xb4)),__metadata(a17_0x3f0d7a(0xb8),Number)],PageDTO[a17_0x3f0d7a(0x9d)],a17_0x3f0d7a(0x9e),void 0x0),exports[a17_0x3f0d7a(0xa9)]=PageDTO;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare const INTERCEPT_KEY = "anncic-api:intercept";
|
|
2
|
-
export declare class InterceptTargetTmp {
|
|
3
|
-
}
|
|
1
|
+
export declare const INTERCEPT_KEY = "anncic-api:intercept";
|
|
2
|
+
export declare class InterceptTargetTmp {
|
|
3
|
+
}
|
package/dist/types/intercept.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function a18_0x8002(_0x4b440c,_0xa62ce8){var _0x32d751=a18_0x40de();return a18_0x8002=function(_0x3f9555,_0x30aa09){_0x3f9555=_0x3f9555-0x136;var _0x40de2f=_0x32d751[_0x3f9555];return _0x40de2f;},a18_0x8002(_0x4b440c,_0xa62ce8);}var a18_0x5f07cf=a18_0x8002;(function(_0xfe4aa2,_0x3aa403){var _0x1569fa=a18_0x8002,_0x579b9c=_0xfe4aa2();while(!![]){try{var _0x9313cb=parseInt(_0x1569fa(0x13f))/0x1+parseInt(_0x1569fa(0x13a))/0x2+-parseInt(_0x1569fa(0x138))/0x3+parseInt(_0x1569fa(0x13b))/0x4+parseInt(_0x1569fa(0x13c))/0x5+parseInt(_0x1569fa(0x144))/0x6+-parseInt(_0x1569fa(0x136))/0x7;if(_0x9313cb===_0x3aa403)break;else _0x579b9c['push'](_0x579b9c['shift']());}catch(_0x248839){_0x579b9c['push'](_0x579b9c['shift']());}}}(a18_0x40de,0xe92b3));var a18_0x30aa09=(function(){var _0x4ab003=!![];return function(_0x216514,_0x3f190d){var _0x449bf3=_0x4ab003?function(){if(_0x3f190d){var _0x42d04d=_0x3f190d['apply'](_0x216514,arguments);return _0x3f190d=null,_0x42d04d;}}:function(){};return _0x4ab003=![],_0x449bf3;};}()),a18_0x3f9555=a18_0x30aa09(this,function(){var _0x424eb7=a18_0x8002;return a18_0x3f9555[_0x424eb7(0x13d)]()['search'](_0x424eb7(0x143))[_0x424eb7(0x13d)]()[_0x424eb7(0x140)](a18_0x3f9555)[_0x424eb7(0x13e)](_0x424eb7(0x143));});a18_0x3f9555();'use strict';Object[a18_0x5f07cf(0x142)](exports,a18_0x5f07cf(0x137),{'value':!![]}),exports[a18_0x5f07cf(0x141)]=exports[a18_0x5f07cf(0x139)]=void 0x0,exports[a18_0x5f07cf(0x139)]='anncic-api:intercept';class InterceptTargetTmp{}exports['InterceptTargetTmp']=InterceptTargetTmp;function a18_0x40de(){var _0xb0c990=['1228894IEwcgB','7171460ZcLxDR','7887315tIyCkc','toString','search','1201720AYZtig','constructor','InterceptTargetTmp','defineProperty','(((.+)+)+)+$','10479486FLlOqM','36327354vWDDmQ','__esModule','2365185kanFBN','INTERCEPT_KEY'];a18_0x40de=function(){return _0xb0c990;};return a18_0x40de();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anncic-api",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.20",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"typings": "index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,17 +18,17 @@
|
|
|
18
18
|
"build": "tsc && javascript-obfuscator ./dist --output ./dist --config obfuscator.json"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@anncic-api/cache": "^3.7.
|
|
22
|
-
"@anncic-api/core": "^3.7.
|
|
23
|
-
"@anncic-api/event": "^3.7.
|
|
24
|
-
"@anncic-api/typeorm": "^3.7.
|
|
25
|
-
"@anncic-api/validator": "^3.7.
|
|
21
|
+
"@anncic-api/cache": "^3.7.20",
|
|
22
|
+
"@anncic-api/core": "^3.7.20",
|
|
23
|
+
"@anncic-api/event": "^3.7.20",
|
|
24
|
+
"@anncic-api/typeorm": "^3.7.20",
|
|
25
|
+
"@anncic-api/validator": "^3.7.20",
|
|
26
26
|
"@midwayjs/busboy": "^3.17.1",
|
|
27
27
|
"@midwayjs/cross-domain": "^3.17.1",
|
|
28
28
|
"@midwayjs/koa": "^3.17.1",
|
|
29
29
|
"@midwayjs/logger": "^3.4.2",
|
|
30
30
|
"@midwayjs/static-file": "^3.17.1",
|
|
31
|
-
"anncic-apihelper": "^3.7.
|
|
31
|
+
"anncic-apihelper": "^3.7.20",
|
|
32
32
|
"exceljs": "^4.4.0",
|
|
33
33
|
"koa-send": "^5.0.1",
|
|
34
34
|
"minimatch": "^10.1.1"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "20.10.0",
|
|
38
38
|
"javascript-obfuscator": "^4.0.2",
|
|
39
|
-
"typescript": "^
|
|
39
|
+
"typescript": "^4.9.5"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "0a7d56c0ee061d05c8b11f12c3d03cbb4d7711f2"
|
|
42
42
|
}
|