@feedb2b-dev/service-auth 0.0.1 → 0.0.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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@feedb2b-dev/service-auth",
3
- "version": "0.0.1",
4
- "description": "Global Nest module that keeps a microservice OAuth token",
3
+ "version": "0.0.3",
4
+ "description": "FeedB2B plugin",
5
5
  "author": "Zhora",
6
6
  "license": "UNLICENSED",
7
7
  "main": "dist/index.js",
@@ -1,5 +0,0 @@
1
- export declare class ServiceToken {
2
- private current?;
3
- get token(): string;
4
- set(token: string): void;
5
- }
@@ -1,27 +0,0 @@
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.ServiceToken = void 0;
10
- const common_1 = require("@nestjs/common");
11
- let ServiceToken = class ServiceToken {
12
- current;
13
- get token() {
14
- if (!this.current) {
15
- throw new Error('Service token is not available');
16
- }
17
- return this.current;
18
- }
19
- set(token) {
20
- this.current = token;
21
- }
22
- };
23
- exports.ServiceToken = ServiceToken;
24
- exports.ServiceToken = ServiceToken = __decorate([
25
- (0, common_1.Injectable)()
26
- ], ServiceToken);
27
- //# sourceMappingURL=service-token.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"service-token.js","sourceRoot":"","sources":["../src/service-token.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAA4C;AAGrC,IAAM,YAAY,GAAlB,MAAM,YAAY;IACf,OAAO,CAAU;IAEzB,IAAI,KAAK;QACP,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;IAED,GAAG,CAAC,KAAa;QACf,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;CACF,CAAA;AAbY,oCAAY;uBAAZ,YAAY;IADxB,IAAA,mBAAU,GAAE;GACA,YAAY,CAaxB"}