update electron to v43

This commit is contained in:
olcxja 2026-07-09 22:38:33 +02:00
commit fb6c8b6ee9
5385 changed files with 513060 additions and 123058 deletions

137
electron/node_modules/dotenv-expand/CHANGELOG.md generated vendored Normal file
View file

@ -0,0 +1,137 @@
# 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/v11.0.7...master)
## [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.

View file

@ -1,36 +1,202 @@
# dotenv-expand
<div align="center">
πŸŽ‰ announcing <a href="https://github.com/dotenvx/dotenvx">dotenvx</a>. <em><b>better expansion</b>, run anywhere, multi-environment, encrypted envs</em>.
</div>
<img src="https://raw.githubusercontent.com/motdotla/dotenv-expand/master/dotenv-expand.png" alt="dotenv-expand" align="right" />
&nbsp;
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.
<div align="center">
<p>
<sup>
<a href="https://github.com/sponsors/motdotla">Dotenv libraries are supported by the community.</a>
</sup>
</p>
<sup>Special thanks to:</sup>
<br>
<br>
<a href="https://www.warp.dev/?utm_source=github&utm_medium=referral&utm_campaign=dotenv_p_20220831">
<div>
<img src="https://res.cloudinary.com/dotenv-org/image/upload/v1661980709/warp_hi8oqj.png" width="230" alt="Warp">
</div>
<b>Warp is a blazingly fast, Rust-based terminal reimagined to work like a modern app.</b>
<div>
<sup>Get more done in the CLI with real text editing, block-based output, and AI command search.</sup>
</div>
</a>
<br>
<a href="https://workos.com/?utm_campaign=github_repo&utm_medium=referral&utm_content=dotenv&utm_source=github">
<div>
<img src="https://res.cloudinary.com/dotenv-org/image/upload/c_scale,w_400/v1665605496/68747470733a2f2f73696e647265736f726875732e636f6d2f6173736574732f7468616e6b732f776f726b6f732d6c6f676f2d77686974652d62672e737667_zdmsbu.svg" width="270" alt="WorkOS">
</div>
<b>Your App, Enterprise Ready.</b>
<div>
<sup>Add Single Sign-On, Multi-Factor Auth, and more, in minutes instead of months.</sup>
</div>
</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.
[![BuildStatus](https://img.shields.io/travis/motdotla/dotenv-expand/master.svg?style=flat-square)](https://travis-ci.org/motdotla/dotenv-expand)
[![NPM version](https://img.shields.io/npm/v/dotenv-expand.svg?style=flat-square)](https://www.npmjs.com/package/dotenv-expand)
[![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
npm install dotenv --save
# Install locally (recommended)
npm install dotenv-expand --save
```
Or installing with yarn? `yarn add dotenv-expand`
## Usage
As early as possible in your application, require dotenv and dotenv-expand, and
wrap dotenv-expand around dotenv.
Create a `.env` file in the root of your project:
```js
var dotenv = require('dotenv')
var dotenvExpand = require('dotenv-expand')
var myEnv = dotenv.config()
dotenvExpand(myEnv)
```dosini
PASSWORD="s1mpl3"
DB_PASS=$PASSWORD
```
See [test/.env](./test/.env) for examples of variable expansion in your `.env`
file.
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?
The expansion engine roughly has the following rules:
* `$KEY` will expand any env with the name `KEY`
* `${KEY}` will expand any env with the name `KEY`
* `\$KEY` will escape the `$KEY` rather than expand
* `${KEY:-default}` will first attempt to expand any env with the name `KEY`. If not one, then it will return `default`
* `${KEY-default}` will first attempt to expand any env with the name `KEY`. If not one, then it will return `default`
You can 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`)?
Modify your `dotenv.config` to write to an empty object and pass that to `dotenvExpand.processEnv`.
```js
const dotenv = require('dotenv')
const dotenvExpand = require('dotenv-expand')
const myEnv = dotenv.config({ processEnv: {} }) // prevent writing to `process.env`
dotenvExpand.expand(myEnv)
```
## 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
electron/node_modules/dotenv-expand/config.d.ts generated vendored Normal file
View file

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

13
electron/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)
})()

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View file

@ -1,15 +0,0 @@
export = dotenv_expand;
interface DotenvResult {
error?: Error;
parsed?: {
[name: string]: string;
};
}
declare function dotenv_expand(config: DotenvResult): DotenvResult;
declare namespace dotenv_expand {
const prototype: {
};
}

50
electron/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

View file

@ -1,46 +1,86 @@
'use strict'
var dotenvExpand = function (config) {
// if ignoring process.env, use a blank object
var environment = config.ignoreProcessEnv ? {} : process.env
// * /
// * (\\)? # is it escaped with a backslash?
// * (\$) # literal $
// * (?!\() # shouldnt be followed by parenthesis
// * (\{?) # first brace wrap opening
// * ([\w.]+) # key
// * (?::-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))? # optional default nested 3 times
// * (\}?) # last brace warp closing
// * /xi
var interpolate = function (envValue) {
var matches = envValue.match(/(.?\${?(?:[a-zA-Z0-9_]+)?}?)/g) || []
const DOTENV_SUBSTITUTION_REGEX = /(\\)?(\$)(?!\()(\{?)([\w.]+)(?::?-((?:\$\{(?:\$\{(?:\$\{[^}]*\}|[^}])*}|[^}])*}|[^}])+))?(\}?)/gi
return matches.reduce(function (newEnv, match) {
var parts = /(.?)\${?([a-zA-Z0-9_]+)?}?/g.exec(match)
var prefix = parts[1]
var value, replacePart
if (prefix === '\\') {
replacePart = parts[0]
value = replacePart.replace('\\$', '$')
} else {
var key = parts[2]
replacePart = parts[0].substring(prefix.length)
// process.env value 'wins' over .env file's value
value = environment.hasOwnProperty(key) ? environment[key] : (config.parsed[key] || '')
// Resolve recursive interpolations
value = interpolate(value)
}
return newEnv.replace(replacePart, value)
}, envValue)
}
for (var configKey in config.parsed) {
var value = environment.hasOwnProperty(configKey) ? environment[configKey] : config.parsed[configKey]
config.parsed[configKey] = interpolate(value)
}
for (var processKey in config.parsed) {
environment[processKey] = config.parsed[processKey]
}
return config
function _resolveEscapeSequences (value) {
return value.replace(/\\\$/g, '$')
}
module.exports = dotenvExpand
function interpolate (value, processEnv, parsed) {
return value.replace(DOTENV_SUBSTITUTION_REGEX, (match, escaped, dollarSign, openBrace, key, defaultValue, closeBrace) => {
if (escaped === '\\') {
return match.slice(1)
} else {
if (processEnv[key]) {
if (processEnv[key] === parsed[key]) {
return processEnv[key]
} else {
// scenario: PASSWORD_EXPAND_NESTED=${PASSWORD_EXPAND}
return interpolate(processEnv[key], processEnv, parsed)
}
}
if (parsed[key]) {
// avoid recursion from EXPAND_SELF=$EXPAND_SELF
if (parsed[key] !== value) {
return interpolate(parsed[key], processEnv, parsed)
}
}
if (defaultValue) {
if (defaultValue.startsWith('$')) {
return interpolate(defaultValue, processEnv, parsed)
} else {
return defaultValue
}
}
return ''
}
})
}
function expand (options) {
let processEnv = process.env
if (options && options.processEnv != null) {
processEnv = options.processEnv
}
for (const key in options.parsed) {
let value = options.parsed[key]
const inProcessEnv = Object.prototype.hasOwnProperty.call(processEnv, key)
if (inProcessEnv) {
if (processEnv[key] === options.parsed[key]) {
// assume was set to processEnv from the .env file if the values match and therefore interpolate
value = interpolate(value, processEnv, options.parsed)
} else {
// do not interpolate - assume processEnv had the intended value even if containing a $.
value = processEnv[key]
}
} else {
// not inProcessEnv so assume interpolation for this .env key
value = interpolate(value, processEnv, options.parsed)
}
options.parsed[key] = _resolveEscapeSequences(value)
}
for (const processKey in options.parsed) {
processEnv[processKey] = options.parsed[processKey]
}
return options
}
module.exports.expand = expand

View file

@ -1,25 +1,56 @@
{
"name": "dotenv-expand",
"version": "5.1.0",
"version": "11.0.7",
"description": "Expand environment variables using dotenv",
"main": "lib/main.js",
"scripts": {
"test": "lab test/* --coverage",
"posttest": "npm run lint",
"lint": "standard"
"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"
"variables",
"interpolation",
"substitution",
"env",
".env"
],
"author": "motdotla",
"readmeFilename": "README.md",
"license": "BSD-2-Clause",
"devDependencies": {
"dotenv": "^4.0.0",
"lab": "^13.0.1",
"should": "^11.2.1",
"standard": "^9.0.2"
"@types/node": "^18.11.3",
"standard": "^16.0.4",
"standard-version": "^9.5.0",
"tap": "^16.3.0",
"typescript": "^4.5.4"
},
"types": "./index.d.ts"
"engines": {
"node": ">=12"
},
"dependencies": {
"dotenv": "^16.4.5"
}
}

6
electron/node_modules/dotenv-expand/tea.yaml generated vendored Normal file
View file

@ -0,0 +1,6 @@
# https://tea.xyz/what-is-this-file
---
version: 1.0.0
codeOwners:
- '0x248c5A7855A8861e3277341A1285c5D7dE64ba73'
quorum: 1