@moreapp/common-nodejs 0.7.1 → 0.7.3

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.
@@ -49,5 +49,6 @@ class MoreAppClient {
49
49
  exports.default = MoreAppClient;
50
50
  function getFilename(res) {
51
51
  const contentDispositionHeader = res.headers["content-disposition"];
52
- return (0, content_disposition_parser_1.default)(contentDispositionHeader)?.filename;
52
+ const filename = (0, content_disposition_parser_1.default)(contentDispositionHeader)?.filename;
53
+ return filename ? decodeURI(filename) : undefined;
53
54
  }
@@ -13,7 +13,7 @@ test("download binary file", async () => {
13
13
  .matchHeader("x-more-seal", "my-seal")
14
14
  .reply(200, file, {
15
15
  "Content-Type": "image/jpg",
16
- "content-disposition": 'attachment; filename="my-photo.jpg"',
16
+ "content-disposition": 'attachment; filename="my%20photo.jpg"',
17
17
  });
18
18
  const client = new MoreAppClient_1.default({
19
19
  serviceName: "Common Test",
@@ -23,7 +23,7 @@ test("download binary file", async () => {
23
23
  const binaryFile = await client.getBinary("/download");
24
24
  expect(binaryFile.buffer).toStrictEqual(file);
25
25
  expect(binaryFile.contentType).toBe("image/jpg");
26
- expect(binaryFile.filename).toBe("my-photo.jpg");
26
+ expect(binaryFile.filename).toBe("my photo.jpg");
27
27
  apiMock.done();
28
28
  });
29
29
  test("404", async () => {
package/dist/types.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { z } from "zod";
2
2
  import { FormVersionFieldSchema, SubmissionSchema } from "./schema";
3
- export declare type Submission = z.infer<typeof SubmissionSchema>;
4
- export declare type FormVersionField = z.infer<typeof FormVersionFieldSchema>;
5
- export declare type IntegrationTestResponse = {
3
+ export type Submission = z.infer<typeof SubmissionSchema>;
4
+ export type FormVersionField = z.infer<typeof FormVersionFieldSchema>;
5
+ export type IntegrationTestResponse = {
6
6
  status: "VALID";
7
7
  } | {
8
8
  status: "INVALID";
9
9
  globalError: string;
10
10
  fieldErrors?: Record<string, any>;
11
11
  };
12
- export declare type IntegrationHandleResponse = {
12
+ export type IntegrationHandleResponse = {
13
13
  status: "SUCCESS";
14
14
  files?: {
15
15
  type: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moreapp/common-nodejs",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "license": "UNLICENSED",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,42 +18,42 @@
18
18
  "dist/**/*"
19
19
  ],
20
20
  "dependencies": {
21
- "@google-cloud/logging": "10.4.0",
21
+ "@google-cloud/logging": "10.4.1",
22
22
  "@google-cloud/opentelemetry-cloud-trace-exporter": "2.0.0",
23
23
  "@opentelemetry/api": "1.4.1",
24
- "@opentelemetry/instrumentation": "0.36.1",
25
- "@opentelemetry/instrumentation-dns": "0.31.2",
26
- "@opentelemetry/instrumentation-express": "0.32.1",
27
- "@opentelemetry/instrumentation-http": "0.36.1",
28
- "@opentelemetry/instrumentation-winston": "0.31.1",
29
- "@opentelemetry/sdk-node": "0.36.1",
30
- "@opentelemetry/sdk-trace-node": "1.10.1",
31
- "axios": "1.3.4",
24
+ "@opentelemetry/instrumentation": "0.38.0",
25
+ "@opentelemetry/instrumentation-dns": "0.31.3",
26
+ "@opentelemetry/instrumentation-express": "0.32.2",
27
+ "@opentelemetry/instrumentation-http": "0.38.0",
28
+ "@opentelemetry/instrumentation-winston": "0.31.2",
29
+ "@opentelemetry/sdk-node": "0.38.0",
30
+ "@opentelemetry/sdk-trace-node": "1.12.0",
31
+ "axios": "1.4.0",
32
32
  "content-disposition-parser": "1.0.2",
33
- "date-and-time": "2.4.3",
33
+ "date-and-time": "3.0.0",
34
34
  "winston": "3.8.2",
35
35
  "zod": "3.21.4"
36
36
  },
37
37
  "devDependencies": {
38
- "@types/jest": "29.2.0",
39
- "@types/node": "18.11.8",
40
- "@typescript-eslint/eslint-plugin": "5.41.0",
41
- "@typescript-eslint/parser": "5.41.0",
42
- "eslint": "8.26.0",
38
+ "@types/jest": "29.5.1",
39
+ "@types/node": "18.16.9",
40
+ "@typescript-eslint/eslint-plugin": "5.59.5",
41
+ "@typescript-eslint/parser": "5.59.5",
42
+ "eslint": "8.40.0",
43
43
  "eslint-config-airbnb-typescript": "17.0.0",
44
- "eslint-config-prettier": "8.5.0",
45
- "eslint-plugin-import": "2.26.0",
44
+ "eslint-config-prettier": "8.8.0",
45
+ "eslint-plugin-import": "2.27.5",
46
46
  "eslint-plugin-prettier": "4.2.1",
47
- "husky": "8.0.1",
48
- "jest": "29.2.2",
49
- "jest-mock-extended": "3.0.1",
47
+ "husky": "8.0.3",
48
+ "jest": "29.5.0",
49
+ "jest-mock-extended": "3.0.4",
50
50
  "jest-sonar-reporter": "2.0.0",
51
- "lint-staged": "13.0.3",
52
- "nock": "13.3.0",
53
- "prettier": "2.7.1",
54
- "ts-jest": "29.0.3",
51
+ "lint-staged": "13.2.2",
52
+ "nock": "13.3.1",
53
+ "prettier": "2.8.8",
54
+ "ts-jest": "29.1.0",
55
55
  "ts-node": "10.9.1",
56
- "typescript": "4.8.4"
56
+ "typescript": "5.0.4"
57
57
  },
58
58
  "prettier": {
59
59
  "printWidth": 100,