@sprucelabs/globby 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/.spruce/settings.json +11 -0
- package/build/esm/globbyUtil.d.ts +7 -0
- package/build/esm/globbyUtil.js +28 -0
- package/build/esm/index.d.ts +2 -0
- package/build/esm/index.js +2 -0
- package/build/globbyUtil.d.ts +7 -0
- package/build/globbyUtil.js +22 -0
- package/build/index.d.ts +2 -0
- package/build/index.js +7 -0
- package/package.json +92 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as globbyNamespace } from 'globby';
|
|
2
|
+
declare const globby: {
|
|
3
|
+
(patterns: string | string[], options?: Partial<globbyNamespace.GlobbyOptions>): Promise<string[]>;
|
|
4
|
+
sep: "\\" | "/";
|
|
5
|
+
sync(patterns: string | string[], options?: Partial<globbyNamespace.GlobbyOptions>): string[];
|
|
6
|
+
};
|
|
7
|
+
export default globby;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import path from 'path';
|
|
11
|
+
import coreGlobby from 'globby';
|
|
12
|
+
const globby = function globby(patterns, options) {
|
|
13
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
14
|
+
const pats = normalizePaths(patterns);
|
|
15
|
+
return coreGlobby(pats, options);
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
globby.sep = path.sep;
|
|
19
|
+
globby.sync = function (patterns, options) {
|
|
20
|
+
const pats = normalizePaths(patterns);
|
|
21
|
+
return coreGlobby.sync(pats, options);
|
|
22
|
+
};
|
|
23
|
+
function normalizePaths(patterns) {
|
|
24
|
+
const normalized = Array.isArray(patterns) ? patterns : [patterns];
|
|
25
|
+
const pats = normalized.map((n) => n.split(globby.sep).join(path.posix.sep));
|
|
26
|
+
return pats;
|
|
27
|
+
}
|
|
28
|
+
export default globby;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as globbyNamespace } from 'globby';
|
|
2
|
+
declare const globby: {
|
|
3
|
+
(patterns: string | string[], options?: Partial<globbyNamespace.GlobbyOptions>): Promise<string[]>;
|
|
4
|
+
sep: "\\" | "/";
|
|
5
|
+
sync(patterns: string | string[], options?: Partial<globbyNamespace.GlobbyOptions>): string[];
|
|
6
|
+
};
|
|
7
|
+
export default globby;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const path_1 = __importDefault(require("path"));
|
|
7
|
+
const globby_1 = __importDefault(require("globby"));
|
|
8
|
+
const globby = async function globby(patterns, options) {
|
|
9
|
+
const pats = normalizePaths(patterns);
|
|
10
|
+
return (0, globby_1.default)(pats, options);
|
|
11
|
+
};
|
|
12
|
+
globby.sep = path_1.default.sep;
|
|
13
|
+
globby.sync = function (patterns, options) {
|
|
14
|
+
const pats = normalizePaths(patterns);
|
|
15
|
+
return globby_1.default.sync(pats, options);
|
|
16
|
+
};
|
|
17
|
+
function normalizePaths(patterns) {
|
|
18
|
+
const normalized = Array.isArray(patterns) ? patterns : [patterns];
|
|
19
|
+
const pats = normalized.map((n) => n.split(globby.sep).join(path_1.default.posix.sep));
|
|
20
|
+
return pats;
|
|
21
|
+
}
|
|
22
|
+
exports.default = globby;
|
package/build/index.d.ts
ADDED
package/build/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const globbyUtil_1 = __importDefault(require("globbyUtil"));
|
|
7
|
+
exports.default = globbyUtil_1.default;
|
package/package.json
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sprucelabs/globby",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"skill": {
|
|
5
|
+
"namespace": "globby",
|
|
6
|
+
"upgradeIgnoreList": [
|
|
7
|
+
"globby"
|
|
8
|
+
]
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"build"
|
|
12
|
+
],
|
|
13
|
+
"main": "./build/index.js",
|
|
14
|
+
"types": "./build/index.d.ts",
|
|
15
|
+
"module": "./build/esm/index.js",
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"keywords": [
|
|
18
|
+
"node",
|
|
19
|
+
"components",
|
|
20
|
+
"sprucebot",
|
|
21
|
+
"sprucelabs"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build.ci": "yarn build.tsc && yarn build.resolve-paths && yarn lint",
|
|
25
|
+
"build.copy-files": "mkdir -p build && rsync -avzq --exclude='*.ts' ./src/ ./build/",
|
|
26
|
+
"build.dev": "yarn build.tsc --sourceMap ; yarn resolve-paths.lint",
|
|
27
|
+
"build.dist": "tsc --project tsconfig.dist.json && yarn build.resolve-paths && mv build esm && yarn build.esm-postbuild && yarn build.tsc && yarn build.resolve-paths && mv esm build/ && yarn clean.dist",
|
|
28
|
+
"build.esm-postbuild": "esm-postbuild --target esm --patterns '**/*.js'",
|
|
29
|
+
"build.resolve-paths": "resolve-path-aliases --target build --patterns '**/*.js,**/*.d.ts'",
|
|
30
|
+
"build.tsc": "yarn build.copy-files && tsc",
|
|
31
|
+
"clean": "yarn clean.build",
|
|
32
|
+
"clean.all": "yarn clean.dependencies && yarn clean.build",
|
|
33
|
+
"clean.build": "rm -rf build/",
|
|
34
|
+
"clean.dist": "rm -rf build/__tests__ build/esm/__tests__",
|
|
35
|
+
"clean.dependencies": "rm -rf node_modules/ package-lock.json yarn.lock",
|
|
36
|
+
"fix.lint": "eslint --fix --cache '**/*.ts'",
|
|
37
|
+
"lint": "eslint --cache '**/*.ts'",
|
|
38
|
+
"lint.tsc": "tsc -p . --noEmit",
|
|
39
|
+
"post.watch.build": "yarn build.copy-files && yarn build.resolve-paths",
|
|
40
|
+
"rebuild": "yarn clean.all && yarn && yarn build.dev",
|
|
41
|
+
"resolve-paths.lint": "yarn build.resolve-paths ; yarn lint",
|
|
42
|
+
"test": "jest",
|
|
43
|
+
"update.dependencies": "yarn clean.dependencies && yarn",
|
|
44
|
+
"watch.build.dev": "tsc-watch --sourceMap --onCompilationComplete 'yarn post.watch.build'",
|
|
45
|
+
"watch.lint": "concurrently 'yarn lint' \"chokidar 'src/**/*' -c 'yarn lint.tsc'\"",
|
|
46
|
+
"watch.rebuild": "yarn clean.all && yarn && yarn watch.build.dev",
|
|
47
|
+
"watch.tsc": "tsc -w"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@sprucelabs/spruce-skill-utils": "^28.1.97",
|
|
51
|
+
"globby": "^11.0.4"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@sprucelabs/esm-postbuild": "^3.0.3",
|
|
55
|
+
"@sprucelabs/jest-json-reporter": "^7.0.3",
|
|
56
|
+
"@sprucelabs/resolve-path-aliases": "^1.1.192",
|
|
57
|
+
"@sprucelabs/semantic-release": "^4.0.8",
|
|
58
|
+
"@sprucelabs/spruce-test-fixtures": "^56.0.17",
|
|
59
|
+
"@sprucelabs/test": "^7.7.424",
|
|
60
|
+
"@sprucelabs/test-utils": "^3.4.14",
|
|
61
|
+
"@types/node": "^18.15.0",
|
|
62
|
+
"chokidar-cli": "^3.0.0",
|
|
63
|
+
"concurrently": "^7.6.0",
|
|
64
|
+
"eslint": "^8.35.0",
|
|
65
|
+
"eslint-config-spruce": "^10.12.0",
|
|
66
|
+
"jest": "^29.5.0",
|
|
67
|
+
"jest-circus": "^29.5.0",
|
|
68
|
+
"prettier": "^2.8.4",
|
|
69
|
+
"ts-node": "^10.9.1",
|
|
70
|
+
"tsc-watch": "^6.0.0",
|
|
71
|
+
"typescript": "^4.9.5"
|
|
72
|
+
},
|
|
73
|
+
"description": "A cross-platform globby wrapper",
|
|
74
|
+
"jest": {
|
|
75
|
+
"testRunner": "jest-circus/runner",
|
|
76
|
+
"maxWorkers": 4,
|
|
77
|
+
"testTimeout": 120000,
|
|
78
|
+
"testEnvironment": "node",
|
|
79
|
+
"testPathIgnorePatterns": [
|
|
80
|
+
"<rootDir>/tmp/",
|
|
81
|
+
"<rootDir>/src/",
|
|
82
|
+
"<rootDir>/node_modules/",
|
|
83
|
+
"<rootDir>/build/__tests__/testDirsAndFiles/"
|
|
84
|
+
],
|
|
85
|
+
"testMatch": [
|
|
86
|
+
"**/__tests__/**/*.test.js?(x)"
|
|
87
|
+
],
|
|
88
|
+
"moduleNameMapper": {
|
|
89
|
+
"^#spruce/(.*)$": "<rootDir>/build/.spruce/$1"
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|