@silexpert/core 0.4.0 → 0.4.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,mBAAmB,KAA2C,CAAC;AAC5E,eAAO,MAAM,WAAW,KAAmC,CAAC;;;;AAE5D,wBAAuC"}
1
+ {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,mBAAmB,KAA2C,CAAC;AAC5E,eAAO,MAAM,WAAW,KAAmC,CAAC;;;;AAE5D,wBAAuC"}
@@ -4,10 +4,15 @@ const retrieveDecorator = (name) => {
4
4
  if (!isNode) {
5
5
  return (target, key) => { };
6
6
  }
7
- // eslint-disable-next-line global-require
8
- const path = require('path');
9
- // eslint-disable-next-line global-require,import/no-dynamic-require
10
- return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
7
+ try {
8
+ // eslint-disable-next-line global-require
9
+ const path = require('path');
10
+ // eslint-disable-next-line global-require,import/no-dynamic-require
11
+ return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
12
+ }
13
+ catch (e) {
14
+ return (target, key) => { };
15
+ }
11
16
  };
12
17
  export const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');
13
18
  export const ApiProperty = retrieveDecorator('ApiProperty');
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,0CAA0C;AAC1C,MAAM,iBAAiB,GAAG,CAAC,IAA2C,EAAE,EAAE;IACxE,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,MAAW,EAAE,GAAW,EAAE,EAAE,GAAE,CAAC,CAAC;KACzC;IACD,0CAA0C;IAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC7B,oEAAoE;IACpE,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,uCAAuC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAC7F,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAE5D,eAAe,EAAE,mBAAmB,EAAE,CAAC","sourcesContent":["import { isNode } from 'browser-or-node';\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];\n};\nexport const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator('ApiProperty');\n\nexport default { ApiPropertyOptional };\n"]}
1
+ {"version":3,"file":"decorators.js","sourceRoot":"","sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,0CAA0C;AAC1C,MAAM,iBAAiB,GAAG,CAAC,IAA2C,EAAE,EAAE;IACxE,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,CAAC,MAAW,EAAE,GAAW,EAAE,EAAE,GAAE,CAAC,CAAC;KACzC;IACD,IAAI;QACF,0CAA0C;QAC1C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,oEAAoE;QACpE,OAAO,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,uCAAuC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;KAC5F;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,MAAW,EAAE,GAAW,EAAE,EAAE,GAAE,CAAC,CAAC;KACzC;AACH,CAAC,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC,qBAAqB,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC,aAAa,CAAC,CAAC;AAE5D,eAAe,EAAE,mBAAmB,EAAE,CAAC","sourcesContent":["import { isNode } from 'browser-or-node';\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n try {\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];\n } catch (e) {\n return (target: any, key: string) => {};\n }\n};\nexport const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator('ApiProperty');\n\nexport default { ApiPropertyOptional };\n"]}
@@ -11,13 +11,17 @@ var _browserOrNode = require("browser-or-node");
11
11
  const retrieveDecorator = name => {
12
12
  if (!_browserOrNode.isNode) {
13
13
  return (target, key) => {};
14
- } // eslint-disable-next-line global-require
14
+ }
15
15
 
16
+ try {
17
+ // eslint-disable-next-line global-require
18
+ const path = require('path'); // eslint-disable-next-line global-require,import/no-dynamic-require
16
19
 
17
- const path = require('path'); // eslint-disable-next-line global-require,import/no-dynamic-require
18
20
 
19
-
20
- return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
21
+ return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
22
+ } catch (e) {
23
+ return (target, key) => {};
24
+ }
21
25
  };
22
26
 
23
27
  const ApiPropertyOptional = exports.ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');
@@ -1 +1 @@
1
- {"version":3,"sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":";;;;;;;AAAA;;AACA;AACA,MAAM,iBAAiB,GAAI,IAAD,IAAgD;AACxE,MAAI,CAAC,qBAAL,EAAa;AACX,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD,GAHuE,CAIxE;;;AACA,QAAM,IAAI,GAAG,OAAO,CAAC,MAAD,CAApB,CALwE,CAMxE;;;AACA,SAAO,OAAO,CAAC,IAAI,CAAC,OAAL,CAAa,OAAO,CAAC,GAAR,EAAb,EAA4B,uCAA5B,CAAD,CAAP,CAA8E,IAA9E,CAAP;AACD,CARD;;AASO,MAAM,mBAAmB,WAAnB,mBAAmB,GAAG,iBAAiB,CAAC,qBAAD,CAA7C;AACA,MAAM,WAAW,WAAX,WAAW,GAAG,iBAAiB,CAAC,aAAD,CAArC;kBAEQ;AAAE,EAAA;AAAF,C","sourcesContent":["import { isNode } from 'browser-or-node';\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];\n};\nexport const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator('ApiProperty');\n\nexport default { ApiPropertyOptional };\n"],"sourceRoot":"","file":"decorators.js"}
1
+ {"version":3,"sources":["../../ts/utils/decorators.ts"],"names":[],"mappings":";;;;;;;AAAA;;AACA;AACA,MAAM,iBAAiB,GAAI,IAAD,IAAgD;AACxE,MAAI,CAAC,qBAAL,EAAa;AACX,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;;AACD,MAAI;AACF;AACA,UAAM,IAAI,GAAG,OAAO,CAAC,MAAD,CAApB,CAFE,CAGF;;;AACA,WAAO,OAAO,CAAC,IAAI,CAAC,OAAL,CAAa,OAAO,CAAC,GAAR,EAAb,EAA4B,uCAA5B,CAAD,CAAP,CAA8E,IAA9E,CAAP;AACD,GALD,CAKE,OAAO,CAAP,EAAU;AACV,WAAO,CAAC,MAAD,EAAc,GAAd,KAA6B,CAAG,CAAvC;AACD;AACF,CAZD;;AAaO,MAAM,mBAAmB,WAAnB,mBAAmB,GAAG,iBAAiB,CAAC,qBAAD,CAA7C;AACA,MAAM,WAAW,WAAX,WAAW,GAAG,iBAAiB,CAAC,aAAD,CAArC;kBAEQ;AAAE,EAAA;AAAF,C","sourcesContent":["import { isNode } from 'browser-or-node';\n// eslint-disable-next-line global-require\nconst retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {\n if (!isNode) {\n return (target: any, key: string) => {};\n }\n try {\n // eslint-disable-next-line global-require\n const path = require('path');\n // eslint-disable-next-line global-require,import/no-dynamic-require\n return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];\n } catch (e) {\n return (target: any, key: string) => {};\n }\n};\nexport const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');\nexport const ApiProperty = retrieveDecorator('ApiProperty');\n\nexport default { ApiPropertyOptional };\n"],"sourceRoot":"","file":"decorators.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-core",
6
6
  "main": "js/index.js",
@@ -75,8 +75,6 @@
75
75
  "types": "es/index.d.ts",
76
76
  "module": "es/index.js",
77
77
  "dependencies": {
78
- "@nestjs/common": "^7.6.11",
79
- "@nestjs/core": "^7.6.11",
80
78
  "axios": "^0.21.1",
81
79
  "browser-or-node": "^1.3.0",
82
80
  "class-transformer": "^0.3.2",
@@ -4,10 +4,14 @@ const retrieveDecorator = (name: 'ApiPropertyOptional' | 'ApiProperty') => {
4
4
  if (!isNode) {
5
5
  return (target: any, key: string) => {};
6
6
  }
7
- // eslint-disable-next-line global-require
8
- const path = require('path');
9
- // eslint-disable-next-line global-require,import/no-dynamic-require
10
- return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
7
+ try {
8
+ // eslint-disable-next-line global-require
9
+ const path = require('path');
10
+ // eslint-disable-next-line global-require,import/no-dynamic-require
11
+ return require(path.resolve(process.cwd(), 'node_modules/@nestjs/swagger/index.js'))[name];
12
+ } catch (e) {
13
+ return (target: any, key: string) => {};
14
+ }
11
15
  };
12
16
  export const ApiPropertyOptional = retrieveDecorator('ApiPropertyOptional');
13
17
  export const ApiProperty = retrieveDecorator('ApiProperty');