apeframework 0.0.0-dev.11 → 0.0.0-dev.14

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/api/Api.d.ts CHANGED
@@ -18,7 +18,7 @@ declare class Api {
18
18
  };
19
19
  cors?: {
20
20
  enable?: boolean;
21
- origin?: string[];
21
+ origins?: string[];
22
22
  };
23
23
  responseValidation?: boolean;
24
24
  onRequest?: Handler;
package/api/Api.js CHANGED
@@ -44,7 +44,7 @@ class Api {
44
44
  });
45
45
  if (params.cors?.enable) {
46
46
  this.server.register(cors_1.default, {
47
- origin: params.cors.origin,
47
+ origin: params.cors.origins,
48
48
  });
49
49
  }
50
50
  if (params.responseValidation) {
package/api/Api.ts CHANGED
@@ -28,7 +28,7 @@ class Api {
28
28
  },
29
29
  cors?: {
30
30
  enable?: boolean,
31
- origin?: string[],
31
+ origins?: string[],
32
32
  },
33
33
  responseValidation?: boolean,
34
34
  onRequest?: Handler,
@@ -75,7 +75,7 @@ class Api {
75
75
 
76
76
  if (params.cors?.enable) {
77
77
  this.server.register(cors, {
78
- origin: params.cors.origin,
78
+ origin: params.cors.origins,
79
79
  })
80
80
  }
81
81
 
package/cli/Args.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  interface Args {
2
2
  positional: string[];
3
- optional: Record<string, boolean | string>;
3
+ optional: Record<string, boolean | string | undefined>;
4
4
  }
5
5
  export { type Args, };
package/cli/Args.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  interface Args {
2
2
  positional: string[],
3
- optional: Record<string, boolean | string>,
3
+ optional: Record<string, boolean | string | undefined>,
4
4
  }
5
5
 
6
6
  export {
package/cli/parseArgs.ts CHANGED
@@ -19,7 +19,7 @@ const parseArgs = (args: string[]): Args => {
19
19
 
20
20
  const positional = parsed._ as string[]
21
21
 
22
- const optional = parsed as Record<string, boolean | string>
22
+ const optional = parsed as Record<string, boolean | string | undefined>
23
23
 
24
24
  delete optional._
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apeframework",
3
- "version": "0.0.0-dev.11",
3
+ "version": "0.0.0-dev.14",
4
4
  "license": "MIT",
5
5
  "author": "Matthieu Symoens",
6
6
  "description": "Node.js app framework",
@@ -25,6 +25,10 @@
25
25
  "@fastify/cors": "^10.0",
26
26
  "@fastify/response-validation": "^3.0",
27
27
  "@fastify/swagger": "^9.2",
28
+ "@types/bcryptjs": "^2.4",
29
+ "@types/fs-extra": "^11.0",
30
+ "@types/nodemailer": "^6.4",
31
+ "@types/yargs-parser": "^21.0",
28
32
  "ajv": "^8.17",
29
33
  "bcryptjs": "^2.4",
30
34
  "bullmq": "^5.19",
@@ -6,12 +6,6 @@ const parseString = (input) => {
6
6
  if ([undefined, null].includes(input)) {
7
7
  return '';
8
8
  }
9
- else if (input === false) {
10
- return '0';
11
- }
12
- else if (input === true) {
13
- return '1';
14
- }
15
9
  else if (['object', 'function', 'symbol'].includes(typeof input)) {
16
10
  throw new ParseError_1.ParseError('string');
17
11
  }
@@ -4,10 +4,6 @@ import type { Parser } from './Parser'
4
4
  const parseString: Parser<string> = (input) => {
5
5
  if ([undefined, null].includes(input)) {
6
6
  return ''
7
- } else if (input === false) {
8
- return '0'
9
- } else if (input === true) {
10
- return '1'
11
7
  } else if (['object', 'function', 'symbol'].includes(typeof input)) {
12
8
  throw new ParseError('string')
13
9
  }