@rocketmakers/orbit-capsule-utils 2.0.0-beta.2 → 2.0.0-beta.5

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 (134) hide show
  1. package/package.json +15 -17
  2. package/lib/src/bootstrap/boot.d.ts +0 -12
  3. package/lib/src/bootstrap/boot.d.ts.map +0 -1
  4. package/lib/src/bootstrap/boot.js +0 -30
  5. package/lib/src/bootstrap/boot.js.map +0 -1
  6. package/lib/src/bootstrap/common.d.ts +0 -15
  7. package/lib/src/bootstrap/common.d.ts.map +0 -1
  8. package/lib/src/bootstrap/common.js +0 -33
  9. package/lib/src/bootstrap/common.js.map +0 -1
  10. package/lib/src/bootstrap/createExpressApp.d.ts +0 -4
  11. package/lib/src/bootstrap/createExpressApp.d.ts.map +0 -1
  12. package/lib/src/bootstrap/createExpressApp.js +0 -36
  13. package/lib/src/bootstrap/createExpressApp.js.map +0 -1
  14. package/lib/src/bootstrap/index.d.ts +0 -5
  15. package/lib/src/bootstrap/index.d.ts.map +0 -1
  16. package/lib/src/bootstrap/index.js +0 -8
  17. package/lib/src/bootstrap/index.js.map +0 -1
  18. package/lib/src/bootstrap/ioc/container.d.ts +0 -12
  19. package/lib/src/bootstrap/ioc/container.d.ts.map +0 -1
  20. package/lib/src/bootstrap/ioc/container.js +0 -7
  21. package/lib/src/bootstrap/ioc/container.js.map +0 -1
  22. package/lib/src/bootstrap/ioc/index.d.ts +0 -3
  23. package/lib/src/bootstrap/ioc/index.d.ts.map +0 -1
  24. package/lib/src/bootstrap/ioc/index.js +0 -6
  25. package/lib/src/bootstrap/ioc/index.js.map +0 -1
  26. package/lib/src/bootstrap/ioc/register.d.ts +0 -6
  27. package/lib/src/bootstrap/ioc/register.d.ts.map +0 -1
  28. package/lib/src/bootstrap/ioc/register.js +0 -27
  29. package/lib/src/bootstrap/ioc/register.js.map +0 -1
  30. package/lib/src/bootstrap/ioc/tsoaIoc.d.ts +0 -9
  31. package/lib/src/bootstrap/ioc/tsoaIoc.d.ts.map +0 -1
  32. package/lib/src/bootstrap/ioc/tsoaIoc.helper.d.ts +0 -4
  33. package/lib/src/bootstrap/ioc/tsoaIoc.helper.d.ts.map +0 -1
  34. package/lib/src/bootstrap/ioc/tsoaIoc.helper.js +0 -14
  35. package/lib/src/bootstrap/ioc/tsoaIoc.helper.js.map +0 -1
  36. package/lib/src/bootstrap/ioc/tsoaIoc.js +0 -12
  37. package/lib/src/bootstrap/ioc/tsoaIoc.js.map +0 -1
  38. package/lib/src/bootstrap/ioc/types.d.ts +0 -19
  39. package/lib/src/bootstrap/ioc/types.d.ts.map +0 -1
  40. package/lib/src/bootstrap/ioc/types.js +0 -3
  41. package/lib/src/bootstrap/ioc/types.js.map +0 -1
  42. package/lib/src/build/config.d.ts +0 -21
  43. package/lib/src/build/config.d.ts.map +0 -1
  44. package/lib/src/build/config.js +0 -3
  45. package/lib/src/build/config.js.map +0 -1
  46. package/lib/src/build/index.d.ts +0 -2
  47. package/lib/src/build/index.d.ts.map +0 -1
  48. package/lib/src/build/index.js +0 -5
  49. package/lib/src/build/index.js.map +0 -1
  50. package/lib/src/build-docker/copy.d.ts +0 -4
  51. package/lib/src/build-docker/copy.d.ts.map +0 -1
  52. package/lib/src/build-docker/copy.js +0 -69
  53. package/lib/src/build-docker/copy.js.map +0 -1
  54. package/lib/src/config/app.d.ts +0 -37
  55. package/lib/src/config/app.d.ts.map +0 -1
  56. package/lib/src/config/app.js +0 -56
  57. package/lib/src/config/app.js.map +0 -1
  58. package/lib/src/config/environment.generated.d.ts +0 -30
  59. package/lib/src/config/environment.generated.d.ts.map +0 -1
  60. package/lib/src/config/environment.generated.js +0 -120
  61. package/lib/src/config/environment.generated.js.map +0 -1
  62. package/lib/src/config/index.d.ts +0 -2
  63. package/lib/src/config/index.d.ts.map +0 -1
  64. package/lib/src/config/index.js +0 -5
  65. package/lib/src/config/index.js.map +0 -1
  66. package/lib/src/database/connectionFactory.d.ts +0 -13
  67. package/lib/src/database/connectionFactory.d.ts.map +0 -1
  68. package/lib/src/database/connectionFactory.js +0 -57
  69. package/lib/src/database/connectionFactory.js.map +0 -1
  70. package/lib/src/database/dataContext.d.ts +0 -13
  71. package/lib/src/database/dataContext.d.ts.map +0 -1
  72. package/lib/src/database/dataContext.js +0 -35
  73. package/lib/src/database/dataContext.js.map +0 -1
  74. package/lib/src/database/index.d.ts +0 -3
  75. package/lib/src/database/index.d.ts.map +0 -1
  76. package/lib/src/database/index.js +0 -6
  77. package/lib/src/database/index.js.map +0 -1
  78. package/lib/src/index.d.ts +0 -9
  79. package/lib/src/index.d.ts.map +0 -1
  80. package/lib/src/index.js +0 -12
  81. package/lib/src/index.js.map +0 -1
  82. package/lib/src/middleware/errors.d.ts +0 -5
  83. package/lib/src/middleware/errors.d.ts.map +0 -1
  84. package/lib/src/middleware/errors.js +0 -47
  85. package/lib/src/middleware/errors.js.map +0 -1
  86. package/lib/src/middleware/health.d.ts +0 -5
  87. package/lib/src/middleware/health.d.ts.map +0 -1
  88. package/lib/src/middleware/health.js +0 -15
  89. package/lib/src/middleware/health.js.map +0 -1
  90. package/lib/src/middleware/index.d.ts +0 -3
  91. package/lib/src/middleware/index.d.ts.map +0 -1
  92. package/lib/src/middleware/index.js +0 -6
  93. package/lib/src/middleware/index.js.map +0 -1
  94. package/lib/src/rest/health.d.ts +0 -7
  95. package/lib/src/rest/health.d.ts.map +0 -1
  96. package/lib/src/rest/health.js +0 -47
  97. package/lib/src/rest/health.js.map +0 -1
  98. package/lib/src/rest/index.d.ts +0 -2
  99. package/lib/src/rest/index.d.ts.map +0 -1
  100. package/lib/src/rest/index.js +0 -5
  101. package/lib/src/rest/index.js.map +0 -1
  102. package/lib/src/services/identity.d.ts +0 -10
  103. package/lib/src/services/identity.d.ts.map +0 -1
  104. package/lib/src/services/identity.js +0 -37
  105. package/lib/src/services/identity.js.map +0 -1
  106. package/lib/src/services/index.d.ts +0 -2
  107. package/lib/src/services/index.d.ts.map +0 -1
  108. package/lib/src/services/index.js +0 -5
  109. package/lib/src/services/index.js.map +0 -1
  110. package/lib/src/utils/capsules.d.ts +0 -10
  111. package/lib/src/utils/capsules.d.ts.map +0 -1
  112. package/lib/src/utils/capsules.js +0 -27
  113. package/lib/src/utils/capsules.js.map +0 -1
  114. package/lib/src/utils/context.d.ts +0 -10
  115. package/lib/src/utils/context.d.ts.map +0 -1
  116. package/lib/src/utils/context.js +0 -20
  117. package/lib/src/utils/context.js.map +0 -1
  118. package/lib/src/utils/httpErrors.d.ts +0 -8
  119. package/lib/src/utils/httpErrors.d.ts.map +0 -1
  120. package/lib/src/utils/httpErrors.js +0 -9
  121. package/lib/src/utils/httpErrors.js.map +0 -1
  122. package/lib/src/utils/index.d.ts +0 -6
  123. package/lib/src/utils/index.d.ts.map +0 -1
  124. package/lib/src/utils/index.js +0 -9
  125. package/lib/src/utils/index.js.map +0 -1
  126. package/lib/src/utils/podTypes.d.ts +0 -2
  127. package/lib/src/utils/podTypes.d.ts.map +0 -1
  128. package/lib/src/utils/podTypes.js +0 -3
  129. package/lib/src/utils/podTypes.js.map +0 -1
  130. package/lib/src/utils/repositoryPaths.d.ts +0 -4
  131. package/lib/src/utils/repositoryPaths.d.ts.map +0 -1
  132. package/lib/src/utils/repositoryPaths.js +0 -13
  133. package/lib/src/utils/repositoryPaths.js.map +0 -1
  134. package/lib/tsconfig.tsbuildinfo +0 -11705
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HealthController = exports.TransactionalHealthController = void 0;
4
- const tslib_1 = require("tslib");
5
- const tsoa_1 = require("tsoa");
6
- const typeorm_1 = require("typeorm");
7
- const tsoaIoc_helper_1 = require("../bootstrap/ioc/tsoaIoc.helper");
8
- let TransactionalHealthController = class TransactionalHealthController {
9
- health() {
10
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
11
- yield typeorm_1.getConnection().transaction(() => {
12
- return Promise.resolve(null);
13
- });
14
- });
15
- }
16
- };
17
- tslib_1.__decorate([
18
- tsoa_1.Get(),
19
- tslib_1.__metadata("design:type", Function),
20
- tslib_1.__metadata("design:paramtypes", []),
21
- tslib_1.__metadata("design:returntype", Promise)
22
- ], TransactionalHealthController.prototype, "health", null);
23
- TransactionalHealthController = tslib_1.__decorate([
24
- tsoaIoc_helper_1.ContainerKey('transactionalHealthController'),
25
- tsoa_1.Route('transactional-health'),
26
- tsoa_1.Tags('TransactionalHealth')
27
- ], TransactionalHealthController);
28
- exports.TransactionalHealthController = TransactionalHealthController;
29
- let HealthController = class HealthController {
30
- health() {
31
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
32
- });
33
- }
34
- };
35
- tslib_1.__decorate([
36
- tsoa_1.Get(),
37
- tslib_1.__metadata("design:type", Function),
38
- tslib_1.__metadata("design:paramtypes", []),
39
- tslib_1.__metadata("design:returntype", Promise)
40
- ], HealthController.prototype, "health", null);
41
- HealthController = tslib_1.__decorate([
42
- tsoaIoc_helper_1.ContainerKey('healthController'),
43
- tsoa_1.Route('health'),
44
- tsoa_1.Tags('Health')
45
- ], HealthController);
46
- exports.HealthController = HealthController;
47
- //# sourceMappingURL=health.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"health.js","sourceRoot":"","sources":["../../../src/rest/health.ts"],"names":[],"mappings":";;;;AAAA,+BAAwC;AACxC,qCAAwC;AACxC,oEAA+D;AAK/D,IAAa,6BAA6B,GAA1C,MAAa,6BAA6B;IAKlC,MAAM;;YACV,MAAM,uBAAa,EAAE,CAAC,WAAW,CAAO,GAAG,EAAE;gBAC3C,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC,CAAC,CAAC;QACL,CAAC;KAAA;CACF,CAAA;AALC;IADC,UAAG,EAAE;;;;2DAKL;AATU,6BAA6B;IAHzC,6BAAY,CAAC,+BAA+B,CAAC;IAC7C,YAAK,CAAC,sBAAsB,CAAC;IAC7B,WAAI,CAAC,qBAAqB,CAAC;GACf,6BAA6B,CAUzC;AAVY,sEAA6B;AAe1C,IAAa,gBAAgB,GAA7B,MAAa,gBAAgB;IAKrB,MAAM;;QAEZ,CAAC;KAAA;CACF,CAAA;AAHC;IADC,UAAG,EAAE;;;;8CAGL;AAPU,gBAAgB;IAH5B,6BAAY,CAAC,kBAAkB,CAAC;IAChC,YAAK,CAAC,QAAQ,CAAC;IACf,WAAI,CAAC,QAAQ,CAAC;GACF,gBAAgB,CAQ5B;AARY,4CAAgB"}
@@ -1,2 +0,0 @@
1
- export * from './health';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rest/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./health"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rest/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB"}
@@ -1,10 +0,0 @@
1
- import { IDataContext } from '@rocketmakers/orbit-db-core';
2
- import { IGetIdentityService } from '@rocketmakers/orbit-auth-core';
3
- import { IOrbitUser } from '@rocketmakers/orbit-core';
4
- import { AppConfig } from '../config';
5
- export declare class RemoteIdentityService implements IGetIdentityService {
6
- private appConfig;
7
- constructor(appConfig: AppConfig);
8
- get(_context: IDataContext, sessionId: string): Promise<IOrbitUser>;
9
- }
10
- //# sourceMappingURL=identity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity.d.ts","sourceRoot":"","sources":["../../../src/services/identity.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGpE,OAAO,EAAE,UAAU,EAAsB,MAAM,0BAA0B,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,qBAAa,qBAAsB,YAAW,mBAAmB;IACnD,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAElC,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;CAsB1E"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RemoteIdentityService = void 0;
4
- const tslib_1 = require("tslib");
5
- const axios_1 = require("axios");
6
- const orbit_core_1 = require("@rocketmakers/orbit-core");
7
- class RemoteIdentityService {
8
- constructor(appConfig) {
9
- this.appConfig = appConfig;
10
- }
11
- get(_context, sessionId) {
12
- var _a, _b;
13
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
14
- try {
15
- const response = yield axios_1.default({
16
- url: `${this.appConfig.session.identityServiceEndpoint}/identity/${sessionId}`,
17
- method: 'get',
18
- headers: {},
19
- });
20
- const { data, status, statusText } = response;
21
- if (status >= 400 && status < 600) {
22
- throw new Error(statusText);
23
- }
24
- return data;
25
- }
26
- catch (error) {
27
- const statusText = (_a = error === null || error === void 0 ? void 0 : error.response) === null || _a === void 0 ? void 0 : _a.statusText;
28
- if (statusText) {
29
- throw new Error(statusText);
30
- }
31
- throw new orbit_core_1.UnknownServerError((_b = error === null || error === void 0 ? void 0 : error.message) !== null && _b !== void 0 ? _b : 'unknown error');
32
- }
33
- });
34
- }
35
- }
36
- exports.RemoteIdentityService = RemoteIdentityService;
37
- //# sourceMappingURL=identity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"identity.js","sourceRoot":"","sources":["../../../src/services/identity.ts"],"names":[],"mappings":";;;;AAEA,iCAA0B;AAE1B,yDAA0E;AAG1E,MAAa,qBAAqB;IAChC,YAAoB,SAAoB;QAApB,cAAS,GAAT,SAAS,CAAW;IAAG,CAAC;IAEtC,GAAG,CAAC,QAAsB,EAAE,SAAiB;;;YACjD,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC;oBAC3B,GAAG,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,uBAAuB,aAAa,SAAS,EAAE;oBAC9E,MAAM,EAAE,KAAK;oBACb,OAAO,EAAE,EAAE;iBACZ,CAAC,CAAC;gBACH,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;gBAE9C,IAAI,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,EAAE;oBACjC,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;iBAC7B;gBAED,OAAO,IAAI,CAAC;aACb;YAAC,OAAO,KAAK,EAAE;gBACd,MAAM,UAAU,SAAG,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,0CAAE,UAAU,CAAC;gBAC/C,IAAI,UAAU,EAAE;oBACd,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC,CAAC;iBAC7B;gBACD,MAAM,IAAI,+BAAkB,OAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,mCAAI,eAAe,CAAC,CAAC;aACjE;;KACF;CACF;AAzBD,sDAyBC"}
@@ -1,2 +0,0 @@
1
- export * from './identity';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./identity"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/services/index.ts"],"names":[],"mappings":";;;AAAA,qDAA2B"}
@@ -1,10 +0,0 @@
1
- interface IContainer {
2
- containerName: string;
3
- imageName: string;
4
- name: string;
5
- path: string;
6
- entryPoints: string[];
7
- }
8
- export declare function getCapsulePackages(): Promise<IContainer[]>;
9
- export {};
10
- //# sourceMappingURL=capsules.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capsules.d.ts","sourceRoot":"","sources":["../../../src/utils/capsules.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAmBhE"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCapsulePackages = void 0;
4
- const tslib_1 = require("tslib");
5
- const fs_1 = require("@rocketmakers/shell-commands/lib/fs");
6
- const path_1 = require("path");
7
- const copy_1 = require("../build-docker/copy");
8
- function getCapsulePackages() {
9
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
10
- const packagesDir = copy_1.resolveRepositoryPath('../../../packages');
11
- const subDirs = fs_1.FileSystem.getFolders(packagesDir);
12
- const capsules = [];
13
- subDirs.forEach(dir => {
14
- const packages = fs_1.FileSystem.getFolders(dir.path);
15
- packages.forEach(pkg => {
16
- const capsuleJsonPath = path_1.join(pkg.path, 'capsule.json');
17
- if (fs_1.FileSystem.exists(capsuleJsonPath)) {
18
- const capsuleJson = JSON.parse(fs_1.FileSystem.readFile(capsuleJsonPath));
19
- capsules.push(capsuleJson);
20
- }
21
- });
22
- });
23
- return capsules;
24
- });
25
- }
26
- exports.getCapsulePackages = getCapsulePackages;
27
- //# sourceMappingURL=capsules.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capsules.js","sourceRoot":"","sources":["../../../src/utils/capsules.ts"],"names":[],"mappings":";;;;AAAA,4DAAiE;AACjE,+BAA4B;AAC5B,+CAA6D;AAU7D,SAAsB,kBAAkB;;QACtC,MAAM,WAAW,GAAG,4BAAqB,CAAC,mBAAmB,CAAC,CAAC;QAC/D,MAAM,OAAO,GAAG,eAAU,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;QAEnD,MAAM,QAAQ,GAAiB,EAAE,CAAC;QAElC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACpB,MAAM,QAAQ,GAAG,eAAU,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAEjD,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBACrB,MAAM,eAAe,GAAG,WAAI,CAAC,GAAG,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;gBACvD,IAAI,eAAU,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;oBACtC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,eAAU,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC;oBACrE,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;iBAC5B;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAnBD,gDAmBC"}
@@ -1,10 +0,0 @@
1
- import { Request } from 'express';
2
- import { IContext } from '@rocketmakers/orbit-core';
3
- export declare function createContextFromRequest(req: Request): IContext;
4
- export interface IContextProvider {
5
- fromRequest<TDataToReturn>(req: Request, action: (context: IContext) => Promise<TDataToReturn>): Promise<TDataToReturn>;
6
- }
7
- export declare class ContextProvider implements IContextProvider {
8
- fromRequest<TDataToReturn>(req: Request, action: (context: IContext) => Promise<TDataToReturn>): Promise<TDataToReturn>;
9
- }
10
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/utils/context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAA+C,MAAM,0BAA0B,CAAC;AAGjG,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,OAAO,GAAG,QAAQ,CAO/D;AAED,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,aAAa,EACvB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,aAAa,CAAC,GACpD,OAAO,CAAC,aAAa,CAAC,CAAC;CAC3B;AAED,qBAAa,eAAgB,YAAW,gBAAgB;IACtD,WAAW,CAAC,aAAa,EACvB,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,CAAC,aAAa,CAAC,GACpD,OAAO,CAAC,aAAa,CAAC;CAK1B"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContextProvider = exports.createContextFromRequest = void 0;
4
- const orbit_core_1 = require("@rocketmakers/orbit-core");
5
- function createContextFromRequest(req) {
6
- const { requestor, requestId } = req.headers;
7
- return {
8
- requestor: requestor ? JSON.parse(requestor) : { type: 'anonymous' },
9
- requestId: requestId ? requestId : new orbit_core_1.UuidGeneratorService().generate(),
10
- };
11
- }
12
- exports.createContextFromRequest = createContextFromRequest;
13
- class ContextProvider {
14
- fromRequest(req, action) {
15
- const context = createContextFromRequest(req);
16
- return action(Object.assign({}, context));
17
- }
18
- }
19
- exports.ContextProvider = ContextProvider;
20
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/utils/context.ts"],"names":[],"mappings":";;;AACA,yDAAiG;AAGjG,SAAgB,wBAAwB,CAAC,GAAY;IACnD,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;IAE7C,OAAO;QACL,SAAS,EAAE,SAAS,CAAC,CAAC,CAAE,IAAI,CAAC,KAAK,CAAC,SAAmB,CAAgB,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE;QAC9F,SAAS,EAAE,SAAS,CAAC,CAAC,CAAE,SAAuB,CAAC,CAAC,CAAC,IAAI,iCAAoB,EAAE,CAAC,QAAQ,EAAE;KACxF,CAAC;AACJ,CAAC;AAPD,4DAOC;AASD,MAAa,eAAe;IAC1B,WAAW,CACT,GAAY,EACZ,MAAqD;QAErD,MAAM,OAAO,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;QAE9C,OAAO,MAAM,mBAAM,OAAO,EAAG,CAAC;IAChC,CAAC;CACF;AATD,0CASC"}
@@ -1,8 +0,0 @@
1
- export interface RequestTooLargeError {
2
- message: string;
3
- expected: number;
4
- length: number;
5
- limit: number;
6
- }
7
- export declare function isRequestTooLargeError(err: RequestTooLargeError | any): err is RequestTooLargeError;
8
- //# sourceMappingURL=httpErrors.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpErrors.d.ts","sourceRoot":"","sources":["../../../src/utils/httpErrors.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,oBAAoB,GAAG,GAAG,GAAG,GAAG,IAAI,oBAAoB,CAEnG"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isRequestTooLargeError = void 0;
4
- const HttpStatus = require("http-status-codes");
5
- function isRequestTooLargeError(err) {
6
- return err.status === HttpStatus.REQUEST_TOO_LONG;
7
- }
8
- exports.isRequestTooLargeError = isRequestTooLargeError;
9
- //# sourceMappingURL=httpErrors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"httpErrors.js","sourceRoot":"","sources":["../../../src/utils/httpErrors.ts"],"names":[],"mappings":";;;AAAA,gDAAgD;AAShD,SAAgB,sBAAsB,CAAC,GAA+B;IACpE,OAAO,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,gBAAgB,CAAC;AACpD,CAAC;AAFD,wDAEC"}
@@ -1,6 +0,0 @@
1
- export * from './context';
2
- export * from './capsules';
3
- export * from './httpErrors';
4
- export * from './podTypes';
5
- export * from './repositoryPaths';
6
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC"}
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./context"), exports);
5
- tslib_1.__exportStar(require("./capsules"), exports);
6
- tslib_1.__exportStar(require("./httpErrors"), exports);
7
- tslib_1.__exportStar(require("./podTypes"), exports);
8
- tslib_1.__exportStar(require("./repositoryPaths"), exports);
9
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,oDAA0B;AAC1B,qDAA2B;AAC3B,uDAA6B;AAC7B,qDAA2B;AAC3B,4DAAkC"}
@@ -1,2 +0,0 @@
1
- export declare type PodNames = 'auth' | 'notify' | 'storage' | 'notify-bg-tasks' | 'twilio' | 'sendgrid' | 'firebase';
2
- //# sourceMappingURL=podTypes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"podTypes.d.ts","sourceRoot":"","sources":["../../../src/utils/podTypes.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,GAAG,iBAAiB,GAAG,QAAQ,GAAG,UAAU,GAAG,UAAU,CAAC"}
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=podTypes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"podTypes.js","sourceRoot":"","sources":["../../../src/utils/podTypes.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- export declare namespace RepositoryPaths {
2
- function resolve(...relative: string[]): string;
3
- }
4
- //# sourceMappingURL=repositoryPaths.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"repositoryPaths.d.ts","sourceRoot":"","sources":["../../../src/utils/repositoryPaths.ts"],"names":[],"mappings":"AAEA,yBAAiB,eAAe,CAAC;IAE/B,SAAgB,OAAO,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,UAE5C;CACF"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.RepositoryPaths = void 0;
4
- const path_1 = require("path");
5
- var RepositoryPaths;
6
- (function (RepositoryPaths) {
7
- const repositoryRootPath = path_1.join(__dirname, '../../../');
8
- function resolve(...relative) {
9
- return path_1.join(...[repositoryRootPath, ...relative]);
10
- }
11
- RepositoryPaths.resolve = resolve;
12
- })(RepositoryPaths = exports.RepositoryPaths || (exports.RepositoryPaths = {}));
13
- //# sourceMappingURL=repositoryPaths.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"repositoryPaths.js","sourceRoot":"","sources":["../../../src/utils/repositoryPaths.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAE5B,IAAiB,eAAe,CAK/B;AALD,WAAiB,eAAe;IAC9B,MAAM,kBAAkB,GAAG,WAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;IACxD,SAAgB,OAAO,CAAC,GAAG,QAAkB;QAC3C,OAAO,WAAI,CAAC,GAAG,CAAC,kBAAkB,EAAE,GAAG,QAAQ,CAAC,CAAC,CAAC;IACpD,CAAC;IAFe,uBAAO,UAEtB,CAAA;AACH,CAAC,EALgB,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK/B"}