@mongodb-js/devtools-connect 2.2.1 → 2.4.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/.esm-wrapper.mjs +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -1
- package/lib/index.js.map +1 -1
- package/lib/oidc/handler.js +5 -0
- package/lib/oidc/handler.js.map +1 -1
- package/package.json +6 -6
package/.esm-wrapper.mjs
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -14,10 +14,12 @@ 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.hookLogger = exports.connectMongoClient = void 0;
|
|
17
|
+
exports.oidcServerRequestHandler = exports.hookLogger = exports.connectMongoClient = void 0;
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
var connect_1 = require("./connect");
|
|
20
20
|
Object.defineProperty(exports, "connectMongoClient", { enumerable: true, get: function () { return connect_1.connectMongoClient; } });
|
|
21
21
|
var log_hook_1 = require("./log-hook");
|
|
22
22
|
Object.defineProperty(exports, "hookLogger", { enumerable: true, get: function () { return log_hook_1.hookLogger; } });
|
|
23
|
+
var handler_1 = require("./oidc/handler");
|
|
24
|
+
Object.defineProperty(exports, "oidcServerRequestHandler", { enumerable: true, get: function () { return handler_1.oidcServerRequestHandler; } });
|
|
23
25
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAK3B,uCAAwC;AAA/B,sGAAA,UAAU,OAAA;AACnB,0CAA0D;AAAjD,mHAAA,wBAAwB,OAAA"}
|
package/lib/oidc/handler.js
CHANGED
|
@@ -6,6 +6,11 @@ function oidcServerRequestHandler(options, info) {
|
|
|
6
6
|
const { productDocsLink, productName } = options;
|
|
7
7
|
const { res, result, status } = info;
|
|
8
8
|
res.statusCode = status;
|
|
9
|
+
if (result === 'redirecting') {
|
|
10
|
+
res.setHeader('Location', info.location);
|
|
11
|
+
res.end();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
9
14
|
res.setHeader('Content-Security-Policy', "default-src 'self'; style-src 'unsafe-inline'");
|
|
10
15
|
res.setHeader('Content-Type', 'text/html; charset=utf-8');
|
|
11
16
|
switch (result) {
|
package/lib/oidc/handler.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/oidc/handler.ts"],"names":[],"mappings":";;;AAEA,wDAA0F;AAE1F,SAAgB,wBAAwB,CACtC,OAAwE,EACxE,IAA+B;IAE/B,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACjD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"handler.js","sourceRoot":"","sources":["../../src/oidc/handler.ts"],"names":[],"mappings":";;;AAEA,wDAA0F;AAE1F,SAAgB,wBAAwB,CACtC,OAAwE,EACxE,IAA+B;IAE/B,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC;IACjD,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrC,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC;IAExB,IAAI,MAAM,KAAK,aAAa,EAAE;QAC5B,GAAG,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,GAAG,CAAC,GAAG,EAAE,CAAC;QACV,OAAO;KACR;IAKD,GAAG,CAAC,SAAS,CAAC,yBAAyB,EAAE,+CAA+C,CAAC,CAAC;IAC1F,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,0BAA0B,CAAC,CAAC;IAE1D,QAAQ,MAAM,EAAE;QACd,KAAK,UAAU;YACb,GAAG,CAAC,GAAG,CAAC,IAAA,+BAAgB,EAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;YAC5D,MAAM;QACR,KAAK,UAAU;YACb,GAAG,CAAC,GAAG,CAAC,IAAA,4BAAa,EAAC,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC;YAClE,MAAM;QACR;YACE,GAAG,CAAC,GAAG,CAAC,IAAA,+BAAgB,EAAC,EAAE,eAAe,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC;YAC5D,MAAM;KACT;AACH,CAAC;AA/BD,4DA+BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mongodb-js/devtools-connect",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "A connection establishment utility for MongoDB developer tools",
|
|
5
5
|
"homepage": "https://github.com/mongodb-js/devtools-connect",
|
|
6
6
|
"repository": {
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"license": "Apache-2.0",
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"lodash.merge": "^4.6.2",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
39
|
+
"mongodb-connection-string-url": "^2.6.0",
|
|
40
|
+
"system-ca": "^1.0.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
+
"@mongodb-js/oidc-plugin": "^0.3.0",
|
|
43
44
|
"mongodb": "^5.4.0",
|
|
44
|
-
"mongodb-log-writer": "^1.2.0"
|
|
45
|
-
"@mongodb-js/oidc-plugin": "^0.2.4"
|
|
45
|
+
"mongodb-log-writer": "^1.2.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@mongodb-js/compass-components": "^1.6.0",
|
|
49
|
-
"@mongodb-js/oidc-plugin": "^0.
|
|
49
|
+
"@mongodb-js/oidc-plugin": "^0.3.0",
|
|
50
50
|
"@types/lodash.merge": "^4.6.7",
|
|
51
51
|
"@types/mocha": "^9.0.0",
|
|
52
52
|
"@types/node": "^16.4.10",
|