feat: docker compose maybe

This commit is contained in:
2023-11-13 16:10:04 -05:00
parent 180b261e40
commit b625ccd8d6
8031 changed files with 2182966 additions and 0 deletions

13
node_modules/tiny-glob/index.d.ts generated vendored Normal file
View File

@ -0,0 +1,13 @@
type Options = {
cwd?: string;
dot?: boolean;
absolute?: boolean;
filesOnly?: boolean;
flush?: boolean;
};
type FilePath = string;
declare function glob(str: string, opts?: Options): Promise<FilePath[]>;
export = glob;

83
node_modules/tiny-glob/index.js generated vendored Normal file
View File

@ -0,0 +1,83 @@
const fs = require('fs');
const globrex = require('globrex');
const { promisify } = require('util');
const globalyzer = require('globalyzer');
const { join, resolve, relative } = require('path');
const isHidden = /(^|[\\\/])\.[^\\\/\.]/g;
const readdir = promisify(fs.readdir);
const stat = promisify(fs.stat);
let CACHE = {};
async function walk(output, prefix, lexer, opts, dirname='', level=0) {
const rgx = lexer.segments[level];
const dir = resolve(opts.cwd, prefix, dirname);
const files = await readdir(dir);
const { dot, filesOnly } = opts;
let i=0, len=files.length, file;
let fullpath, relpath, stats, isMatch;
for (; i < len; i++) {
fullpath = join(dir, file=files[i]);
relpath = dirname ? join(dirname, file) : file;
if (!dot && isHidden.test(relpath)) continue;
isMatch = lexer.regex.test(relpath);
if ((stats=CACHE[relpath]) === void 0) {
CACHE[relpath] = stats = fs.lstatSync(fullpath);
}
if (!stats.isDirectory()) {
isMatch && output.push(relative(opts.cwd, fullpath));
continue;
}
if (rgx && !rgx.test(file)) continue;
!filesOnly && isMatch && output.push(join(prefix, relpath));
await walk(output, prefix, lexer, opts, relpath, rgx && rgx.toString() !== lexer.globstar && level + 1);
}
}
/**
* Find files using bash-like globbing.
* All paths are normalized compared to node-glob.
* @param {String} str Glob string
* @param {String} [options.cwd='.'] Current working directory
* @param {Boolean} [options.dot=false] Include dotfile matches
* @param {Boolean} [options.absolute=false] Return absolute paths
* @param {Boolean} [options.filesOnly=false] Do not include folders if true
* @param {Boolean} [options.flush=false] Reset cache object
* @returns {Array} array containing matching files
*/
module.exports = async function (str, opts={}) {
if (!str) return [];
let glob = globalyzer(str);
opts.cwd = opts.cwd || '.';
if (!glob.isGlob) {
try {
let resolved = resolve(opts.cwd, str);
let dirent = await stat(resolved);
if (opts.filesOnly && !dirent.isFile()) return [];
return opts.absolute ? [resolved] : [str];
} catch (err) {
if (err.code != 'ENOENT') throw err;
return [];
}
}
if (opts.flush) CACHE = {};
let matches = [];
const { path } = globrex(glob.glob, { filepath:true, globstar:true, extended:true });
path.globstar = path.globstar.toString();
await walk(matches, glob.base, path, opts, '.', 0);
return opts.absolute ? matches.map(x => resolve(opts.cwd, x)) : matches;
};

21
node_modules/tiny-glob/license generated vendored Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018 Terkel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

37
node_modules/tiny-glob/package.json generated vendored Normal file
View File

@ -0,0 +1,37 @@
{
"name": "tiny-glob",
"version": "0.2.9",
"description": "Tiny and extremely fast globbing",
"repository": "terkelg/tiny-glob",
"types": "index.d.ts",
"license": "MIT",
"author": {
"name": "Terkel Gjervig",
"email": "terkel@terkel.com",
"url": "https://terkel.com"
},
"files": [
"*.js",
"*.d.ts"
],
"scripts": {
"bench": "node bench",
"test": "tape test/*.js | tap-spec"
},
"dependencies": {
"globalyzer": "0.1.0",
"globrex": "^0.1.2"
},
"devDependencies": {
"tap-spec": "^5.0.0",
"tape": "^5.0.1"
},
"keywords": [
"glob",
"globbing",
"patterns",
"wildcard",
"pattern-matching",
"expansion"
]
}

147
node_modules/tiny-glob/readme.md generated vendored Normal file
View File

@ -0,0 +1,147 @@
<p align="center">
<img src="https://github.com/terkelg/tiny-glob/raw/master/tiny-glob.png" alt="Tiny Glob" width="450" />
</p>
<h1 align="center">tiny glob</h1>
<p align="center">
<a href="https://npmjs.org/package/tiny-glob">
<img src="https://img.shields.io/npm/v/tiny-glob.svg" alt="version" />
</a>
<a href="https://github.com/terkelg/tiny-glob/actions">
<img src="https://github.com/terkelg/tiny-glob/actions/workflows/ci.yml/badge.svg" alt="CI" />
</a>
<a href="https://npmjs.org/package/tiny-glob">
<img src="https://img.shields.io/npm/dm/tiny-glob.svg" alt="downloads" />
</a>
<a href="https://packagephobia.now.sh/result?p=tiny-glob">
<img src="https://packagephobia.now.sh/badge?p=tiny-glob" alt="install size" />
</a>
</p>
<p align="center"><b>Tiny and extremely fast library to match files and folders using glob patterns.</b></p>
<br />
"Globs" is the common name for a specific type of pattern used to match files and folders. It's the patterns you type when you do stuff like `ls *.js` in your shell or put `src/*` in a `.gitignore` file. When used to match filenames, it's sometimes called a "wildcard".
## Install
```
npm install tiny-glob
```
## Core Features
- 🔥 **extremely fast:** ~350% faster than [node-glob](https://github.com/isaacs/node-glob) and ~230% faster than [fast-glob](https://github.com/mrmlnc/fast-glob)
- 💪 **powerful:** supports advanced globbing patterns (`ExtGlob`)
- 📦 **tiny**: only ~45 LOC with 2 small dependencies
- 👫 **friendly**: simple and easy to use api
- 🎭 **cross-platform**: supports both unix and windows
## Usage
```js
const glob = require('tiny-glob');
(async function(){
let files = await glob('src/*/*.{js,md}');
// => [ ... ] array of matching files
})();
```
## API
### glob(str, options)
Type: `function`<br>
Returns: `Array`
Return array of matching files and folders
This function is `async` and returns a promise.
#### str
Type: `String`
The glob pattern to match against.
> **OBS**: Please only use forward-slashes in glob expressions. Even on [windows](#windows)
#### options.cwd
Type: `String`<br>
Default: `'.'`
Change default working directory.
#### options.dot
Type: `Boolean`<br>
Default: `false`
Allow patterns to match filenames or directories that begin with a period (`.`).
#### options.absolute
Type: `Boolean`<br>
Default: `false`
Return matches as absolute paths.
#### options.filesOnly
Type: `Boolean`<br>
Default: `false`
Skip directories and return matched files only.
#### options.flush
Type: `Boolean`<br>
Default: `false`
Flush the internal cache object.
## Windows
Though Windows may use `/`, `\`, or `\\` as path separators, you can **only** use forward-slashes (`/`) when specifying glob expressions. Any back-slashes (`\`) will be interpreted as escape characters instead of path separators.
This is common across many glob-based modules; see [`node-glob`](https://github.com/isaacs/node-glob#windows) for corroboration.
## Benchmarks
```
glob x 13,405 ops/sec ±1.80% (85 runs sampled)
fast-glob x 25,745 ops/sec ±2.76% (59 runs sampled)
tiny-glob x 102,658 ops/sec ±0.79% (91 runs sampled)
Fastest is tiny-glob
┌───────────┬─────────────────────────┬─────────────┬────────────────┐
│ Name │ Mean time │ Ops/sec │ Diff │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ glob │ 0.00007459990597268128 │ 13,404.843 │ N/A │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ fast-glob │ 0.000038842529587611705 │ 25,744.976 │ 92.06% faster │
├───────────┼─────────────────────────┼─────────────┼────────────────┤
│ tiny-glob │ 0.00000974110141018254 │ 102,657.796 │ 298.75% faster │
└───────────┴─────────────────────────┴─────────────┴────────────────┘
```
## Advanced Globbing
Learn more about advanced globbing
- [Greg's Wiki](https://mywiki.wooledge.org/glob)
- [Bash Extended Globbing](https://www.linuxjournal.com/content/bash-extended-globbing)
## License
MIT © [Terkel Gjervig](https://terkel.com)

13
node_modules/tiny-glob/sync.d.ts generated vendored Normal file
View File

@ -0,0 +1,13 @@
type Options = {
cwd?: string;
dot?: boolean;
absolute?: boolean;
filesOnly?: boolean;
flush?: boolean;
};
type FilePath = string;
declare function glob(str: string, opts?: Options): FilePath[];
export = glob;

81
node_modules/tiny-glob/sync.js generated vendored Normal file
View File

@ -0,0 +1,81 @@
const fs = require('fs');
const globrex = require('globrex');
const globalyzer = require('globalyzer');
const { join, resolve, relative } = require('path');
const isHidden = /(^|[\\\/])\.[^\\\/\.]/g;
let CACHE = {};
function walk(output, prefix, lexer, opts, dirname='', level=0) {
const rgx = lexer.segments[level];
const dir = resolve(opts.cwd, prefix, dirname);
const files = fs.readdirSync(dir);
const { dot, filesOnly } = opts;
let i=0, len=files.length, file;
let fullpath, relpath, stats, isMatch;
for (; i < len; i++) {
fullpath = join(dir, file=files[i]);
relpath = dirname ? join(dirname, file) : file;
if (!dot && isHidden.test(relpath)) continue;
isMatch = lexer.regex.test(relpath);
if ((stats=CACHE[relpath]) === void 0) {
CACHE[relpath] = stats = fs.lstatSync(fullpath);
}
if (!stats.isDirectory()) {
isMatch && output.push(relative(opts.cwd, fullpath));
continue;
}
if (rgx && !rgx.test(file)) continue;
!filesOnly && isMatch && output.push(join(prefix, relpath));
walk(output, prefix, lexer, opts, relpath, rgx && rgx.toString() !== lexer.globstar && level + 1);
}
}
/**
* Find files using bash-like globbing.
* All paths are normalized compared to node-glob.
* @param {String} str Glob string
* @param {String} [options.cwd='.'] Current working directory
* @param {Boolean} [options.dot=false] Include dotfile matches
* @param {Boolean} [options.absolute=false] Return absolute paths
* @param {Boolean} [options.filesOnly=false] Do not include folders if true
* @param {Boolean} [options.flush=false] Reset cache object
* @returns {Array} array containing matching files
*/
module.exports = function (str, opts={}) {
if (!str) return [];
let glob = globalyzer(str);
opts.cwd = opts.cwd || '.';
if (!glob.isGlob) {
try {
let resolved = resolve(opts.cwd, str);
let dirent = fs.statSync(resolved);
if (opts.filesOnly && !dirent.isFile()) return [];
return opts.absolute ? [resolved] : [str];
} catch (err) {
if (err.code != 'ENOENT') throw err;
return [];
}
}
if (opts.flush) CACHE = {};
let matches = [];
const { path } = globrex(glob.glob, { filepath:true, globstar:true, extended:true });
path.globstar = path.globstar.toString();
walk(matches, glob.base, path, opts, '.', 0);
return opts.absolute ? matches.map(x => resolve(opts.cwd, x)) : matches;
};