@anmiles/google-api-wrapper 19.0.5 → 19.0.7
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 +16 -0
- package/dist/lib/api.d.ts.map +1 -1
- package/dist/lib/api.js.map +1 -1
- package/package.json +23 -23
- package/src/lib/__tests__/__snapshots__/renderer.test.ts.snap +1 -1
- package/src/lib/__tests__/api.test.ts +2 -3
- package/src/lib/api.ts +9 -8
- package/src/lib/credentials/__tests__/generator.test.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [19.0.9](../../tags/v19.0.9) - 2026-02-01
|
|
9
|
+
### Changed
|
|
10
|
+
- Fix vulnerable dependencies
|
|
11
|
+
|
|
12
|
+
## [19.0.8](../../tags/v19.0.8) - 2026-02-01
|
|
13
|
+
### Changed
|
|
14
|
+
- Fix vulnerable dependencies
|
|
15
|
+
|
|
16
|
+
## [19.0.7](../../tags/v19.0.7) - 2026-02-01
|
|
17
|
+
### Changed
|
|
18
|
+
- Fix vulnerable dependencies
|
|
19
|
+
|
|
20
|
+
## [19.0.6](../../tags/v19.0.6) - 2025-11-29
|
|
21
|
+
### Changed
|
|
22
|
+
- Fix vulnerable dependencies
|
|
23
|
+
|
|
8
24
|
## [19.0.5](../../tags/v19.0.5) - 2025-07-24
|
|
9
25
|
### Changed
|
|
10
26
|
- Fix vulnerable dependencies
|
package/dist/lib/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,KAAK,UAAU,MAAM,YAA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js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/lib/api.ts"],"names":[],"mappings":";;;;;;AAgGA,wBAcC;AA9GD,4CAA4C;AAC5C,+BAA6B;AAC7B,2DAAmC;AAKnC,iCAAiC;AACjC,+CAAkD;AAElD,MAAM,eAAe,GAAG,GAAG,CAAC;AA0B5B,MAAa,GAAG;IAEP;IACC;IACS;IACA;IACA;IALlB,YACQ,GAAe,EACd,IAAoC,EAC3B,MAA4D,EAC5D,OAAe,EACf,WAAyB;QAJnC,QAAG,GAAH,GAAG,CAAY;QACd,SAAI,GAAJ,IAAI,CAAgC;QAC3B,WAAM,GAAN,MAAM,CAAsD;QAC5D,YAAO,GAAP,OAAO,CAAQ;QACf,gBAAW,GAAX,WAAW,CAAc;IACvC,CAAC;IAEL,MAAM,CAAC,KAAK,CAAC,IAAI,CAChB,MAA4D,EAC5D,OAAe,EACf,WAAyB;QAEzB,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,MAAM,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QACpE,OAAO,IAAI,GAAG,CAAa,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;IACrE,CAAC;IAED,KAAK,CAAC,QAAQ,CAAQ,SAAgD,EAAE,MAAc,EAAE,OAAuB;QAC9G,MAAM,KAAK,GAAY,EAAE,CAAC;QAE1B,IAAI,SAAS,GAA8B,SAAS,CAAC;QAErD,GAAG,CAAC;YACH,IAAI,QAAiE,CAAC;YAEtE,IAAI,CAAC;gBACJ,MAAM,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBAExC,QAAQ,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM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AEpB,OAAO,KAAK,CAAC;IACd,CAAC;CACD;AA1DD,kBA0DC;AAEM,KAAK,UAAU,MAAM,CAC3B,MAA4D,EAC5D,OAAe,EACf,WAAyB;IAEzB,IAAI,CAAC,WAAW,EAAE,SAAS,EAAE,CAAC;QAC7B,MAAM,cAAc,GAAG,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,IAAI,EAAE,CAAC;QAElG,IAAI,cAAc,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC/B,IAAA,aAAI,EAAC,8EAA8E,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,0GAA0G,CAAC,CAAC;QACzN,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC,IAAI,CAAa,MAAM,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;AAC3D,CAAC;AAED,KAAK,UAAU,SAAS,CACvB,MAA4D,EAC5D,OAAe,EACf,WAAyB;IAKzB,MAAM,IAAI,GAAG,MAAM,IAAA,cAAO,EAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACjD,MAAM,GAAG,GAAI,MAAM,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anmiles/google-api-wrapper",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.7",
|
|
4
4
|
"description": "Wrapper around googleapis for getting data shortly",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"google",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"test:report:coverage": "nyc report"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@anmiles/logger": "^8.0.
|
|
34
|
-
"@anmiles/prototypes": "^11.2.
|
|
35
|
-
"@anmiles/sleep": "^5.0.
|
|
33
|
+
"@anmiles/logger": "^8.0.3",
|
|
34
|
+
"@anmiles/prototypes": "^11.2.5",
|
|
35
|
+
"@anmiles/sleep": "^5.0.3",
|
|
36
36
|
"out-url": "^1.2.2",
|
|
37
37
|
"server-destroy": "^1.0.1"
|
|
38
38
|
},
|
|
@@ -40,35 +40,35 @@
|
|
|
40
40
|
"googleapis": "^148.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@anmiles/eslint-config": "^
|
|
44
|
-
"@anmiles/tsconfig": "^4.0.
|
|
45
|
-
"@eslint/compat": "^
|
|
46
|
-
"@eslint/css": "^0.
|
|
47
|
-
"@eslint/js": "^9.
|
|
48
|
-
"@eslint/json": "^0.
|
|
49
|
-
"@eslint/markdown": "^7.1
|
|
50
|
-
"@stylistic/eslint-plugin": "^5.
|
|
43
|
+
"@anmiles/eslint-config": "^10.0.3",
|
|
44
|
+
"@anmiles/tsconfig": "^4.0.1",
|
|
45
|
+
"@eslint/compat": "^2.0.2",
|
|
46
|
+
"@eslint/css": "^0.14.1",
|
|
47
|
+
"@eslint/js": "^9.39.2",
|
|
48
|
+
"@eslint/json": "^1.0.0",
|
|
49
|
+
"@eslint/markdown": "^7.5.1",
|
|
50
|
+
"@stylistic/eslint-plugin": "^5.7.1",
|
|
51
51
|
"@types/jest": "^30.0.0",
|
|
52
52
|
"@types/mock-fs": "^4.13.4",
|
|
53
53
|
"@types/server-destroy": "^1.0.4",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
55
|
-
"@typescript-eslint/parser": "^8.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
55
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
56
56
|
"copyfiles": "^2.4.1",
|
|
57
|
-
"cspell": "^9.2
|
|
58
|
-
"eslint": "^9.
|
|
57
|
+
"cspell": "^9.6.2",
|
|
58
|
+
"eslint": "^9.39.2",
|
|
59
59
|
"eslint-import-resolver-typescript": "^4.4.4",
|
|
60
60
|
"eslint-plugin-align-assignments": "^1.1.2",
|
|
61
61
|
"eslint-plugin-i18next": "^6.1.3",
|
|
62
62
|
"eslint-plugin-import": "^2.32.0",
|
|
63
|
-
"eslint-plugin-jest": "^29.
|
|
64
|
-
"eslint-plugin-n": "^17.
|
|
63
|
+
"eslint-plugin-jest": "^29.12.1",
|
|
64
|
+
"eslint-plugin-n": "^17.23.2",
|
|
65
65
|
"eslint-plugin-promise": "^7.2.1",
|
|
66
|
-
"jest": "^30.0
|
|
67
|
-
"jiti": "^2.
|
|
66
|
+
"jest": "^30.2.0",
|
|
67
|
+
"jiti": "^2.6.1",
|
|
68
68
|
"mock-fs": "^5.5.0",
|
|
69
69
|
"nyc": "^17.1.0",
|
|
70
|
-
"rimraf": "^6.
|
|
71
|
-
"ts-jest": "^29.4.
|
|
72
|
-
"typescript": "^5.
|
|
70
|
+
"rimraf": "^6.1.2",
|
|
71
|
+
"ts-jest": "^29.4.6",
|
|
72
|
+
"typescript": "^5.9.3"
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import logger from '@anmiles/logger';
|
|
2
2
|
import sleep from '@anmiles/sleep';
|
|
3
3
|
import type GoogleApis from 'googleapis';
|
|
4
|
-
import type { calendar_v3 } from 'googleapis/build/src/apis/calendar';
|
|
5
4
|
import { calendar } from 'googleapis/build/src/apis/calendar';
|
|
6
5
|
|
|
7
6
|
import { getAPI } from '../api';
|
|
@@ -79,7 +78,7 @@ const scopes = [ 'scope1', 'scope2' ];
|
|
|
79
78
|
const getListException = jest.mocked(jest.fn());
|
|
80
79
|
|
|
81
80
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
|
|
82
|
-
jest.mocked(calendar).
|
|
81
|
+
jest.mocked(calendar).mockReturnValue(calendarApis as unknown as GoogleApis.calendar_v3.Calendar);
|
|
83
82
|
jest.mocked(getAuth).mockResolvedValue(googleAuth);
|
|
84
83
|
|
|
85
84
|
beforeEach(() => {
|
|
@@ -122,7 +121,7 @@ Permanent credentials will be stored in the file and potentially might be re-use
|
|
|
122
121
|
});
|
|
123
122
|
|
|
124
123
|
describe('API', () => {
|
|
125
|
-
let instance:
|
|
124
|
+
let instance: API<GoogleApis.calendar_v3.Calendar>;
|
|
126
125
|
|
|
127
126
|
beforeEach(async () => {
|
|
128
127
|
instance = await getAPI((auth) => calendar({ version: 'v3', auth }), profile);
|
package/src/lib/api.ts
CHANGED
|
@@ -21,7 +21,7 @@ interface CommonAPI<TItem> {
|
|
|
21
21
|
options?: GoogleApis.Common.MethodOptions
|
|
22
22
|
): Promise<GoogleApis.Common.GaxiosResponse<CommonResponse<TItem>>>;
|
|
23
23
|
(
|
|
24
|
-
callback: (err: Error | null, res?: GoogleApis.Common.GaxiosResponse<CommonResponse<TItem>> | null)=> void
|
|
24
|
+
callback: (err: Error | null, res?: GoogleApis.Common.GaxiosResponse<CommonResponse<TItem>> | null) => void
|
|
25
25
|
): void;
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -38,13 +38,13 @@ export class API<TGoogleAPI> {
|
|
|
38
38
|
private constructor(
|
|
39
39
|
public api: TGoogleAPI,
|
|
40
40
|
private auth: GoogleApis.Common.OAuth2Client,
|
|
41
|
-
private readonly getter: (auth: GoogleApis.Common.OAuth2Client)=> TGoogleAPI,
|
|
41
|
+
private readonly getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI,
|
|
42
42
|
private readonly profile: string,
|
|
43
43
|
private readonly authOptions?: AuthOptions,
|
|
44
44
|
) { }
|
|
45
45
|
|
|
46
46
|
static async init<TGoogleAPI>(
|
|
47
|
-
getter: (auth: GoogleApis.Common.OAuth2Client)=> TGoogleAPI,
|
|
47
|
+
getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI,
|
|
48
48
|
profile: string,
|
|
49
49
|
authOptions?: AuthOptions,
|
|
50
50
|
): Promise<API<TGoogleAPI>> {
|
|
@@ -52,7 +52,7 @@ export class API<TGoogleAPI> {
|
|
|
52
52
|
return new API<TGoogleAPI>(api, auth, getter, profile, authOptions);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
async getItems<TItem>(selectAPI: (api: TGoogleAPI)=> CommonAPI<TItem>, params: object, options?: CommonOptions): Promise<TItem[]> {
|
|
55
|
+
async getItems<TItem>(selectAPI: (api: TGoogleAPI) => CommonAPI<TItem>, params: object, options?: CommonOptions): Promise<TItem[]> {
|
|
56
56
|
const items: TItem[] = [];
|
|
57
57
|
|
|
58
58
|
let pageToken: string | null | undefined = undefined;
|
|
@@ -71,8 +71,9 @@ export class API<TGoogleAPI> {
|
|
|
71
71
|
warn('Access token stored is invalid, re-creating...');
|
|
72
72
|
deleteCredentials(this.profile);
|
|
73
73
|
const { api, auth } = await resetAuth(this.getter, this.profile, this.authOptions);
|
|
74
|
-
|
|
75
|
-
this.
|
|
74
|
+
|
|
75
|
+
this.api = api;
|
|
76
|
+
this.auth = auth;
|
|
76
77
|
return this.getItems(selectAPI, params, options);
|
|
77
78
|
} else {
|
|
78
79
|
throw ex;
|
|
@@ -94,7 +95,7 @@ export class API<TGoogleAPI> {
|
|
|
94
95
|
}
|
|
95
96
|
|
|
96
97
|
export async function getAPI<TGoogleAPI>(
|
|
97
|
-
getter: (auth: GoogleApis.Common.OAuth2Client)=> TGoogleAPI,
|
|
98
|
+
getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI,
|
|
98
99
|
profile: string,
|
|
99
100
|
authOptions?: AuthOptions,
|
|
100
101
|
): Promise<API<TGoogleAPI>> {
|
|
@@ -110,7 +111,7 @@ export async function getAPI<TGoogleAPI>(
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
async function resetAuth<TGoogleAPI>(
|
|
113
|
-
getter: (auth: GoogleApis.Common.OAuth2Client)=> TGoogleAPI,
|
|
114
|
+
getter: (auth: GoogleApis.Common.OAuth2Client) => TGoogleAPI,
|
|
114
115
|
profile: string,
|
|
115
116
|
authOptions?: AuthOptions,
|
|
116
117
|
): Promise<{
|
|
@@ -64,7 +64,7 @@ jest.mocked(renderAuth).mockImplementation((
|
|
|
64
64
|
{ profile, authUrl, scope }: { profile: string; authUrl: string; scope: string[] },
|
|
65
65
|
) => `content = profile = ${profile} authUrl = ${authUrl} scope = ${scope.join('|')}`);
|
|
66
66
|
|
|
67
|
-
jest.mocked(renderDone).
|
|
67
|
+
jest.mocked(renderDone).mockReturnValue('content = done');
|
|
68
68
|
|
|
69
69
|
jest.mocked(getScopes).mockReturnValue([ 'scope1', 'scope2' ]);
|
|
70
70
|
|