From e8d88cab0794bec47ee8a946d2f687d7c5a8bd34 Mon Sep 17 00:00:00 2001 From: feywind <57276408+feywind@users.noreply.github.com> Date: Mon, 16 Sep 2024 13:41:43 -0400 Subject: [PATCH] build: shift typeless invocation into repo --- owlbot.py | 12 +++++++++--- package.json | 3 ++- samples/package.json | 5 ++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/owlbot.py b/owlbot.py index f3e6252cc..fb4ebecc1 100644 --- a/owlbot.py +++ b/owlbot.py @@ -12,16 +12,22 @@ # See the License for the specific language governing permissions and # limitations under the License. -import synthtool.languages.node as node +from synthtool.languages import node +from synthtool import shell +from synthtool.log import logger # Generate JS samples from TS. -node.typeless_samples_hermetic() +# node.typeless_samples_hermetic() # We need to run this before the main owlbot processing, to make # sure quickstart.js gets gts fixed before the README is generated. # This needs to be worked out more properly, this is temporary. +logger.debug("Run typeless sample bot") node.install() -node.fix() +shell.run(["npm", "run", "typeless"]) + +# node.fix() + # Main OwlBot processing. node.owlbot_main(templates_excludes=[ diff --git a/package.json b/package.json index 366c63531..6b7074566 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,8 @@ "predocs-test": "npm run docs", "benchwrapper": "node bin/benchwrapper.js", "prelint": "cd samples; npm link ../; npm install", - "precompile": "gts clean" + "precompile": "gts clean", + "typeless": "cd samples; npm run typeless" }, "dependencies": { "@google-cloud/paginator": "^5.0.0", diff --git a/samples/package.json b/samples/package.json index 979b5bc96..8e7ff82dd 100644 --- a/samples/package.json +++ b/samples/package.json @@ -18,7 +18,9 @@ "sampletsc": "cd typescript && tsc -p . && cd ..", "compile": "npm run tsc && npm run sampletsc", "clean": "gts clean && rm -rf build/", - "precompile": "npm run clean" + "precompile": "npm run clean", + "typeless": "typeless-sample-bot --outputpath . --targets . --recursive", + "posttypeless": "gts fix" }, "dependencies": { "@google-cloud/opentelemetry-cloud-trace-exporter": "^2.0.0", @@ -35,6 +37,7 @@ }, "devDependencies": { "@google-cloud/bigquery": "^7.0.0", + "@google-cloud/typeless-sample-bot": "^2.1.0", "@types/chai": "^4.2.16", "chai": "^4.2.0", "gts": "^5.0.0",