@nocobase/plugin-action-import 2.1.0-beta.20 → 2.1.0-beta.21

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.
@@ -8,7 +8,7 @@ postMessage({t:"ready"});
8
8
  onmessage = function (evt) {
9
9
  var v;
10
10
  try {
11
- v = XLSX.read(evt.data.d, {type: evt.data.b, codepage: evt.data.c});
11
+ v = XLSX.read(evt.data.d, {type: evt.data.b});
12
12
  postMessage({t:"xlsx", d:JSON.stringify(v)});
13
13
  } catch(e) { postMessage({t:"e",d:e.stack||e}); }
14
14
  };
@@ -39,7 +39,7 @@ __export(import_xlsx_exports, {
39
39
  importXlsx: () => importXlsx
40
40
  });
41
41
  module.exports = __toCommonJS(import_xlsx_exports);
42
- var import_xlsx = __toESM(require("xlsx"));
42
+ var XLSX = __toESM(require("xlsx"));
43
43
  var import_async_mutex = require("async-mutex");
44
44
  var import_xlsx_importer = require("../services/xlsx-importer");
45
45
  const IMPORT_LIMIT_COUNT = 2e3;
@@ -55,7 +55,7 @@ async function importXlsxAction(ctx, next) {
55
55
  if (ctx.request.body.explain) {
56
56
  readLimit += 1;
57
57
  }
58
- const workbook = import_xlsx.default.read(ctx.file.buffer, {
58
+ const workbook = XLSX.read(ctx.file.buffer, {
59
59
  type: "buffer",
60
60
  sheetRows: readLimit,
61
61
  cellDates: true
package/package.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "description": "Import records using excel templates. You can configure which fields to import and templates will be generated automatically.",
7
7
  "description.ru-RU": "Импорт записей с помощью шаблонов Excel: можно настроить, какие поля импортировать, шаблоны будут генерироваться автоматически.",
8
8
  "description.zh-CN": "使用 Excel 模板导入数据,可以配置导入哪些字段,自动生成模板。",
9
- "version": "2.1.0-beta.20",
9
+ "version": "2.1.0-beta.21",
10
10
  "license": "Apache-2.0",
11
11
  "main": "./dist/server/index.js",
12
12
  "homepage": "https://docs.nocobase.com/handbook/action-import",
@@ -36,7 +36,7 @@
36
36
  "react": "^18.2.0",
37
37
  "react-dom": "^18.2.0",
38
38
  "react-i18next": "^11.15.1",
39
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
39
+ "xlsx": "^0.18.5"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@nocobase/actions": "2.x",
@@ -46,7 +46,7 @@
46
46
  "@nocobase/test": "2.x",
47
47
  "@nocobase/utils": "2.x"
48
48
  },
49
- "gitHead": "5515f27380c0c5410f7d1e5e5858364fcd838e5e",
49
+ "gitHead": "324bd82f33fca58e98711688a17ceb65c186b65e",
50
50
  "keywords": [
51
51
  "Actions"
52
52
  ]
@@ -1,39 +0,0 @@
1
- /* codepage.js (C) 2013-present SheetJS -- http://sheetjs.com */
2
- // TypeScript Version: 2.2
3
-
4
- /** Codepage index type (integer or string representation) */
5
- export type CP$Index = number | string;
6
-
7
- /* Individual codepage converter */
8
- export interface CP$Conv {
9
- enc: {[n: string]: number; };
10
- dec: {[n: number]: string; };
11
- }
12
-
13
- /** Encode input type (string, array of characters, Buffer) */
14
- export type CP$String = string | string[] | Uint8Array;
15
-
16
- /** Encode output / decode input type */
17
- export type CP$Data = string | number[] | Uint8Array;
18
-
19
- /** General utilities */
20
- export interface CP$Utils {
21
- decode(cp: CP$Index, data: CP$Data): string;
22
- encode(cp: CP$Index, data: CP$String, opts?: any): CP$Data;
23
- hascp(n: number): boolean;
24
- magic: {[cp: string]: string};
25
- }
26
-
27
- /* note: TS cannot export top-level indexer, hence default workaround */
28
- export interface CP$Module {
29
- /** Version string */
30
- version: string;
31
-
32
- /** Utility Functions */
33
- utils: CP$Utils;
34
-
35
- /** Codepage Converters */
36
- [cp: number]: CP$Conv;
37
- }
38
- export const cptable: CP$Module;
39
- export default cptable;
@@ -1,4 +0,0 @@
1
- /* zahl.d.ts (C) 2022-present SheetJS */
2
- // TypeScript Version: 2.2
3
- declare const XLSX_ZAHL_PAYLOAD: string;
4
- export default XLSX_ZAHL_PAYLOAD;