create-jen-app 1.2.2 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/colors.js +0 -17
- package/dist/create.js +5 -17
- package/dist/generator.js +14 -31
- package/package.json +2 -2
- package/templates/ssr-isr/README.md +77 -0
- package/templates/ssr-isr/build.js +118 -0
- package/templates/ssr-isr/jen.config.ts +109 -0
- package/templates/ssr-isr/jenjs.d.ts +22 -0
- package/templates/ssr-isr/lib/api/(hello).d.ts +7 -0
- package/templates/ssr-isr/lib/api/(hello).js +9 -0
- package/templates/ssr-isr/lib/auth/cookie-utils.d.ts +33 -0
- package/templates/ssr-isr/lib/auth/cookie-utils.js +79 -0
- package/templates/ssr-isr/lib/auth/index.js +2 -0
- package/templates/ssr-isr/lib/auth/jwt.d.ts +30 -0
- package/templates/ssr-isr/lib/auth/jwt.js +57 -0
- package/templates/ssr-isr/lib/auth/session.d.ts +44 -0
- package/templates/ssr-isr/lib/auth/session.js +92 -0
- package/templates/ssr-isr/lib/build/asset-hashing.d.ts +10 -0
- package/templates/ssr-isr/lib/build/asset-hashing.js +25 -0
- package/templates/ssr-isr/lib/build/asset-manifest.d.ts +11 -0
- package/templates/ssr-isr/lib/build/asset-manifest.js +21 -0
- package/templates/ssr-isr/lib/build/build.d.ts +24 -0
- package/templates/ssr-isr/lib/build/build.js +141 -0
- package/templates/{static → ssr-isr}/lib/build/island-hydration.d.ts +8 -5
- package/templates/ssr-isr/lib/build/island-hydration.js +44 -0
- package/templates/ssr-isr/lib/build/minifier.d.ts +20 -0
- package/templates/ssr-isr/lib/build/minifier.js +46 -0
- package/templates/ssr-isr/lib/build/page-renderer.d.ts +17 -0
- package/templates/ssr-isr/lib/build/page-renderer.js +28 -0
- package/templates/ssr-isr/lib/build/production-build.d.ts +10 -0
- package/templates/ssr-isr/lib/build/production-build.js +13 -0
- package/templates/ssr-isr/lib/build/ssg-pipeline.d.ts +15 -0
- package/templates/ssr-isr/lib/build/ssg-pipeline.js +113 -0
- package/templates/{static → ssr-isr}/lib/build-tools/build-site.d.ts +3 -3
- package/templates/ssr-isr/lib/build-tools/build-site.js +36 -0
- package/templates/ssr-isr/lib/cache/index.d.ts +10 -0
- package/templates/ssr-isr/lib/cache/index.js +10 -0
- package/templates/ssr-isr/lib/cache/memory.d.ts +33 -0
- package/templates/ssr-isr/lib/cache/memory.js +40 -0
- package/templates/ssr-isr/lib/cache/redis.d.ts +45 -0
- package/templates/ssr-isr/lib/cache/redis.js +61 -0
- package/templates/ssr-isr/lib/cli/banner.d.ts +5 -0
- package/templates/ssr-isr/lib/cli/banner.js +28 -0
- package/templates/ssr-isr/lib/cli/templates/ssg/jen.config.js +32 -0
- package/templates/ssr-isr/lib/cli/templates/ssg/site/index.js +9 -0
- package/templates/ssr-isr/lib/cli/templates/ssr/jen.config.js +32 -0
- package/templates/ssr-isr/lib/cli/templates/ssr/site/index.js +9 -0
- package/templates/ssr-isr/lib/compilers/esbuild-plugins.js +111 -0
- package/templates/ssr-isr/lib/compilers/svelte.d.ts +18 -0
- package/templates/ssr-isr/lib/compilers/svelte.js +44 -0
- package/templates/ssr-isr/lib/compilers/vue.d.ts +15 -0
- package/templates/ssr-isr/lib/compilers/vue.js +90 -0
- package/templates/ssr-isr/lib/core/config.d.ts +220 -0
- package/templates/ssr-isr/lib/core/http.d.ts +56 -0
- package/templates/ssr-isr/lib/core/http.js +71 -0
- package/templates/ssr-isr/lib/core/middleware-hooks.d.ts +219 -0
- package/templates/ssr-isr/lib/core/middleware-hooks.js +97 -0
- package/templates/ssr-isr/lib/core/paths.d.ts +44 -0
- package/templates/ssr-isr/lib/core/paths.js +39 -0
- package/templates/ssr-isr/lib/core/routes/match.d.ts +54 -0
- package/templates/ssr-isr/lib/core/routes/match.js +47 -0
- package/templates/ssr-isr/lib/core/routes/scan.d.ts +53 -0
- package/templates/ssr-isr/lib/core/routes/scan.js +190 -0
- package/templates/ssr-isr/lib/core/types.d.ts +153 -0
- package/templates/ssr-isr/lib/core/types.js +1 -0
- package/templates/ssr-isr/lib/css/compiler.d.ts +23 -0
- package/templates/ssr-isr/lib/css/compiler.js +74 -0
- package/templates/ssr-isr/lib/db/connector.d.ts +30 -0
- package/templates/ssr-isr/lib/db/connector.js +42 -0
- package/templates/ssr-isr/lib/db/drivers/jdb.d.ts +17 -0
- package/templates/ssr-isr/lib/db/drivers/jdb.js +44 -0
- package/templates/ssr-isr/lib/db/drivers/sql.d.ts +22 -0
- package/templates/ssr-isr/lib/db/drivers/sql.js +182 -0
- package/templates/ssr-isr/lib/db/index.d.ts +27 -0
- package/templates/ssr-isr/lib/db/index.js +48 -0
- package/templates/ssr-isr/lib/db/types.d.ts +33 -0
- package/templates/ssr-isr/lib/db/types.js +1 -0
- package/templates/ssr-isr/lib/graphql/index.d.ts +48 -0
- package/templates/ssr-isr/lib/graphql/index.js +52 -0
- package/templates/ssr-isr/lib/graphql/resolvers.d.ts +57 -0
- package/templates/ssr-isr/lib/graphql/resolvers.js +25 -0
- package/templates/ssr-isr/lib/graphql/schema.d.ts +35 -0
- package/templates/ssr-isr/lib/graphql/schema.js +35 -0
- package/templates/ssr-isr/lib/i18n/en.json +4 -0
- package/templates/ssr-isr/lib/i18n/es.json +4 -0
- package/templates/ssr-isr/lib/i18n/index.d.ts +8 -0
- package/templates/ssr-isr/lib/i18n/index.js +15 -0
- package/templates/ssr-isr/lib/import/jen-import.d.ts +56 -0
- package/templates/ssr-isr/lib/import/jen-import.js +161 -0
- package/templates/{static → ssr-isr}/lib/index.d.ts +42 -11
- package/templates/ssr-isr/lib/index.js +116 -0
- package/templates/ssr-isr/lib/jdb/engine.d.ts +38 -0
- package/templates/ssr-isr/lib/jdb/engine.js +275 -0
- package/templates/ssr-isr/lib/jdb/index.d.ts +34 -0
- package/templates/ssr-isr/lib/jdb/index.js +34 -0
- package/templates/ssr-isr/lib/jdb/types.d.ts +228 -0
- package/templates/ssr-isr/lib/jdb/types.js +1 -0
- package/templates/ssr-isr/lib/jdb/utils.d.ts +66 -0
- package/templates/ssr-isr/lib/jdb/utils.js +176 -0
- package/templates/ssr-isr/lib/middleware/builtins/body-parser.d.ts +16 -0
- package/templates/ssr-isr/lib/middleware/builtins/body-parser.js +56 -0
- package/templates/ssr-isr/lib/middleware/builtins/cors.d.ts +15 -0
- package/templates/ssr-isr/lib/middleware/builtins/cors.js +54 -0
- package/templates/ssr-isr/lib/middleware/builtins/logger.d.ts +19 -0
- package/templates/ssr-isr/lib/middleware/builtins/logger.js +34 -0
- package/templates/ssr-isr/lib/middleware/builtins/rate-limit.d.ts +22 -0
- package/templates/ssr-isr/lib/middleware/builtins/rate-limit.js +79 -0
- package/templates/ssr-isr/lib/middleware/builtins/request-id.d.ts +19 -0
- package/templates/ssr-isr/lib/middleware/builtins/request-id.js +29 -0
- package/templates/ssr-isr/lib/middleware/builtins/security-headers.d.ts +19 -0
- package/templates/ssr-isr/lib/middleware/builtins/security-headers.js +53 -0
- package/templates/ssr-isr/lib/middleware/context.d.ts +105 -0
- package/templates/ssr-isr/lib/middleware/context.js +124 -0
- package/templates/ssr-isr/lib/middleware/decorators.d.ts +19 -0
- package/templates/ssr-isr/lib/middleware/decorators.js +93 -0
- package/templates/ssr-isr/lib/middleware/errors/handler.js +46 -0
- package/templates/ssr-isr/lib/middleware/errors/http-error.d.ts +5 -0
- package/templates/ssr-isr/lib/middleware/errors/http-error.js +10 -0
- package/templates/ssr-isr/lib/middleware/kernel.d.ts +69 -0
- package/templates/ssr-isr/lib/middleware/kernel.js +85 -0
- package/templates/ssr-isr/lib/middleware/pipeline.d.ts +53 -0
- package/templates/ssr-isr/lib/middleware/pipeline.js +148 -0
- package/templates/ssr-isr/lib/middleware/registry.d.ts +69 -0
- package/templates/ssr-isr/lib/middleware/registry.js +85 -0
- package/templates/ssr-isr/lib/middleware/response.d.ts +75 -0
- package/templates/ssr-isr/lib/middleware/response.js +107 -0
- package/templates/ssr-isr/lib/middleware/types.d.ts +1 -0
- package/templates/ssr-isr/lib/middleware/types.js +1 -0
- package/templates/ssr-isr/lib/middleware/utils/matcher.js +13 -0
- package/templates/ssr-isr/lib/native/bundle.d.ts +24 -0
- package/templates/ssr-isr/lib/native/bundle.js +22 -0
- package/templates/ssr-isr/lib/native/dev-server.d.ts +13 -0
- package/templates/ssr-isr/lib/native/dev-server.js +23 -0
- package/templates/{static → ssr-isr}/lib/native/index.d.ts +20 -20
- package/templates/ssr-isr/lib/native/index.js +33 -0
- package/templates/ssr-isr/lib/native/optimizer.d.ts +21 -0
- package/templates/ssr-isr/lib/native/optimizer.js +20 -0
- package/templates/ssr-isr/lib/native/style-compiler.d.ts +19 -0
- package/templates/ssr-isr/lib/native/style-compiler.js +19 -0
- package/templates/ssr-isr/lib/plugin/loader.d.ts +10 -0
- package/templates/ssr-isr/lib/plugin/loader.js +36 -0
- package/templates/ssr-isr/lib/runtime/client-runtime.d.ts +16 -0
- package/templates/ssr-isr/lib/runtime/client-runtime.js +25 -0
- package/templates/ssr-isr/lib/runtime/hmr.d.ts +23 -0
- package/templates/ssr-isr/lib/runtime/hmr.js +59 -0
- package/templates/ssr-isr/lib/runtime/hydrate.d.ts +18 -0
- package/templates/ssr-isr/lib/runtime/hydrate.js +55 -0
- package/templates/ssr-isr/lib/runtime/island-hydration-client.d.ts +8 -0
- package/templates/ssr-isr/lib/runtime/island-hydration-client.js +146 -0
- package/templates/ssr-isr/lib/runtime/islands.d.ts +101 -0
- package/templates/ssr-isr/lib/runtime/islands.js +110 -0
- package/templates/ssr-isr/lib/runtime/render.d.ts +40 -0
- package/templates/ssr-isr/lib/runtime/render.js +244 -0
- package/templates/ssr-isr/lib/server/api-routes.d.ts +112 -0
- package/templates/ssr-isr/lib/server/api-routes.js +237 -0
- package/templates/{static → ssr-isr}/lib/server/api.d.ts +3 -3
- package/templates/ssr-isr/lib/server/api.js +108 -0
- package/templates/ssr-isr/lib/server/app.d.ts +44 -0
- package/templates/ssr-isr/lib/server/app.js +438 -0
- package/templates/ssr-isr/lib/server/runtimeServe.d.ts +60 -0
- package/templates/ssr-isr/lib/server/runtimeServe.js +169 -0
- package/templates/ssr-isr/lib/server/ssr.d.ts +161 -0
- package/templates/ssr-isr/lib/server/ssr.js +202 -0
- package/templates/ssr-isr/lib/shared/log.d.ts +49 -0
- package/templates/ssr-isr/lib/shared/log.js +64 -0
- package/templates/ssr-isr/package.json +23 -0
- package/templates/ssr-isr/server.js +128 -0
- package/templates/ssr-isr/site/pages/(index).tsx +11 -0
- package/templates/ssr-isr/site/styles/global.scss +37 -0
- package/templates/ssr-isr/tsconfig.json +39 -0
- package/templates/static/README.md +63 -67
- package/templates/static/build.js +31 -21
- package/templates/static/jen.config.ts +0 -20
- package/templates/static/jenjs.d.ts +0 -18
- package/templates/static/lib/api/(hello).js +7 -24
- package/templates/static/lib/api/examples/files/[...slug].js +22 -0
- package/templates/static/lib/api/examples/hello.js +11 -0
- package/templates/static/lib/api/examples/posts/[id].js +37 -0
- package/templates/static/lib/api/examples/posts.js +37 -0
- package/templates/static/lib/api/examples/search.js +23 -0
- package/templates/static/lib/api/index.js +41 -0
- package/templates/static/lib/api/loader.js +234 -0
- package/templates/static/lib/api/router.js +259 -0
- package/templates/static/lib/assets/types.js +1 -0
- package/templates/static/lib/auth/cookie-utils.js +69 -85
- package/templates/static/lib/auth/index.js +0 -17
- package/templates/static/lib/auth/jwt.js +48 -21
- package/templates/static/lib/auth/session.js +79 -98
- package/templates/static/lib/build/asset-hashing.js +47 -39
- package/templates/static/lib/build/asset-manifest.js +18 -35
- package/templates/static/lib/build/build.js +277 -95
- package/templates/static/lib/build/bundle-analyzer-ui.js +417 -0
- package/templates/static/lib/build/bundle-analyzer.js +945 -0
- package/templates/static/lib/build/code-splitter.js +194 -0
- package/templates/static/lib/build/feature-analyzer.js +190 -0
- package/templates/static/lib/build/feature-gate.js +257 -0
- package/templates/static/lib/build/island-hydration.js +17 -35
- package/templates/static/lib/build/lazy-loader.js +322 -0
- package/templates/static/lib/build/minifier.js +42 -61
- package/templates/static/lib/build/page-renderer.js +25 -42
- package/templates/static/lib/build/production-build.js +11 -28
- package/templates/static/lib/build/rust-hashing.js +71 -0
- package/templates/static/lib/build/script-optimizer.js +285 -0
- package/templates/static/lib/build/ssg-pipeline.js +107 -113
- package/templates/static/lib/build/vercel-output.js +298 -0
- package/templates/static/lib/build-tools/build-site.js +27 -47
- package/templates/static/lib/cache/index.js +6 -15
- package/templates/static/lib/cache/memory.js +37 -28
- package/templates/static/lib/cache/redis.js +56 -28
- package/templates/static/lib/cli/banner.js +18 -31
- package/templates/static/lib/cli/templates/ssg/jen.config.js +29 -46
- package/templates/static/lib/cli/templates/ssg/site/index.js +6 -1
- package/templates/static/lib/cli/templates/ssr/jen.config.js +29 -46
- package/templates/static/lib/cli/templates/ssr/site/index.js +6 -1
- package/templates/static/lib/client/Image.js +42 -0
- package/templates/static/lib/client/Link.js +190 -0
- package/templates/static/lib/client/PWA.js +46 -0
- package/templates/static/lib/client/Seo.js +97 -0
- package/templates/static/lib/client/index.js +9 -0
- package/templates/static/lib/client/useNavigation.js +25 -0
- package/templates/static/lib/client/useRouter.js +64 -0
- package/templates/static/lib/client-routing/Link.js +17 -0
- package/templates/static/lib/client-routing/index.js +19 -0
- package/templates/static/lib/client-routing/router.js +151 -0
- package/templates/static/lib/client-routing/signal.js +147 -0
- package/templates/static/lib/compilers/esbuild-plugins.js +96 -115
- package/templates/static/lib/compilers/svelte.js +31 -48
- package/templates/static/lib/compilers/vue.js +76 -85
- package/templates/static/lib/core/config.js +0 -17
- package/templates/static/lib/core/feature-guard.js +136 -0
- package/templates/static/lib/core/features.js +99 -0
- package/templates/static/lib/core/http.js +65 -36
- package/templates/static/lib/core/layouts/index.js +10 -0
- package/templates/static/lib/core/layouts/render.js +158 -0
- package/templates/static/lib/core/layouts/scan.js +112 -0
- package/templates/static/lib/core/layouts/types.js +1 -0
- package/templates/static/lib/core/lifecycle.js +129 -0
- package/templates/static/lib/core/loader-schema.js +81 -0
- package/templates/static/lib/core/middleware-hooks.js +86 -58
- package/templates/static/lib/core/paths.js +31 -16
- package/templates/static/lib/core/routes/advanced.js +114 -0
- package/templates/static/lib/core/routes/handlers.js +181 -0
- package/templates/static/lib/core/routes/match.js +129 -24
- package/templates/static/lib/core/routes/orchestrator.js +171 -0
- package/templates/static/lib/core/routes/rendering-config.js +131 -0
- package/templates/static/lib/core/routes/scan.js +174 -132
- package/templates/static/lib/core/types.js +0 -17
- package/templates/static/lib/css/compiler.js +63 -76
- package/templates/static/lib/data-fetching/cache.js +223 -0
- package/templates/static/lib/data-fetching/client.js +202 -0
- package/templates/static/lib/data-fetching/feature-guard.js +29 -0
- package/templates/static/lib/data-fetching/graphql.js +265 -0
- package/templates/static/lib/data-fetching/index.js +57 -0
- package/templates/static/lib/data-fetching/rest.js +256 -0
- package/templates/static/lib/data-fetching/server.js +182 -0
- package/templates/static/lib/data-fetching/types.js +5 -0
- package/templates/static/lib/db/connector.js +37 -28
- package/templates/static/lib/db/drivers/jdb.js +41 -56
- package/templates/static/lib/db/drivers/sql.js +152 -152
- package/templates/static/lib/db/index.js +42 -59
- package/templates/static/lib/db/types.js +0 -17
- package/templates/static/lib/devtools/component-tree.js +106 -0
- package/templates/static/lib/devtools/devtools.js +638 -0
- package/templates/static/lib/devtools/event-bus.js +29 -0
- package/templates/static/lib/devtools/event-logger.js +67 -0
- package/templates/static/lib/devtools/index.js +9 -0
- package/templates/static/lib/devtools/integration.js +149 -0
- package/templates/static/lib/devtools/performance.js +84 -0
- package/templates/static/lib/devtools/persistence.js +57 -0
- package/templates/static/lib/devtools/plugins.js +97 -0
- package/templates/static/lib/devtools/search.js +89 -0
- package/templates/static/lib/devtools/ui.js +769 -0
- package/templates/static/lib/features/api/handler.js +10 -0
- package/templates/static/lib/features/api/index.js +5 -0
- package/templates/static/lib/features/api/types.js +4 -0
- package/templates/static/lib/features/middleware/compiled.js +7 -0
- package/templates/static/lib/features/middleware/index.js +5 -0
- package/templates/static/lib/features/middleware/types.js +4 -0
- package/templates/static/lib/fonts/index.js +46 -0
- package/templates/static/lib/fonts/inject.js +125 -0
- package/templates/static/lib/fonts/loader.js +196 -0
- package/templates/static/lib/fonts/types.js +1 -0
- package/templates/static/lib/graphql/index.js +46 -16
- package/templates/static/lib/graphql/resolvers.js +42 -19
- package/templates/static/lib/graphql/schema.js +30 -15
- package/templates/static/lib/i18n/en.json +2 -2
- package/templates/static/lib/i18n/es.json +2 -2
- package/templates/static/lib/i18n/index.js +17 -29
- package/templates/static/lib/import/jen-import.js +130 -97
- package/templates/static/lib/index.js +82 -115
- package/templates/static/lib/jdb/engine.js +259 -160
- package/templates/static/lib/jdb/index.js +28 -13
- package/templates/static/lib/jdb/types.js +0 -17
- package/templates/static/lib/jdb/utils.js +159 -124
- package/templates/static/lib/middleware/builtins/cors.js +55 -64
- package/templates/static/lib/middleware/context.js +120 -46
- package/templates/static/lib/middleware/kernel.js +186 -31
- package/templates/static/lib/middleware/pipeline.js +140 -59
- package/templates/static/lib/middleware/registry.js +80 -36
- package/templates/static/lib/middleware/response.js +101 -54
- package/templates/static/lib/plugin/examples/analytics-plugin.js +183 -0
- package/templates/static/lib/plugin/examples/cdn-upload-plugin.js +94 -0
- package/templates/static/lib/plugin/loader.js +25 -48
- package/templates/static/lib/plugin/plugin-manager.js +177 -0
- package/templates/static/lib/plugin/types.js +28 -0
- package/templates/static/lib/runtime/client-runtime.js +19 -22
- package/templates/static/lib/runtime/hmr.js +23 -18
- package/templates/static/lib/runtime/hydrate.js +47 -37
- package/templates/static/lib/runtime/island-hydration-client.js +122 -108
- package/templates/static/lib/runtime/islands.js +92 -71
- package/templates/static/lib/runtime/render.js +385 -149
- package/templates/static/lib/security/security-config.js +60 -0
- package/templates/static/lib/security/security-middleware.js +229 -0
- package/templates/static/lib/server/api-routes.js +339 -171
- package/templates/static/lib/server/api.js +93 -109
- package/templates/static/lib/server/app.js +660 -270
- package/templates/static/lib/server/isr.js +365 -0
- package/templates/static/lib/server/runtimeServe.js +157 -89
- package/templates/static/lib/server/ssr.js +295 -0
- package/templates/static/lib/server-actions/handler.js +180 -0
- package/templates/static/lib/server-actions/index.js +19 -0
- package/templates/static/lib/server-actions/middleware.js +146 -0
- package/templates/static/lib/server-actions/scan.js +152 -0
- package/templates/static/lib/server-actions/types.js +1 -0
- package/templates/static/lib/server-actions/validators.js +156 -0
- package/templates/static/lib/shared/log.js +74 -25
- package/templates/static/lib/telemetry/api/rate-limiter.js +32 -0
- package/templates/static/lib/telemetry/api/validator.js +67 -0
- package/templates/static/lib/telemetry/client.js +121 -0
- package/templates/static/lib/telemetry/tests/rate-limiter.test.js +46 -0
- package/templates/static/lib/telemetry/tests/validator.test.js +62 -0
- package/templates/static/lib/vendor/glob/glob.js +4766 -0
- package/templates/static/lib/vendor/preact/preact.module.js +797 -0
- package/templates/static/lib/vendor/sass/sass.node.mjs +212 -0
- package/templates/static/package.json +4 -0
- package/templates/static/server.js +23 -25
- package/templates/static/site/(home).tsx +12 -12
- package/templates/static/site/styles/global.scss +89 -78
- package/templates/static/tsconfig.json +43 -39
- package/templates/static/.esbuild/jen.config.js +0 -1
- package/templates/static/lib/api/(hello).d.ts +0 -7
- package/templates/static/lib/auth/cookie-utils.d.ts +0 -24
- package/templates/static/lib/auth/jwt.d.ts +0 -2
- package/templates/static/lib/auth/session.d.ts +0 -44
- package/templates/static/lib/build/asset-hashing.d.ts +0 -10
- package/templates/static/lib/build/asset-manifest.d.ts +0 -11
- package/templates/static/lib/build/build.d.ts +0 -4
- package/templates/static/lib/build/minifier.d.ts +0 -20
- package/templates/static/lib/build/page-renderer.d.ts +0 -17
- package/templates/static/lib/build/production-build.d.ts +0 -10
- package/templates/static/lib/build/ssg-pipeline.d.ts +0 -15
- package/templates/static/lib/cache/index.d.ts +0 -2
- package/templates/static/lib/cache/memory.d.ts +0 -6
- package/templates/static/lib/cache/redis.d.ts +0 -6
- package/templates/static/lib/cli/banner.d.ts +0 -1
- package/templates/static/lib/compilers/svelte.d.ts +0 -18
- package/templates/static/lib/compilers/vue.d.ts +0 -15
- package/templates/static/lib/core/config.d.ts +0 -53
- package/templates/static/lib/core/http.d.ts +0 -3
- package/templates/static/lib/core/middleware-hooks.d.ts +0 -46
- package/templates/static/lib/core/paths.d.ts +0 -6
- package/templates/static/lib/core/routes/match.d.ts +0 -6
- package/templates/static/lib/core/routes/scan.d.ts +0 -9
- package/templates/static/lib/core/types.d.ts +0 -18
- package/templates/static/lib/css/compiler.d.ts +0 -20
- package/templates/static/lib/db/connector.d.ts +0 -4
- package/templates/static/lib/db/drivers/jdb.d.ts +0 -13
- package/templates/static/lib/db/drivers/sql.d.ts +0 -18
- package/templates/static/lib/db/index.d.ts +0 -19
- package/templates/static/lib/db/types.d.ts +0 -29
- package/templates/static/lib/graphql/index.d.ts +0 -1
- package/templates/static/lib/graphql/resolvers.d.ts +0 -17
- package/templates/static/lib/graphql/schema.d.ts +0 -1
- package/templates/static/lib/i18n/index.d.ts +0 -8
- package/templates/static/lib/import/jen-import.d.ts +0 -27
- package/templates/static/lib/jdb/engine.d.ts +0 -9
- package/templates/static/lib/jdb/index.d.ts +0 -2
- package/templates/static/lib/jdb/types.d.ts +0 -46
- package/templates/static/lib/jdb/utils.d.ts +0 -6
- package/templates/static/lib/middleware/builtins/body-parser.d.ts +0 -1
- package/templates/static/lib/middleware/builtins/body-parser.js +0 -55
- package/templates/static/lib/middleware/builtins/cors.d.ts +0 -13
- package/templates/static/lib/middleware/builtins/logger.d.ts +0 -1
- package/templates/static/lib/middleware/builtins/logger.js +0 -33
- package/templates/static/lib/middleware/builtins/rate-limit.d.ts +0 -5
- package/templates/static/lib/middleware/builtins/rate-limit.js +0 -76
- package/templates/static/lib/middleware/builtins/request-id.d.ts +0 -1
- package/templates/static/lib/middleware/builtins/request-id.js +0 -25
- package/templates/static/lib/middleware/builtins/security-headers.d.ts +0 -1
- package/templates/static/lib/middleware/builtins/security-headers.js +0 -39
- package/templates/static/lib/middleware/context.d.ts +0 -18
- package/templates/static/lib/middleware/decorators.d.ts +0 -2
- package/templates/static/lib/middleware/decorators.js +0 -61
- package/templates/static/lib/middleware/errors/handler.js +0 -65
- package/templates/static/lib/middleware/errors/http-error.d.ts +0 -5
- package/templates/static/lib/middleware/errors/http-error.js +0 -27
- package/templates/static/lib/middleware/kernel.d.ts +0 -6
- package/templates/static/lib/middleware/pipeline.d.ts +0 -4
- package/templates/static/lib/middleware/registry.d.ts +0 -10
- package/templates/static/lib/middleware/response.d.ts +0 -13
- package/templates/static/lib/middleware/types.js +0 -18
- package/templates/static/lib/middleware/utils/matcher.js +0 -31
- package/templates/static/lib/native/bundle.d.ts +0 -19
- package/templates/static/lib/native/bundle.js +0 -39
- package/templates/static/lib/native/dev-server.d.ts +0 -6
- package/templates/static/lib/native/dev-server.js +0 -38
- package/templates/static/lib/native/index.js +0 -48
- package/templates/static/lib/native/optimizer.d.ts +0 -17
- package/templates/static/lib/native/optimizer.js +0 -37
- package/templates/static/lib/native/style-compiler.d.ts +0 -10
- package/templates/static/lib/native/style-compiler.js +0 -36
- package/templates/static/lib/plugin/loader.d.ts +0 -8
- package/templates/static/lib/runtime/client-runtime.d.ts +0 -1
- package/templates/static/lib/runtime/hmr.d.ts +0 -1
- package/templates/static/lib/runtime/hydrate.d.ts +0 -1
- package/templates/static/lib/runtime/island-hydration-client.d.ts +0 -5
- package/templates/static/lib/runtime/islands.d.ts +0 -46
- package/templates/static/lib/runtime/render.d.ts +0 -13
- package/templates/static/lib/server/api-routes.d.ts +0 -44
- package/templates/static/lib/server/app.d.ts +0 -10
- package/templates/static/lib/server/runtimeServe.d.ts +0 -4
- package/templates/static/lib/shared/log.d.ts +0 -5
- package/templates/static/node_modules/.bin/esbuild +0 -16
- package/templates/static/node_modules/.bin/esbuild.cmd +0 -17
- package/templates/static/node_modules/.bin/esbuild.ps1 +0 -28
- package/templates/static/node_modules/.bin/tsc +0 -16
- package/templates/static/node_modules/.bin/tsc.cmd +0 -17
- package/templates/static/node_modules/.bin/tsc.ps1 +0 -28
- package/templates/static/node_modules/.bin/tsserver +0 -16
- package/templates/static/node_modules/.bin/tsserver.cmd +0 -17
- package/templates/static/node_modules/.bin/tsserver.ps1 +0 -28
- package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_templates_static_site_(home).tsx.mjs +0 -14
- package/templates/static/node_modules/.jen/cache/B__Jen.js_packages_create-jen-app_yo_site_(home).tsx.mjs +0 -11
- package/templates/static/node_modules/.package-lock.json +0 -585
- package/templates/static/node_modules/@esbuild/win32-x64/README.md +0 -3
- package/templates/static/node_modules/@esbuild/win32-x64/esbuild.exe +0 -0
- package/templates/static/node_modules/@esbuild/win32-x64/package.json +0 -20
- package/templates/static/node_modules/@jenjs/master/README.md +0 -24
- package/templates/static/node_modules/@jenjs/master/index.js +0 -3655
- package/templates/static/node_modules/@jenjs/master/package.json +0 -36
- package/templates/static/node_modules/@polka/url/build.js +0 -49
- package/templates/static/node_modules/@polka/url/build.mjs +0 -47
- package/templates/static/node_modules/@polka/url/index.d.ts +0 -11
- package/templates/static/node_modules/@polka/url/package.json +0 -30
- package/templates/static/node_modules/@polka/url/readme.md +0 -68
- package/templates/static/node_modules/@types/node/LICENSE +0 -21
- package/templates/static/node_modules/@types/node/README.md +0 -15
- package/templates/static/node_modules/@types/node/assert/strict.d.ts +0 -111
- package/templates/static/node_modules/@types/node/assert.d.ts +0 -1078
- package/templates/static/node_modules/@types/node/async_hooks.d.ts +0 -603
- package/templates/static/node_modules/@types/node/buffer.buffer.d.ts +0 -472
- package/templates/static/node_modules/@types/node/buffer.d.ts +0 -1934
- package/templates/static/node_modules/@types/node/child_process.d.ts +0 -1476
- package/templates/static/node_modules/@types/node/cluster.d.ts +0 -578
- package/templates/static/node_modules/@types/node/compatibility/disposable.d.ts +0 -14
- package/templates/static/node_modules/@types/node/compatibility/index.d.ts +0 -9
- package/templates/static/node_modules/@types/node/compatibility/indexable.d.ts +0 -20
- package/templates/static/node_modules/@types/node/compatibility/iterators.d.ts +0 -20
- package/templates/static/node_modules/@types/node/console.d.ts +0 -452
- package/templates/static/node_modules/@types/node/constants.d.ts +0 -21
- package/templates/static/node_modules/@types/node/crypto.d.ts +0 -4545
- package/templates/static/node_modules/@types/node/dgram.d.ts +0 -600
- package/templates/static/node_modules/@types/node/diagnostics_channel.d.ts +0 -578
- package/templates/static/node_modules/@types/node/dns/promises.d.ts +0 -503
- package/templates/static/node_modules/@types/node/dns.d.ts +0 -923
- package/templates/static/node_modules/@types/node/domain.d.ts +0 -170
- package/templates/static/node_modules/@types/node/events.d.ts +0 -976
- package/templates/static/node_modules/@types/node/fs/promises.d.ts +0 -1295
- package/templates/static/node_modules/@types/node/fs.d.ts +0 -4461
- package/templates/static/node_modules/@types/node/globals.d.ts +0 -172
- package/templates/static/node_modules/@types/node/globals.typedarray.d.ts +0 -38
- package/templates/static/node_modules/@types/node/http.d.ts +0 -2089
- package/templates/static/node_modules/@types/node/http2.d.ts +0 -2644
- package/templates/static/node_modules/@types/node/https.d.ts +0 -579
- package/templates/static/node_modules/@types/node/index.d.ts +0 -97
- package/templates/static/node_modules/@types/node/inspector.d.ts +0 -253
- package/templates/static/node_modules/@types/node/inspector.generated.d.ts +0 -4052
- package/templates/static/node_modules/@types/node/module.d.ts +0 -891
- package/templates/static/node_modules/@types/node/net.d.ts +0 -1057
- package/templates/static/node_modules/@types/node/os.d.ts +0 -506
- package/templates/static/node_modules/@types/node/package.json +0 -145
- package/templates/static/node_modules/@types/node/path.d.ts +0 -200
- package/templates/static/node_modules/@types/node/perf_hooks.d.ts +0 -968
- package/templates/static/node_modules/@types/node/process.d.ts +0 -2089
- package/templates/static/node_modules/@types/node/punycode.d.ts +0 -117
- package/templates/static/node_modules/@types/node/querystring.d.ts +0 -152
- package/templates/static/node_modules/@types/node/readline/promises.d.ts +0 -161
- package/templates/static/node_modules/@types/node/readline.d.ts +0 -594
- package/templates/static/node_modules/@types/node/repl.d.ts +0 -428
- package/templates/static/node_modules/@types/node/sea.d.ts +0 -153
- package/templates/static/node_modules/@types/node/sqlite.d.ts +0 -721
- package/templates/static/node_modules/@types/node/stream/consumers.d.ts +0 -38
- package/templates/static/node_modules/@types/node/stream/promises.d.ts +0 -90
- package/templates/static/node_modules/@types/node/stream/web.d.ts +0 -622
- package/templates/static/node_modules/@types/node/stream.d.ts +0 -1664
- package/templates/static/node_modules/@types/node/string_decoder.d.ts +0 -67
- package/templates/static/node_modules/@types/node/test.d.ts +0 -2163
- package/templates/static/node_modules/@types/node/timers/promises.d.ts +0 -108
- package/templates/static/node_modules/@types/node/timers.d.ts +0 -287
- package/templates/static/node_modules/@types/node/tls.d.ts +0 -1319
- package/templates/static/node_modules/@types/node/trace_events.d.ts +0 -197
- package/templates/static/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -468
- package/templates/static/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -34
- package/templates/static/node_modules/@types/node/ts5.6/index.d.ts +0 -97
- package/templates/static/node_modules/@types/node/tty.d.ts +0 -208
- package/templates/static/node_modules/@types/node/url.d.ts +0 -984
- package/templates/static/node_modules/@types/node/util.d.ts +0 -2606
- package/templates/static/node_modules/@types/node/v8.d.ts +0 -920
- package/templates/static/node_modules/@types/node/vm.d.ts +0 -1000
- package/templates/static/node_modules/@types/node/wasi.d.ts +0 -181
- package/templates/static/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -34
- package/templates/static/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/templates/static/node_modules/@types/node/web-globals/events.d.ts +0 -97
- package/templates/static/node_modules/@types/node/web-globals/fetch.d.ts +0 -55
- package/templates/static/node_modules/@types/node/web-globals/navigator.d.ts +0 -22
- package/templates/static/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/templates/static/node_modules/@types/node/worker_threads.d.ts +0 -784
- package/templates/static/node_modules/@types/node/zlib.d.ts +0 -683
- package/templates/static/node_modules/esbuild/LICENSE.md +0 -21
- package/templates/static/node_modules/esbuild/README.md +0 -3
- package/templates/static/node_modules/esbuild/bin/esbuild +0 -223
- package/templates/static/node_modules/esbuild/install.js +0 -289
- package/templates/static/node_modules/esbuild/lib/main.d.ts +0 -716
- package/templates/static/node_modules/esbuild/lib/main.js +0 -2242
- package/templates/static/node_modules/esbuild/package.json +0 -49
- package/templates/static/node_modules/mrmime/index.d.ts +0 -2
- package/templates/static/node_modules/mrmime/index.js +0 -449
- package/templates/static/node_modules/mrmime/index.mjs +0 -448
- package/templates/static/node_modules/mrmime/license +0 -21
- package/templates/static/node_modules/mrmime/package.json +0 -44
- package/templates/static/node_modules/mrmime/readme.md +0 -130
- package/templates/static/node_modules/preact/README.md +0 -185
- package/templates/static/node_modules/preact/compat/client.d.ts +0 -13
- package/templates/static/node_modules/preact/compat/client.js +0 -21
- package/templates/static/node_modules/preact/compat/client.mjs +0 -24
- package/templates/static/node_modules/preact/compat/dist/compat.js +0 -2
- package/templates/static/node_modules/preact/compat/dist/compat.js.map +0 -1
- package/templates/static/node_modules/preact/compat/dist/compat.mjs +0 -2
- package/templates/static/node_modules/preact/compat/dist/compat.module.js +0 -2
- package/templates/static/node_modules/preact/compat/dist/compat.module.js.map +0 -1
- package/templates/static/node_modules/preact/compat/dist/compat.umd.js +0 -2
- package/templates/static/node_modules/preact/compat/dist/compat.umd.js.map +0 -1
- package/templates/static/node_modules/preact/compat/jsx-dev-runtime.js +0 -3
- package/templates/static/node_modules/preact/compat/jsx-dev-runtime.mjs +0 -3
- package/templates/static/node_modules/preact/compat/jsx-runtime.js +0 -3
- package/templates/static/node_modules/preact/compat/jsx-runtime.mjs +0 -3
- package/templates/static/node_modules/preact/compat/package.json +0 -55
- package/templates/static/node_modules/preact/compat/scheduler.js +0 -15
- package/templates/static/node_modules/preact/compat/scheduler.mjs +0 -23
- package/templates/static/node_modules/preact/compat/server.browser.js +0 -11
- package/templates/static/node_modules/preact/compat/server.js +0 -36
- package/templates/static/node_modules/preact/compat/server.mjs +0 -17
- package/templates/static/node_modules/preact/compat/src/Children.js +0 -21
- package/templates/static/node_modules/preact/compat/src/PureComponent.js +0 -16
- package/templates/static/node_modules/preact/compat/src/forwardRef.js +0 -44
- package/templates/static/node_modules/preact/compat/src/hooks.js +0 -70
- package/templates/static/node_modules/preact/compat/src/index.d.ts +0 -351
- package/templates/static/node_modules/preact/compat/src/index.js +0 -238
- package/templates/static/node_modules/preact/compat/src/internal.d.ts +0 -48
- package/templates/static/node_modules/preact/compat/src/memo.js +0 -35
- package/templates/static/node_modules/preact/compat/src/portals.js +0 -78
- package/templates/static/node_modules/preact/compat/src/render.js +0 -313
- package/templates/static/node_modules/preact/compat/src/suspense-list.d.ts +0 -16
- package/templates/static/node_modules/preact/compat/src/suspense-list.js +0 -127
- package/templates/static/node_modules/preact/compat/src/suspense.d.ts +0 -19
- package/templates/static/node_modules/preact/compat/src/suspense.js +0 -291
- package/templates/static/node_modules/preact/compat/src/util.js +0 -33
- package/templates/static/node_modules/preact/compat/test-utils.js +0 -1
- package/templates/static/node_modules/preact/compat/test-utils.mjs +0 -1
- package/templates/static/node_modules/preact/debug/dist/debug.js +0 -2
- package/templates/static/node_modules/preact/debug/dist/debug.js.map +0 -1
- package/templates/static/node_modules/preact/debug/dist/debug.mjs +0 -2
- package/templates/static/node_modules/preact/debug/dist/debug.module.js +0 -2
- package/templates/static/node_modules/preact/debug/dist/debug.module.js.map +0 -1
- package/templates/static/node_modules/preact/debug/dist/debug.umd.js +0 -2
- package/templates/static/node_modules/preact/debug/dist/debug.umd.js.map +0 -1
- package/templates/static/node_modules/preact/debug/package.json +0 -27
- package/templates/static/node_modules/preact/debug/src/check-props.js +0 -54
- package/templates/static/node_modules/preact/debug/src/component-stack.js +0 -146
- package/templates/static/node_modules/preact/debug/src/constants.js +0 -3
- package/templates/static/node_modules/preact/debug/src/debug.js +0 -593
- package/templates/static/node_modules/preact/debug/src/index.d.ts +0 -23
- package/templates/static/node_modules/preact/debug/src/index.js +0 -12
- package/templates/static/node_modules/preact/debug/src/internal.d.ts +0 -82
- package/templates/static/node_modules/preact/debug/src/util.js +0 -15
- package/templates/static/node_modules/preact/devtools/dist/devtools.js +0 -2
- package/templates/static/node_modules/preact/devtools/dist/devtools.js.map +0 -1
- package/templates/static/node_modules/preact/devtools/dist/devtools.mjs +0 -2
- package/templates/static/node_modules/preact/devtools/dist/devtools.module.js +0 -2
- package/templates/static/node_modules/preact/devtools/dist/devtools.module.js.map +0 -1
- package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js +0 -2
- package/templates/static/node_modules/preact/devtools/dist/devtools.umd.js.map +0 -1
- package/templates/static/node_modules/preact/devtools/package.json +0 -25
- package/templates/static/node_modules/preact/devtools/src/devtools.js +0 -21
- package/templates/static/node_modules/preact/devtools/src/index.d.ts +0 -8
- package/templates/static/node_modules/preact/devtools/src/index.js +0 -15
- package/templates/static/node_modules/preact/dist/preact.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.js.map +0 -1
- package/templates/static/node_modules/preact/dist/preact.min.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.min.js.map +0 -1
- package/templates/static/node_modules/preact/dist/preact.min.module.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.min.module.js.map +0 -1
- package/templates/static/node_modules/preact/dist/preact.min.umd.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.min.umd.js.map +0 -1
- package/templates/static/node_modules/preact/dist/preact.mjs +0 -2
- package/templates/static/node_modules/preact/dist/preact.module.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.module.js.map +0 -1
- package/templates/static/node_modules/preact/dist/preact.umd.js +0 -2
- package/templates/static/node_modules/preact/dist/preact.umd.js.map +0 -1
- package/templates/static/node_modules/preact/hooks/dist/hooks.js +0 -2
- package/templates/static/node_modules/preact/hooks/dist/hooks.js.map +0 -1
- package/templates/static/node_modules/preact/hooks/dist/hooks.mjs +0 -2
- package/templates/static/node_modules/preact/hooks/dist/hooks.module.js +0 -2
- package/templates/static/node_modules/preact/hooks/dist/hooks.module.js.map +0 -1
- package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js +0 -2
- package/templates/static/node_modules/preact/hooks/dist/hooks.umd.js.map +0 -1
- package/templates/static/node_modules/preact/hooks/package.json +0 -35
- package/templates/static/node_modules/preact/hooks/src/index.d.ts +0 -145
- package/templates/static/node_modules/preact/hooks/src/index.js +0 -555
- package/templates/static/node_modules/preact/hooks/src/internal.d.ts +0 -103
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js +0 -2
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.js.map +0 -1
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.mjs +0 -2
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js +0 -2
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js.map +0 -1
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js +0 -2
- package/templates/static/node_modules/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +0 -1
- package/templates/static/node_modules/preact/jsx-runtime/package.json +0 -28
- package/templates/static/node_modules/preact/jsx-runtime/src/index.d.ts +0 -62
- package/templates/static/node_modules/preact/jsx-runtime/src/index.js +0 -206
- package/templates/static/node_modules/preact/jsx-runtime/src/utils.js +0 -36
- package/templates/static/node_modules/preact/package.json +0 -258
- package/templates/static/node_modules/preact/src/cjs.js +0 -3
- package/templates/static/node_modules/preact/src/clone-element.js +0 -48
- package/templates/static/node_modules/preact/src/component.js +0 -249
- package/templates/static/node_modules/preact/src/constants.js +0 -22
- package/templates/static/node_modules/preact/src/create-context.js +0 -60
- package/templates/static/node_modules/preact/src/create-element.js +0 -97
- package/templates/static/node_modules/preact/src/diff/catch-error.js +0 -46
- package/templates/static/node_modules/preact/src/diff/children.js +0 -451
- package/templates/static/node_modules/preact/src/diff/index.js +0 -684
- package/templates/static/node_modules/preact/src/diff/props.js +0 -173
- package/templates/static/node_modules/preact/src/dom.d.ts +0 -2476
- package/templates/static/node_modules/preact/src/index-5.d.ts +0 -399
- package/templates/static/node_modules/preact/src/index.d.ts +0 -402
- package/templates/static/node_modules/preact/src/index.js +0 -13
- package/templates/static/node_modules/preact/src/internal.d.ts +0 -190
- package/templates/static/node_modules/preact/src/jsx.d.ts +0 -2878
- package/templates/static/node_modules/preact/src/options.js +0 -16
- package/templates/static/node_modules/preact/src/render.js +0 -78
- package/templates/static/node_modules/preact/src/util.js +0 -28
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.js +0 -2
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.js.map +0 -1
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.mjs +0 -2
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js +0 -2
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.module.js.map +0 -1
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js +0 -2
- package/templates/static/node_modules/preact/test-utils/dist/testUtils.umd.js.map +0 -1
- package/templates/static/node_modules/preact/test-utils/package.json +0 -28
- package/templates/static/node_modules/preact/test-utils/src/index.d.ts +0 -3
- package/templates/static/node_modules/preact/test-utils/src/index.js +0 -129
- package/templates/static/node_modules/preact-render-to-string/LICENSE +0 -21
- package/templates/static/node_modules/preact-render-to-string/README.md +0 -149
- package/templates/static/node_modules/preact-render-to-string/dist/commonjs.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/index.d.ts +0 -17
- package/templates/static/node_modules/preact-render-to-string/dist/index.js +0 -6
- package/templates/static/node_modules/preact-render-to-string/dist/index.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/index.mjs +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/index.module.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/index.module.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/index.umd.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/internal.d.ts +0 -35
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/commonjs.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js +0 -4
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.mjs +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.module.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/jsx/index.umd.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/jsx.d.ts +0 -24
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.mjs +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.module.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js +0 -2
- package/templates/static/node_modules/preact-render-to-string/dist/stream/index.umd.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js +0 -884
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.mjs +0 -884
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js +0 -884
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.module.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js +0 -888
- package/templates/static/node_modules/preact-render-to-string/dist/stream/node/index.umd.js.map +0 -1
- package/templates/static/node_modules/preact-render-to-string/dist/stream-node.d.ts +0 -19
- package/templates/static/node_modules/preact-render-to-string/dist/stream.d.ts +0 -10
- package/templates/static/node_modules/preact-render-to-string/jsx.d.ts +0 -24
- package/templates/static/node_modules/preact-render-to-string/jsx.js +0 -1
- package/templates/static/node_modules/preact-render-to-string/package.json +0 -152
- package/templates/static/node_modules/preact-render-to-string/src/index.d.ts +0 -17
- package/templates/static/node_modules/preact-render-to-string/src/index.js +0 -764
- package/templates/static/node_modules/preact-render-to-string/src/internal.d.ts +0 -35
- package/templates/static/node_modules/preact-render-to-string/src/jsx.d.ts +0 -24
- package/templates/static/node_modules/preact-render-to-string/src/jsx.js +0 -102
- package/templates/static/node_modules/preact-render-to-string/src/lib/chunked.js +0 -97
- package/templates/static/node_modules/preact-render-to-string/src/lib/client.js +0 -62
- package/templates/static/node_modules/preact-render-to-string/src/lib/constants.js +0 -20
- package/templates/static/node_modules/preact-render-to-string/src/lib/polyfills.js +0 -8
- package/templates/static/node_modules/preact-render-to-string/src/lib/util.js +0 -208
- package/templates/static/node_modules/preact-render-to-string/src/pretty.js +0 -491
- package/templates/static/node_modules/preact-render-to-string/src/stream-node.d.ts +0 -19
- package/templates/static/node_modules/preact-render-to-string/src/stream-node.js +0 -84
- package/templates/static/node_modules/preact-render-to-string/src/stream.d.ts +0 -10
- package/templates/static/node_modules/preact-render-to-string/src/stream.js +0 -43
- package/templates/static/node_modules/preact-render-to-string/typings.json +0 -5
- package/templates/static/node_modules/sirv/build.js +0 -197
- package/templates/static/node_modules/sirv/build.mjs +0 -197
- package/templates/static/node_modules/sirv/index.d.mts +0 -29
- package/templates/static/node_modules/sirv/index.d.ts +0 -33
- package/templates/static/node_modules/sirv/package.json +0 -40
- package/templates/static/node_modules/sirv/readme.md +0 -238
- package/templates/static/node_modules/totalist/dist/index.js +0 -24
- package/templates/static/node_modules/totalist/dist/index.mjs +0 -22
- package/templates/static/node_modules/totalist/index.d.ts +0 -3
- package/templates/static/node_modules/totalist/license +0 -21
- package/templates/static/node_modules/totalist/package.json +0 -55
- package/templates/static/node_modules/totalist/readme.md +0 -109
- package/templates/static/node_modules/totalist/sync/index.d.ts +0 -3
- package/templates/static/node_modules/totalist/sync/index.js +0 -17
- package/templates/static/node_modules/totalist/sync/index.mjs +0 -15
- package/templates/static/node_modules/typescript/bin/tsc +0 -2
- package/templates/static/node_modules/typescript/bin/tsserver +0 -2
- package/templates/static/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/lib.d.ts +0 -22
- package/templates/static/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
- package/templates/static/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
- package/templates/static/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
- package/templates/static/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
- package/templates/static/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
- package/templates/static/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
- package/templates/static/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
- package/templates/static/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
- package/templates/static/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
- package/templates/static/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
- package/templates/static/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
- package/templates/static/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
- package/templates/static/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
- package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
- package/templates/static/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/templates/static/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
- package/templates/static/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
- package/templates/static/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
- package/templates/static/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
- package/templates/static/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
- package/templates/static/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
- package/templates/static/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
- package/templates/static/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
- package/templates/static/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
- package/templates/static/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
- package/templates/static/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
- package/templates/static/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
- package/templates/static/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
- package/templates/static/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
- package/templates/static/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
- package/templates/static/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
- package/templates/static/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
- package/templates/static/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
- package/templates/static/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
- package/templates/static/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
- package/templates/static/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
- package/templates/static/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
- package/templates/static/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
- package/templates/static/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
- package/templates/static/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
- package/templates/static/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
- package/templates/static/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
- package/templates/static/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/templates/static/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
- package/templates/static/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
- package/templates/static/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
- package/templates/static/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
- package/templates/static/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
- package/templates/static/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
- package/templates/static/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
- package/templates/static/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
- package/templates/static/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
- package/templates/static/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
- package/templates/static/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
- package/templates/static/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
- package/templates/static/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
- package/templates/static/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
- package/templates/static/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
- package/templates/static/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
- package/templates/static/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
- package/templates/static/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
- package/templates/static/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
- package/templates/static/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
- package/templates/static/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
- package/templates/static/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
- package/templates/static/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
- package/templates/static/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
- package/templates/static/node_modules/typescript/lib/lib.es6.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
- package/templates/static/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
- package/templates/static/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
- package/templates/static/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
- package/templates/static/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
- package/templates/static/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
- package/templates/static/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
- package/templates/static/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
- package/templates/static/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
- package/templates/static/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
- package/templates/static/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
- package/templates/static/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
- package/templates/static/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
- package/templates/static/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
- package/templates/static/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
- package/templates/static/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
- package/templates/static/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/templates/static/node_modules/typescript/lib/tsc.js +0 -8
- package/templates/static/node_modules/typescript/lib/tsserver.js +0 -8
- package/templates/static/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
- package/templates/static/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/templates/static/node_modules/typescript/lib/typescript.d.ts +0 -11437
- /package/templates/{static → ssr-isr}/lib/auth/index.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/cli/templates/ssg/jen.config.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/cli/templates/ssg/site/index.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/cli/templates/ssr/jen.config.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/cli/templates/ssr/site/index.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/compilers/esbuild-plugins.d.ts +0 -0
- /package/templates/{static/lib/middleware/types.d.ts → ssr-isr/lib/core/config.js} +0 -0
- /package/templates/{static → ssr-isr}/lib/middleware/errors/handler.d.ts +0 -0
- /package/templates/{static → ssr-isr}/lib/middleware/utils/matcher.d.ts +0 -0
- /package/templates/static/{node_modules → lib/vendor}/preact/LICENSE +0 -0
|
@@ -0,0 +1,4766 @@
|
|
|
1
|
+
import { fileURLToPath as t } from "node:url";
|
|
2
|
+
import { posix as e, win32 as i } from "node:path";
|
|
3
|
+
import { fileURLToPath as s } from "node:url";
|
|
4
|
+
import {
|
|
5
|
+
lstatSync as h,
|
|
6
|
+
readdir as r,
|
|
7
|
+
readdirSync as n,
|
|
8
|
+
readlinkSync as o,
|
|
9
|
+
realpathSync as a,
|
|
10
|
+
} from "fs";
|
|
11
|
+
import * as l from "node:fs";
|
|
12
|
+
import {
|
|
13
|
+
lstat as c,
|
|
14
|
+
readdir as u,
|
|
15
|
+
readlink as p,
|
|
16
|
+
realpath as d,
|
|
17
|
+
} from "node:fs/promises";
|
|
18
|
+
import { EventEmitter as f } from "node:events";
|
|
19
|
+
import g from "node:stream";
|
|
20
|
+
import { StringDecoder as m } from "node:string_decoder";
|
|
21
|
+
var Gt = (t, e, i) => {
|
|
22
|
+
let s = t instanceof RegExp ? ce(t, i) : t,
|
|
23
|
+
h = e instanceof RegExp ? ce(e, i) : e,
|
|
24
|
+
r = null !== s && null != h && ss(s, h, i);
|
|
25
|
+
return (
|
|
26
|
+
r && {
|
|
27
|
+
start: r[0],
|
|
28
|
+
end: r[1],
|
|
29
|
+
pre: i.slice(0, r[0]),
|
|
30
|
+
body: i.slice(r[0] + s.length, r[1]),
|
|
31
|
+
post: i.slice(r[1] + h.length),
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
},
|
|
35
|
+
ce = (t, e) => {
|
|
36
|
+
let i = e.match(t);
|
|
37
|
+
return i ? i[0] : null;
|
|
38
|
+
},
|
|
39
|
+
ss = (t, e, i) => {
|
|
40
|
+
let s,
|
|
41
|
+
h,
|
|
42
|
+
r,
|
|
43
|
+
n,
|
|
44
|
+
o,
|
|
45
|
+
a = i.indexOf(t),
|
|
46
|
+
l = i.indexOf(e, a + 1),
|
|
47
|
+
c = a;
|
|
48
|
+
if (a >= 0 && l > 0) {
|
|
49
|
+
if (t === e) return [a, l];
|
|
50
|
+
for (s = [], r = i.length; c >= 0 && !o; ) {
|
|
51
|
+
if (c === a) (s.push(c), (a = i.indexOf(t, c + 1)));
|
|
52
|
+
else if (1 === s.length) {
|
|
53
|
+
let u = s.pop();
|
|
54
|
+
void 0 !== u && (o = [u, l]);
|
|
55
|
+
} else
|
|
56
|
+
(void 0 !== (h = s.pop()) && h < r && ((r = h), (n = l)),
|
|
57
|
+
(l = i.indexOf(e, c + 1)));
|
|
58
|
+
c = a < l && a >= 0 ? a : l;
|
|
59
|
+
}
|
|
60
|
+
s.length && void 0 !== n && (o = [r, n]);
|
|
61
|
+
}
|
|
62
|
+
return o;
|
|
63
|
+
},
|
|
64
|
+
fe = "\0SLASH" + Math.random() + "\0",
|
|
65
|
+
ue = "\0OPEN" + Math.random() + "\0",
|
|
66
|
+
qt = "\0CLOSE" + Math.random() + "\0",
|
|
67
|
+
de = "\0COMMA" + Math.random() + "\0",
|
|
68
|
+
pe = "\0PERIOD" + Math.random() + "\0",
|
|
69
|
+
is = RegExp(fe, "g"),
|
|
70
|
+
rs = RegExp(ue, "g"),
|
|
71
|
+
ns = RegExp(qt, "g"),
|
|
72
|
+
os = RegExp(de, "g"),
|
|
73
|
+
hs = RegExp(pe, "g"),
|
|
74
|
+
as = /\\\\/g,
|
|
75
|
+
ls = /\\{/g,
|
|
76
|
+
cs = /\\}/g,
|
|
77
|
+
fs = /\\,/g,
|
|
78
|
+
us = /\\./g,
|
|
79
|
+
ds = 1e5;
|
|
80
|
+
function Ht(t) {
|
|
81
|
+
return isNaN(t) ? t.charCodeAt(0) : parseInt(t, 10);
|
|
82
|
+
}
|
|
83
|
+
function ps(t) {
|
|
84
|
+
return t
|
|
85
|
+
.replace(as, fe)
|
|
86
|
+
.replace(ls, ue)
|
|
87
|
+
.replace(cs, qt)
|
|
88
|
+
.replace(fs, de)
|
|
89
|
+
.replace(us, pe);
|
|
90
|
+
}
|
|
91
|
+
function ms(t) {
|
|
92
|
+
return t
|
|
93
|
+
.replace(is, "\\")
|
|
94
|
+
.replace(rs, "{")
|
|
95
|
+
.replace(ns, "}")
|
|
96
|
+
.replace(os, ",")
|
|
97
|
+
.replace(hs, ".");
|
|
98
|
+
}
|
|
99
|
+
function me(t) {
|
|
100
|
+
if (!t) return [""];
|
|
101
|
+
let e = [],
|
|
102
|
+
i = Gt("{", "}", t);
|
|
103
|
+
if (!i) return t.split(",");
|
|
104
|
+
let { pre: s, body: h, post: r } = i,
|
|
105
|
+
n = s.split(",");
|
|
106
|
+
n[n.length - 1] += "{" + h + "}";
|
|
107
|
+
let o = me(r);
|
|
108
|
+
return (
|
|
109
|
+
r.length && ((n[n.length - 1] += o.shift()), n.push.apply(n, o)),
|
|
110
|
+
e.push.apply(e, n),
|
|
111
|
+
e
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
function ge(t, e = {}) {
|
|
115
|
+
if (!t) return [];
|
|
116
|
+
let { max: i = ds } = e;
|
|
117
|
+
return (
|
|
118
|
+
"{}" === t.slice(0, 2) && (t = "\\{\\}" + t.slice(2)),
|
|
119
|
+
ht(ps(t), i, !0).map(ms)
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function gs(t) {
|
|
123
|
+
return "{" + t + "}";
|
|
124
|
+
}
|
|
125
|
+
function ws(t) {
|
|
126
|
+
return /^-?0\d/.test(t);
|
|
127
|
+
}
|
|
128
|
+
function ys(t, e) {
|
|
129
|
+
return t <= e;
|
|
130
|
+
}
|
|
131
|
+
function bs(t, e) {
|
|
132
|
+
return t >= e;
|
|
133
|
+
}
|
|
134
|
+
function ht(t, e, i) {
|
|
135
|
+
let s = [],
|
|
136
|
+
h = Gt("{", "}", t);
|
|
137
|
+
if (!h) return [t];
|
|
138
|
+
let r = h.pre,
|
|
139
|
+
n = h.post.length ? ht(h.post, e, !1) : [""];
|
|
140
|
+
if (/\$$/.test(h.pre))
|
|
141
|
+
for (let o = 0; o < n.length && o < e; o++) {
|
|
142
|
+
let a = r + "{" + h.body + "}" + n[o];
|
|
143
|
+
s.push(a);
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
let l = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(h.body),
|
|
147
|
+
c = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(h.body),
|
|
148
|
+
u = l || c,
|
|
149
|
+
p = h.body.indexOf(",") >= 0;
|
|
150
|
+
if (!u && !p)
|
|
151
|
+
return h.post.match(/,(?!,).*\}/)
|
|
152
|
+
? ht((t = h.pre + "{" + h.body + qt + h.post), e, !0)
|
|
153
|
+
: [t];
|
|
154
|
+
let d;
|
|
155
|
+
if (u) d = h.body.split(/\.\./);
|
|
156
|
+
else if (
|
|
157
|
+
1 === (d = me(h.body)).length &&
|
|
158
|
+
void 0 !== d[0] &&
|
|
159
|
+
1 === (d = ht(d[0], e, !1).map(gs)).length
|
|
160
|
+
)
|
|
161
|
+
return n.map((t) => h.pre + d[0] + t);
|
|
162
|
+
let f;
|
|
163
|
+
if (u && void 0 !== d[0] && void 0 !== d[1]) {
|
|
164
|
+
let g = Ht(d[0]),
|
|
165
|
+
m = Ht(d[1]),
|
|
166
|
+
w = Math.max(d[0].length, d[1].length),
|
|
167
|
+
$ = 3 === d.length && void 0 !== d[2] ? Math.abs(Ht(d[2])) : 1,
|
|
168
|
+
y = ys;
|
|
169
|
+
m < g && (($ *= -1), (y = bs));
|
|
170
|
+
let b = d.some(ws);
|
|
171
|
+
f = [];
|
|
172
|
+
for (let S = g; y(S, m); S += $) {
|
|
173
|
+
let E;
|
|
174
|
+
if (c) "\\" === (E = String.fromCharCode(S)) && (E = "");
|
|
175
|
+
else if (((E = String(S)), b)) {
|
|
176
|
+
let z = w - E.length;
|
|
177
|
+
if (z > 0) {
|
|
178
|
+
let Z = Array(z + 1).join("0");
|
|
179
|
+
E = S < 0 ? "-" + Z + E.slice(1) : Z + E;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
f.push(E);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
f = [];
|
|
186
|
+
for (let J = 0; J < d.length; J++) f.push.apply(f, ht(d[J], e, !1));
|
|
187
|
+
}
|
|
188
|
+
for (let th = 0; th < f.length; th++)
|
|
189
|
+
for (let tr = 0; tr < n.length && s.length < e; tr++) {
|
|
190
|
+
let tn = r + f[th] + n[tr];
|
|
191
|
+
(!i || u || tn) && s.push(tn);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return s;
|
|
195
|
+
}
|
|
196
|
+
var at = (t) => {
|
|
197
|
+
if ("string" != typeof t) throw TypeError("invalid pattern");
|
|
198
|
+
if (t.length > 65536) throw TypeError("pattern is too long");
|
|
199
|
+
},
|
|
200
|
+
Ss = {
|
|
201
|
+
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", !0],
|
|
202
|
+
"[:alpha:]": ["\\p{L}\\p{Nl}", !0],
|
|
203
|
+
"[:ascii:]": ["\\x00-\\x7f", !1],
|
|
204
|
+
"[:blank:]": ["\\p{Zs}\\t", !0],
|
|
205
|
+
"[:cntrl:]": ["\\p{Cc}", !0],
|
|
206
|
+
"[:digit:]": ["\\p{Nd}", !0],
|
|
207
|
+
"[:graph:]": ["\\p{Z}\\p{C}", !0, !0],
|
|
208
|
+
"[:lower:]": ["\\p{Ll}", !0],
|
|
209
|
+
"[:print:]": ["\\p{C}", !0],
|
|
210
|
+
"[:punct:]": ["\\p{P}", !0],
|
|
211
|
+
"[:space:]": ["\\p{Z}\\t\\r\\n\\v\\f", !0],
|
|
212
|
+
"[:upper:]": ["\\p{Lu}", !0],
|
|
213
|
+
"[:word:]": ["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}", !0],
|
|
214
|
+
"[:xdigit:]": ["A-Fa-f0-9", !1],
|
|
215
|
+
},
|
|
216
|
+
lt = (t) => t.replace(/[[\]\\-]/g, "\\$&"),
|
|
217
|
+
Es = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"),
|
|
218
|
+
we = (t) => t.join(""),
|
|
219
|
+
ye = (t, e) => {
|
|
220
|
+
let i = e;
|
|
221
|
+
if ("[" !== t.charAt(i)) throw Error("not in a brace expression");
|
|
222
|
+
let s = [],
|
|
223
|
+
h = [],
|
|
224
|
+
r = i + 1,
|
|
225
|
+
n = !1,
|
|
226
|
+
o = !1,
|
|
227
|
+
a = !1,
|
|
228
|
+
l = !1,
|
|
229
|
+
c = i,
|
|
230
|
+
u = "";
|
|
231
|
+
t: for (; r < t.length; ) {
|
|
232
|
+
let p = t.charAt(r);
|
|
233
|
+
if (("!" === p || "^" === p) && r === i + 1) {
|
|
234
|
+
((l = !0), r++);
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
if ("]" === p && n && !a) {
|
|
238
|
+
c = r + 1;
|
|
239
|
+
break;
|
|
240
|
+
}
|
|
241
|
+
if (((n = !0), "\\" === p && !a)) {
|
|
242
|
+
((a = !0), r++);
|
|
243
|
+
continue;
|
|
244
|
+
}
|
|
245
|
+
if ("[" === p && !a) {
|
|
246
|
+
for (let [d, [f, g, m]] of Object.entries(Ss))
|
|
247
|
+
if (t.startsWith(d, r)) {
|
|
248
|
+
if (u) return ["$.", !1, t.length - i, !0];
|
|
249
|
+
((r += d.length), m ? h.push(f) : s.push(f), (o = o || g));
|
|
250
|
+
continue t;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
if (((a = !1), u)) {
|
|
254
|
+
(p > u ? s.push(lt(u) + "-" + lt(p)) : p === u && s.push(lt(p)),
|
|
255
|
+
(u = ""),
|
|
256
|
+
r++);
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
if (t.startsWith("-]", r + 1)) {
|
|
260
|
+
(s.push(lt(p + "-")), (r += 2));
|
|
261
|
+
continue;
|
|
262
|
+
}
|
|
263
|
+
if (t.startsWith("-", r + 1)) {
|
|
264
|
+
((u = p), (r += 2));
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
(s.push(lt(p)), r++);
|
|
268
|
+
}
|
|
269
|
+
if (c < r) return ["", !1, 0, !1];
|
|
270
|
+
if (!s.length && !h.length) return ["$.", !1, t.length - i, !0];
|
|
271
|
+
if (0 === h.length && 1 === s.length && /^\\?.$/.test(s[0]) && !l)
|
|
272
|
+
return [Es(2 === s[0].length ? s[0].slice(-1) : s[0]), !1, c - i, !1];
|
|
273
|
+
let w = "[" + (l ? "^" : "") + we(s) + "]",
|
|
274
|
+
$ = "[" + (l ? "" : "^") + we(h) + "]";
|
|
275
|
+
return [
|
|
276
|
+
s.length && h.length ? "(" + w + "|" + $ + ")" : s.length ? w : $,
|
|
277
|
+
o,
|
|
278
|
+
c - i,
|
|
279
|
+
!0,
|
|
280
|
+
];
|
|
281
|
+
},
|
|
282
|
+
W = (t, { windowsPathsNoEscape: e = !1, magicalBraces: i = !0 } = {}) =>
|
|
283
|
+
i
|
|
284
|
+
? e
|
|
285
|
+
? t.replace(/\[([^\/\\])\]/g, "$1")
|
|
286
|
+
: t
|
|
287
|
+
.replace(/((?!\\).|^)\[([^\/\\])\]/g, "$1$2")
|
|
288
|
+
.replace(/\\([^\/])/g, "$1")
|
|
289
|
+
: e
|
|
290
|
+
? t.replace(/\[([^\/\\{}])\]/g, "$1")
|
|
291
|
+
: t
|
|
292
|
+
.replace(/((?!\\).|^)\[([^\/\\{}])\]/g, "$1$2")
|
|
293
|
+
.replace(/\\([^\/{}])/g, "$1"),
|
|
294
|
+
xs = new Set(["!", "?", "+", "*", "@"]),
|
|
295
|
+
be = (t) => xs.has(t),
|
|
296
|
+
vs = "(?!(?:^|/)\\.\\.?(?:$|/))",
|
|
297
|
+
Ct = "(?!\\.)",
|
|
298
|
+
Cs = new Set(["[", "."]),
|
|
299
|
+
Ts = new Set(["..", "."]),
|
|
300
|
+
As = new Set("().*{}+?[]^$\\!"),
|
|
301
|
+
ks = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"),
|
|
302
|
+
Kt = "[^/]",
|
|
303
|
+
Se = Kt + "*?",
|
|
304
|
+
Ee = Kt + "+?",
|
|
305
|
+
Q = class t {
|
|
306
|
+
type;
|
|
307
|
+
#a;
|
|
308
|
+
#b;
|
|
309
|
+
#c = !1;
|
|
310
|
+
#d = [];
|
|
311
|
+
#e;
|
|
312
|
+
#f;
|
|
313
|
+
#g;
|
|
314
|
+
#h = !1;
|
|
315
|
+
#i;
|
|
316
|
+
#j;
|
|
317
|
+
#k = !1;
|
|
318
|
+
constructor(t, e, i = {}) {
|
|
319
|
+
((this.type = t),
|
|
320
|
+
t && (this.#b = !0),
|
|
321
|
+
(this.#e = e),
|
|
322
|
+
(this.#a = this.#e ? this.#e.#a : this),
|
|
323
|
+
(this.#i = this.#a === this ? i : this.#a.#i),
|
|
324
|
+
(this.#g = this.#a === this ? [] : this.#a.#g),
|
|
325
|
+
"!" !== t || this.#a.#h || this.#g.push(this),
|
|
326
|
+
(this.#f = this.#e ? this.#e.#d.length : 0));
|
|
327
|
+
}
|
|
328
|
+
get hasMagic() {
|
|
329
|
+
if (void 0 !== this.#b) return this.#b;
|
|
330
|
+
for (let t of this.#d)
|
|
331
|
+
if ("string" != typeof t && (t.type || t.hasMagic))
|
|
332
|
+
return (this.#b = !0);
|
|
333
|
+
return this.#b;
|
|
334
|
+
}
|
|
335
|
+
toString() {
|
|
336
|
+
return void 0 !== this.#j
|
|
337
|
+
? this.#j
|
|
338
|
+
: this.type
|
|
339
|
+
? (this.#j =
|
|
340
|
+
this.type + "(" + this.#d.map((t) => String(t)).join("|") + ")")
|
|
341
|
+
: (this.#j = this.#d.map((t) => String(t)).join(""));
|
|
342
|
+
}
|
|
343
|
+
#l() {
|
|
344
|
+
if (this !== this.#a) throw Error("should only call on root");
|
|
345
|
+
if (this.#h) return this;
|
|
346
|
+
(this.toString(), (this.#h = !0));
|
|
347
|
+
let e;
|
|
348
|
+
for (; (e = this.#g.pop()); ) {
|
|
349
|
+
if ("!" !== e.type) continue;
|
|
350
|
+
let i = e,
|
|
351
|
+
s = i.#e;
|
|
352
|
+
for (; s; ) {
|
|
353
|
+
for (let h = i.#f + 1; !s.type && h < s.#d.length; h++)
|
|
354
|
+
for (let r of e.#d) {
|
|
355
|
+
if ("string" == typeof r)
|
|
356
|
+
throw Error("string part in extglob AST??");
|
|
357
|
+
r.copyIn(s.#d[h]);
|
|
358
|
+
}
|
|
359
|
+
s = (i = s).#e;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
return this;
|
|
363
|
+
}
|
|
364
|
+
push(...e) {
|
|
365
|
+
for (let i of e)
|
|
366
|
+
if ("" !== i) {
|
|
367
|
+
if ("string" != typeof i && !(i instanceof t && i.#e === this))
|
|
368
|
+
throw Error("invalid part: " + i);
|
|
369
|
+
this.#d.push(i);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
toJSON() {
|
|
373
|
+
let t =
|
|
374
|
+
null === this.type
|
|
375
|
+
? this.#d.slice().map((t) => ("string" == typeof t ? t : t.toJSON()))
|
|
376
|
+
: [this.type, ...this.#d.map((t) => t.toJSON())];
|
|
377
|
+
return (
|
|
378
|
+
this.isStart() && !this.type && t.unshift([]),
|
|
379
|
+
this.isEnd() &&
|
|
380
|
+
(this === this.#a || (this.#a.#h && this.#e?.type === "!")) &&
|
|
381
|
+
t.push({}),
|
|
382
|
+
t
|
|
383
|
+
);
|
|
384
|
+
}
|
|
385
|
+
isStart() {
|
|
386
|
+
if (this.#a === this) return !0;
|
|
387
|
+
if (!this.#e?.isStart()) return !1;
|
|
388
|
+
if (0 === this.#f) return !0;
|
|
389
|
+
let e = this.#e;
|
|
390
|
+
for (let i = 0; i < this.#f; i++) {
|
|
391
|
+
let s = e.#d[i];
|
|
392
|
+
if (!(s instanceof t && "!" === s.type)) return !1;
|
|
393
|
+
}
|
|
394
|
+
return !0;
|
|
395
|
+
}
|
|
396
|
+
isEnd() {
|
|
397
|
+
if (this.#a === this || this.#e?.type === "!") return !0;
|
|
398
|
+
if (!this.#e?.isEnd()) return !1;
|
|
399
|
+
if (!this.type) return this.#e?.isEnd();
|
|
400
|
+
let t = this.#e ? this.#e.#d.length : 0;
|
|
401
|
+
return this.#f === t - 1;
|
|
402
|
+
}
|
|
403
|
+
copyIn(t) {
|
|
404
|
+
"string" == typeof t ? this.push(t) : this.push(t.clone(this));
|
|
405
|
+
}
|
|
406
|
+
clone(e) {
|
|
407
|
+
let i = new t(this.type, e);
|
|
408
|
+
for (let s of this.#d) i.copyIn(s);
|
|
409
|
+
return i;
|
|
410
|
+
}
|
|
411
|
+
static #m(n, o, a, l) {
|
|
412
|
+
let c = !1,
|
|
413
|
+
u = !1,
|
|
414
|
+
p = -1,
|
|
415
|
+
d = !1;
|
|
416
|
+
if (null === o.type) {
|
|
417
|
+
let f = a,
|
|
418
|
+
g = "";
|
|
419
|
+
for (; f < n.length; ) {
|
|
420
|
+
let m = n.charAt(f++);
|
|
421
|
+
if (c || "\\" === m) {
|
|
422
|
+
((c = !c), (g += m));
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
if (u) {
|
|
426
|
+
(f === p + 1
|
|
427
|
+
? ("^" === m || "!" === m) && (d = !0)
|
|
428
|
+
: "]" !== m || (f === p + 2 && d) || (u = !1),
|
|
429
|
+
(g += m));
|
|
430
|
+
continue;
|
|
431
|
+
}
|
|
432
|
+
if ("[" === m) {
|
|
433
|
+
((u = !0), (p = f), (d = !1), (g += m));
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if (!l.noext && be(m) && "(" === n.charAt(f)) {
|
|
437
|
+
(o.push(g), (g = ""));
|
|
438
|
+
let w = new t(m, o);
|
|
439
|
+
((f = t.#m(n, w, f, l)), o.push(w));
|
|
440
|
+
continue;
|
|
441
|
+
}
|
|
442
|
+
g += m;
|
|
443
|
+
}
|
|
444
|
+
return (o.push(g), f);
|
|
445
|
+
}
|
|
446
|
+
let $ = a + 1,
|
|
447
|
+
y = new t(null, o),
|
|
448
|
+
b = [],
|
|
449
|
+
S = "";
|
|
450
|
+
for (; $ < n.length; ) {
|
|
451
|
+
let E = n.charAt($++);
|
|
452
|
+
if (c || "\\" === E) {
|
|
453
|
+
((c = !c), (S += E));
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
if (u) {
|
|
457
|
+
($ === p + 1
|
|
458
|
+
? ("^" === E || "!" === E) && (d = !0)
|
|
459
|
+
: "]" !== E || ($ === p + 2 && d) || (u = !1),
|
|
460
|
+
(S += E));
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
if ("[" === E) {
|
|
464
|
+
((u = !0), (p = $), (d = !1), (S += E));
|
|
465
|
+
continue;
|
|
466
|
+
}
|
|
467
|
+
if (be(E) && "(" === n.charAt($)) {
|
|
468
|
+
(y.push(S), (S = ""));
|
|
469
|
+
let z = new t(E, y);
|
|
470
|
+
(y.push(z), ($ = t.#m(n, z, $, l)));
|
|
471
|
+
continue;
|
|
472
|
+
}
|
|
473
|
+
if ("|" === E) {
|
|
474
|
+
(y.push(S), (S = ""), b.push(y), (y = new t(null, o)));
|
|
475
|
+
continue;
|
|
476
|
+
}
|
|
477
|
+
if (")" === E)
|
|
478
|
+
return (
|
|
479
|
+
"" === S && 0 === o.#d.length && (o.#k = !0),
|
|
480
|
+
y.push(S),
|
|
481
|
+
(S = ""),
|
|
482
|
+
o.push(...b, y),
|
|
483
|
+
$
|
|
484
|
+
);
|
|
485
|
+
S += E;
|
|
486
|
+
}
|
|
487
|
+
return (
|
|
488
|
+
(o.type = null),
|
|
489
|
+
(o.#b = void 0),
|
|
490
|
+
(o.#d = [n.substring(a - 1)]),
|
|
491
|
+
$
|
|
492
|
+
);
|
|
493
|
+
}
|
|
494
|
+
static fromGlob(e, i = {}) {
|
|
495
|
+
let s = new t(null, void 0, i);
|
|
496
|
+
return (t.#m(e, s, 0, i), s);
|
|
497
|
+
}
|
|
498
|
+
toMMPattern() {
|
|
499
|
+
if (this !== this.#a) return this.#a.toMMPattern();
|
|
500
|
+
let t = this.toString(),
|
|
501
|
+
[e, i, s, h] = this.toRegExpSource();
|
|
502
|
+
return s ||
|
|
503
|
+
this.#b ||
|
|
504
|
+
(this.#i.nocase &&
|
|
505
|
+
!this.#i.nocaseMagicOnly &&
|
|
506
|
+
t.toUpperCase() !== t.toLowerCase())
|
|
507
|
+
? Object.assign(
|
|
508
|
+
RegExp(`^${e}$`, (this.#i.nocase ? "i" : "") + (h ? "u" : "")),
|
|
509
|
+
{ _src: e, _glob: t },
|
|
510
|
+
)
|
|
511
|
+
: i;
|
|
512
|
+
}
|
|
513
|
+
get options() {
|
|
514
|
+
return this.#i;
|
|
515
|
+
}
|
|
516
|
+
toRegExpSource(e) {
|
|
517
|
+
let i = e ?? !!this.#i.dot;
|
|
518
|
+
if ((this.#a === this && this.#l(), !this.type)) {
|
|
519
|
+
let s =
|
|
520
|
+
this.isStart() &&
|
|
521
|
+
this.isEnd() &&
|
|
522
|
+
!this.#d.some((t) => "string" != typeof t),
|
|
523
|
+
h = this.#d
|
|
524
|
+
.map((i) => {
|
|
525
|
+
let [h, r, n, o] =
|
|
526
|
+
"string" == typeof i
|
|
527
|
+
? t.#n(i, this.#b, s)
|
|
528
|
+
: i.toRegExpSource(e);
|
|
529
|
+
return ((this.#b = this.#b || n), (this.#c = this.#c || o), h);
|
|
530
|
+
})
|
|
531
|
+
.join(""),
|
|
532
|
+
r = "";
|
|
533
|
+
if (
|
|
534
|
+
this.isStart() &&
|
|
535
|
+
"string" == typeof this.#d[0] &&
|
|
536
|
+
!(1 === this.#d.length && Ts.has(this.#d[0]))
|
|
537
|
+
) {
|
|
538
|
+
let n = Cs,
|
|
539
|
+
o =
|
|
540
|
+
(i && n.has(h.charAt(0))) ||
|
|
541
|
+
(h.startsWith("\\.") && n.has(h.charAt(2))) ||
|
|
542
|
+
(h.startsWith("\\.\\.") && n.has(h.charAt(4))),
|
|
543
|
+
a = !i && !e && n.has(h.charAt(0));
|
|
544
|
+
r = o ? vs : a ? Ct : "";
|
|
545
|
+
}
|
|
546
|
+
let l = "";
|
|
547
|
+
return (
|
|
548
|
+
this.isEnd() &&
|
|
549
|
+
this.#a.#h &&
|
|
550
|
+
this.#e?.type === "!" &&
|
|
551
|
+
(l = "(?:$|\\/)"),
|
|
552
|
+
[r + h + l, W(h), (this.#b = !!this.#b), this.#c]
|
|
553
|
+
);
|
|
554
|
+
}
|
|
555
|
+
let c = "*" === this.type || "+" === this.type,
|
|
556
|
+
u = "!" === this.type ? "(?:(?!(?:" : "(?:",
|
|
557
|
+
p = this.#o(i);
|
|
558
|
+
if (this.isStart() && this.isEnd() && !p && "!" !== this.type) {
|
|
559
|
+
let d = this.toString();
|
|
560
|
+
return (
|
|
561
|
+
(this.#d = [d]),
|
|
562
|
+
(this.type = null),
|
|
563
|
+
(this.#b = void 0),
|
|
564
|
+
[d, W(this.toString()), !1, !1]
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
let f = !c || e || i || !Ct ? "" : this.#o(!0);
|
|
568
|
+
(f === p && (f = ""), f && (p = `(?:${p})(?:${f})*?`));
|
|
569
|
+
let g = "";
|
|
570
|
+
if ("!" === this.type && this.#k)
|
|
571
|
+
g = (this.isStart() && !i ? Ct : "") + Ee;
|
|
572
|
+
else {
|
|
573
|
+
let m =
|
|
574
|
+
"!" === this.type
|
|
575
|
+
? "))" + (!this.isStart() || i || e ? "" : Ct) + Se + ")"
|
|
576
|
+
: "@" === this.type
|
|
577
|
+
? ")"
|
|
578
|
+
: "?" === this.type
|
|
579
|
+
? ")?"
|
|
580
|
+
: "+" === this.type && f
|
|
581
|
+
? ")"
|
|
582
|
+
: "*" === this.type && f
|
|
583
|
+
? ")?"
|
|
584
|
+
: `)${this.type}`;
|
|
585
|
+
g = u + p + m;
|
|
586
|
+
}
|
|
587
|
+
return [g, W(p), (this.#b = !!this.#b), this.#c];
|
|
588
|
+
}
|
|
589
|
+
#o(Z) {
|
|
590
|
+
return this.#d
|
|
591
|
+
.map((t) => {
|
|
592
|
+
if ("string" == typeof t) throw Error("string type in extglob ast??");
|
|
593
|
+
let [e, i, s, h] = t.toRegExpSource(Z);
|
|
594
|
+
return ((this.#c = this.#c || h), e);
|
|
595
|
+
})
|
|
596
|
+
.filter((t) => !(this.isStart() && this.isEnd()) || !!t)
|
|
597
|
+
.join("|");
|
|
598
|
+
}
|
|
599
|
+
static #n(J, th, tr = !1) {
|
|
600
|
+
let tn = !1,
|
|
601
|
+
to = "",
|
|
602
|
+
ta = !1,
|
|
603
|
+
tl = !1;
|
|
604
|
+
for (let tc = 0; tc < J.length; tc++) {
|
|
605
|
+
let tu = J.charAt(tc);
|
|
606
|
+
if (tn) {
|
|
607
|
+
((tn = !1), (to += (As.has(tu) ? "\\" : "") + tu));
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
610
|
+
if ("*" === tu) {
|
|
611
|
+
if (tl) continue;
|
|
612
|
+
((tl = !0), (to += tr && /^[*]+$/.test(J) ? Ee : Se), (th = !0));
|
|
613
|
+
continue;
|
|
614
|
+
}
|
|
615
|
+
if (((tl = !1), "\\" === tu)) {
|
|
616
|
+
tc === J.length - 1 ? (to += "\\\\") : (tn = !0);
|
|
617
|
+
continue;
|
|
618
|
+
}
|
|
619
|
+
if ("[" === tu) {
|
|
620
|
+
let [tp, td, tf, tg] = ye(J, tc);
|
|
621
|
+
if (tf) {
|
|
622
|
+
((to += tp), (ta = ta || td), (tc += tf - 1), (th = th || tg));
|
|
623
|
+
continue;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
if ("?" === tu) {
|
|
627
|
+
((to += Kt), (th = !0));
|
|
628
|
+
continue;
|
|
629
|
+
}
|
|
630
|
+
to += ks(tu);
|
|
631
|
+
}
|
|
632
|
+
return [to, W(J), !!th, ta];
|
|
633
|
+
}
|
|
634
|
+
},
|
|
635
|
+
tt = (t, { windowsPathsNoEscape: e = !1, magicalBraces: i = !1 } = {}) =>
|
|
636
|
+
i
|
|
637
|
+
? e
|
|
638
|
+
? t.replace(/[?*()[\]{}]/g, "[$&]")
|
|
639
|
+
: t.replace(/[?*()[\]\\{}]/g, "\\$&")
|
|
640
|
+
: e
|
|
641
|
+
? t.replace(/[?*()[\]]/g, "[$&]")
|
|
642
|
+
: t.replace(/[?*()[\]\\]/g, "\\$&"),
|
|
643
|
+
O = (t, e, i = {}) => (
|
|
644
|
+
at(e),
|
|
645
|
+
(!!i.nocomment || "#" !== e.charAt(0)) && new D(e, i).match(t)
|
|
646
|
+
),
|
|
647
|
+
Rs = /^\*+([^+@!?\*\[\(]*)$/,
|
|
648
|
+
Os = (t) => (e) => !e.startsWith(".") && e.endsWith(t),
|
|
649
|
+
Fs = (t) => (e) => e.endsWith(t),
|
|
650
|
+
Ds = (t) => (
|
|
651
|
+
(t = t.toLowerCase()),
|
|
652
|
+
(e) => !e.startsWith(".") && e.toLowerCase().endsWith(t)
|
|
653
|
+
),
|
|
654
|
+
Ms = (t) => ((t = t.toLowerCase()), (e) => e.toLowerCase().endsWith(t)),
|
|
655
|
+
Ns = /^\*+\.\*+$/,
|
|
656
|
+
_s = (t) => !t.startsWith(".") && t.includes("."),
|
|
657
|
+
Ls = (t) => "." !== t && ".." !== t && t.includes("."),
|
|
658
|
+
Ws = /^\.\*+$/,
|
|
659
|
+
Ps = (t) => "." !== t && ".." !== t && t.startsWith("."),
|
|
660
|
+
js = /^\*+$/,
|
|
661
|
+
Is = (t) => 0 !== t.length && !t.startsWith("."),
|
|
662
|
+
zs = (t) => 0 !== t.length && "." !== t && ".." !== t,
|
|
663
|
+
Bs = /^\?+([^+@!?\*\[\(]*)?$/,
|
|
664
|
+
Us = ([t, e = ""]) => {
|
|
665
|
+
let i = Ce([t]);
|
|
666
|
+
return e
|
|
667
|
+
? ((e = e.toLowerCase()), (t) => i(t) && t.toLowerCase().endsWith(e))
|
|
668
|
+
: i;
|
|
669
|
+
},
|
|
670
|
+
$s = ([t, e = ""]) => {
|
|
671
|
+
let i = Te([t]);
|
|
672
|
+
return e
|
|
673
|
+
? ((e = e.toLowerCase()), (t) => i(t) && t.toLowerCase().endsWith(e))
|
|
674
|
+
: i;
|
|
675
|
+
},
|
|
676
|
+
Gs = ([t, e = ""]) => {
|
|
677
|
+
let i = Te([t]);
|
|
678
|
+
return e ? (t) => i(t) && t.endsWith(e) : i;
|
|
679
|
+
},
|
|
680
|
+
Hs = ([t, e = ""]) => {
|
|
681
|
+
let i = Ce([t]);
|
|
682
|
+
return e ? (t) => i(t) && t.endsWith(e) : i;
|
|
683
|
+
},
|
|
684
|
+
Ce = ([t]) => {
|
|
685
|
+
let e = t.length;
|
|
686
|
+
return (t) => t.length === e && !t.startsWith(".");
|
|
687
|
+
},
|
|
688
|
+
Te = ([t]) => {
|
|
689
|
+
let e = t.length;
|
|
690
|
+
return (t) => t.length === e && "." !== t && ".." !== t;
|
|
691
|
+
},
|
|
692
|
+
Ae =
|
|
693
|
+
"object" == typeof process && process
|
|
694
|
+
? ("object" == typeof process.env &&
|
|
695
|
+
process.env &&
|
|
696
|
+
process.env.__MINIMATCH_TESTING_PLATFORM__) ||
|
|
697
|
+
process.platform
|
|
698
|
+
: "posix",
|
|
699
|
+
xe = { win32: { sep: "\\" }, posix: { sep: "/" } },
|
|
700
|
+
qs = "win32" === Ae ? xe.win32.sep : xe.posix.sep;
|
|
701
|
+
O.sep = qs;
|
|
702
|
+
var A = Symbol("globstar **");
|
|
703
|
+
O.GLOBSTAR = A;
|
|
704
|
+
var Ks = "[^/]",
|
|
705
|
+
Vs = Ks + "*?",
|
|
706
|
+
Ys = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",
|
|
707
|
+
Xs = "(?:(?!(?:\\/|^)\\.).)*?",
|
|
708
|
+
Js =
|
|
709
|
+
(t, e = {}) =>
|
|
710
|
+
(i) =>
|
|
711
|
+
O(i, t, e);
|
|
712
|
+
O.filter = Js;
|
|
713
|
+
var N = (t, e = {}) => Object.assign({}, t, e),
|
|
714
|
+
Zs = (t) => {
|
|
715
|
+
if (!t || "object" != typeof t || !Object.keys(t).length) return O;
|
|
716
|
+
let e = O;
|
|
717
|
+
return Object.assign((i, s, h = {}) => e(i, s, N(t, h)), {
|
|
718
|
+
Minimatch: class extends e.Minimatch {
|
|
719
|
+
constructor(e, i = {}) {
|
|
720
|
+
super(e, N(t, i));
|
|
721
|
+
}
|
|
722
|
+
static defaults(i) {
|
|
723
|
+
return e.defaults(N(t, i)).Minimatch;
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
AST: class extends e.AST {
|
|
727
|
+
constructor(e, i, s = {}) {
|
|
728
|
+
super(e, i, N(t, s));
|
|
729
|
+
}
|
|
730
|
+
static fromGlob(i, s = {}) {
|
|
731
|
+
return e.AST.fromGlob(i, N(t, s));
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
unescape: (i, s = {}) => e.unescape(i, N(t, s)),
|
|
735
|
+
escape: (i, s = {}) => e.escape(i, N(t, s)),
|
|
736
|
+
filter: (i, s = {}) => e.filter(i, N(t, s)),
|
|
737
|
+
defaults: (i) => e.defaults(N(t, i)),
|
|
738
|
+
makeRe: (i, s = {}) => e.makeRe(i, N(t, s)),
|
|
739
|
+
braceExpand: (i, s = {}) => e.braceExpand(i, N(t, s)),
|
|
740
|
+
match: (i, s, h = {}) => e.match(i, s, N(t, h)),
|
|
741
|
+
sep: e.sep,
|
|
742
|
+
GLOBSTAR: A,
|
|
743
|
+
});
|
|
744
|
+
};
|
|
745
|
+
O.defaults = Zs;
|
|
746
|
+
var ke = (t, e = {}) => (
|
|
747
|
+
at(t),
|
|
748
|
+
e.nobrace || !/\{(?:(?!\{).)*\}/.test(t)
|
|
749
|
+
? [t]
|
|
750
|
+
: ge(t, { max: e.braceExpandMax })
|
|
751
|
+
);
|
|
752
|
+
O.braceExpand = ke;
|
|
753
|
+
var Qs = (t, e = {}) => new D(t, e).makeRe();
|
|
754
|
+
O.makeRe = Qs;
|
|
755
|
+
var ti = (t, e, i = {}) => {
|
|
756
|
+
let s = new D(e, i);
|
|
757
|
+
return (
|
|
758
|
+
(t = t.filter((t) => s.match(t))),
|
|
759
|
+
s.options.nonull && !t.length && t.push(e),
|
|
760
|
+
t
|
|
761
|
+
);
|
|
762
|
+
};
|
|
763
|
+
O.match = ti;
|
|
764
|
+
var ve = /[?*]|[+@!]\(.*?\)|\[|\]/,
|
|
765
|
+
ei = (t) => t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&"),
|
|
766
|
+
D = class {
|
|
767
|
+
options;
|
|
768
|
+
set;
|
|
769
|
+
pattern;
|
|
770
|
+
windowsPathsNoEscape;
|
|
771
|
+
nonegate;
|
|
772
|
+
negate;
|
|
773
|
+
comment;
|
|
774
|
+
empty;
|
|
775
|
+
preserveMultipleSlashes;
|
|
776
|
+
partial;
|
|
777
|
+
globSet;
|
|
778
|
+
globParts;
|
|
779
|
+
nocase;
|
|
780
|
+
isWindows;
|
|
781
|
+
platform;
|
|
782
|
+
windowsNoMagicRoot;
|
|
783
|
+
regexp;
|
|
784
|
+
constructor(t, e = {}) {
|
|
785
|
+
(at(t),
|
|
786
|
+
(e = e || {}),
|
|
787
|
+
(this.options = e),
|
|
788
|
+
(this.pattern = t),
|
|
789
|
+
(this.platform = e.platform || Ae),
|
|
790
|
+
(this.isWindows = "win32" === this.platform));
|
|
791
|
+
let i = "allowWindowsEscape";
|
|
792
|
+
((this.windowsPathsNoEscape = !!e.windowsPathsNoEscape || !1 === e[i]),
|
|
793
|
+
this.windowsPathsNoEscape &&
|
|
794
|
+
(this.pattern = this.pattern.replace(/\\/g, "/")),
|
|
795
|
+
(this.preserveMultipleSlashes = !!e.preserveMultipleSlashes),
|
|
796
|
+
(this.regexp = null),
|
|
797
|
+
(this.negate = !1),
|
|
798
|
+
(this.nonegate = !!e.nonegate),
|
|
799
|
+
(this.comment = !1),
|
|
800
|
+
(this.empty = !1),
|
|
801
|
+
(this.partial = !!e.partial),
|
|
802
|
+
(this.nocase = !!this.options.nocase),
|
|
803
|
+
(this.windowsNoMagicRoot =
|
|
804
|
+
void 0 !== e.windowsNoMagicRoot
|
|
805
|
+
? e.windowsNoMagicRoot
|
|
806
|
+
: !!(this.isWindows && this.nocase)),
|
|
807
|
+
(this.globSet = []),
|
|
808
|
+
(this.globParts = []),
|
|
809
|
+
(this.set = []),
|
|
810
|
+
this.make());
|
|
811
|
+
}
|
|
812
|
+
hasMagic() {
|
|
813
|
+
if (this.options.magicalBraces && this.set.length > 1) return !0;
|
|
814
|
+
for (let t of this.set)
|
|
815
|
+
for (let e of t) if ("string" != typeof e) return !0;
|
|
816
|
+
return !1;
|
|
817
|
+
}
|
|
818
|
+
debug(...t) {}
|
|
819
|
+
make() {
|
|
820
|
+
let t = this.pattern,
|
|
821
|
+
e = this.options;
|
|
822
|
+
if (!e.nocomment && "#" === t.charAt(0)) {
|
|
823
|
+
this.comment = !0;
|
|
824
|
+
return;
|
|
825
|
+
}
|
|
826
|
+
if (!t) {
|
|
827
|
+
this.empty = !0;
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
(this.parseNegate(),
|
|
831
|
+
(this.globSet = [...new Set(this.braceExpand())]),
|
|
832
|
+
e.debug && (this.debug = (...t) => console.error(...t)),
|
|
833
|
+
this.debug(this.pattern, this.globSet));
|
|
834
|
+
let i = this.globSet.map((t) => this.slashSplit(t));
|
|
835
|
+
((this.globParts = this.preprocess(i)),
|
|
836
|
+
this.debug(this.pattern, this.globParts));
|
|
837
|
+
let s = this.globParts.map((t, e, i) => {
|
|
838
|
+
if (this.isWindows && this.windowsNoMagicRoot) {
|
|
839
|
+
let s =
|
|
840
|
+
"" === t[0] &&
|
|
841
|
+
"" === t[1] &&
|
|
842
|
+
("?" === t[2] || !ve.test(t[2])) &&
|
|
843
|
+
!ve.test(t[3]),
|
|
844
|
+
h = /^[a-z]:/i.test(t[0]);
|
|
845
|
+
if (s)
|
|
846
|
+
return [...t.slice(0, 4), ...t.slice(4).map((t) => this.parse(t))];
|
|
847
|
+
if (h) return [t[0], ...t.slice(1).map((t) => this.parse(t))];
|
|
848
|
+
}
|
|
849
|
+
return t.map((t) => this.parse(t));
|
|
850
|
+
});
|
|
851
|
+
if (
|
|
852
|
+
(this.debug(this.pattern, s),
|
|
853
|
+
(this.set = s.filter((t) => -1 === t.indexOf(!1))),
|
|
854
|
+
this.isWindows)
|
|
855
|
+
)
|
|
856
|
+
for (let h = 0; h < this.set.length; h++) {
|
|
857
|
+
let r = this.set[h];
|
|
858
|
+
"" === r[0] &&
|
|
859
|
+
"" === r[1] &&
|
|
860
|
+
"?" === this.globParts[h][2] &&
|
|
861
|
+
"string" == typeof r[3] &&
|
|
862
|
+
/^[a-z]:$/i.test(r[3]) &&
|
|
863
|
+
(r[2] = "?");
|
|
864
|
+
}
|
|
865
|
+
this.debug(this.pattern, this.set);
|
|
866
|
+
}
|
|
867
|
+
preprocess(t) {
|
|
868
|
+
if (this.options.noglobstar)
|
|
869
|
+
for (let e = 0; e < t.length; e++)
|
|
870
|
+
for (let i = 0; i < t[e].length; i++)
|
|
871
|
+
"**" === t[e][i] && (t[e][i] = "*");
|
|
872
|
+
let { optimizationLevel: s = 1 } = this.options;
|
|
873
|
+
return (
|
|
874
|
+
s >= 2
|
|
875
|
+
? ((t = this.firstPhasePreProcess(t)),
|
|
876
|
+
(t = this.secondPhasePreProcess(t)))
|
|
877
|
+
: (t =
|
|
878
|
+
s >= 1
|
|
879
|
+
? this.levelOneOptimize(t)
|
|
880
|
+
: this.adjascentGlobstarOptimize(t)),
|
|
881
|
+
t
|
|
882
|
+
);
|
|
883
|
+
}
|
|
884
|
+
adjascentGlobstarOptimize(t) {
|
|
885
|
+
return t.map((t) => {
|
|
886
|
+
let e = -1;
|
|
887
|
+
for (; -1 !== (e = t.indexOf("**", e + 1)); ) {
|
|
888
|
+
let i = e;
|
|
889
|
+
for (; "**" === t[i + 1]; ) i++;
|
|
890
|
+
i !== e && t.splice(e, i - e);
|
|
891
|
+
}
|
|
892
|
+
return t;
|
|
893
|
+
});
|
|
894
|
+
}
|
|
895
|
+
levelOneOptimize(t) {
|
|
896
|
+
return t.map((t) =>
|
|
897
|
+
0 ===
|
|
898
|
+
(t = t.reduce((t, e) => {
|
|
899
|
+
let i = t[t.length - 1];
|
|
900
|
+
return "**" === e && "**" === i
|
|
901
|
+
? t
|
|
902
|
+
: ".." === e && i && ".." !== i && "." !== i && "**" !== i
|
|
903
|
+
? (t.pop(), t)
|
|
904
|
+
: (t.push(e), t);
|
|
905
|
+
}, [])).length
|
|
906
|
+
? [""]
|
|
907
|
+
: t,
|
|
908
|
+
);
|
|
909
|
+
}
|
|
910
|
+
levelTwoFileOptimize(t) {
|
|
911
|
+
Array.isArray(t) || (t = this.slashSplit(t));
|
|
912
|
+
let e = !1;
|
|
913
|
+
do {
|
|
914
|
+
if (((e = !1), !this.preserveMultipleSlashes)) {
|
|
915
|
+
for (let i = 1; i < t.length - 1; i++) {
|
|
916
|
+
let s = t[i];
|
|
917
|
+
(1 === i && "" === s && "" === t[0]) ||
|
|
918
|
+
(("." === s || "" === s) && ((e = !0), t.splice(i, 1), i--));
|
|
919
|
+
}
|
|
920
|
+
"." === t[0] &&
|
|
921
|
+
2 === t.length &&
|
|
922
|
+
("." === t[1] || "" === t[1]) &&
|
|
923
|
+
((e = !0), t.pop());
|
|
924
|
+
}
|
|
925
|
+
let h = 0;
|
|
926
|
+
for (; -1 !== (h = t.indexOf("..", h + 1)); ) {
|
|
927
|
+
let r = t[h - 1];
|
|
928
|
+
r &&
|
|
929
|
+
"." !== r &&
|
|
930
|
+
".." !== r &&
|
|
931
|
+
"**" !== r &&
|
|
932
|
+
((e = !0), t.splice(h - 1, 2), (h -= 2));
|
|
933
|
+
}
|
|
934
|
+
} while (e);
|
|
935
|
+
return 0 === t.length ? [""] : t;
|
|
936
|
+
}
|
|
937
|
+
firstPhasePreProcess(t) {
|
|
938
|
+
let e = !1;
|
|
939
|
+
do
|
|
940
|
+
for (let i of ((e = !1), t)) {
|
|
941
|
+
let s = -1;
|
|
942
|
+
for (; -1 !== (s = i.indexOf("**", s + 1)); ) {
|
|
943
|
+
let h = s;
|
|
944
|
+
for (; "**" === i[h + 1]; ) h++;
|
|
945
|
+
h > s && i.splice(s + 1, h - s);
|
|
946
|
+
let r = i[s + 1],
|
|
947
|
+
n = i[s + 2],
|
|
948
|
+
o = i[s + 3];
|
|
949
|
+
if (
|
|
950
|
+
".." !== r ||
|
|
951
|
+
!n ||
|
|
952
|
+
"." === n ||
|
|
953
|
+
".." === n ||
|
|
954
|
+
!o ||
|
|
955
|
+
"." === o ||
|
|
956
|
+
".." === o
|
|
957
|
+
)
|
|
958
|
+
continue;
|
|
959
|
+
((e = !0), i.splice(s, 1));
|
|
960
|
+
let a = i.slice(0);
|
|
961
|
+
((a[s] = "**"), t.push(a), s--);
|
|
962
|
+
}
|
|
963
|
+
if (!this.preserveMultipleSlashes) {
|
|
964
|
+
for (let l = 1; l < i.length - 1; l++) {
|
|
965
|
+
let c = i[l];
|
|
966
|
+
(1 === l && "" === c && "" === i[0]) ||
|
|
967
|
+
(("." === c || "" === c) && ((e = !0), i.splice(l, 1), l--));
|
|
968
|
+
}
|
|
969
|
+
"." === i[0] &&
|
|
970
|
+
2 === i.length &&
|
|
971
|
+
("." === i[1] || "" === i[1]) &&
|
|
972
|
+
((e = !0), i.pop());
|
|
973
|
+
}
|
|
974
|
+
let u = 0;
|
|
975
|
+
for (; -1 !== (u = i.indexOf("..", u + 1)); ) {
|
|
976
|
+
let p = i[u - 1];
|
|
977
|
+
if (p && "." !== p && ".." !== p && "**" !== p) {
|
|
978
|
+
e = !0;
|
|
979
|
+
let d = 1 === u && "**" === i[u + 1] ? ["."] : [];
|
|
980
|
+
(i.splice(u - 1, 2, ...d),
|
|
981
|
+
0 === i.length && i.push(""),
|
|
982
|
+
(u -= 2));
|
|
983
|
+
}
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
while (e);
|
|
987
|
+
return t;
|
|
988
|
+
}
|
|
989
|
+
secondPhasePreProcess(t) {
|
|
990
|
+
for (let e = 0; e < t.length - 1; e++)
|
|
991
|
+
for (let i = e + 1; i < t.length; i++) {
|
|
992
|
+
let s = this.partsMatch(t[e], t[i], !this.preserveMultipleSlashes);
|
|
993
|
+
if (s) {
|
|
994
|
+
((t[e] = []), (t[i] = s));
|
|
995
|
+
break;
|
|
996
|
+
}
|
|
997
|
+
}
|
|
998
|
+
return t.filter((t) => t.length);
|
|
999
|
+
}
|
|
1000
|
+
partsMatch(t, e, i = !1) {
|
|
1001
|
+
let s = 0,
|
|
1002
|
+
h = 0,
|
|
1003
|
+
r = [],
|
|
1004
|
+
n = "";
|
|
1005
|
+
for (; s < t.length && h < e.length; )
|
|
1006
|
+
if (t[s] === e[h]) (r.push("b" === n ? e[h] : t[s]), s++, h++);
|
|
1007
|
+
else if (i && "**" === t[s] && e[h] === t[s + 1]) (r.push(t[s]), s++);
|
|
1008
|
+
else if (i && "**" === e[h] && t[s] === e[h + 1]) (r.push(e[h]), h++);
|
|
1009
|
+
else if (
|
|
1010
|
+
"*" === t[s] &&
|
|
1011
|
+
e[h] &&
|
|
1012
|
+
(this.options.dot || !e[h].startsWith(".")) &&
|
|
1013
|
+
"**" !== e[h]
|
|
1014
|
+
) {
|
|
1015
|
+
if ("b" === n) return !1;
|
|
1016
|
+
((n = "a"), r.push(t[s]), s++, h++);
|
|
1017
|
+
} else {
|
|
1018
|
+
if (
|
|
1019
|
+
"*" !== e[h] ||
|
|
1020
|
+
!t[s] ||
|
|
1021
|
+
(!this.options.dot && t[s].startsWith(".")) ||
|
|
1022
|
+
"**" === t[s] ||
|
|
1023
|
+
"a" === n
|
|
1024
|
+
)
|
|
1025
|
+
return !1;
|
|
1026
|
+
((n = "b"), r.push(e[h]), s++, h++);
|
|
1027
|
+
}
|
|
1028
|
+
return t.length === e.length && r;
|
|
1029
|
+
}
|
|
1030
|
+
parseNegate() {
|
|
1031
|
+
if (this.nonegate) return;
|
|
1032
|
+
let t = this.pattern,
|
|
1033
|
+
e = !1,
|
|
1034
|
+
i = 0;
|
|
1035
|
+
for (let s = 0; s < t.length && "!" === t.charAt(s); s++) ((e = !e), i++);
|
|
1036
|
+
(i && (this.pattern = t.slice(i)), (this.negate = e));
|
|
1037
|
+
}
|
|
1038
|
+
matchOne(t, e, i = !1) {
|
|
1039
|
+
let s = this.options;
|
|
1040
|
+
if (this.isWindows) {
|
|
1041
|
+
let h = "string" == typeof t[0] && /^[a-z]:$/i.test(t[0]),
|
|
1042
|
+
r =
|
|
1043
|
+
!h &&
|
|
1044
|
+
"" === t[0] &&
|
|
1045
|
+
"" === t[1] &&
|
|
1046
|
+
"?" === t[2] &&
|
|
1047
|
+
/^[a-z]:$/i.test(t[3]),
|
|
1048
|
+
n = "string" == typeof e[0] && /^[a-z]:$/i.test(e[0]),
|
|
1049
|
+
o =
|
|
1050
|
+
!n &&
|
|
1051
|
+
"" === e[0] &&
|
|
1052
|
+
"" === e[1] &&
|
|
1053
|
+
"?" === e[2] &&
|
|
1054
|
+
"string" == typeof e[3] &&
|
|
1055
|
+
/^[a-z]:$/i.test(e[3]),
|
|
1056
|
+
a = r ? 3 : h ? 0 : void 0,
|
|
1057
|
+
l = o ? 3 : n ? 0 : void 0;
|
|
1058
|
+
if ("number" == typeof a && "number" == typeof l) {
|
|
1059
|
+
let [c, u] = [t[a], e[l]];
|
|
1060
|
+
c.toLowerCase() === u.toLowerCase() &&
|
|
1061
|
+
((e[l] = c), l > a ? (e = e.slice(l)) : a > l && (t = t.slice(a)));
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
let { optimizationLevel: p = 1 } = this.options;
|
|
1065
|
+
(p >= 2 && (t = this.levelTwoFileOptimize(t)),
|
|
1066
|
+
this.debug("matchOne", this, { file: t, pattern: e }),
|
|
1067
|
+
this.debug("matchOne", t.length, e.length));
|
|
1068
|
+
for (
|
|
1069
|
+
var d = 0, f = 0, g = t.length, m = e.length;
|
|
1070
|
+
d < g && f < m;
|
|
1071
|
+
d++, f++
|
|
1072
|
+
) {
|
|
1073
|
+
this.debug("matchOne loop");
|
|
1074
|
+
var w = e[f],
|
|
1075
|
+
$ = t[d];
|
|
1076
|
+
if ((this.debug(e, w, $), !1 === w)) return !1;
|
|
1077
|
+
if (w === A) {
|
|
1078
|
+
this.debug("GLOBSTAR", [e, w, $]);
|
|
1079
|
+
var y = d,
|
|
1080
|
+
b = f + 1;
|
|
1081
|
+
if (b === m) {
|
|
1082
|
+
for (this.debug("** at the end"); d < g; d++)
|
|
1083
|
+
if (
|
|
1084
|
+
"." === t[d] ||
|
|
1085
|
+
".." === t[d] ||
|
|
1086
|
+
(!s.dot && "." === t[d].charAt(0))
|
|
1087
|
+
)
|
|
1088
|
+
return !1;
|
|
1089
|
+
return !0;
|
|
1090
|
+
}
|
|
1091
|
+
for (; y < g; ) {
|
|
1092
|
+
var S = t[y];
|
|
1093
|
+
if (
|
|
1094
|
+
(this.debug(
|
|
1095
|
+
`
|
|
1096
|
+
globstar while`,
|
|
1097
|
+
t,
|
|
1098
|
+
y,
|
|
1099
|
+
e,
|
|
1100
|
+
b,
|
|
1101
|
+
S,
|
|
1102
|
+
),
|
|
1103
|
+
this.matchOne(t.slice(y), e.slice(b), i))
|
|
1104
|
+
)
|
|
1105
|
+
return (this.debug("globstar found match!", y, g, S), !0);
|
|
1106
|
+
if ("." === S || ".." === S || (!s.dot && "." === S.charAt(0))) {
|
|
1107
|
+
this.debug("dot detected!", t, y, e, b);
|
|
1108
|
+
break;
|
|
1109
|
+
}
|
|
1110
|
+
(this.debug("globstar swallow a segment, and continue"), y++);
|
|
1111
|
+
}
|
|
1112
|
+
return !!(
|
|
1113
|
+
i &&
|
|
1114
|
+
(this.debug(
|
|
1115
|
+
`
|
|
1116
|
+
>>> no match, partial?`,
|
|
1117
|
+
t,
|
|
1118
|
+
y,
|
|
1119
|
+
e,
|
|
1120
|
+
b,
|
|
1121
|
+
),
|
|
1122
|
+
y === g)
|
|
1123
|
+
);
|
|
1124
|
+
}
|
|
1125
|
+
let E;
|
|
1126
|
+
if (
|
|
1127
|
+
("string" == typeof w
|
|
1128
|
+
? ((E = $ === w), this.debug("string match", w, $, E))
|
|
1129
|
+
: ((E = w.test($)), this.debug("pattern match", w, $, E)),
|
|
1130
|
+
!E)
|
|
1131
|
+
)
|
|
1132
|
+
return !1;
|
|
1133
|
+
}
|
|
1134
|
+
if (d === g && f === m) return !0;
|
|
1135
|
+
if (d === g) return i;
|
|
1136
|
+
if (f === m) return d === g - 1 && "" === t[d];
|
|
1137
|
+
throw Error("wtf?");
|
|
1138
|
+
}
|
|
1139
|
+
braceExpand() {
|
|
1140
|
+
return ke(this.pattern, this.options);
|
|
1141
|
+
}
|
|
1142
|
+
parse(t) {
|
|
1143
|
+
at(t);
|
|
1144
|
+
let e = this.options;
|
|
1145
|
+
if ("**" === t) return A;
|
|
1146
|
+
if ("" === t) return "";
|
|
1147
|
+
let i,
|
|
1148
|
+
s = null;
|
|
1149
|
+
(i = t.match(js))
|
|
1150
|
+
? (s = e.dot ? zs : Is)
|
|
1151
|
+
: (i = t.match(Rs))
|
|
1152
|
+
? (s = (e.nocase ? (e.dot ? Ms : Ds) : e.dot ? Fs : Os)(i[1]))
|
|
1153
|
+
: (i = t.match(Bs))
|
|
1154
|
+
? (s = (e.nocase ? (e.dot ? $s : Us) : e.dot ? Gs : Hs)(i))
|
|
1155
|
+
: (i = t.match(Ns))
|
|
1156
|
+
? (s = e.dot ? Ls : _s)
|
|
1157
|
+
: (i = t.match(Ws)) && (s = Ps);
|
|
1158
|
+
let h = Q.fromGlob(t, this.options).toMMPattern();
|
|
1159
|
+
return (
|
|
1160
|
+
s &&
|
|
1161
|
+
"object" == typeof h &&
|
|
1162
|
+
Reflect.defineProperty(h, "test", { value: s }),
|
|
1163
|
+
h
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
makeRe() {
|
|
1167
|
+
if (this.regexp || !1 === this.regexp) return this.regexp;
|
|
1168
|
+
let t = this.set;
|
|
1169
|
+
if (!t.length) return ((this.regexp = !1), this.regexp);
|
|
1170
|
+
let e = this.options,
|
|
1171
|
+
i = e.noglobstar ? Vs : e.dot ? Ys : Xs,
|
|
1172
|
+
s = new Set(e.nocase ? ["i"] : []),
|
|
1173
|
+
h = t
|
|
1174
|
+
.map((t) => {
|
|
1175
|
+
let e = t.map((t) => {
|
|
1176
|
+
if (t instanceof RegExp)
|
|
1177
|
+
for (let e of t.flags.split("")) s.add(e);
|
|
1178
|
+
return "string" == typeof t ? ei(t) : t === A ? A : t._src;
|
|
1179
|
+
});
|
|
1180
|
+
e.forEach((t, s) => {
|
|
1181
|
+
let h = e[s + 1],
|
|
1182
|
+
r = e[s - 1];
|
|
1183
|
+
t !== A ||
|
|
1184
|
+
r === A ||
|
|
1185
|
+
(void 0 === r
|
|
1186
|
+
? void 0 !== h && h !== A
|
|
1187
|
+
? (e[s + 1] = "(?:\\/|" + i + "\\/)?" + h)
|
|
1188
|
+
: (e[s] = i)
|
|
1189
|
+
: void 0 === h
|
|
1190
|
+
? (e[s - 1] = r + "(?:\\/|\\/" + i + ")?")
|
|
1191
|
+
: h !== A &&
|
|
1192
|
+
((e[s - 1] = r + "(?:\\/|\\/" + i + "\\/)" + h),
|
|
1193
|
+
(e[s + 1] = A)));
|
|
1194
|
+
});
|
|
1195
|
+
let h = e.filter((t) => t !== A);
|
|
1196
|
+
if (this.partial && h.length >= 1) {
|
|
1197
|
+
let r = [];
|
|
1198
|
+
for (let n = 1; n <= h.length; n++)
|
|
1199
|
+
r.push(h.slice(0, n).join("/"));
|
|
1200
|
+
return "(?:" + r.join("|") + ")";
|
|
1201
|
+
}
|
|
1202
|
+
return h.join("/");
|
|
1203
|
+
})
|
|
1204
|
+
.join("|"),
|
|
1205
|
+
[r, n] = t.length > 1 ? ["(?:", ")"] : ["", ""];
|
|
1206
|
+
((h = "^" + r + h + n + "$"),
|
|
1207
|
+
this.partial && (h = "^(?:\\/|" + r + h.slice(1, -1) + n + ")$"),
|
|
1208
|
+
this.negate && (h = "^(?!" + h + ").+$"));
|
|
1209
|
+
try {
|
|
1210
|
+
this.regexp = RegExp(h, [...s].join(""));
|
|
1211
|
+
} catch {
|
|
1212
|
+
this.regexp = !1;
|
|
1213
|
+
}
|
|
1214
|
+
return this.regexp;
|
|
1215
|
+
}
|
|
1216
|
+
slashSplit(t) {
|
|
1217
|
+
return this.preserveMultipleSlashes
|
|
1218
|
+
? t.split("/")
|
|
1219
|
+
: this.isWindows && /^\/\/[^\/]+/.test(t)
|
|
1220
|
+
? ["", ...t.split(/\/+/)]
|
|
1221
|
+
: t.split(/\/+/);
|
|
1222
|
+
}
|
|
1223
|
+
match(t, e = this.partial) {
|
|
1224
|
+
if ((this.debug("match", t, this.pattern), this.comment)) return !1;
|
|
1225
|
+
if (this.empty) return "" === t;
|
|
1226
|
+
if ("/" === t && e) return !0;
|
|
1227
|
+
let i = this.options;
|
|
1228
|
+
this.isWindows && (t = t.split("\\").join("/"));
|
|
1229
|
+
let s = this.slashSplit(t);
|
|
1230
|
+
this.debug(this.pattern, "split", s);
|
|
1231
|
+
let h = this.set;
|
|
1232
|
+
this.debug(this.pattern, "set", h);
|
|
1233
|
+
let r = s[s.length - 1];
|
|
1234
|
+
if (!r) for (let n = s.length - 2; !r && n >= 0; n--) r = s[n];
|
|
1235
|
+
for (let o = 0; o < h.length; o++) {
|
|
1236
|
+
let a = h[o],
|
|
1237
|
+
l = s;
|
|
1238
|
+
if (
|
|
1239
|
+
(i.matchBase && 1 === a.length && (l = [r]), this.matchOne(l, a, e))
|
|
1240
|
+
)
|
|
1241
|
+
return !!i.flipNegate || !this.negate;
|
|
1242
|
+
}
|
|
1243
|
+
return !i.flipNegate && this.negate;
|
|
1244
|
+
}
|
|
1245
|
+
static defaults(t) {
|
|
1246
|
+
return O.defaults(t).Minimatch;
|
|
1247
|
+
}
|
|
1248
|
+
};
|
|
1249
|
+
((O.AST = Q), (O.Minimatch = D), (O.escape = tt), (O.unescape = W));
|
|
1250
|
+
var si =
|
|
1251
|
+
"object" == typeof performance &&
|
|
1252
|
+
performance &&
|
|
1253
|
+
"function" == typeof performance.now
|
|
1254
|
+
? performance
|
|
1255
|
+
: Date,
|
|
1256
|
+
Oe = new Set(),
|
|
1257
|
+
Vt = "object" == typeof process && process ? process : {},
|
|
1258
|
+
Fe = (t, e, i, s) => {
|
|
1259
|
+
"function" == typeof Vt.emitWarning
|
|
1260
|
+
? Vt.emitWarning(t, e, i, s)
|
|
1261
|
+
: console.error(`[${i}] ${e}: ${t}`);
|
|
1262
|
+
},
|
|
1263
|
+
At = globalThis.AbortController,
|
|
1264
|
+
Re = globalThis.AbortSignal;
|
|
1265
|
+
if (typeof At > "u") {
|
|
1266
|
+
At = class {
|
|
1267
|
+
constructor() {
|
|
1268
|
+
$();
|
|
1269
|
+
}
|
|
1270
|
+
signal = new (Re = class {
|
|
1271
|
+
onabort;
|
|
1272
|
+
_onabort = [];
|
|
1273
|
+
reason;
|
|
1274
|
+
aborted = !1;
|
|
1275
|
+
addEventListener(t, e) {
|
|
1276
|
+
this._onabort.push(e);
|
|
1277
|
+
}
|
|
1278
|
+
})();
|
|
1279
|
+
abort(t) {
|
|
1280
|
+
if (!this.signal.aborted) {
|
|
1281
|
+
for (let e of ((this.signal.reason = t),
|
|
1282
|
+
(this.signal.aborted = !0),
|
|
1283
|
+
this.signal._onabort))
|
|
1284
|
+
e(t);
|
|
1285
|
+
this.signal.onabort?.(t);
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
};
|
|
1289
|
+
let w = Vt.env?.LRU_CACHE_IGNORE_AC_WARNING !== "1",
|
|
1290
|
+
$ = () => {
|
|
1291
|
+
w &&
|
|
1292
|
+
((w = !1),
|
|
1293
|
+
Fe(
|
|
1294
|
+
"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.",
|
|
1295
|
+
"NO_ABORT_CONTROLLER",
|
|
1296
|
+
"ENOTSUP",
|
|
1297
|
+
$,
|
|
1298
|
+
));
|
|
1299
|
+
};
|
|
1300
|
+
}
|
|
1301
|
+
var ii = (t) => !Oe.has(t),
|
|
1302
|
+
q = (t) => t && t === Math.floor(t) && t > 0 && isFinite(t),
|
|
1303
|
+
De = (t) =>
|
|
1304
|
+
q(t)
|
|
1305
|
+
? t <= 256
|
|
1306
|
+
? Uint8Array
|
|
1307
|
+
: t <= 65536
|
|
1308
|
+
? Uint16Array
|
|
1309
|
+
: t <= 4294967296
|
|
1310
|
+
? Uint32Array
|
|
1311
|
+
: t <= Number.MAX_SAFE_INTEGER
|
|
1312
|
+
? Tt
|
|
1313
|
+
: null
|
|
1314
|
+
: null,
|
|
1315
|
+
Tt = class extends Array {
|
|
1316
|
+
constructor(t) {
|
|
1317
|
+
(super(t), this.fill(0));
|
|
1318
|
+
}
|
|
1319
|
+
},
|
|
1320
|
+
ri = class t {
|
|
1321
|
+
heap;
|
|
1322
|
+
length;
|
|
1323
|
+
static #a = !1;
|
|
1324
|
+
static create(e) {
|
|
1325
|
+
let i = De(e);
|
|
1326
|
+
if (!i) return [];
|
|
1327
|
+
t.#a = !0;
|
|
1328
|
+
let s = new t(e, i);
|
|
1329
|
+
return ((t.#a = !1), s);
|
|
1330
|
+
}
|
|
1331
|
+
constructor(e, i) {
|
|
1332
|
+
if (!t.#a) throw TypeError("instantiate Stack using Stack.create(n)");
|
|
1333
|
+
((this.heap = new i(e)), (this.length = 0));
|
|
1334
|
+
}
|
|
1335
|
+
push(t) {
|
|
1336
|
+
this.heap[this.length++] = t;
|
|
1337
|
+
}
|
|
1338
|
+
pop() {
|
|
1339
|
+
return this.heap[--this.length];
|
|
1340
|
+
}
|
|
1341
|
+
},
|
|
1342
|
+
ft = class t {
|
|
1343
|
+
#a;
|
|
1344
|
+
#b;
|
|
1345
|
+
#c;
|
|
1346
|
+
#d;
|
|
1347
|
+
#e;
|
|
1348
|
+
#f;
|
|
1349
|
+
#g;
|
|
1350
|
+
#h;
|
|
1351
|
+
get perf() {
|
|
1352
|
+
return this.#h;
|
|
1353
|
+
}
|
|
1354
|
+
ttl;
|
|
1355
|
+
ttlResolution;
|
|
1356
|
+
ttlAutopurge;
|
|
1357
|
+
updateAgeOnGet;
|
|
1358
|
+
updateAgeOnHas;
|
|
1359
|
+
allowStale;
|
|
1360
|
+
noDisposeOnSet;
|
|
1361
|
+
noUpdateTTL;
|
|
1362
|
+
maxEntrySize;
|
|
1363
|
+
sizeCalculation;
|
|
1364
|
+
noDeleteOnFetchRejection;
|
|
1365
|
+
noDeleteOnStaleGet;
|
|
1366
|
+
allowStaleOnFetchAbort;
|
|
1367
|
+
allowStaleOnFetchRejection;
|
|
1368
|
+
ignoreFetchAbort;
|
|
1369
|
+
#i;
|
|
1370
|
+
#j;
|
|
1371
|
+
#k;
|
|
1372
|
+
#l;
|
|
1373
|
+
#m;
|
|
1374
|
+
#o;
|
|
1375
|
+
#n;
|
|
1376
|
+
#p;
|
|
1377
|
+
#q;
|
|
1378
|
+
#r;
|
|
1379
|
+
#s;
|
|
1380
|
+
#t;
|
|
1381
|
+
#u;
|
|
1382
|
+
#v;
|
|
1383
|
+
#w;
|
|
1384
|
+
#x;
|
|
1385
|
+
#y;
|
|
1386
|
+
#z;
|
|
1387
|
+
#A;
|
|
1388
|
+
static unsafeExposeInternals(t) {
|
|
1389
|
+
return {
|
|
1390
|
+
starts: t.#u,
|
|
1391
|
+
ttls: t.#v,
|
|
1392
|
+
autopurgeTimers: t.#w,
|
|
1393
|
+
sizes: t.#t,
|
|
1394
|
+
keyMap: t.#k,
|
|
1395
|
+
keyList: t.#l,
|
|
1396
|
+
valList: t.#m,
|
|
1397
|
+
next: t.#o,
|
|
1398
|
+
prev: t.#n,
|
|
1399
|
+
get head() {
|
|
1400
|
+
return t.#p;
|
|
1401
|
+
},
|
|
1402
|
+
get tail() {
|
|
1403
|
+
return t.#q;
|
|
1404
|
+
},
|
|
1405
|
+
free: t.#r,
|
|
1406
|
+
isBackgroundFetch: (e) => t.#B(e),
|
|
1407
|
+
backgroundFetch: (e, i, s, h) => t.#C(e, i, s, h),
|
|
1408
|
+
moveToTail: (e) => t.#D(e),
|
|
1409
|
+
indexes: (e) => t.#E(e),
|
|
1410
|
+
rindexes: (e) => t.#F(e),
|
|
1411
|
+
isStale: (e) => t.#G(e),
|
|
1412
|
+
};
|
|
1413
|
+
}
|
|
1414
|
+
get max() {
|
|
1415
|
+
return this.#a;
|
|
1416
|
+
}
|
|
1417
|
+
get maxSize() {
|
|
1418
|
+
return this.#b;
|
|
1419
|
+
}
|
|
1420
|
+
get calculatedSize() {
|
|
1421
|
+
return this.#j;
|
|
1422
|
+
}
|
|
1423
|
+
get size() {
|
|
1424
|
+
return this.#i;
|
|
1425
|
+
}
|
|
1426
|
+
get fetchMethod() {
|
|
1427
|
+
return this.#f;
|
|
1428
|
+
}
|
|
1429
|
+
get memoMethod() {
|
|
1430
|
+
return this.#g;
|
|
1431
|
+
}
|
|
1432
|
+
get dispose() {
|
|
1433
|
+
return this.#c;
|
|
1434
|
+
}
|
|
1435
|
+
get onInsert() {
|
|
1436
|
+
return this.#d;
|
|
1437
|
+
}
|
|
1438
|
+
get disposeAfter() {
|
|
1439
|
+
return this.#e;
|
|
1440
|
+
}
|
|
1441
|
+
constructor(e) {
|
|
1442
|
+
let {
|
|
1443
|
+
max: i = 0,
|
|
1444
|
+
ttl: s,
|
|
1445
|
+
ttlResolution: h = 1,
|
|
1446
|
+
ttlAutopurge: r,
|
|
1447
|
+
updateAgeOnGet: n,
|
|
1448
|
+
updateAgeOnHas: o,
|
|
1449
|
+
allowStale: a,
|
|
1450
|
+
dispose: l,
|
|
1451
|
+
onInsert: c,
|
|
1452
|
+
disposeAfter: u,
|
|
1453
|
+
noDisposeOnSet: p,
|
|
1454
|
+
noUpdateTTL: d,
|
|
1455
|
+
maxSize: f = 0,
|
|
1456
|
+
maxEntrySize: g = 0,
|
|
1457
|
+
sizeCalculation: m,
|
|
1458
|
+
fetchMethod: w,
|
|
1459
|
+
memoMethod: $,
|
|
1460
|
+
noDeleteOnFetchRejection: y,
|
|
1461
|
+
noDeleteOnStaleGet: b,
|
|
1462
|
+
allowStaleOnFetchRejection: S,
|
|
1463
|
+
allowStaleOnFetchAbort: E,
|
|
1464
|
+
ignoreFetchAbort: z,
|
|
1465
|
+
perf: Z,
|
|
1466
|
+
} = e;
|
|
1467
|
+
if (void 0 !== Z && "function" != typeof Z?.now)
|
|
1468
|
+
throw TypeError("perf option must have a now() method if specified");
|
|
1469
|
+
if (((this.#h = Z ?? si), 0 !== i && !q(i)))
|
|
1470
|
+
throw TypeError("max option must be a nonnegative integer");
|
|
1471
|
+
let J = i ? De(i) : Array;
|
|
1472
|
+
if (!J) throw Error("invalid max value: " + i);
|
|
1473
|
+
if (
|
|
1474
|
+
((this.#a = i),
|
|
1475
|
+
(this.#b = f),
|
|
1476
|
+
(this.maxEntrySize = g || this.#b),
|
|
1477
|
+
(this.sizeCalculation = m),
|
|
1478
|
+
this.sizeCalculation)
|
|
1479
|
+
) {
|
|
1480
|
+
if (!this.#b && !this.maxEntrySize)
|
|
1481
|
+
throw TypeError(
|
|
1482
|
+
"cannot set sizeCalculation without setting maxSize or maxEntrySize",
|
|
1483
|
+
);
|
|
1484
|
+
if ("function" != typeof this.sizeCalculation)
|
|
1485
|
+
throw TypeError("sizeCalculation set to non-function");
|
|
1486
|
+
}
|
|
1487
|
+
if (void 0 !== $ && "function" != typeof $)
|
|
1488
|
+
throw TypeError("memoMethod must be a function if defined");
|
|
1489
|
+
if (((this.#g = $), void 0 !== w && "function" != typeof w))
|
|
1490
|
+
throw TypeError("fetchMethod must be a function if specified");
|
|
1491
|
+
if (
|
|
1492
|
+
((this.#f = w),
|
|
1493
|
+
(this.#y = !!w),
|
|
1494
|
+
(this.#k = new Map()),
|
|
1495
|
+
(this.#l = Array(i).fill(void 0)),
|
|
1496
|
+
(this.#m = Array(i).fill(void 0)),
|
|
1497
|
+
(this.#o = new J(i)),
|
|
1498
|
+
(this.#n = new J(i)),
|
|
1499
|
+
(this.#p = 0),
|
|
1500
|
+
(this.#q = 0),
|
|
1501
|
+
(this.#r = ri.create(i)),
|
|
1502
|
+
(this.#i = 0),
|
|
1503
|
+
(this.#j = 0),
|
|
1504
|
+
"function" == typeof l && (this.#c = l),
|
|
1505
|
+
"function" == typeof c && (this.#d = c),
|
|
1506
|
+
"function" == typeof u
|
|
1507
|
+
? ((this.#e = u), (this.#s = []))
|
|
1508
|
+
: ((this.#e = void 0), (this.#s = void 0)),
|
|
1509
|
+
(this.#x = !!this.#c),
|
|
1510
|
+
(this.#A = !!this.#d),
|
|
1511
|
+
(this.#z = !!this.#e),
|
|
1512
|
+
(this.noDisposeOnSet = !!p),
|
|
1513
|
+
(this.noUpdateTTL = !!d),
|
|
1514
|
+
(this.noDeleteOnFetchRejection = !!y),
|
|
1515
|
+
(this.allowStaleOnFetchRejection = !!S),
|
|
1516
|
+
(this.allowStaleOnFetchAbort = !!E),
|
|
1517
|
+
(this.ignoreFetchAbort = !!z),
|
|
1518
|
+
0 !== this.maxEntrySize)
|
|
1519
|
+
) {
|
|
1520
|
+
if (0 !== this.#b && !q(this.#b))
|
|
1521
|
+
throw TypeError("maxSize must be a positive integer if specified");
|
|
1522
|
+
if (!q(this.maxEntrySize))
|
|
1523
|
+
throw TypeError(
|
|
1524
|
+
"maxEntrySize must be a positive integer if specified",
|
|
1525
|
+
);
|
|
1526
|
+
this.#H();
|
|
1527
|
+
}
|
|
1528
|
+
if (
|
|
1529
|
+
((this.allowStale = !!a),
|
|
1530
|
+
(this.noDeleteOnStaleGet = !!b),
|
|
1531
|
+
(this.updateAgeOnGet = !!n),
|
|
1532
|
+
(this.updateAgeOnHas = !!o),
|
|
1533
|
+
(this.ttlResolution = q(h) || 0 === h ? h : 1),
|
|
1534
|
+
(this.ttlAutopurge = !!r),
|
|
1535
|
+
(this.ttl = s || 0),
|
|
1536
|
+
this.ttl)
|
|
1537
|
+
) {
|
|
1538
|
+
if (!q(this.ttl))
|
|
1539
|
+
throw TypeError("ttl must be a positive integer if specified");
|
|
1540
|
+
this.#I();
|
|
1541
|
+
}
|
|
1542
|
+
if (0 === this.#a && 0 === this.ttl && 0 === this.#b)
|
|
1543
|
+
throw TypeError("At least one of max, maxSize, or ttl is required");
|
|
1544
|
+
if (!this.ttlAutopurge && !this.#a && !this.#b) {
|
|
1545
|
+
let th = "LRU_CACHE_UNBOUNDED";
|
|
1546
|
+
ii(th) &&
|
|
1547
|
+
(Oe.add(th),
|
|
1548
|
+
Fe(
|
|
1549
|
+
"TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.",
|
|
1550
|
+
"UnboundedCacheWarning",
|
|
1551
|
+
th,
|
|
1552
|
+
t,
|
|
1553
|
+
));
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
getRemainingTTL(t) {
|
|
1557
|
+
return this.#k.has(t) ? 1 / 0 : 0;
|
|
1558
|
+
}
|
|
1559
|
+
#I() {
|
|
1560
|
+
let e = new Tt(this.#a),
|
|
1561
|
+
i = new Tt(this.#a);
|
|
1562
|
+
((this.#v = e), (this.#u = i));
|
|
1563
|
+
let s = this.ttlAutopurge ? Array(this.#a) : void 0;
|
|
1564
|
+
((this.#w = s),
|
|
1565
|
+
(this.#J = (t, h, r = this.#h.now()) => {
|
|
1566
|
+
if (
|
|
1567
|
+
((i[t] = 0 !== h ? r : 0),
|
|
1568
|
+
(e[t] = h),
|
|
1569
|
+
s?.[t] && (clearTimeout(s[t]), (s[t] = void 0)),
|
|
1570
|
+
0 !== h && s)
|
|
1571
|
+
) {
|
|
1572
|
+
let n = setTimeout(() => {
|
|
1573
|
+
this.#G(t) && this.#K(this.#l[t], "expire");
|
|
1574
|
+
}, h + 1);
|
|
1575
|
+
(n.unref && n.unref(), (s[t] = n));
|
|
1576
|
+
}
|
|
1577
|
+
}),
|
|
1578
|
+
(this.#L = (t) => {
|
|
1579
|
+
i[t] = 0 !== e[t] ? this.#h.now() : 0;
|
|
1580
|
+
}),
|
|
1581
|
+
(this.#M = (t, s) => {
|
|
1582
|
+
if (e[s]) {
|
|
1583
|
+
let n = e[s],
|
|
1584
|
+
o = i[s];
|
|
1585
|
+
if (!n || !o) return;
|
|
1586
|
+
((t.ttl = n), (t.start = o), (t.now = h || r()));
|
|
1587
|
+
let a = t.now - o;
|
|
1588
|
+
t.remainingTTL = n - a;
|
|
1589
|
+
}
|
|
1590
|
+
}));
|
|
1591
|
+
let h = 0,
|
|
1592
|
+
r = () => {
|
|
1593
|
+
let t = this.#h.now();
|
|
1594
|
+
if (this.ttlResolution > 0) {
|
|
1595
|
+
h = t;
|
|
1596
|
+
let e = setTimeout(() => (h = 0), this.ttlResolution);
|
|
1597
|
+
e.unref && e.unref();
|
|
1598
|
+
}
|
|
1599
|
+
return t;
|
|
1600
|
+
};
|
|
1601
|
+
((this.getRemainingTTL = (t) => {
|
|
1602
|
+
let s = this.#k.get(t);
|
|
1603
|
+
if (void 0 === s) return 0;
|
|
1604
|
+
let n = e[s],
|
|
1605
|
+
o = i[s];
|
|
1606
|
+
if (!n || !o) return 1 / 0;
|
|
1607
|
+
let a = (h || r()) - o;
|
|
1608
|
+
return n - a;
|
|
1609
|
+
}),
|
|
1610
|
+
(this.#G = (t) => {
|
|
1611
|
+
let s = i[t],
|
|
1612
|
+
n = e[t];
|
|
1613
|
+
return !!n && !!s && (h || r()) - s > n;
|
|
1614
|
+
}));
|
|
1615
|
+
}
|
|
1616
|
+
#L = () => {};
|
|
1617
|
+
#M = () => {};
|
|
1618
|
+
#J = () => {};
|
|
1619
|
+
#G = () => !1;
|
|
1620
|
+
#H() {
|
|
1621
|
+
let n = new Tt(this.#a);
|
|
1622
|
+
((this.#j = 0),
|
|
1623
|
+
(this.#t = n),
|
|
1624
|
+
(this.#N = (t) => {
|
|
1625
|
+
((this.#j -= n[t]), (n[t] = 0));
|
|
1626
|
+
}),
|
|
1627
|
+
(this.#O = (t, e, i, s) => {
|
|
1628
|
+
if (this.#B(e)) return 0;
|
|
1629
|
+
if (!q(i)) {
|
|
1630
|
+
if (s) {
|
|
1631
|
+
if ("function" != typeof s)
|
|
1632
|
+
throw TypeError("sizeCalculation must be a function");
|
|
1633
|
+
if (!q((i = s(e, t))))
|
|
1634
|
+
throw TypeError(
|
|
1635
|
+
"sizeCalculation return invalid (expect positive integer)",
|
|
1636
|
+
);
|
|
1637
|
+
} else
|
|
1638
|
+
throw TypeError(
|
|
1639
|
+
"invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.",
|
|
1640
|
+
);
|
|
1641
|
+
}
|
|
1642
|
+
return i;
|
|
1643
|
+
}),
|
|
1644
|
+
(this.#P = (t, e, i) => {
|
|
1645
|
+
if (((n[t] = e), this.#b)) {
|
|
1646
|
+
let s = this.#b - n[t];
|
|
1647
|
+
for (; this.#j > s; ) this.#Q(!0);
|
|
1648
|
+
}
|
|
1649
|
+
((this.#j += n[t]),
|
|
1650
|
+
i && ((i.entrySize = e), (i.totalCalculatedSize = this.#j)));
|
|
1651
|
+
}));
|
|
1652
|
+
}
|
|
1653
|
+
#N = (t) => {};
|
|
1654
|
+
#P = (t, e, i) => {};
|
|
1655
|
+
#O = (t, e, i, s) => {
|
|
1656
|
+
if (i || s)
|
|
1657
|
+
throw TypeError(
|
|
1658
|
+
"cannot set size without setting maxSize or maxEntrySize on cache",
|
|
1659
|
+
);
|
|
1660
|
+
return 0;
|
|
1661
|
+
};
|
|
1662
|
+
*#E({ allowStale: o = this.allowStale } = {}) {
|
|
1663
|
+
if (this.#i)
|
|
1664
|
+
for (
|
|
1665
|
+
let a = this.#q;
|
|
1666
|
+
!(!this.#R(a) || ((o || !this.#G(a)) && (yield a), a === this.#p));
|
|
1667
|
+
)
|
|
1668
|
+
a = this.#n[a];
|
|
1669
|
+
}
|
|
1670
|
+
*#F({ allowStale: l = this.allowStale } = {}) {
|
|
1671
|
+
if (this.#i)
|
|
1672
|
+
for (
|
|
1673
|
+
let c = this.#p;
|
|
1674
|
+
!(!this.#R(c) || ((l || !this.#G(c)) && (yield c), c === this.#q));
|
|
1675
|
+
)
|
|
1676
|
+
c = this.#o[c];
|
|
1677
|
+
}
|
|
1678
|
+
#R(u) {
|
|
1679
|
+
return void 0 !== u && this.#k.get(this.#l[u]) === u;
|
|
1680
|
+
}
|
|
1681
|
+
*entries() {
|
|
1682
|
+
for (let t of this.#E())
|
|
1683
|
+
void 0 === this.#m[t] ||
|
|
1684
|
+
void 0 === this.#l[t] ||
|
|
1685
|
+
this.#B(this.#m[t]) ||
|
|
1686
|
+
(yield [this.#l[t], this.#m[t]]);
|
|
1687
|
+
}
|
|
1688
|
+
*rentries() {
|
|
1689
|
+
for (let t of this.#F())
|
|
1690
|
+
void 0 === this.#m[t] ||
|
|
1691
|
+
void 0 === this.#l[t] ||
|
|
1692
|
+
this.#B(this.#m[t]) ||
|
|
1693
|
+
(yield [this.#l[t], this.#m[t]]);
|
|
1694
|
+
}
|
|
1695
|
+
*keys() {
|
|
1696
|
+
for (let t of this.#E()) {
|
|
1697
|
+
let e = this.#l[t];
|
|
1698
|
+
void 0 === e || this.#B(this.#m[t]) || (yield e);
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
*rkeys() {
|
|
1702
|
+
for (let t of this.#F()) {
|
|
1703
|
+
let e = this.#l[t];
|
|
1704
|
+
void 0 === e || this.#B(this.#m[t]) || (yield e);
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
*values() {
|
|
1708
|
+
for (let t of this.#E())
|
|
1709
|
+
void 0 === this.#m[t] || this.#B(this.#m[t]) || (yield this.#m[t]);
|
|
1710
|
+
}
|
|
1711
|
+
*rvalues() {
|
|
1712
|
+
for (let t of this.#F())
|
|
1713
|
+
void 0 === this.#m[t] || this.#B(this.#m[t]) || (yield this.#m[t]);
|
|
1714
|
+
}
|
|
1715
|
+
[Symbol.iterator]() {
|
|
1716
|
+
return this.entries();
|
|
1717
|
+
}
|
|
1718
|
+
[Symbol.toStringTag] = "LRUCache";
|
|
1719
|
+
find(t, e = {}) {
|
|
1720
|
+
for (let i of this.#E()) {
|
|
1721
|
+
let s = this.#m[i],
|
|
1722
|
+
h = this.#B(s) ? s.__staleWhileFetching : s;
|
|
1723
|
+
if (void 0 !== h && t(h, this.#l[i], this))
|
|
1724
|
+
return this.get(this.#l[i], e);
|
|
1725
|
+
}
|
|
1726
|
+
}
|
|
1727
|
+
forEach(t, e = this) {
|
|
1728
|
+
for (let i of this.#E()) {
|
|
1729
|
+
let s = this.#m[i],
|
|
1730
|
+
h = this.#B(s) ? s.__staleWhileFetching : s;
|
|
1731
|
+
void 0 !== h && t.call(e, h, this.#l[i], this);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
rforEach(t, e = this) {
|
|
1735
|
+
for (let i of this.#F()) {
|
|
1736
|
+
let s = this.#m[i],
|
|
1737
|
+
h = this.#B(s) ? s.__staleWhileFetching : s;
|
|
1738
|
+
void 0 !== h && t.call(e, h, this.#l[i], this);
|
|
1739
|
+
}
|
|
1740
|
+
}
|
|
1741
|
+
purgeStale() {
|
|
1742
|
+
let t = !1;
|
|
1743
|
+
for (let e of this.#F({ allowStale: !0 }))
|
|
1744
|
+
this.#G(e) && (this.#K(this.#l[e], "expire"), (t = !0));
|
|
1745
|
+
return t;
|
|
1746
|
+
}
|
|
1747
|
+
info(t) {
|
|
1748
|
+
let e = this.#k.get(t);
|
|
1749
|
+
if (void 0 === e) return;
|
|
1750
|
+
let i = this.#m[e],
|
|
1751
|
+
s = this.#B(i) ? i.__staleWhileFetching : i;
|
|
1752
|
+
if (void 0 === s) return;
|
|
1753
|
+
let h = { value: s };
|
|
1754
|
+
if (this.#v && this.#u) {
|
|
1755
|
+
let r = this.#v[e],
|
|
1756
|
+
n = this.#u[e];
|
|
1757
|
+
if (r && n) {
|
|
1758
|
+
let o = r - (this.#h.now() - n);
|
|
1759
|
+
((h.ttl = o), (h.start = Date.now()));
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
return (this.#t && (h.size = this.#t[e]), h);
|
|
1763
|
+
}
|
|
1764
|
+
dump() {
|
|
1765
|
+
let t = [];
|
|
1766
|
+
for (let e of this.#E({ allowStale: !0 })) {
|
|
1767
|
+
let i = this.#l[e],
|
|
1768
|
+
s = this.#m[e],
|
|
1769
|
+
h = this.#B(s) ? s.__staleWhileFetching : s;
|
|
1770
|
+
if (void 0 === h || void 0 === i) continue;
|
|
1771
|
+
let r = { value: h };
|
|
1772
|
+
if (this.#v && this.#u) {
|
|
1773
|
+
r.ttl = this.#v[e];
|
|
1774
|
+
let n = this.#h.now() - this.#u[e];
|
|
1775
|
+
r.start = Math.floor(Date.now() - n);
|
|
1776
|
+
}
|
|
1777
|
+
(this.#t && (r.size = this.#t[e]), t.unshift([i, r]));
|
|
1778
|
+
}
|
|
1779
|
+
return t;
|
|
1780
|
+
}
|
|
1781
|
+
load(t) {
|
|
1782
|
+
for (let [e, i] of (this.clear(), t)) {
|
|
1783
|
+
if (i.start) {
|
|
1784
|
+
let s = Date.now() - i.start;
|
|
1785
|
+
i.start = this.#h.now() - s;
|
|
1786
|
+
}
|
|
1787
|
+
this.set(e, i.value, i);
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
set(t, e, i = {}) {
|
|
1791
|
+
if (void 0 === e) return (this.delete(t), this);
|
|
1792
|
+
let {
|
|
1793
|
+
ttl: s = this.ttl,
|
|
1794
|
+
start: h,
|
|
1795
|
+
noDisposeOnSet: r = this.noDisposeOnSet,
|
|
1796
|
+
sizeCalculation: n = this.sizeCalculation,
|
|
1797
|
+
status: o,
|
|
1798
|
+
} = i,
|
|
1799
|
+
{ noUpdateTTL: a = this.noUpdateTTL } = i,
|
|
1800
|
+
l = this.#O(t, e, i.size || 0, n);
|
|
1801
|
+
if (this.maxEntrySize && l > this.maxEntrySize)
|
|
1802
|
+
return (
|
|
1803
|
+
o && ((o.set = "miss"), (o.maxEntrySizeExceeded = !0)),
|
|
1804
|
+
this.#K(t, "set"),
|
|
1805
|
+
this
|
|
1806
|
+
);
|
|
1807
|
+
let c = 0 === this.#i ? void 0 : this.#k.get(t);
|
|
1808
|
+
if (void 0 === c)
|
|
1809
|
+
((c =
|
|
1810
|
+
0 === this.#i
|
|
1811
|
+
? this.#q
|
|
1812
|
+
: 0 !== this.#r.length
|
|
1813
|
+
? this.#r.pop()
|
|
1814
|
+
: this.#i === this.#a
|
|
1815
|
+
? this.#Q(!1)
|
|
1816
|
+
: this.#i),
|
|
1817
|
+
(this.#l[c] = t),
|
|
1818
|
+
(this.#m[c] = e),
|
|
1819
|
+
this.#k.set(t, c),
|
|
1820
|
+
(this.#o[this.#q] = c),
|
|
1821
|
+
(this.#n[c] = this.#q),
|
|
1822
|
+
(this.#q = c),
|
|
1823
|
+
this.#i++,
|
|
1824
|
+
this.#P(c, l, o),
|
|
1825
|
+
o && (o.set = "add"),
|
|
1826
|
+
(a = !1),
|
|
1827
|
+
this.#A && this.#d?.(e, t, "add"));
|
|
1828
|
+
else {
|
|
1829
|
+
this.#D(c);
|
|
1830
|
+
let u = this.#m[c];
|
|
1831
|
+
if (e !== u) {
|
|
1832
|
+
if (this.#y && this.#B(u)) {
|
|
1833
|
+
u.__abortController.abort(Error("replaced"));
|
|
1834
|
+
let { __staleWhileFetching: p } = u;
|
|
1835
|
+
void 0 !== p &&
|
|
1836
|
+
!r &&
|
|
1837
|
+
(this.#x && this.#c?.(p, t, "set"),
|
|
1838
|
+
this.#z && this.#s?.push([p, t, "set"]));
|
|
1839
|
+
} else
|
|
1840
|
+
r ||
|
|
1841
|
+
(this.#x && this.#c?.(u, t, "set"),
|
|
1842
|
+
this.#z && this.#s?.push([u, t, "set"]));
|
|
1843
|
+
if ((this.#N(c), this.#P(c, l, o), (this.#m[c] = e), o)) {
|
|
1844
|
+
o.set = "replace";
|
|
1845
|
+
let d = u && this.#B(u) ? u.__staleWhileFetching : u;
|
|
1846
|
+
void 0 !== d && (o.oldValue = d);
|
|
1847
|
+
}
|
|
1848
|
+
} else o && (o.set = "update");
|
|
1849
|
+
this.#A && this.onInsert?.(e, t, e === u ? "update" : "replace");
|
|
1850
|
+
}
|
|
1851
|
+
if (
|
|
1852
|
+
(0 === s || this.#v || this.#I(),
|
|
1853
|
+
this.#v && (a || this.#J(c, s, h), o && this.#M(o, c)),
|
|
1854
|
+
!r && this.#z && this.#s)
|
|
1855
|
+
) {
|
|
1856
|
+
let f = this.#s,
|
|
1857
|
+
g;
|
|
1858
|
+
for (; (g = f?.shift()); ) this.#e?.(...g);
|
|
1859
|
+
}
|
|
1860
|
+
return this;
|
|
1861
|
+
}
|
|
1862
|
+
pop() {
|
|
1863
|
+
try {
|
|
1864
|
+
for (; this.#i; ) {
|
|
1865
|
+
let t = this.#m[this.#p];
|
|
1866
|
+
if ((this.#Q(!0), this.#B(t))) {
|
|
1867
|
+
if (t.__staleWhileFetching) return t.__staleWhileFetching;
|
|
1868
|
+
} else if (void 0 !== t) return t;
|
|
1869
|
+
}
|
|
1870
|
+
} finally {
|
|
1871
|
+
if (this.#z && this.#s) {
|
|
1872
|
+
let e = this.#s,
|
|
1873
|
+
i;
|
|
1874
|
+
for (; (i = e?.shift()); ) this.#e?.(...i);
|
|
1875
|
+
}
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
#Q(p) {
|
|
1879
|
+
let d = this.#p,
|
|
1880
|
+
f = this.#l[d],
|
|
1881
|
+
g = this.#m[d];
|
|
1882
|
+
return (
|
|
1883
|
+
this.#y && this.#B(g)
|
|
1884
|
+
? g.__abortController.abort(Error("evicted"))
|
|
1885
|
+
: (this.#x || this.#z) &&
|
|
1886
|
+
(this.#x && this.#c?.(g, f, "evict"),
|
|
1887
|
+
this.#z && this.#s?.push([g, f, "evict"])),
|
|
1888
|
+
this.#N(d),
|
|
1889
|
+
this.#w?.[d] && (clearTimeout(this.#w[d]), (this.#w[d] = void 0)),
|
|
1890
|
+
p && ((this.#l[d] = void 0), (this.#m[d] = void 0), this.#r.push(d)),
|
|
1891
|
+
1 === this.#i
|
|
1892
|
+
? ((this.#p = this.#q = 0), (this.#r.length = 0))
|
|
1893
|
+
: (this.#p = this.#o[d]),
|
|
1894
|
+
this.#k.delete(f),
|
|
1895
|
+
this.#i--,
|
|
1896
|
+
d
|
|
1897
|
+
);
|
|
1898
|
+
}
|
|
1899
|
+
has(t, e = {}) {
|
|
1900
|
+
let { updateAgeOnHas: i = this.updateAgeOnHas, status: s } = e,
|
|
1901
|
+
h = this.#k.get(t);
|
|
1902
|
+
if (void 0 !== h) {
|
|
1903
|
+
let r = this.#m[h];
|
|
1904
|
+
if (this.#B(r) && void 0 === r.__staleWhileFetching) return !1;
|
|
1905
|
+
if (!this.#G(h))
|
|
1906
|
+
return (i && this.#L(h), s && ((s.has = "hit"), this.#M(s, h)), !0);
|
|
1907
|
+
s && ((s.has = "stale"), this.#M(s, h));
|
|
1908
|
+
} else s && (s.has = "miss");
|
|
1909
|
+
return !1;
|
|
1910
|
+
}
|
|
1911
|
+
peek(t, e = {}) {
|
|
1912
|
+
let { allowStale: i = this.allowStale } = e,
|
|
1913
|
+
s = this.#k.get(t);
|
|
1914
|
+
if (void 0 === s || (!i && this.#G(s))) return;
|
|
1915
|
+
let h = this.#m[s];
|
|
1916
|
+
return this.#B(h) ? h.__staleWhileFetching : h;
|
|
1917
|
+
}
|
|
1918
|
+
#C(m, w, $, y) {
|
|
1919
|
+
let b = void 0 === w ? void 0 : this.#m[w];
|
|
1920
|
+
if (this.#B(b)) return b;
|
|
1921
|
+
let S = new At(),
|
|
1922
|
+
{ signal: E } = $;
|
|
1923
|
+
E?.addEventListener("abort", () => S.abort(E.reason), {
|
|
1924
|
+
signal: S.signal,
|
|
1925
|
+
});
|
|
1926
|
+
let z = { signal: S.signal, options: $, context: y },
|
|
1927
|
+
Z = (t, e = !1) => {
|
|
1928
|
+
let { aborted: i } = S.signal,
|
|
1929
|
+
s = $.ignoreFetchAbort && void 0 !== t,
|
|
1930
|
+
h =
|
|
1931
|
+
$.ignoreFetchAbort ||
|
|
1932
|
+
!!($.allowStaleOnFetchAbort && void 0 !== t);
|
|
1933
|
+
if (
|
|
1934
|
+
($.status &&
|
|
1935
|
+
(i && !e
|
|
1936
|
+
? (($.status.fetchAborted = !0),
|
|
1937
|
+
($.status.fetchError = S.signal.reason),
|
|
1938
|
+
s && ($.status.fetchAbortIgnored = !0))
|
|
1939
|
+
: ($.status.fetchResolved = !0)),
|
|
1940
|
+
i && !s && !e)
|
|
1941
|
+
)
|
|
1942
|
+
return th(S.signal.reason, h);
|
|
1943
|
+
let r = tn,
|
|
1944
|
+
n = this.#m[w];
|
|
1945
|
+
return (
|
|
1946
|
+
(n === tn || (s && e && void 0 === n)) &&
|
|
1947
|
+
(void 0 === t
|
|
1948
|
+
? void 0 !== r.__staleWhileFetching
|
|
1949
|
+
? (this.#m[w] = r.__staleWhileFetching)
|
|
1950
|
+
: this.#K(m, "fetch")
|
|
1951
|
+
: ($.status && ($.status.fetchUpdated = !0),
|
|
1952
|
+
this.set(m, t, z.options))),
|
|
1953
|
+
t
|
|
1954
|
+
);
|
|
1955
|
+
},
|
|
1956
|
+
J = (t) => (
|
|
1957
|
+
$.status &&
|
|
1958
|
+
(($.status.fetchRejected = !0), ($.status.fetchError = t)),
|
|
1959
|
+
th(t, !1)
|
|
1960
|
+
),
|
|
1961
|
+
th = (t, e) => {
|
|
1962
|
+
let { aborted: i } = S.signal,
|
|
1963
|
+
s = i && $.allowStaleOnFetchAbort,
|
|
1964
|
+
h = s || $.allowStaleOnFetchRejection,
|
|
1965
|
+
r = h || $.noDeleteOnFetchRejection,
|
|
1966
|
+
n = tn;
|
|
1967
|
+
if (
|
|
1968
|
+
(this.#m[w] === tn &&
|
|
1969
|
+
(r && (e || void 0 !== n.__staleWhileFetching)
|
|
1970
|
+
? s || (this.#m[w] = n.__staleWhileFetching)
|
|
1971
|
+
: this.#K(m, "fetch")),
|
|
1972
|
+
h)
|
|
1973
|
+
)
|
|
1974
|
+
return (
|
|
1975
|
+
$.status &&
|
|
1976
|
+
void 0 !== n.__staleWhileFetching &&
|
|
1977
|
+
($.status.returnedStale = !0),
|
|
1978
|
+
n.__staleWhileFetching
|
|
1979
|
+
);
|
|
1980
|
+
if (n.__returned === n) throw t;
|
|
1981
|
+
},
|
|
1982
|
+
tr = (t, e) => {
|
|
1983
|
+
let i = this.#f?.(m, b, z);
|
|
1984
|
+
(i &&
|
|
1985
|
+
i instanceof Promise &&
|
|
1986
|
+
i.then((e) => t(void 0 === e ? void 0 : e), e),
|
|
1987
|
+
S.signal.addEventListener("abort", () => {
|
|
1988
|
+
(!$.ignoreFetchAbort || $.allowStaleOnFetchAbort) &&
|
|
1989
|
+
(t(void 0), $.allowStaleOnFetchAbort && (t = (t) => Z(t, !0)));
|
|
1990
|
+
}));
|
|
1991
|
+
};
|
|
1992
|
+
$.status && ($.status.fetchDispatched = !0);
|
|
1993
|
+
let tn = new Promise(tr).then(Z, J),
|
|
1994
|
+
to = Object.assign(tn, {
|
|
1995
|
+
__abortController: S,
|
|
1996
|
+
__staleWhileFetching: b,
|
|
1997
|
+
__returned: void 0,
|
|
1998
|
+
});
|
|
1999
|
+
return (
|
|
2000
|
+
void 0 === w
|
|
2001
|
+
? (this.set(m, to, { ...z.options, status: void 0 }),
|
|
2002
|
+
(w = this.#k.get(m)))
|
|
2003
|
+
: (this.#m[w] = to),
|
|
2004
|
+
to
|
|
2005
|
+
);
|
|
2006
|
+
}
|
|
2007
|
+
#B(ta) {
|
|
2008
|
+
if (!this.#y) return !1;
|
|
2009
|
+
let tl = ta;
|
|
2010
|
+
return (
|
|
2011
|
+
!!tl &&
|
|
2012
|
+
tl instanceof Promise &&
|
|
2013
|
+
tl.hasOwnProperty("__staleWhileFetching") &&
|
|
2014
|
+
tl.__abortController instanceof At
|
|
2015
|
+
);
|
|
2016
|
+
}
|
|
2017
|
+
async fetch(t, e = {}) {
|
|
2018
|
+
let {
|
|
2019
|
+
allowStale: i = this.allowStale,
|
|
2020
|
+
updateAgeOnGet: s = this.updateAgeOnGet,
|
|
2021
|
+
noDeleteOnStaleGet: h = this.noDeleteOnStaleGet,
|
|
2022
|
+
ttl: r = this.ttl,
|
|
2023
|
+
noDisposeOnSet: n = this.noDisposeOnSet,
|
|
2024
|
+
size: o = 0,
|
|
2025
|
+
sizeCalculation: a = this.sizeCalculation,
|
|
2026
|
+
noUpdateTTL: l = this.noUpdateTTL,
|
|
2027
|
+
noDeleteOnFetchRejection: c = this.noDeleteOnFetchRejection,
|
|
2028
|
+
allowStaleOnFetchRejection: u = this.allowStaleOnFetchRejection,
|
|
2029
|
+
ignoreFetchAbort: p = this.ignoreFetchAbort,
|
|
2030
|
+
allowStaleOnFetchAbort: d = this.allowStaleOnFetchAbort,
|
|
2031
|
+
context: f,
|
|
2032
|
+
forceRefresh: g = !1,
|
|
2033
|
+
status: m,
|
|
2034
|
+
signal: w,
|
|
2035
|
+
} = e;
|
|
2036
|
+
if (!this.#y)
|
|
2037
|
+
return (
|
|
2038
|
+
m && (m.fetch = "get"),
|
|
2039
|
+
this.get(t, {
|
|
2040
|
+
allowStale: i,
|
|
2041
|
+
updateAgeOnGet: s,
|
|
2042
|
+
noDeleteOnStaleGet: h,
|
|
2043
|
+
status: m,
|
|
2044
|
+
})
|
|
2045
|
+
);
|
|
2046
|
+
let $ = {
|
|
2047
|
+
allowStale: i,
|
|
2048
|
+
updateAgeOnGet: s,
|
|
2049
|
+
noDeleteOnStaleGet: h,
|
|
2050
|
+
ttl: r,
|
|
2051
|
+
noDisposeOnSet: n,
|
|
2052
|
+
size: o,
|
|
2053
|
+
sizeCalculation: a,
|
|
2054
|
+
noUpdateTTL: l,
|
|
2055
|
+
noDeleteOnFetchRejection: c,
|
|
2056
|
+
allowStaleOnFetchRejection: u,
|
|
2057
|
+
allowStaleOnFetchAbort: d,
|
|
2058
|
+
ignoreFetchAbort: p,
|
|
2059
|
+
status: m,
|
|
2060
|
+
signal: w,
|
|
2061
|
+
},
|
|
2062
|
+
y = this.#k.get(t);
|
|
2063
|
+
if (void 0 === y) {
|
|
2064
|
+
m && (m.fetch = "miss");
|
|
2065
|
+
let b = this.#C(t, y, $, f);
|
|
2066
|
+
return (b.__returned = b);
|
|
2067
|
+
}
|
|
2068
|
+
{
|
|
2069
|
+
let S = this.#m[y];
|
|
2070
|
+
if (this.#B(S)) {
|
|
2071
|
+
let E = i && void 0 !== S.__staleWhileFetching;
|
|
2072
|
+
return (
|
|
2073
|
+
m && ((m.fetch = "inflight"), E && (m.returnedStale = !0)),
|
|
2074
|
+
E ? S.__staleWhileFetching : (S.__returned = S)
|
|
2075
|
+
);
|
|
2076
|
+
}
|
|
2077
|
+
let z = this.#G(y);
|
|
2078
|
+
if (!g && !z)
|
|
2079
|
+
return (
|
|
2080
|
+
m && (m.fetch = "hit"),
|
|
2081
|
+
this.#D(y),
|
|
2082
|
+
s && this.#L(y),
|
|
2083
|
+
m && this.#M(m, y),
|
|
2084
|
+
S
|
|
2085
|
+
);
|
|
2086
|
+
let Z = this.#C(t, y, $, f),
|
|
2087
|
+
J = void 0 !== Z.__staleWhileFetching && i;
|
|
2088
|
+
return (
|
|
2089
|
+
m &&
|
|
2090
|
+
((m.fetch = z ? "stale" : "refresh"),
|
|
2091
|
+
J && z && (m.returnedStale = !0)),
|
|
2092
|
+
J ? Z.__staleWhileFetching : (Z.__returned = Z)
|
|
2093
|
+
);
|
|
2094
|
+
}
|
|
2095
|
+
}
|
|
2096
|
+
async forceFetch(t, e = {}) {
|
|
2097
|
+
let i = await this.fetch(t, e);
|
|
2098
|
+
if (void 0 === i) throw Error("fetch() returned undefined");
|
|
2099
|
+
return i;
|
|
2100
|
+
}
|
|
2101
|
+
memo(t, e = {}) {
|
|
2102
|
+
let i = this.#g;
|
|
2103
|
+
if (!i) throw Error("no memoMethod provided to constructor");
|
|
2104
|
+
let { context: s, forceRefresh: h, ...r } = e,
|
|
2105
|
+
n = this.get(t, r);
|
|
2106
|
+
if (!h && void 0 !== n) return n;
|
|
2107
|
+
let o = i(t, n, { options: r, context: s });
|
|
2108
|
+
return (this.set(t, o, r), o);
|
|
2109
|
+
}
|
|
2110
|
+
get(t, e = {}) {
|
|
2111
|
+
let {
|
|
2112
|
+
allowStale: i = this.allowStale,
|
|
2113
|
+
updateAgeOnGet: s = this.updateAgeOnGet,
|
|
2114
|
+
noDeleteOnStaleGet: h = this.noDeleteOnStaleGet,
|
|
2115
|
+
status: r,
|
|
2116
|
+
} = e,
|
|
2117
|
+
n = this.#k.get(t);
|
|
2118
|
+
if (void 0 !== n) {
|
|
2119
|
+
let o = this.#m[n],
|
|
2120
|
+
a = this.#B(o);
|
|
2121
|
+
return (
|
|
2122
|
+
r && this.#M(r, n),
|
|
2123
|
+
this.#G(n)
|
|
2124
|
+
? (r && (r.get = "stale"),
|
|
2125
|
+
a
|
|
2126
|
+
? (r &&
|
|
2127
|
+
i &&
|
|
2128
|
+
void 0 !== o.__staleWhileFetching &&
|
|
2129
|
+
(r.returnedStale = !0),
|
|
2130
|
+
i ? o.__staleWhileFetching : void 0)
|
|
2131
|
+
: (h || this.#K(t, "expire"),
|
|
2132
|
+
r && i && (r.returnedStale = !0),
|
|
2133
|
+
i ? o : void 0))
|
|
2134
|
+
: (r && (r.get = "hit"),
|
|
2135
|
+
a ? o.__staleWhileFetching : (this.#D(n), s && this.#L(n), o))
|
|
2136
|
+
);
|
|
2137
|
+
}
|
|
2138
|
+
r && (r.get = "miss");
|
|
2139
|
+
}
|
|
2140
|
+
#S(tc, tu) {
|
|
2141
|
+
((this.#n[tu] = tc), (this.#o[tc] = tu));
|
|
2142
|
+
}
|
|
2143
|
+
#D(tp) {
|
|
2144
|
+
tp !== this.#q &&
|
|
2145
|
+
(tp === this.#p
|
|
2146
|
+
? (this.#p = this.#o[tp])
|
|
2147
|
+
: this.#S(this.#n[tp], this.#o[tp]),
|
|
2148
|
+
this.#S(this.#q, tp),
|
|
2149
|
+
(this.#q = tp));
|
|
2150
|
+
}
|
|
2151
|
+
delete(t) {
|
|
2152
|
+
return this.#K(t, "delete");
|
|
2153
|
+
}
|
|
2154
|
+
#K(td, tf) {
|
|
2155
|
+
let tg = !1;
|
|
2156
|
+
if (0 !== this.#i) {
|
|
2157
|
+
let tm = this.#k.get(td);
|
|
2158
|
+
if (void 0 !== tm) {
|
|
2159
|
+
if (
|
|
2160
|
+
(this.#w?.[tm] &&
|
|
2161
|
+
(clearTimeout(this.#w?.[tm]), (this.#w[tm] = void 0)),
|
|
2162
|
+
(tg = !0),
|
|
2163
|
+
1 === this.#i)
|
|
2164
|
+
)
|
|
2165
|
+
this.#T(tf);
|
|
2166
|
+
else {
|
|
2167
|
+
this.#N(tm);
|
|
2168
|
+
let tw = this.#m[tm];
|
|
2169
|
+
if (
|
|
2170
|
+
(this.#B(tw)
|
|
2171
|
+
? tw.__abortController.abort(Error("deleted"))
|
|
2172
|
+
: (this.#x || this.#z) &&
|
|
2173
|
+
(this.#x && this.#c?.(tw, td, tf),
|
|
2174
|
+
this.#z && this.#s?.push([tw, td, tf])),
|
|
2175
|
+
this.#k.delete(td),
|
|
2176
|
+
(this.#l[tm] = void 0),
|
|
2177
|
+
(this.#m[tm] = void 0),
|
|
2178
|
+
tm === this.#q)
|
|
2179
|
+
)
|
|
2180
|
+
this.#q = this.#n[tm];
|
|
2181
|
+
else if (tm === this.#p) this.#p = this.#o[tm];
|
|
2182
|
+
else {
|
|
2183
|
+
let t$ = this.#n[tm];
|
|
2184
|
+
this.#o[t$] = this.#o[tm];
|
|
2185
|
+
let ty = this.#o[tm];
|
|
2186
|
+
this.#n[ty] = this.#n[tm];
|
|
2187
|
+
}
|
|
2188
|
+
(this.#i--, this.#r.push(tm));
|
|
2189
|
+
}
|
|
2190
|
+
}
|
|
2191
|
+
}
|
|
2192
|
+
if (this.#z && this.#s?.length) {
|
|
2193
|
+
let tb = this.#s,
|
|
2194
|
+
tv;
|
|
2195
|
+
for (; (tv = tb?.shift()); ) this.#e?.(...tv);
|
|
2196
|
+
}
|
|
2197
|
+
return tg;
|
|
2198
|
+
}
|
|
2199
|
+
clear() {
|
|
2200
|
+
return this.#T("delete");
|
|
2201
|
+
}
|
|
2202
|
+
#T(t_) {
|
|
2203
|
+
for (let tS of this.#F({ allowStale: !0 })) {
|
|
2204
|
+
let tk = this.#m[tS];
|
|
2205
|
+
if (this.#B(tk)) tk.__abortController.abort(Error("deleted"));
|
|
2206
|
+
else {
|
|
2207
|
+
let tx = this.#l[tS];
|
|
2208
|
+
(this.#x && this.#c?.(tk, tx, t_),
|
|
2209
|
+
this.#z && this.#s?.push([tk, tx, t_]));
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
if (
|
|
2213
|
+
(this.#k.clear(),
|
|
2214
|
+
this.#m.fill(void 0),
|
|
2215
|
+
this.#l.fill(void 0),
|
|
2216
|
+
this.#v && this.#u)
|
|
2217
|
+
) {
|
|
2218
|
+
for (let tC of (this.#v.fill(0), this.#u.fill(0), this.#w ?? []))
|
|
2219
|
+
void 0 !== tC && clearTimeout(tC);
|
|
2220
|
+
this.#w?.fill(void 0);
|
|
2221
|
+
}
|
|
2222
|
+
if (
|
|
2223
|
+
(this.#t && this.#t.fill(0),
|
|
2224
|
+
(this.#p = 0),
|
|
2225
|
+
(this.#q = 0),
|
|
2226
|
+
(this.#r.length = 0),
|
|
2227
|
+
(this.#j = 0),
|
|
2228
|
+
(this.#i = 0),
|
|
2229
|
+
this.#z && this.#s)
|
|
2230
|
+
) {
|
|
2231
|
+
let tF = this.#s,
|
|
2232
|
+
tO;
|
|
2233
|
+
for (; (tO = tF?.shift()); ) this.#e?.(...tO);
|
|
2234
|
+
}
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
Ne =
|
|
2238
|
+
"object" == typeof process && process
|
|
2239
|
+
? process
|
|
2240
|
+
: { stdout: null, stderr: null },
|
|
2241
|
+
oi = (t) =>
|
|
2242
|
+
!!t &&
|
|
2243
|
+
"object" == typeof t &&
|
|
2244
|
+
(t instanceof V || t instanceof g || hi(t) || ai(t)),
|
|
2245
|
+
hi = (t) =>
|
|
2246
|
+
!!t &&
|
|
2247
|
+
"object" == typeof t &&
|
|
2248
|
+
t instanceof f &&
|
|
2249
|
+
"function" == typeof t.pipe &&
|
|
2250
|
+
t.pipe !== g.Writable.prototype.pipe,
|
|
2251
|
+
ai = (t) =>
|
|
2252
|
+
!!t &&
|
|
2253
|
+
"object" == typeof t &&
|
|
2254
|
+
t instanceof f &&
|
|
2255
|
+
"function" == typeof t.write &&
|
|
2256
|
+
"function" == typeof t.end,
|
|
2257
|
+
G = Symbol("EOF"),
|
|
2258
|
+
H = Symbol("maybeEmitEnd"),
|
|
2259
|
+
K = Symbol("emittedEnd"),
|
|
2260
|
+
kt = Symbol("emittingEnd"),
|
|
2261
|
+
ut = Symbol("emittedError"),
|
|
2262
|
+
Rt = Symbol("closed"),
|
|
2263
|
+
_e = Symbol("read"),
|
|
2264
|
+
Ot = Symbol("flush"),
|
|
2265
|
+
Le = Symbol("flushChunk"),
|
|
2266
|
+
P = Symbol("encoding"),
|
|
2267
|
+
et = Symbol("decoder"),
|
|
2268
|
+
v = Symbol("flowing"),
|
|
2269
|
+
dt = Symbol("paused"),
|
|
2270
|
+
st = Symbol("resume"),
|
|
2271
|
+
C = Symbol("buffer"),
|
|
2272
|
+
F = Symbol("pipes"),
|
|
2273
|
+
T = Symbol("bufferLength"),
|
|
2274
|
+
Yt = Symbol("bufferPush"),
|
|
2275
|
+
Ft = Symbol("bufferShift"),
|
|
2276
|
+
k = Symbol("objectMode"),
|
|
2277
|
+
x = Symbol("destroyed"),
|
|
2278
|
+
Xt = Symbol("error"),
|
|
2279
|
+
Jt = Symbol("emitData"),
|
|
2280
|
+
We = Symbol("emitEnd"),
|
|
2281
|
+
Zt = Symbol("emitEnd2"),
|
|
2282
|
+
B = Symbol("async"),
|
|
2283
|
+
Qt = Symbol("abort"),
|
|
2284
|
+
Dt = Symbol("aborted"),
|
|
2285
|
+
pt = Symbol("signal"),
|
|
2286
|
+
Y = Symbol("dataListeners"),
|
|
2287
|
+
M = Symbol("discarded"),
|
|
2288
|
+
mt = (t) => Promise.resolve().then(t),
|
|
2289
|
+
li = (t) => t(),
|
|
2290
|
+
ci = (t) => "end" === t || "finish" === t || "prefinish" === t,
|
|
2291
|
+
fi = (t) =>
|
|
2292
|
+
t instanceof ArrayBuffer ||
|
|
2293
|
+
(!!t &&
|
|
2294
|
+
"object" == typeof t &&
|
|
2295
|
+
t.constructor &&
|
|
2296
|
+
"ArrayBuffer" === t.constructor.name &&
|
|
2297
|
+
t.byteLength >= 0),
|
|
2298
|
+
ui = (t) => !Buffer.isBuffer(t) && ArrayBuffer.isView(t),
|
|
2299
|
+
Mt = class {
|
|
2300
|
+
src;
|
|
2301
|
+
dest;
|
|
2302
|
+
opts;
|
|
2303
|
+
ondrain;
|
|
2304
|
+
constructor(t, e, i) {
|
|
2305
|
+
((this.src = t),
|
|
2306
|
+
(this.dest = e),
|
|
2307
|
+
(this.opts = i),
|
|
2308
|
+
(this.ondrain = () => t[st]()),
|
|
2309
|
+
this.dest.on("drain", this.ondrain));
|
|
2310
|
+
}
|
|
2311
|
+
unpipe() {
|
|
2312
|
+
this.dest.removeListener("drain", this.ondrain);
|
|
2313
|
+
}
|
|
2314
|
+
proxyErrors(t) {}
|
|
2315
|
+
end() {
|
|
2316
|
+
(this.unpipe(), this.opts.end && this.dest.end());
|
|
2317
|
+
}
|
|
2318
|
+
},
|
|
2319
|
+
te = class extends Mt {
|
|
2320
|
+
unpipe() {
|
|
2321
|
+
(this.src.removeListener("error", this.proxyErrors), super.unpipe());
|
|
2322
|
+
}
|
|
2323
|
+
constructor(t, e, i) {
|
|
2324
|
+
(super(t, e, i),
|
|
2325
|
+
(this.proxyErrors = (t) => this.dest.emit("error", t)),
|
|
2326
|
+
t.on("error", this.proxyErrors));
|
|
2327
|
+
}
|
|
2328
|
+
},
|
|
2329
|
+
di = (t) => !!t.objectMode,
|
|
2330
|
+
pi = (t) => !t.objectMode && !!t.encoding && "buffer" !== t.encoding,
|
|
2331
|
+
V = class extends f {
|
|
2332
|
+
[v] = !1;
|
|
2333
|
+
[dt] = !1;
|
|
2334
|
+
[F] = [];
|
|
2335
|
+
[C] = [];
|
|
2336
|
+
[k];
|
|
2337
|
+
[P];
|
|
2338
|
+
[B];
|
|
2339
|
+
[et];
|
|
2340
|
+
[G] = !1;
|
|
2341
|
+
[K] = !1;
|
|
2342
|
+
[kt] = !1;
|
|
2343
|
+
[Rt] = !1;
|
|
2344
|
+
[ut] = null;
|
|
2345
|
+
[T] = 0;
|
|
2346
|
+
[x] = !1;
|
|
2347
|
+
[pt];
|
|
2348
|
+
[Dt] = !1;
|
|
2349
|
+
[Y] = 0;
|
|
2350
|
+
[M] = !1;
|
|
2351
|
+
writable = !0;
|
|
2352
|
+
readable = !0;
|
|
2353
|
+
constructor(...t) {
|
|
2354
|
+
let e = t[0] || {};
|
|
2355
|
+
if ((super(), e.objectMode && "string" == typeof e.encoding))
|
|
2356
|
+
throw TypeError("Encoding and objectMode may not be used together");
|
|
2357
|
+
(di(e)
|
|
2358
|
+
? ((this[k] = !0), (this[P] = null))
|
|
2359
|
+
: pi(e)
|
|
2360
|
+
? ((this[P] = e.encoding), (this[k] = !1))
|
|
2361
|
+
: ((this[k] = !1), (this[P] = null)),
|
|
2362
|
+
(this[B] = !!e.async),
|
|
2363
|
+
(this[et] = this[P] ? new m(this[P]) : null),
|
|
2364
|
+
e &&
|
|
2365
|
+
!0 === e.debugExposeBuffer &&
|
|
2366
|
+
Object.defineProperty(this, "buffer", { get: () => this[C] }),
|
|
2367
|
+
e &&
|
|
2368
|
+
!0 === e.debugExposePipes &&
|
|
2369
|
+
Object.defineProperty(this, "pipes", { get: () => this[F] }));
|
|
2370
|
+
let { signal: i } = e;
|
|
2371
|
+
i &&
|
|
2372
|
+
((this[pt] = i),
|
|
2373
|
+
i.aborted ? this[Qt]() : i.addEventListener("abort", () => this[Qt]()));
|
|
2374
|
+
}
|
|
2375
|
+
get bufferLength() {
|
|
2376
|
+
return this[T];
|
|
2377
|
+
}
|
|
2378
|
+
get encoding() {
|
|
2379
|
+
return this[P];
|
|
2380
|
+
}
|
|
2381
|
+
set encoding(t) {
|
|
2382
|
+
throw Error("Encoding must be set at instantiation time");
|
|
2383
|
+
}
|
|
2384
|
+
setEncoding(t) {
|
|
2385
|
+
throw Error("Encoding must be set at instantiation time");
|
|
2386
|
+
}
|
|
2387
|
+
get objectMode() {
|
|
2388
|
+
return this[k];
|
|
2389
|
+
}
|
|
2390
|
+
set objectMode(t) {
|
|
2391
|
+
throw Error("objectMode must be set at instantiation time");
|
|
2392
|
+
}
|
|
2393
|
+
get async() {
|
|
2394
|
+
return this[B];
|
|
2395
|
+
}
|
|
2396
|
+
set async(t) {
|
|
2397
|
+
this[B] = this[B] || !!t;
|
|
2398
|
+
}
|
|
2399
|
+
[Qt]() {
|
|
2400
|
+
((this[Dt] = !0),
|
|
2401
|
+
this.emit("abort", this[pt]?.reason),
|
|
2402
|
+
this.destroy(this[pt]?.reason));
|
|
2403
|
+
}
|
|
2404
|
+
get aborted() {
|
|
2405
|
+
return this[Dt];
|
|
2406
|
+
}
|
|
2407
|
+
set aborted(t) {}
|
|
2408
|
+
write(t, e, i) {
|
|
2409
|
+
if (this[Dt]) return !1;
|
|
2410
|
+
if (this[G]) throw Error("write after end");
|
|
2411
|
+
if (this[x])
|
|
2412
|
+
return (
|
|
2413
|
+
this.emit(
|
|
2414
|
+
"error",
|
|
2415
|
+
Object.assign(
|
|
2416
|
+
Error("Cannot call write after a stream was destroyed"),
|
|
2417
|
+
{ code: "ERR_STREAM_DESTROYED" },
|
|
2418
|
+
),
|
|
2419
|
+
),
|
|
2420
|
+
!0
|
|
2421
|
+
);
|
|
2422
|
+
("function" == typeof e && ((i = e), (e = "utf8")), e || (e = "utf8"));
|
|
2423
|
+
let s = this[B] ? mt : li;
|
|
2424
|
+
if (!this[k] && !Buffer.isBuffer(t)) {
|
|
2425
|
+
if (ui(t)) t = Buffer.from(t.buffer, t.byteOffset, t.byteLength);
|
|
2426
|
+
else if (fi(t)) t = Buffer.from(t);
|
|
2427
|
+
else if ("string" != typeof t)
|
|
2428
|
+
throw Error("Non-contiguous data written to non-objectMode stream");
|
|
2429
|
+
}
|
|
2430
|
+
return this[k]
|
|
2431
|
+
? (this[v] && 0 !== this[T] && this[Ot](!0),
|
|
2432
|
+
this[v] ? this.emit("data", t) : this[Yt](t),
|
|
2433
|
+
0 !== this[T] && this.emit("readable"),
|
|
2434
|
+
i && s(i),
|
|
2435
|
+
this[v])
|
|
2436
|
+
: t.length
|
|
2437
|
+
? ("string" == typeof t &&
|
|
2438
|
+
(e !== this[P] || this[et]?.lastNeed) &&
|
|
2439
|
+
(t = Buffer.from(t, e)),
|
|
2440
|
+
Buffer.isBuffer(t) && this[P] && (t = this[et].write(t)),
|
|
2441
|
+
this[v] && 0 !== this[T] && this[Ot](!0),
|
|
2442
|
+
this[v] ? this.emit("data", t) : this[Yt](t),
|
|
2443
|
+
0 !== this[T] && this.emit("readable"),
|
|
2444
|
+
i && s(i),
|
|
2445
|
+
this[v])
|
|
2446
|
+
: (0 !== this[T] && this.emit("readable"), i && s(i), this[v]);
|
|
2447
|
+
}
|
|
2448
|
+
read(t) {
|
|
2449
|
+
if (this[x]) return null;
|
|
2450
|
+
if (((this[M] = !1), 0 === this[T] || 0 === t || (t && t > this[T])))
|
|
2451
|
+
return (this[H](), null);
|
|
2452
|
+
(this[k] && (t = null),
|
|
2453
|
+
this[C].length > 1 &&
|
|
2454
|
+
!this[k] &&
|
|
2455
|
+
(this[C] = [
|
|
2456
|
+
this[P] ? this[C].join("") : Buffer.concat(this[C], this[T]),
|
|
2457
|
+
]));
|
|
2458
|
+
let e = this[_e](t || null, this[C][0]);
|
|
2459
|
+
return (this[H](), e);
|
|
2460
|
+
}
|
|
2461
|
+
[_e](t, e) {
|
|
2462
|
+
if (this[k]) this[Ft]();
|
|
2463
|
+
else {
|
|
2464
|
+
let i = e;
|
|
2465
|
+
t === i.length || null === t
|
|
2466
|
+
? this[Ft]()
|
|
2467
|
+
: "string" == typeof i
|
|
2468
|
+
? ((this[C][0] = i.slice(t)), (e = i.slice(0, t)), (this[T] -= t))
|
|
2469
|
+
: ((this[C][0] = i.subarray(t)),
|
|
2470
|
+
(e = i.subarray(0, t)),
|
|
2471
|
+
(this[T] -= t));
|
|
2472
|
+
}
|
|
2473
|
+
return (
|
|
2474
|
+
this.emit("data", e),
|
|
2475
|
+
this[C].length || this[G] || this.emit("drain"),
|
|
2476
|
+
e
|
|
2477
|
+
);
|
|
2478
|
+
}
|
|
2479
|
+
end(t, e, i) {
|
|
2480
|
+
return (
|
|
2481
|
+
"function" == typeof t && ((i = t), (t = void 0)),
|
|
2482
|
+
"function" == typeof e && ((i = e), (e = "utf8")),
|
|
2483
|
+
void 0 !== t && this.write(t, e),
|
|
2484
|
+
i && this.once("end", i),
|
|
2485
|
+
(this[G] = !0),
|
|
2486
|
+
(this.writable = !1),
|
|
2487
|
+
(this[v] || !this[dt]) && this[H](),
|
|
2488
|
+
this
|
|
2489
|
+
);
|
|
2490
|
+
}
|
|
2491
|
+
[st]() {
|
|
2492
|
+
this[x] ||
|
|
2493
|
+
(this[Y] || this[F].length || (this[M] = !0),
|
|
2494
|
+
(this[dt] = !1),
|
|
2495
|
+
(this[v] = !0),
|
|
2496
|
+
this.emit("resume"),
|
|
2497
|
+
this[C].length ? this[Ot]() : this[G] ? this[H]() : this.emit("drain"));
|
|
2498
|
+
}
|
|
2499
|
+
resume() {
|
|
2500
|
+
return this[st]();
|
|
2501
|
+
}
|
|
2502
|
+
pause() {
|
|
2503
|
+
((this[v] = !1), (this[dt] = !0), (this[M] = !1));
|
|
2504
|
+
}
|
|
2505
|
+
get destroyed() {
|
|
2506
|
+
return this[x];
|
|
2507
|
+
}
|
|
2508
|
+
get flowing() {
|
|
2509
|
+
return this[v];
|
|
2510
|
+
}
|
|
2511
|
+
get paused() {
|
|
2512
|
+
return this[dt];
|
|
2513
|
+
}
|
|
2514
|
+
[Yt](t) {
|
|
2515
|
+
(this[k] ? (this[T] += 1) : (this[T] += t.length), this[C].push(t));
|
|
2516
|
+
}
|
|
2517
|
+
[Ft]() {
|
|
2518
|
+
return (
|
|
2519
|
+
this[k] ? (this[T] -= 1) : (this[T] -= this[C][0].length),
|
|
2520
|
+
this[C].shift()
|
|
2521
|
+
);
|
|
2522
|
+
}
|
|
2523
|
+
[Ot](t = !1) {
|
|
2524
|
+
do;
|
|
2525
|
+
while (this[Le](this[Ft]()) && this[C].length);
|
|
2526
|
+
t || this[C].length || this[G] || this.emit("drain");
|
|
2527
|
+
}
|
|
2528
|
+
[Le](t) {
|
|
2529
|
+
return (this.emit("data", t), this[v]);
|
|
2530
|
+
}
|
|
2531
|
+
pipe(t, e) {
|
|
2532
|
+
if (this[x]) return t;
|
|
2533
|
+
this[M] = !1;
|
|
2534
|
+
let i = this[K];
|
|
2535
|
+
return (
|
|
2536
|
+
(e = e || {}),
|
|
2537
|
+
t === Ne.stdout || t === Ne.stderr
|
|
2538
|
+
? (e.end = !1)
|
|
2539
|
+
: (e.end = !1 !== e.end),
|
|
2540
|
+
(e.proxyErrors = !!e.proxyErrors),
|
|
2541
|
+
i
|
|
2542
|
+
? e.end && t.end()
|
|
2543
|
+
: (this[F].push(
|
|
2544
|
+
e.proxyErrors ? new te(this, t, e) : new Mt(this, t, e),
|
|
2545
|
+
),
|
|
2546
|
+
this[B] ? mt(() => this[st]()) : this[st]()),
|
|
2547
|
+
t
|
|
2548
|
+
);
|
|
2549
|
+
}
|
|
2550
|
+
unpipe(t) {
|
|
2551
|
+
let e = this[F].find((e) => e.dest === t);
|
|
2552
|
+
e &&
|
|
2553
|
+
(1 === this[F].length
|
|
2554
|
+
? (this[v] && 0 === this[Y] && (this[v] = !1), (this[F] = []))
|
|
2555
|
+
: this[F].splice(this[F].indexOf(e), 1),
|
|
2556
|
+
e.unpipe());
|
|
2557
|
+
}
|
|
2558
|
+
addListener(t, e) {
|
|
2559
|
+
return this.on(t, e);
|
|
2560
|
+
}
|
|
2561
|
+
on(t, e) {
|
|
2562
|
+
let i = super.on(t, e);
|
|
2563
|
+
if ("data" === t)
|
|
2564
|
+
((this[M] = !1), this[Y]++, this[F].length || this[v] || this[st]());
|
|
2565
|
+
else if ("readable" === t && 0 !== this[T]) super.emit("readable");
|
|
2566
|
+
else if (ci(t) && this[K]) (super.emit(t), this.removeAllListeners(t));
|
|
2567
|
+
else if ("error" === t && this[ut]) {
|
|
2568
|
+
let s = e;
|
|
2569
|
+
this[B] ? mt(() => s.call(this, this[ut])) : s.call(this, this[ut]);
|
|
2570
|
+
}
|
|
2571
|
+
return i;
|
|
2572
|
+
}
|
|
2573
|
+
removeListener(t, e) {
|
|
2574
|
+
return this.off(t, e);
|
|
2575
|
+
}
|
|
2576
|
+
off(t, e) {
|
|
2577
|
+
let i = super.off(t, e);
|
|
2578
|
+
return (
|
|
2579
|
+
"data" !== t ||
|
|
2580
|
+
((this[Y] = this.listeners("data").length),
|
|
2581
|
+
0 !== this[Y] || this[M] || this[F].length || (this[v] = !1)),
|
|
2582
|
+
i
|
|
2583
|
+
);
|
|
2584
|
+
}
|
|
2585
|
+
removeAllListeners(t) {
|
|
2586
|
+
let e = super.removeAllListeners(t);
|
|
2587
|
+
return (
|
|
2588
|
+
("data" !== t && void 0 !== t) ||
|
|
2589
|
+
((this[Y] = 0), this[M] || this[F].length || (this[v] = !1)),
|
|
2590
|
+
e
|
|
2591
|
+
);
|
|
2592
|
+
}
|
|
2593
|
+
get emittedEnd() {
|
|
2594
|
+
return this[K];
|
|
2595
|
+
}
|
|
2596
|
+
[H]() {
|
|
2597
|
+
this[kt] ||
|
|
2598
|
+
this[K] ||
|
|
2599
|
+
this[x] ||
|
|
2600
|
+
0 !== this[C].length ||
|
|
2601
|
+
!this[G] ||
|
|
2602
|
+
((this[kt] = !0),
|
|
2603
|
+
this.emit("end"),
|
|
2604
|
+
this.emit("prefinish"),
|
|
2605
|
+
this.emit("finish"),
|
|
2606
|
+
this[Rt] && this.emit("close"),
|
|
2607
|
+
(this[kt] = !1));
|
|
2608
|
+
}
|
|
2609
|
+
emit(t, ...e) {
|
|
2610
|
+
let i = e[0];
|
|
2611
|
+
if ("error" !== t && "close" !== t && t !== x && this[x]) return !1;
|
|
2612
|
+
if ("data" === t)
|
|
2613
|
+
return (
|
|
2614
|
+
(!!this[k] || !!i) &&
|
|
2615
|
+
(this[B] ? (mt(() => this[Jt](i)), !0) : this[Jt](i))
|
|
2616
|
+
);
|
|
2617
|
+
if ("end" === t) return this[We]();
|
|
2618
|
+
if ("close" === t) {
|
|
2619
|
+
if (((this[Rt] = !0), !this[K] && !this[x])) return !1;
|
|
2620
|
+
let s = super.emit("close");
|
|
2621
|
+
return (this.removeAllListeners("close"), s);
|
|
2622
|
+
}
|
|
2623
|
+
if ("error" === t) {
|
|
2624
|
+
((this[ut] = i), super.emit(Xt, i));
|
|
2625
|
+
let h =
|
|
2626
|
+
(!this[pt] || !!this.listeners("error").length) &&
|
|
2627
|
+
super.emit("error", i);
|
|
2628
|
+
return (this[H](), h);
|
|
2629
|
+
}
|
|
2630
|
+
if ("resume" === t) {
|
|
2631
|
+
let r = super.emit("resume");
|
|
2632
|
+
return (this[H](), r);
|
|
2633
|
+
}
|
|
2634
|
+
if ("finish" === t || "prefinish" === t) {
|
|
2635
|
+
let n = super.emit(t);
|
|
2636
|
+
return (this.removeAllListeners(t), n);
|
|
2637
|
+
}
|
|
2638
|
+
let o = super.emit(t, ...e);
|
|
2639
|
+
return (this[H](), o);
|
|
2640
|
+
}
|
|
2641
|
+
[Jt](t) {
|
|
2642
|
+
for (let e of this[F]) !1 === e.dest.write(t) && this.pause();
|
|
2643
|
+
let i = !this[M] && super.emit("data", t);
|
|
2644
|
+
return (this[H](), i);
|
|
2645
|
+
}
|
|
2646
|
+
[We]() {
|
|
2647
|
+
return (
|
|
2648
|
+
!this[K] &&
|
|
2649
|
+
((this[K] = !0),
|
|
2650
|
+
(this.readable = !1),
|
|
2651
|
+
this[B] ? (mt(() => this[Zt]()), !0) : this[Zt]())
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2654
|
+
[Zt]() {
|
|
2655
|
+
if (this[et]) {
|
|
2656
|
+
let t = this[et].end();
|
|
2657
|
+
if (t) {
|
|
2658
|
+
for (let e of this[F]) e.dest.write(t);
|
|
2659
|
+
this[M] || super.emit("data", t);
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
for (let i of this[F]) i.end();
|
|
2663
|
+
let s = super.emit("end");
|
|
2664
|
+
return (this.removeAllListeners("end"), s);
|
|
2665
|
+
}
|
|
2666
|
+
async collect() {
|
|
2667
|
+
let t = Object.assign([], { dataLength: 0 });
|
|
2668
|
+
this[k] || (t.dataLength = 0);
|
|
2669
|
+
let e = this.promise();
|
|
2670
|
+
return (
|
|
2671
|
+
this.on("data", (e) => {
|
|
2672
|
+
(t.push(e), this[k] || (t.dataLength += e.length));
|
|
2673
|
+
}),
|
|
2674
|
+
await e,
|
|
2675
|
+
t
|
|
2676
|
+
);
|
|
2677
|
+
}
|
|
2678
|
+
async concat() {
|
|
2679
|
+
if (this[k]) throw Error("cannot concat in objectMode");
|
|
2680
|
+
let t = await this.collect();
|
|
2681
|
+
return this[P] ? t.join("") : Buffer.concat(t, t.dataLength);
|
|
2682
|
+
}
|
|
2683
|
+
async promise() {
|
|
2684
|
+
return new Promise((t, e) => {
|
|
2685
|
+
(this.on(x, () => e(Error("stream destroyed"))),
|
|
2686
|
+
this.on("error", (t) => e(t)),
|
|
2687
|
+
this.on("end", () => t()));
|
|
2688
|
+
});
|
|
2689
|
+
}
|
|
2690
|
+
[Symbol.asyncIterator]() {
|
|
2691
|
+
this[M] = !1;
|
|
2692
|
+
let t = !1,
|
|
2693
|
+
e = async () => (this.pause(), (t = !0), { value: void 0, done: !0 });
|
|
2694
|
+
return {
|
|
2695
|
+
next: () => {
|
|
2696
|
+
if (t) return e();
|
|
2697
|
+
let i = this.read();
|
|
2698
|
+
if (null !== i) return Promise.resolve({ done: !1, value: i });
|
|
2699
|
+
if (this[G]) return e();
|
|
2700
|
+
let s,
|
|
2701
|
+
h,
|
|
2702
|
+
r = (t) => {
|
|
2703
|
+
(this.off("data", n),
|
|
2704
|
+
this.off("end", o),
|
|
2705
|
+
this.off(x, a),
|
|
2706
|
+
e(),
|
|
2707
|
+
h(t));
|
|
2708
|
+
},
|
|
2709
|
+
n = (t) => {
|
|
2710
|
+
(this.off("error", r),
|
|
2711
|
+
this.off("end", o),
|
|
2712
|
+
this.off(x, a),
|
|
2713
|
+
this.pause(),
|
|
2714
|
+
s({ value: t, done: !!this[G] }));
|
|
2715
|
+
},
|
|
2716
|
+
o = () => {
|
|
2717
|
+
(this.off("error", r),
|
|
2718
|
+
this.off("data", n),
|
|
2719
|
+
this.off(x, a),
|
|
2720
|
+
e(),
|
|
2721
|
+
s({ done: !0, value: void 0 }));
|
|
2722
|
+
},
|
|
2723
|
+
a = () => r(Error("stream destroyed"));
|
|
2724
|
+
return new Promise((t, e) => {
|
|
2725
|
+
((h = e),
|
|
2726
|
+
(s = t),
|
|
2727
|
+
this.once(x, a),
|
|
2728
|
+
this.once("error", r),
|
|
2729
|
+
this.once("end", o),
|
|
2730
|
+
this.once("data", n));
|
|
2731
|
+
});
|
|
2732
|
+
},
|
|
2733
|
+
throw: e,
|
|
2734
|
+
return: e,
|
|
2735
|
+
[Symbol.asyncIterator]() {
|
|
2736
|
+
return this;
|
|
2737
|
+
},
|
|
2738
|
+
async [Symbol.asyncDispose]() {},
|
|
2739
|
+
};
|
|
2740
|
+
}
|
|
2741
|
+
[Symbol.iterator]() {
|
|
2742
|
+
this[M] = !1;
|
|
2743
|
+
let t = !1,
|
|
2744
|
+
e = () => (
|
|
2745
|
+
this.pause(),
|
|
2746
|
+
this.off(Xt, e),
|
|
2747
|
+
this.off(x, e),
|
|
2748
|
+
this.off("end", e),
|
|
2749
|
+
(t = !0),
|
|
2750
|
+
{ done: !0, value: void 0 }
|
|
2751
|
+
),
|
|
2752
|
+
i = () => {
|
|
2753
|
+
if (t) return e();
|
|
2754
|
+
let i = this.read();
|
|
2755
|
+
return null === i ? e() : { done: !1, value: i };
|
|
2756
|
+
};
|
|
2757
|
+
return (
|
|
2758
|
+
this.once("end", e),
|
|
2759
|
+
this.once(Xt, e),
|
|
2760
|
+
this.once(x, e),
|
|
2761
|
+
{
|
|
2762
|
+
next: i,
|
|
2763
|
+
throw: e,
|
|
2764
|
+
return: e,
|
|
2765
|
+
[Symbol.iterator]() {
|
|
2766
|
+
return this;
|
|
2767
|
+
},
|
|
2768
|
+
[Symbol.dispose]() {},
|
|
2769
|
+
}
|
|
2770
|
+
);
|
|
2771
|
+
}
|
|
2772
|
+
destroy(t) {
|
|
2773
|
+
return this[x]
|
|
2774
|
+
? (t ? this.emit("error", t) : this.emit(x), this)
|
|
2775
|
+
: ((this[x] = !0),
|
|
2776
|
+
(this[M] = !0),
|
|
2777
|
+
(this[C].length = 0),
|
|
2778
|
+
(this[T] = 0),
|
|
2779
|
+
"function" != typeof this.close || this[Rt] || this.close(),
|
|
2780
|
+
t ? this.emit("error", t) : this.emit(x),
|
|
2781
|
+
this);
|
|
2782
|
+
}
|
|
2783
|
+
static get isStream() {
|
|
2784
|
+
return oi;
|
|
2785
|
+
}
|
|
2786
|
+
},
|
|
2787
|
+
vi = a.native,
|
|
2788
|
+
wt = {
|
|
2789
|
+
lstatSync: h,
|
|
2790
|
+
readdir: r,
|
|
2791
|
+
readdirSync: n,
|
|
2792
|
+
readlinkSync: o,
|
|
2793
|
+
realpathSync: vi,
|
|
2794
|
+
promises: { lstat: c, readdir: u, readlink: p, realpath: d },
|
|
2795
|
+
},
|
|
2796
|
+
Ue = (t) =>
|
|
2797
|
+
t && t !== wt && t !== l
|
|
2798
|
+
? { ...wt, ...t, promises: { ...wt.promises, ...(t.promises || {}) } }
|
|
2799
|
+
: wt,
|
|
2800
|
+
$e = /^\\\\\?\\([a-z]:)\\?$/i,
|
|
2801
|
+
Ri = (t) => t.replace(/\//g, "\\").replace($e, "$1\\"),
|
|
2802
|
+
Oi = /[\\\/]/,
|
|
2803
|
+
L = 0,
|
|
2804
|
+
Ge = 1,
|
|
2805
|
+
He = 2,
|
|
2806
|
+
U = 4,
|
|
2807
|
+
qe = 6,
|
|
2808
|
+
Ke = 8,
|
|
2809
|
+
X = 10,
|
|
2810
|
+
Ve = 12,
|
|
2811
|
+
_ = 15,
|
|
2812
|
+
gt = ~_,
|
|
2813
|
+
se = 16,
|
|
2814
|
+
je = 32,
|
|
2815
|
+
yt = 64,
|
|
2816
|
+
j = 128,
|
|
2817
|
+
Nt = 256,
|
|
2818
|
+
Lt = 512,
|
|
2819
|
+
Ie = yt | j | Lt,
|
|
2820
|
+
Fi = 1023,
|
|
2821
|
+
ie = (t) =>
|
|
2822
|
+
t.isFile()
|
|
2823
|
+
? Ke
|
|
2824
|
+
: t.isDirectory()
|
|
2825
|
+
? U
|
|
2826
|
+
: t.isSymbolicLink()
|
|
2827
|
+
? X
|
|
2828
|
+
: t.isCharacterDevice()
|
|
2829
|
+
? He
|
|
2830
|
+
: t.isBlockDevice()
|
|
2831
|
+
? qe
|
|
2832
|
+
: t.isSocket()
|
|
2833
|
+
? Ve
|
|
2834
|
+
: t.isFIFO()
|
|
2835
|
+
? Ge
|
|
2836
|
+
: L,
|
|
2837
|
+
ze = new ft({ max: 4096 }),
|
|
2838
|
+
bt = (t) => {
|
|
2839
|
+
let e = ze.get(t);
|
|
2840
|
+
if (e) return e;
|
|
2841
|
+
let i = t.normalize("NFKD");
|
|
2842
|
+
return (ze.set(t, i), i);
|
|
2843
|
+
},
|
|
2844
|
+
Be = new ft({ max: 4096 }),
|
|
2845
|
+
_t = (t) => {
|
|
2846
|
+
let e = Be.get(t);
|
|
2847
|
+
if (e) return e;
|
|
2848
|
+
let i = bt(t.toLowerCase());
|
|
2849
|
+
return (Be.set(t, i), i);
|
|
2850
|
+
},
|
|
2851
|
+
Wt = class extends ft {
|
|
2852
|
+
constructor() {
|
|
2853
|
+
super({ max: 256 });
|
|
2854
|
+
}
|
|
2855
|
+
},
|
|
2856
|
+
ne = class extends ft {
|
|
2857
|
+
constructor(t = 16384) {
|
|
2858
|
+
super({ maxSize: t, sizeCalculation: (t) => t.length + 1 });
|
|
2859
|
+
}
|
|
2860
|
+
},
|
|
2861
|
+
Ye = Symbol("PathScurry setAsCwd"),
|
|
2862
|
+
R = class {
|
|
2863
|
+
name;
|
|
2864
|
+
root;
|
|
2865
|
+
roots;
|
|
2866
|
+
parent;
|
|
2867
|
+
nocase;
|
|
2868
|
+
isCWD = !1;
|
|
2869
|
+
#a;
|
|
2870
|
+
#b;
|
|
2871
|
+
get dev() {
|
|
2872
|
+
return this.#b;
|
|
2873
|
+
}
|
|
2874
|
+
#c;
|
|
2875
|
+
get mode() {
|
|
2876
|
+
return this.#c;
|
|
2877
|
+
}
|
|
2878
|
+
#d;
|
|
2879
|
+
get nlink() {
|
|
2880
|
+
return this.#d;
|
|
2881
|
+
}
|
|
2882
|
+
#e;
|
|
2883
|
+
get uid() {
|
|
2884
|
+
return this.#e;
|
|
2885
|
+
}
|
|
2886
|
+
#f;
|
|
2887
|
+
get gid() {
|
|
2888
|
+
return this.#f;
|
|
2889
|
+
}
|
|
2890
|
+
#g;
|
|
2891
|
+
get rdev() {
|
|
2892
|
+
return this.#g;
|
|
2893
|
+
}
|
|
2894
|
+
#h;
|
|
2895
|
+
get blksize() {
|
|
2896
|
+
return this.#h;
|
|
2897
|
+
}
|
|
2898
|
+
#i;
|
|
2899
|
+
get ino() {
|
|
2900
|
+
return this.#i;
|
|
2901
|
+
}
|
|
2902
|
+
#j;
|
|
2903
|
+
get size() {
|
|
2904
|
+
return this.#j;
|
|
2905
|
+
}
|
|
2906
|
+
#k;
|
|
2907
|
+
get blocks() {
|
|
2908
|
+
return this.#k;
|
|
2909
|
+
}
|
|
2910
|
+
#l;
|
|
2911
|
+
get atimeMs() {
|
|
2912
|
+
return this.#l;
|
|
2913
|
+
}
|
|
2914
|
+
#m;
|
|
2915
|
+
get mtimeMs() {
|
|
2916
|
+
return this.#m;
|
|
2917
|
+
}
|
|
2918
|
+
#o;
|
|
2919
|
+
get ctimeMs() {
|
|
2920
|
+
return this.#o;
|
|
2921
|
+
}
|
|
2922
|
+
#n;
|
|
2923
|
+
get birthtimeMs() {
|
|
2924
|
+
return this.#n;
|
|
2925
|
+
}
|
|
2926
|
+
#p;
|
|
2927
|
+
get atime() {
|
|
2928
|
+
return this.#p;
|
|
2929
|
+
}
|
|
2930
|
+
#q;
|
|
2931
|
+
get mtime() {
|
|
2932
|
+
return this.#q;
|
|
2933
|
+
}
|
|
2934
|
+
#r;
|
|
2935
|
+
get ctime() {
|
|
2936
|
+
return this.#r;
|
|
2937
|
+
}
|
|
2938
|
+
#s;
|
|
2939
|
+
get birthtime() {
|
|
2940
|
+
return this.#s;
|
|
2941
|
+
}
|
|
2942
|
+
#t;
|
|
2943
|
+
#u;
|
|
2944
|
+
#v;
|
|
2945
|
+
#w;
|
|
2946
|
+
#x;
|
|
2947
|
+
#y;
|
|
2948
|
+
#z;
|
|
2949
|
+
#A;
|
|
2950
|
+
#I;
|
|
2951
|
+
#L;
|
|
2952
|
+
get parentPath() {
|
|
2953
|
+
return (this.parent || this).fullpath();
|
|
2954
|
+
}
|
|
2955
|
+
get path() {
|
|
2956
|
+
return this.parentPath;
|
|
2957
|
+
}
|
|
2958
|
+
constructor(t, e = L, i, s, h, r, n) {
|
|
2959
|
+
((this.name = t),
|
|
2960
|
+
(this.#t = h ? _t(t) : bt(t)),
|
|
2961
|
+
(this.#z = e & Fi),
|
|
2962
|
+
(this.nocase = h),
|
|
2963
|
+
(this.roots = s),
|
|
2964
|
+
(this.root = i || this),
|
|
2965
|
+
(this.#A = r),
|
|
2966
|
+
(this.#v = n.fullpath),
|
|
2967
|
+
(this.#x = n.relative),
|
|
2968
|
+
(this.#y = n.relativePosix),
|
|
2969
|
+
(this.parent = n.parent),
|
|
2970
|
+
this.parent ? (this.#a = this.parent.#a) : (this.#a = Ue(n.fs)));
|
|
2971
|
+
}
|
|
2972
|
+
depth() {
|
|
2973
|
+
return void 0 !== this.#u
|
|
2974
|
+
? this.#u
|
|
2975
|
+
: this.parent
|
|
2976
|
+
? (this.#u = this.parent.depth() + 1)
|
|
2977
|
+
: (this.#u = 0);
|
|
2978
|
+
}
|
|
2979
|
+
childrenCache() {
|
|
2980
|
+
return this.#A;
|
|
2981
|
+
}
|
|
2982
|
+
resolve(t) {
|
|
2983
|
+
if (!t) return this;
|
|
2984
|
+
let e = this.getRootString(t),
|
|
2985
|
+
i = t.substring(e.length).split(this.splitSep);
|
|
2986
|
+
return e ? this.getRoot(e).#M(i) : this.#M(i);
|
|
2987
|
+
}
|
|
2988
|
+
#M(t) {
|
|
2989
|
+
let e = this;
|
|
2990
|
+
for (let i of t) e = e.child(i);
|
|
2991
|
+
return e;
|
|
2992
|
+
}
|
|
2993
|
+
children() {
|
|
2994
|
+
let t = this.#A.get(this);
|
|
2995
|
+
if (t) return t;
|
|
2996
|
+
let e = Object.assign([], { provisional: 0 });
|
|
2997
|
+
return (this.#A.set(this, e), (this.#z &= ~se), e);
|
|
2998
|
+
}
|
|
2999
|
+
child(t, e) {
|
|
3000
|
+
if ("" === t || "." === t) return this;
|
|
3001
|
+
if (".." === t) return this.parent || this;
|
|
3002
|
+
let i = this.children(),
|
|
3003
|
+
s = this.nocase ? _t(t) : bt(t);
|
|
3004
|
+
for (let h of i) if (h.#t === s) return h;
|
|
3005
|
+
let r = this.parent ? this.sep : "",
|
|
3006
|
+
n = this.#v ? this.#v + r + t : void 0,
|
|
3007
|
+
o = this.newChild(t, L, { ...e, parent: this, fullpath: n });
|
|
3008
|
+
return (this.canReaddir() || (o.#z |= j), i.push(o), o);
|
|
3009
|
+
}
|
|
3010
|
+
relative() {
|
|
3011
|
+
if (this.isCWD) return "";
|
|
3012
|
+
if (void 0 !== this.#x) return this.#x;
|
|
3013
|
+
let t = this.name,
|
|
3014
|
+
e = this.parent;
|
|
3015
|
+
if (!e) return (this.#x = this.name);
|
|
3016
|
+
let i = e.relative();
|
|
3017
|
+
return i + (i && e.parent ? this.sep : "") + t;
|
|
3018
|
+
}
|
|
3019
|
+
relativePosix() {
|
|
3020
|
+
if ("/" === this.sep) return this.relative();
|
|
3021
|
+
if (this.isCWD) return "";
|
|
3022
|
+
if (void 0 !== this.#y) return this.#y;
|
|
3023
|
+
let t = this.name,
|
|
3024
|
+
e = this.parent;
|
|
3025
|
+
if (!e) return (this.#y = this.fullpathPosix());
|
|
3026
|
+
let i = e.relativePosix();
|
|
3027
|
+
return i + (i && e.parent ? "/" : "") + t;
|
|
3028
|
+
}
|
|
3029
|
+
fullpath() {
|
|
3030
|
+
if (void 0 !== this.#v) return this.#v;
|
|
3031
|
+
let t = this.name,
|
|
3032
|
+
e = this.parent;
|
|
3033
|
+
if (!e) return (this.#v = this.name);
|
|
3034
|
+
let i = e.fullpath() + (e.parent ? this.sep : "") + t;
|
|
3035
|
+
return (this.#v = i);
|
|
3036
|
+
}
|
|
3037
|
+
fullpathPosix() {
|
|
3038
|
+
if (void 0 !== this.#w) return this.#w;
|
|
3039
|
+
if ("/" === this.sep) return (this.#w = this.fullpath());
|
|
3040
|
+
if (!this.parent) {
|
|
3041
|
+
let t = this.fullpath().replace(/\\/g, "/");
|
|
3042
|
+
return /^[a-z]:\//i.test(t) ? (this.#w = `//?/${t}`) : (this.#w = t);
|
|
3043
|
+
}
|
|
3044
|
+
let e = this.parent,
|
|
3045
|
+
i = e.fullpathPosix(),
|
|
3046
|
+
s = i + (i && e.parent ? "/" : "") + this.name;
|
|
3047
|
+
return (this.#w = s);
|
|
3048
|
+
}
|
|
3049
|
+
isUnknown() {
|
|
3050
|
+
return (this.#z & _) === L;
|
|
3051
|
+
}
|
|
3052
|
+
isType(t) {
|
|
3053
|
+
return this[`is${t}`]();
|
|
3054
|
+
}
|
|
3055
|
+
getType() {
|
|
3056
|
+
return this.isUnknown()
|
|
3057
|
+
? "Unknown"
|
|
3058
|
+
: this.isDirectory()
|
|
3059
|
+
? "Directory"
|
|
3060
|
+
: this.isFile()
|
|
3061
|
+
? "File"
|
|
3062
|
+
: this.isSymbolicLink()
|
|
3063
|
+
? "SymbolicLink"
|
|
3064
|
+
: this.isFIFO()
|
|
3065
|
+
? "FIFO"
|
|
3066
|
+
: this.isCharacterDevice()
|
|
3067
|
+
? "CharacterDevice"
|
|
3068
|
+
: this.isBlockDevice()
|
|
3069
|
+
? "BlockDevice"
|
|
3070
|
+
: this.isSocket()
|
|
3071
|
+
? "Socket"
|
|
3072
|
+
: "Unknown";
|
|
3073
|
+
}
|
|
3074
|
+
isFile() {
|
|
3075
|
+
return (this.#z & _) === Ke;
|
|
3076
|
+
}
|
|
3077
|
+
isDirectory() {
|
|
3078
|
+
return (this.#z & _) === U;
|
|
3079
|
+
}
|
|
3080
|
+
isCharacterDevice() {
|
|
3081
|
+
return (this.#z & _) === He;
|
|
3082
|
+
}
|
|
3083
|
+
isBlockDevice() {
|
|
3084
|
+
return (this.#z & _) === qe;
|
|
3085
|
+
}
|
|
3086
|
+
isFIFO() {
|
|
3087
|
+
return (this.#z & _) === Ge;
|
|
3088
|
+
}
|
|
3089
|
+
isSocket() {
|
|
3090
|
+
return (this.#z & _) === Ve;
|
|
3091
|
+
}
|
|
3092
|
+
isSymbolicLink() {
|
|
3093
|
+
return (this.#z & X) === X;
|
|
3094
|
+
}
|
|
3095
|
+
lstatCached() {
|
|
3096
|
+
return this.#z & je ? this : void 0;
|
|
3097
|
+
}
|
|
3098
|
+
readlinkCached() {
|
|
3099
|
+
return this.#I;
|
|
3100
|
+
}
|
|
3101
|
+
realpathCached() {
|
|
3102
|
+
return this.#L;
|
|
3103
|
+
}
|
|
3104
|
+
readdirCached() {
|
|
3105
|
+
let t = this.children();
|
|
3106
|
+
return t.slice(0, t.provisional);
|
|
3107
|
+
}
|
|
3108
|
+
canReadlink() {
|
|
3109
|
+
if (this.#I) return !0;
|
|
3110
|
+
if (!this.parent) return !1;
|
|
3111
|
+
let t = this.#z & _;
|
|
3112
|
+
return !((t !== L && t !== X) || this.#z & Nt || this.#z & j);
|
|
3113
|
+
}
|
|
3114
|
+
calledReaddir() {
|
|
3115
|
+
return !!(this.#z & se);
|
|
3116
|
+
}
|
|
3117
|
+
isENOENT() {
|
|
3118
|
+
return !!(this.#z & j);
|
|
3119
|
+
}
|
|
3120
|
+
isNamed(t) {
|
|
3121
|
+
return this.nocase ? this.#t === _t(t) : this.#t === bt(t);
|
|
3122
|
+
}
|
|
3123
|
+
async readlink() {
|
|
3124
|
+
let t = this.#I;
|
|
3125
|
+
if (t) return t;
|
|
3126
|
+
if (this.canReadlink() && this.parent)
|
|
3127
|
+
try {
|
|
3128
|
+
let e = await this.#a.promises.readlink(this.fullpath()),
|
|
3129
|
+
i = (await this.parent.realpath())?.resolve(e);
|
|
3130
|
+
if (i) return (this.#I = i);
|
|
3131
|
+
} catch (s) {
|
|
3132
|
+
this.#F(s.code);
|
|
3133
|
+
return;
|
|
3134
|
+
}
|
|
3135
|
+
}
|
|
3136
|
+
readlinkSync() {
|
|
3137
|
+
let t = this.#I;
|
|
3138
|
+
if (t) return t;
|
|
3139
|
+
if (this.canReadlink() && this.parent)
|
|
3140
|
+
try {
|
|
3141
|
+
let e = this.#a.readlinkSync(this.fullpath()),
|
|
3142
|
+
i = this.parent.realpathSync()?.resolve(e);
|
|
3143
|
+
if (i) return (this.#I = i);
|
|
3144
|
+
} catch (s) {
|
|
3145
|
+
this.#F(s.code);
|
|
3146
|
+
return;
|
|
3147
|
+
}
|
|
3148
|
+
}
|
|
3149
|
+
#J(s) {
|
|
3150
|
+
this.#z |= se;
|
|
3151
|
+
for (let h = s.provisional; h < s.length; h++) {
|
|
3152
|
+
let r = s[h];
|
|
3153
|
+
r && r.#G();
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
#G() {
|
|
3157
|
+
this.#z & j || ((this.#z = (this.#z | j) & gt), this.#H());
|
|
3158
|
+
}
|
|
3159
|
+
#H() {
|
|
3160
|
+
let n = this.children();
|
|
3161
|
+
for (let o of ((n.provisional = 0), n)) o.#G();
|
|
3162
|
+
}
|
|
3163
|
+
#N() {
|
|
3164
|
+
((this.#z |= Lt), this.#P());
|
|
3165
|
+
}
|
|
3166
|
+
#P() {
|
|
3167
|
+
if (this.#z & yt) return;
|
|
3168
|
+
let a = this.#z;
|
|
3169
|
+
((a & _) === U && (a &= gt), (this.#z = a | yt), this.#H());
|
|
3170
|
+
}
|
|
3171
|
+
#O(l = "") {
|
|
3172
|
+
"ENOTDIR" === l || "EPERM" === l
|
|
3173
|
+
? this.#P()
|
|
3174
|
+
: "ENOENT" === l
|
|
3175
|
+
? this.#G()
|
|
3176
|
+
: (this.children().provisional = 0);
|
|
3177
|
+
}
|
|
3178
|
+
#E(c = "") {
|
|
3179
|
+
"ENOTDIR" === c ? this.parent.#P() : "ENOENT" === c && this.#G();
|
|
3180
|
+
}
|
|
3181
|
+
#F(u = "") {
|
|
3182
|
+
let p = this.#z;
|
|
3183
|
+
((p |= Nt),
|
|
3184
|
+
"ENOENT" === u && (p |= j),
|
|
3185
|
+
("EINVAL" === u || "UNKNOWN" === u) && (p &= gt),
|
|
3186
|
+
(this.#z = p),
|
|
3187
|
+
"ENOTDIR" === u && this.parent && this.parent.#P());
|
|
3188
|
+
}
|
|
3189
|
+
#R(d, f) {
|
|
3190
|
+
return this.#C(d, f) || this.#Q(d, f);
|
|
3191
|
+
}
|
|
3192
|
+
#Q(g, m) {
|
|
3193
|
+
let w = ie(g),
|
|
3194
|
+
$ = this.newChild(g.name, w, { parent: this }),
|
|
3195
|
+
y = $.#z & _;
|
|
3196
|
+
return (
|
|
3197
|
+
y !== U && y !== X && y !== L && ($.#z |= yt),
|
|
3198
|
+
m.unshift($),
|
|
3199
|
+
m.provisional++,
|
|
3200
|
+
$
|
|
3201
|
+
);
|
|
3202
|
+
}
|
|
3203
|
+
#C(b, S) {
|
|
3204
|
+
for (let E = S.provisional; E < S.length; E++) {
|
|
3205
|
+
let z = S[E];
|
|
3206
|
+
if ((this.nocase ? _t(b.name) : bt(b.name)) === z.#t)
|
|
3207
|
+
return this.#B(b, z, E, S);
|
|
3208
|
+
}
|
|
3209
|
+
}
|
|
3210
|
+
#B(Z, J, th, tr) {
|
|
3211
|
+
let tn = J.name;
|
|
3212
|
+
return (
|
|
3213
|
+
(J.#z = (J.#z & gt) | ie(Z)),
|
|
3214
|
+
tn !== Z.name && (J.name = Z.name),
|
|
3215
|
+
th !== tr.provisional &&
|
|
3216
|
+
(th === tr.length - 1 ? tr.pop() : tr.splice(th, 1), tr.unshift(J)),
|
|
3217
|
+
tr.provisional++,
|
|
3218
|
+
J
|
|
3219
|
+
);
|
|
3220
|
+
}
|
|
3221
|
+
async lstat() {
|
|
3222
|
+
if ((this.#z & j) == 0)
|
|
3223
|
+
try {
|
|
3224
|
+
return (this.#S(await this.#a.promises.lstat(this.fullpath())), this);
|
|
3225
|
+
} catch (t) {
|
|
3226
|
+
this.#E(t.code);
|
|
3227
|
+
}
|
|
3228
|
+
}
|
|
3229
|
+
lstatSync() {
|
|
3230
|
+
if ((this.#z & j) == 0)
|
|
3231
|
+
try {
|
|
3232
|
+
return (this.#S(this.#a.lstatSync(this.fullpath())), this);
|
|
3233
|
+
} catch (t) {
|
|
3234
|
+
this.#E(t.code);
|
|
3235
|
+
}
|
|
3236
|
+
}
|
|
3237
|
+
#S(to) {
|
|
3238
|
+
let {
|
|
3239
|
+
atime: ta,
|
|
3240
|
+
atimeMs: tl,
|
|
3241
|
+
birthtime: tc,
|
|
3242
|
+
birthtimeMs: tu,
|
|
3243
|
+
blksize: tp,
|
|
3244
|
+
blocks: td,
|
|
3245
|
+
ctime: tf,
|
|
3246
|
+
ctimeMs: tg,
|
|
3247
|
+
dev: tm,
|
|
3248
|
+
gid: tw,
|
|
3249
|
+
ino: t$,
|
|
3250
|
+
mode: ty,
|
|
3251
|
+
mtime: tb,
|
|
3252
|
+
mtimeMs: tv,
|
|
3253
|
+
nlink: t_,
|
|
3254
|
+
rdev: tS,
|
|
3255
|
+
size: tk,
|
|
3256
|
+
uid: tx,
|
|
3257
|
+
} = to;
|
|
3258
|
+
((this.#p = ta),
|
|
3259
|
+
(this.#l = tl),
|
|
3260
|
+
(this.#s = tc),
|
|
3261
|
+
(this.#n = tu),
|
|
3262
|
+
(this.#h = tp),
|
|
3263
|
+
(this.#k = td),
|
|
3264
|
+
(this.#r = tf),
|
|
3265
|
+
(this.#o = tg),
|
|
3266
|
+
(this.#b = tm),
|
|
3267
|
+
(this.#f = tw),
|
|
3268
|
+
(this.#i = t$),
|
|
3269
|
+
(this.#c = ty),
|
|
3270
|
+
(this.#q = tb),
|
|
3271
|
+
(this.#m = tv),
|
|
3272
|
+
(this.#d = t_),
|
|
3273
|
+
(this.#g = tS),
|
|
3274
|
+
(this.#j = tk),
|
|
3275
|
+
(this.#e = tx));
|
|
3276
|
+
let tC = ie(to);
|
|
3277
|
+
((this.#z = (this.#z & gt) | tC | je),
|
|
3278
|
+
tC !== L && tC !== U && tC !== X && (this.#z |= yt));
|
|
3279
|
+
}
|
|
3280
|
+
#D = [];
|
|
3281
|
+
#K = !1;
|
|
3282
|
+
#T(tF) {
|
|
3283
|
+
this.#K = !1;
|
|
3284
|
+
let tO = this.#D.slice();
|
|
3285
|
+
((this.#D.length = 0), tO.forEach((t) => t(null, tF)));
|
|
3286
|
+
}
|
|
3287
|
+
readdirCB(t, e = !1) {
|
|
3288
|
+
if (!this.canReaddir()) {
|
|
3289
|
+
e ? t(null, []) : queueMicrotask(() => t(null, []));
|
|
3290
|
+
return;
|
|
3291
|
+
}
|
|
3292
|
+
let i = this.children();
|
|
3293
|
+
if (this.calledReaddir()) {
|
|
3294
|
+
let s = i.slice(0, i.provisional);
|
|
3295
|
+
e ? t(null, s) : queueMicrotask(() => t(null, s));
|
|
3296
|
+
return;
|
|
3297
|
+
}
|
|
3298
|
+
if ((this.#D.push(t), this.#K)) return;
|
|
3299
|
+
this.#K = !0;
|
|
3300
|
+
let h = this.fullpath();
|
|
3301
|
+
this.#a.readdir(h, { withFileTypes: !0 }, (t, e) => {
|
|
3302
|
+
if (t) (this.#O(t.code), (i.provisional = 0));
|
|
3303
|
+
else {
|
|
3304
|
+
for (let s of e) this.#R(s, i);
|
|
3305
|
+
this.#J(i);
|
|
3306
|
+
}
|
|
3307
|
+
this.#T(i.slice(0, i.provisional));
|
|
3308
|
+
});
|
|
3309
|
+
}
|
|
3310
|
+
#U;
|
|
3311
|
+
async readdir() {
|
|
3312
|
+
if (!this.canReaddir()) return [];
|
|
3313
|
+
let t = this.children();
|
|
3314
|
+
if (this.calledReaddir()) return t.slice(0, t.provisional);
|
|
3315
|
+
let e = this.fullpath();
|
|
3316
|
+
if (this.#U) await this.#U;
|
|
3317
|
+
else {
|
|
3318
|
+
let i = () => {};
|
|
3319
|
+
this.#U = new Promise((t) => (i = t));
|
|
3320
|
+
try {
|
|
3321
|
+
for (let s of await this.#a.promises.readdir(e, {
|
|
3322
|
+
withFileTypes: !0,
|
|
3323
|
+
}))
|
|
3324
|
+
this.#R(s, t);
|
|
3325
|
+
this.#J(t);
|
|
3326
|
+
} catch (h) {
|
|
3327
|
+
(this.#O(h.code), (t.provisional = 0));
|
|
3328
|
+
}
|
|
3329
|
+
((this.#U = void 0), i());
|
|
3330
|
+
}
|
|
3331
|
+
return t.slice(0, t.provisional);
|
|
3332
|
+
}
|
|
3333
|
+
readdirSync() {
|
|
3334
|
+
if (!this.canReaddir()) return [];
|
|
3335
|
+
let t = this.children();
|
|
3336
|
+
if (this.calledReaddir()) return t.slice(0, t.provisional);
|
|
3337
|
+
let e = this.fullpath();
|
|
3338
|
+
try {
|
|
3339
|
+
for (let i of this.#a.readdirSync(e, { withFileTypes: !0 }))
|
|
3340
|
+
this.#R(i, t);
|
|
3341
|
+
this.#J(t);
|
|
3342
|
+
} catch (s) {
|
|
3343
|
+
(this.#O(s.code), (t.provisional = 0));
|
|
3344
|
+
}
|
|
3345
|
+
return t.slice(0, t.provisional);
|
|
3346
|
+
}
|
|
3347
|
+
canReaddir() {
|
|
3348
|
+
if (this.#z & Ie) return !1;
|
|
3349
|
+
let t = _ & this.#z;
|
|
3350
|
+
return t === L || t === U || t === X;
|
|
3351
|
+
}
|
|
3352
|
+
shouldWalk(t, e) {
|
|
3353
|
+
return (
|
|
3354
|
+
(this.#z & U) === U &&
|
|
3355
|
+
!(this.#z & Ie) &&
|
|
3356
|
+
!t.has(this) &&
|
|
3357
|
+
(!e || e(this))
|
|
3358
|
+
);
|
|
3359
|
+
}
|
|
3360
|
+
async realpath() {
|
|
3361
|
+
if (this.#L) return this.#L;
|
|
3362
|
+
if (!((Lt | Nt | j) & this.#z))
|
|
3363
|
+
try {
|
|
3364
|
+
let t = await this.#a.promises.realpath(this.fullpath());
|
|
3365
|
+
return (this.#L = this.resolve(t));
|
|
3366
|
+
} catch {
|
|
3367
|
+
this.#N();
|
|
3368
|
+
}
|
|
3369
|
+
}
|
|
3370
|
+
realpathSync() {
|
|
3371
|
+
if (this.#L) return this.#L;
|
|
3372
|
+
if (!((Lt | Nt | j) & this.#z))
|
|
3373
|
+
try {
|
|
3374
|
+
let t = this.#a.realpathSync(this.fullpath());
|
|
3375
|
+
return (this.#L = this.resolve(t));
|
|
3376
|
+
} catch {
|
|
3377
|
+
this.#N();
|
|
3378
|
+
}
|
|
3379
|
+
}
|
|
3380
|
+
[Ye](t) {
|
|
3381
|
+
if (t === this) return;
|
|
3382
|
+
((t.isCWD = !1), (this.isCWD = !0));
|
|
3383
|
+
let e = new Set([]),
|
|
3384
|
+
i = [],
|
|
3385
|
+
s = this;
|
|
3386
|
+
for (; s && s.parent; )
|
|
3387
|
+
(e.add(s),
|
|
3388
|
+
(s.#x = i.join(this.sep)),
|
|
3389
|
+
(s.#y = i.join("/")),
|
|
3390
|
+
(s = s.parent),
|
|
3391
|
+
i.push(".."));
|
|
3392
|
+
for (s = t; s && s.parent && !e.has(s); )
|
|
3393
|
+
((s.#x = void 0), (s.#y = void 0), (s = s.parent));
|
|
3394
|
+
}
|
|
3395
|
+
},
|
|
3396
|
+
Pt = class t extends R {
|
|
3397
|
+
sep = "\\";
|
|
3398
|
+
splitSep = Oi;
|
|
3399
|
+
constructor(t, e = L, i, s, h, r, n) {
|
|
3400
|
+
super(t, e, i, s, h, r, n);
|
|
3401
|
+
}
|
|
3402
|
+
newChild(e, i = L, s = {}) {
|
|
3403
|
+
return new t(
|
|
3404
|
+
e,
|
|
3405
|
+
i,
|
|
3406
|
+
this.root,
|
|
3407
|
+
this.roots,
|
|
3408
|
+
this.nocase,
|
|
3409
|
+
this.childrenCache(),
|
|
3410
|
+
s,
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
getRootString(t) {
|
|
3414
|
+
return i.parse(t).root;
|
|
3415
|
+
}
|
|
3416
|
+
getRoot(t) {
|
|
3417
|
+
if ((t = Ri(t.toUpperCase())) === this.root.name) return this.root;
|
|
3418
|
+
for (let [e, i] of Object.entries(this.roots))
|
|
3419
|
+
if (this.sameRoot(t, e)) return (this.roots[t] = i);
|
|
3420
|
+
return (this.roots[t] = new it(t, this).root);
|
|
3421
|
+
}
|
|
3422
|
+
sameRoot(t, e = this.root.name) {
|
|
3423
|
+
return (
|
|
3424
|
+
(t = t.toUpperCase().replace(/\//g, "\\").replace($e, "$1\\")) === e
|
|
3425
|
+
);
|
|
3426
|
+
}
|
|
3427
|
+
},
|
|
3428
|
+
jt = class t extends R {
|
|
3429
|
+
splitSep = "/";
|
|
3430
|
+
sep = "/";
|
|
3431
|
+
constructor(t, e = L, i, s, h, r, n) {
|
|
3432
|
+
super(t, e, i, s, h, r, n);
|
|
3433
|
+
}
|
|
3434
|
+
getRootString(t) {
|
|
3435
|
+
return t.startsWith("/") ? "/" : "";
|
|
3436
|
+
}
|
|
3437
|
+
getRoot(t) {
|
|
3438
|
+
return this.root;
|
|
3439
|
+
}
|
|
3440
|
+
newChild(e, i = L, s = {}) {
|
|
3441
|
+
return new t(
|
|
3442
|
+
e,
|
|
3443
|
+
i,
|
|
3444
|
+
this.root,
|
|
3445
|
+
this.roots,
|
|
3446
|
+
this.nocase,
|
|
3447
|
+
this.childrenCache(),
|
|
3448
|
+
s,
|
|
3449
|
+
);
|
|
3450
|
+
}
|
|
3451
|
+
},
|
|
3452
|
+
It = class {
|
|
3453
|
+
root;
|
|
3454
|
+
rootPath;
|
|
3455
|
+
roots;
|
|
3456
|
+
cwd;
|
|
3457
|
+
#a;
|
|
3458
|
+
#b;
|
|
3459
|
+
#c;
|
|
3460
|
+
nocase;
|
|
3461
|
+
#d;
|
|
3462
|
+
constructor(
|
|
3463
|
+
t = process.cwd(),
|
|
3464
|
+
e,
|
|
3465
|
+
i,
|
|
3466
|
+
{ nocase: h, childrenCacheSize: r = 16384, fs: n = wt } = {},
|
|
3467
|
+
) {
|
|
3468
|
+
((this.#d = Ue(n)),
|
|
3469
|
+
(t instanceof URL || t.startsWith("file://")) && (t = s(t)));
|
|
3470
|
+
let o = e.resolve(t);
|
|
3471
|
+
((this.roots = Object.create(null)),
|
|
3472
|
+
(this.rootPath = this.parseRootPath(o)),
|
|
3473
|
+
(this.#a = new Wt()),
|
|
3474
|
+
(this.#b = new Wt()),
|
|
3475
|
+
(this.#c = new ne(r)));
|
|
3476
|
+
let a = o.substring(this.rootPath.length).split(i);
|
|
3477
|
+
if ((1 !== a.length || a[0] || a.pop(), void 0 === h))
|
|
3478
|
+
throw TypeError("must provide nocase setting to PathScurryBase ctor");
|
|
3479
|
+
((this.nocase = h),
|
|
3480
|
+
(this.root = this.newRoot(this.#d)),
|
|
3481
|
+
(this.roots[this.rootPath] = this.root));
|
|
3482
|
+
let l = this.root,
|
|
3483
|
+
c = a.length - 1,
|
|
3484
|
+
u = e.sep,
|
|
3485
|
+
p = this.rootPath,
|
|
3486
|
+
d = !1;
|
|
3487
|
+
for (let f of a) {
|
|
3488
|
+
let g = c--;
|
|
3489
|
+
((l = l.child(f, {
|
|
3490
|
+
relative: Array(g).fill("..").join(u),
|
|
3491
|
+
relativePosix: Array(g).fill("..").join("/"),
|
|
3492
|
+
fullpath: (p += (d ? "" : u) + f),
|
|
3493
|
+
})),
|
|
3494
|
+
(d = !0));
|
|
3495
|
+
}
|
|
3496
|
+
this.cwd = l;
|
|
3497
|
+
}
|
|
3498
|
+
depth(t = this.cwd) {
|
|
3499
|
+
return ("string" == typeof t && (t = this.cwd.resolve(t)), t.depth());
|
|
3500
|
+
}
|
|
3501
|
+
childrenCache() {
|
|
3502
|
+
return this.#c;
|
|
3503
|
+
}
|
|
3504
|
+
resolve(...t) {
|
|
3505
|
+
let e = "";
|
|
3506
|
+
for (let i = t.length - 1; i >= 0; i--) {
|
|
3507
|
+
let s = t[i];
|
|
3508
|
+
if (
|
|
3509
|
+
!(!s || "." === s) &&
|
|
3510
|
+
((e = e ? `${s}/${e}` : s), this.isAbsolute(s))
|
|
3511
|
+
)
|
|
3512
|
+
break;
|
|
3513
|
+
}
|
|
3514
|
+
let h = this.#a.get(e);
|
|
3515
|
+
if (void 0 !== h) return h;
|
|
3516
|
+
let r = this.cwd.resolve(e).fullpath();
|
|
3517
|
+
return (this.#a.set(e, r), r);
|
|
3518
|
+
}
|
|
3519
|
+
resolvePosix(...t) {
|
|
3520
|
+
let e = "";
|
|
3521
|
+
for (let i = t.length - 1; i >= 0; i--) {
|
|
3522
|
+
let s = t[i];
|
|
3523
|
+
if (
|
|
3524
|
+
!(!s || "." === s) &&
|
|
3525
|
+
((e = e ? `${s}/${e}` : s), this.isAbsolute(s))
|
|
3526
|
+
)
|
|
3527
|
+
break;
|
|
3528
|
+
}
|
|
3529
|
+
let h = this.#b.get(e);
|
|
3530
|
+
if (void 0 !== h) return h;
|
|
3531
|
+
let r = this.cwd.resolve(e).fullpathPosix();
|
|
3532
|
+
return (this.#b.set(e, r), r);
|
|
3533
|
+
}
|
|
3534
|
+
relative(t = this.cwd) {
|
|
3535
|
+
return ("string" == typeof t && (t = this.cwd.resolve(t)), t.relative());
|
|
3536
|
+
}
|
|
3537
|
+
relativePosix(t = this.cwd) {
|
|
3538
|
+
return (
|
|
3539
|
+
"string" == typeof t && (t = this.cwd.resolve(t)),
|
|
3540
|
+
t.relativePosix()
|
|
3541
|
+
);
|
|
3542
|
+
}
|
|
3543
|
+
basename(t = this.cwd) {
|
|
3544
|
+
return ("string" == typeof t && (t = this.cwd.resolve(t)), t.name);
|
|
3545
|
+
}
|
|
3546
|
+
dirname(t = this.cwd) {
|
|
3547
|
+
return (
|
|
3548
|
+
"string" == typeof t && (t = this.cwd.resolve(t)),
|
|
3549
|
+
(t.parent || t).fullpath()
|
|
3550
|
+
);
|
|
3551
|
+
}
|
|
3552
|
+
async readdir(t = this.cwd, e = { withFileTypes: !0 }) {
|
|
3553
|
+
"string" == typeof t
|
|
3554
|
+
? (t = this.cwd.resolve(t))
|
|
3555
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3556
|
+
let { withFileTypes: i } = e;
|
|
3557
|
+
if (!t.canReaddir()) return [];
|
|
3558
|
+
{
|
|
3559
|
+
let s = await t.readdir();
|
|
3560
|
+
return i ? s : s.map((t) => t.name);
|
|
3561
|
+
}
|
|
3562
|
+
}
|
|
3563
|
+
readdirSync(t = this.cwd, e = { withFileTypes: !0 }) {
|
|
3564
|
+
"string" == typeof t
|
|
3565
|
+
? (t = this.cwd.resolve(t))
|
|
3566
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3567
|
+
let { withFileTypes: i = !0 } = e;
|
|
3568
|
+
return t.canReaddir()
|
|
3569
|
+
? i
|
|
3570
|
+
? t.readdirSync()
|
|
3571
|
+
: t.readdirSync().map((t) => t.name)
|
|
3572
|
+
: [];
|
|
3573
|
+
}
|
|
3574
|
+
async lstat(t = this.cwd) {
|
|
3575
|
+
return ("string" == typeof t && (t = this.cwd.resolve(t)), t.lstat());
|
|
3576
|
+
}
|
|
3577
|
+
lstatSync(t = this.cwd) {
|
|
3578
|
+
return ("string" == typeof t && (t = this.cwd.resolve(t)), t.lstatSync());
|
|
3579
|
+
}
|
|
3580
|
+
async readlink(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3581
|
+
"string" == typeof t
|
|
3582
|
+
? (t = this.cwd.resolve(t))
|
|
3583
|
+
: t instanceof R || ((e = t.withFileTypes), (t = this.cwd));
|
|
3584
|
+
let i = await t.readlink();
|
|
3585
|
+
return e ? i : i?.fullpath();
|
|
3586
|
+
}
|
|
3587
|
+
readlinkSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3588
|
+
"string" == typeof t
|
|
3589
|
+
? (t = this.cwd.resolve(t))
|
|
3590
|
+
: t instanceof R || ((e = t.withFileTypes), (t = this.cwd));
|
|
3591
|
+
let i = t.readlinkSync();
|
|
3592
|
+
return e ? i : i?.fullpath();
|
|
3593
|
+
}
|
|
3594
|
+
async realpath(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3595
|
+
"string" == typeof t
|
|
3596
|
+
? (t = this.cwd.resolve(t))
|
|
3597
|
+
: t instanceof R || ((e = t.withFileTypes), (t = this.cwd));
|
|
3598
|
+
let i = await t.realpath();
|
|
3599
|
+
return e ? i : i?.fullpath();
|
|
3600
|
+
}
|
|
3601
|
+
realpathSync(t = this.cwd, { withFileTypes: e } = { withFileTypes: !1 }) {
|
|
3602
|
+
"string" == typeof t
|
|
3603
|
+
? (t = this.cwd.resolve(t))
|
|
3604
|
+
: t instanceof R || ((e = t.withFileTypes), (t = this.cwd));
|
|
3605
|
+
let i = t.realpathSync();
|
|
3606
|
+
return e ? i : i?.fullpath();
|
|
3607
|
+
}
|
|
3608
|
+
async walk(t = this.cwd, e = {}) {
|
|
3609
|
+
"string" == typeof t
|
|
3610
|
+
? (t = this.cwd.resolve(t))
|
|
3611
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3612
|
+
let {
|
|
3613
|
+
withFileTypes: i = !0,
|
|
3614
|
+
follow: s = !1,
|
|
3615
|
+
filter: h,
|
|
3616
|
+
walkFilter: r,
|
|
3617
|
+
} = e,
|
|
3618
|
+
n = [];
|
|
3619
|
+
(!h || h(t)) && n.push(i ? t : t.fullpath());
|
|
3620
|
+
let o = new Set(),
|
|
3621
|
+
a = (t, e) => {
|
|
3622
|
+
(o.add(t),
|
|
3623
|
+
t.readdirCB((t, l) => {
|
|
3624
|
+
if (t) return e(t);
|
|
3625
|
+
let c = l.length;
|
|
3626
|
+
if (!c) return e();
|
|
3627
|
+
let u = () => {
|
|
3628
|
+
0 == --c && e();
|
|
3629
|
+
};
|
|
3630
|
+
for (let p of l)
|
|
3631
|
+
((!h || h(p)) && n.push(i ? p : p.fullpath()),
|
|
3632
|
+
s && p.isSymbolicLink()
|
|
3633
|
+
? p
|
|
3634
|
+
.realpath()
|
|
3635
|
+
.then((t) => (t?.isUnknown() ? t.lstat() : t))
|
|
3636
|
+
.then((t) => (t?.shouldWalk(o, r) ? a(t, u) : u()))
|
|
3637
|
+
: p.shouldWalk(o, r)
|
|
3638
|
+
? a(p, u)
|
|
3639
|
+
: u());
|
|
3640
|
+
}, !0));
|
|
3641
|
+
},
|
|
3642
|
+
l = t;
|
|
3643
|
+
return new Promise((t, e) => {
|
|
3644
|
+
a(l, (i) => {
|
|
3645
|
+
if (i) return e(i);
|
|
3646
|
+
t(n);
|
|
3647
|
+
});
|
|
3648
|
+
});
|
|
3649
|
+
}
|
|
3650
|
+
walkSync(t = this.cwd, e = {}) {
|
|
3651
|
+
"string" == typeof t
|
|
3652
|
+
? (t = this.cwd.resolve(t))
|
|
3653
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3654
|
+
let {
|
|
3655
|
+
withFileTypes: i = !0,
|
|
3656
|
+
follow: s = !1,
|
|
3657
|
+
filter: h,
|
|
3658
|
+
walkFilter: r,
|
|
3659
|
+
} = e,
|
|
3660
|
+
n = [];
|
|
3661
|
+
(!h || h(t)) && n.push(i ? t : t.fullpath());
|
|
3662
|
+
let o = new Set([t]);
|
|
3663
|
+
for (let a of o) {
|
|
3664
|
+
let l = a.readdirSync();
|
|
3665
|
+
for (let c of l) {
|
|
3666
|
+
(!h || h(c)) && n.push(i ? c : c.fullpath());
|
|
3667
|
+
let u = c;
|
|
3668
|
+
if (c.isSymbolicLink()) {
|
|
3669
|
+
if (!(s && (u = c.realpathSync()))) continue;
|
|
3670
|
+
u.isUnknown() && u.lstatSync();
|
|
3671
|
+
}
|
|
3672
|
+
u.shouldWalk(o, r) && o.add(u);
|
|
3673
|
+
}
|
|
3674
|
+
}
|
|
3675
|
+
return n;
|
|
3676
|
+
}
|
|
3677
|
+
[Symbol.asyncIterator]() {
|
|
3678
|
+
return this.iterate();
|
|
3679
|
+
}
|
|
3680
|
+
iterate(t = this.cwd, e = {}) {
|
|
3681
|
+
return (
|
|
3682
|
+
"string" == typeof t
|
|
3683
|
+
? (t = this.cwd.resolve(t))
|
|
3684
|
+
: t instanceof R || ((e = t), (t = this.cwd)),
|
|
3685
|
+
this.stream(t, e)[Symbol.asyncIterator]()
|
|
3686
|
+
);
|
|
3687
|
+
}
|
|
3688
|
+
[Symbol.iterator]() {
|
|
3689
|
+
return this.iterateSync();
|
|
3690
|
+
}
|
|
3691
|
+
*iterateSync(t = this.cwd, e = {}) {
|
|
3692
|
+
"string" == typeof t
|
|
3693
|
+
? (t = this.cwd.resolve(t))
|
|
3694
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3695
|
+
let {
|
|
3696
|
+
withFileTypes: i = !0,
|
|
3697
|
+
follow: s = !1,
|
|
3698
|
+
filter: h,
|
|
3699
|
+
walkFilter: r,
|
|
3700
|
+
} = e;
|
|
3701
|
+
(!h || h(t)) && (yield i ? t : t.fullpath());
|
|
3702
|
+
let n = new Set([t]);
|
|
3703
|
+
for (let o of n) {
|
|
3704
|
+
let a = o.readdirSync();
|
|
3705
|
+
for (let l of a) {
|
|
3706
|
+
(!h || h(l)) && (yield i ? l : l.fullpath());
|
|
3707
|
+
let c = l;
|
|
3708
|
+
if (l.isSymbolicLink()) {
|
|
3709
|
+
if (!(s && (c = l.realpathSync()))) continue;
|
|
3710
|
+
c.isUnknown() && c.lstatSync();
|
|
3711
|
+
}
|
|
3712
|
+
c.shouldWalk(n, r) && n.add(c);
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3715
|
+
}
|
|
3716
|
+
stream(t = this.cwd, e = {}) {
|
|
3717
|
+
"string" == typeof t
|
|
3718
|
+
? (t = this.cwd.resolve(t))
|
|
3719
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3720
|
+
let {
|
|
3721
|
+
withFileTypes: i = !0,
|
|
3722
|
+
follow: s = !1,
|
|
3723
|
+
filter: h,
|
|
3724
|
+
walkFilter: r,
|
|
3725
|
+
} = e,
|
|
3726
|
+
n = new V({ objectMode: !0 });
|
|
3727
|
+
(!h || h(t)) && n.write(i ? t : t.fullpath());
|
|
3728
|
+
let o = new Set(),
|
|
3729
|
+
a = [t],
|
|
3730
|
+
l = 0,
|
|
3731
|
+
c = () => {
|
|
3732
|
+
let t = !1;
|
|
3733
|
+
for (; !t; ) {
|
|
3734
|
+
let e = a.shift();
|
|
3735
|
+
if (!e) {
|
|
3736
|
+
0 === l && n.end();
|
|
3737
|
+
return;
|
|
3738
|
+
}
|
|
3739
|
+
(l++, o.add(e));
|
|
3740
|
+
let u = (e, d, f = !1) => {
|
|
3741
|
+
if (e) return n.emit("error", e);
|
|
3742
|
+
if (s && !f) {
|
|
3743
|
+
let g = [];
|
|
3744
|
+
for (let m of d)
|
|
3745
|
+
m.isSymbolicLink() &&
|
|
3746
|
+
g.push(
|
|
3747
|
+
m
|
|
3748
|
+
.realpath()
|
|
3749
|
+
.then((t) => (t?.isUnknown() ? t.lstat() : t)),
|
|
3750
|
+
);
|
|
3751
|
+
if (g.length) {
|
|
3752
|
+
Promise.all(g).then(() => u(null, d, !0));
|
|
3753
|
+
return;
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
for (let w of d)
|
|
3757
|
+
w &&
|
|
3758
|
+
(!h || h(w)) &&
|
|
3759
|
+
(n.write(i ? w : w.fullpath()) || (t = !0));
|
|
3760
|
+
for (let $ of (l--, d)) {
|
|
3761
|
+
let y = $.realpathCached() || $;
|
|
3762
|
+
y.shouldWalk(o, r) && a.push(y);
|
|
3763
|
+
}
|
|
3764
|
+
t && !n.flowing ? n.once("drain", c) : p || c();
|
|
3765
|
+
},
|
|
3766
|
+
p = !0;
|
|
3767
|
+
(e.readdirCB(u, !0), (p = !1));
|
|
3768
|
+
}
|
|
3769
|
+
};
|
|
3770
|
+
return (c(), n);
|
|
3771
|
+
}
|
|
3772
|
+
streamSync(t = this.cwd, e = {}) {
|
|
3773
|
+
"string" == typeof t
|
|
3774
|
+
? (t = this.cwd.resolve(t))
|
|
3775
|
+
: t instanceof R || ((e = t), (t = this.cwd));
|
|
3776
|
+
let {
|
|
3777
|
+
withFileTypes: i = !0,
|
|
3778
|
+
follow: s = !1,
|
|
3779
|
+
filter: h,
|
|
3780
|
+
walkFilter: r,
|
|
3781
|
+
} = e,
|
|
3782
|
+
n = new V({ objectMode: !0 }),
|
|
3783
|
+
o = new Set();
|
|
3784
|
+
(!h || h(t)) && n.write(i ? t : t.fullpath());
|
|
3785
|
+
let a = [t],
|
|
3786
|
+
l = 0,
|
|
3787
|
+
c = () => {
|
|
3788
|
+
let t = !1;
|
|
3789
|
+
for (; !t; ) {
|
|
3790
|
+
let e = a.shift();
|
|
3791
|
+
if (!e) {
|
|
3792
|
+
0 === l && n.end();
|
|
3793
|
+
return;
|
|
3794
|
+
}
|
|
3795
|
+
(l++, o.add(e));
|
|
3796
|
+
let u = e.readdirSync();
|
|
3797
|
+
for (let p of u)
|
|
3798
|
+
(!h || h(p)) && (n.write(i ? p : p.fullpath()) || (t = !0));
|
|
3799
|
+
for (let d of (l--, u)) {
|
|
3800
|
+
let f = d;
|
|
3801
|
+
if (d.isSymbolicLink()) {
|
|
3802
|
+
if (!(s && (f = d.realpathSync()))) continue;
|
|
3803
|
+
f.isUnknown() && f.lstatSync();
|
|
3804
|
+
}
|
|
3805
|
+
f.shouldWalk(o, r) && a.push(f);
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
t && !n.flowing && n.once("drain", c);
|
|
3809
|
+
};
|
|
3810
|
+
return (c(), n);
|
|
3811
|
+
}
|
|
3812
|
+
chdir(t = this.cwd) {
|
|
3813
|
+
let e = this.cwd;
|
|
3814
|
+
((this.cwd = "string" == typeof t ? this.cwd.resolve(t) : t),
|
|
3815
|
+
this.cwd[Ye](e));
|
|
3816
|
+
}
|
|
3817
|
+
},
|
|
3818
|
+
it = class extends It {
|
|
3819
|
+
sep = "\\";
|
|
3820
|
+
constructor(t = process.cwd(), e = {}) {
|
|
3821
|
+
let { nocase: s = !0 } = e;
|
|
3822
|
+
(super(t, i, "\\", { ...e, nocase: s }), (this.nocase = s));
|
|
3823
|
+
for (let h = this.cwd; h; h = h.parent) h.nocase = this.nocase;
|
|
3824
|
+
}
|
|
3825
|
+
parseRootPath(t) {
|
|
3826
|
+
return i.parse(t).root.toUpperCase();
|
|
3827
|
+
}
|
|
3828
|
+
newRoot(t) {
|
|
3829
|
+
return new Pt(
|
|
3830
|
+
this.rootPath,
|
|
3831
|
+
U,
|
|
3832
|
+
void 0,
|
|
3833
|
+
this.roots,
|
|
3834
|
+
this.nocase,
|
|
3835
|
+
this.childrenCache(),
|
|
3836
|
+
{ fs: t },
|
|
3837
|
+
);
|
|
3838
|
+
}
|
|
3839
|
+
isAbsolute(t) {
|
|
3840
|
+
return (
|
|
3841
|
+
t.startsWith("/") || t.startsWith("\\") || /^[a-z]:(\/|\\)/i.test(t)
|
|
3842
|
+
);
|
|
3843
|
+
}
|
|
3844
|
+
},
|
|
3845
|
+
rt = class extends It {
|
|
3846
|
+
sep = "/";
|
|
3847
|
+
constructor(t = process.cwd(), i = {}) {
|
|
3848
|
+
let { nocase: s = !1 } = i;
|
|
3849
|
+
(super(t, e, "/", { ...i, nocase: s }), (this.nocase = s));
|
|
3850
|
+
}
|
|
3851
|
+
parseRootPath(t) {
|
|
3852
|
+
return "/";
|
|
3853
|
+
}
|
|
3854
|
+
newRoot(t) {
|
|
3855
|
+
return new jt(
|
|
3856
|
+
this.rootPath,
|
|
3857
|
+
U,
|
|
3858
|
+
void 0,
|
|
3859
|
+
this.roots,
|
|
3860
|
+
this.nocase,
|
|
3861
|
+
this.childrenCache(),
|
|
3862
|
+
{ fs: t },
|
|
3863
|
+
);
|
|
3864
|
+
}
|
|
3865
|
+
isAbsolute(t) {
|
|
3866
|
+
return t.startsWith("/");
|
|
3867
|
+
}
|
|
3868
|
+
},
|
|
3869
|
+
St = class extends rt {
|
|
3870
|
+
constructor(t = process.cwd(), e = {}) {
|
|
3871
|
+
let { nocase: i = !0 } = e;
|
|
3872
|
+
super(t, { ...e, nocase: i });
|
|
3873
|
+
}
|
|
3874
|
+
},
|
|
3875
|
+
Cr = "win32" === process.platform ? Pt : jt,
|
|
3876
|
+
Xe =
|
|
3877
|
+
"win32" === process.platform ? it : "darwin" === process.platform ? St : rt,
|
|
3878
|
+
Di = (t) => t.length >= 1,
|
|
3879
|
+
Mi = (t) => t.length >= 1,
|
|
3880
|
+
Ni = Symbol.for("nodejs.util.inspect.custom"),
|
|
3881
|
+
nt = class t {
|
|
3882
|
+
#a;
|
|
3883
|
+
#b;
|
|
3884
|
+
#c;
|
|
3885
|
+
length;
|
|
3886
|
+
#d;
|
|
3887
|
+
#e;
|
|
3888
|
+
#f;
|
|
3889
|
+
#g;
|
|
3890
|
+
#h;
|
|
3891
|
+
#i;
|
|
3892
|
+
#j = !0;
|
|
3893
|
+
constructor(t, e, i, s) {
|
|
3894
|
+
if (!Di(t)) throw TypeError("empty pattern list");
|
|
3895
|
+
if (!Mi(e)) throw TypeError("empty glob list");
|
|
3896
|
+
if (e.length !== t.length)
|
|
3897
|
+
throw TypeError("mismatched pattern list and glob list lengths");
|
|
3898
|
+
if (((this.length = t.length), i < 0 || i >= this.length))
|
|
3899
|
+
throw TypeError("index out of range");
|
|
3900
|
+
if (
|
|
3901
|
+
((this.#a = t),
|
|
3902
|
+
(this.#b = e),
|
|
3903
|
+
(this.#c = i),
|
|
3904
|
+
(this.#d = s),
|
|
3905
|
+
0 === this.#c)
|
|
3906
|
+
) {
|
|
3907
|
+
if (this.isUNC()) {
|
|
3908
|
+
let [h, r, n, o, ...a] = this.#a,
|
|
3909
|
+
[l, c, u, p, ...d] = this.#b;
|
|
3910
|
+
"" === a[0] && (a.shift(), d.shift());
|
|
3911
|
+
let f = [h, r, n, o, ""].join("/"),
|
|
3912
|
+
g = [l, c, u, p, ""].join("/");
|
|
3913
|
+
((this.#a = [f, ...a]),
|
|
3914
|
+
(this.#b = [g, ...d]),
|
|
3915
|
+
(this.length = this.#a.length));
|
|
3916
|
+
} else if (this.isDrive() || this.isAbsolute()) {
|
|
3917
|
+
let [m, ...w] = this.#a,
|
|
3918
|
+
[$, ...y] = this.#b;
|
|
3919
|
+
"" === w[0] && (w.shift(), y.shift());
|
|
3920
|
+
let b = m + "/",
|
|
3921
|
+
S = $ + "/";
|
|
3922
|
+
((this.#a = [b, ...w]),
|
|
3923
|
+
(this.#b = [S, ...y]),
|
|
3924
|
+
(this.length = this.#a.length));
|
|
3925
|
+
}
|
|
3926
|
+
}
|
|
3927
|
+
}
|
|
3928
|
+
[Ni]() {
|
|
3929
|
+
return "Pattern <" + this.#b.slice(this.#c).join("/") + ">";
|
|
3930
|
+
}
|
|
3931
|
+
pattern() {
|
|
3932
|
+
return this.#a[this.#c];
|
|
3933
|
+
}
|
|
3934
|
+
isString() {
|
|
3935
|
+
return "string" == typeof this.#a[this.#c];
|
|
3936
|
+
}
|
|
3937
|
+
isGlobstar() {
|
|
3938
|
+
return this.#a[this.#c] === A;
|
|
3939
|
+
}
|
|
3940
|
+
isRegExp() {
|
|
3941
|
+
return this.#a[this.#c] instanceof RegExp;
|
|
3942
|
+
}
|
|
3943
|
+
globString() {
|
|
3944
|
+
return (this.#f =
|
|
3945
|
+
this.#f ||
|
|
3946
|
+
(0 === this.#c
|
|
3947
|
+
? this.isAbsolute()
|
|
3948
|
+
? this.#b[0] + this.#b.slice(1).join("/")
|
|
3949
|
+
: this.#b.join("/")
|
|
3950
|
+
: this.#b.slice(this.#c).join("/")));
|
|
3951
|
+
}
|
|
3952
|
+
hasMore() {
|
|
3953
|
+
return this.length > this.#c + 1;
|
|
3954
|
+
}
|
|
3955
|
+
rest() {
|
|
3956
|
+
return void 0 !== this.#e
|
|
3957
|
+
? this.#e
|
|
3958
|
+
: this.hasMore()
|
|
3959
|
+
? ((this.#e = new t(this.#a, this.#b, this.#c + 1, this.#d)),
|
|
3960
|
+
(this.#e.#i = this.#i),
|
|
3961
|
+
(this.#e.#h = this.#h),
|
|
3962
|
+
(this.#e.#g = this.#g),
|
|
3963
|
+
this.#e)
|
|
3964
|
+
: (this.#e = null);
|
|
3965
|
+
}
|
|
3966
|
+
isUNC() {
|
|
3967
|
+
let t = this.#a;
|
|
3968
|
+
return void 0 !== this.#h
|
|
3969
|
+
? this.#h
|
|
3970
|
+
: (this.#h =
|
|
3971
|
+
"win32" === this.#d &&
|
|
3972
|
+
0 === this.#c &&
|
|
3973
|
+
"" === t[0] &&
|
|
3974
|
+
"" === t[1] &&
|
|
3975
|
+
"string" == typeof t[2] &&
|
|
3976
|
+
!!t[2] &&
|
|
3977
|
+
"string" == typeof t[3] &&
|
|
3978
|
+
!!t[3]);
|
|
3979
|
+
}
|
|
3980
|
+
isDrive() {
|
|
3981
|
+
let t = this.#a;
|
|
3982
|
+
return void 0 !== this.#g
|
|
3983
|
+
? this.#g
|
|
3984
|
+
: (this.#g =
|
|
3985
|
+
"win32" === this.#d &&
|
|
3986
|
+
0 === this.#c &&
|
|
3987
|
+
this.length > 1 &&
|
|
3988
|
+
"string" == typeof t[0] &&
|
|
3989
|
+
/^[a-z]:$/i.test(t[0]));
|
|
3990
|
+
}
|
|
3991
|
+
isAbsolute() {
|
|
3992
|
+
let t = this.#a;
|
|
3993
|
+
return void 0 !== this.#i
|
|
3994
|
+
? this.#i
|
|
3995
|
+
: (this.#i =
|
|
3996
|
+
("" === t[0] && t.length > 1) || this.isDrive() || this.isUNC());
|
|
3997
|
+
}
|
|
3998
|
+
root() {
|
|
3999
|
+
let t = this.#a[0];
|
|
4000
|
+
return "string" == typeof t && this.isAbsolute() && 0 === this.#c
|
|
4001
|
+
? t
|
|
4002
|
+
: "";
|
|
4003
|
+
}
|
|
4004
|
+
checkFollowGlobstar() {
|
|
4005
|
+
return !(0 === this.#c || !this.isGlobstar() || !this.#j);
|
|
4006
|
+
}
|
|
4007
|
+
markFollowGlobstar() {
|
|
4008
|
+
return (
|
|
4009
|
+
!!(0 !== this.#c && this.isGlobstar()) &&
|
|
4010
|
+
!!this.#j &&
|
|
4011
|
+
((this.#j = !1), !0)
|
|
4012
|
+
);
|
|
4013
|
+
}
|
|
4014
|
+
},
|
|
4015
|
+
_i =
|
|
4016
|
+
"object" == typeof process && process && "string" == typeof process.platform
|
|
4017
|
+
? process.platform
|
|
4018
|
+
: "linux",
|
|
4019
|
+
ot = class {
|
|
4020
|
+
relative;
|
|
4021
|
+
relativeChildren;
|
|
4022
|
+
absolute;
|
|
4023
|
+
absoluteChildren;
|
|
4024
|
+
platform;
|
|
4025
|
+
mmopts;
|
|
4026
|
+
constructor(
|
|
4027
|
+
t,
|
|
4028
|
+
{ nobrace: e, nocase: i, noext: s, noglobstar: h, platform: r = _i },
|
|
4029
|
+
) {
|
|
4030
|
+
for (let n of ((this.relative = []),
|
|
4031
|
+
(this.absolute = []),
|
|
4032
|
+
(this.relativeChildren = []),
|
|
4033
|
+
(this.absoluteChildren = []),
|
|
4034
|
+
(this.platform = r),
|
|
4035
|
+
(this.mmopts = {
|
|
4036
|
+
dot: !0,
|
|
4037
|
+
nobrace: e,
|
|
4038
|
+
nocase: i,
|
|
4039
|
+
noext: s,
|
|
4040
|
+
noglobstar: h,
|
|
4041
|
+
optimizationLevel: 2,
|
|
4042
|
+
platform: r,
|
|
4043
|
+
nocomment: !0,
|
|
4044
|
+
nonegate: !0,
|
|
4045
|
+
}),
|
|
4046
|
+
t))
|
|
4047
|
+
this.add(n);
|
|
4048
|
+
}
|
|
4049
|
+
add(t) {
|
|
4050
|
+
let e = new D(t, this.mmopts);
|
|
4051
|
+
for (let i = 0; i < e.set.length; i++) {
|
|
4052
|
+
let s = e.set[i],
|
|
4053
|
+
h = e.globParts[i];
|
|
4054
|
+
if (!s || !h) throw Error("invalid pattern object");
|
|
4055
|
+
for (; "." === s[0] && "." === h[0]; ) (s.shift(), h.shift());
|
|
4056
|
+
let r = new nt(s, h, 0, this.platform),
|
|
4057
|
+
n = new D(r.globString(), this.mmopts),
|
|
4058
|
+
o = "**" === h[h.length - 1],
|
|
4059
|
+
a = r.isAbsolute();
|
|
4060
|
+
(a ? this.absolute.push(n) : this.relative.push(n),
|
|
4061
|
+
o &&
|
|
4062
|
+
(a
|
|
4063
|
+
? this.absoluteChildren.push(n)
|
|
4064
|
+
: this.relativeChildren.push(n)));
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
4067
|
+
ignored(t) {
|
|
4068
|
+
let e = t.fullpath(),
|
|
4069
|
+
i = `${e}/`,
|
|
4070
|
+
s = t.relative() || ".",
|
|
4071
|
+
h = `${s}/`;
|
|
4072
|
+
for (let r of this.relative) if (r.match(s) || r.match(h)) return !0;
|
|
4073
|
+
for (let n of this.absolute) if (n.match(e) || n.match(i)) return !0;
|
|
4074
|
+
return !1;
|
|
4075
|
+
}
|
|
4076
|
+
childrenIgnored(t) {
|
|
4077
|
+
let e = t.fullpath() + "/",
|
|
4078
|
+
i = (t.relative() || ".") + "/";
|
|
4079
|
+
for (let s of this.relativeChildren) if (s.match(i)) return !0;
|
|
4080
|
+
for (let h of this.absoluteChildren) if (h.match(e)) return !0;
|
|
4081
|
+
return !1;
|
|
4082
|
+
}
|
|
4083
|
+
},
|
|
4084
|
+
oe = class t {
|
|
4085
|
+
store;
|
|
4086
|
+
constructor(t = new Map()) {
|
|
4087
|
+
this.store = t;
|
|
4088
|
+
}
|
|
4089
|
+
copy() {
|
|
4090
|
+
return new t(new Map(this.store));
|
|
4091
|
+
}
|
|
4092
|
+
hasWalked(t, e) {
|
|
4093
|
+
return this.store.get(t.fullpath())?.has(e.globString());
|
|
4094
|
+
}
|
|
4095
|
+
storeWalked(t, e) {
|
|
4096
|
+
let i = t.fullpath(),
|
|
4097
|
+
s = this.store.get(i);
|
|
4098
|
+
s ? s.add(e.globString()) : this.store.set(i, new Set([e.globString()]));
|
|
4099
|
+
}
|
|
4100
|
+
},
|
|
4101
|
+
he = class {
|
|
4102
|
+
store = new Map();
|
|
4103
|
+
add(t, e, i) {
|
|
4104
|
+
let s = (e ? 2 : 0) | (i ? 1 : 0),
|
|
4105
|
+
h = this.store.get(t);
|
|
4106
|
+
this.store.set(t, void 0 === h ? s : s & h);
|
|
4107
|
+
}
|
|
4108
|
+
entries() {
|
|
4109
|
+
return [...this.store.entries()].map(([t, e]) => [
|
|
4110
|
+
t,
|
|
4111
|
+
!!(2 & e),
|
|
4112
|
+
!!(1 & e),
|
|
4113
|
+
]);
|
|
4114
|
+
}
|
|
4115
|
+
},
|
|
4116
|
+
ae = class {
|
|
4117
|
+
store = new Map();
|
|
4118
|
+
add(t, e) {
|
|
4119
|
+
if (!t.canReaddir()) return;
|
|
4120
|
+
let i = this.store.get(t);
|
|
4121
|
+
i
|
|
4122
|
+
? i.find((t) => t.globString() === e.globString()) || i.push(e)
|
|
4123
|
+
: this.store.set(t, [e]);
|
|
4124
|
+
}
|
|
4125
|
+
get(t) {
|
|
4126
|
+
let e = this.store.get(t);
|
|
4127
|
+
if (!e) throw Error("attempting to walk unknown path");
|
|
4128
|
+
return e;
|
|
4129
|
+
}
|
|
4130
|
+
entries() {
|
|
4131
|
+
return this.keys().map((t) => [t, this.store.get(t)]);
|
|
4132
|
+
}
|
|
4133
|
+
keys() {
|
|
4134
|
+
return [...this.store.keys()].filter((t) => t.canReaddir());
|
|
4135
|
+
}
|
|
4136
|
+
},
|
|
4137
|
+
Et = class t {
|
|
4138
|
+
hasWalkedCache;
|
|
4139
|
+
matches = new he();
|
|
4140
|
+
subwalks = new ae();
|
|
4141
|
+
patterns;
|
|
4142
|
+
follow;
|
|
4143
|
+
dot;
|
|
4144
|
+
opts;
|
|
4145
|
+
constructor(t, e) {
|
|
4146
|
+
((this.opts = t),
|
|
4147
|
+
(this.follow = !!t.follow),
|
|
4148
|
+
(this.dot = !!t.dot),
|
|
4149
|
+
(this.hasWalkedCache = e ? e.copy() : new oe()));
|
|
4150
|
+
}
|
|
4151
|
+
processPatterns(t, e) {
|
|
4152
|
+
this.patterns = e;
|
|
4153
|
+
let i = e.map((e) => [t, e]);
|
|
4154
|
+
for (let [s, h] of i) {
|
|
4155
|
+
this.hasWalkedCache.storeWalked(s, h);
|
|
4156
|
+
let r = h.root(),
|
|
4157
|
+
n = h.isAbsolute() && !1 !== this.opts.absolute;
|
|
4158
|
+
if (r) {
|
|
4159
|
+
s = s.resolve(
|
|
4160
|
+
"/" === r && void 0 !== this.opts.root ? this.opts.root : r,
|
|
4161
|
+
);
|
|
4162
|
+
let o = h.rest();
|
|
4163
|
+
if (o) h = o;
|
|
4164
|
+
else {
|
|
4165
|
+
this.matches.add(s, !0, !1);
|
|
4166
|
+
continue;
|
|
4167
|
+
}
|
|
4168
|
+
}
|
|
4169
|
+
if (s.isENOENT()) continue;
|
|
4170
|
+
let a,
|
|
4171
|
+
l,
|
|
4172
|
+
c = !1;
|
|
4173
|
+
for (; "string" == typeof (a = h.pattern()) && (l = h.rest()); )
|
|
4174
|
+
((s = s.resolve(a)), (h = l), (c = !0));
|
|
4175
|
+
if (((a = h.pattern()), (l = h.rest()), c)) {
|
|
4176
|
+
if (this.hasWalkedCache.hasWalked(s, h)) continue;
|
|
4177
|
+
this.hasWalkedCache.storeWalked(s, h);
|
|
4178
|
+
}
|
|
4179
|
+
if ("string" == typeof a) {
|
|
4180
|
+
let u = ".." === a || "" === a || "." === a;
|
|
4181
|
+
this.matches.add(s.resolve(a), n, u);
|
|
4182
|
+
continue;
|
|
4183
|
+
}
|
|
4184
|
+
if (a === A) {
|
|
4185
|
+
(!s.isSymbolicLink() || this.follow || h.checkFollowGlobstar()) &&
|
|
4186
|
+
this.subwalks.add(s, h);
|
|
4187
|
+
let p = l?.pattern(),
|
|
4188
|
+
d = l?.rest();
|
|
4189
|
+
if (l && (("" !== p && "." !== p) || d)) {
|
|
4190
|
+
if (".." === p) {
|
|
4191
|
+
let f = s.parent || s;
|
|
4192
|
+
d
|
|
4193
|
+
? this.hasWalkedCache.hasWalked(f, d) || this.subwalks.add(f, d)
|
|
4194
|
+
: this.matches.add(f, n, !0);
|
|
4195
|
+
}
|
|
4196
|
+
} else this.matches.add(s, n, "" === p || "." === p);
|
|
4197
|
+
} else a instanceof RegExp && this.subwalks.add(s, h);
|
|
4198
|
+
}
|
|
4199
|
+
return this;
|
|
4200
|
+
}
|
|
4201
|
+
subwalkTargets() {
|
|
4202
|
+
return this.subwalks.keys();
|
|
4203
|
+
}
|
|
4204
|
+
child() {
|
|
4205
|
+
return new t(this.opts, this.hasWalkedCache);
|
|
4206
|
+
}
|
|
4207
|
+
filterEntries(t, e) {
|
|
4208
|
+
let i = this.subwalks.get(t),
|
|
4209
|
+
s = this.child();
|
|
4210
|
+
for (let h of e)
|
|
4211
|
+
for (let r of i) {
|
|
4212
|
+
let n = r.isAbsolute(),
|
|
4213
|
+
o = r.pattern(),
|
|
4214
|
+
a = r.rest();
|
|
4215
|
+
o === A
|
|
4216
|
+
? s.testGlobstar(h, r, a, n)
|
|
4217
|
+
: o instanceof RegExp
|
|
4218
|
+
? s.testRegExp(h, o, a, n)
|
|
4219
|
+
: s.testString(h, o, a, n);
|
|
4220
|
+
}
|
|
4221
|
+
return s;
|
|
4222
|
+
}
|
|
4223
|
+
testGlobstar(t, e, i, s) {
|
|
4224
|
+
if (
|
|
4225
|
+
((this.dot || !t.name.startsWith(".")) &&
|
|
4226
|
+
(e.hasMore() || this.matches.add(t, s, !1),
|
|
4227
|
+
t.canReaddir() &&
|
|
4228
|
+
(this.follow || !t.isSymbolicLink()
|
|
4229
|
+
? this.subwalks.add(t, e)
|
|
4230
|
+
: t.isSymbolicLink() &&
|
|
4231
|
+
(i && e.checkFollowGlobstar()
|
|
4232
|
+
? this.subwalks.add(t, i)
|
|
4233
|
+
: e.markFollowGlobstar() && this.subwalks.add(t, e)))),
|
|
4234
|
+
i)
|
|
4235
|
+
) {
|
|
4236
|
+
let h = i.pattern();
|
|
4237
|
+
if ("string" == typeof h && ".." !== h && "" !== h && "." !== h)
|
|
4238
|
+
this.testString(t, h, i.rest(), s);
|
|
4239
|
+
else if (".." === h) {
|
|
4240
|
+
let r = t.parent || t;
|
|
4241
|
+
this.subwalks.add(r, i);
|
|
4242
|
+
} else h instanceof RegExp && this.testRegExp(t, h, i.rest(), s);
|
|
4243
|
+
}
|
|
4244
|
+
}
|
|
4245
|
+
testRegExp(t, e, i, s) {
|
|
4246
|
+
e.test(t.name) &&
|
|
4247
|
+
(i ? this.subwalks.add(t, i) : this.matches.add(t, s, !1));
|
|
4248
|
+
}
|
|
4249
|
+
testString(t, e, i, s) {
|
|
4250
|
+
t.isNamed(e) &&
|
|
4251
|
+
(i ? this.subwalks.add(t, i) : this.matches.add(t, s, !1));
|
|
4252
|
+
}
|
|
4253
|
+
},
|
|
4254
|
+
Li = (t, e) =>
|
|
4255
|
+
"string" == typeof t ? new ot([t], e) : Array.isArray(t) ? new ot(t, e) : t,
|
|
4256
|
+
zt = class {
|
|
4257
|
+
path;
|
|
4258
|
+
patterns;
|
|
4259
|
+
opts;
|
|
4260
|
+
seen = new Set();
|
|
4261
|
+
paused = !1;
|
|
4262
|
+
aborted = !1;
|
|
4263
|
+
#a = [];
|
|
4264
|
+
#b;
|
|
4265
|
+
#c;
|
|
4266
|
+
signal;
|
|
4267
|
+
maxDepth;
|
|
4268
|
+
includeChildMatches;
|
|
4269
|
+
constructor(t, e, i) {
|
|
4270
|
+
if (
|
|
4271
|
+
((this.patterns = t),
|
|
4272
|
+
(this.path = e),
|
|
4273
|
+
(this.opts = i),
|
|
4274
|
+
(this.#c = i.posix || "win32" !== i.platform ? "/" : "\\"),
|
|
4275
|
+
(this.includeChildMatches = !1 !== i.includeChildMatches),
|
|
4276
|
+
(i.ignore || !this.includeChildMatches) &&
|
|
4277
|
+
((this.#b = Li(i.ignore ?? [], i)),
|
|
4278
|
+
!this.includeChildMatches && "function" != typeof this.#b.add))
|
|
4279
|
+
)
|
|
4280
|
+
throw Error("cannot ignore child matches, ignore lacks add() method.");
|
|
4281
|
+
((this.maxDepth = i.maxDepth || 1 / 0),
|
|
4282
|
+
i.signal &&
|
|
4283
|
+
((this.signal = i.signal),
|
|
4284
|
+
this.signal.addEventListener("abort", () => {
|
|
4285
|
+
this.#a.length = 0;
|
|
4286
|
+
})));
|
|
4287
|
+
}
|
|
4288
|
+
#d(t) {
|
|
4289
|
+
return this.seen.has(t) || !!this.#b?.ignored?.(t);
|
|
4290
|
+
}
|
|
4291
|
+
#e(e) {
|
|
4292
|
+
return !!this.#b?.childrenIgnored?.(e);
|
|
4293
|
+
}
|
|
4294
|
+
pause() {
|
|
4295
|
+
this.paused = !0;
|
|
4296
|
+
}
|
|
4297
|
+
resume() {
|
|
4298
|
+
if (this.signal?.aborted) return;
|
|
4299
|
+
this.paused = !1;
|
|
4300
|
+
let t;
|
|
4301
|
+
for (; !this.paused && (t = this.#a.shift()); ) t();
|
|
4302
|
+
}
|
|
4303
|
+
onResume(t) {
|
|
4304
|
+
this.signal?.aborted || (this.paused ? this.#a.push(t) : t());
|
|
4305
|
+
}
|
|
4306
|
+
async matchCheck(t, e) {
|
|
4307
|
+
if (e && this.opts.nodir) return;
|
|
4308
|
+
let i;
|
|
4309
|
+
if (this.opts.realpath) {
|
|
4310
|
+
if (!(i = t.realpathCached() || (await t.realpath()))) return;
|
|
4311
|
+
t = i;
|
|
4312
|
+
}
|
|
4313
|
+
let s = t.isUnknown() || this.opts.stat ? await t.lstat() : t;
|
|
4314
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
4315
|
+
let h = await s.realpath();
|
|
4316
|
+
h && (h.isUnknown() || this.opts.stat) && (await h.lstat());
|
|
4317
|
+
}
|
|
4318
|
+
return this.matchCheckTest(s, e);
|
|
4319
|
+
}
|
|
4320
|
+
matchCheckTest(t, e) {
|
|
4321
|
+
return t &&
|
|
4322
|
+
(this.maxDepth === 1 / 0 || t.depth() <= this.maxDepth) &&
|
|
4323
|
+
(!e || t.canReaddir()) &&
|
|
4324
|
+
(!this.opts.nodir || !t.isDirectory()) &&
|
|
4325
|
+
(!this.opts.nodir ||
|
|
4326
|
+
!this.opts.follow ||
|
|
4327
|
+
!t.isSymbolicLink() ||
|
|
4328
|
+
!t.realpathCached()?.isDirectory()) &&
|
|
4329
|
+
!this.#d(t)
|
|
4330
|
+
? t
|
|
4331
|
+
: void 0;
|
|
4332
|
+
}
|
|
4333
|
+
matchCheckSync(t, e) {
|
|
4334
|
+
if (e && this.opts.nodir) return;
|
|
4335
|
+
let i;
|
|
4336
|
+
if (this.opts.realpath) {
|
|
4337
|
+
if (!(i = t.realpathCached() || t.realpathSync())) return;
|
|
4338
|
+
t = i;
|
|
4339
|
+
}
|
|
4340
|
+
let s = t.isUnknown() || this.opts.stat ? t.lstatSync() : t;
|
|
4341
|
+
if (this.opts.follow && this.opts.nodir && s?.isSymbolicLink()) {
|
|
4342
|
+
let h = s.realpathSync();
|
|
4343
|
+
h && (h?.isUnknown() || this.opts.stat) && h.lstatSync();
|
|
4344
|
+
}
|
|
4345
|
+
return this.matchCheckTest(s, e);
|
|
4346
|
+
}
|
|
4347
|
+
matchFinish(t, e) {
|
|
4348
|
+
if (this.#d(t)) return;
|
|
4349
|
+
if (!this.includeChildMatches && this.#b?.add) {
|
|
4350
|
+
let i = `${t.relativePosix()}/**`;
|
|
4351
|
+
this.#b.add(i);
|
|
4352
|
+
}
|
|
4353
|
+
let s = void 0 === this.opts.absolute ? e : this.opts.absolute;
|
|
4354
|
+
this.seen.add(t);
|
|
4355
|
+
let h = this.opts.mark && t.isDirectory() ? this.#c : "";
|
|
4356
|
+
if (this.opts.withFileTypes) this.matchEmit(t);
|
|
4357
|
+
else if (s) {
|
|
4358
|
+
let r = this.opts.posix ? t.fullpathPosix() : t.fullpath();
|
|
4359
|
+
this.matchEmit(r + h);
|
|
4360
|
+
} else {
|
|
4361
|
+
let n = this.opts.posix ? t.relativePosix() : t.relative(),
|
|
4362
|
+
o =
|
|
4363
|
+
this.opts.dotRelative && !n.startsWith(".." + this.#c)
|
|
4364
|
+
? "." + this.#c
|
|
4365
|
+
: "";
|
|
4366
|
+
this.matchEmit(n ? o + n + h : "." + h);
|
|
4367
|
+
}
|
|
4368
|
+
}
|
|
4369
|
+
async match(t, e, i) {
|
|
4370
|
+
let s = await this.matchCheck(t, i);
|
|
4371
|
+
s && this.matchFinish(s, e);
|
|
4372
|
+
}
|
|
4373
|
+
matchSync(t, e, i) {
|
|
4374
|
+
let s = this.matchCheckSync(t, i);
|
|
4375
|
+
s && this.matchFinish(s, e);
|
|
4376
|
+
}
|
|
4377
|
+
walkCB(t, e, i) {
|
|
4378
|
+
(this.signal?.aborted && i(), this.walkCB2(t, e, new Et(this.opts), i));
|
|
4379
|
+
}
|
|
4380
|
+
walkCB2(t, e, i, s) {
|
|
4381
|
+
if (this.#e(t)) return s();
|
|
4382
|
+
if ((this.signal?.aborted && s(), this.paused)) {
|
|
4383
|
+
this.onResume(() => this.walkCB2(t, e, i, s));
|
|
4384
|
+
return;
|
|
4385
|
+
}
|
|
4386
|
+
i.processPatterns(t, e);
|
|
4387
|
+
let h = 1,
|
|
4388
|
+
r = () => {
|
|
4389
|
+
0 == --h && s();
|
|
4390
|
+
};
|
|
4391
|
+
for (let [n, o, a] of i.matches.entries())
|
|
4392
|
+
this.#d(n) || (h++, this.match(n, o, a).then(() => r()));
|
|
4393
|
+
for (let l of i.subwalkTargets()) {
|
|
4394
|
+
if (this.maxDepth !== 1 / 0 && l.depth() >= this.maxDepth) continue;
|
|
4395
|
+
h++;
|
|
4396
|
+
let c = l.readdirCached();
|
|
4397
|
+
l.calledReaddir()
|
|
4398
|
+
? this.walkCB3(l, c, i, r)
|
|
4399
|
+
: l.readdirCB((t, e) => this.walkCB3(l, e, i, r), !0);
|
|
4400
|
+
}
|
|
4401
|
+
r();
|
|
4402
|
+
}
|
|
4403
|
+
walkCB3(t, e, i, s) {
|
|
4404
|
+
i = i.filterEntries(t, e);
|
|
4405
|
+
let h = 1,
|
|
4406
|
+
r = () => {
|
|
4407
|
+
0 == --h && s();
|
|
4408
|
+
};
|
|
4409
|
+
for (let [n, o, a] of i.matches.entries())
|
|
4410
|
+
this.#d(n) || (h++, this.match(n, o, a).then(() => r()));
|
|
4411
|
+
for (let [l, c] of i.subwalks.entries())
|
|
4412
|
+
(h++, this.walkCB2(l, c, i.child(), r));
|
|
4413
|
+
r();
|
|
4414
|
+
}
|
|
4415
|
+
walkCBSync(t, e, i) {
|
|
4416
|
+
(this.signal?.aborted && i(),
|
|
4417
|
+
this.walkCB2Sync(t, e, new Et(this.opts), i));
|
|
4418
|
+
}
|
|
4419
|
+
walkCB2Sync(t, e, i, s) {
|
|
4420
|
+
if (this.#e(t)) return s();
|
|
4421
|
+
if ((this.signal?.aborted && s(), this.paused)) {
|
|
4422
|
+
this.onResume(() => this.walkCB2Sync(t, e, i, s));
|
|
4423
|
+
return;
|
|
4424
|
+
}
|
|
4425
|
+
i.processPatterns(t, e);
|
|
4426
|
+
let h = 1,
|
|
4427
|
+
r = () => {
|
|
4428
|
+
0 == --h && s();
|
|
4429
|
+
};
|
|
4430
|
+
for (let [n, o, a] of i.matches.entries())
|
|
4431
|
+
this.#d(n) || this.matchSync(n, o, a);
|
|
4432
|
+
for (let l of i.subwalkTargets()) {
|
|
4433
|
+
if (this.maxDepth !== 1 / 0 && l.depth() >= this.maxDepth) continue;
|
|
4434
|
+
h++;
|
|
4435
|
+
let c = l.readdirSync();
|
|
4436
|
+
this.walkCB3Sync(l, c, i, r);
|
|
4437
|
+
}
|
|
4438
|
+
r();
|
|
4439
|
+
}
|
|
4440
|
+
walkCB3Sync(t, e, i, s) {
|
|
4441
|
+
i = i.filterEntries(t, e);
|
|
4442
|
+
let h = 1,
|
|
4443
|
+
r = () => {
|
|
4444
|
+
0 == --h && s();
|
|
4445
|
+
};
|
|
4446
|
+
for (let [n, o, a] of i.matches.entries())
|
|
4447
|
+
this.#d(n) || this.matchSync(n, o, a);
|
|
4448
|
+
for (let [l, c] of i.subwalks.entries())
|
|
4449
|
+
(h++, this.walkCB2Sync(l, c, i.child(), r));
|
|
4450
|
+
r();
|
|
4451
|
+
}
|
|
4452
|
+
},
|
|
4453
|
+
xt = class extends zt {
|
|
4454
|
+
matches = new Set();
|
|
4455
|
+
constructor(t, e, i) {
|
|
4456
|
+
super(t, e, i);
|
|
4457
|
+
}
|
|
4458
|
+
matchEmit(t) {
|
|
4459
|
+
this.matches.add(t);
|
|
4460
|
+
}
|
|
4461
|
+
async walk() {
|
|
4462
|
+
if (this.signal?.aborted) throw this.signal.reason;
|
|
4463
|
+
return (
|
|
4464
|
+
this.path.isUnknown() && (await this.path.lstat()),
|
|
4465
|
+
await new Promise((t, e) => {
|
|
4466
|
+
this.walkCB(this.path, this.patterns, () => {
|
|
4467
|
+
this.signal?.aborted ? e(this.signal.reason) : t(this.matches);
|
|
4468
|
+
});
|
|
4469
|
+
}),
|
|
4470
|
+
this.matches
|
|
4471
|
+
);
|
|
4472
|
+
}
|
|
4473
|
+
walkSync() {
|
|
4474
|
+
if (this.signal?.aborted) throw this.signal.reason;
|
|
4475
|
+
return (
|
|
4476
|
+
this.path.isUnknown() && this.path.lstatSync(),
|
|
4477
|
+
this.walkCBSync(this.path, this.patterns, () => {
|
|
4478
|
+
if (this.signal?.aborted) throw this.signal.reason;
|
|
4479
|
+
}),
|
|
4480
|
+
this.matches
|
|
4481
|
+
);
|
|
4482
|
+
}
|
|
4483
|
+
},
|
|
4484
|
+
vt = class extends zt {
|
|
4485
|
+
results;
|
|
4486
|
+
constructor(t, e, i) {
|
|
4487
|
+
(super(t, e, i),
|
|
4488
|
+
(this.results = new V({ signal: this.signal, objectMode: !0 })),
|
|
4489
|
+
this.results.on("drain", () => this.resume()),
|
|
4490
|
+
this.results.on("resume", () => this.resume()));
|
|
4491
|
+
}
|
|
4492
|
+
matchEmit(t) {
|
|
4493
|
+
(this.results.write(t), this.results.flowing || this.pause());
|
|
4494
|
+
}
|
|
4495
|
+
stream() {
|
|
4496
|
+
let t = this.path;
|
|
4497
|
+
return (
|
|
4498
|
+
t.isUnknown()
|
|
4499
|
+
? t.lstat().then(() => {
|
|
4500
|
+
this.walkCB(t, this.patterns, () => this.results.end());
|
|
4501
|
+
})
|
|
4502
|
+
: this.walkCB(t, this.patterns, () => this.results.end()),
|
|
4503
|
+
this.results
|
|
4504
|
+
);
|
|
4505
|
+
}
|
|
4506
|
+
streamSync() {
|
|
4507
|
+
return (
|
|
4508
|
+
this.path.isUnknown() && this.path.lstatSync(),
|
|
4509
|
+
this.walkCBSync(this.path, this.patterns, () => this.results.end()),
|
|
4510
|
+
this.results
|
|
4511
|
+
);
|
|
4512
|
+
}
|
|
4513
|
+
},
|
|
4514
|
+
Pi =
|
|
4515
|
+
"object" == typeof process && process && "string" == typeof process.platform
|
|
4516
|
+
? process.platform
|
|
4517
|
+
: "linux",
|
|
4518
|
+
I = class {
|
|
4519
|
+
absolute;
|
|
4520
|
+
cwd;
|
|
4521
|
+
root;
|
|
4522
|
+
dot;
|
|
4523
|
+
dotRelative;
|
|
4524
|
+
follow;
|
|
4525
|
+
ignore;
|
|
4526
|
+
magicalBraces;
|
|
4527
|
+
mark;
|
|
4528
|
+
matchBase;
|
|
4529
|
+
maxDepth;
|
|
4530
|
+
nobrace;
|
|
4531
|
+
nocase;
|
|
4532
|
+
nodir;
|
|
4533
|
+
noext;
|
|
4534
|
+
noglobstar;
|
|
4535
|
+
pattern;
|
|
4536
|
+
platform;
|
|
4537
|
+
realpath;
|
|
4538
|
+
scurry;
|
|
4539
|
+
stat;
|
|
4540
|
+
signal;
|
|
4541
|
+
windowsPathsNoEscape;
|
|
4542
|
+
withFileTypes;
|
|
4543
|
+
includeChildMatches;
|
|
4544
|
+
opts;
|
|
4545
|
+
patterns;
|
|
4546
|
+
constructor(e, i) {
|
|
4547
|
+
if (!i) throw TypeError("glob options required");
|
|
4548
|
+
if (
|
|
4549
|
+
((this.withFileTypes = !!i.withFileTypes),
|
|
4550
|
+
(this.signal = i.signal),
|
|
4551
|
+
(this.follow = !!i.follow),
|
|
4552
|
+
(this.dot = !!i.dot),
|
|
4553
|
+
(this.dotRelative = !!i.dotRelative),
|
|
4554
|
+
(this.nodir = !!i.nodir),
|
|
4555
|
+
(this.mark = !!i.mark),
|
|
4556
|
+
i.cwd
|
|
4557
|
+
? (i.cwd instanceof URL || i.cwd.startsWith("file://")) &&
|
|
4558
|
+
(i.cwd = t(i.cwd))
|
|
4559
|
+
: (this.cwd = ""),
|
|
4560
|
+
(this.cwd = i.cwd || ""),
|
|
4561
|
+
(this.root = i.root),
|
|
4562
|
+
(this.magicalBraces = !!i.magicalBraces),
|
|
4563
|
+
(this.nobrace = !!i.nobrace),
|
|
4564
|
+
(this.noext = !!i.noext),
|
|
4565
|
+
(this.realpath = !!i.realpath),
|
|
4566
|
+
(this.absolute = i.absolute),
|
|
4567
|
+
(this.includeChildMatches = !1 !== i.includeChildMatches),
|
|
4568
|
+
(this.noglobstar = !!i.noglobstar),
|
|
4569
|
+
(this.matchBase = !!i.matchBase),
|
|
4570
|
+
(this.maxDepth = "number" == typeof i.maxDepth ? i.maxDepth : 1 / 0),
|
|
4571
|
+
(this.stat = !!i.stat),
|
|
4572
|
+
(this.ignore = i.ignore),
|
|
4573
|
+
this.withFileTypes && void 0 !== this.absolute)
|
|
4574
|
+
)
|
|
4575
|
+
throw Error("cannot set absolute and withFileTypes:true");
|
|
4576
|
+
if (
|
|
4577
|
+
("string" == typeof e && (e = [e]),
|
|
4578
|
+
(this.windowsPathsNoEscape =
|
|
4579
|
+
!!i.windowsPathsNoEscape || !1 === i.allowWindowsEscape),
|
|
4580
|
+
this.windowsPathsNoEscape && (e = e.map((t) => t.replace(/\\/g, "/"))),
|
|
4581
|
+
this.matchBase)
|
|
4582
|
+
) {
|
|
4583
|
+
if (i.noglobstar) throw TypeError("base matching requires globstar");
|
|
4584
|
+
e = e.map((t) => (t.includes("/") ? t : `./**/${t}`));
|
|
4585
|
+
}
|
|
4586
|
+
if (
|
|
4587
|
+
((this.pattern = e),
|
|
4588
|
+
(this.platform = i.platform || Pi),
|
|
4589
|
+
(this.opts = { ...i, platform: this.platform }),
|
|
4590
|
+
i.scurry)
|
|
4591
|
+
) {
|
|
4592
|
+
if (
|
|
4593
|
+
((this.scurry = i.scurry),
|
|
4594
|
+
void 0 !== i.nocase && i.nocase !== i.scurry.nocase)
|
|
4595
|
+
)
|
|
4596
|
+
throw Error("nocase option contradicts provided scurry option");
|
|
4597
|
+
} else {
|
|
4598
|
+
let s =
|
|
4599
|
+
"win32" === i.platform
|
|
4600
|
+
? it
|
|
4601
|
+
: "darwin" === i.platform
|
|
4602
|
+
? St
|
|
4603
|
+
: i.platform
|
|
4604
|
+
? rt
|
|
4605
|
+
: Xe;
|
|
4606
|
+
this.scurry = new s(this.cwd, { nocase: i.nocase, fs: i.fs });
|
|
4607
|
+
}
|
|
4608
|
+
this.nocase = this.scurry.nocase;
|
|
4609
|
+
let h = "darwin" === this.platform || "win32" === this.platform,
|
|
4610
|
+
r = {
|
|
4611
|
+
braceExpandMax: 1e4,
|
|
4612
|
+
...i,
|
|
4613
|
+
dot: this.dot,
|
|
4614
|
+
matchBase: this.matchBase,
|
|
4615
|
+
nobrace: this.nobrace,
|
|
4616
|
+
nocase: this.nocase,
|
|
4617
|
+
nocaseMagicOnly: h,
|
|
4618
|
+
nocomment: !0,
|
|
4619
|
+
noext: this.noext,
|
|
4620
|
+
nonegate: !0,
|
|
4621
|
+
optimizationLevel: 2,
|
|
4622
|
+
platform: this.platform,
|
|
4623
|
+
windowsPathsNoEscape: this.windowsPathsNoEscape,
|
|
4624
|
+
debug: !!this.opts.debug,
|
|
4625
|
+
},
|
|
4626
|
+
[n, o] = this.pattern
|
|
4627
|
+
.map((t) => new D(t, r))
|
|
4628
|
+
.reduce(
|
|
4629
|
+
(t, e) => (t[0].push(...e.set), t[1].push(...e.globParts), t),
|
|
4630
|
+
[[], []],
|
|
4631
|
+
);
|
|
4632
|
+
this.patterns = n.map((t, e) => {
|
|
4633
|
+
let i = o[e];
|
|
4634
|
+
if (!i) throw Error("invalid pattern object");
|
|
4635
|
+
return new nt(t, i, 0, this.platform);
|
|
4636
|
+
});
|
|
4637
|
+
}
|
|
4638
|
+
async walk() {
|
|
4639
|
+
return [
|
|
4640
|
+
...(await new xt(this.patterns, this.scurry.cwd, {
|
|
4641
|
+
...this.opts,
|
|
4642
|
+
maxDepth:
|
|
4643
|
+
this.maxDepth !== 1 / 0
|
|
4644
|
+
? this.maxDepth + this.scurry.cwd.depth()
|
|
4645
|
+
: 1 / 0,
|
|
4646
|
+
platform: this.platform,
|
|
4647
|
+
nocase: this.nocase,
|
|
4648
|
+
includeChildMatches: this.includeChildMatches,
|
|
4649
|
+
}).walk()),
|
|
4650
|
+
];
|
|
4651
|
+
}
|
|
4652
|
+
walkSync() {
|
|
4653
|
+
return [
|
|
4654
|
+
...new xt(this.patterns, this.scurry.cwd, {
|
|
4655
|
+
...this.opts,
|
|
4656
|
+
maxDepth:
|
|
4657
|
+
this.maxDepth !== 1 / 0
|
|
4658
|
+
? this.maxDepth + this.scurry.cwd.depth()
|
|
4659
|
+
: 1 / 0,
|
|
4660
|
+
platform: this.platform,
|
|
4661
|
+
nocase: this.nocase,
|
|
4662
|
+
includeChildMatches: this.includeChildMatches,
|
|
4663
|
+
}).walkSync(),
|
|
4664
|
+
];
|
|
4665
|
+
}
|
|
4666
|
+
stream() {
|
|
4667
|
+
return new vt(this.patterns, this.scurry.cwd, {
|
|
4668
|
+
...this.opts,
|
|
4669
|
+
maxDepth:
|
|
4670
|
+
this.maxDepth !== 1 / 0
|
|
4671
|
+
? this.maxDepth + this.scurry.cwd.depth()
|
|
4672
|
+
: 1 / 0,
|
|
4673
|
+
platform: this.platform,
|
|
4674
|
+
nocase: this.nocase,
|
|
4675
|
+
includeChildMatches: this.includeChildMatches,
|
|
4676
|
+
}).stream();
|
|
4677
|
+
}
|
|
4678
|
+
streamSync() {
|
|
4679
|
+
return new vt(this.patterns, this.scurry.cwd, {
|
|
4680
|
+
...this.opts,
|
|
4681
|
+
maxDepth:
|
|
4682
|
+
this.maxDepth !== 1 / 0
|
|
4683
|
+
? this.maxDepth + this.scurry.cwd.depth()
|
|
4684
|
+
: 1 / 0,
|
|
4685
|
+
platform: this.platform,
|
|
4686
|
+
nocase: this.nocase,
|
|
4687
|
+
includeChildMatches: this.includeChildMatches,
|
|
4688
|
+
}).streamSync();
|
|
4689
|
+
}
|
|
4690
|
+
iterateSync() {
|
|
4691
|
+
return this.streamSync()[Symbol.iterator]();
|
|
4692
|
+
}
|
|
4693
|
+
[Symbol.iterator]() {
|
|
4694
|
+
return this.iterateSync();
|
|
4695
|
+
}
|
|
4696
|
+
iterate() {
|
|
4697
|
+
return this.stream()[Symbol.asyncIterator]();
|
|
4698
|
+
}
|
|
4699
|
+
[Symbol.asyncIterator]() {
|
|
4700
|
+
return this.iterate();
|
|
4701
|
+
}
|
|
4702
|
+
},
|
|
4703
|
+
le = (t, e = {}) => {
|
|
4704
|
+
for (let i of (Array.isArray(t) || (t = [t]), t))
|
|
4705
|
+
if (new D(i, e).hasMagic()) return !0;
|
|
4706
|
+
return !1;
|
|
4707
|
+
};
|
|
4708
|
+
function Bt(t, e = {}) {
|
|
4709
|
+
return new I(t, e).streamSync();
|
|
4710
|
+
}
|
|
4711
|
+
function Qe(t, e = {}) {
|
|
4712
|
+
return new I(t, e).stream();
|
|
4713
|
+
}
|
|
4714
|
+
function ts(t, e = {}) {
|
|
4715
|
+
return new I(t, e).walkSync();
|
|
4716
|
+
}
|
|
4717
|
+
async function Je(t, e = {}) {
|
|
4718
|
+
return new I(t, e).walk();
|
|
4719
|
+
}
|
|
4720
|
+
function Ut(t, e = {}) {
|
|
4721
|
+
return new I(t, e).iterateSync();
|
|
4722
|
+
}
|
|
4723
|
+
function es(t, e = {}) {
|
|
4724
|
+
return new I(t, e).iterate();
|
|
4725
|
+
}
|
|
4726
|
+
var ji = Bt,
|
|
4727
|
+
Ii = Object.assign(Qe, { sync: Bt }),
|
|
4728
|
+
zi = Ut,
|
|
4729
|
+
Bi = Object.assign(es, { sync: Ut }),
|
|
4730
|
+
Ui = Object.assign(ts, { stream: Bt, iterate: Ut }),
|
|
4731
|
+
Ze = Object.assign(Je, {
|
|
4732
|
+
glob: Je,
|
|
4733
|
+
globSync: ts,
|
|
4734
|
+
sync: Ui,
|
|
4735
|
+
globStream: Qe,
|
|
4736
|
+
stream: Ii,
|
|
4737
|
+
globStreamSync: Bt,
|
|
4738
|
+
streamSync: ji,
|
|
4739
|
+
globIterate: es,
|
|
4740
|
+
iterate: Bi,
|
|
4741
|
+
globIterateSync: Ut,
|
|
4742
|
+
iterateSync: zi,
|
|
4743
|
+
Glob: I,
|
|
4744
|
+
hasMagic: le,
|
|
4745
|
+
escape: tt,
|
|
4746
|
+
unescape: W,
|
|
4747
|
+
});
|
|
4748
|
+
Ze.glob = Ze;
|
|
4749
|
+
export {
|
|
4750
|
+
I as Glob,
|
|
4751
|
+
ot as Ignore,
|
|
4752
|
+
tt as escape,
|
|
4753
|
+
Ze as glob,
|
|
4754
|
+
es as globIterate,
|
|
4755
|
+
Ut as globIterateSync,
|
|
4756
|
+
Qe as globStream,
|
|
4757
|
+
Bt as globStreamSync,
|
|
4758
|
+
ts as globSync,
|
|
4759
|
+
le as hasMagic,
|
|
4760
|
+
Bi as iterate,
|
|
4761
|
+
zi as iterateSync,
|
|
4762
|
+
Ii as stream,
|
|
4763
|
+
ji as streamSync,
|
|
4764
|
+
Ui as sync,
|
|
4765
|
+
W as unescape,
|
|
4766
|
+
};
|