diff --git a/packages/google-cloud-securitycenter/.github/.OwlBot.yaml b/packages/google-cloud-securitycenter/.github/.OwlBot.yaml new file mode 100644 index 00000000000..4b9917134e3 --- /dev/null +++ b/packages/google-cloud-securitycenter/.github/.OwlBot.yaml @@ -0,0 +1,26 @@ +# 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. +docker: + image: gcr.io/repo-automation-bots/owlbot-nodejs:latest + + +deep-remove-regex: + - /owl-bot-staging + +deep-copy-regex: + - source: /google/cloud/securitycenter/(v.*)/.*-nodejs/(.*) + dest: /owl-bot-staging/$1/$2 + +begin-after-commit-hash: fb91803ccef5d7c695139b22788b309e2197856b + diff --git a/packages/google-cloud-securitycenter/.repo-metadata.json b/packages/google-cloud-securitycenter/.repo-metadata.json index 44f54d2dab8..951932aaedf 100644 --- a/packages/google-cloud-securitycenter/.repo-metadata.json +++ b/packages/google-cloud-securitycenter/.repo-metadata.json @@ -1,13 +1,14 @@ { - "name": "security-center", - "name_pretty": "Google Cloud Security Command Center", - "product_documentation": "https://cloud.google.com/security-command-center", - "client_documentation": "https://googleapis.dev/nodejs/security-center/latest", - "issue_tracker": "https://issuetracker.google.com/savedsearches/559748", - "release_level": "ga", "language": "nodejs", + "api_id": "securitycenter.googleapis.com", "repo": "googleapis/nodejs-security-center", + "release_level": "ga", "distribution_name": "@google-cloud/security-center", - "api_id": "securitycenter.googleapis.com", - "requires_billing": true + "default_version": "v1", + "name": "security-center", + "client_documentation": "https://googleapis.dev/nodejs/security-center/latest", + "requires_billing": true, + "name_pretty": "Google Cloud Security Command Center", + "issue_tracker": "https://issuetracker.google.com/savedsearches/559748", + "product_documentation": "https://cloud.google.com/security-command-center" } diff --git a/packages/google-cloud-securitycenter/owlbot.py b/packages/google-cloud-securitycenter/owlbot.py new file mode 100644 index 00000000000..c9485321fc1 --- /dev/null +++ b/packages/google-cloud-securitycenter/owlbot.py @@ -0,0 +1,20 @@ +# Copyright 2018 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 synthtool.languages.node as node + +node.owlbot_main( + staging_excludes=['package.json', 'README.md'], + templates_excludes=['.kokoro/samples-test.sh', '.kokoro/samples-test.sh'] +) diff --git a/packages/google-cloud-securitycenter/src/index.ts b/packages/google-cloud-securitycenter/src/index.ts index 2f1843814ee..f0712e1a2de 100644 --- a/packages/google-cloud-securitycenter/src/index.ts +++ b/packages/google-cloud-securitycenter/src/index.ts @@ -16,14 +16,14 @@ // ** https://github.com/googleapis/synthtool ** // ** All changes to this file may be overwritten. ** -import * as v1 from './v1'; -import * as v1beta1 from './v1beta1'; import * as v1p1beta1 from './v1p1beta1'; +import * as v1beta1 from './v1beta1'; +import * as v1 from './v1'; const SecurityCenterClient = v1.SecurityCenterClient; type SecurityCenterClient = v1.SecurityCenterClient; -export {v1, v1beta1, v1p1beta1, SecurityCenterClient}; -export default {v1, v1beta1, v1p1beta1, SecurityCenterClient}; +export {v1p1beta1, v1beta1, v1, SecurityCenterClient}; +export default {v1p1beta1, v1beta1, v1, SecurityCenterClient}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-securitycenter/synth.metadata b/packages/google-cloud-securitycenter/synth.metadata deleted file mode 100644 index 1f6b33e5559..00000000000 --- a/packages/google-cloud-securitycenter/synth.metadata +++ /dev/null @@ -1,55 +0,0 @@ -{ - "sources": [ - { - "git": { - "name": ".", - "remote": "https://github.com/googleapis/nodejs-security-center.git", - "sha": "fb1a8b32cd67c4b1327a031c949f676d01d3b24f" - } - }, - { - "git": { - "name": "googleapis", - "remote": "https://github.com/googleapis/googleapis.git", - "sha": "5477122b3e8037a1dc5bc920536158edbd151dc4", - "internalRef": "361273630" - } - }, - { - "git": { - "name": "synthtool", - "remote": "https://github.com/googleapis/synthtool.git", - "sha": "57c23fa5705499a4181095ced81f0ee0933b64f6" - } - } - ], - "destinations": [ - { - "client": { - "source": "googleapis", - "apiName": "securitycenter", - "apiVersion": "v1", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "securitycenter", - "apiVersion": "v1beta1", - "language": "nodejs", - "generator": "bazel" - } - }, - { - "client": { - "source": "googleapis", - "apiName": "securitycenter", - "apiVersion": "v1p1beta1", - "language": "nodejs", - "generator": "bazel" - } - } - ] -} \ No newline at end of file diff --git a/packages/google-cloud-securitycenter/synth.py b/packages/google-cloud-securitycenter/synth.py deleted file mode 100644 index 6eda4071a6b..00000000000 --- a/packages/google-cloud-securitycenter/synth.py +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 2018 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 synthtool as s -import synthtool.gcp as gcp -import synthtool.languages.node as node -import logging - -logging.basicConfig(level=logging.DEBUG) - -AUTOSYNTH_MULTIPLE_COMMITS = True - - -# Run the gapic generator -gapic = gcp.GAPICBazel() -versions = ['v1', 'v1beta1', 'v1p1beta1'] -name = 'securitycenter' -for version in versions: - library = gapic.node_library(name, version) - # skip index, protos, package.json, and README.md - s.copy( - library, - excludes=['package.json', 'README.md'] - ) - -# Copy common templates -common_templates = gcp.CommonTemplates() -templates = common_templates.node_library( - source_location='build/src', versions=versions, default_version='v1') -s.copy(templates, excludes=[ - '.kokoro/samples-test.sh', '.kokoro/samples-test.sh']) - -node.postprocess_gapic_library()