open-index/open-npm huggingface dataset:
npm package: @rlmartin-projen/cdktf-project
Description: This is a [projen](https://github.com/projen/projen) project template to manage CDKTF repositories. Please see the [API](./API.md) for documentation.
Author: Ryan Martin
Latest version: 8.0.0

# cdktf-project
This is a [projen](https://github.com/projen/projen) project template to manage CDKTF repositories. Please see the [API](./API.md) for documentation.

## Requirements
CDKTF supports only certain versions of Node (`^19.0.0`, `^16.3.0`, `^18.0.0`) and will show unexpected errors in other versions of Node. As such, make sure your local environment is using one of these versions when running projen. `18.0.0` has the farthest EOL at `2025-04-30`.

## Usage
```
nvm use 18
npx projen new \
  --from @rlmartin-projen/cdktf-project@~0 \
  --projenrc-ts
```

## Warnings
### .github/settings.yml
This template will generate configuration in `.github/settings.yml` to attempt to manage [protected branches](https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28) and [deployment environments](https://docs.github.com/en/rest/deployments/environments?apiVersion=2022-11-28). Both of these features are available to only _public repositories_ or _public and private repositories on paid plans_. If you are using this project template on a _free, private repository_, you should not expect the protected branch or deployment environment configuration in `.github/settings.yml` to have any effect.
npm package: @rlmartin-projen/projen-project
Description: This is a projen template for creating other projen templates.
Author: Ryan Martin
Latest version: 0.0.36

# projen-project
This is a projen template for creating other projen templates.


## Usage

### Creating a new projen template repo
```
npx projen new \
  --from @rlmartin-projen/projen-project \
  --projenrc-ts
```


### Terminology: scaffolding vs generated
When creating a new projen project template, it is best to be clear about which files are generated once vs which are under control of the template.


#### Scaffolding
Scaffolding files are generated only once - at the time of project creation - and from that point forward are the responsibility of the developer. These can be edited freely and will never get overwritten by projen.


#### Generated
Generated files should never be touched by the developer, because the projen template will overwrite any changes. This is indicated even down to the the level of the filesystem, because generated files are marked as read-only. While developers can change those permissions, this is not advised because the subsequent run of `npx projen` will discard any manual edits made to those files.


### Adding simple template files
Template files that are either static or use simple parameterization can be placed in either the `files/scaffolding` or `files/generated` folders. 

Files with a `.liquid` extension will be run through the [Liquid](https://shopify.github.io/liquid/) templating engine, with project-level options passed into the engine. 

Files with any other extension will be copied as-is into the project.

Template file names are also run through the templating engine, and can thus include dynamic naming.


#### Convenience properties
For some commonly-used string properties, a convenience property is automatically injected and accessible for use in templates. These all begin with an underscore (`_`) and include sub-properties for common string formats: `camel`, `kebab`, `pascal`, `snake`, `title`. The currently-supported convenience properties are:

- `_name`
npm package: @rlmartin/config-loader
Description: Utility class/functions to help load config from various sources.
Latest version: 1.1.4

# ConfigLoader
Utility class/functions to help load config from various sources.

Initial implementation narrowly supports AWS Lambda, but may be expanded to additional uses cases in the future.


## Usage
The `ConfigLoader` class takes a type argument to strongly define the expected config variable names. Because the config can be loaded from multiple sources, there is no check of the existence of every variable _until is is attempted to be used_.

To use the loader, create a small file like this:

```typescript
import { Context } from 'aws-lambda';
import { ConfigLoader } from '@rlmartin/config-loader';

export interface Config {
  readonly FOO: string;
  readonly BAR: string;
}

var config: ConfigLoader<Config>;

export async function loadConfig(context: Context) {
  config = new ConfigLoader<Config>(context);
  await config.load();
}

export function getConfig(key: keyof Config): Config[typeof key] {
  return config.get(key);
}
```

then when config is needed:

```typescript
import { Context, S3Event } from 'aws-lambda';
import { getConfig, loadConfig } from './config';

export async function handler(event: S3Event, context: Context): Promise<void> {
  await loadConfig(context);
  const foo = getConfig('FOO');
  // ...
}
```


## Supported config sources
The config is loaded from all of the following sources, in order of precedence (higher will override lower):

1. Secrets Manager
2. Environment variables (`process.env`)


## Secret name
The secret name matches the AWS Lambda function name. This can be overridden by setting the `SECRET_NAME` environment variable, which should be set to _only_ the name of the secret (not the ARN).


## Nested secrets
It is possible to load values from other secrets by setting the value to:

```
{
  'propertyName': { '$ref':'secretName' }
}
```

where `secretName` is the name of the secret that should be loaded as the value for `propertyName`. The value in the dependent secret can be any value (JSON or otherwise). This loading is recursive.

Be careful to not load too many dependent secrets and/or nest too deeply - because a) SecretsManager pricing is based on the number of secrets loaded and b) it could adversely affect load times.

This same secret-loading process can be utilized by env vars, e.g.

```
process.env['propertyName'] = '{"$ref":"secretName"}';
```