@venturialstd/bitbucket 0.0.2

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.
Files changed (29) hide show
  1. package/dist/bitbucket.module.d.ts +3 -0
  2. package/dist/bitbucket.module.d.ts.map +1 -0
  3. package/dist/bitbucket.module.js +26 -0
  4. package/dist/bitbucket.module.js.map +1 -0
  5. package/dist/constants/bitbucket-auth.constant.d.ts +4 -0
  6. package/dist/constants/bitbucket-auth.constant.d.ts.map +1 -0
  7. package/dist/constants/bitbucket-auth.constant.js +8 -0
  8. package/dist/constants/bitbucket-auth.constant.js.map +1 -0
  9. package/dist/constants/bitbucket.settings.constants.d.ts +7 -0
  10. package/dist/constants/bitbucket.settings.constants.d.ts.map +1 -0
  11. package/dist/constants/bitbucket.settings.constants.js +10 -0
  12. package/dist/constants/bitbucket.settings.constants.js.map +1 -0
  13. package/dist/controllers/bitbucket-oauth.controller.d.ts +19 -0
  14. package/dist/controllers/bitbucket-oauth.controller.d.ts.map +1 -0
  15. package/dist/controllers/bitbucket-oauth.controller.js +48 -0
  16. package/dist/controllers/bitbucket-oauth.controller.js.map +1 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.d.ts.map +1 -0
  19. package/dist/index.js +18 -0
  20. package/dist/index.js.map +1 -0
  21. package/dist/services/bitbucket-oauth.service.d.ts +7 -0
  22. package/dist/services/bitbucket-oauth.service.d.ts.map +1 -0
  23. package/dist/services/bitbucket-oauth.service.js +52 -0
  24. package/dist/services/bitbucket-oauth.service.js.map +1 -0
  25. package/dist/settings/bitbucket.settings.d.ts +3 -0
  26. package/dist/settings/bitbucket.settings.d.ts.map +1 -0
  27. package/dist/settings/bitbucket.settings.js +55 -0
  28. package/dist/settings/bitbucket.settings.js.map +1 -0
  29. package/package.json +32 -0
@@ -0,0 +1,3 @@
1
+ export declare class BitbucketModule {
2
+ }
3
+ //# sourceMappingURL=bitbucket.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.module.d.ts","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":"AAMA,qBAMa,eAAe;CAAG"}
@@ -0,0 +1,26 @@
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.BitbucketModule = void 0;
10
+ const axios_1 = require("@nestjs/axios");
11
+ const common_1 = require("@nestjs/common");
12
+ const core_1 = require("@venturialstd/core");
13
+ const bitbucket_oauth_controller_1 = require("./controllers/bitbucket-oauth.controller");
14
+ const bitbucket_oauth_service_1 = require("./services/bitbucket-oauth.service");
15
+ let BitbucketModule = class BitbucketModule {
16
+ };
17
+ exports.BitbucketModule = BitbucketModule;
18
+ exports.BitbucketModule = BitbucketModule = __decorate([
19
+ (0, common_1.Module)({
20
+ imports: [axios_1.HttpModule, core_1.AppLoggerModule, core_1.SettingsModule],
21
+ controllers: [bitbucket_oauth_controller_1.BitbucketOAuthController],
22
+ providers: [bitbucket_oauth_service_1.BitbucketOAuthService],
23
+ exports: [bitbucket_oauth_service_1.BitbucketOAuthService],
24
+ })
25
+ ], BitbucketModule);
26
+ //# sourceMappingURL=bitbucket.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.module.js","sourceRoot":"","sources":["../src/bitbucket.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yCAA2C;AAC3C,2CAAwC;AACxC,6CAAqE;AAErE,yFAAoF;AACpF,gFAA2E;AAOpE,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAN3B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,kBAAU,EAAE,sBAAe,EAAE,qBAAc,CAAC;QACtD,WAAW,EAAE,CAAC,qDAAwB,CAAC;QACvC,SAAS,EAAE,CAAC,+CAAqB,CAAC;QAClC,OAAO,EAAE,CAAC,+CAAqB,CAAC;KACjC,CAAC;GACW,eAAe,CAAG"}
@@ -0,0 +1,4 @@
1
+ export declare enum BITBUCKET_PERMISSIONS {
2
+ AUTHORIZATION_CODE = "authorization_code"
3
+ }
4
+ //# sourceMappingURL=bitbucket-auth.constant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-auth.constant.d.ts","sourceRoot":"","sources":["../../src/constants/bitbucket-auth.constant.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB;IAC/B,kBAAkB,uBAAuB;CAC1C"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BITBUCKET_PERMISSIONS = void 0;
4
+ var BITBUCKET_PERMISSIONS;
5
+ (function (BITBUCKET_PERMISSIONS) {
6
+ BITBUCKET_PERMISSIONS["AUTHORIZATION_CODE"] = "authorization_code";
7
+ })(BITBUCKET_PERMISSIONS || (exports.BITBUCKET_PERMISSIONS = BITBUCKET_PERMISSIONS = {}));
8
+ //# sourceMappingURL=bitbucket-auth.constant.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-auth.constant.js","sourceRoot":"","sources":["../../src/constants/bitbucket-auth.constant.ts"],"names":[],"mappings":";;;AAAA,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,kEAAyC,CAAA;AAC3C,CAAC,EAFW,qBAAqB,qCAArB,qBAAqB,QAEhC"}
@@ -0,0 +1,7 @@
1
+ export declare const BITBUCKET_SETTING_KEYS: {
2
+ GENERAL_CLIENT_ID: string;
3
+ GENERAL_CLIENT_SECRET: string;
4
+ GENERAL_URL: string;
5
+ GENERAL_GITHUB_HOST: string;
6
+ };
7
+ //# sourceMappingURL=bitbucket.settings.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.settings.constants.d.ts","sourceRoot":"","sources":["../../src/constants/bitbucket.settings.constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;CAKlC,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.BITBUCKET_SETTING_KEYS = void 0;
4
+ exports.BITBUCKET_SETTING_KEYS = {
5
+ GENERAL_CLIENT_ID: 'GLOBAL:BITBUCKET:GENERAL:CLIENT_ID',
6
+ GENERAL_CLIENT_SECRET: 'GLOBAL:BITBUCKET:GENERAL:CLIENT_SECRET',
7
+ GENERAL_URL: 'GLOBAL:BITBUCKET:GENERAL:URL',
8
+ GENERAL_GITHUB_HOST: 'GLOBAL:BITBUCKET:GENERAL:GITHUB_HOST',
9
+ };
10
+ //# sourceMappingURL=bitbucket.settings.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.settings.constants.js","sourceRoot":"","sources":["../../src/constants/bitbucket.settings.constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG;IACpC,iBAAiB,EAAE,oCAAoC;IACvD,qBAAqB,EAAE,wCAAwC;IAC/D,WAAW,EAAE,8BAA8B;IAC3C,mBAAmB,EAAE,sCAAsC;CAC5D,CAAC"}
@@ -0,0 +1,19 @@
1
+ import { BitbucketOAuthService } from '../services/bitbucket-oauth.service';
2
+ export declare class BitbucketOAuthController {
3
+ private readonly bitbucketOAuth;
4
+ constructor(bitbucketOAuth: BitbucketOAuthService);
5
+ exchangeCode(body: {
6
+ code: string;
7
+ }): Promise<{
8
+ error: string;
9
+ access_token?: undefined;
10
+ refresh_token?: undefined;
11
+ expires_in?: undefined;
12
+ } | {
13
+ access_token: any;
14
+ refresh_token: any;
15
+ expires_in: any;
16
+ error?: undefined;
17
+ }>;
18
+ }
19
+ //# sourceMappingURL=bitbucket-oauth.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-oauth.controller.d.ts","sourceRoot":"","sources":["../../src/controllers/bitbucket-oauth.controller.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,qBACa,wBAAwB;IACvB,OAAO,CAAC,QAAQ,CAAC,cAAc;gBAAd,cAAc,EAAE,qBAAqB;IAI5D,YAAY,CAAS,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;CAalD"}
@@ -0,0 +1,48 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.BitbucketOAuthController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const bitbucket_oauth_service_1 = require("../services/bitbucket-oauth.service");
18
+ let BitbucketOAuthController = class BitbucketOAuthController {
19
+ bitbucketOAuth;
20
+ constructor(bitbucketOAuth) {
21
+ this.bitbucketOAuth = bitbucketOAuth;
22
+ }
23
+ async exchangeCode(body) {
24
+ if (!body.code) {
25
+ return { error: 'Missing code' };
26
+ }
27
+ const token = await this.bitbucketOAuth.exchangeCode(body.code);
28
+ return {
29
+ access_token: token.access_token,
30
+ refresh_token: token.refresh_token,
31
+ expires_in: token.expires_in,
32
+ };
33
+ }
34
+ };
35
+ exports.BitbucketOAuthController = BitbucketOAuthController;
36
+ __decorate([
37
+ (0, common_1.Post)('exchange'),
38
+ (0, common_1.HttpCode)(common_1.HttpStatus.OK),
39
+ __param(0, (0, common_1.Body)()),
40
+ __metadata("design:type", Function),
41
+ __metadata("design:paramtypes", [Object]),
42
+ __metadata("design:returntype", Promise)
43
+ ], BitbucketOAuthController.prototype, "exchangeCode", null);
44
+ exports.BitbucketOAuthController = BitbucketOAuthController = __decorate([
45
+ (0, common_1.Controller)('auth/bitbucket'),
46
+ __metadata("design:paramtypes", [bitbucket_oauth_service_1.BitbucketOAuthService])
47
+ ], BitbucketOAuthController);
48
+ //# sourceMappingURL=bitbucket-oauth.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-oauth.controller.js","sourceRoot":"","sources":["../../src/controllers/bitbucket-oauth.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA8E;AAE9E,iFAA4E;AAGrE,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACN;IAA7B,YAA6B,cAAqC;QAArC,mBAAc,GAAd,cAAc,CAAuB;IAAG,CAAC;IAIhE,AAAN,KAAK,CAAC,YAAY,CAAS,IAAsB;QAC/C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACf,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;QACnC,CAAC;QAED,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEhE,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,UAAU,EAAE,KAAK,CAAC,UAAU;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AAlBY,4DAAwB;AAK7B;IAFL,IAAA,aAAI,EAAC,UAAU,CAAC;IAChB,IAAA,iBAAQ,EAAC,mBAAU,CAAC,EAAE,CAAC;IACJ,WAAA,IAAA,aAAI,GAAE,CAAA;;;;4DAYzB;mCAjBU,wBAAwB;IADpC,IAAA,mBAAU,EAAC,gBAAgB,CAAC;qCAEkB,+CAAqB;GADvD,wBAAwB,CAkBpC"}
@@ -0,0 +1,2 @@
1
+ export * from './bitbucket.module';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./bitbucket.module"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
@@ -0,0 +1,7 @@
1
+ import { SettingsService } from '@venturialstd/core';
2
+ export declare class BitbucketOAuthService {
3
+ private readonly settings;
4
+ constructor(settings: SettingsService);
5
+ exchangeCode(code: string): Promise<any>;
6
+ }
7
+ //# sourceMappingURL=bitbucket-oauth.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-oauth.service.d.ts","sourceRoot":"","sources":["../../src/services/bitbucket-oauth.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAMrD,qBACa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,eAAe;IAEhD,YAAY,CAAC,IAAI,EAAE,MAAM;CA4BhC"}
@@ -0,0 +1,52 @@
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
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.BitbucketOAuthService = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const core_1 = require("@venturialstd/core");
18
+ const axios_1 = __importDefault(require("axios"));
19
+ const bitbucket_settings_constants_1 = require("../constants/bitbucket.settings.constants");
20
+ const bitbucket_auth_constant_1 = require("../constants/bitbucket-auth.constant");
21
+ let BitbucketOAuthService = class BitbucketOAuthService {
22
+ settings;
23
+ constructor(settings) {
24
+ this.settings = settings;
25
+ }
26
+ async exchangeCode(code) {
27
+ const clientId = await this.settings.get(bitbucket_settings_constants_1.BITBUCKET_SETTING_KEYS.GENERAL_CLIENT_ID);
28
+ const clientSecret = await this.settings.get(bitbucket_settings_constants_1.BITBUCKET_SETTING_KEYS.GENERAL_CLIENT_SECRET);
29
+ const redirectUri = await this.settings.get(bitbucket_settings_constants_1.BITBUCKET_SETTING_KEYS.GENERAL_URL);
30
+ const credentials = Buffer.from(`${clientId}:${clientSecret}`).toString('base64');
31
+ if (!clientId || !clientSecret || !redirectUri) {
32
+ throw new Error('Bitbucket OAuth settings are missing');
33
+ }
34
+ const response = await axios_1.default.post('https://bitbucket.org/site/oauth2/access_token', new URLSearchParams({
35
+ grant_type: bitbucket_auth_constant_1.BITBUCKET_PERMISSIONS.AUTHORIZATION_CODE,
36
+ code,
37
+ redirect_uri: redirectUri,
38
+ }), {
39
+ headers: {
40
+ Authorization: `Basic ${credentials}`,
41
+ 'Content-Type': 'application/x-www-form-urlencoded',
42
+ },
43
+ });
44
+ return response.data;
45
+ }
46
+ };
47
+ exports.BitbucketOAuthService = BitbucketOAuthService;
48
+ exports.BitbucketOAuthService = BitbucketOAuthService = __decorate([
49
+ (0, common_1.Injectable)(),
50
+ __metadata("design:paramtypes", [core_1.SettingsService])
51
+ ], BitbucketOAuthService);
52
+ //# sourceMappingURL=bitbucket-oauth.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket-oauth.service.js","sourceRoot":"","sources":["../../src/services/bitbucket-oauth.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,6CAAqD;AACrD,kDAA0B;AAE1B,4FAAmF;AACnF,kFAA6E;AAGtE,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IACH;IAA7B,YAA6B,QAAyB;QAAzB,aAAQ,GAAR,QAAQ,CAAiB;IAAG,CAAC;IAE1D,KAAK,CAAC,YAAY,CAAC,IAAY;QAC7B,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qDAAsB,CAAC,iBAAiB,CAAC,CAAC;QAEnF,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qDAAsB,CAAC,qBAAqB,CAAC,CAAC;QAE3F,MAAM,WAAW,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,qDAAsB,CAAC,WAAW,CAAC,CAAC;QAEhF,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,QAAQ,IAAI,YAAY,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;QAClF,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,IAAI,CAAC,WAAW,EAAE,CAAC;YAC/C,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;QAC1D,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,IAAI,CAC/B,gDAAgD,EAChD,IAAI,eAAe,CAAC;YAClB,UAAU,EAAE,+CAAqB,CAAC,kBAAkB;YACpD,IAAI;YACJ,YAAY,EAAE,WAAW;SAC1B,CAAC,EACF;YACE,OAAO,EAAE;gBACP,aAAa,EAAE,SAAS,WAAW,EAAE;gBACrC,cAAc,EAAE,mCAAmC;aACpD;SACF,CACF,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC;IACvB,CAAC;CACF,CAAA;AA/BY,sDAAqB;gCAArB,qBAAqB;IADjC,IAAA,mBAAU,GAAE;qCAE4B,sBAAe;GAD3C,qBAAqB,CA+BjC"}
@@ -0,0 +1,3 @@
1
+ import { Settings } from '@venturialstd/core';
2
+ export declare const SETTINGS: Omit<Settings, 'id' | 'createdAt' | 'updatedAt'>[];
3
+ //# sourceMappingURL=bitbucket.settings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.settings.d.ts","sourceRoot":"","sources":["../../src/settings/bitbucket.settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAiB,MAAM,oBAAoB,CAAC;AAE7D,eAAO,MAAM,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,CAAC,EAkDtE,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SETTINGS = void 0;
4
+ const core_1 = require("@venturialstd/core");
5
+ exports.SETTINGS = [
6
+ {
7
+ scope: 'GLOBAL',
8
+ module: 'BITBUCKET',
9
+ section: 'GENERAL',
10
+ key: 'CLIENT_ID',
11
+ label: 'Bitbucket Client ID',
12
+ description: 'Client ID used for OAuth authentication with Bitbucket',
13
+ type: core_1.SETTINGS_TYPE.SECRET,
14
+ value: '',
15
+ options: null,
16
+ sortOrder: 3,
17
+ },
18
+ {
19
+ scope: 'GLOBAL',
20
+ module: 'BITBUCKET',
21
+ section: 'GENERAL',
22
+ key: 'CLIENT_SECRET',
23
+ label: 'Bitbucket Client Secret',
24
+ description: 'Client Secret used for OAuth authentication with Bitbucket',
25
+ type: core_1.SETTINGS_TYPE.SECRET,
26
+ value: '',
27
+ options: null,
28
+ sortOrder: 3,
29
+ },
30
+ {
31
+ scope: 'GLOBAL',
32
+ module: 'BITBUCKET',
33
+ section: 'GENERAL',
34
+ key: 'URL',
35
+ label: 'Bitbucket OAuth URL',
36
+ description: 'URL used for OAuth authentication with Bitbucket',
37
+ type: core_1.SETTINGS_TYPE.SECRET,
38
+ value: '',
39
+ options: null,
40
+ sortOrder: 3,
41
+ },
42
+ {
43
+ scope: 'GLOBAL',
44
+ module: 'BITBUCKET',
45
+ section: 'GENERAL',
46
+ key: 'BITBUCKET_HOST',
47
+ label: 'Bitbucket Host URL',
48
+ description: 'Base URL of Bitbucket instance (ex. https://bitbucket.org)',
49
+ type: core_1.SETTINGS_TYPE.TEXT,
50
+ value: 'https://bitbucket.org',
51
+ options: null,
52
+ sortOrder: 2,
53
+ },
54
+ ];
55
+ //# sourceMappingURL=bitbucket.settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bitbucket.settings.js","sourceRoot":"","sources":["../../src/settings/bitbucket.settings.ts"],"names":[],"mappings":";;;AAAA,6CAA6D;AAEhD,QAAA,QAAQ,GAAuD;IAC1E;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,wDAAwD;QACrE,IAAI,EAAE,oBAAa,CAAC,MAAM;QAC1B,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;IACD;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,yBAAyB;QAChC,WAAW,EAAE,4DAA4D;QACzE,IAAI,EAAE,oBAAa,CAAC,MAAM;QAC1B,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;IACD;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,kDAAkD;QAC/D,IAAI,EAAE,oBAAa,CAAC,MAAM;QAC1B,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;IAED;QACE,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,gBAAgB;QACrB,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,4DAA4D;QACzE,IAAI,EAAE,oBAAa,CAAC,IAAI;QACxB,KAAK,EAAE,uBAAuB;QAC9B,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,CAAC;KACb;CACF,CAAC"}
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@venturialstd/bitbucket",
3
+ "version": "0.0.2",
4
+ "description": "Bitbucket API Venturial",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "type": "commonjs",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "publishConfig": {
12
+ "access": "public"
13
+ },
14
+ "scripts": {
15
+ "build": "tsc -p tsconfig.json",
16
+ "prepublishOnly": "npm run build",
17
+ "release:patch": "npm run build && npm version patch --no-git-tag-version && npm publish"
18
+ },
19
+ "devDependencies": {
20
+ "typescript": "^5.9.3"
21
+ },
22
+ "peerDependencies": {
23
+ "@nestjs/axios": "^4.0.0",
24
+ "@nestjs/common": "^11.0.11",
25
+ "@nestjs/core": "^11.0.5",
26
+ "@nestjs/event-emitter": "^3.0.1",
27
+ "@venturialstd/core": "^1.0.16",
28
+ "class-transformer": "^0.5.1",
29
+ "class-validator": "^0.14.1",
30
+ "rxjs": "^7.8.1"
31
+ }
32
+ }