lakutata 2.0.80 → 2.0.81
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/com/cacher.cjs +8 -10
- package/com/cacher.d.ts +83 -14
- package/com/cacher.mjs +8 -10
- package/com/database.cjs +11 -11
- package/com/database.mjs +11 -11
- package/com/docker.cjs +17 -19
- package/com/docker.d.ts +3 -141
- package/com/docker.mjs +13 -15
- package/com/entrypoint.cjs +7 -5
- package/com/entrypoint.mjs +7 -5
- package/com/logger.cjs +7 -7
- package/com/logger.mjs +7 -7
- package/com/monitor.cjs +5 -3
- package/com/monitor.mjs +5 -3
- package/decorator/ctrl.cjs +3 -3
- package/decorator/ctrl.mjs +3 -3
- package/decorator/orm.cjs +98 -98
- package/decorator/orm.mjs +142 -56
- package/helper.cjs +9 -11
- package/helper.mjs +5 -7
- package/lakutata.cjs +23 -30
- package/lakutata.mjs +14 -18
- package/orm.cjs +1423 -886
- package/orm.mjs +1474 -724
- package/package.json +1 -1
- package/provider/database.cjs +11 -11
- package/provider/database.mjs +11 -11
- package/provider/passwordHash.cjs +4 -2
- package/provider/passwordHash.mjs +4 -2
- package/src/components/Database.cjs +11 -11
- package/src/components/Database.mjs +11 -11
- package/src/components/Logger.cjs +7 -7
- package/src/components/Logger.mjs +7 -7
- package/src/components/cacher/Cacher.cjs +1178 -264
- package/src/components/cacher/Cacher.mjs +1087 -173
- package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +479 -2963
- package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +469 -2947
- package/src/components/docker/ConnectionOptionsBuilder.cjs +15 -17
- package/src/components/docker/ConnectionOptionsBuilder.mjs +13 -15
- package/src/components/docker/Docker.cjs +4884 -4945
- package/src/components/docker/Docker.mjs +4902 -4963
- package/src/components/docker/lib/DockerContainer.cjs +23 -25
- package/src/components/docker/lib/DockerContainer.mjs +17 -19
- package/src/components/docker/lib/DockerContainerTTY.cjs +9 -11
- package/src/components/docker/lib/DockerContainerTTY.mjs +9 -11
- package/src/components/docker/lib/DockerImage.cjs +4 -2
- package/src/components/docker/lib/DockerImage.mjs +4 -2
- package/src/components/entrypoint/Entrypoint.cjs +2170 -1678
- package/src/components/entrypoint/Entrypoint.mjs +2126 -1634
- package/src/components/entrypoint/lib/AccessControl.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControl.mjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.cjs +4 -2
- package/src/components/entrypoint/lib/AccessControlRule.mjs +4 -2
- package/src/components/entrypoint/lib/Controller.cjs +4 -2
- package/src/components/entrypoint/lib/Controller.mjs +4 -2
- package/src/components/monitor/AliveMonitor.cjs +4 -2
- package/src/components/monitor/AliveMonitor.mjs +4 -2
- package/src/components/monitor/CpuMonitor.cjs +5 -3
- package/src/components/monitor/CpuMonitor.mjs +5 -3
- package/src/components/monitor/EventLoopMonitor.cjs +4 -2
- package/src/components/monitor/EventLoopMonitor.mjs +4 -2
- package/src/components/monitor/HttpRequestMonitor.cjs +5 -3
- package/src/components/monitor/HttpRequestMonitor.mjs +5 -3
- package/src/components/monitor/MemoryMonitor.cjs +5 -3
- package/src/components/monitor/MemoryMonitor.mjs +5 -3
- package/src/decorators/ctrl/CLIAction.cjs +3 -3
- package/src/decorators/ctrl/CLIAction.mjs +3 -3
- package/src/decorators/ctrl/HTTPAction.cjs +3 -3
- package/src/decorators/ctrl/HTTPAction.mjs +3 -3
- package/src/decorators/ctrl/ServiceAction.cjs +3 -3
- package/src/decorators/ctrl/ServiceAction.mjs +3 -3
- package/src/decorators/ctrl/http/DELETE.cjs +3 -3
- package/src/decorators/ctrl/http/DELETE.mjs +3 -3
- package/src/decorators/ctrl/http/GET.cjs +3 -3
- package/src/decorators/ctrl/http/GET.mjs +3 -3
- package/src/decorators/ctrl/http/HEAD.cjs +3 -3
- package/src/decorators/ctrl/http/HEAD.mjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.cjs +3 -3
- package/src/decorators/ctrl/http/OPTIONS.mjs +3 -3
- package/src/decorators/ctrl/http/PATCH.cjs +3 -3
- package/src/decorators/ctrl/http/PATCH.mjs +3 -3
- package/src/decorators/ctrl/http/POST.cjs +3 -3
- package/src/decorators/ctrl/http/POST.mjs +3 -3
- package/src/decorators/ctrl/http/PUT.cjs +3 -3
- package/src/decorators/ctrl/http/PUT.mjs +3 -3
- package/src/decorators/orm/AfterInsert.cjs +17 -39
- package/src/decorators/orm/AfterInsert.mjs +18 -38
- package/src/decorators/orm/AfterLoad.cjs +17 -39
- package/src/decorators/orm/AfterLoad.mjs +18 -38
- package/src/decorators/orm/AfterRecover.cjs +17 -39
- package/src/decorators/orm/AfterRecover.mjs +18 -38
- package/src/decorators/orm/AfterRemove.cjs +17 -39
- package/src/decorators/orm/AfterRemove.mjs +18 -38
- package/src/decorators/orm/AfterSoftRemove.cjs +17 -39
- package/src/decorators/orm/AfterSoftRemove.mjs +18 -38
- package/src/decorators/orm/AfterUpdate.cjs +17 -39
- package/src/decorators/orm/AfterUpdate.mjs +18 -38
- package/src/decorators/orm/BeforeInsert.cjs +17 -39
- package/src/decorators/orm/BeforeInsert.mjs +18 -38
- package/src/decorators/orm/BeforeRecover.cjs +17 -39
- package/src/decorators/orm/BeforeRecover.mjs +18 -38
- package/src/decorators/orm/BeforeRemove.cjs +17 -39
- package/src/decorators/orm/BeforeRemove.mjs +18 -38
- package/src/decorators/orm/BeforeSoftRemove.cjs +17 -39
- package/src/decorators/orm/BeforeSoftRemove.mjs +18 -38
- package/src/decorators/orm/BeforeUpdate.cjs +17 -39
- package/src/decorators/orm/BeforeUpdate.mjs +18 -38
- package/src/decorators/orm/Check.cjs +17 -42
- package/src/decorators/orm/Check.mjs +18 -41
- package/src/decorators/orm/ChildEntity.cjs +17 -42
- package/src/decorators/orm/ChildEntity.mjs +18 -41
- package/src/decorators/orm/Column.cjs +17 -74
- package/src/decorators/orm/Column.mjs +19 -74
- package/src/decorators/orm/CreateDateColumn.cjs +17 -38
- package/src/decorators/orm/CreateDateColumn.mjs +18 -37
- package/src/decorators/orm/DeleteDateColumn.cjs +17 -38
- package/src/decorators/orm/DeleteDateColumn.mjs +17 -36
- package/src/decorators/orm/Entity.cjs +17 -48
- package/src/decorators/orm/Entity.mjs +17 -46
- package/src/decorators/orm/EventSubscriber.cjs +17 -35
- package/src/decorators/orm/EventSubscriber.mjs +18 -34
- package/src/decorators/orm/Exclusion.cjs +17 -42
- package/src/decorators/orm/Exclusion.mjs +18 -41
- package/src/decorators/orm/Generated.cjs +17 -37
- package/src/decorators/orm/Generated.mjs +18 -36
- package/src/decorators/orm/Index.cjs +17 -54
- package/src/decorators/orm/Index.mjs +19 -54
- package/src/decorators/orm/JoinColumn.cjs +17 -42
- package/src/decorators/orm/JoinColumn.mjs +18 -41
- package/src/decorators/orm/JoinTable.cjs +17 -43
- package/src/decorators/orm/JoinTable.mjs +17 -41
- package/src/decorators/orm/ManyToMany.cjs +17 -55
- package/src/decorators/orm/ManyToMany.mjs +17 -53
- package/src/decorators/orm/ManyToOne.cjs +17 -55
- package/src/decorators/orm/ManyToOne.mjs +17 -53
- package/src/decorators/orm/ObjectIdColumn.cjs +17 -41
- package/src/decorators/orm/ObjectIdColumn.mjs +18 -40
- package/src/decorators/orm/OneToMany.cjs +17 -47
- package/src/decorators/orm/OneToMany.mjs +19 -47
- package/src/decorators/orm/OneToOne.cjs +17 -55
- package/src/decorators/orm/OneToOne.mjs +17 -53
- package/src/decorators/orm/PrimaryColumn.cjs +17 -62
- package/src/decorators/orm/PrimaryColumn.mjs +19 -62
- package/src/decorators/orm/PrimaryGeneratedColumn.cjs +17 -67
- package/src/decorators/orm/PrimaryGeneratedColumn.mjs +19 -67
- package/src/decorators/orm/RelationId.cjs +17 -39
- package/src/decorators/orm/RelationId.mjs +18 -38
- package/src/decorators/orm/TableInheritance.cjs +17 -39
- package/src/decorators/orm/TableInheritance.mjs +18 -38
- package/src/decorators/orm/Tree.cjs +17 -37
- package/src/decorators/orm/Tree.mjs +18 -36
- package/src/decorators/orm/TreeChildren.cjs +17 -44
- package/src/decorators/orm/TreeChildren.mjs +17 -42
- package/src/decorators/orm/TreeLevelColumn.cjs +17 -38
- package/src/decorators/orm/TreeLevelColumn.mjs +17 -36
- package/src/decorators/orm/TreeParent.cjs +17 -44
- package/src/decorators/orm/TreeParent.mjs +17 -42
- package/src/decorators/orm/Unique.cjs +17 -57
- package/src/decorators/orm/Unique.mjs +19 -57
- package/src/decorators/orm/UpdateDateColumn.cjs +17 -38
- package/src/decorators/orm/UpdateDateColumn.mjs +18 -37
- package/src/decorators/orm/VersionColumn.cjs +17 -38
- package/src/decorators/orm/VersionColumn.mjs +18 -37
- package/src/decorators/orm/ViewColumn.cjs +17 -38
- package/src/decorators/orm/ViewColumn.mjs +18 -37
- package/src/decorators/orm/ViewEntity.cjs +17 -47
- package/src/decorators/orm/ViewEntity.mjs +18 -46
- package/src/decorators/orm/VirtualColumn.cjs +17 -55
- package/src/decorators/orm/VirtualColumn.mjs +17 -53
- package/src/lib/base/BaseObject.cjs +4 -2
- package/src/lib/base/BaseObject.mjs +4 -2
- package/src/lib/base/EventEmitter.cjs +1200 -1193
- package/src/lib/base/EventEmitter.mjs +1201 -1194
- package/src/lib/base/internal/ApplicationConfigLoader.cjs +4 -2
- package/src/lib/base/internal/ApplicationConfigLoader.mjs +4 -2
- package/src/lib/base/internal/ControllerEntrypoint.cjs +3 -3
- package/src/lib/base/internal/ControllerEntrypoint.mjs +3 -3
- package/src/lib/base/internal/DataValidator.cjs +176 -179
- package/src/lib/base/internal/DataValidator.mjs +177 -180
- package/src/lib/base/internal/ModuleConfigLoader.cjs +4 -3
- package/src/lib/base/internal/ModuleConfigLoader.mjs +4 -3
- package/src/lib/base/internal/ObjectType.cjs +4 -2
- package/src/lib/base/internal/ObjectType.mjs +4 -2
- package/src/lib/base/internal/PatternManager.cjs +740 -735
- package/src/lib/base/internal/PatternManager.mjs +745 -740
- package/src/lib/base/internal/StringifyPattern.cjs +1 -1
- package/src/lib/base/internal/StringifyPattern.mjs +1 -1
- package/src/lib/core/Application.cjs +151 -147
- package/src/lib/core/Application.mjs +199 -197
- package/src/lib/core/Component.cjs +4 -2
- package/src/lib/core/Component.mjs +4 -2
- package/src/lib/core/Container.cjs +4 -2
- package/src/lib/core/Container.mjs +4 -2
- package/src/lib/core/Module.cjs +5 -3
- package/src/lib/core/Module.mjs +5 -3
- package/src/lib/core/Provider.cjs +4 -2
- package/src/lib/core/Provider.mjs +4 -2
- package/src/lib/helpers/Glob.cjs +970 -721
- package/src/lib/helpers/Glob.mjs +1036 -787
- package/src/lib/helpers/IsHtml.cjs +7 -13
- package/src/lib/helpers/IsHtml.mjs +7 -13
- package/src/lib/helpers/IsXML.cjs +1158 -1016
- package/src/lib/helpers/IsXML.mjs +871 -729
- package/src/lib/helpers/MD5.cjs +1 -1
- package/src/lib/helpers/MD5.mjs +1 -1
- package/src/lib/helpers/NonceStr.cjs +1 -1
- package/src/lib/helpers/NonceStr.mjs +1 -1
- package/src/lib/helpers/ObjectHash.cjs +379 -372
- package/src/lib/helpers/ObjectHash.mjs +379 -372
- package/src/lib/helpers/RandomString.cjs +168 -147
- package/src/lib/helpers/RandomString.mjs +167 -146
- package/src/lib/helpers/SHA1.cjs +1 -1
- package/src/lib/helpers/SHA1.mjs +1 -1
- package/src/lib/helpers/SHA256.cjs +1 -1
- package/src/lib/helpers/SHA256.mjs +1 -1
- package/src/lib/helpers/SortArray.cjs +1 -1
- package/src/lib/helpers/SortArray.mjs +1 -1
- package/src/lib/helpers/Statistics.cjs +1 -1
- package/src/lib/helpers/Statistics.mjs +1 -1
- package/src/lib/helpers/URLBuilder.cjs +355 -355
- package/src/lib/helpers/URLBuilder.mjs +350 -350
- package/src/lib/helpers/UUID.cjs +1 -1
- package/src/lib/helpers/UUID.mjs +1 -1
- package/src/lib/ioc/DependencyInjectionContainer.cjs +32 -30
- package/src/lib/ioc/DependencyInjectionContainer.mjs +12 -10
- package/src/lib/ioc/ListModules.cjs +5174 -5249
- package/src/lib/ioc/ListModules.mjs +5177 -5252
- package/src/lib/validation/VLD.cjs +4080 -3902
- package/src/lib/validation/VLD.mjs +2970 -2792
- package/src/options/ApplicationOptions.cjs +4 -2
- package/src/options/ApplicationOptions.mjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.cjs +4 -2
- package/src/options/LoadAnonymousObjectOptions.mjs +4 -2
- package/src/options/LoadNamedObjectOptions.cjs +4 -2
- package/src/options/LoadNamedObjectOptions.mjs +4 -2
- package/src/options/LoadObjectOptions.cjs +4 -2
- package/src/options/LoadObjectOptions.mjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.cjs +4 -2
- package/src/options/ModuleLoadObjectsOptions.mjs +4 -2
- package/src/options/ModuleOptions.cjs +4 -4
- package/src/options/ModuleOptions.mjs +4 -4
- package/src/options/OverridableNamedObjectOptions.cjs +4 -2
- package/src/options/OverridableNamedObjectOptions.mjs +4 -2
- package/src/options/OverridableObjectOptions.cjs +4 -2
- package/src/options/OverridableObjectOptions.mjs +4 -2
- package/src/providers/Database.cjs +11 -11
- package/src/providers/Database.mjs +11 -11
- package/src/providers/PasswordHash.cjs +5 -3
- package/src/providers/PasswordHash.mjs +190 -188
- package/src/providers/migration/GenerateMigration.cjs +15 -19
- package/src/providers/migration/GenerateMigration.mjs +15 -19
- package/vendor/Package.10.cjs +2 -8
- package/vendor/Package.10.mjs +2 -8
- package/vendor/Package.11.cjs +5 -83
- package/vendor/Package.11.mjs +5 -77
- package/vendor/Package.112.cjs +48900 -0
- package/vendor/Package.112.mjs +48764 -0
- package/vendor/Package.12.cjs +4 -2
- package/vendor/Package.12.mjs +6 -4
- package/vendor/Package.13.cjs +87 -1
- package/vendor/Package.13.mjs +81 -1
- package/vendor/Package.14.cjs +1 -14057
- package/vendor/Package.14.mjs +1 -14031
- package/vendor/Package.15.cjs +1 -1
- package/vendor/Package.15.mjs +1 -1
- package/vendor/Package.16.cjs +18129 -1935
- package/vendor/Package.16.mjs +18115 -1839
- package/vendor/Package.17.cjs +1922 -47918
- package/vendor/Package.17.mjs +1874 -47937
- package/vendor/Package.18.cjs +35 -1
- package/vendor/Package.18.mjs +35 -1
- package/vendor/Package.19.cjs +37 -0
- package/vendor/Package.19.mjs +35 -0
- package/vendor/Package.2.cjs +5739 -5710
- package/vendor/Package.2.mjs +5733 -5704
- package/vendor/Package.20.cjs +37 -0
- package/vendor/Package.20.mjs +35 -0
- package/vendor/Package.21.cjs +37 -0
- package/vendor/Package.21.mjs +35 -0
- package/vendor/Package.22.cjs +37 -0
- package/vendor/Package.22.mjs +35 -0
- package/vendor/Package.23.cjs +37 -0
- package/vendor/Package.23.mjs +35 -0
- package/vendor/Package.24.cjs +37 -0
- package/vendor/Package.24.mjs +35 -0
- package/vendor/Package.25.cjs +37 -0
- package/vendor/Package.25.mjs +35 -0
- package/vendor/Package.26.cjs +37 -0
- package/vendor/Package.26.mjs +35 -0
- package/vendor/Package.27.cjs +37 -0
- package/vendor/Package.27.mjs +35 -0
- package/vendor/Package.28.cjs +37 -0
- package/vendor/Package.28.mjs +35 -0
- package/vendor/Package.29.cjs +40 -0
- package/vendor/Package.29.mjs +38 -0
- package/vendor/Package.30.cjs +41 -0
- package/vendor/Package.30.mjs +39 -0
- package/vendor/Package.31.cjs +72 -0
- package/vendor/Package.31.mjs +70 -0
- package/vendor/Package.32.cjs +37 -0
- package/vendor/Package.32.mjs +35 -0
- package/vendor/Package.33.cjs +37 -0
- package/vendor/Package.33.mjs +35 -0
- package/vendor/Package.34.cjs +46 -0
- package/vendor/Package.34.mjs +44 -0
- package/vendor/Package.35.cjs +34 -0
- package/vendor/Package.35.mjs +32 -0
- package/vendor/Package.36.cjs +40 -0
- package/vendor/Package.36.mjs +38 -0
- package/vendor/Package.37.cjs +36 -0
- package/vendor/Package.37.mjs +34 -0
- package/vendor/Package.38.cjs +52 -0
- package/vendor/Package.38.mjs +50 -0
- package/vendor/Package.39.cjs +41 -0
- package/vendor/Package.39.mjs +39 -0
- package/vendor/Package.4.cjs +884 -874
- package/vendor/Package.4.mjs +884 -874
- package/vendor/Package.40.cjs +42 -0
- package/vendor/Package.40.mjs +40 -0
- package/vendor/Package.41.cjs +53 -0
- package/vendor/Package.41.mjs +51 -0
- package/vendor/Package.42.cjs +53 -0
- package/vendor/Package.42.mjs +51 -0
- package/vendor/Package.43.cjs +40 -0
- package/vendor/Package.43.mjs +38 -0
- package/vendor/Package.44.cjs +46 -0
- package/vendor/Package.44.mjs +44 -0
- package/vendor/Package.45.cjs +53 -0
- package/vendor/Package.45.mjs +51 -0
- package/vendor/Package.46.cjs +59 -0
- package/vendor/Package.46.mjs +57 -0
- package/vendor/Package.47.cjs +65 -0
- package/vendor/Package.47.mjs +63 -0
- package/vendor/Package.48.cjs +38 -0
- package/vendor/Package.48.mjs +36 -0
- package/vendor/Package.49.cjs +38 -0
- package/vendor/Package.49.mjs +36 -0
- package/vendor/Package.5.cjs +15 -11
- package/vendor/Package.5.mjs +11 -7
- package/vendor/Package.50.cjs +36 -0
- package/vendor/Package.50.mjs +34 -0
- package/vendor/Package.51.cjs +43 -0
- package/vendor/Package.51.mjs +41 -0
- package/vendor/Package.52.cjs +37 -0
- package/vendor/Package.52.mjs +35 -0
- package/vendor/Package.53.cjs +43 -0
- package/vendor/Package.53.mjs +41 -0
- package/vendor/Package.54.cjs +55 -0
- package/vendor/Package.54.mjs +53 -0
- package/vendor/Package.55.cjs +37 -0
- package/vendor/Package.55.mjs +35 -0
- package/vendor/Package.56.cjs +37 -0
- package/vendor/Package.56.mjs +35 -0
- package/vendor/Package.57.cjs +37 -0
- package/vendor/Package.57.mjs +35 -0
- package/vendor/Package.58.cjs +45 -0
- package/vendor/Package.58.mjs +43 -0
- package/vendor/Package.59.cjs +53 -0
- package/vendor/Package.59.mjs +51 -0
- package/vendor/Package.6.cjs +520 -511
- package/vendor/Package.6.mjs +543 -534
- package/vendor/Package.60.cjs +47649 -0
- package/vendor/Package.60.mjs +47606 -0
- package/vendor/Package.610.cjs +11 -11
- package/vendor/Package.610.mjs +11 -11
- package/vendor/Package.611.cjs +33 -23
- package/vendor/Package.611.mjs +19 -9
- package/vendor/Package.612.cjs +42 -36
- package/vendor/Package.612.mjs +35 -29
- package/vendor/Package.613.cjs +5 -4
- package/vendor/Package.613.mjs +5 -4
- package/vendor/Package.62.cjs +92 -89
- package/vendor/Package.62.mjs +185 -182
- package/vendor/Package.63.cjs +509 -166
- package/vendor/Package.63.mjs +490 -165
- package/vendor/Package.64.cjs +139 -511
- package/vendor/Package.64.mjs +139 -491
- package/vendor/Package.65.cjs +4135 -150
- package/vendor/Package.65.mjs +4143 -150
- package/vendor/Package.66.cjs +346 -4150
- package/vendor/Package.66.mjs +346 -4158
- package/vendor/Package.67.cjs +412 -261
- package/vendor/Package.67.mjs +410 -259
- package/vendor/Package.68.cjs +397 -405
- package/vendor/Package.68.mjs +227 -242
- package/vendor/Package.8.cjs +0 -4
- package/vendor/Package.8.mjs +0 -4
- package/vendor/Package.9.cjs +132 -118
- package/vendor/Package.9.mjs +138 -124
- package/vendor/TypeDef.internal.3.d.ts +0 -4
- package/vendor/Package.102.cjs +0 -48773
- package/vendor/Package.102.mjs +0 -48697
- package/vendor/Package.122.cjs +0 -3
- package/vendor/Package.122.mjs +0 -1
package/src/lib/helpers/Glob.cjs
CHANGED
|
@@ -4,31 +4,27 @@ Object.defineProperty(exports, Symbol.toStringTag, {
|
|
|
4
4
|
value: "Module"
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
const t = require("
|
|
7
|
+
const t = require("node:url");
|
|
8
8
|
|
|
9
|
-
const e = require("node:
|
|
9
|
+
const e = require("node:path");
|
|
10
10
|
|
|
11
|
-
const s = require("
|
|
11
|
+
const s = require("fs");
|
|
12
12
|
|
|
13
|
-
const i = require("fs");
|
|
13
|
+
const i = require("node:fs");
|
|
14
14
|
|
|
15
|
-
const n = require("node:fs");
|
|
15
|
+
const n = require("node:fs/promises");
|
|
16
16
|
|
|
17
|
-
const r = require("node:
|
|
17
|
+
const r = require("node:events");
|
|
18
18
|
|
|
19
|
-
const o = require("node:
|
|
19
|
+
const o = require("node:stream");
|
|
20
20
|
|
|
21
|
-
const h = require("node:
|
|
21
|
+
const h = require("node:string_decoder");
|
|
22
22
|
|
|
23
|
-
const a =
|
|
24
|
-
|
|
25
|
-
require("../../../vendor/Package.5.cjs");
|
|
26
|
-
|
|
27
|
-
const l = t => t && t.__esModule ? t : {
|
|
23
|
+
const a = t => t && t.__esModule ? t : {
|
|
28
24
|
default: t
|
|
29
25
|
};
|
|
30
26
|
|
|
31
|
-
function
|
|
27
|
+
function l(t) {
|
|
32
28
|
if (t && t.__esModule) return t;
|
|
33
29
|
const e = Object.create(null, {
|
|
34
30
|
[Symbol.toStringTag]: {
|
|
@@ -50,22 +46,254 @@ function c(t) {
|
|
|
50
46
|
return Object.freeze(e);
|
|
51
47
|
}
|
|
52
48
|
|
|
53
|
-
const
|
|
49
|
+
const c = l(i);
|
|
50
|
+
|
|
51
|
+
const f = a(o);
|
|
52
|
+
|
|
53
|
+
const u = (t, e, s) => {
|
|
54
|
+
const i = t instanceof RegExp ? d(t, s) : t;
|
|
55
|
+
const n = e instanceof RegExp ? d(e, s) : e;
|
|
56
|
+
const r = i !== null && n != null && p(i, n, s);
|
|
57
|
+
return r && {
|
|
58
|
+
start: r[0],
|
|
59
|
+
end: r[1],
|
|
60
|
+
pre: s.slice(0, r[0]),
|
|
61
|
+
body: s.slice(r[0] + i.length, r[1]),
|
|
62
|
+
post: s.slice(r[1] + n.length)
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const d = (t, e) => {
|
|
67
|
+
const s = e.match(t);
|
|
68
|
+
return s ? s[0] : null;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const p = (t, e, s) => {
|
|
72
|
+
let i, n, r, o = undefined, h;
|
|
73
|
+
let a = s.indexOf(t);
|
|
74
|
+
let l = s.indexOf(e, a + 1);
|
|
75
|
+
let c = a;
|
|
76
|
+
if (a >= 0 && l > 0) {
|
|
77
|
+
if (t === e) {
|
|
78
|
+
return [ a, l ];
|
|
79
|
+
}
|
|
80
|
+
i = [];
|
|
81
|
+
r = s.length;
|
|
82
|
+
while (c >= 0 && !h) {
|
|
83
|
+
if (c === a) {
|
|
84
|
+
i.push(c);
|
|
85
|
+
a = s.indexOf(t, c + 1);
|
|
86
|
+
} else if (i.length === 1) {
|
|
87
|
+
const t = i.pop();
|
|
88
|
+
if (t !== undefined) h = [ t, l ];
|
|
89
|
+
} else {
|
|
90
|
+
n = i.pop();
|
|
91
|
+
if (n !== undefined && n < r) {
|
|
92
|
+
r = n;
|
|
93
|
+
o = l;
|
|
94
|
+
}
|
|
95
|
+
l = s.indexOf(e, c + 1);
|
|
96
|
+
}
|
|
97
|
+
c = a < l && a >= 0 ? a : l;
|
|
98
|
+
}
|
|
99
|
+
if (i.length && o !== undefined) {
|
|
100
|
+
h = [ r, o ];
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
return h;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
const g = "\0SLASH" + Math.random() + "\0";
|
|
107
|
+
|
|
108
|
+
const m = "\0OPEN" + Math.random() + "\0";
|
|
109
|
+
|
|
110
|
+
const w = "\0CLOSE" + Math.random() + "\0";
|
|
111
|
+
|
|
112
|
+
const y = "\0COMMA" + Math.random() + "\0";
|
|
113
|
+
|
|
114
|
+
const b = "\0PERIOD" + Math.random() + "\0";
|
|
115
|
+
|
|
116
|
+
const S = new RegExp(g, "g");
|
|
117
|
+
|
|
118
|
+
const k = new RegExp(m, "g");
|
|
119
|
+
|
|
120
|
+
const v = new RegExp(w, "g");
|
|
121
|
+
|
|
122
|
+
const x = new RegExp(y, "g");
|
|
123
|
+
|
|
124
|
+
const E = new RegExp(b, "g");
|
|
125
|
+
|
|
126
|
+
const C = /\\\\/g;
|
|
127
|
+
|
|
128
|
+
const T = /\\{/g;
|
|
129
|
+
|
|
130
|
+
const L = /\\}/g;
|
|
131
|
+
|
|
132
|
+
const A = /\\,/g;
|
|
133
|
+
|
|
134
|
+
const M = /\\./g;
|
|
135
|
+
|
|
136
|
+
function P(t) {
|
|
137
|
+
return !isNaN(t) ? parseInt(t, 10) : t.charCodeAt(0);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function F(t) {
|
|
141
|
+
return t.replace(C, g).replace(T, m).replace(L, w).replace(A, y).replace(M, b);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function R(t) {
|
|
145
|
+
return t.replace(S, "\\").replace(k, "{").replace(v, "}").replace(x, ",").replace(E, ".");
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function O(t) {
|
|
149
|
+
if (!t) {
|
|
150
|
+
return [ "" ];
|
|
151
|
+
}
|
|
152
|
+
const e = [];
|
|
153
|
+
const s = u("{", "}", t);
|
|
154
|
+
if (!s) {
|
|
155
|
+
return t.split(",");
|
|
156
|
+
}
|
|
157
|
+
const {pre: i, body: n, post: r} = s;
|
|
158
|
+
const o = i.split(",");
|
|
159
|
+
o[o.length - 1] += "{" + n + "}";
|
|
160
|
+
const h = O(r);
|
|
161
|
+
if (r.length) {
|
|
162
|
+
o[o.length - 1] += h.shift();
|
|
163
|
+
o.push.apply(o, h);
|
|
164
|
+
}
|
|
165
|
+
e.push.apply(e, o);
|
|
166
|
+
return e;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function z(t) {
|
|
170
|
+
if (!t) {
|
|
171
|
+
return [];
|
|
172
|
+
}
|
|
173
|
+
if (t.slice(0, 2) === "{}") {
|
|
174
|
+
t = "\\{\\}" + t.slice(2);
|
|
175
|
+
}
|
|
176
|
+
return I(F(t), true).map(R);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function D(t) {
|
|
180
|
+
return "{" + t + "}";
|
|
181
|
+
}
|
|
54
182
|
|
|
55
|
-
|
|
183
|
+
function N(t) {
|
|
184
|
+
return /^-?0\d/.test(t);
|
|
185
|
+
}
|
|
56
186
|
|
|
57
|
-
|
|
187
|
+
function B(t, e) {
|
|
188
|
+
return t <= e;
|
|
189
|
+
}
|
|
58
190
|
|
|
59
|
-
|
|
191
|
+
function W(t, e) {
|
|
192
|
+
return t >= e;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
function I(t, e) {
|
|
196
|
+
const s = [];
|
|
197
|
+
const i = u("{", "}", t);
|
|
198
|
+
if (!i) return [ t ];
|
|
199
|
+
const n = i.pre;
|
|
200
|
+
const r = i.post.length ? I(i.post, false) : [ "" ];
|
|
201
|
+
if (/\$$/.test(i.pre)) {
|
|
202
|
+
for (let t = 0; t < r.length; t++) {
|
|
203
|
+
const e = n + "{" + i.body + "}" + r[t];
|
|
204
|
+
s.push(e);
|
|
205
|
+
}
|
|
206
|
+
} else {
|
|
207
|
+
const o = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body);
|
|
208
|
+
const h = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body);
|
|
209
|
+
const a = o || h;
|
|
210
|
+
const l = i.body.indexOf(",") >= 0;
|
|
211
|
+
if (!a && !l) {
|
|
212
|
+
if (i.post.match(/,(?!,).*\}/)) {
|
|
213
|
+
t = i.pre + "{" + i.body + w + i.post;
|
|
214
|
+
return I(t);
|
|
215
|
+
}
|
|
216
|
+
return [ t ];
|
|
217
|
+
}
|
|
218
|
+
let c;
|
|
219
|
+
if (a) {
|
|
220
|
+
c = i.body.split(/\.\./);
|
|
221
|
+
} else {
|
|
222
|
+
c = O(i.body);
|
|
223
|
+
if (c.length === 1 && c[0] !== undefined) {
|
|
224
|
+
c = I(c[0], false).map(D);
|
|
225
|
+
if (c.length === 1) {
|
|
226
|
+
return r.map((t => i.pre + c[0] + t));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
let f;
|
|
231
|
+
if (a && c[0] !== undefined && c[1] !== undefined) {
|
|
232
|
+
const t = P(c[0]);
|
|
233
|
+
const e = P(c[1]);
|
|
234
|
+
const s = Math.max(c[0].length, c[1].length);
|
|
235
|
+
let i = c.length === 3 && c[2] !== undefined ? Math.abs(P(c[2])) : 1;
|
|
236
|
+
let n = B;
|
|
237
|
+
const r = e < t;
|
|
238
|
+
if (r) {
|
|
239
|
+
i *= -1;
|
|
240
|
+
n = W;
|
|
241
|
+
}
|
|
242
|
+
const o = c.some(N);
|
|
243
|
+
f = [];
|
|
244
|
+
for (let r = t; n(r, e); r += i) {
|
|
245
|
+
let t;
|
|
246
|
+
if (h) {
|
|
247
|
+
t = String.fromCharCode(r);
|
|
248
|
+
if (t === "\\") {
|
|
249
|
+
t = "";
|
|
250
|
+
}
|
|
251
|
+
} else {
|
|
252
|
+
t = String(r);
|
|
253
|
+
if (o) {
|
|
254
|
+
const e = s - t.length;
|
|
255
|
+
if (e > 0) {
|
|
256
|
+
const s = new Array(e + 1).join("0");
|
|
257
|
+
if (r < 0) {
|
|
258
|
+
t = "-" + s + t.slice(1);
|
|
259
|
+
} else {
|
|
260
|
+
t = s + t;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
f.push(t);
|
|
266
|
+
}
|
|
267
|
+
} else {
|
|
268
|
+
f = [];
|
|
269
|
+
for (let t = 0; t < c.length; t++) {
|
|
270
|
+
f.push.apply(f, I(c[t], false));
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
for (let t = 0; t < f.length; t++) {
|
|
274
|
+
for (let i = 0; i < r.length; i++) {
|
|
275
|
+
const o = n + f[t] + r[i];
|
|
276
|
+
if (!e || a || o) {
|
|
277
|
+
s.push(o);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return s;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
const _ = 1024 * 64;
|
|
286
|
+
|
|
287
|
+
const j = t => {
|
|
60
288
|
if (typeof t !== "string") {
|
|
61
289
|
throw new TypeError("invalid pattern");
|
|
62
290
|
}
|
|
63
|
-
if (t.length >
|
|
291
|
+
if (t.length > _) {
|
|
64
292
|
throw new TypeError("pattern is too long");
|
|
65
293
|
}
|
|
66
294
|
};
|
|
67
295
|
|
|
68
|
-
const
|
|
296
|
+
const $ = {
|
|
69
297
|
"[:alnum:]": [ "\\p{L}\\p{Nl}\\p{Nd}", true ],
|
|
70
298
|
"[:alpha:]": [ "\\p{L}\\p{Nl}", true ],
|
|
71
299
|
"[:ascii:]": [ "\\x" + "00-\\x" + "7f", false ],
|
|
@@ -82,13 +310,13 @@ const g = {
|
|
|
82
310
|
"[:xdigit:]": [ "A-Fa-f0-9", false ]
|
|
83
311
|
};
|
|
84
312
|
|
|
85
|
-
const
|
|
313
|
+
const U = t => t.replace(/[[\]\\-]/g, "\\$&");
|
|
86
314
|
|
|
87
|
-
const
|
|
315
|
+
const G = t => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
88
316
|
|
|
89
|
-
const
|
|
317
|
+
const q = t => t.join("");
|
|
90
318
|
|
|
91
|
-
const
|
|
319
|
+
const H = (t, e) => {
|
|
92
320
|
const s = e;
|
|
93
321
|
if (t.charAt(s) !== "[") {
|
|
94
322
|
throw new Error("not in a brace expression");
|
|
@@ -122,7 +350,7 @@ const b = (t, e) => {
|
|
|
122
350
|
}
|
|
123
351
|
}
|
|
124
352
|
if (e === "[" && !a) {
|
|
125
|
-
for (const [e, [o, a, l]] of Object.entries(
|
|
353
|
+
for (const [e, [o, a, l]] of Object.entries($)) {
|
|
126
354
|
if (t.startsWith(e, r)) {
|
|
127
355
|
if (f) {
|
|
128
356
|
return [ "$.", false, t.length - s, true ];
|
|
@@ -137,16 +365,16 @@ const b = (t, e) => {
|
|
|
137
365
|
a = false;
|
|
138
366
|
if (f) {
|
|
139
367
|
if (e > f) {
|
|
140
|
-
i.push(
|
|
368
|
+
i.push(U(f) + "-" + U(e));
|
|
141
369
|
} else if (e === f) {
|
|
142
|
-
i.push(
|
|
370
|
+
i.push(U(e));
|
|
143
371
|
}
|
|
144
372
|
f = "";
|
|
145
373
|
r++;
|
|
146
374
|
continue;
|
|
147
375
|
}
|
|
148
376
|
if (t.startsWith("-]", r + 1)) {
|
|
149
|
-
i.push(
|
|
377
|
+
i.push(U(e + "-"));
|
|
150
378
|
r += 2;
|
|
151
379
|
continue;
|
|
152
380
|
}
|
|
@@ -155,7 +383,7 @@ const b = (t, e) => {
|
|
|
155
383
|
r += 2;
|
|
156
384
|
continue;
|
|
157
385
|
}
|
|
158
|
-
i.push(
|
|
386
|
+
i.push(U(e));
|
|
159
387
|
r++;
|
|
160
388
|
}
|
|
161
389
|
if (c < r) {
|
|
@@ -166,37 +394,42 @@ const b = (t, e) => {
|
|
|
166
394
|
}
|
|
167
395
|
if (n.length === 0 && i.length === 1 && /^\\?.$/.test(i[0]) && !l) {
|
|
168
396
|
const t = i[0].length === 2 ? i[0].slice(-1) : i[0];
|
|
169
|
-
return [
|
|
397
|
+
return [ G(t), false, c - s, false ];
|
|
170
398
|
}
|
|
171
|
-
const u = "[" + (l ? "^" : "") +
|
|
172
|
-
const d = "[" + (l ? "" : "^") +
|
|
399
|
+
const u = "[" + (l ? "^" : "") + q(i) + "]";
|
|
400
|
+
const d = "[" + (l ? "" : "^") + q(n) + "]";
|
|
173
401
|
const p = i.length && n.length ? "(" + u + "|" + d + ")" : i.length ? u : d;
|
|
174
402
|
return [ p, h, c - s, true ];
|
|
175
403
|
};
|
|
176
404
|
|
|
177
|
-
const
|
|
405
|
+
const Z = (t, {windowsPathsNoEscape: e = false, magicalBraces: s = true} = {}) => {
|
|
406
|
+
if (s) {
|
|
407
|
+
return e ? t.replace(/\[([^\/\\])\]/g, "$1") : t.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2").replace(/\\([^\/])/g, "$1");
|
|
408
|
+
}
|
|
409
|
+
return e ? t.replace(/\[([^\/\\{}])\]/g, "$1") : t.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2").replace(/\\([^\/{}])/g, "$1");
|
|
410
|
+
};
|
|
178
411
|
|
|
179
|
-
const
|
|
412
|
+
const V = new Set([ "!", "?", "+", "*", "@" ]);
|
|
180
413
|
|
|
181
|
-
const
|
|
414
|
+
const J = t => V.has(t);
|
|
182
415
|
|
|
183
|
-
const
|
|
416
|
+
const K = "(?!(?:^|/)\\.\\.?(?:$|/))";
|
|
184
417
|
|
|
185
|
-
const
|
|
418
|
+
const Y = "(?!\\.)";
|
|
186
419
|
|
|
187
|
-
const
|
|
420
|
+
const X = new Set([ "[", "." ]);
|
|
188
421
|
|
|
189
|
-
const
|
|
422
|
+
const Q = new Set([ "..", "." ]);
|
|
190
423
|
|
|
191
|
-
const
|
|
424
|
+
const tt = new Set("().*{}+?[]^$\\!");
|
|
192
425
|
|
|
193
|
-
const
|
|
426
|
+
const et = t => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
194
427
|
|
|
195
|
-
const
|
|
428
|
+
const st = "[^/]";
|
|
196
429
|
|
|
197
|
-
const
|
|
430
|
+
const it = st + "*?";
|
|
198
431
|
|
|
199
|
-
const
|
|
432
|
+
const nt = st + "+?";
|
|
200
433
|
|
|
201
434
|
class AST {
|
|
202
435
|
type;
|
|
@@ -342,7 +575,7 @@ class AST {
|
|
|
342
575
|
l += s;
|
|
343
576
|
continue;
|
|
344
577
|
}
|
|
345
|
-
if (!i.noext &&
|
|
578
|
+
if (!i.noext && J(s) && t.charAt(a) === "(") {
|
|
346
579
|
e.push(l);
|
|
347
580
|
l = "";
|
|
348
581
|
const n = new AST(s, e);
|
|
@@ -383,7 +616,7 @@ class AST {
|
|
|
383
616
|
f += s;
|
|
384
617
|
continue;
|
|
385
618
|
}
|
|
386
|
-
if (
|
|
619
|
+
if (J(s) && t.charAt(a) === "(") {
|
|
387
620
|
l.push(f);
|
|
388
621
|
f = "";
|
|
389
622
|
const e = new AST(s, l);
|
|
@@ -440,7 +673,7 @@ class AST {
|
|
|
440
673
|
const e = t ?? !!this.#a.dot;
|
|
441
674
|
if (this.#t === this) this.#f();
|
|
442
675
|
if (!this.type) {
|
|
443
|
-
const s = this.isStart() && this.isEnd();
|
|
676
|
+
const s = this.isStart() && this.isEnd() && !this.#i.some((t => typeof t !== "string"));
|
|
444
677
|
const i = this.#i.map((e => {
|
|
445
678
|
const [i, n, r, o] = typeof e === "string" ? AST.#d(e, this.#e, s) : e.toRegExpSource(t);
|
|
446
679
|
this.#e = this.#e || r;
|
|
@@ -450,12 +683,12 @@ class AST {
|
|
|
450
683
|
let n = "";
|
|
451
684
|
if (this.isStart()) {
|
|
452
685
|
if (typeof this.#i[0] === "string") {
|
|
453
|
-
const s = this.#i.length === 1 &&
|
|
686
|
+
const s = this.#i.length === 1 && Q.has(this.#i[0]);
|
|
454
687
|
if (!s) {
|
|
455
|
-
const s =
|
|
688
|
+
const s = X;
|
|
456
689
|
const r = e && s.has(i.charAt(0)) || i.startsWith("\\.") && s.has(i.charAt(2)) || i.startsWith("\\.\\.") && s.has(i.charAt(4));
|
|
457
690
|
const o = !e && !t && s.has(i.charAt(0));
|
|
458
|
-
n = r ?
|
|
691
|
+
n = r ? K : o ? Y : "";
|
|
459
692
|
}
|
|
460
693
|
}
|
|
461
694
|
}
|
|
@@ -464,7 +697,7 @@ class AST {
|
|
|
464
697
|
r = "(?:$|\\/)";
|
|
465
698
|
}
|
|
466
699
|
const o = n + i + r;
|
|
467
|
-
return [ o,
|
|
700
|
+
return [ o, Z(i), this.#e = !!this.#e, this.#s ];
|
|
468
701
|
}
|
|
469
702
|
const s = this.type === "*" || this.type === "+";
|
|
470
703
|
const i = this.type === "!" ? "(?:(?!(?:" : "(?:";
|
|
@@ -474,9 +707,9 @@ class AST {
|
|
|
474
707
|
this.#i = [ t ];
|
|
475
708
|
this.type = null;
|
|
476
709
|
this.#e = undefined;
|
|
477
|
-
return [ t,
|
|
710
|
+
return [ t, Z(this.toString()), false, false ];
|
|
478
711
|
}
|
|
479
|
-
let r = !s || t || e || !
|
|
712
|
+
let r = !s || t || e || !Y ? "" : this.#p(true);
|
|
480
713
|
if (r === n) {
|
|
481
714
|
r = "";
|
|
482
715
|
}
|
|
@@ -485,12 +718,12 @@ class AST {
|
|
|
485
718
|
}
|
|
486
719
|
let o = "";
|
|
487
720
|
if (this.type === "!" && this.#c) {
|
|
488
|
-
o = (this.isStart() && !e ?
|
|
721
|
+
o = (this.isStart() && !e ? Y : "") + nt;
|
|
489
722
|
} else {
|
|
490
|
-
const s = this.type === "!" ? "))" + (this.isStart() && !e && !t ?
|
|
723
|
+
const s = this.type === "!" ? "))" + (this.isStart() && !e && !t ? Y : "") + it + ")" : this.type === "@" ? ")" : this.type === "?" ? ")?" : this.type === "+" && r ? ")" : this.type === "*" && r ? `)?` : `)${this.type}`;
|
|
491
724
|
o = i + n + s;
|
|
492
725
|
}
|
|
493
|
-
return [ o,
|
|
726
|
+
return [ o, Z(n), this.#e = !!this.#e, this.#s ];
|
|
494
727
|
}
|
|
495
728
|
#p(t) {
|
|
496
729
|
return this.#i.map((e => {
|
|
@@ -510,7 +743,7 @@ class AST {
|
|
|
510
743
|
const h = t.charAt(o);
|
|
511
744
|
if (i) {
|
|
512
745
|
i = false;
|
|
513
|
-
n += (
|
|
746
|
+
n += (tt.has(h) ? "\\" : "") + h;
|
|
514
747
|
continue;
|
|
515
748
|
}
|
|
516
749
|
if (h === "\\") {
|
|
@@ -522,7 +755,7 @@ class AST {
|
|
|
522
755
|
continue;
|
|
523
756
|
}
|
|
524
757
|
if (h === "[") {
|
|
525
|
-
const [s, i, h, a] =
|
|
758
|
+
const [s, i, h, a] = H(t, o);
|
|
526
759
|
if (h) {
|
|
527
760
|
n += s;
|
|
528
761
|
r = r || i;
|
|
@@ -532,102 +765,107 @@ class AST {
|
|
|
532
765
|
}
|
|
533
766
|
}
|
|
534
767
|
if (h === "*") {
|
|
535
|
-
|
|
768
|
+
n += s && t === "*" ? nt : it;
|
|
536
769
|
e = true;
|
|
537
770
|
continue;
|
|
538
771
|
}
|
|
539
772
|
if (h === "?") {
|
|
540
|
-
n +=
|
|
773
|
+
n += st;
|
|
541
774
|
e = true;
|
|
542
775
|
continue;
|
|
543
776
|
}
|
|
544
|
-
n +=
|
|
777
|
+
n += et(h);
|
|
545
778
|
}
|
|
546
|
-
return [ n,
|
|
779
|
+
return [ n, Z(t), !!e, r ];
|
|
547
780
|
}
|
|
548
781
|
}
|
|
549
782
|
|
|
550
|
-
const
|
|
783
|
+
const rt = (t, {windowsPathsNoEscape: e = false, magicalBraces: s = false} = {}) => {
|
|
784
|
+
if (s) {
|
|
785
|
+
return e ? t.replace(/[?*()[\]{}]/g, "[$&]") : t.replace(/[?*()[\]\\{}]/g, "\\$&");
|
|
786
|
+
}
|
|
787
|
+
return e ? t.replace(/[?*()[\]]/g, "[$&]") : t.replace(/[?*()[\]\\]/g, "\\$&");
|
|
788
|
+
};
|
|
551
789
|
|
|
552
|
-
const
|
|
553
|
-
|
|
790
|
+
const ot = (t, e, s = {}) => {
|
|
791
|
+
j(e);
|
|
554
792
|
if (!s.nocomment && e.charAt(0) === "#") {
|
|
555
793
|
return false;
|
|
556
794
|
}
|
|
557
795
|
return new Minimatch(e, s).match(t);
|
|
558
796
|
};
|
|
559
797
|
|
|
560
|
-
const
|
|
798
|
+
const ht = /^\*+([^+@!?\*\[\(]*)$/;
|
|
561
799
|
|
|
562
|
-
const
|
|
800
|
+
const at = t => e => !e.startsWith(".") && e.endsWith(t);
|
|
563
801
|
|
|
564
|
-
const
|
|
802
|
+
const lt = t => e => e.endsWith(t);
|
|
565
803
|
|
|
566
|
-
const
|
|
804
|
+
const ct = t => {
|
|
567
805
|
t = t.toLowerCase();
|
|
568
806
|
return e => !e.startsWith(".") && e.toLowerCase().endsWith(t);
|
|
569
807
|
};
|
|
570
808
|
|
|
571
|
-
const
|
|
809
|
+
const ft = t => {
|
|
572
810
|
t = t.toLowerCase();
|
|
573
811
|
return e => e.toLowerCase().endsWith(t);
|
|
574
812
|
};
|
|
575
813
|
|
|
576
|
-
const
|
|
814
|
+
const ut = /^\*+\.\*+$/;
|
|
577
815
|
|
|
578
|
-
const
|
|
816
|
+
const dt = t => !t.startsWith(".") && t.includes(".");
|
|
579
817
|
|
|
580
|
-
const
|
|
818
|
+
const pt = t => t !== "." && t !== ".." && t.includes(".");
|
|
581
819
|
|
|
582
|
-
const
|
|
820
|
+
const gt = /^\.\*+$/;
|
|
583
821
|
|
|
584
|
-
const
|
|
822
|
+
const mt = t => t !== "." && t !== ".." && t.startsWith(".");
|
|
585
823
|
|
|
586
|
-
const
|
|
824
|
+
const wt = /^\*+$/;
|
|
587
825
|
|
|
588
|
-
const
|
|
826
|
+
const yt = t => t.length !== 0 && !t.startsWith(".");
|
|
589
827
|
|
|
590
|
-
const
|
|
828
|
+
const bt = t => t.length !== 0 && t !== "." && t !== "..";
|
|
591
829
|
|
|
592
|
-
const
|
|
830
|
+
const St = /^\?+([^+@!?\*\[\(]*)?$/;
|
|
593
831
|
|
|
594
|
-
const
|
|
595
|
-
const s =
|
|
832
|
+
const kt = ([t, e = ""]) => {
|
|
833
|
+
const s = Ct([ t ]);
|
|
596
834
|
if (!e) return s;
|
|
597
835
|
e = e.toLowerCase();
|
|
598
836
|
return t => s(t) && t.toLowerCase().endsWith(e);
|
|
599
837
|
};
|
|
600
838
|
|
|
601
|
-
const
|
|
602
|
-
const s =
|
|
839
|
+
const vt = ([t, e = ""]) => {
|
|
840
|
+
const s = Tt([ t ]);
|
|
603
841
|
if (!e) return s;
|
|
604
842
|
e = e.toLowerCase();
|
|
605
843
|
return t => s(t) && t.toLowerCase().endsWith(e);
|
|
606
844
|
};
|
|
607
845
|
|
|
608
|
-
const
|
|
609
|
-
const s =
|
|
846
|
+
const xt = ([t, e = ""]) => {
|
|
847
|
+
const s = Tt([ t ]);
|
|
610
848
|
return !e ? s : t => s(t) && t.endsWith(e);
|
|
611
849
|
};
|
|
612
850
|
|
|
613
|
-
const
|
|
614
|
-
const s =
|
|
851
|
+
const Et = ([t, e = ""]) => {
|
|
852
|
+
const s = Ct([ t ]);
|
|
615
853
|
return !e ? s : t => s(t) && t.endsWith(e);
|
|
616
854
|
};
|
|
617
855
|
|
|
618
|
-
const
|
|
856
|
+
const Ct = ([t]) => {
|
|
619
857
|
const e = t.length;
|
|
620
858
|
return t => t.length === e && !t.startsWith(".");
|
|
621
859
|
};
|
|
622
860
|
|
|
623
|
-
const
|
|
861
|
+
const Tt = ([t]) => {
|
|
624
862
|
const e = t.length;
|
|
625
863
|
return t => t.length === e && t !== "." && t !== "..";
|
|
626
864
|
};
|
|
627
865
|
|
|
628
|
-
const
|
|
866
|
+
const Lt = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
629
867
|
|
|
630
|
-
const
|
|
868
|
+
const At = {
|
|
631
869
|
win32: {
|
|
632
870
|
sep: "\\"
|
|
633
871
|
},
|
|
@@ -636,80 +874,80 @@ const et = {
|
|
|
636
874
|
}
|
|
637
875
|
};
|
|
638
876
|
|
|
639
|
-
const
|
|
877
|
+
const Mt = Lt === "win32" ? At.win32.sep : At.posix.sep;
|
|
640
878
|
|
|
641
|
-
|
|
879
|
+
ot.sep = Mt;
|
|
642
880
|
|
|
643
|
-
const
|
|
881
|
+
const Pt = Symbol("globstar **");
|
|
644
882
|
|
|
645
|
-
|
|
883
|
+
ot.GLOBSTAR = Pt;
|
|
646
884
|
|
|
647
|
-
const
|
|
885
|
+
const Ft = "[^/]";
|
|
648
886
|
|
|
649
|
-
const
|
|
887
|
+
const Rt = Ft + "*?";
|
|
650
888
|
|
|
651
|
-
const
|
|
889
|
+
const Ot = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";
|
|
652
890
|
|
|
653
|
-
const
|
|
891
|
+
const zt = "(?:(?!(?:\\/|^)\\.).)*?";
|
|
654
892
|
|
|
655
|
-
const
|
|
893
|
+
const Dt = (t, e = {}) => s => ot(s, t, e);
|
|
656
894
|
|
|
657
|
-
|
|
895
|
+
ot.filter = Dt;
|
|
658
896
|
|
|
659
|
-
const
|
|
897
|
+
const Nt = (t, e = {}) => Object.assign({}, t, e);
|
|
660
898
|
|
|
661
|
-
const
|
|
899
|
+
const Bt = t => {
|
|
662
900
|
if (!t || typeof t !== "object" || !Object.keys(t).length) {
|
|
663
|
-
return
|
|
901
|
+
return ot;
|
|
664
902
|
}
|
|
665
|
-
const e =
|
|
666
|
-
const s = (s, i, n = {}) => e(s, i,
|
|
903
|
+
const e = ot;
|
|
904
|
+
const s = (s, i, n = {}) => e(s, i, Nt(t, n));
|
|
667
905
|
return Object.assign(s, {
|
|
668
906
|
Minimatch: class Minimatch extends e.Minimatch {
|
|
669
907
|
constructor(e, s = {}) {
|
|
670
|
-
super(e,
|
|
908
|
+
super(e, Nt(t, s));
|
|
671
909
|
}
|
|
672
910
|
static defaults(s) {
|
|
673
|
-
return e.defaults(
|
|
911
|
+
return e.defaults(Nt(t, s)).Minimatch;
|
|
674
912
|
}
|
|
675
913
|
},
|
|
676
914
|
AST: class AST extends e.AST {
|
|
677
915
|
constructor(e, s, i = {}) {
|
|
678
|
-
super(e, s,
|
|
916
|
+
super(e, s, Nt(t, i));
|
|
679
917
|
}
|
|
680
918
|
static fromGlob(s, i = {}) {
|
|
681
|
-
return e.AST.fromGlob(s,
|
|
919
|
+
return e.AST.fromGlob(s, Nt(t, i));
|
|
682
920
|
}
|
|
683
921
|
},
|
|
684
|
-
unescape: (s, i = {}) => e.unescape(s,
|
|
685
|
-
escape: (s, i = {}) => e.escape(s,
|
|
686
|
-
filter: (s, i = {}) => e.filter(s,
|
|
687
|
-
defaults: s => e.defaults(
|
|
688
|
-
makeRe: (s, i = {}) => e.makeRe(s,
|
|
689
|
-
braceExpand: (s, i = {}) => e.braceExpand(s,
|
|
690
|
-
match: (s, i, n = {}) => e.match(s, i,
|
|
922
|
+
unescape: (s, i = {}) => e.unescape(s, Nt(t, i)),
|
|
923
|
+
escape: (s, i = {}) => e.escape(s, Nt(t, i)),
|
|
924
|
+
filter: (s, i = {}) => e.filter(s, Nt(t, i)),
|
|
925
|
+
defaults: s => e.defaults(Nt(t, s)),
|
|
926
|
+
makeRe: (s, i = {}) => e.makeRe(s, Nt(t, i)),
|
|
927
|
+
braceExpand: (s, i = {}) => e.braceExpand(s, Nt(t, i)),
|
|
928
|
+
match: (s, i, n = {}) => e.match(s, i, Nt(t, n)),
|
|
691
929
|
sep: e.sep,
|
|
692
|
-
GLOBSTAR:
|
|
930
|
+
GLOBSTAR: Pt
|
|
693
931
|
});
|
|
694
932
|
};
|
|
695
933
|
|
|
696
|
-
|
|
934
|
+
ot.defaults = Bt;
|
|
697
935
|
|
|
698
|
-
const
|
|
699
|
-
|
|
700
|
-
if (
|
|
701
|
-
return [
|
|
936
|
+
const Wt = (t, e = {}) => {
|
|
937
|
+
j(t);
|
|
938
|
+
if (e.nobrace || !/\{(?:(?!\{).)*\}/.test(t)) {
|
|
939
|
+
return [ t ];
|
|
702
940
|
}
|
|
703
|
-
return t
|
|
941
|
+
return z(t);
|
|
704
942
|
};
|
|
705
943
|
|
|
706
|
-
|
|
944
|
+
ot.braceExpand = Wt;
|
|
707
945
|
|
|
708
|
-
const
|
|
946
|
+
const It = (t, e = {}) => new Minimatch(t, e).makeRe();
|
|
709
947
|
|
|
710
|
-
|
|
948
|
+
ot.makeRe = It;
|
|
711
949
|
|
|
712
|
-
const
|
|
950
|
+
const _t = (t, e, s = {}) => {
|
|
713
951
|
const i = new Minimatch(e, s);
|
|
714
952
|
t = t.filter((t => i.match(t)));
|
|
715
953
|
if (i.options.nonull && !t.length) {
|
|
@@ -718,11 +956,11 @@ const dt = (t, e, s = {}) => {
|
|
|
718
956
|
return t;
|
|
719
957
|
};
|
|
720
958
|
|
|
721
|
-
|
|
959
|
+
ot.match = _t;
|
|
722
960
|
|
|
723
|
-
const
|
|
961
|
+
const jt = /[?*]|[+@!]\(.*?\)|\[|\]/;
|
|
724
962
|
|
|
725
|
-
const
|
|
963
|
+
const $t = t => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
|
|
726
964
|
|
|
727
965
|
class Minimatch {
|
|
728
966
|
options;
|
|
@@ -743,11 +981,11 @@ class Minimatch {
|
|
|
743
981
|
windowsNoMagicRoot;
|
|
744
982
|
regexp;
|
|
745
983
|
constructor(t, e = {}) {
|
|
746
|
-
|
|
984
|
+
j(t);
|
|
747
985
|
e = e || {};
|
|
748
986
|
this.options = e;
|
|
749
987
|
this.pattern = t;
|
|
750
|
-
this.platform = e.platform ||
|
|
988
|
+
this.platform = e.platform || Lt;
|
|
751
989
|
this.isWindows = this.platform === "win32";
|
|
752
990
|
this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || e.allowWindowsEscape === false;
|
|
753
991
|
if (this.windowsPathsNoEscape) {
|
|
@@ -801,7 +1039,7 @@ class Minimatch {
|
|
|
801
1039
|
this.debug(this.pattern, this.globParts);
|
|
802
1040
|
let i = this.globParts.map(((t, e, s) => {
|
|
803
1041
|
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
804
|
-
const e = t[0] === "" && t[1] === "" && (t[2] === "?" || !
|
|
1042
|
+
const e = t[0] === "" && t[1] === "" && (t[2] === "?" || !jt.test(t[2])) && !jt.test(t[3]);
|
|
805
1043
|
const s = /^[a-z]:/i.test(t[0]);
|
|
806
1044
|
if (e) {
|
|
807
1045
|
return [ ...t.slice(0, 4), ...t.slice(4).map((t => this.parse(t))) ];
|
|
@@ -1068,7 +1306,7 @@ class Minimatch {
|
|
|
1068
1306
|
if (l === false) {
|
|
1069
1307
|
return false;
|
|
1070
1308
|
}
|
|
1071
|
-
if (l ===
|
|
1309
|
+
if (l === Pt) {
|
|
1072
1310
|
this.debug("GLOBSTAR", [ e, l, c ]);
|
|
1073
1311
|
var f = r;
|
|
1074
1312
|
var u = o + 1;
|
|
@@ -1123,25 +1361,25 @@ class Minimatch {
|
|
|
1123
1361
|
}
|
|
1124
1362
|
}
|
|
1125
1363
|
braceExpand() {
|
|
1126
|
-
return
|
|
1364
|
+
return Wt(this.pattern, this.options);
|
|
1127
1365
|
}
|
|
1128
1366
|
parse(t) {
|
|
1129
|
-
|
|
1367
|
+
j(t);
|
|
1130
1368
|
const e = this.options;
|
|
1131
|
-
if (t === "**") return
|
|
1369
|
+
if (t === "**") return Pt;
|
|
1132
1370
|
if (t === "") return "";
|
|
1133
1371
|
let s;
|
|
1134
1372
|
let i = null;
|
|
1135
|
-
if (s = t.match(
|
|
1136
|
-
i = e.dot ?
|
|
1137
|
-
} else if (s = t.match(
|
|
1138
|
-
i = (e.nocase ? e.dot ?
|
|
1139
|
-
} else if (s = t.match(
|
|
1140
|
-
i = (e.nocase ? e.dot ?
|
|
1141
|
-
} else if (s = t.match(
|
|
1142
|
-
i = e.dot ?
|
|
1143
|
-
} else if (s = t.match(
|
|
1144
|
-
i =
|
|
1373
|
+
if (s = t.match(wt)) {
|
|
1374
|
+
i = e.dot ? bt : yt;
|
|
1375
|
+
} else if (s = t.match(ht)) {
|
|
1376
|
+
i = (e.nocase ? e.dot ? ft : ct : e.dot ? lt : at)(s[1]);
|
|
1377
|
+
} else if (s = t.match(St)) {
|
|
1378
|
+
i = (e.nocase ? e.dot ? vt : kt : e.dot ? xt : Et)(s);
|
|
1379
|
+
} else if (s = t.match(ut)) {
|
|
1380
|
+
i = e.dot ? pt : dt;
|
|
1381
|
+
} else if (s = t.match(gt)) {
|
|
1382
|
+
i = mt;
|
|
1145
1383
|
}
|
|
1146
1384
|
const n = AST.fromGlob(t, this.options).toMMPattern();
|
|
1147
1385
|
if (i && typeof n === "object") {
|
|
@@ -1159,38 +1397,49 @@ class Minimatch {
|
|
|
1159
1397
|
return this.regexp;
|
|
1160
1398
|
}
|
|
1161
1399
|
const e = this.options;
|
|
1162
|
-
const s = e.noglobstar ?
|
|
1400
|
+
const s = e.noglobstar ? Rt : e.dot ? Ot : zt;
|
|
1163
1401
|
const i = new Set(e.nocase ? [ "i" ] : []);
|
|
1164
1402
|
let n = t.map((t => {
|
|
1165
1403
|
const e = t.map((t => {
|
|
1166
1404
|
if (t instanceof RegExp) {
|
|
1167
1405
|
for (const e of t.flags.split("")) i.add(e);
|
|
1168
1406
|
}
|
|
1169
|
-
return typeof t === "string" ?
|
|
1407
|
+
return typeof t === "string" ? $t(t) : t === Pt ? Pt : t._src;
|
|
1170
1408
|
}));
|
|
1171
1409
|
e.forEach(((t, i) => {
|
|
1172
1410
|
const n = e[i + 1];
|
|
1173
1411
|
const r = e[i - 1];
|
|
1174
|
-
if (t !==
|
|
1412
|
+
if (t !== Pt || r === Pt) {
|
|
1175
1413
|
return;
|
|
1176
1414
|
}
|
|
1177
1415
|
if (r === undefined) {
|
|
1178
|
-
if (n !== undefined && n !==
|
|
1416
|
+
if (n !== undefined && n !== Pt) {
|
|
1179
1417
|
e[i + 1] = "(?:\\/|" + s + "\\/)?" + n;
|
|
1180
1418
|
} else {
|
|
1181
1419
|
e[i] = s;
|
|
1182
1420
|
}
|
|
1183
1421
|
} else if (n === undefined) {
|
|
1184
|
-
e[i - 1] = r + "(
|
|
1185
|
-
} else if (n !==
|
|
1422
|
+
e[i - 1] = r + "(?:\\/|\\/" + s + ")?";
|
|
1423
|
+
} else if (n !== Pt) {
|
|
1186
1424
|
e[i - 1] = r + "(?:\\/|\\/" + s + "\\/)" + n;
|
|
1187
|
-
e[i + 1] =
|
|
1425
|
+
e[i + 1] = Pt;
|
|
1188
1426
|
}
|
|
1189
1427
|
}));
|
|
1190
|
-
|
|
1428
|
+
const n = e.filter((t => t !== Pt));
|
|
1429
|
+
if (this.partial && n.length >= 1) {
|
|
1430
|
+
const t = [];
|
|
1431
|
+
for (let e = 1; e <= n.length; e++) {
|
|
1432
|
+
t.push(n.slice(0, e).join("/"));
|
|
1433
|
+
}
|
|
1434
|
+
return "(?:" + t.join("|") + ")";
|
|
1435
|
+
}
|
|
1436
|
+
return n.join("/");
|
|
1191
1437
|
})).join("|");
|
|
1192
1438
|
const [r, o] = t.length > 1 ? [ "(?:", ")" ] : [ "", "" ];
|
|
1193
1439
|
n = "^" + r + n + o + "$";
|
|
1440
|
+
if (this.partial) {
|
|
1441
|
+
n = "^(?:\\/|" + r + n.slice(1, -1) + o + ")$";
|
|
1442
|
+
}
|
|
1194
1443
|
if (this.negate) n = "^(?!" + n + ").+$";
|
|
1195
1444
|
try {
|
|
1196
1445
|
this.regexp = new RegExp(n, [ ...i ].join(""));
|
|
@@ -1253,34 +1502,34 @@ class Minimatch {
|
|
|
1253
1502
|
return this.negate;
|
|
1254
1503
|
}
|
|
1255
1504
|
static defaults(t) {
|
|
1256
|
-
return
|
|
1505
|
+
return ot.defaults(t).Minimatch;
|
|
1257
1506
|
}
|
|
1258
1507
|
}
|
|
1259
1508
|
|
|
1260
|
-
|
|
1509
|
+
ot.AST = AST;
|
|
1261
1510
|
|
|
1262
|
-
|
|
1511
|
+
ot.Minimatch = Minimatch;
|
|
1263
1512
|
|
|
1264
|
-
|
|
1513
|
+
ot.escape = rt;
|
|
1265
1514
|
|
|
1266
|
-
|
|
1515
|
+
ot.unescape = Z;
|
|
1267
1516
|
|
|
1268
|
-
const
|
|
1517
|
+
const Ut = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
1269
1518
|
|
|
1270
|
-
const
|
|
1519
|
+
const Gt = new Set;
|
|
1271
1520
|
|
|
1272
|
-
const
|
|
1521
|
+
const qt = typeof process === "object" && !!process ? process : {};
|
|
1273
1522
|
|
|
1274
|
-
const
|
|
1275
|
-
typeof
|
|
1523
|
+
const Ht = (t, e, s, i) => {
|
|
1524
|
+
typeof qt.emitWarning === "function" ? qt.emitWarning(t, e, s, i) : console.error(`[${s}] ${e}: ${t}`);
|
|
1276
1525
|
};
|
|
1277
1526
|
|
|
1278
|
-
let
|
|
1527
|
+
let Zt = globalThis.AbortController;
|
|
1279
1528
|
|
|
1280
|
-
let
|
|
1529
|
+
let Vt = globalThis.AbortSignal;
|
|
1281
1530
|
|
|
1282
|
-
if (typeof
|
|
1283
|
-
|
|
1531
|
+
if (typeof Zt === "undefined") {
|
|
1532
|
+
Vt = class AbortSignal {
|
|
1284
1533
|
onabort;
|
|
1285
1534
|
_onabort=[];
|
|
1286
1535
|
reason;
|
|
@@ -1289,11 +1538,11 @@ if (typeof St === "undefined") {
|
|
|
1289
1538
|
this._onabort.push(e);
|
|
1290
1539
|
}
|
|
1291
1540
|
};
|
|
1292
|
-
|
|
1541
|
+
Zt = class AbortController {
|
|
1293
1542
|
constructor() {
|
|
1294
1543
|
e();
|
|
1295
1544
|
}
|
|
1296
|
-
signal=new
|
|
1545
|
+
signal=new Vt;
|
|
1297
1546
|
abort(t) {
|
|
1298
1547
|
if (this.signal.aborted) return;
|
|
1299
1548
|
this.signal.reason = t;
|
|
@@ -1304,21 +1553,21 @@ if (typeof St === "undefined") {
|
|
|
1304
1553
|
this.signal.onabort?.(t);
|
|
1305
1554
|
}
|
|
1306
1555
|
};
|
|
1307
|
-
let t =
|
|
1556
|
+
let t = qt.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1";
|
|
1308
1557
|
const e = () => {
|
|
1309
1558
|
if (!t) return;
|
|
1310
1559
|
t = false;
|
|
1311
|
-
|
|
1560
|
+
Ht("AbortController is not defined. If using lru-cache in " + "node 14, load an AbortController polyfill from the " + "`node-abort-controller` package. A minimal polyfill is " + "provided for use by LRUCache.fetch(), but it should not be " + "relied upon in other contexts (eg, passing it to other APIs that " + "use AbortController/AbortSignal might have undesirable effects). " + "You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", e);
|
|
1312
1561
|
};
|
|
1313
1562
|
}
|
|
1314
1563
|
|
|
1315
|
-
const
|
|
1564
|
+
const Jt = t => !Gt.has(t);
|
|
1316
1565
|
|
|
1317
|
-
const
|
|
1566
|
+
const Kt = Symbol("type");
|
|
1318
1567
|
|
|
1319
|
-
const
|
|
1568
|
+
const Yt = t => t && t === Math.floor(t) && t > 0 && isFinite(t);
|
|
1320
1569
|
|
|
1321
|
-
const
|
|
1570
|
+
const Xt = t => !Yt(t) ? null : t <= Math.pow(2, 8) ? Uint8Array : t <= Math.pow(2, 16) ? Uint16Array : t <= Math.pow(2, 32) ? Uint32Array : t <= Number.MAX_SAFE_INTEGER ? ZeroArray : null;
|
|
1322
1571
|
|
|
1323
1572
|
class ZeroArray extends Array {
|
|
1324
1573
|
constructor(t) {
|
|
@@ -1332,7 +1581,7 @@ class Stack {
|
|
|
1332
1581
|
length;
|
|
1333
1582
|
static #g=false;
|
|
1334
1583
|
static create(t) {
|
|
1335
|
-
const e =
|
|
1584
|
+
const e = Xt(t);
|
|
1336
1585
|
if (!e) return [];
|
|
1337
1586
|
Stack.#g = true;
|
|
1338
1587
|
const s = new Stack(t, e);
|
|
@@ -1379,8 +1628,8 @@ class LRUCache {
|
|
|
1379
1628
|
ignoreFetchAbort;
|
|
1380
1629
|
#x;
|
|
1381
1630
|
#E;
|
|
1382
|
-
#T;
|
|
1383
1631
|
#C;
|
|
1632
|
+
#T;
|
|
1384
1633
|
#L;
|
|
1385
1634
|
#A;
|
|
1386
1635
|
#M;
|
|
@@ -1393,15 +1642,15 @@ class LRUCache {
|
|
|
1393
1642
|
#N;
|
|
1394
1643
|
#B;
|
|
1395
1644
|
#W;
|
|
1396
|
-
#_;
|
|
1397
1645
|
#I;
|
|
1646
|
+
#_;
|
|
1398
1647
|
static unsafeExposeInternals(t) {
|
|
1399
1648
|
return {
|
|
1400
1649
|
starts: t.#D,
|
|
1401
1650
|
ttls: t.#N,
|
|
1402
1651
|
sizes: t.#z,
|
|
1403
|
-
keyMap: t.#
|
|
1404
|
-
keyList: t.#
|
|
1652
|
+
keyMap: t.#C,
|
|
1653
|
+
keyList: t.#T,
|
|
1405
1654
|
valList: t.#L,
|
|
1406
1655
|
next: t.#A,
|
|
1407
1656
|
prev: t.#M,
|
|
@@ -1413,9 +1662,9 @@ class LRUCache {
|
|
|
1413
1662
|
},
|
|
1414
1663
|
free: t.#R,
|
|
1415
1664
|
isBackgroundFetch: e => t.#j(e),
|
|
1416
|
-
backgroundFetch: (e, s, i, n) => t
|
|
1417
|
-
moveToTail: e => t.#
|
|
1418
|
-
indexes: e => t
|
|
1665
|
+
backgroundFetch: (e, s, i, n) => t.#$(e, s, i, n),
|
|
1666
|
+
moveToTail: e => t.#U(e),
|
|
1667
|
+
indexes: e => t.#G(e),
|
|
1419
1668
|
rindexes: e => t.#q(e),
|
|
1420
1669
|
isStale: e => t.#H(e)
|
|
1421
1670
|
};
|
|
@@ -1449,10 +1698,10 @@ class LRUCache {
|
|
|
1449
1698
|
}
|
|
1450
1699
|
constructor(t) {
|
|
1451
1700
|
const {max: e = 0, ttl: s, ttlResolution: i = 1, ttlAutopurge: n, updateAgeOnGet: r, updateAgeOnHas: o, allowStale: h, dispose: a, onInsert: l, disposeAfter: c, noDisposeOnSet: f, noUpdateTTL: u, maxSize: d = 0, maxEntrySize: p = 0, sizeCalculation: g, fetchMethod: m, memoMethod: w, noDeleteOnFetchRejection: y, noDeleteOnStaleGet: b, allowStaleOnFetchRejection: S, allowStaleOnFetchAbort: k, ignoreFetchAbort: v} = t;
|
|
1452
|
-
if (e !== 0 && !
|
|
1701
|
+
if (e !== 0 && !Yt(e)) {
|
|
1453
1702
|
throw new TypeError("max option must be a nonnegative integer");
|
|
1454
1703
|
}
|
|
1455
|
-
const x = e ?
|
|
1704
|
+
const x = e ? Xt(e) : Array;
|
|
1456
1705
|
if (!x) {
|
|
1457
1706
|
throw new Error("invalid max value: " + e);
|
|
1458
1707
|
}
|
|
@@ -1477,8 +1726,8 @@ class LRUCache {
|
|
|
1477
1726
|
}
|
|
1478
1727
|
this.#k = m;
|
|
1479
1728
|
this.#W = !!m;
|
|
1480
|
-
this.#
|
|
1481
|
-
this.#
|
|
1729
|
+
this.#C = new Map;
|
|
1730
|
+
this.#T = new Array(e).fill(undefined);
|
|
1482
1731
|
this.#L = new Array(e).fill(undefined);
|
|
1483
1732
|
this.#A = new x(e);
|
|
1484
1733
|
this.#M = new x(e);
|
|
@@ -1501,8 +1750,8 @@ class LRUCache {
|
|
|
1501
1750
|
this.#O = undefined;
|
|
1502
1751
|
}
|
|
1503
1752
|
this.#B = !!this.#y;
|
|
1504
|
-
this.#
|
|
1505
|
-
this.#
|
|
1753
|
+
this.#_ = !!this.#b;
|
|
1754
|
+
this.#I = !!this.#S;
|
|
1506
1755
|
this.noDisposeOnSet = !!f;
|
|
1507
1756
|
this.noUpdateTTL = !!u;
|
|
1508
1757
|
this.noDeleteOnFetchRejection = !!y;
|
|
@@ -1511,11 +1760,11 @@ class LRUCache {
|
|
|
1511
1760
|
this.ignoreFetchAbort = !!v;
|
|
1512
1761
|
if (this.maxEntrySize !== 0) {
|
|
1513
1762
|
if (this.#w !== 0) {
|
|
1514
|
-
if (!
|
|
1763
|
+
if (!Yt(this.#w)) {
|
|
1515
1764
|
throw new TypeError("maxSize must be a positive integer if specified");
|
|
1516
1765
|
}
|
|
1517
1766
|
}
|
|
1518
|
-
if (!
|
|
1767
|
+
if (!Yt(this.maxEntrySize)) {
|
|
1519
1768
|
throw new TypeError("maxEntrySize must be a positive integer if specified");
|
|
1520
1769
|
}
|
|
1521
1770
|
this.#Z();
|
|
@@ -1524,11 +1773,11 @@ class LRUCache {
|
|
|
1524
1773
|
this.noDeleteOnStaleGet = !!b;
|
|
1525
1774
|
this.updateAgeOnGet = !!r;
|
|
1526
1775
|
this.updateAgeOnHas = !!o;
|
|
1527
|
-
this.ttlResolution =
|
|
1776
|
+
this.ttlResolution = Yt(i) || i === 0 ? i : 1;
|
|
1528
1777
|
this.ttlAutopurge = !!n;
|
|
1529
1778
|
this.ttl = s || 0;
|
|
1530
1779
|
if (this.ttl) {
|
|
1531
|
-
if (!
|
|
1780
|
+
if (!Yt(this.ttl)) {
|
|
1532
1781
|
throw new TypeError("ttl must be a positive integer if specified");
|
|
1533
1782
|
}
|
|
1534
1783
|
this.#V();
|
|
@@ -1538,28 +1787,28 @@ class LRUCache {
|
|
|
1538
1787
|
}
|
|
1539
1788
|
if (!this.ttlAutopurge && !this.#m && !this.#w) {
|
|
1540
1789
|
const t = "LRU_CACHE_UNBOUNDED";
|
|
1541
|
-
if (
|
|
1542
|
-
|
|
1790
|
+
if (Jt(t)) {
|
|
1791
|
+
Gt.add(t);
|
|
1543
1792
|
const e = "TTL caching without ttlAutopurge, max, or maxSize can " + "result in unbounded memory consumption.";
|
|
1544
|
-
|
|
1793
|
+
Ht(e, "UnboundedCacheWarning", t, LRUCache);
|
|
1545
1794
|
}
|
|
1546
1795
|
}
|
|
1547
1796
|
}
|
|
1548
1797
|
getRemainingTTL(t) {
|
|
1549
|
-
return this.#
|
|
1798
|
+
return this.#C.has(t) ? Infinity : 0;
|
|
1550
1799
|
}
|
|
1551
1800
|
#V() {
|
|
1552
1801
|
const t = new ZeroArray(this.#m);
|
|
1553
1802
|
const e = new ZeroArray(this.#m);
|
|
1554
1803
|
this.#N = t;
|
|
1555
1804
|
this.#D = e;
|
|
1556
|
-
this.#J = (s, i, n =
|
|
1805
|
+
this.#J = (s, i, n = Ut.now()) => {
|
|
1557
1806
|
e[s] = i !== 0 ? n : 0;
|
|
1558
1807
|
t[s] = i;
|
|
1559
1808
|
if (i !== 0 && this.ttlAutopurge) {
|
|
1560
1809
|
const t = setTimeout((() => {
|
|
1561
1810
|
if (this.#H(s)) {
|
|
1562
|
-
this.#K(this.#
|
|
1811
|
+
this.#K(this.#T[s], "expire");
|
|
1563
1812
|
}
|
|
1564
1813
|
}), i + 1);
|
|
1565
1814
|
if (t.unref) {
|
|
@@ -1568,7 +1817,7 @@ class LRUCache {
|
|
|
1568
1817
|
}
|
|
1569
1818
|
};
|
|
1570
1819
|
this.#Y = s => {
|
|
1571
|
-
e[s] = t[s] !== 0 ?
|
|
1820
|
+
e[s] = t[s] !== 0 ? Ut.now() : 0;
|
|
1572
1821
|
};
|
|
1573
1822
|
this.#X = (n, r) => {
|
|
1574
1823
|
if (t[r]) {
|
|
@@ -1584,7 +1833,7 @@ class LRUCache {
|
|
|
1584
1833
|
};
|
|
1585
1834
|
let s = 0;
|
|
1586
1835
|
const i = () => {
|
|
1587
|
-
const t =
|
|
1836
|
+
const t = Ut.now();
|
|
1588
1837
|
if (this.ttlResolution > 0) {
|
|
1589
1838
|
s = t;
|
|
1590
1839
|
const e = setTimeout((() => s = 0), this.ttlResolution);
|
|
@@ -1595,7 +1844,7 @@ class LRUCache {
|
|
|
1595
1844
|
return t;
|
|
1596
1845
|
};
|
|
1597
1846
|
this.getRemainingTTL = n => {
|
|
1598
|
-
const r = this.#
|
|
1847
|
+
const r = this.#C.get(n);
|
|
1599
1848
|
if (r === undefined) {
|
|
1600
1849
|
return 0;
|
|
1601
1850
|
}
|
|
@@ -1629,13 +1878,13 @@ class LRUCache {
|
|
|
1629
1878
|
if (this.#j(e)) {
|
|
1630
1879
|
return 0;
|
|
1631
1880
|
}
|
|
1632
|
-
if (!
|
|
1881
|
+
if (!Yt(s)) {
|
|
1633
1882
|
if (i) {
|
|
1634
1883
|
if (typeof i !== "function") {
|
|
1635
1884
|
throw new TypeError("sizeCalculation must be a function");
|
|
1636
1885
|
}
|
|
1637
1886
|
s = i(e, t);
|
|
1638
|
-
if (!
|
|
1887
|
+
if (!Yt(s)) {
|
|
1639
1888
|
throw new TypeError("sizeCalculation return invalid (expect positive integer)");
|
|
1640
1889
|
}
|
|
1641
1890
|
} else {
|
|
@@ -1667,7 +1916,7 @@ class LRUCache {
|
|
|
1667
1916
|
}
|
|
1668
1917
|
return 0;
|
|
1669
1918
|
};
|
|
1670
|
-
*
|
|
1919
|
+
* #G({allowStale: t = this.allowStale} = {}) {
|
|
1671
1920
|
if (this.#x) {
|
|
1672
1921
|
for (let e = this.#F; true; ) {
|
|
1673
1922
|
if (!this.#it(e)) {
|
|
@@ -1702,25 +1951,25 @@ class LRUCache {
|
|
|
1702
1951
|
}
|
|
1703
1952
|
}
|
|
1704
1953
|
#it(t) {
|
|
1705
|
-
return t !== undefined && this.#
|
|
1954
|
+
return t !== undefined && this.#C.get(this.#T[t]) === t;
|
|
1706
1955
|
}
|
|
1707
1956
|
* entries() {
|
|
1708
|
-
for (const t of this
|
|
1709
|
-
if (this.#L[t] !== undefined && this.#
|
|
1710
|
-
yield [ this.#
|
|
1957
|
+
for (const t of this.#G()) {
|
|
1958
|
+
if (this.#L[t] !== undefined && this.#T[t] !== undefined && !this.#j(this.#L[t])) {
|
|
1959
|
+
yield [ this.#T[t], this.#L[t] ];
|
|
1711
1960
|
}
|
|
1712
1961
|
}
|
|
1713
1962
|
}
|
|
1714
1963
|
* rentries() {
|
|
1715
1964
|
for (const t of this.#q()) {
|
|
1716
|
-
if (this.#L[t] !== undefined && this.#
|
|
1717
|
-
yield [ this.#
|
|
1965
|
+
if (this.#L[t] !== undefined && this.#T[t] !== undefined && !this.#j(this.#L[t])) {
|
|
1966
|
+
yield [ this.#T[t], this.#L[t] ];
|
|
1718
1967
|
}
|
|
1719
1968
|
}
|
|
1720
1969
|
}
|
|
1721
1970
|
* keys() {
|
|
1722
|
-
for (const t of this
|
|
1723
|
-
const e = this.#
|
|
1971
|
+
for (const t of this.#G()) {
|
|
1972
|
+
const e = this.#T[t];
|
|
1724
1973
|
if (e !== undefined && !this.#j(this.#L[t])) {
|
|
1725
1974
|
yield e;
|
|
1726
1975
|
}
|
|
@@ -1728,14 +1977,14 @@ class LRUCache {
|
|
|
1728
1977
|
}
|
|
1729
1978
|
* rkeys() {
|
|
1730
1979
|
for (const t of this.#q()) {
|
|
1731
|
-
const e = this.#
|
|
1980
|
+
const e = this.#T[t];
|
|
1732
1981
|
if (e !== undefined && !this.#j(this.#L[t])) {
|
|
1733
1982
|
yield e;
|
|
1734
1983
|
}
|
|
1735
1984
|
}
|
|
1736
1985
|
}
|
|
1737
1986
|
* values() {
|
|
1738
|
-
for (const t of this
|
|
1987
|
+
for (const t of this.#G()) {
|
|
1739
1988
|
const e = this.#L[t];
|
|
1740
1989
|
if (e !== undefined && !this.#j(this.#L[t])) {
|
|
1741
1990
|
yield this.#L[t];
|
|
@@ -1755,21 +2004,21 @@ class LRUCache {
|
|
|
1755
2004
|
}
|
|
1756
2005
|
[Symbol.toStringTag]="LRUCache";
|
|
1757
2006
|
find(t, e = {}) {
|
|
1758
|
-
for (const s of this
|
|
2007
|
+
for (const s of this.#G()) {
|
|
1759
2008
|
const i = this.#L[s];
|
|
1760
2009
|
const n = this.#j(i) ? i.__staleWhileFetching : i;
|
|
1761
2010
|
if (n === undefined) continue;
|
|
1762
|
-
if (t(n, this.#
|
|
1763
|
-
return this.get(this.#
|
|
2011
|
+
if (t(n, this.#T[s], this)) {
|
|
2012
|
+
return this.get(this.#T[s], e);
|
|
1764
2013
|
}
|
|
1765
2014
|
}
|
|
1766
2015
|
}
|
|
1767
2016
|
forEach(t, e = this) {
|
|
1768
|
-
for (const s of this
|
|
2017
|
+
for (const s of this.#G()) {
|
|
1769
2018
|
const i = this.#L[s];
|
|
1770
2019
|
const n = this.#j(i) ? i.__staleWhileFetching : i;
|
|
1771
2020
|
if (n === undefined) continue;
|
|
1772
|
-
t.call(e, n, this.#
|
|
2021
|
+
t.call(e, n, this.#T[s], this);
|
|
1773
2022
|
}
|
|
1774
2023
|
}
|
|
1775
2024
|
rforEach(t, e = this) {
|
|
@@ -1777,7 +2026,7 @@ class LRUCache {
|
|
|
1777
2026
|
const i = this.#L[s];
|
|
1778
2027
|
const n = this.#j(i) ? i.__staleWhileFetching : i;
|
|
1779
2028
|
if (n === undefined) continue;
|
|
1780
|
-
t.call(e, n, this.#
|
|
2029
|
+
t.call(e, n, this.#T[s], this);
|
|
1781
2030
|
}
|
|
1782
2031
|
}
|
|
1783
2032
|
purgeStale() {
|
|
@@ -1786,14 +2035,14 @@ class LRUCache {
|
|
|
1786
2035
|
allowStale: true
|
|
1787
2036
|
})) {
|
|
1788
2037
|
if (this.#H(e)) {
|
|
1789
|
-
this.#K(this.#
|
|
2038
|
+
this.#K(this.#T[e], "expire");
|
|
1790
2039
|
t = true;
|
|
1791
2040
|
}
|
|
1792
2041
|
}
|
|
1793
2042
|
return t;
|
|
1794
2043
|
}
|
|
1795
2044
|
info(t) {
|
|
1796
|
-
const e = this.#
|
|
2045
|
+
const e = this.#C.get(t);
|
|
1797
2046
|
if (e === undefined) return undefined;
|
|
1798
2047
|
const s = this.#L[e];
|
|
1799
2048
|
const i = this.#j(s) ? s.__staleWhileFetching : s;
|
|
@@ -1805,7 +2054,7 @@ class LRUCache {
|
|
|
1805
2054
|
const t = this.#N[e];
|
|
1806
2055
|
const s = this.#D[e];
|
|
1807
2056
|
if (t && s) {
|
|
1808
|
-
const e = t - (
|
|
2057
|
+
const e = t - (Ut.now() - s);
|
|
1809
2058
|
n.ttl = e;
|
|
1810
2059
|
n.start = Date.now();
|
|
1811
2060
|
}
|
|
@@ -1817,10 +2066,10 @@ class LRUCache {
|
|
|
1817
2066
|
}
|
|
1818
2067
|
dump() {
|
|
1819
2068
|
const t = [];
|
|
1820
|
-
for (const e of this
|
|
2069
|
+
for (const e of this.#G({
|
|
1821
2070
|
allowStale: true
|
|
1822
2071
|
})) {
|
|
1823
|
-
const s = this.#
|
|
2072
|
+
const s = this.#T[e];
|
|
1824
2073
|
const i = this.#L[e];
|
|
1825
2074
|
const n = this.#j(i) ? i.__staleWhileFetching : i;
|
|
1826
2075
|
if (n === undefined || s === undefined) continue;
|
|
@@ -1829,7 +2078,7 @@ class LRUCache {
|
|
|
1829
2078
|
};
|
|
1830
2079
|
if (this.#N && this.#D) {
|
|
1831
2080
|
r.ttl = this.#N[e];
|
|
1832
|
-
const t =
|
|
2081
|
+
const t = Ut.now() - this.#D[e];
|
|
1833
2082
|
r.start = Math.floor(Date.now() - t);
|
|
1834
2083
|
}
|
|
1835
2084
|
if (this.#z) {
|
|
@@ -1844,7 +2093,7 @@ class LRUCache {
|
|
|
1844
2093
|
for (const [e, s] of t) {
|
|
1845
2094
|
if (s.start) {
|
|
1846
2095
|
const t = Date.now() - s.start;
|
|
1847
|
-
s.start =
|
|
2096
|
+
s.start = Ut.now() - t;
|
|
1848
2097
|
}
|
|
1849
2098
|
this.set(e, s.value, s);
|
|
1850
2099
|
}
|
|
@@ -1865,12 +2114,12 @@ class LRUCache {
|
|
|
1865
2114
|
this.#K(t, "set");
|
|
1866
2115
|
return this;
|
|
1867
2116
|
}
|
|
1868
|
-
let c = this.#x === 0 ? undefined : this.#
|
|
2117
|
+
let c = this.#x === 0 ? undefined : this.#C.get(t);
|
|
1869
2118
|
if (c === undefined) {
|
|
1870
2119
|
c = this.#x === 0 ? this.#F : this.#R.length !== 0 ? this.#R.pop() : this.#x === this.#m ? this.#st(false) : this.#x;
|
|
1871
|
-
this.#
|
|
2120
|
+
this.#T[c] = t;
|
|
1872
2121
|
this.#L[c] = e;
|
|
1873
|
-
this.#
|
|
2122
|
+
this.#C.set(t, c);
|
|
1874
2123
|
this.#A[this.#F] = c;
|
|
1875
2124
|
this.#M[c] = this.#F;
|
|
1876
2125
|
this.#F = c;
|
|
@@ -1878,11 +2127,11 @@ class LRUCache {
|
|
|
1878
2127
|
this.#et(c, l, h);
|
|
1879
2128
|
if (h) h.set = "add";
|
|
1880
2129
|
a = false;
|
|
1881
|
-
if (this.#
|
|
2130
|
+
if (this.#_) {
|
|
1882
2131
|
this.#b?.(e, t, "add");
|
|
1883
2132
|
}
|
|
1884
2133
|
} else {
|
|
1885
|
-
this.#
|
|
2134
|
+
this.#U(c);
|
|
1886
2135
|
const s = this.#L[c];
|
|
1887
2136
|
if (e !== s) {
|
|
1888
2137
|
if (this.#W && this.#j(s)) {
|
|
@@ -1892,7 +2141,7 @@ class LRUCache {
|
|
|
1892
2141
|
if (this.#B) {
|
|
1893
2142
|
this.#y?.(e, t, "set");
|
|
1894
2143
|
}
|
|
1895
|
-
if (this.#
|
|
2144
|
+
if (this.#I) {
|
|
1896
2145
|
this.#O?.push([ e, t, "set" ]);
|
|
1897
2146
|
}
|
|
1898
2147
|
}
|
|
@@ -1900,7 +2149,7 @@ class LRUCache {
|
|
|
1900
2149
|
if (this.#B) {
|
|
1901
2150
|
this.#y?.(s, t, "set");
|
|
1902
2151
|
}
|
|
1903
|
-
if (this.#
|
|
2152
|
+
if (this.#I) {
|
|
1904
2153
|
this.#O?.push([ s, t, "set" ]);
|
|
1905
2154
|
}
|
|
1906
2155
|
}
|
|
@@ -1915,7 +2164,7 @@ class LRUCache {
|
|
|
1915
2164
|
} else if (h) {
|
|
1916
2165
|
h.set = "update";
|
|
1917
2166
|
}
|
|
1918
|
-
if (this.#
|
|
2167
|
+
if (this.#_) {
|
|
1919
2168
|
this.onInsert?.(e, t, e === s ? "update" : "replace");
|
|
1920
2169
|
}
|
|
1921
2170
|
}
|
|
@@ -1928,7 +2177,7 @@ class LRUCache {
|
|
|
1928
2177
|
}
|
|
1929
2178
|
if (h) this.#X(h, c);
|
|
1930
2179
|
}
|
|
1931
|
-
if (!r && this.#
|
|
2180
|
+
if (!r && this.#I && this.#O) {
|
|
1932
2181
|
const t = this.#O;
|
|
1933
2182
|
let e;
|
|
1934
2183
|
while (e = t?.shift()) {
|
|
@@ -1951,7 +2200,7 @@ class LRUCache {
|
|
|
1951
2200
|
}
|
|
1952
2201
|
}
|
|
1953
2202
|
} finally {
|
|
1954
|
-
if (this.#
|
|
2203
|
+
if (this.#I && this.#O) {
|
|
1955
2204
|
const t = this.#O;
|
|
1956
2205
|
let e;
|
|
1957
2206
|
while (e = t?.shift()) {
|
|
@@ -1962,21 +2211,21 @@ class LRUCache {
|
|
|
1962
2211
|
}
|
|
1963
2212
|
#st(t) {
|
|
1964
2213
|
const e = this.#P;
|
|
1965
|
-
const s = this.#
|
|
2214
|
+
const s = this.#T[e];
|
|
1966
2215
|
const i = this.#L[e];
|
|
1967
2216
|
if (this.#W && this.#j(i)) {
|
|
1968
2217
|
i.__abortController.abort(new Error("evicted"));
|
|
1969
|
-
} else if (this.#B || this.#
|
|
2218
|
+
} else if (this.#B || this.#I) {
|
|
1970
2219
|
if (this.#B) {
|
|
1971
2220
|
this.#y?.(i, s, "evict");
|
|
1972
2221
|
}
|
|
1973
|
-
if (this.#
|
|
2222
|
+
if (this.#I) {
|
|
1974
2223
|
this.#O?.push([ i, s, "evict" ]);
|
|
1975
2224
|
}
|
|
1976
2225
|
}
|
|
1977
2226
|
this.#Q(e);
|
|
1978
2227
|
if (t) {
|
|
1979
|
-
this.#
|
|
2228
|
+
this.#T[e] = undefined;
|
|
1980
2229
|
this.#L[e] = undefined;
|
|
1981
2230
|
this.#R.push(e);
|
|
1982
2231
|
}
|
|
@@ -1986,13 +2235,13 @@ class LRUCache {
|
|
|
1986
2235
|
} else {
|
|
1987
2236
|
this.#P = this.#A[e];
|
|
1988
2237
|
}
|
|
1989
|
-
this.#
|
|
2238
|
+
this.#C.delete(s);
|
|
1990
2239
|
this.#x--;
|
|
1991
2240
|
return e;
|
|
1992
2241
|
}
|
|
1993
2242
|
has(t, e = {}) {
|
|
1994
2243
|
const {updateAgeOnHas: s = this.updateAgeOnHas, status: i} = e;
|
|
1995
|
-
const n = this.#
|
|
2244
|
+
const n = this.#C.get(t);
|
|
1996
2245
|
if (n !== undefined) {
|
|
1997
2246
|
const t = this.#L[n];
|
|
1998
2247
|
if (this.#j(t) && t.__staleWhileFetching === undefined) {
|
|
@@ -2018,19 +2267,19 @@ class LRUCache {
|
|
|
2018
2267
|
}
|
|
2019
2268
|
peek(t, e = {}) {
|
|
2020
2269
|
const {allowStale: s = this.allowStale} = e;
|
|
2021
|
-
const i = this.#
|
|
2270
|
+
const i = this.#C.get(t);
|
|
2022
2271
|
if (i === undefined || !s && this.#H(i)) {
|
|
2023
2272
|
return;
|
|
2024
2273
|
}
|
|
2025
2274
|
const n = this.#L[i];
|
|
2026
2275
|
return this.#j(n) ? n.__staleWhileFetching : n;
|
|
2027
2276
|
}
|
|
2028
|
-
|
|
2277
|
+
#$(t, e, s, i) {
|
|
2029
2278
|
const n = e === undefined ? undefined : this.#L[e];
|
|
2030
2279
|
if (this.#j(n)) {
|
|
2031
2280
|
return n;
|
|
2032
2281
|
}
|
|
2033
|
-
const r = new
|
|
2282
|
+
const r = new Zt;
|
|
2034
2283
|
const {signal: o} = s;
|
|
2035
2284
|
o?.addEventListener("abort", (() => r.abort(o.reason)), {
|
|
2036
2285
|
signal: r.signal
|
|
@@ -2126,7 +2375,7 @@ class LRUCache {
|
|
|
2126
2375
|
...h.options,
|
|
2127
2376
|
status: undefined
|
|
2128
2377
|
});
|
|
2129
|
-
e = this.#
|
|
2378
|
+
e = this.#C.get(t);
|
|
2130
2379
|
} else {
|
|
2131
2380
|
this.#L[e] = d;
|
|
2132
2381
|
}
|
|
@@ -2135,7 +2384,7 @@ class LRUCache {
|
|
|
2135
2384
|
#j(t) {
|
|
2136
2385
|
if (!this.#W) return false;
|
|
2137
2386
|
const e = t;
|
|
2138
|
-
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof
|
|
2387
|
+
return !!e && e instanceof Promise && e.hasOwnProperty("__staleWhileFetching") && e.__abortController instanceof Zt;
|
|
2139
2388
|
}
|
|
2140
2389
|
async fetch(t, e = {}) {
|
|
2141
2390
|
const {allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, ttl: r = this.ttl, noDisposeOnSet: o = this.noDisposeOnSet, size: h = 0, sizeCalculation: a = this.sizeCalculation, noUpdateTTL: l = this.noUpdateTTL, noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection, allowStaleOnFetchRejection: f = this.allowStaleOnFetchRejection, ignoreFetchAbort: u = this.ignoreFetchAbort, allowStaleOnFetchAbort: d = this.allowStaleOnFetchAbort, context: p, forceRefresh: g = false, status: m, signal: w} = e;
|
|
@@ -2164,10 +2413,10 @@ class LRUCache {
|
|
|
2164
2413
|
status: m,
|
|
2165
2414
|
signal: w
|
|
2166
2415
|
};
|
|
2167
|
-
let b = this.#
|
|
2416
|
+
let b = this.#C.get(t);
|
|
2168
2417
|
if (b === undefined) {
|
|
2169
2418
|
if (m) m.fetch = "miss";
|
|
2170
|
-
const e = this
|
|
2419
|
+
const e = this.#$(t, b, y, p);
|
|
2171
2420
|
return e.__returned = e;
|
|
2172
2421
|
} else {
|
|
2173
2422
|
const e = this.#L[b];
|
|
@@ -2182,14 +2431,14 @@ class LRUCache {
|
|
|
2182
2431
|
const n = this.#H(b);
|
|
2183
2432
|
if (!g && !n) {
|
|
2184
2433
|
if (m) m.fetch = "hit";
|
|
2185
|
-
this.#
|
|
2434
|
+
this.#U(b);
|
|
2186
2435
|
if (i) {
|
|
2187
2436
|
this.#Y(b);
|
|
2188
2437
|
}
|
|
2189
2438
|
if (m) this.#X(m, b);
|
|
2190
2439
|
return e;
|
|
2191
2440
|
}
|
|
2192
|
-
const r = this
|
|
2441
|
+
const r = this.#$(t, b, y, p);
|
|
2193
2442
|
const o = r.__staleWhileFetching !== undefined;
|
|
2194
2443
|
const h = o && s;
|
|
2195
2444
|
if (m) {
|
|
@@ -2221,7 +2470,7 @@ class LRUCache {
|
|
|
2221
2470
|
}
|
|
2222
2471
|
get(t, e = {}) {
|
|
2223
2472
|
const {allowStale: s = this.allowStale, updateAgeOnGet: i = this.updateAgeOnGet, noDeleteOnStaleGet: n = this.noDeleteOnStaleGet, status: r} = e;
|
|
2224
|
-
const o = this.#
|
|
2473
|
+
const o = this.#C.get(t);
|
|
2225
2474
|
if (o !== undefined) {
|
|
2226
2475
|
const e = this.#L[o];
|
|
2227
2476
|
const h = this.#j(e);
|
|
@@ -2245,7 +2494,7 @@ class LRUCache {
|
|
|
2245
2494
|
if (h) {
|
|
2246
2495
|
return e.__staleWhileFetching;
|
|
2247
2496
|
}
|
|
2248
|
-
this.#
|
|
2497
|
+
this.#U(o);
|
|
2249
2498
|
if (i) {
|
|
2250
2499
|
this.#Y(o);
|
|
2251
2500
|
}
|
|
@@ -2259,7 +2508,7 @@ class LRUCache {
|
|
|
2259
2508
|
this.#M[e] = t;
|
|
2260
2509
|
this.#A[t] = e;
|
|
2261
2510
|
}
|
|
2262
|
-
#
|
|
2511
|
+
#U(t) {
|
|
2263
2512
|
if (t !== this.#F) {
|
|
2264
2513
|
if (t === this.#P) {
|
|
2265
2514
|
this.#P = this.#A[t];
|
|
@@ -2276,7 +2525,7 @@ class LRUCache {
|
|
|
2276
2525
|
#K(t, e) {
|
|
2277
2526
|
let s = false;
|
|
2278
2527
|
if (this.#x !== 0) {
|
|
2279
|
-
const i = this.#
|
|
2528
|
+
const i = this.#C.get(t);
|
|
2280
2529
|
if (i !== undefined) {
|
|
2281
2530
|
s = true;
|
|
2282
2531
|
if (this.#x === 1) {
|
|
@@ -2286,16 +2535,16 @@ class LRUCache {
|
|
|
2286
2535
|
const s = this.#L[i];
|
|
2287
2536
|
if (this.#j(s)) {
|
|
2288
2537
|
s.__abortController.abort(new Error("deleted"));
|
|
2289
|
-
} else if (this.#B || this.#
|
|
2538
|
+
} else if (this.#B || this.#I) {
|
|
2290
2539
|
if (this.#B) {
|
|
2291
2540
|
this.#y?.(s, t, e);
|
|
2292
2541
|
}
|
|
2293
|
-
if (this.#
|
|
2542
|
+
if (this.#I) {
|
|
2294
2543
|
this.#O?.push([ s, t, e ]);
|
|
2295
2544
|
}
|
|
2296
2545
|
}
|
|
2297
|
-
this.#
|
|
2298
|
-
this.#
|
|
2546
|
+
this.#C.delete(t);
|
|
2547
|
+
this.#T[i] = undefined;
|
|
2299
2548
|
this.#L[i] = undefined;
|
|
2300
2549
|
if (i === this.#F) {
|
|
2301
2550
|
this.#F = this.#M[i];
|
|
@@ -2312,7 +2561,7 @@ class LRUCache {
|
|
|
2312
2561
|
}
|
|
2313
2562
|
}
|
|
2314
2563
|
}
|
|
2315
|
-
if (this.#
|
|
2564
|
+
if (this.#I && this.#O?.length) {
|
|
2316
2565
|
const t = this.#O;
|
|
2317
2566
|
let e;
|
|
2318
2567
|
while (e = t?.shift()) {
|
|
@@ -2332,18 +2581,18 @@ class LRUCache {
|
|
|
2332
2581
|
if (this.#j(s)) {
|
|
2333
2582
|
s.__abortController.abort(new Error("deleted"));
|
|
2334
2583
|
} else {
|
|
2335
|
-
const i = this.#
|
|
2584
|
+
const i = this.#T[e];
|
|
2336
2585
|
if (this.#B) {
|
|
2337
2586
|
this.#y?.(s, i, t);
|
|
2338
2587
|
}
|
|
2339
|
-
if (this.#
|
|
2588
|
+
if (this.#I) {
|
|
2340
2589
|
this.#O?.push([ s, i, t ]);
|
|
2341
2590
|
}
|
|
2342
2591
|
}
|
|
2343
2592
|
}
|
|
2344
|
-
this.#
|
|
2593
|
+
this.#C.clear();
|
|
2345
2594
|
this.#L.fill(undefined);
|
|
2346
|
-
this.#
|
|
2595
|
+
this.#T.fill(undefined);
|
|
2347
2596
|
if (this.#N && this.#D) {
|
|
2348
2597
|
this.#N.fill(0);
|
|
2349
2598
|
this.#D.fill(0);
|
|
@@ -2356,7 +2605,7 @@ class LRUCache {
|
|
|
2356
2605
|
this.#R.length = 0;
|
|
2357
2606
|
this.#E = 0;
|
|
2358
2607
|
this.#x = 0;
|
|
2359
|
-
if (this.#
|
|
2608
|
+
if (this.#I && this.#O) {
|
|
2360
2609
|
const t = this.#O;
|
|
2361
2610
|
let e;
|
|
2362
2611
|
while (e = t?.shift()) {
|
|
@@ -2366,88 +2615,88 @@ class LRUCache {
|
|
|
2366
2615
|
}
|
|
2367
2616
|
}
|
|
2368
2617
|
|
|
2369
|
-
const
|
|
2618
|
+
const Qt = typeof process === "object" && process ? process : {
|
|
2370
2619
|
stdout: null,
|
|
2371
2620
|
stderr: null
|
|
2372
2621
|
};
|
|
2373
2622
|
|
|
2374
|
-
const
|
|
2623
|
+
const te = t => !!t && typeof t === "object" && (t instanceof Minipass || t instanceof f.default || ee(t) || se(t));
|
|
2375
2624
|
|
|
2376
|
-
const
|
|
2625
|
+
const ee = t => !!t && typeof t === "object" && t instanceof r.EventEmitter && typeof t.pipe === "function" && t.pipe !== f.default.Writable.prototype.pipe;
|
|
2377
2626
|
|
|
2378
|
-
const
|
|
2627
|
+
const se = t => !!t && typeof t === "object" && t instanceof r.EventEmitter && typeof t.write === "function" && typeof t.end === "function";
|
|
2379
2628
|
|
|
2380
|
-
const
|
|
2629
|
+
const ie = Symbol("EOF");
|
|
2381
2630
|
|
|
2382
|
-
const
|
|
2631
|
+
const ne = Symbol("maybeEmitEnd");
|
|
2383
2632
|
|
|
2384
|
-
const
|
|
2633
|
+
const re = Symbol("emittedEnd");
|
|
2385
2634
|
|
|
2386
|
-
const
|
|
2635
|
+
const oe = Symbol("emittingEnd");
|
|
2387
2636
|
|
|
2388
|
-
const
|
|
2637
|
+
const he = Symbol("emittedError");
|
|
2389
2638
|
|
|
2390
|
-
const
|
|
2639
|
+
const ae = Symbol("closed");
|
|
2391
2640
|
|
|
2392
|
-
const
|
|
2641
|
+
const le = Symbol("read");
|
|
2393
2642
|
|
|
2394
|
-
const
|
|
2643
|
+
const ce = Symbol("flush");
|
|
2395
2644
|
|
|
2396
|
-
const
|
|
2645
|
+
const fe = Symbol("flushChunk");
|
|
2397
2646
|
|
|
2398
|
-
const
|
|
2647
|
+
const ue = Symbol("encoding");
|
|
2399
2648
|
|
|
2400
|
-
const
|
|
2649
|
+
const de = Symbol("decoder");
|
|
2401
2650
|
|
|
2402
|
-
const
|
|
2651
|
+
const pe = Symbol("flowing");
|
|
2403
2652
|
|
|
2404
|
-
const
|
|
2653
|
+
const ge = Symbol("paused");
|
|
2405
2654
|
|
|
2406
|
-
const
|
|
2655
|
+
const me = Symbol("resume");
|
|
2407
2656
|
|
|
2408
|
-
const
|
|
2657
|
+
const we = Symbol("buffer");
|
|
2409
2658
|
|
|
2410
|
-
const
|
|
2659
|
+
const ye = Symbol("pipes");
|
|
2411
2660
|
|
|
2412
|
-
const
|
|
2661
|
+
const be = Symbol("bufferLength");
|
|
2413
2662
|
|
|
2414
|
-
const
|
|
2663
|
+
const Se = Symbol("bufferPush");
|
|
2415
2664
|
|
|
2416
|
-
const
|
|
2665
|
+
const ke = Symbol("bufferShift");
|
|
2417
2666
|
|
|
2418
|
-
const
|
|
2667
|
+
const ve = Symbol("objectMode");
|
|
2419
2668
|
|
|
2420
|
-
const
|
|
2669
|
+
const xe = Symbol("destroyed");
|
|
2421
2670
|
|
|
2422
|
-
const
|
|
2671
|
+
const Ee = Symbol("error");
|
|
2423
2672
|
|
|
2424
|
-
const
|
|
2673
|
+
const Ce = Symbol("emitData");
|
|
2425
2674
|
|
|
2426
|
-
const
|
|
2675
|
+
const Te = Symbol("emitEnd");
|
|
2427
2676
|
|
|
2428
|
-
const
|
|
2677
|
+
const Le = Symbol("emitEnd2");
|
|
2429
2678
|
|
|
2430
|
-
const
|
|
2679
|
+
const Ae = Symbol("async");
|
|
2431
2680
|
|
|
2432
|
-
const
|
|
2681
|
+
const Me = Symbol("abort");
|
|
2433
2682
|
|
|
2434
|
-
const
|
|
2683
|
+
const Pe = Symbol("aborted");
|
|
2435
2684
|
|
|
2436
|
-
const
|
|
2685
|
+
const Fe = Symbol("signal");
|
|
2437
2686
|
|
|
2438
|
-
const
|
|
2687
|
+
const Re = Symbol("dataListeners");
|
|
2439
2688
|
|
|
2440
|
-
const
|
|
2689
|
+
const Oe = Symbol("discarded");
|
|
2441
2690
|
|
|
2442
|
-
const
|
|
2691
|
+
const ze = t => Promise.resolve().then(t);
|
|
2443
2692
|
|
|
2444
|
-
const
|
|
2693
|
+
const De = t => t();
|
|
2445
2694
|
|
|
2446
|
-
const
|
|
2695
|
+
const Ne = t => t === "end" || t === "finish" || t === "prefinish";
|
|
2447
2696
|
|
|
2448
|
-
const
|
|
2697
|
+
const Be = t => t instanceof ArrayBuffer || !!t && typeof t === "object" && t.constructor && t.constructor.name === "ArrayBuffer" && t.byteLength >= 0;
|
|
2449
2698
|
|
|
2450
|
-
const
|
|
2699
|
+
const We = t => !Buffer.isBuffer(t) && ArrayBuffer.isView(t);
|
|
2451
2700
|
|
|
2452
2701
|
class Pipe {
|
|
2453
2702
|
src;
|
|
@@ -2458,7 +2707,7 @@ class Pipe {
|
|
|
2458
2707
|
this.src = t;
|
|
2459
2708
|
this.dest = e;
|
|
2460
2709
|
this.opts = s;
|
|
2461
|
-
this.ondrain = () => t[
|
|
2710
|
+
this.ondrain = () => t[me]();
|
|
2462
2711
|
this.dest.on("drain", this.ondrain);
|
|
2463
2712
|
}
|
|
2464
2713
|
unpipe() {
|
|
@@ -2483,30 +2732,30 @@ class PipeProxyErrors extends Pipe {
|
|
|
2483
2732
|
}
|
|
2484
2733
|
}
|
|
2485
2734
|
|
|
2486
|
-
const
|
|
2487
|
-
|
|
2488
|
-
const
|
|
2489
|
-
|
|
2490
|
-
class Minipass extends
|
|
2491
|
-
[
|
|
2492
|
-
[
|
|
2493
|
-
[
|
|
2494
|
-
[
|
|
2495
|
-
[
|
|
2496
|
-
[
|
|
2497
|
-
[
|
|
2498
|
-
[
|
|
2499
|
-
[Pt]=false;
|
|
2500
|
-
[Rt]=false;
|
|
2501
|
-
[Ot]=false;
|
|
2502
|
-
[Dt]=false;
|
|
2503
|
-
[zt]=null;
|
|
2504
|
-
[Ht]=0;
|
|
2505
|
-
[Kt]=false;
|
|
2506
|
-
[ne];
|
|
2735
|
+
const Ie = t => !!t.objectMode;
|
|
2736
|
+
|
|
2737
|
+
const _e = t => !t.objectMode && !!t.encoding && t.encoding !== "buffer";
|
|
2738
|
+
|
|
2739
|
+
class Minipass extends r.EventEmitter {
|
|
2740
|
+
[pe]=false;
|
|
2741
|
+
[ge]=false;
|
|
2742
|
+
[ye]=[];
|
|
2743
|
+
[we]=[];
|
|
2744
|
+
[ve];
|
|
2745
|
+
[ue];
|
|
2746
|
+
[Ae];
|
|
2747
|
+
[de];
|
|
2507
2748
|
[ie]=false;
|
|
2508
|
-
[re]=
|
|
2749
|
+
[re]=false;
|
|
2509
2750
|
[oe]=false;
|
|
2751
|
+
[ae]=false;
|
|
2752
|
+
[he]=null;
|
|
2753
|
+
[be]=0;
|
|
2754
|
+
[xe]=false;
|
|
2755
|
+
[Fe];
|
|
2756
|
+
[Pe]=false;
|
|
2757
|
+
[Re]=0;
|
|
2758
|
+
[Oe]=false;
|
|
2510
2759
|
writable=true;
|
|
2511
2760
|
readable=true;
|
|
2512
2761
|
constructor(...t) {
|
|
@@ -2515,43 +2764,43 @@ class Minipass extends o.EventEmitter {
|
|
|
2515
2764
|
if (e.objectMode && typeof e.encoding === "string") {
|
|
2516
2765
|
throw new TypeError("Encoding and objectMode may not be used together");
|
|
2517
2766
|
}
|
|
2518
|
-
if (
|
|
2519
|
-
this[
|
|
2520
|
-
this[
|
|
2521
|
-
} else if (
|
|
2522
|
-
this[
|
|
2523
|
-
this[
|
|
2767
|
+
if (Ie(e)) {
|
|
2768
|
+
this[ve] = true;
|
|
2769
|
+
this[ue] = null;
|
|
2770
|
+
} else if (_e(e)) {
|
|
2771
|
+
this[ue] = e.encoding;
|
|
2772
|
+
this[ve] = false;
|
|
2524
2773
|
} else {
|
|
2525
|
-
this[
|
|
2526
|
-
this[
|
|
2774
|
+
this[ve] = false;
|
|
2775
|
+
this[ue] = null;
|
|
2527
2776
|
}
|
|
2528
|
-
this[
|
|
2529
|
-
this[
|
|
2777
|
+
this[Ae] = !!e.async;
|
|
2778
|
+
this[de] = this[ue] ? new h.StringDecoder(this[ue]) : null;
|
|
2530
2779
|
if (e && e.debugExposeBuffer === true) {
|
|
2531
2780
|
Object.defineProperty(this, "buffer", {
|
|
2532
|
-
get: () => this[
|
|
2781
|
+
get: () => this[we]
|
|
2533
2782
|
});
|
|
2534
2783
|
}
|
|
2535
2784
|
if (e && e.debugExposePipes === true) {
|
|
2536
2785
|
Object.defineProperty(this, "pipes", {
|
|
2537
|
-
get: () => this[
|
|
2786
|
+
get: () => this[ye]
|
|
2538
2787
|
});
|
|
2539
2788
|
}
|
|
2540
2789
|
const {signal: s} = e;
|
|
2541
2790
|
if (s) {
|
|
2542
|
-
this[
|
|
2791
|
+
this[Fe] = s;
|
|
2543
2792
|
if (s.aborted) {
|
|
2544
|
-
this[
|
|
2793
|
+
this[Me]();
|
|
2545
2794
|
} else {
|
|
2546
|
-
s.addEventListener("abort", (() => this[
|
|
2795
|
+
s.addEventListener("abort", (() => this[Me]()));
|
|
2547
2796
|
}
|
|
2548
2797
|
}
|
|
2549
2798
|
}
|
|
2550
2799
|
get bufferLength() {
|
|
2551
|
-
return this[
|
|
2800
|
+
return this[be];
|
|
2552
2801
|
}
|
|
2553
2802
|
get encoding() {
|
|
2554
|
-
return this[
|
|
2803
|
+
return this[ue];
|
|
2555
2804
|
}
|
|
2556
2805
|
set encoding(t) {
|
|
2557
2806
|
throw new Error("Encoding must be set at instantiation time");
|
|
@@ -2560,30 +2809,30 @@ class Minipass extends o.EventEmitter {
|
|
|
2560
2809
|
throw new Error("Encoding must be set at instantiation time");
|
|
2561
2810
|
}
|
|
2562
2811
|
get objectMode() {
|
|
2563
|
-
return this[
|
|
2812
|
+
return this[ve];
|
|
2564
2813
|
}
|
|
2565
2814
|
set objectMode(t) {
|
|
2566
2815
|
throw new Error("objectMode must be set at instantiation time");
|
|
2567
2816
|
}
|
|
2568
2817
|
get ["async"]() {
|
|
2569
|
-
return this[
|
|
2818
|
+
return this[Ae];
|
|
2570
2819
|
}
|
|
2571
2820
|
set ["async"](t) {
|
|
2572
|
-
this[
|
|
2821
|
+
this[Ae] = this[Ae] || !!t;
|
|
2573
2822
|
}
|
|
2574
|
-
[
|
|
2575
|
-
this[
|
|
2576
|
-
this.emit("abort", this[
|
|
2577
|
-
this.destroy(this[
|
|
2823
|
+
[Me]() {
|
|
2824
|
+
this[Pe] = true;
|
|
2825
|
+
this.emit("abort", this[Fe]?.reason);
|
|
2826
|
+
this.destroy(this[Fe]?.reason);
|
|
2578
2827
|
}
|
|
2579
2828
|
get aborted() {
|
|
2580
|
-
return this[
|
|
2829
|
+
return this[Pe];
|
|
2581
2830
|
}
|
|
2582
2831
|
set aborted(t) {}
|
|
2583
2832
|
write(t, e, s) {
|
|
2584
|
-
if (this[
|
|
2585
|
-
if (this[
|
|
2586
|
-
if (this[
|
|
2833
|
+
if (this[Pe]) return false;
|
|
2834
|
+
if (this[ie]) throw new Error("write after end");
|
|
2835
|
+
if (this[xe]) {
|
|
2587
2836
|
this.emit("error", Object.assign(new Error("Cannot call write after a stream was destroyed"), {
|
|
2588
2837
|
code: "ERR_STREAM_DESTROYED"
|
|
2589
2838
|
}));
|
|
@@ -2594,70 +2843,70 @@ class Minipass extends o.EventEmitter {
|
|
|
2594
2843
|
e = "utf8";
|
|
2595
2844
|
}
|
|
2596
2845
|
if (!e) e = "utf8";
|
|
2597
|
-
const i = this[
|
|
2598
|
-
if (!this[
|
|
2599
|
-
if (
|
|
2846
|
+
const i = this[Ae] ? ze : De;
|
|
2847
|
+
if (!this[ve] && !Buffer.isBuffer(t)) {
|
|
2848
|
+
if (We(t)) {
|
|
2600
2849
|
t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
2601
|
-
} else if (
|
|
2850
|
+
} else if (Be(t)) {
|
|
2602
2851
|
t = Buffer.from(t);
|
|
2603
2852
|
} else if (typeof t !== "string") {
|
|
2604
2853
|
throw new Error("Non-contiguous data written to non-objectMode stream");
|
|
2605
2854
|
}
|
|
2606
2855
|
}
|
|
2607
|
-
if (this[
|
|
2608
|
-
if (this[
|
|
2609
|
-
if (this[
|
|
2610
|
-
if (this[
|
|
2856
|
+
if (this[ve]) {
|
|
2857
|
+
if (this[pe] && this[be] !== 0) this[ce](true);
|
|
2858
|
+
if (this[pe]) this.emit("data", t); else this[Se](t);
|
|
2859
|
+
if (this[be] !== 0) this.emit("readable");
|
|
2611
2860
|
if (s) i(s);
|
|
2612
|
-
return this[
|
|
2861
|
+
return this[pe];
|
|
2613
2862
|
}
|
|
2614
2863
|
if (!t.length) {
|
|
2615
|
-
if (this[
|
|
2864
|
+
if (this[be] !== 0) this.emit("readable");
|
|
2616
2865
|
if (s) i(s);
|
|
2617
|
-
return this[
|
|
2866
|
+
return this[pe];
|
|
2618
2867
|
}
|
|
2619
|
-
if (typeof t === "string" && !(e === this[
|
|
2868
|
+
if (typeof t === "string" && !(e === this[ue] && !this[de]?.lastNeed)) {
|
|
2620
2869
|
t = Buffer.from(t, e);
|
|
2621
2870
|
}
|
|
2622
|
-
if (Buffer.isBuffer(t) && this[
|
|
2623
|
-
t = this[
|
|
2871
|
+
if (Buffer.isBuffer(t) && this[ue]) {
|
|
2872
|
+
t = this[de].write(t);
|
|
2624
2873
|
}
|
|
2625
|
-
if (this[
|
|
2626
|
-
if (this[
|
|
2627
|
-
if (this[
|
|
2874
|
+
if (this[pe] && this[be] !== 0) this[ce](true);
|
|
2875
|
+
if (this[pe]) this.emit("data", t); else this[Se](t);
|
|
2876
|
+
if (this[be] !== 0) this.emit("readable");
|
|
2628
2877
|
if (s) i(s);
|
|
2629
|
-
return this[
|
|
2878
|
+
return this[pe];
|
|
2630
2879
|
}
|
|
2631
2880
|
read(t) {
|
|
2632
|
-
if (this[
|
|
2633
|
-
this[
|
|
2634
|
-
if (this[
|
|
2635
|
-
this[
|
|
2881
|
+
if (this[xe]) return null;
|
|
2882
|
+
this[Oe] = false;
|
|
2883
|
+
if (this[be] === 0 || t === 0 || t && t > this[be]) {
|
|
2884
|
+
this[ne]();
|
|
2636
2885
|
return null;
|
|
2637
2886
|
}
|
|
2638
|
-
if (this[
|
|
2639
|
-
if (this[
|
|
2640
|
-
this[
|
|
2887
|
+
if (this[ve]) t = null;
|
|
2888
|
+
if (this[we].length > 1 && !this[ve]) {
|
|
2889
|
+
this[we] = [ this[ue] ? this[we].join("") : Buffer.concat(this[we], this[be]) ];
|
|
2641
2890
|
}
|
|
2642
|
-
const e = this[
|
|
2643
|
-
this[
|
|
2891
|
+
const e = this[le](t || null, this[we][0]);
|
|
2892
|
+
this[ne]();
|
|
2644
2893
|
return e;
|
|
2645
2894
|
}
|
|
2646
|
-
[
|
|
2647
|
-
if (this[
|
|
2895
|
+
[le](t, e) {
|
|
2896
|
+
if (this[ve]) this[ke](); else {
|
|
2648
2897
|
const s = e;
|
|
2649
|
-
if (t === s.length || t === null) this[
|
|
2650
|
-
this[
|
|
2898
|
+
if (t === s.length || t === null) this[ke](); else if (typeof s === "string") {
|
|
2899
|
+
this[we][0] = s.slice(t);
|
|
2651
2900
|
e = s.slice(0, t);
|
|
2652
|
-
this[
|
|
2901
|
+
this[be] -= t;
|
|
2653
2902
|
} else {
|
|
2654
|
-
this[
|
|
2903
|
+
this[we][0] = s.subarray(t);
|
|
2655
2904
|
e = s.subarray(0, t);
|
|
2656
|
-
this[
|
|
2905
|
+
this[be] -= t;
|
|
2657
2906
|
}
|
|
2658
2907
|
}
|
|
2659
2908
|
this.emit("data", e);
|
|
2660
|
-
if (!this[
|
|
2909
|
+
if (!this[we].length && !this[ie]) this.emit("drain");
|
|
2661
2910
|
return e;
|
|
2662
2911
|
}
|
|
2663
2912
|
end(t, e, s) {
|
|
@@ -2671,78 +2920,78 @@ class Minipass extends o.EventEmitter {
|
|
|
2671
2920
|
}
|
|
2672
2921
|
if (t !== undefined) this.write(t, e);
|
|
2673
2922
|
if (s) this.once("end", s);
|
|
2674
|
-
this[
|
|
2923
|
+
this[ie] = true;
|
|
2675
2924
|
this.writable = false;
|
|
2676
|
-
if (this[
|
|
2925
|
+
if (this[pe] || !this[ge]) this[ne]();
|
|
2677
2926
|
return this;
|
|
2678
2927
|
}
|
|
2679
|
-
[
|
|
2680
|
-
if (this[
|
|
2681
|
-
if (!this[
|
|
2682
|
-
this[
|
|
2928
|
+
[me]() {
|
|
2929
|
+
if (this[xe]) return;
|
|
2930
|
+
if (!this[Re] && !this[ye].length) {
|
|
2931
|
+
this[Oe] = true;
|
|
2683
2932
|
}
|
|
2684
|
-
this[
|
|
2685
|
-
this[
|
|
2933
|
+
this[ge] = false;
|
|
2934
|
+
this[pe] = true;
|
|
2686
2935
|
this.emit("resume");
|
|
2687
|
-
if (this[
|
|
2936
|
+
if (this[we].length) this[ce](); else if (this[ie]) this[ne](); else this.emit("drain");
|
|
2688
2937
|
}
|
|
2689
2938
|
resume() {
|
|
2690
|
-
return this[
|
|
2939
|
+
return this[me]();
|
|
2691
2940
|
}
|
|
2692
2941
|
pause() {
|
|
2693
|
-
this[
|
|
2694
|
-
this[
|
|
2695
|
-
this[
|
|
2942
|
+
this[pe] = false;
|
|
2943
|
+
this[ge] = true;
|
|
2944
|
+
this[Oe] = false;
|
|
2696
2945
|
}
|
|
2697
2946
|
get destroyed() {
|
|
2698
|
-
return this[
|
|
2947
|
+
return this[xe];
|
|
2699
2948
|
}
|
|
2700
2949
|
get flowing() {
|
|
2701
|
-
return this[
|
|
2950
|
+
return this[pe];
|
|
2702
2951
|
}
|
|
2703
2952
|
get paused() {
|
|
2704
|
-
return this[
|
|
2953
|
+
return this[ge];
|
|
2705
2954
|
}
|
|
2706
|
-
[
|
|
2707
|
-
if (this[
|
|
2708
|
-
this[
|
|
2955
|
+
[Se](t) {
|
|
2956
|
+
if (this[ve]) this[be] += 1; else this[be] += t.length;
|
|
2957
|
+
this[we].push(t);
|
|
2709
2958
|
}
|
|
2710
|
-
[
|
|
2711
|
-
if (this[
|
|
2712
|
-
return this[
|
|
2959
|
+
[ke]() {
|
|
2960
|
+
if (this[ve]) this[be] -= 1; else this[be] -= this[we][0].length;
|
|
2961
|
+
return this[we].shift();
|
|
2713
2962
|
}
|
|
2714
|
-
[
|
|
2715
|
-
do {} while (this[
|
|
2716
|
-
if (!t && !this[
|
|
2963
|
+
[ce](t = false) {
|
|
2964
|
+
do {} while (this[fe](this[ke]()) && this[we].length);
|
|
2965
|
+
if (!t && !this[we].length && !this[ie]) this.emit("drain");
|
|
2717
2966
|
}
|
|
2718
|
-
[
|
|
2967
|
+
[fe](t) {
|
|
2719
2968
|
this.emit("data", t);
|
|
2720
|
-
return this[
|
|
2969
|
+
return this[pe];
|
|
2721
2970
|
}
|
|
2722
2971
|
pipe(t, e) {
|
|
2723
|
-
if (this[
|
|
2724
|
-
this[
|
|
2725
|
-
const s = this[
|
|
2972
|
+
if (this[xe]) return t;
|
|
2973
|
+
this[Oe] = false;
|
|
2974
|
+
const s = this[re];
|
|
2726
2975
|
e = e || {};
|
|
2727
|
-
if (t ===
|
|
2976
|
+
if (t === Qt.stdout || t === Qt.stderr) e.end = false; else e.end = e.end !== false;
|
|
2728
2977
|
e.proxyErrors = !!e.proxyErrors;
|
|
2729
2978
|
if (s) {
|
|
2730
2979
|
if (e.end) t.end();
|
|
2731
2980
|
} else {
|
|
2732
|
-
this[
|
|
2733
|
-
if (this[
|
|
2981
|
+
this[ye].push(!e.proxyErrors ? new Pipe(this, t, e) : new PipeProxyErrors(this, t, e));
|
|
2982
|
+
if (this[Ae]) ze((() => this[me]())); else this[me]();
|
|
2734
2983
|
}
|
|
2735
2984
|
return t;
|
|
2736
2985
|
}
|
|
2737
2986
|
unpipe(t) {
|
|
2738
|
-
const e = this[
|
|
2987
|
+
const e = this[ye].find((e => e.dest === t));
|
|
2739
2988
|
if (e) {
|
|
2740
|
-
if (this[
|
|
2741
|
-
if (this[
|
|
2742
|
-
this[
|
|
2989
|
+
if (this[ye].length === 1) {
|
|
2990
|
+
if (this[pe] && this[Re] === 0) {
|
|
2991
|
+
this[pe] = false;
|
|
2743
2992
|
}
|
|
2744
|
-
this[
|
|
2745
|
-
} else this[
|
|
2993
|
+
this[ye] = [];
|
|
2994
|
+
} else this[ye].splice(this[ye].indexOf(e), 1);
|
|
2746
2995
|
e.unpipe();
|
|
2747
2996
|
}
|
|
2748
2997
|
}
|
|
@@ -2752,19 +3001,19 @@ class Minipass extends o.EventEmitter {
|
|
|
2752
3001
|
on(t, e) {
|
|
2753
3002
|
const s = super.on(t, e);
|
|
2754
3003
|
if (t === "data") {
|
|
2755
|
-
this[
|
|
2756
|
-
this[
|
|
2757
|
-
if (!this[
|
|
2758
|
-
this[
|
|
3004
|
+
this[Oe] = false;
|
|
3005
|
+
this[Re]++;
|
|
3006
|
+
if (!this[ye].length && !this[pe]) {
|
|
3007
|
+
this[me]();
|
|
2759
3008
|
}
|
|
2760
|
-
} else if (t === "readable" && this[
|
|
3009
|
+
} else if (t === "readable" && this[be] !== 0) {
|
|
2761
3010
|
super.emit("readable");
|
|
2762
|
-
} else if (
|
|
3011
|
+
} else if (Ne(t) && this[re]) {
|
|
2763
3012
|
super.emit(t);
|
|
2764
3013
|
this.removeAllListeners(t);
|
|
2765
|
-
} else if (t === "error" && this[
|
|
3014
|
+
} else if (t === "error" && this[he]) {
|
|
2766
3015
|
const t = e;
|
|
2767
|
-
if (this[
|
|
3016
|
+
if (this[Ae]) ze((() => t.call(this, this[he]))); else t.call(this, this[he]);
|
|
2768
3017
|
}
|
|
2769
3018
|
return s;
|
|
2770
3019
|
}
|
|
@@ -2774,9 +3023,9 @@ class Minipass extends o.EventEmitter {
|
|
|
2774
3023
|
off(t, e) {
|
|
2775
3024
|
const s = super.off(t, e);
|
|
2776
3025
|
if (t === "data") {
|
|
2777
|
-
this[
|
|
2778
|
-
if (this[
|
|
2779
|
-
this[
|
|
3026
|
+
this[Re] = this.listeners("data").length;
|
|
3027
|
+
if (this[Re] === 0 && !this[Oe] && !this[ye].length) {
|
|
3028
|
+
this[pe] = false;
|
|
2780
3029
|
}
|
|
2781
3030
|
}
|
|
2782
3031
|
return s;
|
|
@@ -2784,49 +3033,49 @@ class Minipass extends o.EventEmitter {
|
|
|
2784
3033
|
removeAllListeners(t) {
|
|
2785
3034
|
const e = super.removeAllListeners(t);
|
|
2786
3035
|
if (t === "data" || t === undefined) {
|
|
2787
|
-
this[
|
|
2788
|
-
if (!this[
|
|
2789
|
-
this[
|
|
3036
|
+
this[Re] = 0;
|
|
3037
|
+
if (!this[Oe] && !this[ye].length) {
|
|
3038
|
+
this[pe] = false;
|
|
2790
3039
|
}
|
|
2791
3040
|
}
|
|
2792
3041
|
return e;
|
|
2793
3042
|
}
|
|
2794
3043
|
get emittedEnd() {
|
|
2795
|
-
return this[
|
|
3044
|
+
return this[re];
|
|
2796
3045
|
}
|
|
2797
|
-
[
|
|
2798
|
-
if (!this[
|
|
2799
|
-
this[
|
|
3046
|
+
[ne]() {
|
|
3047
|
+
if (!this[oe] && !this[re] && !this[xe] && this[we].length === 0 && this[ie]) {
|
|
3048
|
+
this[oe] = true;
|
|
2800
3049
|
this.emit("end");
|
|
2801
3050
|
this.emit("prefinish");
|
|
2802
3051
|
this.emit("finish");
|
|
2803
|
-
if (this[
|
|
2804
|
-
this[
|
|
3052
|
+
if (this[ae]) this.emit("close");
|
|
3053
|
+
this[oe] = false;
|
|
2805
3054
|
}
|
|
2806
3055
|
}
|
|
2807
3056
|
emit(t, ...e) {
|
|
2808
3057
|
const s = e[0];
|
|
2809
|
-
if (t !== "error" && t !== "close" && t !==
|
|
3058
|
+
if (t !== "error" && t !== "close" && t !== xe && this[xe]) {
|
|
2810
3059
|
return false;
|
|
2811
3060
|
} else if (t === "data") {
|
|
2812
|
-
return !this[
|
|
3061
|
+
return !this[ve] && !s ? false : this[Ae] ? (ze((() => this[Ce](s))), true) : this[Ce](s);
|
|
2813
3062
|
} else if (t === "end") {
|
|
2814
|
-
return this[
|
|
3063
|
+
return this[Te]();
|
|
2815
3064
|
} else if (t === "close") {
|
|
2816
|
-
this[
|
|
2817
|
-
if (!this[
|
|
3065
|
+
this[ae] = true;
|
|
3066
|
+
if (!this[re] && !this[xe]) return false;
|
|
2818
3067
|
const t = super.emit("close");
|
|
2819
3068
|
this.removeAllListeners("close");
|
|
2820
3069
|
return t;
|
|
2821
3070
|
} else if (t === "error") {
|
|
2822
|
-
this[
|
|
2823
|
-
super.emit(
|
|
2824
|
-
const t = !this[
|
|
2825
|
-
this[
|
|
3071
|
+
this[he] = s;
|
|
3072
|
+
super.emit(Ee, s);
|
|
3073
|
+
const t = !this[Fe] || this.listeners("error").length ? super.emit("error", s) : false;
|
|
3074
|
+
this[ne]();
|
|
2826
3075
|
return t;
|
|
2827
3076
|
} else if (t === "resume") {
|
|
2828
3077
|
const t = super.emit("resume");
|
|
2829
|
-
this[
|
|
3078
|
+
this[ne]();
|
|
2830
3079
|
return t;
|
|
2831
3080
|
} else if (t === "finish" || t === "prefinish") {
|
|
2832
3081
|
const e = super.emit(t);
|
|
@@ -2834,34 +3083,34 @@ class Minipass extends o.EventEmitter {
|
|
|
2834
3083
|
return e;
|
|
2835
3084
|
}
|
|
2836
3085
|
const i = super.emit(t, ...e);
|
|
2837
|
-
this[
|
|
3086
|
+
this[ne]();
|
|
2838
3087
|
return i;
|
|
2839
3088
|
}
|
|
2840
|
-
[
|
|
2841
|
-
for (const e of this[
|
|
3089
|
+
[Ce](t) {
|
|
3090
|
+
for (const e of this[ye]) {
|
|
2842
3091
|
if (e.dest.write(t) === false) this.pause();
|
|
2843
3092
|
}
|
|
2844
|
-
const e = this[
|
|
2845
|
-
this[
|
|
3093
|
+
const e = this[Oe] ? false : super.emit("data", t);
|
|
3094
|
+
this[ne]();
|
|
2846
3095
|
return e;
|
|
2847
3096
|
}
|
|
2848
|
-
[
|
|
2849
|
-
if (this[
|
|
2850
|
-
this[
|
|
3097
|
+
[Te]() {
|
|
3098
|
+
if (this[re]) return false;
|
|
3099
|
+
this[re] = true;
|
|
2851
3100
|
this.readable = false;
|
|
2852
|
-
return this[
|
|
3101
|
+
return this[Ae] ? (ze((() => this[Le]())), true) : this[Le]();
|
|
2853
3102
|
}
|
|
2854
|
-
[
|
|
2855
|
-
if (this[
|
|
2856
|
-
const t = this[
|
|
3103
|
+
[Le]() {
|
|
3104
|
+
if (this[de]) {
|
|
3105
|
+
const t = this[de].end();
|
|
2857
3106
|
if (t) {
|
|
2858
|
-
for (const e of this[
|
|
3107
|
+
for (const e of this[ye]) {
|
|
2859
3108
|
e.dest.write(t);
|
|
2860
3109
|
}
|
|
2861
|
-
if (!this[
|
|
3110
|
+
if (!this[Oe]) super.emit("data", t);
|
|
2862
3111
|
}
|
|
2863
3112
|
}
|
|
2864
|
-
for (const t of this[
|
|
3113
|
+
for (const t of this[ye]) {
|
|
2865
3114
|
t.end();
|
|
2866
3115
|
}
|
|
2867
3116
|
const t = super.emit("end");
|
|
@@ -2872,31 +3121,31 @@ class Minipass extends o.EventEmitter {
|
|
|
2872
3121
|
const t = Object.assign([], {
|
|
2873
3122
|
dataLength: 0
|
|
2874
3123
|
});
|
|
2875
|
-
if (!this[
|
|
3124
|
+
if (!this[ve]) t.dataLength = 0;
|
|
2876
3125
|
const e = this.promise();
|
|
2877
3126
|
this.on("data", (e => {
|
|
2878
3127
|
t.push(e);
|
|
2879
|
-
if (!this[
|
|
3128
|
+
if (!this[ve]) t.dataLength += e.length;
|
|
2880
3129
|
}));
|
|
2881
3130
|
await e;
|
|
2882
3131
|
return t;
|
|
2883
3132
|
}
|
|
2884
3133
|
async concat() {
|
|
2885
|
-
if (this[
|
|
3134
|
+
if (this[ve]) {
|
|
2886
3135
|
throw new Error("cannot concat in objectMode");
|
|
2887
3136
|
}
|
|
2888
3137
|
const t = await this.collect();
|
|
2889
|
-
return this[
|
|
3138
|
+
return this[ue] ? t.join("") : Buffer.concat(t, t.dataLength);
|
|
2890
3139
|
}
|
|
2891
3140
|
async promise() {
|
|
2892
3141
|
return new Promise(((t, e) => {
|
|
2893
|
-
this.on(
|
|
3142
|
+
this.on(xe, (() => e(new Error("stream destroyed"))));
|
|
2894
3143
|
this.on("error", (t => e(t)));
|
|
2895
3144
|
this.on("end", (() => t()));
|
|
2896
3145
|
}));
|
|
2897
3146
|
}
|
|
2898
3147
|
[Symbol.asyncIterator]() {
|
|
2899
|
-
this[
|
|
3148
|
+
this[Oe] = false;
|
|
2900
3149
|
let t = false;
|
|
2901
3150
|
const e = async () => {
|
|
2902
3151
|
this.pause();
|
|
@@ -2913,30 +3162,30 @@ class Minipass extends o.EventEmitter {
|
|
|
2913
3162
|
done: false,
|
|
2914
3163
|
value: s
|
|
2915
3164
|
});
|
|
2916
|
-
if (this[
|
|
3165
|
+
if (this[ie]) return e();
|
|
2917
3166
|
let i;
|
|
2918
3167
|
let n;
|
|
2919
3168
|
const r = t => {
|
|
2920
3169
|
this.off("data", o);
|
|
2921
3170
|
this.off("end", h);
|
|
2922
|
-
this.off(
|
|
3171
|
+
this.off(xe, a);
|
|
2923
3172
|
e();
|
|
2924
3173
|
n(t);
|
|
2925
3174
|
};
|
|
2926
3175
|
const o = t => {
|
|
2927
3176
|
this.off("error", r);
|
|
2928
3177
|
this.off("end", h);
|
|
2929
|
-
this.off(
|
|
3178
|
+
this.off(xe, a);
|
|
2930
3179
|
this.pause();
|
|
2931
3180
|
i({
|
|
2932
3181
|
value: t,
|
|
2933
|
-
done: !!this[
|
|
3182
|
+
done: !!this[ie]
|
|
2934
3183
|
});
|
|
2935
3184
|
};
|
|
2936
3185
|
const h = () => {
|
|
2937
3186
|
this.off("error", r);
|
|
2938
3187
|
this.off("data", o);
|
|
2939
|
-
this.off(
|
|
3188
|
+
this.off(xe, a);
|
|
2940
3189
|
e();
|
|
2941
3190
|
i({
|
|
2942
3191
|
done: true,
|
|
@@ -2947,7 +3196,7 @@ class Minipass extends o.EventEmitter {
|
|
|
2947
3196
|
return new Promise(((t, e) => {
|
|
2948
3197
|
n = e;
|
|
2949
3198
|
i = t;
|
|
2950
|
-
this.once(
|
|
3199
|
+
this.once(xe, a);
|
|
2951
3200
|
this.once("error", r);
|
|
2952
3201
|
this.once("end", h);
|
|
2953
3202
|
this.once("data", o);
|
|
@@ -2963,12 +3212,12 @@ class Minipass extends o.EventEmitter {
|
|
|
2963
3212
|
};
|
|
2964
3213
|
}
|
|
2965
3214
|
[Symbol.iterator]() {
|
|
2966
|
-
this[
|
|
3215
|
+
this[Oe] = false;
|
|
2967
3216
|
let t = false;
|
|
2968
3217
|
const e = () => {
|
|
2969
3218
|
this.pause();
|
|
2970
|
-
this.off(
|
|
2971
|
-
this.off(
|
|
3219
|
+
this.off(Ee, e);
|
|
3220
|
+
this.off(xe, e);
|
|
2972
3221
|
this.off("end", e);
|
|
2973
3222
|
t = true;
|
|
2974
3223
|
return {
|
|
@@ -2985,8 +3234,8 @@ class Minipass extends o.EventEmitter {
|
|
|
2985
3234
|
};
|
|
2986
3235
|
};
|
|
2987
3236
|
this.once("end", e);
|
|
2988
|
-
this.once(
|
|
2989
|
-
this.once(
|
|
3237
|
+
this.once(Ee, e);
|
|
3238
|
+
this.once(xe, e);
|
|
2990
3239
|
return {
|
|
2991
3240
|
next: s,
|
|
2992
3241
|
throw: e,
|
|
@@ -2997,110 +3246,110 @@ class Minipass extends o.EventEmitter {
|
|
|
2997
3246
|
};
|
|
2998
3247
|
}
|
|
2999
3248
|
destroy(t) {
|
|
3000
|
-
if (this[
|
|
3001
|
-
if (t) this.emit("error", t); else this.emit(
|
|
3249
|
+
if (this[xe]) {
|
|
3250
|
+
if (t) this.emit("error", t); else this.emit(xe);
|
|
3002
3251
|
return this;
|
|
3003
3252
|
}
|
|
3004
|
-
this[
|
|
3005
|
-
this[
|
|
3006
|
-
this[
|
|
3007
|
-
this[
|
|
3253
|
+
this[xe] = true;
|
|
3254
|
+
this[Oe] = true;
|
|
3255
|
+
this[we].length = 0;
|
|
3256
|
+
this[be] = 0;
|
|
3008
3257
|
const e = this;
|
|
3009
|
-
if (typeof e.close === "function" && !this[
|
|
3010
|
-
if (t) this.emit("error", t); else this.emit(
|
|
3258
|
+
if (typeof e.close === "function" && !this[ae]) e.close();
|
|
3259
|
+
if (t) this.emit("error", t); else this.emit(xe);
|
|
3011
3260
|
return this;
|
|
3012
3261
|
}
|
|
3013
3262
|
static get isStream() {
|
|
3014
|
-
return
|
|
3263
|
+
return te;
|
|
3015
3264
|
}
|
|
3016
3265
|
}
|
|
3017
3266
|
|
|
3018
|
-
const
|
|
3267
|
+
const je = s.realpathSync.native;
|
|
3019
3268
|
|
|
3020
|
-
const
|
|
3021
|
-
lstatSync:
|
|
3022
|
-
readdir:
|
|
3023
|
-
readdirSync:
|
|
3024
|
-
readlinkSync:
|
|
3025
|
-
realpathSync:
|
|
3269
|
+
const $e = {
|
|
3270
|
+
lstatSync: s.lstatSync,
|
|
3271
|
+
readdir: s.readdir,
|
|
3272
|
+
readdirSync: s.readdirSync,
|
|
3273
|
+
readlinkSync: s.readlinkSync,
|
|
3274
|
+
realpathSync: je,
|
|
3026
3275
|
promises: {
|
|
3027
|
-
lstat:
|
|
3028
|
-
readdir:
|
|
3029
|
-
readlink:
|
|
3030
|
-
realpath:
|
|
3276
|
+
lstat: n.lstat,
|
|
3277
|
+
readdir: n.readdir,
|
|
3278
|
+
readlink: n.readlink,
|
|
3279
|
+
realpath: n.realpath
|
|
3031
3280
|
}
|
|
3032
3281
|
};
|
|
3033
3282
|
|
|
3034
|
-
const
|
|
3035
|
-
|
|
3283
|
+
const Ue = t => !t || t === $e || t === c ? $e : {
|
|
3284
|
+
...$e,
|
|
3036
3285
|
...t,
|
|
3037
3286
|
promises: {
|
|
3038
|
-
|
|
3287
|
+
...$e.promises,
|
|
3039
3288
|
...t.promises || {}
|
|
3040
3289
|
}
|
|
3041
3290
|
};
|
|
3042
3291
|
|
|
3043
|
-
const
|
|
3292
|
+
const Ge = /^\\\\\?\\([a-z]:)\\?$/i;
|
|
3044
3293
|
|
|
3045
|
-
const
|
|
3294
|
+
const qe = t => t.replace(/\//g, "\\").replace(Ge, "$1\\");
|
|
3046
3295
|
|
|
3047
|
-
const
|
|
3296
|
+
const He = /[\\\/]/;
|
|
3048
3297
|
|
|
3049
|
-
const
|
|
3298
|
+
const Ze = 0;
|
|
3050
3299
|
|
|
3051
|
-
const
|
|
3300
|
+
const Ve = 1;
|
|
3052
3301
|
|
|
3053
|
-
const
|
|
3302
|
+
const Je = 2;
|
|
3054
3303
|
|
|
3055
|
-
const
|
|
3304
|
+
const Ke = 4;
|
|
3056
3305
|
|
|
3057
|
-
const
|
|
3306
|
+
const Ye = 6;
|
|
3058
3307
|
|
|
3059
|
-
const
|
|
3308
|
+
const Xe = 8;
|
|
3060
3309
|
|
|
3061
|
-
const
|
|
3310
|
+
const Qe = 10;
|
|
3062
3311
|
|
|
3063
|
-
const
|
|
3312
|
+
const ts = 12;
|
|
3064
3313
|
|
|
3065
|
-
const
|
|
3314
|
+
const es = 15;
|
|
3066
3315
|
|
|
3067
|
-
const
|
|
3316
|
+
const ss = ~es;
|
|
3068
3317
|
|
|
3069
|
-
const
|
|
3318
|
+
const is = 16;
|
|
3070
3319
|
|
|
3071
|
-
const
|
|
3320
|
+
const ns = 32;
|
|
3072
3321
|
|
|
3073
|
-
const
|
|
3322
|
+
const rs = 64;
|
|
3074
3323
|
|
|
3075
|
-
const
|
|
3324
|
+
const os = 128;
|
|
3076
3325
|
|
|
3077
|
-
const
|
|
3326
|
+
const hs = 256;
|
|
3078
3327
|
|
|
3079
|
-
const
|
|
3328
|
+
const as = 512;
|
|
3080
3329
|
|
|
3081
|
-
const
|
|
3330
|
+
const ls = rs | os | as;
|
|
3082
3331
|
|
|
3083
|
-
const
|
|
3332
|
+
const cs = 1023;
|
|
3084
3333
|
|
|
3085
|
-
const
|
|
3334
|
+
const fs = t => t.isFile() ? Xe : t.isDirectory() ? Ke : t.isSymbolicLink() ? Qe : t.isCharacterDevice() ? Je : t.isBlockDevice() ? Ye : t.isSocket() ? ts : t.isFIFO() ? Ve : Ze;
|
|
3086
3335
|
|
|
3087
|
-
const
|
|
3336
|
+
const us = new Map;
|
|
3088
3337
|
|
|
3089
|
-
const
|
|
3090
|
-
const e =
|
|
3338
|
+
const ds = t => {
|
|
3339
|
+
const e = us.get(t);
|
|
3091
3340
|
if (e) return e;
|
|
3092
3341
|
const s = t.normalize("NFKD");
|
|
3093
|
-
|
|
3342
|
+
us.set(t, s);
|
|
3094
3343
|
return s;
|
|
3095
3344
|
};
|
|
3096
3345
|
|
|
3097
|
-
const
|
|
3346
|
+
const ps = new Map;
|
|
3098
3347
|
|
|
3099
|
-
const
|
|
3100
|
-
const e =
|
|
3348
|
+
const gs = t => {
|
|
3349
|
+
const e = ps.get(t);
|
|
3101
3350
|
if (e) return e;
|
|
3102
|
-
const s =
|
|
3103
|
-
|
|
3351
|
+
const s = ds(t.toLowerCase());
|
|
3352
|
+
ps.set(t, s);
|
|
3104
3353
|
return s;
|
|
3105
3354
|
};
|
|
3106
3355
|
|
|
@@ -3121,7 +3370,7 @@ class ChildrenCache extends LRUCache {
|
|
|
3121
3370
|
}
|
|
3122
3371
|
}
|
|
3123
3372
|
|
|
3124
|
-
const
|
|
3373
|
+
const ms = Symbol("PathScurry setAsCwd");
|
|
3125
3374
|
|
|
3126
3375
|
class PathBase {
|
|
3127
3376
|
name;
|
|
@@ -3204,8 +3453,8 @@ class PathBase {
|
|
|
3204
3453
|
return this.#xt;
|
|
3205
3454
|
}
|
|
3206
3455
|
#Et;
|
|
3207
|
-
#Tt;
|
|
3208
3456
|
#Ct;
|
|
3457
|
+
#Tt;
|
|
3209
3458
|
#Lt;
|
|
3210
3459
|
#At;
|
|
3211
3460
|
#Mt;
|
|
@@ -3219,28 +3468,28 @@ class PathBase {
|
|
|
3219
3468
|
get path() {
|
|
3220
3469
|
return this.parentPath;
|
|
3221
3470
|
}
|
|
3222
|
-
constructor(t, e =
|
|
3471
|
+
constructor(t, e = Ze, s, i, n, r, o) {
|
|
3223
3472
|
this.name = t;
|
|
3224
|
-
this.#Et = n ?
|
|
3225
|
-
this.#Pt = e &
|
|
3473
|
+
this.#Et = n ? gs(t) : ds(t);
|
|
3474
|
+
this.#Pt = e & cs;
|
|
3226
3475
|
this.nocase = n;
|
|
3227
3476
|
this.roots = i;
|
|
3228
3477
|
this.root = s || this;
|
|
3229
3478
|
this.#Ft = r;
|
|
3230
|
-
this.#
|
|
3479
|
+
this.#Tt = o.fullpath;
|
|
3231
3480
|
this.#At = o.relative;
|
|
3232
3481
|
this.#Mt = o.relativePosix;
|
|
3233
3482
|
this.parent = o.parent;
|
|
3234
3483
|
if (this.parent) {
|
|
3235
3484
|
this.#ot = this.parent.#ot;
|
|
3236
3485
|
} else {
|
|
3237
|
-
this.#ot =
|
|
3486
|
+
this.#ot = Ue(o.fs);
|
|
3238
3487
|
}
|
|
3239
3488
|
}
|
|
3240
3489
|
depth() {
|
|
3241
|
-
if (this.#
|
|
3242
|
-
if (!this.parent) return this.#
|
|
3243
|
-
return this.#
|
|
3490
|
+
if (this.#Ct !== undefined) return this.#Ct;
|
|
3491
|
+
if (!this.parent) return this.#Ct = 0;
|
|
3492
|
+
return this.#Ct = this.parent.depth() + 1;
|
|
3244
3493
|
}
|
|
3245
3494
|
childrenCache() {
|
|
3246
3495
|
return this.#Ft;
|
|
@@ -3271,7 +3520,7 @@ class PathBase {
|
|
|
3271
3520
|
provisional: 0
|
|
3272
3521
|
});
|
|
3273
3522
|
this.#Ft.set(this, e);
|
|
3274
|
-
this.#Pt &= ~
|
|
3523
|
+
this.#Pt &= ~is;
|
|
3275
3524
|
return e;
|
|
3276
3525
|
}
|
|
3277
3526
|
child(t, e) {
|
|
@@ -3282,21 +3531,21 @@ class PathBase {
|
|
|
3282
3531
|
return this.parent || this;
|
|
3283
3532
|
}
|
|
3284
3533
|
const s = this.children();
|
|
3285
|
-
const i = this.nocase ?
|
|
3534
|
+
const i = this.nocase ? gs(t) : ds(t);
|
|
3286
3535
|
for (const t of s) {
|
|
3287
3536
|
if (t.#Et === i) {
|
|
3288
3537
|
return t;
|
|
3289
3538
|
}
|
|
3290
3539
|
}
|
|
3291
3540
|
const n = this.parent ? this.sep : "";
|
|
3292
|
-
const r = this.#
|
|
3293
|
-
const o = this.newChild(t,
|
|
3541
|
+
const r = this.#Tt ? this.#Tt + n + t : undefined;
|
|
3542
|
+
const o = this.newChild(t, Ze, {
|
|
3294
3543
|
...e,
|
|
3295
3544
|
parent: this,
|
|
3296
3545
|
fullpath: r
|
|
3297
3546
|
});
|
|
3298
3547
|
if (!this.canReaddir()) {
|
|
3299
|
-
o.#Pt |=
|
|
3548
|
+
o.#Pt |= os;
|
|
3300
3549
|
}
|
|
3301
3550
|
s.push(o);
|
|
3302
3551
|
return o;
|
|
@@ -3327,17 +3576,17 @@ class PathBase {
|
|
|
3327
3576
|
return s + (!s || !e.parent ? "" : "/") + t;
|
|
3328
3577
|
}
|
|
3329
3578
|
fullpath() {
|
|
3330
|
-
if (this.#
|
|
3331
|
-
return this.#
|
|
3579
|
+
if (this.#Tt !== undefined) {
|
|
3580
|
+
return this.#Tt;
|
|
3332
3581
|
}
|
|
3333
3582
|
const t = this.name;
|
|
3334
3583
|
const e = this.parent;
|
|
3335
3584
|
if (!e) {
|
|
3336
|
-
return this.#
|
|
3585
|
+
return this.#Tt = this.name;
|
|
3337
3586
|
}
|
|
3338
3587
|
const s = e.fullpath();
|
|
3339
3588
|
const i = s + (!e.parent ? "" : this.sep) + t;
|
|
3340
|
-
return this.#
|
|
3589
|
+
return this.#Tt = i;
|
|
3341
3590
|
}
|
|
3342
3591
|
fullpathPosix() {
|
|
3343
3592
|
if (this.#Lt !== undefined) return this.#Lt;
|
|
@@ -3356,7 +3605,7 @@ class PathBase {
|
|
|
3356
3605
|
return this.#Lt = s;
|
|
3357
3606
|
}
|
|
3358
3607
|
isUnknown() {
|
|
3359
|
-
return (this.#Pt &
|
|
3608
|
+
return (this.#Pt & es) === Ze;
|
|
3360
3609
|
}
|
|
3361
3610
|
isType(t) {
|
|
3362
3611
|
return this[`is${t}`]();
|
|
@@ -3365,28 +3614,28 @@ class PathBase {
|
|
|
3365
3614
|
return this.isUnknown() ? "Unknown" : this.isDirectory() ? "Directory" : this.isFile() ? "File" : this.isSymbolicLink() ? "SymbolicLink" : this.isFIFO() ? "FIFO" : this.isCharacterDevice() ? "CharacterDevice" : this.isBlockDevice() ? "BlockDevice" : this.isSocket() ? "Socket" : "Unknown";
|
|
3366
3615
|
}
|
|
3367
3616
|
isFile() {
|
|
3368
|
-
return (this.#Pt &
|
|
3617
|
+
return (this.#Pt & es) === Xe;
|
|
3369
3618
|
}
|
|
3370
3619
|
isDirectory() {
|
|
3371
|
-
return (this.#Pt &
|
|
3620
|
+
return (this.#Pt & es) === Ke;
|
|
3372
3621
|
}
|
|
3373
3622
|
isCharacterDevice() {
|
|
3374
|
-
return (this.#Pt &
|
|
3623
|
+
return (this.#Pt & es) === Je;
|
|
3375
3624
|
}
|
|
3376
3625
|
isBlockDevice() {
|
|
3377
|
-
return (this.#Pt &
|
|
3626
|
+
return (this.#Pt & es) === Ye;
|
|
3378
3627
|
}
|
|
3379
3628
|
isFIFO() {
|
|
3380
|
-
return (this.#Pt &
|
|
3629
|
+
return (this.#Pt & es) === Ve;
|
|
3381
3630
|
}
|
|
3382
3631
|
isSocket() {
|
|
3383
|
-
return (this.#Pt &
|
|
3632
|
+
return (this.#Pt & es) === ts;
|
|
3384
3633
|
}
|
|
3385
3634
|
isSymbolicLink() {
|
|
3386
|
-
return (this.#Pt &
|
|
3635
|
+
return (this.#Pt & Qe) === Qe;
|
|
3387
3636
|
}
|
|
3388
3637
|
lstatCached() {
|
|
3389
|
-
return this.#Pt &
|
|
3638
|
+
return this.#Pt & ns ? this : undefined;
|
|
3390
3639
|
}
|
|
3391
3640
|
readlinkCached() {
|
|
3392
3641
|
return this.#Rt;
|
|
@@ -3401,17 +3650,17 @@ class PathBase {
|
|
|
3401
3650
|
canReadlink() {
|
|
3402
3651
|
if (this.#Rt) return true;
|
|
3403
3652
|
if (!this.parent) return false;
|
|
3404
|
-
const t = this.#Pt &
|
|
3405
|
-
return !(t !==
|
|
3653
|
+
const t = this.#Pt & es;
|
|
3654
|
+
return !(t !== Ze && t !== Qe || this.#Pt & hs || this.#Pt & os);
|
|
3406
3655
|
}
|
|
3407
3656
|
calledReaddir() {
|
|
3408
|
-
return !!(this.#Pt &
|
|
3657
|
+
return !!(this.#Pt & is);
|
|
3409
3658
|
}
|
|
3410
3659
|
isENOENT() {
|
|
3411
|
-
return !!(this.#Pt &
|
|
3660
|
+
return !!(this.#Pt & os);
|
|
3412
3661
|
}
|
|
3413
3662
|
isNamed(t) {
|
|
3414
|
-
return !this.nocase ? this.#Et ===
|
|
3663
|
+
return !this.nocase ? this.#Et === ds(t) : this.#Et === gs(t);
|
|
3415
3664
|
}
|
|
3416
3665
|
async readlink() {
|
|
3417
3666
|
const t = this.#Rt;
|
|
@@ -3458,15 +3707,15 @@ class PathBase {
|
|
|
3458
3707
|
}
|
|
3459
3708
|
}
|
|
3460
3709
|
#Nt(t) {
|
|
3461
|
-
this.#Pt |=
|
|
3710
|
+
this.#Pt |= is;
|
|
3462
3711
|
for (let e = t.provisional; e < t.length; e++) {
|
|
3463
3712
|
const s = t[e];
|
|
3464
3713
|
if (s) s.#Bt();
|
|
3465
3714
|
}
|
|
3466
3715
|
}
|
|
3467
3716
|
#Bt() {
|
|
3468
|
-
if (this.#Pt &
|
|
3469
|
-
this.#Pt = (this.#Pt |
|
|
3717
|
+
if (this.#Pt & os) return;
|
|
3718
|
+
this.#Pt = (this.#Pt | os) & ss;
|
|
3470
3719
|
this.#Wt();
|
|
3471
3720
|
}
|
|
3472
3721
|
#Wt() {
|
|
@@ -3476,66 +3725,66 @@ class PathBase {
|
|
|
3476
3725
|
e.#Bt();
|
|
3477
3726
|
}
|
|
3478
3727
|
}
|
|
3479
|
-
#_t() {
|
|
3480
|
-
this.#Pt |= De;
|
|
3481
|
-
this.#It();
|
|
3482
|
-
}
|
|
3483
3728
|
#It() {
|
|
3484
|
-
|
|
3729
|
+
this.#Pt |= as;
|
|
3730
|
+
this.#_t();
|
|
3731
|
+
}
|
|
3732
|
+
#_t() {
|
|
3733
|
+
if (this.#Pt & rs) return;
|
|
3485
3734
|
let t = this.#Pt;
|
|
3486
|
-
if ((t &
|
|
3487
|
-
this.#Pt = t |
|
|
3735
|
+
if ((t & es) === Ke) t &= ss;
|
|
3736
|
+
this.#Pt = t | rs;
|
|
3488
3737
|
this.#Wt();
|
|
3489
3738
|
}
|
|
3490
3739
|
#jt(t = "") {
|
|
3491
3740
|
if (t === "ENOTDIR" || t === "EPERM") {
|
|
3492
|
-
this.#
|
|
3741
|
+
this.#_t();
|
|
3493
3742
|
} else if (t === "ENOENT") {
|
|
3494
3743
|
this.#Bt();
|
|
3495
3744
|
} else {
|
|
3496
3745
|
this.children().provisional = 0;
|
|
3497
3746
|
}
|
|
3498
3747
|
}
|
|
3499
|
-
|
|
3748
|
+
#$t(t = "") {
|
|
3500
3749
|
if (t === "ENOTDIR") {
|
|
3501
3750
|
const t = this.parent;
|
|
3502
|
-
t.#
|
|
3751
|
+
t.#_t();
|
|
3503
3752
|
} else if (t === "ENOENT") {
|
|
3504
3753
|
this.#Bt();
|
|
3505
3754
|
}
|
|
3506
3755
|
}
|
|
3507
3756
|
#Dt(t = "") {
|
|
3508
3757
|
let e = this.#Pt;
|
|
3509
|
-
e |=
|
|
3510
|
-
if (t === "ENOENT") e |=
|
|
3758
|
+
e |= hs;
|
|
3759
|
+
if (t === "ENOENT") e |= os;
|
|
3511
3760
|
if (t === "EINVAL" || t === "UNKNOWN") {
|
|
3512
|
-
e &=
|
|
3761
|
+
e &= ss;
|
|
3513
3762
|
}
|
|
3514
3763
|
this.#Pt = e;
|
|
3515
3764
|
if (t === "ENOTDIR" && this.parent) {
|
|
3516
|
-
this.parent.#
|
|
3765
|
+
this.parent.#_t();
|
|
3517
3766
|
}
|
|
3518
3767
|
}
|
|
3519
|
-
#
|
|
3520
|
-
return this
|
|
3768
|
+
#Ut(t, e) {
|
|
3769
|
+
return this.#Gt(t, e) || this.#qt(t, e);
|
|
3521
3770
|
}
|
|
3522
3771
|
#qt(t, e) {
|
|
3523
|
-
const s =
|
|
3772
|
+
const s = fs(t);
|
|
3524
3773
|
const i = this.newChild(t.name, s, {
|
|
3525
3774
|
parent: this
|
|
3526
3775
|
});
|
|
3527
|
-
const n = i.#Pt &
|
|
3528
|
-
if (n !==
|
|
3529
|
-
i.#Pt |=
|
|
3776
|
+
const n = i.#Pt & es;
|
|
3777
|
+
if (n !== Ke && n !== Qe && n !== Ze) {
|
|
3778
|
+
i.#Pt |= rs;
|
|
3530
3779
|
}
|
|
3531
3780
|
e.unshift(i);
|
|
3532
3781
|
e.provisional++;
|
|
3533
3782
|
return i;
|
|
3534
3783
|
}
|
|
3535
|
-
|
|
3784
|
+
#Gt(t, e) {
|
|
3536
3785
|
for (let s = e.provisional; s < e.length; s++) {
|
|
3537
3786
|
const i = e[s];
|
|
3538
|
-
const n = this.nocase ?
|
|
3787
|
+
const n = this.nocase ? gs(t.name) : ds(t.name);
|
|
3539
3788
|
if (n !== i.#Et) {
|
|
3540
3789
|
continue;
|
|
3541
3790
|
}
|
|
@@ -3544,7 +3793,7 @@ class PathBase {
|
|
|
3544
3793
|
}
|
|
3545
3794
|
#Ht(t, e, s, i) {
|
|
3546
3795
|
const n = e.name;
|
|
3547
|
-
e.#Pt = e.#Pt &
|
|
3796
|
+
e.#Pt = e.#Pt & ss | fs(t);
|
|
3548
3797
|
if (n !== t.name) e.name = t.name;
|
|
3549
3798
|
if (s !== i.provisional) {
|
|
3550
3799
|
if (s === i.length - 1) i.pop(); else i.splice(s, 1);
|
|
@@ -3554,22 +3803,22 @@ class PathBase {
|
|
|
3554
3803
|
return e;
|
|
3555
3804
|
}
|
|
3556
3805
|
async lstat() {
|
|
3557
|
-
if ((this.#Pt &
|
|
3806
|
+
if ((this.#Pt & os) === 0) {
|
|
3558
3807
|
try {
|
|
3559
3808
|
this.#Zt(await this.#ot.promises.lstat(this.fullpath()));
|
|
3560
3809
|
return this;
|
|
3561
3810
|
} catch (t) {
|
|
3562
|
-
this
|
|
3811
|
+
this.#$t(t.code);
|
|
3563
3812
|
}
|
|
3564
3813
|
}
|
|
3565
3814
|
}
|
|
3566
3815
|
lstatSync() {
|
|
3567
|
-
if ((this.#Pt &
|
|
3816
|
+
if ((this.#Pt & os) === 0) {
|
|
3568
3817
|
try {
|
|
3569
3818
|
this.#Zt(this.#ot.lstatSync(this.fullpath()));
|
|
3570
3819
|
return this;
|
|
3571
3820
|
} catch (t) {
|
|
3572
|
-
this
|
|
3821
|
+
this.#$t(t.code);
|
|
3573
3822
|
}
|
|
3574
3823
|
}
|
|
3575
3824
|
}
|
|
@@ -3593,10 +3842,10 @@ class PathBase {
|
|
|
3593
3842
|
this.#ut = m;
|
|
3594
3843
|
this.#x = w;
|
|
3595
3844
|
this.#ct = y;
|
|
3596
|
-
const b =
|
|
3597
|
-
this.#Pt = this.#Pt &
|
|
3598
|
-
if (b !==
|
|
3599
|
-
this.#Pt |=
|
|
3845
|
+
const b = fs(t);
|
|
3846
|
+
this.#Pt = this.#Pt & ss | b | ns;
|
|
3847
|
+
if (b !== Ze && b !== Ke && b !== Qe) {
|
|
3848
|
+
this.#Pt |= rs;
|
|
3600
3849
|
}
|
|
3601
3850
|
}
|
|
3602
3851
|
#Vt=[];
|
|
@@ -3632,7 +3881,7 @@ class PathBase {
|
|
|
3632
3881
|
s.provisional = 0;
|
|
3633
3882
|
} else {
|
|
3634
3883
|
for (const t of e) {
|
|
3635
|
-
this.#
|
|
3884
|
+
this.#Ut(t, s);
|
|
3636
3885
|
}
|
|
3637
3886
|
this.#Nt(s);
|
|
3638
3887
|
}
|
|
@@ -3659,7 +3908,7 @@ class PathBase {
|
|
|
3659
3908
|
for (const s of await this.#ot.promises.readdir(e, {
|
|
3660
3909
|
withFileTypes: true
|
|
3661
3910
|
})) {
|
|
3662
|
-
this.#
|
|
3911
|
+
this.#Ut(s, t);
|
|
3663
3912
|
}
|
|
3664
3913
|
this.#Nt(t);
|
|
3665
3914
|
} catch (e) {
|
|
@@ -3684,7 +3933,7 @@ class PathBase {
|
|
|
3684
3933
|
for (const s of this.#ot.readdirSync(e, {
|
|
3685
3934
|
withFileTypes: true
|
|
3686
3935
|
})) {
|
|
3687
|
-
this.#
|
|
3936
|
+
this.#Ut(s, t);
|
|
3688
3937
|
}
|
|
3689
3938
|
this.#Nt(t);
|
|
3690
3939
|
} catch (e) {
|
|
@@ -3694,37 +3943,37 @@ class PathBase {
|
|
|
3694
3943
|
return t.slice(0, t.provisional);
|
|
3695
3944
|
}
|
|
3696
3945
|
canReaddir() {
|
|
3697
|
-
if (this.#Pt &
|
|
3698
|
-
const t =
|
|
3699
|
-
if (!(t ===
|
|
3946
|
+
if (this.#Pt & ls) return false;
|
|
3947
|
+
const t = es & this.#Pt;
|
|
3948
|
+
if (!(t === Ze || t === Ke || t === Qe)) {
|
|
3700
3949
|
return false;
|
|
3701
3950
|
}
|
|
3702
3951
|
return true;
|
|
3703
3952
|
}
|
|
3704
3953
|
shouldWalk(t, e) {
|
|
3705
|
-
return (this.#Pt &
|
|
3954
|
+
return (this.#Pt & Ke) === Ke && !(this.#Pt & ls) && !t.has(this) && (!e || e(this));
|
|
3706
3955
|
}
|
|
3707
3956
|
async realpath() {
|
|
3708
3957
|
if (this.#Ot) return this.#Ot;
|
|
3709
|
-
if ((
|
|
3958
|
+
if ((as | hs | os) & this.#Pt) return undefined;
|
|
3710
3959
|
try {
|
|
3711
3960
|
const t = await this.#ot.promises.realpath(this.fullpath());
|
|
3712
3961
|
return this.#Ot = this.resolve(t);
|
|
3713
3962
|
} catch (t) {
|
|
3714
|
-
this.#
|
|
3963
|
+
this.#It();
|
|
3715
3964
|
}
|
|
3716
3965
|
}
|
|
3717
3966
|
realpathSync() {
|
|
3718
3967
|
if (this.#Ot) return this.#Ot;
|
|
3719
|
-
if ((
|
|
3968
|
+
if ((as | hs | os) & this.#Pt) return undefined;
|
|
3720
3969
|
try {
|
|
3721
3970
|
const t = this.#ot.realpathSync(this.fullpath());
|
|
3722
3971
|
return this.#Ot = this.resolve(t);
|
|
3723
3972
|
} catch (t) {
|
|
3724
|
-
this.#
|
|
3973
|
+
this.#It();
|
|
3725
3974
|
}
|
|
3726
3975
|
}
|
|
3727
|
-
[
|
|
3976
|
+
[ms](t) {
|
|
3728
3977
|
if (t === this) return;
|
|
3729
3978
|
t.isCWD = false;
|
|
3730
3979
|
this.isCWD = true;
|
|
@@ -3749,18 +3998,18 @@ class PathBase {
|
|
|
3749
3998
|
|
|
3750
3999
|
class PathWin32 extends PathBase {
|
|
3751
4000
|
sep="\\";
|
|
3752
|
-
splitSep=
|
|
3753
|
-
constructor(t, e =
|
|
4001
|
+
splitSep=He;
|
|
4002
|
+
constructor(t, e = Ze, s, i, n, r, o) {
|
|
3754
4003
|
super(t, e, s, i, n, r, o);
|
|
3755
4004
|
}
|
|
3756
|
-
newChild(t, e =
|
|
4005
|
+
newChild(t, e = Ze, s = {}) {
|
|
3757
4006
|
return new PathWin32(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
|
|
3758
4007
|
}
|
|
3759
4008
|
getRootString(t) {
|
|
3760
|
-
return
|
|
4009
|
+
return e.win32.parse(t).root;
|
|
3761
4010
|
}
|
|
3762
4011
|
getRoot(t) {
|
|
3763
|
-
t =
|
|
4012
|
+
t = qe(t.toUpperCase());
|
|
3764
4013
|
if (t === this.root.name) {
|
|
3765
4014
|
return this.root;
|
|
3766
4015
|
}
|
|
@@ -3772,7 +4021,7 @@ class PathWin32 extends PathBase {
|
|
|
3772
4021
|
return this.roots[t] = new PathScurryWin32(t, this).root;
|
|
3773
4022
|
}
|
|
3774
4023
|
sameRoot(t, e = this.root.name) {
|
|
3775
|
-
t = t.toUpperCase().replace(/\//g, "\\").replace(
|
|
4024
|
+
t = t.toUpperCase().replace(/\//g, "\\").replace(Ge, "$1\\");
|
|
3776
4025
|
return t === e;
|
|
3777
4026
|
}
|
|
3778
4027
|
}
|
|
@@ -3780,7 +4029,7 @@ class PathWin32 extends PathBase {
|
|
|
3780
4029
|
class PathPosix extends PathBase {
|
|
3781
4030
|
splitSep="/";
|
|
3782
4031
|
sep="/";
|
|
3783
|
-
constructor(t, e =
|
|
4032
|
+
constructor(t, e = Ze, s, i, n, r, o) {
|
|
3784
4033
|
super(t, e, s, i, n, r, o);
|
|
3785
4034
|
}
|
|
3786
4035
|
getRootString(t) {
|
|
@@ -3789,7 +4038,7 @@ class PathPosix extends PathBase {
|
|
|
3789
4038
|
getRoot(t) {
|
|
3790
4039
|
return this.root;
|
|
3791
4040
|
}
|
|
3792
|
-
newChild(t, e =
|
|
4041
|
+
newChild(t, e = Ze, s = {}) {
|
|
3793
4042
|
return new PathPosix(t, e, this.root, this.roots, this.nocase, this.childrenCache(), s);
|
|
3794
4043
|
}
|
|
3795
4044
|
}
|
|
@@ -3804,12 +4053,12 @@ class PathScurryBase {
|
|
|
3804
4053
|
#Ft;
|
|
3805
4054
|
nocase;
|
|
3806
4055
|
#ot;
|
|
3807
|
-
constructor(
|
|
3808
|
-
this.#ot =
|
|
3809
|
-
if (
|
|
3810
|
-
|
|
4056
|
+
constructor(e = process.cwd(), s, i, {nocase: n, childrenCacheSize: r = 16 * 1024, fs: o = $e} = {}) {
|
|
4057
|
+
this.#ot = Ue(o);
|
|
4058
|
+
if (e instanceof URL || e.startsWith("file://")) {
|
|
4059
|
+
e = t.fileURLToPath(e);
|
|
3811
4060
|
}
|
|
3812
|
-
const h = s.resolve(
|
|
4061
|
+
const h = s.resolve(e);
|
|
3813
4062
|
this.roots = Object.create(null);
|
|
3814
4063
|
this.rootPath = this.parseRootPath(h);
|
|
3815
4064
|
this.#Xt = new ResolveCache;
|
|
@@ -4254,16 +4503,16 @@ class PathScurryBase {
|
|
|
4254
4503
|
chdir(t = this.cwd) {
|
|
4255
4504
|
const e = this.cwd;
|
|
4256
4505
|
this.cwd = typeof t === "string" ? this.cwd.resolve(t) : t;
|
|
4257
|
-
this.cwd[
|
|
4506
|
+
this.cwd[ms](e);
|
|
4258
4507
|
}
|
|
4259
4508
|
}
|
|
4260
4509
|
|
|
4261
4510
|
class PathScurryWin32 extends PathScurryBase {
|
|
4262
4511
|
sep="\\";
|
|
4263
|
-
constructor(t = process.cwd(),
|
|
4264
|
-
const {nocase: i = true} =
|
|
4265
|
-
super(t,
|
|
4266
|
-
...
|
|
4512
|
+
constructor(t = process.cwd(), s = {}) {
|
|
4513
|
+
const {nocase: i = true} = s;
|
|
4514
|
+
super(t, e.win32, "\\", {
|
|
4515
|
+
...s,
|
|
4267
4516
|
nocase: i
|
|
4268
4517
|
});
|
|
4269
4518
|
this.nocase = i;
|
|
@@ -4272,10 +4521,10 @@ class PathScurryWin32 extends PathScurryBase {
|
|
|
4272
4521
|
}
|
|
4273
4522
|
}
|
|
4274
4523
|
parseRootPath(t) {
|
|
4275
|
-
return
|
|
4524
|
+
return e.win32.parse(t).root.toUpperCase();
|
|
4276
4525
|
}
|
|
4277
4526
|
newRoot(t) {
|
|
4278
|
-
return new PathWin32(this.rootPath,
|
|
4527
|
+
return new PathWin32(this.rootPath, Ke, undefined, this.roots, this.nocase, this.childrenCache(), {
|
|
4279
4528
|
fs: t
|
|
4280
4529
|
});
|
|
4281
4530
|
}
|
|
@@ -4286,10 +4535,10 @@ class PathScurryWin32 extends PathScurryBase {
|
|
|
4286
4535
|
|
|
4287
4536
|
class PathScurryPosix extends PathScurryBase {
|
|
4288
4537
|
sep="/";
|
|
4289
|
-
constructor(t = process.cwd(),
|
|
4290
|
-
const {nocase: i = false} =
|
|
4291
|
-
super(t,
|
|
4292
|
-
...
|
|
4538
|
+
constructor(t = process.cwd(), s = {}) {
|
|
4539
|
+
const {nocase: i = false} = s;
|
|
4540
|
+
super(t, e.posix, "/", {
|
|
4541
|
+
...s,
|
|
4293
4542
|
nocase: i
|
|
4294
4543
|
});
|
|
4295
4544
|
this.nocase = i;
|
|
@@ -4298,7 +4547,7 @@ class PathScurryPosix extends PathScurryBase {
|
|
|
4298
4547
|
return "/";
|
|
4299
4548
|
}
|
|
4300
4549
|
newRoot(t) {
|
|
4301
|
-
return new PathPosix(this.rootPath,
|
|
4550
|
+
return new PathPosix(this.rootPath, Ke, undefined, this.roots, this.nocase, this.childrenCache(), {
|
|
4302
4551
|
fs: t
|
|
4303
4552
|
});
|
|
4304
4553
|
}
|
|
@@ -4317,13 +4566,13 @@ class PathScurryDarwin extends PathScurryPosix {
|
|
|
4317
4566
|
}
|
|
4318
4567
|
}
|
|
4319
4568
|
|
|
4320
|
-
const
|
|
4569
|
+
const ws = process.platform === "win32" ? PathWin32 : PathPosix;
|
|
4321
4570
|
|
|
4322
|
-
const
|
|
4571
|
+
const ys = process.platform === "win32" ? PathScurryWin32 : process.platform === "darwin" ? PathScurryDarwin : PathScurryPosix;
|
|
4323
4572
|
|
|
4324
|
-
const
|
|
4573
|
+
const bs = t => t.length >= 1;
|
|
4325
4574
|
|
|
4326
|
-
const
|
|
4575
|
+
const Ss = t => t.length >= 1;
|
|
4327
4576
|
|
|
4328
4577
|
class Pattern {
|
|
4329
4578
|
#te;
|
|
@@ -4338,10 +4587,10 @@ class Pattern {
|
|
|
4338
4587
|
#ae;
|
|
4339
4588
|
#le=true;
|
|
4340
4589
|
constructor(t, e, s, i) {
|
|
4341
|
-
if (!
|
|
4590
|
+
if (!bs(t)) {
|
|
4342
4591
|
throw new TypeError("empty pattern list");
|
|
4343
4592
|
}
|
|
4344
|
-
if (!
|
|
4593
|
+
if (!Ss(e)) {
|
|
4345
4594
|
throw new TypeError("empty glob list");
|
|
4346
4595
|
}
|
|
4347
4596
|
if (e.length !== t.length) {
|
|
@@ -4390,7 +4639,7 @@ class Pattern {
|
|
|
4390
4639
|
return typeof this.#te[this.#se] === "string";
|
|
4391
4640
|
}
|
|
4392
4641
|
isGlobstar() {
|
|
4393
|
-
return this.#te[this.#se] ===
|
|
4642
|
+
return this.#te[this.#se] === Pt;
|
|
4394
4643
|
}
|
|
4395
4644
|
isRegExp() {
|
|
4396
4645
|
return this.#te[this.#se] instanceof RegExp;
|
|
@@ -4436,7 +4685,7 @@ class Pattern {
|
|
|
4436
4685
|
}
|
|
4437
4686
|
}
|
|
4438
4687
|
|
|
4439
|
-
const
|
|
4688
|
+
const ks = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
4440
4689
|
|
|
4441
4690
|
class Ignore {
|
|
4442
4691
|
relative;
|
|
@@ -4445,7 +4694,7 @@ class Ignore {
|
|
|
4445
4694
|
absoluteChildren;
|
|
4446
4695
|
platform;
|
|
4447
4696
|
mmopts;
|
|
4448
|
-
constructor(t, {nobrace: e, nocase: s, noext: i, noglobstar: n, platform: r =
|
|
4697
|
+
constructor(t, {nobrace: e, nocase: s, noext: i, noglobstar: n, platform: r = ks}) {
|
|
4449
4698
|
this.relative = [];
|
|
4450
4699
|
this.absolute = [];
|
|
4451
4700
|
this.relativeChildren = [];
|
|
@@ -4621,7 +4870,7 @@ class Processor {
|
|
|
4621
4870
|
const e = n === ".." || n === "" || n === ".";
|
|
4622
4871
|
this.matches.add(t.resolve(n), i, e);
|
|
4623
4872
|
continue;
|
|
4624
|
-
} else if (n ===
|
|
4873
|
+
} else if (n === Pt) {
|
|
4625
4874
|
if (!t.isSymbolicLink() || this.follow || e.checkFollowGlobstar()) {
|
|
4626
4875
|
this.subwalks.add(t, e);
|
|
4627
4876
|
}
|
|
@@ -4657,7 +4906,7 @@ class Processor {
|
|
|
4657
4906
|
const s = e.isAbsolute();
|
|
4658
4907
|
const n = e.pattern();
|
|
4659
4908
|
const r = e.rest();
|
|
4660
|
-
if (n ===
|
|
4909
|
+
if (n === Pt) {
|
|
4661
4910
|
i.testGlobstar(t, e, r, s);
|
|
4662
4911
|
} else if (n instanceof RegExp) {
|
|
4663
4912
|
i.testRegExp(t, n, r, s);
|
|
@@ -4715,7 +4964,7 @@ class Processor {
|
|
|
4715
4964
|
}
|
|
4716
4965
|
}
|
|
4717
4966
|
|
|
4718
|
-
const
|
|
4967
|
+
const vs = (t, e) => typeof t === "string" ? new Ignore([ t ], e) : Array.isArray(t) ? new Ignore(t, e) : t;
|
|
4719
4968
|
|
|
4720
4969
|
class GlobUtil {
|
|
4721
4970
|
path;
|
|
@@ -4737,7 +4986,7 @@ class GlobUtil {
|
|
|
4737
4986
|
this.#ue = !s.posix && s.platform === "win32" ? "\\" : "/";
|
|
4738
4987
|
this.includeChildMatches = s.includeChildMatches !== false;
|
|
4739
4988
|
if (s.ignore || !this.includeChildMatches) {
|
|
4740
|
-
this.#fe =
|
|
4989
|
+
this.#fe = vs(s.ignore ?? [], s);
|
|
4741
4990
|
if (!this.includeChildMatches && typeof this.#fe.add !== "function") {
|
|
4742
4991
|
const t = "cannot ignore child matches, ignore lacks add() method.";
|
|
4743
4992
|
throw new Error(t);
|
|
@@ -5012,9 +5261,9 @@ class GlobStream extends GlobUtil {
|
|
|
5012
5261
|
}
|
|
5013
5262
|
}
|
|
5014
5263
|
|
|
5015
|
-
const
|
|
5264
|
+
const xs = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
5016
5265
|
|
|
5017
|
-
let
|
|
5266
|
+
let Es = class Glob {
|
|
5018
5267
|
absolute;
|
|
5019
5268
|
cwd;
|
|
5020
5269
|
root;
|
|
@@ -5042,7 +5291,7 @@ let Ye = class Glob {
|
|
|
5042
5291
|
includeChildMatches;
|
|
5043
5292
|
opts;
|
|
5044
5293
|
patterns;
|
|
5045
|
-
constructor(
|
|
5294
|
+
constructor(e, s) {
|
|
5046
5295
|
if (!s) throw new TypeError("glob options required");
|
|
5047
5296
|
this.withFileTypes = !!s.withFileTypes;
|
|
5048
5297
|
this.signal = s.signal;
|
|
@@ -5054,7 +5303,7 @@ let Ye = class Glob {
|
|
|
5054
5303
|
if (!s.cwd) {
|
|
5055
5304
|
this.cwd = "";
|
|
5056
5305
|
} else if (s.cwd instanceof URL || s.cwd.startsWith("file://")) {
|
|
5057
|
-
s.cwd =
|
|
5306
|
+
s.cwd = t.fileURLToPath(s.cwd);
|
|
5058
5307
|
}
|
|
5059
5308
|
this.cwd = s.cwd || "";
|
|
5060
5309
|
this.root = s.root;
|
|
@@ -5072,21 +5321,21 @@ let Ye = class Glob {
|
|
|
5072
5321
|
if (this.withFileTypes && this.absolute !== undefined) {
|
|
5073
5322
|
throw new Error("cannot set absolute and withFileTypes:true");
|
|
5074
5323
|
}
|
|
5075
|
-
if (typeof
|
|
5076
|
-
|
|
5324
|
+
if (typeof e === "string") {
|
|
5325
|
+
e = [ e ];
|
|
5077
5326
|
}
|
|
5078
5327
|
this.windowsPathsNoEscape = !!s.windowsPathsNoEscape || s.allowWindowsEscape === false;
|
|
5079
5328
|
if (this.windowsPathsNoEscape) {
|
|
5080
|
-
|
|
5329
|
+
e = e.map((t => t.replace(/\\/g, "/")));
|
|
5081
5330
|
}
|
|
5082
5331
|
if (this.matchBase) {
|
|
5083
5332
|
if (s.noglobstar) {
|
|
5084
5333
|
throw new TypeError("base matching requires globstar");
|
|
5085
5334
|
}
|
|
5086
|
-
|
|
5335
|
+
e = e.map((t => t.includes("/") ? t : `./**/${t}`));
|
|
5087
5336
|
}
|
|
5088
|
-
this.pattern =
|
|
5089
|
-
this.platform = s.platform ||
|
|
5337
|
+
this.pattern = e;
|
|
5338
|
+
this.platform = s.platform || xs;
|
|
5090
5339
|
this.opts = {
|
|
5091
5340
|
...s,
|
|
5092
5341
|
platform: this.platform
|
|
@@ -5097,7 +5346,7 @@ let Ye = class Glob {
|
|
|
5097
5346
|
throw new Error("nocase option contradicts provided scurry option");
|
|
5098
5347
|
}
|
|
5099
5348
|
} else {
|
|
5100
|
-
const t = s.platform === "win32" ? PathScurryWin32 : s.platform === "darwin" ? PathScurryDarwin : s.platform ? PathScurryPosix :
|
|
5349
|
+
const t = s.platform === "win32" ? PathScurryWin32 : s.platform === "darwin" ? PathScurryDarwin : s.platform ? PathScurryPosix : ys;
|
|
5101
5350
|
this.scurry = new t(this.cwd, {
|
|
5102
5351
|
nocase: s.nocase,
|
|
5103
5352
|
fs: s.fs
|
|
@@ -5182,7 +5431,7 @@ let Ye = class Glob {
|
|
|
5182
5431
|
}
|
|
5183
5432
|
};
|
|
5184
5433
|
|
|
5185
|
-
const
|
|
5434
|
+
const Cs = (t, e = {}) => {
|
|
5186
5435
|
if (!Array.isArray(t)) {
|
|
5187
5436
|
t = [ t ];
|
|
5188
5437
|
}
|
|
@@ -5192,69 +5441,69 @@ const Xe = (t, e = {}) => {
|
|
|
5192
5441
|
return false;
|
|
5193
5442
|
};
|
|
5194
5443
|
|
|
5195
|
-
function
|
|
5196
|
-
return new
|
|
5444
|
+
function Ts(t, e = {}) {
|
|
5445
|
+
return new Es(t, e).streamSync();
|
|
5197
5446
|
}
|
|
5198
5447
|
|
|
5199
|
-
function
|
|
5200
|
-
return new
|
|
5448
|
+
function Ls(t, e = {}) {
|
|
5449
|
+
return new Es(t, e).stream();
|
|
5201
5450
|
}
|
|
5202
5451
|
|
|
5203
|
-
function
|
|
5204
|
-
return new
|
|
5452
|
+
function As(t, e = {}) {
|
|
5453
|
+
return new Es(t, e).walkSync();
|
|
5205
5454
|
}
|
|
5206
5455
|
|
|
5207
|
-
async function
|
|
5208
|
-
return new
|
|
5456
|
+
async function Ms(t, e = {}) {
|
|
5457
|
+
return new Es(t, e).walk();
|
|
5209
5458
|
}
|
|
5210
5459
|
|
|
5211
|
-
function
|
|
5212
|
-
return new
|
|
5460
|
+
function Ps(t, e = {}) {
|
|
5461
|
+
return new Es(t, e).iterateSync();
|
|
5213
5462
|
}
|
|
5214
5463
|
|
|
5215
|
-
function
|
|
5216
|
-
return new
|
|
5464
|
+
function Fs(t, e = {}) {
|
|
5465
|
+
return new Es(t, e).iterate();
|
|
5217
5466
|
}
|
|
5218
5467
|
|
|
5219
|
-
const
|
|
5468
|
+
const Rs = Ts;
|
|
5220
5469
|
|
|
5221
|
-
const
|
|
5222
|
-
sync:
|
|
5470
|
+
const Os = Object.assign(Ls, {
|
|
5471
|
+
sync: Ts
|
|
5223
5472
|
});
|
|
5224
5473
|
|
|
5225
|
-
const
|
|
5474
|
+
const zs = Ps;
|
|
5226
5475
|
|
|
5227
|
-
const
|
|
5228
|
-
sync:
|
|
5476
|
+
const Ds = Object.assign(Fs, {
|
|
5477
|
+
sync: Ps
|
|
5229
5478
|
});
|
|
5230
5479
|
|
|
5231
|
-
const
|
|
5232
|
-
stream:
|
|
5233
|
-
iterate:
|
|
5480
|
+
const Ns = Object.assign(As, {
|
|
5481
|
+
stream: Ts,
|
|
5482
|
+
iterate: Ps
|
|
5234
5483
|
});
|
|
5235
5484
|
|
|
5236
|
-
const
|
|
5237
|
-
glob:
|
|
5238
|
-
globSync:
|
|
5239
|
-
sync:
|
|
5240
|
-
globStream:
|
|
5241
|
-
stream:
|
|
5242
|
-
globStreamSync:
|
|
5243
|
-
streamSync:
|
|
5244
|
-
globIterate:
|
|
5245
|
-
iterate:
|
|
5246
|
-
globIterateSync:
|
|
5247
|
-
iterateSync:
|
|
5248
|
-
Glob:
|
|
5249
|
-
hasMagic:
|
|
5250
|
-
escape:
|
|
5251
|
-
unescape:
|
|
5485
|
+
const Bs = Object.assign(Ms, {
|
|
5486
|
+
glob: Ms,
|
|
5487
|
+
globSync: As,
|
|
5488
|
+
sync: Ns,
|
|
5489
|
+
globStream: Ls,
|
|
5490
|
+
stream: Os,
|
|
5491
|
+
globStreamSync: Ts,
|
|
5492
|
+
streamSync: Rs,
|
|
5493
|
+
globIterate: Fs,
|
|
5494
|
+
iterate: Ds,
|
|
5495
|
+
globIterateSync: Ps,
|
|
5496
|
+
iterateSync: zs,
|
|
5497
|
+
Glob: Es,
|
|
5498
|
+
hasMagic: Cs,
|
|
5499
|
+
escape: rt,
|
|
5500
|
+
unescape: Z
|
|
5252
5501
|
});
|
|
5253
5502
|
|
|
5254
|
-
|
|
5503
|
+
Bs.glob = Bs;
|
|
5255
5504
|
|
|
5256
|
-
async function
|
|
5257
|
-
return e ? await
|
|
5505
|
+
async function Ws(t, e) {
|
|
5506
|
+
return e ? await Bs(t, e) : await Bs(t);
|
|
5258
5507
|
}
|
|
5259
5508
|
|
|
5260
|
-
exports.Glob =
|
|
5509
|
+
exports.Glob = Ws;
|