@cryptexlabs/codex-nodejs-common 0.1.9 → 0.1.10

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/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptexlabs/codex-nodejs-common",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Common code for Assistant applications",
5
5
  "main": "lib/src/index.js",
6
6
  "repository": "git@gitlab.com:cryptexlabs/public/codex-nodejs-common.git",
@@ -0,0 +1,4 @@
1
+ import { ArgumentMetadata, PipeTransform } from "@nestjs/common";
2
+ export declare class CsvPipe implements PipeTransform {
3
+ transform(value: any, metadata: ArgumentMetadata): any;
4
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.CsvPipe = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ let CsvPipe = class CsvPipe {
12
+ transform(value, metadata) {
13
+ return value.split(",");
14
+ }
15
+ };
16
+ CsvPipe = __decorate([
17
+ common_1.Injectable()
18
+ ], CsvPipe);
19
+ exports.CsvPipe = CsvPipe;
20
+ //# sourceMappingURL=csv.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csv.pipe.js","sourceRoot":"","sources":["../../../src/pipe/csv.pipe.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA6E;AAG7E,IAAa,OAAO,GAApB,MAAa,OAAO;IACX,SAAS,CAAC,KAAU,EAAE,QAA0B;QACrD,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC1B,CAAC;CACF,CAAA;AAJY,OAAO;IADnB,mBAAU,EAAE;GACA,OAAO,CAInB;AAJY,0BAAO"}
@@ -1,4 +1,5 @@
1
1
  export * from "./country-code.pipe";
2
+ export * from "./csv.pipe";
2
3
  export * from "./language-code.pipe";
3
4
  export * from "./not-empty.pipe";
4
5
  export * from "./joi-http-validation.pipe";
@@ -11,6 +11,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  __exportStar(require("./country-code.pipe"), exports);
14
+ __exportStar(require("./csv.pipe"), exports);
14
15
  __exportStar(require("./language-code.pipe"), exports);
15
16
  __exportStar(require("./not-empty.pipe"), exports);
16
17
  __exportStar(require("./joi-http-validation.pipe"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/pipe/index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,sDAAoC;AACpC,6CAA2B;AAC3B,uDAAqC;AACrC,mDAAiC;AACjC,6DAA2C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cryptexlabs/codex-nodejs-common",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "description": "Common code for Assistant applications",
5
5
  "main": "lib/src/index.js",
6
6
  "repository": "git@gitlab.com:cryptexlabs/public/codex-nodejs-common.git",
@@ -0,0 +1,8 @@
1
+ import { ArgumentMetadata, Injectable, PipeTransform } from "@nestjs/common";
2
+
3
+ @Injectable()
4
+ export class CsvPipe implements PipeTransform {
5
+ public transform(value: any, metadata: ArgumentMetadata): any {
6
+ return value.split(",");
7
+ }
8
+ }
package/src/pipe/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from "./country-code.pipe";
2
+ export * from "./csv.pipe";
2
3
  export * from "./language-code.pipe";
3
4
  export * from "./not-empty.pipe";
4
5
  export * from "./joi-http-validation.pipe";