@nocobase/plugin-action-import 1.5.0-beta.2 → 1.5.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.
- package/dist/client/ImportAction.d.ts +2 -0
- package/dist/client/ImportActionContext.d.ts +3 -0
- package/dist/client/ImportActionInitializer.d.ts +5 -1
- package/dist/client/index.js +1 -24
- package/dist/client/useDownloadXlsxTemplateAction.d.ts +11 -0
- package/dist/client/useShared.d.ts +16 -0
- package/dist/externalVersion.js +12 -10
- package/dist/locale/en-US.json +15 -1
- package/dist/locale/zh-CN.json +14 -1
- package/dist/node_modules/exceljs/LICENSE +22 -0
- package/dist/node_modules/exceljs/dist/es5/csv/csv.js +182 -0
- package/dist/node_modules/exceljs/dist/es5/csv/line-buffer.js +68 -0
- package/dist/node_modules/exceljs/dist/es5/csv/stream-converter.js +110 -0
- package/dist/node_modules/exceljs/dist/es5/doc/anchor.js +73 -0
- package/dist/node_modules/exceljs/dist/es5/doc/cell.js +961 -0
- package/dist/node_modules/exceljs/dist/es5/doc/column.js +274 -0
- package/dist/node_modules/exceljs/dist/es5/doc/data-validations.js +18 -0
- package/dist/node_modules/exceljs/dist/es5/doc/defined-names.js +173 -0
- package/dist/node_modules/exceljs/dist/es5/doc/enums.js +49 -0
- package/dist/node_modules/exceljs/dist/es5/doc/image.js +69 -0
- package/dist/node_modules/exceljs/dist/es5/doc/modelcontainer.js +16 -0
- package/dist/node_modules/exceljs/dist/es5/doc/note.js +64 -0
- package/dist/node_modules/exceljs/dist/es5/doc/range.js +229 -0
- package/dist/node_modules/exceljs/dist/es5/doc/row.js +382 -0
- package/dist/node_modules/exceljs/dist/es5/doc/table.js +443 -0
- package/dist/node_modules/exceljs/dist/es5/doc/workbook.js +202 -0
- package/dist/node_modules/exceljs/dist/es5/doc/worksheet.js +900 -0
- package/dist/node_modules/exceljs/dist/es5/exceljs.bare.js +14 -0
- package/dist/node_modules/exceljs/dist/es5/exceljs.browser.js +36 -0
- package/dist/node_modules/exceljs/dist/es5/exceljs.nodejs.js +15 -0
- package/dist/node_modules/exceljs/dist/es5/index.js +15 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/hyperlink-reader.js +90 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/sheet-comments-writer.js +94 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/sheet-rels-writer.js +94 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/workbook-reader.js +362 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/workbook-writer.js +347 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/worksheet-reader.js +392 -0
- package/dist/node_modules/exceljs/dist/es5/stream/xlsx/worksheet-writer.js +652 -0
- package/dist/node_modules/exceljs/dist/es5/utils/auto-drain.js +18 -0
- package/dist/node_modules/exceljs/dist/es5/utils/browser-buffer-decode.js +15 -0
- package/dist/node_modules/exceljs/dist/es5/utils/browser-buffer-encode.js +18 -0
- package/dist/node_modules/exceljs/dist/es5/utils/cell-matrix.js +149 -0
- package/dist/node_modules/exceljs/dist/es5/utils/col-cache.js +258 -0
- package/dist/node_modules/exceljs/dist/es5/utils/copy-style.js +43 -0
- package/dist/node_modules/exceljs/dist/es5/utils/encryptor.js +58 -0
- package/dist/node_modules/exceljs/dist/es5/utils/iterate-stream.js +46 -0
- package/dist/node_modules/exceljs/dist/es5/utils/parse-sax.js +47 -0
- package/dist/node_modules/exceljs/dist/es5/utils/shared-formula.js +42 -0
- package/dist/node_modules/exceljs/dist/es5/utils/shared-strings.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/utils/stream-base64.js +66 -0
- package/dist/node_modules/exceljs/dist/es5/utils/stream-buf.js +343 -0
- package/dist/node_modules/exceljs/dist/es5/utils/string-buf.js +73 -0
- package/dist/node_modules/exceljs/dist/es5/utils/string-builder.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/utils/stuttered-pipe.js +61 -0
- package/dist/node_modules/exceljs/dist/es5/utils/typed-stack.js +23 -0
- package/dist/node_modules/exceljs/dist/es5/utils/under-dash.js +168 -0
- package/dist/node_modules/exceljs/dist/es5/utils/utils.js +171 -0
- package/dist/node_modules/exceljs/dist/es5/utils/xml-stream.js +151 -0
- package/dist/node_modules/exceljs/dist/es5/utils/zip-stream.js +79 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/defaultnumformats.js +230 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/rel-type.js +18 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/base-xform.js +139 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/defined-name-xform.js +85 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/sheet-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/workbook-calc-properties-xform.js +24 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/workbook-properties-xform.js +27 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/workbook-view-xform.js +51 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/book/workbook-xform.js +234 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/comment-xform.js +103 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/comments-xform.js +76 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/style/vml-position-xform.js +35 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/style/vml-protection-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/vml-anchor-xform.js +53 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/vml-client-data-xform.js +97 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/vml-notes-xform.js +107 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/vml-shape-xform.js +92 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/comment/vml-textbox-xform.js +61 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/composite-xform.js +51 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/app-heading-pairs-xform.js +30 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/app-titles-of-parts-xform.js +27 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/app-xform.js +93 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/content-types-xform.js +112 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/core-xform.js +158 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/relationship-xform.js +23 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/core/relationships-xform.js +65 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/base-cell-anchor-xform.js +47 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/blip-fill-xform.js +61 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/blip-xform.js +40 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/c-nv-pic-pr-xform.js +35 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/c-nv-pr-xform.js +62 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/cell-position-xform.js +82 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/drawing-xform.js +98 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/ext-lst-xform.js +40 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/ext-xform.js +38 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/hlink-click-xform.js +38 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/nv-pic-pr-xform.js +59 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/one-cell-anchor-xform.js +63 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/pic-xform.js +67 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/sp-pr.js +30 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/drawing/two-cell-anchor-xform.js +62 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/list-xform.js +91 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/auto-filter-xform.js +40 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cell-xform.js +451 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/cf-rule-xform.js +275 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/cfvo-xform.js +25 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/color-scale-xform.js +38 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/conditional-formatting-xform.js +45 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/conditional-formattings-xform.js +77 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/databar-xform.js +42 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/ext-lst-ref-xform.js +71 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/formula-xform.js +22 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf/icon-set-xform.js +43 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js +28 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +88 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js +38 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js +52 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js +43 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/databar-ext-xform.js +75 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/f-ext-xform.js +22 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js +66 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js +22 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/col-xform.js +78 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/data-validations-xform.js +247 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/dimension-xform.js +28 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/drawing-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/ext-lst-xform.js +69 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/header-footer-xform.js +126 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/hyperlink-xform.js +50 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/merge-cell-xform.js +26 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/merges.js +52 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/outline-properties-xform.js +35 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/page-breaks-xform.js +24 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/page-margins-xform.js +46 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/page-setup-properties-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/page-setup-xform.js +99 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/picture-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/print-options-xform.js +45 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/row-breaks-xform.js +37 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/row-xform.js +128 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/sheet-format-properties-xform.js +51 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/sheet-properties-xform.js +83 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/sheet-protection-xform.js +84 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/sheet-view-xform.js +190 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/table-part-xform.js +32 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/sheet/worksheet-xform.js +513 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/simple/boolean-xform.js +27 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/simple/date-xform.js +58 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/simple/float-xform.js +47 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/simple/integer-xform.js +53 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/simple/string-xform.js +47 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/static-xform.js +61 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/strings/phonetic-text-xform.js +98 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/strings/rich-text-xform.js +92 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/strings/shared-string-xform.js +99 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/strings/shared-strings-xform.js +114 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/strings/text-xform.js +39 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/alignment-xform.js +139 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/border-xform.js +185 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/color-xform.js +66 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/dxf-xform.js +106 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/fill-xform.js +308 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/font-xform.js +175 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/numfmt-xform.js +59 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/protection-xform.js +53 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/style-xform.js +118 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/styles-xform.js +612 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/style/underline-xform.js +46 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/auto-filter-xform.js +75 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/custom-filter-xform.js +30 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/filter-column-xform.js +89 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/filter-xform.js +28 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/table-column-xform.js +42 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/table-style-info-xform.js +40 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xform/table/table-xform.js +123 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xlsx.js +697 -0
- package/dist/node_modules/exceljs/dist/es5/xlsx/xml/theme1.js +5 -0
- package/dist/node_modules/exceljs/dist/exceljs.bare.js +55253 -0
- package/dist/node_modules/exceljs/dist/exceljs.bare.min.js +45 -0
- package/dist/node_modules/exceljs/dist/exceljs.js +59900 -0
- package/dist/node_modules/exceljs/dist/exceljs.min.js +45 -0
- package/dist/node_modules/exceljs/excel.js +97 -0
- package/dist/node_modules/exceljs/index.d.ts +2035 -0
- package/dist/node_modules/exceljs/index.ts +2 -0
- package/dist/node_modules/exceljs/lib/csv/csv.js +191 -0
- package/dist/node_modules/exceljs/lib/csv/line-buffer.js +74 -0
- package/dist/node_modules/exceljs/lib/csv/stream-converter.js +135 -0
- package/dist/node_modules/exceljs/lib/doc/anchor.js +91 -0
- package/dist/node_modules/exceljs/lib/doc/cell.js +1124 -0
- package/dist/node_modules/exceljs/lib/doc/column.js +320 -0
- package/dist/node_modules/exceljs/lib/doc/data/theme1.json +234 -0
- package/dist/node_modules/exceljs/lib/doc/data-validations.js +19 -0
- package/dist/node_modules/exceljs/lib/doc/defined-names.js +196 -0
- package/dist/node_modules/exceljs/lib/doc/enums.js +48 -0
- package/dist/node_modules/exceljs/lib/doc/image.js +59 -0
- package/dist/node_modules/exceljs/lib/doc/modelcontainer.js +18 -0
- package/dist/node_modules/exceljs/lib/doc/note.js +65 -0
- package/dist/node_modules/exceljs/lib/doc/range.js +257 -0
- package/dist/node_modules/exceljs/lib/doc/row.js +415 -0
- package/dist/node_modules/exceljs/lib/doc/table.js +465 -0
- package/dist/node_modules/exceljs/lib/doc/workbook.js +221 -0
- package/dist/node_modules/exceljs/lib/doc/worksheet.js +927 -0
- package/dist/node_modules/exceljs/lib/exceljs.bare.js +13 -0
- package/dist/node_modules/exceljs/lib/exceljs.browser.js +36 -0
- package/dist/node_modules/exceljs/lib/exceljs.nodejs.js +14 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/hyperlink-reader.js +83 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/sheet-comments-writer.js +121 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/sheet-rels-writer.js +119 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/workbook-reader.js +337 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/workbook-writer.js +347 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/worksheet-reader.js +374 -0
- package/dist/node_modules/exceljs/lib/stream/xlsx/worksheet-writer.js +717 -0
- package/dist/node_modules/exceljs/lib/utils/auto-drain.js +15 -0
- package/dist/node_modules/exceljs/lib/utils/browser-buffer-decode.js +14 -0
- package/dist/node_modules/exceljs/lib/utils/browser-buffer-encode.js +15 -0
- package/dist/node_modules/exceljs/lib/utils/cell-matrix.js +165 -0
- package/dist/node_modules/exceljs/lib/utils/col-cache.js +287 -0
- package/dist/node_modules/exceljs/lib/utils/copy-style.js +43 -0
- package/dist/node_modules/exceljs/lib/utils/encryptor.js +55 -0
- package/dist/node_modules/exceljs/lib/utils/iterate-stream.js +48 -0
- package/dist/node_modules/exceljs/lib/utils/parse-sax.js +30 -0
- package/dist/node_modules/exceljs/lib/utils/shared-formula.js +44 -0
- package/dist/node_modules/exceljs/lib/utils/shared-strings.js +35 -0
- package/dist/node_modules/exceljs/lib/utils/stream-base64.js +72 -0
- package/dist/node_modules/exceljs/lib/utils/stream-buf.js +364 -0
- package/dist/node_modules/exceljs/lib/utils/string-buf.js +82 -0
- package/dist/node_modules/exceljs/lib/utils/string-builder.js +35 -0
- package/dist/node_modules/exceljs/lib/utils/stuttered-pipe.js +67 -0
- package/dist/node_modules/exceljs/lib/utils/typed-stack.js +24 -0
- package/dist/node_modules/exceljs/lib/utils/under-dash.js +184 -0
- package/dist/node_modules/exceljs/lib/utils/utils.js +172 -0
- package/dist/node_modules/exceljs/lib/utils/xml-stream.js +169 -0
- package/dist/node_modules/exceljs/lib/utils/zip-stream.js +87 -0
- package/dist/node_modules/exceljs/lib/xlsx/.rels +11 -0
- package/dist/node_modules/exceljs/lib/xlsx/calcChain.xml +6 -0
- package/dist/node_modules/exceljs/lib/xlsx/core.xml +7 -0
- package/dist/node_modules/exceljs/lib/xlsx/defaultnumformats.js +153 -0
- package/dist/node_modules/exceljs/lib/xlsx/rel-type.js +21 -0
- package/dist/node_modules/exceljs/lib/xlsx/styles.xml +41 -0
- package/dist/node_modules/exceljs/lib/xlsx/workbook.xml +16 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/base-xform.js +145 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/defined-name-xform.js +91 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/sheet-xform.js +34 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/workbook-calc-properties-xform.js +26 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/workbook-properties-xform.js +29 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/workbook-view-xform.js +53 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/book/workbook-xform.js +255 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/comment-xform.js +105 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/comments-xform.js +82 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-position-xform.js +39 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/style/vml-protection-xform.js +36 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/vml-anchor-xform.js +60 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/vml-client-data-xform.js +95 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/vml-notes-xform.js +107 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/vml-shape-xform.js +95 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/comment/vml-textbox-xform.js +64 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/composite-xform.js +56 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/app-heading-pairs-xform.js +32 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/app-titles-of-parts-xform.js +28 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/app-xform.js +100 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/content-types-xform.js +120 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/core-xform.js +136 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/relationship-xform.js +25 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/core/relationships-xform.js +73 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/base-cell-anchor-xform.js +48 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/blip-fill-xform.js +71 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/blip-xform.js +42 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pic-pr-xform.js +38 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/c-nv-pr-xform.js +68 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/cell-position-xform.js +77 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/drawing-xform.js +109 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/ext-lst-xform.js +43 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/ext-xform.js +44 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/hlink-click-xform.js +41 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/nv-pic-pr-xform.js +65 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/one-cell-anchor-xform.js +63 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/pic-xform.js +77 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/sp-pr.js +17 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/drawing/two-cell-anchor-xform.js +62 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/list-xform.js +95 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/auto-filter-xform.js +38 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cell-xform.js +498 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cf-rule-xform.js +301 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/cfvo-xform.js +27 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/color-scale-xform.js +45 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formatting-xform.js +48 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/conditional-formattings-xform.js +92 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/databar-xform.js +49 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/ext-lst-ref-xform.js +87 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/formula-xform.js +25 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf/icon-set-xform.js +47 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-icon-ext-xform.js +27 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cf-rule-ext-xform.js +98 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/cfvo-ext-xform.js +43 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formatting-ext-xform.js +62 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/conditional-formattings-ext-xform.js +50 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/databar-ext-xform.js +98 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/f-ext-xform.js +25 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/icon-set-ext-xform.js +73 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/cf-ext/sqref-ext-xform.js +25 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/col-xform.js +86 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/data-validations-xform.js +257 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/dimension-xform.js +29 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/drawing-xform.js +33 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/ext-lst-xform.js +86 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/header-footer-xform.js +146 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/hyperlink-xform.js +54 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/merge-cell-xform.js +27 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/merges.js +56 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/outline-properties-xform.js +43 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/page-breaks-xform.js +27 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/page-margins-xform.js +49 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-properties-xform.js +35 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/page-setup-xform.js +103 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/picture-xform.js +33 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/print-options-xform.js +49 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/row-breaks-xform.js +39 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/row-xform.js +142 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-format-properties-xform.js +55 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-properties-xform.js +90 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-protection-xform.js +89 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/sheet-view-xform.js +202 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/table-part-xform.js +33 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/sheet/worksheet-xform.js +539 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/simple/boolean-xform.js +31 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/simple/date-xform.js +66 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/simple/float-xform.js +51 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/simple/integer-xform.js +57 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/simple/string-xform.js +51 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/static-xform.js +64 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/strings/phonetic-text-xform.js +98 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/strings/rich-text-xform.js +101 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/strings/shared-string-xform.js +102 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/strings/shared-strings-xform.js +127 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/strings/text-xform.js +44 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/alignment-xform.js +172 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/border-xform.js +207 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/color-xform.js +63 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/dxf-xform.js +111 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/fill-xform.js +364 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/font-xform.js +102 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/numfmt-xform.js +63 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/protection-xform.js +60 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/style-xform.js +125 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/styles-xform.js +527 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/style/underline-xform.js +47 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/auto-filter-xform.js +81 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/custom-filter-xform.js +33 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/filter-column-xform.js +96 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/filter-xform.js +31 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/table-column-xform.js +44 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/table-style-info-xform.js +41 -0
- package/dist/node_modules/exceljs/lib/xlsx/xform/table/table-xform.js +131 -0
- package/dist/node_modules/exceljs/lib/xlsx/xlsx.js +694 -0
- package/dist/node_modules/exceljs/lib/xlsx/xml/theme1.js +3 -0
- package/dist/node_modules/exceljs/lib/xlsx/xml/theme1.xml +318 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/.editorconfig +7 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/dayjs.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/constant.js +25 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/index.d.ts +429 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/index.js +541 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/af.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/am.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-dz.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-iq.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-kw.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-ly.js +27 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-ma.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-sa.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar-tn.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ar.js +77 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/az.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/be.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bg.js +55 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bi.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bm.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bn-bd.js +81 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bn.js +72 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bo.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/br.js +93 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/bs.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ca.js +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/cs.js +120 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/cv.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/cy.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/da.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/de-at.js +63 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/de-ch.js +63 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/de.js +64 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/dv.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/el.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-au.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-ca.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-gb.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-ie.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-il.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-in.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-nz.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-sg.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en-tt.js +42 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/en.js +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/eo.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/es-do.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/es-mx.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/es-pr.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/es-us.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/es.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/et.js +65 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/eu.js +43 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fa.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fi.js +88 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fo.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fr-ca.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fr-ch.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fr.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/fy.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ga.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/gd.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/gl.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/gom-latn.js +25 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/gu.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/he.js +78 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/hi.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/hr.js +53 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ht.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/hu.js +61 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/hy-am.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/id.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/index.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/is.js +68 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/it-ch.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/it.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ja.js +45 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/jv.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ka.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/kk.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/km.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/kn.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ko.js +45 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ku.js +77 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ky.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/lb.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/lo.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/lt.js +70 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/lv.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/me.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/mi.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/mk.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ml.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/mn.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/mr.js +23 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ms-my.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ms.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/mt.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/my.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/nb.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ne.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/nl-be.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/nl.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/nn.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/oc-lnc.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/pa-in.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/pl.js +87 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/pt-br.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/pt.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/rn.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ro.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ru.js +99 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/rw.js +35 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sd.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/se.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/si.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sk.js +121 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sl.js +141 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sq.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sr-cyrl.js +74 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sr.js +74 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ss.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sv-fi.js +46 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sv.js +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/sw.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ta.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/te.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tet.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tg.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/th.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tk.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tl-ph.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tlh.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tr.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/types.d.ts +33 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tzl.js +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tzm-latn.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/tzm.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ug-cn.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/uk.js +77 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/ur.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/uz-latn.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/uz.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/vi.js +43 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/x-pseudo.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/yo.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/zh-cn.js +67 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/zh-hk.js +65 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/zh-tw.js +65 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/locale/zh.js +67 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/advancedFormat/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/advancedFormat/index.js +66 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/arraySupport/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/arraySupport/index.js +33 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/badMutable/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/badMutable/index.js +61 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/bigIntSupport/index.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/bigIntSupport/index.js +32 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/buddhistEra/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/buddhistEra/index.js +21 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/calendar/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/calendar/index.js +32 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/customParseFormat/index.d.ts +8 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/customParseFormat/index.js +333 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/dayOfYear/index.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/dayOfYear/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/devHelper/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/devHelper/index.js +38 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/duration/index.d.ts +88 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/duration/index.js +356 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isBetween/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isBetween/index.js +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isLeapYear/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isLeapYear/index.js +7 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isMoment/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isMoment/index.js +5 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isSameOrAfter/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isSameOrAfter/index.js +5 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isSameOrBefore/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isSameOrBefore/index.js +5 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isToday/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isToday/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isTomorrow/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isTomorrow/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isYesterday/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isYesterday/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isoWeek/index.d.ts +27 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isoWeek/index.js +57 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isoWeeksInYear/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/isoWeeksInYear/index.js +15 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/localeData/index.d.ts +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/localeData/index.js +114 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/localizedFormat/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/localizedFormat/index.js +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/localizedFormat/utils.js +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/minMax/index.d.ts +22 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/minMax/index.js +39 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/negativeYear/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/negativeYear/index.js +36 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/objectSupport/index.d.ts +48 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/objectSupport/index.js +97 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/pluralGetSet/index.d.ts +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/pluralGetSet/index.js +7 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/preParsePostFormat/index.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/preParsePostFormat/index.js +40 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/quarterOfYear/index.d.ts +26 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/quarterOfYear/index.js +41 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/relativeTime/index.d.ts +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/relativeTime/index.js +130 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/timezone/index.d.ts +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/timezone/index.js +198 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/toArray/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/toArray/index.js +7 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/toObject/index.d.ts +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/toObject/index.js +15 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/updateLocale/index.d.ts +8 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/updateLocale/index.js +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/utc/index.d.ts +19 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/utc/index.js +188 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekOfYear/index.d.ts +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekOfYear/index.js +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekYear/index.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekYear/index.js +19 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekday/index.d.ts +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/plugin/weekday/index.js +15 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/esm/utils.js +58 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/index.d.ts +429 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/af.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/am.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-dz.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-iq.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-kw.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-ly.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-ma.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-sa.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar-tn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ar.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/az.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/be.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bg.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bm.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bn-bd.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/br.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/bs.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ca.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/cs.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/cv.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/cy.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/da.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/de-at.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/de-ch.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/de.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/dv.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/el.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-au.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-ca.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-gb.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-ie.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-il.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-in.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-nz.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-sg.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en-tt.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/en.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/eo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/es-do.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/es-mx.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/es-pr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/es-us.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/es.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/et.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/eu.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fa.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fr-ca.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fr-ch.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/fy.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ga.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/gd.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/gl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/gom-latn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/gu.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/he.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/hi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/hr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ht.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/hu.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/hy-am.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/id.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/index.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/is.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/it-ch.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/it.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ja.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/jv.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ka.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/kk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/km.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/kn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ko.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ku.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ky.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/lb.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/lo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/lt.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/lv.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/me.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/mi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/mk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ml.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/mn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/mr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ms-my.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ms.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/mt.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/my.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/nb.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ne.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/nl-be.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/nl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/nn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/oc-lnc.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/pa-in.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/pl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/pt-br.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/pt.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/rn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ro.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ru.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/rw.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sd.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/se.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/si.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sq.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sr-cyrl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ss.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sv-fi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sv.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/sw.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ta.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/te.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tet.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tg.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/th.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tl-ph.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tlh.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tr.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/types.d.ts +33 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tzl.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tzm-latn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/tzm.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ug-cn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/uk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/ur.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/uz-latn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/uz.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/vi.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/x-pseudo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/yo.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/zh-cn.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/zh-hk.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/zh-tw.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale/zh.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/locale.json +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/package.json +84 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/advancedFormat.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/advancedFormat.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/arraySupport.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/arraySupport.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/badMutable.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/badMutable.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/bigIntSupport.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/bigIntSupport.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/buddhistEra.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/buddhistEra.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/calendar.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/calendar.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/customParseFormat.d.ts +8 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/customParseFormat.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/dayOfYear.d.ts +11 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/dayOfYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/devHelper.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/devHelper.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/duration.d.ts +88 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/duration.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isBetween.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isBetween.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isLeapYear.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isLeapYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isMoment.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isMoment.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isSameOrAfter.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isSameOrAfter.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isSameOrBefore.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isSameOrBefore.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isToday.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isToday.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isTomorrow.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isTomorrow.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isYesterday.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isYesterday.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isoWeek.d.ts +27 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isoWeek.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isoWeeksInYear.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/isoWeeksInYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/localeData.d.ts +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/localeData.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/localizedFormat.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/localizedFormat.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/minMax.d.ts +22 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/minMax.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/negativeYear.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/negativeYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/objectSupport.d.ts +48 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/objectSupport.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/pluralGetSet.d.ts +44 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/pluralGetSet.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/preParsePostFormat.d.ts +4 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/preParsePostFormat.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/quarterOfYear.d.ts +26 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/quarterOfYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/relativeTime.d.ts +24 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/relativeTime.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/timezone.d.ts +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/timezone.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/toArray.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/toArray.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/toObject.d.ts +20 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/toObject.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/updateLocale.d.ts +8 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/updateLocale.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/utc.d.ts +19 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/utc.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekOfYear.d.ts +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekOfYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekYear.d.ts +10 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekYear.js +1 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekday.d.ts +12 -0
- package/dist/node_modules/exceljs/node_modules/dayjs/plugin/weekday.js +1 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/errors-browser.js +127 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/errors.js +116 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/package.json +68 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/readable-browser.js +9 -0
- package/dist/node_modules/exceljs/node_modules/readable-stream/readable.js +16 -0
- package/dist/node_modules/exceljs/node_modules/tmp/lib/tmp.js +784 -0
- package/dist/node_modules/exceljs/node_modules/tmp/package.json +56 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/rng.js +19 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/stringify.js +30 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/v35.js +64 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/v4.js +24 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/stringify.js +29 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/v35.js +64 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/v4.js +24 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/index.js +79 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/md5-browser.js +223 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/md5.js +23 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/nil.js +8 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/parse.js +45 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/regex.js +8 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/rng-browser.js +26 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/rng.js +24 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/sha1.js +23 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/stringify.js +39 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuid.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidNIL.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidParse.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidStringify.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidValidate.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidVersion.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidv1.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidv3.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidv4.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/umd/uuidv5.min.js +1 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/v1.js +107 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/v3.js +16 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/v35.js +78 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/v4.js +37 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/v5.js +16 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/validate.js +17 -0
- package/dist/node_modules/exceljs/node_modules/uuid/dist/version.js +21 -0
- package/dist/node_modules/exceljs/node_modules/uuid/package.json +135 -0
- package/dist/node_modules/exceljs/package.json +1 -0
- package/dist/node_modules/xlsx/package.json +1 -1
- package/dist/server/actions/download-xlsx-template.js +7 -24
- package/dist/server/actions/import-xlsx.js +4 -3
- package/dist/server/errors.d.ts +16 -0
- package/dist/server/errors.js +59 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +44 -1
- package/dist/server/services/template-creator.d.ts +10 -4
- package/dist/server/services/template-creator.js +93 -20
- package/dist/server/services/xlsx-importer.d.ts +20 -10
- package/dist/server/services/xlsx-importer.js +92 -31
- package/dist/server/utils/workbook-converter.d.ts +8 -0
- package/dist/server/utils/workbook-converter.js +55 -0
- package/package.json +4 -2
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Tmp
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2011-2017 KARASZI Istvan <github@spam.raszi.hu>
|
|
5
|
+
*
|
|
6
|
+
* MIT Licensed
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* Module dependencies.
|
|
11
|
+
*/
|
|
12
|
+
const fs = require('fs');
|
|
13
|
+
const os = require('os');
|
|
14
|
+
const path = require('path');
|
|
15
|
+
const crypto = require('crypto');
|
|
16
|
+
const _c = { fs: fs.constants, os: os.constants };
|
|
17
|
+
|
|
18
|
+
/*
|
|
19
|
+
* The working inner variables.
|
|
20
|
+
*/
|
|
21
|
+
const
|
|
22
|
+
// the random characters to choose from
|
|
23
|
+
RANDOM_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz',
|
|
24
|
+
|
|
25
|
+
TEMPLATE_PATTERN = /XXXXXX/,
|
|
26
|
+
|
|
27
|
+
DEFAULT_TRIES = 3,
|
|
28
|
+
|
|
29
|
+
CREATE_FLAGS = (_c.O_CREAT || _c.fs.O_CREAT) | (_c.O_EXCL || _c.fs.O_EXCL) | (_c.O_RDWR || _c.fs.O_RDWR),
|
|
30
|
+
|
|
31
|
+
// constants are off on the windows platform and will not match the actual errno codes
|
|
32
|
+
IS_WIN32 = os.platform() === 'win32',
|
|
33
|
+
EBADF = _c.EBADF || _c.os.errno.EBADF,
|
|
34
|
+
ENOENT = _c.ENOENT || _c.os.errno.ENOENT,
|
|
35
|
+
|
|
36
|
+
DIR_MODE = 0o700 /* 448 */,
|
|
37
|
+
FILE_MODE = 0o600 /* 384 */,
|
|
38
|
+
|
|
39
|
+
EXIT = 'exit',
|
|
40
|
+
|
|
41
|
+
// this will hold the objects need to be removed on exit
|
|
42
|
+
_removeObjects = [],
|
|
43
|
+
|
|
44
|
+
// API change in fs.rmdirSync leads to error when passing in a second parameter, e.g. the callback
|
|
45
|
+
FN_RMDIR_SYNC = fs.rmdirSync.bind(fs);
|
|
46
|
+
|
|
47
|
+
let
|
|
48
|
+
_gracefulCleanup = false;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Recursively remove a directory and its contents.
|
|
52
|
+
*
|
|
53
|
+
* @param {string} dirPath path of directory to remove
|
|
54
|
+
* @param {Function} callback
|
|
55
|
+
* @private
|
|
56
|
+
*/
|
|
57
|
+
function rimraf(dirPath, callback) {
|
|
58
|
+
return fs.rm(dirPath, { recursive: true }, callback);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Recursively remove a directory and its contents, synchronously.
|
|
63
|
+
*
|
|
64
|
+
* @param {string} dirPath path of directory to remove
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
function FN_RIMRAF_SYNC(dirPath) {
|
|
68
|
+
return fs.rmSync(dirPath, { recursive: true });
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Gets a temporary file name.
|
|
73
|
+
*
|
|
74
|
+
* @param {(Options|tmpNameCallback)} options options or callback
|
|
75
|
+
* @param {?tmpNameCallback} callback the callback function
|
|
76
|
+
*/
|
|
77
|
+
function tmpName(options, callback) {
|
|
78
|
+
const
|
|
79
|
+
args = _parseArguments(options, callback),
|
|
80
|
+
opts = args[0],
|
|
81
|
+
cb = args[1];
|
|
82
|
+
|
|
83
|
+
try {
|
|
84
|
+
_assertAndSanitizeOptions(opts);
|
|
85
|
+
} catch (err) {
|
|
86
|
+
return cb(err);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
let tries = opts.tries;
|
|
90
|
+
(function _getUniqueName() {
|
|
91
|
+
try {
|
|
92
|
+
const name = _generateTmpName(opts);
|
|
93
|
+
|
|
94
|
+
// check whether the path exists then retry if needed
|
|
95
|
+
fs.stat(name, function (err) {
|
|
96
|
+
/* istanbul ignore else */
|
|
97
|
+
if (!err) {
|
|
98
|
+
/* istanbul ignore else */
|
|
99
|
+
if (tries-- > 0) return _getUniqueName();
|
|
100
|
+
|
|
101
|
+
return cb(new Error('Could not get a unique tmp filename, max tries reached ' + name));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
cb(null, name);
|
|
105
|
+
});
|
|
106
|
+
} catch (err) {
|
|
107
|
+
cb(err);
|
|
108
|
+
}
|
|
109
|
+
}());
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* Synchronous version of tmpName.
|
|
114
|
+
*
|
|
115
|
+
* @param {Object} options
|
|
116
|
+
* @returns {string} the generated random name
|
|
117
|
+
* @throws {Error} if the options are invalid or could not generate a filename
|
|
118
|
+
*/
|
|
119
|
+
function tmpNameSync(options) {
|
|
120
|
+
const
|
|
121
|
+
args = _parseArguments(options),
|
|
122
|
+
opts = args[0];
|
|
123
|
+
|
|
124
|
+
_assertAndSanitizeOptions(opts);
|
|
125
|
+
|
|
126
|
+
let tries = opts.tries;
|
|
127
|
+
do {
|
|
128
|
+
const name = _generateTmpName(opts);
|
|
129
|
+
try {
|
|
130
|
+
fs.statSync(name);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
return name;
|
|
133
|
+
}
|
|
134
|
+
} while (tries-- > 0);
|
|
135
|
+
|
|
136
|
+
throw new Error('Could not get a unique tmp filename, max tries reached');
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Creates and opens a temporary file.
|
|
141
|
+
*
|
|
142
|
+
* @param {(Options|null|undefined|fileCallback)} options the config options or the callback function or null or undefined
|
|
143
|
+
* @param {?fileCallback} callback
|
|
144
|
+
*/
|
|
145
|
+
function file(options, callback) {
|
|
146
|
+
const
|
|
147
|
+
args = _parseArguments(options, callback),
|
|
148
|
+
opts = args[0],
|
|
149
|
+
cb = args[1];
|
|
150
|
+
|
|
151
|
+
// gets a temporary filename
|
|
152
|
+
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
153
|
+
/* istanbul ignore else */
|
|
154
|
+
if (err) return cb(err);
|
|
155
|
+
|
|
156
|
+
// create and open the file
|
|
157
|
+
fs.open(name, CREATE_FLAGS, opts.mode || FILE_MODE, function _fileCreated(err, fd) {
|
|
158
|
+
/* istanbu ignore else */
|
|
159
|
+
if (err) return cb(err);
|
|
160
|
+
|
|
161
|
+
if (opts.discardDescriptor) {
|
|
162
|
+
return fs.close(fd, function _discardCallback(possibleErr) {
|
|
163
|
+
// the chance of getting an error on close here is rather low and might occur in the most edgiest cases only
|
|
164
|
+
return cb(possibleErr, name, undefined, _prepareTmpFileRemoveCallback(name, -1, opts, false));
|
|
165
|
+
});
|
|
166
|
+
} else {
|
|
167
|
+
// detachDescriptor passes the descriptor whereas discardDescriptor closes it, either way, we no longer care
|
|
168
|
+
// about the descriptor
|
|
169
|
+
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
170
|
+
cb(null, name, fd, _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, false));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Synchronous version of file.
|
|
178
|
+
*
|
|
179
|
+
* @param {Options} options
|
|
180
|
+
* @returns {FileSyncObject} object consists of name, fd and removeCallback
|
|
181
|
+
* @throws {Error} if cannot create a file
|
|
182
|
+
*/
|
|
183
|
+
function fileSync(options) {
|
|
184
|
+
const
|
|
185
|
+
args = _parseArguments(options),
|
|
186
|
+
opts = args[0];
|
|
187
|
+
|
|
188
|
+
const discardOrDetachDescriptor = opts.discardDescriptor || opts.detachDescriptor;
|
|
189
|
+
const name = tmpNameSync(opts);
|
|
190
|
+
var fd = fs.openSync(name, CREATE_FLAGS, opts.mode || FILE_MODE);
|
|
191
|
+
/* istanbul ignore else */
|
|
192
|
+
if (opts.discardDescriptor) {
|
|
193
|
+
fs.closeSync(fd);
|
|
194
|
+
fd = undefined;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return {
|
|
198
|
+
name: name,
|
|
199
|
+
fd: fd,
|
|
200
|
+
removeCallback: _prepareTmpFileRemoveCallback(name, discardOrDetachDescriptor ? -1 : fd, opts, true)
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Creates a temporary directory.
|
|
206
|
+
*
|
|
207
|
+
* @param {(Options|dirCallback)} options the options or the callback function
|
|
208
|
+
* @param {?dirCallback} callback
|
|
209
|
+
*/
|
|
210
|
+
function dir(options, callback) {
|
|
211
|
+
const
|
|
212
|
+
args = _parseArguments(options, callback),
|
|
213
|
+
opts = args[0],
|
|
214
|
+
cb = args[1];
|
|
215
|
+
|
|
216
|
+
// gets a temporary filename
|
|
217
|
+
tmpName(opts, function _tmpNameCreated(err, name) {
|
|
218
|
+
/* istanbul ignore else */
|
|
219
|
+
if (err) return cb(err);
|
|
220
|
+
|
|
221
|
+
// create the directory
|
|
222
|
+
fs.mkdir(name, opts.mode || DIR_MODE, function _dirCreated(err) {
|
|
223
|
+
/* istanbul ignore else */
|
|
224
|
+
if (err) return cb(err);
|
|
225
|
+
|
|
226
|
+
cb(null, name, _prepareTmpDirRemoveCallback(name, opts, false));
|
|
227
|
+
});
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Synchronous version of dir.
|
|
233
|
+
*
|
|
234
|
+
* @param {Options} options
|
|
235
|
+
* @returns {DirSyncObject} object consists of name and removeCallback
|
|
236
|
+
* @throws {Error} if it cannot create a directory
|
|
237
|
+
*/
|
|
238
|
+
function dirSync(options) {
|
|
239
|
+
const
|
|
240
|
+
args = _parseArguments(options),
|
|
241
|
+
opts = args[0];
|
|
242
|
+
|
|
243
|
+
const name = tmpNameSync(opts);
|
|
244
|
+
fs.mkdirSync(name, opts.mode || DIR_MODE);
|
|
245
|
+
|
|
246
|
+
return {
|
|
247
|
+
name: name,
|
|
248
|
+
removeCallback: _prepareTmpDirRemoveCallback(name, opts, true)
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/**
|
|
253
|
+
* Removes files asynchronously.
|
|
254
|
+
*
|
|
255
|
+
* @param {Object} fdPath
|
|
256
|
+
* @param {Function} next
|
|
257
|
+
* @private
|
|
258
|
+
*/
|
|
259
|
+
function _removeFileAsync(fdPath, next) {
|
|
260
|
+
const _handler = function (err) {
|
|
261
|
+
if (err && !_isENOENT(err)) {
|
|
262
|
+
// reraise any unanticipated error
|
|
263
|
+
return next(err);
|
|
264
|
+
}
|
|
265
|
+
next();
|
|
266
|
+
};
|
|
267
|
+
|
|
268
|
+
if (0 <= fdPath[0])
|
|
269
|
+
fs.close(fdPath[0], function () {
|
|
270
|
+
fs.unlink(fdPath[1], _handler);
|
|
271
|
+
});
|
|
272
|
+
else fs.unlink(fdPath[1], _handler);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Removes files synchronously.
|
|
277
|
+
*
|
|
278
|
+
* @param {Object} fdPath
|
|
279
|
+
* @private
|
|
280
|
+
*/
|
|
281
|
+
function _removeFileSync(fdPath) {
|
|
282
|
+
let rethrownException = null;
|
|
283
|
+
try {
|
|
284
|
+
if (0 <= fdPath[0]) fs.closeSync(fdPath[0]);
|
|
285
|
+
} catch (e) {
|
|
286
|
+
// reraise any unanticipated error
|
|
287
|
+
if (!_isEBADF(e) && !_isENOENT(e)) throw e;
|
|
288
|
+
} finally {
|
|
289
|
+
try {
|
|
290
|
+
fs.unlinkSync(fdPath[1]);
|
|
291
|
+
}
|
|
292
|
+
catch (e) {
|
|
293
|
+
// reraise any unanticipated error
|
|
294
|
+
if (!_isENOENT(e)) rethrownException = e;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if (rethrownException !== null) {
|
|
298
|
+
throw rethrownException;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Prepares the callback for removal of the temporary file.
|
|
304
|
+
*
|
|
305
|
+
* Returns either a sync callback or a async callback depending on whether
|
|
306
|
+
* fileSync or file was called, which is expressed by the sync parameter.
|
|
307
|
+
*
|
|
308
|
+
* @param {string} name the path of the file
|
|
309
|
+
* @param {number} fd file descriptor
|
|
310
|
+
* @param {Object} opts
|
|
311
|
+
* @param {boolean} sync
|
|
312
|
+
* @returns {fileCallback | fileCallbackSync}
|
|
313
|
+
* @private
|
|
314
|
+
*/
|
|
315
|
+
function _prepareTmpFileRemoveCallback(name, fd, opts, sync) {
|
|
316
|
+
const removeCallbackSync = _prepareRemoveCallback(_removeFileSync, [fd, name], sync);
|
|
317
|
+
const removeCallback = _prepareRemoveCallback(_removeFileAsync, [fd, name], sync, removeCallbackSync);
|
|
318
|
+
|
|
319
|
+
if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
|
|
320
|
+
|
|
321
|
+
return sync ? removeCallbackSync : removeCallback;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* Prepares the callback for removal of the temporary directory.
|
|
326
|
+
*
|
|
327
|
+
* Returns either a sync callback or a async callback depending on whether
|
|
328
|
+
* tmpFileSync or tmpFile was called, which is expressed by the sync parameter.
|
|
329
|
+
*
|
|
330
|
+
* @param {string} name
|
|
331
|
+
* @param {Object} opts
|
|
332
|
+
* @param {boolean} sync
|
|
333
|
+
* @returns {Function} the callback
|
|
334
|
+
* @private
|
|
335
|
+
*/
|
|
336
|
+
function _prepareTmpDirRemoveCallback(name, opts, sync) {
|
|
337
|
+
const removeFunction = opts.unsafeCleanup ? rimraf : fs.rmdir.bind(fs);
|
|
338
|
+
const removeFunctionSync = opts.unsafeCleanup ? FN_RIMRAF_SYNC : FN_RMDIR_SYNC;
|
|
339
|
+
const removeCallbackSync = _prepareRemoveCallback(removeFunctionSync, name, sync);
|
|
340
|
+
const removeCallback = _prepareRemoveCallback(removeFunction, name, sync, removeCallbackSync);
|
|
341
|
+
if (!opts.keep) _removeObjects.unshift(removeCallbackSync);
|
|
342
|
+
|
|
343
|
+
return sync ? removeCallbackSync : removeCallback;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Creates a guarded function wrapping the removeFunction call.
|
|
348
|
+
*
|
|
349
|
+
* The cleanup callback is save to be called multiple times.
|
|
350
|
+
* Subsequent invocations will be ignored.
|
|
351
|
+
*
|
|
352
|
+
* @param {Function} removeFunction
|
|
353
|
+
* @param {string} fileOrDirName
|
|
354
|
+
* @param {boolean} sync
|
|
355
|
+
* @param {cleanupCallbackSync?} cleanupCallbackSync
|
|
356
|
+
* @returns {cleanupCallback | cleanupCallbackSync}
|
|
357
|
+
* @private
|
|
358
|
+
*/
|
|
359
|
+
function _prepareRemoveCallback(removeFunction, fileOrDirName, sync, cleanupCallbackSync) {
|
|
360
|
+
let called = false;
|
|
361
|
+
|
|
362
|
+
// if sync is true, the next parameter will be ignored
|
|
363
|
+
return function _cleanupCallback(next) {
|
|
364
|
+
|
|
365
|
+
/* istanbul ignore else */
|
|
366
|
+
if (!called) {
|
|
367
|
+
// remove cleanupCallback from cache
|
|
368
|
+
const toRemove = cleanupCallbackSync || _cleanupCallback;
|
|
369
|
+
const index = _removeObjects.indexOf(toRemove);
|
|
370
|
+
/* istanbul ignore else */
|
|
371
|
+
if (index >= 0) _removeObjects.splice(index, 1);
|
|
372
|
+
|
|
373
|
+
called = true;
|
|
374
|
+
if (sync || removeFunction === FN_RMDIR_SYNC || removeFunction === FN_RIMRAF_SYNC) {
|
|
375
|
+
return removeFunction(fileOrDirName);
|
|
376
|
+
} else {
|
|
377
|
+
return removeFunction(fileOrDirName, next || function() {});
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* The garbage collector.
|
|
385
|
+
*
|
|
386
|
+
* @private
|
|
387
|
+
*/
|
|
388
|
+
function _garbageCollector() {
|
|
389
|
+
/* istanbul ignore else */
|
|
390
|
+
if (!_gracefulCleanup) return;
|
|
391
|
+
|
|
392
|
+
// the function being called removes itself from _removeObjects,
|
|
393
|
+
// loop until _removeObjects is empty
|
|
394
|
+
while (_removeObjects.length) {
|
|
395
|
+
try {
|
|
396
|
+
_removeObjects[0]();
|
|
397
|
+
} catch (e) {
|
|
398
|
+
// already removed?
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/**
|
|
404
|
+
* Random name generator based on crypto.
|
|
405
|
+
* Adapted from http://blog.tompawlak.org/how-to-generate-random-values-nodejs-javascript
|
|
406
|
+
*
|
|
407
|
+
* @param {number} howMany
|
|
408
|
+
* @returns {string} the generated random name
|
|
409
|
+
* @private
|
|
410
|
+
*/
|
|
411
|
+
function _randomChars(howMany) {
|
|
412
|
+
let
|
|
413
|
+
value = [],
|
|
414
|
+
rnd = null;
|
|
415
|
+
|
|
416
|
+
// make sure that we do not fail because we ran out of entropy
|
|
417
|
+
try {
|
|
418
|
+
rnd = crypto.randomBytes(howMany);
|
|
419
|
+
} catch (e) {
|
|
420
|
+
rnd = crypto.pseudoRandomBytes(howMany);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
for (var i = 0; i < howMany; i++) {
|
|
424
|
+
value.push(RANDOM_CHARS[rnd[i] % RANDOM_CHARS.length]);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
return value.join('');
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Helper which determines whether a string s is blank, that is undefined, or empty or null.
|
|
432
|
+
*
|
|
433
|
+
* @private
|
|
434
|
+
* @param {string} s
|
|
435
|
+
* @returns {Boolean} true whether the string s is blank, false otherwise
|
|
436
|
+
*/
|
|
437
|
+
function _isBlank(s) {
|
|
438
|
+
return s === null || _isUndefined(s) || !s.trim();
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/**
|
|
442
|
+
* Checks whether the `obj` parameter is defined or not.
|
|
443
|
+
*
|
|
444
|
+
* @param {Object} obj
|
|
445
|
+
* @returns {boolean} true if the object is undefined
|
|
446
|
+
* @private
|
|
447
|
+
*/
|
|
448
|
+
function _isUndefined(obj) {
|
|
449
|
+
return typeof obj === 'undefined';
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
/**
|
|
453
|
+
* Parses the function arguments.
|
|
454
|
+
*
|
|
455
|
+
* This function helps to have optional arguments.
|
|
456
|
+
*
|
|
457
|
+
* @param {(Options|null|undefined|Function)} options
|
|
458
|
+
* @param {?Function} callback
|
|
459
|
+
* @returns {Array} parsed arguments
|
|
460
|
+
* @private
|
|
461
|
+
*/
|
|
462
|
+
function _parseArguments(options, callback) {
|
|
463
|
+
/* istanbul ignore else */
|
|
464
|
+
if (typeof options === 'function') {
|
|
465
|
+
return [{}, options];
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
/* istanbul ignore else */
|
|
469
|
+
if (_isUndefined(options)) {
|
|
470
|
+
return [{}, callback];
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// copy options so we do not leak the changes we make internally
|
|
474
|
+
const actualOptions = {};
|
|
475
|
+
for (const key of Object.getOwnPropertyNames(options)) {
|
|
476
|
+
actualOptions[key] = options[key];
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
return [actualOptions, callback];
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/**
|
|
483
|
+
* Generates a new temporary name.
|
|
484
|
+
*
|
|
485
|
+
* @param {Object} opts
|
|
486
|
+
* @returns {string} the new random name according to opts
|
|
487
|
+
* @private
|
|
488
|
+
*/
|
|
489
|
+
function _generateTmpName(opts) {
|
|
490
|
+
|
|
491
|
+
const tmpDir = opts.tmpdir;
|
|
492
|
+
|
|
493
|
+
/* istanbul ignore else */
|
|
494
|
+
if (!_isUndefined(opts.name))
|
|
495
|
+
return path.join(tmpDir, opts.dir, opts.name);
|
|
496
|
+
|
|
497
|
+
/* istanbul ignore else */
|
|
498
|
+
if (!_isUndefined(opts.template))
|
|
499
|
+
return path.join(tmpDir, opts.dir, opts.template).replace(TEMPLATE_PATTERN, _randomChars(6));
|
|
500
|
+
|
|
501
|
+
// prefix and postfix
|
|
502
|
+
const name = [
|
|
503
|
+
opts.prefix ? opts.prefix : 'tmp',
|
|
504
|
+
'-',
|
|
505
|
+
process.pid,
|
|
506
|
+
'-',
|
|
507
|
+
_randomChars(12),
|
|
508
|
+
opts.postfix ? '-' + opts.postfix : ''
|
|
509
|
+
].join('');
|
|
510
|
+
|
|
511
|
+
return path.join(tmpDir, opts.dir, name);
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
/**
|
|
515
|
+
* Asserts whether the specified options are valid, also sanitizes options and provides sane defaults for missing
|
|
516
|
+
* options.
|
|
517
|
+
*
|
|
518
|
+
* @param {Options} options
|
|
519
|
+
* @private
|
|
520
|
+
*/
|
|
521
|
+
function _assertAndSanitizeOptions(options) {
|
|
522
|
+
|
|
523
|
+
options.tmpdir = _getTmpDir(options);
|
|
524
|
+
|
|
525
|
+
const tmpDir = options.tmpdir;
|
|
526
|
+
|
|
527
|
+
/* istanbul ignore else */
|
|
528
|
+
if (!_isUndefined(options.name))
|
|
529
|
+
_assertIsRelative(options.name, 'name', tmpDir);
|
|
530
|
+
/* istanbul ignore else */
|
|
531
|
+
if (!_isUndefined(options.dir))
|
|
532
|
+
_assertIsRelative(options.dir, 'dir', tmpDir);
|
|
533
|
+
/* istanbul ignore else */
|
|
534
|
+
if (!_isUndefined(options.template)) {
|
|
535
|
+
_assertIsRelative(options.template, 'template', tmpDir);
|
|
536
|
+
if (!options.template.match(TEMPLATE_PATTERN))
|
|
537
|
+
throw new Error(`Invalid template, found "${options.template}".`);
|
|
538
|
+
}
|
|
539
|
+
/* istanbul ignore else */
|
|
540
|
+
if (!_isUndefined(options.tries) && isNaN(options.tries) || options.tries < 0)
|
|
541
|
+
throw new Error(`Invalid tries, found "${options.tries}".`);
|
|
542
|
+
|
|
543
|
+
// if a name was specified we will try once
|
|
544
|
+
options.tries = _isUndefined(options.name) ? options.tries || DEFAULT_TRIES : 1;
|
|
545
|
+
options.keep = !!options.keep;
|
|
546
|
+
options.detachDescriptor = !!options.detachDescriptor;
|
|
547
|
+
options.discardDescriptor = !!options.discardDescriptor;
|
|
548
|
+
options.unsafeCleanup = !!options.unsafeCleanup;
|
|
549
|
+
|
|
550
|
+
// sanitize dir, also keep (multiple) blanks if the user, purportedly sane, requests us to
|
|
551
|
+
options.dir = _isUndefined(options.dir) ? '' : path.relative(tmpDir, _resolvePath(options.dir, tmpDir));
|
|
552
|
+
options.template = _isUndefined(options.template) ? undefined : path.relative(tmpDir, _resolvePath(options.template, tmpDir));
|
|
553
|
+
// sanitize further if template is relative to options.dir
|
|
554
|
+
options.template = _isBlank(options.template) ? undefined : path.relative(options.dir, options.template);
|
|
555
|
+
|
|
556
|
+
// for completeness' sake only, also keep (multiple) blanks if the user, purportedly sane, requests us to
|
|
557
|
+
options.name = _isUndefined(options.name) ? undefined : options.name;
|
|
558
|
+
options.prefix = _isUndefined(options.prefix) ? '' : options.prefix;
|
|
559
|
+
options.postfix = _isUndefined(options.postfix) ? '' : options.postfix;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Resolve the specified path name in respect to tmpDir.
|
|
564
|
+
*
|
|
565
|
+
* The specified name might include relative path components, e.g. ../
|
|
566
|
+
* so we need to resolve in order to be sure that is is located inside tmpDir
|
|
567
|
+
*
|
|
568
|
+
* @param name
|
|
569
|
+
* @param tmpDir
|
|
570
|
+
* @returns {string}
|
|
571
|
+
* @private
|
|
572
|
+
*/
|
|
573
|
+
function _resolvePath(name, tmpDir) {
|
|
574
|
+
if (name.startsWith(tmpDir)) {
|
|
575
|
+
return path.resolve(name);
|
|
576
|
+
} else {
|
|
577
|
+
return path.resolve(path.join(tmpDir, name));
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Asserts whether specified name is relative to the specified tmpDir.
|
|
583
|
+
*
|
|
584
|
+
* @param {string} name
|
|
585
|
+
* @param {string} option
|
|
586
|
+
* @param {string} tmpDir
|
|
587
|
+
* @throws {Error}
|
|
588
|
+
* @private
|
|
589
|
+
*/
|
|
590
|
+
function _assertIsRelative(name, option, tmpDir) {
|
|
591
|
+
if (option === 'name') {
|
|
592
|
+
// assert that name is not absolute and does not contain a path
|
|
593
|
+
if (path.isAbsolute(name))
|
|
594
|
+
throw new Error(`${option} option must not contain an absolute path, found "${name}".`);
|
|
595
|
+
// must not fail on valid .<name> or ..<name> or similar such constructs
|
|
596
|
+
let basename = path.basename(name);
|
|
597
|
+
if (basename === '..' || basename === '.' || basename !== name)
|
|
598
|
+
throw new Error(`${option} option must not contain a path, found "${name}".`);
|
|
599
|
+
}
|
|
600
|
+
else { // if (option === 'dir' || option === 'template') {
|
|
601
|
+
// assert that dir or template are relative to tmpDir
|
|
602
|
+
if (path.isAbsolute(name) && !name.startsWith(tmpDir)) {
|
|
603
|
+
throw new Error(`${option} option must be relative to "${tmpDir}", found "${name}".`);
|
|
604
|
+
}
|
|
605
|
+
let resolvedPath = _resolvePath(name, tmpDir);
|
|
606
|
+
if (!resolvedPath.startsWith(tmpDir))
|
|
607
|
+
throw new Error(`${option} option must be relative to "${tmpDir}", found "${resolvedPath}".`);
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* Helper for testing against EBADF to compensate changes made to Node 7.x under Windows.
|
|
613
|
+
*
|
|
614
|
+
* @private
|
|
615
|
+
*/
|
|
616
|
+
function _isEBADF(error) {
|
|
617
|
+
return _isExpectedError(error, -EBADF, 'EBADF');
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
/**
|
|
621
|
+
* Helper for testing against ENOENT to compensate changes made to Node 7.x under Windows.
|
|
622
|
+
*
|
|
623
|
+
* @private
|
|
624
|
+
*/
|
|
625
|
+
function _isENOENT(error) {
|
|
626
|
+
return _isExpectedError(error, -ENOENT, 'ENOENT');
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* Helper to determine whether the expected error code matches the actual code and errno,
|
|
631
|
+
* which will differ between the supported node versions.
|
|
632
|
+
*
|
|
633
|
+
* - Node >= 7.0:
|
|
634
|
+
* error.code {string}
|
|
635
|
+
* error.errno {number} any numerical value will be negated
|
|
636
|
+
*
|
|
637
|
+
* CAVEAT
|
|
638
|
+
*
|
|
639
|
+
* On windows, the errno for EBADF is -4083 but os.constants.errno.EBADF is different and we must assume that ENOENT
|
|
640
|
+
* is no different here.
|
|
641
|
+
*
|
|
642
|
+
* @param {SystemError} error
|
|
643
|
+
* @param {number} errno
|
|
644
|
+
* @param {string} code
|
|
645
|
+
* @private
|
|
646
|
+
*/
|
|
647
|
+
function _isExpectedError(error, errno, code) {
|
|
648
|
+
return IS_WIN32 ? error.code === code : error.code === code && error.errno === errno;
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
/**
|
|
652
|
+
* Sets the graceful cleanup.
|
|
653
|
+
*
|
|
654
|
+
* If graceful cleanup is set, tmp will remove all controlled temporary objects on process exit, otherwise the
|
|
655
|
+
* temporary objects will remain in place, waiting to be cleaned up on system restart or otherwise scheduled temporary
|
|
656
|
+
* object removals.
|
|
657
|
+
*/
|
|
658
|
+
function setGracefulCleanup() {
|
|
659
|
+
_gracefulCleanup = true;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Returns the currently configured tmp dir from os.tmpdir().
|
|
664
|
+
*
|
|
665
|
+
* @private
|
|
666
|
+
* @param {?Options} options
|
|
667
|
+
* @returns {string} the currently configured tmp dir
|
|
668
|
+
*/
|
|
669
|
+
function _getTmpDir(options) {
|
|
670
|
+
return path.resolve(options && options.tmpdir || os.tmpdir());
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
// Install process exit listener
|
|
674
|
+
process.addListener(EXIT, _garbageCollector);
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Configuration options.
|
|
678
|
+
*
|
|
679
|
+
* @typedef {Object} Options
|
|
680
|
+
* @property {?boolean} keep the temporary object (file or dir) will not be garbage collected
|
|
681
|
+
* @property {?number} tries the number of tries before give up the name generation
|
|
682
|
+
* @property (?int) mode the access mode, defaults are 0o700 for directories and 0o600 for files
|
|
683
|
+
* @property {?string} template the "mkstemp" like filename template
|
|
684
|
+
* @property {?string} name fixed name relative to tmpdir or the specified dir option
|
|
685
|
+
* @property {?string} dir tmp directory relative to the root tmp directory in use
|
|
686
|
+
* @property {?string} prefix prefix for the generated name
|
|
687
|
+
* @property {?string} postfix postfix for the generated name
|
|
688
|
+
* @property {?string} tmpdir the root tmp directory which overrides the os tmpdir
|
|
689
|
+
* @property {?boolean} unsafeCleanup recursively removes the created temporary directory, even when it's not empty
|
|
690
|
+
* @property {?boolean} detachDescriptor detaches the file descriptor, caller is responsible for closing the file, tmp will no longer try closing the file during garbage collection
|
|
691
|
+
* @property {?boolean} discardDescriptor discards the file descriptor (closes file, fd is -1), tmp will no longer try closing the file during garbage collection
|
|
692
|
+
*/
|
|
693
|
+
|
|
694
|
+
/**
|
|
695
|
+
* @typedef {Object} FileSyncObject
|
|
696
|
+
* @property {string} name the name of the file
|
|
697
|
+
* @property {string} fd the file descriptor or -1 if the fd has been discarded
|
|
698
|
+
* @property {fileCallback} removeCallback the callback function to remove the file
|
|
699
|
+
*/
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* @typedef {Object} DirSyncObject
|
|
703
|
+
* @property {string} name the name of the directory
|
|
704
|
+
* @property {fileCallback} removeCallback the callback function to remove the directory
|
|
705
|
+
*/
|
|
706
|
+
|
|
707
|
+
/**
|
|
708
|
+
* @callback tmpNameCallback
|
|
709
|
+
* @param {?Error} err the error object if anything goes wrong
|
|
710
|
+
* @param {string} name the temporary file name
|
|
711
|
+
*/
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* @callback fileCallback
|
|
715
|
+
* @param {?Error} err the error object if anything goes wrong
|
|
716
|
+
* @param {string} name the temporary file name
|
|
717
|
+
* @param {number} fd the file descriptor or -1 if the fd had been discarded
|
|
718
|
+
* @param {cleanupCallback} fn the cleanup callback function
|
|
719
|
+
*/
|
|
720
|
+
|
|
721
|
+
/**
|
|
722
|
+
* @callback fileCallbackSync
|
|
723
|
+
* @param {?Error} err the error object if anything goes wrong
|
|
724
|
+
* @param {string} name the temporary file name
|
|
725
|
+
* @param {number} fd the file descriptor or -1 if the fd had been discarded
|
|
726
|
+
* @param {cleanupCallbackSync} fn the cleanup callback function
|
|
727
|
+
*/
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* @callback dirCallback
|
|
731
|
+
* @param {?Error} err the error object if anything goes wrong
|
|
732
|
+
* @param {string} name the temporary file name
|
|
733
|
+
* @param {cleanupCallback} fn the cleanup callback function
|
|
734
|
+
*/
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* @callback dirCallbackSync
|
|
738
|
+
* @param {?Error} err the error object if anything goes wrong
|
|
739
|
+
* @param {string} name the temporary file name
|
|
740
|
+
* @param {cleanupCallbackSync} fn the cleanup callback function
|
|
741
|
+
*/
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* Removes the temporary created file or directory.
|
|
745
|
+
*
|
|
746
|
+
* @callback cleanupCallback
|
|
747
|
+
* @param {simpleCallback} [next] function to call whenever the tmp object needs to be removed
|
|
748
|
+
*/
|
|
749
|
+
|
|
750
|
+
/**
|
|
751
|
+
* Removes the temporary created file or directory.
|
|
752
|
+
*
|
|
753
|
+
* @callback cleanupCallbackSync
|
|
754
|
+
*/
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* Callback function for function composition.
|
|
758
|
+
* @see {@link https://github.com/raszi/node-tmp/issues/57|raszi/node-tmp#57}
|
|
759
|
+
*
|
|
760
|
+
* @callback simpleCallback
|
|
761
|
+
*/
|
|
762
|
+
|
|
763
|
+
// exporting all the needed methods
|
|
764
|
+
|
|
765
|
+
// evaluate _getTmpDir() lazily, mainly for simplifying testing but it also will
|
|
766
|
+
// allow users to reconfigure the temporary directory
|
|
767
|
+
Object.defineProperty(module.exports, 'tmpdir', {
|
|
768
|
+
enumerable: true,
|
|
769
|
+
configurable: false,
|
|
770
|
+
get: function () {
|
|
771
|
+
return _getTmpDir();
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
module.exports.dir = dir;
|
|
776
|
+
module.exports.dirSync = dirSync;
|
|
777
|
+
|
|
778
|
+
module.exports.file = file;
|
|
779
|
+
module.exports.fileSync = fileSync;
|
|
780
|
+
|
|
781
|
+
module.exports.tmpName = tmpName;
|
|
782
|
+
module.exports.tmpNameSync = tmpNameSync;
|
|
783
|
+
|
|
784
|
+
module.exports.setGracefulCleanup = setGracefulCleanup;
|