Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
build: update README for deprecation notice (#1086)
Browse files Browse the repository at this point in the history
* build: update README for deprecation notice

* 馃 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
sofisl and gcf-owl-bot[bot] committed Jan 19, 2023
1 parent 99d7cee commit 4abeda8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 45 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
**_THIS REPOSITORY IS DEPRECATED. ALL OF ITS CONTENT AND HISTORY HAS BEEN MOVED TO [GOOGLE-CLOUD-NODE](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-cloud-vision)_**

[//]: # "This README.md file is auto-generated, all changes to this file will be lost."
[//]: # "To regenerate it, use `python -m synthtool`."
<img src="https://avatars2.githubusercontent.com/u/2810941?v=3&s=96" alt="Google Cloud Platform logo" title="Google Cloud Platform" align="right" height="96" width="96"/>
Expand Down
28 changes: 6 additions & 22 deletions owlbot.py
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
# Copyright 2018 Google LLC
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# 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
# https://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.

"""This script is used to synthesize generated parts of this library."""

import synthtool as s
import synthtool.languages.node as node
from pathlib import Path

def patch(library: Path):
client_file = library / "src/*/image_annotator_client.ts"
s.replace(client_file, '\Z',
'import {FeaturesMethod} from \'../helpers\';\n' +
'// eslint-disable-next-line @typescript-eslint/no-empty-interface\n' +
'export interface ImageAnnotatorClient extends FeaturesMethod {}\n'
)

node.owlbot_main(
staging_excludes=['src/index.ts', 'package.json'],
templates_excludes=['src/index.ts'],
patch_staging=patch
)
node.owlbot_main(templates_excludes=[
'README.md'
])
28 changes: 5 additions & 23 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019 Google LLC
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -12,37 +12,21 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// ** This file is automatically generated by gapic-generator-typescript. **
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** This file is automatically generated by synthtool. **
// ** https://github.com/googleapis/synthtool **
// ** All changes to this file may be overwritten. **

import * as v1 from './v1';
import * as v1p1beta1 from './v1p1beta1';
import * as v1p2beta1 from './v1p2beta1';
import * as v1p3beta1 from './v1p3beta1';
import * as v1p4beta1 from './v1p4beta1';
import * as helpers from './helpers';
Object.assign(v1.ImageAnnotatorClient.prototype, helpers.call('v1'));
Object.assign(
v1p1beta1.ImageAnnotatorClient.prototype,
helpers.call('v1p1beta1')
);
Object.assign(
v1p2beta1.ImageAnnotatorClient.prototype,
helpers.call('v1p2beta1')
);
Object.assign(
v1p3beta1.ImageAnnotatorClient.prototype,
helpers.call('v1p3beta1')
);
Object.assign(
v1p4beta1.ImageAnnotatorClient.prototype,
helpers.call('v1p4beta1')
);

const ImageAnnotatorClient = v1.ImageAnnotatorClient;
type ImageAnnotatorClient = v1.ImageAnnotatorClient;
const ProductSearchClient = v1.ProductSearchClient;
type ProductSearchClient = v1.ProductSearchClient;

export {
v1,
v1p1beta1,
Expand All @@ -52,8 +36,6 @@ export {
ImageAnnotatorClient,
ProductSearchClient,
};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {
v1,
v1p1beta1,
Expand Down

0 comments on commit 4abeda8

Please sign in to comment.