Project Init

This commit is contained in:
Muluhabt
2026-05-29 15:23:46 +03:00
commit 2fbc557aac
67387 changed files with 6063341 additions and 0 deletions

177
node_modules/dotenv-expand/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,177 @@
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [Unreleased](https://github.com/motdotla/dotenv-expand/compare/v12.0.3...master)
## [12.0.3](https://github.com/motdotla/dotenv-expand/compare/v12.0.2...v12.0.3) (2025-09-02)
### Added
- 🙏 A big thank you to new sponsor [Tuple.app](https://tuple.app/dotenv) - *the premier screen sharing app for developers on macOS and Windows.* Go check them out. It's wonderful and generous of them to give back to open source by sponsoring dotenv. Give them some love back.
## [12.0.2](https://github.com/motdotla/dotenv-expand/compare/v12.0.1...v12.0.2) (2025-05-16)
### Added
- 🎉 Added new sponsor [Graphite](https://graphite.dev/?utm_source=github&utm_medium=repo&utm_campaign=dotenv) - *the AI developer productivity platform helping teams on GitHub ship higher quality software, faster*.
> [!TIP]
> **[Become a sponsor](https://github.com/sponsors/motdotla)**
>
> The dotenvx-expand README is viewed thousands of times DAILY on GitHub and NPM.
> Sponsoring dotenv and dotenv-expand is a great way to get in front of developers and give back to the developer community at the same time.
## [12.0.1](https://github.com/motdotla/dotenv-expand/compare/v12.0.0...v12.0.1) (2024-11-18)
### Changed
* break logic on runningParsed ([#ad887](https://github.com/motdotla/dotenv-expand/commit/ad88703c77f554c342c6dc7b6a26c958fde621a8))
## [12.0.0](https://github.com/motdotla/dotenv-expand/compare/v11.0.7...v12.0.0) (2024-11-16)
### Added
* 🎉 support alternate value expansion (see [usage](https://dotenvx.com/docs/env-file#interpolation)) ([#131](https://github.com/motdotla/dotenv-expand/pull/131))
### Changed
* 🎉 Expansion logic rewritten to match [dotenvx](https://github.com/dotenvx/dotenvx) ([#131](https://github.com/motdotla/dotenv-expand/pull/131))
> NOTE: I recommend dotenvx over dotenv-expand when you are ready. I'm putting all my effort there for a unified standard .env implementation that works everywhere and matches bash, docker-compose, and more. In some cases it slightly improves on them - leading to more reliability for your secrets and config.
* ⚠️ BREAKING: do NOT attempt expansion of process.env ([#131](https://github.com/motdotla/dotenv-expand/pull/131))
> This has always been dangerous (unexpected side effects) and is now removed. `process.env` should not hold values you want to expand. If for some reason you need equivalent abilities, use [dotenvx](https://github.com/dotenvx/dotenvx). You can ship an encrypted .env file with your code - allowing safe expansion at runtime - rather than relying on trying to expand pre-existing `process.env` values that could for good reason have a dollar sign in them (example a password).
## [11.0.7](https://github.com/motdotla/dotenv-expand/compare/v11.0.6...v11.0.7) (2024-11-13)
### Changed
- 🐞 fix self-expanding undefined variable with default value ([#126](https://github.com/motdotla/dotenv-expand/pull/126))
## [11.0.6](https://github.com/motdotla/dotenv-expand/compare/v11.0.5...v11.0.6) (2024-02-17)
### Changed
- Fix `.nyc_output` in `.npmignore`
## [11.0.5](https://github.com/motdotla/dotenv-expand/compare/v11.0.4...v11.0.5) (2024-02-17)
### Changed
- 🐞 fix recursive expansion when expansion key is sourced from `process.env` ([#121](https://github.com/motdotla/dotenv-expand/pull/121))
## [11.0.4](https://github.com/motdotla/dotenv-expand/compare/v11.0.3...v11.0.4) (2024-02-15)
### Changed
- 🐞 fix recursive expansion when expansion keys in reverse order ([#118](https://github.com/motdotla/dotenv-expand/pull/118))
## [11.0.3](https://github.com/motdotla/dotenv-expand/compare/v11.0.2...v11.0.3) (2024-02-11)
### Changed
- 🐞 bug fix when `processEnv` set to process.env rather than empty object (also test fixes which hid the bug) ([#113](https://github.com/motdotla/dotenv-expand/pull/113))
## [11.0.2](https://github.com/motdotla/dotenv-expand/compare/v11.0.1...v11.0.2) (2024-02-10)
### Changed
- Changed funding link in package.json to [`dotenvx.com`](https://dotenvx.com)
## [11.0.1](https://github.com/motdotla/dotenv-expand/compare/v11.0.0...v11.0.1) (2024-02-10)
### Added
- Added funding link in package.json
## [11.0.0](https://github.com/motdotla/dotenv-expand/compare/v10.0.0...v11.0.0) (2024-02-10)
### Added
- Add typings for `import dotenv-expand/config` ([#99](https://github.com/motdotla/dotenv-expand/pull/99))
- Support expansion of dot in env variable names like `POSTGRESQL.BASE.USER` ([#93](https://github.com/motdotla/dotenv-expand/pull/93))
- Add `processEnv` option ([#105](https://github.com/motdotla/dotenv-expand/pull/105))
- Add support for default format of `${VAR-default}` ([#109](https://github.com/motdotla/dotenv-expand/pull/109))
### Changed
- Do not expand prior `process.env` environment variables. NOTE: make sure to see updated README regarding `dotenv.config({ processEnv: {} })` ([#104](https://github.com/motdotla/dotenv-expand/pull/104))
- 🐞 handle `$var1$var2` ([#103](https://github.com/motdotla/dotenv-expand/issues/103), [#104](https://github.com/motdotla/dotenv-expand/pull/104))
- 🐞 fix fatal recursive error when variable defines value with same variable `VAR=$VAR` [#98](https://github.com/motdotla/dotenv-expand/issues/98)
### Removed
- Remove `ignoreProcessEnv` option (use `processEnv` option going forward)
## [10.0.0](https://github.com/motdotla/dotenv-expand/compare/v9.0.0...v10.0.0) (2022-12-16)
### Added
- Support special characters in default expansion ([#74](https://github.com/motdotla/dotenv-expand/pull/74))
## [9.0.0](https://github.com/motdotla/dotenv-expand/compare/v8.0.3...v9.0.0) (2022-08-30)
### Added
- Proper support for preload and cli args ([#78](https://github.com/motdotla/dotenv-expand/pull/78))
## [8.0.3](https://github.com/motdotla/dotenv-expand/compare/v8.0.2...v8.0.3) (2022-03-21)
### Changed
- 🐞 Fixed defaults bug ([#71](https://github.com/motdotla/dotenv-expand/pull/71))
## [8.0.2](https://github.com/motdotla/dotenv-expand/compare/v8.0.1...v8.0.2) (2022-03-11)
### Changed
- 🐞 Fixed preloading bug
## [8.0.1](https://github.com/motdotla/dotenv-expand/compare/v8.0.0...v8.0.1) (2022-02-03)
### Added
- Added config.js to package.json lookups
## [8.0.0](https://github.com/motdotla/dotenv-expand/compare/v7.0.0...v8.0.0) (2022-02-03)
### Changed
- _Breaking:_ Bump to `v16.0.0` of dotenv
### Added
- Preload support 🎉 ([#31](https://github.com/motdotla/dotenv-expand/pull/31))
## [7.0.0](https://github.com/motdotla/dotenv-expand/compare/v6.0.1...v7.0.0) (2022-01-17)
### Changed
- _Breaking:_ Bump to `v15.0.0` of dotenv
## [6.0.1](https://github.com/motdotla/dotenv-expand/compare/v6.0.0...v6.0.1) (2022-01-17)
### Changed
- Updated README
## [6.0.0](https://github.com/motdotla/dotenv-expand/compare/v5.1.0...v6.0.0) (2022-01-17)
### Changed
- _Breaking_ Move default export to export of `expand` function ([#14b1f2](https://github.com/motdotla/dotenv-expand/commit/14b1f28f608bc73450dca8c5aaf3a1e4f65e09ca))
### Added
- Add default expansion 🎉 ([#39](https://github.com/motdotla/dotenv-expand/pull/39))
- Add missing type descriptions
## 5.1.0 and prior
Please see commit history.

24
node_modules/dotenv-expand/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,24 @@
Copyright (c) 2016, Scott Motte
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

174
node_modules/dotenv-expand/README.md generated vendored Normal file
View File

@@ -0,0 +1,174 @@
<div align="center">
🎉 announcing <a href="https://github.com/dotenvx/dotenvx">dotenvx</a>. <em><b>expansion AND command substitution</b>, multi-environment, encrypted envs, and more</em>.
</div>
&nbsp;
<div align="center">
**Special thanks to [our sponsors](https://github.com/sponsors/motdotla)**
<a href="https://tuple.app/dotenv">
<div>
<img src="https://res.cloudinary.com/dotenv-org/image/upload/w_1000,ar_16:9,c_fill,g_auto,e_sharpen/v1756831704/github_repo_sponsorship_gq4hvx.png" width="600" alt="Tuple">
</div>
<b>Tuple, the premier screen sharing app for developers on macOS and Windows.</b>
</a>
<hr>
</div>
# dotenv-expand [![NPM version](https://img.shields.io/npm/v/dotenv-expand.svg?style=flat-square)](https://www.npmjs.com/package/dotenv-expand)
<img src="https://raw.githubusercontent.com/motdotla/dotenv-expand/master/dotenv-expand.png" alt="dotenv-expand" align="right" width="200" />
Dotenv-expand adds variable expansion on top of [dotenv](http://github.com/motdotla/dotenv). If you find yourself needing to expand environment variables already existing on your machine, then dotenv-expand is your tool.
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/feross/standard)
[![LICENSE](https://img.shields.io/github/license/motdotla/dotenv-expand.svg)](LICENSE)
[![codecov](https://codecov.io/gh/motdotla/dotenv-expand/graph/badge.svg?token=pawWEyaMfg)](https://codecov.io/gh/motdotla/dotenv-expand)
## Install
```bash
# Install locally (recommended)
npm install dotenv-expand --save
```
Or installing with yarn? `yarn add dotenv-expand`
## Usage
Create a `.env` file in the root of your project:
```dosini
PASSWORD="s1mpl3"
DB_PASS=$PASSWORD
```
As early as possible in your application, import and configure dotenv and then expand dotenv:
```javascript
const dotenv = require('dotenv')
const dotenvExpand = require('dotenv-expand')
dotenvExpand.expand(dotenv.config())
console.log(process.env) // remove this after you've confirmed it is expanding
```
That's it. `process.env` now has the expanded keys and values you defined in your `.env` file.
```
dotenvExpand.expand(dotenv.config())
...
connectdb(process.env.DB_PASS)
```
### Preload
> Note: Consider using [`dotenvx`](https://github.com/dotenvx/dotenvx) instead of preloading. I am now doing (and recommending) so.
>
> It serves the same purpose (you do not need to require and load dotenv), has built-in expansion support, adds better debugging, and works with ANY language, framework, or platform. [motdotla](https://github.com/motdotla)
You can use the `--require` (`-r`) [command line option](https://nodejs.org/api/cli.html#cli_r_require_module) to preload dotenv & dotenv-expand. By doing this, you do not need to require and load dotenv or dotenv-expand in your application code. This is the preferred approach when using `import` instead of `require`.
```bash
$ node -r dotenv-expand/config your_script.js
```
The configuration options below are supported as command line arguments in the format `dotenv_config_<option>=value`
```bash
$ node -r dotenv-expand/config your_script.js dotenv_config_path=/custom/path/to/your/env/vars
```
Additionally, you can use environment variables to set configuration options. Command line arguments will precede these.
```bash
$ DOTENV_CONFIG_<OPTION>=value node -r dotenv-expand/config your_script.js
```
```bash
$ DOTENV_CONFIG_ENCODING=latin1 node -r dotenv-expand/config your_script.js dotenv_config_path=/custom/path/to/.env
```
## Examples
See [tests/.env.test](https://github.com/motdotla/dotenv-expand/blob/master/tests/.env.test) for simple and complex examples of variable expansion in your `.env`
file.
## Documentation
`dotenv-expand` exposes one function:
* expand
### Expand
`expand` will expand your environment variables.
```js
const env = {
parsed: {
BASIC: 'basic',
BASIC_EXPAND: '${BASIC}',
BASIC_EXPAND_SIMPLE: '$BASIC'
}
}
console.log(dotenvExpand.expand(env))
```
#### Options
##### processEnv
Default: `process.env`
Specify an object to write your secrets to. Defaults to `process.env` environment variables.
```js
const myEnv = {}
const env = {
processEnv: myEnv,
parsed: {
HELLO: 'World'
}
}
dotenvExpand.expand(env)
console.log(myEnv.HELLO) // World
console.log(process.env.HELLO) // undefined
```
## FAQ
### What rules does the expansion engine follow?
See a full list of rules [here](https://dotenvx.com/docs/env-file#interpolation).
### How can I avoid expanding pre-existing envs (already in my `process.env`, for example `pas$word`)?
As of `v12.0.0` dotenv-expand no longer expands `process.env`.
If you need this ability, use [dotenvx](https://github.com/dotenvx/dotenvx) by shipping an encrypted .env file with your code - allowing safe expansion at runtime.
### How can I override an existing environment variable?
Use [dotenvx](https://github.com/dotenvx/dotenvx) as dotenv-expand does not support this.
dotenv-expand is a separate module (without knowledge of the loading of `process.env` and the `.env` file) and so cannot reliably know what to override.
## Contributing Guide
See [CONTRIBUTING.md](CONTRIBUTING.md)
## CHANGELOG
See [CHANGELOG.md](CHANGELOG.md)
## Who's using dotenv-expand?
[These npm modules depend on it.](https://www.npmjs.com/browse/depended/dotenv-expand)

1
node_modules/dotenv-expand/config.d.ts generated vendored Normal file
View File

@@ -0,0 +1 @@
export {};

13
node_modules/dotenv-expand/config.js generated vendored Normal file
View File

@@ -0,0 +1,13 @@
(function () {
const dotenvExpand = require('./lib/main').expand
const env = require('dotenv').config(
Object.assign(
{},
require('dotenv/lib/env-options'),
require('dotenv/lib/cli-options')(process.argv)
)
)
return dotenvExpand(env)
})()

50
node_modules/dotenv-expand/lib/main.d.ts generated vendored Normal file
View File

@@ -0,0 +1,50 @@
// TypeScript Version: 3.0
/// <reference types="node" />
export interface DotenvPopulateInput {
[name: string]: string;
}
export interface DotenvParseInput {
[name: string]: string;
}
export interface DotenvParseOutput {
[name: string]: string;
}
export interface DotenvExpandOptions {
error?: Error;
/**
* Default: `process.env`
*
* Specify an object to write your secrets to. Defaults to process.env environment variables.
*
* example: `const processEnv = {}; require('dotenv').config({ processEnv: processEnv })`
*/
processEnv?: DotenvPopulateInput;
/**
* Default: `object`
*
* Object coming from dotenv's parsed result.
*/
parsed?: DotenvParseInput;
}
export interface DotenvExpandOutput {
error?: Error;
parsed?: DotenvParseOutput;
}
/**
* Adds variable expansion on top of dotenv.
*
* See https://docs.dotenv.org
*
* @param options - additional options. example: `{ processEnv: {}, error: null, parsed: { { KEY: 'value' } }`
* @returns an object with a `parsed` key if successful or `error` key if an error occurred. example: { parsed: { KEY: 'value' } }
*
*/
export function expand(options?: DotenvExpandOptions): DotenvExpandOutput

98
node_modules/dotenv-expand/lib/main.js generated vendored Normal file
View File

@@ -0,0 +1,98 @@
'use strict'
function _resolveEscapeSequences (value) {
return value.replace(/\\\$/g, '$')
}
function expandValue (value, processEnv, runningParsed) {
const env = { ...runningParsed, ...processEnv } // process.env wins
const regex = /(?<!\\)\${([^{}]+)}|(?<!\\)\$([A-Za-z_][A-Za-z0-9_]*)/g
let result = value
let match
const seen = new Set() // self-referential checker
while ((match = regex.exec(result)) !== null) {
seen.add(result)
const [template, bracedExpression, unbracedExpression] = match
const expression = bracedExpression || unbracedExpression
// match the operators `:+`, `+`, `:-`, and `-`
const opRegex = /(:\+|\+|:-|-)/
// find first match
const opMatch = expression.match(opRegex)
const splitter = opMatch ? opMatch[0] : null
const r = expression.split(splitter)
let defaultValue
let value
const key = r.shift()
if ([':+', '+'].includes(splitter)) {
defaultValue = env[key] ? r.join(splitter) : ''
value = null
} else {
defaultValue = r.join(splitter)
value = env[key]
}
if (value) {
// self-referential check
if (seen.has(value)) {
result = result.replace(template, defaultValue)
} else {
result = result.replace(template, value)
}
} else {
result = result.replace(template, defaultValue)
}
// if the result equaled what was in process.env and runningParsed then stop expanding
if (result === runningParsed[key]) {
break
}
regex.lastIndex = 0 // reset regex search position to re-evaluate after each replacement
}
return result
}
function expand (options) {
// for use with progressive expansion
const runningParsed = {}
let processEnv = process.env
if (options && options.processEnv != null) {
processEnv = options.processEnv
}
// dotenv.config() ran before this so the assumption is process.env has already been set
for (const key in options.parsed) {
let value = options.parsed[key]
// short-circuit scenario: process.env was already set prior to the file value
if (processEnv[key] && processEnv[key] !== value) {
value = processEnv[key]
} else {
value = expandValue(value, processEnv, runningParsed)
}
options.parsed[key] = _resolveEscapeSequences(value)
// for use with progressive expansion
runningParsed[key] = _resolveEscapeSequences(value)
}
for (const processKey in options.parsed) {
processEnv[processKey] = options.parsed[processKey]
}
return options
}
module.exports.expand = expand

56
node_modules/dotenv-expand/package.json generated vendored Normal file
View File

@@ -0,0 +1,56 @@
{
"name": "dotenv-expand",
"version": "12.0.3",
"description": "Expand environment variables using dotenv",
"main": "lib/main.js",
"types": "lib/main.d.ts",
"exports": {
".": {
"require": "./lib/main.js",
"types": "./lib/main.d.ts",
"default": "./lib/main.js"
},
"./config": "./config.js",
"./config.js": "./config.js",
"./package.json": "./package.json"
},
"scripts": {
"dts-check": "tsc --project tests/types/tsconfig.json",
"lint": "standard",
"pretest": "npm run lint && npm run dts-check",
"test": "tap tests/*.js --100 -Rspec",
"test:coverage": "tap --coverage-report=lcov",
"prerelease": "npm test",
"release": "standard-version"
},
"repository": {
"type": "git",
"url": "https://github.com/motdotla/dotenv-expand"
},
"funding": "https://dotenvx.com",
"author": "motdotla",
"keywords": [
"dotenv",
"expand",
"variables",
"interpolation",
"substitution",
"env",
".env"
],
"readmeFilename": "README.md",
"license": "BSD-2-Clause",
"devDependencies": {
"@types/node": "^18.11.3",
"standard": "^16.0.4",
"standard-version": "^9.5.0",
"tap": "^16.3.0",
"typescript": "^4.5.4"
},
"engines": {
"node": ">=12"
},
"dependencies": {
"dotenv": "^16.4.5"
}
}