@sebspark/openapi-auth-iam 3.0.4 → 3.0.5

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.
@@ -1,5 +1,7 @@
1
+ //#region src/index.d.ts
1
2
  declare const apiGatewayTokenByUrlGenerator: (apiKey: string) => (url: string) => Promise<Record<string, string>>;
2
3
  declare const apiGatewayTokenByClientIdGenerator: (apiKey: string, clientId: string) => () => Promise<Record<string, string>>;
3
4
  declare const apiGatewayTokenRefresh: () => (url: string) => Promise<void>;
4
-
5
+ //#endregion
5
6
  export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
7
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";cAMa,oEACiB,QAAQ;AADzB,cAaA,kCAZiB,EAAA,CAAA,MAAO,EAAA,MAAA,EAAA,QAAA,EAAA,MAAA,EAAA,GAAA,GAAA,GAgBlB,OAhBkB,CAgBV,MAhBU,CAAA,MAAA,EAAA,MAAA,CAAA,CAAA;AAYxB,cAcA,sBAFZ,EAAA,GAAA,GAAA,CAR0B,GAAA,EAAA,MAAR,EAAA,GAWQ,OAXD,CAAA,IAAA,CAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,30 @@
1
+ import { clearCache, getApiGatewayTokenByClientId, getApiGatewayTokenByUrl } from "@sebspark/gcp-iam";
2
+
3
+ //#region src/index.ts
4
+ const apiGatewayTokenByUrlGenerator = (apiKey) => {
5
+ return async (url) => {
6
+ const token = await getApiGatewayTokenByUrl({ apiURL: url });
7
+ return {
8
+ "Proxy-Authorization": `Bearer ${token}`,
9
+ "x-api-key": apiKey
10
+ };
11
+ };
12
+ };
13
+ const apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
14
+ return async () => {
15
+ const token = await getApiGatewayTokenByClientId(clientId);
16
+ return {
17
+ "Proxy-Authorization": `Bearer ${token}`,
18
+ "x-api-key": apiKey
19
+ };
20
+ };
21
+ };
22
+ const apiGatewayTokenRefresh = () => {
23
+ return async (url) => {
24
+ return await clearCache(url);
25
+ };
26
+ };
27
+
28
+ //#endregion
29
+ export { apiGatewayTokenByClientIdGenerator, apiGatewayTokenByUrlGenerator, apiGatewayTokenRefresh };
30
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"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":";;;AAMA,MAAa,iCAAiC,WAAmB;AAC/D,QAAO,OAAO,QAAiD;EAC7D,MAAM,QAAQ,MAAM,wBAAwB,EAC1C,QAAQ,KACT,CAAC;AAEF,SAAO;GACL,uBAAuB,UAAU;GACjC,aAAa;GACd;;;AAIL,MAAa,sCACX,QACA,aACG;AACH,QAAO,YAA6C;EAClD,MAAM,QAAQ,MAAM,6BAA6B,SAAS;AAE1D,SAAO;GACL,uBAAuB,UAAU;GACjC,aAAa;GACd;;;AAIL,MAAa,+BAA+B;AAC1C,QAAO,OAAO,QAAgB;AAC5B,SAAO,MAAM,WAAW,IAAI"}
package/package.json CHANGED
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "@sebspark/openapi-auth-iam",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
6
+ "main": "dist/index.mjs",
7
+ "types": "dist/index.d.mts",
8
8
  "exports": {
9
9
  ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/index.js"
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs"
12
12
  }
13
13
  },
14
14
  "files": [
15
15
  "dist"
16
16
  ],
17
17
  "scripts": {
18
- "build": "tsup src/index.ts --config tsup.config.ts",
18
+ "build": "tsdown src/index.ts",
19
19
  "depcheck": "depcheck",
20
20
  "dev": "tsc --watch --noEmit",
21
21
  "lint": "biome check .",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@sebspark/tsconfig": "*",
27
- "tsup": "8.5.0"
27
+ "tsdown": "0.16.0"
28
28
  },
29
29
  "dependencies": {
30
30
  "@sebspark/gcp-iam": "*"
package/dist/index.js DELETED
@@ -1,37 +0,0 @@
1
- // src/index.ts
2
- import {
3
- clearCache,
4
- getApiGatewayTokenByClientId,
5
- getApiGatewayTokenByUrl
6
- } from "@sebspark/gcp-iam";
7
- var apiGatewayTokenByUrlGenerator = (apiKey) => {
8
- return async (url) => {
9
- const token = await getApiGatewayTokenByUrl({
10
- apiURL: url
11
- });
12
- return {
13
- "Proxy-Authorization": `Bearer ${token}`,
14
- "x-api-key": apiKey
15
- };
16
- };
17
- };
18
- var apiGatewayTokenByClientIdGenerator = (apiKey, clientId) => {
19
- return async () => {
20
- const token = await getApiGatewayTokenByClientId(clientId);
21
- return {
22
- "Proxy-Authorization": `Bearer ${token}`,
23
- "x-api-key": apiKey
24
- };
25
- };
26
- };
27
- var apiGatewayTokenRefresh = () => {
28
- return async (url) => {
29
- return await clearCache(url);
30
- };
31
- };
32
- export {
33
- apiGatewayTokenByClientIdGenerator,
34
- apiGatewayTokenByUrlGenerator,
35
- apiGatewayTokenRefresh
36
- };
37
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
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":[]}