@openclaw/googlechat 2026.8.1 → 2026.8.33
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/{actions-Bsv9COyy.js → .setup/actions-CnsW76xm.mjs} +10 -9
- package/dist/{approval-auth-DnqxUj0j.js → .setup/approval-auth-CjHhfBEJ.mjs} +2 -2
- package/dist/{approval-handler.runtime-5Yr5TCX6.js → .setup/approval-handler.runtime-B_SV-U0a.mjs} +3 -3
- package/dist/{channel-DAC3b287.js → .setup/channel-7n76_HdW.mjs} +42 -37
- package/dist/{channel-base-BpHXDsur.js → .setup/channel-base-B3EzcV7X.mjs} +35 -23
- package/dist/{channel.adapters-C2dHazJR.js → .setup/channel.adapters-BmXpUQo9.mjs} +16 -14
- package/dist/{channel.runtime-DqiduEYL.js → .setup/channel.runtime-IC-dNFiT.mjs} +11 -10
- package/dist/{runtime-api-Dh0CNVS4.js → .setup/runtime-api-Cc5ZuXih.mjs} +1 -1
- package/dist/.setup/secret-contract-api-DHLd5XO3.mjs +3 -0
- package/dist/.setup/setup-plugin-api-C0zTOlHy.mjs +5 -0
- package/dist/.setup/setup-plugin-api-DWL3ZytB.mjs +2 -0
- package/dist/api.js +2 -2
- package/dist/channel-config-api.js +1 -1
- package/dist/channel-plugin-api.js +1 -1
- package/dist/directory-contract-api.js +1 -1
- package/dist/doctor-contract-api.js +1 -1
- package/dist/runtime-api.js +2 -2
- package/dist/secret-contract-api.js +1 -1
- package/dist/setup-entry.js +3 -2
- package/dist/setup-plugin-api.js +1 -4
- package/node_modules/google-auth-library/node_modules/gcp-metadata/build/src/index.js +59 -40
- package/node_modules/google-auth-library/node_modules/gcp-metadata/build/src/index.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/package.json +20 -23
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.d.ts +1 -29
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.js +13 -13
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/index.d.ts +1 -0
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/index.js +1 -1
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/index.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/logging-utils.d.ts +2 -135
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/logging-utils.js +35 -58
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/logging-utils.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/temporal.js +8 -8
- package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/temporal.js.map +1 -1
- package/node_modules/google-auth-library/node_modules/google-logging-utils/package.json +16 -14
- package/node_modules/google-auth-library/package.json +7 -7
- package/package.json +5 -5
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/LICENSE +0 -202
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/README.md +0 -73
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.d.ts +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js +0 -81
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/colours.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.d.ts +0 -2
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js +0 -31
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/index.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.d.ts +0 -89
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js +0 -414
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/logging-utils.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.d.ts +0 -45
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js +0 -68
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/build/src/temporal.js.map +0 -1
- package/node_modules/google-auth-library/node_modules/gcp-metadata/node_modules/google-logging-utils/package.json +0 -47
- /package/dist/{config-api-CsD0IFxF.js → .setup/config-api-CsD0IFxF.mjs} +0 -0
- /package/dist/{doctor-contract-BLvSmTXT.js → .setup/doctor-contract-BLvSmTXT.mjs} +0 -0
- /package/dist/{secret-contract-DmWM0kwM.js → .setup/secret-contract-DmWM0kwM.mjs} +0 -0
- /package/node_modules/google-auth-library/node_modules/{gcp-metadata/node_modules/google-logging-utils → google-logging-utils}/build/src/types.d.ts +0 -0
- /package/node_modules/google-auth-library/node_modules/{gcp-metadata/node_modules/google-logging-utils → google-logging-utils}/build/src/types.js +0 -0
- /package/node_modules/google-auth-library/node_modules/{gcp-metadata/node_modules/google-logging-utils → google-logging-utils}/build/src/types.js.map +0 -0
|
@@ -309,49 +309,68 @@ async function isAvailable() {
|
|
|
309
309
|
// runtime environment. We use the same promise for each of these calls
|
|
310
310
|
// to reduce the network load.
|
|
311
311
|
if (cachedIsAvailableResponse === undefined) {
|
|
312
|
-
cachedIsAvailableResponse =
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
312
|
+
cachedIsAvailableResponse = (async () => {
|
|
313
|
+
try {
|
|
314
|
+
await metadataAccessor('instance', undefined, detectGCPAvailableRetries(),
|
|
315
|
+
// If the default HOST_ADDRESS has been overridden, we should not
|
|
316
|
+
// make an effort to try SECONDARY_HOST_ADDRESS (as we are likely in
|
|
317
|
+
// a non-GCP environment):
|
|
318
|
+
!(process.env.GCE_METADATA_IP || process.env.GCE_METADATA_HOST));
|
|
319
|
+
return true;
|
|
320
|
+
}
|
|
321
|
+
catch (e) {
|
|
322
|
+
const err = e;
|
|
323
|
+
if (process.env.DEBUG_AUTH) {
|
|
324
|
+
console.info(err);
|
|
325
|
+
}
|
|
326
|
+
if (err.type === 'request-timeout') {
|
|
327
|
+
// If running in a GCP environment, metadata endpoint should return
|
|
328
|
+
// within ms.
|
|
329
|
+
return false;
|
|
330
|
+
}
|
|
331
|
+
if (err.response && err.response.status === 404) {
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
else {
|
|
335
|
+
const errObj = e;
|
|
336
|
+
const getErrorCodes = (err) => {
|
|
337
|
+
if (!err)
|
|
338
|
+
return ['UNKNOWN'];
|
|
339
|
+
if (err.name === 'AggregateError' && Array.isArray(err.errors)) {
|
|
340
|
+
return err.errors.flatMap(getErrorCodes);
|
|
341
|
+
}
|
|
342
|
+
if (err.code) {
|
|
343
|
+
return [err.code.toString()];
|
|
344
|
+
}
|
|
345
|
+
if (err.cause) {
|
|
346
|
+
return getErrorCodes(err.cause);
|
|
347
|
+
}
|
|
348
|
+
return ['UNKNOWN'];
|
|
349
|
+
};
|
|
350
|
+
const codes = getErrorCodes(errObj);
|
|
351
|
+
const isExpected = codes.every((code) => [
|
|
352
|
+
'EHOSTDOWN',
|
|
353
|
+
'EHOSTUNREACH',
|
|
354
|
+
'ENETUNREACH',
|
|
355
|
+
'ENOENT',
|
|
356
|
+
'ENOTFOUND',
|
|
357
|
+
'ECONNREFUSED',
|
|
358
|
+
].includes(code));
|
|
359
|
+
if (!isExpected) {
|
|
360
|
+
const code = err.code ? err.code.toString() : 'UNKNOWN';
|
|
361
|
+
process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning');
|
|
362
|
+
}
|
|
363
|
+
// Failure to resolve the metadata service means that it is not available.
|
|
364
|
+
return false;
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
})();
|
|
317
368
|
}
|
|
318
|
-
await cachedIsAvailableResponse;
|
|
319
|
-
return true;
|
|
369
|
+
return await cachedIsAvailableResponse;
|
|
320
370
|
}
|
|
321
371
|
catch (e) {
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
console.info(err);
|
|
325
|
-
}
|
|
326
|
-
if (err.type === 'request-timeout') {
|
|
327
|
-
// If running in a GCP environment, metadata endpoint should return
|
|
328
|
-
// within ms.
|
|
329
|
-
return false;
|
|
330
|
-
}
|
|
331
|
-
if (err.response && err.response.status === 404) {
|
|
332
|
-
return false;
|
|
333
|
-
}
|
|
334
|
-
else {
|
|
335
|
-
if (!(err.response && err.response.status === 404) &&
|
|
336
|
-
// A warning is emitted if we see an unexpected err.code, or err.code
|
|
337
|
-
// is not populated:
|
|
338
|
-
(!err.code ||
|
|
339
|
-
![
|
|
340
|
-
'EHOSTDOWN',
|
|
341
|
-
'EHOSTUNREACH',
|
|
342
|
-
'ENETUNREACH',
|
|
343
|
-
'ENOENT',
|
|
344
|
-
'ENOTFOUND',
|
|
345
|
-
'ECONNREFUSED',
|
|
346
|
-
].includes(err.code.toString()))) {
|
|
347
|
-
let code = 'UNKNOWN';
|
|
348
|
-
if (err.code)
|
|
349
|
-
code = err.code.toString();
|
|
350
|
-
process.emitWarning(`received unexpected error = ${err.message} code = ${code}`, 'MetadataLookupWarning');
|
|
351
|
-
}
|
|
352
|
-
// Failure to resolve the metadata service means that it is not available.
|
|
353
|
-
return false;
|
|
354
|
-
}
|
|
372
|
+
// This block should technically not be reached because the async IIFE catches its own errors
|
|
373
|
+
return false;
|
|
355
374
|
}
|
|
356
375
|
}
|
|
357
376
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6OA,4BAEC;AAcD,0BAEC;AAYD,4BAEC;AAyBD,oBAkBC;AAgBD,
|
|
1
|
+
{"version":3,"file":"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,MAAM,yBAAyB,CAAC;IACzC,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,6FAA6F;QAC7F,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,SAAgB,qBAAqB;IACnC,yBAAyB,GAAG,SAAS,CAAC;AACxC,CAAC;AAED;;GAEG;AACQ,QAAA,iBAAiB,GAAmB,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,SAAgB,eAAe;IAC7B,IAAI,yBAAiB,KAAK,IAAI,EAAE,CAAC;QAC/B,eAAe,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,yBAAkB,CAAC;AAC5B,CAAC;AAED;;;;;;GAMG;AACH,SAAgB,eAAe,CAAC,QAAwB,IAAI;IAC1D,yBAAiB,GAAG,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAA,kCAAkB,GAAE,CAAC;AACpE,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,cAAc;IAC5B,OAAO,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACtC,CAAC;AAED,kDAAgC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gcp-metadata",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.3",
|
|
4
4
|
"description": "Get the metadata from a Google Cloud Platform environment",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
|
-
"directory": "packages/gcp-metadata",
|
|
8
|
-
"url": "https://github.com/googleapis/google-cloud-node
|
|
7
|
+
"directory": "core/packages/gcp-metadata",
|
|
8
|
+
"url": "https://github.com/googleapis/google-cloud-node.git"
|
|
9
9
|
},
|
|
10
10
|
"main": "./build/src/index.js",
|
|
11
11
|
"types": "./build/src/index.d.ts",
|
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
"test": "c8 mocha --timeout=5000 build/test",
|
|
25
25
|
"docs": "jsdoc -c .jsdoc.js",
|
|
26
26
|
"lint": "gts check",
|
|
27
|
-
"docs-test": "linkinator docs",
|
|
28
|
-
"predocs-test": "npm run docs",
|
|
29
27
|
"prelint": "cd samples; npm link ../; npm install",
|
|
30
28
|
"clean": "gts clean",
|
|
31
29
|
"precompile": "gts clean"
|
|
@@ -42,36 +40,35 @@
|
|
|
42
40
|
"author": "Google LLC",
|
|
43
41
|
"license": "Apache-2.0",
|
|
44
42
|
"dependencies": {
|
|
45
|
-
"gaxios": "^7.
|
|
46
|
-
"google-logging-utils": "^
|
|
43
|
+
"gaxios": "^7.1.3",
|
|
44
|
+
"google-logging-utils": "^2.0.0",
|
|
47
45
|
"json-bigint": "^1.0.0"
|
|
48
46
|
},
|
|
49
47
|
"devDependencies": {
|
|
50
|
-
"@google-cloud/functions": "^
|
|
48
|
+
"@google-cloud/functions": "^5.0.0",
|
|
51
49
|
"@types/json-bigint": "^1.0.4",
|
|
52
|
-
"@types/mocha": "^10.0.
|
|
50
|
+
"@types/mocha": "^10.0.10",
|
|
53
51
|
"@types/ncp": "^2.0.8",
|
|
54
|
-
"@types/node": "^
|
|
55
|
-
"@types/sinon": "^
|
|
52
|
+
"@types/node": "^24.0.0",
|
|
53
|
+
"@types/sinon": "^21.0.0",
|
|
56
54
|
"@types/tmp": "^0.2.6",
|
|
57
|
-
"c8": "^10.1.
|
|
55
|
+
"c8": "^10.1.3",
|
|
56
|
+
"chai": "^4.3.10",
|
|
58
57
|
"cross-env": "^7.0.3",
|
|
59
58
|
"gcbuild": "^1.3.39",
|
|
60
|
-
"gcx": "^2.0.27",
|
|
61
59
|
"gts": "^6.0.2",
|
|
62
60
|
"jsdoc": "^4.0.4",
|
|
63
|
-
"jsdoc-fresh": "^
|
|
64
|
-
"jsdoc-region-tag": "^
|
|
65
|
-
"linkinator": "^6.1.2",
|
|
61
|
+
"jsdoc-fresh": "^6.0.0",
|
|
62
|
+
"jsdoc-region-tag": "^5.0.0",
|
|
66
63
|
"mocha": "^11.1.0",
|
|
67
64
|
"ncp": "^2.0.0",
|
|
68
|
-
"nock": "^14.0.
|
|
69
|
-
"sinon": "
|
|
70
|
-
"tmp": "
|
|
71
|
-
"typescript": "
|
|
65
|
+
"nock": "^14.0.5",
|
|
66
|
+
"sinon": "21.0.3",
|
|
67
|
+
"tmp": "0.2.5",
|
|
68
|
+
"typescript": "5.8.3"
|
|
72
69
|
},
|
|
73
70
|
"engines": {
|
|
74
|
-
"node": ">=
|
|
71
|
+
"node": ">=22"
|
|
75
72
|
},
|
|
76
|
-
"homepage": "https://github.com/googleapis/google-cloud-node
|
|
77
|
-
}
|
|
73
|
+
"homepage": "https://github.com/googleapis/google-cloud-node/tree/main/core/packages/gcp-metadata"
|
|
74
|
+
}
|
package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.d.ts
CHANGED
|
@@ -1,29 +1 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
* Handles figuring out if we can use ANSI colours and handing out the escape codes.
|
|
4
|
-
*
|
|
5
|
-
* This is for package-internal use only, and may change at any time.
|
|
6
|
-
*
|
|
7
|
-
* @private
|
|
8
|
-
* @internal
|
|
9
|
-
*/
|
|
10
|
-
export declare class Colours {
|
|
11
|
-
static enabled: boolean;
|
|
12
|
-
static reset: string;
|
|
13
|
-
static bright: string;
|
|
14
|
-
static dim: string;
|
|
15
|
-
static red: string;
|
|
16
|
-
static green: string;
|
|
17
|
-
static yellow: string;
|
|
18
|
-
static blue: string;
|
|
19
|
-
static magenta: string;
|
|
20
|
-
static cyan: string;
|
|
21
|
-
static white: string;
|
|
22
|
-
static grey: string;
|
|
23
|
-
/**
|
|
24
|
-
* @param stream The stream (e.g. process.stderr)
|
|
25
|
-
* @returns true if the stream should have colourization enabled
|
|
26
|
-
*/
|
|
27
|
-
static isEnabled(stream: tty.WriteStream): boolean;
|
|
28
|
-
static refresh(): void;
|
|
29
|
-
}
|
|
1
|
+
export {};
|
package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.js
CHANGED
|
@@ -23,6 +23,18 @@ exports.Colours = void 0;
|
|
|
23
23
|
* @internal
|
|
24
24
|
*/
|
|
25
25
|
class Colours {
|
|
26
|
+
static enabled = false;
|
|
27
|
+
static reset = '';
|
|
28
|
+
static bright = '';
|
|
29
|
+
static dim = '';
|
|
30
|
+
static red = '';
|
|
31
|
+
static green = '';
|
|
32
|
+
static yellow = '';
|
|
33
|
+
static blue = '';
|
|
34
|
+
static magenta = '';
|
|
35
|
+
static cyan = '';
|
|
36
|
+
static white = '';
|
|
37
|
+
static grey = '';
|
|
26
38
|
/**
|
|
27
39
|
* @param stream The stream (e.g. process.stderr)
|
|
28
40
|
* @returns true if the stream should have colourization enabled
|
|
@@ -35,7 +47,7 @@ class Colours {
|
|
|
35
47
|
: true));
|
|
36
48
|
}
|
|
37
49
|
static refresh() {
|
|
38
|
-
Colours.enabled = Colours.isEnabled(process
|
|
50
|
+
Colours.enabled = Colours.isEnabled(process?.stderr);
|
|
39
51
|
if (!this.enabled) {
|
|
40
52
|
Colours.reset = '';
|
|
41
53
|
Colours.bright = '';
|
|
@@ -65,17 +77,5 @@ class Colours {
|
|
|
65
77
|
}
|
|
66
78
|
}
|
|
67
79
|
exports.Colours = Colours;
|
|
68
|
-
Colours.enabled = false;
|
|
69
|
-
Colours.reset = '';
|
|
70
|
-
Colours.bright = '';
|
|
71
|
-
Colours.dim = '';
|
|
72
|
-
Colours.red = '';
|
|
73
|
-
Colours.green = '';
|
|
74
|
-
Colours.yellow = '';
|
|
75
|
-
Colours.blue = '';
|
|
76
|
-
Colours.magenta = '';
|
|
77
|
-
Colours.cyan = '';
|
|
78
|
-
Colours.white = '';
|
|
79
|
-
Colours.grey = '';
|
|
80
80
|
Colours.refresh();
|
|
81
81
|
//# sourceMappingURL=colours.js.map
|
package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/colours.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"colours.js","sourceRoot":"","sources":["../../src/colours.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAUjC;;;;;;;GAOG;AACH,MAAa,OAAO;
|
|
1
|
+
{"version":3,"file":"colours.js","sourceRoot":"","sources":["../../src/colours.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;AAUjC;;;;;;;GAOG;AACH,MAAa,OAAO;IAClB,MAAM,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;IAEhB,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC;IAChB,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,MAAM,CAAC,MAAM,GAAG,EAAE,CAAC;IACnB,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;IACpB,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;IACjB,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC;IAClB,MAAM,CAAC,IAAI,GAAG,EAAE,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,SAAS,CAAC,MAAuB;QACtC,OAAO,CACL,MAAM,IAAI,0BAA0B;YACpC,MAAM,CAAC,KAAK;YACZ,CAAC,OAAO,MAAM,CAAC,aAAa,KAAK,UAAU;gBACzC,CAAC,CAAC,M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AAxDH,0BAyDC;AAED,OAAO,CAAC,OAAO,EAAE,CAAC"}
|
package/node_modules/google-auth-library/node_modules/google-logging-utils/build/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";AAAA,iCAAiC;AACjC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,kDAAkD;AAClD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;;;;;;;;;;;;;;;AAEjC,kDAAgC"}
|
|
@@ -1,60 +1,5 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
|
|
3
|
-
* This module defines an ad-hoc debug logger for Google Cloud Platform
|
|
4
|
-
* client libraries in Node. An ad-hoc debug logger is a tool which lets
|
|
5
|
-
* users use an external, unified interface (in this case, environment
|
|
6
|
-
* variables) to determine what logging they want to see at runtime. This
|
|
7
|
-
* isn't necessarily fed into the console, but is meant to be under the
|
|
8
|
-
* control of the user. The kind of logging that will be produced by this
|
|
9
|
-
* is more like "call retry happened", not "events you'd want to record
|
|
10
|
-
* in Cloud Logger".
|
|
11
|
-
*
|
|
12
|
-
* More for Googlers implementing libraries with it:
|
|
13
|
-
* go/cloud-client-logging-design
|
|
14
|
-
*/
|
|
15
|
-
/**
|
|
16
|
-
* Possible log levels. These are a subset of Cloud Observability levels.
|
|
17
|
-
* https://cloud.google.com/logging/docs/reference/v2/rest/v2/LogEntry#LogSeverity
|
|
18
|
-
*/
|
|
19
|
-
export declare enum LogSeverity {
|
|
20
|
-
DEFAULT = "DEFAULT",
|
|
21
|
-
DEBUG = "DEBUG",
|
|
22
|
-
INFO = "INFO",
|
|
23
|
-
WARNING = "WARNING",
|
|
24
|
-
ERROR = "ERROR"
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* A set of suggested log metadata fields.
|
|
28
|
-
*/
|
|
29
|
-
export interface LogFields {
|
|
30
|
-
/**
|
|
31
|
-
* Log level - undefined/null === DEFAULT.
|
|
32
|
-
*/
|
|
33
|
-
severity?: LogSeverity;
|
|
34
|
-
/**
|
|
35
|
-
* If this log is associated with an OpenTelemetry trace, you can put the
|
|
36
|
-
* trace ID here to pass on that association.
|
|
37
|
-
*/
|
|
38
|
-
telemetryTraceId?: string;
|
|
39
|
-
/**
|
|
40
|
-
* If this log is associated with an OpenTelemetry trace, you can put the
|
|
41
|
-
* span ID here to pass on that association.
|
|
42
|
-
*/
|
|
43
|
-
telemetrySpanId?: string;
|
|
44
|
-
/**
|
|
45
|
-
* This is a catch-all for any other items you might want to go into
|
|
46
|
-
* structured logs. Library implementers, please see the spec docs above
|
|
47
|
-
* for the items envisioned to go here.
|
|
48
|
-
*/
|
|
49
|
-
other?: unknown;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Adds typings for event sinks.
|
|
53
|
-
*/
|
|
54
|
-
export declare interface AdhocDebugLogger {
|
|
55
|
-
on(event: 'log', listener: (fields: LogFields, args: unknown[]) => void): this;
|
|
56
|
-
on(event: string, listener: Function): this;
|
|
57
|
-
}
|
|
2
|
+
import { LogFields, LogSeverity, AdhocDebugLogCallable, AdhocDebugLogFunction, DebugLogBackend } from './types';
|
|
58
3
|
/**
|
|
59
4
|
* Our logger instance. This actually contains the meat of dealing
|
|
60
5
|
* with log lines, including EventEmitter. This contains the function
|
|
@@ -66,7 +11,7 @@ export declare class AdhocDebugLogger extends EventEmitter {
|
|
|
66
11
|
func: AdhocDebugLogFunction;
|
|
67
12
|
/**
|
|
68
13
|
* @param upstream The backend will pass a function that will be
|
|
69
|
-
*
|
|
14
|
+
* called whenever our logger function is invoked.
|
|
70
15
|
*/
|
|
71
16
|
constructor(namespace: string, upstream: AdhocDebugLogCallable);
|
|
72
17
|
invoke(fields: LogFields, ...args: unknown[]): void;
|
|
@@ -76,84 +21,6 @@ export declare class AdhocDebugLogger extends EventEmitter {
|
|
|
76
21
|
* This can be used in place of a real logger while waiting for Promises or disabling logging.
|
|
77
22
|
*/
|
|
78
23
|
export declare const placeholder: AdhocDebugLogFunction;
|
|
79
|
-
/**
|
|
80
|
-
* When the user receives a log function (below), this will be the basic function
|
|
81
|
-
* call interface for it.
|
|
82
|
-
*/
|
|
83
|
-
export interface AdhocDebugLogCallable {
|
|
84
|
-
(fields: LogFields, ...args: unknown[]): void;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Adds typing info for the EventEmitter we're adding to the returned function.
|
|
88
|
-
*
|
|
89
|
-
* Note that this interface may change at any time, as we're reserving the
|
|
90
|
-
* right to add new backends at the logger level.
|
|
91
|
-
*
|
|
92
|
-
* @private
|
|
93
|
-
* @internal
|
|
94
|
-
*/
|
|
95
|
-
export interface AdhocDebugLogFunction extends AdhocDebugLogCallable {
|
|
96
|
-
instance: AdhocDebugLogger;
|
|
97
|
-
on(event: 'log', listener: (fields: LogFields, args: unknown[]) => void): this;
|
|
98
|
-
debug(...args: unknown[]): void;
|
|
99
|
-
info(...args: unknown[]): void;
|
|
100
|
-
warn(...args: unknown[]): void;
|
|
101
|
-
error(...args: unknown[]): void;
|
|
102
|
-
sublog(namespace: string): AdhocDebugLogFunction;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* One of these can be passed to support a third-party backend, like "debug".
|
|
106
|
-
* We're splitting this out because ESM can complicate optional module loading.
|
|
107
|
-
*
|
|
108
|
-
* Note that this interface may change at any time, as we're reserving the
|
|
109
|
-
* right to add new backends at the logger level.
|
|
110
|
-
*
|
|
111
|
-
* @private
|
|
112
|
-
* @internal
|
|
113
|
-
*/
|
|
114
|
-
export interface DebugLogBackend {
|
|
115
|
-
/**
|
|
116
|
-
* Outputs a log to this backend.
|
|
117
|
-
*
|
|
118
|
-
* @param namespace The "system" that will be used for filtering. This may also
|
|
119
|
-
* include a "subsystem" in the form "system:subsystem".
|
|
120
|
-
* @param fields Logging fields to be included as metadata.
|
|
121
|
-
* @param args Any parameters to passed to a utils.format() type formatter.
|
|
122
|
-
*/
|
|
123
|
-
log(namespace: string, fields: LogFields, ...args: unknown[]): void;
|
|
124
|
-
/**
|
|
125
|
-
* Passes in the system/subsystem filters from the global environment variables.
|
|
126
|
-
* This lets the backend merge with any native ones.
|
|
127
|
-
*
|
|
128
|
-
* @param filters A list of wildcards matching systems or system:subsystem pairs.
|
|
129
|
-
*/
|
|
130
|
-
setFilters(filters: string[]): void;
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* The base class for debug logging backends. It's possible to use this, but the
|
|
134
|
-
* same non-guarantees above still apply (unstable interface, etc).
|
|
135
|
-
*
|
|
136
|
-
* @private
|
|
137
|
-
* @internal
|
|
138
|
-
*/
|
|
139
|
-
export declare abstract class DebugLogBackendBase implements DebugLogBackend {
|
|
140
|
-
cached: Map<string, AdhocDebugLogCallable>;
|
|
141
|
-
filters: string[];
|
|
142
|
-
filtersSet: boolean;
|
|
143
|
-
constructor();
|
|
144
|
-
/**
|
|
145
|
-
* Creates a callback function that we can call to send log lines out.
|
|
146
|
-
*
|
|
147
|
-
* @param namespace The system/subsystem namespace.
|
|
148
|
-
*/
|
|
149
|
-
abstract makeLogger(namespace: string): AdhocDebugLogCallable;
|
|
150
|
-
/**
|
|
151
|
-
* Provides a callback for the subclass to hook if it needs to do something
|
|
152
|
-
* specific with `this.filters`.
|
|
153
|
-
*/
|
|
154
|
-
abstract setFilters(): void;
|
|
155
|
-
log(namespace: string, fields: LogFields, ...args: unknown[]): void;
|
|
156
|
-
}
|
|
157
24
|
/**
|
|
158
25
|
* @returns A backend based on Node util.debuglog; this is the default.
|
|
159
26
|
*/
|