@tachybase/plugin-action-export 1.3.22 → 1.3.23
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/externalVersion.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.3.1",
|
|
3
|
-
"@tachybase/client": "1.3.
|
|
4
|
-
"@tachybase/schema": "1.3.
|
|
5
|
-
"@tego/client": "1.3.
|
|
3
|
+
"@tachybase/client": "1.3.23",
|
|
4
|
+
"@tachybase/schema": "1.3.43",
|
|
5
|
+
"@tego/client": "1.3.43",
|
|
6
6
|
"react-i18next": "15.2.0",
|
|
7
7
|
"antd": "5.22.5",
|
|
8
8
|
"lodash": "4.17.21",
|
|
9
|
-
"@tego/server": "1.3.
|
|
9
|
+
"@tego/server": "1.3.43",
|
|
10
|
+
"dayjs": "1.11.13"
|
|
10
11
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"node-xlsx","author":"Olivier Louvignes <olivier@mg-crea.com>","version":"0.24.0","description":"NodeJS Excel files parser & builder","type":"module","main":"./dist/index.cjs","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"node-xlsx":"./dist/bin/cli.js"},"files":["dist"],"scripts":{"start":"npm run spec -- --watch","build":"tsup --entry src/index.ts --format cjs,esm --sourcemap --dts --clean --entry src/bin/cli.ts","lint":"eslint src/ test/","prettycheck":"prettier --check src/ test/","prettify":"prettier --write src/ test/","typecheck":"tsc --noEmit","spec":"DEBUG=node-xlsx* vitest --run","watch":"DEBUG=node-xlsx* vitest --watch","test":"npm run lint && npm run prettycheck && npm run typecheck && npm run spec","prepublishOnly":"npm run build"},"repository":"github:mgcrea/node-xlsx","license":"Apache-2.0","dependencies":{"xlsx":"https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"},"devDependencies":{"@mgcrea/eslint-config-node":"^0.10.0","@tsconfig/node-lts":"^20.1.1","@types/node":"^20.12.7","eslint":"^8.57.0","prettier":"^3.2.5","prettier-plugin-organize-imports":"^3.2.4","tsup":"^8.0.2","typescript":"^5.4.5","vite-tsconfig-paths":"^4.3.2","vitest":"^1.5.0"},"engines":{"node":">=10.0.0"},"keywords":["excel","parser","builder","xlsx","xls"],"_lastModified":"2025-
|
|
1
|
+
{"name":"node-xlsx","author":"Olivier Louvignes <olivier@mg-crea.com>","version":"0.24.0","description":"NodeJS Excel files parser & builder","type":"module","main":"./dist/index.cjs","exports":{".":{"require":"./dist/index.cjs","import":"./dist/index.js","types":"./dist/index.d.ts"}},"bin":{"node-xlsx":"./dist/bin/cli.js"},"files":["dist"],"scripts":{"start":"npm run spec -- --watch","build":"tsup --entry src/index.ts --format cjs,esm --sourcemap --dts --clean --entry src/bin/cli.ts","lint":"eslint src/ test/","prettycheck":"prettier --check src/ test/","prettify":"prettier --write src/ test/","typecheck":"tsc --noEmit","spec":"DEBUG=node-xlsx* vitest --run","watch":"DEBUG=node-xlsx* vitest --watch","test":"npm run lint && npm run prettycheck && npm run typecheck && npm run spec","prepublishOnly":"npm run build"},"repository":"github:mgcrea/node-xlsx","license":"Apache-2.0","dependencies":{"xlsx":"https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"},"devDependencies":{"@mgcrea/eslint-config-node":"^0.10.0","@tsconfig/node-lts":"^20.1.1","@types/node":"^20.12.7","eslint":"^8.57.0","prettier":"^3.2.5","prettier-plugin-organize-imports":"^3.2.4","tsup":"^8.0.2","typescript":"^5.4.5","vite-tsconfig-paths":"^4.3.2","vitest":"^1.5.0"},"engines":{"node":">=10.0.0"},"keywords":["excel","parser","builder","xlsx","xls"],"_lastModified":"2025-08-02T21:25:31.740Z"}
|
|
@@ -30,7 +30,7 @@ __export(export_xlsx_exports, {
|
|
|
30
30
|
exportXlsx: () => exportXlsx
|
|
31
31
|
});
|
|
32
32
|
module.exports = __toCommonJS(export_xlsx_exports);
|
|
33
|
-
var
|
|
33
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
34
34
|
var import_node_xlsx = __toESM(require("node-xlsx"));
|
|
35
35
|
var import__ = __toESM(require(".."));
|
|
36
36
|
var import_constants = require("../constants");
|
|
@@ -110,7 +110,7 @@ async function exportXlsx(ctx, next) {
|
|
|
110
110
|
for (const data2 of rows) {
|
|
111
111
|
for (const key in data2) {
|
|
112
112
|
if (data2[key] instanceof Date) {
|
|
113
|
-
data2[key] = (0,
|
|
113
|
+
data2[key] = (0, import_dayjs.default)(data2[key]).utcOffset(timezone).format("YYYY-MM-DD HH:mm:ss");
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
116
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
34
34
|
var import_node_fs = require("node:fs");
|
|
35
35
|
var import_node_path = __toESM(require("node:path"));
|
|
36
36
|
var import_server = require("@tego/server");
|
|
37
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
37
38
|
var import_node_xlsx = __toESM(require("node-xlsx"));
|
|
38
39
|
var import_actions = require("./actions");
|
|
39
40
|
var import_constants = require("./constants");
|
|
@@ -89,7 +90,7 @@ const _ExportPlugin = class _ExportPlugin extends import_server.Plugin {
|
|
|
89
90
|
for (const data2 of rows) {
|
|
90
91
|
for (const key in data2) {
|
|
91
92
|
if (data2[key] instanceof Date) {
|
|
92
|
-
data2[key] = (0,
|
|
93
|
+
data2[key] = (0, import_dayjs.default)(data2[key]).utcOffset(timezone).format("YYYY-MM-DD HH:mm:ss");
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
96
|
}
|
|
@@ -107,7 +108,7 @@ const _ExportPlugin = class _ExportPlugin extends import_server.Plugin {
|
|
|
107
108
|
if (!(0, import_node_fs.existsSync)(savePath)) {
|
|
108
109
|
(0, import_node_fs.mkdirSync)(savePath, { recursive: true });
|
|
109
110
|
}
|
|
110
|
-
const fileName = `${resourceName}_${(0,
|
|
111
|
+
const fileName = `${resourceName}_${(0, import_dayjs.default)().format("YYYYMMDDHHmm")}.xlsx`;
|
|
111
112
|
const rawFile = `${savePath}/${fileName}`;
|
|
112
113
|
(0, import_node_fs.writeFileSync)(rawFile, Buffer.from(stream));
|
|
113
114
|
return `${_ExportPlugin.defaultSavePath}/${fileName}`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tachybase/plugin-action-export",
|
|
3
3
|
"displayName": "Action: Export records",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.23",
|
|
5
5
|
"description": "Export filtered records to excel, you can configure which fields to export.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"Actions"
|
|
@@ -10,17 +10,18 @@
|
|
|
10
10
|
"main": "./dist/server/index.js",
|
|
11
11
|
"dependencies": {},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@tachybase/schema": "^1.3.
|
|
14
|
-
"@tachybase/test": "^1.3.
|
|
15
|
-
"@tego/client": "^1.3.
|
|
16
|
-
"@tego/server": "^1.3.
|
|
13
|
+
"@tachybase/schema": "^1.3.43",
|
|
14
|
+
"@tachybase/test": "^1.3.43",
|
|
15
|
+
"@tego/client": "^1.3.43",
|
|
16
|
+
"@tego/server": "^1.3.43",
|
|
17
17
|
"antd": "5.22.5",
|
|
18
|
+
"dayjs": "^1.11.13",
|
|
18
19
|
"file-saver": "^2.0.5",
|
|
19
20
|
"lodash": "4.17.21",
|
|
20
21
|
"node-xlsx": "^0.24.0",
|
|
21
22
|
"react": "18.3.1",
|
|
22
23
|
"react-i18next": "15.2.0",
|
|
23
|
-
"@tachybase/client": "1.3.
|
|
24
|
+
"@tachybase/client": "1.3.23"
|
|
24
25
|
},
|
|
25
26
|
"description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。",
|
|
26
27
|
"displayName.zh-CN": "操作:导出记录",
|