@terreno/api 57.4.0 → 57.6.0
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/README.md +5 -5
- package/bunfig.toml +1 -1
- package/dist/actions.js +197 -368
- package/dist/adminModelRouter.js +88 -173
- package/dist/api.js +598 -852
- package/dist/audit/auditApp.js +48 -89
- package/dist/audit/auditEventModel.js +15 -16
- package/dist/audit/cloudTasksEnqueue.js +56 -149
- package/dist/audit/diff.js +70 -160
- package/dist/audit/processQueue.js +25 -70
- package/dist/audit/rbacSink.js +25 -66
- package/dist/audit/record.js +129 -251
- package/dist/auth.js +432 -681
- package/dist/authRecovery.js +155 -269
- package/dist/authTokens.js +43 -118
- package/dist/betterAuthApp.js +25 -26
- package/dist/betterAuthSetup.js +258 -413
- package/dist/browserLogsRoute.d.ts +6 -0
- package/dist/browserLogsRoute.js +97 -0
- package/dist/collectionRegistry.js +32 -47
- package/dist/config.js +53 -122
- package/dist/configurationApp.js +180 -361
- package/dist/configurationPlugin.js +130 -302
- package/dist/consentApp.js +276 -421
- package/dist/docLoader.js +78 -126
- package/dist/envConfigurationPlugin.js +25 -147
- package/dist/errors.js +151 -247
- package/dist/example.js +28 -34
- package/dist/expressServer.d.ts +10 -0
- package/dist/expressServer.js +109 -255
- package/dist/frameworkModelNames.d.ts +24 -0
- package/dist/frameworkModelNames.js +31 -0
- package/dist/githubAuth.js +152 -216
- package/dist/httpClient.js +176 -264
- package/dist/index.d.ts +2 -0
- package/dist/index.js +7 -2
- package/dist/logger.js +145 -278
- package/dist/mcp/auth.js +76 -128
- package/dist/mcp/createMCPRequest.js +4 -5
- package/dist/mcp/handlers.js +268 -480
- package/dist/mcp/query.js +56 -150
- package/dist/mcp/registry.js +17 -30
- package/dist/mcp/schemaGenerator.js +95 -181
- package/dist/mcp/server.js +28 -100
- package/dist/mcp/serviceTokens.js +102 -191
- package/dist/mcp/toolGenerator.js +78 -191
- package/dist/middleware.js +15 -27
- package/dist/migrations/fixtures/all-down/20260910120000-one.js +2 -42
- package/dist/migrations/fixtures/all-down/20260910120001-two.js +2 -42
- package/dist/migrations/fixtures/bad-id/20260910120000-mismatch.js +1 -39
- package/dist/migrations/fixtures/bad-name/not-a-migration.js +1 -39
- package/dist/migrations/fixtures/valid/20260910120000-alpha.js +1 -39
- package/dist/migrations/fixtures/valid/20260910120001-beta.js +2 -42
- package/dist/migrations/generate.js +107 -229
- package/dist/migrations/load.js +75 -201
- package/dist/migrations/lock.js +54 -126
- package/dist/migrations/runner.js +192 -446
- package/dist/migrations/schemaCatalog.js +122 -263
- package/dist/models/consentForm.js +6 -6
- package/dist/models/consentResponse.js +5 -5
- package/dist/models/mcpServiceToken.js +66 -156
- package/dist/models/notification.js +6 -6
- package/dist/models/notificationPreference.js +6 -6
- package/dist/models/versionConfig.js +5 -5
- package/dist/notifications/notificationService.js +133 -273
- package/dist/notifications/notificationsApp.js +85 -179
- package/dist/notifications/notificationsBeforeSend.js +19 -64
- package/dist/notifiers/googleChatNotifier.js +36 -117
- package/dist/notifiers/slackNotifier.d.ts +31 -2
- package/dist/notifiers/slackNotifier.js +170 -119
- package/dist/notifiers/zoomNotifier.js +60 -111
- package/dist/openApi.js +107 -122
- package/dist/openApiBuilder.js +117 -159
- package/dist/openApiCompat.js +81 -148
- package/dist/openApiEtag.js +7 -7
- package/dist/openApiValidator.js +177 -286
- package/dist/orgs/orgContext.js +87 -157
- package/dist/orgs/orgPermissions.js +29 -68
- package/dist/orgs/orgPlugin.js +9 -27
- package/dist/orgs/organizationModel.js +65 -166
- package/dist/orgs/organizationSettings.js +29 -36
- package/dist/orgs/orgsApp.js +346 -608
- package/dist/permissions.js +88 -181
- package/dist/plugins.js +125 -218
- package/dist/populate.js +130 -240
- package/dist/rateLimit/applyTrustProxy.js +1 -1
- package/dist/rateLimit/createStore.js +7 -8
- package/dist/rateLimit/memoryStore.js +22 -100
- package/dist/rateLimit/middleware.js +48 -99
- package/dist/rateLimit/mongoStore.js +54 -112
- package/dist/rateLimit/policies.js +41 -75
- package/dist/rateLimit/redisStore.js +39 -133
- package/dist/rbac/access.js +119 -267
- package/dist/rbac/assertAllowed.js +95 -171
- package/dist/rbac/auditModel.js +14 -58
- package/dist/rbac/backfillAdmins.js +24 -130
- package/dist/rbac/fieldViews.js +46 -141
- package/dist/rbac/membershipOrgAdminSource.js +28 -99
- package/dist/rbac/middleware.js +30 -96
- package/dist/rbac/modelRouterAccess.js +130 -307
- package/dist/rbac/permissionUtils.js +40 -179
- package/dist/rbac/realtimeAccess.js +81 -147
- package/dist/rbac/resolve.d.ts +1 -1
- package/dist/rbac/resolve.js +148 -342
- package/dist/rbac/roleManager.js +318 -700
- package/dist/rbac/roleModel.js +44 -171
- package/dist/rbac/routes.js +93 -196
- package/dist/rbac/scopes.js +39 -133
- package/dist/rbac/statements.js +23 -91
- package/dist/rbac/userPlugin.js +3 -29
- package/dist/realtime/changeStreamWatcher.js +489 -800
- package/dist/realtime/deprecation.js +8 -10
- package/dist/realtime/queryMatcher.js +110 -191
- package/dist/realtime/queryStore.js +35 -118
- package/dist/realtime/realtimeApp.js +247 -401
- package/dist/realtime/registry.js +19 -30
- package/dist/realtime/sessionRevalidation.js +132 -358
- package/dist/realtime/socketAuth.js +89 -208
- package/dist/realtime/socketUser.js +10 -56
- package/dist/requestContext.js +93 -139
- package/dist/schemaMetadata.js +179 -274
- package/dist/scriptRunner.js +96 -266
- package/dist/scrubAdminFields.js +36 -108
- package/dist/secretProviders.js +130 -299
- package/dist/seedRunner.js +221 -514
- package/dist/sync/adminBroadcastScope.js +58 -170
- package/dist/sync/adminWindowAccess.js +15 -86
- package/dist/sync/adminWindowMutation.js +110 -181
- package/dist/sync/executors.js +425 -629
- package/dist/sync/loadHarness.js +392 -689
- package/dist/sync/models.js +181 -341
- package/dist/sync/mutationHandler.js +533 -801
- package/dist/sync/registrationSideEffects.js +41 -95
- package/dist/sync/registry.js +29 -49
- package/dist/sync/routes.js +484 -817
- package/dist/sync/scripts/compactTombstones.js +83 -228
- package/dist/sync/serialize.js +18 -58
- package/dist/sync/socketHandlers.js +253 -478
- package/dist/sync/streams.js +49 -117
- package/dist/sync/syncApp.js +12 -15
- package/dist/sync/syncBatch.js +63 -168
- package/dist/sync/syncSeqPlugin.js +430 -702
- package/dist/syncConsents.js +113 -253
- package/dist/terrenoApp.js +166 -276
- package/dist/tests/createTestData.js +146 -256
- package/dist/tests/models.js +14 -54
- package/dist/tests/mongoTestSetup.js +42 -103
- package/dist/tests/testHelper.js +31 -93
- package/dist/tests.js +12 -51
- package/dist/transformers.js +61 -164
- package/dist/utils.js +31 -93
- package/dist/vendor/wesleytodd-openapi/index.js +37 -51
- package/dist/vendor/wesleytodd-openapi/lib/generate-doc.js +32 -40
- package/dist/vendor/wesleytodd-openapi/lib/layer-schema.js +3 -3
- package/dist/vendor/wesleytodd-openapi/lib/ui.js +50 -19
- package/dist/vendor/wesleytodd-openapi/lib/validate.js +19 -47
- package/dist/versionCheckPlugin.js +52 -100
- package/dist/webhooks/headerValue.js +2 -2
- package/dist/webhooks/idempotency/memoryStore.js +16 -59
- package/dist/webhooks/idempotency/mongoStore.js +55 -130
- package/dist/webhooks/idempotency/webhookReceipt.js +9 -9
- package/dist/webhooks/rawBody.js +1 -1
- package/dist/webhooks/timingSafeEqual.js +4 -5
- package/dist/webhooks/verifiers/hmac.js +17 -18
- package/dist/webhooks/verifiers/sendgrid.js +20 -22
- package/dist/webhooks/verifiers/stripe.js +31 -65
- package/dist/webhooks/verifiers/twilio.js +23 -73
- package/dist/webhooks/webhooksApp.js +78 -177
- package/dist/zodOpenApi.js +2 -2
- package/package.json +6 -6
- package/src/__tests__/browserLogsRoute.test.ts +165 -0
- package/src/audit/auditApp.test.ts +5 -5
- package/src/audit/auditEventModel.ts +7 -3
- package/src/audit/auditRouter.test.ts +5 -5
- package/src/audit/rbacSink.test.ts +2 -2
- package/src/audit/record.test.ts +2 -2
- package/src/audit/record.ts +3 -2
- package/src/auth.ts +1 -1
- package/src/authRecovery.test.ts +43 -0
- package/src/authRecovery.ts +16 -10
- package/src/authTokens.ts +6 -2
- package/src/authVerification.test.ts +22 -0
- package/src/browserLogsRoute.ts +110 -0
- package/src/configurationPlugin.test.ts +1 -11
- package/src/expressServer.ts +10 -0
- package/src/frameworkModelNames.test.ts +62 -0
- package/src/frameworkModelNames.ts +33 -0
- package/src/index.ts +7 -0
- package/src/isolated/migrateCliConnect.isolated.ts +51 -0
- package/src/mcp/auth.test.ts +34 -1
- package/src/migrations/cli.test.ts +0 -23
- package/src/models/mcpServiceToken.ts +4 -3
- package/src/models/notification.ts +3 -2
- package/src/models/notificationPreference.ts +1 -1
- package/src/notifications/notificationsApp.test.ts +24 -1
- package/src/notifiers/slackNotifier.test.ts +186 -1
- package/src/notifiers/slackNotifier.ts +167 -8
- package/src/orgs/orgPlugin.ts +1 -1
- package/src/orgs/organizationModel.ts +11 -6
- package/src/plugins.test.ts +5 -0
- package/src/plugins.ts +3 -0
- package/src/realtime/realtimeApp.ts +1 -1
- package/src/sync/integration.test.ts +2 -2
- package/src/terrenoApp.ts +3 -0
- package/src/types.d.ts +1 -0
- package/src/webhooks/idempotency/webhookReceipt.ts +4 -3
- package/tsconfig.json +13 -54
- package/tsconfig.typedoc.json +2 -0
package/dist/httpClient.js
CHANGED
|
@@ -1,70 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
24
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
var __values = (this && this.__values) || function(o) {
|
|
50
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
51
|
-
if (m) return m.call(o);
|
|
52
|
-
if (o && typeof o.length === "number") return {
|
|
53
|
-
next: function () {
|
|
54
|
-
if (o && i >= o.length) o = void 0;
|
|
55
|
-
return { value: o && o[i++], done: !o };
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
59
|
-
};
|
|
60
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
61
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
62
4
|
};
|
|
63
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
64
6
|
exports.createAuthenticatedClient = exports.withApiErrorHandling = exports.normalizeApiError = exports.markRetryUnsafe = void 0;
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
7
|
+
const axios_1 = __importDefault(require("axios"));
|
|
8
|
+
const errors_1 = require("./errors");
|
|
9
|
+
const logger_1 = require("./logger");
|
|
68
10
|
/**
|
|
69
11
|
* Opts a non-idempotent request (POST/PUT/PATCH/DELETE) into the retry policy of a
|
|
70
12
|
* createAuthenticatedClient instance: `client.axios.post(url, body, markRetryUnsafe())`.
|
|
@@ -72,12 +14,11 @@ var logger_1 = require("./logger");
|
|
|
72
14
|
* replayable — JSON objects are fine, but streams/FormData are consumed on first send.
|
|
73
15
|
* Has no effect on axios instances not created by createAuthenticatedClient.
|
|
74
16
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return __assign(__assign({}, config), { retryUnsafe: true });
|
|
17
|
+
const markRetryUnsafe = (config = {}) => {
|
|
18
|
+
return { ...config, retryUnsafe: true };
|
|
78
19
|
};
|
|
79
20
|
exports.markRetryUnsafe = markRetryUnsafe;
|
|
80
|
-
|
|
21
|
+
const classifyStatusCode = (statusCode) => {
|
|
81
22
|
if (statusCode === 429) {
|
|
82
23
|
return "rateLimited";
|
|
83
24
|
}
|
|
@@ -97,51 +38,40 @@ var classifyStatusCode = function (statusCode) {
|
|
|
97
38
|
};
|
|
98
39
|
// Plain-string bodies (HTML error pages, proxy text) are truncated to this length so an
|
|
99
40
|
// unbounded — and potentially sensitive — payload never reaches the logger whole.
|
|
100
|
-
|
|
41
|
+
const MAX_STRING_BODY_MESSAGE_LENGTH = 500;
|
|
101
42
|
/**
|
|
102
43
|
* Extracts human-readable messages from common API error response body shapes:
|
|
103
44
|
* plain strings (truncated), `{message}`, and JSONAPI-style `{errors: [{title, detail}]}`.
|
|
104
45
|
* Returns an empty array when the body has no recognizable message.
|
|
105
46
|
*/
|
|
106
|
-
|
|
107
|
-
var e_1, _a;
|
|
47
|
+
const extractBodyMessages = (data) => {
|
|
108
48
|
if (typeof data === "string" && data.length > 0) {
|
|
109
49
|
if (data.length > MAX_STRING_BODY_MESSAGE_LENGTH) {
|
|
110
|
-
return [
|
|
50
|
+
return [`${data.slice(0, MAX_STRING_BODY_MESSAGE_LENGTH)}…`];
|
|
111
51
|
}
|
|
112
52
|
return [data];
|
|
113
53
|
}
|
|
114
54
|
if (data && typeof data === "object") {
|
|
115
|
-
|
|
55
|
+
const body = data;
|
|
116
56
|
if (typeof body.message === "string" && body.message.length > 0) {
|
|
117
57
|
return [body.message];
|
|
118
58
|
}
|
|
119
59
|
if (Array.isArray(body.errors)) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
else if (typeof detail === "string") {
|
|
133
|
-
messages.push(detail);
|
|
134
|
-
}
|
|
60
|
+
const messages = [];
|
|
61
|
+
for (const entry of body.errors) {
|
|
62
|
+
if (entry && typeof entry === "object") {
|
|
63
|
+
const { title, detail } = entry;
|
|
64
|
+
if (typeof title === "string" && typeof detail === "string") {
|
|
65
|
+
messages.push(`${title}: ${detail}`);
|
|
66
|
+
}
|
|
67
|
+
else if (typeof title === "string") {
|
|
68
|
+
messages.push(title);
|
|
69
|
+
}
|
|
70
|
+
else if (typeof detail === "string") {
|
|
71
|
+
messages.push(detail);
|
|
135
72
|
}
|
|
136
73
|
}
|
|
137
74
|
}
|
|
138
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
139
|
-
finally {
|
|
140
|
-
try {
|
|
141
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
142
|
-
}
|
|
143
|
-
finally { if (e_1) throw e_1.error; }
|
|
144
|
-
}
|
|
145
75
|
if (messages.length > 0) {
|
|
146
76
|
return messages;
|
|
147
77
|
}
|
|
@@ -161,18 +91,35 @@ var extractBodyMessages = function (data) {
|
|
|
161
91
|
* put sensitive data inside those message fields should additionally use a redactError
|
|
162
92
|
* hook.
|
|
163
93
|
*/
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
var base = { apiName: context.apiName, operation: context.operation };
|
|
94
|
+
const normalizeApiError = (error, context) => {
|
|
95
|
+
const base = { apiName: context.apiName, operation: context.operation };
|
|
167
96
|
if (axios_1.default.isAxiosError(error)) {
|
|
168
|
-
|
|
97
|
+
const statusCode = error.response?.status;
|
|
169
98
|
if (statusCode === undefined) {
|
|
170
|
-
return
|
|
99
|
+
return {
|
|
100
|
+
...base,
|
|
101
|
+
classification: "network",
|
|
102
|
+
isAxios: true,
|
|
103
|
+
messages: [error.message],
|
|
104
|
+
statusCode: undefined,
|
|
105
|
+
};
|
|
171
106
|
}
|
|
172
|
-
|
|
173
|
-
return
|
|
107
|
+
const bodyMessages = extractBodyMessages(error.response?.data);
|
|
108
|
+
return {
|
|
109
|
+
...base,
|
|
110
|
+
classification: classifyStatusCode(statusCode),
|
|
111
|
+
isAxios: true,
|
|
112
|
+
messages: bodyMessages.length > 0 ? bodyMessages : [error.message],
|
|
113
|
+
statusCode,
|
|
114
|
+
};
|
|
174
115
|
}
|
|
175
|
-
return
|
|
116
|
+
return {
|
|
117
|
+
...base,
|
|
118
|
+
classification: "unknown",
|
|
119
|
+
isAxios: false,
|
|
120
|
+
messages: [error instanceof Error ? error.message : String(error)],
|
|
121
|
+
statusCode: undefined,
|
|
122
|
+
};
|
|
176
123
|
};
|
|
177
124
|
exports.normalizeApiError = normalizeApiError;
|
|
178
125
|
/**
|
|
@@ -185,60 +132,50 @@ exports.normalizeApiError = normalizeApiError;
|
|
|
185
132
|
* APIError with a stable title (per-occurrence text goes in `detail`) and stays silent
|
|
186
133
|
* itself — apiErrorMiddleware logs APIErrors, so logging here too would double-log.
|
|
187
134
|
*/
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
case 3:
|
|
201
|
-
error_1 = _c.sent();
|
|
202
|
-
normalized = (0, exports.normalizeApiError)(error_1, {
|
|
203
|
-
apiName: options.apiName,
|
|
204
|
-
operation: options.operation,
|
|
205
|
-
});
|
|
206
|
-
if (options.redactError) {
|
|
207
|
-
normalized = options.redactError(normalized);
|
|
208
|
-
}
|
|
209
|
-
if (options.rethrowAs === "apiError") {
|
|
210
|
-
statusCode = normalized.statusCode;
|
|
211
|
-
throw new errors_1.APIError({
|
|
212
|
-
cause: error_1,
|
|
213
|
-
code: "http-client-error",
|
|
214
|
-
detail: (_b = normalized.messages[0]) !== null && _b !== void 0 ? _b : "unknown error",
|
|
215
|
-
meta: { classification: normalized.classification },
|
|
216
|
-
status: statusCode !== undefined && statusCode >= 400 ? statusCode : 500,
|
|
217
|
-
title: "".concat(options.apiName, " ").concat(options.operation, " request failed"),
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
log.error("[".concat(options.apiName, "] ").concat(options.operation, " failed"), normalized);
|
|
221
|
-
throw error_1;
|
|
222
|
-
case 4: return [2 /*return*/];
|
|
135
|
+
const withApiErrorHandling = async (fn, options) => {
|
|
136
|
+
const log = options.logger ?? logger_1.logger;
|
|
137
|
+
try {
|
|
138
|
+
return await fn();
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
let normalized = (0, exports.normalizeApiError)(error, {
|
|
142
|
+
apiName: options.apiName,
|
|
143
|
+
operation: options.operation,
|
|
144
|
+
});
|
|
145
|
+
if (options.redactError) {
|
|
146
|
+
normalized = options.redactError(normalized);
|
|
223
147
|
}
|
|
224
|
-
|
|
225
|
-
|
|
148
|
+
if (options.rethrowAs === "apiError") {
|
|
149
|
+
const statusCode = normalized.statusCode;
|
|
150
|
+
throw new errors_1.APIError({
|
|
151
|
+
cause: error,
|
|
152
|
+
code: "http-client-error",
|
|
153
|
+
detail: normalized.messages[0] ?? "unknown error",
|
|
154
|
+
meta: { classification: normalized.classification },
|
|
155
|
+
status: statusCode !== undefined && statusCode >= 400 ? statusCode : 500,
|
|
156
|
+
title: `${options.apiName} ${options.operation} request failed`,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
log.error(`[${options.apiName}] ${options.operation} failed`, normalized);
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
226
163
|
exports.withApiErrorHandling = withApiErrorHandling;
|
|
227
|
-
|
|
164
|
+
const DEFAULT_RETRY_POLICY = {
|
|
228
165
|
baseDelayMs: 250,
|
|
229
166
|
maxAttempts: 3,
|
|
230
|
-
maxDelayMs:
|
|
167
|
+
maxDelayMs: 30_000,
|
|
231
168
|
retryOn: ["rateLimited", "server", "network"],
|
|
232
169
|
};
|
|
233
170
|
// Retries apply only to these methods unless a request opts in via markRetryUnsafe() —
|
|
234
171
|
// repeating a failed POST against an external service can duplicate side effects.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
172
|
+
const IDEMPOTENT_METHODS = ["get", "head", "options"];
|
|
173
|
+
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
174
|
+
const parseRetryAfterMs = (headerValue) => {
|
|
238
175
|
if (typeof headerValue !== "string" || headerValue.trim() === "") {
|
|
239
176
|
return undefined;
|
|
240
177
|
}
|
|
241
|
-
|
|
178
|
+
const seconds = Number(headerValue);
|
|
242
179
|
if (Number.isFinite(seconds) && seconds >= 0) {
|
|
243
180
|
return seconds * 1000;
|
|
244
181
|
}
|
|
@@ -263,154 +200,129 @@ var parseRetryAfterMs = function (headerValue) {
|
|
|
263
200
|
* rejects with the original axios error — error-level logging is left to the call site
|
|
264
201
|
* (typically via withApiErrorHandling) so composed usage logs each failure exactly once.
|
|
265
202
|
*/
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
var retryPolicy = __assign(__assign({}, DEFAULT_RETRY_POLICY), options.retry);
|
|
203
|
+
const createAuthenticatedClient = (options) => {
|
|
204
|
+
const log = options.logger ?? logger_1.logger;
|
|
205
|
+
const apiName = options.apiName ?? options.baseURL;
|
|
206
|
+
const retryPolicy = { ...DEFAULT_RETRY_POLICY, ...options.retry };
|
|
271
207
|
// The in-flight promise is cached (not the resolved value) so concurrent first
|
|
272
208
|
// requests share a single token fetch. resolvedToken tracks the last issued token so
|
|
273
209
|
// a 401 only invalidates the cache if a newer token hasn't already replaced it.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return [2 /*return*/, auth.getKey()];
|
|
288
|
-
}
|
|
289
|
-
return [4 /*yield*/, axios_1.default.post(auth.tokenUrl, new URLSearchParams({ grant_type: "client_credentials" }), {
|
|
290
|
-
auth: { password: auth.credentials.clientSecret, username: auth.credentials.clientId },
|
|
291
|
-
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
292
|
-
})];
|
|
293
|
-
case 1:
|
|
294
|
-
response = _b.sent();
|
|
295
|
-
accessToken = (_a = response.data) === null || _a === void 0 ? void 0 : _a.access_token;
|
|
296
|
-
if (typeof accessToken !== "string" || accessToken.length === 0) {
|
|
297
|
-
throw new errors_1.InternalServerError({
|
|
298
|
-
code: "http-client-error",
|
|
299
|
-
detail: "".concat(apiName, " token response has no access_token"),
|
|
300
|
-
title: "[httpClient] token response has no access_token",
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
return [2 /*return*/, accessToken];
|
|
304
|
-
}
|
|
210
|
+
let tokenPromise;
|
|
211
|
+
let resolvedToken;
|
|
212
|
+
const fetchToken = async () => {
|
|
213
|
+
const { auth } = options;
|
|
214
|
+
if (auth.type === "bearer") {
|
|
215
|
+
return auth.getToken();
|
|
216
|
+
}
|
|
217
|
+
if (auth.type === "apiKey") {
|
|
218
|
+
return auth.getKey();
|
|
219
|
+
}
|
|
220
|
+
const response = await axios_1.default.post(auth.tokenUrl, new URLSearchParams({ grant_type: "client_credentials" }), {
|
|
221
|
+
auth: { password: auth.credentials.clientSecret, username: auth.credentials.clientId },
|
|
222
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
305
223
|
});
|
|
306
|
-
|
|
307
|
-
|
|
224
|
+
const accessToken = response.data?.access_token;
|
|
225
|
+
if (typeof accessToken !== "string" || accessToken.length === 0) {
|
|
226
|
+
throw new errors_1.InternalServerError({
|
|
227
|
+
code: "http-client-error",
|
|
228
|
+
detail: `${apiName} token response has no access_token`,
|
|
229
|
+
title: "[httpClient] token response has no access_token",
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
return accessToken;
|
|
233
|
+
};
|
|
234
|
+
const invalidateToken = () => {
|
|
308
235
|
tokenPromise = undefined;
|
|
309
236
|
resolvedToken = undefined;
|
|
310
237
|
};
|
|
311
|
-
|
|
238
|
+
const getCachedToken = () => {
|
|
312
239
|
if (!tokenPromise) {
|
|
313
240
|
// The promise-identity checks below keep an out-of-order resolution (a fetch that
|
|
314
241
|
// was invalidated and replaced while in flight) from clobbering the newer fetch's
|
|
315
242
|
// cache state.
|
|
316
|
-
|
|
317
|
-
if (tokenPromise ===
|
|
243
|
+
const thisPromise = fetchToken().then((token) => {
|
|
244
|
+
if (tokenPromise === thisPromise) {
|
|
318
245
|
resolvedToken = token;
|
|
319
246
|
}
|
|
320
247
|
return token;
|
|
321
|
-
},
|
|
248
|
+
}, (error) => {
|
|
322
249
|
// Clear the failed fetch so the next request retries, and wrap the failure in
|
|
323
250
|
// a plain Error. The wrapping is what keeps the raw token-request AxiosError
|
|
324
251
|
// out of the response interceptor's refresh/retry logic (a wrapped error fails
|
|
325
252
|
// the isAxiosError guard); __httpClientManaged is defense-in-depth behind it.
|
|
326
|
-
if (tokenPromise ===
|
|
253
|
+
if (tokenPromise === thisPromise) {
|
|
327
254
|
invalidateToken();
|
|
328
255
|
}
|
|
329
|
-
|
|
330
|
-
|
|
256
|
+
const normalized = (0, exports.normalizeApiError)(error, { apiName, operation: "token fetch" });
|
|
257
|
+
const wrapped = new Error(`[httpClient] ${apiName} token fetch failed: ${normalized.messages[0]}`);
|
|
331
258
|
wrapped.cause = error;
|
|
332
259
|
throw wrapped;
|
|
333
260
|
});
|
|
334
|
-
tokenPromise =
|
|
261
|
+
tokenPromise = thisPromise;
|
|
335
262
|
}
|
|
336
263
|
return tokenPromise;
|
|
337
264
|
};
|
|
338
|
-
|
|
339
|
-
instance.interceptors.request.use(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
265
|
+
const instance = axios_1.default.create({ baseURL: options.baseURL });
|
|
266
|
+
instance.interceptors.request.use(async (config) => {
|
|
267
|
+
config.__httpClientManaged = true;
|
|
268
|
+
const token = await getCachedToken();
|
|
269
|
+
if (options.auth.type === "apiKey") {
|
|
270
|
+
config.headers.set(options.auth.header, token);
|
|
271
|
+
}
|
|
272
|
+
else {
|
|
273
|
+
config.headers.set("Authorization", `Bearer ${token}`);
|
|
274
|
+
}
|
|
275
|
+
return config;
|
|
276
|
+
});
|
|
277
|
+
instance.interceptors.response.use(undefined, async (error) => {
|
|
278
|
+
if (!axios_1.default.isAxiosError(error) || !error.config) {
|
|
279
|
+
throw error;
|
|
280
|
+
}
|
|
281
|
+
const config = error.config;
|
|
282
|
+
// Errors from configs this client didn't manage (e.g. a failing token POST) must
|
|
283
|
+
// propagate untouched — refreshing or retrying them can loop forever.
|
|
284
|
+
if (!config.__httpClientManaged) {
|
|
285
|
+
throw error;
|
|
286
|
+
}
|
|
287
|
+
let normalized = (0, exports.normalizeApiError)(error, {
|
|
288
|
+
apiName,
|
|
289
|
+
operation: `${config.method ?? "request"} ${config.url ?? ""}`,
|
|
356
290
|
});
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
throw error;
|
|
372
|
-
}
|
|
373
|
-
normalized = (0, exports.normalizeApiError)(error, {
|
|
374
|
-
apiName: apiName,
|
|
375
|
-
operation: "".concat((_a = config.method) !== null && _a !== void 0 ? _a : "request", " ").concat((_b = config.url) !== null && _b !== void 0 ? _b : ""),
|
|
376
|
-
});
|
|
377
|
-
if (options.redactError) {
|
|
378
|
-
normalized = options.redactError(normalized);
|
|
379
|
-
}
|
|
380
|
-
// One-shot token refresh on 401 for oauth2 strategies.
|
|
381
|
-
if (options.auth.type === "oauth2" &&
|
|
382
|
-
options.auth.refreshOn401 &&
|
|
383
|
-
((_c = error.response) === null || _c === void 0 ? void 0 : _c.status) === 401 &&
|
|
384
|
-
!config.__httpClientDidAuthRefresh) {
|
|
385
|
-
config.__httpClientDidAuthRefresh = true;
|
|
386
|
-
sentAuthorization = config.headers.get("Authorization");
|
|
387
|
-
if (resolvedToken === undefined || sentAuthorization === "Bearer ".concat(resolvedToken)) {
|
|
388
|
-
invalidateToken();
|
|
389
|
-
}
|
|
390
|
-
log.debug("[".concat(apiName, "] ").concat(normalized.operation, " got 401, refreshing token and retrying"));
|
|
391
|
-
return [2 /*return*/, instance.request(config)];
|
|
392
|
-
}
|
|
393
|
-
method = ((_d = config.method) !== null && _d !== void 0 ? _d : "get").toLowerCase();
|
|
394
|
-
isRetryableMethod = IDEMPOTENT_METHODS.includes(method) || config.retryUnsafe === true;
|
|
395
|
-
attemptsSoFar = ((_e = config.__httpClientRetryCount) !== null && _e !== void 0 ? _e : 0) + 1;
|
|
396
|
-
if (!retryPolicy.retryOn.includes(normalized.classification) ||
|
|
397
|
-
!isRetryableMethod ||
|
|
398
|
-
attemptsSoFar >= retryPolicy.maxAttempts) {
|
|
399
|
-
throw error;
|
|
400
|
-
}
|
|
401
|
-
config.__httpClientRetryCount = attemptsSoFar;
|
|
402
|
-
backoffMs = retryPolicy.baseDelayMs * Math.pow(2, (attemptsSoFar - 1)) * (1 + Math.random() * 0.5);
|
|
403
|
-
retryAfterMs = parseRetryAfterMs((_g = (_f = error.response) === null || _f === void 0 ? void 0 : _f.headers) === null || _g === void 0 ? void 0 : _g["retry-after"]);
|
|
404
|
-
delayMs = Math.min(retryAfterMs !== null && retryAfterMs !== void 0 ? retryAfterMs : backoffMs, retryPolicy.maxDelayMs);
|
|
405
|
-
log.debug("[".concat(apiName, "] ").concat(normalized.operation, " failed (").concat(normalized.classification, "), ") +
|
|
406
|
-
"retrying attempt ".concat(attemptsSoFar + 1, "/").concat(retryPolicy.maxAttempts, " in ").concat(Math.round(delayMs), "ms"));
|
|
407
|
-
return [4 /*yield*/, sleep(delayMs)];
|
|
408
|
-
case 1:
|
|
409
|
-
_h.sent();
|
|
410
|
-
return [2 /*return*/, instance.request(config)];
|
|
291
|
+
if (options.redactError) {
|
|
292
|
+
normalized = options.redactError(normalized);
|
|
293
|
+
}
|
|
294
|
+
// One-shot token refresh on 401 for oauth2 strategies.
|
|
295
|
+
if (options.auth.type === "oauth2" &&
|
|
296
|
+
options.auth.refreshOn401 &&
|
|
297
|
+
error.response?.status === 401 &&
|
|
298
|
+
!config.__httpClientDidAuthRefresh) {
|
|
299
|
+
config.__httpClientDidAuthRefresh = true;
|
|
300
|
+
// Only invalidate if this request failed with the current token — a concurrent
|
|
301
|
+
// request may have already refreshed it.
|
|
302
|
+
const sentAuthorization = config.headers.get("Authorization");
|
|
303
|
+
if (resolvedToken === undefined || sentAuthorization === `Bearer ${resolvedToken}`) {
|
|
304
|
+
invalidateToken();
|
|
411
305
|
}
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
306
|
+
log.debug(`[${apiName}] ${normalized.operation} got 401, refreshing token and retrying`);
|
|
307
|
+
return instance.request(config);
|
|
308
|
+
}
|
|
309
|
+
const method = (config.method ?? "get").toLowerCase();
|
|
310
|
+
const isRetryableMethod = IDEMPOTENT_METHODS.includes(method) || config.retryUnsafe === true;
|
|
311
|
+
const attemptsSoFar = (config.__httpClientRetryCount ?? 0) + 1;
|
|
312
|
+
if (!retryPolicy.retryOn.includes(normalized.classification) ||
|
|
313
|
+
!isRetryableMethod ||
|
|
314
|
+
attemptsSoFar >= retryPolicy.maxAttempts) {
|
|
315
|
+
throw error;
|
|
316
|
+
}
|
|
317
|
+
config.__httpClientRetryCount = attemptsSoFar;
|
|
318
|
+
const backoffMs = retryPolicy.baseDelayMs * 2 ** (attemptsSoFar - 1) * (1 + Math.random() * 0.5);
|
|
319
|
+
const retryAfterMs = parseRetryAfterMs(error.response?.headers?.["retry-after"]);
|
|
320
|
+
const delayMs = Math.min(retryAfterMs ?? backoffMs, retryPolicy.maxDelayMs);
|
|
321
|
+
log.debug(`[${apiName}] ${normalized.operation} failed (${normalized.classification}), ` +
|
|
322
|
+
`retrying attempt ${attemptsSoFar + 1}/${retryPolicy.maxAttempts} in ${Math.round(delayMs)}ms`);
|
|
323
|
+
await sleep(delayMs);
|
|
324
|
+
return instance.request(config);
|
|
325
|
+
});
|
|
326
|
+
return { axios: instance, invalidateToken };
|
|
415
327
|
};
|
|
416
328
|
exports.createAuthenticatedClient = createAuthenticatedClient;
|
package/dist/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from "./authTokens";
|
|
|
12
12
|
export * from "./betterAuth";
|
|
13
13
|
export * from "./betterAuthApp";
|
|
14
14
|
export * from "./betterAuthSetup";
|
|
15
|
+
export * from "./browserLogsRoute";
|
|
15
16
|
export * from "./config";
|
|
16
17
|
export * from "./configurationApp";
|
|
17
18
|
export * from "./configurationPlugin";
|
|
@@ -19,6 +20,7 @@ export * from "./consentApp";
|
|
|
19
20
|
export * from "./envConfigurationPlugin";
|
|
20
21
|
export * from "./errors";
|
|
21
22
|
export * from "./expressServer";
|
|
23
|
+
export { FRAMEWORK_MODEL_PUBLIC_NAMES, type FrameworkModelCompiledName, type FrameworkModelPublicName, publicFrameworkModelName, } from "./frameworkModelNames";
|
|
22
24
|
export * from "./githubAuth";
|
|
23
25
|
export * from "./httpClient";
|
|
24
26
|
export * from "./logger";
|
package/dist/index.js
CHANGED
|
@@ -14,8 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
17
|
+
exports.rbacRouter = exports.terrenoDefaultRoles = exports.READ_ONLY_ROLE_PERMISSIONS = exports.organizationOperatorRole = exports.expandRolePermissions = exports.createRbacRoleModel = exports.ORG_ADMIN_PERMISSION_BUNDLE = exports.membershipOrgAdminPermissionSource = exports.MEMBERSHIP_ORG_ADMIN_PERMISSION_SOURCE_NAME = exports.backfillAdmins = exports.recordRbacAudit = exports.createRbacAuditModel = exports.assertAllowed = exports.DEFAULT_WINDOW_MS = exports.DEFAULT_AUTH_MAX = exports.DEFAULT_API_MAX = exports.notificationsBeforeSend = exports.NotificationsApp = exports.getNotificationService = exports.createNotificationService = exports.configureNotificationService = exports.getAllMCPTools = exports.generateToolsForEntry = exports.generateAllTools = exports.resolveMcpServiceTokensOption = exports.MAX_ACTIVE_MCP_SERVICE_TOKENS = exports.addMcpServiceTokenRoutes = exports.mountMCPServer = exports.generateToolDescription = exports.generateInputSchema = exports.updateMCPRegistryOptions = exports.registerMCPTool = exports.registerMCPModel = exports.getMCPRegistry = exports.clearMCPRegistry = exports.extractUserFromHeaders = exports.publicFrameworkModelName = exports.FRAMEWORK_MODEL_PUBLIC_NAMES = exports.resetAuditRecorderForTests = exports.recordAuditEvent = exports.persistEnqueuedAuditEvent = exports.maybeRecordAdminAudit = exports.isAuditRecorderInstalled = exports.flushAuditRecorderForTests = exports.persistRbacAuditToAuditEvent = exports.createCloudTasksAuditEnqueue = exports.auditEnqueueFromEnv = exports.AUDIT_SECRET_HEADER = exports.createAuditEventModel = exports.AuditApp = void 0;
|
|
18
|
+
exports.WebhooksApp = exports.twilioSignature = exports.stripeSignature = exports.sendgridEventSignature = exports.hmacSignature = exports.createMemoryIdempotencyStore = exports.stripAdminBodyFields = exports.scrubAdminFields = exports.adminBodyFieldsToStrip = exports.SYSTEM_FIELD_PATHS = exports.nestDottedFieldDescriptions = exports.modelDescriptionToOpenApiSpec = exports.modelDescriptionToAdminFields = exports.fieldDescriptionToZodType = exports.fieldDescriptionToOpenApiProperty = exports.fieldDescriptionToAdminMeta = exports.describeModelForRouter = exports.describeModel = exports.getSocketUser = exports.createSocketAuthMiddleware = exports.createLegacyJwtValidator = exports.createBetterAuthValidator = exports.startSessionRevalidationSweep = exports.runSessionRevalidationSweep = exports.revalidateSocketSession = exports.reresolveSyncRoomsForSocket = exports.loadFullUserForSocket = exports.DEFAULT_SESSION_REVALIDATION_INTERVAL_MS = exports.updateRealtimeRegistryOptions = exports.registerRealtime = exports.getRealtimeRegistry = exports.findRegistryEntryByRoutePath = exports.findRegistryEntryByCollection = exports.clearRealtimeRegistry = exports.RealtimeApp = exports.MAX_QUERY_SUBSCRIPTIONS = exports.MAX_MODEL_SUBSCRIPTIONS = exports.MAX_DOCUMENT_SUBSCRIPTIONS = exports.installRealtimeSocketHandlers = exports.removeQuerySubscription = exports.removeAllSocketQueries = exports.getQuerySubscriptionsForCollection = exports.computeQueryId = exports.clearQueryStore = exports.addQuerySubscription = exports.matchesQuery = exports.stopChangeStreamWatcher = exports.startChangeStreamWatcher = exports.emitSyncDeltaForChange = exports.emitPayloadToAuthorizedRoom = void 0;
|
|
19
|
+
exports.z = void 0;
|
|
19
20
|
__exportStar(require("./actions"), exports);
|
|
20
21
|
__exportStar(require("./adminTypes"), exports);
|
|
21
22
|
__exportStar(require("./api"), exports);
|
|
@@ -42,6 +43,7 @@ __exportStar(require("./authTokens"), exports);
|
|
|
42
43
|
__exportStar(require("./betterAuth"), exports);
|
|
43
44
|
__exportStar(require("./betterAuthApp"), exports);
|
|
44
45
|
__exportStar(require("./betterAuthSetup"), exports);
|
|
46
|
+
__exportStar(require("./browserLogsRoute"), exports);
|
|
45
47
|
__exportStar(require("./config"), exports);
|
|
46
48
|
__exportStar(require("./configurationApp"), exports);
|
|
47
49
|
__exportStar(require("./configurationPlugin"), exports);
|
|
@@ -49,6 +51,9 @@ __exportStar(require("./consentApp"), exports);
|
|
|
49
51
|
__exportStar(require("./envConfigurationPlugin"), exports);
|
|
50
52
|
__exportStar(require("./errors"), exports);
|
|
51
53
|
__exportStar(require("./expressServer"), exports);
|
|
54
|
+
var frameworkModelNames_1 = require("./frameworkModelNames");
|
|
55
|
+
Object.defineProperty(exports, "FRAMEWORK_MODEL_PUBLIC_NAMES", { enumerable: true, get: function () { return frameworkModelNames_1.FRAMEWORK_MODEL_PUBLIC_NAMES; } });
|
|
56
|
+
Object.defineProperty(exports, "publicFrameworkModelName", { enumerable: true, get: function () { return frameworkModelNames_1.publicFrameworkModelName; } });
|
|
52
57
|
__exportStar(require("./githubAuth"), exports);
|
|
53
58
|
__exportStar(require("./httpClient"), exports);
|
|
54
59
|
__exportStar(require("./logger"), exports);
|