@sebspark/openapi-auth-iam 3.0.1 → 3.0.3

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/index.js CHANGED
@@ -34,3 +34,4 @@ export {
34
34
  apiGatewayTokenByUrlGenerator,
35
35
  apiGatewayTokenRefresh
36
36
  };
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {\n clearCache,\n getApiGatewayTokenByClientId,\n getApiGatewayTokenByUrl,\n} from '@sebspark/gcp-iam'\n\nexport const apiGatewayTokenByUrlGenerator = (apiKey: string) => {\n return async (url: string): Promise<Record<string, string>> => {\n const token = await getApiGatewayTokenByUrl({\n apiURL: url,\n })\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenByClientIdGenerator = (\n apiKey: string,\n clientId: string\n) => {\n return async (): Promise<Record<string, string>> => {\n const token = await getApiGatewayTokenByClientId(clientId)\n\n return {\n 'Proxy-Authorization': `Bearer ${token}`,\n 'x-api-key': apiKey,\n }\n }\n}\n\nexport const apiGatewayTokenRefresh = () => {\n return async (url: string) => {\n return await clearCache(url)\n }\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEA,IAAM,gCAAgC,CAAC,WAAmB;AAC/D,SAAO,OAAO,QAAiD;AAC7D,UAAM,QAAQ,MAAM,wBAAwB;AAAA,MAC1C,QAAQ;AAAA,IACV,CAAC;AAED,WAAO;AAAA,MACL,uBAAuB,UAAU,KAAK;AAAA,MACtC,aAAa;AAAA,IACf;AAAA,EACF;AACF;AAEO,IAAM,qCAAqC,CAChD,QACA,aACG;AACH,SAAO,YAA6C;AAClD,UAAM,QAAQ,MAAM,6BAA6B,QAAQ;AAEzD,WAAO;AAAA,MACL,uBAAuB,UAAU,KAAK;AAAA,MACtC,aAAa;AAAA,IACf;AAAA,EACF;AACF;AAEO,IAAM,yBAAyB,MAAM;AAC1C,SAAO,OAAO,QAAgB;AAC5B,WAAO,MAAM,WAAW,GAAG;AAAA,EAC7B;AACF;","names":[]}
package/package.json CHANGED
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "name": "@sebspark/openapi-auth-iam",
3
- "version": "3.0.1",
3
+ "version": "3.0.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js"
12
+ }
13
+ },
8
14
  "files": [
9
15
  "dist"
10
16
  ],
11
17
  "scripts": {
12
- "build": "tsup-node src/index.ts --format esm --target node22 --dts",
18
+ "build": "tsup src/index.ts --config tsup.config.ts",
13
19
  "dev": "tsc --watch --noEmit",
14
20
  "lint": "biome check .",
15
21
  "test": "vitest run --passWithNoTests --coverage",