mirror of
https://github.com/deployphp/action.git
synced 2025-06-29 04:34:15 +00:00
Add node_modules
This commit is contained in:
parent
e1f786311a
commit
554eb0b122
994 changed files with 195567 additions and 0 deletions
6
node_modules/fast-glob/out/managers/patterns.d.ts
generated
vendored
Normal file
6
node_modules/fast-glob/out/managers/patterns.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
export declare function transform(patterns: string[]): string[];
|
||||
/**
|
||||
* This package only works with forward slashes as a path separator.
|
||||
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
||||
*/
|
||||
export declare function removeDuplicateSlashes(pattern: string): string;
|
21
node_modules/fast-glob/out/managers/patterns.js
generated
vendored
Normal file
21
node_modules/fast-glob/out/managers/patterns.js
generated
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.removeDuplicateSlashes = exports.transform = void 0;
|
||||
/**
|
||||
* Matches a sequence of two or more consecutive slashes, excluding the first two slashes at the beginning of the string.
|
||||
* The latter is due to the presence of the device path at the beginning of the UNC path.
|
||||
* @todo rewrite to negative lookbehind with the next major release.
|
||||
*/
|
||||
const DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
||||
function transform(patterns) {
|
||||
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
||||
}
|
||||
exports.transform = transform;
|
||||
/**
|
||||
* This package only works with forward slashes as a path separator.
|
||||
* Because of this, we cannot use the standard `path.normalize` method, because on Windows platform it will use of backslashes.
|
||||
*/
|
||||
function removeDuplicateSlashes(pattern) {
|
||||
return pattern.replace(DOUBLE_SLASH_RE, '/');
|
||||
}
|
||||
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
22
node_modules/fast-glob/out/managers/tasks.d.ts
generated
vendored
Normal file
22
node_modules/fast-glob/out/managers/tasks.d.ts
generated
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
import Settings from '../settings';
|
||||
import { Pattern, PatternsGroup } from '../types';
|
||||
export declare type Task = {
|
||||
base: string;
|
||||
dynamic: boolean;
|
||||
patterns: Pattern[];
|
||||
positive: Pattern[];
|
||||
negative: Pattern[];
|
||||
};
|
||||
export declare function generate(patterns: Pattern[], settings: Settings): Task[];
|
||||
/**
|
||||
* Returns tasks grouped by basic pattern directories.
|
||||
*
|
||||
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
|
||||
* This is necessary because directory traversal starts at the base directory and goes deeper.
|
||||
*/
|
||||
export declare function convertPatternsToTasks(positive: Pattern[], negative: Pattern[], dynamic: boolean): Task[];
|
||||
export declare function getPositivePatterns(patterns: Pattern[]): Pattern[];
|
||||
export declare function getNegativePatternsAsPositive(patterns: Pattern[], ignore: Pattern[]): Pattern[];
|
||||
export declare function groupPatternsByBaseDirectory(patterns: Pattern[]): PatternsGroup;
|
||||
export declare function convertPatternGroupsToTasks(positive: PatternsGroup, negative: Pattern[], dynamic: boolean): Task[];
|
||||
export declare function convertPatternGroupToTask(base: string, positive: Pattern[], negative: Pattern[], dynamic: boolean): Task;
|
80
node_modules/fast-glob/out/managers/tasks.js
generated
vendored
Normal file
80
node_modules/fast-glob/out/managers/tasks.js
generated
vendored
Normal file
|
@ -0,0 +1,80 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
||||
const utils = require("../utils");
|
||||
function generate(patterns, settings) {
|
||||
const positivePatterns = getPositivePatterns(patterns);
|
||||
const negativePatterns = getNegativePatternsAsPositive(patterns, settings.ignore);
|
||||
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
||||
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
||||
const staticTasks = convertPatternsToTasks(staticPatterns, negativePatterns, /* dynamic */ false);
|
||||
const dynamicTasks = convertPatternsToTasks(dynamicPatterns, negativePatterns, /* dynamic */ true);
|
||||
return staticTasks.concat(dynamicTasks);
|
||||
}
|
||||
exports.generate = generate;
|
||||
/**
|
||||
* Returns tasks grouped by basic pattern directories.
|
||||
*
|
||||
* Patterns that can be found inside (`./`) and outside (`../`) the current directory are handled separately.
|
||||
* This is necessary because directory traversal starts at the base directory and goes deeper.
|
||||
*/
|
||||
function convertPatternsToTasks(positive, negative, dynamic) {
|
||||
const tasks = [];
|
||||
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
||||
const patternsInsideCurrentDirectory = utils.pattern.getPatternsInsideCurrentDirectory(positive);
|
||||
const outsideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsOutsideCurrentDirectory);
|
||||
const insideCurrentDirectoryGroup = groupPatternsByBaseDirectory(patternsInsideCurrentDirectory);
|
||||
tasks.push(...convertPatternGroupsToTasks(outsideCurrentDirectoryGroup, negative, dynamic));
|
||||
/*
|
||||
* For the sake of reducing future accesses to the file system, we merge all tasks within the current directory
|
||||
* into a global task, if at least one pattern refers to the root (`.`). In this case, the global task covers the rest.
|
||||
*/
|
||||
if ('.' in insideCurrentDirectoryGroup) {
|
||||
tasks.push(convertPatternGroupToTask('.', patternsInsideCurrentDirectory, negative, dynamic));
|
||||
}
|
||||
else {
|
||||
tasks.push(...convertPatternGroupsToTasks(insideCurrentDirectoryGroup, negative, dynamic));
|
||||
}
|
||||
return tasks;
|
||||
}
|
||||
exports.convertPatternsToTasks = convertPatternsToTasks;
|
||||
function getPositivePatterns(patterns) {
|
||||
return utils.pattern.getPositivePatterns(patterns);
|
||||
}
|
||||
exports.getPositivePatterns = getPositivePatterns;
|
||||
function getNegativePatternsAsPositive(patterns, ignore) {
|
||||
const negative = utils.pattern.getNegativePatterns(patterns).concat(ignore);
|
||||
const positive = negative.map(utils.pattern.convertToPositivePattern);
|
||||
return positive;
|
||||
}
|
||||
exports.getNegativePatternsAsPositive = getNegativePatternsAsPositive;
|
||||
function groupPatternsByBaseDirectory(patterns) {
|
||||
const group = {};
|
||||
return patterns.reduce((collection, pattern) => {
|
||||
const base = utils.pattern.getBaseDirectory(pattern);
|
||||
if (base in collection) {
|
||||
collection[base].push(pattern);
|
||||
}
|
||||
else {
|
||||
collection[base] = [pattern];
|
||||
}
|
||||
return collection;
|
||||
}, group);
|
||||
}
|
||||
exports.groupPatternsByBaseDirectory = groupPatternsByBaseDirectory;
|
||||
function convertPatternGroupsToTasks(positive, negative, dynamic) {
|
||||
return Object.keys(positive).map((base) => {
|
||||
return convertPatternGroupToTask(base, positive[base], negative, dynamic);
|
||||
});
|
||||
}
|
||||
exports.convertPatternGroupsToTasks = convertPatternGroupsToTasks;
|
||||
function convertPatternGroupToTask(base, positive, negative, dynamic) {
|
||||
return {
|
||||
dynamic,
|
||||
positive,
|
||||
negative,
|
||||
base,
|
||||
patterns: [].concat(positive, negative.map(utils.pattern.convertToNegativePattern))
|
||||
};
|
||||
}
|
||||
exports.convertPatternGroupToTask = convertPatternGroupToTask;
|
Loading…
Add table
Add a link
Reference in a new issue