@nocobase/plugin-action-export 1.9.0-alpha.10 → 1.9.0-alpha.12
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
|
@@ -10,17 +10,17 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"@formily/react": "2.3.0",
|
|
12
12
|
"@formily/shared": "2.3.2",
|
|
13
|
-
"@nocobase/client": "1.9.0-alpha.
|
|
13
|
+
"@nocobase/client": "1.9.0-alpha.12",
|
|
14
14
|
"react": "18.2.0",
|
|
15
15
|
"@formily/antd-v5": "1.2.3",
|
|
16
16
|
"react-i18next": "11.18.6",
|
|
17
17
|
"lodash": "4.17.21",
|
|
18
18
|
"file-saver": "2.0.5",
|
|
19
19
|
"antd": "5.24.2",
|
|
20
|
-
"@nocobase/server": "1.9.0-alpha.
|
|
21
|
-
"@nocobase/logger": "1.9.0-alpha.
|
|
22
|
-
"@nocobase/actions": "1.9.0-alpha.
|
|
23
|
-
"@nocobase/database": "1.9.0-alpha.
|
|
20
|
+
"@nocobase/server": "1.9.0-alpha.12",
|
|
21
|
+
"@nocobase/logger": "1.9.0-alpha.12",
|
|
22
|
+
"@nocobase/actions": "1.9.0-alpha.12",
|
|
23
|
+
"@nocobase/database": "1.9.0-alpha.12",
|
|
24
24
|
"async-mutex": "0.5.0",
|
|
25
|
-
"@nocobase/data-source-manager": "1.9.0-alpha.
|
|
25
|
+
"@nocobase/data-source-manager": "1.9.0-alpha.12"
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"exceljs","version":"4.4.0","description":"Excel Workbook Manager - Read and Write xlsx and csv Files.","private":false,"license":"MIT","author":{"name":"Guyon Roche","email":"guyon@live.com"},"repository":{"type":"git","url":"https://github.com/exceljs/exceljs.git"},"engines":{"node":">=8.3.0"},"main":"./excel.js","browser":"./dist/exceljs.min.js","types":"./index.d.ts","files":["dist","lib","excel.js","LICENSE","README.md","README_zh.md","index.ts","index.d.ts"],"scripts":{"test":"npm run test:full","test:es5":"export EXCEL_BUILD=es5 && npm run test:full","test:full":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:jasmine","test:version":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:browser && npm run test:dist","test:all":"npm run test:native && npm run test:es5","test:native":"npm run test:full","test:unit":"mocha --require spec/config/setup --require spec/config/setup-unit spec/unit --recursive","test:integration":"mocha --require spec/config/setup spec/integration --recursive","test:end-to-end":"mocha --require spec/config/setup spec/end-to-end --recursive","test:browser":"if [ ! -f .disable-test-browser ]; then npm run build && npm run test:jasmine; fi","test:jasmine":"grunt jasmine","test:unit:es5":"export EXCEL_BUILD=es5 && npm run test:unit","test:integration:es5":"export EXCEL_BUILD=es5 && npm run test:integration","test:end-to-end:es5":"export EXCEL_BUILD=es5 && npm run test:end-to-end","test:dist":"mocha --require spec/config/setup spec/dist --recursive","test:manual":"node spec/manual/app.js","test:typescript":"mocha -r ts-node/register spec/typescript/**/*.spec.ts","clean-build":"npm run clean && npm run build","lint":"eslint --format node_modules/eslint-friendly-formatter .","lint:fix":"prettier-eslint --write $(pwd)'/**/*.js'","lint:staged":"lint-staged","clean":"rm -rf build/ && rm -rf dist","benchmark":"node --expose-gc benchmark","benchmark:debug":"node --expose-gc --inspect-brk --trace-deopt benchmark","build":"grunt build","install-build":"npm install && grunt build","preversion":"npm run clean && npm run build && npm run test:version","postversion":"git push --no-verify && git push --tags --no-verify"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["prettier-eslint --write","eslint --format node_modules/eslint-friendly-formatter","git add"]},"keywords":["xlsx","json","csv","excel","font","border","fill","number","format","number format","alignment","office","spreadsheet","workbook","defined names","data validations","rich text","in-cell format","outlineLevel","views","frozen","split","pageSetup"],"dependencies":{"archiver":"^5.0.0","dayjs":"^1.8.34","fast-csv":"^4.3.1","jszip":"^3.10.1","readable-stream":"^3.6.0","saxes":"^5.0.1","tmp":"^0.2.0","unzipper":"^0.10.11","uuid":"^8.3.0"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/preset-env":"^7.11.0","@types/chai":"^4.2.12","@types/mocha":"^8.0.3","@types/node":"^14.11.2","babelify":"^10.0.0","browserify":"^16.5.2","chai":"^4.2.0","chai-datetime":"^1.7.0","chai-xml":"^0.3.2","core-js":"^3.6.5","dirty-chai":"^2.0.1","eslint":"^6.5.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.12.0","eslint-friendly-formatter":"^4.0.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","express":"^4.16.4","got":"^9.0.0","grunt":"^1.3.0","grunt-babel":"^8.0.0","grunt-browserify":"^5.3.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-jasmine":"^2.2.0","grunt-contrib-watch":"^1.1.0","grunt-exorcise":"^2.1.1","grunt-terser":"^1.0.0","husky":"^4.3.0","lint-staged":"^10.2.13","mocha":"^7.2.0","prettier-eslint":"^11.0.0","prettier-eslint-cli":"^5.0.0","regenerator-runtime":"^0.13.7","sax":"^1.2.4","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-08-
|
|
1
|
+
{"name":"exceljs","version":"4.4.0","description":"Excel Workbook Manager - Read and Write xlsx and csv Files.","private":false,"license":"MIT","author":{"name":"Guyon Roche","email":"guyon@live.com"},"repository":{"type":"git","url":"https://github.com/exceljs/exceljs.git"},"engines":{"node":">=8.3.0"},"main":"./excel.js","browser":"./dist/exceljs.min.js","types":"./index.d.ts","files":["dist","lib","excel.js","LICENSE","README.md","README_zh.md","index.ts","index.d.ts"],"scripts":{"test":"npm run test:full","test:es5":"export EXCEL_BUILD=es5 && npm run test:full","test:full":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:jasmine","test:version":"npm run build && npm run test:unit && npm run test:integration && npm run test:end-to-end && npm run test:browser && npm run test:dist","test:all":"npm run test:native && npm run test:es5","test:native":"npm run test:full","test:unit":"mocha --require spec/config/setup --require spec/config/setup-unit spec/unit --recursive","test:integration":"mocha --require spec/config/setup spec/integration --recursive","test:end-to-end":"mocha --require spec/config/setup spec/end-to-end --recursive","test:browser":"if [ ! -f .disable-test-browser ]; then npm run build && npm run test:jasmine; fi","test:jasmine":"grunt jasmine","test:unit:es5":"export EXCEL_BUILD=es5 && npm run test:unit","test:integration:es5":"export EXCEL_BUILD=es5 && npm run test:integration","test:end-to-end:es5":"export EXCEL_BUILD=es5 && npm run test:end-to-end","test:dist":"mocha --require spec/config/setup spec/dist --recursive","test:manual":"node spec/manual/app.js","test:typescript":"mocha -r ts-node/register spec/typescript/**/*.spec.ts","clean-build":"npm run clean && npm run build","lint":"eslint --format node_modules/eslint-friendly-formatter .","lint:fix":"prettier-eslint --write $(pwd)'/**/*.js'","lint:staged":"lint-staged","clean":"rm -rf build/ && rm -rf dist","benchmark":"node --expose-gc benchmark","benchmark:debug":"node --expose-gc --inspect-brk --trace-deopt benchmark","build":"grunt build","install-build":"npm install && grunt build","preversion":"npm run clean && npm run build && npm run test:version","postversion":"git push --no-verify && git push --tags --no-verify"},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.js":["prettier-eslint --write","eslint --format node_modules/eslint-friendly-formatter","git add"]},"keywords":["xlsx","json","csv","excel","font","border","fill","number","format","number format","alignment","office","spreadsheet","workbook","defined names","data validations","rich text","in-cell format","outlineLevel","views","frozen","split","pageSetup"],"dependencies":{"archiver":"^5.0.0","dayjs":"^1.8.34","fast-csv":"^4.3.1","jszip":"^3.10.1","readable-stream":"^3.6.0","saxes":"^5.0.1","tmp":"^0.2.0","unzipper":"^0.10.11","uuid":"^8.3.0"},"devDependencies":{"@babel/cli":"^7.10.5","@babel/core":"^7.11.4","@babel/preset-env":"^7.11.0","@types/chai":"^4.2.12","@types/mocha":"^8.0.3","@types/node":"^14.11.2","babelify":"^10.0.0","browserify":"^16.5.2","chai":"^4.2.0","chai-datetime":"^1.7.0","chai-xml":"^0.3.2","core-js":"^3.6.5","dirty-chai":"^2.0.1","eslint":"^6.5.1","eslint-config-airbnb-base":"^14.2.0","eslint-config-prettier":"^6.12.0","eslint-friendly-formatter":"^4.0.1","eslint-plugin-import":"^2.22.0","eslint-plugin-node":"^11.1.0","express":"^4.16.4","got":"^9.0.0","grunt":"^1.3.0","grunt-babel":"^8.0.0","grunt-browserify":"^5.3.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-jasmine":"^2.2.0","grunt-contrib-watch":"^1.1.0","grunt-exorcise":"^2.1.1","grunt-terser":"^1.0.0","husky":"^4.3.0","lint-staged":"^10.2.13","mocha":"^7.2.0","prettier-eslint":"^11.0.0","prettier-eslint-cli":"^5.0.0","regenerator-runtime":"^0.13.7","sax":"^1.2.4","ts-node":"^8.10.2","typescript":"^3.9.7"},"_lastModified":"2025-08-22T05:09:22.463Z"}
|
|
@@ -42,7 +42,6 @@ module.exports = __toCommonJS(base_exporter_exports);
|
|
|
42
42
|
var import_events = __toESM(require("events"));
|
|
43
43
|
var import_deep_get = require("../utils/deep-get");
|
|
44
44
|
var import_path = __toESM(require("path"));
|
|
45
|
-
var import_os = __toESM(require("os"));
|
|
46
45
|
var import_lodash = __toESM(require("lodash"));
|
|
47
46
|
var import_database = require("@nocobase/database");
|
|
48
47
|
class BaseExporter extends import_events.default {
|
|
@@ -96,7 +95,7 @@ class BaseExporter extends import_events.default {
|
|
|
96
95
|
)}`
|
|
97
96
|
);
|
|
98
97
|
} else {
|
|
99
|
-
(_b2 = this.logger) == null ? void 0 : _b2.
|
|
98
|
+
(_b2 = this.logger) == null ? void 0 : _b2.trace(`Query completed in ${executionTime}ms, fetched ${rows.length} records`);
|
|
100
99
|
}
|
|
101
100
|
this._batchQueryStartTime = null;
|
|
102
101
|
}
|
|
@@ -109,9 +108,9 @@ class BaseExporter extends import_events.default {
|
|
|
109
108
|
const diff = process.hrtime(startTime);
|
|
110
109
|
const executionTime = (diff[0] * 1e3 + diff[1] / 1e6).toFixed(2);
|
|
111
110
|
if (Number(executionTime) > 500) {
|
|
112
|
-
(_a2 = this.logger) == null ? void 0 : _a2.
|
|
111
|
+
(_a2 = this.logger) == null ? void 0 : _a2.debug(`HandleRow took too long, completed in ${executionTime}ms`);
|
|
113
112
|
} else {
|
|
114
|
-
(_b2 = this.logger) == null ? void 0 : _b2.
|
|
113
|
+
(_b2 = this.logger) == null ? void 0 : _b2.trace(`HandleRow completed, ${executionTime}ms`);
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
116
|
this.emit("progress", {
|
|
@@ -121,7 +120,7 @@ class BaseExporter extends import_events.default {
|
|
|
121
120
|
const totalDiff = process.hrtime(totalCountStartTime);
|
|
122
121
|
const elapsedSeconds = totalDiff[0] + totalDiff[1] / 1e9;
|
|
123
122
|
const estimatedTimeRemaining = elapsedSeconds * (total - current) / current;
|
|
124
|
-
(_c2 = this.logger) == null ? void 0 : _c2.
|
|
123
|
+
(_c2 = this.logger) == null ? void 0 : _c2.trace(
|
|
125
124
|
`Processed ${current}/${total} records (${Math.round(current / total * 100)}%), elapsed time: ${elapsedSeconds.toFixed(2)}s, estimated remaining: ${estimatedTimeRemaining.toFixed(2)}s`
|
|
126
125
|
);
|
|
127
126
|
}
|
|
@@ -224,7 +223,7 @@ class BaseExporter extends import_events.default {
|
|
|
224
223
|
}
|
|
225
224
|
return render(value);
|
|
226
225
|
}
|
|
227
|
-
generateOutputPath(prefix = "export", ext = "", destination =
|
|
226
|
+
generateOutputPath(prefix = "export", ext = "", destination = import_path.default.join(process.cwd(), "storage", "tmp")) {
|
|
228
227
|
const fileName = `${prefix}-${Date.now()}-${Math.random().toString(36).slice(2)}${ext}`;
|
|
229
228
|
return import_path.default.join(destination, fileName);
|
|
230
229
|
}
|
|
@@ -42,7 +42,7 @@ module.exports = __toCommonJS(xlsx_exporter_exports);
|
|
|
42
42
|
var Excel = __toESM(require("exceljs"));
|
|
43
43
|
var import_base_exporter = require("./base-exporter");
|
|
44
44
|
var import_fs = __toESM(require("fs"));
|
|
45
|
-
|
|
45
|
+
var import_path = __toESM(require("path"));
|
|
46
46
|
class XlsxExporter extends import_base_exporter.BaseExporter {
|
|
47
47
|
/**
|
|
48
48
|
* You can adjust the maximum number of exported rows based on business needs and system
|
|
@@ -64,6 +64,8 @@ class XlsxExporter extends import_base_exporter.BaseExporter {
|
|
|
64
64
|
this.outputPath = options.outputPath || this.generateOutputPath("xlsx", ".xlsx");
|
|
65
65
|
}
|
|
66
66
|
async init(ctx) {
|
|
67
|
+
const outputDir = import_path.default.dirname(this.outputPath);
|
|
68
|
+
await import_fs.default.promises.mkdir(outputDir, { recursive: true });
|
|
67
69
|
this.workbook = new Excel.stream.xlsx.WorkbookWriter({
|
|
68
70
|
filename: this.outputPath,
|
|
69
71
|
useStyles: true,
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"displayName.zh-CN": "操作:导出记录",
|
|
5
5
|
"description": "Export filtered records to excel, you can configure which fields to export.",
|
|
6
6
|
"description.zh-CN": "导出筛选后的记录到 Excel 中,可以配置导出哪些字段。",
|
|
7
|
-
"version": "1.9.0-alpha.
|
|
7
|
+
"version": "1.9.0-alpha.12",
|
|
8
8
|
"license": "AGPL-3.0",
|
|
9
9
|
"main": "./dist/server/index.js",
|
|
10
10
|
"homepage": "https://docs.nocobase.com/handbook/action-export",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@nocobase/test": "1.x",
|
|
30
30
|
"@nocobase/utils": "1.x"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "f7840ec3f679262884ad17b4743ee047cb37b8fe",
|
|
33
33
|
"keywords": [
|
|
34
34
|
"Actions"
|
|
35
35
|
]
|