@putkoff/abstract-utilities 1.0.4 → 1.0.19
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/cjs/index.js +45 -27
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +134 -114
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +0 -0
- package/dist/types/functions/auth_utils/imports.d.ts +0 -0
- package/dist/types/functions/auth_utils/index.d.ts +0 -0
- package/dist/types/functions/auth_utils/src/index.d.ts +0 -0
- package/dist/types/functions/auth_utils/src/token_utils.d.ts +0 -0
- package/dist/types/functions/config_utils/imports.d.ts +1 -1
- package/dist/types/functions/config_utils/index.d.ts +0 -0
- package/dist/types/functions/config_utils/src/config_utils.d.ts +0 -0
- package/dist/types/functions/config_utils/src/index.d.ts +0 -0
- package/dist/types/functions/constants_utils/index.d.ts +0 -0
- package/dist/types/functions/constants_utils/src/constants.d.ts +0 -0
- package/dist/types/functions/constants_utils/src/index.d.ts +0 -0
- package/dist/types/functions/env_utils/imports.d.ts +0 -0
- package/dist/types/functions/env_utils/index.d.ts +0 -0
- package/dist/types/functions/env_utils/src/index.d.ts +0 -0
- package/dist/types/functions/env_utils/src/window_utils.d.ts +0 -0
- package/dist/types/functions/fetch_utils/imports.d.ts +0 -0
- package/dist/types/functions/fetch_utils/index.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/fetch_utils.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/index.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/url_utils.d.ts +0 -0
- package/dist/types/functions/fetch_utils/src/utils.d.ts +0 -0
- package/dist/types/functions/index.d.ts +0 -0
- package/dist/types/functions/math_utils/index.d.ts +0 -0
- package/dist/types/functions/math_utils/safe_math.d.ts +0 -0
- package/dist/types/functions/path_utils/imports.d.ts +0 -0
- package/dist/types/functions/path_utils/index.d.ts +0 -0
- package/dist/types/functions/path_utils/src/base_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/function_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/index.d.ts +0 -0
- package/dist/types/functions/path_utils/src/misc_dirs.d.ts +0 -0
- package/dist/types/functions/path_utils/src/path_utils.d.ts +0 -0
- package/dist/types/functions/path_utils/src/paths.d.ts +0 -0
- package/dist/types/functions/path_utils/src/src_dirs.d.ts +0 -0
- package/dist/types/functions/read_utils/imports.d.ts +0 -0
- package/dist/types/functions/read_utils/index.d.ts +0 -0
- package/dist/types/functions/read_utils/src/index.d.ts +0 -0
- package/dist/types/functions/read_utils/src/utils.d.ts +0 -0
- package/dist/types/functions/rndm_utils/imports.d.ts +0 -0
- package/dist/types/functions/rndm_utils/index.d.ts +0 -0
- package/dist/types/functions/rndm_utils/src/index.d.ts +0 -0
- package/dist/types/functions/rndm_utils/src/utils.d.ts +0 -0
- package/dist/types/functions/safe_utils/imports.d.ts +0 -0
- package/dist/types/functions/safe_utils/index.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/index.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_document.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_globals.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_storage.d.ts +0 -0
- package/dist/types/functions/safe_utils/src/safe_window.d.ts +0 -0
- package/dist/types/functions/string_utils/index.d.ts +0 -0
- package/dist/types/functions/string_utils/src/index.d.ts +0 -0
- package/dist/types/functions/string_utils/src/string_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/imports.d.ts +0 -0
- package/dist/types/functions/type_utils/index.d.ts +0 -0
- package/dist/types/functions/type_utils/src/clean_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/ensure_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/imports.d.ts +0 -0
- package/dist/types/functions/type_utils/src/index.d.ts +0 -0
- package/dist/types/functions/type_utils/src/json_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/mime_utils.d.ts +0 -0
- package/dist/types/functions/type_utils/src/type_utils.d.ts +0 -0
- package/dist/types/functions/ui_utils/imports.d.ts +0 -0
- package/dist/types/functions/ui_utils/index.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/button.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/checkbox.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/index.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/input.d.ts +0 -0
- package/dist/types/functions/ui_utils/src/spinner.d.ts +0 -0
- package/dist/types/functions/variable_utils/imports.d.ts +0 -0
- package/dist/types/functions/variable_utils/index.d.ts +0 -0
- package/dist/types/functions/variable_utils/src/index.d.ts +0 -0
- package/dist/types/functions/variable_utils/src/variable_utils.d.ts +0 -0
- package/dist/types/index.d.ts +0 -0
- package/dist/types/types/index.d.ts +0 -0
- package/dist/types/types/src/ChangePassword.d.ts +0 -0
- package/dist/types/types/src/Files.d.ts +0 -0
- package/dist/types/types/src/index.d.ts +0 -0
- package/dist/types/types/src/login.d.ts +0 -0
- package/dist/types/types/src/logout.d.ts +0 -0
- package/dist/types/types/src/utils.d.ts +0 -0
- package/dist/types/utils/imports.d.ts +0 -0
- package/dist/types/utils/index.d.ts +0 -0
- package/dist/types/utils/src/Input.d.ts +0 -0
- package/dist/types/utils/src/config.d.ts +0 -0
- package/dist/types/utils/src/index.d.ts +0 -0
- package/package.json +11 -3
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
export { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import path$1 from 'path';
|
|
3
|
-
import * as fs from 'node:fs';
|
|
4
|
-
import * as fsp from 'node:fs/promises';
|
|
5
|
-
import * as path from 'node:path';
|
|
6
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
3
|
|
|
8
4
|
function getSafeDocument() {
|
|
@@ -324,6 +320,25 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
324
320
|
};
|
|
325
321
|
|
|
326
322
|
// src/functions/read_utils/src/read_utils.ts
|
|
323
|
+
let fs = null;
|
|
324
|
+
let path$1 = null;
|
|
325
|
+
function getFsModules() {
|
|
326
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
327
|
+
var _a;
|
|
328
|
+
if (!fs && !path$1 && typeof process !== "undefined" && ((_a = process.versions) === null || _a === void 0 ? void 0 : _a.node)) {
|
|
329
|
+
try {
|
|
330
|
+
// prevent bundlers from resolving these at build time
|
|
331
|
+
fs = (new Function("return require('fs')"))();
|
|
332
|
+
path$1 = (new Function("return require('path')"))();
|
|
333
|
+
}
|
|
334
|
+
catch (_b) {
|
|
335
|
+
fs = null;
|
|
336
|
+
path$1 = null;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
return { fs, path: path$1 };
|
|
340
|
+
});
|
|
341
|
+
}
|
|
327
342
|
/**
|
|
328
343
|
* Reads a JSON file, either via Node’s fs (if available)
|
|
329
344
|
* or via window.fetch in the browser. Never throws — returns
|
|
@@ -331,37 +346,36 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
331
346
|
*/
|
|
332
347
|
function readJsonFile(relativeOrAbsolutePath) {
|
|
333
348
|
return __awaiter(this, void 0, void 0, function* () {
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
process.versions.node) {
|
|
349
|
+
var _a;
|
|
350
|
+
// 1) Try Node.js fs (only at runtime, not bundled)
|
|
351
|
+
if (typeof process !== "undefined" && ((_a = process.versions) === null || _a === void 0 ? void 0 : _a.node)) {
|
|
338
352
|
try {
|
|
339
|
-
const fs = yield
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
353
|
+
const { fs, path } = yield getFsModules();
|
|
354
|
+
if (fs && path) {
|
|
355
|
+
const filePath = path.isAbsolute(relativeOrAbsolutePath)
|
|
356
|
+
? relativeOrAbsolutePath
|
|
357
|
+
: path.resolve(process.cwd(), relativeOrAbsolutePath);
|
|
358
|
+
const text = fs.readFileSync(filePath, "utf8");
|
|
359
|
+
return JSON.parse(text);
|
|
360
|
+
}
|
|
346
361
|
}
|
|
347
|
-
catch (
|
|
348
|
-
// swallow and fall back
|
|
362
|
+
catch (_b) {
|
|
363
|
+
// swallow and fall back
|
|
349
364
|
}
|
|
350
365
|
}
|
|
351
366
|
// 2) Try browser fetch
|
|
352
|
-
const fetchFn = safeGlobalProp(
|
|
353
|
-
if (typeof fetchFn !==
|
|
367
|
+
const fetchFn = safeGlobalProp("fetch");
|
|
368
|
+
if (typeof fetchFn !== "function") {
|
|
354
369
|
return null;
|
|
355
370
|
}
|
|
356
|
-
// Resolve URL against document.baseURI if possible
|
|
357
371
|
let url = relativeOrAbsolutePath;
|
|
358
|
-
const baseURI = safeGlobalProp(
|
|
372
|
+
const baseURI = safeGlobalProp("document", "baseURI");
|
|
359
373
|
if (baseURI) {
|
|
360
374
|
try {
|
|
361
375
|
url = new URL(relativeOrAbsolutePath, baseURI).href;
|
|
362
376
|
}
|
|
363
|
-
catch (
|
|
364
|
-
|
|
377
|
+
catch (_c) {
|
|
378
|
+
/* keep url as-is */
|
|
365
379
|
}
|
|
366
380
|
}
|
|
367
381
|
try {
|
|
@@ -370,7 +384,7 @@ function readJsonFile(relativeOrAbsolutePath) {
|
|
|
370
384
|
return null;
|
|
371
385
|
return (yield res.json());
|
|
372
386
|
}
|
|
373
|
-
catch (
|
|
387
|
+
catch (_d) {
|
|
374
388
|
return null;
|
|
375
389
|
}
|
|
376
390
|
});
|
|
@@ -557,87 +571,8 @@ function fetchIndexHtmlContainer(filename_1) {
|
|
|
557
571
|
});
|
|
558
572
|
}
|
|
559
573
|
|
|
560
|
-
function
|
|
561
|
-
|
|
562
|
-
const s = (parts.length === 1 && Array.isArray(parts[0]) ? parts[0] : parts);
|
|
563
|
-
let r = "";
|
|
564
|
-
for (let i = 0; i < s.length; i++) {
|
|
565
|
-
let d = ((_a = s[i]) !== null && _a !== void 0 ? _a : "").toString();
|
|
566
|
-
if (!d)
|
|
567
|
-
continue;
|
|
568
|
-
if (i === 0)
|
|
569
|
-
r = d;
|
|
570
|
-
else {
|
|
571
|
-
d = d.replace(/^\/+/, "");
|
|
572
|
-
r = r.replace(/\/+$/, "");
|
|
573
|
-
r = `${r}/${d}`;
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
return r;
|
|
577
|
-
}
|
|
578
|
-
/**
|
|
579
|
-
* Returns a full URL.
|
|
580
|
-
* If partial_url is already absolute (starts with http), it is returned as is.
|
|
581
|
-
* Otherwise, it is combined with the base URL.
|
|
582
|
-
*/
|
|
583
|
-
function get_full_url(partial_url, domain = null) {
|
|
584
|
-
if (typeof partial_url !== 'string') {
|
|
585
|
-
throw new Error('partial_url must be a string');
|
|
586
|
-
}
|
|
587
|
-
// If it already starts with http, assume it is absolute.
|
|
588
|
-
if (partial_url.startsWith('http')) {
|
|
589
|
-
return partial_url;
|
|
590
|
-
}
|
|
591
|
-
return urlJoin(domain, partial_url);
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Returns a full file system path.
|
|
595
|
-
* If partial_path is already absolute, it is returned as is.
|
|
596
|
-
* Otherwise, it is joined with the base directory.
|
|
597
|
-
*/
|
|
598
|
-
function get_full_path(partial_path, parent_dir = null) {
|
|
599
|
-
if (typeof partial_path !== 'string') {
|
|
600
|
-
throw new Error('partial_path must be a string');
|
|
601
|
-
}
|
|
602
|
-
if (path$1.isAbsolute(partial_path)) {
|
|
603
|
-
return partial_path;
|
|
604
|
-
}
|
|
605
|
-
return urlJoin(parent_dir, partial_path);
|
|
606
|
-
}
|
|
607
|
-
/**
|
|
608
|
-
* Converts a local file system path into its corresponding URL.
|
|
609
|
-
* It checks against the known directories in all_paths and replaces the matching base.
|
|
610
|
-
*/
|
|
611
|
-
function path_to_url(filePath, all_paths) {
|
|
612
|
-
if (typeof filePath !== 'string') {
|
|
613
|
-
throw new Error('filePath must be a string');
|
|
614
|
-
}
|
|
615
|
-
for (const key in all_paths) {
|
|
616
|
-
const mapping = all_paths[key];
|
|
617
|
-
const normalizedBase = path$1.normalize(mapping.path);
|
|
618
|
-
if (filePath.startsWith(normalizedBase)) {
|
|
619
|
-
const relativePath = filePath.substring(normalizedBase.length);
|
|
620
|
-
return urlJoin(mapping.url, relativePath.replace(/\\/g, '/'));
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
return null;
|
|
624
|
-
}
|
|
625
|
-
/**
|
|
626
|
-
* Converts a URL into its corresponding local file system path.
|
|
627
|
-
* It checks against the known URL prefixes in all_paths and replaces the matching base.
|
|
628
|
-
*/
|
|
629
|
-
function url_to_path(urlStr, all_paths) {
|
|
630
|
-
if (typeof urlStr !== 'string') {
|
|
631
|
-
throw new Error('urlStr must be a string');
|
|
632
|
-
}
|
|
633
|
-
for (const key in all_paths) {
|
|
634
|
-
const mapping = all_paths[key];
|
|
635
|
-
if (urlStr.startsWith(mapping.url)) {
|
|
636
|
-
const relativeUrl = urlStr.substring(mapping.url.length);
|
|
637
|
-
return urlJoin(mapping.path, relativeUrl);
|
|
638
|
-
}
|
|
639
|
-
}
|
|
640
|
-
return null;
|
|
574
|
+
function getDefaultExportFromCjs (x) {
|
|
575
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
641
576
|
}
|
|
642
577
|
|
|
643
578
|
function assertPath(path) {
|
|
@@ -1142,6 +1077,91 @@ posix.posix = posix;
|
|
|
1142
1077
|
|
|
1143
1078
|
var pathBrowserify = posix;
|
|
1144
1079
|
|
|
1080
|
+
var path = /*@__PURE__*/getDefaultExportFromCjs(pathBrowserify);
|
|
1081
|
+
|
|
1082
|
+
function urlJoin(...parts) {
|
|
1083
|
+
var _a;
|
|
1084
|
+
const s = (parts.length === 1 && Array.isArray(parts[0]) ? parts[0] : parts);
|
|
1085
|
+
let r = "";
|
|
1086
|
+
for (let i = 0; i < s.length; i++) {
|
|
1087
|
+
let d = ((_a = s[i]) !== null && _a !== void 0 ? _a : "").toString();
|
|
1088
|
+
if (!d)
|
|
1089
|
+
continue;
|
|
1090
|
+
if (i === 0)
|
|
1091
|
+
r = d;
|
|
1092
|
+
else {
|
|
1093
|
+
d = d.replace(/^\/+/, "");
|
|
1094
|
+
r = r.replace(/\/+$/, "");
|
|
1095
|
+
r = `${r}/${d}`;
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
return r;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Returns a full URL.
|
|
1102
|
+
* If partial_url is already absolute (starts with http), it is returned as is.
|
|
1103
|
+
* Otherwise, it is combined with the base URL.
|
|
1104
|
+
*/
|
|
1105
|
+
function get_full_url(partial_url, domain = null) {
|
|
1106
|
+
if (typeof partial_url !== 'string') {
|
|
1107
|
+
throw new Error('partial_url must be a string');
|
|
1108
|
+
}
|
|
1109
|
+
// If it already starts with http, assume it is absolute.
|
|
1110
|
+
if (partial_url.startsWith('http')) {
|
|
1111
|
+
return partial_url;
|
|
1112
|
+
}
|
|
1113
|
+
return urlJoin(domain, partial_url);
|
|
1114
|
+
}
|
|
1115
|
+
/**
|
|
1116
|
+
* Returns a full file system path.
|
|
1117
|
+
* If partial_path is already absolute, it is returned as is.
|
|
1118
|
+
* Otherwise, it is joined with the base directory.
|
|
1119
|
+
*/
|
|
1120
|
+
function get_full_path(partial_path, parent_dir = null) {
|
|
1121
|
+
if (typeof partial_path !== 'string') {
|
|
1122
|
+
throw new Error('partial_path must be a string');
|
|
1123
|
+
}
|
|
1124
|
+
if (path.isAbsolute(partial_path)) {
|
|
1125
|
+
return partial_path;
|
|
1126
|
+
}
|
|
1127
|
+
return urlJoin(parent_dir, partial_path);
|
|
1128
|
+
}
|
|
1129
|
+
/**
|
|
1130
|
+
* Converts a local file system path into its corresponding URL.
|
|
1131
|
+
* It checks against the known directories in all_paths and replaces the matching base.
|
|
1132
|
+
*/
|
|
1133
|
+
function path_to_url(filePath, all_paths) {
|
|
1134
|
+
if (typeof filePath !== 'string') {
|
|
1135
|
+
throw new Error('filePath must be a string');
|
|
1136
|
+
}
|
|
1137
|
+
for (const key in all_paths) {
|
|
1138
|
+
const mapping = all_paths[key];
|
|
1139
|
+
const normalizedBase = path.normalize(mapping.path);
|
|
1140
|
+
if (filePath.startsWith(normalizedBase)) {
|
|
1141
|
+
const relativePath = filePath.substring(normalizedBase.length);
|
|
1142
|
+
return urlJoin(mapping.url, relativePath.replace(/\\/g, '/'));
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
return null;
|
|
1146
|
+
}
|
|
1147
|
+
/**
|
|
1148
|
+
* Converts a URL into its corresponding local file system path.
|
|
1149
|
+
* It checks against the known URL prefixes in all_paths and replaces the matching base.
|
|
1150
|
+
*/
|
|
1151
|
+
function url_to_path(urlStr, all_paths) {
|
|
1152
|
+
if (typeof urlStr !== 'string') {
|
|
1153
|
+
throw new Error('urlStr must be a string');
|
|
1154
|
+
}
|
|
1155
|
+
for (const key in all_paths) {
|
|
1156
|
+
const mapping = all_paths[key];
|
|
1157
|
+
if (urlStr.startsWith(mapping.url)) {
|
|
1158
|
+
const relativeUrl = urlStr.substring(mapping.url.length);
|
|
1159
|
+
return urlJoin(mapping.path, relativeUrl);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
return null;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1145
1165
|
function getSubstring(obj, maxLength = null, minLength = null) {
|
|
1146
1166
|
const objLength = obj.length;
|
|
1147
1167
|
const effectiveMaxLength = maxLength !== null && maxLength !== void 0 ? maxLength : objLength; // Use nullish coalescing for clarity
|
|
@@ -1561,7 +1581,7 @@ function normalizeCategories(categories, opts) {
|
|
|
1561
1581
|
}
|
|
1562
1582
|
function extOf(input) {
|
|
1563
1583
|
// Behaves like pathlib.Path(...).suffix.lower(): last extension only; lowercased.
|
|
1564
|
-
let ext =
|
|
1584
|
+
let ext = pathBrowserify.extname(input || "");
|
|
1565
1585
|
if (!ext && input && input.startsWith(".")) {
|
|
1566
1586
|
// user passed ".jpg" directly
|
|
1567
1587
|
ext = input;
|
|
@@ -1638,7 +1658,7 @@ function getAllFileTypesSync(directory, categories, opts) {
|
|
|
1638
1658
|
const base = directory;
|
|
1639
1659
|
let stat;
|
|
1640
1660
|
try {
|
|
1641
|
-
stat =
|
|
1661
|
+
stat = undefined(base);
|
|
1642
1662
|
}
|
|
1643
1663
|
catch (_a) {
|
|
1644
1664
|
return [];
|
|
@@ -1649,14 +1669,14 @@ function getAllFileTypesSync(directory, categories, opts) {
|
|
|
1649
1669
|
const wanted = unionExts(cats);
|
|
1650
1670
|
const results = [];
|
|
1651
1671
|
function walkSync(dir) {
|
|
1652
|
-
const entries =
|
|
1672
|
+
const entries = undefined(dir, { withFileTypes: true });
|
|
1653
1673
|
for (const ent of entries) {
|
|
1654
|
-
const full =
|
|
1674
|
+
const full = pathBrowserify.join(dir, ent.name);
|
|
1655
1675
|
if (ent.isDirectory()) {
|
|
1656
1676
|
walkSync(full);
|
|
1657
1677
|
}
|
|
1658
1678
|
else if (ent.isFile()) {
|
|
1659
|
-
const ext =
|
|
1679
|
+
const ext = pathBrowserify.extname(ent.name).toLowerCase();
|
|
1660
1680
|
if (wanted.has(ext))
|
|
1661
1681
|
results.push(full);
|
|
1662
1682
|
}
|
|
@@ -1673,7 +1693,7 @@ function getAllFileTypes(directory, categories, opts) {
|
|
|
1673
1693
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1674
1694
|
let stat;
|
|
1675
1695
|
try {
|
|
1676
|
-
stat = yield
|
|
1696
|
+
stat = yield undefined(directory);
|
|
1677
1697
|
}
|
|
1678
1698
|
catch (_a) {
|
|
1679
1699
|
return [];
|
|
@@ -1685,14 +1705,14 @@ function getAllFileTypes(directory, categories, opts) {
|
|
|
1685
1705
|
const results = [];
|
|
1686
1706
|
function walkAsync(dir) {
|
|
1687
1707
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1688
|
-
const entries = yield
|
|
1708
|
+
const entries = yield undefined(dir, { withFileTypes: true });
|
|
1689
1709
|
for (const ent of entries) {
|
|
1690
|
-
const full =
|
|
1710
|
+
const full = pathBrowserify.join(dir, ent.name);
|
|
1691
1711
|
if (ent.isDirectory()) {
|
|
1692
1712
|
yield walkAsync(full);
|
|
1693
1713
|
}
|
|
1694
1714
|
else if (ent.isFile()) {
|
|
1695
|
-
const ext =
|
|
1715
|
+
const ext = pathBrowserify.extname(ent.name).toLowerCase();
|
|
1696
1716
|
if (wanted.has(ext))
|
|
1697
1717
|
results.push(full);
|
|
1698
1718
|
}
|