diff --git a/package-lock.json b/package-lock.json index 1c75d000..97b56ad3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10127,14 +10127,14 @@ "winston": "3.10.0" }, "devDependencies": { - "@google-cloud/functions-framework": "3.1.1", + "@google-cloud/functions-framework": "^3.1.1", "@google-cloud/synthetics-sdk-api": "file:./", "@types/chai": "^4.3.4", "@types/express": "^4.17.17", "@types/mocha": "^10.0.1", "@types/node": "^18.15.10", "@types/sinon": "^10.0.16", - "@types/supertest": "2.0.12", + "@types/supertest": "^2.0.12", "chai": "^4.3.7", "express": "^4.18.2", "node-mocks-http": "^1.13.0", @@ -10527,9 +10527,8 @@ } }, "packages/synthetics-sdk-broken-links": { - "version": "0.1.0", - "dev": true, - "hasInstallScript": true, + "name": "@google-cloud/synthetics-sdk-broken-links", + "version": "0.1.2", "license": "Apache-2.0", "dependencies": { "@google-cloud/synthetics-sdk-api": "^0.5.0", @@ -11123,7 +11122,7 @@ "@google-cloud/synthetics-sdk-api": { "version": "file:packages/synthetics-sdk-api", "requires": { - "@google-cloud/functions-framework": "3.1.1", + "@google-cloud/functions-framework": "^3.1.1", "@google-cloud/opentelemetry-cloud-trace-exporter": "2.1.0", "@google-cloud/synthetics-sdk-api": "file:", "@opentelemetry/api": "1.6.0", @@ -11137,7 +11136,7 @@ "@types/mocha": "^10.0.1", "@types/node": "^18.15.10", "@types/sinon": "^10.0.16", - "@types/supertest": "2.0.12", + "@types/supertest": "^2.0.12", "chai": "^4.3.7", "error-stack-parser": "2.1.4", "express": "^4.18.2", @@ -11446,6 +11445,13 @@ "synthetics-sdk-broken-links": "file:" }, "dependencies": { + "@google-cloud/synthetics-sdk-api": { + "version": "0.5.0", + "requires": { + "error-stack-parser": "^2.1.4", + "ts-proto": "^1.148.1" + } + }, "@types/node": { "version": "18.18.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz", @@ -17804,6 +17810,13 @@ "synthetics-sdk-broken-links": "file:" }, "dependencies": { + "@google-cloud/synthetics-sdk-api": { + "version": "0.5.0", + "requires": { + "error-stack-parser": "^2.1.4", + "ts-proto": "^1.148.1" + } + }, "@types/node": { "version": "18.18.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.8.tgz", diff --git a/packages/synthetics-sdk-api/proto/synthetic_response.proto b/packages/synthetics-sdk-api/proto/synthetic_response.proto index 3a73f90a..0584bf41 100644 --- a/packages/synthetics-sdk-api/proto/synthetic_response.proto +++ b/packages/synthetics-sdk-api/proto/synthetic_response.proto @@ -201,6 +201,9 @@ message BrokenLinksResultV1 { // individual link options, default None. string must be formatted as a // fully qualified url map per_link_options = 10; + + // Timeout set for the entire Synthetic Monitor, default 60000 milliseconds + optional int64 total_synthetic_timeout_millis = 11; } // Options set for broken link synthetic. diff --git a/packages/synthetics-sdk-api/src/generated/proto/synthetic_response.ts b/packages/synthetics-sdk-api/src/generated/proto/synthetic_response.ts index e287ccab..837acedf 100644 --- a/packages/synthetics-sdk-api/src/generated/proto/synthetic_response.ts +++ b/packages/synthetics-sdk-api/src/generated/proto/synthetic_response.ts @@ -116,7 +116,7 @@ export interface GenericResultV1_GenericError { * lookup". */ error_message: string; - /** The name of the function where the error occurred */ + /** The name of the function where the error occurred. */ function_name: string; /** The name of the file that reported the error. */ file_path: string; @@ -300,6 +300,8 @@ export interface BrokenLinksResultV1_BrokenLinkCheckerOptions { * fully qualified url */ per_link_options: { [key: string]: BrokenLinksResultV1_BrokenLinkCheckerOptions_PerLinkOption }; + /** Timeout set for the entire Synthetic Monitor, default 53000 milliseconds */ + total_synthetic_timeout_millis?: number | undefined; } /** Possible orders for checking links that have been scraped. */ @@ -1411,6 +1413,7 @@ function createBaseBrokenLinksResultV1_BrokenLinkCheckerOptions(): BrokenLinksRe max_retries: undefined, wait_for_selector: "", per_link_options: {}, + total_synthetic_timeout_millis: undefined, }; } @@ -1446,6 +1449,9 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = { writer.uint32(82).fork(), ).ldelim(); }); + if (message.total_synthetic_timeout_millis !== undefined) { + writer.uint32(88).int64(message.total_synthetic_timeout_millis); + } return writer; }, @@ -1525,6 +1531,13 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = { message.per_link_options[entry10.key] = entry10.value; } continue; + case 11: + if (tag !== 88) { + break; + } + + message.total_synthetic_timeout_millis = longToNumber(reader.int64() as Long); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -1554,6 +1567,9 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = { return acc; }, {}) : {}, + total_synthetic_timeout_millis: isSet(object.total_synthetic_timeout_millis) + ? Number(object.total_synthetic_timeout_millis) + : undefined, }; }, @@ -1578,6 +1594,8 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = { obj.per_link_options[k] = BrokenLinksResultV1_BrokenLinkCheckerOptions_PerLinkOption.toJSON(v); }); } + message.total_synthetic_timeout_millis !== undefined && + (obj.total_synthetic_timeout_millis = Math.round(message.total_synthetic_timeout_millis)); return obj; }, @@ -1607,6 +1625,7 @@ export const BrokenLinksResultV1_BrokenLinkCheckerOptions = { } return acc; }, {}); + message.total_synthetic_timeout_millis = object.total_synthetic_timeout_millis ?? undefined; return message; }, };