{"id":19437934,"url":"https://github.com/architect/utils","last_synced_at":"2025-07-18T16:07:57.993Z","repository":{"id":34998411,"uuid":"189271126","full_name":"architect/utils","owner":"architect","description":"Common utilities for Architect modules","archived":false,"fork":false,"pushed_at":"2024-04-29T20:38:01.000Z","size":534,"stargazers_count":3,"open_issues_count":0,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-06-19T09:44:48.923Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/architect.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":".github/contributing.md","funding":null,"license":"LICENSE","code_of_conduct":".github/code_of_conduct.md","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":"2019-05-29T17:37:35.000Z","updated_at":"2024-09-29T23:56:04.000Z","dependencies_parsed_at":"2024-06-18T17:09:16.748Z","dependency_job_id":null,"html_url":"https://github.com/architect/utils","commit_stats":{"total_commits":391,"total_committers":15,"mean_commits":"26.066666666666666","dds":"0.40920716112531974","last_synced_commit":"29c024d5ad46e1d8f44902fa472251afebecce74"},"previous_names":[],"tags_count":101,"template":false,"template_full_name":null,"purl":"pkg:github/architect/utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Futils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Futils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Futils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Futils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/architect","download_url":"https://codeload.github.com/architect/utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/architect%2Futils/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265791734,"owners_count":23829165,"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":[],"created_at":"2024-11-10T15:16:18.104Z","updated_at":"2025-07-18T16:07:57.968Z","avatar_url":"https://github.com/architect.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `@architect/utils` [![GitHub CI status](https://github.com/architect/utils/workflows/Node%20CI/badge.svg)](https://github.com/architect/utils/actions?query=workflow%3A%22Node+CI%22)\n\u003c!-- [![codecov](https://codecov.io/gh/architect/utils/branch/master/graph/badge.svg)](https://codecov.io/gh/architect/utils) --\u003e\n\n[@architect/utils][npm] are common utilities for the [@architect][arc] suite of projects.\n\n## Installation\n\n    npm i @architect/utils\n\n# API\n\n## `utils.banner(params)`\n\nResponsible for printing the standard banner, and loading the basic environment variables and necessary AWS credentials necessary to run Architect.\n\n`params` are required with the following available properties:\n\n- `inventory` (required): Inventory object from `@architect/inventory`\n- `disableBanner` (boolean): skip printing the banner and Architect's AWS environment bootstrapping routines\n- `disableRegion` (boolean): don't print the AWS region (useful in public CI scenarios, for example)\n- `disableProfile` (boolean): don't print the AWS profile (also useful in public CI scenarios)\n- `version` (string): the package version string to print out (e.g. `Architect 1.2.3`)\n- `quiet` (boolean): disable banner printing\n\n\n## `utils.getLambdaName(fn)`\n\nReturns a valid AWS Lambda function name based on its URL (route).\n\n\n## `utils.pathToUnix(pathString)`\n\nConverts any path to a Unix style path, with `/` as the seperator. This works around Windows issues where `/` is assumed across other parts of Architect.\n\n\n## `utils.toLogicalID(str)`\n\nConverts `str` into PascalCase for CloudFormation use.\n\n\n## `utils.updater(name, params)`\n\n`name` (a string) is required; `params` may include the boolean option `quiet` to manually override Architect's global printing status.\n\nReturns a function to be reused for standardized logging updates with the following methods:\n\n- `status` - prints an affirmative status update\n  - optional: arbitrary number of supporting info on new lines with each additional param\n- `start` - starts an animated progress indicator\n  - aliases: `update`\n- `done` - ends current progress indicator with an update\n  - aliases: `stop`\n- `cancel` - cancels current progress indicator without an update\n- `err` - pretty prints an error\n  - aliases: `error` and `fail`\n- `warn` - cancels current progress indicator and prints a warning\n  - aliases: `warn`\n- `raw` - just logs a message as-is (while respecting quiet)\n\nAutomatically respects Architect's global printing status, and also respects the following env vars:\n\n- `ARC_QUIET` - if truthy, disables printing\n- `CI` - if truthy, disables certain terminal progress animations\n\n\n\n[arc]: https://github.com/architect\n[npm]: https://www.npmjs.com/package/@architect/utils\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Futils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchitect%2Futils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchitect%2Futils/lists"}