From ae6c05126f1bcd5494e273267784b18c48b6f302 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Fri, 12 Jun 2026 11:23:32 +0000 Subject: [PATCH 1/4] chore: migrate google-cloud-webrisk to librarian --- librarian.yaml | 1 - packages/google-cloud-webrisk/.OwlBot.yaml | 21 ---------- packages/google-cloud-webrisk/.c8rc | 20 ---------- .../google-cloud-webrisk/.repo-metadata.json | 29 +++++++------- .../system-test/header.ts | 38 ------------------- .../google-cloud-webrisk/system-test/test.ts | 30 --------------- 6 files changed, 14 insertions(+), 125 deletions(-) delete mode 100644 packages/google-cloud-webrisk/.OwlBot.yaml delete mode 100644 packages/google-cloud-webrisk/.c8rc delete mode 100644 packages/google-cloud-webrisk/system-test/header.ts delete mode 100644 packages/google-cloud-webrisk/system-test/test.ts diff --git a/librarian.yaml b/librarian.yaml index 68614074ad5d..032f4b45be76 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1639,7 +1639,6 @@ libraries: - path: google/cloud/webrisk/v1 - path: google/cloud/webrisk/v1beta1 copyright_year: "2026" - skip_generate: true nodejs: default_version: v1 package_name: '@google-cloud/web-risk' diff --git a/packages/google-cloud-webrisk/.OwlBot.yaml b/packages/google-cloud-webrisk/.OwlBot.yaml deleted file mode 100644 index 1109f512bb88..000000000000 --- a/packages/google-cloud-webrisk/.OwlBot.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright 2021 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -deep-remove-regex: - - /owl-bot-staging -deep-copy-regex: - - source: /google/cloud/webrisk/google-cloud-webrisk-nodejs - dest: /owl-bot-staging/google-cloud-webrisk -begin-after-commit-hash: 674a41e0de2869f44f45eb7b1a605852a5394bba -api-name: webrisk diff --git a/packages/google-cloud-webrisk/.c8rc b/packages/google-cloud-webrisk/.c8rc deleted file mode 100644 index 755d9a67748a..000000000000 --- a/packages/google-cloud-webrisk/.c8rc +++ /dev/null @@ -1,20 +0,0 @@ -{ - "report-dir": "./coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/coverage", - "**/apis", - "**/benchmark", - "**/docs", - "**/samples", - "**/scripts", - "**/src/**/v*/**/*.js", - "**/test", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ] -} diff --git a/packages/google-cloud-webrisk/.repo-metadata.json b/packages/google-cloud-webrisk/.repo-metadata.json index 7f2ff6bafb49..856d712cd2a3 100644 --- a/packages/google-cloud-webrisk/.repo-metadata.json +++ b/packages/google-cloud-webrisk/.repo-metadata.json @@ -1,16 +1,15 @@ { - "name_pretty": "Web Risk API", - "language": "nodejs", - "name": "web-risk", - "release_level": "stable", - "client_documentation": "https://googleapis.dev/nodejs/web-risk/latest", - "api_id": "webrisk.googleapis.com", - "distribution_name": "@google-cloud/web-risk", - "product_documentation": "https://cloud.google.com/web-risk/docs/", - "requires_billing": true, - "default_version": "v1", - "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", - "repo": "googleapis/google-cloud-node", - "api_shortname": "webrisk", - "library_type": "GAPIC_AUTO" -} + "api_description": "Web Risk is an enterprise security product that lets your client applications check URLs against Google's constantly updated lists of unsafe web resources.", + "api_id": "webrisk.googleapis.com", + "api_shortname": "webrisk", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/web-risk/latest", + "default_version": "v1", + "distribution_name": "@google-cloud/web-risk", + "language": "nodejs", + "library_type": "GAPIC_AUTO", + "name": "webrisk", + "name_pretty": "Web Risk", + "product_documentation": "https://cloud.google.com/web-risk/docs", + "release_level": "stable", + "repo": "googleapis/google-cloud-node" +} \ No newline at end of file diff --git a/packages/google-cloud-webrisk/system-test/header.ts b/packages/google-cloud-webrisk/system-test/header.ts deleted file mode 100644 index 6c214c5dc50c..000000000000 --- a/packages/google-cloud-webrisk/system-test/header.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import * as protoTypes from '../protos/protos'; -import {assert} from 'chai'; -import {describe, it} from 'mocha'; -import {WebRiskServiceClient} from '../src/index'; -// eslint-disable-next-line @typescript-eslint/no-var-requires -const http2spy = require('http2spy'); -const gax = http2spy.require('google-gax'); -describe('header', () => { - it('populates x-goog-api-client header', async () => { - const client = new WebRiskServiceClient({}, gax); - const request = { - uri: 'http://testsafebrowsing.appspot.com/s/malware.html', - threatTypes: ['MALWARE'], - }; - await client.searchUris( - request as unknown as protoTypes.google.cloud.webrisk.v1.SearchUrisRequest - ); - assert.ok( - /^gax\/[\w.-]+ gapic\/[\w.-]+ gl-node\/[0-9]+\.[\w.-]+ grpc\/[\w.-]+$/.test( - http2spy.requests[0]['x-goog-api-client'][0] - ) - ); - }); -}); diff --git a/packages/google-cloud-webrisk/system-test/test.ts b/packages/google-cloud-webrisk/system-test/test.ts deleted file mode 100644 index 79f61a8a4723..000000000000 --- a/packages/google-cloud-webrisk/system-test/test.ts +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import {assert} from 'chai'; -import {describe, it} from 'mocha'; - -describe('WebRiskSmokeTest', () => { - it('searches threat database for URI', async () => { - // eslint-disable-next-line @typescript-eslint/no-var-requires - const {WebRiskServiceV1Beta1Client} = require('../src/v1beta1'); - const client = new WebRiskServiceV1Beta1Client(); - const request = { - uri: 'http://testsafebrowsing.appspot.com/s/malware.html', - threatTypes: ['MALWARE'], - }; - const {threat} = (await client.searchUris(request))[0]; - assert.include(threat.threatTypes, 'MALWARE'); - }); -}); From 1b88b5306d6acf964ebfff4fbacf917b1884d5d0 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Sat, 13 Jun 2026 09:47:01 -0400 Subject: [PATCH 2/4] add keep --- librarian.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/librarian.yaml b/librarian.yaml index 6fe154c6931c..4ef7689853bd 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1592,6 +1592,9 @@ libraries: apis: - path: google/cloud/webrisk/v1 - path: google/cloud/webrisk/v1beta1 + keep: + - system-test/header.ts + - system-test/test.ts copyright_year: "2026" nodejs: default_version: v1 From 0f55c615a8ec809a73a479d96950d93c808c7094 Mon Sep 17 00:00:00 2001 From: Joe Wang <106995533+JoeWang1127@users.noreply.github.com> Date: Sat, 13 Jun 2026 09:48:17 -0400 Subject: [PATCH 3/4] restore --- .../system-test/header.ts | 38 +++++++++++++++++++ .../google-cloud-webrisk/system-test/test.ts | 30 +++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 packages/google-cloud-webrisk/system-test/header.ts create mode 100644 packages/google-cloud-webrisk/system-test/test.ts diff --git a/packages/google-cloud-webrisk/system-test/header.ts b/packages/google-cloud-webrisk/system-test/header.ts new file mode 100644 index 000000000000..3b80f6b60abc --- /dev/null +++ b/packages/google-cloud-webrisk/system-test/header.ts @@ -0,0 +1,38 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import * as protoTypes from '../protos/protos'; +import {assert} from 'chai'; +import {describe, it} from 'mocha'; +import {WebRiskServiceClient} from '../src/index'; +// eslint-disable-next-line @typescript-eslint/no-var-requires +const http2spy = require('http2spy'); +const gax = http2spy.require('google-gax'); +describe('header', () => { + it('populates x-goog-api-client header', async () => { + const client = new WebRiskServiceClient({}, gax); + const request = { + uri: 'http://testsafebrowsing.appspot.com/s/malware.html', + threatTypes: ['MALWARE'], + }; + await client.searchUris( + request as unknown as protoTypes.google.cloud.webrisk.v1.SearchUrisRequest + ); + assert.ok( + /^gax\/[\w.-]+ gapic\/[\w.-]+ gl-node\/[0-9]+\.[\w.-]+ grpc\/[\w.-]+$/.test( + http2spy.requests[0]['x-goog-api-client'][0] + ) + ); + }); +}); \ No newline at end of file diff --git a/packages/google-cloud-webrisk/system-test/test.ts b/packages/google-cloud-webrisk/system-test/test.ts new file mode 100644 index 000000000000..44cdc0e88318 --- /dev/null +++ b/packages/google-cloud-webrisk/system-test/test.ts @@ -0,0 +1,30 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import {assert} from 'chai'; +import {describe, it} from 'mocha'; + +describe('WebRiskSmokeTest', () => { + it('searches threat database for URI', async () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires + const {WebRiskServiceV1Beta1Client} = require('../src/v1beta1'); + const client = new WebRiskServiceV1Beta1Client(); + const request = { + uri: 'http://testsafebrowsing.appspot.com/s/malware.html', + threatTypes: ['MALWARE'], + }; + const {threat} = (await client.searchUris(request))[0]; + assert.include(threat.threatTypes, 'MALWARE'); + }); +}); \ No newline at end of file From 9f63761cc16dcc2a8170db0f5416898f2ca0661d Mon Sep 17 00:00:00 2001 From: JoeWang1127 Date: Sat, 13 Jun 2026 13:49:21 +0000 Subject: [PATCH 4/4] tidy --- librarian.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/librarian.yaml b/librarian.yaml index 4ef7689853bd..bedec13012b2 100644 --- a/librarian.yaml +++ b/librarian.yaml @@ -1592,10 +1592,10 @@ libraries: apis: - path: google/cloud/webrisk/v1 - path: google/cloud/webrisk/v1beta1 + copyright_year: "2026" keep: - system-test/header.ts - system-test/test.ts - copyright_year: "2026" nodejs: default_version: v1 package_name: '@google-cloud/web-risk'