@langchain/google-webauth 2.3.0 → 2.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @langchain/google-webauth
2
2
 
3
+ ## 2.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`2750442`](https://github.com/langchain-ai/langchainjs/commit/2750442d9aad08446153b87a1f3ff334d7c30d21)]:
8
+ - @langchain/google-common@2.3.1
9
+
3
10
  ## 2.3.0
4
11
 
5
12
  ### Patch Changes
package/dist/auth.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"auth.cjs","names":["GoogleAbstractedFetchClient"],"sources":["../src/auth.ts"],"sourcesContent":["import { getEnvironmentVariable } from \"@langchain/core/utils/env\";\nimport {\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport {\n getAccessToken,\n getCredentials,\n Credentials,\n // oxlint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore CJS type resolution workaround\n} from \"web-auth-library/google\";\n\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\n\nexport class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined) {\n super();\n\n const options = fields?.authOptions;\n const accessToken = options?.accessToken;\n\n const credentials =\n options?.credentials ??\n getEnvironmentVariable(\"GOOGLE_WEB_CREDENTIALS\") ??\n getEnvironmentVariable(\"GOOGLE_VERTEX_AI_WEB_CREDENTIALS\");\n if (credentials === undefined)\n throw new Error(\n `Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into \"authOptions.credentials\".`\n );\n\n this.options = ensureAuthOptionScopes<WebGoogleAuthOptions>(\n { ...options, accessToken, credentials },\n \"scope\",\n fields?.platformType\n );\n }\n\n get clientType(): string {\n return \"webauth\";\n }\n\n async getProjectId(): Promise<string> {\n const credentials = getCredentials(this.options.credentials);\n return credentials.project_id;\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n let { accessToken } = this.options;\n\n if (accessToken === undefined) {\n accessToken = await getAccessToken(this.options);\n }\n\n const authHeader = {\n Authorization: `Bearer ${accessToken}`,\n };\n return this._request(opts?.url, opts, authHeader);\n }\n}\n"],"mappings":";;;;AAsBA,IAAa,gBAAb,cAAmCA,yBAAAA,4BAA4B;CAC7D;CAEA,YAAY,QAA8D;EACxE,MAAM;EAEN,MAAM,UAAU,QAAQ;EACxB,MAAM,cAAc,SAAS;EAE7B,MAAM,cACJ,SAAS,gBAAA,GAAA,0BAAA,uBAAA,CACc,wBAAwB,MAAA,GAAA,0BAAA,uBAAA,CACxB,kCAAkC;EAC3D,IAAI,gBAAgB,KAAA,GAClB,MAAM,IAAI,MACR,uIACF;EAEF,KAAK,WAAA,GAAA,yBAAA,uBAAA,CACH;GAAE,GAAG;GAAS;GAAa;EAAY,GACvC,SACA,QAAQ,YACV;CACF;CAEA,IAAI,aAAqB;EACvB,OAAO;CACT;CAEA,MAAM,eAAgC;EAEpC,QAAA,GAAA,wBAAA,eAAA,CADmC,KAAK,QAAQ,WAC/B,CAAC,CAAC;CACrB;CAEA,MAAM,QAAQ,MAAmD;EAC/D,IAAI,EAAE,gBAAgB,KAAK;EAE3B,IAAI,gBAAgB,KAAA,GAClB,cAAc,OAAA,GAAA,wBAAA,eAAA,CAAqB,KAAK,OAAO;EAGjD,MAAM,aAAa,EACjB,eAAe,UAAU,cAC3B;EACA,OAAO,KAAK,SAAS,MAAM,KAAK,MAAM,UAAU;CAClD;AACF"}
1
+ {"version":3,"file":"auth.cjs","names":["GoogleAbstractedFetchClient","getEnvironmentVariable","ensureAuthOptionScopes","getCredentials","getAccessToken"],"sources":["../src/auth.ts"],"sourcesContent":["import { getEnvironmentVariable } from \"@langchain/core/utils/env\";\nimport {\n ensureAuthOptionScopes,\n GoogleAbstractedClientOps,\n GoogleAbstractedFetchClient,\n GoogleBaseLLMInput,\n} from \"@langchain/google-common\";\nimport {\n getAccessToken,\n getCredentials,\n Credentials,\n // oxlint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore CJS type resolution workaround\n} from \"web-auth-library/google\";\n\nexport type WebGoogleAuthOptions = {\n credentials: string | Credentials;\n scope?: string | string[];\n accessToken?: string;\n responseModality?: string;\n};\n\nexport class WebGoogleAuth extends GoogleAbstractedFetchClient {\n options: WebGoogleAuthOptions;\n\n constructor(fields: GoogleBaseLLMInput<WebGoogleAuthOptions> | undefined) {\n super();\n\n const options = fields?.authOptions;\n const accessToken = options?.accessToken;\n\n const credentials =\n options?.credentials ??\n getEnvironmentVariable(\"GOOGLE_WEB_CREDENTIALS\") ??\n getEnvironmentVariable(\"GOOGLE_VERTEX_AI_WEB_CREDENTIALS\");\n if (credentials === undefined)\n throw new Error(\n `Credentials not found. Please set the GOOGLE_WEB_CREDENTIALS environment variable or pass credentials into \"authOptions.credentials\".`\n );\n\n this.options = ensureAuthOptionScopes<WebGoogleAuthOptions>(\n { ...options, accessToken, credentials },\n \"scope\",\n fields?.platformType\n );\n }\n\n get clientType(): string {\n return \"webauth\";\n }\n\n async getProjectId(): Promise<string> {\n const credentials = getCredentials(this.options.credentials);\n return credentials.project_id;\n }\n\n async request(opts: GoogleAbstractedClientOps): Promise<unknown> {\n let { accessToken } = this.options;\n\n if (accessToken === undefined) {\n accessToken = await getAccessToken(this.options);\n }\n\n const authHeader = {\n Authorization: `Bearer ${accessToken}`,\n };\n return this._request(opts?.url, opts, authHeader);\n }\n}\n"],"mappings":";;;;AAsBA,IAAa,gBAAb,cAAmCA,yBAAAA,4BAA4B;CAC7D;CAEA,YAAY,QAA8D;EACxE,MAAM;EAEN,MAAM,UAAU,QAAQ;EACxB,MAAM,cAAc,SAAS;EAE7B,MAAM,cACJ,SAAS,gBAAA,GACTC,0BAAAA,uBAAAA,CAAuB,wBAAwB,MAAA,GAC/CA,0BAAAA,uBAAAA,CAAuB,kCAAkC;EAC3D,IAAI,gBAAgB,KAAA,GAClB,MAAM,IAAI,MACR,uIACF;EAEF,KAAK,WAAA,GAAUC,yBAAAA,uBAAAA,CACb;GAAE,GAAG;GAAS;GAAa;EAAY,GACvC,SACA,QAAQ,YACV;CACF;CAEA,IAAI,aAAqB;EACvB,OAAO;CACT;CAEA,MAAM,eAAgC;EAEpC,QAAA,GADoBC,wBAAAA,eAAAA,CAAe,KAAK,QAAQ,WAC/B,CAAC,CAAC;CACrB;CAEA,MAAM,QAAQ,MAAmD;EAC/D,IAAI,EAAE,gBAAgB,KAAK;EAE3B,IAAI,gBAAgB,KAAA,GAClB,cAAc,OAAA,GAAMC,wBAAAA,eAAAA,CAAe,KAAK,OAAO;EAGjD,MAAM,aAAa,EACjB,eAAe,UAAU,cAC3B;EACA,OAAO,KAAK,SAAS,MAAM,KAAK,MAAM,UAAU;CAClD;AACF"}
@@ -14,7 +14,7 @@ var ChatGoogle = class extends _langchain_google_common.ChatGoogleBase {
14
14
  model: modelOrFields
15
15
  } : modelOrFields ?? {};
16
16
  super(fields);
17
- this._addVersion("@langchain/google-webauth", "2.3.0");
17
+ this._addVersion("@langchain/google-webauth", "2.3.1");
18
18
  }
19
19
  buildAbstractedClient(fields) {
20
20
  return new require_auth.WebGoogleAuth(fields);
@@ -14,7 +14,7 @@ var ChatGoogle = class extends ChatGoogleBase {
14
14
  model: modelOrFields
15
15
  } : modelOrFields ?? {};
16
16
  super(fields);
17
- this._addVersion("@langchain/google-webauth", "2.3.0");
17
+ this._addVersion("@langchain/google-webauth", "2.3.1");
18
18
  }
19
19
  buildAbstractedClient(fields) {
20
20
  return new WebGoogleAuth(fields);
package/dist/llms.cjs CHANGED
@@ -11,7 +11,7 @@ var GoogleLLM = class extends _langchain_google_common.GoogleBaseLLM {
11
11
  lc_serializable = true;
12
12
  constructor(fields) {
13
13
  super(fields);
14
- this._addVersion("@langchain/google-webauth", "2.3.0");
14
+ this._addVersion("@langchain/google-webauth", "2.3.1");
15
15
  }
16
16
  buildAbstractedClient(fields) {
17
17
  return new require_auth.WebGoogleAuth(fields);
package/dist/llms.js CHANGED
@@ -11,7 +11,7 @@ var GoogleLLM = class extends GoogleBaseLLM {
11
11
  lc_serializable = true;
12
12
  constructor(fields) {
13
13
  super(fields);
14
- this._addVersion("@langchain/google-webauth", "2.3.0");
14
+ this._addVersion("@langchain/google-webauth", "2.3.1");
15
15
  }
16
16
  buildAbstractedClient(fields) {
17
17
  return new WebGoogleAuth(fields);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langchain/google-webauth",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Web-based authentication support for Google services",
5
5
  "author": "LangChain",
6
6
  "license": "MIT",
@@ -15,24 +15,24 @@
15
15
  "homepage": "https://github.com/langchain-ai/langchainjs/tree/main/libs/providers/langchain-google-webauth/",
16
16
  "dependencies": {
17
17
  "web-auth-library": "^1.0.3",
18
- "@langchain/google-common": "2.3.0"
18
+ "@langchain/google-common": "2.3.1"
19
19
  },
20
20
  "peerDependencies": {
21
- "@langchain/core": "^1.2.9"
21
+ "@langchain/core": "^1.2.10"
22
22
  },
23
23
  "devDependencies": {
24
- "@jest/globals": "^30.4.1",
25
- "@swc/core": "^1.15.46",
24
+ "@jest/globals": "^30.5.0",
25
+ "@swc/core": "^1.16.1",
26
26
  "@swc/jest": "^0.2.29",
27
27
  "@tsconfig/recommended": "^1.0.3",
28
- "dotenv": "^17.4.0",
29
- "dpdm": "^3.14.0",
30
- "jest": "^30.4.2",
31
- "jest-environment-node": "^30.4.1",
28
+ "dotenv": "^17.4.2",
29
+ "dpdm": "^4.3.0",
30
+ "jest": "^30.5.0",
31
+ "jest-environment-node": "^30.5.0",
32
32
  "ts-jest": "^29.4.12",
33
33
  "typescript": "~7.0.2",
34
34
  "zod": "^3.25.76",
35
- "@langchain/core": "^1.2.9",
35
+ "@langchain/core": "^1.2.10",
36
36
  "@langchain/tsconfig": "0.0.1"
37
37
  },
38
38
  "publishConfig": {