{"id":20510698,"url":"https://github.com/battis/partly-gcloudy","last_synced_at":"2025-04-13T22:33:52.892Z","repository":{"id":177961036,"uuid":"655792900","full_name":"battis/partly-gcloudy","owner":"battis","description":"Idiosyncratic collection of interactions with `gcloud` CLI tool","archived":false,"fork":false,"pushed_at":"2025-03-05T17:35:32.000Z","size":1472,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T12:52:30.385Z","etag":null,"topics":["gcloud","google-api-client","google-cloud"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/battis.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-19T15:54:53.000Z","updated_at":"2025-02-27T14:45:50.000Z","dependencies_parsed_at":"2023-12-04T03:20:37.787Z","dependency_job_id":"4dc6ff0f-badf-4231-8e8c-2f31e25dec99","html_url":"https://github.com/battis/partly-gcloudy","commit_stats":{"total_commits":68,"total_committers":2,"mean_commits":34.0,"dds":0.1470588235294118,"last_synced_commit":"19b92f0cff8cc5626ee8db047bcd3ad314a026d7"},"previous_names":["battis/partly-gcloudy"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battis%2Fpartly-gcloudy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battis%2Fpartly-gcloudy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battis%2Fpartly-gcloudy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/battis%2Fpartly-gcloudy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/battis","download_url":"https://codeload.github.com/battis/partly-gcloudy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248790914,"owners_count":21162114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gcloud","google-api-client","google-cloud"],"created_at":"2024-11-15T20:30:43.605Z","updated_at":"2025-04-13T22:33:52.863Z","avatar_url":"https://github.com/battis.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @battis/partly-gcloudy \u003cimg src=\"./assets/logo.svg\" style=\"height: 1em;\" /\u003e\n\nIdiosyncratic collection of interactions with `gcloud` CLI tool\n\n[![npm version](https://badge.fury.io/js/@battis%2Fpartly-gcloudy.svg)](https://badge.fury.io/js/@battis%2Fpartly-gcloudy)\n[![Module type: ESM](https://img.shields.io/badge/module%20type-esm-brightgreen)](https://nodejs.org/api/esm.html)\n\n## Install\n\n`npm i @battis/partly-gcloudy`\n\n## Usage\n\nThis is an ESM module that depends on other ESM modules, and so really can only feasibly be imported by ESM modules.\n\n```js\nimport * as gcloud from '@battis/partly-gcloudy';\n\nawait gcloud.init();\nawait gcloud.app.deploy();\n```\n\n## Design\n\nThis is really designed to meet my needs (type-safe, fat-finger-preventative, repetitive interactions with Google Cloud). There are a few basic principles:\n\n- Property names match up with the `gcloud` CLI verbs.\n  `gcloud projects describe` becomes `gcloud.projects.describe()`\n- Method parameters are the names used in the corresponding `gcloud` CLI tool documentation, camelCased.\n  `gcloud projects describe PROJECT_ID_OR_NUMBER` becomes\n  `gcloud.projects.describe({ projectId: 'flim-flam-1234' })`\n- Methods are typed to hint their parameters, which are passed as object arguments to facilitate hyper-aggressive type-checking in a loosey-goosey manner. Argument order is too much to worry about.\n  `gcloud.projects.describe({ projectId: 'flim-flam-1234' })`\n- Methods are information-agnostic -- if you don't pass some or all of the arguments, they'll interactively ask the user for what they need.\n  `gcloud.projects.create()` works. If it really can't be done, it will fail with a demonstrative error.\n- All \"verb\" methods are asynchronous.\n- All input is validated to the extent possible.\n\n#### `gcloud.*.input*()` and `gcloud.*.select*()`\n\nWhere user input may be required (or validated) the different types of input relevant to a `gcloud` verb are grouped within the property.\n\n```js\nlet projectId = '_$argle-bargle';\nprojectId = await gcloud.projects.inputProjectId({ projectId });\n```\n\nThe initial `projectId` value is invalid, will fail the validation, and result in interactive user-input to choose a valid project ID.\n\n## Batch operations\n\nAs I need them, I am packaging up modular batches of operations in the `gcloud.batch` namespace.\n\n```js\nimport gcloud from '@battis/partly-gcloudy';\n\nawait gcloud.batch.appEnginePublish();\n```\n\nThis will create a Google Cloud project (or reuse an existing one, if you enter an existing project ID or have your environment variable `PROJECT` set), configure an App Engine Instance in that project, if necessary, and deploy the current project to that App Engine instance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattis%2Fpartly-gcloudy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbattis%2Fpartly-gcloudy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbattis%2Fpartly-gcloudy/lists"}