{"id":24510697,"url":"https://github.com/rhdeck/serverless-resources","last_synced_at":"2025-03-15T09:41:27.940Z","repository":{"id":104234455,"uuid":"150032471","full_name":"rhdeck/serverless-resources","owner":"rhdeck","description":"Utility for reading cloudformation outputs","archived":false,"fork":false,"pushed_at":"2020-10-07T20:53:35.000Z","size":76,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-25T20:39:49.300Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rhdeck.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2018-09-23T22:54:05.000Z","updated_at":"2020-08-16T01:54:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c6643f5-1950-47c6-9879-0f3dabd5e4c7","html_url":"https://github.com/rhdeck/serverless-resources","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":"0.020408163265306145","last_synced_commit":"b2da71cf4cf4c901e930cb6a4ed77bdfdb9bc644"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Fserverless-resources","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Fserverless-resources/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Fserverless-resources/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rhdeck%2Fserverless-resources/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rhdeck","download_url":"https://codeload.github.com/rhdeck/serverless-resources/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243713393,"owners_count":20335566,"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":"2025-01-22T00:30:30.122Z","updated_at":"2025-03-15T09:41:27.917Z","avatar_url":"https://github.com/rhdeck.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003ca name=\"__climd\"\u003e\u003c/a\u003e\n\n# Usage\n```bash\nserverless-resources [options] [command]\n```\n# Commands\n## info\nGet information in JSON format for this command\n### Usage\n```bash\nserverless-resources info [options]\n```\n### Options\n* -y --yaml Format as YAML \n* -s --service \\\u003c`service`\u003e Service name (default infers from the serverless.yml \n* -p --path \\\u003c`path`\u003e Path to serverless base definition (default is cwd) \n* -r --region \\\u003c`region`\u003e AWS Region - defaults to environment value \n* -t --stage \\\u003c`stage`\u003e Stage to target, usually dev or prod \n* -a --aws-profile \\\u003c`profile`\u003e Name of AWS profile to use \n\n\u003ca name=\"librarymd\"\u003e\u003c/a\u003e\n\n\n# @raydeck/serverless-resources - v3.0.2\n\n## Index\n\n### Functions\n\n* [fixYaml](#fixyaml)\n* [fixYamlFile](#fixyamlfile)\n* [getAppSync](#getappsync)\n* [getArnForDatabaseTable](#getarnfordatabasetable)\n* [getArnForLambda](#getarnforlambda)\n* [getArnForQueue](#getarnforqueue)\n* [getArnForRole](#getarnforrole)\n* [getGSIsForDatabaseTable](#getgsisfordatabasetable)\n* [getLSIsForDatabaseTable](#getlsisfordatabasetable)\n* [getOutputs](#getoutputs)\n* [getResources](#getresources)\n* [getServiceName](#getservicename)\n* [getStreamArnForDatabaseTable](#getstreamarnfordatabasetable)\n* [getUnqualifiedArnForLambda](#getunqualifiedarnforlambda)\n* [isDDBResource](#isddbresource)\n\n## Functions\n\n###  fixYaml\n\n▸ **fixYaml**(`yamlObj`: object, `path`: string): *object*\n\n*Defined in [index.ts:32](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L32)*\n\nFill in an object with external file references\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Description |\n------ | ------ | ------ |\n`yamlObj` | object | object to be fixed |\n`path` | string | path reference for finding other matches (really for config.json)  |\n\n**Returns:** *object*\n\n* \\[ **key**: *string*\\]: any\n\n___\n\n###  fixYamlFile\n\n▸ **fixYamlFile**(`path`: string): *object*\n\n*Defined in [index.ts:18](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L18)*\n\nFix a yaml file at path specified -\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Description |\n------ | ------ | ------ |\n`path` | string | path to yaml file  |\n\n**Returns:** *object*\n\n* \\[ **key**: *string*\\]: any\n\n___\n\n###  getAppSync\n\n▸ **getAppSync**(`appResources`: object, `cmd`: object): *Promise‹undefined | GraphqlApi›*\n\n*Defined in [index.ts:438](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L438)*\n\nGet profile for Appsync resource in this stack\n\n**Parameters:**\n\n▪ **appResources**: *object*\n\nResources as returened by getResources above\n\n▪ **cmd**: *object*\n\narguments from CLI tool\n\nName | Type |\n------ | ------ |\n`awsProfile?` | undefined \u0026#124; string |\n`json?` | undefined \u0026#124; false \u0026#124; true |\n`path?` | undefined \u0026#124; string |\n`region?` | undefined \u0026#124; string |\n`service?` | undefined \u0026#124; string |\n`stage?` | undefined \u0026#124; string |\n`yaml?` | undefined \u0026#124; false \u0026#124; true |\n\n**Returns:** *Promise‹undefined | GraphqlApi›*\n\n___\n\n###  getArnForDatabaseTable\n\n▸ **getArnForDatabaseTable**(`TableName`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:133](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L133)*\n\nGet the arn by table name\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`TableName` | string | - | DDB table name |\n`region` | string | \"us-east-1\" | AWS region  |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  getArnForLambda\n\n▸ **getArnForLambda**(`FunctionName`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:216](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L216)*\n\nget the arn of a lambda from the function name\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`FunctionName` | string | - | name of the lambda function |\n`region` | string | \"us-east-1\" | AWS region  |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  getArnForQueue\n\n▸ **getArnForQueue**(`url`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:89](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L89)*\n\n**Parameters:**\n\nName | Type |\n------ | ------ |\n`url` | string |\n`region` | string |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  getArnForRole\n\n▸ **getArnForRole**(`role`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:268](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L268)*\n\nGet the ARN of a role by name\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`role` | string | - | Name of the role |\n`region` | string | \"us-east-1\" | AWS Region  |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  getGSIsForDatabaseTable\n\n▸ **getGSIsForDatabaseTable**(`TableName`: string, `region`: string): *Promise‹object[]›*\n\n*Defined in [index.ts:156](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L156)*\n\nGet Global Secondary Inidices of a table\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`TableName` | string | - | DDB Table name |\n`region` | string | \"us-east-1\" | AWS region  |\n\n**Returns:** *Promise‹object[]›*\n\n___\n\n###  getLSIsForDatabaseTable\n\n▸ **getLSIsForDatabaseTable**(`TableName`: string, `region`: string): *Promise‹object[]›*\n\n*Defined in [index.ts:186](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L186)*\n\nGet Local Secondary Indicies for a table\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`TableName` | string | - | DDB Table name |\n`region` | string | \"us-east-1\" | AWS region  |\n\n**Returns:** *Promise‹object[]›*\n\n___\n\n###  getOutputs\n\n▸ **getOutputs**(`cmd`: object): *Promise‹object›*\n\n*Defined in [index.ts:282](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L282)*\n\nGet outputs of a single stack at the path in question\n\n**Parameters:**\n\n▪ **cmd**: *object*\n\nCommand line options from the tool\n\nName | Type |\n------ | ------ |\n`awsProfile?` | undefined \u0026#124; string |\n`json?` | undefined \u0026#124; false \u0026#124; true |\n`path?` | undefined \u0026#124; string |\n`region?` | undefined \u0026#124; string |\n`service?` | undefined \u0026#124; string |\n`stage?` | undefined \u0026#124; string |\n`yaml?` | undefined \u0026#124; false \u0026#124; true |\n\n**Returns:** *Promise‹object›*\n\n___\n\n###  getResources\n\n▸ **getResources**(`cmd`: object): *Promise‹object›*\n\n*Defined in [index.ts:327](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L327)*\n\nGet resources of the stack at this path\n\n**Parameters:**\n\n▪ **cmd**: *object*\n\nInputs from command line tool\n\nName | Type |\n------ | ------ |\n`awsProfile?` | undefined \u0026#124; string |\n`path?` | undefined \u0026#124; string |\n`region?` | undefined \u0026#124; string |\n`service?` | undefined \u0026#124; string |\n`stage?` | undefined \u0026#124; string |\n\n**Returns:** *Promise‹object›*\n\n___\n\n###  getServiceName\n\n▸ **getServiceName**(`path?`: undefined | string): *any*\n\n*Defined in [index.ts:80](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L80)*\n\nGet name of stack we are building right here\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Description |\n------ | ------ | ------ |\n`path?` | undefined \u0026#124; string | current path to serverless.yml file (will append /serverless.yml if missing)  |\n\n**Returns:** *any*\n\n___\n\n###  getStreamArnForDatabaseTable\n\n▸ **getStreamArnForDatabaseTable**(`TableName`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:110](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L110)*\n\nGet Stream for database\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`TableName` | string | - | DDB table name |\n`region` | string | \"us-east-1\" | region  |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  getUnqualifiedArnForLambda\n\n▸ **getUnqualifiedArnForLambda**(`FunctionName`: string, `region`: string): *Promise‹undefined | string›*\n\n*Defined in [index.ts:237](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L237)*\n\nGet the unqualified arn of a lambda\n\n**`internal`** \n\n**Parameters:**\n\nName | Type | Default | Description |\n------ | ------ | ------ | ------ |\n`FunctionName` | string | - | Name of Function |\n`region` | string | \"us-east-1\" | AWS Region  |\n\n**Returns:** *Promise‹undefined | string›*\n\n___\n\n###  isDDBResource\n\n▸ **isDDBResource**(`resource`: object): *boolean*\n\n*Defined in [index.ts:259](https://github.com/rhdeck/serverless-resources/blob/46d0328/src/index.ts#L259)*\n\nDetect whether a given resource is for DDB\n\n**`internal`** \n\n**Parameters:**\n\n▪ **resource**: *object*\n\nResource object\n\nName | Type |\n------ | ------ |\n`ResourceType` | string |\n\n**Returns:** *boolean*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhdeck%2Fserverless-resources","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frhdeck%2Fserverless-resources","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frhdeck%2Fserverless-resources/lists"}