mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 12:44:14 +00:00
Add node_modules
This commit is contained in:
parent
e1f786311a
commit
554eb0b122
994 changed files with 195567 additions and 0 deletions
33
node_modules/fast-glob/out/utils/path.js
generated
vendored
Normal file
33
node_modules/fast-glob/out/utils/path.js
generated
vendored
Normal file
|
@ -0,0 +1,33 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeLeadingDotSegment = exports.escape = exports.makeAbsolute = exports.unixify = void 0;
|
||||
const path = require("path");
|
||||
const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
|
||||
const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
|
||||
/**
|
||||
* Designed to work only with simple paths: `dir\\file`.
|
||||
*/
|
||||
function unixify(filepath) {
|
||||
return filepath.replace(/\\/g, '/');
|
||||
}
|
||||
exports.unixify = unixify;
|
||||
function makeAbsolute(cwd, filepath) {
|
||||
return path.resolve(cwd, filepath);
|
||||
}
|
||||
exports.makeAbsolute = makeAbsolute;
|
||||
function escape(pattern) {
|
||||
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, '\\$2');
|
||||
}
|
||||
exports.escape = escape;
|
||||
function removeLeadingDotSegment(entry) {
|
||||
// We do not use `startsWith` because this is 10x slower than current implementation for some cases.
|
||||
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
||||
if (entry.charAt(0) === '.') {
|
||||
const secondCharactery = entry.charAt(1);
|
||||
if (secondCharactery === '/' || secondCharactery === '\\') {
|
||||
return entry.slice(LEADING_DOT_SEGMENT_CHARACTERS_COUNT);
|
||||
}
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
Loading…
Add table
Add a link
Reference in a new issue