@appsemble/node-utils 0.32.2-test.3 → 0.32.2-test.6

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/README.md CHANGED
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.32.2-test.3/config/assets/logo.svg) Appsemble Node Utilities
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.32.2-test.6/config/assets/logo.svg) Appsemble Node Utilities
2
2
 
3
3
  > NodeJS utilities used by Appsemble internally.
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/node-utils)](https://www.npmjs.com/package/@appsemble/node-utils)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.32.2-test.3/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.32.2-test.3)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.32.2-test.6/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.32.2-test.6)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -26,5 +26,5 @@ compatibility is not guaranteed.
26
26
 
27
27
  ## License
28
28
 
29
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.32.2-test.3/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.32.2-test.6/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/node-utils",
3
- "version": "0.32.2-test.3",
3
+ "version": "0.32.2-test.6",
4
4
  "description": "NodeJS utilities used by Appsemble internally.",
5
5
  "keywords": [
6
6
  "app",
@@ -40,8 +40,8 @@
40
40
  "test": "vitest"
41
41
  },
42
42
  "dependencies": {
43
- "@appsemble/types": "0.32.2-test.3",
44
- "@appsemble/utils": "0.32.2-test.3",
43
+ "@appsemble/types": "0.32.2-test.6",
44
+ "@appsemble/utils": "0.32.2-test.6",
45
45
  "@formatjs/fast-memoize": "^2.0.0",
46
46
  "@fortawesome/fontawesome-free": "^6.0.0",
47
47
  "@kubernetes/client-node": "^0.22.2",
package/parsers.js CHANGED
@@ -14,8 +14,12 @@ export const xWwwFormUrlencodedParser = async (body, mediaTypeObject, options, c
14
14
  const buffer = await bufferParser(body, mediaTypeObject, options, ctx);
15
15
  return parse(String(buffer));
16
16
  };
17
- export const csvParser = (body) => new Promise((resolve, reject) => {
18
- body.pipe(parseCSV({ bom: true, columns: true }, (error, records) => {
17
+ export const csvParser = (body, mediaTypeObject, options, ctx) => new Promise((resolve, reject) => {
18
+ body.pipe(parseCSV({
19
+ bom: true,
20
+ columns: true,
21
+ delimiter: ctx.queryParams?.delimiter?.replace(/\\t/g, '\t') ?? ',',
22
+ }, (error, records) => {
19
23
  if (error) {
20
24
  reject(error);
21
25
  }
package/server/types.d.ts CHANGED
@@ -106,6 +106,7 @@ declare module 'koas-parameters' {
106
106
  demo: boolean;
107
107
  selectedGroupId: number;
108
108
  $own: boolean;
109
+ delimiter?: string;
109
110
  }
110
111
  }
111
112
  export type Operator = 'and' | 'not' | 'or';