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

21
node_modules/find-file-up/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2015-2018, Jon Schlinkert.
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.

143
node_modules/find-file-up/README.md generated vendored Normal file
View File

@@ -0,0 +1,143 @@
# find-file-up [![NPM version](https://img.shields.io/npm/v/find-file-up.svg?style=flat)](https://www.npmjs.com/package/find-file-up) [![NPM monthly downloads](https://img.shields.io/npm/dm/find-file-up.svg?style=flat)](https://npmjs.org/package/find-file-up) [![NPM total downloads](https://img.shields.io/npm/dt/find-file-up.svg?style=flat)](https://npmjs.org/package/find-file-up) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/find-file-up.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/find-file-up)
> Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.
Please consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save find-file-up
```
## Usage
```js
const find = require('find-file-up');
```
## async
```js
find(filename, cwd, limit, callback);
```
**Example**
* `filename` **String** - (required) the name of the file to find.
* `cwd` **String** - (optional) the starting directory. This value can be prefixed with `~` to search from the user home directory.
* `limit` **Number** - (optional) limit the number of directories to recurse.
* `callback` **Functional** - (optional) A promise is returned when no callback is passed.
**Promise example**
```js
// use "~" to search user home
find('foo.txt', '~/a/b/c')
.then(file => console.log(file)) //=> '/Users/jonschlinkert/foo.txt'
.catch(console.error);
```
**With async-await**
```js
(async function() {
const file = await find('foo.txt', '~/a/b/c');
console.log(file);
//=> '/Users/jonschlinkert/foo.txt'
})();
```
**Callback example**
```js
// find `foo.txt` starting at the given directory
find('foo.txt', 'a/b/c', function(err, file) {
if (err) throw err;
console.log(file);
//=> /Users/jonschlinkert/dev/find-file-up/fixtures/foo.txt
});
```
### sync
```js
find.sync(filename, cwd, limit);
```
**Example**
* `filename` **String** - (required) the name of the file to find.
* `cwd` **String** - (optional) the starting directory.
* `limit` **Number** - (optional) limit the number of directories to recurse.
```js
const file = find.sync('foo.txt', 'a/b/c/');
```
## About
<details>
<summary><strong>Contributing</strong></summary>
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
</details>
<details>
<summary><strong>Running Tests</strong></summary>
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
```sh
$ npm install && npm test
```
</details>
<details>
<summary><strong>Building docs</strong></summary>
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ npm install -g verbose/verb#dev verb-generate-readme && verb
```
</details>
### Related projects
You might also be interested in these projects:
* [find-pkg](https://www.npmjs.com/package/find-pkg): Find the first directory with a package.json, recursing up, starting with the given directory. Similar… [more](https://github.com/jonschlinkert/find-pkg) | [homepage](https://github.com/jonschlinkert/find-pkg "Find the first directory with a package.json, recursing up, starting with the given directory. Similar to look-up but does not support globs and only searches for package.json. Async and sync.")
* [findup-sync](https://www.npmjs.com/package/findup-sync): Find the first file matching a given pattern in the current directory or the nearest… [more](https://github.com/js-cli/node-findup-sync#readme) | [homepage](https://github.com/js-cli/node-findup-sync#readme "Find the first file matching a given pattern in the current directory or the nearest ancestor directory.")
* [global-modules](https://www.npmjs.com/package/global-modules): The directory used by npm for globally installed npm modules. | [homepage](https://github.com/jonschlinkert/global-modules "The directory used by npm for globally installed npm modules.")
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 26 | [jonschlinkert](https://github.com/jonschlinkert) |
| 1 | [pointnet](https://github.com/pointnet) |
### Author
**Jon Schlinkert**
* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)
* [GitHub Profile](https://github.com/jonschlinkert)
* [Twitter Profile](https://twitter.com/jonschlinkert)
### License
Copyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).
Released under the [MIT License](LICENSE).
***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on March 28, 2018._

77
node_modules/find-file-up/index.js generated vendored Normal file
View File

@@ -0,0 +1,77 @@
'use strict';
const fs = require('fs');
const path = require('path');
const util = require('util');
const resolve = require('resolve-dir');
function find(filename, cwd, limit = Infinity, callback) {
if (typeof cwd === 'function') {
callback = cwd;
cwd = null;
}
if (typeof limit === 'function') {
callback = limit;
limit = Infinity;
}
if (typeof callback !== 'function') {
return find.promise(filename, cwd, limit);
}
const dirname = path.resolve(cwd ? resolve(cwd) : '.');
let depth = 0;
let prev;
function recurse(dirname, next) {
const filepath = path.join(dirname, filename);
fs.stat(filepath, function(err, stat) {
if (err && err.code !== 'ENOENT') {
next(err);
return;
}
if (stat) {
next(null, filepath);
return;
}
if (prev !== dirname && depth < limit) {
prev = dirname;
depth++;
recurse(path.dirname(dirname), next);
return;
}
next();
});
}
recurse(dirname, callback);
}
find.promise = function(filename, cwd, limit) {
return util.promisify(find)(filename, cwd, limit);
};
find.sync = function(filename, cwd, limit = Infinity) {
let dirname = path.resolve(cwd ? resolve(cwd) : '.');
let depth = 0;
let prev;
do {
const filepath = path.join(dirname, filename);
if (fs.existsSync(filepath)) {
return filepath;
}
depth++;
prev = dirname;
dirname = path.dirname(dirname);
} while (prev !== dirname && depth <= limit);
};
module.exports = find;

60
node_modules/find-file-up/package.json generated vendored Normal file
View File

@@ -0,0 +1,60 @@
{
"name": "find-file-up",
"description": "Find a file fast, by starting at the given cwd and recursing up one directory until the file is found or we run out of directories.",
"version": "2.0.1",
"homepage": "https://github.com/jonschlinkert/find-file-up",
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
"contributors": [
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
"pointnet (https://github.com/pointnet)"
],
"repository": "jonschlinkert/find-file-up",
"bugs": {
"url": "https://github.com/jonschlinkert/find-file-up/issues"
},
"license": "MIT",
"files": [
"index.js"
],
"main": "index.js",
"engines": {
"node": ">=8"
},
"scripts": {
"test": "mocha"
},
"dependencies": {
"resolve-dir": "^1.0.1"
},
"devDependencies": {
"delete": "^1.1.0",
"gulp-format-md": "^1.0.0",
"mocha": "^3.5.3",
"write": "^1.0.3"
},
"keywords": [
"file",
"find",
"up"
],
"verb": {
"toc": false,
"layout": "default",
"tasks": [
"readme"
],
"plugins": [
"gulp-format-md"
],
"related": {
"list": [
"find-pkg",
"findup-sync",
"global-modules"
]
},
"lint": {
"reflinks": true
}
}
}