@langchain/google-gauth 0.1.2 → 0.1.4
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/dist/auth.cjs +15 -24
- package/dist/auth.js +15 -24
- package/package.json +2 -2
package/dist/auth.cjs
CHANGED
|
@@ -74,31 +74,22 @@ class GAuthClient {
|
|
|
74
74
|
return this.gauth.getProjectId();
|
|
75
75
|
}
|
|
76
76
|
async request(opts) {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return ret;
|
|
82
|
-
}
|
|
83
|
-
else if (contentType === "text/event-stream") {
|
|
84
|
-
return {
|
|
85
|
-
...ret,
|
|
86
|
-
data: new NodeSseJsonStream(ret.data),
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
else {
|
|
90
|
-
return {
|
|
91
|
-
...ret,
|
|
92
|
-
data: new NodeJsonStream(ret.data),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
|
+
const ret = await this.gauth.request(opts);
|
|
78
|
+
const [contentType] = ret?.headers?.["content-type"]?.split(/;/) ?? [""];
|
|
79
|
+
if (opts.responseType !== "stream") {
|
|
80
|
+
return ret;
|
|
96
81
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
else if (contentType === "text/event-stream") {
|
|
83
|
+
return {
|
|
84
|
+
...ret,
|
|
85
|
+
data: new NodeSseJsonStream(ret.data),
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
return {
|
|
90
|
+
...ret,
|
|
91
|
+
data: new NodeJsonStream(ret.data),
|
|
92
|
+
};
|
|
102
93
|
}
|
|
103
94
|
}
|
|
104
95
|
}
|
package/dist/auth.js
CHANGED
|
@@ -67,31 +67,22 @@ export class GAuthClient {
|
|
|
67
67
|
return this.gauth.getProjectId();
|
|
68
68
|
}
|
|
69
69
|
async request(opts) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
return ret;
|
|
75
|
-
}
|
|
76
|
-
else if (contentType === "text/event-stream") {
|
|
77
|
-
return {
|
|
78
|
-
...ret,
|
|
79
|
-
data: new NodeSseJsonStream(ret.data),
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
return {
|
|
84
|
-
...ret,
|
|
85
|
-
data: new NodeJsonStream(ret.data),
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
70
|
+
const ret = await this.gauth.request(opts);
|
|
71
|
+
const [contentType] = ret?.headers?.["content-type"]?.split(/;/) ?? [""];
|
|
72
|
+
if (opts.responseType !== "stream") {
|
|
73
|
+
return ret;
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
75
|
+
else if (contentType === "text/event-stream") {
|
|
76
|
+
return {
|
|
77
|
+
...ret,
|
|
78
|
+
data: new NodeSseJsonStream(ret.data),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
return {
|
|
83
|
+
...ret,
|
|
84
|
+
data: new NodeJsonStream(ret.data),
|
|
85
|
+
};
|
|
95
86
|
}
|
|
96
87
|
}
|
|
97
88
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langchain/google-gauth",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Google auth based authentication support for Google services",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"author": "LangChain",
|
|
36
36
|
"license": "MIT",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@langchain/google-common": "~0.1.
|
|
38
|
+
"@langchain/google-common": "~0.1.4",
|
|
39
39
|
"google-auth-library": "^8.9.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|