piral-cli 1.10.0-beta.8476 → 1.10.0-beta.8493
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/lib/external/index.js +30 -19
- package/package.json +2 -2
package/lib/external/index.js
CHANGED
|
@@ -53579,7 +53579,7 @@ var MAX = 1e4;
|
|
|
53579
53579
|
var cache = /* @__PURE__ */ new Set();
|
|
53580
53580
|
var normalizeUnicode = (s) => {
|
|
53581
53581
|
if (!cache.has(s)) {
|
|
53582
|
-
normalizeCache[s] = s.normalize("NFD");
|
|
53582
|
+
normalizeCache[s] = s.normalize("NFD").toLocaleLowerCase("en").toLocaleUpperCase("en");
|
|
53583
53583
|
} else {
|
|
53584
53584
|
cache.delete(s);
|
|
53585
53585
|
}
|
|
@@ -53622,7 +53622,7 @@ var PathReservations = class {
|
|
|
53622
53622
|
#running = /* @__PURE__ */ new Set();
|
|
53623
53623
|
reserve(paths, fn) {
|
|
53624
53624
|
paths = isWindows2 ? ["win32 parallelization disabled"] : paths.map((p) => {
|
|
53625
|
-
return stripTrailingSlashes((0, import_node_path7.join)(normalizeUnicode(p)))
|
|
53625
|
+
return stripTrailingSlashes((0, import_node_path7.join)(normalizeUnicode(p)));
|
|
53626
53626
|
});
|
|
53627
53627
|
const dirs = new Set(paths.map((path10) => getDirs(path10)).reduce((a, b) => a.concat(b)));
|
|
53628
53628
|
this.#reservations.set(fn, { dirs, paths });
|
|
@@ -53742,6 +53742,7 @@ var SYMLINK2 = Symbol("symlink");
|
|
|
53742
53742
|
var HARDLINK2 = Symbol("hardlink");
|
|
53743
53743
|
var UNSUPPORTED = Symbol("unsupported");
|
|
53744
53744
|
var CHECKPATH = Symbol("checkPath");
|
|
53745
|
+
var STRIPABSOLUTEPATH = Symbol("stripAbsolutePath");
|
|
53745
53746
|
var MKDIR = Symbol("mkdir");
|
|
53746
53747
|
var ONERROR = Symbol("onError");
|
|
53747
53748
|
var PENDING = Symbol("pending");
|
|
@@ -53869,6 +53870,31 @@ var Unpack = class extends Parser {
|
|
|
53869
53870
|
this.emit("end");
|
|
53870
53871
|
}
|
|
53871
53872
|
}
|
|
53873
|
+
// return false if we need to skip this file
|
|
53874
|
+
// return true if the field was successfully sanitized
|
|
53875
|
+
[STRIPABSOLUTEPATH](entry, field) {
|
|
53876
|
+
const path10 = entry[field];
|
|
53877
|
+
if (!path10 || this.preservePaths)
|
|
53878
|
+
return true;
|
|
53879
|
+
const parts = path10.split("/");
|
|
53880
|
+
if (parts.includes("..") || /* c8 ignore next */
|
|
53881
|
+
isWindows3 && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
|
|
53882
|
+
this.warn("TAR_ENTRY_ERROR", `${field} contains '..'`, {
|
|
53883
|
+
entry,
|
|
53884
|
+
[field]: path10
|
|
53885
|
+
});
|
|
53886
|
+
return false;
|
|
53887
|
+
}
|
|
53888
|
+
const [root, stripped] = stripAbsolutePath(path10);
|
|
53889
|
+
if (root) {
|
|
53890
|
+
entry[field] = String(stripped);
|
|
53891
|
+
this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute ${field}`, {
|
|
53892
|
+
entry,
|
|
53893
|
+
[field]: path10
|
|
53894
|
+
});
|
|
53895
|
+
}
|
|
53896
|
+
return true;
|
|
53897
|
+
}
|
|
53872
53898
|
[CHECKPATH](entry) {
|
|
53873
53899
|
const p = normalizeWindowsPath(entry.path);
|
|
53874
53900
|
const parts = p.split("/");
|
|
@@ -53896,23 +53922,8 @@ var Unpack = class extends Parser {
|
|
|
53896
53922
|
});
|
|
53897
53923
|
return false;
|
|
53898
53924
|
}
|
|
53899
|
-
if (!this
|
|
53900
|
-
|
|
53901
|
-
isWindows3 && /^[a-z]:\.\.$/i.test(parts[0] ?? "")) {
|
|
53902
|
-
this.warn("TAR_ENTRY_ERROR", `path contains '..'`, {
|
|
53903
|
-
entry,
|
|
53904
|
-
path: p
|
|
53905
|
-
});
|
|
53906
|
-
return false;
|
|
53907
|
-
}
|
|
53908
|
-
const [root, stripped] = stripAbsolutePath(p);
|
|
53909
|
-
if (root) {
|
|
53910
|
-
entry.path = String(stripped);
|
|
53911
|
-
this.warn("TAR_ENTRY_INFO", `stripping ${root} from absolute path`, {
|
|
53912
|
-
entry,
|
|
53913
|
-
path: p
|
|
53914
|
-
});
|
|
53915
|
-
}
|
|
53925
|
+
if (!this[STRIPABSOLUTEPATH](entry, "path") || !this[STRIPABSOLUTEPATH](entry, "linkpath")) {
|
|
53926
|
+
return false;
|
|
53916
53927
|
}
|
|
53917
53928
|
if (import_node_path8.default.isAbsolute(entry.path)) {
|
|
53918
53929
|
entry.absolute = normalizeWindowsPath(import_node_path8.default.resolve(entry.path));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "piral-cli",
|
|
3
|
-
"version": "1.10.0-beta.
|
|
3
|
+
"version": "1.10.0-beta.8493",
|
|
4
4
|
"description": "The standard CLI for creating and building a Piral instance or a Pilet.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portal",
|
|
@@ -78,5 +78,5 @@
|
|
|
78
78
|
"open": "^10",
|
|
79
79
|
"typescript": "^5"
|
|
80
80
|
},
|
|
81
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "69e45333683926a42dabaa8d3ee4e72ddc25829a"
|
|
82
82
|
}
|