@powerlines/plugin-tsdown 0.1.242 → 0.1.244
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/dist/core/src/lib/logger.mjs +40 -0
- package/dist/core/src/lib/logger.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/helpers.mjs +19 -0
- package/dist/core/src/lib/unplugin/helpers.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/index.mjs +5 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs +66 -0
- package/dist/core/src/lib/unplugin/module-resolution.mjs.map +1 -0
- package/dist/core/src/lib/unplugin/plugin.mjs +71 -0
- package/dist/core/src/lib/unplugin/plugin.mjs.map +1 -0
- package/dist/core/src/lib/utilities/format.mjs +29 -0
- package/dist/core/src/lib/utilities/format.mjs.map +1 -0
- package/dist/core/src/lib/utilities/source-file.mjs +21 -0
- package/dist/core/src/lib/utilities/source-file.mjs.map +1 -0
- package/dist/core/src/plugin-utils/build-helpers.mjs +35 -0
- package/dist/core/src/plugin-utils/build-helpers.mjs.map +1 -0
- package/dist/core/src/plugin-utils/context-helpers.mjs +4 -0
- package/dist/core/src/plugin-utils/extend.mjs +5 -0
- package/dist/core/src/plugin-utils/get-config-path.mjs +3 -0
- package/dist/core/src/plugin-utils/helpers.mjs +48 -0
- package/dist/core/src/plugin-utils/helpers.mjs.map +1 -0
- package/dist/core/src/plugin-utils/index.mjs +9 -0
- package/dist/core/src/plugin-utils/merge.mjs +47 -0
- package/dist/core/src/plugin-utils/merge.mjs.map +1 -0
- package/dist/core/src/plugin-utils/paths.mjs +4 -0
- package/dist/core/src/types/api.d.mts +103 -0
- package/dist/core/src/types/api.d.mts.map +1 -0
- package/dist/core/src/types/commands.d.mts +10 -0
- package/dist/core/src/types/commands.d.mts.map +1 -0
- package/dist/core/src/types/commands.mjs +16 -0
- package/dist/core/src/types/commands.mjs.map +1 -0
- package/dist/core/src/types/config.d.mts +551 -0
- package/dist/core/src/types/config.d.mts.map +1 -0
- package/dist/core/src/types/context.d.mts +511 -0
- package/dist/core/src/types/context.d.mts.map +1 -0
- package/dist/core/src/types/fs.d.mts +487 -0
- package/dist/core/src/types/fs.d.mts.map +1 -0
- package/dist/core/src/types/hooks.d.mts +99 -0
- package/dist/core/src/types/hooks.d.mts.map +1 -0
- package/dist/core/src/types/index.d.mts +9 -0
- package/dist/core/src/types/plugin.d.mts +204 -0
- package/dist/core/src/types/plugin.d.mts.map +1 -0
- package/dist/core/src/types/plugin.mjs +33 -0
- package/dist/core/src/types/plugin.mjs.map +1 -0
- package/dist/core/src/types/tsconfig.d.mts +70 -0
- package/dist/core/src/types/tsconfig.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.d.mts +25 -0
- package/dist/core/src/types/unplugin.d.mts.map +1 -0
- package/dist/core/src/types/unplugin.mjs +22 -0
- package/dist/core/src/types/unplugin.mjs.map +1 -0
- package/dist/helpers/format-package-json.mjs +4 -4
- package/dist/helpers/format-package-json.mjs.map +1 -1
- package/dist/helpers/index.d.mts +3 -1
- package/dist/helpers/index.mjs +3 -1
- package/dist/helpers/resolve-options.d.mts +31 -0
- package/dist/helpers/resolve-options.d.mts.map +1 -0
- package/dist/helpers/resolve-options.mjs +124 -0
- package/dist/helpers/resolve-options.mjs.map +1 -0
- package/dist/helpers/unplugin.mjs +2 -1
- package/dist/helpers/unplugin.mjs.map +1 -1
- package/dist/index.d.mts +6 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +6 -9
- package/dist/index.mjs.map +1 -1
- package/dist/types/build.d.mts +8 -0
- package/dist/types/build.d.mts.map +1 -0
- package/dist/types/build.mjs +1 -0
- package/dist/types/index.d.mts +2 -1
- package/dist/types/plugin.d.mts +11 -7
- package/dist/types/plugin.d.mts.map +1 -1
- package/package.json +28 -107
- package/dist/_virtual/rolldown_runtime.cjs +0 -29
- package/dist/helpers/format-package-json.cjs +0 -19
- package/dist/helpers/format-package-json.d.cts +0 -13
- package/dist/helpers/format-package-json.d.cts.map +0 -1
- package/dist/helpers/index.cjs +0 -3
- package/dist/helpers/index.d.cts +0 -2
- package/dist/helpers/unplugin.cjs +0 -11
- package/dist/helpers/unplugin.d.cts +0 -8
- package/dist/helpers/unplugin.d.cts.map +0 -1
- package/dist/index.cjs +0 -43
- package/dist/index.d.cts +0 -14
- package/dist/index.d.cts.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.cjs +0 -28
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs +0 -29
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/is-type.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.cjs +0 -122
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs +0 -123
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.cjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs +0 -15
- package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.cjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs +0 -21
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.cjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs +0 -21
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.cjs +0 -19
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs +0 -20
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs.map +0 -1
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs.map +0 -1
- package/dist/types/index.cjs +0 -0
- package/dist/types/index.d.cts +0 -2
- package/dist/types/plugin.cjs +0 -0
- package/dist/types/plugin.d.cts +0 -17
- package/dist/types/plugin.d.cts.map +0 -1
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.cjs
DELETED
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
const require_regex = require('./regex.cjs');
|
|
2
|
-
const require_slash = require('./slash.cjs');
|
|
3
|
-
const require_is_type = require('./is-type.cjs');
|
|
4
|
-
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs
|
|
6
|
-
function normalizeWindowsPath(input = "") {
|
|
7
|
-
if (!input) return input;
|
|
8
|
-
return input.replace(/\\/g, "/").replace(require_regex.DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
9
|
-
}
|
|
10
|
-
function correctPaths(path) {
|
|
11
|
-
if (!path || path.length === 0) return ".";
|
|
12
|
-
path = normalizeWindowsPath(path);
|
|
13
|
-
const isUNCPath = path.match(require_regex.UNC_REGEX);
|
|
14
|
-
const isPathAbsolute = require_is_type.isAbsolute(path);
|
|
15
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
16
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
17
|
-
if (path.length === 0) {
|
|
18
|
-
if (isPathAbsolute) return "/";
|
|
19
|
-
return trailingSeparator ? "./" : ".";
|
|
20
|
-
}
|
|
21
|
-
if (trailingSeparator) path += "/";
|
|
22
|
-
if (require_regex.DRIVE_LETTER_REGEX.test(path)) path += "/";
|
|
23
|
-
if (isUNCPath) {
|
|
24
|
-
if (!isPathAbsolute) return `//./${path}`;
|
|
25
|
-
return `//${path}`;
|
|
26
|
-
}
|
|
27
|
-
return isPathAbsolute && !require_is_type.isAbsolute(path) ? `/${path}` : path;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Joins all given path segments together using the platform-specific separator as a delimiter.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Multiple segments can be provided as separate arguments. The resulting path is normalized to remove any redundant or unnecessary segments.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* import { joinPaths } from 'stryke/path';
|
|
38
|
-
*
|
|
39
|
-
* const fullPath = joinPaths('folder1', 'folder2', '..', 'folder3', 'file.txt');
|
|
40
|
-
* console.log(fullPath); // Output: 'folder1/folder3/file.txt'
|
|
41
|
-
*
|
|
42
|
-
* const absolutePath = joinPaths('/root', 'folder', '.', 'subfolder', 'file.txt');
|
|
43
|
-
* console.log(absolutePath); // Output: '/root/folder/subfolder/file.txt'
|
|
44
|
-
*
|
|
45
|
-
* const windowsPath = joinPaths('C:\\', 'Users', 'Public', '..', 'Documents', 'file.txt');
|
|
46
|
-
* console.log(windowsPath); // Output: 'C:/Users/Documents/file.txt'
|
|
47
|
-
*
|
|
48
|
-
* const uncPath = joinPaths('\\\\Server\\Share', 'Folder', 'File.txt');
|
|
49
|
-
* console.log(uncPath); // Output: '//Server/Share/Folder/File.txt'
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param segments - The path segments to join.
|
|
53
|
-
* @returns The joined and normalized path string.
|
|
54
|
-
*/
|
|
55
|
-
function joinPaths(...segments) {
|
|
56
|
-
let result = "";
|
|
57
|
-
for (const segment of segments) if (segment && require_slash.slash(segment).replaceAll(/\//g, "") !== ".") {
|
|
58
|
-
if (result) if (require_slash.slash(segment).replaceAll(/\//g, "") === "..") result = require_slash.slash(result).replace(/\/+$/, "").replace(/\/*[^/]+$/, "");
|
|
59
|
-
else result = `${require_slash.slash(result).replace(/\/+$/, "")}/${require_slash.slash(segment).replace(/^\/+/, "")}`;
|
|
60
|
-
else if (require_slash.slash(segment).replaceAll(/\//g, "") !== "..") result = segment;
|
|
61
|
-
}
|
|
62
|
-
return correctPaths(result);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
|
66
|
-
*
|
|
67
|
-
* @param path - The path to normalize.
|
|
68
|
-
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
|
69
|
-
* @returns the normalized path string.
|
|
70
|
-
*/
|
|
71
|
-
function normalizeString(path, allowAboveRoot) {
|
|
72
|
-
let res = "";
|
|
73
|
-
let lastSegmentLength = 0;
|
|
74
|
-
let lastSlash = -1;
|
|
75
|
-
let dots = 0;
|
|
76
|
-
let char = null;
|
|
77
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
78
|
-
if (index < path.length) char = path[index];
|
|
79
|
-
else if (char === "/") break;
|
|
80
|
-
else char = "/";
|
|
81
|
-
if (char === "/") {
|
|
82
|
-
if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
|
|
83
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
84
|
-
if (res.length > 2) {
|
|
85
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
86
|
-
if (lastSlashIndex === -1) {
|
|
87
|
-
res = "";
|
|
88
|
-
lastSegmentLength = 0;
|
|
89
|
-
} else {
|
|
90
|
-
res = res.slice(0, lastSlashIndex);
|
|
91
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
92
|
-
}
|
|
93
|
-
lastSlash = index;
|
|
94
|
-
dots = 0;
|
|
95
|
-
continue;
|
|
96
|
-
} else if (res.length > 0) {
|
|
97
|
-
res = "";
|
|
98
|
-
lastSegmentLength = 0;
|
|
99
|
-
lastSlash = index;
|
|
100
|
-
dots = 0;
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (allowAboveRoot) {
|
|
105
|
-
res += res.length > 0 ? "/.." : "..";
|
|
106
|
-
lastSegmentLength = 2;
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
110
|
-
else res = path.slice(lastSlash + 1, index);
|
|
111
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
112
|
-
}
|
|
113
|
-
lastSlash = index;
|
|
114
|
-
dots = 0;
|
|
115
|
-
} else if (char === "." && dots !== -1) ++dots;
|
|
116
|
-
else dots = -1;
|
|
117
|
-
}
|
|
118
|
-
return res;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
//#endregion
|
|
122
|
-
exports.joinPaths = joinPaths;
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from "./regex.mjs";
|
|
2
|
-
import { slash } from "./slash.mjs";
|
|
3
|
-
import { isAbsolute } from "./is-type.mjs";
|
|
4
|
-
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs
|
|
6
|
-
function normalizeWindowsPath(input = "") {
|
|
7
|
-
if (!input) return input;
|
|
8
|
-
return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
9
|
-
}
|
|
10
|
-
function correctPaths(path) {
|
|
11
|
-
if (!path || path.length === 0) return ".";
|
|
12
|
-
path = normalizeWindowsPath(path);
|
|
13
|
-
const isUNCPath = path.match(UNC_REGEX);
|
|
14
|
-
const isPathAbsolute = isAbsolute(path);
|
|
15
|
-
const trailingSeparator = path[path.length - 1] === "/";
|
|
16
|
-
path = normalizeString(path, !isPathAbsolute);
|
|
17
|
-
if (path.length === 0) {
|
|
18
|
-
if (isPathAbsolute) return "/";
|
|
19
|
-
return trailingSeparator ? "./" : ".";
|
|
20
|
-
}
|
|
21
|
-
if (trailingSeparator) path += "/";
|
|
22
|
-
if (DRIVE_LETTER_REGEX.test(path)) path += "/";
|
|
23
|
-
if (isUNCPath) {
|
|
24
|
-
if (!isPathAbsolute) return `//./${path}`;
|
|
25
|
-
return `//${path}`;
|
|
26
|
-
}
|
|
27
|
-
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Joins all given path segments together using the platform-specific separator as a delimiter.
|
|
31
|
-
*
|
|
32
|
-
* @remarks
|
|
33
|
-
* Multiple segments can be provided as separate arguments. The resulting path is normalized to remove any redundant or unnecessary segments.
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```ts
|
|
37
|
-
* import { joinPaths } from 'stryke/path';
|
|
38
|
-
*
|
|
39
|
-
* const fullPath = joinPaths('folder1', 'folder2', '..', 'folder3', 'file.txt');
|
|
40
|
-
* console.log(fullPath); // Output: 'folder1/folder3/file.txt'
|
|
41
|
-
*
|
|
42
|
-
* const absolutePath = joinPaths('/root', 'folder', '.', 'subfolder', 'file.txt');
|
|
43
|
-
* console.log(absolutePath); // Output: '/root/folder/subfolder/file.txt'
|
|
44
|
-
*
|
|
45
|
-
* const windowsPath = joinPaths('C:\\', 'Users', 'Public', '..', 'Documents', 'file.txt');
|
|
46
|
-
* console.log(windowsPath); // Output: 'C:/Users/Documents/file.txt'
|
|
47
|
-
*
|
|
48
|
-
* const uncPath = joinPaths('\\\\Server\\Share', 'Folder', 'File.txt');
|
|
49
|
-
* console.log(uncPath); // Output: '//Server/Share/Folder/File.txt'
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @param segments - The path segments to join.
|
|
53
|
-
* @returns The joined and normalized path string.
|
|
54
|
-
*/
|
|
55
|
-
function joinPaths(...segments) {
|
|
56
|
-
let result = "";
|
|
57
|
-
for (const segment of segments) if (segment && slash(segment).replaceAll(/\//g, "") !== ".") {
|
|
58
|
-
if (result) if (slash(segment).replaceAll(/\//g, "") === "..") result = slash(result).replace(/\/+$/, "").replace(/\/*[^/]+$/, "");
|
|
59
|
-
else result = `${slash(result).replace(/\/+$/, "")}/${slash(segment).replace(/^\/+/, "")}`;
|
|
60
|
-
else if (slash(segment).replaceAll(/\//g, "") !== "..") result = segment;
|
|
61
|
-
}
|
|
62
|
-
return correctPaths(result);
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
|
66
|
-
*
|
|
67
|
-
* @param path - The path to normalize.
|
|
68
|
-
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
|
69
|
-
* @returns the normalized path string.
|
|
70
|
-
*/
|
|
71
|
-
function normalizeString(path, allowAboveRoot) {
|
|
72
|
-
let res = "";
|
|
73
|
-
let lastSegmentLength = 0;
|
|
74
|
-
let lastSlash = -1;
|
|
75
|
-
let dots = 0;
|
|
76
|
-
let char = null;
|
|
77
|
-
for (let index = 0; index <= path.length; ++index) {
|
|
78
|
-
if (index < path.length) char = path[index];
|
|
79
|
-
else if (char === "/") break;
|
|
80
|
-
else char = "/";
|
|
81
|
-
if (char === "/") {
|
|
82
|
-
if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
|
|
83
|
-
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
84
|
-
if (res.length > 2) {
|
|
85
|
-
const lastSlashIndex = res.lastIndexOf("/");
|
|
86
|
-
if (lastSlashIndex === -1) {
|
|
87
|
-
res = "";
|
|
88
|
-
lastSegmentLength = 0;
|
|
89
|
-
} else {
|
|
90
|
-
res = res.slice(0, lastSlashIndex);
|
|
91
|
-
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
92
|
-
}
|
|
93
|
-
lastSlash = index;
|
|
94
|
-
dots = 0;
|
|
95
|
-
continue;
|
|
96
|
-
} else if (res.length > 0) {
|
|
97
|
-
res = "";
|
|
98
|
-
lastSegmentLength = 0;
|
|
99
|
-
lastSlash = index;
|
|
100
|
-
dots = 0;
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (allowAboveRoot) {
|
|
105
|
-
res += res.length > 0 ? "/.." : "..";
|
|
106
|
-
lastSegmentLength = 2;
|
|
107
|
-
}
|
|
108
|
-
} else {
|
|
109
|
-
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
110
|
-
else res = path.slice(lastSlash + 1, index);
|
|
111
|
-
lastSegmentLength = index - lastSlash - 1;
|
|
112
|
-
}
|
|
113
|
-
lastSlash = index;
|
|
114
|
-
dots = 0;
|
|
115
|
-
} else if (char === "." && dots !== -1) ++dots;
|
|
116
|
-
else dots = -1;
|
|
117
|
-
}
|
|
118
|
-
return res;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
//#endregion
|
|
122
|
-
export { joinPaths };
|
|
123
|
-
//# sourceMappingURL=join-paths.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"join-paths.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/join-paths.mjs"],"sourcesContent":["import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from \"./regex.mjs\";\nimport { isAbsolute } from \"./is-type.mjs\";\nimport { slash } from \"./slash.mjs\";\n\n//#region src/join-paths.ts\nfunction normalizeWindowsPath(input = \"\") {\n\tif (!input) return input;\n\treturn input.replace(/\\\\/g, \"/\").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());\n}\nfunction correctPaths(path) {\n\tif (!path || path.length === 0) return \".\";\n\tpath = normalizeWindowsPath(path);\n\tconst isUNCPath = path.match(UNC_REGEX);\n\tconst isPathAbsolute = isAbsolute(path);\n\tconst trailingSeparator = path[path.length - 1] === \"/\";\n\tpath = normalizeString(path, !isPathAbsolute);\n\tif (path.length === 0) {\n\t\tif (isPathAbsolute) return \"/\";\n\t\treturn trailingSeparator ? \"./\" : \".\";\n\t}\n\tif (trailingSeparator) path += \"/\";\n\tif (DRIVE_LETTER_REGEX.test(path)) path += \"/\";\n\tif (isUNCPath) {\n\t\tif (!isPathAbsolute) return `//./${path}`;\n\t\treturn `//${path}`;\n\t}\n\treturn isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;\n}\n/**\n* Joins all given path segments together using the platform-specific separator as a delimiter.\n*\n* @remarks\n* Multiple segments can be provided as separate arguments. The resulting path is normalized to remove any redundant or unnecessary segments.\n*\n* @example\n* ```ts\n* import { joinPaths } from 'stryke/path';\n*\n* const fullPath = joinPaths('folder1', 'folder2', '..', 'folder3', 'file.txt');\n* console.log(fullPath); // Output: 'folder1/folder3/file.txt'\n*\n* const absolutePath = joinPaths('/root', 'folder', '.', 'subfolder', 'file.txt');\n* console.log(absolutePath); // Output: '/root/folder/subfolder/file.txt'\n*\n* const windowsPath = joinPaths('C:\\\\', 'Users', 'Public', '..', 'Documents', 'file.txt');\n* console.log(windowsPath); // Output: 'C:/Users/Documents/file.txt'\n*\n* const uncPath = joinPaths('\\\\\\\\Server\\\\Share', 'Folder', 'File.txt');\n* console.log(uncPath); // Output: '//Server/Share/Folder/File.txt'\n* ```\n*\n* @param segments - The path segments to join.\n* @returns The joined and normalized path string.\n*/\nfunction joinPaths(...segments) {\n\tlet result = \"\";\n\tfor (const segment of segments) if (segment && slash(segment).replaceAll(/\\//g, \"\") !== \".\") {\n\t\tif (result) if (slash(segment).replaceAll(/\\//g, \"\") === \"..\") result = slash(result).replace(/\\/+$/, \"\").replace(/\\/*[^/]+$/, \"\");\n\t\telse result = `${slash(result).replace(/\\/+$/, \"\")}/${slash(segment).replace(/^\\/+/, \"\")}`;\n\t\telse if (slash(segment).replaceAll(/\\//g, \"\") !== \"..\") result = segment;\n\t}\n\treturn correctPaths(result);\n}\nconst join = joinPaths;\n/**\n* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.\n*\n* @param path - The path to normalize.\n* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.\n* @returns the normalized path string.\n*/\nfunction normalizeString(path, allowAboveRoot) {\n\tlet res = \"\";\n\tlet lastSegmentLength = 0;\n\tlet lastSlash = -1;\n\tlet dots = 0;\n\tlet char = null;\n\tfor (let index = 0; index <= path.length; ++index) {\n\t\tif (index < path.length) char = path[index];\n\t\telse if (char === \"/\") break;\n\t\telse char = \"/\";\n\t\tif (char === \"/\") {\n\t\t\tif (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {\n\t\t\t\tif (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== \".\" || res[res.length - 2] !== \".\") {\n\t\t\t\t\tif (res.length > 2) {\n\t\t\t\t\t\tconst lastSlashIndex = res.lastIndexOf(\"/\");\n\t\t\t\t\t\tif (lastSlashIndex === -1) {\n\t\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tres = res.slice(0, lastSlashIndex);\n\t\t\t\t\t\t\tlastSegmentLength = res.length - 1 - res.lastIndexOf(\"/\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (res.length > 0) {\n\t\t\t\t\t\tres = \"\";\n\t\t\t\t\t\tlastSegmentLength = 0;\n\t\t\t\t\t\tlastSlash = index;\n\t\t\t\t\t\tdots = 0;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (allowAboveRoot) {\n\t\t\t\t\tres += res.length > 0 ? \"/..\" : \"..\";\n\t\t\t\t\tlastSegmentLength = 2;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;\n\t\t\t\telse res = path.slice(lastSlash + 1, index);\n\t\t\t\tlastSegmentLength = index - lastSlash - 1;\n\t\t\t}\n\t\t\tlastSlash = index;\n\t\t\tdots = 0;\n\t\t} else if (char === \".\" && dots !== -1) ++dots;\n\t\telse dots = -1;\n\t}\n\treturn res;\n}\n\n//#endregion\nexport { join, joinPaths };\n//# sourceMappingURL=join-paths.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;AAKA,SAAS,qBAAqB,QAAQ,IAAI;AACzC,KAAI,CAAC,MAAO,QAAO;AACnB,QAAO,MAAM,QAAQ,OAAO,IAAI,CAAC,QAAQ,2BAA2B,MAAM,EAAE,aAAa,CAAC;;AAE3F,SAAS,aAAa,MAAM;AAC3B,KAAI,CAAC,QAAQ,KAAK,WAAW,EAAG,QAAO;AACvC,QAAO,qBAAqB,KAAK;CACjC,MAAM,YAAY,KAAK,MAAM,UAAU;CACvC,MAAM,iBAAiB,WAAW,KAAK;CACvC,MAAM,oBAAoB,KAAK,KAAK,SAAS,OAAO;AACpD,QAAO,gBAAgB,MAAM,CAAC,eAAe;AAC7C,KAAI,KAAK,WAAW,GAAG;AACtB,MAAI,eAAgB,QAAO;AAC3B,SAAO,oBAAoB,OAAO;;AAEnC,KAAI,kBAAmB,SAAQ;AAC/B,KAAI,mBAAmB,KAAK,KAAK,CAAE,SAAQ;AAC3C,KAAI,WAAW;AACd,MAAI,CAAC,eAAgB,QAAO,OAAO;AACnC,SAAO,KAAK;;AAEb,QAAO,kBAAkB,CAAC,WAAW,KAAK,GAAG,IAAI,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4B3D,SAAS,UAAU,GAAG,UAAU;CAC/B,IAAI,SAAS;AACb,MAAK,MAAM,WAAW,SAAU,KAAI,WAAW,MAAM,QAAQ,CAAC,WAAW,OAAO,GAAG,KAAK,KACvF;MAAI,OAAQ,KAAI,MAAM,QAAQ,CAAC,WAAW,OAAO,GAAG,KAAK,KAAM,UAAS,MAAM,OAAO,CAAC,QAAQ,QAAQ,GAAG,CAAC,QAAQ,aAAa,GAAG;MAC7H,UAAS,GAAG,MAAM,OAAO,CAAC,QAAQ,QAAQ,GAAG,CAAC,GAAG,MAAM,QAAQ,CAAC,QAAQ,QAAQ,GAAG;WAC/E,MAAM,QAAQ,CAAC,WAAW,OAAO,GAAG,KAAK,KAAM,UAAS;;AAElE,QAAO,aAAa,OAAO;;;;;;;;;AAU5B,SAAS,gBAAgB,MAAM,gBAAgB;CAC9C,IAAI,MAAM;CACV,IAAI,oBAAoB;CACxB,IAAI,YAAY;CAChB,IAAI,OAAO;CACX,IAAI,OAAO;AACX,MAAK,IAAI,QAAQ,GAAG,SAAS,KAAK,QAAQ,EAAE,OAAO;AAClD,MAAI,QAAQ,KAAK,OAAQ,QAAO,KAAK;WAC5B,SAAS,IAAK;MAClB,QAAO;AACZ,MAAI,SAAS,KAAK;AACjB,OAAI,cAAc,QAAQ,KAAK,SAAS,GAAG,YAAY,SAAS,GAAG;AAClE,QAAI,IAAI,SAAS,KAAK,sBAAsB,KAAK,IAAI,IAAI,SAAS,OAAO,OAAO,IAAI,IAAI,SAAS,OAAO,KACvG;SAAI,IAAI,SAAS,GAAG;MACnB,MAAM,iBAAiB,IAAI,YAAY,IAAI;AAC3C,UAAI,mBAAmB,IAAI;AAC1B,aAAM;AACN,2BAAoB;aACd;AACN,aAAM,IAAI,MAAM,GAAG,eAAe;AAClC,2BAAoB,IAAI,SAAS,IAAI,IAAI,YAAY,IAAI;;AAE1D,kBAAY;AACZ,aAAO;AACP;gBACU,IAAI,SAAS,GAAG;AAC1B,YAAM;AACN,0BAAoB;AACpB,kBAAY;AACZ,aAAO;AACP;;;AAGF,QAAI,gBAAgB;AACnB,YAAO,IAAI,SAAS,IAAI,QAAQ;AAChC,yBAAoB;;UAEf;AACN,QAAI,IAAI,SAAS,EAAG,QAAO,IAAI,KAAK,MAAM,YAAY,GAAG,MAAM;QAC1D,OAAM,KAAK,MAAM,YAAY,GAAG,MAAM;AAC3C,wBAAoB,QAAQ,YAAY;;AAEzC,eAAY;AACZ,UAAO;aACG,SAAS,OAAO,SAAS,GAAI,GAAE;MACrC,QAAO;;AAEb,QAAO"}
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.cjs
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/regex.mjs
|
|
3
|
-
const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
4
|
-
const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
5
|
-
const UNC_REGEX = /^[/\\]{2}/;
|
|
6
|
-
const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
7
|
-
|
|
8
|
-
//#endregion
|
|
9
|
-
exports.ABSOLUTE_PATH_REGEX = ABSOLUTE_PATH_REGEX;
|
|
10
|
-
exports.DRIVE_LETTER_REGEX = DRIVE_LETTER_REGEX;
|
|
11
|
-
exports.DRIVE_LETTER_START_REGEX = DRIVE_LETTER_START_REGEX;
|
|
12
|
-
exports.UNC_REGEX = UNC_REGEX;
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/regex.mjs
|
|
2
|
-
const DRIVE_LETTER_START_REGEX = /^[A-Z]:\//i;
|
|
3
|
-
const DRIVE_LETTER_REGEX = /^[A-Z]:$/i;
|
|
4
|
-
const UNC_REGEX = /^[/\\]{2}/;
|
|
5
|
-
const ABSOLUTE_PATH_REGEX = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i;
|
|
6
|
-
|
|
7
|
-
//#endregion
|
|
8
|
-
export { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX };
|
|
9
|
-
//# sourceMappingURL=regex.mjs.map
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/regex.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"regex.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/regex.mjs"],"sourcesContent":["//#region src/regex.ts\nconst DRIVE_LETTER_START_REGEX = /^[A-Z]:\\//i;\nconst DRIVE_LETTER_REGEX = /^[A-Z]:$/i;\nconst UNC_REGEX = /^[/\\\\]{2}/;\nconst ABSOLUTE_PATH_REGEX = /^[/\\\\](?![/\\\\])|^[/\\\\]{2}(?!\\.)|^~[/\\\\]|^[A-Z]:[/\\\\]/i;\nconst ROOT_FOLDER_REGEX = /^\\/([A-Z]:)?$/i;\nconst FILE_EXTENSION_REGEX = /\\.[0-9a-z]+$/i;\nconst FULL_FILE_EXTENSION_REGEX = /(\\.d)?\\.[0-9a-z]+(\\.map)?$/i;\nconst PACKAGE_PATH_REGEX = /^@\\w+\\/.*$/;\nconst NPM_SCOPED_PACKAGE_REGEX = /^(?:@[\\w-]+\\/)?[\\w-]+$/;\n\n//#endregion\nexport { ABSOLUTE_PATH_REGEX, DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, FILE_EXTENSION_REGEX, FULL_FILE_EXTENSION_REGEX, NPM_SCOPED_PACKAGE_REGEX, PACKAGE_PATH_REGEX, ROOT_FOLDER_REGEX, UNC_REGEX };\n//# sourceMappingURL=regex.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,2BAA2B;AACjC,MAAM,qBAAqB;AAC3B,MAAM,YAAY;AAClB,MAAM,sBAAsB"}
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.cjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/slash.mjs
|
|
3
|
-
/**
|
|
4
|
-
* Replace backslash to slash
|
|
5
|
-
*
|
|
6
|
-
* @param path - The string to replace
|
|
7
|
-
* @returns The string with replaced backslashes
|
|
8
|
-
*/
|
|
9
|
-
function slash(path) {
|
|
10
|
-
if (path.startsWith("\\\\?\\")) return path;
|
|
11
|
-
return path.replace(/\\/g, "/");
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//#endregion
|
|
15
|
-
exports.slash = slash;
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/slash.mjs
|
|
2
|
-
/**
|
|
3
|
-
* Replace backslash to slash
|
|
4
|
-
*
|
|
5
|
-
* @param path - The string to replace
|
|
6
|
-
* @returns The string with replaced backslashes
|
|
7
|
-
*/
|
|
8
|
-
function slash(path) {
|
|
9
|
-
if (path.startsWith("\\\\?\\")) return path;
|
|
10
|
-
return path.replace(/\\/g, "/");
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
//#endregion
|
|
14
|
-
export { slash };
|
|
15
|
-
//# sourceMappingURL=slash.mjs.map
|
package/dist/node_modules/.pnpm/@stryke_path@0.26.6/node_modules/@stryke/path/dist/slash.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"slash.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+path@0.26.6/node_modules/@stryke/path/dist/slash.mjs"],"sourcesContent":["import { isAbsolutePath } from \"./is-type.mjs\";\n\n//#region src/slash.ts\n/**\n* Replace backslash to slash\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction slash(path) {\n\tif (path.startsWith(\"\\\\\\\\?\\\\\")) return path;\n\treturn path.replace(/\\\\/g, \"/\");\n}\n/**\n* Replace backslash to slash and remove unneeded leading and trailing slashes\n*\n* @param path - The string to replace\n* @returns The string with replaced backslashes\n*/\nfunction formatSlash(path) {\n\tconst formatted = slash(path);\n\treturn isAbsolutePath(formatted) ? formatted.replace(/\\/+$/g, \"\") : formatted.replace(/^\\.\\//g, \"\").replace(/\\/+$/g, \"\");\n}\n\n//#endregion\nexport { formatSlash, slash };\n//# sourceMappingURL=slash.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AASA,SAAS,MAAM,MAAM;AACpB,KAAI,KAAK,WAAW,UAAU,CAAE,QAAO;AACvC,QAAO,KAAK,QAAQ,OAAO,IAAI"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const require_is_null = require('./is-null.cjs');
|
|
2
|
-
const require_is_undefined = require('./is-undefined.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Check if the provided value's type is `null` or `undefined`
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to type check
|
|
9
|
-
* @returns An indicator specifying if the value provided is of type `null` or `undefined`
|
|
10
|
-
*/
|
|
11
|
-
const isEmpty = (value) => {
|
|
12
|
-
try {
|
|
13
|
-
return require_is_undefined.isUndefined(value) || require_is_null.isNull(value);
|
|
14
|
-
} catch {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.isEmpty = isEmpty;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { isNull } from "./is-null.mjs";
|
|
2
|
-
import { isUndefined } from "./is-undefined.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Check if the provided value's type is `null` or `undefined`
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to type check
|
|
9
|
-
* @returns An indicator specifying if the value provided is of type `null` or `undefined`
|
|
10
|
-
*/
|
|
11
|
-
const isEmpty = (value) => {
|
|
12
|
-
try {
|
|
13
|
-
return isUndefined(value) || isNull(value);
|
|
14
|
-
} catch {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { isEmpty };
|
|
21
|
-
//# sourceMappingURL=is-empty.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-empty.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-empty.mjs"],"sourcesContent":["import { isDate } from \"./is-date.mjs\";\nimport { isFunction } from \"./is-function.mjs\";\nimport { isNull } from \"./is-null.mjs\";\nimport { isNumber } from \"./is-number.mjs\";\nimport { isSymbol } from \"./is-symbol.mjs\";\nimport { isUndefined } from \"./is-undefined.mjs\";\n\n//#region src/is-empty.ts\n/**\n* Check if the provided value's type is `null` or `undefined`\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `null` or `undefined`\n*/\nconst isEmpty = (value) => {\n\ttry {\n\t\treturn isUndefined(value) || isNull(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\nconst isEmptyAnything = (value) => {\n\tif (value === true || value === false) return true;\n\tif (value === null || value === void 0) return true;\n\tif (isNumber(value)) return value === 0;\n\tif (isDate(value)) return Number.isNaN(value.getTime());\n\tif (isFunction(value)) return false;\n\tif (isSymbol(value)) return false;\n\tconst { length } = value;\n\tif (isNumber(length)) return length === 0;\n\tconst { size } = value;\n\tif (isNumber(size)) return size === 0;\n\treturn Object.keys(value).length === 0;\n};\n\n//#endregion\nexport { isEmpty, isEmptyAnything };\n//# sourceMappingURL=is-empty.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAcA,MAAM,WAAW,UAAU;AAC1B,KAAI;AACH,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACnC;AACP,SAAO"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
3
|
-
const isNull = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
return value === null;
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
exports.isNull = isNull;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs
|
|
2
|
-
const isNull = (value) => {
|
|
3
|
-
try {
|
|
4
|
-
return value === null;
|
|
5
|
-
} catch {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { isNull };
|
|
12
|
-
//# sourceMappingURL=is-null.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-null.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-null.mjs"],"sourcesContent":["//#region src/is-null.ts\nconst isNull = (value) => {\n\ttry {\n\t\treturn value === null;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isNull };\n//# sourceMappingURL=is-null.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,UAAU,UAAU;AACzB,KAAI;AACH,SAAO,UAAU;SACV;AACP,SAAO"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
const require_is_string = require('./is-string.cjs');
|
|
2
|
-
const require_is_set = require('./is-set.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to type check
|
|
9
|
-
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero
|
|
10
|
-
*/
|
|
11
|
-
const isSetString = (value) => {
|
|
12
|
-
try {
|
|
13
|
-
return require_is_set.isSet(value) && require_is_string.isString(value) && value.length > 0;
|
|
14
|
-
} catch {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
exports.isSetString = isSetString;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { isString } from "./is-string.mjs";
|
|
2
|
-
import { isSet } from "./is-set.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs
|
|
5
|
-
/**
|
|
6
|
-
* Determine if the type is string and is not empty (length greater than zero)
|
|
7
|
-
*
|
|
8
|
-
* @param value - The value to type check
|
|
9
|
-
* @returns An indicator specifying if the value provided is of type `string` and length greater than zero
|
|
10
|
-
*/
|
|
11
|
-
const isSetString = (value) => {
|
|
12
|
-
try {
|
|
13
|
-
return isSet(value) && isString(value) && value.length > 0;
|
|
14
|
-
} catch {
|
|
15
|
-
return false;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
//#endregion
|
|
20
|
-
export { isSetString };
|
|
21
|
-
//# sourceMappingURL=is-set-string.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-set-string.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set-string.mjs"],"sourcesContent":["import { isString } from \"./is-string.mjs\";\nimport { isSet } from \"./is-set.mjs\";\n\n//#region src/is-set-string.ts\n/**\n* Determine if the type is string and is not empty (length greater than zero)\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is of type `string` and length greater than zero\n*/\nconst isSetString = (value) => {\n\ttry {\n\t\treturn isSet(value) && isString(value) && value.length > 0;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSetString };\n//# sourceMappingURL=is-set-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;AAUA,MAAM,eAAe,UAAU;AAC9B,KAAI;AACH,SAAO,MAAM,MAAM,IAAI,SAAS,MAAM,IAAI,MAAM,SAAS;SAClD;AACP,SAAO"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const require_is_empty = require('./is-empty.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
-
/**
|
|
5
|
-
* The inverse of the `isEmpty` function
|
|
6
|
-
*
|
|
7
|
-
* @param value - The value to type check
|
|
8
|
-
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
|
|
9
|
-
*/
|
|
10
|
-
const isSet = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
return !require_is_empty.isEmpty(value);
|
|
13
|
-
} catch {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
exports.isSet = isSet;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { isEmpty } from "./is-empty.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs
|
|
4
|
-
/**
|
|
5
|
-
* The inverse of the `isEmpty` function
|
|
6
|
-
*
|
|
7
|
-
* @param value - The value to type check
|
|
8
|
-
* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`
|
|
9
|
-
*/
|
|
10
|
-
const isSet = (value) => {
|
|
11
|
-
try {
|
|
12
|
-
return !isEmpty(value);
|
|
13
|
-
} catch {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
//#endregion
|
|
19
|
-
export { isSet };
|
|
20
|
-
//# sourceMappingURL=is-set.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-set.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-set.mjs"],"sourcesContent":["import { isEmpty } from \"./is-empty.mjs\";\n\n//#region src/is-set.ts\n/**\n* The inverse of the `isEmpty` function\n*\n* @param value - The value to type check\n* @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n*/\nconst isSet = (value) => {\n\ttry {\n\t\treturn !isEmpty(value);\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isSet };\n//# sourceMappingURL=is-set.mjs.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;AASA,MAAM,SAAS,UAAU;AACxB,KAAI;AACH,SAAO,CAAC,QAAQ,MAAM;SACf;AACP,SAAO"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
3
|
-
const isString = (value) => {
|
|
4
|
-
try {
|
|
5
|
-
return typeof value === "string";
|
|
6
|
-
} catch {
|
|
7
|
-
return false;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
exports.isString = isString;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs
|
|
2
|
-
const isString = (value) => {
|
|
3
|
-
try {
|
|
4
|
-
return typeof value === "string";
|
|
5
|
-
} catch {
|
|
6
|
-
return false;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
//#endregion
|
|
11
|
-
export { isString };
|
|
12
|
-
//# sourceMappingURL=is-string.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-string.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-string.mjs"],"sourcesContent":["//#region src/is-string.ts\nconst isString = (value) => {\n\ttry {\n\t\treturn typeof value === \"string\";\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n//#endregion\nexport { isString };\n//# sourceMappingURL=is-string.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,YAAY,UAAU;AAC3B,KAAI;AACH,SAAO,OAAO,UAAU;SACjB;AACP,SAAO"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs
|
|
2
|
-
const isUndefined = (value) => {
|
|
3
|
-
return value === void 0;
|
|
4
|
-
};
|
|
5
|
-
|
|
6
|
-
//#endregion
|
|
7
|
-
export { isUndefined };
|
|
8
|
-
//# sourceMappingURL=is-undefined.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"is-undefined.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/@stryke+type-checks@0.5.25/node_modules/@stryke/type-checks/dist/is-undefined.mjs"],"sourcesContent":["//#region src/is-undefined.ts\nconst isUndefined = (value) => {\n\treturn value === void 0;\n};\n\n//#endregion\nexport { isUndefined };\n//# sourceMappingURL=is-undefined.mjs.map"],"x_google_ignoreList":[0],"mappings":";AACA,MAAM,eAAe,UAAU;AAC9B,QAAO,UAAU,KAAK"}
|
package/dist/types/index.cjs
DELETED
|
File without changes
|
package/dist/types/index.d.cts
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig } from "./plugin.cjs";
|
|
2
|
-
export { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig };
|
package/dist/types/plugin.cjs
DELETED
|
File without changes
|
package/dist/types/plugin.d.cts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TsdownBuildConfig } from "powerlines/types/build";
|
|
2
|
-
import { TsdownUserConfig } from "powerlines/types/config";
|
|
3
|
-
import { PluginContext } from "powerlines/types/context";
|
|
4
|
-
import { TsdownResolvedConfig } from "powerlines/types/resolved";
|
|
5
|
-
|
|
6
|
-
//#region src/types/plugin.d.ts
|
|
7
|
-
type TsdownPluginOptions = Partial<TsdownBuildConfig>;
|
|
8
|
-
type TsdownPluginUserConfig = TsdownUserConfig;
|
|
9
|
-
type TsdownPluginResolvedConfig = TsdownResolvedConfig;
|
|
10
|
-
type TsdownPluginContext<TResolvedConfig extends TsdownPluginResolvedConfig = TsdownPluginResolvedConfig> = PluginContext<TResolvedConfig>;
|
|
11
|
-
declare type __ΩTsdownPluginOptions = any[];
|
|
12
|
-
declare type __ΩTsdownPluginUserConfig = any[];
|
|
13
|
-
declare type __ΩTsdownPluginResolvedConfig = any[];
|
|
14
|
-
declare type __ΩTsdownPluginContext = any[];
|
|
15
|
-
//#endregion
|
|
16
|
-
export { TsdownPluginContext, TsdownPluginOptions, TsdownPluginResolvedConfig, TsdownPluginUserConfig, __ΩTsdownPluginContext, __ΩTsdownPluginOptions, __ΩTsdownPluginResolvedConfig, __ΩTsdownPluginUserConfig };
|
|
17
|
-
//# sourceMappingURL=plugin.d.cts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.cts","names":[],"sources":["../../src/types/plugin.ts"],"sourcesContent":[],"mappings":";;;;;;KAuBY,mBAAA,GAAsB,QAAQ;KAE9B,sBAAA,GAAyB;AAFzB,KAIA,0BAAA,GAA6B,oBAJP;AAEtB,KAIA,mBAJsB,CAAA,wBAKR,0BAL2B,GAMjD,0BANiD,CAAA,GAOjD,aAPiD,CAOnC,eAPmC,CAAA;AAEzC,sCAA6B,GAAA,EAAA;AAE7B,yCAAmB,GAAA,EAAA;AACL,6CAAA,GAAA,EAAA;AACtB,sCAAA,GAAA,EAAA"}
|