wip
- commit
- 43337169d19d7b1090faed0c48b9ab5ffb28eb99
- author
- bamen · · 2025-06-02 15:05 UTC
- parent
- f30976a
- signature
- unsigned
1607 files · +178060 -7862
M .gitignore +7 -2
| @@ -1,9 +1,10 @@ | |||
| 1 | 1 | .env | |
| 2 | - | node_modules/ | |
| 2 | + | # Node.js/Bun specific (removed) | |
| 3 | + | # node_modules/ | |
| 3 | 4 | *tmp/ | |
| 4 | 5 | tmp/* | |
| 5 | 6 | config.yml | |
| 6 | - | bun.lockb | |
| 7 | + | # bun.lockb | |
| 7 | 8 | *.log | |
| 8 | 9 | *.txt | |
| 9 | 10 | *sync-conflict* | |
| @@ -16,3 +17,7 @@ setup.sh | |||
| 16 | 17 | sqlite.db | |
| 17 | 18 | .vscode/ | |
| 18 | 19 | admin-ui/ | |
| 20 | + | ||
| 21 | + | # Standalone Tailwind/DaisyUI | |
| 22 | + | tailwindcss | |
| 23 | + | daisyui.js | |
M .goreleaser.yaml +1 -1
| @@ -4,7 +4,7 @@ before: | |||
| 4 | 4 | hooks: | |
| 5 | 5 | - go mod tidy | |
| 6 | 6 | - templ generate | |
| 7 | - | - bun run build:css | |
| 7 | + | - tailwindcss -i internal/webui/public/assets/css/custom.css -o internal/webui/public/assets/css/tailwind.css | |
| 8 | 8 | ||
| 9 | 9 | release: | |
| 10 | 10 | draft: true | |
M Makefile +1 -1
| @@ -38,7 +38,7 @@ build: build-css build-templ | |||
| 38 | 38 | # Build CSS with tailwindcss | |
| 39 | 39 | build-css: | |
| 40 | 40 | @echo "Building CSS with tailwindcss..." | |
| 41 | - | @bun run build:css | |
| 41 | + | @tailwindcss -i internal/webui/public/assets/css/custom.css -o internal/webui/public/assets/css/tailwind.css | |
| 42 | 42 | @echo "CSS built successfully" | |
| 43 | 43 | ||
| 44 | 44 | # Generate Go code from templ templates | |
M internal/httpserve/handlers/container_crud.go +34 -22
| @@ -1,8 +1,8 @@ | |||
| 1 | 1 | package handlers | |
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | + | "encoding/json" | |
| 4 | 5 | "fmt" | |
| 5 | - | "net/http" | |
| 6 | 6 | "strings" | |
| 7 | 7 | ||
| 8 | 8 | "github.com/bnema/gordon/internal/server" | |
| @@ -126,25 +126,6 @@ func CreateContainerFullGET(c echo.Context, a *server.App) error { | |||
| 126 | 126 | func CreateContainerPOST(c echo.Context, a *server.App) error { | |
| 127 | 127 | log.Debug("CreateContainerPOST handler called") | |
| 128 | 128 | ||
| 129 | - | // Retrieve the ShortID of the image from the URL | |
| 130 | - | ShortID := c.Param("ID") | |
| 131 | - | log.Debug("Received ShortID for container creation:", "ShortID", ShortID) | |
| 132 | - | ||
| 133 | - | // Convert the ShortID to a full image ID | |
| 134 | - | imageID, err := FromShortIDToImageID(ShortID) | |
| 135 | - | if err != nil { | |
| 136 | - | log.Error("Error converting ShortID to full image ID:", "error", err) | |
| 137 | - | return sendError(c, err) | |
| 138 | - | } | |
| 139 | - | log.Debug("Converted ShortID to full image ID:", "imageID", imageID) | |
| 140 | - | ||
| 141 | - | // Get the image info | |
| 142 | - | _, err = docker.GetImageInfo(imageID) | |
| 143 | - | if err != nil { | |
| 144 | - | log.Error("Error getting image info:", "error", err) | |
| 145 | - | return sendError(c, err) | |
| 146 | - | } | |
| 147 | - | ||
| 148 | 129 | // Retrieve all form parameters | |
| 149 | 130 | formParams, err := c.FormParams() | |
| 150 | 131 | if err != nil { | |
| @@ -165,6 +146,22 @@ func CreateContainerPOST(c echo.Context, a *server.App) error { | |||
| 165 | 146 | } | |
| 166 | 147 | } | |
| 167 | 148 | ||
| 149 | + | // Get the full image ID directly from the sanitized form inputs | |
| 150 | + | imageID, ok := sanitizedInputs["image_id"] | |
| 151 | + | if !ok || imageID == "" { | |
| 152 | + | log.Error("Full image ID not found in form submission") | |
| 153 | + | // You might want to return a more specific error message to the user here | |
| 154 | + | return sendError(c, fmt.Errorf("missing image ID in form submission")) | |
| 155 | + | } | |
| 156 | + | log.Debug("Retrieved full image ID from form:", "imageID", imageID) | |
| 157 | + | ||
| 158 | + | // Get the image info (Optional but good practice: verify the image ID still exists) | |
| 159 | + | _, err = docker.GetImageInfo(imageID) | |
| 160 | + | if err != nil { | |
| 161 | + | log.Error("Error getting image info:", "error", err) | |
| 162 | + | return sendError(c, err) | |
| 163 | + | } | |
| 164 | + | ||
| 168 | 165 | cmdParams, err := cmdparams.FromInputsToCmdParams(sanitizedInputs, a) | |
| 169 | 166 | if err != nil { | |
| 170 | 167 | return sendError(c, err) | |
| @@ -229,6 +226,21 @@ func CreateContainerPOST(c echo.Context, a *server.App) error { | |||
| 229 | 226 | log.Info("Skipping proxy setup as requested", "container_id", containerID, "container_name", containerName) | |
| 230 | 227 | } | |
| 231 | 228 | ||
| 232 | - | // Redirect to the container list page | |
| 233 | - | return c.Redirect(http.StatusSeeOther, fmt.Sprintf("%s/containers", a.Config.Admin.Path)) | |
| 229 | + | // Prepare success message payload | |
| 230 | + | successPayload := map[string]string{ | |
| 231 | + | "level": "success", | |
| 232 | + | "message": fmt.Sprintf("Container '%s' created successfully.", containerName), | |
| 233 | + | } | |
| 234 | + | jsonPayload, err := json.Marshal(successPayload) | |
| 235 | + | if err != nil { | |
| 236 | + | // Log the error, but proceed with redirect as container creation was likely successful | |
| 237 | + | log.Error("Failed to marshal success payload for HX-Trigger", "error", err) | |
| 238 | + | } else { | |
| 239 | + | c.Response().Header().Set("HX-Trigger", fmt.Sprintf(`{"showMessage": %s}`, string(jsonPayload))) | |
| 240 | + | } | |
| 241 | + | ||
| 242 | + | // Render a success message fragment instead of redirecting | |
| 243 | + | renderer := render.NewTemplRenderer(a) | |
| 244 | + | successMsg := fmt.Sprintf("Container '%s' created successfully.", containerName) | |
| 245 | + | return renderer.RenderTempl(c, templcomponents.Success(successMsg)) // Use the correct Success component | |
| 234 | 246 | } | |
M internal/httpserve/handlers/container_management.go +101 -5
| @@ -224,12 +224,108 @@ func ImageManagerPrune(c echo.Context, a *server.App) error { | |||
| 224 | 224 | lastPruneResult.mutex.Unlock() | |
| 225 | 225 | }() | |
| 226 | 226 | ||
| 227 | - | // Immediately return 202 Accepted to the client | |
| 228 | - | c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) // Set appropriate content type if needed for HTMX | |
| 227 | + | // Immediately return a placeholder that initiates polling | |
| 228 | + | // Note: We need to modify imagelist.templ to handle this response properly | |
| 229 | + | // For now, just return 202 Accepted and indicate work started. | |
| 230 | + | // The actual polling trigger will be added in the template. | |
| 229 | 231 | c.Response().WriteHeader(http.StatusAccepted) | |
| 230 | - | // Optionally, return a message or updated component indicating the process has started | |
| 231 | - | // For now, just return a simple message in the response body | |
| 232 | - | return c.String(http.StatusAccepted, "Image pruning started in the background.") | |
| 232 | + | // We'll return a small snippet that the template swap can use | |
| 233 | + | // This snippet should include the polling mechanism itself. | |
| 234 | + | // Example (needs refinement in the template): | |
| 235 | + | return c.HTML(http.StatusAccepted, `<div id="prune-status-poller" hx-get="/htmx/image-manager/prune-status" hx-trigger="load, every 3s" hx-target="#prune-status-poller" hx-swap="outerHTML">Pruning images in background... Checking status.</div>`) | |
| 236 | + | } | |
| 237 | + | ||
| 238 | + | // ImageManagerPruneStatus checks the status of a background prune operation | |
| 239 | + | func ImageManagerPruneStatus(c echo.Context, a *server.App) error { | |
| 240 | + | lastPruneResult.mutex.Lock() | |
| 241 | + | defer lastPruneResult.mutex.Unlock() | |
| 242 | + | ||
| 243 | + | // If prune is not done, return an empty response or keep the poller active | |
| 244 | + | if !lastPruneResult.Done { | |
| 245 | + | // Returning 204 No Content will stop polling if using hx-swap="none" | |
| 246 | + | // However, our poller replaces itself, so we just return the same polling div | |
| 247 | + | // or an updated status message within it. | |
| 248 | + | // Let's keep the existing poller HTML but maybe update the text slightly. | |
| 249 | + | return c.HTML(http.StatusOK, `<div id="prune-status-poller" hx-get="/htmx/image-manager/prune-status" hx-trigger="every 3s" hx-target="#prune-status-poller" hx-swap="outerHTML">Still pruning... Checking status.</div>`) | |
| 250 | + | } | |
| 251 | + | ||
| 252 | + | // Prune is done, prepare the final response | |
| 253 | + | logger.Info("Prune complete, preparing final response for poller.") | |
| 254 | + | ||
| 255 | + | // Prepare JSON payload for HX-Trigger toast message | |
| 256 | + | var level string | |
| 257 | + | if lastPruneResult.Success { | |
| 258 | + | level = "success" | |
| 259 | + | } else { | |
| 260 | + | level = "error" | |
| 261 | + | } | |
| 262 | + | payload := map[string]string{"level": level, "message": lastPruneResult.Message} | |
| 263 | + | jsonPayload, marshalErr := json.Marshal(payload) | |
| 264 | + | if marshalErr != nil { | |
| 265 | + | logger.Error("Failed to marshal prune result payload for poller", "error", marshalErr) | |
| 266 | + | // Handle marshalling error - maybe return an error component | |
| 267 | + | } else { | |
| 268 | + | c.Response().Header().Set("HX-Trigger", fmt.Sprintf(`{"showMessage": %s}`, string(jsonPayload))) | |
| 269 | + | } | |
| 270 | + | ||
| 271 | + | // Reset the flag *after* preparing the response | |
| 272 | + | lastPruneResult.Done = false | |
| 273 | + | message := lastPruneResult.Message // Store message before resetting if needed | |
| 274 | + | success := lastPruneResult.Success | |
| 275 | + | // Reset message/success if needed, or maybe they are only relevant for the toast | |
| 276 | + | // lastPruneResult.Message = "" | |
| 277 | + | // lastPruneResult.Success = false | |
| 278 | + | ||
| 279 | + | // Fetch the updated image list (copy logic from ImageManagerComponent) | |
| 280 | + | images, listErr := docker.ListContainerImages() | |
| 281 | + | if listErr != nil { | |
| 282 | + | logger.Error("Failed to list images after prune for poller", "error", listErr) | |
| 283 | + | // Return an error FRAGMENT instead of a full page. | |
| 284 | + | // HX-Trigger for the prune status itself was already set. | |
| 285 | + | pruneStatusMsg := "Prune finished but failed to refresh list." | |
| 286 | + | if !success { // Add prune status detail if it also failed | |
| 287 | + | pruneStatusMsg = fmt.Sprintf("Prune status: %s. Failed to refresh list.", message) | |
| 288 | + | } | |
| 289 | + | return c.HTML(http.StatusOK, fmt.Sprintf("<div class='alert alert-error'>%s Error: %v. Please refresh manually.</div>", pruneStatusMsg, listErr)) | |
| 290 | + | } | |
| 291 | + | ||
| 292 | + | var humanReadableImages []components.HumanReadableImage | |
| 293 | + | for _, img := range images { | |
| 294 | + | shortID := img.ID[7:19] | |
| 295 | + | safelyInteractWithIDMap(Update, shortID, img.ID) | |
| 296 | + | createdStr := humanize.TimeAgo(time.Unix(img.Created, 0)) | |
| 297 | + | sizeStr := humanize.BytesToReadableSize(img.Size) | |
| 298 | + | var repository, tag string | |
| 299 | + | repoTag := "<none>:<none>" | |
| 300 | + | if len(img.RepoTags) > 0 { | |
| 301 | + | repoTag = img.RepoTags[0] | |
| 302 | + | parts := strings.Split(repoTag, ":") | |
| 303 | + | if len(parts) == 2 { | |
| 304 | + | repository = parts[0] | |
| 305 | + | tag = parts[1] | |
| 306 | + | } else { | |
| 307 | + | repository = repoTag | |
| 308 | + | tag = "latest" | |
| 309 | + | } | |
| 310 | + | } | |
| 311 | + | humanReadableImages = append(humanReadableImages, components.HumanReadableImage{ | |
| 312 | + | ID: img.ID, | |
| 313 | + | ShortID: shortID, | |
| 314 | + | Created: createdStr, | |
| 315 | + | Size: sizeStr, | |
| 316 | + | Name: repoTag, | |
| 317 | + | RepoDigests: img.RepoDigests, | |
| 318 | + | RepoTags: img.RepoTags, | |
| 319 | + | Repository: repository, | |
| 320 | + | Tag: tag, | |
| 321 | + | }) | |
| 322 | + | } | |
| 323 | + | ||
| 324 | + | // Render the final ImageList component to replace the poller | |
| 325 | + | renderer := render.NewTemplRenderer(a) | |
| 326 | + | component := components.ImageList(humanReadableImages) | |
| 327 | + | logger.Debug("Rendering final ImageList for poller") | |
| 328 | + | return renderer.RenderTempl(c, component) | |
| 233 | 329 | } | |
| 234 | 330 | ||
| 235 | 331 | // ContainerManagerComponent handles the /container-manager route | |
M internal/httpserve/handlers/container_transactions.go +9 -0
| @@ -24,6 +24,15 @@ func generateOrderedYAML(infoMap map[string]interface{}) (string, error) { | |||
| 24 | 24 | continue | |
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | + | // Special handling for empty Ports and Volumes maps | |
| 28 | + | if key == "Ports" || key == "Volumes" { | |
| 29 | + | if mapVal, ok := value.(map[string]string); ok && len(mapVal) == 0 { | |
| 30 | + | yamlString += key + ": []\n" // Output as empty list instead of map | |
| 31 | + | continue // Skip normal marshalling for this key | |
| 32 | + | } | |
| 33 | + | } | |
| 34 | + | ||
| 35 | + | // Default marshalling for other keys or non-empty maps | |
| 27 | 36 | yamlBytes, err := yaml.Marshal(map[string]interface{}{key: value}) | |
| 28 | 37 | if err != nil { | |
| 29 | 38 | return "", err | |
M internal/httpserve/handlers/login.go +4 -4
| @@ -81,12 +81,12 @@ func StartOAuthGithub(c echo.Context, a *server.App) error { | |||
| 81 | 81 | return fmt.Errorf("could not extend session expiration: %w", err) | |
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | - | // Explicitly mark the session as online since we've validated it | |
| 85 | - | logger.Info("Marking existing session as online", "sessionID", sessionID) | |
| 84 | + | // Explicitly mark the session as active since we've validated it | |
| 85 | + | logger.Info("Marking existing session as active", "sessionID", sessionID) | |
| 86 | 86 | err = queries.MarkSessionActive(a.DB, sessionID) | |
| 87 | 87 | if err != nil { | |
| 88 | - | logger.Error("Failed to mark session as online", "error", err, "sessionID", sessionID) | |
| 89 | - | return fmt.Errorf("failed to mark session online: %w", err) | |
| 88 | + | logger.Error("Failed to mark session as active", "error", err, "sessionID", sessionID) | |
| 89 | + | return fmt.Errorf("failed to mark session active: %w", err) | |
| 90 | 90 | } | |
| 91 | 91 | ||
| 92 | 92 | logger.Info("Session is valid and extended. Redirecting to admin panel") | |
M internal/proxy/core.go +6 -0
| @@ -218,6 +218,12 @@ func (p *Proxy) Close() { | |||
| 218 | 218 | ||
| 219 | 219 | // requestDomainCertificate requests a certificate for a domain | |
| 220 | 220 | func (p *Proxy) requestDomainCertificate(domainName string) error { | |
| 221 | + | // If certificate acquisition is globally skipped, do nothing. | |
| 222 | + | if p.config.SkipCertificates { | |
| 223 | + | logger.Debug("Skipping certificate request because SkipCertificates is true", "domain", domainName) | |
| 224 | + | return nil | |
| 225 | + | } | |
| 226 | + | ||
| 221 | 227 | logger.Debug("Requesting certificate for domain", "domain", domainName) | |
| 222 | 228 | ||
| 223 | 229 | // Check if we're already processing this domain | |
M internal/proxy/middleware.go +15 -16
| @@ -1,7 +1,6 @@ | |||
| 1 | 1 | package proxy | |
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | - | "fmt" | |
| 5 | 4 | "net" | |
| 6 | 5 | "net/http" | |
| 7 | 6 | "strings" | |
| @@ -114,7 +113,7 @@ func (p *Proxy) setupMiddleware() { | |||
| 114 | 113 | } | |
| 115 | 114 | ||
| 116 | 115 | // Add middleware to log incoming headers (for debugging Cloudflare detection) | |
| 117 | - | p.httpsServer.Use(logHeadersMiddleware()) | |
| 116 | + | // p.httpsServer.Use(logHeadersMiddleware()) | |
| 118 | 117 | ||
| 119 | 118 | // --- Rate Limiting Setup (Domain Only Now) --- | |
| 120 | 119 | if p.config.EnableRateLimit { | |
| @@ -250,17 +249,17 @@ func (p *Proxy) createRequestIDMiddleware() echo.MiddlewareFunc { | |||
| 250 | 249 | } | |
| 251 | 250 | ||
| 252 | 251 | // logHeadersMiddleware creates a middleware function to log request headers | |
| 253 | - | func logHeadersMiddleware() echo.MiddlewareFunc { | |
| 254 | - | return func(next echo.HandlerFunc) echo.HandlerFunc { | |
| 255 | - | return func(c echo.Context) error { | |
| 256 | - | // Log all headers at DEBUG level | |
| 257 | - | headerStrings := []string{} | |
| 258 | - | for k, v := range c.Request().Header { | |
| 259 | - | headerStrings = append(headerStrings, fmt.Sprintf("%s: %s", k, strings.Join(v, ","))) | |
| 260 | - | } | |
| 261 | - | logger.Debug("Incoming Request Headers", "request_id", c.Get(RequestIDKey), "headers", strings.Join(headerStrings, " | ")) | |
| 262 | - | ||
| 263 | - | return next(c) | |
| 264 | - | } | |
| 265 | - | } | |
| 266 | - | } | |
| 252 | + | // func logHeadersMiddleware() echo.MiddlewareFunc { | |
| 253 | + | // return func(next echo.HandlerFunc) echo.HandlerFunc { | |
| 254 | + | // return func(c echo.Context) error { | |
| 255 | + | // // Log all headers at DEBUG level | |
| 256 | + | // headerStrings := []string{} | |
| 257 | + | // for k, v := range c.Request().Header { | |
| 258 | + | // headerStrings = append(headerStrings, fmt.Sprintf("%s: %s", k, strings.Join(v, ","))) | |
| 259 | + | // } | |
| 260 | + | // logger.Debug("Incoming Request Headers", "request_id", c.Get(RequestIDKey), "headers", strings.Join(headerStrings, " | ")) | |
| 261 | + | ||
| 262 | + | // return next(c) | |
| 263 | + | // } | |
| 264 | + | // } | |
| 265 | + | // } | |
M internal/proxy/routes.go +38 -4
| @@ -1196,19 +1196,53 @@ func (p *Proxy) StartContainerEventListener() error { | |||
| 1196 | 1196 | } else { | |
| 1197 | 1197 | // Even if IP is the same, make sure the route is active | |
| 1198 | 1198 | if !route.Active { | |
| 1199 | - | logger.Info("Reactivating route for restarted container", | |
| 1199 | + | logger.Info("Attempting to reactivate route for restarted container", | |
| 1200 | 1200 | "container_id", containerID, | |
| 1201 | 1201 | "container_name", containerName, | |
| 1202 | 1202 | "domain", domain) | |
| 1203 | 1203 | ||
| 1204 | - | // Just reuse ForceUpdateRouteIP with the same IP to activate the route | |
| 1205 | - | p.ForceUpdateRouteIP(domain, containerIP) | |
| 1204 | + | // --- Add Health Check Before Activation --- | |
| 1205 | + | target := net.JoinHostPort(containerIP, route.ContainerPort) | |
| 1206 | + | maxRetries := 5 | |
| 1207 | + | retryDelay := 2 * time.Second | |
| 1208 | + | healthy := false | |
| 1209 | + | for i := 0; i < maxRetries; i++ { | |
| 1210 | + | conn, err := net.DialTimeout("tcp", target, 1*time.Second) | |
| 1211 | + | if err == nil { | |
| 1212 | + | conn.Close() | |
| 1213 | + | healthy = true | |
| 1214 | + | logger.Info("Container health check successful", "target", target, "attempt", i+1) | |
| 1215 | + | break | |
| 1216 | + | } | |
| 1217 | + | logger.Debug("Container health check failed, retrying...", | |
| 1218 | + | "target", target, | |
| 1219 | + | "attempt", i+1, | |
| 1220 | + | "error", err) | |
| 1221 | + | time.Sleep(retryDelay) | |
| 1222 | + | } | |
| 1223 | + | // --- End Health Check --- | |
| 1224 | + | ||
| 1225 | + | if healthy { | |
| 1226 | + | logger.Info("Container is healthy, proceeding with route activation", "domain", domain) | |
| 1227 | + | // Just reuse ForceUpdateRouteIP with the same IP to activate the route | |
| 1228 | + | err := p.ForceUpdateRouteIP(domain, containerIP) | |
| 1229 | + | if err != nil { | |
| 1230 | + | logger.Error("Failed to activate route after health check", | |
| 1231 | + | "domain", domain, | |
| 1232 | + | "error", err) | |
| 1233 | + | } | |
| 1234 | + | } else { | |
| 1235 | + | logger.Warn("Container did not become healthy after retries, route remains inactive", | |
| 1236 | + | "domain", domain, | |
| 1237 | + | "target", target) | |
| 1238 | + | // Route remains inactive, periodic check might pick it up later | |
| 1239 | + | } | |
| 1206 | 1240 | } | |
| 1207 | 1241 | } | |
| 1208 | 1242 | } | |
| 1209 | 1243 | } | |
| 1210 | 1244 | ||
| 1211 | - | // Call the standard recreation handler for additional checks | |
| 1245 | + | // Call the standard recreation handler for additional checks (might add the route if missing) | |
| 1212 | 1246 | p.HandleContainerRecreation(containerID, containerName, containerIP) | |
| 1213 | 1247 | }() | |
| 1214 | 1248 | } | |
M internal/templating/cmdparams/from_inputs.go +21 -2
| @@ -23,6 +23,9 @@ func FromInputsToCmdParams(inputs map[string]string, a *server.App) (docker.Cont | |||
| 23 | 23 | } | |
| 24 | 24 | } | |
| 25 | 25 | ||
| 26 | + | // Retrieve proxy port from the correct input key | |
| 27 | + | proxyPortValue := inputs["container_port"] // Changed from proxy_port | |
| 28 | + | ||
| 26 | 29 | params := docker.ContainerCommandParams{ | |
| 27 | 30 | IsSSL: inputs["container_protocol"] == "https", | |
| 28 | 31 | ContainerName: inputs["container_name"], | |
| @@ -31,14 +34,30 @@ func FromInputsToCmdParams(inputs map[string]string, a *server.App) (docker.Cont | |||
| 31 | 34 | ImageName: inputs["image_name"], | |
| 32 | 35 | ImageID: inputs["image_id"], | |
| 33 | 36 | Restart: inputs["restart"], | |
| 34 | - | ProxyPort: inputs["proxy_port"], | |
| 37 | + | ProxyPort: proxyPortValue, // Assign the retrieved value | |
| 35 | 38 | Volumes: volumeSlice, | |
| 36 | 39 | Environment: environmentSlice, | |
| 37 | 40 | Network: a.Config.ContainerEngine.Network, | |
| 38 | 41 | PortMappings: portMappings, | |
| 42 | + | // Labels will be populated below | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | // Initialize Labels slice if nil | |
| 46 | + | if params.Labels == nil { | |
| 47 | + | params.Labels = []string{} | |
| 39 | 48 | } | |
| 40 | 49 | ||
| 41 | - | err = SetupProxyRoute(¶ms, params.ProxyPort, a) | |
| 50 | + | // Add standard labels and the proxy port label | |
| 51 | + | params.Labels = append(params.Labels, | |
| 52 | + | fmt.Sprintf("gordon.managed=true"), | |
| 53 | + | fmt.Sprintf("gordon.domain=%s.%s", params.ServiceName, params.Domain), | |
| 54 | + | fmt.Sprintf("gordon.proxy.ssl=%t", params.IsSSL), | |
| 55 | + | fmt.Sprintf("gordon.proxy.port=%s", proxyPortValue), // Add the proxy port label | |
| 56 | + | ) | |
| 57 | + | ||
| 58 | + | // SetupProxyRoute might need adjustment if it relies on params.ProxyPort directly | |
| 59 | + | // Assuming SetupProxyRoute uses the passed proxyPortValue or reads labels | |
| 60 | + | err = SetupProxyRoute(¶ms, proxyPortValue, a) // Pass the correct port value | |
| 42 | 61 | if err != nil { | |
| 43 | 62 | return docker.ContainerCommandParams{}, fmt.Errorf("error setting up proxy route: %w", err) | |
| 44 | 63 | } | |
M internal/templating/models/templ/components/containerlist.templ +3 -3
| @@ -1,14 +1,14 @@ | |||
| 1 | 1 | package components | |
| 2 | 2 | ||
| 3 | 3 | import ( | |
| 4 | - | "github.com/docker/docker/api/types" | |
| 4 | + | "github.com/docker/docker/api/types/container" | |
| 5 | 5 | "strconv" | |
| 6 | 6 | ) | |
| 7 | 7 | ||
| 8 | 8 | // ContainerList displays a list of containers | |
| 9 | - | templ ContainerList(containers []types.Container, noContainer bool) { | |
| 9 | + | templ ContainerList(containers []container.Summary, noContainer bool) { | |
| 10 | 10 | <!-- Container list using daisyUI components --> | |
| 11 | - | <div class="card w-full bg-base-300"> | |
| 11 | + | <div class="card w-full bg-base-100"> | |
| 12 | 12 | <div class="card-body p-4"> | |
| 13 | 13 | ||
| 14 | 14 | <!-- Action buttons --> | |
M internal/templating/models/templ/components/containerlist_templ.go +3 -3 generated file: collapsed
M internal/templating/models/templ/components/createcontainer.templ +2 -1
| @@ -21,7 +21,7 @@ type ContainerFormData struct { | |||
| 21 | 21 | templ CreateContainerForm(data ContainerFormData) { | |
| 22 | 22 | <div class="flex flex-col md:flex-row space-y-4 md:space-y-0 md:space-x-4 flex-grow"> | |
| 23 | 23 | <!-- Left Side: Docker Run Options --> | |
| 24 | - | <div class="flex-grow card p-6"> | |
| 24 | + | <div class="flex-grow card p-6 bg-base-100"> | |
| 25 | 25 | <h2 class="card-title pb-4">Deploy a container based on { data.ImageName }</h2> | |
| 26 | 26 | if data.ErrorMessage != "" { | |
| 27 | 27 | <div class="alert alert-error"> | |
| @@ -36,6 +36,7 @@ templ CreateContainerForm(data ContainerFormData) { | |||
| 36 | 36 | hx-swap="innerHTML" | |
| 37 | 37 | hx-target={ "#create-form-target-" + data.ShortID }> | |
| 38 | 38 | <!-- Image Name --> | |
| 39 | + | <input type="hidden" name="image_id" value={ data.ImageID } /> | |
| 39 | 40 | <div class="grid grid-cols-1 md:grid-cols-3 gap-4 pb-4"> | |
| 40 | 41 | <div class="md:col-span-1"> | |
| 41 | 42 | <label class="label"> | |
M internal/templating/models/templ/components/createcontainer_templ.go +42 -29 generated file: collapsed
M internal/templating/models/templ/components/imagelist.templ +1 -1
| @@ -21,7 +21,7 @@ type HumanReadableImage struct { | |||
| 21 | 21 | // ImageList displays a list of images | |
| 22 | 22 | templ ImageList(images []HumanReadableImage) { | |
| 23 | 23 | <!-- Image list using daisyUI components --> | |
| 24 | - | <div class="card w-full bg-base-300"> | |
| 24 | + | <div class="card w-full bg-base-100"> | |
| 25 | 25 | <div class="card-body p-4"> | |
| 26 | 26 | ||
| 27 | 27 | <!-- Action buttons --> | |
M internal/templating/models/templ/components/imagelist_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/components/navbar.templ +1 -1
| @@ -3,7 +3,7 @@ package components | |||
| 3 | 3 | // Navbar is a menu component for navigation | |
| 4 | 4 | templ Navbar(buildVersion string, adminPath string, userSettingsURL string, logoutURL string) { | |
| 5 | 5 | <!-- DaisyUI Navbar --> | |
| 6 | - | <div class="navbar bg-base-200 shadow-lg fixed top-0 z-50"> | |
| 6 | + | <div class="navbar bg-base-100 shadow-lg fixed top-0 z-50"> | |
| 7 | 7 | <div class="navbar-start"> | |
| 8 | 8 | <div class="flex items-center"> | |
| 9 | 9 | <h1 class="gordon-title text-2xl md:text-3xl text-primary tracking-tighter px-4"> | |
M internal/templating/models/templ/components/navbar_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/components/success.templ +1 -1
| @@ -4,7 +4,7 @@ package components | |||
| 4 | 4 | templ Success(message string) { | |
| 5 | 5 | <div | |
| 6 | 6 | id="success" | |
| 7 | - | class="flex text-indigo-600 content-center justify-center items-center w-full h-full"> | |
| 7 | + | class="flex text-success content-center justify-center items-center w-full h-full"> | |
| 8 | 8 | <p class="text-2xl text-center"> | |
| 9 | 9 | if message != "" { | |
| 10 | 10 | { message } | |
M internal/templating/models/templ/components/success_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/layouts/admin_layout.templ +1 -1
| @@ -7,7 +7,7 @@ templ AdminLayout(title string, buildVersion string, adminPath string, userSetti | |||
| 7 | 7 | <!DOCTYPE html> | |
| 8 | 8 | <html lang="en" data-theme="gordon-dark"> | |
| 9 | 9 | @components.Header(title) | |
| 10 | - | <body class="min-h-screen bg-base-100"> | |
| 10 | + | <body class="min-h-screen bg-base-250"> | |
| 11 | 11 | @components.Navbar(buildVersion, adminPath, userSettingsURL, logoutURL) | |
| 12 | 12 | ||
| 13 | 13 | <!-- Main content starts after navbar height --> | |
M internal/templating/models/templ/layouts/admin_layout_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/layouts/base.templ +1 -1
| @@ -8,7 +8,7 @@ templ Base(title string) { | |||
| 8 | 8 | <!DOCTYPE html> | |
| 9 | 9 | <html lang="en"> | |
| 10 | 10 | @components.Header(title) | |
| 11 | - | <body class="min-h-screen bg-base-100"> | |
| 11 | + | <body class="min-h-screen bg-base-200"> | |
| 12 | 12 | { children... } | |
| 13 | 13 | @components.Footer() | |
| 14 | 14 | </body> | |
M internal/templating/models/templ/layouts/base_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/pages/admin/install.templ +1 -1
| @@ -13,7 +13,7 @@ templ InstallPage(title string, version string) { | |||
| 13 | 13 | > | |
| 14 | 14 | <div class="circle-shadow flex justify-center w-100"> | |
| 15 | 15 | <img | |
| 16 | - | src="/assets/imgs/gordon-mascot-hq-trsp.png" | |
| 16 | + | src="/assets/imgs/gordon-mascot-mq-trsp.png" | |
| 17 | 17 | alt="logo" | |
| 18 | 18 | class="sm:h-24 h-32 xl:h-48" | |
| 19 | 19 | /> | |
M internal/templating/models/templ/pages/admin/install_templ.go +1 -1 generated file: collapsed
M internal/templating/models/templ/pages/admin/manager.templ +2 -2
| @@ -17,7 +17,7 @@ templ ManagerPage(title string, buildVersion string, adminPath string, userSetti | |||
| 17 | 17 | </div> | |
| 18 | 18 | ||
| 19 | 19 | <!-- Stats overview --> | |
| 20 | - | <div class="stats shadow mb-6 w-full bg-base-300"> | |
| 20 | + | <div class="stats shadow mb-6 w-full bg-base-100"> | |
| 21 | 21 | <div class="stat"> | |
| 22 | 22 | <div class="stat-figure text-primary"> | |
| 23 | 23 | <span class="iconf text-3xl"></span> | |
| @@ -38,7 +38,7 @@ templ ManagerPage(title string, buildVersion string, adminPath string, userSetti | |||
| 38 | 38 | </div> | |
| 39 | 39 | ||
| 40 | 40 | <!-- Tabs for containers and images --> | |
| 41 | - | <div role="tablist" class="tabs tabs-boxed mb-4"> | |
| 41 | + | <div role="tablist" class="tabs tabs-border mb-4"> | |
| 42 | 42 | <input type="radio" name="my_tabs" role="tab" class="tab" aria-label="Containers" id="containers-tab" checked /> | |
| 43 | 43 | <div role="tabpanel" class="tab-content p-0 bg-base-300"> | |
| 44 | 44 | <!-- Container manager section --> | |
M internal/templating/models/templ/pages/admin/manager_templ.go +2 -2 generated file: collapsed
M internal/templating/models/templ/pages/errors/errors.templ +2 -5
| @@ -16,13 +16,10 @@ templ NotFoundPage(data ErrorPageData) { | |||
| 16 | 16 | @layouts.Base(data.Title) { | |
| 17 | 17 | <div class="flex flex-col items-center justify-center min-h-screen p-4"> | |
| 18 | 18 | <div class="flex flex-col items-center mb-8"> | |
| 19 | - | <img src="/assets/imgs/gordon-mascot-hq-trsp.png" alt="Gordon Mascot" class="w-64 h-64 mb-4" /> | |
| 19 | + | <img src="/assets/imgs/gordon-mascot-mq-trsp.png" alt="Gordon Mascot" class="w-64 mb-4" /> | |
| 20 | 20 | <h1 class="text-4xl font-bold text-error">404</h1> | |
| 21 | 21 | <h2 class="text-2xl mb-2">Page Not Found</h2> | |
| 22 | 22 | <p class="text-center text-base-content opacity-70 max-w-md mb-8">{ data.Message }</p> | |
| 23 | - | <a href={ templ.URL(data.AdminPath) } class="btn btn-primary"> | |
| 24 | - | <span class="iconf mr-2">🏠</span> Go Home | |
| 25 | - | </a> | |
| 26 | 23 | </div> | |
| 27 | 24 | </div> | |
| 28 | 25 | } | |
| @@ -33,7 +30,7 @@ templ ForbiddenPage(data ErrorPageData) { | |||
| 33 | 30 | @layouts.Base(data.Title) { | |
| 34 | 31 | <div class="flex flex-col items-center justify-center min-h-screen p-4"> | |
| 35 | 32 | <div class="flex flex-col items-center mb-8"> | |
| 36 | - | <img src="/assets/imgs/gordon-mascot-hq-trsp.png" alt="Gordon Mascot" class="w-64 h-64 mb-4" /> | |
| 33 | + | <img src="/assets/imgs/gordon-mascot-mq-trsp.png" alt="Gordon Mascot" class="w-64 h-64 mb-4" /> | |
| 37 | 34 | <h1 class="text-4xl font-bold text-error">403</h1> | |
| 38 | 35 | <h2 class="text-2xl mb-2">Access Forbidden</h2> | |
| 39 | 36 | <p class="text-center text-base-content opacity-70 max-w-md mb-8">{ data.Message }</p> | |
M internal/templating/models/templ/pages/errors/errors_templ.go +16 -25 generated file: collapsed
M internal/webui/public/assets/css/custom.css +22 -103
| @@ -1,123 +1,42 @@ | |||
| 1 | - | /** | |
| 2 | - | * Path: internal/ui/public/assets/css/custom.css | |
| 3 | - | * | |
| 4 | - | * @format | |
| 5 | - | */ | |
| 6 | - | ||
| 7 | - | /* Embeded path : assets/css/cutsom.css */ | |
| 8 | - | ||
| 9 | 1 | @import "tailwindcss"; | |
| 10 | - | @plugin "daisyui"; | |
| 11 | - | ||
| 12 | - | /* Custom DaisyUI theme */ | |
| 2 | + | /* Custom DaisyUI theme - Defined in tailwind.config.js */ | |
| 13 | 3 | @plugin "daisyui/theme" { | |
| 14 | 4 | name: "gordon-dark"; | |
| 15 | 5 | default: true; | |
| 16 | 6 | prefersdark: true; | |
| 17 | 7 | color-scheme: "dark"; | |
| 18 | - | --color-base-100: oklch(28% 0.091 267.935); | |
| 19 | - | --color-base-200: oklch(20% 0.042 265.755); | |
| 20 | - | --color-base-300: oklch(13% 0.028 261.692); | |
| 21 | - | --color-base-content: oklch(93% 0.034 272.788); | |
| 22 | - | --color-primary: oklch(87% 0 0); | |
| 23 | - | --color-primary-content: oklch(14% 0 0); | |
| 24 | - | --color-secondary: oklch(80% 0.105 251.813); | |
| 25 | - | --color-secondary-content: oklch(28% 0.091 267.935); | |
| 26 | - | --color-accent: oklch(80% 0.105 251.813); | |
| 27 | - | --color-accent-content: oklch(28% 0.091 267.935); | |
| 28 | - | --color-neutral: oklch(37% 0.034 259.733); | |
| 29 | - | --color-neutral-content: oklch(98% 0.002 247.839); | |
| 8 | + | --color-base-100: oklch(14% 0 0); | |
| 9 | + | --color-base-200: oklch(21% 0.006 285.885); | |
| 10 | + | --color-base-250: oklch(21% 0.006 285.885); | |
| 11 | + | --color-base-300: oklch(26% 0 0); | |
| 12 | + | --color-base-content: oklch(97% 0.001 106.424); | |
| 13 | + | --color-primary: oklch(44% 0.043 257.281); | |
| 14 | + | --color-primary-content: oklch(98% 0.003 247.858); | |
| 15 | + | --color-secondary: oklch(66% 0.179 58.318); | |
| 16 | + | --color-secondary-content: oklch(98% 0.022 95.277); | |
| 17 | + | --color-accent: oklch(60% 0.118 184.704); | |
| 18 | + | --color-accent-content: oklch(98% 0.014 180.72); | |
| 19 | + | --color-neutral: oklch(42% 0.199 265.638); | |
| 20 | + | --color-neutral-content: oklch(98% 0.001 106.423); | |
| 30 | 21 | --color-info: oklch(68% 0.169 237.323); | |
| 31 | 22 | --color-info-content: oklch(97% 0.013 236.62); | |
| 32 | - | --color-success: oklch(70% 0.14 182.503); | |
| 33 | - | --color-success-content: oklch(98% 0.014 180.72); | |
| 34 | - | --color-warning: oklch(76% 0.188 70.08); | |
| 35 | - | --color-warning-content: oklch(98% 0.022 95.277); | |
| 23 | + | --color-success: oklch(69% 0.17 162.48); | |
| 24 | + | --color-success-content: oklch(97% 0.021 166.113); | |
| 25 | + | --color-warning: oklch(70% 0.213 47.604); | |
| 26 | + | --color-warning-content: oklch(98% 0.016 73.684); | |
| 36 | 27 | --color-error: oklch(64% 0.246 16.439); | |
| 37 | 28 | --color-error-content: oklch(96% 0.015 12.422); | |
| 38 | - | --radius-selector: 0rem; | |
| 39 | - | --radius-field: 0rem; | |
| 40 | - | --radius-box: 0rem; | |
| 29 | + | --radius-selector: 1rem; | |
| 30 | + | --radius-field: 0.5rem; | |
| 31 | + | --radius-box: 1rem; | |
| 41 | 32 | --size-selector: 0.25rem; | |
| 42 | - | --size-field: 0.25rem; | |
| 33 | + | --size-field: 0.21875rem; | |
| 43 | 34 | --border: 1px; | |
| 44 | 35 | --depth: 0; | |
| 45 | 36 | --noise: 0; | |
| 46 | 37 | } | |
| 47 | 38 | ||
| 48 | 39 | ||
| 49 | - | /* Custom component classes */ | |
| 50 | - | @layer components { | |
| 51 | - | /* Button styles */ | |
| 52 | - | .btn-primary { | |
| 53 | - | @apply flex w-full justify-center border border-transparent bg-indigo-600 px-4 py-2 text-sm font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2; | |
| 54 | - | } | |
| 55 | - | ||
| 56 | - | .btn-secondary { | |
| 57 | - | @apply flex w-full justify-center border border-secondary bg-secondary px-4 py-2 text-sm font-medium text-secondary-content hover:bg-secondary/90 focus:outline-none focus:ring-2 focus:ring-secondary focus:ring-offset-2; | |
| 58 | - | } | |
| 59 | - | ||
| 60 | - | .btn-danger { | |
| 61 | - | @apply flex w-full justify-center border border-transparent bg-red-600 px-4 py-2 text-sm font-medium text-white hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2; | |
| 62 | - | } | |
| 63 | - | ||
| 64 | - | /* Alert styles */ | |
| 65 | - | .alert-error { | |
| 66 | - | @apply bg-red-50 p-4 dark:bg-red-900/20; | |
| 67 | - | } | |
| 68 | - | ||
| 69 | - | .alert-error-icon { | |
| 70 | - | @apply h-5 w-5 text-red-400; | |
| 71 | - | } | |
| 72 | - | ||
| 73 | - | .alert-error-text { | |
| 74 | - | @apply text-sm font-medium text-red-800 dark:text-red-300; | |
| 75 | - | } | |
| 76 | - | ||
| 77 | - | .alert-success { | |
| 78 | - | @apply bg-green-50 p-4 dark:bg-green-900/20; | |
| 79 | - | } | |
| 80 | - | ||
| 81 | - | .alert-success-icon { | |
| 82 | - | @apply h-5 w-5 text-green-400; | |
| 83 | - | } | |
| 84 | - | ||
| 85 | - | .alert-success-text { | |
| 86 | - | @apply text-sm font-medium text-green-800 dark:text-green-300; | |
| 87 | - | } | |
| 88 | - | ||
| 89 | - | /* Card styles */ | |
| 90 | - | .card { | |
| 91 | - | @apply bg-base-100 p-4 shadow mb-4; | |
| 92 | - | } | |
| 93 | - | ||
| 94 | - | .card-header { | |
| 95 | - | @apply text-lg font-semibold text-indigo-600 mb-2; | |
| 96 | - | } | |
| 97 | - | ||
| 98 | - | /* Background styles */ | |
| 99 | - | .bg-app { | |
| 100 | - | @apply bg-base-300; | |
| 101 | - | } | |
| 102 | - | ||
| 103 | - | .bg-sidebar { | |
| 104 | - | @apply bg-indigo-900; | |
| 105 | - | } | |
| 106 | - | ||
| 107 | - | .bg-card { | |
| 108 | - | @apply bg-base-100; | |
| 109 | - | } | |
| 110 | - | ||
| 111 | - | /* Text styles */ | |
| 112 | - | .text-title { | |
| 113 | - | @apply text-indigo-600 font-semibold; | |
| 114 | - | } | |
| 115 | - | ||
| 116 | - | .text-subtitle { | |
| 117 | - | @apply text-indigo-500; | |
| 118 | - | } | |
| 119 | - | } | |
| 120 | - | ||
| 121 | 40 | /* Import IBM Plex Fonts */ | |
| 122 | 41 | @font-face { | |
| 123 | 42 | font-family: "IBMPlexSans-Bold"; | |
M internal/webui/public/assets/css/tailwind.css +474 -7547 large diff (8021 lines changed): collapsed
A node_modules/.bin/cssesc +1 -0 generated file: collapsed
A node_modules/.bin/glob +1 -0 generated file: collapsed
A node_modules/.bin/jiti +1 -0 generated file: collapsed
A node_modules/.bin/nanoid +1 -0 generated file: collapsed
A node_modules/.bin/node-which +1 -0 generated file: collapsed
A node_modules/.bin/prettier +1 -0 generated file: collapsed
A node_modules/.bin/resolve +1 -0 generated file: collapsed
A node_modules/.bin/sucrase +1 -0 generated file: collapsed
A node_modules/.bin/sucrase-node +1 -0 generated file: collapsed
A node_modules/.bin/tailwind +1 -0 generated file: collapsed
A node_modules/.bin/yaml +1 -0 generated file: collapsed
A node_modules/.svelte2tsx-language-server-files/svelte-native-jsx.d.ts +32 -0 generated file: collapsed
A node_modules/.svelte2tsx-language-server-files/svelte-shims-v4.d.ts +287 -0 generated file: collapsed
A node_modules/@alloc/quick-lru/index.d.ts +128 -0 generated file: collapsed
A node_modules/@alloc/quick-lru/index.js +263 -0 generated file: collapsed
A node_modules/@alloc/quick-lru/license +9 -0 generated file: collapsed
A node_modules/@alloc/quick-lru/package.json +43 -0 generated file: collapsed
A node_modules/@alloc/quick-lru/readme.md +139 -0 generated file: collapsed
A node_modules/@isaacs/cliui/README.md +143 -0 generated file: collapsed
A node_modules/@isaacs/cliui/build/index.cjs +317 -0 generated file: collapsed
A node_modules/@isaacs/cliui/build/index.d.cts +43 -0 generated file: collapsed
A node_modules/@isaacs/cliui/build/lib/index.js +302 -0 generated file: collapsed
A node_modules/@isaacs/cliui/index.mjs +14 -0 generated file: collapsed
A node_modules/@isaacs/cliui/package.json +86 -0 generated file: collapsed
A node_modules/@jridgewell/gen-mapping/LICENSE +19 -0 generated file: collapsed
A node_modules/@jridgewell/gen-mapping/README.md +227 -0 generated file: collapsed
A node_modules/@jridgewell/gen-mapping/package.json +76 -0 generated file: collapsed
A node_modules/@jridgewell/resolve-uri/LICENSE +19 -0 generated file: collapsed
A node_modules/@jridgewell/resolve-uri/README.md +40 -0 generated file: collapsed
A node_modules/@jridgewell/resolve-uri/package.json +69 -0 generated file: collapsed
A node_modules/@jridgewell/set-array/LICENSE +19 -0 generated file: collapsed
A node_modules/@jridgewell/set-array/README.md +37 -0 generated file: collapsed
A node_modules/@jridgewell/set-array/package.json +65 -0 generated file: collapsed
A node_modules/@jridgewell/sourcemap-codec/LICENSE +21 -0 generated file: collapsed
A node_modules/@jridgewell/sourcemap-codec/README.md +264 -0 generated file: collapsed
A node_modules/@jridgewell/sourcemap-codec/package.json +75 -0 generated file: collapsed
A node_modules/@jridgewell/trace-mapping/LICENSE +19 -0 generated file: collapsed
A node_modules/@jridgewell/trace-mapping/README.md +257 -0 generated file: collapsed
A node_modules/@jridgewell/trace-mapping/package.json +77 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/LICENSE +21 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/README.md +171 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/adapters/fs.js +19 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/constants.d.ts +4 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/constants.js +17 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/index.d.ts +12 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/index.js +26 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/async.js +104 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +1 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/common.js +13 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +5 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/providers/sync.js +54 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/settings.d.ts +20 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/settings.js +24 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/types/index.d.ts +20 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/types/index.js +2 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +2 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/utils/fs.js +19 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +2 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/out/utils/index.js +5 -0 generated file: collapsed
A node_modules/@nodelib/fs.scandir/package.json +44 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/LICENSE +21 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/README.md +126 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/adapters/fs.js +17 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/index.d.ts +12 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/index.js +26 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/providers/async.d.ts +4 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/providers/async.js +36 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +3 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/providers/sync.js +23 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/settings.d.ts +16 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/settings.js +16 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/types/index.d.ts +4 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/out/types/index.js +2 -0 generated file: collapsed
A node_modules/@nodelib/fs.stat/package.json +37 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/LICENSE +21 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/README.md +215 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/index.d.ts +14 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/index.js +34 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/async.d.ts +12 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/async.js +30 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/index.d.ts +4 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/index.js +9 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +12 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/stream.js +34 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +10 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/providers/sync.js +14 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/async.d.ts +30 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/async.js +97 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/common.d.ts +7 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/common.js +31 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/reader.js +11 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +15 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/readers/sync.js +59 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/settings.d.ts +30 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/settings.js +26 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/types/index.d.ts +8 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/out/types/index.js +2 -0 generated file: collapsed
A node_modules/@nodelib/fs.walk/package.json +44 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-glibc/LICENSE +21 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-glibc/README.md +1 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-glibc/package.json +33 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-glibc/watcher.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/@parcel/watcher-linux-x64-musl/LICENSE +21 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-musl/README.md +1 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-musl/package.json +33 -0 generated file: collapsed
A node_modules/@parcel/watcher-linux-x64-musl/watcher.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/@parcel/watcher/LICENSE +21 -0 generated file: collapsed
A node_modules/@parcel/watcher/README.md +135 -0 generated file: collapsed
A node_modules/@parcel/watcher/binding.gyp +93 -0 generated file: collapsed
A node_modules/@parcel/watcher/index.d.ts +49 -0 generated file: collapsed
A node_modules/@parcel/watcher/index.js +41 -0 generated file: collapsed
A node_modules/@parcel/watcher/index.js.flow +48 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/.bin/detect-libc +1 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/.npmignore +7 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/LICENSE +201 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/README.md +78 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/bin/detect-libc.js +18 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/lib/detect-libc.js +92 -0 generated file: collapsed
A node_modules/@parcel/watcher/node_modules/detect-libc/package.json +35 -0 generated file: collapsed
A node_modules/@parcel/watcher/package.json +88 -0 generated file: collapsed
A node_modules/@parcel/watcher/scripts/build-from-source.js +13 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Backend.cc +182 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Backend.hh +37 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Debounce.cc +113 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Debounce.hh +49 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/DirTree.cc +152 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/DirTree.hh +50 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Event.hh +109 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Glob.cc +22 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Glob.hh +34 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/PromiseRunner.hh +101 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Signal.hh +46 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Watcher.cc +237 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/Watcher.hh +73 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/binding.cc +268 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/kqueue/KqueueBackend.cc +306 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/kqueue/KqueueBackend.hh +35 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/linux/InotifyBackend.cc +232 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/linux/InotifyBackend.hh +34 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/macos/FSEventsBackend.cc +338 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/macos/FSEventsBackend.hh +20 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/shared/BruteForceBackend.cc +41 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/shared/BruteForceBackend.hh +25 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/unix/fts.cc +50 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/unix/legacy.cc +77 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/wasm/WasmBackend.cc +132 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/wasm/WasmBackend.hh +34 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/wasm/include.h +74 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/watchman/BSER.cc +302 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/watchman/BSER.hh +69 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/watchman/IPC.hh +175 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/watchman/WatchmanBackend.cc +338 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/watchman/WatchmanBackend.hh +35 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/windows/WindowsBackend.cc +282 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/windows/WindowsBackend.hh +18 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/windows/win_utils.cc +44 -0 generated file: collapsed
A node_modules/@parcel/watcher/src/windows/win_utils.hh +11 -0 generated file: collapsed
A node_modules/@parcel/watcher/wrapper.js +77 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/.editorconfig +14 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/CHANGELOG.md +147 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/LICENSE +201 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/README.md +413 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/is-default-value.js +25 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/limit-long-syntax.js +35 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/negate.js +43 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/no-repeated-options.js +31 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/ordered-options.mjs +41 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/examples/simple-hard-coded.js +26 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/index.js +396 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/internal/errors.js +47 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/internal/primordials.js +393 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/internal/util.js +14 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/internal/validators.js +89 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/package.json +36 -0 generated file: collapsed
A node_modules/@pkgjs/parseargs/utils.js +198 -0 generated file: collapsed
A node_modules/@tailwindcss/cli/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/cli/README.md +40 -0 generated file: collapsed
A node_modules/@tailwindcss/cli/package.json +41 -0 generated file: collapsed
A node_modules/@tailwindcss/node/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/node/README.md +40 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/.bin/jiti +1 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/README.md +235 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti-cli.mjs +34 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti-hooks.mjs +117 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti-native.mjs +121 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti-register.d.mts +1 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti-register.mjs +4 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti.cjs +23 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti.d.cts +8 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti.d.mts +8 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/jiti.mjs +22 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/lib/types.d.ts +260 -0 generated file: collapsed
A node_modules/@tailwindcss/node/node_modules/jiti/package.json +134 -0 generated file: collapsed
A node_modules/@tailwindcss/node/package.json +44 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-gnu/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-gnu/README.md +3 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-gnu/package.json +30 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-gnu/tailwindcss-oxide.linux-x64-gnu.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/@tailwindcss/oxide-linux-x64-musl/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-musl/README.md +3 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-musl/package.json +30 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide-linux-x64-musl/tailwindcss-oxide.linux-x64-musl.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/@tailwindcss/oxide/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide/index.d.ts +37 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide/index.js +315 -0 generated file: collapsed
A node_modules/@tailwindcss/oxide/package.json +63 -0 generated file: collapsed
A node_modules/@tailwindcss/postcss/LICENSE +21 -0 generated file: collapsed
A node_modules/@tailwindcss/postcss/README.md +40 -0 generated file: collapsed
A node_modules/@tailwindcss/postcss/package.json +47 -0 generated file: collapsed
A node_modules/ansi-regex/index.d.ts +33 -0 generated file: collapsed
A node_modules/ansi-regex/index.js +10 -0 generated file: collapsed
A node_modules/ansi-regex/license +9 -0 generated file: collapsed
A node_modules/ansi-regex/package.json +61 -0 generated file: collapsed
A node_modules/ansi-regex/readme.md +60 -0 generated file: collapsed
A node_modules/ansi-styles/index.d.ts +236 -0 generated file: collapsed
A node_modules/ansi-styles/index.js +223 -0 generated file: collapsed
A node_modules/ansi-styles/license +9 -0 generated file: collapsed
A node_modules/ansi-styles/package.json +54 -0 generated file: collapsed
A node_modules/ansi-styles/readme.md +173 -0 generated file: collapsed
A node_modules/any-promise/.jshintrc +4 -0 generated file: collapsed
A node_modules/any-promise/.npmignore +7 -0 generated file: collapsed
A node_modules/any-promise/LICENSE +19 -0 generated file: collapsed
A node_modules/any-promise/README.md +161 -0 generated file: collapsed
A node_modules/any-promise/implementation.d.ts +3 -0 generated file: collapsed
A node_modules/any-promise/implementation.js +1 -0 generated file: collapsed
A node_modules/any-promise/index.d.ts +73 -0 generated file: collapsed
A node_modules/any-promise/index.js +1 -0 generated file: collapsed
A node_modules/any-promise/loader.js +78 -0 generated file: collapsed
A node_modules/any-promise/optional.js +6 -0 generated file: collapsed
A node_modules/any-promise/package.json +45 -0 generated file: collapsed
A node_modules/any-promise/register-shim.js +18 -0 generated file: collapsed
A node_modules/any-promise/register.d.ts +17 -0 generated file: collapsed
A node_modules/any-promise/register.js +94 -0 generated file: collapsed
A node_modules/any-promise/register/bluebird.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/bluebird.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/es6-promise.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/es6-promise.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/lie.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/lie.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/native-promise-only.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/native-promise-only.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/pinkie.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/pinkie.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/promise.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/promise.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/q.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/q.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/rsvp.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/rsvp.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/vow.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/vow.js +2 -0 generated file: collapsed
A node_modules/any-promise/register/when.d.ts +1 -0 generated file: collapsed
A node_modules/any-promise/register/when.js +2 -0 generated file: collapsed
A node_modules/anymatch/LICENSE +15 -0 generated file: collapsed
A node_modules/anymatch/README.md +87 -0 generated file: collapsed
A node_modules/anymatch/index.d.ts +20 -0 generated file: collapsed
A node_modules/anymatch/index.js +104 -0 generated file: collapsed
A node_modules/anymatch/package.json +48 -0 generated file: collapsed
A node_modules/arg/LICENSE.md +21 -0 generated file: collapsed
A node_modules/arg/README.md +317 -0 generated file: collapsed
A node_modules/arg/index.d.ts +44 -0 generated file: collapsed
A node_modules/arg/index.js +195 -0 generated file: collapsed
A node_modules/arg/package.json +28 -0 collapsed to keep the page light
A node_modules/balanced-match/.github/FUNDING.yml +2 -0 collapsed to keep the page light
A node_modules/balanced-match/LICENSE.md +21 -0 collapsed to keep the page light
A node_modules/balanced-match/README.md +97 -0 collapsed to keep the page light
A node_modules/balanced-match/index.js +62 -0 collapsed to keep the page light
A node_modules/balanced-match/package.json +48 -0 collapsed to keep the page light
A node_modules/binary-extensions/binary-extensions.json +263 -0 collapsed to keep the page light
A node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0 collapsed to keep the page light
A node_modules/binary-extensions/index.d.ts +14 -0 collapsed to keep the page light
A node_modules/binary-extensions/index.js +1 -0 collapsed to keep the page light
A node_modules/binary-extensions/license +10 -0 collapsed to keep the page light
A node_modules/binary-extensions/package.json +40 -0 collapsed to keep the page light
A node_modules/binary-extensions/readme.md +25 -0 collapsed to keep the page light
A node_modules/brace-expansion/.github/FUNDING.yml +2 -0 collapsed to keep the page light
A node_modules/brace-expansion/LICENSE +21 -0 collapsed to keep the page light
A node_modules/brace-expansion/README.md +135 -0 collapsed to keep the page light
A node_modules/brace-expansion/index.js +203 -0 collapsed to keep the page light
A node_modules/brace-expansion/package.json +46 -0 collapsed to keep the page light
A node_modules/braces/LICENSE +21 -0 collapsed to keep the page light
A node_modules/braces/README.md +586 -0 collapsed to keep the page light
A node_modules/braces/index.js +170 -0 collapsed to keep the page light
A node_modules/braces/lib/compile.js +60 -0 collapsed to keep the page light
A node_modules/braces/lib/constants.js +57 -0 collapsed to keep the page light
A node_modules/braces/lib/expand.js +113 -0 collapsed to keep the page light
A node_modules/braces/lib/parse.js +331 -0 collapsed to keep the page light
A node_modules/braces/lib/stringify.js +32 -0 collapsed to keep the page light
A node_modules/braces/lib/utils.js +122 -0 collapsed to keep the page light
A node_modules/braces/package.json +77 -0 collapsed to keep the page light
A node_modules/camelcase-css/README.md +27 -0 collapsed to keep the page light
A node_modules/camelcase-css/index-es5.js +24 -0 collapsed to keep the page light
A node_modules/camelcase-css/index.js +30 -0 collapsed to keep the page light
A node_modules/camelcase-css/license +21 -0 collapsed to keep the page light
A node_modules/camelcase-css/package.json +34 -0 collapsed to keep the page light
A node_modules/caniuse-lite/LICENSE +395 -0 collapsed to keep the page light
A node_modules/caniuse-lite/README.md +6 -0 collapsed to keep the page light
A node_modules/caniuse-lite/package.json +34 -0 collapsed to keep the page light
A node_modules/chokidar/LICENSE +21 -0 collapsed to keep the page light
A node_modules/chokidar/README.md +308 -0 collapsed to keep the page light
A node_modules/chokidar/index.js +973 -0 collapsed to keep the page light
A node_modules/chokidar/lib/constants.js +66 -0 collapsed to keep the page light
A node_modules/chokidar/lib/fsevents-handler.js +526 -0 collapsed to keep the page light
A node_modules/chokidar/lib/nodefs-handler.js +654 -0 collapsed to keep the page light
A node_modules/chokidar/node_modules/glob-parent/CHANGELOG.md +110 -0 collapsed to keep the page light
A node_modules/chokidar/node_modules/glob-parent/LICENSE +15 -0 collapsed to keep the page light
A node_modules/chokidar/node_modules/glob-parent/README.md +137 -0 collapsed to keep the page light
A node_modules/chokidar/node_modules/glob-parent/index.js +42 -0 collapsed to keep the page light
A node_modules/chokidar/node_modules/glob-parent/package.json +48 -0 collapsed to keep the page light
A node_modules/chokidar/package.json +70 -0 collapsed to keep the page light
A node_modules/chokidar/types/index.d.ts +192 -0 collapsed to keep the page light
A node_modules/color-convert/CHANGELOG.md +54 -0 collapsed to keep the page light
A node_modules/color-convert/LICENSE +21 -0 collapsed to keep the page light
A node_modules/color-convert/README.md +68 -0 collapsed to keep the page light
A node_modules/color-convert/conversions.js +839 -0 collapsed to keep the page light
A node_modules/color-convert/index.js +81 -0 collapsed to keep the page light
A node_modules/color-convert/package.json +48 -0 collapsed to keep the page light
A node_modules/color-convert/route.js +97 -0 collapsed to keep the page light
A node_modules/color-name/LICENSE +8 -0 collapsed to keep the page light
A node_modules/color-name/README.md +11 -0 collapsed to keep the page light
A node_modules/color-name/index.js +152 -0 collapsed to keep the page light
A node_modules/color-name/package.json +28 -0 collapsed to keep the page light
A node_modules/commander/CHANGELOG.md +436 -0 collapsed to keep the page light
A node_modules/commander/LICENSE +22 -0 collapsed to keep the page light
A node_modules/commander/Readme.md +713 -0 collapsed to keep the page light
A node_modules/commander/index.js +1649 -0 collapsed to keep the page light
A node_modules/commander/package.json +41 -0 collapsed to keep the page light
A node_modules/commander/typings/index.d.ts +311 -0 collapsed to keep the page light
A node_modules/cross-spawn/CHANGELOG.md +130 -0 collapsed to keep the page light
A node_modules/cross-spawn/LICENSE +21 -0 collapsed to keep the page light
A node_modules/cross-spawn/README.md +96 -0 collapsed to keep the page light
A node_modules/cross-spawn/index.js +39 -0 collapsed to keep the page light
A node_modules/cross-spawn/lib/enoent.js +59 -0 collapsed to keep the page light
A node_modules/cross-spawn/lib/parse.js +91 -0 collapsed to keep the page light
A node_modules/cross-spawn/lib/util/escape.js +45 -0 collapsed to keep the page light
A node_modules/cross-spawn/lib/util/readShebang.js +23 -0 collapsed to keep the page light
A node_modules/cross-spawn/lib/util/resolveCommand.js +52 -0 collapsed to keep the page light
A node_modules/cross-spawn/package.json +73 -0 collapsed to keep the page light
A node_modules/cssesc/README.md +201 -0 collapsed to keep the page light
A node_modules/cssesc/bin/cssesc +116 -0 collapsed to keep the page light
A node_modules/cssesc/cssesc.js +110 -0 collapsed to keep the page light
A node_modules/cssesc/man/cssesc.1 +70 -0 collapsed to keep the page light
A node_modules/cssesc/package.json +51 -0 collapsed to keep the page light
A node_modules/daisyui/LICENSE +21 -0 collapsed to keep the page light
A node_modules/daisyui/README.md +37 -0 collapsed to keep the page light
A node_modules/daisyui/base/properties.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/properties/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/properties/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/reset.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootcolor.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootcolor/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootcolor/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrollgutter.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrollgutter/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrollgutter/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrolllock.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrolllock/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/rootscrolllock/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/scrollbar.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/scrollbar/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/scrollbar/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/svg.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/base/svg/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/base/svg/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/chunks.css +73 -0 collapsed to keep the page light
A node_modules/daisyui/colors/properties-extended.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/colors/properties.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/colors/responsive-extended.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/colors/responsive.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/colors/states-extended.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/colors/states.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/alert.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/alert/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/alert/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/avatar.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/avatar/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/avatar/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/badge.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/badge/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/badge/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/breadcrumbs.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/breadcrumbs/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/breadcrumbs/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/button.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/button/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/button/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/calendar.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/calendar/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/calendar/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/card.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/card/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/card/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/carousel.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/carousel/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/carousel/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/chat.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/chat/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/chat/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/checkbox.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/checkbox/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/checkbox/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/collapse.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/collapse/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/collapse/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/countdown.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/countdown/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/countdown/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/diff.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/diff/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/diff/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/divider.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/divider/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/divider/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/dock.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/dock/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/dock/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/drawer.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/drawer/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/drawer/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/dropdown.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/dropdown/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/dropdown/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/fieldset.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/fieldset/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/fieldset/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/fileinput.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/fileinput/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/fileinput/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/filter.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/filter/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/filter/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/footer.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/footer/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/footer/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/hero.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/hero/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/hero/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/indicator.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/indicator/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/indicator/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/input.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/input/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/input/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/kbd.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/kbd/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/kbd/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/label.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/label/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/label/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/link.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/link/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/link/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/list.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/list/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/list/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/loading.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/loading/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/loading/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/mask.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/mask/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/mask/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/menu.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/menu/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/menu/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/mockup.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/mockup/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/mockup/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/modal.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/modal/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/modal/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/navbar.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/navbar/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/navbar/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/progress.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/progress/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/progress/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/radialprogress.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/radialprogress/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/radialprogress/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/radio.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/radio/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/radio/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/range.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/range/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/range/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/rating.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/rating/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/rating/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/select.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/select/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/select/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/skeleton.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/skeleton/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/skeleton/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/stack.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/stack/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/stack/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/stat.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/stat/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/stat/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/status.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/status/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/status/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/steps.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/steps/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/steps/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/swap.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/swap/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/swap/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/tab.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/tab/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/tab/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/table.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/table/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/table/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/textarea.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/textarea/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/textarea/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/timeline.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/timeline/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/timeline/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/toast.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/toast/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/toast/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/toggle.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/toggle/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/toggle/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/tooltip.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/tooltip/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/tooltip/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/validator.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/components/validator/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/components/validator/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/daisyui.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/functions/addPrefix.js +156 -0 collapsed to keep the page light
A node_modules/daisyui/functions/plugin.js +11 -0 collapsed to keep the page light
A node_modules/daisyui/functions/pluginOptionsHandler.js +86 -0 collapsed to keep the page light
A node_modules/daisyui/functions/themeOrder.js +37 -0 collapsed to keep the page light
A node_modules/daisyui/functions/variables.js +29 -0 collapsed to keep the page light
A node_modules/daisyui/imports.js +68 -0 collapsed to keep the page light
A node_modules/daisyui/index.js +51 -0 collapsed to keep the page light
A node_modules/daisyui/package.json +72 -0 collapsed to keep the page light
A node_modules/daisyui/theme/abyss.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/abyss/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/abyss/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/acid.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/acid/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/acid/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/aqua.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/aqua/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/aqua/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/autumn.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/autumn/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/autumn/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/black.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/black/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/black/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/bumblebee.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/bumblebee/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/bumblebee/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/business.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/business/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/business/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/caramellatte.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/caramellatte/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/caramellatte/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cmyk.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cmyk/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cmyk/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/coffee.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/coffee/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/coffee/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/corporate.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/corporate/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/corporate/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cupcake.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cupcake/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cupcake/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cyberpunk.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cyberpunk/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/cyberpunk/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dark.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dark/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dark/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dim.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dim/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dim/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dracula.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dracula/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/dracula/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/emerald.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/emerald/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/emerald/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/fantasy.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/fantasy/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/fantasy/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/forest.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/forest/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/forest/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/garden.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/garden/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/garden/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/halloween.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/halloween/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/halloween/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/index.js +48 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lemonade.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lemonade/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lemonade/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/light.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/light/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/light/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lofi.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lofi/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/lofi/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/luxury.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/luxury/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/luxury/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/night.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/night/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/night/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/nord.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/nord/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/nord/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/object.d.ts +74 -0 collapsed to keep the page light
A node_modules/daisyui/theme/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/pastel.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/pastel/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/pastel/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/retro.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/retro/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/retro/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/silk.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/silk/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/silk/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/sunset.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/sunset/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/sunset/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/synthwave.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/synthwave/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/synthwave/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/valentine.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/valentine/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/valentine/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/winter.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/winter/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/winter/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/theme/wireframe.css +31 -0 collapsed to keep the page light
A node_modules/daisyui/theme/wireframe/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/theme/wireframe/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/themes.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/glass.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/glass/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/glass/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/join.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/join/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/join/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/radius.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/radius/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/radius/object.js +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/typography.css +1 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/typography/index.js +7 -0 collapsed to keep the page light
A node_modules/daisyui/utilities/typography/object.js +1 -0 collapsed to keep the page light
A node_modules/detect-libc/LICENSE +201 -0 collapsed to keep the page light
A node_modules/detect-libc/README.md +163 -0 collapsed to keep the page light
A node_modules/detect-libc/index.d.ts +14 -0 collapsed to keep the page light
A node_modules/detect-libc/lib/detect-libc.js +267 -0 collapsed to keep the page light
A node_modules/detect-libc/lib/filesystem.js +41 -0 collapsed to keep the page light
A node_modules/detect-libc/lib/process.js +24 -0 collapsed to keep the page light
A node_modules/detect-libc/package.json +40 -0 collapsed to keep the page light
A node_modules/didyoumean/LICENSE +14 -0 collapsed to keep the page light
A node_modules/didyoumean/README.md +134 -0 collapsed to keep the page light
A node_modules/didyoumean/didYouMean-1.2.1.js +274 -0 collapsed to keep the page light
A node_modules/didyoumean/didYouMean-1.2.1.min.js +17 -0 collapsed to keep the page light
A node_modules/didyoumean/package.json +27 -0 collapsed to keep the page light
A node_modules/dlv/README.md +76 -0 collapsed to keep the page light
A node_modules/dlv/index.js +7 -0 collapsed to keep the page light
A node_modules/dlv/package.json +30 -0 collapsed to keep the page light
A node_modules/dotenv/CHANGELOG.md +488 -0 collapsed to keep the page light
A node_modules/dotenv/LICENSE +23 -0 collapsed to keep the page light
A node_modules/dotenv/README-es.md +448 -0 collapsed to keep the page light
A node_modules/dotenv/README.md +651 -0 collapsed to keep the page light
A node_modules/dotenv/config.d.ts +1 -0 collapsed to keep the page light
A node_modules/dotenv/config.js +9 -0 collapsed to keep the page light
A node_modules/dotenv/lib/cli-options.js +11 -0 collapsed to keep the page light
A node_modules/dotenv/lib/env-options.js +24 -0 collapsed to keep the page light
A node_modules/dotenv/lib/main.d.ts +153 -0 collapsed to keep the page light
A node_modules/dotenv/lib/main.js +361 -0 collapsed to keep the page light
A node_modules/dotenv/package.json +61 -0 collapsed to keep the page light
A node_modules/eastasianwidth/README.md +32 -0 collapsed to keep the page light
A node_modules/eastasianwidth/eastasianwidth.js +311 -0 collapsed to keep the page light
A node_modules/eastasianwidth/package.json +18 -0 collapsed to keep the page light
A node_modules/emoji-regex/README.md +137 -0 collapsed to keep the page light
A node_modules/emoji-regex/RGI_Emoji.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/RGI_Emoji.js +6 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/RGI_Emoji.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/RGI_Emoji.js +6 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/index.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/index.js +6 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/text.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/es2015/text.js +6 -0 collapsed to keep the page light
A node_modules/emoji-regex/index.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/index.js +6 -0 collapsed to keep the page light
A node_modules/emoji-regex/package.json +52 -0 collapsed to keep the page light
A node_modules/emoji-regex/text.d.ts +5 -0 collapsed to keep the page light
A node_modules/emoji-regex/text.js +6 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/LICENSE +20 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/README.md +183 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/AliasFieldPlugin.js +108 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/AliasPlugin.js +183 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/AppendPlugin.js +49 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/CachedInputFileSystem.js +664 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/CloneBasenamePlugin.js +53 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ConditionalPlugin.js +59 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js +98 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/DescriptionFileUtils.js +201 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/DirectoryExistsPlugin.js +63 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ExportsFieldPlugin.js +200 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ExtensionAliasPlugin.js +101 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/FileExistsPlugin.js +58 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ImportsFieldPlugin.js +223 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/JoinRequestPartPlugin.js +75 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/JoinRequestPlugin.js +45 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/LogInfoPlugin.js +54 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/MainFieldPlugin.js +90 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ModulesInHierachicDirectoriesPlugin.js +9 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ModulesInHierarchicalDirectoriesPlugin.js +87 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ModulesInRootPlugin.js +49 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/NextPlugin.js +33 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ParsePlugin.js +76 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/PnpPlugin.js +133 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/Resolver.js +800 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ResolverFactory.js +728 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/RestrictionsPlugin.js +70 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/ResultPlugin.js +42 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/RootsPlugin.js +69 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/SelfReferencePlugin.js +82 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/SymlinkPlugin.js +100 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/SyncAsyncFileSystemDecorator.js +220 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/TryNextPlugin.js +41 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js +112 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/UseFilePlugin.js +55 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/createInnerContext.js +46 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/forEachBail.js +50 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/getInnerRequest.js +36 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/getPaths.js +45 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/index.js +203 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/util/entrypoints.js +573 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/util/identifier.js +69 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/util/module-browser.js +8 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/util/path.js +203 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/lib/util/process-browser.js +22 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/package.json +72 -0 collapsed to keep the page light
A node_modules/enhanced-resolve/types.d.ts +1135 -0 collapsed to keep the page light
A node_modules/fast-glob/LICENSE +21 -0 collapsed to keep the page light
A node_modules/fast-glob/README.md +830 -0 collapsed to keep the page light
A node_modules/fast-glob/node_modules/glob-parent/CHANGELOG.md +110 -0 collapsed to keep the page light
A node_modules/fast-glob/node_modules/glob-parent/LICENSE +15 -0 collapsed to keep the page light
A node_modules/fast-glob/node_modules/glob-parent/README.md +137 -0 collapsed to keep the page light
A node_modules/fast-glob/node_modules/glob-parent/index.js +42 -0 collapsed to keep the page light
A node_modules/fast-glob/node_modules/glob-parent/package.json +48 -0 collapsed to keep the page light
A node_modules/fast-glob/out/index.d.ts +40 -0 collapsed to keep the page light
A node_modules/fast-glob/out/index.js +102 -0 collapsed to keep the page light
A node_modules/fast-glob/out/managers/tasks.d.ts +22 -0 collapsed to keep the page light
A node_modules/fast-glob/out/managers/tasks.js +110 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/async.d.ts +9 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/async.js +23 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/deep.d.ts +16 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/deep.js +62 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/entry.d.ts +16 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/entry.js +63 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/error.d.ts +8 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/filters/error.js +15 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/matchers/matcher.d.ts +33 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/matchers/matcher.js +45 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/matchers/partial.d.ts +4 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/matchers/partial.js +38 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/provider.d.ts +19 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/provider.js +48 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/stream.d.ts +11 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/stream.js +31 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/sync.d.ts +9 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/sync.js +23 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/transformers/entry.d.ts +8 -0 collapsed to keep the page light
A node_modules/fast-glob/out/providers/transformers/entry.js +26 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/async.d.ts +10 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/async.js +35 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/reader.d.ts +15 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/reader.js +33 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/stream.d.ts +14 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/stream.js +55 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/sync.d.ts +12 -0 collapsed to keep the page light
A node_modules/fast-glob/out/readers/sync.js +43 -0 collapsed to keep the page light
A node_modules/fast-glob/out/settings.d.ts +164 -0 collapsed to keep the page light
A node_modules/fast-glob/out/settings.js +59 -0 collapsed to keep the page light
A node_modules/fast-glob/out/types/index.d.ts +31 -0 collapsed to keep the page light
A node_modules/fast-glob/out/types/index.js +2 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/array.d.ts +2 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/array.js +22 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/errno.d.ts +2 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/errno.js +7 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/fs.d.ts +4 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/fs.js +19 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/index.d.ts +8 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/index.js +17 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/path.d.ts +13 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/path.js +68 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/pattern.d.ts +47 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/pattern.js +188 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/stream.d.ts +4 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/stream.js +17 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/string.d.ts +2 -0 collapsed to keep the page light
A node_modules/fast-glob/out/utils/string.js +11 -0 collapsed to keep the page light
A node_modules/fast-glob/package.json +81 -0 collapsed to keep the page light
A node_modules/fastq/.github/dependabot.yml +11 -0 collapsed to keep the page light
A node_modules/fastq/.github/workflows/ci.yml +75 -0 collapsed to keep the page light
A node_modules/fastq/LICENSE +13 -0 collapsed to keep the page light
A node_modules/fastq/README.md +306 -0 collapsed to keep the page light
A node_modules/fastq/bench.js +66 -0 collapsed to keep the page light
A node_modules/fastq/example.js +14 -0 collapsed to keep the page light
A node_modules/fastq/example.mjs +11 -0 collapsed to keep the page light
A node_modules/fastq/index.d.ts +38 -0 collapsed to keep the page light
A node_modules/fastq/package.json +53 -0 collapsed to keep the page light
A node_modules/fastq/queue.js +311 -0 collapsed to keep the page light
A node_modules/fastq/test/example.ts +83 -0 collapsed to keep the page light
A node_modules/fastq/test/promise.js +248 -0 collapsed to keep the page light
A node_modules/fastq/test/test.js +642 -0 collapsed to keep the page light
A node_modules/fastq/test/tsconfig.json +11 -0 collapsed to keep the page light
A node_modules/fill-range/LICENSE +21 -0 collapsed to keep the page light
A node_modules/fill-range/README.md +237 -0 collapsed to keep the page light
A node_modules/fill-range/index.js +248 -0 collapsed to keep the page light
A node_modules/fill-range/package.json +74 -0 collapsed to keep the page light
A node_modules/foreground-child/LICENSE +15 -0 collapsed to keep the page light
A node_modules/foreground-child/README.md +128 -0 collapsed to keep the page light
A node_modules/foreground-child/package.json +111 -0 collapsed to keep the page light
A node_modules/function-bind/.eslintrc +21 -0 collapsed to keep the page light
A node_modules/function-bind/.github/FUNDING.yml +12 -0 collapsed to keep the page light
A node_modules/function-bind/.github/SECURITY.md +3 -0 collapsed to keep the page light
A node_modules/function-bind/.nycrc +13 -0 collapsed to keep the page light
A node_modules/function-bind/CHANGELOG.md +136 -0 collapsed to keep the page light
A node_modules/function-bind/LICENSE +20 -0 collapsed to keep the page light
A node_modules/function-bind/README.md +46 -0 collapsed to keep the page light
A node_modules/function-bind/implementation.js +84 -0 collapsed to keep the page light
A node_modules/function-bind/index.js +5 -0 collapsed to keep the page light
A node_modules/function-bind/package.json +87 -0 collapsed to keep the page light
A node_modules/function-bind/test/.eslintrc +9 -0 collapsed to keep the page light
A node_modules/function-bind/test/index.js +252 -0 collapsed to keep the page light
A node_modules/glob-parent/LICENSE +15 -0 collapsed to keep the page light
A node_modules/glob-parent/README.md +134 -0 collapsed to keep the page light
A node_modules/glob-parent/index.js +75 -0 collapsed to keep the page light
A node_modules/glob-parent/package.json +54 -0 collapsed to keep the page light
A node_modules/glob/LICENSE +15 -0 collapsed to keep the page light
A node_modules/glob/README.md +1265 -0 collapsed to keep the page light
A node_modules/glob/package.json +99 -0 collapsed to keep the page light
A node_modules/graceful-fs/LICENSE +15 -0 collapsed to keep the page light
A node_modules/graceful-fs/README.md +143 -0 collapsed to keep the page light
A node_modules/graceful-fs/clone.js +23 -0 collapsed to keep the page light
A node_modules/graceful-fs/graceful-fs.js +448 -0 collapsed to keep the page light
A node_modules/graceful-fs/legacy-streams.js +118 -0 collapsed to keep the page light
A node_modules/graceful-fs/package.json +53 -0 collapsed to keep the page light
A node_modules/graceful-fs/polyfills.js +355 -0 collapsed to keep the page light
A node_modules/hasown/.eslintrc +5 -0 collapsed to keep the page light
A node_modules/hasown/.github/FUNDING.yml +12 -0 collapsed to keep the page light
A node_modules/hasown/.nycrc +13 -0 collapsed to keep the page light
A node_modules/hasown/CHANGELOG.md +40 -0 collapsed to keep the page light
A node_modules/hasown/LICENSE +21 -0 collapsed to keep the page light
A node_modules/hasown/README.md +40 -0 collapsed to keep the page light
A node_modules/hasown/index.d.ts +3 -0 collapsed to keep the page light
A node_modules/hasown/index.js +8 -0 collapsed to keep the page light
A node_modules/hasown/package.json +92 -0 collapsed to keep the page light
A node_modules/hasown/tsconfig.json +6 -0 collapsed to keep the page light
A node_modules/is-binary-path/index.d.ts +17 -0 collapsed to keep the page light
A node_modules/is-binary-path/index.js +7 -0 collapsed to keep the page light
A node_modules/is-binary-path/license +9 -0 collapsed to keep the page light
A node_modules/is-binary-path/package.json +40 -0 collapsed to keep the page light
A node_modules/is-binary-path/readme.md +34 -0 collapsed to keep the page light
A node_modules/is-core-module/.eslintrc +18 -0 collapsed to keep the page light
A node_modules/is-core-module/.nycrc +9 -0 collapsed to keep the page light
A node_modules/is-core-module/CHANGELOG.md +205 -0 collapsed to keep the page light
A node_modules/is-core-module/LICENSE +20 -0 collapsed to keep the page light
A node_modules/is-core-module/README.md +40 -0 collapsed to keep the page light
A node_modules/is-core-module/core.json +161 -0 collapsed to keep the page light
A node_modules/is-core-module/index.js +69 -0 collapsed to keep the page light
A node_modules/is-core-module/package.json +76 -0 collapsed to keep the page light
A node_modules/is-core-module/test/index.js +154 -0 collapsed to keep the page light
A node_modules/is-extglob/LICENSE +21 -0 collapsed to keep the page light
A node_modules/is-extglob/README.md +107 -0 collapsed to keep the page light
A node_modules/is-extglob/index.js +20 -0 collapsed to keep the page light
A node_modules/is-extglob/package.json +69 -0 collapsed to keep the page light
A node_modules/is-fullwidth-code-point/index.d.ts +17 -0 collapsed to keep the page light
A node_modules/is-fullwidth-code-point/index.js +50 -0 collapsed to keep the page light
A node_modules/is-fullwidth-code-point/license +9 -0 collapsed to keep the page light
A node_modules/is-fullwidth-code-point/package.json +42 -0 collapsed to keep the page light
A node_modules/is-fullwidth-code-point/readme.md +39 -0 collapsed to keep the page light
A node_modules/is-glob/LICENSE +21 -0 collapsed to keep the page light
A node_modules/is-glob/README.md +206 -0 collapsed to keep the page light
A node_modules/is-glob/index.js +150 -0 collapsed to keep the page light
A node_modules/is-glob/package.json +81 -0 collapsed to keep the page light
A node_modules/is-number/LICENSE +21 -0 collapsed to keep the page light
A node_modules/is-number/README.md +187 -0 collapsed to keep the page light
A node_modules/is-number/index.js +18 -0 collapsed to keep the page light
A node_modules/is-number/package.json +82 -0 collapsed to keep the page light
A node_modules/isexe/.npmignore +2 -0 collapsed to keep the page light
A node_modules/isexe/LICENSE +15 -0 collapsed to keep the page light
A node_modules/isexe/README.md +51 -0 collapsed to keep the page light
A node_modules/isexe/index.js +57 -0 collapsed to keep the page light
A node_modules/isexe/mode.js +41 -0 collapsed to keep the page light
A node_modules/isexe/package.json +31 -0 collapsed to keep the page light
A node_modules/isexe/test/basic.js +221 -0 collapsed to keep the page light
A node_modules/isexe/windows.js +42 -0 collapsed to keep the page light
A node_modules/jackspeak/LICENSE.md +55 -0 collapsed to keep the page light
A node_modules/jackspeak/README.md +357 -0 collapsed to keep the page light
A node_modules/jackspeak/package.json +95 -0 collapsed to keep the page light
A node_modules/jiti/LICENSE +21 -0 collapsed to keep the page light
A node_modules/jiti/README.md +235 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti-cli.mjs +34 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti-hooks.mjs +117 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti-native.mjs +121 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti-register.d.mts +1 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti-register.mjs +4 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti.cjs +23 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti.d.cts +8 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti.d.mts +8 -0 collapsed to keep the page light
A node_modules/jiti/lib/jiti.mjs +22 -0 collapsed to keep the page light
A node_modules/jiti/lib/types.d.ts +260 -0 collapsed to keep the page light
A node_modules/jiti/package.json +134 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-gnu/LICENSE +373 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-gnu/README.md +1 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-gnu/lightningcss.linux-x64-gnu.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/lightningcss-linux-x64-gnu/package.json +37 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-musl/LICENSE +373 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-musl/README.md +1 -0 collapsed to keep the page light
A node_modules/lightningcss-linux-x64-musl/lightningcss.linux-x64-musl.node +0 -0 binary file: no text diff
binary file: no text diff
A node_modules/lightningcss-linux-x64-musl/package.json +37 -0 collapsed to keep the page light
A node_modules/lightningcss/LICENSE +373 -0 collapsed to keep the page light
A node_modules/lightningcss/README.md +105 -0 collapsed to keep the page light
A node_modules/lightningcss/node/ast.d.ts +9716 -0 collapsed to keep the page light
A node_modules/lightningcss/node/ast.js.flow +10346 -0 collapsed to keep the page light
A node_modules/lightningcss/node/browserslistToTargets.js +48 -0 collapsed to keep the page light
A node_modules/lightningcss/node/composeVisitors.js +442 -0 collapsed to keep the page light
A node_modules/lightningcss/node/flags.js +28 -0 collapsed to keep the page light
A node_modules/lightningcss/node/index.d.ts +477 -0 collapsed to keep the page light
A node_modules/lightningcss/node/index.js +28 -0 collapsed to keep the page light
A node_modules/lightningcss/node/index.js.flow +824 -0 collapsed to keep the page light
A node_modules/lightningcss/node/index.mjs +4 -0 collapsed to keep the page light
A node_modules/lightningcss/node/targets.d.ts +40 -0 collapsed to keep the page light
A node_modules/lightningcss/node/targets.js.flow +39 -0 collapsed to keep the page light
A node_modules/lightningcss/package.json +109 -0 collapsed to keep the page light
A node_modules/lilconfig/LICENSE +21 -0 collapsed to keep the page light
A node_modules/lilconfig/package.json +42 -0 collapsed to keep the page light
A node_modules/lilconfig/readme.md +98 -0 collapsed to keep the page light
A node_modules/lilconfig/src/index.d.ts +54 -0 collapsed to keep the page light
A node_modules/lilconfig/src/index.js +460 -0 collapsed to keep the page light
A node_modules/lines-and-columns/LICENSE +21 -0 collapsed to keep the page light
A node_modules/lines-and-columns/README.md +33 -0 collapsed to keep the page light
A node_modules/lines-and-columns/build/index.d.ts +13 -0 collapsed to keep the page light
A node_modules/lines-and-columns/build/index.js +62 -0 collapsed to keep the page light
A node_modules/lines-and-columns/package.json +49 -0 collapsed to keep the page light
A node_modules/lru-cache/LICENSE +15 -0 collapsed to keep the page light
A node_modules/lru-cache/README.md +331 -0 collapsed to keep the page light
A node_modules/lru-cache/package.json +116 -0 collapsed to keep the page light
A node_modules/merge2/LICENSE +21 -0 collapsed to keep the page light
A node_modules/merge2/README.md +144 -0 collapsed to keep the page light
A node_modules/merge2/index.js +144 -0 collapsed to keep the page light
A node_modules/merge2/package.json +43 -0 collapsed to keep the page light
A node_modules/micromatch/LICENSE +21 -0 collapsed to keep the page light
A node_modules/micromatch/README.md +1024 -0 collapsed to keep the page light
A node_modules/micromatch/index.js +474 -0 collapsed to keep the page light
A node_modules/micromatch/package.json +119 -0 collapsed to keep the page light
A node_modules/minimatch/LICENSE +15 -0 collapsed to keep the page light
A node_modules/minimatch/README.md +454 -0 collapsed to keep the page light
A node_modules/minimatch/package.json +82 -0 collapsed to keep the page light
A node_modules/minipass/LICENSE +15 -0 collapsed to keep the page light
A node_modules/minipass/README.md +825 -0 collapsed to keep the page light
A node_modules/minipass/package.json +82 -0 collapsed to keep the page light
A node_modules/mri/index.d.ts +21 -0 collapsed to keep the page light
A node_modules/mri/lib/index.js +119 -0 collapsed to keep the page light
A node_modules/mri/lib/index.mjs +119 -0 collapsed to keep the page light
A node_modules/mri/license.md +21 -0 collapsed to keep the page light
A node_modules/mri/package.json +43 -0 collapsed to keep the page light
A node_modules/mri/readme.md +166 -0 collapsed to keep the page light
A node_modules/mz/HISTORY.md +66 -0 collapsed to keep the page light
A node_modules/mz/LICENSE +22 -0 collapsed to keep the page light
A node_modules/mz/README.md +106 -0 collapsed to keep the page light
A node_modules/mz/child_process.js +8 -0 collapsed to keep the page light
A node_modules/mz/crypto.js +9 -0 collapsed to keep the page light
A node_modules/mz/dns.js +16 -0 collapsed to keep the page light
A node_modules/mz/fs.js +62 -0 collapsed to keep the page light
A node_modules/mz/index.js +8 -0 collapsed to keep the page light
A node_modules/mz/package.json +44 -0 collapsed to keep the page light
A node_modules/mz/readline.js +64 -0 collapsed to keep the page light
A node_modules/mz/zlib.js +13 -0 collapsed to keep the page light
A node_modules/nanoid/LICENSE +20 -0 collapsed to keep the page light
A node_modules/nanoid/README.md +554 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.browser.cjs +69 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.browser.js +69 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.cjs +71 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.d.ts +56 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.js +71 -0 collapsed to keep the page light
A node_modules/nanoid/async/index.native.js +57 -0 collapsed to keep the page light
A node_modules/nanoid/async/package.json +12 -0 collapsed to keep the page light
A node_modules/nanoid/bin/nanoid.cjs +55 -0 collapsed to keep the page light
A node_modules/nanoid/index.browser.cjs +72 -0 collapsed to keep the page light
A node_modules/nanoid/index.browser.js +72 -0 collapsed to keep the page light
A node_modules/nanoid/index.cjs +85 -0 collapsed to keep the page light
A node_modules/nanoid/index.d.cts +91 -0 collapsed to keep the page light
A node_modules/nanoid/index.d.ts +91 -0 collapsed to keep the page light
A node_modules/nanoid/index.js +85 -0 collapsed to keep the page light
A node_modules/nanoid/nanoid.js +1 -0 collapsed to keep the page light
A node_modules/nanoid/non-secure/index.cjs +34 -0 collapsed to keep the page light
A node_modules/nanoid/non-secure/index.d.ts +33 -0 collapsed to keep the page light
A node_modules/nanoid/non-secure/index.js +34 -0 collapsed to keep the page light
A node_modules/nanoid/non-secure/package.json +6 -0 collapsed to keep the page light
A node_modules/nanoid/package.json +88 -0 collapsed to keep the page light
A node_modules/nanoid/url-alphabet/index.cjs +7 -0 collapsed to keep the page light
A node_modules/nanoid/url-alphabet/index.js +7 -0 collapsed to keep the page light
A node_modules/nanoid/url-alphabet/package.json +6 -0 collapsed to keep the page light
A node_modules/node-addon-api/LICENSE.md +9 -0 collapsed to keep the page light
A node_modules/node-addon-api/README.md +319 -0 collapsed to keep the page light
A node_modules/node-addon-api/common.gypi +20 -0 collapsed to keep the page light
A node_modules/node-addon-api/except.gypi +25 -0 collapsed to keep the page light
A node_modules/node-addon-api/index.js +12 -0 collapsed to keep the page light
A node_modules/node-addon-api/napi-inl.deprecated.h +186 -0 collapsed to keep the page light
A node_modules/node-addon-api/napi-inl.h +6607 -0 collapsed to keep the page light
A node_modules/node-addon-api/napi.h +3201 -0 collapsed to keep the page light
A node_modules/node-addon-api/node_addon_api.gyp +32 -0 collapsed to keep the page light
A node_modules/node-addon-api/node_api.gyp +9 -0 collapsed to keep the page light
A node_modules/node-addon-api/noexcept.gypi +26 -0 collapsed to keep the page light
A node_modules/node-addon-api/nothing.c +0 -0
no textual change.
A node_modules/node-addon-api/package-support.json +21 -0 collapsed to keep the page light
A node_modules/node-addon-api/package.json +480 -0 collapsed to keep the page light
A node_modules/node-addon-api/tools/README.md +73 -0 collapsed to keep the page light
A node_modules/node-addon-api/tools/check-napi.js +99 -0 collapsed to keep the page light
A node_modules/node-addon-api/tools/clang-format.js +71 -0 collapsed to keep the page light
A node_modules/node-addon-api/tools/conversion.js +301 -0 collapsed to keep the page light
A node_modules/node-addon-api/tools/eslint-format.js +79 -0 collapsed to keep the page light
A node_modules/normalize-path/LICENSE +21 -0 collapsed to keep the page light
A node_modules/normalize-path/README.md +127 -0 collapsed to keep the page light
A node_modules/normalize-path/index.js +35 -0 collapsed to keep the page light
A node_modules/normalize-path/package.json +77 -0 collapsed to keep the page light
A node_modules/object-assign/index.js +90 -0 collapsed to keep the page light
A node_modules/object-assign/license +21 -0 collapsed to keep the page light
A node_modules/object-assign/package.json +42 -0 collapsed to keep the page light
A node_modules/object-assign/readme.md +61 -0 collapsed to keep the page light
A node_modules/object-hash/LICENSE +22 -0 collapsed to keep the page light
A node_modules/object-hash/index.js +453 -0 collapsed to keep the page light
A node_modules/object-hash/package.json +53 -0 collapsed to keep the page light
A node_modules/object-hash/readme.markdown +198 -0 collapsed to keep the page light
A node_modules/package-json-from-dist/LICENSE.md +63 -0 collapsed to keep the page light
A node_modules/package-json-from-dist/README.md +110 -0 collapsed to keep the page light
A node_modules/package-json-from-dist/package.json +68 -0 collapsed to keep the page light
A node_modules/path-key/index.d.ts +40 -0 collapsed to keep the page light
A node_modules/path-key/index.js +16 -0 collapsed to keep the page light
A node_modules/path-key/license +9 -0 collapsed to keep the page light
A node_modules/path-key/package.json +39 -0 collapsed to keep the page light
A node_modules/path-key/readme.md +61 -0 collapsed to keep the page light
A node_modules/path-parse/LICENSE +21 -0 collapsed to keep the page light
A node_modules/path-parse/README.md +42 -0 collapsed to keep the page light
A node_modules/path-parse/index.js +75 -0 collapsed to keep the page light
A node_modules/path-parse/package.json +33 -0 collapsed to keep the page light
A node_modules/path-scurry/LICENSE.md +55 -0 collapsed to keep the page light
A node_modules/path-scurry/README.md +636 -0 collapsed to keep the page light
A node_modules/path-scurry/package.json +89 -0 collapsed to keep the page light
A node_modules/picocolors/LICENSE +15 -0 collapsed to keep the page light
A node_modules/picocolors/README.md +21 -0 collapsed to keep the page light
A node_modules/picocolors/package.json +25 -0 collapsed to keep the page light
A node_modules/picocolors/picocolors.browser.js +4 -0 collapsed to keep the page light
A node_modules/picocolors/picocolors.d.ts +5 -0 collapsed to keep the page light
A node_modules/picocolors/picocolors.js +75 -0 collapsed to keep the page light
A node_modules/picocolors/types.d.ts +51 -0 collapsed to keep the page light
A node_modules/picomatch/CHANGELOG.md +136 -0 collapsed to keep the page light
A node_modules/picomatch/LICENSE +21 -0 collapsed to keep the page light
A node_modules/picomatch/README.md +708 -0 collapsed to keep the page light
A node_modules/picomatch/index.js +3 -0 collapsed to keep the page light
A node_modules/picomatch/lib/constants.js +179 -0 collapsed to keep the page light
A node_modules/picomatch/lib/parse.js +1091 -0 collapsed to keep the page light
A node_modules/picomatch/lib/picomatch.js +342 -0 collapsed to keep the page light
A node_modules/picomatch/lib/scan.js +391 -0 collapsed to keep the page light
A node_modules/picomatch/lib/utils.js +64 -0 collapsed to keep the page light
A node_modules/picomatch/package.json +81 -0 collapsed to keep the page light
A node_modules/pify/index.js +68 -0 collapsed to keep the page light
A node_modules/pify/license +21 -0 collapsed to keep the page light
A node_modules/pify/package.json +48 -0 collapsed to keep the page light
A node_modules/pify/readme.md +119 -0 collapsed to keep the page light
A node_modules/pirates/LICENSE +21 -0 collapsed to keep the page light
A node_modules/pirates/README.md +69 -0 collapsed to keep the page light
A node_modules/pirates/index.d.ts +82 -0 collapsed to keep the page light
A node_modules/pirates/lib/index.js +139 -0 collapsed to keep the page light
A node_modules/pirates/package.json +74 -0 collapsed to keep the page light
A node_modules/postcss-import/LICENSE +20 -0 collapsed to keep the page light
A node_modules/postcss-import/README.md +244 -0 collapsed to keep the page light
A node_modules/postcss-import/index.js +420 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/assign-layer-names.js +17 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/data-url.js +17 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/join-layer.js +9 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/join-media.js +28 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/load-content.js +12 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/parse-statements.js +172 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/process-content.js +59 -0 collapsed to keep the page light
A node_modules/postcss-import/lib/resolve-id.js +42 -0 collapsed to keep the page light
A node_modules/postcss-import/package.json +65 -0 collapsed to keep the page light
A node_modules/postcss-js/LICENSE +20 -0 collapsed to keep the page light
A node_modules/postcss-js/README.md +22 -0 collapsed to keep the page light
A node_modules/postcss-js/async.js +15 -0 collapsed to keep the page light
A node_modules/postcss-js/index.js +11 -0 collapsed to keep the page light
A node_modules/postcss-js/index.mjs +8 -0 collapsed to keep the page light
A node_modules/postcss-js/objectifier.js +85 -0 collapsed to keep the page light
A node_modules/postcss-js/package.json +42 -0 collapsed to keep the page light
A node_modules/postcss-js/parser.js +104 -0 collapsed to keep the page light
A node_modules/postcss-js/process-result.js +11 -0 collapsed to keep the page light
A node_modules/postcss-js/sync.js +12 -0 collapsed to keep the page light
A node_modules/postcss-load-config/LICENSE +20 -0 collapsed to keep the page light
A node_modules/postcss-load-config/README.md +466 -0 collapsed to keep the page light
A node_modules/postcss-load-config/node_modules/lilconfig/LICENSE +21 -0 collapsed to keep the page light
A node_modules/postcss-load-config/node_modules/lilconfig/package.json +42 -0 collapsed to keep the page light
A node_modules/postcss-load-config/node_modules/lilconfig/readme.md +98 -0 collapsed to keep the page light
A node_modules/postcss-load-config/node_modules/lilconfig/src/index.d.ts +54 -0 collapsed to keep the page light
A node_modules/postcss-load-config/node_modules/lilconfig/src/index.js +457 -0 collapsed to keep the page light
A node_modules/postcss-load-config/package.json +54 -0 collapsed to keep the page light
A node_modules/postcss-load-config/src/index.d.ts +65 -0 collapsed to keep the page light
A node_modules/postcss-load-config/src/index.js +185 -0 collapsed to keep the page light
A node_modules/postcss-load-config/src/options.js +47 -0 collapsed to keep the page light
A node_modules/postcss-load-config/src/plugins.js +85 -0 collapsed to keep the page light
A node_modules/postcss-load-config/src/req.js +10 -0 collapsed to keep the page light
A node_modules/postcss-nested/LICENSE +20 -0 collapsed to keep the page light
A node_modules/postcss-nested/README.md +85 -0 collapsed to keep the page light
A node_modules/postcss-nested/index.d.ts +41 -0 collapsed to keep the page light
A node_modules/postcss-nested/index.js +361 -0 collapsed to keep the page light
A node_modules/postcss-nested/package.json +34 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/API.md +872 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/CHANGELOG.md +549 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/LICENSE-MIT +22 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/README.md +49 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/package.json +80 -0 collapsed to keep the page light
A node_modules/postcss-selector-parser/postcss-selector-parser.d.ts +555 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/LICENSE +22 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/README.md +263 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/index.d.ts +177 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/index.js +28 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/parse.js +321 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/stringify.js +48 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/unit.js +120 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/lib/walk.js +22 -0 collapsed to keep the page light
A node_modules/postcss-value-parser/package.json +58 -0 collapsed to keep the page light
A node_modules/postcss/LICENSE +20 -0 collapsed to keep the page light
A node_modules/postcss/README.md +28 -0 collapsed to keep the page light
A node_modules/postcss/lib/at-rule.d.ts +140 -0 collapsed to keep the page light
A node_modules/postcss/lib/at-rule.js +25 -0 collapsed to keep the page light
A node_modules/postcss/lib/comment.d.ts +68 -0 collapsed to keep the page light
A node_modules/postcss/lib/comment.js +13 -0 collapsed to keep the page light
A node_modules/postcss/lib/container.d.ts +480 -0 collapsed to keep the page light
A node_modules/postcss/lib/container.js +447 -0 collapsed to keep the page light
A node_modules/postcss/lib/css-syntax-error.d.ts +248 -0 collapsed to keep the page light
A node_modules/postcss/lib/css-syntax-error.js +133 -0 collapsed to keep the page light
A node_modules/postcss/lib/declaration.d.ts +151 -0 collapsed to keep the page light
A node_modules/postcss/lib/declaration.js +24 -0 collapsed to keep the page light
A node_modules/postcss/lib/document.d.ts +69 -0 collapsed to keep the page light
A node_modules/postcss/lib/document.js +33 -0 collapsed to keep the page light
A node_modules/postcss/lib/fromJSON.d.ts +9 -0 collapsed to keep the page light
A node_modules/postcss/lib/fromJSON.js +54 -0 collapsed to keep the page light
A node_modules/postcss/lib/input.d.ts +206 -0 collapsed to keep the page light
A node_modules/postcss/lib/input.js +251 -0 collapsed to keep the page light
A node_modules/postcss/lib/lazy-result.d.ts +190 -0 collapsed to keep the page light
A node_modules/postcss/lib/lazy-result.js +550 -0 collapsed to keep the page light
A node_modules/postcss/lib/list.d.ts +60 -0 collapsed to keep the page light
A node_modules/postcss/lib/list.js +58 -0 collapsed to keep the page light
A node_modules/postcss/lib/map-generator.js +368 -0 collapsed to keep the page light
A node_modules/postcss/lib/no-work-result.d.ts +46 -0 collapsed to keep the page light
A node_modules/postcss/lib/no-work-result.js +138 -0 collapsed to keep the page light
A node_modules/postcss/lib/node.d.ts +541 -0 collapsed to keep the page light
A node_modules/postcss/lib/node.js +434 -0 collapsed to keep the page light
A node_modules/postcss/lib/parse.d.ts +9 -0 collapsed to keep the page light
A node_modules/postcss/lib/parse.js +42 -0 collapsed to keep the page light
A node_modules/postcss/lib/parser.js +611 -0 collapsed to keep the page light
A node_modules/postcss/lib/postcss.d.mts +69 -0 collapsed to keep the page light
A node_modules/postcss/lib/postcss.d.ts +458 -0 collapsed to keep the page light
A node_modules/postcss/lib/postcss.js +101 -0 collapsed to keep the page light
A node_modules/postcss/lib/postcss.mjs +30 -0 collapsed to keep the page light
A node_modules/postcss/lib/previous-map.d.ts +81 -0 collapsed to keep the page light
A node_modules/postcss/lib/previous-map.js +144 -0 collapsed to keep the page light
A node_modules/postcss/lib/processor.d.ts +115 -0 collapsed to keep the page light
A node_modules/postcss/lib/processor.js +67 -0 collapsed to keep the page light
A node_modules/postcss/lib/result.d.ts +205 -0 collapsed to keep the page light
A node_modules/postcss/lib/result.js +42 -0 collapsed to keep the page light
A node_modules/postcss/lib/root.d.ts +87 -0 collapsed to keep the page light
A node_modules/postcss/lib/root.js +61 -0 collapsed to keep the page light
A node_modules/postcss/lib/rule.d.ts +126 -0 collapsed to keep the page light
A node_modules/postcss/lib/rule.js +27 -0 collapsed to keep the page light
A node_modules/postcss/lib/stringifier.d.ts +46 -0 collapsed to keep the page light
A node_modules/postcss/lib/stringifier.js +353 -0 collapsed to keep the page light
A node_modules/postcss/lib/stringify.d.ts +9 -0 collapsed to keep the page light
A node_modules/postcss/lib/stringify.js +11 -0 collapsed to keep the page light
A node_modules/postcss/lib/symbols.js +5 -0 collapsed to keep the page light
A node_modules/postcss/lib/terminal-highlight.js +70 -0 collapsed to keep the page light
A node_modules/postcss/lib/tokenize.js +266 -0 collapsed to keep the page light
A node_modules/postcss/lib/warn-once.js +13 -0 collapsed to keep the page light
A node_modules/postcss/lib/warning.d.ts +147 -0 collapsed to keep the page light
A node_modules/postcss/lib/warning.js +37 -0 collapsed to keep the page light
A node_modules/postcss/package.json +88 -0 collapsed to keep the page light
A node_modules/prettier-plugin-tailwindcss/LICENSE +21 -0 collapsed to keep the page light
A node_modules/prettier-plugin-tailwindcss/README.md +174 -0 collapsed to keep the page light
A node_modules/prettier-plugin-tailwindcss/package.json +144 -0 collapsed to keep the page light
A node_modules/prettier/LICENSE +7 -0 collapsed to keep the page light
A node_modules/prettier/README.md +108 -0 collapsed to keep the page light
A node_modules/prettier/THIRD-PARTY-NOTICES.md +4416 -0 collapsed to keep the page light
A node_modules/prettier/bin/prettier.cjs +68 -0 collapsed to keep the page light
A node_modules/prettier/doc.d.ts +254 -0 collapsed to keep the page light
A node_modules/prettier/doc.js +1261 -0 collapsed to keep the page light
A node_modules/prettier/doc.mjs +1233 -0 collapsed to keep the page light
A node_modules/prettier/index.cjs +682 -0 collapsed to keep the page light
A node_modules/prettier/index.d.ts +956 -0 collapsed to keep the page light
A node_modules/prettier/index.mjs +22242 -0 collapsed to keep the page light
A node_modules/prettier/internal/cli.mjs +4873 -0
| @@ -0,0 +1,4873 @@ | |||
| 1 | + | import { createRequire as __prettierCreateRequire } from "module"; | |
| 2 | + | import { fileURLToPath as __prettierFileUrlToPath } from "url"; | |
| 3 | + | import { dirname as __prettierDirname } from "path"; | |
| 4 | + | const require = __prettierCreateRequire(import.meta.url); | |
| 5 | + | const __filename = __prettierFileUrlToPath(import.meta.url); | |
| 6 | + | const __dirname = __prettierDirname(__filename); | |
| 7 | + | ||
| 8 | + | var __create = Object.create; | |
| 9 | + | var __defProp = Object.defineProperty; | |
| 10 | + | var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | |
| 11 | + | var __getOwnPropNames = Object.getOwnPropertyNames; | |
| 12 | + | var __getProtoOf = Object.getPrototypeOf; | |
| 13 | + | var __hasOwnProp = Object.prototype.hasOwnProperty; | |
| 14 | + | var __typeError = (msg) => { | |
| 15 | + | throw TypeError(msg); | |
| 16 | + | }; | |
| 17 | + | var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { | |
| 18 | + | get: (a, b) => (typeof require !== "undefined" ? require : a)[b] | |
| 19 | + | }) : x)(function(x) { | |
| 20 | + | if (typeof require !== "undefined") return require.apply(this, arguments); | |
| 21 | + | throw Error('Dynamic require of "' + x + '" is not supported'); | |
| 22 | + | }); | |
| 23 | + | var __commonJS = (cb, mod) => function __require2() { | |
| 24 | + | return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; | |
| 25 | + | }; | |
| 26 | + | var __copyProps = (to, from, except, desc) => { | |
| 27 | + | if (from && typeof from === "object" || typeof from === "function") { | |
| 28 | + | for (let key of __getOwnPropNames(from)) | |
| 29 | + | if (!__hasOwnProp.call(to, key) && key !== except) | |
| 30 | + | __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | |
| 31 | + | } | |
| 32 | + | return to; | |
| 33 | + | }; | |
| 34 | + | var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | |
| 35 | + | // If the importer is in node compatibility mode or this is not an ESM | |
| 36 | + | // file that has been converted to a CommonJS file using a Babel- | |
| 37 | + | // compatible transform (i.e. "__esModule" has not been set), then set | |
| 38 | + | // "default" to the CommonJS "module.exports" for node compatibility. | |
| 39 | + | isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | |
| 40 | + | mod | |
| 41 | + | )); | |
| 42 | + | var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg); | |
| 43 | + | var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read from private field"), getter ? getter.call(obj) : member.get(obj)); | |
| 44 | + | var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value); | |
| 45 | + | var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value); | |
| 46 | + | ||
| 47 | + | // node_modules/dashify/index.js | |
| 48 | + | var require_dashify = __commonJS({ | |
| 49 | + | "node_modules/dashify/index.js"(exports, module) { | |
| 50 | + | "use strict"; | |
| 51 | + | module.exports = (str, options) => { | |
| 52 | + | if (typeof str !== "string") throw new TypeError("expected a string"); | |
| 53 | + | return str.trim().replace(/([a-z])([A-Z])/g, "$1-$2").replace(/\W/g, (m) => /[À-ž]/.test(m) ? m : "-").replace(/^-+|-+$/g, "").replace(/-{2,}/g, (m) => options && options.condense ? "-" : m).toLowerCase(); | |
| 54 | + | }; | |
| 55 | + | } | |
| 56 | + | }); | |
| 57 | + | ||
| 58 | + | // node_modules/minimist/index.js | |
| 59 | + | var require_minimist = __commonJS({ | |
| 60 | + | "node_modules/minimist/index.js"(exports, module) { | |
| 61 | + | "use strict"; | |
| 62 | + | function hasKey(obj, keys2) { | |
| 63 | + | var o = obj; | |
| 64 | + | keys2.slice(0, -1).forEach(function(key2) { | |
| 65 | + | o = o[key2] || {}; | |
| 66 | + | }); | |
| 67 | + | var key = keys2[keys2.length - 1]; | |
| 68 | + | return key in o; | |
| 69 | + | } | |
| 70 | + | function isNumber(x) { | |
| 71 | + | if (typeof x === "number") { | |
| 72 | + | return true; | |
| 73 | + | } | |
| 74 | + | if (/^0x[0-9a-f]+$/i.test(x)) { | |
| 75 | + | return true; | |
| 76 | + | } | |
| 77 | + | return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); | |
| 78 | + | } | |
| 79 | + | function isConstructorOrProto(obj, key) { | |
| 80 | + | return key === "constructor" && typeof obj[key] === "function" || key === "__proto__"; | |
| 81 | + | } | |
| 82 | + | module.exports = function(args, opts) { | |
| 83 | + | if (!opts) { | |
| 84 | + | opts = {}; | |
| 85 | + | } | |
| 86 | + | var flags = { | |
| 87 | + | bools: {}, | |
| 88 | + | strings: {}, | |
| 89 | + | unknownFn: null | |
| 90 | + | }; | |
| 91 | + | if (typeof opts.unknown === "function") { | |
| 92 | + | flags.unknownFn = opts.unknown; | |
| 93 | + | } | |
| 94 | + | if (typeof opts.boolean === "boolean" && opts.boolean) { | |
| 95 | + | flags.allBools = true; | |
| 96 | + | } else { | |
| 97 | + | [].concat(opts.boolean).filter(Boolean).forEach(function(key2) { | |
| 98 | + | flags.bools[key2] = true; | |
| 99 | + | }); | |
| 100 | + | } | |
| 101 | + | var aliases = {}; | |
| 102 | + | function aliasIsBoolean(key2) { | |
| 103 | + | return aliases[key2].some(function(x) { | |
| 104 | + | return flags.bools[x]; | |
| 105 | + | }); | |
| 106 | + | } | |
| 107 | + | Object.keys(opts.alias || {}).forEach(function(key2) { | |
| 108 | + | aliases[key2] = [].concat(opts.alias[key2]); | |
| 109 | + | aliases[key2].forEach(function(x) { | |
| 110 | + | aliases[x] = [key2].concat(aliases[key2].filter(function(y) { | |
| 111 | + | return x !== y; | |
| 112 | + | })); | |
| 113 | + | }); | |
| 114 | + | }); | |
| 115 | + | [].concat(opts.string).filter(Boolean).forEach(function(key2) { | |
| 116 | + | flags.strings[key2] = true; | |
| 117 | + | if (aliases[key2]) { | |
| 118 | + | [].concat(aliases[key2]).forEach(function(k) { | |
| 119 | + | flags.strings[k] = true; | |
| 120 | + | }); | |
| 121 | + | } | |
| 122 | + | }); | |
| 123 | + | var defaults = opts.default || {}; | |
| 124 | + | var argv = { _: [] }; | |
| 125 | + | function argDefined(key2, arg2) { | |
| 126 | + | return flags.allBools && /^--[^=]+$/.test(arg2) || flags.strings[key2] || flags.bools[key2] || aliases[key2]; | |
| 127 | + | } | |
| 128 | + | function setKey(obj, keys2, value2) { | |
| 129 | + | var o = obj; | |
| 130 | + | for (var i2 = 0; i2 < keys2.length - 1; i2++) { | |
| 131 | + | var key2 = keys2[i2]; | |
| 132 | + | if (isConstructorOrProto(o, key2)) { | |
| 133 | + | return; | |
| 134 | + | } | |
| 135 | + | if (o[key2] === void 0) { | |
| 136 | + | o[key2] = {}; | |
| 137 | + | } | |
| 138 | + | if (o[key2] === Object.prototype || o[key2] === Number.prototype || o[key2] === String.prototype) { | |
| 139 | + | o[key2] = {}; | |
| 140 | + | } | |
| 141 | + | if (o[key2] === Array.prototype) { | |
| 142 | + | o[key2] = []; | |
| 143 | + | } | |
| 144 | + | o = o[key2]; | |
| 145 | + | } | |
| 146 | + | var lastKey = keys2[keys2.length - 1]; | |
| 147 | + | if (isConstructorOrProto(o, lastKey)) { | |
| 148 | + | return; | |
| 149 | + | } | |
| 150 | + | if (o === Object.prototype || o === Number.prototype || o === String.prototype) { | |
| 151 | + | o = {}; | |
| 152 | + | } | |
| 153 | + | if (o === Array.prototype) { | |
| 154 | + | o = []; | |
| 155 | + | } | |
| 156 | + | if (o[lastKey] === void 0 || flags.bools[lastKey] || typeof o[lastKey] === "boolean") { | |
| 157 | + | o[lastKey] = value2; | |
| 158 | + | } else if (Array.isArray(o[lastKey])) { | |
| 159 | + | o[lastKey].push(value2); | |
| 160 | + | } else { | |
| 161 | + | o[lastKey] = [o[lastKey], value2]; | |
| 162 | + | } | |
| 163 | + | } | |
| 164 | + | function setArg(key2, val, arg2) { | |
| 165 | + | if (arg2 && flags.unknownFn && !argDefined(key2, arg2)) { | |
| 166 | + | if (flags.unknownFn(arg2) === false) { | |
| 167 | + | return; | |
| 168 | + | } | |
| 169 | + | } | |
| 170 | + | var value2 = !flags.strings[key2] && isNumber(val) ? Number(val) : val; | |
| 171 | + | setKey(argv, key2.split("."), value2); | |
| 172 | + | (aliases[key2] || []).forEach(function(x) { | |
| 173 | + | setKey(argv, x.split("."), value2); | |
| 174 | + | }); | |
| 175 | + | } | |
| 176 | + | Object.keys(flags.bools).forEach(function(key2) { | |
| 177 | + | setArg(key2, defaults[key2] === void 0 ? false : defaults[key2]); | |
| 178 | + | }); | |
| 179 | + | var notFlags = []; | |
| 180 | + | if (args.indexOf("--") !== -1) { | |
| 181 | + | notFlags = args.slice(args.indexOf("--") + 1); | |
| 182 | + | args = args.slice(0, args.indexOf("--")); | |
| 183 | + | } | |
| 184 | + | for (var i = 0; i < args.length; i++) { | |
| 185 | + | var arg = args[i]; | |
| 186 | + | var key; | |
| 187 | + | var next; | |
| 188 | + | if (/^--.+=/.test(arg)) { | |
| 189 | + | var m = arg.match(/^--([^=]+)=([\s\S]*)$/); | |
| 190 | + | key = m[1]; | |
| 191 | + | var value = m[2]; | |
| 192 | + | if (flags.bools[key]) { | |
| 193 | + | value = value !== "false"; | |
| 194 | + | } | |
| 195 | + | setArg(key, value, arg); | |
| 196 | + | } else if (/^--no-.+/.test(arg)) { | |
| 197 | + | key = arg.match(/^--no-(.+)/)[1]; | |
| 198 | + | setArg(key, false, arg); | |
| 199 | + | } else if (/^--.+/.test(arg)) { | |
| 200 | + | key = arg.match(/^--(.+)/)[1]; | |
| 201 | + | next = args[i + 1]; | |
| 202 | + | if (next !== void 0 && !/^(-|--)[^-]/.test(next) && !flags.bools[key] && !flags.allBools && (aliases[key] ? !aliasIsBoolean(key) : true)) { | |
| 203 | + | setArg(key, next, arg); | |
| 204 | + | i += 1; | |
| 205 | + | } else if (/^(true|false)$/.test(next)) { | |
| 206 | + | setArg(key, next === "true", arg); | |
| 207 | + | i += 1; | |
| 208 | + | } else { | |
| 209 | + | setArg(key, flags.strings[key] ? "" : true, arg); | |
| 210 | + | } | |
| 211 | + | } else if (/^-[^-]+/.test(arg)) { | |
| 212 | + | var letters = arg.slice(1, -1).split(""); | |
| 213 | + | var broken = false; | |
| 214 | + | for (var j = 0; j < letters.length; j++) { | |
| 215 | + | next = arg.slice(j + 2); | |
| 216 | + | if (next === "-") { | |
| 217 | + | setArg(letters[j], next, arg); | |
| 218 | + | continue; | |
| 219 | + | } | |
| 220 | + | if (/[A-Za-z]/.test(letters[j]) && next[0] === "=") { | |
| 221 | + | setArg(letters[j], next.slice(1), arg); | |
| 222 | + | broken = true; | |
| 223 | + | break; | |
| 224 | + | } | |
| 225 | + | if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { | |
| 226 | + | setArg(letters[j], next, arg); | |
| 227 | + | broken = true; | |
| 228 | + | break; | |
| 229 | + | } | |
| 230 | + | if (letters[j + 1] && letters[j + 1].match(/\W/)) { | |
| 231 | + | setArg(letters[j], arg.slice(j + 2), arg); | |
| 232 | + | broken = true; | |
| 233 | + | break; | |
| 234 | + | } else { | |
| 235 | + | setArg(letters[j], flags.strings[letters[j]] ? "" : true, arg); | |
| 236 | + | } | |
| 237 | + | } | |
| 238 | + | key = arg.slice(-1)[0]; | |
| 239 | + | if (!broken && key !== "-") { | |
| 240 | + | if (args[i + 1] && !/^(-|--)[^-]/.test(args[i + 1]) && !flags.bools[key] && (aliases[key] ? !aliasIsBoolean(key) : true)) { | |
| 241 | + | setArg(key, args[i + 1], arg); | |
| 242 | + | i += 1; | |
| 243 | + | } else if (args[i + 1] && /^(true|false)$/.test(args[i + 1])) { | |
| 244 | + | setArg(key, args[i + 1] === "true", arg); | |
| 245 | + | i += 1; | |
| 246 | + | } else { | |
| 247 | + | setArg(key, flags.strings[key] ? "" : true, arg); | |
| 248 | + | } | |
| 249 | + | } | |
| 250 | + | } else { | |
| 251 | + | if (!flags.unknownFn || flags.unknownFn(arg) !== false) { | |
| 252 | + | argv._.push(flags.strings._ || !isNumber(arg) ? arg : Number(arg)); | |
| 253 | + | } | |
| 254 | + | if (opts.stopEarly) { | |
| 255 | + | argv._.push.apply(argv._, args.slice(i + 1)); | |
| 256 | + | break; | |
| 257 | + | } | |
| 258 | + | } | |
| 259 | + | } | |
| 260 | + | Object.keys(defaults).forEach(function(k) { | |
| 261 | + | if (!hasKey(argv, k.split("."))) { | |
| 262 | + | setKey(argv, k.split("."), defaults[k]); | |
| 263 | + | (aliases[k] || []).forEach(function(x) { | |
| 264 | + | setKey(argv, x.split("."), defaults[k]); | |
| 265 | + | }); | |
| 266 | + | } | |
| 267 | + | }); | |
| 268 | + | if (opts["--"]) { | |
| 269 | + | argv["--"] = notFlags.slice(); | |
| 270 | + | } else { | |
| 271 | + | notFlags.forEach(function(k) { | |
| 272 | + | argv._.push(k); | |
| 273 | + | }); | |
| 274 | + | } | |
| 275 | + | return argv; | |
| 276 | + | }; | |
| 277 | + | } | |
| 278 | + | }); | |
| 279 | + | ||
| 280 | + | // node_modules/fast-json-stable-stringify/index.js | |
| 281 | + | var require_fast_json_stable_stringify = __commonJS({ | |
| 282 | + | "node_modules/fast-json-stable-stringify/index.js"(exports, module) { | |
| 283 | + | "use strict"; | |
| 284 | + | module.exports = function(data, opts) { | |
| 285 | + | if (!opts) opts = {}; | |
| 286 | + | if (typeof opts === "function") opts = { cmp: opts }; | |
| 287 | + | var cycles = typeof opts.cycles === "boolean" ? opts.cycles : false; | |
| 288 | + | var cmp = opts.cmp && /* @__PURE__ */ function(f) { | |
| 289 | + | return function(node) { | |
| 290 | + | return function(a, b) { | |
| 291 | + | var aobj = { key: a, value: node[a] }; | |
| 292 | + | var bobj = { key: b, value: node[b] }; | |
| 293 | + | return f(aobj, bobj); | |
| 294 | + | }; | |
| 295 | + | }; | |
| 296 | + | }(opts.cmp); | |
| 297 | + | var seen = []; | |
| 298 | + | return function stringify5(node) { | |
| 299 | + | if (node && node.toJSON && typeof node.toJSON === "function") { | |
| 300 | + | node = node.toJSON(); | |
| 301 | + | } | |
| 302 | + | if (node === void 0) return; | |
| 303 | + | if (typeof node == "number") return isFinite(node) ? "" + node : "null"; | |
| 304 | + | if (typeof node !== "object") return JSON.stringify(node); | |
| 305 | + | var i, out; | |
| 306 | + | if (Array.isArray(node)) { | |
| 307 | + | out = "["; | |
| 308 | + | for (i = 0; i < node.length; i++) { | |
| 309 | + | if (i) out += ","; | |
| 310 | + | out += stringify5(node[i]) || "null"; | |
| 311 | + | } | |
| 312 | + | return out + "]"; | |
| 313 | + | } | |
| 314 | + | if (node === null) return "null"; | |
| 315 | + | if (seen.indexOf(node) !== -1) { | |
| 316 | + | if (cycles) return JSON.stringify("__cycle__"); | |
| 317 | + | throw new TypeError("Converting circular structure to JSON"); | |
| 318 | + | } | |
| 319 | + | var seenIndex = seen.push(node) - 1; | |
| 320 | + | var keys2 = Object.keys(node).sort(cmp && cmp(node)); | |
| 321 | + | out = ""; | |
| 322 | + | for (i = 0; i < keys2.length; i++) { | |
| 323 | + | var key = keys2[i]; | |
| 324 | + | var value = stringify5(node[key]); | |
| 325 | + | if (!value) continue; | |
| 326 | + | if (out) out += ","; | |
| 327 | + | out += JSON.stringify(key) + ":" + value; | |
| 328 | + | } | |
| 329 | + | seen.splice(seenIndex, 1); | |
| 330 | + | return "{" + out + "}"; | |
| 331 | + | }(data); | |
| 332 | + | }; | |
| 333 | + | } | |
| 334 | + | }); | |
| 335 | + | ||
| 336 | + | // node_modules/common-path-prefix/index.js | |
| 337 | + | var require_common_path_prefix = __commonJS({ | |
| 338 | + | "node_modules/common-path-prefix/index.js"(exports, module) { | |
| 339 | + | "use strict"; | |
| 340 | + | var { sep: DEFAULT_SEPARATOR } = __require("path"); | |
| 341 | + | var determineSeparator = (paths) => { | |
| 342 | + | for (const path12 of paths) { | |
| 343 | + | const match = /(\/|\\)/.exec(path12); | |
| 344 | + | if (match !== null) return match[0]; | |
| 345 | + | } | |
| 346 | + | return DEFAULT_SEPARATOR; | |
| 347 | + | }; | |
| 348 | + | module.exports = function commonPathPrefix2(paths, sep = determineSeparator(paths)) { | |
| 349 | + | const [first = "", ...remaining] = paths; | |
| 350 | + | if (first === "" || remaining.length === 0) return ""; | |
| 351 | + | const parts = first.split(sep); | |
| 352 | + | let endOfPrefix = parts.length; | |
| 353 | + | for (const path12 of remaining) { | |
| 354 | + | const compare = path12.split(sep); | |
| 355 | + | for (let i = 0; i < endOfPrefix; i++) { | |
| 356 | + | if (compare[i] !== parts[i]) { | |
| 357 | + | endOfPrefix = i; | |
| 358 | + | } | |
| 359 | + | } | |
| 360 | + | if (endOfPrefix === 0) return ""; | |
| 361 | + | } | |
| 362 | + | const prefix = parts.slice(0, endOfPrefix).join(sep); | |
| 363 | + | return prefix.endsWith(sep) ? prefix : prefix + sep; | |
| 364 | + | }; | |
| 365 | + | } | |
| 366 | + | }); | |
| 367 | + | ||
| 368 | + | // src/cli/index.js | |
| 369 | + | import * as prettier2 from "../index.mjs"; | |
| 370 | + | ||
| 371 | + | // scripts/build/shims/at.js | |
| 372 | + | var at = (isOptionalObject, object2, index) => { | |
| 373 | + | if (isOptionalObject && (object2 === void 0 || object2 === null)) { | |
| 374 | + | return; | |
| 375 | + | } | |
| 376 | + | if (Array.isArray(object2) || typeof object2 === "string") { | |
| 377 | + | return object2[index < 0 ? object2.length + index : index]; | |
| 378 | + | } | |
| 379 | + | return object2.at(index); | |
| 380 | + | }; | |
| 381 | + | var at_default = at; | |
| 382 | + | ||
| 383 | + | // src/cli/options/get-context-options.js | |
| 384 | + | var import_dashify = __toESM(require_dashify(), 1); | |
| 385 | + | import { getSupportInfo } from "../index.mjs"; | |
| 386 | + | ||
| 387 | + | // src/cli/cli-options.evaluate.js | |
| 388 | + | var cli_options_evaluate_default = { | |
| 389 | + | "cache": { | |
| 390 | + | "default": false, | |
| 391 | + | "description": "Only format changed files. Cannot use with --stdin-filepath.", | |
| 392 | + | "type": "boolean" | |
| 393 | + | }, | |
| 394 | + | "cacheLocation": { | |
| 395 | + | "description": "Path to the cache file.", | |
| 396 | + | "type": "path" | |
| 397 | + | }, | |
| 398 | + | "cacheStrategy": { | |
| 399 | + | "choices": [ | |
| 400 | + | { | |
| 401 | + | "description": "Use the file metadata such as timestamps as cache keys", | |
| 402 | + | "value": "metadata" | |
| 403 | + | }, | |
| 404 | + | { | |
| 405 | + | "description": "Use the file content as cache keys", | |
| 406 | + | "value": "content" | |
| 407 | + | } | |
| 408 | + | ], | |
| 409 | + | "description": "Strategy for the cache to use for detecting changed files.", | |
| 410 | + | "type": "choice" | |
| 411 | + | }, | |
| 412 | + | "check": { | |
| 413 | + | "alias": "c", | |
| 414 | + | "category": "Output", | |
| 415 | + | "description": "Check if the given files are formatted, print a human-friendly summary\nmessage and paths to unformatted files (see also --list-different).", | |
| 416 | + | "type": "boolean" | |
| 417 | + | }, | |
| 418 | + | "color": { | |
| 419 | + | "default": true, | |
| 420 | + | "description": "Colorize error messages.", | |
| 421 | + | "oppositeDescription": "Do not colorize error messages.", | |
| 422 | + | "type": "boolean" | |
| 423 | + | }, | |
| 424 | + | "config": { | |
| 425 | + | "category": "Config", | |
| 426 | + | "description": "Path to a Prettier configuration file (.prettierrc, package.json, prettier.config.js).", | |
| 427 | + | "exception": (value) => value === false, | |
| 428 | + | "oppositeDescription": "Do not look for a configuration file.", | |
| 429 | + | "type": "path" | |
| 430 | + | }, | |
| 431 | + | "configPrecedence": { | |
| 432 | + | "category": "Config", | |
| 433 | + | "choices": [ | |
| 434 | + | { | |
| 435 | + | "description": "CLI options take precedence over config file", | |
| 436 | + | "value": "cli-override" | |
| 437 | + | }, | |
| 438 | + | { | |
| 439 | + | "description": "Config file take precedence over CLI options", | |
| 440 | + | "value": "file-override" | |
| 441 | + | }, | |
| 442 | + | { | |
| 443 | + | "description": "If a config file is found will evaluate it and ignore other CLI options.\nIf no config file is found CLI options will evaluate as normal.", | |
| 444 | + | "value": "prefer-file" | |
| 445 | + | } | |
| 446 | + | ], | |
| 447 | + | "default": "cli-override", | |
| 448 | + | "description": "Define in which order config files and CLI options should be evaluated.", | |
| 449 | + | "type": "choice" | |
| 450 | + | }, | |
| 451 | + | "debugBenchmark": { | |
| 452 | + | "type": "boolean" | |
| 453 | + | }, | |
| 454 | + | "debugCheck": { | |
| 455 | + | "type": "boolean" | |
| 456 | + | }, | |
| 457 | + | "debugPrintAst": { | |
| 458 | + | "type": "boolean" | |
| 459 | + | }, | |
| 460 | + | "debugPrintComments": { | |
| 461 | + | "type": "boolean" | |
| 462 | + | }, | |
| 463 | + | "debugPrintDoc": { | |
| 464 | + | "type": "boolean" | |
| 465 | + | }, | |
| 466 | + | "debugRepeat": { | |
| 467 | + | "default": 0, | |
| 468 | + | "type": "int" | |
| 469 | + | }, | |
| 470 | + | "editorconfig": { | |
| 471 | + | "category": "Config", | |
| 472 | + | "default": true, | |
| 473 | + | "description": "Take .editorconfig into account when parsing configuration.", | |
| 474 | + | "oppositeDescription": "Don't take .editorconfig into account when parsing configuration.", | |
| 475 | + | "type": "boolean" | |
| 476 | + | }, | |
| 477 | + | "errorOnUnmatchedPattern": { | |
| 478 | + | "oppositeDescription": "Prevent errors when pattern is unmatched.", | |
| 479 | + | "type": "boolean" | |
| 480 | + | }, | |
| 481 | + | "fileInfo": { | |
| 482 | + | "description": "Extract the following info (as JSON) for a given file path. Reported fields:\n* ignored (boolean) - true if file path is filtered by --ignore-path\n* inferredParser (string | null) - name of parser inferred from file path", | |
| 483 | + | "type": "path" | |
| 484 | + | }, | |
| 485 | + | "findConfigPath": { | |
| 486 | + | "category": "Config", | |
| 487 | + | "description": "Find and print the path to a configuration file for the given input file.", | |
| 488 | + | "type": "path" | |
| 489 | + | }, | |
| 490 | + | "help": { | |
| 491 | + | "alias": "h", | |
| 492 | + | "description": "Show CLI usage, or details about the given flag.\nExample: --help write", | |
| 493 | + | "exception": (value) => value === "", | |
| 494 | + | "type": "flag" | |
| 495 | + | }, | |
| 496 | + | "ignorePath": { | |
| 497 | + | "array": true, | |
| 498 | + | "category": "Config", | |
| 499 | + | "default": [ | |
| 500 | + | { | |
| 501 | + | "value": [ | |
| 502 | + | ".gitignore", | |
| 503 | + | ".prettierignore" | |
| 504 | + | ] | |
| 505 | + | } | |
| 506 | + | ], | |
| 507 | + | "description": "Path to a file with patterns describing files to ignore.\nMultiple values are accepted.", | |
| 508 | + | "type": "path" | |
| 509 | + | }, | |
| 510 | + | "ignoreUnknown": { | |
| 511 | + | "alias": "u", | |
| 512 | + | "description": "Ignore unknown files.", | |
| 513 | + | "type": "boolean" | |
| 514 | + | }, | |
| 515 | + | "listDifferent": { | |
| 516 | + | "alias": "l", | |
| 517 | + | "category": "Output", | |
| 518 | + | "description": "Print the names of files that are different from Prettier's formatting (see also --check).", | |
| 519 | + | "type": "boolean" | |
| 520 | + | }, | |
| 521 | + | "logLevel": { | |
| 522 | + | "choices": [ | |
| 523 | + | "silent", | |
| 524 | + | "error", | |
| 525 | + | "warn", | |
| 526 | + | "log", | |
| 527 | + | "debug" | |
| 528 | + | ], | |
| 529 | + | "default": "log", | |
| 530 | + | "description": "What level of logs to report.", | |
| 531 | + | "type": "choice" | |
| 532 | + | }, | |
| 533 | + | "supportInfo": { | |
| 534 | + | "description": "Print support information as JSON.", | |
| 535 | + | "type": "boolean" | |
| 536 | + | }, | |
| 537 | + | "version": { | |
| 538 | + | "alias": "v", | |
| 539 | + | "description": "Print Prettier version.", | |
| 540 | + | "type": "boolean" | |
| 541 | + | }, | |
| 542 | + | "withNodeModules": { | |
| 543 | + | "category": "Config", | |
| 544 | + | "description": "Process files inside 'node_modules' directory.", | |
| 545 | + | "type": "boolean" | |
| 546 | + | }, | |
| 547 | + | "write": { | |
| 548 | + | "alias": "w", | |
| 549 | + | "category": "Output", | |
| 550 | + | "description": "Edit files in-place. (Beware!)", | |
| 551 | + | "type": "boolean" | |
| 552 | + | } | |
| 553 | + | }; | |
| 554 | + | ||
| 555 | + | // src/cli/prettier-internal.js | |
| 556 | + | import { __internal as sharedWithCli } from "../index.mjs"; | |
| 557 | + | var { | |
| 558 | + | errors, | |
| 559 | + | optionCategories, | |
| 560 | + | createIsIgnoredFunction, | |
| 561 | + | formatOptionsHiddenDefaults, | |
| 562 | + | normalizeOptions, | |
| 563 | + | getSupportInfoWithoutPlugins, | |
| 564 | + | normalizeOptionSettings, | |
| 565 | + | vnopts, | |
| 566 | + | fastGlob, | |
| 567 | + | createTwoFilesPatch, | |
| 568 | + | mockable | |
| 569 | + | } = sharedWithCli; | |
| 570 | + | ||
| 571 | + | // src/cli/options/get-context-options.js | |
| 572 | + | var detailedCliOptions = normalizeOptionSettings(cli_options_evaluate_default).map( | |
| 573 | + | (option) => normalizeDetailedOption(option) | |
| 574 | + | ); | |
| 575 | + | function apiOptionToCliOption(apiOption) { | |
| 576 | + | const cliOption = { | |
| 577 | + | ...apiOption, | |
| 578 | + | description: apiOption.cliDescription ?? apiOption.description, | |
| 579 | + | category: apiOption.cliCategory ?? optionCategories.CATEGORY_FORMAT, | |
| 580 | + | forwardToApi: apiOption.name | |
| 581 | + | }; | |
| 582 | + | if (apiOption.deprecated) { | |
| 583 | + | delete cliOption.forwardToApi; | |
| 584 | + | delete cliOption.description; | |
| 585 | + | delete cliOption.oppositeDescription; | |
| 586 | + | cliOption.deprecated = true; | |
| 587 | + | } | |
| 588 | + | return normalizeDetailedOption(cliOption); | |
| 589 | + | } | |
| 590 | + | function normalizeDetailedOption(option) { | |
| 591 | + | var _a; | |
| 592 | + | return { | |
| 593 | + | category: optionCategories.CATEGORY_OTHER, | |
| 594 | + | ...option, | |
| 595 | + | name: option.cliName ?? (0, import_dashify.default)(option.name), | |
| 596 | + | choices: (_a = option.choices) == null ? void 0 : _a.map((choice) => { | |
| 597 | + | const newChoice = { | |
| 598 | + | description: "", | |
| 599 | + | deprecated: false, | |
| 600 | + | ...typeof choice === "object" ? choice : { value: choice } | |
| 601 | + | }; | |
| 602 | + | if (newChoice.value === true) { | |
| 603 | + | newChoice.value = ""; | |
| 604 | + | } | |
| 605 | + | return newChoice; | |
| 606 | + | }) | |
| 607 | + | }; | |
| 608 | + | } | |
| 609 | + | function supportInfoToContextOptions({ options: supportOptions, languages }) { | |
| 610 | + | const detailedOptions = [ | |
| 611 | + | ...detailedCliOptions, | |
| 612 | + | ...supportOptions.map((apiOption) => apiOptionToCliOption(apiOption)) | |
| 613 | + | ]; | |
| 614 | + | return { | |
| 615 | + | supportOptions, | |
| 616 | + | languages, | |
| 617 | + | detailedOptions | |
| 618 | + | }; | |
| 619 | + | } | |
| 620 | + | async function getContextOptions(plugins) { | |
| 621 | + | const supportInfo = await getSupportInfo({ | |
| 622 | + | showDeprecated: true, | |
| 623 | + | plugins | |
| 624 | + | }); | |
| 625 | + | return supportInfoToContextOptions(supportInfo); | |
| 626 | + | } | |
| 627 | + | function getContextOptionsWithoutPlugins() { | |
| 628 | + | const supportInfo = getSupportInfoWithoutPlugins(); | |
| 629 | + | return supportInfoToContextOptions(supportInfo); | |
| 630 | + | } | |
| 631 | + | ||
| 632 | + | // scripts/build/shims/string-replace-all.js | |
| 633 | + | var stringReplaceAll = (isOptionalObject, original, pattern, replacement) => { | |
| 634 | + | if (isOptionalObject && (original === void 0 || original === null)) { | |
| 635 | + | return; | |
| 636 | + | } | |
| 637 | + | if (original.replaceAll) { | |
| 638 | + | return original.replaceAll(pattern, replacement); | |
| 639 | + | } | |
| 640 | + | if (pattern.global) { | |
| 641 | + | return original.replace(pattern, replacement); | |
| 642 | + | } | |
| 643 | + | return original.split(pattern).join(replacement); | |
| 644 | + | }; | |
| 645 | + | var string_replace_all_default = stringReplaceAll; | |
| 646 | + | ||
| 647 | + | // node_modules/camelcase/index.js | |
| 648 | + | var UPPERCASE = /[\p{Lu}]/u; | |
| 649 | + | var LOWERCASE = /[\p{Ll}]/u; | |
| 650 | + | var LEADING_CAPITAL = /^[\p{Lu}](?![\p{Lu}])/gu; | |
| 651 | + | var IDENTIFIER = /([\p{Alpha}\p{N}_]|$)/u; | |
| 652 | + | var SEPARATORS = /[_.\- ]+/; | |
| 653 | + | var LEADING_SEPARATORS = new RegExp("^" + SEPARATORS.source); | |
| 654 | + | var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu"); | |
| 655 | + | var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+" + IDENTIFIER.source, "gu"); | |
| 656 | + | var preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase2) => { | |
| 657 | + | let isLastCharLower = false; | |
| 658 | + | let isLastCharUpper = false; | |
| 659 | + | let isLastLastCharUpper = false; | |
| 660 | + | let isLastLastCharPreserved = false; | |
| 661 | + | for (let index = 0; index < string.length; index++) { | |
| 662 | + | const character = string[index]; | |
| 663 | + | isLastLastCharPreserved = index > 2 ? string[index - 3] === "-" : true; | |
| 664 | + | if (isLastCharLower && UPPERCASE.test(character)) { | |
| 665 | + | string = string.slice(0, index) + "-" + string.slice(index); | |
| 666 | + | isLastCharLower = false; | |
| 667 | + | isLastLastCharUpper = isLastCharUpper; | |
| 668 | + | isLastCharUpper = true; | |
| 669 | + | index++; | |
| 670 | + | } else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase2)) { | |
| 671 | + | string = string.slice(0, index - 1) + "-" + string.slice(index - 1); | |
| 672 | + | isLastLastCharUpper = isLastCharUpper; | |
| 673 | + | isLastCharUpper = false; | |
| 674 | + | isLastCharLower = true; | |
| 675 | + | } else { | |
| 676 | + | isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character; | |
| 677 | + | isLastLastCharUpper = isLastCharUpper; | |
| 678 | + | isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character; | |
| 679 | + | } | |
| 680 | + | } | |
| 681 | + | return string; | |
| 682 | + | }; | |
| 683 | + | var preserveConsecutiveUppercase = (input, toLowerCase) => { | |
| 684 | + | LEADING_CAPITAL.lastIndex = 0; | |
| 685 | + | return string_replace_all_default( | |
| 686 | + | /* isOptionalObject */ | |
| 687 | + | false, | |
| 688 | + | input, | |
| 689 | + | LEADING_CAPITAL, | |
| 690 | + | (match) => toLowerCase(match) | |
| 691 | + | ); | |
| 692 | + | }; | |
| 693 | + | var postProcess = (input, toUpperCase) => { | |
| 694 | + | SEPARATORS_AND_IDENTIFIER.lastIndex = 0; | |
| 695 | + | NUMBERS_AND_IDENTIFIER.lastIndex = 0; | |
| 696 | + | return string_replace_all_default( | |
| 697 | + | /* isOptionalObject */ | |
| 698 | + | false, | |
| 699 | + | string_replace_all_default( | |
| 700 | + | /* isOptionalObject */ | |
| 701 | + | false, | |
| 702 | + | input, | |
| 703 | + | NUMBERS_AND_IDENTIFIER, | |
| 704 | + | (match, pattern, offset) => ["_", "-"].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match) | |
| 705 | + | ), | |
| 706 | + | SEPARATORS_AND_IDENTIFIER, | |
| 707 | + | (_2, identifier) => toUpperCase(identifier) | |
| 708 | + | ); | |
| 709 | + | }; | |
| 710 | + | function camelCase(input, options) { | |
| 711 | + | if (!(typeof input === "string" || Array.isArray(input))) { | |
| 712 | + | throw new TypeError("Expected the input to be `string | string[]`"); | |
| 713 | + | } | |
| 714 | + | options = { | |
| 715 | + | pascalCase: false, | |
| 716 | + | preserveConsecutiveUppercase: false, | |
| 717 | + | ...options | |
| 718 | + | }; | |
| 719 | + | if (Array.isArray(input)) { | |
| 720 | + | input = input.map((x) => x.trim()).filter((x) => x.length).join("-"); | |
| 721 | + | } else { | |
| 722 | + | input = input.trim(); | |
| 723 | + | } | |
| 724 | + | if (input.length === 0) { | |
| 725 | + | return ""; | |
| 726 | + | } | |
| 727 | + | const toLowerCase = options.locale === false ? (string) => string.toLowerCase() : (string) => string.toLocaleLowerCase(options.locale); | |
| 728 | + | const toUpperCase = options.locale === false ? (string) => string.toUpperCase() : (string) => string.toLocaleUpperCase(options.locale); | |
| 729 | + | if (input.length === 1) { | |
| 730 | + | if (SEPARATORS.test(input)) { | |
| 731 | + | return ""; | |
| 732 | + | } | |
| 733 | + | return options.pascalCase ? toUpperCase(input) : toLowerCase(input); | |
| 734 | + | } | |
| 735 | + | const hasUpperCase = input !== toLowerCase(input); | |
| 736 | + | if (hasUpperCase) { | |
| 737 | + | input = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase); | |
| 738 | + | } | |
| 739 | + | input = input.replace(LEADING_SEPARATORS, ""); | |
| 740 | + | input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input); | |
| 741 | + | if (options.pascalCase) { | |
| 742 | + | input = toUpperCase(input.charAt(0)) + input.slice(1); | |
| 743 | + | } | |
| 744 | + | return postProcess(input, toUpperCase); | |
| 745 | + | } | |
| 746 | + | ||
| 747 | + | // src/cli/utils.js | |
| 748 | + | import fs from "fs/promises"; | |
| 749 | + | import path from "path"; | |
| 750 | + | ||
| 751 | + | // node_modules/sdbm/index.js | |
| 752 | + | function sdbm(string) { | |
| 753 | + | let hash2 = 0; | |
| 754 | + | for (let i = 0; i < string.length; i++) { | |
| 755 | + | hash2 = string.charCodeAt(i) + (hash2 << 6) + (hash2 << 16) - hash2; | |
| 756 | + | } | |
| 757 | + | return hash2 >>> 0; | |
| 758 | + | } | |
| 759 | + | ||
| 760 | + | // src/cli/utils.js | |
| 761 | + | import { __internal as sharedWithCli2 } from "../index.mjs"; | |
| 762 | + | var printToScreen = console.log.bind(console); | |
| 763 | + | function groupBy(array2, iteratee) { | |
| 764 | + | const result = /* @__PURE__ */ Object.create(null); | |
| 765 | + | for (const value of array2) { | |
| 766 | + | const key = iteratee(value); | |
| 767 | + | if (Array.isArray(result[key])) { | |
| 768 | + | result[key].push(value); | |
| 769 | + | } else { | |
| 770 | + | result[key] = [value]; | |
| 771 | + | } | |
| 772 | + | } | |
| 773 | + | return result; | |
| 774 | + | } | |
| 775 | + | function pick(object2, keys2) { | |
| 776 | + | const entries = keys2.map((key) => [key, object2[key]]); | |
| 777 | + | return Object.fromEntries(entries); | |
| 778 | + | } | |
| 779 | + | function createHash(source) { | |
| 780 | + | return String(sdbm(source)); | |
| 781 | + | } | |
| 782 | + | async function statSafe(filePath) { | |
| 783 | + | try { | |
| 784 | + | return await fs.stat(filePath); | |
| 785 | + | } catch (error) { | |
| 786 | + | if (error.code !== "ENOENT") { | |
| 787 | + | throw error; | |
| 788 | + | } | |
| 789 | + | } | |
| 790 | + | } | |
| 791 | + | async function lstatSafe(filePath) { | |
| 792 | + | try { | |
| 793 | + | return await fs.lstat(filePath); | |
| 794 | + | } catch (error) { | |
| 795 | + | if (error.code !== "ENOENT") { | |
| 796 | + | throw error; | |
| 797 | + | } | |
| 798 | + | } | |
| 799 | + | } | |
| 800 | + | function isJson(value) { | |
| 801 | + | try { | |
| 802 | + | JSON.parse(value); | |
| 803 | + | return true; | |
| 804 | + | } catch { | |
| 805 | + | return false; | |
| 806 | + | } | |
| 807 | + | } | |
| 808 | + | var normalizeToPosix = path.sep === "\\" ? (filepath) => string_replace_all_default( | |
| 809 | + | /* isOptionalObject */ | |
| 810 | + | false, | |
| 811 | + | filepath, | |
| 812 | + | "\\", | |
| 813 | + | "/" | |
| 814 | + | ) : (filepath) => filepath; | |
| 815 | + | var { omit } = sharedWithCli2.utils; | |
| 816 | + | ||
| 817 | + | // src/cli/options/create-minimist-options.js | |
| 818 | + | function createMinimistOptions(detailedOptions) { | |
| 819 | + | const booleanNames = []; | |
| 820 | + | const stringNames = []; | |
| 821 | + | const defaultValues = {}; | |
| 822 | + | for (const option of detailedOptions) { | |
| 823 | + | const { name, alias, type } = option; | |
| 824 | + | const names = type === "boolean" ? booleanNames : stringNames; | |
| 825 | + | names.push(name); | |
| 826 | + | if (alias) { | |
| 827 | + | names.push(alias); | |
| 828 | + | } | |
| 829 | + | if (!option.deprecated && (!option.forwardToApi || name === "plugin") && option.default !== void 0) { | |
| 830 | + | defaultValues[option.name] = option.default; | |
| 831 | + | } | |
| 832 | + | } | |
| 833 | + | return { | |
| 834 | + | // we use vnopts' AliasSchema to handle aliases for better error messages | |
| 835 | + | alias: {}, | |
| 836 | + | boolean: booleanNames, | |
| 837 | + | string: stringNames, | |
| 838 | + | default: defaultValues | |
| 839 | + | }; | |
| 840 | + | } | |
| 841 | + | ||
| 842 | + | // src/cli/options/minimist.js | |
| 843 | + | var import_minimist = __toESM(require_minimist(), 1); | |
| 844 | + | var PLACEHOLDER = null; | |
| 845 | + | function minimistParse(args, options) { | |
| 846 | + | const boolean = options.boolean ?? []; | |
| 847 | + | const defaults = options.default ?? {}; | |
| 848 | + | const booleanWithoutDefault = boolean.filter((key) => !(key in defaults)); | |
| 849 | + | const newDefaults = { | |
| 850 | + | ...defaults, | |
| 851 | + | ...Object.fromEntries( | |
| 852 | + | booleanWithoutDefault.map((key) => [key, PLACEHOLDER]) | |
| 853 | + | ) | |
| 854 | + | }; | |
| 855 | + | const parsed = (0, import_minimist.default)(args, { ...options, default: newDefaults }); | |
| 856 | + | return Object.fromEntries( | |
| 857 | + | Object.entries(parsed).filter(([, value]) => value !== PLACEHOLDER) | |
| 858 | + | ); | |
| 859 | + | } | |
| 860 | + | ||
| 861 | + | // node_modules/chalk/source/vendor/ansi-styles/index.js | |
| 862 | + | var ANSI_BACKGROUND_OFFSET = 10; | |
| 863 | + | var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`; | |
| 864 | + | var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`; | |
| 865 | + | var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`; | |
| 866 | + | var styles = { | |
| 867 | + | modifier: { | |
| 868 | + | reset: [0, 0], | |
| 869 | + | // 21 isn't widely supported and 22 does the same thing | |
| 870 | + | bold: [1, 22], | |
| 871 | + | dim: [2, 22], | |
| 872 | + | italic: [3, 23], | |
| 873 | + | underline: [4, 24], | |
| 874 | + | overline: [53, 55], | |
| 875 | + | inverse: [7, 27], | |
| 876 | + | hidden: [8, 28], | |
| 877 | + | strikethrough: [9, 29] | |
| 878 | + | }, | |
| 879 | + | color: { | |
| 880 | + | black: [30, 39], | |
| 881 | + | red: [31, 39], | |
| 882 | + | green: [32, 39], | |
| 883 | + | yellow: [33, 39], | |
| 884 | + | blue: [34, 39], | |
| 885 | + | magenta: [35, 39], | |
| 886 | + | cyan: [36, 39], | |
| 887 | + | white: [37, 39], | |
| 888 | + | // Bright color | |
| 889 | + | blackBright: [90, 39], | |
| 890 | + | gray: [90, 39], | |
| 891 | + | // Alias of `blackBright` | |
| 892 | + | grey: [90, 39], | |
| 893 | + | // Alias of `blackBright` | |
| 894 | + | redBright: [91, 39], | |
| 895 | + | greenBright: [92, 39], | |
| 896 | + | yellowBright: [93, 39], | |
| 897 | + | blueBright: [94, 39], | |
| 898 | + | magentaBright: [95, 39], | |
| 899 | + | cyanBright: [96, 39], | |
| 900 | + | whiteBright: [97, 39] | |
| 901 | + | }, | |
| 902 | + | bgColor: { | |
| 903 | + | bgBlack: [40, 49], | |
| 904 | + | bgRed: [41, 49], | |
| 905 | + | bgGreen: [42, 49], | |
| 906 | + | bgYellow: [43, 49], | |
| 907 | + | bgBlue: [44, 49], | |
| 908 | + | bgMagenta: [45, 49], | |
| 909 | + | bgCyan: [46, 49], | |
| 910 | + | bgWhite: [47, 49], | |
| 911 | + | // Bright color | |
| 912 | + | bgBlackBright: [100, 49], | |
| 913 | + | bgGray: [100, 49], | |
| 914 | + | // Alias of `bgBlackBright` | |
| 915 | + | bgGrey: [100, 49], | |
| 916 | + | // Alias of `bgBlackBright` | |
| 917 | + | bgRedBright: [101, 49], | |
| 918 | + | bgGreenBright: [102, 49], | |
| 919 | + | bgYellowBright: [103, 49], | |
| 920 | + | bgBlueBright: [104, 49], | |
| 921 | + | bgMagentaBright: [105, 49], | |
| 922 | + | bgCyanBright: [106, 49], | |
| 923 | + | bgWhiteBright: [107, 49] | |
| 924 | + | } | |
| 925 | + | }; | |
| 926 | + | var modifierNames = Object.keys(styles.modifier); | |
| 927 | + | var foregroundColorNames = Object.keys(styles.color); | |
| 928 | + | var backgroundColorNames = Object.keys(styles.bgColor); | |
| 929 | + | var colorNames = [...foregroundColorNames, ...backgroundColorNames]; | |
| 930 | + | function assembleStyles() { | |
| 931 | + | const codes = /* @__PURE__ */ new Map(); | |
| 932 | + | for (const [groupName, group] of Object.entries(styles)) { | |
| 933 | + | for (const [styleName, style] of Object.entries(group)) { | |
| 934 | + | styles[styleName] = { | |
| 935 | + | open: `\x1B[${style[0]}m`, | |
| 936 | + | close: `\x1B[${style[1]}m` | |
| 937 | + | }; | |
| 938 | + | group[styleName] = styles[styleName]; | |
| 939 | + | codes.set(style[0], style[1]); | |
| 940 | + | } | |
| 941 | + | Object.defineProperty(styles, groupName, { | |
| 942 | + | value: group, | |
| 943 | + | enumerable: false | |
| 944 | + | }); | |
| 945 | + | } | |
| 946 | + | Object.defineProperty(styles, "codes", { | |
| 947 | + | value: codes, | |
| 948 | + | enumerable: false | |
| 949 | + | }); | |
| 950 | + | styles.color.close = "\x1B[39m"; | |
| 951 | + | styles.bgColor.close = "\x1B[49m"; | |
| 952 | + | styles.color.ansi = wrapAnsi16(); | |
| 953 | + | styles.color.ansi256 = wrapAnsi256(); | |
| 954 | + | styles.color.ansi16m = wrapAnsi16m(); | |
| 955 | + | styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); | |
| 956 | + | styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); | |
| 957 | + | styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); | |
| 958 | + | Object.defineProperties(styles, { | |
| 959 | + | rgbToAnsi256: { | |
| 960 | + | value(red, green, blue) { | |
| 961 | + | if (red === green && green === blue) { | |
| 962 | + | if (red < 8) { | |
| 963 | + | return 16; | |
| 964 | + | } | |
| 965 | + | if (red > 248) { | |
| 966 | + | return 231; | |
| 967 | + | } | |
| 968 | + | return Math.round((red - 8) / 247 * 24) + 232; | |
| 969 | + | } | |
| 970 | + | return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5); | |
| 971 | + | }, | |
| 972 | + | enumerable: false | |
| 973 | + | }, | |
| 974 | + | hexToRgb: { | |
| 975 | + | value(hex) { | |
| 976 | + | const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); | |
| 977 | + | if (!matches) { | |
| 978 | + | return [0, 0, 0]; | |
| 979 | + | } | |
| 980 | + | let [colorString] = matches; | |
| 981 | + | if (colorString.length === 3) { | |
| 982 | + | colorString = [...colorString].map((character) => character + character).join(""); | |
| 983 | + | } | |
| 984 | + | const integer = Number.parseInt(colorString, 16); | |
| 985 | + | return [ | |
| 986 | + | /* eslint-disable no-bitwise */ | |
| 987 | + | integer >> 16 & 255, | |
| 988 | + | integer >> 8 & 255, | |
| 989 | + | integer & 255 | |
| 990 | + | /* eslint-enable no-bitwise */ | |
| 991 | + | ]; | |
| 992 | + | }, | |
| 993 | + | enumerable: false | |
| 994 | + | }, | |
| 995 | + | hexToAnsi256: { | |
| 996 | + | value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)), | |
| 997 | + | enumerable: false | |
| 998 | + | }, | |
| 999 | + | ansi256ToAnsi: { | |
| 1000 | + | value(code) { | |
| 1001 | + | if (code < 8) { | |
| 1002 | + | return 30 + code; | |
| 1003 | + | } | |
| 1004 | + | if (code < 16) { | |
| 1005 | + | return 90 + (code - 8); | |
| 1006 | + | } | |
| 1007 | + | let red; | |
| 1008 | + | let green; | |
| 1009 | + | let blue; | |
| 1010 | + | if (code >= 232) { | |
| 1011 | + | red = ((code - 232) * 10 + 8) / 255; | |
| 1012 | + | green = red; | |
| 1013 | + | blue = red; | |
| 1014 | + | } else { | |
| 1015 | + | code -= 16; | |
| 1016 | + | const remainder = code % 36; | |
| 1017 | + | red = Math.floor(code / 36) / 5; | |
| 1018 | + | green = Math.floor(remainder / 6) / 5; | |
| 1019 | + | blue = remainder % 6 / 5; | |
| 1020 | + | } | |
| 1021 | + | const value = Math.max(red, green, blue) * 2; | |
| 1022 | + | if (value === 0) { | |
| 1023 | + | return 30; | |
| 1024 | + | } | |
| 1025 | + | let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red)); | |
| 1026 | + | if (value === 2) { | |
| 1027 | + | result += 60; | |
| 1028 | + | } | |
| 1029 | + | return result; | |
| 1030 | + | }, | |
| 1031 | + | enumerable: false | |
| 1032 | + | }, | |
| 1033 | + | rgbToAnsi: { | |
| 1034 | + | value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), | |
| 1035 | + | enumerable: false | |
| 1036 | + | }, | |
| 1037 | + | hexToAnsi: { | |
| 1038 | + | value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), | |
| 1039 | + | enumerable: false | |
| 1040 | + | } | |
| 1041 | + | }); | |
| 1042 | + | return styles; | |
| 1043 | + | } | |
| 1044 | + | var ansiStyles = assembleStyles(); | |
| 1045 | + | var ansi_styles_default = ansiStyles; | |
| 1046 | + | ||
| 1047 | + | // node_modules/chalk/source/vendor/supports-color/index.js | |
| 1048 | + | import process2 from "process"; | |
| 1049 | + | import os from "os"; | |
| 1050 | + | import tty from "tty"; | |
| 1051 | + | function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) { | |
| 1052 | + | const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--"; | |
| 1053 | + | const position = argv.indexOf(prefix + flag); | |
| 1054 | + | const terminatorPosition = argv.indexOf("--"); | |
| 1055 | + | return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition); | |
| 1056 | + | } | |
| 1057 | + | var { env } = process2; | |
| 1058 | + | var flagForceColor; | |
| 1059 | + | if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) { | |
| 1060 | + | flagForceColor = 0; | |
| 1061 | + | } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) { | |
| 1062 | + | flagForceColor = 1; | |
| 1063 | + | } | |
| 1064 | + | function envForceColor() { | |
| 1065 | + | if ("FORCE_COLOR" in env) { | |
| 1066 | + | if (env.FORCE_COLOR === "true") { | |
| 1067 | + | return 1; | |
| 1068 | + | } | |
| 1069 | + | if (env.FORCE_COLOR === "false") { | |
| 1070 | + | return 0; | |
| 1071 | + | } | |
| 1072 | + | return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3); | |
| 1073 | + | } | |
| 1074 | + | } | |
| 1075 | + | function translateLevel(level) { | |
| 1076 | + | if (level === 0) { | |
| 1077 | + | return false; | |
| 1078 | + | } | |
| 1079 | + | return { | |
| 1080 | + | level, | |
| 1081 | + | hasBasic: true, | |
| 1082 | + | has256: level >= 2, | |
| 1083 | + | has16m: level >= 3 | |
| 1084 | + | }; | |
| 1085 | + | } | |
| 1086 | + | function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) { | |
| 1087 | + | const noFlagForceColor = envForceColor(); | |
| 1088 | + | if (noFlagForceColor !== void 0) { | |
| 1089 | + | flagForceColor = noFlagForceColor; | |
| 1090 | + | } | |
| 1091 | + | const forceColor = sniffFlags ? flagForceColor : noFlagForceColor; | |
| 1092 | + | if (forceColor === 0) { | |
| 1093 | + | return 0; | |
| 1094 | + | } | |
| 1095 | + | if (sniffFlags) { | |
| 1096 | + | if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) { | |
| 1097 | + | return 3; | |
| 1098 | + | } | |
| 1099 | + | if (hasFlag("color=256")) { | |
| 1100 | + | return 2; | |
| 1101 | + | } | |
| 1102 | + | } | |
| 1103 | + | if ("TF_BUILD" in env && "AGENT_NAME" in env) { | |
| 1104 | + | return 1; | |
| 1105 | + | } | |
| 1106 | + | if (haveStream && !streamIsTTY && forceColor === void 0) { | |
| 1107 | + | return 0; | |
| 1108 | + | } | |
| 1109 | + | const min = forceColor || 0; | |
| 1110 | + | if (env.TERM === "dumb") { | |
| 1111 | + | return min; | |
| 1112 | + | } | |
| 1113 | + | if (process2.platform === "win32") { | |
| 1114 | + | const osRelease = os.release().split("."); | |
| 1115 | + | if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) { | |
| 1116 | + | return Number(osRelease[2]) >= 14931 ? 3 : 2; | |
| 1117 | + | } | |
| 1118 | + | return 1; | |
| 1119 | + | } | |
| 1120 | + | if ("CI" in env) { | |
| 1121 | + | if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) { | |
| 1122 | + | return 3; | |
| 1123 | + | } | |
| 1124 | + | if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") { | |
| 1125 | + | return 1; | |
| 1126 | + | } | |
| 1127 | + | return min; | |
| 1128 | + | } | |
| 1129 | + | if ("TEAMCITY_VERSION" in env) { | |
| 1130 | + | return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0; | |
| 1131 | + | } | |
| 1132 | + | if (env.COLORTERM === "truecolor") { | |
| 1133 | + | return 3; | |
| 1134 | + | } | |
| 1135 | + | if (env.TERM === "xterm-kitty") { | |
| 1136 | + | return 3; | |
| 1137 | + | } | |
| 1138 | + | if ("TERM_PROGRAM" in env) { | |
| 1139 | + | const version2 = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10); | |
| 1140 | + | switch (env.TERM_PROGRAM) { | |
| 1141 | + | case "iTerm.app": { | |
| 1142 | + | return version2 >= 3 ? 3 : 2; | |
| 1143 | + | } | |
| 1144 | + | case "Apple_Terminal": { | |
| 1145 | + | return 2; | |
| 1146 | + | } | |
| 1147 | + | } | |
| 1148 | + | } | |
| 1149 | + | if (/-256(color)?$/i.test(env.TERM)) { | |
| 1150 | + | return 2; | |
| 1151 | + | } | |
| 1152 | + | if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) { | |
| 1153 | + | return 1; | |
| 1154 | + | } | |
| 1155 | + | if ("COLORTERM" in env) { | |
| 1156 | + | return 1; | |
| 1157 | + | } | |
| 1158 | + | return min; | |
| 1159 | + | } | |
| 1160 | + | function createSupportsColor(stream, options = {}) { | |
| 1161 | + | const level = _supportsColor(stream, { | |
| 1162 | + | streamIsTTY: stream && stream.isTTY, | |
| 1163 | + | ...options | |
| 1164 | + | }); | |
| 1165 | + | return translateLevel(level); | |
| 1166 | + | } | |
| 1167 | + | var supportsColor = { | |
| 1168 | + | stdout: createSupportsColor({ isTTY: tty.isatty(1) }), | |
| 1169 | + | stderr: createSupportsColor({ isTTY: tty.isatty(2) }) | |
| 1170 | + | }; | |
| 1171 | + | var supports_color_default = supportsColor; | |
| 1172 | + | ||
| 1173 | + | // node_modules/chalk/source/utilities.js | |
| 1174 | + | function stringReplaceAll2(string, substring, replacer) { | |
| 1175 | + | let index = string.indexOf(substring); | |
| 1176 | + | if (index === -1) { | |
| 1177 | + | return string; | |
| 1178 | + | } | |
| 1179 | + | const substringLength = substring.length; | |
| 1180 | + | let endIndex = 0; | |
| 1181 | + | let returnValue = ""; | |
| 1182 | + | do { | |
| 1183 | + | returnValue += string.slice(endIndex, index) + substring + replacer; | |
| 1184 | + | endIndex = index + substringLength; | |
| 1185 | + | index = string.indexOf(substring, endIndex); | |
| 1186 | + | } while (index !== -1); | |
| 1187 | + | returnValue += string.slice(endIndex); | |
| 1188 | + | return returnValue; | |
| 1189 | + | } | |
| 1190 | + | function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) { | |
| 1191 | + | let endIndex = 0; | |
| 1192 | + | let returnValue = ""; | |
| 1193 | + | do { | |
| 1194 | + | const gotCR = string[index - 1] === "\r"; | |
| 1195 | + | returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? "\r\n" : "\n") + postfix; | |
| 1196 | + | endIndex = index + 1; | |
| 1197 | + | index = string.indexOf("\n", endIndex); | |
| 1198 | + | } while (index !== -1); | |
| 1199 | + | returnValue += string.slice(endIndex); | |
| 1200 | + | return returnValue; | |
| 1201 | + | } | |
| 1202 | + | ||
| 1203 | + | // node_modules/chalk/source/index.js | |
| 1204 | + | var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default; | |
| 1205 | + | var GENERATOR = Symbol("GENERATOR"); | |
| 1206 | + | var STYLER = Symbol("STYLER"); | |
| 1207 | + | var IS_EMPTY = Symbol("IS_EMPTY"); | |
| 1208 | + | var levelMapping = [ | |
| 1209 | + | "ansi", | |
| 1210 | + | "ansi", | |
| 1211 | + | "ansi256", | |
| 1212 | + | "ansi16m" | |
| 1213 | + | ]; | |
| 1214 | + | var styles2 = /* @__PURE__ */ Object.create(null); | |
| 1215 | + | var applyOptions = (object2, options = {}) => { | |
| 1216 | + | if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) { | |
| 1217 | + | throw new Error("The `level` option should be an integer from 0 to 3"); | |
| 1218 | + | } | |
| 1219 | + | const colorLevel = stdoutColor ? stdoutColor.level : 0; | |
| 1220 | + | object2.level = options.level === void 0 ? colorLevel : options.level; | |
| 1221 | + | }; | |
| 1222 | + | var chalkFactory = (options) => { | |
| 1223 | + | const chalk2 = (...strings) => strings.join(" "); | |
| 1224 | + | applyOptions(chalk2, options); | |
| 1225 | + | Object.setPrototypeOf(chalk2, createChalk.prototype); | |
| 1226 | + | return chalk2; | |
| 1227 | + | }; | |
| 1228 | + | function createChalk(options) { | |
| 1229 | + | return chalkFactory(options); | |
| 1230 | + | } | |
| 1231 | + | Object.setPrototypeOf(createChalk.prototype, Function.prototype); | |
| 1232 | + | for (const [styleName, style] of Object.entries(ansi_styles_default)) { | |
| 1233 | + | styles2[styleName] = { | |
| 1234 | + | get() { | |
| 1235 | + | const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]); | |
| 1236 | + | Object.defineProperty(this, styleName, { value: builder }); | |
| 1237 | + | return builder; | |
| 1238 | + | } | |
| 1239 | + | }; | |
| 1240 | + | } | |
| 1241 | + | styles2.visible = { | |
| 1242 | + | get() { | |
| 1243 | + | const builder = createBuilder(this, this[STYLER], true); | |
| 1244 | + | Object.defineProperty(this, "visible", { value: builder }); | |
| 1245 | + | return builder; | |
| 1246 | + | } | |
| 1247 | + | }; | |
| 1248 | + | var getModelAnsi = (model, level, type, ...arguments_) => { | |
| 1249 | + | if (model === "rgb") { | |
| 1250 | + | if (level === "ansi16m") { | |
| 1251 | + | return ansi_styles_default[type].ansi16m(...arguments_); | |
| 1252 | + | } | |
| 1253 | + | if (level === "ansi256") { | |
| 1254 | + | return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_)); | |
| 1255 | + | } | |
| 1256 | + | return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_)); | |
| 1257 | + | } | |
| 1258 | + | if (model === "hex") { | |
| 1259 | + | return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_)); | |
| 1260 | + | } | |
| 1261 | + | return ansi_styles_default[type][model](...arguments_); | |
| 1262 | + | }; | |
| 1263 | + | var usedModels = ["rgb", "hex", "ansi256"]; | |
| 1264 | + | for (const model of usedModels) { | |
| 1265 | + | styles2[model] = { | |
| 1266 | + | get() { | |
| 1267 | + | const { level } = this; | |
| 1268 | + | return function(...arguments_) { | |
| 1269 | + | const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]); | |
| 1270 | + | return createBuilder(this, styler, this[IS_EMPTY]); | |
| 1271 | + | }; | |
| 1272 | + | } | |
| 1273 | + | }; | |
| 1274 | + | const bgModel = "bg" + model[0].toUpperCase() + model.slice(1); | |
| 1275 | + | styles2[bgModel] = { | |
| 1276 | + | get() { | |
| 1277 | + | const { level } = this; | |
| 1278 | + | return function(...arguments_) { | |
| 1279 | + | const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]); | |
| 1280 | + | return createBuilder(this, styler, this[IS_EMPTY]); | |
| 1281 | + | }; | |
| 1282 | + | } | |
| 1283 | + | }; | |
| 1284 | + | } | |
| 1285 | + | var proto = Object.defineProperties(() => { | |
| 1286 | + | }, { | |
| 1287 | + | ...styles2, | |
| 1288 | + | level: { | |
| 1289 | + | enumerable: true, | |
| 1290 | + | get() { | |
| 1291 | + | return this[GENERATOR].level; | |
| 1292 | + | }, | |
| 1293 | + | set(level) { | |
| 1294 | + | this[GENERATOR].level = level; | |
| 1295 | + | } | |
| 1296 | + | } | |
| 1297 | + | }); | |
| 1298 | + | var createStyler = (open, close, parent) => { | |
| 1299 | + | let openAll; | |
| 1300 | + | let closeAll; | |
| 1301 | + | if (parent === void 0) { | |
| 1302 | + | openAll = open; | |
| 1303 | + | closeAll = close; | |
| 1304 | + | } else { | |
| 1305 | + | openAll = parent.openAll + open; | |
| 1306 | + | closeAll = close + parent.closeAll; | |
| 1307 | + | } | |
| 1308 | + | return { | |
| 1309 | + | open, | |
| 1310 | + | close, | |
| 1311 | + | openAll, | |
| 1312 | + | closeAll, | |
| 1313 | + | parent | |
| 1314 | + | }; | |
| 1315 | + | }; | |
| 1316 | + | var createBuilder = (self, _styler, _isEmpty) => { | |
| 1317 | + | const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" ")); | |
| 1318 | + | Object.setPrototypeOf(builder, proto); | |
| 1319 | + | builder[GENERATOR] = self; | |
| 1320 | + | builder[STYLER] = _styler; | |
| 1321 | + | builder[IS_EMPTY] = _isEmpty; | |
| 1322 | + | return builder; | |
| 1323 | + | }; | |
| 1324 | + | var applyStyle = (self, string) => { | |
| 1325 | + | if (self.level <= 0 || !string) { | |
| 1326 | + | return self[IS_EMPTY] ? "" : string; | |
| 1327 | + | } | |
| 1328 | + | let styler = self[STYLER]; | |
| 1329 | + | if (styler === void 0) { | |
| 1330 | + | return string; | |
| 1331 | + | } | |
| 1332 | + | const { openAll, closeAll } = styler; | |
| 1333 | + | if (string.includes("\x1B")) { | |
| 1334 | + | while (styler !== void 0) { | |
| 1335 | + | string = stringReplaceAll2(string, styler.close, styler.open); | |
| 1336 | + | styler = styler.parent; | |
| 1337 | + | } | |
| 1338 | + | } | |
| 1339 | + | const lfIndex = string.indexOf("\n"); | |
| 1340 | + | if (lfIndex !== -1) { | |
| 1341 | + | string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex); | |
| 1342 | + | } | |
| 1343 | + | return openAll + string + closeAll; | |
| 1344 | + | }; | |
| 1345 | + | Object.defineProperties(createChalk.prototype, styles2); | |
| 1346 | + | var chalk = createChalk(); | |
| 1347 | + | var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 }); | |
| 1348 | + | var source_default = chalk; | |
| 1349 | + | ||
| 1350 | + | // node_modules/leven/index.js | |
| 1351 | + | var array = []; | |
| 1352 | + | var characterCodeCache = []; | |
| 1353 | + | function leven(first, second) { | |
| 1354 | + | if (first === second) { | |
| 1355 | + | return 0; | |
| 1356 | + | } | |
| 1357 | + | const swap = first; | |
| 1358 | + | if (first.length > second.length) { | |
| 1359 | + | first = second; | |
| 1360 | + | second = swap; | |
| 1361 | + | } | |
| 1362 | + | let firstLength = first.length; | |
| 1363 | + | let secondLength = second.length; | |
| 1364 | + | while (firstLength > 0 && first.charCodeAt(~-firstLength) === second.charCodeAt(~-secondLength)) { | |
| 1365 | + | firstLength--; | |
| 1366 | + | secondLength--; | |
| 1367 | + | } | |
| 1368 | + | let start = 0; | |
| 1369 | + | while (start < firstLength && first.charCodeAt(start) === second.charCodeAt(start)) { | |
| 1370 | + | start++; | |
| 1371 | + | } | |
| 1372 | + | firstLength -= start; | |
| 1373 | + | secondLength -= start; | |
| 1374 | + | if (firstLength === 0) { | |
| 1375 | + | return secondLength; | |
| 1376 | + | } | |
| 1377 | + | let bCharacterCode; | |
| 1378 | + | let result; | |
| 1379 | + | let temporary; | |
| 1380 | + | let temporary2; | |
| 1381 | + | let index = 0; | |
| 1382 | + | let index2 = 0; | |
| 1383 | + | while (index < firstLength) { | |
| 1384 | + | characterCodeCache[index] = first.charCodeAt(start + index); | |
| 1385 | + | array[index] = ++index; | |
| 1386 | + | } | |
| 1387 | + | while (index2 < secondLength) { | |
| 1388 | + | bCharacterCode = second.charCodeAt(start + index2); | |
| 1389 | + | temporary = index2++; | |
| 1390 | + | result = index2; | |
| 1391 | + | for (index = 0; index < firstLength; index++) { | |
| 1392 | + | temporary2 = bCharacterCode === characterCodeCache[index] ? temporary : temporary + 1; | |
| 1393 | + | temporary = array[index]; | |
| 1394 | + | result = array[index] = temporary > result ? temporary2 > result ? result + 1 : temporary2 : temporary2 > temporary ? temporary + 1 : temporary2; | |
| 1395 | + | } | |
| 1396 | + | } | |
| 1397 | + | return result; | |
| 1398 | + | } | |
| 1399 | + | ||
| 1400 | + | // src/cli/options/normalize-cli-options.js | |
| 1401 | + | var descriptor = { | |
| 1402 | + | key: (key) => key.length === 1 ? `-${key}` : `--${key}`, | |
| 1403 | + | value: (value) => vnopts.apiDescriptor.value(value), | |
| 1404 | + | pair: ({ key, value }) => value === false ? `--no-${key}` : value === true ? descriptor.key(key) : value === "" ? `${descriptor.key(key)} without an argument` : `${descriptor.key(key)}=${value}` | |
| 1405 | + | }; | |
| 1406 | + | var _flags; | |
| 1407 | + | var FlagSchema = class extends vnopts.ChoiceSchema { | |
| 1408 | + | constructor({ name, flags }) { | |
| 1409 | + | super({ name, choices: flags }); | |
| 1410 | + | __privateAdd(this, _flags, []); | |
| 1411 | + | __privateSet(this, _flags, [...flags].sort()); | |
| 1412 | + | } | |
| 1413 | + | preprocess(value, utils) { | |
| 1414 | + | if (typeof value === "string" && value.length > 0 && !__privateGet(this, _flags).includes(value)) { | |
| 1415 | + | const suggestion = __privateGet(this, _flags).find((flag) => leven(flag, value) < 3); | |
| 1416 | + | if (suggestion) { | |
| 1417 | + | utils.logger.warn( | |
| 1418 | + | [ | |
| 1419 | + | `Unknown flag ${source_default.yellow(utils.descriptor.value(value))},`, | |
| 1420 | + | `did you mean ${source_default.blue(utils.descriptor.value(suggestion))}?` | |
| 1421 | + | ].join(" ") | |
| 1422 | + | ); | |
| 1423 | + | return suggestion; | |
| 1424 | + | } | |
| 1425 | + | } | |
| 1426 | + | return value; | |
| 1427 | + | } | |
| 1428 | + | expected() { | |
| 1429 | + | return "a flag"; | |
| 1430 | + | } | |
| 1431 | + | }; | |
| 1432 | + | _flags = new WeakMap(); | |
| 1433 | + | function normalizeCliOptions(options, optionInfos, opts) { | |
| 1434 | + | return normalizeOptions(options, optionInfos, { | |
| 1435 | + | ...opts, | |
| 1436 | + | isCLI: true, | |
| 1437 | + | FlagSchema, | |
| 1438 | + | descriptor | |
| 1439 | + | }); | |
| 1440 | + | } | |
| 1441 | + | var normalize_cli_options_default = normalizeCliOptions; | |
| 1442 | + | ||
| 1443 | + | // src/cli/options/parse-cli-arguments.js | |
| 1444 | + | function parseArgv(rawArguments, detailedOptions, logger, keys2) { | |
| 1445 | + | var _a; | |
| 1446 | + | const minimistOptions = createMinimistOptions(detailedOptions); | |
| 1447 | + | let argv = minimistParse(rawArguments, minimistOptions); | |
| 1448 | + | if (keys2) { | |
| 1449 | + | detailedOptions = detailedOptions.filter( | |
| 1450 | + | (option) => keys2.includes(option.name) | |
| 1451 | + | ); | |
| 1452 | + | argv = pick(argv, keys2); | |
| 1453 | + | } | |
| 1454 | + | const normalized = normalize_cli_options_default(argv, detailedOptions, { logger }); | |
| 1455 | + | return { | |
| 1456 | + | ...Object.fromEntries( | |
| 1457 | + | Object.entries(normalized).map(([key, value]) => { | |
| 1458 | + | const option = detailedOptions.find(({ name }) => name === key) || {}; | |
| 1459 | + | return [option.forwardToApi || camelCase(key), value]; | |
| 1460 | + | }) | |
| 1461 | + | ), | |
| 1462 | + | _: (_a = normalized._) == null ? void 0 : _a.map(String), | |
| 1463 | + | get __raw() { | |
| 1464 | + | return argv; | |
| 1465 | + | } | |
| 1466 | + | }; | |
| 1467 | + | } | |
| 1468 | + | var { detailedOptions: detailedOptionsWithoutPlugins } = getContextOptionsWithoutPlugins(); | |
| 1469 | + | function parseArgvWithoutPlugins(rawArguments, logger, keys2) { | |
| 1470 | + | return parseArgv( | |
| 1471 | + | rawArguments, | |
| 1472 | + | detailedOptionsWithoutPlugins, | |
| 1473 | + | logger, | |
| 1474 | + | typeof keys2 === "string" ? [keys2] : keys2 | |
| 1475 | + | ); | |
| 1476 | + | } | |
| 1477 | + | ||
| 1478 | + | // src/cli/context.js | |
| 1479 | + | var _stack; | |
| 1480 | + | var Context = class { | |
| 1481 | + | constructor({ rawArguments, logger }) { | |
| 1482 | + | __privateAdd(this, _stack, []); | |
| 1483 | + | this.rawArguments = rawArguments; | |
| 1484 | + | this.logger = logger; | |
| 1485 | + | } | |
| 1486 | + | async init() { | |
| 1487 | + | const { rawArguments, logger } = this; | |
| 1488 | + | const { plugins } = parseArgvWithoutPlugins(rawArguments, logger, [ | |
| 1489 | + | "plugin" | |
| 1490 | + | ]); | |
| 1491 | + | await this.pushContextPlugins(plugins); | |
| 1492 | + | const argv = parseArgv(rawArguments, this.detailedOptions, logger); | |
| 1493 | + | this.argv = argv; | |
| 1494 | + | this.filePatterns = argv._; | |
| 1495 | + | } | |
| 1496 | + | /** | |
| 1497 | + | * @param {string[]} plugins | |
| 1498 | + | */ | |
| 1499 | + | async pushContextPlugins(plugins) { | |
| 1500 | + | const options = await getContextOptions(plugins); | |
| 1501 | + | __privateGet(this, _stack).push(options); | |
| 1502 | + | Object.assign(this, options); | |
| 1503 | + | } | |
| 1504 | + | popContextPlugins() { | |
| 1505 | + | __privateGet(this, _stack).pop(); | |
| 1506 | + | Object.assign(this, at_default( | |
| 1507 | + | /* isOptionalObject */ | |
| 1508 | + | false, | |
| 1509 | + | __privateGet(this, _stack), | |
| 1510 | + | -1 | |
| 1511 | + | )); | |
| 1512 | + | } | |
| 1513 | + | // eslint-disable-next-line getter-return | |
| 1514 | + | get performanceTestFlag() { | |
| 1515 | + | const { debugBenchmark, debugRepeat } = this.argv; | |
| 1516 | + | if (debugBenchmark) { | |
| 1517 | + | return { | |
| 1518 | + | name: "--debug-benchmark", | |
| 1519 | + | debugBenchmark: true | |
| 1520 | + | }; | |
| 1521 | + | } | |
| 1522 | + | if (debugRepeat > 0) { | |
| 1523 | + | return { | |
| 1524 | + | name: "--debug-repeat", | |
| 1525 | + | debugRepeat | |
| 1526 | + | }; | |
| 1527 | + | } | |
| 1528 | + | const { PRETTIER_PERF_REPEAT } = process.env; | |
| 1529 | + | if (PRETTIER_PERF_REPEAT && /^\d+$/u.test(PRETTIER_PERF_REPEAT)) { | |
| 1530 | + | return { | |
| 1531 | + | name: "PRETTIER_PERF_REPEAT (environment variable)", | |
| 1532 | + | debugRepeat: Number(PRETTIER_PERF_REPEAT) | |
| 1533 | + | }; | |
| 1534 | + | } | |
| 1535 | + | } | |
| 1536 | + | }; | |
| 1537 | + | _stack = new WeakMap(); | |
| 1538 | + | var context_default = Context; | |
| 1539 | + | ||
| 1540 | + | // src/cli/file-info.js | |
| 1541 | + | var import_fast_json_stable_stringify = __toESM(require_fast_json_stable_stringify(), 1); | |
| 1542 | + | import { format, getFileInfo } from "../index.mjs"; | |
| 1543 | + | async function logFileInfoOrDie(context) { | |
| 1544 | + | const { | |
| 1545 | + | fileInfo: file, | |
| 1546 | + | ignorePath, | |
| 1547 | + | withNodeModules, | |
| 1548 | + | plugins, | |
| 1549 | + | config | |
| 1550 | + | } = context.argv; | |
| 1551 | + | const fileInfo = await getFileInfo(file, { | |
| 1552 | + | ignorePath, | |
| 1553 | + | withNodeModules, | |
| 1554 | + | plugins, | |
| 1555 | + | resolveConfig: config !== false | |
| 1556 | + | }); | |
| 1557 | + | printToScreen(await format((0, import_fast_json_stable_stringify.default)(fileInfo), { parser: "json" })); | |
| 1558 | + | } | |
| 1559 | + | var file_info_default = logFileInfoOrDie; | |
| 1560 | + | ||
| 1561 | + | // src/cli/find-config-path.js | |
| 1562 | + | import path2 from "path"; | |
| 1563 | + | import { resolveConfigFile } from "../index.mjs"; | |
| 1564 | + | async function logResolvedConfigPathOrDie(context) { | |
| 1565 | + | const file = context.argv.findConfigPath; | |
| 1566 | + | const configFile = await resolveConfigFile(file); | |
| 1567 | + | if (configFile) { | |
| 1568 | + | printToScreen(normalizeToPosix(path2.relative(process.cwd(), configFile))); | |
| 1569 | + | } else { | |
| 1570 | + | throw new Error(`Can not find configure file for "${file}".`); | |
| 1571 | + | } | |
| 1572 | + | } | |
| 1573 | + | var find_config_path_default = logResolvedConfigPathOrDie; | |
| 1574 | + | ||
| 1575 | + | // src/cli/format.js | |
| 1576 | + | import fs8 from "fs/promises"; | |
| 1577 | + | import path11 from "path"; | |
| 1578 | + | import * as prettier from "../index.mjs"; | |
| 1579 | + | ||
| 1580 | + | // src/cli/expand-patterns.js | |
| 1581 | + | import path3 from "path"; | |
| 1582 | + | async function* expandPatterns(context) { | |
| 1583 | + | const seen = /* @__PURE__ */ new Set(); | |
| 1584 | + | let noResults = true; | |
| 1585 | + | for await (const { filePath, ignoreUnknown, error } of expandPatternsInternal( | |
| 1586 | + | context | |
| 1587 | + | )) { | |
| 1588 | + | noResults = false; | |
| 1589 | + | if (error) { | |
| 1590 | + | yield { error }; | |
| 1591 | + | continue; | |
| 1592 | + | } | |
| 1593 | + | const filename = path3.resolve(filePath); | |
| 1594 | + | if (seen.has(filename)) { | |
| 1595 | + | continue; | |
| 1596 | + | } | |
| 1597 | + | seen.add(filename); | |
| 1598 | + | yield { filename, ignoreUnknown }; | |
| 1599 | + | } | |
| 1600 | + | if (noResults && context.argv.errorOnUnmatchedPattern !== false) { | |
| 1601 | + | yield { | |
| 1602 | + | error: `No matching files. Patterns: ${context.filePatterns.join(" ")}` | |
| 1603 | + | }; | |
| 1604 | + | } | |
| 1605 | + | } | |
| 1606 | + | async function* expandPatternsInternal(context) { | |
| 1607 | + | const silentlyIgnoredDirs = [".git", ".sl", ".svn", ".hg", ".jj"]; | |
| 1608 | + | if (context.argv.withNodeModules !== true) { | |
| 1609 | + | silentlyIgnoredDirs.push("node_modules"); | |
| 1610 | + | } | |
| 1611 | + | const globOptions = { | |
| 1612 | + | dot: true, | |
| 1613 | + | ignore: silentlyIgnoredDirs.map((dir) => "**/" + dir), | |
| 1614 | + | followSymbolicLinks: false | |
| 1615 | + | }; | |
| 1616 | + | const cwd2 = process.cwd(); | |
| 1617 | + | const entries = []; | |
| 1618 | + | for (const pattern of context.filePatterns) { | |
| 1619 | + | const absolutePath = path3.resolve(cwd2, pattern); | |
| 1620 | + | if (containsIgnoredPathSegment(absolutePath, cwd2, silentlyIgnoredDirs)) { | |
| 1621 | + | continue; | |
| 1622 | + | } | |
| 1623 | + | const stat = await lstatSafe(absolutePath); | |
| 1624 | + | if (stat) { | |
| 1625 | + | if (stat.isSymbolicLink()) { | |
| 1626 | + | if (context.argv.errorOnUnmatchedPattern !== false) { | |
| 1627 | + | yield { | |
| 1628 | + | error: `Explicitly specified pattern "${pattern}" is a symbolic link.` | |
| 1629 | + | }; | |
| 1630 | + | } else { | |
| 1631 | + | context.logger.debug( | |
| 1632 | + | `Skipping pattern "${pattern}", as it is a symbolic link.` | |
| 1633 | + | ); | |
| 1634 | + | } | |
| 1635 | + | } else if (stat.isFile()) { | |
| 1636 | + | entries.push({ | |
| 1637 | + | type: "file", | |
| 1638 | + | glob: escapePathForGlob(fixWindowsSlashes(pattern)), | |
| 1639 | + | input: pattern | |
| 1640 | + | }); | |
| 1641 | + | } else if (stat.isDirectory()) { | |
| 1642 | + | const relativePath = path3.relative(cwd2, absolutePath) || "."; | |
| 1643 | + | const prefix = escapePathForGlob(fixWindowsSlashes(relativePath)); | |
| 1644 | + | entries.push({ | |
| 1645 | + | type: "dir", | |
| 1646 | + | glob: `${prefix}/**/*`, | |
| 1647 | + | input: pattern, | |
| 1648 | + | ignoreUnknown: true | |
| 1649 | + | }); | |
| 1650 | + | } | |
| 1651 | + | } else if (pattern[0] === "!") { | |
| 1652 | + | globOptions.ignore.push(fixWindowsSlashes(pattern.slice(1))); | |
| 1653 | + | } else { | |
| 1654 | + | entries.push({ | |
| 1655 | + | type: "glob", | |
| 1656 | + | glob: fixWindowsSlashes(pattern), | |
| 1657 | + | input: pattern | |
| 1658 | + | }); | |
| 1659 | + | } | |
| 1660 | + | } | |
| 1661 | + | for (const { type, glob, input, ignoreUnknown } of entries) { | |
| 1662 | + | let result; | |
| 1663 | + | try { | |
| 1664 | + | result = await fastGlob(glob, globOptions); | |
| 1665 | + | } catch ({ message }) { | |
| 1666 | + | yield { | |
| 1667 | + | error: `${errorMessages.globError[type]}: "${input}". | |
| 1668 | + | ${message}` | |
| 1669 | + | }; | |
| 1670 | + | continue; | |
| 1671 | + | } | |
| 1672 | + | if (result.length === 0) { | |
| 1673 | + | if (context.argv.errorOnUnmatchedPattern !== false) { | |
| 1674 | + | yield { error: `${errorMessages.emptyResults[type]}: "${input}".` }; | |
| 1675 | + | } | |
| 1676 | + | } else { | |
| 1677 | + | yield* sortPaths(result).map((filePath) => ({ filePath, ignoreUnknown })); | |
| 1678 | + | } | |
| 1679 | + | } | |
| 1680 | + | } | |
| 1681 | + | var errorMessages = { | |
| 1682 | + | globError: { | |
| 1683 | + | file: "Unable to resolve file", | |
| 1684 | + | dir: "Unable to expand directory", | |
| 1685 | + | glob: "Unable to expand glob pattern" | |
| 1686 | + | }, | |
| 1687 | + | emptyResults: { | |
| 1688 | + | file: "Explicitly specified file was ignored due to negative glob patterns", | |
| 1689 | + | dir: "No supported files were found in the directory", | |
| 1690 | + | glob: "No files matching the pattern were found" | |
| 1691 | + | } | |
| 1692 | + | }; | |
| 1693 | + | function containsIgnoredPathSegment(absolutePath, cwd2, ignoredDirectories) { | |
| 1694 | + | return path3.relative(cwd2, absolutePath).split(path3.sep).some((dir) => ignoredDirectories.includes(dir)); | |
| 1695 | + | } | |
| 1696 | + | function sortPaths(paths) { | |
| 1697 | + | return paths.sort((a, b) => a.localeCompare(b)); | |
| 1698 | + | } | |
| 1699 | + | function escapePathForGlob(path12) { | |
| 1700 | + | return string_replace_all_default( | |
| 1701 | + | /* isOptionalObject */ | |
| 1702 | + | false, | |
| 1703 | + | string_replace_all_default( | |
| 1704 | + | /* isOptionalObject */ | |
| 1705 | + | false, | |
| 1706 | + | fastGlob.escapePath( | |
| 1707 | + | string_replace_all_default( | |
| 1708 | + | /* isOptionalObject */ | |
| 1709 | + | false, | |
| 1710 | + | path12, | |
| 1711 | + | "\\", | |
| 1712 | + | "\0" | |
| 1713 | + | ) | |
| 1714 | + | // Workaround for fast-glob#262 (part 1) | |
| 1715 | + | ), | |
| 1716 | + | String.raw`\!`, | |
| 1717 | + | "@(!)" | |
| 1718 | + | ), | |
| 1719 | + | "\0", | |
| 1720 | + | String.raw`@(\\)` | |
| 1721 | + | ); | |
| 1722 | + | } | |
| 1723 | + | var fixWindowsSlashes = normalizeToPosix; | |
| 1724 | + | ||
| 1725 | + | // src/cli/find-cache-file.js | |
| 1726 | + | import fs4 from "fs/promises"; | |
| 1727 | + | import os2 from "os"; | |
| 1728 | + | import path8 from "path"; | |
| 1729 | + | ||
| 1730 | + | // node_modules/find-cache-dir/index.js | |
| 1731 | + | var import_common_path_prefix = __toESM(require_common_path_prefix(), 1); | |
| 1732 | + | import process4 from "process"; | |
| 1733 | + | import path7 from "path"; | |
| 1734 | + | import fs3 from "fs"; | |
| 1735 | + | ||
| 1736 | + | // node_modules/pkg-dir/index.js | |
| 1737 | + | import path6 from "path"; | |
| 1738 | + | ||
| 1739 | + | // node_modules/pkg-dir/node_modules/find-up/index.js | |
| 1740 | + | import path5 from "path"; | |
| 1741 | + | import { fileURLToPath as fileURLToPath2 } from "url"; | |
| 1742 | + | ||
| 1743 | + | // node_modules/locate-path/index.js | |
| 1744 | + | import process3 from "process"; | |
| 1745 | + | import path4 from "path"; | |
| 1746 | + | import fs2, { promises as fsPromises } from "fs"; | |
| 1747 | + | import { fileURLToPath } from "url"; | |
| 1748 | + | var typeMappings = { | |
| 1749 | + | directory: "isDirectory", | |
| 1750 | + | file: "isFile" | |
| 1751 | + | }; | |
| 1752 | + | function checkType(type) { | |
| 1753 | + | if (Object.hasOwnProperty.call(typeMappings, type)) { | |
| 1754 | + | return; | |
| 1755 | + | } | |
| 1756 | + | throw new Error(`Invalid type specified: ${type}`); | |
| 1757 | + | } | |
| 1758 | + | var matchType = (type, stat) => stat[typeMappings[type]](); | |
| 1759 | + | var toPath = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath; | |
| 1760 | + | function locatePathSync(paths, { | |
| 1761 | + | cwd: cwd2 = process3.cwd(), | |
| 1762 | + | type = "file", | |
| 1763 | + | allowSymlinks = true | |
| 1764 | + | } = {}) { | |
| 1765 | + | checkType(type); | |
| 1766 | + | cwd2 = toPath(cwd2); | |
| 1767 | + | const statFunction = allowSymlinks ? fs2.statSync : fs2.lstatSync; | |
| 1768 | + | for (const path_ of paths) { | |
| 1769 | + | try { | |
| 1770 | + | const stat = statFunction(path4.resolve(cwd2, path_), { | |
| 1771 | + | throwIfNoEntry: false | |
| 1772 | + | }); | |
| 1773 | + | if (!stat) { | |
| 1774 | + | continue; | |
| 1775 | + | } | |
| 1776 | + | if (matchType(type, stat)) { | |
| 1777 | + | return path_; | |
| 1778 | + | } | |
| 1779 | + | } catch { | |
| 1780 | + | } | |
| 1781 | + | } | |
| 1782 | + | } | |
| 1783 | + | ||
| 1784 | + | // node_modules/pkg-dir/node_modules/find-up/index.js | |
| 1785 | + | var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath; | |
| 1786 | + | var findUpStop = Symbol("findUpStop"); | |
| 1787 | + | function findUpMultipleSync(name, options = {}) { | |
| 1788 | + | let directory = path5.resolve(toPath2(options.cwd) || ""); | |
| 1789 | + | const { root } = path5.parse(directory); | |
| 1790 | + | const stopAt = options.stopAt || root; | |
| 1791 | + | const limit = options.limit || Number.POSITIVE_INFINITY; | |
| 1792 | + | const paths = [name].flat(); | |
| 1793 | + | const runMatcher = (locateOptions) => { | |
| 1794 | + | if (typeof name !== "function") { | |
| 1795 | + | return locatePathSync(paths, locateOptions); | |
| 1796 | + | } | |
| 1797 | + | const foundPath = name(locateOptions.cwd); | |
| 1798 | + | if (typeof foundPath === "string") { | |
| 1799 | + | return locatePathSync([foundPath], locateOptions); | |
| 1800 | + | } | |
| 1801 | + | return foundPath; | |
| 1802 | + | }; | |
| 1803 | + | const matches = []; | |
| 1804 | + | while (true) { | |
| 1805 | + | const foundPath = runMatcher({ ...options, cwd: directory }); | |
| 1806 | + | if (foundPath === findUpStop) { | |
| 1807 | + | break; | |
| 1808 | + | } | |
| 1809 | + | if (foundPath) { | |
| 1810 | + | matches.push(path5.resolve(directory, foundPath)); | |
| 1811 | + | } | |
| 1812 | + | if (directory === stopAt || matches.length >= limit) { | |
| 1813 | + | break; | |
| 1814 | + | } | |
| 1815 | + | directory = path5.dirname(directory); | |
| 1816 | + | } | |
| 1817 | + | return matches; | |
| 1818 | + | } | |
| 1819 | + | function findUpSync(name, options = {}) { | |
| 1820 | + | const matches = findUpMultipleSync(name, { ...options, limit: 1 }); | |
| 1821 | + | return matches[0]; | |
| 1822 | + | } | |
| 1823 | + | ||
| 1824 | + | // node_modules/pkg-dir/index.js | |
| 1825 | + | function packageDirectorySync({ cwd: cwd2 } = {}) { | |
| 1826 | + | const filePath = findUpSync("package.json", { cwd: cwd2 }); | |
| 1827 | + | return filePath && path6.dirname(filePath); | |
| 1828 | + | } | |
| 1829 | + | ||
| 1830 | + | // node_modules/find-cache-dir/index.js | |
| 1831 | + | var { env: env2, cwd } = process4; | |
| 1832 | + | var isWritable = (path12) => { | |
| 1833 | + | try { | |
| 1834 | + | fs3.accessSync(path12, fs3.constants.W_OK); | |
| 1835 | + | return true; | |
| 1836 | + | } catch { | |
| 1837 | + | return false; | |
| 1838 | + | } | |
| 1839 | + | }; | |
| 1840 | + | function useDirectory(directory, options) { | |
| 1841 | + | if (options.create) { | |
| 1842 | + | fs3.mkdirSync(directory, { recursive: true }); | |
| 1843 | + | } | |
| 1844 | + | return directory; | |
| 1845 | + | } | |
| 1846 | + | function getNodeModuleDirectory(directory) { | |
| 1847 | + | const nodeModules = path7.join(directory, "node_modules"); | |
| 1848 | + | if (!isWritable(nodeModules) && (fs3.existsSync(nodeModules) || !isWritable(path7.join(directory)))) { | |
| 1849 | + | return; | |
| 1850 | + | } | |
| 1851 | + | return nodeModules; | |
| 1852 | + | } | |
| 1853 | + | function findCacheDirectory(options = {}) { | |
| 1854 | + | if (env2.CACHE_DIR && !["true", "false", "1", "0"].includes(env2.CACHE_DIR)) { | |
| 1855 | + | return useDirectory(path7.join(env2.CACHE_DIR, options.name), options); | |
| 1856 | + | } | |
| 1857 | + | let { cwd: directory = cwd(), files } = options; | |
| 1858 | + | if (files) { | |
| 1859 | + | if (!Array.isArray(files)) { | |
| 1860 | + | throw new TypeError(`Expected \`files\` option to be an array, got \`${typeof files}\`.`); | |
| 1861 | + | } | |
| 1862 | + | directory = (0, import_common_path_prefix.default)(files.map((file) => path7.resolve(directory, file))); | |
| 1863 | + | } | |
| 1864 | + | directory = packageDirectorySync({ cwd: directory }); | |
| 1865 | + | if (!directory) { | |
| 1866 | + | return; | |
| 1867 | + | } | |
| 1868 | + | const nodeModules = getNodeModuleDirectory(directory); | |
| 1869 | + | if (!nodeModules) { | |
| 1870 | + | return; | |
| 1871 | + | } | |
| 1872 | + | return useDirectory(path7.join(directory, "node_modules", ".cache", options.name), options); | |
| 1873 | + | } | |
| 1874 | + | ||
| 1875 | + | // src/cli/find-cache-file.js | |
| 1876 | + | function findDefaultCacheFile() { | |
| 1877 | + | const cacheDir = findCacheDirectory({ name: "prettier", create: true }) || os2.tmpdir(); | |
| 1878 | + | const cacheFilePath = path8.join(cacheDir, ".prettier-cache"); | |
| 1879 | + | return cacheFilePath; | |
| 1880 | + | } | |
| 1881 | + | async function findCacheFileFromOption(cacheLocation) { | |
| 1882 | + | const cacheFile = path8.resolve(cacheLocation); | |
| 1883 | + | const stat = await statSafe(cacheFile); | |
| 1884 | + | if (stat) { | |
| 1885 | + | if (stat.isDirectory()) { | |
| 1886 | + | throw new Error( | |
| 1887 | + | `Resolved --cache-location '${cacheFile}' is a directory` | |
| 1888 | + | ); | |
| 1889 | + | } | |
| 1890 | + | const data = await fs4.readFile(cacheFile, "utf8"); | |
| 1891 | + | if (!isJson(data)) { | |
| 1892 | + | throw new Error(`'${cacheFile}' isn't a valid JSON file`); | |
| 1893 | + | } | |
| 1894 | + | } | |
| 1895 | + | return cacheFile; | |
| 1896 | + | } | |
| 1897 | + | async function findCacheFile(cacheLocation) { | |
| 1898 | + | if (!cacheLocation) { | |
| 1899 | + | return findDefaultCacheFile(); | |
| 1900 | + | } | |
| 1901 | + | const cacheFile = await findCacheFileFromOption(cacheLocation); | |
| 1902 | + | return cacheFile; | |
| 1903 | + | } | |
| 1904 | + | var find_cache_file_default = findCacheFile; | |
| 1905 | + | ||
| 1906 | + | // src/cli/format-results-cache.js | |
| 1907 | + | var import_fast_json_stable_stringify2 = __toESM(require_fast_json_stable_stringify(), 1); | |
| 1908 | + | import fs7 from "fs"; | |
| 1909 | + | ||
| 1910 | + | // node_modules/file-entry-cache/dist/index.js | |
| 1911 | + | import crypto2 from "crypto"; | |
| 1912 | + | import fs6 from "fs"; | |
| 1913 | + | import path10 from "path"; | |
| 1914 | + | ||
| 1915 | + | // node_modules/file-entry-cache/node_modules/flat-cache/dist/index.js | |
| 1916 | + | import path9 from "path"; | |
| 1917 | + | import fs5 from "fs"; | |
| 1918 | + | ||
| 1919 | + | // node_modules/hookified/dist/node/index.js | |
| 1920 | + | var Eventified = class { | |
| 1921 | + | _eventListeners; | |
| 1922 | + | _maxListeners; | |
| 1923 | + | constructor() { | |
| 1924 | + | this._eventListeners = /* @__PURE__ */ new Map(); | |
| 1925 | + | this._maxListeners = 100; | |
| 1926 | + | } | |
| 1927 | + | /** | |
| 1928 | + | * Adds a handler function for a specific event that will run only once | |
| 1929 | + | * @param {string | symbol} eventName | |
| 1930 | + | * @param {EventListener} listener | |
| 1931 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 1932 | + | */ | |
| 1933 | + | once(eventName, listener) { | |
| 1934 | + | const onceListener = (...arguments_) => { | |
| 1935 | + | this.off(eventName, onceListener); | |
| 1936 | + | listener(...arguments_); | |
| 1937 | + | }; | |
| 1938 | + | this.on(eventName, onceListener); | |
| 1939 | + | return this; | |
| 1940 | + | } | |
| 1941 | + | /** | |
| 1942 | + | * Gets the number of listeners for a specific event. If no event is provided, it returns the total number of listeners | |
| 1943 | + | * @param {string} eventName The event name. Not required | |
| 1944 | + | * @returns {number} The number of listeners | |
| 1945 | + | */ | |
| 1946 | + | listenerCount(eventName) { | |
| 1947 | + | if (!eventName) { | |
| 1948 | + | return this.getAllListeners().length; | |
| 1949 | + | } | |
| 1950 | + | const listeners = this._eventListeners.get(eventName); | |
| 1951 | + | return listeners ? listeners.length : 0; | |
| 1952 | + | } | |
| 1953 | + | /** | |
| 1954 | + | * Gets an array of event names | |
| 1955 | + | * @returns {Array<string | symbol>} An array of event names | |
| 1956 | + | */ | |
| 1957 | + | eventNames() { | |
| 1958 | + | return Array.from(this._eventListeners.keys()); | |
| 1959 | + | } | |
| 1960 | + | /** | |
| 1961 | + | * Gets an array of listeners for a specific event. If no event is provided, it returns all listeners | |
| 1962 | + | * @param {string} [event] (Optional) The event name | |
| 1963 | + | * @returns {EventListener[]} An array of listeners | |
| 1964 | + | */ | |
| 1965 | + | rawListeners(event) { | |
| 1966 | + | if (!event) { | |
| 1967 | + | return this.getAllListeners(); | |
| 1968 | + | } | |
| 1969 | + | return this._eventListeners.get(event) ?? []; | |
| 1970 | + | } | |
| 1971 | + | /** | |
| 1972 | + | * Prepends a listener to the beginning of the listeners array for the specified event | |
| 1973 | + | * @param {string | symbol} eventName | |
| 1974 | + | * @param {EventListener} listener | |
| 1975 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 1976 | + | */ | |
| 1977 | + | prependListener(eventName, listener) { | |
| 1978 | + | const listeners = this._eventListeners.get(eventName) ?? []; | |
| 1979 | + | listeners.unshift(listener); | |
| 1980 | + | this._eventListeners.set(eventName, listeners); | |
| 1981 | + | return this; | |
| 1982 | + | } | |
| 1983 | + | /** | |
| 1984 | + | * Prepends a one-time listener to the beginning of the listeners array for the specified event | |
| 1985 | + | * @param {string | symbol} eventName | |
| 1986 | + | * @param {EventListener} listener | |
| 1987 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 1988 | + | */ | |
| 1989 | + | prependOnceListener(eventName, listener) { | |
| 1990 | + | const onceListener = (...arguments_) => { | |
| 1991 | + | this.off(eventName, onceListener); | |
| 1992 | + | listener(...arguments_); | |
| 1993 | + | }; | |
| 1994 | + | this.prependListener(eventName, onceListener); | |
| 1995 | + | return this; | |
| 1996 | + | } | |
| 1997 | + | /** | |
| 1998 | + | * Gets the maximum number of listeners that can be added for a single event | |
| 1999 | + | * @returns {number} The maximum number of listeners | |
| 2000 | + | */ | |
| 2001 | + | maxListeners() { | |
| 2002 | + | return this._maxListeners; | |
| 2003 | + | } | |
| 2004 | + | /** | |
| 2005 | + | * Adds a listener for a specific event. It is an alias for the on() method | |
| 2006 | + | * @param {string | symbol} event | |
| 2007 | + | * @param {EventListener} listener | |
| 2008 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 2009 | + | */ | |
| 2010 | + | addListener(event, listener) { | |
| 2011 | + | this.on(event, listener); | |
| 2012 | + | return this; | |
| 2013 | + | } | |
| 2014 | + | /** | |
| 2015 | + | * Adds a listener for a specific event | |
| 2016 | + | * @param {string | symbol} event | |
| 2017 | + | * @param {EventListener} listener | |
| 2018 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 2019 | + | */ | |
| 2020 | + | on(event, listener) { | |
| 2021 | + | if (!this._eventListeners.has(event)) { | |
| 2022 | + | this._eventListeners.set(event, []); | |
| 2023 | + | } | |
| 2024 | + | const listeners = this._eventListeners.get(event); | |
| 2025 | + | if (listeners) { | |
| 2026 | + | if (listeners.length >= this._maxListeners) { | |
| 2027 | + | console.warn(`MaxListenersExceededWarning: Possible event memory leak detected. ${listeners.length + 1} ${event} listeners added. Use setMaxListeners() to increase limit.`); | |
| 2028 | + | } | |
| 2029 | + | listeners.push(listener); | |
| 2030 | + | } | |
| 2031 | + | return this; | |
| 2032 | + | } | |
| 2033 | + | /** | |
| 2034 | + | * Removes a listener for a specific event. It is an alias for the off() method | |
| 2035 | + | * @param {string | symbol} event | |
| 2036 | + | * @param {EventListener} listener | |
| 2037 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 2038 | + | */ | |
| 2039 | + | removeListener(event, listener) { | |
| 2040 | + | this.off(event, listener); | |
| 2041 | + | return this; | |
| 2042 | + | } | |
| 2043 | + | /** | |
| 2044 | + | * Removes a listener for a specific event | |
| 2045 | + | * @param {string | symbol} event | |
| 2046 | + | * @param {EventListener} listener | |
| 2047 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 2048 | + | */ | |
| 2049 | + | off(event, listener) { | |
| 2050 | + | const listeners = this._eventListeners.get(event) ?? []; | |
| 2051 | + | const index = listeners.indexOf(listener); | |
| 2052 | + | if (index !== -1) { | |
| 2053 | + | listeners.splice(index, 1); | |
| 2054 | + | } | |
| 2055 | + | if (listeners.length === 0) { | |
| 2056 | + | this._eventListeners.delete(event); | |
| 2057 | + | } | |
| 2058 | + | return this; | |
| 2059 | + | } | |
| 2060 | + | /** | |
| 2061 | + | * Calls all listeners for a specific event | |
| 2062 | + | * @param {string | symbol} event | |
| 2063 | + | * @param arguments_ The arguments to pass to the listeners | |
| 2064 | + | * @returns {boolean} Returns true if the event had listeners, false otherwise | |
| 2065 | + | */ | |
| 2066 | + | emit(event, ...arguments_) { | |
| 2067 | + | let result = false; | |
| 2068 | + | const listeners = this._eventListeners.get(event); | |
| 2069 | + | if (listeners && listeners.length > 0) { | |
| 2070 | + | for (const listener of listeners) { | |
| 2071 | + | listener(...arguments_); | |
| 2072 | + | result = true; | |
| 2073 | + | } | |
| 2074 | + | } | |
| 2075 | + | return result; | |
| 2076 | + | } | |
| 2077 | + | /** | |
| 2078 | + | * Gets all listeners for a specific event. If no event is provided, it returns all listeners | |
| 2079 | + | * @param {string} [event] (Optional) The event name | |
| 2080 | + | * @returns {EventListener[]} An array of listeners | |
| 2081 | + | */ | |
| 2082 | + | listeners(event) { | |
| 2083 | + | return this._eventListeners.get(event) ?? []; | |
| 2084 | + | } | |
| 2085 | + | /** | |
| 2086 | + | * Removes all listeners for a specific event. If no event is provided, it removes all listeners | |
| 2087 | + | * @param {string} [event] (Optional) The event name | |
| 2088 | + | * @returns {IEventEmitter} returns the instance of the class for chaining | |
| 2089 | + | */ | |
| 2090 | + | removeAllListeners(event) { | |
| 2091 | + | if (event) { | |
| 2092 | + | this._eventListeners.delete(event); | |
| 2093 | + | } else { | |
| 2094 | + | this._eventListeners.clear(); | |
| 2095 | + | } | |
| 2096 | + | return this; | |
| 2097 | + | } | |
| 2098 | + | /** | |
| 2099 | + | * Sets the maximum number of listeners that can be added for a single event | |
| 2100 | + | * @param {number} n The maximum number of listeners | |
| 2101 | + | * @returns {void} | |
| 2102 | + | */ | |
| 2103 | + | setMaxListeners(n) { | |
| 2104 | + | this._maxListeners = n; | |
| 2105 | + | for (const listeners of this._eventListeners.values()) { | |
| 2106 | + | if (listeners.length > n) { | |
| 2107 | + | listeners.splice(n); | |
| 2108 | + | } | |
| 2109 | + | } | |
| 2110 | + | } | |
| 2111 | + | /** | |
| 2112 | + | * Gets all listeners | |
| 2113 | + | * @returns {EventListener[]} An array of listeners | |
| 2114 | + | */ | |
| 2115 | + | getAllListeners() { | |
| 2116 | + | let result = new Array(); | |
| 2117 | + | for (const listeners of this._eventListeners.values()) { | |
| 2118 | + | result = result.concat(listeners); | |
| 2119 | + | } | |
| 2120 | + | return result; | |
| 2121 | + | } | |
| 2122 | + | }; | |
| 2123 | + | var Hookified = class extends Eventified { | |
| 2124 | + | _hooks; | |
| 2125 | + | _throwHookErrors = false; | |
| 2126 | + | constructor(options) { | |
| 2127 | + | super(); | |
| 2128 | + | this._hooks = /* @__PURE__ */ new Map(); | |
| 2129 | + | if ((options == null ? void 0 : options.throwHookErrors) !== void 0) { | |
| 2130 | + | this._throwHookErrors = options.throwHookErrors; | |
| 2131 | + | } | |
| 2132 | + | } | |
| 2133 | + | /** | |
| 2134 | + | * Gets all hooks | |
| 2135 | + | * @returns {Map<string, Hook[]>} | |
| 2136 | + | */ | |
| 2137 | + | get hooks() { | |
| 2138 | + | return this._hooks; | |
| 2139 | + | } | |
| 2140 | + | /** | |
| 2141 | + | * Gets whether an error should be thrown when a hook throws an error. Default is false and only emits an error event. | |
| 2142 | + | * @returns {boolean} | |
| 2143 | + | */ | |
| 2144 | + | get throwHookErrors() { | |
| 2145 | + | return this._throwHookErrors; | |
| 2146 | + | } | |
| 2147 | + | /** | |
| 2148 | + | * Sets whether an error should be thrown when a hook throws an error. Default is false and only emits an error event. | |
| 2149 | + | * @param {boolean} value | |
| 2150 | + | */ | |
| 2151 | + | set throwHookErrors(value) { | |
| 2152 | + | this._throwHookErrors = value; | |
| 2153 | + | } | |
| 2154 | + | /** | |
| 2155 | + | * Adds a handler function for a specific event | |
| 2156 | + | * @param {string} event | |
| 2157 | + | * @param {Hook} handler - this can be async or sync | |
| 2158 | + | * @returns {void} | |
| 2159 | + | */ | |
| 2160 | + | onHook(event, handler) { | |
| 2161 | + | const eventHandlers = this._hooks.get(event); | |
| 2162 | + | if (eventHandlers) { | |
| 2163 | + | eventHandlers.push(handler); | |
| 2164 | + | } else { | |
| 2165 | + | this._hooks.set(event, [handler]); | |
| 2166 | + | } | |
| 2167 | + | } | |
| 2168 | + | /** | |
| 2169 | + | * Adds a handler function for a specific event that runs before all other handlers | |
| 2170 | + | * @param {string} event | |
| 2171 | + | * @param {Hook} handler - this can be async or sync | |
| 2172 | + | * @returns {void} | |
| 2173 | + | */ | |
| 2174 | + | prependHook(event, handler) { | |
| 2175 | + | const eventHandlers = this._hooks.get(event); | |
| 2176 | + | if (eventHandlers) { | |
| 2177 | + | eventHandlers.unshift(handler); | |
| 2178 | + | } else { | |
| 2179 | + | this._hooks.set(event, [handler]); | |
| 2180 | + | } | |
| 2181 | + | } | |
| 2182 | + | /** | |
| 2183 | + | * Adds a handler that only executes once for a specific event before all other handlers | |
| 2184 | + | * @param event | |
| 2185 | + | * @param handler | |
| 2186 | + | */ | |
| 2187 | + | prependOnceHook(event, handler) { | |
| 2188 | + | const hook = async (...arguments_) => { | |
| 2189 | + | this.removeHook(event, hook); | |
| 2190 | + | return handler(...arguments_); | |
| 2191 | + | }; | |
| 2192 | + | this.prependHook(event, hook); | |
| 2193 | + | } | |
| 2194 | + | /** | |
| 2195 | + | * Adds a handler that only executes once for a specific event | |
| 2196 | + | * @param event | |
| 2197 | + | * @param handler | |
| 2198 | + | */ | |
| 2199 | + | onceHook(event, handler) { | |
| 2200 | + | const hook = async (...arguments_) => { | |
| 2201 | + | this.removeHook(event, hook); | |
| 2202 | + | return handler(...arguments_); | |
| 2203 | + | }; | |
| 2204 | + | this.onHook(event, hook); | |
| 2205 | + | } | |
| 2206 | + | /** | |
| 2207 | + | * Removes a handler function for a specific event | |
| 2208 | + | * @param {string} event | |
| 2209 | + | * @param {Hook} handler | |
| 2210 | + | * @returns {void} | |
| 2211 | + | */ | |
| 2212 | + | removeHook(event, handler) { | |
| 2213 | + | const eventHandlers = this._hooks.get(event); | |
| 2214 | + | if (eventHandlers) { | |
| 2215 | + | const index = eventHandlers.indexOf(handler); | |
| 2216 | + | if (index !== -1) { | |
| 2217 | + | eventHandlers.splice(index, 1); | |
| 2218 | + | } | |
| 2219 | + | } | |
| 2220 | + | } | |
| 2221 | + | /** | |
| 2222 | + | * Calls all handlers for a specific event | |
| 2223 | + | * @param {string} event | |
| 2224 | + | * @param {T[]} arguments_ | |
| 2225 | + | * @returns {Promise<void>} | |
| 2226 | + | */ | |
| 2227 | + | async hook(event, ...arguments_) { | |
| 2228 | + | const eventHandlers = this._hooks.get(event); | |
| 2229 | + | if (eventHandlers) { | |
| 2230 | + | for (const handler of eventHandlers) { | |
| 2231 | + | try { | |
| 2232 | + | await handler(...arguments_); | |
| 2233 | + | } catch (error) { | |
| 2234 | + | const message = `${event}: ${error.message}`; | |
| 2235 | + | this.emit("error", new Error(message)); | |
| 2236 | + | if (this._throwHookErrors) { | |
| 2237 | + | throw new Error(message); | |
| 2238 | + | } | |
| 2239 | + | } | |
| 2240 | + | } | |
| 2241 | + | } | |
| 2242 | + | } | |
| 2243 | + | /** | |
| 2244 | + | * Gets all hooks for a specific event | |
| 2245 | + | * @param {string} event | |
| 2246 | + | * @returns {Hook[]} | |
| 2247 | + | */ | |
| 2248 | + | getHooks(event) { | |
| 2249 | + | return this._hooks.get(event); | |
| 2250 | + | } | |
| 2251 | + | /** | |
| 2252 | + | * Removes all hooks | |
| 2253 | + | * @returns {void} | |
| 2254 | + | */ | |
| 2255 | + | clearHooks() { | |
| 2256 | + | this._hooks.clear(); | |
| 2257 | + | } | |
| 2258 | + | }; | |
| 2259 | + | ||
| 2260 | + | // node_modules/cacheable/dist/index.js | |
| 2261 | + | import * as crypto from "crypto"; | |
| 2262 | + | var structuredClone = globalThis.structuredClone ?? ((value) => JSON.parse(JSON.stringify(value))); | |
| 2263 | + | var shorthandToMilliseconds = (shorthand) => { | |
| 2264 | + | let milliseconds; | |
| 2265 | + | if (shorthand === void 0) { | |
| 2266 | + | return void 0; | |
| 2267 | + | } | |
| 2268 | + | if (typeof shorthand === "number") { | |
| 2269 | + | milliseconds = shorthand; | |
| 2270 | + | } else if (typeof shorthand === "string") { | |
| 2271 | + | shorthand = shorthand.trim(); | |
| 2272 | + | if (Number.isNaN(Number(shorthand))) { | |
| 2273 | + | const match = /^([\d.]+)\s*(ms|s|m|h|hr|d)$/i.exec(shorthand); | |
| 2274 | + | if (!match) { | |
| 2275 | + | throw new Error( | |
| 2276 | + | `Unsupported time format: "${shorthand}". Use 'ms', 's', 'm', 'h', 'hr', or 'd'.` | |
| 2277 | + | ); | |
| 2278 | + | } | |
| 2279 | + | const [, value, unit] = match; | |
| 2280 | + | const numericValue = Number.parseFloat(value); | |
| 2281 | + | const unitLower = unit.toLowerCase(); | |
| 2282 | + | switch (unitLower) { | |
| 2283 | + | case "ms": { | |
| 2284 | + | milliseconds = numericValue; | |
| 2285 | + | break; | |
| 2286 | + | } | |
| 2287 | + | case "s": { | |
| 2288 | + | milliseconds = numericValue * 1e3; | |
| 2289 | + | break; | |
| 2290 | + | } | |
| 2291 | + | case "m": { | |
| 2292 | + | milliseconds = numericValue * 1e3 * 60; | |
| 2293 | + | break; | |
| 2294 | + | } | |
| 2295 | + | case "h": { | |
| 2296 | + | milliseconds = numericValue * 1e3 * 60 * 60; | |
| 2297 | + | break; | |
| 2298 | + | } | |
| 2299 | + | case "hr": { | |
| 2300 | + | milliseconds = numericValue * 1e3 * 60 * 60; | |
| 2301 | + | break; | |
| 2302 | + | } | |
| 2303 | + | case "d": { | |
| 2304 | + | milliseconds = numericValue * 1e3 * 60 * 60 * 24; | |
| 2305 | + | break; | |
| 2306 | + | } | |
| 2307 | + | /* c8 ignore next 3 */ | |
| 2308 | + | default: { | |
| 2309 | + | milliseconds = Number(shorthand); | |
| 2310 | + | } | |
| 2311 | + | } | |
| 2312 | + | } else { | |
| 2313 | + | milliseconds = Number(shorthand); | |
| 2314 | + | } | |
| 2315 | + | } else { | |
| 2316 | + | throw new TypeError("Time must be a string or a number."); | |
| 2317 | + | } | |
| 2318 | + | return milliseconds; | |
| 2319 | + | }; | |
| 2320 | + | var shorthandToTime = (shorthand, fromDate) => { | |
| 2321 | + | fromDate || (fromDate = /* @__PURE__ */ new Date()); | |
| 2322 | + | const milliseconds = shorthandToMilliseconds(shorthand); | |
| 2323 | + | if (milliseconds === void 0) { | |
| 2324 | + | return fromDate.getTime(); | |
| 2325 | + | } | |
| 2326 | + | return fromDate.getTime() + milliseconds; | |
| 2327 | + | }; | |
| 2328 | + | function hash(object2, algorithm = "sha256") { | |
| 2329 | + | const objectString = JSON.stringify(object2); | |
| 2330 | + | if (!crypto.getHashes().includes(algorithm)) { | |
| 2331 | + | throw new Error(`Unsupported hash algorithm: '${algorithm}'`); | |
| 2332 | + | } | |
| 2333 | + | const hasher = crypto.createHash(algorithm); | |
| 2334 | + | hasher.update(objectString); | |
| 2335 | + | return hasher.digest("hex"); | |
| 2336 | + | } | |
| 2337 | + | function wrapSync(function_, options) { | |
| 2338 | + | const { ttl, keyPrefix, cache } = options; | |
| 2339 | + | return function(...arguments_) { | |
| 2340 | + | const cacheKey = createWrapKey(function_, arguments_, keyPrefix); | |
| 2341 | + | let value = cache.get(cacheKey); | |
| 2342 | + | if (value === void 0) { | |
| 2343 | + | try { | |
| 2344 | + | value = function_(...arguments_); | |
| 2345 | + | cache.set(cacheKey, value, ttl); | |
| 2346 | + | } catch (error) { | |
| 2347 | + | cache.emit("error", error); | |
| 2348 | + | if (options.cacheErrors) { | |
| 2349 | + | cache.set(cacheKey, error, ttl); | |
| 2350 | + | } | |
| 2351 | + | } | |
| 2352 | + | } | |
| 2353 | + | return value; | |
| 2354 | + | }; | |
| 2355 | + | } | |
| 2356 | + | function createWrapKey(function_, arguments_, keyPrefix) { | |
| 2357 | + | if (!keyPrefix) { | |
| 2358 | + | return `${function_.name}::${hash(arguments_)}`; | |
| 2359 | + | } | |
| 2360 | + | return `${keyPrefix}::${function_.name}::${hash(arguments_)}`; | |
| 2361 | + | } | |
| 2362 | + | var ListNode = class { | |
| 2363 | + | // eslint-disable-next-line @typescript-eslint/parameter-properties | |
| 2364 | + | value; | |
| 2365 | + | prev = void 0; | |
| 2366 | + | next = void 0; | |
| 2367 | + | constructor(value) { | |
| 2368 | + | this.value = value; | |
| 2369 | + | } | |
| 2370 | + | }; | |
| 2371 | + | var DoublyLinkedList = class { | |
| 2372 | + | head = void 0; | |
| 2373 | + | tail = void 0; | |
| 2374 | + | nodesMap = /* @__PURE__ */ new Map(); | |
| 2375 | + | // Add a new node to the front (most recently used) | |
| 2376 | + | addToFront(value) { | |
| 2377 | + | const newNode = new ListNode(value); | |
| 2378 | + | if (this.head) { | |
| 2379 | + | newNode.next = this.head; | |
| 2380 | + | this.head.prev = newNode; | |
| 2381 | + | this.head = newNode; | |
| 2382 | + | } else { | |
| 2383 | + | this.head = this.tail = newNode; | |
| 2384 | + | } | |
| 2385 | + | this.nodesMap.set(value, newNode); | |
| 2386 | + | } | |
| 2387 | + | // Move an existing node to the front (most recently used) | |
| 2388 | + | moveToFront(value) { | |
| 2389 | + | const node = this.nodesMap.get(value); | |
| 2390 | + | if (!node || this.head === node) { | |
| 2391 | + | return; | |
| 2392 | + | } | |
| 2393 | + | if (node.prev) { | |
| 2394 | + | node.prev.next = node.next; | |
| 2395 | + | } | |
| 2396 | + | if (node.next) { | |
| 2397 | + | node.next.prev = node.prev; | |
| 2398 | + | } | |
| 2399 | + | if (node === this.tail) { | |
| 2400 | + | this.tail = node.prev; | |
| 2401 | + | } | |
| 2402 | + | node.prev = void 0; | |
| 2403 | + | node.next = this.head; | |
| 2404 | + | if (this.head) { | |
| 2405 | + | this.head.prev = node; | |
| 2406 | + | } | |
| 2407 | + | this.head = node; | |
| 2408 | + | this.tail || (this.tail = node); | |
| 2409 | + | } | |
| 2410 | + | // Get the oldest node (tail) | |
| 2411 | + | getOldest() { | |
| 2412 | + | return this.tail ? this.tail.value : void 0; | |
| 2413 | + | } | |
| 2414 | + | // Remove the oldest node (tail) | |
| 2415 | + | removeOldest() { | |
| 2416 | + | if (!this.tail) { | |
| 2417 | + | return void 0; | |
| 2418 | + | } | |
| 2419 | + | const oldValue = this.tail.value; | |
| 2420 | + | if (this.tail.prev) { | |
| 2421 | + | this.tail = this.tail.prev; | |
| 2422 | + | this.tail.next = void 0; | |
| 2423 | + | } else { | |
| 2424 | + | this.head = this.tail = void 0; | |
| 2425 | + | } | |
| 2426 | + | this.nodesMap.delete(oldValue); | |
| 2427 | + | return oldValue; | |
| 2428 | + | } | |
| 2429 | + | get size() { | |
| 2430 | + | return this.nodesMap.size; | |
| 2431 | + | } | |
| 2432 | + | }; | |
| 2433 | + | var CacheableMemory = class extends Hookified { | |
| 2434 | + | _lru = new DoublyLinkedList(); | |
| 2435 | + | _hashCache = /* @__PURE__ */ new Map(); | |
| 2436 | + | _hash0 = /* @__PURE__ */ new Map(); | |
| 2437 | + | _hash1 = /* @__PURE__ */ new Map(); | |
| 2438 | + | _hash2 = /* @__PURE__ */ new Map(); | |
| 2439 | + | _hash3 = /* @__PURE__ */ new Map(); | |
| 2440 | + | _hash4 = /* @__PURE__ */ new Map(); | |
| 2441 | + | _hash5 = /* @__PURE__ */ new Map(); | |
| 2442 | + | _hash6 = /* @__PURE__ */ new Map(); | |
| 2443 | + | _hash7 = /* @__PURE__ */ new Map(); | |
| 2444 | + | _hash8 = /* @__PURE__ */ new Map(); | |
| 2445 | + | _hash9 = /* @__PURE__ */ new Map(); | |
| 2446 | + | _ttl; | |
| 2447 | + | // Turned off by default | |
| 2448 | + | _useClone = true; | |
| 2449 | + | // Turned on by default | |
| 2450 | + | _lruSize = 0; | |
| 2451 | + | // Turned off by default | |
| 2452 | + | _checkInterval = 0; | |
| 2453 | + | // Turned off by default | |
| 2454 | + | _interval = 0; | |
| 2455 | + | // Turned off by default | |
| 2456 | + | /** | |
| 2457 | + | * @constructor | |
| 2458 | + | * @param {CacheableMemoryOptions} [options] - The options for the CacheableMemory | |
| 2459 | + | */ | |
| 2460 | + | constructor(options) { | |
| 2461 | + | super(); | |
| 2462 | + | if (options == null ? void 0 : options.ttl) { | |
| 2463 | + | this.setTtl(options.ttl); | |
| 2464 | + | } | |
| 2465 | + | if ((options == null ? void 0 : options.useClone) !== void 0) { | |
| 2466 | + | this._useClone = options.useClone; | |
| 2467 | + | } | |
| 2468 | + | if (options == null ? void 0 : options.lruSize) { | |
| 2469 | + | this._lruSize = options.lruSize; | |
| 2470 | + | } | |
| 2471 | + | if (options == null ? void 0 : options.checkInterval) { | |
| 2472 | + | this._checkInterval = options.checkInterval; | |
| 2473 | + | } | |
| 2474 | + | this.startIntervalCheck(); | |
| 2475 | + | } | |
| 2476 | + | /** | |
| 2477 | + | * Gets the time-to-live | |
| 2478 | + | * @returns {number|string|undefined} - The time-to-live in miliseconds or a human-readable format. If undefined, it will not have a time-to-live. | |
| 2479 | + | */ | |
| 2480 | + | get ttl() { | |
| 2481 | + | return this._ttl; | |
| 2482 | + | } | |
| 2483 | + | /** | |
| 2484 | + | * Sets the time-to-live | |
| 2485 | + | * @param {number|string|undefined} value - The time-to-live in miliseconds or a human-readable format (example '1s' = 1 second, '1h' = 1 hour). If undefined, it will not have a time-to-live. | |
| 2486 | + | */ | |
| 2487 | + | set ttl(value) { | |
| 2488 | + | this.setTtl(value); | |
| 2489 | + | } | |
| 2490 | + | /** | |
| 2491 | + | * Gets whether to use clone | |
| 2492 | + | * @returns {boolean} - If true, it will clone the value before returning it. If false, it will return the value directly. Default is true. | |
| 2493 | + | */ | |
| 2494 | + | get useClone() { | |
| 2495 | + | return this._useClone; | |
| 2496 | + | } | |
| 2497 | + | /** | |
| 2498 | + | * Sets whether to use clone | |
| 2499 | + | * @param {boolean} value - If true, it will clone the value before returning it. If false, it will return the value directly. Default is true. | |
| 2500 | + | */ | |
| 2501 | + | set useClone(value) { | |
| 2502 | + | this._useClone = value; | |
| 2503 | + | } | |
| 2504 | + | /** | |
| 2505 | + | * Gets the size of the LRU cache | |
| 2506 | + | * @returns {number} - The size of the LRU cache. If set to 0, it will not use LRU cache. Default is 0. | |
| 2507 | + | */ | |
| 2508 | + | get lruSize() { | |
| 2509 | + | return this._lruSize; | |
| 2510 | + | } | |
| 2511 | + | /** | |
| 2512 | + | * Sets the size of the LRU cache | |
| 2513 | + | * @param {number} value - The size of the LRU cache. If set to 0, it will not use LRU cache. Default is 0. | |
| 2514 | + | */ | |
| 2515 | + | set lruSize(value) { | |
| 2516 | + | this._lruSize = value; | |
| 2517 | + | this.lruResize(); | |
| 2518 | + | } | |
| 2519 | + | /** | |
| 2520 | + | * Gets the check interval | |
| 2521 | + | * @returns {number} - The interval to check for expired items. If set to 0, it will not check for expired items. Default is 0. | |
| 2522 | + | */ | |
| 2523 | + | get checkInterval() { | |
| 2524 | + | return this._checkInterval; | |
| 2525 | + | } | |
| 2526 | + | /** | |
| 2527 | + | * Sets the check interval | |
| 2528 | + | * @param {number} value - The interval to check for expired items. If set to 0, it will not check for expired items. Default is 0. | |
| 2529 | + | */ | |
| 2530 | + | set checkInterval(value) { | |
| 2531 | + | this._checkInterval = value; | |
| 2532 | + | } | |
| 2533 | + | /** | |
| 2534 | + | * Gets the size of the cache | |
| 2535 | + | * @returns {number} - The size of the cache | |
| 2536 | + | */ | |
| 2537 | + | get size() { | |
| 2538 | + | return this._hash0.size + this._hash1.size + this._hash2.size + this._hash3.size + this._hash4.size + this._hash5.size + this._hash6.size + this._hash7.size + this._hash8.size + this._hash9.size; | |
| 2539 | + | } | |
| 2540 | + | /** | |
| 2541 | + | * Gets the keys | |
| 2542 | + | * @returns {IterableIterator<string>} - The keys | |
| 2543 | + | */ | |
| 2544 | + | get keys() { | |
| 2545 | + | return this.concatStores().keys(); | |
| 2546 | + | } | |
| 2547 | + | /** | |
| 2548 | + | * Gets the items | |
| 2549 | + | * @returns {IterableIterator<CacheableStoreItem>} - The items | |
| 2550 | + | */ | |
| 2551 | + | get items() { | |
| 2552 | + | return this.concatStores().values(); | |
| 2553 | + | } | |
| 2554 | + | /** | |
| 2555 | + | * Gets the value of the key | |
| 2556 | + | * @param {string} key - The key to get the value | |
| 2557 | + | * @returns {T | undefined} - The value of the key | |
| 2558 | + | */ | |
| 2559 | + | get(key) { | |
| 2560 | + | const store = this.getStore(key); | |
| 2561 | + | const item = store.get(key); | |
| 2562 | + | if (!item) { | |
| 2563 | + | return void 0; | |
| 2564 | + | } | |
| 2565 | + | if (item.expires && item.expires && Date.now() > item.expires) { | |
| 2566 | + | store.delete(key); | |
| 2567 | + | return void 0; | |
| 2568 | + | } | |
| 2569 | + | this.lruMoveToFront(key); | |
| 2570 | + | if (!this._useClone) { | |
| 2571 | + | return item.value; | |
| 2572 | + | } | |
| 2573 | + | return this.clone(item.value); | |
| 2574 | + | } | |
| 2575 | + | /** | |
| 2576 | + | * Gets the values of the keys | |
| 2577 | + | * @param {string[]} keys - The keys to get the values | |
| 2578 | + | * @returns {T[]} - The values of the keys | |
| 2579 | + | */ | |
| 2580 | + | getMany(keys2) { | |
| 2581 | + | const result = new Array(); | |
| 2582 | + | for (const key of keys2) { | |
| 2583 | + | result.push(this.get(key)); | |
| 2584 | + | } | |
| 2585 | + | return result; | |
| 2586 | + | } | |
| 2587 | + | /** | |
| 2588 | + | * Gets the raw value of the key | |
| 2589 | + | * @param {string} key - The key to get the value | |
| 2590 | + | * @returns {CacheableStoreItem | undefined} - The raw value of the key | |
| 2591 | + | */ | |
| 2592 | + | getRaw(key) { | |
| 2593 | + | const store = this.getStore(key); | |
| 2594 | + | const item = store.get(key); | |
| 2595 | + | if (!item) { | |
| 2596 | + | return void 0; | |
| 2597 | + | } | |
| 2598 | + | if (item.expires && item.expires && Date.now() > item.expires) { | |
| 2599 | + | store.delete(key); | |
| 2600 | + | return void 0; | |
| 2601 | + | } | |
| 2602 | + | this.lruMoveToFront(key); | |
| 2603 | + | return item; | |
| 2604 | + | } | |
| 2605 | + | /** | |
| 2606 | + | * Gets the raw values of the keys | |
| 2607 | + | * @param {string[]} keys - The keys to get the values | |
| 2608 | + | * @returns {CacheableStoreItem[]} - The raw values of the keys | |
| 2609 | + | */ | |
| 2610 | + | getManyRaw(keys2) { | |
| 2611 | + | const result = new Array(); | |
| 2612 | + | for (const key of keys2) { | |
| 2613 | + | result.push(this.getRaw(key)); | |
| 2614 | + | } | |
| 2615 | + | return result; | |
| 2616 | + | } | |
| 2617 | + | /** | |
| 2618 | + | * Sets the value of the key | |
| 2619 | + | * @param {string} key - The key to set the value | |
| 2620 | + | * @param {any} value - The value to set | |
| 2621 | + | * @param {number|string|SetOptions} [ttl] - Time to Live - If you set a number it is miliseconds, if you set a string it is a human-readable. | |
| 2622 | + | * If you want to set expire directly you can do that by setting the expire property in the SetOptions. | |
| 2623 | + | * If you set undefined, it will use the default time-to-live. If both are undefined then it will not have a time-to-live. | |
| 2624 | + | * @returns {void} | |
| 2625 | + | */ | |
| 2626 | + | set(key, value, ttl) { | |
| 2627 | + | const store = this.getStore(key); | |
| 2628 | + | let expires; | |
| 2629 | + | if (ttl !== void 0 || this._ttl !== void 0) { | |
| 2630 | + | if (typeof ttl === "object") { | |
| 2631 | + | if (ttl.expire) { | |
| 2632 | + | expires = typeof ttl.expire === "number" ? ttl.expire : ttl.expire.getTime(); | |
| 2633 | + | } | |
| 2634 | + | if (ttl.ttl) { | |
| 2635 | + | const finalTtl = shorthandToTime(ttl.ttl); | |
| 2636 | + | if (finalTtl !== void 0) { | |
| 2637 | + | expires = finalTtl; | |
| 2638 | + | } | |
| 2639 | + | } | |
| 2640 | + | } else { | |
| 2641 | + | const finalTtl = shorthandToTime(ttl ?? this._ttl); | |
| 2642 | + | if (finalTtl !== void 0) { | |
| 2643 | + | expires = finalTtl; | |
| 2644 | + | } | |
| 2645 | + | } | |
| 2646 | + | } | |
| 2647 | + | if (this._lruSize > 0) { | |
| 2648 | + | if (store.has(key)) { | |
| 2649 | + | this.lruMoveToFront(key); | |
| 2650 | + | } else { | |
| 2651 | + | this.lruAddToFront(key); | |
| 2652 | + | if (this._lru.size > this._lruSize) { | |
| 2653 | + | const oldestKey = this._lru.getOldest(); | |
| 2654 | + | if (oldestKey) { | |
| 2655 | + | this._lru.removeOldest(); | |
| 2656 | + | this.delete(oldestKey); | |
| 2657 | + | } | |
| 2658 | + | } | |
| 2659 | + | } | |
| 2660 | + | } | |
| 2661 | + | const item = { key, value, expires }; | |
| 2662 | + | store.set( | |
| 2663 | + | key, | |
| 2664 | + | item | |
| 2665 | + | ); | |
| 2666 | + | } | |
| 2667 | + | /** | |
| 2668 | + | * Sets the values of the keys | |
| 2669 | + | * @param {CacheableItem[]} items - The items to set | |
| 2670 | + | * @returns {void} | |
| 2671 | + | */ | |
| 2672 | + | setMany(items) { | |
| 2673 | + | for (const item of items) { | |
| 2674 | + | this.set(item.key, item.value, item.ttl); | |
| 2675 | + | } | |
| 2676 | + | } | |
| 2677 | + | /** | |
| 2678 | + | * Checks if the key exists | |
| 2679 | + | * @param {string} key - The key to check | |
| 2680 | + | * @returns {boolean} - If true, the key exists. If false, the key does not exist. | |
| 2681 | + | */ | |
| 2682 | + | has(key) { | |
| 2683 | + | const item = this.get(key); | |
| 2684 | + | return Boolean(item); | |
| 2685 | + | } | |
| 2686 | + | /** | |
| 2687 | + | * @function hasMany | |
| 2688 | + | * @param {string[]} keys - The keys to check | |
| 2689 | + | * @returns {boolean[]} - If true, the key exists. If false, the key does not exist. | |
| 2690 | + | */ | |
| 2691 | + | hasMany(keys2) { | |
| 2692 | + | const result = new Array(); | |
| 2693 | + | for (const key of keys2) { | |
| 2694 | + | const item = this.get(key); | |
| 2695 | + | result.push(Boolean(item)); | |
| 2696 | + | } | |
| 2697 | + | return result; | |
| 2698 | + | } | |
| 2699 | + | /** | |
| 2700 | + | * Take will get the key and delete the entry from cache | |
| 2701 | + | * @param {string} key - The key to take | |
| 2702 | + | * @returns {T | undefined} - The value of the key | |
| 2703 | + | */ | |
| 2704 | + | take(key) { | |
| 2705 | + | const item = this.get(key); | |
| 2706 | + | if (!item) { | |
| 2707 | + | return void 0; | |
| 2708 | + | } | |
| 2709 | + | this.delete(key); | |
| 2710 | + | return item; | |
| 2711 | + | } | |
| 2712 | + | /** | |
| 2713 | + | * TakeMany will get the keys and delete the entries from cache | |
| 2714 | + | * @param {string[]} keys - The keys to take | |
| 2715 | + | * @returns {T[]} - The values of the keys | |
| 2716 | + | */ | |
| 2717 | + | takeMany(keys2) { | |
| 2718 | + | const result = new Array(); | |
| 2719 | + | for (const key of keys2) { | |
| 2720 | + | result.push(this.take(key)); | |
| 2721 | + | } | |
| 2722 | + | return result; | |
| 2723 | + | } | |
| 2724 | + | /** | |
| 2725 | + | * Delete the key | |
| 2726 | + | * @param {string} key - The key to delete | |
| 2727 | + | * @returns {void} | |
| 2728 | + | */ | |
| 2729 | + | delete(key) { | |
| 2730 | + | const store = this.getStore(key); | |
| 2731 | + | store.delete(key); | |
| 2732 | + | } | |
| 2733 | + | /** | |
| 2734 | + | * Delete the keys | |
| 2735 | + | * @param {string[]} keys - The keys to delete | |
| 2736 | + | * @returns {void} | |
| 2737 | + | */ | |
| 2738 | + | deleteMany(keys2) { | |
| 2739 | + | for (const key of keys2) { | |
| 2740 | + | this.delete(key); | |
| 2741 | + | } | |
| 2742 | + | } | |
| 2743 | + | /** | |
| 2744 | + | * Clear the cache | |
| 2745 | + | * @returns {void} | |
| 2746 | + | */ | |
| 2747 | + | clear() { | |
| 2748 | + | this._hash0.clear(); | |
| 2749 | + | this._hash1.clear(); | |
| 2750 | + | this._hash2.clear(); | |
| 2751 | + | this._hash3.clear(); | |
| 2752 | + | this._hash4.clear(); | |
| 2753 | + | this._hash5.clear(); | |
| 2754 | + | this._hash6.clear(); | |
| 2755 | + | this._hash7.clear(); | |
| 2756 | + | this._hash8.clear(); | |
| 2757 | + | this._hash9.clear(); | |
| 2758 | + | this._hashCache.clear(); | |
| 2759 | + | this._lru = new DoublyLinkedList(); | |
| 2760 | + | } | |
| 2761 | + | /** | |
| 2762 | + | * Get the store based on the key (internal use) | |
| 2763 | + | * @param {string} key - The key to get the store | |
| 2764 | + | * @returns {CacheableHashStore} - The store | |
| 2765 | + | */ | |
| 2766 | + | getStore(key) { | |
| 2767 | + | const hash2 = this.hashKey(key); | |
| 2768 | + | return this.getStoreFromHash(hash2); | |
| 2769 | + | } | |
| 2770 | + | /** | |
| 2771 | + | * Get the store based on the hash (internal use) | |
| 2772 | + | * @param {number} hash | |
| 2773 | + | * @returns {Map<string, CacheableStoreItem>} | |
| 2774 | + | */ | |
| 2775 | + | getStoreFromHash(hash2) { | |
| 2776 | + | switch (hash2) { | |
| 2777 | + | case 1: { | |
| 2778 | + | return this._hash1; | |
| 2779 | + | } | |
| 2780 | + | case 2: { | |
| 2781 | + | return this._hash2; | |
| 2782 | + | } | |
| 2783 | + | case 3: { | |
| 2784 | + | return this._hash3; | |
| 2785 | + | } | |
| 2786 | + | case 4: { | |
| 2787 | + | return this._hash4; | |
| 2788 | + | } | |
| 2789 | + | case 5: { | |
| 2790 | + | return this._hash5; | |
| 2791 | + | } | |
| 2792 | + | case 6: { | |
| 2793 | + | return this._hash6; | |
| 2794 | + | } | |
| 2795 | + | case 7: { | |
| 2796 | + | return this._hash7; | |
| 2797 | + | } | |
| 2798 | + | case 8: { | |
| 2799 | + | return this._hash8; | |
| 2800 | + | } | |
| 2801 | + | case 9: { | |
| 2802 | + | return this._hash9; | |
| 2803 | + | } | |
| 2804 | + | default: { | |
| 2805 | + | return this._hash0; | |
| 2806 | + | } | |
| 2807 | + | } | |
| 2808 | + | } | |
| 2809 | + | /** | |
| 2810 | + | * Hash the key (internal use) | |
| 2811 | + | * @param key | |
| 2812 | + | * @returns {number} from 0 to 9 | |
| 2813 | + | */ | |
| 2814 | + | hashKey(key) { | |
| 2815 | + | const cacheHashNumber = this._hashCache.get(key); | |
| 2816 | + | if (cacheHashNumber) { | |
| 2817 | + | return cacheHashNumber; | |
| 2818 | + | } | |
| 2819 | + | let hash2 = 0; | |
| 2820 | + | const primeMultiplier = 31; | |
| 2821 | + | for (let i = 0; i < key.length; i++) { | |
| 2822 | + | hash2 = hash2 * primeMultiplier + key.charCodeAt(i); | |
| 2823 | + | } | |
| 2824 | + | const result = Math.abs(hash2) % 10; | |
| 2825 | + | this._hashCache.set(key, result); | |
| 2826 | + | return result; | |
| 2827 | + | } | |
| 2828 | + | /** | |
| 2829 | + | * Clone the value. This is for internal use | |
| 2830 | + | * @param {any} value - The value to clone | |
| 2831 | + | * @returns {any} - The cloned value | |
| 2832 | + | */ | |
| 2833 | + | clone(value) { | |
| 2834 | + | if (this.isPrimitive(value)) { | |
| 2835 | + | return value; | |
| 2836 | + | } | |
| 2837 | + | return structuredClone(value); | |
| 2838 | + | } | |
| 2839 | + | /** | |
| 2840 | + | * Add to the front of the LRU cache. This is for internal use | |
| 2841 | + | * @param {string} key - The key to add to the front | |
| 2842 | + | * @returns {void} | |
| 2843 | + | */ | |
| 2844 | + | lruAddToFront(key) { | |
| 2845 | + | if (this._lruSize === 0) { | |
| 2846 | + | return; | |
| 2847 | + | } | |
| 2848 | + | this._lru.addToFront(key); | |
| 2849 | + | } | |
| 2850 | + | /** | |
| 2851 | + | * Move to the front of the LRU cache. This is for internal use | |
| 2852 | + | * @param {string} key - The key to move to the front | |
| 2853 | + | * @returns {void} | |
| 2854 | + | */ | |
| 2855 | + | lruMoveToFront(key) { | |
| 2856 | + | if (this._lruSize === 0) { | |
| 2857 | + | return; | |
| 2858 | + | } | |
| 2859 | + | this._lru.moveToFront(key); | |
| 2860 | + | } | |
| 2861 | + | /** | |
| 2862 | + | * Resize the LRU cache. This is for internal use | |
| 2863 | + | * @returns {void} | |
| 2864 | + | */ | |
| 2865 | + | lruResize() { | |
| 2866 | + | if (this._lruSize === 0) { | |
| 2867 | + | return; | |
| 2868 | + | } | |
| 2869 | + | while (this._lru.size > this._lruSize) { | |
| 2870 | + | const oldestKey = this._lru.getOldest(); | |
| 2871 | + | if (oldestKey) { | |
| 2872 | + | this._lru.removeOldest(); | |
| 2873 | + | this.delete(oldestKey); | |
| 2874 | + | } | |
| 2875 | + | } | |
| 2876 | + | } | |
| 2877 | + | /** | |
| 2878 | + | * Check for expiration. This is for internal use | |
| 2879 | + | * @returns {void} | |
| 2880 | + | */ | |
| 2881 | + | checkExpiration() { | |
| 2882 | + | const stores = this.concatStores(); | |
| 2883 | + | for (const item of stores.values()) { | |
| 2884 | + | if (item.expires && Date.now() > item.expires) { | |
| 2885 | + | this.delete(item.key); | |
| 2886 | + | } | |
| 2887 | + | } | |
| 2888 | + | } | |
| 2889 | + | /** | |
| 2890 | + | * Start the interval check. This is for internal use | |
| 2891 | + | * @returns {void} | |
| 2892 | + | */ | |
| 2893 | + | startIntervalCheck() { | |
| 2894 | + | if (this._checkInterval > 0) { | |
| 2895 | + | if (this._interval) { | |
| 2896 | + | clearInterval(this._interval); | |
| 2897 | + | } | |
| 2898 | + | this._interval = setInterval(() => { | |
| 2899 | + | this.checkExpiration(); | |
| 2900 | + | }, this._checkInterval).unref(); | |
| 2901 | + | } | |
| 2902 | + | } | |
| 2903 | + | /** | |
| 2904 | + | * Stop the interval check. This is for internal use | |
| 2905 | + | * @returns {void} | |
| 2906 | + | */ | |
| 2907 | + | stopIntervalCheck() { | |
| 2908 | + | if (this._interval) { | |
| 2909 | + | clearInterval(this._interval); | |
| 2910 | + | } | |
| 2911 | + | this._interval = 0; | |
| 2912 | + | this._checkInterval = 0; | |
| 2913 | + | } | |
| 2914 | + | /** | |
| 2915 | + | * Hash the object. This is for internal use | |
| 2916 | + | * @param {any} object - The object to hash | |
| 2917 | + | * @param {string} [algorithm='sha256'] - The algorithm to hash | |
| 2918 | + | * @returns {string} - The hashed string | |
| 2919 | + | */ | |
| 2920 | + | hash(object2, algorithm = "sha256") { | |
| 2921 | + | return hash(object2, algorithm); | |
| 2922 | + | } | |
| 2923 | + | /** | |
| 2924 | + | * Wrap the function for caching | |
| 2925 | + | * @param {Function} function_ - The function to wrap | |
| 2926 | + | * @param {Object} [options] - The options to wrap | |
| 2927 | + | * @returns {Function} - The wrapped function | |
| 2928 | + | */ | |
| 2929 | + | wrap(function_, options) { | |
| 2930 | + | const wrapOptions = { | |
| 2931 | + | ttl: (options == null ? void 0 : options.ttl) ?? this._ttl, | |
| 2932 | + | keyPrefix: options == null ? void 0 : options.keyPrefix, | |
| 2933 | + | cache: this | |
| 2934 | + | }; | |
| 2935 | + | return wrapSync(function_, wrapOptions); | |
| 2936 | + | } | |
| 2937 | + | isPrimitive(value) { | |
| 2938 | + | const result = false; | |
| 2939 | + | if (value === null || value === void 0) { | |
| 2940 | + | return true; | |
| 2941 | + | } | |
| 2942 | + | if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") { | |
| 2943 | + | return true; | |
| 2944 | + | } | |
| 2945 | + | return result; | |
| 2946 | + | } | |
| 2947 | + | concatStores() { | |
| 2948 | + | return new Map([...this._hash0, ...this._hash1, ...this._hash2, ...this._hash3, ...this._hash4, ...this._hash5, ...this._hash6, ...this._hash7, ...this._hash8, ...this._hash9]); | |
| 2949 | + | } | |
| 2950 | + | setTtl(ttl) { | |
| 2951 | + | if (typeof ttl === "string" || ttl === void 0) { | |
| 2952 | + | this._ttl = ttl; | |
| 2953 | + | } else if (ttl > 0) { | |
| 2954 | + | this._ttl = ttl; | |
| 2955 | + | } else { | |
| 2956 | + | this._ttl = void 0; | |
| 2957 | + | } | |
| 2958 | + | } | |
| 2959 | + | }; | |
| 2960 | + | ||
| 2961 | + | // node_modules/flatted/esm/index.js | |
| 2962 | + | var { parse: $parse, stringify: $stringify } = JSON; | |
| 2963 | + | var { keys } = Object; | |
| 2964 | + | var Primitive = String; | |
| 2965 | + | var primitive = "string"; | |
| 2966 | + | var ignore = {}; | |
| 2967 | + | var object = "object"; | |
| 2968 | + | var noop = (_2, value) => value; | |
| 2969 | + | var primitives = (value) => value instanceof Primitive ? Primitive(value) : value; | |
| 2970 | + | var Primitives = (_2, value) => typeof value === primitive ? new Primitive(value) : value; | |
| 2971 | + | var revive = (input, parsed, output, $) => { | |
| 2972 | + | const lazy = []; | |
| 2973 | + | for (let ke = keys(output), { length } = ke, y = 0; y < length; y++) { | |
| 2974 | + | const k = ke[y]; | |
| 2975 | + | const value = output[k]; | |
| 2976 | + | if (value instanceof Primitive) { | |
| 2977 | + | const tmp = input[value]; | |
| 2978 | + | if (typeof tmp === object && !parsed.has(tmp)) { | |
| 2979 | + | parsed.add(tmp); | |
| 2980 | + | output[k] = ignore; | |
| 2981 | + | lazy.push({ k, a: [input, parsed, tmp, $] }); | |
| 2982 | + | } else | |
| 2983 | + | output[k] = $.call(output, k, tmp); | |
| 2984 | + | } else if (output[k] !== ignore) | |
| 2985 | + | output[k] = $.call(output, k, value); | |
| 2986 | + | } | |
| 2987 | + | for (let { length } = lazy, i = 0; i < length; i++) { | |
| 2988 | + | const { k, a } = lazy[i]; | |
| 2989 | + | output[k] = $.call(output, k, revive.apply(null, a)); | |
| 2990 | + | } | |
| 2991 | + | return output; | |
| 2992 | + | }; | |
| 2993 | + | var set = (known, input, value) => { | |
| 2994 | + | const index = Primitive(input.push(value) - 1); | |
| 2995 | + | known.set(value, index); | |
| 2996 | + | return index; | |
| 2997 | + | }; | |
| 2998 | + | var parse = (text, reviver) => { | |
| 2999 | + | const input = $parse(text, Primitives).map(primitives); | |
| 3000 | + | const value = input[0]; | |
| 3001 | + | const $ = reviver || noop; | |
| 3002 | + | const tmp = typeof value === object && value ? revive(input, /* @__PURE__ */ new Set(), value, $) : value; | |
| 3003 | + | return $.call({ "": tmp }, "", tmp); | |
| 3004 | + | }; | |
| 3005 | + | var stringify2 = (value, replacer, space) => { | |
| 3006 | + | const $ = replacer && typeof replacer === object ? (k, v) => k === "" || -1 < replacer.indexOf(k) ? v : void 0 : replacer || noop; | |
| 3007 | + | const known = /* @__PURE__ */ new Map(); | |
| 3008 | + | const input = []; | |
| 3009 | + | const output = []; | |
| 3010 | + | let i = +set(known, input, $.call({ "": value }, "", value)); | |
| 3011 | + | let firstRun = !i; | |
| 3012 | + | while (i < input.length) { | |
| 3013 | + | firstRun = true; | |
| 3014 | + | output[i] = $stringify(input[i++], replace, space); | |
| 3015 | + | } | |
| 3016 | + | return "[" + output.join(",") + "]"; | |
| 3017 | + | function replace(key, value2) { | |
| 3018 | + | if (firstRun) { | |
| 3019 | + | firstRun = !firstRun; | |
| 3020 | + | return value2; | |
| 3021 | + | } | |
| 3022 | + | const after = $.call(this, key, value2); | |
| 3023 | + | switch (typeof after) { | |
| 3024 | + | case object: | |
| 3025 | + | if (after === null) return after; | |
| 3026 | + | case primitive: | |
| 3027 | + | return known.get(after) || set(known, input, after); | |
| 3028 | + | } | |
| 3029 | + | return after; | |
| 3030 | + | } | |
| 3031 | + | }; | |
| 3032 | + | ||
| 3033 | + | // node_modules/file-entry-cache/node_modules/flat-cache/dist/index.js | |
| 3034 | + | var FlatCache = class extends Hookified { | |
| 3035 | + | _cache = new CacheableMemory(); | |
| 3036 | + | _cacheDir = ".cache"; | |
| 3037 | + | _cacheId = "cache1"; | |
| 3038 | + | _persistInterval = 0; | |
| 3039 | + | _persistTimer; | |
| 3040 | + | _changesSinceLastSave = false; | |
| 3041 | + | _parse = parse; | |
| 3042 | + | _stringify = stringify2; | |
| 3043 | + | constructor(options) { | |
| 3044 | + | super(); | |
| 3045 | + | if (options) { | |
| 3046 | + | this._cache = new CacheableMemory({ | |
| 3047 | + | ttl: options.ttl, | |
| 3048 | + | useClone: options.useClone, | |
| 3049 | + | lruSize: options.lruSize, | |
| 3050 | + | checkInterval: options.expirationInterval | |
| 3051 | + | }); | |
| 3052 | + | } | |
| 3053 | + | if (options == null ? void 0 : options.cacheDir) { | |
| 3054 | + | this._cacheDir = options.cacheDir; | |
| 3055 | + | } | |
| 3056 | + | if (options == null ? void 0 : options.cacheId) { | |
| 3057 | + | this._cacheId = options.cacheId; | |
| 3058 | + | } | |
| 3059 | + | if (options == null ? void 0 : options.persistInterval) { | |
| 3060 | + | this._persistInterval = options.persistInterval; | |
| 3061 | + | this.startAutoPersist(); | |
| 3062 | + | } | |
| 3063 | + | if (options == null ? void 0 : options.deserialize) { | |
| 3064 | + | this._parse = options.deserialize; | |
| 3065 | + | } | |
| 3066 | + | if (options == null ? void 0 : options.serialize) { | |
| 3067 | + | this._stringify = options.serialize; | |
| 3068 | + | } | |
| 3069 | + | } | |
| 3070 | + | /** | |
| 3071 | + | * The cache object | |
| 3072 | + | * @property cache | |
| 3073 | + | * @type {CacheableMemory} | |
| 3074 | + | */ | |
| 3075 | + | get cache() { | |
| 3076 | + | return this._cache; | |
| 3077 | + | } | |
| 3078 | + | /** | |
| 3079 | + | * The cache directory | |
| 3080 | + | * @property cacheDir | |
| 3081 | + | * @type {String} | |
| 3082 | + | * @default '.cache' | |
| 3083 | + | */ | |
| 3084 | + | get cacheDir() { | |
| 3085 | + | return this._cacheDir; | |
| 3086 | + | } | |
| 3087 | + | /** | |
| 3088 | + | * Set the cache directory | |
| 3089 | + | * @property cacheDir | |
| 3090 | + | * @type {String} | |
| 3091 | + | * @default '.cache' | |
| 3092 | + | */ | |
| 3093 | + | set cacheDir(value) { | |
| 3094 | + | this._cacheDir = value; | |
| 3095 | + | } | |
| 3096 | + | /** | |
| 3097 | + | * The cache id | |
| 3098 | + | * @property cacheId | |
| 3099 | + | * @type {String} | |
| 3100 | + | * @default 'cache1' | |
| 3101 | + | */ | |
| 3102 | + | get cacheId() { | |
| 3103 | + | return this._cacheId; | |
| 3104 | + | } | |
| 3105 | + | /** | |
| 3106 | + | * Set the cache id | |
| 3107 | + | * @property cacheId | |
| 3108 | + | * @type {String} | |
| 3109 | + | * @default 'cache1' | |
| 3110 | + | */ | |
| 3111 | + | set cacheId(value) { | |
| 3112 | + | this._cacheId = value; | |
| 3113 | + | } | |
| 3114 | + | /** | |
| 3115 | + | * The flag to indicate if there are changes since the last save | |
| 3116 | + | * @property changesSinceLastSave | |
| 3117 | + | * @type {Boolean} | |
| 3118 | + | * @default false | |
| 3119 | + | */ | |
| 3120 | + | get changesSinceLastSave() { | |
| 3121 | + | return this._changesSinceLastSave; | |
| 3122 | + | } | |
| 3123 | + | /** | |
| 3124 | + | * The interval to persist the cache to disk. 0 means no timed persistence | |
| 3125 | + | * @property persistInterval | |
| 3126 | + | * @type {Number} | |
| 3127 | + | * @default 0 | |
| 3128 | + | */ | |
| 3129 | + | get persistInterval() { | |
| 3130 | + | return this._persistInterval; | |
| 3131 | + | } | |
| 3132 | + | /** | |
| 3133 | + | * Set the interval to persist the cache to disk. 0 means no timed persistence | |
| 3134 | + | * @property persistInterval | |
| 3135 | + | * @type {Number} | |
| 3136 | + | * @default 0 | |
| 3137 | + | */ | |
| 3138 | + | set persistInterval(value) { | |
| 3139 | + | this._persistInterval = value; | |
| 3140 | + | } | |
| 3141 | + | /** | |
| 3142 | + | * Load a cache identified by the given Id. If the element does not exists, then initialize an empty | |
| 3143 | + | * cache storage. If specified `cacheDir` will be used as the directory to persist the data to. If omitted | |
| 3144 | + | * then the cache module directory `.cacheDir` will be used instead | |
| 3145 | + | * | |
| 3146 | + | * @method load | |
| 3147 | + | * @param cacheId {String} the id of the cache, would also be used as the name of the file cache | |
| 3148 | + | * @param cacheDir {String} directory for the cache entry | |
| 3149 | + | */ | |
| 3150 | + | // eslint-disable-next-line unicorn/prevent-abbreviations | |
| 3151 | + | load(cacheId, cacheDir) { | |
| 3152 | + | try { | |
| 3153 | + | const filePath = path9.resolve(`${cacheDir ?? this._cacheDir}/${cacheId ?? this._cacheId}`); | |
| 3154 | + | this.loadFile(filePath); | |
| 3155 | + | this.emit( | |
| 3156 | + | "load" | |
| 3157 | + | /* LOAD */ | |
| 3158 | + | ); | |
| 3159 | + | } catch (error) { | |
| 3160 | + | this.emit("error", error); | |
| 3161 | + | } | |
| 3162 | + | } | |
| 3163 | + | /** | |
| 3164 | + | * Load the cache from the provided file | |
| 3165 | + | * @method loadFile | |
| 3166 | + | * @param {String} pathToFile the path to the file containing the info for the cache | |
| 3167 | + | */ | |
| 3168 | + | loadFile(pathToFile) { | |
| 3169 | + | if (fs5.existsSync(pathToFile)) { | |
| 3170 | + | const data = fs5.readFileSync(pathToFile, "utf8"); | |
| 3171 | + | const items = this._parse(data); | |
| 3172 | + | for (const key of Object.keys(items)) { | |
| 3173 | + | this._cache.set(items[key].key, items[key].value, { expire: items[key].expires }); | |
| 3174 | + | } | |
| 3175 | + | this._changesSinceLastSave = true; | |
| 3176 | + | } | |
| 3177 | + | } | |
| 3178 | + | /** | |
| 3179 | + | * Returns the entire persisted object | |
| 3180 | + | * @method all | |
| 3181 | + | * @returns {*} | |
| 3182 | + | */ | |
| 3183 | + | all() { | |
| 3184 | + | const result = {}; | |
| 3185 | + | const items = Array.from(this._cache.items); | |
| 3186 | + | for (const item of items) { | |
| 3187 | + | result[item.key] = item.value; | |
| 3188 | + | } | |
| 3189 | + | return result; | |
| 3190 | + | } | |
| 3191 | + | /** | |
| 3192 | + | * Returns an array with all the items in the cache { key, value, ttl } | |
| 3193 | + | * @method items | |
| 3194 | + | * @returns {Array} | |
| 3195 | + | */ | |
| 3196 | + | get items() { | |
| 3197 | + | return Array.from(this._cache.items); | |
| 3198 | + | } | |
| 3199 | + | /** | |
| 3200 | + | * Returns the path to the file where the cache is persisted | |
| 3201 | + | * @method cacheFilePath | |
| 3202 | + | * @returns {String} | |
| 3203 | + | */ | |
| 3204 | + | get cacheFilePath() { | |
| 3205 | + | return path9.resolve(`${this._cacheDir}/${this._cacheId}`); | |
| 3206 | + | } | |
| 3207 | + | /** | |
| 3208 | + | * Returns the path to the cache directory | |
| 3209 | + | * @method cacheDirPath | |
| 3210 | + | * @returns {String} | |
| 3211 | + | */ | |
| 3212 | + | get cacheDirPath() { | |
| 3213 | + | return path9.resolve(this._cacheDir); | |
| 3214 | + | } | |
| 3215 | + | /** | |
| 3216 | + | * Returns an array with all the keys in the cache | |
| 3217 | + | * @method keys | |
| 3218 | + | * @returns {Array} | |
| 3219 | + | */ | |
| 3220 | + | keys() { | |
| 3221 | + | return Array.from(this._cache.keys); | |
| 3222 | + | } | |
| 3223 | + | /** | |
| 3224 | + | * (Legacy) set key method. This method will be deprecated in the future | |
| 3225 | + | * @method setKey | |
| 3226 | + | * @param key {string} the key to set | |
| 3227 | + | * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify | |
| 3228 | + | */ | |
| 3229 | + | setKey(key, value, ttl) { | |
| 3230 | + | this.set(key, value, ttl); | |
| 3231 | + | } | |
| 3232 | + | /** | |
| 3233 | + | * Sets a key to a given value | |
| 3234 | + | * @method set | |
| 3235 | + | * @param key {string} the key to set | |
| 3236 | + | * @param value {object} the value of the key. Could be any object that can be serialized with JSON.stringify | |
| 3237 | + | * @param [ttl] {number} the time to live in milliseconds | |
| 3238 | + | */ | |
| 3239 | + | set(key, value, ttl) { | |
| 3240 | + | this._cache.set(key, value, ttl); | |
| 3241 | + | this._changesSinceLastSave = true; | |
| 3242 | + | } | |
| 3243 | + | /** | |
| 3244 | + | * (Legacy) Remove a given key from the cache. This method will be deprecated in the future | |
| 3245 | + | * @method removeKey | |
| 3246 | + | * @param key {String} the key to remove from the object | |
| 3247 | + | */ | |
| 3248 | + | removeKey(key) { | |
| 3249 | + | this.delete(key); | |
| 3250 | + | } | |
| 3251 | + | /** | |
| 3252 | + | * Remove a given key from the cache | |
| 3253 | + | * @method delete | |
| 3254 | + | * @param key {String} the key to remove from the object | |
| 3255 | + | */ | |
| 3256 | + | delete(key) { | |
| 3257 | + | this._cache.delete(key); | |
| 3258 | + | this._changesSinceLastSave = true; | |
| 3259 | + | this.emit("delete", key); | |
| 3260 | + | } | |
| 3261 | + | /** | |
| 3262 | + | * (Legacy) Return the value of the provided key. This method will be deprecated in the future | |
| 3263 | + | * @method getKey<T> | |
| 3264 | + | * @param key {String} the name of the key to retrieve | |
| 3265 | + | * @returns {*} at T the value from the key | |
| 3266 | + | */ | |
| 3267 | + | getKey(key) { | |
| 3268 | + | return this.get(key); | |
| 3269 | + | } | |
| 3270 | + | /** | |
| 3271 | + | * Return the value of the provided key | |
| 3272 | + | * @method get<T> | |
| 3273 | + | * @param key {String} the name of the key to retrieve | |
| 3274 | + | * @returns {*} at T the value from the key | |
| 3275 | + | */ | |
| 3276 | + | get(key) { | |
| 3277 | + | return this._cache.get(key); | |
| 3278 | + | } | |
| 3279 | + | /** | |
| 3280 | + | * Clear the cache and save the state to disk | |
| 3281 | + | * @method clear | |
| 3282 | + | */ | |
| 3283 | + | clear() { | |
| 3284 | + | try { | |
| 3285 | + | this._cache.clear(); | |
| 3286 | + | this._changesSinceLastSave = true; | |
| 3287 | + | this.save(); | |
| 3288 | + | this.emit( | |
| 3289 | + | "clear" | |
| 3290 | + | /* CLEAR */ | |
| 3291 | + | ); | |
| 3292 | + | } catch (error) { | |
| 3293 | + | this.emit("error", error); | |
| 3294 | + | } | |
| 3295 | + | } | |
| 3296 | + | /** | |
| 3297 | + | * Save the state of the cache identified by the docId to disk | |
| 3298 | + | * as a JSON structure | |
| 3299 | + | * @method save | |
| 3300 | + | */ | |
| 3301 | + | save(force = false) { | |
| 3302 | + | try { | |
| 3303 | + | if (this._changesSinceLastSave || force) { | |
| 3304 | + | const filePath = this.cacheFilePath; | |
| 3305 | + | const items = Array.from(this._cache.items); | |
| 3306 | + | const data = this._stringify(items); | |
| 3307 | + | if (!fs5.existsSync(this._cacheDir)) { | |
| 3308 | + | fs5.mkdirSync(this._cacheDir, { recursive: true }); | |
| 3309 | + | } | |
| 3310 | + | fs5.writeFileSync(filePath, data); | |
| 3311 | + | this._changesSinceLastSave = false; | |
| 3312 | + | this.emit( | |
| 3313 | + | "save" | |
| 3314 | + | /* SAVE */ | |
| 3315 | + | ); | |
| 3316 | + | } | |
| 3317 | + | } catch (error) { | |
| 3318 | + | this.emit("error", error); | |
| 3319 | + | } | |
| 3320 | + | } | |
| 3321 | + | /** | |
| 3322 | + | * Remove the file where the cache is persisted | |
| 3323 | + | * @method removeCacheFile | |
| 3324 | + | * @return {Boolean} true or false if the file was successfully deleted | |
| 3325 | + | */ | |
| 3326 | + | removeCacheFile() { | |
| 3327 | + | try { | |
| 3328 | + | if (fs5.existsSync(this.cacheFilePath)) { | |
| 3329 | + | fs5.rmSync(this.cacheFilePath); | |
| 3330 | + | return true; | |
| 3331 | + | } | |
| 3332 | + | } catch (error) { | |
| 3333 | + | this.emit("error", error); | |
| 3334 | + | } | |
| 3335 | + | return false; | |
| 3336 | + | } | |
| 3337 | + | /** | |
| 3338 | + | * Destroy the cache. This will remove the directory, file, and memory cache | |
| 3339 | + | * @method destroy | |
| 3340 | + | * @param [includeCacheDir=false] {Boolean} if true, the cache directory will be removed | |
| 3341 | + | * @return {undefined} | |
| 3342 | + | */ | |
| 3343 | + | destroy(includeCacheDirectory = false) { | |
| 3344 | + | try { | |
| 3345 | + | this._cache.clear(); | |
| 3346 | + | this.stopAutoPersist(); | |
| 3347 | + | if (includeCacheDirectory) { | |
| 3348 | + | fs5.rmSync(this.cacheDirPath, { recursive: true, force: true }); | |
| 3349 | + | } else { | |
| 3350 | + | fs5.rmSync(this.cacheFilePath, { recursive: true, force: true }); | |
| 3351 | + | } | |
| 3352 | + | this._changesSinceLastSave = false; | |
| 3353 | + | this.emit( | |
| 3354 | + | "destroy" | |
| 3355 | + | /* DESTROY */ | |
| 3356 | + | ); | |
| 3357 | + | } catch (error) { | |
| 3358 | + | this.emit("error", error); | |
| 3359 | + | } | |
| 3360 | + | } | |
| 3361 | + | /** | |
| 3362 | + | * Start the auto persist interval | |
| 3363 | + | * @method startAutoPersist | |
| 3364 | + | */ | |
| 3365 | + | startAutoPersist() { | |
| 3366 | + | if (this._persistInterval > 0) { | |
| 3367 | + | if (this._persistTimer) { | |
| 3368 | + | clearInterval(this._persistTimer); | |
| 3369 | + | this._persistTimer = void 0; | |
| 3370 | + | } | |
| 3371 | + | this._persistTimer = setInterval(() => { | |
| 3372 | + | this.save(); | |
| 3373 | + | }, this._persistInterval); | |
| 3374 | + | } | |
| 3375 | + | } | |
| 3376 | + | /** | |
| 3377 | + | * Stop the auto persist interval | |
| 3378 | + | * @method stopAutoPersist | |
| 3379 | + | */ | |
| 3380 | + | stopAutoPersist() { | |
| 3381 | + | if (this._persistTimer) { | |
| 3382 | + | clearInterval(this._persistTimer); | |
| 3383 | + | this._persistTimer = void 0; | |
| 3384 | + | } | |
| 3385 | + | } | |
| 3386 | + | }; | |
| 3387 | + | function createFromFile(filePath, options) { | |
| 3388 | + | const cache = new FlatCache(options); | |
| 3389 | + | cache.loadFile(filePath); | |
| 3390 | + | return cache; | |
| 3391 | + | } | |
| 3392 | + | ||
| 3393 | + | // node_modules/file-entry-cache/dist/index.js | |
| 3394 | + | function createFromFile2(filePath, useCheckSum, currentWorkingDirectory) { | |
| 3395 | + | const fname = path10.basename(filePath); | |
| 3396 | + | const directory = path10.dirname(filePath); | |
| 3397 | + | return create(fname, directory, useCheckSum, currentWorkingDirectory); | |
| 3398 | + | } | |
| 3399 | + | function create(cacheId, cacheDirectory, useCheckSum, currentWorkingDirectory) { | |
| 3400 | + | const options = { | |
| 3401 | + | currentWorkingDirectory, | |
| 3402 | + | useCheckSum, | |
| 3403 | + | cache: { | |
| 3404 | + | cacheId, | |
| 3405 | + | cacheDir: cacheDirectory | |
| 3406 | + | } | |
| 3407 | + | }; | |
| 3408 | + | const fileEntryCache = new FileEntryCache(options); | |
| 3409 | + | if (cacheDirectory) { | |
| 3410 | + | const cachePath = `${cacheDirectory}/${cacheId}`; | |
| 3411 | + | if (fs6.existsSync(cachePath)) { | |
| 3412 | + | fileEntryCache.cache = createFromFile(cachePath, options.cache); | |
| 3413 | + | } | |
| 3414 | + | } | |
| 3415 | + | return fileEntryCache; | |
| 3416 | + | } | |
| 3417 | + | var FileEntryDefault = class { | |
| 3418 | + | static create = create; | |
| 3419 | + | static createFromFile = createFromFile2; | |
| 3420 | + | }; | |
| 3421 | + | var FileEntryCache = class { | |
| 3422 | + | _cache = new FlatCache({ useClone: false }); | |
| 3423 | + | _useCheckSum = false; | |
| 3424 | + | _currentWorkingDirectory; | |
| 3425 | + | _hashAlgorithm = "md5"; | |
| 3426 | + | constructor(options) { | |
| 3427 | + | if (options == null ? void 0 : options.cache) { | |
| 3428 | + | this._cache = new FlatCache(options.cache); | |
| 3429 | + | } | |
| 3430 | + | if (options == null ? void 0 : options.useCheckSum) { | |
| 3431 | + | this._useCheckSum = options.useCheckSum; | |
| 3432 | + | } | |
| 3433 | + | if (options == null ? void 0 : options.currentWorkingDirectory) { | |
| 3434 | + | this._currentWorkingDirectory = options.currentWorkingDirectory; | |
| 3435 | + | } | |
| 3436 | + | if (options == null ? void 0 : options.hashAlgorithm) { | |
| 3437 | + | this._hashAlgorithm = options.hashAlgorithm; | |
| 3438 | + | } | |
| 3439 | + | } | |
| 3440 | + | get cache() { | |
| 3441 | + | return this._cache; | |
| 3442 | + | } | |
| 3443 | + | set cache(cache) { | |
| 3444 | + | this._cache = cache; | |
| 3445 | + | } | |
| 3446 | + | get useCheckSum() { | |
| 3447 | + | return this._useCheckSum; | |
| 3448 | + | } | |
| 3449 | + | set useCheckSum(value) { | |
| 3450 | + | this._useCheckSum = value; | |
| 3451 | + | } | |
| 3452 | + | get hashAlgorithm() { | |
| 3453 | + | return this._hashAlgorithm; | |
| 3454 | + | } | |
| 3455 | + | set hashAlgorithm(value) { | |
| 3456 | + | this._hashAlgorithm = value; | |
| 3457 | + | } | |
| 3458 | + | get currentWorkingDirectory() { | |
| 3459 | + | return this._currentWorkingDirectory; | |
| 3460 | + | } | |
| 3461 | + | set currentWorkingDirectory(value) { | |
| 3462 | + | this._currentWorkingDirectory = value; | |
| 3463 | + | } | |
| 3464 | + | /** | |
| 3465 | + | * Given a buffer, calculate md5 hash of its content. | |
| 3466 | + | * @method getHash | |
| 3467 | + | * @param {Buffer} buffer buffer to calculate hash on | |
| 3468 | + | * @return {String} content hash digest | |
| 3469 | + | */ | |
| 3470 | + | // eslint-disable-next-line @typescript-eslint/ban-types | |
| 3471 | + | getHash(buffer) { | |
| 3472 | + | return crypto2.createHash(this._hashAlgorithm).update(buffer).digest("hex"); | |
| 3473 | + | } | |
| 3474 | + | /** | |
| 3475 | + | * Create the key for the file path used for caching. | |
| 3476 | + | * @method createFileKey | |
| 3477 | + | * @param {String} filePath | |
| 3478 | + | * @return {String} | |
| 3479 | + | */ | |
| 3480 | + | createFileKey(filePath, options) { | |
| 3481 | + | let result = filePath; | |
| 3482 | + | const currentWorkingDirectory = (options == null ? void 0 : options.currentWorkingDirectory) ?? this._currentWorkingDirectory; | |
| 3483 | + | if (currentWorkingDirectory && filePath.startsWith(currentWorkingDirectory)) { | |
| 3484 | + | const splitPath = filePath.split(currentWorkingDirectory).pop(); | |
| 3485 | + | if (splitPath) { | |
| 3486 | + | result = splitPath; | |
| 3487 | + | if (result.startsWith("/")) { | |
| 3488 | + | result = result.slice(1); | |
| 3489 | + | } | |
| 3490 | + | } | |
| 3491 | + | } | |
| 3492 | + | return result; | |
| 3493 | + | } | |
| 3494 | + | /** | |
| 3495 | + | * Check if the file path is a relative path | |
| 3496 | + | * @method isRelativePath | |
| 3497 | + | * @param filePath - The file path to check | |
| 3498 | + | * @returns {boolean} if the file path is a relative path, false otherwise | |
| 3499 | + | */ | |
| 3500 | + | isRelativePath(filePath) { | |
| 3501 | + | return !path10.isAbsolute(filePath); | |
| 3502 | + | } | |
| 3503 | + | /** | |
| 3504 | + | * Delete the cache file from the disk | |
| 3505 | + | * @method deleteCacheFile | |
| 3506 | + | * @return {boolean} true if the file was deleted, false otherwise | |
| 3507 | + | */ | |
| 3508 | + | deleteCacheFile() { | |
| 3509 | + | return this._cache.removeCacheFile(); | |
| 3510 | + | } | |
| 3511 | + | /** | |
| 3512 | + | * Remove the cache from the file and clear the memory cache | |
| 3513 | + | * @method destroy | |
| 3514 | + | */ | |
| 3515 | + | destroy() { | |
| 3516 | + | this._cache.destroy(); | |
| 3517 | + | } | |
| 3518 | + | /** | |
| 3519 | + | * Remove and Entry From the Cache | |
| 3520 | + | * @method removeEntry | |
| 3521 | + | * @param filePath - The file path to remove from the cache | |
| 3522 | + | */ | |
| 3523 | + | removeEntry(filePath, options) { | |
| 3524 | + | if (this.isRelativePath(filePath)) { | |
| 3525 | + | filePath = this.getAbsolutePath(filePath, { currentWorkingDirectory: options == null ? void 0 : options.currentWorkingDirectory }); | |
| 3526 | + | this._cache.removeKey(this.createFileKey(filePath)); | |
| 3527 | + | } | |
| 3528 | + | const key = this.createFileKey(filePath, { currentWorkingDirectory: options == null ? void 0 : options.currentWorkingDirectory }); | |
| 3529 | + | this._cache.removeKey(key); | |
| 3530 | + | } | |
| 3531 | + | /** | |
| 3532 | + | * Reconcile the cache | |
| 3533 | + | * @method reconcile | |
| 3534 | + | */ | |
| 3535 | + | reconcile() { | |
| 3536 | + | const items = this._cache.items; | |
| 3537 | + | for (const item of items) { | |
| 3538 | + | const fileDescriptor = this.getFileDescriptor(item.key); | |
| 3539 | + | if (fileDescriptor.notFound) { | |
| 3540 | + | this._cache.removeKey(item.key); | |
| 3541 | + | } | |
| 3542 | + | } | |
| 3543 | + | this._cache.save(); | |
| 3544 | + | } | |
| 3545 | + | /** | |
| 3546 | + | * Check if the file has changed | |
| 3547 | + | * @method hasFileChanged | |
| 3548 | + | * @param filePath - The file path to check | |
| 3549 | + | * @returns {boolean} if the file has changed, false otherwise | |
| 3550 | + | */ | |
| 3551 | + | hasFileChanged(filePath) { | |
| 3552 | + | let result = false; | |
| 3553 | + | const fileDescriptor = this.getFileDescriptor(filePath); | |
| 3554 | + | if ((!fileDescriptor.err || !fileDescriptor.notFound) && fileDescriptor.changed) { | |
| 3555 | + | result = true; | |
| 3556 | + | } | |
| 3557 | + | return result; | |
| 3558 | + | } | |
| 3559 | + | /** | |
| 3560 | + | * Get the file descriptor for the file path | |
| 3561 | + | * @method getFileDescriptor | |
| 3562 | + | * @param filePath - The file path to get the file descriptor for | |
| 3563 | + | * @param options - The options for getting the file descriptor | |
| 3564 | + | * @returns The file descriptor | |
| 3565 | + | */ | |
| 3566 | + | getFileDescriptor(filePath, options) { | |
| 3567 | + | var _a, _b, _c; | |
| 3568 | + | let fstat; | |
| 3569 | + | const result = { | |
| 3570 | + | key: this.createFileKey(filePath), | |
| 3571 | + | changed: false, | |
| 3572 | + | meta: {} | |
| 3573 | + | }; | |
| 3574 | + | result.meta = this._cache.getKey(result.key) ?? {}; | |
| 3575 | + | filePath = this.getAbsolutePath(filePath, { currentWorkingDirectory: options == null ? void 0 : options.currentWorkingDirectory }); | |
| 3576 | + | const useCheckSumValue = (options == null ? void 0 : options.useCheckSum) ?? this._useCheckSum; | |
| 3577 | + | try { | |
| 3578 | + | fstat = fs6.statSync(filePath); | |
| 3579 | + | result.meta = { | |
| 3580 | + | size: fstat.size | |
| 3581 | + | }; | |
| 3582 | + | result.meta.mtime = fstat.mtime.getTime(); | |
| 3583 | + | if (useCheckSumValue) { | |
| 3584 | + | const buffer = fs6.readFileSync(filePath); | |
| 3585 | + | result.meta.hash = this.getHash(buffer); | |
| 3586 | + | } | |
| 3587 | + | } catch (error) { | |
| 3588 | + | this.removeEntry(filePath); | |
| 3589 | + | let notFound = false; | |
| 3590 | + | if (error.message.includes("ENOENT")) { | |
| 3591 | + | notFound = true; | |
| 3592 | + | } | |
| 3593 | + | return { | |
| 3594 | + | key: result.key, | |
| 3595 | + | err: error, | |
| 3596 | + | notFound, | |
| 3597 | + | meta: {} | |
| 3598 | + | }; | |
| 3599 | + | } | |
| 3600 | + | const metaCache = this._cache.getKey(result.key); | |
| 3601 | + | if (!metaCache) { | |
| 3602 | + | result.changed = true; | |
| 3603 | + | this._cache.setKey(result.key, result.meta); | |
| 3604 | + | return result; | |
| 3605 | + | } | |
| 3606 | + | if (result.meta.data === void 0) { | |
| 3607 | + | result.meta.data = metaCache.data; | |
| 3608 | + | } | |
| 3609 | + | if ((metaCache == null ? void 0 : metaCache.mtime) !== ((_a = result.meta) == null ? void 0 : _a.mtime) || (metaCache == null ? void 0 : metaCache.size) !== ((_b = result.meta) == null ? void 0 : _b.size)) { | |
| 3610 | + | result.changed = true; | |
| 3611 | + | } | |
| 3612 | + | if (useCheckSumValue && (metaCache == null ? void 0 : metaCache.hash) !== ((_c = result.meta) == null ? void 0 : _c.hash)) { | |
| 3613 | + | result.changed = true; | |
| 3614 | + | } | |
| 3615 | + | this._cache.setKey(result.key, result.meta); | |
| 3616 | + | return result; | |
| 3617 | + | } | |
| 3618 | + | /** | |
| 3619 | + | * Get the file descriptors for the files | |
| 3620 | + | * @method normalizeEntries | |
| 3621 | + | * @param files?: string[] - The files to get the file descriptors for | |
| 3622 | + | * @returns The file descriptors | |
| 3623 | + | */ | |
| 3624 | + | normalizeEntries(files) { | |
| 3625 | + | const result = new Array(); | |
| 3626 | + | if (files) { | |
| 3627 | + | for (const file of files) { | |
| 3628 | + | const fileDescriptor = this.getFileDescriptor(file); | |
| 3629 | + | result.push(fileDescriptor); | |
| 3630 | + | } | |
| 3631 | + | return result; | |
| 3632 | + | } | |
| 3633 | + | const keys2 = this.cache.keys(); | |
| 3634 | + | for (const key of keys2) { | |
| 3635 | + | const fileDescriptor = this.getFileDescriptor(key); | |
| 3636 | + | if (!fileDescriptor.notFound && !fileDescriptor.err) { | |
| 3637 | + | result.push(fileDescriptor); | |
| 3638 | + | } | |
| 3639 | + | } | |
| 3640 | + | return result; | |
| 3641 | + | } | |
| 3642 | + | /** | |
| 3643 | + | * Analyze the files | |
| 3644 | + | * @method analyzeFiles | |
| 3645 | + | * @param files - The files to analyze | |
| 3646 | + | * @returns {AnalyzedFiles} The analysis of the files | |
| 3647 | + | */ | |
| 3648 | + | analyzeFiles(files) { | |
| 3649 | + | const result = { | |
| 3650 | + | changedFiles: [], | |
| 3651 | + | notFoundFiles: [], | |
| 3652 | + | notChangedFiles: [] | |
| 3653 | + | }; | |
| 3654 | + | const fileDescriptors = this.normalizeEntries(files); | |
| 3655 | + | for (const fileDescriptor of fileDescriptors) { | |
| 3656 | + | if (fileDescriptor.notFound) { | |
| 3657 | + | result.notFoundFiles.push(fileDescriptor.key); | |
| 3658 | + | } else if (fileDescriptor.changed) { | |
| 3659 | + | result.changedFiles.push(fileDescriptor.key); | |
| 3660 | + | } else { | |
| 3661 | + | result.notChangedFiles.push(fileDescriptor.key); | |
| 3662 | + | } | |
| 3663 | + | } | |
| 3664 | + | return result; | |
| 3665 | + | } | |
| 3666 | + | /** | |
| 3667 | + | * Get the updated files | |
| 3668 | + | * @method getUpdatedFiles | |
| 3669 | + | * @param files - The files to get the updated files for | |
| 3670 | + | * @returns {string[]} The updated files | |
| 3671 | + | */ | |
| 3672 | + | getUpdatedFiles(files) { | |
| 3673 | + | const result = new Array(); | |
| 3674 | + | const fileDescriptors = this.normalizeEntries(files); | |
| 3675 | + | for (const fileDescriptor of fileDescriptors) { | |
| 3676 | + | if (fileDescriptor.changed) { | |
| 3677 | + | result.push(fileDescriptor.key); | |
| 3678 | + | } | |
| 3679 | + | } | |
| 3680 | + | return result; | |
| 3681 | + | } | |
| 3682 | + | /** | |
| 3683 | + | * Get the not found files | |
| 3684 | + | * @method getFileDescriptorsByPath | |
| 3685 | + | * @param filePath - the files that you want to get from a path | |
| 3686 | + | * @returns {FileDescriptor[]} The not found files | |
| 3687 | + | */ | |
| 3688 | + | getFileDescriptorsByPath(filePath) { | |
| 3689 | + | const result = new Array(); | |
| 3690 | + | const keys2 = this._cache.keys(); | |
| 3691 | + | for (const key of keys2) { | |
| 3692 | + | const absolutePath = this.getAbsolutePath(filePath); | |
| 3693 | + | if (absolutePath.startsWith(filePath)) { | |
| 3694 | + | const fileDescriptor = this.getFileDescriptor(key); | |
| 3695 | + | result.push(fileDescriptor); | |
| 3696 | + | } | |
| 3697 | + | } | |
| 3698 | + | return result; | |
| 3699 | + | } | |
| 3700 | + | /** | |
| 3701 | + | * Get the Absolute Path. If it is already absolute it will return the path as is. | |
| 3702 | + | * @method getAbsolutePath | |
| 3703 | + | * @param filePath - The file path to get the absolute path for | |
| 3704 | + | * @param options - The options for getting the absolute path. The current working directory is used if not provided. | |
| 3705 | + | * @returns {string} | |
| 3706 | + | */ | |
| 3707 | + | getAbsolutePath(filePath, options) { | |
| 3708 | + | if (this.isRelativePath(filePath)) { | |
| 3709 | + | const currentWorkingDirectory = (options == null ? void 0 : options.currentWorkingDirectory) ?? this._currentWorkingDirectory ?? process.cwd(); | |
| 3710 | + | filePath = path10.resolve(currentWorkingDirectory, filePath); | |
| 3711 | + | } | |
| 3712 | + | return filePath; | |
| 3713 | + | } | |
| 3714 | + | /** | |
| 3715 | + | * Rename the absolute path keys. This is used when a directory is changed or renamed. | |
| 3716 | + | * @method renameAbsolutePathKeys | |
| 3717 | + | * @param oldPath - The old path to rename | |
| 3718 | + | * @param newPath - The new path to rename to | |
| 3719 | + | */ | |
| 3720 | + | renameAbsolutePathKeys(oldPath, newPath) { | |
| 3721 | + | const keys2 = this._cache.keys(); | |
| 3722 | + | for (const key of keys2) { | |
| 3723 | + | if (key.startsWith(oldPath)) { | |
| 3724 | + | const newKey = key.replace(oldPath, newPath); | |
| 3725 | + | const meta = this._cache.getKey(key); | |
| 3726 | + | this._cache.removeKey(key); | |
| 3727 | + | this._cache.setKey(newKey, meta); | |
| 3728 | + | } | |
| 3729 | + | } | |
| 3730 | + | } | |
| 3731 | + | }; | |
| 3732 | + | ||
| 3733 | + | // src/cli/format-results-cache.js | |
| 3734 | + | import { version as prettierVersion } from "../index.mjs"; | |
| 3735 | + | var optionsHashCache = /* @__PURE__ */ new WeakMap(); | |
| 3736 | + | var nodeVersion = process.version; | |
| 3737 | + | function getHashOfOptions(options) { | |
| 3738 | + | if (optionsHashCache.has(options)) { | |
| 3739 | + | return optionsHashCache.get(options); | |
| 3740 | + | } | |
| 3741 | + | const hash2 = createHash( | |
| 3742 | + | `${prettierVersion}_${nodeVersion}_${(0, import_fast_json_stable_stringify2.default)(options)}` | |
| 3743 | + | ); | |
| 3744 | + | optionsHashCache.set(options, hash2); | |
| 3745 | + | return hash2; | |
| 3746 | + | } | |
| 3747 | + | function getMetadataFromFileDescriptor(fileDescriptor) { | |
| 3748 | + | return fileDescriptor.meta; | |
| 3749 | + | } | |
| 3750 | + | var _fileEntryCache; | |
| 3751 | + | var FormatResultsCache = class { | |
| 3752 | + | /** | |
| 3753 | + | * @param {string} cacheFileLocation The path of cache file location. (default: `node_modules/.cache/prettier/.prettier-cache`) | |
| 3754 | + | * @param {string} cacheStrategy | |
| 3755 | + | */ | |
| 3756 | + | constructor(cacheFileLocation, cacheStrategy) { | |
| 3757 | + | __privateAdd(this, _fileEntryCache); | |
| 3758 | + | const useChecksum = cacheStrategy === "content"; | |
| 3759 | + | try { | |
| 3760 | + | __privateSet(this, _fileEntryCache, FileEntryDefault.createFromFile( | |
| 3761 | + | /* filePath */ | |
| 3762 | + | cacheFileLocation, | |
| 3763 | + | useChecksum | |
| 3764 | + | )); | |
| 3765 | + | } catch { | |
| 3766 | + | if (fs7.existsSync(cacheFileLocation)) { | |
| 3767 | + | fs7.unlinkSync(cacheFileLocation); | |
| 3768 | + | __privateSet(this, _fileEntryCache, FileEntryDefault.createFromFile( | |
| 3769 | + | /* filePath */ | |
| 3770 | + | cacheFileLocation, | |
| 3771 | + | useChecksum | |
| 3772 | + | )); | |
| 3773 | + | } | |
| 3774 | + | } | |
| 3775 | + | } | |
| 3776 | + | /** | |
| 3777 | + | * @param {string} filePath | |
| 3778 | + | * @param {any} options | |
| 3779 | + | */ | |
| 3780 | + | existsAvailableFormatResultsCache(filePath, options) { | |
| 3781 | + | var _a; | |
| 3782 | + | const fileDescriptor = __privateGet(this, _fileEntryCache).getFileDescriptor(filePath); | |
| 3783 | + | if (fileDescriptor.notFound || fileDescriptor.changed) { | |
| 3784 | + | return false; | |
| 3785 | + | } | |
| 3786 | + | const hashOfOptions = (_a = getMetadataFromFileDescriptor(fileDescriptor).data) == null ? void 0 : _a.hashOfOptions; | |
| 3787 | + | return hashOfOptions && hashOfOptions === getHashOfOptions(options); | |
| 3788 | + | } | |
| 3789 | + | /** | |
| 3790 | + | * @param {string} filePath | |
| 3791 | + | * @param {any} options | |
| 3792 | + | */ | |
| 3793 | + | setFormatResultsCache(filePath, options) { | |
| 3794 | + | const fileDescriptor = __privateGet(this, _fileEntryCache).getFileDescriptor(filePath); | |
| 3795 | + | if (!fileDescriptor.notFound) { | |
| 3796 | + | const meta = getMetadataFromFileDescriptor(fileDescriptor); | |
| 3797 | + | meta.data = { ...meta.data, hashOfOptions: getHashOfOptions(options) }; | |
| 3798 | + | } | |
| 3799 | + | } | |
| 3800 | + | /** | |
| 3801 | + | * @param {string} filePath | |
| 3802 | + | */ | |
| 3803 | + | removeFormatResultsCache(filePath) { | |
| 3804 | + | __privateGet(this, _fileEntryCache).removeEntry(filePath); | |
| 3805 | + | } | |
| 3806 | + | reconcile() { | |
| 3807 | + | __privateGet(this, _fileEntryCache).reconcile(); | |
| 3808 | + | } | |
| 3809 | + | }; | |
| 3810 | + | _fileEntryCache = new WeakMap(); | |
| 3811 | + | var format_results_cache_default = FormatResultsCache; | |
| 3812 | + | ||
| 3813 | + | // src/cli/is-tty.js | |
| 3814 | + | function isTTY() { | |
| 3815 | + | return process.stdout.isTTY && !mockable.isCI(); | |
| 3816 | + | } | |
| 3817 | + | ||
| 3818 | + | // src/cli/options/get-options-for-file.js | |
| 3819 | + | var import_dashify2 = __toESM(require_dashify(), 1); | |
| 3820 | + | import { resolveConfig } from "../index.mjs"; | |
| 3821 | + | function getOptions(argv, detailedOptions) { | |
| 3822 | + | return Object.fromEntries( | |
| 3823 | + | detailedOptions.filter(({ forwardToApi }) => forwardToApi).map(({ forwardToApi, name }) => [forwardToApi, argv[name]]) | |
| 3824 | + | ); | |
| 3825 | + | } | |
| 3826 | + | function cliifyOptions(object2, apiDetailedOptionMap) { | |
| 3827 | + | return Object.fromEntries( | |
| 3828 | + | Object.entries(object2 || {}).map(([key, value]) => { | |
| 3829 | + | const apiOption = apiDetailedOptionMap[key]; | |
| 3830 | + | const cliKey = apiOption ? apiOption.name : key; | |
| 3831 | + | return [(0, import_dashify2.default)(cliKey), value]; | |
| 3832 | + | }) | |
| 3833 | + | ); | |
| 3834 | + | } | |
| 3835 | + | function createApiDetailedOptionMap(detailedOptions) { | |
| 3836 | + | return Object.fromEntries( | |
| 3837 | + | detailedOptions.filter( | |
| 3838 | + | (option) => option.forwardToApi && option.forwardToApi !== option.name | |
| 3839 | + | ).map((option) => [option.forwardToApi, option]) | |
| 3840 | + | ); | |
| 3841 | + | } | |
| 3842 | + | function parseArgsToOptions(context, overrideDefaults) { | |
| 3843 | + | const minimistOptions = createMinimistOptions(context.detailedOptions); | |
| 3844 | + | const apiDetailedOptionMap = createApiDetailedOptionMap( | |
| 3845 | + | context.detailedOptions | |
| 3846 | + | ); | |
| 3847 | + | return getOptions( | |
| 3848 | + | normalize_cli_options_default( | |
| 3849 | + | minimistParse(context.rawArguments, { | |
| 3850 | + | string: minimistOptions.string, | |
| 3851 | + | boolean: minimistOptions.boolean, | |
| 3852 | + | default: cliifyOptions(overrideDefaults, apiDetailedOptionMap) | |
| 3853 | + | }), | |
| 3854 | + | context.detailedOptions, | |
| 3855 | + | { logger: false } | |
| 3856 | + | ), | |
| 3857 | + | context.detailedOptions | |
| 3858 | + | ); | |
| 3859 | + | } | |
| 3860 | + | async function getOptionsOrDie(context, filePath) { | |
| 3861 | + | try { | |
| 3862 | + | if (context.argv.config === false) { | |
| 3863 | + | context.logger.debug( | |
| 3864 | + | "'--no-config' option found, skip loading config file." | |
| 3865 | + | ); | |
| 3866 | + | return null; | |
| 3867 | + | } | |
| 3868 | + | context.logger.debug( | |
| 3869 | + | context.argv.config ? `load config file from '${context.argv.config}'` : `resolve config from '${filePath}'` | |
| 3870 | + | ); | |
| 3871 | + | const options = await resolveConfig(filePath, { | |
| 3872 | + | editorconfig: context.argv.editorconfig, | |
| 3873 | + | config: context.argv.config | |
| 3874 | + | }); | |
| 3875 | + | context.logger.debug("loaded options `" + JSON.stringify(options) + "`"); | |
| 3876 | + | return options; | |
| 3877 | + | } catch (error) { | |
| 3878 | + | context.logger.error( | |
| 3879 | + | `Invalid configuration${filePath ? ` for file "${filePath}"` : ""}: | |
| 3880 | + | ` + error.message | |
| 3881 | + | ); | |
| 3882 | + | process.exit(2); | |
| 3883 | + | } | |
| 3884 | + | } | |
| 3885 | + | function applyConfigPrecedence(context, options) { | |
| 3886 | + | try { | |
| 3887 | + | switch (context.argv.configPrecedence) { | |
| 3888 | + | case "cli-override": | |
| 3889 | + | return parseArgsToOptions(context, options); | |
| 3890 | + | case "file-override": | |
| 3891 | + | return { ...parseArgsToOptions(context), ...options }; | |
| 3892 | + | case "prefer-file": | |
| 3893 | + | return options || parseArgsToOptions(context); | |
| 3894 | + | } | |
| 3895 | + | } catch (error) { | |
| 3896 | + | context.logger.error(error.toString()); | |
| 3897 | + | process.exit(2); | |
| 3898 | + | } | |
| 3899 | + | } | |
| 3900 | + | async function getOptionsForFile(context, filepath) { | |
| 3901 | + | const options = await getOptionsOrDie(context, filepath); | |
| 3902 | + | const hasPlugins = options == null ? void 0 : options.plugins; | |
| 3903 | + | if (hasPlugins) { | |
| 3904 | + | await context.pushContextPlugins(options.plugins); | |
| 3905 | + | } | |
| 3906 | + | const appliedOptions = { | |
| 3907 | + | filepath, | |
| 3908 | + | ...applyConfigPrecedence( | |
| 3909 | + | context, | |
| 3910 | + | options && normalizeOptions(options, context.supportOptions, { | |
| 3911 | + | logger: context.logger | |
| 3912 | + | }) | |
| 3913 | + | ) | |
| 3914 | + | }; | |
| 3915 | + | context.logger.debug( | |
| 3916 | + | `applied config-precedence (${context.argv.configPrecedence}): ${JSON.stringify(appliedOptions)}` | |
| 3917 | + | ); | |
| 3918 | + | if (hasPlugins) { | |
| 3919 | + | context.popContextPlugins(); | |
| 3920 | + | } | |
| 3921 | + | return appliedOptions; | |
| 3922 | + | } | |
| 3923 | + | var get_options_for_file_default = getOptionsForFile; | |
| 3924 | + | ||
| 3925 | + | // src/cli/format.js | |
| 3926 | + | var { getStdin, writeFormattedFile } = mockable; | |
| 3927 | + | function diff(a, b) { | |
| 3928 | + | return createTwoFilesPatch("", "", a, b, "", "", { context: 2 }); | |
| 3929 | + | } | |
| 3930 | + | var DebugError = class extends Error { | |
| 3931 | + | name = "DebugError"; | |
| 3932 | + | }; | |
| 3933 | + | function handleError(context, filename, error, printedFilename, ignoreUnknown) { | |
| 3934 | + | ignoreUnknown || (ignoreUnknown = context.argv.ignoreUnknown); | |
| 3935 | + | const errorIsUndefinedParseError = error instanceof errors.UndefinedParserError; | |
| 3936 | + | if (printedFilename) { | |
| 3937 | + | if ((context.argv.write || ignoreUnknown) && errorIsUndefinedParseError) { | |
| 3938 | + | printedFilename.clear(); | |
| 3939 | + | } else { | |
| 3940 | + | process.stdout.write("\n"); | |
| 3941 | + | } | |
| 3942 | + | } | |
| 3943 | + | if (errorIsUndefinedParseError) { | |
| 3944 | + | if (ignoreUnknown) { | |
| 3945 | + | return; | |
| 3946 | + | } | |
| 3947 | + | if (!context.argv.check && !context.argv.listDifferent) { | |
| 3948 | + | process.exitCode = 2; | |
| 3949 | + | } | |
| 3950 | + | context.logger.error(error.message); | |
| 3951 | + | return; | |
| 3952 | + | } | |
| 3953 | + | const isParseError = Boolean(error == null ? void 0 : error.loc); | |
| 3954 | + | const isValidationError = /^Invalid \S+ value\./u.test(error == null ? void 0 : error.message); | |
| 3955 | + | if (isParseError) { | |
| 3956 | + | context.logger.error(`${filename}: ${String(error)}`); | |
| 3957 | + | } else if (isValidationError || error instanceof errors.ConfigError) { | |
| 3958 | + | context.logger.error(error.message); | |
| 3959 | + | process.exit(1); | |
| 3960 | + | } else if (error instanceof DebugError) { | |
| 3961 | + | context.logger.error(`${filename}: ${error.message}`); | |
| 3962 | + | } else { | |
| 3963 | + | context.logger.error(filename + ": " + (error.stack || error)); | |
| 3964 | + | } | |
| 3965 | + | process.exitCode = 2; | |
| 3966 | + | } | |
| 3967 | + | function writeOutput(context, result, options) { | |
| 3968 | + | process.stdout.write( | |
| 3969 | + | context.argv.debugCheck ? result.filepath : result.formatted | |
| 3970 | + | ); | |
| 3971 | + | if (options && options.cursorOffset >= 0) { | |
| 3972 | + | process.stderr.write(result.cursorOffset + "\n"); | |
| 3973 | + | } | |
| 3974 | + | } | |
| 3975 | + | async function listDifferent(context, input, options, filename) { | |
| 3976 | + | if (!context.argv.check && !context.argv.listDifferent) { | |
| 3977 | + | return; | |
| 3978 | + | } | |
| 3979 | + | try { | |
| 3980 | + | if (!await prettier.check(input, options) && !context.argv.write) { | |
| 3981 | + | context.logger.log(filename); | |
| 3982 | + | process.exitCode = 1; | |
| 3983 | + | } | |
| 3984 | + | } catch (error) { | |
| 3985 | + | context.logger.error(error.message); | |
| 3986 | + | } | |
| 3987 | + | return true; | |
| 3988 | + | } | |
| 3989 | + | async function format3(context, input, opt) { | |
| 3990 | + | if (context.argv.debugPrintDoc) { | |
| 3991 | + | const doc = await prettier.__debug.printToDoc(input, opt); | |
| 3992 | + | return { formatted: await prettier.__debug.formatDoc(doc) + "\n" }; | |
| 3993 | + | } | |
| 3994 | + | if (context.argv.debugPrintComments) { | |
| 3995 | + | return { | |
| 3996 | + | formatted: await prettier.format( | |
| 3997 | + | JSON.stringify( | |
| 3998 | + | (await prettier.formatWithCursor(input, opt)).comments || [] | |
| 3999 | + | ), | |
| 4000 | + | { parser: "json" } | |
| 4001 | + | ) | |
| 4002 | + | }; | |
| 4003 | + | } | |
| 4004 | + | if (context.argv.debugPrintAst) { | |
| 4005 | + | const { ast } = await prettier.__debug.parse(input, opt); | |
| 4006 | + | return { | |
| 4007 | + | formatted: JSON.stringify(ast) | |
| 4008 | + | }; | |
| 4009 | + | } | |
| 4010 | + | if (context.argv.debugCheck) { | |
| 4011 | + | const pp = await prettier.format(input, opt); | |
| 4012 | + | const pppp = await prettier.format(pp, opt); | |
| 4013 | + | if (pp !== pppp) { | |
| 4014 | + | throw new DebugError( | |
| 4015 | + | "prettier(input) !== prettier(prettier(input))\n" + diff(pp, pppp) | |
| 4016 | + | ); | |
| 4017 | + | } else { | |
| 4018 | + | const stringify5 = (obj) => JSON.stringify(obj, null, 2); | |
| 4019 | + | const ast = stringify5( | |
| 4020 | + | (await prettier.__debug.parse(input, opt, { massage: true })).ast | |
| 4021 | + | ); | |
| 4022 | + | const past = stringify5( | |
| 4023 | + | (await prettier.__debug.parse(pp, opt, { massage: true })).ast | |
| 4024 | + | ); | |
| 4025 | + | if (ast !== past) { | |
| 4026 | + | const MAX_AST_SIZE = 2097152; | |
| 4027 | + | const astDiff = ast.length > MAX_AST_SIZE || past.length > MAX_AST_SIZE ? "AST diff too large to render" : diff(ast, past); | |
| 4028 | + | throw new DebugError( | |
| 4029 | + | "ast(input) !== ast(prettier(input))\n" + astDiff + "\n" + diff(input, pp) | |
| 4030 | + | ); | |
| 4031 | + | } | |
| 4032 | + | } | |
| 4033 | + | return { formatted: pp, filepath: opt.filepath || "(stdin)\n" }; | |
| 4034 | + | } | |
| 4035 | + | const { performanceTestFlag } = context; | |
| 4036 | + | if (performanceTestFlag == null ? void 0 : performanceTestFlag.debugBenchmark) { | |
| 4037 | + | let benchmark; | |
| 4038 | + | try { | |
| 4039 | + | ({ default: benchmark } = await import("benchmark")); | |
| 4040 | + | } catch { | |
| 4041 | + | context.logger.debug( | |
| 4042 | + | "'--debug-benchmark' requires the 'benchmark' package to be installed." | |
| 4043 | + | ); | |
| 4044 | + | process.exit(2); | |
| 4045 | + | } | |
| 4046 | + | context.logger.debug( | |
| 4047 | + | "'--debug-benchmark' option found, measuring formatWithCursor with 'benchmark' module." | |
| 4048 | + | ); | |
| 4049 | + | const suite = new benchmark.Suite(); | |
| 4050 | + | suite.add("format", { | |
| 4051 | + | defer: true, | |
| 4052 | + | async fn(deferred) { | |
| 4053 | + | await prettier.formatWithCursor(input, opt); | |
| 4054 | + | deferred.resolve(); | |
| 4055 | + | } | |
| 4056 | + | }); | |
| 4057 | + | const result = await new Promise((resolve) => { | |
| 4058 | + | suite.on("complete", (event) => { | |
| 4059 | + | resolve({ | |
| 4060 | + | benchmark: String(event.target), | |
| 4061 | + | hz: event.target.hz, | |
| 4062 | + | ms: event.target.times.cycle * 1e3 | |
| 4063 | + | }); | |
| 4064 | + | }).run({ async: false }); | |
| 4065 | + | }); | |
| 4066 | + | context.logger.debug( | |
| 4067 | + | "'--debug-benchmark' measurements for formatWithCursor: " + JSON.stringify(result, null, 2) | |
| 4068 | + | ); | |
| 4069 | + | } else if (performanceTestFlag == null ? void 0 : performanceTestFlag.debugRepeat) { | |
| 4070 | + | const repeat = performanceTestFlag.debugRepeat; | |
| 4071 | + | context.logger.debug( | |
| 4072 | + | `'${performanceTestFlag.name}' found, running formatWithCursor ${repeat} times.` | |
| 4073 | + | ); | |
| 4074 | + | let totalMs = 0; | |
| 4075 | + | for (let i = 0; i < repeat; ++i) { | |
| 4076 | + | const startMs = Date.now(); | |
| 4077 | + | await prettier.formatWithCursor(input, opt); | |
| 4078 | + | totalMs += Date.now() - startMs; | |
| 4079 | + | } | |
| 4080 | + | const averageMs = totalMs / repeat; | |
| 4081 | + | const results = { | |
| 4082 | + | repeat, | |
| 4083 | + | hz: 1e3 / averageMs, | |
| 4084 | + | ms: averageMs | |
| 4085 | + | }; | |
| 4086 | + | context.logger.debug( | |
| 4087 | + | `'${performanceTestFlag.name}' measurements for formatWithCursor: ${JSON.stringify( | |
| 4088 | + | results, | |
| 4089 | + | null, | |
| 4090 | + | 2 | |
| 4091 | + | )}` | |
| 4092 | + | ); | |
| 4093 | + | } | |
| 4094 | + | return prettier.formatWithCursor(input, opt); | |
| 4095 | + | } | |
| 4096 | + | async function createIsIgnoredFromContextOrDie(context) { | |
| 4097 | + | try { | |
| 4098 | + | return await createIsIgnoredFunction( | |
| 4099 | + | context.argv.ignorePath, | |
| 4100 | + | context.argv.withNodeModules | |
| 4101 | + | ); | |
| 4102 | + | } catch (e) { | |
| 4103 | + | context.logger.error(e.message); | |
| 4104 | + | process.exit(2); | |
| 4105 | + | } | |
| 4106 | + | } | |
| 4107 | + | async function formatStdin(context) { | |
| 4108 | + | const { filepath } = context.argv; | |
| 4109 | + | try { | |
| 4110 | + | const input = await getStdin(); | |
| 4111 | + | let isFileIgnored = false; | |
| 4112 | + | if (filepath) { | |
| 4113 | + | const isIgnored = await createIsIgnoredFromContextOrDie(context); | |
| 4114 | + | isFileIgnored = isIgnored(filepath); | |
| 4115 | + | } | |
| 4116 | + | if (isFileIgnored) { | |
| 4117 | + | writeOutput(context, { formatted: input }); | |
| 4118 | + | return; | |
| 4119 | + | } | |
| 4120 | + | const options = await get_options_for_file_default( | |
| 4121 | + | context, | |
| 4122 | + | filepath ? path11.resolve(filepath) : void 0 | |
| 4123 | + | ); | |
| 4124 | + | if (await listDifferent(context, input, options, "(stdin)")) { | |
| 4125 | + | return; | |
| 4126 | + | } | |
| 4127 | + | const formatted = await format3(context, input, options); | |
| 4128 | + | const { performanceTestFlag } = context; | |
| 4129 | + | if (performanceTestFlag) { | |
| 4130 | + | context.logger.log( | |
| 4131 | + | `'${performanceTestFlag.name}' option found, skipped print code to screen.` | |
| 4132 | + | ); | |
| 4133 | + | return; | |
| 4134 | + | } | |
| 4135 | + | writeOutput(context, formatted, options); | |
| 4136 | + | } catch (error) { | |
| 4137 | + | handleError(context, filepath || "stdin", error); | |
| 4138 | + | } | |
| 4139 | + | } | |
| 4140 | + | async function formatFiles(context) { | |
| 4141 | + | const isIgnored = await createIsIgnoredFromContextOrDie(context); | |
| 4142 | + | const cwd2 = process.cwd(); | |
| 4143 | + | let numberOfUnformattedFilesFound = 0; | |
| 4144 | + | const { performanceTestFlag } = context; | |
| 4145 | + | if (context.argv.check && !performanceTestFlag) { | |
| 4146 | + | context.logger.log("Checking formatting..."); | |
| 4147 | + | } | |
| 4148 | + | let formatResultsCache; | |
| 4149 | + | const cacheFilePath = await find_cache_file_default(context.argv.cacheLocation); | |
| 4150 | + | if (context.argv.cache) { | |
| 4151 | + | formatResultsCache = new format_results_cache_default( | |
| 4152 | + | cacheFilePath, | |
| 4153 | + | context.argv.cacheStrategy || "content" | |
| 4154 | + | ); | |
| 4155 | + | } else if (!context.argv.cacheLocation) { | |
| 4156 | + | const stat = await statSafe(cacheFilePath); | |
| 4157 | + | if (stat) { | |
| 4158 | + | await fs8.unlink(cacheFilePath); | |
| 4159 | + | } | |
| 4160 | + | } | |
| 4161 | + | for await (const { error, filename, ignoreUnknown } of expandPatterns( | |
| 4162 | + | context | |
| 4163 | + | )) { | |
| 4164 | + | if (error) { | |
| 4165 | + | context.logger.error(error); | |
| 4166 | + | process.exitCode = 2; | |
| 4167 | + | continue; | |
| 4168 | + | } | |
| 4169 | + | const isFileIgnored = isIgnored(filename); | |
| 4170 | + | if (isFileIgnored && (context.argv.debugCheck || context.argv.write || context.argv.check || context.argv.listDifferent)) { | |
| 4171 | + | continue; | |
| 4172 | + | } | |
| 4173 | + | const options = { | |
| 4174 | + | ...await get_options_for_file_default(context, filename), | |
| 4175 | + | filepath: filename | |
| 4176 | + | }; | |
| 4177 | + | const fileNameToDisplay = normalizeToPosix(path11.relative(cwd2, filename)); | |
| 4178 | + | let printedFilename; | |
| 4179 | + | if (isTTY()) { | |
| 4180 | + | printedFilename = context.logger.log(fileNameToDisplay, { | |
| 4181 | + | newline: false, | |
| 4182 | + | clearable: true | |
| 4183 | + | }); | |
| 4184 | + | } | |
| 4185 | + | let input; | |
| 4186 | + | try { | |
| 4187 | + | input = await fs8.readFile(filename, "utf8"); | |
| 4188 | + | } catch (error2) { | |
| 4189 | + | context.logger.log(""); | |
| 4190 | + | context.logger.error( | |
| 4191 | + | `Unable to read file "${fileNameToDisplay}": | |
| 4192 | + | ${error2.message}` | |
| 4193 | + | ); | |
| 4194 | + | process.exitCode = 2; | |
| 4195 | + | continue; | |
| 4196 | + | } | |
| 4197 | + | if (isFileIgnored) { | |
| 4198 | + | printedFilename == null ? void 0 : printedFilename.clear(); | |
| 4199 | + | writeOutput(context, { formatted: input }, options); | |
| 4200 | + | continue; | |
| 4201 | + | } | |
| 4202 | + | const start = Date.now(); | |
| 4203 | + | const isCacheExists = formatResultsCache == null ? void 0 : formatResultsCache.existsAvailableFormatResultsCache( | |
| 4204 | + | filename, | |
| 4205 | + | options | |
| 4206 | + | ); | |
| 4207 | + | let result; | |
| 4208 | + | let output; | |
| 4209 | + | try { | |
| 4210 | + | if (isCacheExists) { | |
| 4211 | + | result = { formatted: input }; | |
| 4212 | + | } else { | |
| 4213 | + | result = await format3(context, input, options); | |
| 4214 | + | } | |
| 4215 | + | output = result.formatted; | |
| 4216 | + | } catch (error2) { | |
| 4217 | + | handleError( | |
| 4218 | + | context, | |
| 4219 | + | fileNameToDisplay, | |
| 4220 | + | error2, | |
| 4221 | + | printedFilename, | |
| 4222 | + | ignoreUnknown | |
| 4223 | + | ); | |
| 4224 | + | continue; | |
| 4225 | + | } | |
| 4226 | + | const isDifferent = output !== input; | |
| 4227 | + | let shouldSetCache = !isDifferent; | |
| 4228 | + | printedFilename == null ? void 0 : printedFilename.clear(); | |
| 4229 | + | if (performanceTestFlag) { | |
| 4230 | + | context.logger.log( | |
| 4231 | + | `'${performanceTestFlag.name}' option found, skipped print code or write files.` | |
| 4232 | + | ); | |
| 4233 | + | return; | |
| 4234 | + | } | |
| 4235 | + | if (context.argv.write) { | |
| 4236 | + | if (isDifferent) { | |
| 4237 | + | if (!context.argv.check && !context.argv.listDifferent) { | |
| 4238 | + | context.logger.log(`${fileNameToDisplay} ${Date.now() - start}ms`); | |
| 4239 | + | } | |
| 4240 | + | try { | |
| 4241 | + | await writeFormattedFile(filename, output); | |
| 4242 | + | shouldSetCache = true; | |
| 4243 | + | } catch (error2) { | |
| 4244 | + | context.logger.error( | |
| 4245 | + | `Unable to write file "${fileNameToDisplay}": | |
| 4246 | + | ${error2.message}` | |
| 4247 | + | ); | |
| 4248 | + | process.exitCode = 2; | |
| 4249 | + | } | |
| 4250 | + | } else if (!context.argv.check && !context.argv.listDifferent) { | |
| 4251 | + | const message = `${source_default.grey(fileNameToDisplay)} ${Date.now() - start}ms (unchanged)`; | |
| 4252 | + | if (isCacheExists) { | |
| 4253 | + | context.logger.log(`${message} (cached)`); | |
| 4254 | + | } else { | |
| 4255 | + | context.logger.log(message); | |
| 4256 | + | } | |
| 4257 | + | } | |
| 4258 | + | } else if (context.argv.debugCheck) { | |
| 4259 | + | if (result.filepath) { | |
| 4260 | + | context.logger.log(fileNameToDisplay); | |
| 4261 | + | } else { | |
| 4262 | + | process.exitCode = 2; | |
| 4263 | + | } | |
| 4264 | + | } else if (!context.argv.check && !context.argv.listDifferent) { | |
| 4265 | + | writeOutput(context, result, options); | |
| 4266 | + | } | |
| 4267 | + | if (shouldSetCache) { | |
| 4268 | + | formatResultsCache == null ? void 0 : formatResultsCache.setFormatResultsCache(filename, options); | |
| 4269 | + | } else { | |
| 4270 | + | formatResultsCache == null ? void 0 : formatResultsCache.removeFormatResultsCache(filename); | |
| 4271 | + | } | |
| 4272 | + | if (isDifferent) { | |
| 4273 | + | if (context.argv.check) { | |
| 4274 | + | context.logger.warn(fileNameToDisplay); | |
| 4275 | + | } else if (context.argv.listDifferent) { | |
| 4276 | + | context.logger.log(fileNameToDisplay); | |
| 4277 | + | } | |
| 4278 | + | numberOfUnformattedFilesFound += 1; | |
| 4279 | + | } | |
| 4280 | + | } | |
| 4281 | + | formatResultsCache == null ? void 0 : formatResultsCache.reconcile(); | |
| 4282 | + | if (context.argv.check) { | |
| 4283 | + | if (numberOfUnformattedFilesFound === 0) { | |
| 4284 | + | context.logger.log("All matched files use Prettier code style!"); | |
| 4285 | + | } else { | |
| 4286 | + | const files = numberOfUnformattedFilesFound === 1 ? "the above file" : `${numberOfUnformattedFilesFound} files`; | |
| 4287 | + | context.logger.warn( | |
| 4288 | + | context.argv.write ? `Code style issues fixed in ${files}.` : `Code style issues found in ${files}. Run Prettier with --write to fix.` | |
| 4289 | + | ); | |
| 4290 | + | } | |
| 4291 | + | } | |
| 4292 | + | if ((context.argv.check || context.argv.listDifferent) && numberOfUnformattedFilesFound > 0 && !process.exitCode && !context.argv.write) { | |
| 4293 | + | process.exitCode = 1; | |
| 4294 | + | } | |
| 4295 | + | } | |
| 4296 | + | ||
| 4297 | + | // src/cli/logger.js | |
| 4298 | + | import readline from "readline"; | |
| 4299 | + | ||
| 4300 | + | // node_modules/strip-ansi/node_modules/ansi-regex/index.js | |
| 4301 | + | function ansiRegex({ onlyFirst = false } = {}) { | |
| 4302 | + | const ST = "(?:\\u0007|\\u001B\\u005C|\\u009C)"; | |
| 4303 | + | const pattern = [ | |
| 4304 | + | `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`, | |
| 4305 | + | "(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))" | |
| 4306 | + | ].join("|"); | |
| 4307 | + | return new RegExp(pattern, onlyFirst ? void 0 : "g"); | |
| 4308 | + | } | |
| 4309 | + | ||
| 4310 | + | // node_modules/strip-ansi/index.js | |
| 4311 | + | var regex = ansiRegex(); | |
| 4312 | + | function stripAnsi(string) { | |
| 4313 | + | if (typeof string !== "string") { | |
| 4314 | + | throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); | |
| 4315 | + | } | |
| 4316 | + | return string.replace(regex, ""); | |
| 4317 | + | } | |
| 4318 | + | ||
| 4319 | + | // node_modules/wcwidth.js/combining.js | |
| 4320 | + | var combining_default = [ | |
| 4321 | + | [768, 879], | |
| 4322 | + | [1155, 1158], | |
| 4323 | + | [1160, 1161], | |
| 4324 | + | [1425, 1469], | |
| 4325 | + | [1471, 1471], | |
| 4326 | + | [1473, 1474], | |
| 4327 | + | [1476, 1477], | |
| 4328 | + | [1479, 1479], | |
| 4329 | + | [1536, 1539], | |
| 4330 | + | [1552, 1557], | |
| 4331 | + | [1611, 1630], | |
| 4332 | + | [1648, 1648], | |
| 4333 | + | [1750, 1764], | |
| 4334 | + | [1767, 1768], | |
| 4335 | + | [1770, 1773], | |
| 4336 | + | [1807, 1807], | |
| 4337 | + | [1809, 1809], | |
| 4338 | + | [1840, 1866], | |
| 4339 | + | [1958, 1968], | |
| 4340 | + | [2027, 2035], | |
| 4341 | + | [2305, 2306], | |
| 4342 | + | [2364, 2364], | |
| 4343 | + | [2369, 2376], | |
| 4344 | + | [2381, 2381], | |
| 4345 | + | [2385, 2388], | |
| 4346 | + | [2402, 2403], | |
| 4347 | + | [2433, 2433], | |
| 4348 | + | [2492, 2492], | |
| 4349 | + | [2497, 2500], | |
| 4350 | + | [2509, 2509], | |
| 4351 | + | [2530, 2531], | |
| 4352 | + | [2561, 2562], | |
| 4353 | + | [2620, 2620], | |
| 4354 | + | [2625, 2626], | |
| 4355 | + | [2631, 2632], | |
| 4356 | + | [2635, 2637], | |
| 4357 | + | [2672, 2673], | |
| 4358 | + | [2689, 2690], | |
| 4359 | + | [2748, 2748], | |
| 4360 | + | [2753, 2757], | |
| 4361 | + | [2759, 2760], | |
| 4362 | + | [2765, 2765], | |
| 4363 | + | [2786, 2787], | |
| 4364 | + | [2817, 2817], | |
| 4365 | + | [2876, 2876], | |
| 4366 | + | [2879, 2879], | |
| 4367 | + | [2881, 2883], | |
| 4368 | + | [2893, 2893], | |
| 4369 | + | [2902, 2902], | |
| 4370 | + | [2946, 2946], | |
| 4371 | + | [3008, 3008], | |
| 4372 | + | [3021, 3021], | |
| 4373 | + | [3134, 3136], | |
| 4374 | + | [3142, 3144], | |
| 4375 | + | [3146, 3149], | |
| 4376 | + | [3157, 3158], | |
| 4377 | + | [3260, 3260], | |
| 4378 | + | [3263, 3263], | |
| 4379 | + | [3270, 3270], | |
| 4380 | + | [3276, 3277], | |
| 4381 | + | [3298, 3299], | |
| 4382 | + | [3393, 3395], | |
| 4383 | + | [3405, 3405], | |
| 4384 | + | [3530, 3530], | |
| 4385 | + | [3538, 3540], | |
| 4386 | + | [3542, 3542], | |
| 4387 | + | [3633, 3633], | |
| 4388 | + | [3636, 3642], | |
| 4389 | + | [3655, 3662], | |
| 4390 | + | [3761, 3761], | |
| 4391 | + | [3764, 3769], | |
| 4392 | + | [3771, 3772], | |
| 4393 | + | [3784, 3789], | |
| 4394 | + | [3864, 3865], | |
| 4395 | + | [3893, 3893], | |
| 4396 | + | [3895, 3895], | |
| 4397 | + | [3897, 3897], | |
| 4398 | + | [3953, 3966], | |
| 4399 | + | [3968, 3972], | |
| 4400 | + | [3974, 3975], | |
| 4401 | + | [3984, 3991], | |
| 4402 | + | [3993, 4028], | |
| 4403 | + | [4038, 4038], | |
| 4404 | + | [4141, 4144], | |
| 4405 | + | [4146, 4146], | |
| 4406 | + | [4150, 4151], | |
| 4407 | + | [4153, 4153], | |
| 4408 | + | [4184, 4185], | |
| 4409 | + | [4448, 4607], | |
| 4410 | + | [4959, 4959], | |
| 4411 | + | [5906, 5908], | |
| 4412 | + | [5938, 5940], | |
| 4413 | + | [5970, 5971], | |
| 4414 | + | [6002, 6003], | |
| 4415 | + | [6068, 6069], | |
| 4416 | + | [6071, 6077], | |
| 4417 | + | [6086, 6086], | |
| 4418 | + | [6089, 6099], | |
| 4419 | + | [6109, 6109], | |
| 4420 | + | [6155, 6157], | |
| 4421 | + | [6313, 6313], | |
| 4422 | + | [6432, 6434], | |
| 4423 | + | [6439, 6440], | |
| 4424 | + | [6450, 6450], | |
| 4425 | + | [6457, 6459], | |
| 4426 | + | [6679, 6680], | |
| 4427 | + | [6912, 6915], | |
| 4428 | + | [6964, 6964], | |
| 4429 | + | [6966, 6970], | |
| 4430 | + | [6972, 6972], | |
| 4431 | + | [6978, 6978], | |
| 4432 | + | [7019, 7027], | |
| 4433 | + | [7616, 7626], | |
| 4434 | + | [7678, 7679], | |
| 4435 | + | [8203, 8207], | |
| 4436 | + | [8234, 8238], | |
| 4437 | + | [8288, 8291], | |
| 4438 | + | [8298, 8303], | |
| 4439 | + | [8400, 8431], | |
| 4440 | + | [12330, 12335], | |
| 4441 | + | [12441, 12442], | |
| 4442 | + | [43014, 43014], | |
| 4443 | + | [43019, 43019], | |
| 4444 | + | [43045, 43046], | |
| 4445 | + | [64286, 64286], | |
| 4446 | + | [65024, 65039], | |
| 4447 | + | [65056, 65059], | |
| 4448 | + | [65279, 65279], | |
| 4449 | + | [65529, 65531], | |
| 4450 | + | [68097, 68099], | |
| 4451 | + | [68101, 68102], | |
| 4452 | + | [68108, 68111], | |
| 4453 | + | [68152, 68154], | |
| 4454 | + | [68159, 68159], | |
| 4455 | + | [119143, 119145], | |
| 4456 | + | [119155, 119170], | |
| 4457 | + | [119173, 119179], | |
| 4458 | + | [119210, 119213], | |
| 4459 | + | [119362, 119364], | |
| 4460 | + | [917505, 917505], | |
| 4461 | + | [917536, 917631], | |
| 4462 | + | [917760, 917999] | |
| 4463 | + | ]; | |
| 4464 | + | ||
| 4465 | + | // node_modules/wcwidth.js/index.js | |
| 4466 | + | var DEFAULTS = { | |
| 4467 | + | nul: 0, | |
| 4468 | + | control: 0 | |
| 4469 | + | }; | |
| 4470 | + | function bisearch(ucs) { | |
| 4471 | + | let min = 0; | |
| 4472 | + | let max = combining_default.length - 1; | |
| 4473 | + | let mid; | |
| 4474 | + | if (ucs < combining_default[0][0] || ucs > combining_default[max][1]) return false; | |
| 4475 | + | while (max >= min) { | |
| 4476 | + | mid = Math.floor((min + max) / 2); | |
| 4477 | + | if (ucs > combining_default[mid][1]) min = mid + 1; | |
| 4478 | + | else if (ucs < combining_default[mid][0]) max = mid - 1; | |
| 4479 | + | else return true; | |
| 4480 | + | } | |
| 4481 | + | return false; | |
| 4482 | + | } | |
| 4483 | + | function wcwidth(ucs, opts) { | |
| 4484 | + | if (ucs === 0) return opts.nul; | |
| 4485 | + | if (ucs < 32 || ucs >= 127 && ucs < 160) return opts.control; | |
| 4486 | + | if (bisearch(ucs)) return 0; | |
| 4487 | + | return 1 + (ucs >= 4352 && (ucs <= 4447 || // Hangul Jamo init. consonants | |
| 4488 | + | ucs == 9001 || ucs == 9002 || ucs >= 11904 && ucs <= 42191 && ucs != 12351 || // CJK ... Yi | |
| 4489 | + | ucs >= 44032 && ucs <= 55203 || // Hangul Syllables | |
| 4490 | + | ucs >= 63744 && ucs <= 64255 || // CJK Compatibility Ideographs | |
| 4491 | + | ucs >= 65040 && ucs <= 65049 || // Vertical forms | |
| 4492 | + | ucs >= 65072 && ucs <= 65135 || // CJK Compatibility Forms | |
| 4493 | + | ucs >= 65280 && ucs <= 65376 || // Fullwidth Forms | |
| 4494 | + | ucs >= 65504 && ucs <= 65510 || ucs >= 131072 && ucs <= 196605 || ucs >= 196608 && ucs <= 262141)); | |
| 4495 | + | } | |
| 4496 | + | function wcswidth(str, opts) { | |
| 4497 | + | let h; | |
| 4498 | + | let l; | |
| 4499 | + | let s = 0; | |
| 4500 | + | let n; | |
| 4501 | + | if (typeof str !== "string") return wcwidth(str, opts); | |
| 4502 | + | for (let i = 0; i < str.length; i++) { | |
| 4503 | + | h = str.charCodeAt(i); | |
| 4504 | + | if (h >= 55296 && h <= 56319) { | |
| 4505 | + | l = str.charCodeAt(++i); | |
| 4506 | + | if (l >= 56320 && l <= 57343) { | |
| 4507 | + | h = (h - 55296) * 1024 + (l - 56320) + 65536; | |
| 4508 | + | } else { | |
| 4509 | + | i--; | |
| 4510 | + | } | |
| 4511 | + | } | |
| 4512 | + | n = wcwidth(h, opts); | |
| 4513 | + | if (n < 0) return -1; | |
| 4514 | + | s += n; | |
| 4515 | + | } | |
| 4516 | + | return s; | |
| 4517 | + | } | |
| 4518 | + | var _ = (str) => wcswidth(str, DEFAULTS); | |
| 4519 | + | _.config = (opts = {}) => { | |
| 4520 | + | opts = { | |
| 4521 | + | ...DEFAULTS, | |
| 4522 | + | ...opts | |
| 4523 | + | }; | |
| 4524 | + | return (str) => wcswidth(str, opts); | |
| 4525 | + | }; | |
| 4526 | + | var wcwidth_default = _; | |
| 4527 | + | ||
| 4528 | + | // src/cli/logger.js | |
| 4529 | + | var countLines = (stream, text) => { | |
| 4530 | + | const columns = stream.columns || 80; | |
| 4531 | + | let lineCount = 0; | |
| 4532 | + | for (const line of stripAnsi(text).split("\n")) { | |
| 4533 | + | lineCount += Math.max(1, Math.ceil(wcwidth_default(line) / columns)); | |
| 4534 | + | } | |
| 4535 | + | return lineCount; | |
| 4536 | + | }; | |
| 4537 | + | var clear = (stream, text) => () => { | |
| 4538 | + | const lineCount = countLines(stream, text); | |
| 4539 | + | for (let line = 0; line < lineCount; line++) { | |
| 4540 | + | if (line > 0) { | |
| 4541 | + | readline.moveCursor(stream, 0, -1); | |
| 4542 | + | } | |
| 4543 | + | readline.clearLine(stream, 0); | |
| 4544 | + | readline.cursorTo(stream, 0); | |
| 4545 | + | } | |
| 4546 | + | }; | |
| 4547 | + | var emptyLogResult = { clear() { | |
| 4548 | + | } }; | |
| 4549 | + | function createLogger(logLevel = "log") { | |
| 4550 | + | return { | |
| 4551 | + | logLevel, | |
| 4552 | + | warn: createLogFunc("warn", "yellow"), | |
| 4553 | + | error: createLogFunc("error", "red"), | |
| 4554 | + | debug: createLogFunc("debug", "blue"), | |
| 4555 | + | log: createLogFunc("log") | |
| 4556 | + | }; | |
| 4557 | + | function createLogFunc(loggerName, color) { | |
| 4558 | + | if (!shouldLog(loggerName)) { | |
| 4559 | + | return () => emptyLogResult; | |
| 4560 | + | } | |
| 4561 | + | const stream = process[loggerName === "log" ? "stdout" : "stderr"]; | |
| 4562 | + | const chalkInstance = loggerName === "log" ? source_default : chalkStderr; | |
| 4563 | + | const prefix = color ? `[${chalkInstance[color](loggerName)}] ` : ""; | |
| 4564 | + | return (message, options) => { | |
| 4565 | + | options = { | |
| 4566 | + | newline: true, | |
| 4567 | + | clearable: false, | |
| 4568 | + | ...options | |
| 4569 | + | }; | |
| 4570 | + | message = string_replace_all_default( | |
| 4571 | + | /* isOptionalObject */ | |
| 4572 | + | false, | |
| 4573 | + | message, | |
| 4574 | + | /^/gmu, | |
| 4575 | + | prefix | |
| 4576 | + | ) + (options.newline ? "\n" : ""); | |
| 4577 | + | stream.write(message); | |
| 4578 | + | if (options.clearable) { | |
| 4579 | + | return { | |
| 4580 | + | clear: clear(stream, message) | |
| 4581 | + | }; | |
| 4582 | + | } | |
| 4583 | + | }; | |
| 4584 | + | } | |
| 4585 | + | function shouldLog(loggerName) { | |
| 4586 | + | switch (logLevel) { | |
| 4587 | + | case "silent": | |
| 4588 | + | return false; | |
| 4589 | + | case "debug": | |
| 4590 | + | if (loggerName === "debug") { | |
| 4591 | + | return true; | |
| 4592 | + | } | |
| 4593 | + | // fall through | |
| 4594 | + | case "log": | |
| 4595 | + | if (loggerName === "log") { | |
| 4596 | + | return true; | |
| 4597 | + | } | |
| 4598 | + | // fall through | |
| 4599 | + | case "warn": | |
| 4600 | + | if (loggerName === "warn") { | |
| 4601 | + | return true; | |
| 4602 | + | } | |
| 4603 | + | // fall through | |
| 4604 | + | case "error": | |
| 4605 | + | return loggerName === "error"; | |
| 4606 | + | } | |
| 4607 | + | } | |
| 4608 | + | } | |
| 4609 | + | var logger_default = createLogger; | |
| 4610 | + | ||
| 4611 | + | // src/cli/print-support-info.js | |
| 4612 | + | var import_fast_json_stable_stringify3 = __toESM(require_fast_json_stable_stringify(), 1); | |
| 4613 | + | import { format as format4, getSupportInfo as getSupportInfo2 } from "../index.mjs"; | |
| 4614 | + | var sortByName = (array2) => array2.sort((a, b) => a.name.localeCompare(b.name)); | |
| 4615 | + | async function printSupportInfo() { | |
| 4616 | + | const { languages, options } = await getSupportInfo2(); | |
| 4617 | + | const supportInfo = { | |
| 4618 | + | languages: sortByName(languages), | |
| 4619 | + | options: sortByName(options).map( | |
| 4620 | + | (option) => omit(option, ["cliName", "cliCategory", "cliDescription"]) | |
| 4621 | + | ) | |
| 4622 | + | }; | |
| 4623 | + | printToScreen(await format4((0, import_fast_json_stable_stringify3.default)(supportInfo), { parser: "json" })); | |
| 4624 | + | } | |
| 4625 | + | var print_support_info_default = printSupportInfo; | |
| 4626 | + | ||
| 4627 | + | // src/cli/constants.evaluate.js | |
| 4628 | + | var categoryOrder = [ | |
| 4629 | + | "Output", | |
| 4630 | + | "Format", | |
| 4631 | + | "Config", | |
| 4632 | + | "Editor", | |
| 4633 | + | "Other" | |
| 4634 | + | ]; | |
| 4635 | + | var usageSummary = "Usage: prettier [options] [file/dir/glob ...]\n\nBy default, output is written to stdout.\nStdin is read if it is piped to Prettier and no files are given."; | |
| 4636 | + | ||
| 4637 | + | // src/cli/usage.js | |
| 4638 | + | var OPTION_USAGE_THRESHOLD = 25; | |
| 4639 | + | var CHOICE_USAGE_MARGIN = 3; | |
| 4640 | + | var CHOICE_USAGE_INDENTATION = 2; | |
| 4641 | + | function indent(str, spaces) { | |
| 4642 | + | return string_replace_all_default( | |
| 4643 | + | /* isOptionalObject */ | |
| 4644 | + | false, | |
| 4645 | + | str, | |
| 4646 | + | /^/gmu, | |
| 4647 | + | " ".repeat(spaces) | |
| 4648 | + | ); | |
| 4649 | + | } | |
| 4650 | + | function createDefaultValueDisplay(value) { | |
| 4651 | + | return Array.isArray(value) ? `[${value.map(createDefaultValueDisplay).join(", ")}]` : value; | |
| 4652 | + | } | |
| 4653 | + | function getOptionDefaultValue(context, optionName) { | |
| 4654 | + | var _a; | |
| 4655 | + | const option = context.detailedOptions.find( | |
| 4656 | + | ({ name }) => name === optionName | |
| 4657 | + | ); | |
| 4658 | + | if ((option == null ? void 0 : option.default) !== void 0) { | |
| 4659 | + | return option.default; | |
| 4660 | + | } | |
| 4661 | + | const optionCamelName = camelCase(optionName); | |
| 4662 | + | return formatOptionsHiddenDefaults[optionCamelName] ?? ((_a = context.supportOptions.find( | |
| 4663 | + | (option2) => !option2.deprecated && option2.name === optionCamelName | |
| 4664 | + | )) == null ? void 0 : _a.default); | |
| 4665 | + | } | |
| 4666 | + | function createOptionUsageHeader(option) { | |
| 4667 | + | const name = `--${option.name}`; | |
| 4668 | + | const alias = option.alias ? `-${option.alias},` : null; | |
| 4669 | + | const type = createOptionUsageType(option); | |
| 4670 | + | return [alias, name, type].filter(Boolean).join(" "); | |
| 4671 | + | } | |
| 4672 | + | function createOptionUsageRow(header, content, threshold) { | |
| 4673 | + | const separator = header.length >= threshold ? ` | |
| 4674 | + | ${" ".repeat(threshold)}` : " ".repeat(threshold - header.length); | |
| 4675 | + | const description = string_replace_all_default( | |
| 4676 | + | /* isOptionalObject */ | |
| 4677 | + | false, | |
| 4678 | + | content, | |
| 4679 | + | "\n", | |
| 4680 | + | ` | |
| 4681 | + | ${" ".repeat(threshold)}` | |
| 4682 | + | ); | |
| 4683 | + | return `${header}${separator}${description}`; | |
| 4684 | + | } | |
| 4685 | + | function createOptionUsageType(option) { | |
| 4686 | + | switch (option.type) { | |
| 4687 | + | case "boolean": | |
| 4688 | + | return null; | |
| 4689 | + | case "choice": | |
| 4690 | + | return `<${option.choices.filter((choice) => !choice.deprecated).map((choice) => choice.value).join("|")}>`; | |
| 4691 | + | default: | |
| 4692 | + | return `<${option.type}>`; | |
| 4693 | + | } | |
| 4694 | + | } | |
| 4695 | + | function createChoiceUsages(choices, margin, indentation) { | |
| 4696 | + | const activeChoices = choices.filter((choice) => !choice.deprecated); | |
| 4697 | + | const threshold = Math.max(0, ...activeChoices.map((choice) => choice.value.length)) + margin; | |
| 4698 | + | return activeChoices.map( | |
| 4699 | + | (choice) => indent( | |
| 4700 | + | createOptionUsageRow(choice.value, choice.description, threshold), | |
| 4701 | + | indentation | |
| 4702 | + | ) | |
| 4703 | + | ); | |
| 4704 | + | } | |
| 4705 | + | function createOptionUsage(context, option, threshold) { | |
| 4706 | + | const header = createOptionUsageHeader(option); | |
| 4707 | + | const optionDefaultValue = getOptionDefaultValue(context, option.name); | |
| 4708 | + | return createOptionUsageRow( | |
| 4709 | + | header, | |
| 4710 | + | `${option.description}${optionDefaultValue === void 0 ? "" : ` | |
| 4711 | + | Defaults to ${createDefaultValueDisplay(optionDefaultValue)}.`}`, | |
| 4712 | + | threshold | |
| 4713 | + | ); | |
| 4714 | + | } | |
| 4715 | + | function getOptionsWithOpposites(options) { | |
| 4716 | + | const optionsWithOpposites = options.map((option) => [ | |
| 4717 | + | option.description ? option : null, | |
| 4718 | + | option.oppositeDescription ? { | |
| 4719 | + | ...option, | |
| 4720 | + | name: `no-${option.name}`, | |
| 4721 | + | type: "boolean", | |
| 4722 | + | description: option.oppositeDescription | |
| 4723 | + | } : null | |
| 4724 | + | ]); | |
| 4725 | + | return optionsWithOpposites.flat().filter(Boolean); | |
| 4726 | + | } | |
| 4727 | + | function createUsage(context) { | |
| 4728 | + | const sortedOptions = context.detailedOptions.sort( | |
| 4729 | + | (optionA, optionB) => optionA.name.localeCompare(optionB.name) | |
| 4730 | + | ); | |
| 4731 | + | const options = getOptionsWithOpposites(sortedOptions).filter( | |
| 4732 | + | // remove unnecessary option (e.g. `semi`, `color`, etc.), which is only used for --help <flag> | |
| 4733 | + | (option) => !(option.type === "boolean" && option.oppositeDescription && !option.name.startsWith("no-")) | |
| 4734 | + | ); | |
| 4735 | + | const groupedOptions = groupBy(options, (option) => option.category); | |
| 4736 | + | const firstCategories = categoryOrder.slice(0, -1); | |
| 4737 | + | const lastCategories = categoryOrder.slice(-1); | |
| 4738 | + | const restCategories = Object.keys(groupedOptions).filter( | |
| 4739 | + | (category) => !categoryOrder.includes(category) | |
| 4740 | + | ); | |
| 4741 | + | const allCategories = [ | |
| 4742 | + | ...firstCategories, | |
| 4743 | + | ...restCategories, | |
| 4744 | + | ...lastCategories | |
| 4745 | + | ]; | |
| 4746 | + | const optionsUsage = allCategories.map((category) => { | |
| 4747 | + | const categoryOptions = groupedOptions[category].map( | |
| 4748 | + | (option) => createOptionUsage(context, option, OPTION_USAGE_THRESHOLD) | |
| 4749 | + | ).join("\n"); | |
| 4750 | + | return `${category} options: | |
| 4751 | + | ||
| 4752 | + | ${indent(categoryOptions, 2)}`; | |
| 4753 | + | }); | |
| 4754 | + | return [usageSummary, ...optionsUsage, ""].join("\n\n"); | |
| 4755 | + | } | |
| 4756 | + | function createPluginDefaults(pluginDefaults) { | |
| 4757 | + | if (!pluginDefaults || Object.keys(pluginDefaults).length === 0) { | |
| 4758 | + | return ""; | |
| 4759 | + | } | |
| 4760 | + | const defaults = Object.entries(pluginDefaults).sort( | |
| 4761 | + | ([pluginNameA], [pluginNameB]) => pluginNameA.localeCompare(pluginNameB) | |
| 4762 | + | ).map( | |
| 4763 | + | ([plugin, value]) => `* ${plugin}: ${createDefaultValueDisplay(value)}` | |
| 4764 | + | ).join("\n"); | |
| 4765 | + | return ` | |
| 4766 | + | Plugin defaults: | |
| 4767 | + | ${defaults}`; | |
| 4768 | + | } | |
| 4769 | + | function createDetailedUsage(context, flag) { | |
| 4770 | + | const option = getOptionsWithOpposites(context.detailedOptions).find( | |
| 4771 | + | (option2) => option2.name === flag || option2.alias === flag | |
| 4772 | + | ); | |
| 4773 | + | const header = createOptionUsageHeader(option); | |
| 4774 | + | const description = ` | |
| 4775 | + | ||
| 4776 | + | ${indent(option.description, 2)}`; | |
| 4777 | + | const choices = option.type !== "choice" ? "" : ` | |
| 4778 | + | ||
| 4779 | + | Valid options: | |
| 4780 | + | ||
| 4781 | + | ${createChoiceUsages( | |
| 4782 | + | option.choices, | |
| 4783 | + | CHOICE_USAGE_MARGIN, | |
| 4784 | + | CHOICE_USAGE_INDENTATION | |
| 4785 | + | ).join("\n")}`; | |
| 4786 | + | const optionDefaultValue = getOptionDefaultValue(context, option.name); | |
| 4787 | + | const defaults = optionDefaultValue !== void 0 ? ` | |
| 4788 | + | ||
| 4789 | + | Default: ${createDefaultValueDisplay(optionDefaultValue)}` : ""; | |
| 4790 | + | const pluginDefaults = createPluginDefaults(option.pluginDefaults); | |
| 4791 | + | return `${header}${description}${choices}${defaults}${pluginDefaults}`; | |
| 4792 | + | } | |
| 4793 | + | ||
| 4794 | + | // src/cli/index.js | |
| 4795 | + | async function run(rawArguments = process.argv.slice(2)) { | |
| 4796 | + | let logger = logger_default(); | |
| 4797 | + | try { | |
| 4798 | + | const { logLevel } = parseArgvWithoutPlugins( | |
| 4799 | + | rawArguments, | |
| 4800 | + | logger, | |
| 4801 | + | "log-level" | |
| 4802 | + | ); | |
| 4803 | + | if (logLevel !== logger.logLevel) { | |
| 4804 | + | logger = logger_default(logLevel); | |
| 4805 | + | } | |
| 4806 | + | const context = new context_default({ rawArguments, logger }); | |
| 4807 | + | await context.init(); | |
| 4808 | + | if (logger.logLevel !== "debug" && context.performanceTestFlag) { | |
| 4809 | + | context.logger = logger_default("debug"); | |
| 4810 | + | } | |
| 4811 | + | await main(context); | |
| 4812 | + | } catch (error) { | |
| 4813 | + | logger.error(error.message); | |
| 4814 | + | process.exitCode = 1; | |
| 4815 | + | } | |
| 4816 | + | } | |
| 4817 | + | async function main(context) { | |
| 4818 | + | context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`); | |
| 4819 | + | if (context.argv.check && context.argv.listDifferent) { | |
| 4820 | + | throw new Error("Cannot use --check and --list-different together."); | |
| 4821 | + | } | |
| 4822 | + | if (context.argv.write && context.argv.debugCheck) { | |
| 4823 | + | throw new Error("Cannot use --write and --debug-check together."); | |
| 4824 | + | } | |
| 4825 | + | if (context.argv.findConfigPath && context.filePatterns.length > 0) { | |
| 4826 | + | throw new Error("Cannot use --find-config-path with multiple files"); | |
| 4827 | + | } | |
| 4828 | + | if (context.argv.fileInfo && context.filePatterns.length > 0) { | |
| 4829 | + | throw new Error("Cannot use --file-info with multiple files"); | |
| 4830 | + | } | |
| 4831 | + | if (!context.argv.cache && context.argv.cacheStrategy) { | |
| 4832 | + | throw new Error("`--cache-strategy` cannot be used without `--cache`."); | |
| 4833 | + | } | |
| 4834 | + | if (context.argv.version) { | |
| 4835 | + | printToScreen(prettier2.version); | |
| 4836 | + | return; | |
| 4837 | + | } | |
| 4838 | + | if (context.argv.help !== void 0) { | |
| 4839 | + | printToScreen( | |
| 4840 | + | typeof context.argv.help === "string" && context.argv.help !== "" ? createDetailedUsage(context, context.argv.help) : createUsage(context) | |
| 4841 | + | ); | |
| 4842 | + | return; | |
| 4843 | + | } | |
| 4844 | + | if (context.argv.supportInfo) { | |
| 4845 | + | return print_support_info_default(); | |
| 4846 | + | } | |
| 4847 | + | if (context.argv.findConfigPath) { | |
| 4848 | + | await find_config_path_default(context); | |
| 4849 | + | return; | |
| 4850 | + | } | |
| 4851 | + | if (context.argv.fileInfo) { | |
| 4852 | + | await file_info_default(context); | |
| 4853 | + | return; | |
| 4854 | + | } | |
| 4855 | + | const hasFilePatterns = context.filePatterns.length > 0; | |
| 4856 | + | const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.argv.filepath); | |
| 4857 | + | if (useStdin) { | |
| 4858 | + | if (context.argv.cache) { | |
| 4859 | + | throw new Error("`--cache` cannot be used when formatting stdin."); | |
| 4860 | + | } | |
| 4861 | + | await formatStdin(context); | |
| 4862 | + | return; | |
| 4863 | + | } | |
| 4864 | + | if (hasFilePatterns) { | |
| 4865 | + | await formatFiles(context); | |
| 4866 | + | return; | |
| 4867 | + | } | |
| 4868 | + | process.exitCode = 1; | |
| 4869 | + | printToScreen(createUsage(context)); | |
| 4870 | + | } | |
| 4871 | + | export { | |
| 4872 | + | run | |
| 4873 | + | }; | |
A node_modules/prettier/package.json +200 -0 collapsed to keep the page light
A node_modules/prettier/plugins/acorn.d.ts +6 -0 collapsed to keep the page light
A node_modules/prettier/plugins/acorn.js +15 -0 collapsed to keep the page light
A node_modules/prettier/plugins/acorn.mjs +15 -0 collapsed to keep the page light
A node_modules/prettier/plugins/angular.d.ts +8 -0 collapsed to keep the page light
A node_modules/prettier/plugins/angular.js +2 -0 collapsed to keep the page light
A node_modules/prettier/plugins/angular.mjs +2 -0 collapsed to keep the page light
A node_modules/prettier/plugins/babel.d.ts +18 -0 collapsed to keep the page light
A node_modules/prettier/plugins/babel.js +15 -0 collapsed to keep the page light
A node_modules/prettier/plugins/babel.mjs +15 -0 collapsed to keep the page light
A node_modules/prettier/plugins/estree.d.ts +1 -0 collapsed to keep the page light
A node_modules/prettier/plugins/estree.js +36 -0 collapsed to keep the page light
A node_modules/prettier/plugins/estree.mjs +36 -0 collapsed to keep the page light
A node_modules/prettier/plugins/flow.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/flow.js +19 -0 collapsed to keep the page light
A node_modules/prettier/plugins/flow.mjs +19 -0 collapsed to keep the page light
A node_modules/prettier/plugins/glimmer.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/glimmer.js +30 -0 collapsed to keep the page light
A node_modules/prettier/plugins/glimmer.mjs +30 -0 collapsed to keep the page light
A node_modules/prettier/plugins/graphql.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/graphql.js +29 -0 collapsed to keep the page light
A node_modules/prettier/plugins/graphql.mjs +29 -0 collapsed to keep the page light
A node_modules/prettier/plugins/html.d.ts +8 -0 collapsed to keep the page light
A node_modules/prettier/plugins/html.js +22 -0 collapsed to keep the page light
A node_modules/prettier/plugins/html.mjs +22 -0 collapsed to keep the page light
A node_modules/prettier/plugins/markdown.d.ts +7 -0 collapsed to keep the page light
A node_modules/prettier/plugins/markdown.js +63 -0 collapsed to keep the page light
A node_modules/prettier/plugins/markdown.mjs +63 -0 collapsed to keep the page light
A node_modules/prettier/plugins/meriyah.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/meriyah.js +4 -0 collapsed to keep the page light
A node_modules/prettier/plugins/meriyah.mjs +4 -0 collapsed to keep the page light
A node_modules/prettier/plugins/postcss.d.ts +7 -0 collapsed to keep the page light
A node_modules/prettier/plugins/postcss.js +54 -0 collapsed to keep the page light
A node_modules/prettier/plugins/postcss.mjs +54 -0 collapsed to keep the page light
A node_modules/prettier/plugins/typescript.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/typescript.js +20 -0 collapsed to keep the page light
A node_modules/prettier/plugins/typescript.mjs +20 -0 collapsed to keep the page light
A node_modules/prettier/plugins/yaml.d.ts +5 -0 collapsed to keep the page light
A node_modules/prettier/plugins/yaml.js +161 -0 collapsed to keep the page light
A node_modules/prettier/plugins/yaml.mjs +161 -0 collapsed to keep the page light
A node_modules/prettier/standalone.d.ts +33 -0 collapsed to keep the page light
A node_modules/prettier/standalone.js +39 -0 collapsed to keep the page light
A node_modules/prettier/standalone.mjs +39 -0 collapsed to keep the page light
A node_modules/queue-microtask/LICENSE +20 -0 collapsed to keep the page light
A node_modules/queue-microtask/README.md +90 -0 collapsed to keep the page light
A node_modules/queue-microtask/index.d.ts +2 -0 collapsed to keep the page light
A node_modules/queue-microtask/index.js +9 -0 collapsed to keep the page light
A node_modules/queue-microtask/package.json +55 -0 collapsed to keep the page light
A node_modules/read-cache/LICENSE +20 -0 collapsed to keep the page light
A node_modules/read-cache/README.md +46 -0 collapsed to keep the page light
A node_modules/read-cache/index.js +78 -0 collapsed to keep the page light
A node_modules/read-cache/package.json +34 -0 collapsed to keep the page light
A node_modules/readdirp/LICENSE +21 -0 collapsed to keep the page light
A node_modules/readdirp/README.md +122 -0 collapsed to keep the page light
A node_modules/readdirp/index.d.ts +43 -0 collapsed to keep the page light
A node_modules/readdirp/index.js +287 -0 collapsed to keep the page light
A node_modules/readdirp/package.json +122 -0 collapsed to keep the page light
A node_modules/resolve/.editorconfig +37 -0 collapsed to keep the page light
A node_modules/resolve/.eslintrc +65 -0 collapsed to keep the page light
A node_modules/resolve/.github/FUNDING.yml +12 -0 collapsed to keep the page light
A node_modules/resolve/LICENSE +21 -0 collapsed to keep the page light
A node_modules/resolve/SECURITY.md +3 -0 collapsed to keep the page light
A node_modules/resolve/async.js +3 -0 collapsed to keep the page light
A node_modules/resolve/bin/resolve +50 -0 collapsed to keep the page light
A node_modules/resolve/example/async.js +5 -0 collapsed to keep the page light
A node_modules/resolve/example/sync.js +3 -0 collapsed to keep the page light
A node_modules/resolve/index.js +6 -0 collapsed to keep the page light
A node_modules/resolve/lib/async.js +329 -0 collapsed to keep the page light
A node_modules/resolve/lib/caller.js +8 -0 collapsed to keep the page light
A node_modules/resolve/lib/core.js +12 -0 collapsed to keep the page light
A node_modules/resolve/lib/core.json +158 -0 collapsed to keep the page light
A node_modules/resolve/lib/homedir.js +24 -0 collapsed to keep the page light
A node_modules/resolve/lib/is-core.js +5 -0 collapsed to keep the page light
A node_modules/resolve/lib/node-modules-paths.js +42 -0 collapsed to keep the page light
A node_modules/resolve/lib/normalize-options.js +10 -0 collapsed to keep the page light
A node_modules/resolve/lib/sync.js +208 -0 collapsed to keep the page light
A node_modules/resolve/package.json +72 -0 collapsed to keep the page light
A node_modules/resolve/readme.markdown +301 -0 collapsed to keep the page light
A node_modules/resolve/sync.js +3 -0 collapsed to keep the page light
A node_modules/resolve/test/core.js +88 -0 collapsed to keep the page light
A node_modules/resolve/test/dotdot.js +29 -0 collapsed to keep the page light
A node_modules/resolve/test/dotdot/abc/index.js +2 -0 collapsed to keep the page light
A node_modules/resolve/test/dotdot/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/faulty_basedir.js +29 -0 collapsed to keep the page light
A node_modules/resolve/test/filter.js +34 -0 collapsed to keep the page light
A node_modules/resolve/test/filter_sync.js +33 -0 collapsed to keep the page light
A node_modules/resolve/test/home_paths.js +127 -0 collapsed to keep the page light
A node_modules/resolve/test/home_paths_sync.js +114 -0 collapsed to keep the page light
A node_modules/resolve/test/mock.js +315 -0 collapsed to keep the page light
A node_modules/resolve/test/mock_sync.js +214 -0 collapsed to keep the page light
A node_modules/resolve/test/module_dir.js +56 -0 collapsed to keep the page light
A node_modules/resolve/test/module_dir/xmodules/aaa/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/module_dir/ymodules/aaa/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/module_dir/zmodules/bbb/main.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/module_dir/zmodules/bbb/package.json +3 -0 collapsed to keep the page light
A node_modules/resolve/test/node-modules-paths.js +143 -0 collapsed to keep the page light
A node_modules/resolve/test/node_path.js +70 -0 collapsed to keep the page light
A node_modules/resolve/test/node_path/x/aaa/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/node_path/x/ccc/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/node_path/y/bbb/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/node_path/y/ccc/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/nonstring.js +9 -0 collapsed to keep the page light
A node_modules/resolve/test/pathfilter.js +75 -0 collapsed to keep the page light
A node_modules/resolve/test/pathfilter/deep_ref/main.js +0 -0
no textual change.
A node_modules/resolve/test/precedence.js +23 -0 collapsed to keep the page light
A node_modules/resolve/test/precedence/aaa.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/precedence/aaa/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/precedence/aaa/main.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/precedence/bbb.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/precedence/bbb/main.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver.js +597 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/baz/doom.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/baz/package.json +4 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/baz/quux.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/browser_field/a.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/browser_field/b.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/browser_field/package.json +5 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/cup.coffee +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/dot_main/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/dot_main/package.json +3 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/dot_slash_main/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/dot_slash_main/package.json +3 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/false_main/index.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/false_main/package.json +4 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/foo.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/incorrect_main/index.js +2 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/incorrect_main/package.json +3 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/invalid_main/package.json +7 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/mug.coffee +0 -0
no textual change.
A node_modules/resolve/test/resolver/mug.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/multirepo/lerna.json +6 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/multirepo/package.json +20 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/multirepo/packages/package-a/index.js +35 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/multirepo/packages/package-a/package.json +14 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/multirepo/packages/package-b/index.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/multirepo/packages/package-b/package.json +14 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/nested_symlinks/mylib/async.js +26 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/nested_symlinks/mylib/package.json +15 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/nested_symlinks/mylib/sync.js +12 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/other_path/lib/other-lib.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/other_path/root.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/quux/foo/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/same_names/foo.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/same_names/foo/index.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/symlinked/_/node_modules/foo.js +0 -0
no textual change.
A node_modules/resolve/test/resolver/symlinked/_/symlink_target/.gitkeep +0 -0
no textual change.
A node_modules/resolve/test/resolver/symlinked/package/bar.js +1 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/symlinked/package/package.json +3 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver/without_basedir/main.js +5 -0 collapsed to keep the page light
A node_modules/resolve/test/resolver_sync.js +730 -0 collapsed to keep the page light
A node_modules/resolve/test/shadowed_core.js +54 -0 collapsed to keep the page light
A node_modules/resolve/test/shadowed_core/node_modules/util/index.js +0 -0
no textual change.