@powerlines/plugin-env 0.15.60 → 0.15.62
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/README.md +305 -0
- 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
|
@@ -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 };
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const require_regex = require('./regex.cjs');
|
|
2
|
-
const require_slash = require('./slash.cjs');
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
|
-
function r$1(t$1) {
|
|
6
|
-
return require_regex.r.test(require_slash.t(t$1));
|
|
7
|
-
}
|
|
8
|
-
function i(e) {
|
|
9
|
-
return r$1(e);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
exports.i = i;
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/is-type.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { r } from "./regex.mjs";
|
|
2
|
-
import { t } from "./slash.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/is-type.mjs
|
|
5
|
-
function r$1(t$1) {
|
|
6
|
-
return r.test(t(t$1));
|
|
7
|
-
}
|
|
8
|
-
function i(e) {
|
|
9
|
-
return r$1(e);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
//#endregion
|
|
13
|
-
export { i };
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.cjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
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.24.3/node_modules/@stryke/path/dist/join-paths.mjs
|
|
5
|
-
function i$1(e$1 = ``) {
|
|
6
|
-
return e$1 && e$1.replace(/\\/g, `/`).replace(require_regex.e, (e$2) => e$2.toUpperCase());
|
|
7
|
-
}
|
|
8
|
-
function a(t$1) {
|
|
9
|
-
if (!t$1 || t$1.length === 0) return `.`;
|
|
10
|
-
t$1 = i$1(t$1);
|
|
11
|
-
let a$1 = t$1.match(require_regex.n), o$1 = require_is_type.i(t$1), s = t$1[t$1.length - 1] === `/`;
|
|
12
|
-
return t$1 = c(t$1, !o$1), t$1.length === 0 ? o$1 ? `/` : s ? `./` : `.` : (s && (t$1 += `/`), require_regex.t.test(t$1) && (t$1 += `/`), a$1 ? o$1 ? `//${t$1}` : `//./${t$1}` : o$1 && !require_is_type.i(t$1) ? `/${t$1}` : t$1);
|
|
13
|
-
}
|
|
14
|
-
function o(...e$1) {
|
|
15
|
-
let t$1 = ``;
|
|
16
|
-
for (let n$1 of e$1) if (n$1) if (t$1.length > 0) {
|
|
17
|
-
let e$2 = t$1[t$1.length - 1] === `/`, r = n$1[0] === `/`;
|
|
18
|
-
e$2 && r ? t$1 += n$1.slice(1) : t$1 += e$2 || r ? n$1 : `/${n$1}`;
|
|
19
|
-
} else t$1 += n$1;
|
|
20
|
-
return a(t$1);
|
|
21
|
-
}
|
|
22
|
-
function c(e$1, t$1) {
|
|
23
|
-
let n$1 = ``, r = 0, i$2 = -1, a$1 = 0, o$1 = null;
|
|
24
|
-
for (let s = 0; s <= e$1.length; ++s) {
|
|
25
|
-
if (s < e$1.length) o$1 = e$1[s];
|
|
26
|
-
else if (o$1 === `/`) break;
|
|
27
|
-
else o$1 = `/`;
|
|
28
|
-
if (o$1 === `/`) {
|
|
29
|
-
if (!(i$2 === s - 1 || a$1 === 1)) if (a$1 === 2) {
|
|
30
|
-
if (n$1.length < 2 || r !== 2 || n$1[n$1.length - 1] !== `.` || n$1[n$1.length - 2] !== `.`) {
|
|
31
|
-
if (n$1.length > 2) {
|
|
32
|
-
let e$2 = n$1.lastIndexOf(`/`);
|
|
33
|
-
e$2 === -1 ? (n$1 = ``, r = 0) : (n$1 = n$1.slice(0, e$2), r = n$1.length - 1 - n$1.lastIndexOf(`/`)), i$2 = s, a$1 = 0;
|
|
34
|
-
continue;
|
|
35
|
-
} else if (n$1.length > 0) {
|
|
36
|
-
n$1 = ``, r = 0, i$2 = s, a$1 = 0;
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
t$1 && (n$1 += n$1.length > 0 ? `/..` : `..`, r = 2);
|
|
41
|
-
} else n$1.length > 0 ? n$1 += `/${e$1.slice(i$2 + 1, s)}` : n$1 = e$1.slice(i$2 + 1, s), r = s - i$2 - 1;
|
|
42
|
-
i$2 = s, a$1 = 0;
|
|
43
|
-
} else o$1 === `.` && a$1 !== -1 ? ++a$1 : a$1 = -1;
|
|
44
|
-
}
|
|
45
|
-
return n$1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
exports.o = o;
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { e, n, t } from "./regex.mjs";
|
|
2
|
-
import { i } from "./is-type.mjs";
|
|
3
|
-
|
|
4
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/join-paths.mjs
|
|
5
|
-
function i$1(e$1 = ``) {
|
|
6
|
-
return e$1 && e$1.replace(/\\/g, `/`).replace(e, (e$2) => e$2.toUpperCase());
|
|
7
|
-
}
|
|
8
|
-
function a(t$1) {
|
|
9
|
-
if (!t$1 || t$1.length === 0) return `.`;
|
|
10
|
-
t$1 = i$1(t$1);
|
|
11
|
-
let a$1 = t$1.match(n), o$1 = i(t$1), s = t$1[t$1.length - 1] === `/`;
|
|
12
|
-
return t$1 = c(t$1, !o$1), t$1.length === 0 ? o$1 ? `/` : s ? `./` : `.` : (s && (t$1 += `/`), t.test(t$1) && (t$1 += `/`), a$1 ? o$1 ? `//${t$1}` : `//./${t$1}` : o$1 && !i(t$1) ? `/${t$1}` : t$1);
|
|
13
|
-
}
|
|
14
|
-
function o(...e$1) {
|
|
15
|
-
let t$1 = ``;
|
|
16
|
-
for (let n$1 of e$1) if (n$1) if (t$1.length > 0) {
|
|
17
|
-
let e$2 = t$1[t$1.length - 1] === `/`, r = n$1[0] === `/`;
|
|
18
|
-
e$2 && r ? t$1 += n$1.slice(1) : t$1 += e$2 || r ? n$1 : `/${n$1}`;
|
|
19
|
-
} else t$1 += n$1;
|
|
20
|
-
return a(t$1);
|
|
21
|
-
}
|
|
22
|
-
function c(e$1, t$1) {
|
|
23
|
-
let n$1 = ``, r = 0, i$2 = -1, a$1 = 0, o$1 = null;
|
|
24
|
-
for (let s = 0; s <= e$1.length; ++s) {
|
|
25
|
-
if (s < e$1.length) o$1 = e$1[s];
|
|
26
|
-
else if (o$1 === `/`) break;
|
|
27
|
-
else o$1 = `/`;
|
|
28
|
-
if (o$1 === `/`) {
|
|
29
|
-
if (!(i$2 === s - 1 || a$1 === 1)) if (a$1 === 2) {
|
|
30
|
-
if (n$1.length < 2 || r !== 2 || n$1[n$1.length - 1] !== `.` || n$1[n$1.length - 2] !== `.`) {
|
|
31
|
-
if (n$1.length > 2) {
|
|
32
|
-
let e$2 = n$1.lastIndexOf(`/`);
|
|
33
|
-
e$2 === -1 ? (n$1 = ``, r = 0) : (n$1 = n$1.slice(0, e$2), r = n$1.length - 1 - n$1.lastIndexOf(`/`)), i$2 = s, a$1 = 0;
|
|
34
|
-
continue;
|
|
35
|
-
} else if (n$1.length > 0) {
|
|
36
|
-
n$1 = ``, r = 0, i$2 = s, a$1 = 0;
|
|
37
|
-
continue;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
t$1 && (n$1 += n$1.length > 0 ? `/..` : `..`, r = 2);
|
|
41
|
-
} else n$1.length > 0 ? n$1 += `/${e$1.slice(i$2 + 1, s)}` : n$1 = e$1.slice(i$2 + 1, s), r = s - i$2 - 1;
|
|
42
|
-
i$2 = s, a$1 = 0;
|
|
43
|
-
} else o$1 === `.` && a$1 !== -1 ? ++a$1 : a$1 = -1;
|
|
44
|
-
}
|
|
45
|
-
return n$1;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
//#endregion
|
|
49
|
-
export { o };
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.cjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/regex.mjs
|
|
3
|
-
const e = /^[A-Z]:\//i, t = /^[A-Z]:$/i, n = /^[/\\]{2}/, r = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i, i = /^\/([A-Z]:)?$/i, a = /\.[0-9a-z]+$/i, o = /^@\w+\/.*$/, s = /^(?:@[\w-]+\/)?[\w-]+$/;
|
|
4
|
-
|
|
5
|
-
//#endregion
|
|
6
|
-
exports.e = e;
|
|
7
|
-
exports.n = n;
|
|
8
|
-
exports.r = r;
|
|
9
|
-
exports.t = t;
|
package/dist/node_modules/.pnpm/@stryke_path@0.24.3/node_modules/@stryke/path/dist/regex.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/@stryke+path@0.24.3/node_modules/@stryke/path/dist/regex.mjs
|
|
2
|
-
const e = /^[A-Z]:\//i, t = /^[A-Z]:$/i, n = /^[/\\]{2}/, r = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^~[/\\]|^[A-Z]:[/\\]/i, i = /^\/([A-Z]:)?$/i, a = /\.[0-9a-z]+$/i, o = /^@\w+\/.*$/, s = /^(?:@[\w-]+\/)?[\w-]+$/;
|
|
3
|
-
|
|
4
|
-
//#endregion
|
|
5
|
-
export { e, n, r, t };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|