@powerlines/plugin-env 0.15.59 → 0.15.61
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/babel/plugin.cjs +6 -6
- package/dist/babel/plugin.mjs +6 -6
- package/dist/components/docs.cjs +4 -4
- package/dist/components/docs.mjs +4 -4
- package/dist/components/env.cjs +2 -2
- package/dist/components/env.mjs +2 -2
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/helpers/automd-generator.cjs +2 -2
- package/dist/helpers/automd-generator.mjs +2 -2
- package/dist/helpers/index.cjs +1 -1
- package/dist/helpers/index.mjs +1 -1
- package/dist/helpers/load.cjs +4 -4
- package/dist/helpers/load.mjs +4 -4
- package/dist/helpers/persistence.cjs +6 -6
- package/dist/helpers/persistence.mjs +6 -6
- package/dist/helpers/reflect.cjs +4 -4
- package/dist/helpers/reflect.mjs +4 -4
- package/dist/index.cjs +25 -25
- package/dist/index.mjs +25 -25
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/parse-type-definition.cjs +37 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/parse-type-definition.mjs +37 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/to-array.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/to-array.mjs +14 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +14 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +6 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +19 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +63 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +63 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +11 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.34/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +16 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.cjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-parent-path.mjs +32 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-type.cjs +28 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/is-type.mjs +28 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs +106 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs +106 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/regex.cjs +12 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/regex.mjs +8 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/slash.cjs +15 -0
- package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/slash.mjs +14 -0
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.1/node_modules/c12/dist/index.mjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +1 -1
- package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +1 -1
- package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +1 -1
- package/dist/packages/powerlines/src/types/config.d.mts +1 -1
- package/package.json +16 -16
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.cjs +0 -31
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.mjs +0 -31
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/to-array.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/to-array.mjs +0 -7
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.cjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-buffer.mjs +0 -6
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-string.cjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs +0 -11
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.cjs +0 -11
- package/dist/node_modules/.pnpm/@stryke_convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs +0 -12
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.cjs +0 -10
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.mjs +0 -10
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.cjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.mjs +0 -13
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs +0 -49
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs +0 -49
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.cjs +0 -9
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.mjs +0 -5
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/slash.cjs +0 -8
- package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/slash.mjs +0 -7
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/index.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/index.mjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.cjs +0 -0
- /package/dist/node_modules/.pnpm/{@stryke_convert@0.6.32 → @stryke_convert@0.6.34}/node_modules/@stryke/convert/dist/type-checks/src/is-collection.mjs +0 -0
package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.cjs
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const require_regex = require('./regex.cjs');
|
|
2
|
+
const require_is_type = require('./is-type.cjs');
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs
|
|
5
|
+
function normalizeWindowsPath(input = "") {
|
|
6
|
+
if (!input) return input;
|
|
7
|
+
return input.replace(/\\/g, "/").replace(require_regex.DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
8
|
+
}
|
|
9
|
+
function correctPaths(path) {
|
|
10
|
+
if (!path || path.length === 0) return ".";
|
|
11
|
+
path = normalizeWindowsPath(path);
|
|
12
|
+
const isUNCPath = path.match(require_regex.UNC_REGEX);
|
|
13
|
+
const isPathAbsolute = require_is_type.isAbsolute(path);
|
|
14
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
15
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
16
|
+
if (path.length === 0) {
|
|
17
|
+
if (isPathAbsolute) return "/";
|
|
18
|
+
return trailingSeparator ? "./" : ".";
|
|
19
|
+
}
|
|
20
|
+
if (trailingSeparator) path += "/";
|
|
21
|
+
if (require_regex.DRIVE_LETTER_REGEX.test(path)) path += "/";
|
|
22
|
+
if (isUNCPath) {
|
|
23
|
+
if (!isPathAbsolute) return `//./${path}`;
|
|
24
|
+
return `//${path}`;
|
|
25
|
+
}
|
|
26
|
+
return isPathAbsolute && !require_is_type.isAbsolute(path) ? `/${path}` : path;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Joins all given path segments together using the platform-specific separator as a delimiter.
|
|
30
|
+
* The resulting path is normalized to remove any redundant or unnecessary segments.
|
|
31
|
+
*
|
|
32
|
+
* @param segments - The path segments to join.
|
|
33
|
+
* @returns The joined and normalized path string.
|
|
34
|
+
*/
|
|
35
|
+
function joinPaths(...segments) {
|
|
36
|
+
let path = "";
|
|
37
|
+
for (const seg of segments) {
|
|
38
|
+
if (!seg) continue;
|
|
39
|
+
if (path.length > 0) {
|
|
40
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
41
|
+
const segLeading = seg[0] === "/";
|
|
42
|
+
if (pathTrailing && segLeading) path += seg.slice(1);
|
|
43
|
+
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
44
|
+
} else path += seg;
|
|
45
|
+
}
|
|
46
|
+
return correctPaths(path);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
|
50
|
+
*
|
|
51
|
+
* @param path - The path to normalize.
|
|
52
|
+
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
|
53
|
+
* @returns the normalized path string.
|
|
54
|
+
*/
|
|
55
|
+
function normalizeString(path, allowAboveRoot) {
|
|
56
|
+
let res = "";
|
|
57
|
+
let lastSegmentLength = 0;
|
|
58
|
+
let lastSlash = -1;
|
|
59
|
+
let dots = 0;
|
|
60
|
+
let char = null;
|
|
61
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
62
|
+
if (index < path.length) char = path[index];
|
|
63
|
+
else if (char === "/") break;
|
|
64
|
+
else char = "/";
|
|
65
|
+
if (char === "/") {
|
|
66
|
+
if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
|
|
67
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
68
|
+
if (res.length > 2) {
|
|
69
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
70
|
+
if (lastSlashIndex === -1) {
|
|
71
|
+
res = "";
|
|
72
|
+
lastSegmentLength = 0;
|
|
73
|
+
} else {
|
|
74
|
+
res = res.slice(0, lastSlashIndex);
|
|
75
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
76
|
+
}
|
|
77
|
+
lastSlash = index;
|
|
78
|
+
dots = 0;
|
|
79
|
+
continue;
|
|
80
|
+
} else if (res.length > 0) {
|
|
81
|
+
res = "";
|
|
82
|
+
lastSegmentLength = 0;
|
|
83
|
+
lastSlash = index;
|
|
84
|
+
dots = 0;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (allowAboveRoot) {
|
|
89
|
+
res += res.length > 0 ? "/.." : "..";
|
|
90
|
+
lastSegmentLength = 2;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
94
|
+
else res = path.slice(lastSlash + 1, index);
|
|
95
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
96
|
+
}
|
|
97
|
+
lastSlash = index;
|
|
98
|
+
dots = 0;
|
|
99
|
+
} else if (char === "." && dots !== -1) ++dots;
|
|
100
|
+
else dots = -1;
|
|
101
|
+
}
|
|
102
|
+
return res;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
exports.joinPaths = joinPaths;
|
package/dist/node_modules/.pnpm/@stryke_path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { DRIVE_LETTER_REGEX, DRIVE_LETTER_START_REGEX, UNC_REGEX } from "./regex.mjs";
|
|
2
|
+
import { isAbsolute } from "./is-type.mjs";
|
|
3
|
+
|
|
4
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/node_modules/@stryke/path/dist/join-paths.mjs
|
|
5
|
+
function normalizeWindowsPath(input = "") {
|
|
6
|
+
if (!input) return input;
|
|
7
|
+
return input.replace(/\\/g, "/").replace(DRIVE_LETTER_START_REGEX, (r) => r.toUpperCase());
|
|
8
|
+
}
|
|
9
|
+
function correctPaths(path) {
|
|
10
|
+
if (!path || path.length === 0) return ".";
|
|
11
|
+
path = normalizeWindowsPath(path);
|
|
12
|
+
const isUNCPath = path.match(UNC_REGEX);
|
|
13
|
+
const isPathAbsolute = isAbsolute(path);
|
|
14
|
+
const trailingSeparator = path[path.length - 1] === "/";
|
|
15
|
+
path = normalizeString(path, !isPathAbsolute);
|
|
16
|
+
if (path.length === 0) {
|
|
17
|
+
if (isPathAbsolute) return "/";
|
|
18
|
+
return trailingSeparator ? "./" : ".";
|
|
19
|
+
}
|
|
20
|
+
if (trailingSeparator) path += "/";
|
|
21
|
+
if (DRIVE_LETTER_REGEX.test(path)) path += "/";
|
|
22
|
+
if (isUNCPath) {
|
|
23
|
+
if (!isPathAbsolute) return `//./${path}`;
|
|
24
|
+
return `//${path}`;
|
|
25
|
+
}
|
|
26
|
+
return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Joins all given path segments together using the platform-specific separator as a delimiter.
|
|
30
|
+
* The resulting path is normalized to remove any redundant or unnecessary segments.
|
|
31
|
+
*
|
|
32
|
+
* @param segments - The path segments to join.
|
|
33
|
+
* @returns The joined and normalized path string.
|
|
34
|
+
*/
|
|
35
|
+
function joinPaths(...segments) {
|
|
36
|
+
let path = "";
|
|
37
|
+
for (const seg of segments) {
|
|
38
|
+
if (!seg) continue;
|
|
39
|
+
if (path.length > 0) {
|
|
40
|
+
const pathTrailing = path[path.length - 1] === "/";
|
|
41
|
+
const segLeading = seg[0] === "/";
|
|
42
|
+
if (pathTrailing && segLeading) path += seg.slice(1);
|
|
43
|
+
else path += pathTrailing || segLeading ? seg : `/${seg}`;
|
|
44
|
+
} else path += seg;
|
|
45
|
+
}
|
|
46
|
+
return correctPaths(path);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Resolves a string path, resolving '.' and '.' segments and allowing paths above the root.
|
|
50
|
+
*
|
|
51
|
+
* @param path - The path to normalize.
|
|
52
|
+
* @param allowAboveRoot - Whether to allow the resulting path to be above the root directory.
|
|
53
|
+
* @returns the normalized path string.
|
|
54
|
+
*/
|
|
55
|
+
function normalizeString(path, allowAboveRoot) {
|
|
56
|
+
let res = "";
|
|
57
|
+
let lastSegmentLength = 0;
|
|
58
|
+
let lastSlash = -1;
|
|
59
|
+
let dots = 0;
|
|
60
|
+
let char = null;
|
|
61
|
+
for (let index = 0; index <= path.length; ++index) {
|
|
62
|
+
if (index < path.length) char = path[index];
|
|
63
|
+
else if (char === "/") break;
|
|
64
|
+
else char = "/";
|
|
65
|
+
if (char === "/") {
|
|
66
|
+
if (lastSlash === index - 1 || dots === 1) {} else if (dots === 2) {
|
|
67
|
+
if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
|
|
68
|
+
if (res.length > 2) {
|
|
69
|
+
const lastSlashIndex = res.lastIndexOf("/");
|
|
70
|
+
if (lastSlashIndex === -1) {
|
|
71
|
+
res = "";
|
|
72
|
+
lastSegmentLength = 0;
|
|
73
|
+
} else {
|
|
74
|
+
res = res.slice(0, lastSlashIndex);
|
|
75
|
+
lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
|
|
76
|
+
}
|
|
77
|
+
lastSlash = index;
|
|
78
|
+
dots = 0;
|
|
79
|
+
continue;
|
|
80
|
+
} else if (res.length > 0) {
|
|
81
|
+
res = "";
|
|
82
|
+
lastSegmentLength = 0;
|
|
83
|
+
lastSlash = index;
|
|
84
|
+
dots = 0;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (allowAboveRoot) {
|
|
89
|
+
res += res.length > 0 ? "/.." : "..";
|
|
90
|
+
lastSegmentLength = 2;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
|
|
94
|
+
else res = path.slice(lastSlash + 1, index);
|
|
95
|
+
lastSegmentLength = index - lastSlash - 1;
|
|
96
|
+
}
|
|
97
|
+
lastSlash = index;
|
|
98
|
+
dots = 0;
|
|
99
|
+
} else if (char === "." && dots !== -1) ++dots;
|
|
100
|
+
else dots = -1;
|
|
101
|
+
}
|
|
102
|
+
return res;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
//#endregion
|
|
106
|
+
export { joinPaths };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/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;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/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 };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/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;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/@stryke+path@0.25.3/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 };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_defu = require('../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
3
2
|
const require_pathe_M_eThtNZ = require('../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs');
|
|
4
3
|
const require_main$1 = require('../../../../dotenv@17.2.3/node_modules/dotenv/lib/main.cjs');
|
|
5
4
|
const require_index = require('../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.cjs');
|
|
6
5
|
const require_jiti = require('../../../../jiti@2.6.1/node_modules/jiti/lib/jiti.cjs');
|
|
6
|
+
const require_defu = require('../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
7
7
|
const require_index$1 = require('../../../../rc9@2.1.2/node_modules/rc9/dist/index.cjs');
|
|
8
8
|
const require_index$2 = require('../../../../pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs');
|
|
9
9
|
let node_fs = require("node:fs");
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __toESM } from "../../../../../../_virtual/rolldown_runtime.mjs";
|
|
2
|
-
import { defu } from "../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
3
2
|
import { basename, dirname, extname, join, normalize, resolve } from "../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
|
|
4
3
|
import { require_main } from "../../../../dotenv@17.2.3/node_modules/dotenv/lib/main.mjs";
|
|
5
4
|
import { resolveModulePath } from "../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.mjs";
|
|
6
5
|
import { createJiti } from "../../../../jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
|
|
6
|
+
import { defu } from "../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
7
7
|
import { read, readUser } from "../../../../rc9@2.1.2/node_modules/rc9/dist/index.mjs";
|
|
8
8
|
import { findWorkspaceDir, readPackageJSON } from "../../../../pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs";
|
|
9
9
|
import { existsSync, promises, statSync } from "node:fs";
|
package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
const require_defu = require('../../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
3
2
|
const require_pathe_M_eThtNZ = require('../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs');
|
|
3
|
+
const require_defu = require('../../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
4
4
|
const require_nypm_CLjaS_sz = require('../../../../../nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.cjs');
|
|
5
5
|
const require_proxy$1 = require('../../../../../node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs');
|
|
6
6
|
let node_fs = require("node:fs");
|
package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defu } from "../../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
2
1
|
import { basename, dirname as dirname$1, resolve as resolve$1 } from "../../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
|
|
2
|
+
import { defu } from "../../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
3
3
|
import { installDependencies } from "../../../../../nypm@0.6.2/node_modules/nypm/dist/shared/nypm.CLjaS_sz.mjs";
|
|
4
4
|
import { require_proxy } from "../../../../../node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs";
|
|
5
5
|
import fs, { createWriteStream, existsSync, readdirSync, renameSync } from "node:fs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../../../_virtual/rolldown_runtime.cjs');
|
|
2
|
-
require('../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
3
2
|
const require_index = require('../../../../destr@2.0.5/node_modules/destr/dist/index.cjs');
|
|
3
|
+
require('../../../../defu@6.1.4/node_modules/defu/dist/defu.cjs');
|
|
4
4
|
let node_fs = require("node:fs");
|
|
5
5
|
let node_path = require("node:path");
|
|
6
6
|
let node_os = require("node:os");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
2
1
|
import { destr } from "../../../../destr@2.0.5/node_modules/destr/dist/index.mjs";
|
|
2
|
+
import "../../../../defu@6.1.4/node_modules/defu/dist/defu.mjs";
|
|
3
3
|
import { existsSync, readFileSync } from "node:fs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { homedir } from "node:os";
|
|
@@ -4,8 +4,8 @@ import { StoragePort, StoragePreset } from "./fs.mjs";
|
|
|
4
4
|
import { TSConfig } from "./tsconfig.mjs";
|
|
5
5
|
import { PluginContext } from "./context.mjs";
|
|
6
6
|
import { Plugin } from "./plugin.mjs";
|
|
7
|
-
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
8
7
|
import { transformAsync } from "@babel/core";
|
|
8
|
+
import { LogLevelLabel } from "@storm-software/config-tools/types";
|
|
9
9
|
import { MaybePromise } from "@stryke/types/base";
|
|
10
10
|
import { PreviewOptions } from "vite";
|
|
11
11
|
import { Format } from "@storm-software/build-tools/types";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerlines/plugin-env",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.61",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A package containing a Powerlines plugin for injecting static .env configuration values to the code so that they're accessible at runtime.",
|
|
6
6
|
"repository": {
|
|
@@ -193,27 +193,27 @@
|
|
|
193
193
|
"@alloy-js/typescript": "^0.22.0",
|
|
194
194
|
"@babel/core": "^7.28.6",
|
|
195
195
|
"@babel/types": "^7.28.6",
|
|
196
|
-
"@powerlines/plugin-alloy": "^0.18.
|
|
197
|
-
"@powerlines/plugin-automd": "^0.1.
|
|
198
|
-
"@powerlines/plugin-babel": "^0.12.
|
|
199
|
-
"@powerlines/plugin-plugin": "^0.12.
|
|
196
|
+
"@powerlines/plugin-alloy": "^0.18.58",
|
|
197
|
+
"@powerlines/plugin-automd": "^0.1.172",
|
|
198
|
+
"@powerlines/plugin-babel": "^0.12.181",
|
|
199
|
+
"@powerlines/plugin-plugin": "^0.12.124",
|
|
200
200
|
"@storm-software/config-tools": "^1.188.80",
|
|
201
|
-
"@stryke/capnp": "^0.12.
|
|
202
|
-
"@stryke/env": "^0.20.
|
|
203
|
-
"@stryke/fs": "^0.33.
|
|
204
|
-
"@stryke/json": "^0.9.
|
|
205
|
-
"@stryke/string-format": "^0.13.
|
|
206
|
-
"@stryke/type-checks": "^0.5.
|
|
207
|
-
"@stryke/types": "^0.10.
|
|
201
|
+
"@stryke/capnp": "^0.12.60",
|
|
202
|
+
"@stryke/env": "^0.20.52",
|
|
203
|
+
"@stryke/fs": "^0.33.35",
|
|
204
|
+
"@stryke/json": "^0.9.37",
|
|
205
|
+
"@stryke/string-format": "^0.13.3",
|
|
206
|
+
"@stryke/type-checks": "^0.5.19",
|
|
207
|
+
"@stryke/types": "^0.10.33",
|
|
208
208
|
"automd": "^0.4.2",
|
|
209
|
-
"powerlines": "^0.37.
|
|
209
|
+
"powerlines": "^0.37.46"
|
|
210
210
|
},
|
|
211
211
|
"devDependencies": {
|
|
212
|
-
"@powerlines/deepkit": "^0.5.
|
|
213
|
-
"@powerlines/plugin-deepkit": "^0.11.
|
|
212
|
+
"@powerlines/deepkit": "^0.5.89",
|
|
213
|
+
"@powerlines/plugin-deepkit": "^0.11.50",
|
|
214
214
|
"@types/node": "^24.10.9",
|
|
215
215
|
"vite": "8.0.0-beta.2"
|
|
216
216
|
},
|
|
217
217
|
"publishConfig": { "access": "public" },
|
|
218
|
-
"gitHead": "
|
|
218
|
+
"gitHead": "032b11dbd79e039303ebe2942ed230ea8956ece1"
|
|
219
219
|
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
const require_is_object = require('./type-checks/src/is-object.cjs');
|
|
2
|
-
const require_is_string = require('./type-checks/src/is-string.cjs');
|
|
3
|
-
require('./type-checks/src/index.cjs');
|
|
4
|
-
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.mjs
|
|
6
|
-
const n = (n$1) => {
|
|
7
|
-
if (require_is_string.e(n$1)) {
|
|
8
|
-
if (n$1.includes(`:`)) {
|
|
9
|
-
let e$1 = n$1.split(`:`);
|
|
10
|
-
if (e$1.length > 1 && e$1[0]) return {
|
|
11
|
-
file: e$1[0],
|
|
12
|
-
name: e$1[1]
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
if (n$1.includes(`#`)) {
|
|
16
|
-
let e$1 = n$1.split(`#`);
|
|
17
|
-
if (e$1.length > 1 && e$1[0]) return {
|
|
18
|
-
file: e$1[0],
|
|
19
|
-
name: e$1[1]
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return { file: n$1 };
|
|
23
|
-
}
|
|
24
|
-
if (require_is_object.t(n$1)) return {
|
|
25
|
-
file: n$1.file,
|
|
26
|
-
name: n$1.name
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
exports.n = n;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { t } from "./type-checks/src/is-object.mjs";
|
|
2
|
-
import { e } from "./type-checks/src/is-string.mjs";
|
|
3
|
-
import "./type-checks/src/index.mjs";
|
|
4
|
-
|
|
5
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/parse-type-definition.mjs
|
|
6
|
-
const n = (n$1) => {
|
|
7
|
-
if (e(n$1)) {
|
|
8
|
-
if (n$1.includes(`:`)) {
|
|
9
|
-
let e$1 = n$1.split(`:`);
|
|
10
|
-
if (e$1.length > 1 && e$1[0]) return {
|
|
11
|
-
file: e$1[0],
|
|
12
|
-
name: e$1[1]
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
if (n$1.includes(`#`)) {
|
|
16
|
-
let e$1 = n$1.split(`#`);
|
|
17
|
-
if (e$1.length > 1 && e$1[0]) return {
|
|
18
|
-
file: e$1[0],
|
|
19
|
-
name: e$1[1]
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
return { file: n$1 };
|
|
23
|
-
}
|
|
24
|
-
if (t(n$1)) return {
|
|
25
|
-
file: n$1.file,
|
|
26
|
-
name: n$1.name
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { n };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs
|
|
3
|
-
const e = (e$1) => e$1 == null ? e$1 === void 0 ? `[object Undefined]` : `[object Null]` : Object.prototype.toString.call(e$1);
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
exports.e = e;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/get-object-tag.mjs
|
|
2
|
-
const e = (e$1) => e$1 == null ? e$1 === void 0 ? `[object Undefined]` : `[object Null]` : Object.prototype.toString.call(e$1);
|
|
3
|
-
|
|
4
|
-
//#endregion
|
|
5
|
-
export { e };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const require_is_plain_object = require('./is-plain-object.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs
|
|
4
|
-
const t = (t$1) => {
|
|
5
|
-
try {
|
|
6
|
-
return typeof t$1 == `object` || !!t$1 && t$1?.constructor === Object || require_is_plain_object.n(t$1);
|
|
7
|
-
} catch {
|
|
8
|
-
return !1;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.t = t;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { n } from "./is-plain-object.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-object.mjs
|
|
4
|
-
const t = (t$1) => {
|
|
5
|
-
try {
|
|
6
|
-
return typeof t$1 == `object` || !!t$1 && t$1?.constructor === Object || n(t$1);
|
|
7
|
-
} catch {
|
|
8
|
-
return !1;
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { t };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const require_get_object_tag = require('./get-object-tag.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs
|
|
4
|
-
const t = (e$1) => typeof e$1 == `object` && !!e$1, n = (n$1) => {
|
|
5
|
-
if (!t(n$1) || require_get_object_tag.e(n$1) !== `[object Object]`) return !1;
|
|
6
|
-
if (Object.getPrototypeOf(n$1) === null) return !0;
|
|
7
|
-
let r = n$1;
|
|
8
|
-
for (; Object.getPrototypeOf(r) !== null;) r = Object.getPrototypeOf(r);
|
|
9
|
-
return Object.getPrototypeOf(n$1) === r;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.n = n;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { e } from "./get-object-tag.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-plain-object.mjs
|
|
4
|
-
const t = (e$1) => typeof e$1 == `object` && !!e$1, n = (n$1) => {
|
|
5
|
-
if (!t(n$1) || e(n$1) !== `[object Object]`) return !1;
|
|
6
|
-
if (Object.getPrototypeOf(n$1) === null) return !0;
|
|
7
|
-
let r = n$1;
|
|
8
|
-
for (; Object.getPrototypeOf(r) !== null;) r = Object.getPrototypeOf(r);
|
|
9
|
-
return Object.getPrototypeOf(n$1) === r;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { n };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/is-string.mjs
|
|
3
|
-
const e = (e$1) => {
|
|
4
|
-
try {
|
|
5
|
-
return typeof e$1 == `string`;
|
|
6
|
-
} catch {
|
|
7
|
-
return !1;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
exports.e = e;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
require('./is-buffer.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs
|
|
4
|
-
((e) => (typeof globalThis == `object` || Object.defineProperty(e, `typeDetectGlobalObject`, {
|
|
5
|
-
get() {
|
|
6
|
-
return this;
|
|
7
|
-
},
|
|
8
|
-
configurable: !0
|
|
9
|
-
}), globalThis))(Object.prototype);
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import "./is-buffer.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+convert@0.6.32/node_modules/@stryke/convert/dist/type-checks/src/type-detect.mjs
|
|
4
|
-
((e) => (typeof globalThis == `object` || Object.defineProperty(e, `typeDetectGlobalObject`, {
|
|
5
|
-
get() {
|
|
6
|
-
return this;
|
|
7
|
-
},
|
|
8
|
-
configurable: !0
|
|
9
|
-
}), globalThis))(Object.prototype);
|
|
10
|
-
|
|
11
|
-
//#endregion
|
|
12
|
-
export { };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const require_slash = require('./slash.cjs');
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.mjs
|
|
4
|
-
function t$1(t$2, n) {
|
|
5
|
-
let r = require_slash.t(t$2.replaceAll(/\\/g, `/`).replace(/\/*$/, ``))?.toLowerCase(), i = require_slash.t(n.replaceAll(/\\/g, `/`).replace(/\/*$/, ``))?.toLowerCase();
|
|
6
|
-
return t$2 !== n && r !== i && r.startsWith(`${i}/`);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
exports.t = t$1;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { t } from "./slash.mjs";
|
|
2
|
-
|
|
3
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/is-parent-path.mjs
|
|
4
|
-
function t$1(t$2, n) {
|
|
5
|
-
let r = t(t$2.replaceAll(/\\/g, `/`).replace(/\/*$/, ``))?.toLowerCase(), i = t(n.replaceAll(/\\/g, `/`).replace(/\/*$/, ``))?.toLowerCase();
|
|
6
|
-
return t$2 !== n && r !== i && r.startsWith(`${i}/`);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//#endregion
|
|
10
|
-
export { t$1 as t };
|