nanos-lint 2.8.1 → 2.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -907,13 +907,17 @@ interface ParseOptionsResult {
907
907
  }
908
908
  //#endregion
909
909
  //#region src/cli.d.ts
910
+ /** Accumulates repeatable --ignore pattern arguments, splitting by comma and newline. */
910
911
  declare function collectIgnorePatterns(val: string, prev?: string[]): string[];
911
912
  interface CreateProgramOptions {
912
913
  setExitCode?: (code: number) => void;
913
914
  }
915
+ /** Constructs and configures the top-level Commander program and its CLI subcommands. */
914
916
  declare function createProgram(options?: CreateProgramOptions): Command;
917
+ /** Parses command-line arguments and executes the requested CLI action. */
915
918
  declare function runCLI(args?: string[]): Promise<number>;
919
+ /** Determines whether the current module is being directly executed as an application entrypoint. */
916
920
  declare function isDirectExecution(importMetaUrl?: string, argv1?: string | undefined): boolean;
917
921
  //#endregion
918
922
  export { runCLI as a, isDirectExecution as i, collectIgnorePatterns as n, createProgram as r, CreateProgramOptions as t };
919
- //# sourceMappingURL=cli-r8LDolDk.d.ts.map
923
+ //# sourceMappingURL=cli-dxsaVVVq.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli-r8LDolDk.d.ts","names":[],"sources":["../node_modules/commander/typings/index.d.ts","../src/cli.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;KAWK,aAAa,aAAa,oCAC3B,eACC,WAAW;cAEH,uBAAuB;EAClC;EACA;EACA;EACA;;;;;;;EAQA,YAAY,kBAAkB,cAAc;;UAY7B;;;EAGf;;EAEA;;cAGW;EACX;EACA;EACA;EACA;EACA;EACA,YAAY,GAAG,eAAe,UAAU,MAAM;EAC9C;;;;;;EAOA,YAAY,aAAa;;;;EAKzB;;;;EAKA,QAAQ,gBAAgB;;;;EAKxB,UAAU,GAAG,KAAK,eAAe,UAAU,MAAM;;;;EAKjD,QAAQ;;;;EAKR;;;;EAKA;;cAGW;EACX;EACA;EAEA;EACA;EACA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AcjB,cAAc;;;;EAId;;;;;;EAOA,UAAU;;;;EAIV;;;;;;;;;;;;;EAcA,cAAc;;;;EAId;;;;;;;;;;;;;EAcA,aAAa;;;;EAIb;;;;;;;EAQA,WAAW,UAAU;;EAErB,WAAW,KAAK;;;;EAKhB,gBAAgB,UAAU;;;;;;EAO1B,WAAW,0BAA0B;;;;;EAMrC,cAAc,QAAQ;;;;;;EAOtB,KAAK,UAAU;;EAEf,KAAK,KAAK;;;;;;;EAQV,YAAY,UAAU,qBAAqB;EAC3C,YACE,UAAU,qBACV,OAAO,SAAS;;;;EAMlB,GAAG,wBAAwB,cAAc;;UAG1B;EACf;EACA;;EAEA;;UAEe,iCAAiC;EAChD;;UAGe;EACf;EACA;;;;iBC/iCc,sBAAsB,aAAa;UAqBlC;EACf,eAAe;;iBAGD,cAAc,UAAU,uBAAuB;iBAoRzC,OAAO,kBAAyC;iBA0DtD,kBACd,wBACA"}
1
+ {"version":3,"file":"cli-dxsaVVVq.d.ts","names":[],"sources":["../node_modules/commander/typings/index.d.ts","../src/cli.ts"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;KAWK,aAAa,aAAa,oCAC3B,eACC,WAAW;cAEH,uBAAuB;EAClC;EACA;EACA;EACA;;;;;;;EAQA,YAAY,kBAAkB,cAAc;;UAY7B;;;EAGf;;EAEA;;cAGW;EACX;EACA;EACA;EACA;EACA;EACA,YAAY,GAAG,eAAe,UAAU,MAAM;EAC9C;;;;;;EAOA,YAAY,aAAa;;;;EAKzB;;;;EAKA,QAAQ,gBAAgB;;;;EAKxB,UAAU,GAAG,KAAK,eAAe,UAAU,MAAM;;;;EAKjD,QAAQ;;;;EAKR;;;;EAKA;;cAGW;EACX;EACA;EAEA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY,GAAG,eAAe,UAAU,MAAM;EAC9C;EACA;EACA;EAEA,YAAY,eAAe;;;;EAK3B,QAAQ,gBAAgB;;;;;;;;;;;EAYxB,OAAO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AK;;;;EAKhB,gBAAgB,UAAU;;;;;;EAO1B,WAAW,0BAA0B;;;;;EAMrC,cAAc,QAAQ;;;;;;EAOtB,KAAK,UAAU;;EAEf,KAAK,KAAK;;;;;;;EAQV,YAAY,UAAU,qBAAqB;EAC3C,YACE,UAAU,qBACV,OAAO,SAAS;;;;EAMlB,GAAG,wBAAwB,cAAc;;UAG1B;EACf;EACA;;EAEA;;UAEe,iCAAiC;EAChD;;UAGe;EACf;EACA;;;;;iBC7iCc,sBAAsB,aAAa;UAqBlC;EACf,eAAe;;;iBAID,cAAc,UAAU,uBAAuB;;iBA6RzC,OAAO,kBAAyC;;iBA2DtD,kBACd,wBACA"}
package/dist/cli.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as runCLI, i as isDirectExecution, n as collectIgnorePatterns, r as createProgram, t as CreateProgramOptions } from "./cli-r8LDolDk.js";
1
+ import { a as runCLI, i as isDirectExecution, n as collectIgnorePatterns, r as createProgram, t as CreateProgramOptions } from "./cli-dxsaVVVq.js";
2
2
  export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
package/dist/cli.js CHANGED
@@ -1,2 +1,2 @@
1
- import { i as runCLI, n as createProgram, r as isDirectExecution, t as collectIgnorePatterns } from "./cli-BAy_Ztvh.js";
1
+ import { i as runCLI, n as createProgram, r as isDirectExecution, t as collectIgnorePatterns } from "./cli-BTHx4yp_.js";
2
2
  export { collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as runCLI, i as isDirectExecution, n as collectIgnorePatterns, r as createProgram, t as CreateProgramOptions } from "./cli-r8LDolDk.js";
1
+ import { a as runCLI, i as isDirectExecution, n as collectIgnorePatterns, r as createProgram, t as CreateProgramOptions } from "./cli-dxsaVVVq.js";
2
2
  //#region src/types.d.ts
3
3
  export type DiagnosticSeverity = "Error" | "Warning" | "Information" | "Hint";
4
4
  export type DiagnosticSeverityLevel = 1 | 2 | 3 | 4;
@@ -79,18 +79,22 @@ export declare function fileUriToPath(uri: string): string;
79
79
  * Finds the package root directory across both development (src/) and production (dist/) environments.
80
80
  */
81
81
  export declare function getPackageRoot(): string;
82
+ /** Resolves the default annotations path from environment variable, bundled file, or user cache. */
82
83
  export declare function getDefaultAnnotationsPath(): string;
83
84
  /**
84
85
  * @deprecated Use getDefaultAnnotationsPath() instead.
85
86
  * Returns the directory containing the resolved annotations.lua file.
86
87
  */
87
88
  export declare function getDefinitionsDir(): string;
89
+ /** Resolves the absolute path to the default .luarc.json template shipped with the package. */
88
90
  export declare function getDefaultTemplatePath(): string;
89
91
  /**
90
92
  * Strips single-line and multi-line comments from JSONC text using jsonc-parser.
91
93
  */
92
94
  export declare function stripJsonComments(text: string): string;
95
+ /** Parses JSONC text with support for comments and trailing commas. */
93
96
  export declare function parseJsonc<T = unknown>(text: string): T;
97
+ /** Reads and parses a .luarc.json configuration file from disk. */
94
98
  export declare function loadConfigFile(filePath: string): LuaRCConfig;
95
99
  /**
96
100
  * Removes trailing `/` characters from a path-like string.
@@ -147,17 +151,8 @@ export declare function initWorkspace(workspacePath: string, options?: InitWorks
147
151
  export declare const FALLBACK_LUALS_VERSION = "3.19.1";
148
152
  export declare const DEFAULT_LUALS_VERSION = "latest";
149
153
  /**
150
- * Validates a LuaLS version/tag and rebuilds it from the allow-list above.
151
- *
152
- * Version strings originate from untrusted sources: the GitHub releases API
153
- * response and user supplied `--luals-version` arguments. They are interpolated
154
- * into cache directory paths, download URLs, and the path of the binary that is
155
- * eventually executed, so they must be constrained to a single safe path
156
- * segment. Rebuilding the value character by character guarantees the returned
157
- * string only ever contains allow-listed characters (CodeQL: js/command-line-injection).
158
- *
159
- * @returns the normalized version (a single leading `v` is dropped), or `null`
160
- * when the input cannot be used as a version tag.
154
+ * Validates and normalizes a LuaLS version string to prevent path traversal or injection.
155
+ * Drops a single leading 'v' and returns null on invalid characters.
161
156
  */
162
157
  export declare function sanitizeLuaLSVersion(raw: string): string | null;
163
158
  /**
@@ -184,9 +179,11 @@ export interface PlatformInfo {
184
179
  assetName: string;
185
180
  binaryRelativePath: string;
186
181
  }
182
+ /** Resolves platform-specific binary naming and relative paths for the host operating system. */
187
183
  export declare function getPlatformInfo(version?: string): PlatformInfo;
188
184
  //#endregion
189
185
  //#region src/luals/cache.d.ts
186
+ /** Returns the base directory in the system cache where LuaLS versions and metadata are stored. */
190
187
  export declare function getBaseLuaLSCacheDir(): string;
191
188
  /**
192
189
  * Cache directory of a LuaLS version. `baseCacheDir` defaults to the system
@@ -207,8 +204,11 @@ export interface LuaLSMetadata {
207
204
  * Calculates the ISO 8601 week string for a given date in the format 'YYYY-Www' (e.g. '2026-W39').
208
205
  */
209
206
  export declare function getIsoWeek(d?: Date): string;
207
+ /** Returns the path to the LuaLS metadata.json file within the specified cache directory. */
210
208
  export declare function getLuaLSMetadataPath(baseCacheDir?: string): string;
209
+ /** Reads and parses the LuaLS metadata.json file, purging corrupted or invalid files automatically. */
211
210
  export declare function readLuaLSMetadata(baseCacheDir?: string): LuaLSMetadata | null;
211
+ /** Writes metadata.json containing the latest checked version and timestamp. */
212
212
  export declare function writeLuaLSMetadata(metadata: LuaLSMetadata, baseCacheDir?: string): void;
213
213
  /**
214
214
  * Lists all candidate LuaLS version directories under baseCacheDir without running
@@ -232,6 +232,38 @@ export declare function cleanupOldCachedLuaLSVersions(keepVersion: string, baseC
232
232
  export declare function findExistingLuaLSDir(version: string, baseCacheDir?: string): string | null;
233
233
  //#endregion
234
234
  //#region src/luals/validation.d.ts
235
+ /**
236
+ * Escapes single quotes for safe PowerShell single-quoted string interpolation.
237
+ */
238
+ export declare function escapePowerShellSingleQuote(str: string): string;
239
+ /**
240
+ * Maximum total decompressed size of a LuaLS release archive (500 MB).
241
+ * Protects against zip bombs and maliciously inflated archives (#31).
242
+ */
243
+ export declare const MAX_DECOMPRESSED_SIZE_BYTES: number;
244
+ /**
245
+ * Maximum number of members allowed in a LuaLS release archive (10,000).
246
+ * Protects against inode exhaustion and archive recursion attacks (#31).
247
+ */
248
+ export declare const MAX_ARCHIVE_MEMBER_COUNT = 10000;
249
+ /** Parses the file size column from a 'tar -tvf' listing output line. */
250
+ export declare function parseTarTvSize(line: string): number;
251
+ /** Locates the platform tar executable path, checking System32 on Windows. */
252
+ export declare function getTarBinary(): string;
253
+ /** Pre-inspects a ZIP archive's central directory to enforce extraction safety constraints (#31). */
254
+ export declare function inspectZipMembers(archivePath: string): {
255
+ memberCount: number;
256
+ totalDeclaredSize: number;
257
+ };
258
+ /** Detects whether an archive file starts with ZIP magic bytes. */
259
+ export declare function isZipArchive(archivePath: string): boolean;
260
+ /** Detects whether an archive file starts with GZIP magic bytes. */
261
+ export declare function isGzipArchive(archivePath: string): boolean;
262
+ /** Pre-inspects archive members using tar listing or zip directory parsing to enforce extraction safety constraints (#31). */
263
+ export declare function validateArchiveMembers(archivePath: string): Promise<{
264
+ memberCount: number;
265
+ totalDeclaredSize: number;
266
+ }>;
235
267
  /**
236
268
  * Minimum plausible size of a downloaded LuaLS executable. Release assets are
237
269
  * several megabytes, so anything smaller is a truncated download or a stray
@@ -278,10 +310,6 @@ export declare function isAllowedDownloadUrl(urlString: string): boolean;
278
310
  * Calculates the SHA-256 hash of a file on disk in bounded memory.
279
311
  */
280
312
  export declare function computeFileSha256(filePath: string): string;
281
- /**
282
- * Escapes single quotes for safe PowerShell single-quoted string interpolation.
283
- */
284
- export declare function escapePowerShellSingleQuote(str: string): string;
285
313
  /**
286
314
  * Enforces a maximum byte count on an asynchronous download stream.
287
315
  */
@@ -292,20 +320,11 @@ export interface DownloadOptions {
292
320
  /** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
293
321
  cacheDir?: string;
294
322
  }
323
+ /** Downloads, verifies, and extracts the LuaLS release archive for the current platform. */
295
324
  export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
296
325
  //#endregion
297
326
  //#region src/luals/files.d.ts
298
- /**
299
- * Counts candidate Lua files within targetPath, taking `workspace.ignoreDir`
300
- * and `files.exclude` into account.
301
- *
302
- * Traversal and matching are delegated to the bundled `glob` package, whose
303
- * `minimatch` matcher understands the full glob syntax LuaLS accepts (brace
304
- * expansion, character classes, `**`, `?`) instead of the hand-rolled
305
- * glob-to-regex translation used before. Combined with the pattern budgets
306
- * above, this keeps the count predictable for adversarial configurations
307
- * while remaining consistent with LuaLS exclude semantics (#27).
308
- */
327
+ /** Counts candidate Lua files within targetPath, taking workspace ignoreDir and files.exclude into account (#27). */
309
328
  export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
310
329
  //#endregion
311
330
  //#region src/luals/runner.d.ts
@@ -316,7 +335,9 @@ export interface ResolveLuaLSOptions {
316
335
  /** Set to `false` to always fetch the archive instead of reusing an installed copy. */
317
336
  reuseExisting?: boolean;
318
337
  }
338
+ /** Resolves the executable path of a LuaLS binary from env, bundle, cache, or network download. */
319
339
  export declare function resolveLuaLSBinary(version?: string, options?: ResolveLuaLSOptions): Promise<string>;
340
+ /** Executes the LuaLS diagnostics check on the target path using merged configurations. */
320
341
  export declare function runLuaLSCheck(targetPath: string, configPath: string, options: CheckOptions): Promise<CheckResult>;
321
342
  //#endregion
322
343
  //#region src/reporter.d.ts
@@ -325,6 +346,7 @@ export declare function runLuaLSCheck(targetPath: string, configPath: string, op
325
346
  * and TTY detection.
326
347
  */
327
348
  export declare function shouldEnableColor(): boolean;
349
+ /** Returns ANSI color escape code helpers or empty strings when colors are disabled. */
328
350
  export declare function getColors(useColor?: boolean): {
329
351
  reset: string;
330
352
  bold: string;
@@ -337,11 +359,17 @@ export declare function getColors(useColor?: boolean): {
337
359
  cyan: string;
338
360
  gray: string;
339
361
  };
362
+ /** Formats a numeric diagnostic severity level into a colored badge. */
340
363
  export declare function formatSeverityBadge(severity: number, useColor?: boolean): string;
364
+ /** Formats a noun with its count and pluralizes if necessary. */
341
365
  export declare function pluralize(count: number, singular: string, plural?: string): string;
366
+ /** Formats the summary text detailing diagnostic counts and affected files. */
342
367
  export declare function formatProblemSummary(totalProblems: number, errors: number, warnings: number, files: number): string;
368
+ /** Formats check results into pretty human-readable terminal output. */
343
369
  export declare function formatPretty(result: CheckResult, cwd?: string, useColor?: boolean): string;
370
+ /** Formats check diagnostics into GitHub Actions workflow annotation commands. */
344
371
  export declare function formatGitHubAnnotations(result: CheckResult, cwd?: string): string;
372
+ /** Formats check results according to the chosen format (pretty, json, github). */
345
373
  export declare function formatReport(result: CheckResult, format?: "pretty" | "json" | "github", cwd?: string, useColor?: boolean): string;
346
374
  //#endregion
347
375
  //#region node_modules/env-paths/index.d.ts
@@ -419,11 +447,7 @@ export declare function getDirectorySize(targetPath: string): number;
419
447
  */
420
448
  export declare function formatBytes(bytes: number): string;
421
449
  //#endregion
422
- //#region src/annotations.d.ts
423
- export declare const DOCGEN_REPO = "nanos-world/vscode-extension";
424
- export declare const DOCGEN_BRANCH = "docgen-output";
425
- export declare const RAW_ANNOTATIONS_URL = "https://raw.githubusercontent.com/nanos-world/vscode-extension/refs/heads/docgen-output/annotations.lua";
426
- export declare const GITHUB_COMMITS_API = "https://api.github.com/repos/nanos-world/vscode-extension/commits/docgen-output";
450
+ //#region src/annotations-metadata.d.ts
427
451
  export interface AnnotationsDate {
428
452
  year: number;
429
453
  month: number;
@@ -436,37 +460,44 @@ export interface AnnotationsMetadata {
436
460
  }
437
461
  export declare const ANNOTATIONS_FILENAME = "annotations.lua";
438
462
  export declare const METADATA_FILENAME = "metadata.json";
463
+ export declare const MIN_ANNOTATIONS_SIZE_BYTES = 1000;
464
+ export declare const MAX_ANNOTATIONS_SIZE_BYTES: number;
465
+ export declare const MAX_COMMIT_JSON_SIZE_BYTES: number;
466
+ /** Returns current date string formatted as YYYY-MM-DD alongside a date components object. */
439
467
  export declare function getTodayDateString(d?: Date): {
440
468
  dateStr: string;
441
469
  dateObj: AnnotationsDate;
442
470
  };
471
+ /** Returns the system cache directory used for nanos world annotations. */
443
472
  export declare function getAnnotationsCacheDir(): string;
473
+ /** Returns the full path to the cached annotations.lua file. */
444
474
  export declare function getCachedAnnotationsFilePath(): string;
475
+ /** Returns the full path to the annotations metadata.json file. */
445
476
  export declare function getAnnotationsMetadataFilePath(): string;
477
+ /** Reads and parses annotations metadata.json, purging corrupt files automatically. */
446
478
  export declare function readAnnotationsMetadata(cacheDir?: string): AnnotationsMetadata | null;
447
- export declare const MIN_ANNOTATIONS_SIZE_BYTES = 1000;
448
- /**
449
- * Verifies that an annotations file exists, is a regular file, is of non-trivial size (>= MIN_ANNOTATIONS_SIZE_BYTES),
450
- * and begins with valid LuaLS metadata or nanos world definitions.
451
- */
479
+ /** Verifies that an annotations file exists, is non-trivial in size, and contains valid header. */
452
480
  export declare function isAnnotationsValid(filePath: string): boolean;
481
+ /** Updates metadata lastChecked date atomically without modifying annotations.lua. */
482
+ export declare function updateLastCheckedDate(commitId: string, cacheDir?: string): AnnotationsMetadata;
483
+ //#endregion
484
+ //#region src/annotations-download.d.ts
485
+ export declare const DOCGEN_REPO = "nanos-world/vscode-extension";
486
+ export declare const DOCGEN_BRANCH = "docgen-output";
487
+ export declare const RAW_ANNOTATIONS_URL = "https://raw.githubusercontent.com/nanos-world/vscode-extension/refs/heads/docgen-output/annotations.lua";
488
+ export declare const GITHUB_COMMITS_API = "https://api.github.com/repos/nanos-world/vscode-extension/commits/docgen-output";
489
+ /** Fetches the latest commit SHA for the annotations branch from the GitHub API. */
453
490
  export declare function fetchLatestCommitId(): Promise<string | null>;
454
- /**
455
- * Returns raw annotations URL, pinned to commit SHA if provided and valid.
456
- */
491
+ /** Returns raw annotations URL, pinned to commit SHA if provided and valid. */
457
492
  export declare function getRawAnnotationsUrl(commitSha?: string): string;
493
+ /** Downloads raw annotations.lua content from GitHub raw content endpoints. */
458
494
  export declare function fetchRawAnnotationsContent(commitSha?: string): Promise<string>;
459
- /**
460
- * Updates the metadata lastChecked date atomically without modifying annotations.lua.
461
- */
462
- export declare function updateLastCheckedDate(commitId: string, cacheDir?: string): AnnotationsMetadata;
463
- /**
464
- * Downloads annotations.lua, writes it and the new metadata in a chained atomic transaction.
465
- * If any step fails, the previous cache state is reverted.
466
- */
495
+ /** Downloads annotations.lua and writes metadata in a chained atomic transaction with rollback. */
467
496
  export declare function downloadAndCacheAnnotations(commitId: string, cacheDir?: string, options?: {
468
497
  quiet?: boolean;
469
498
  }): Promise<string>;
499
+ //#endregion
500
+ //#region src/annotations.d.ts
470
501
  export interface ResolveAnnotationsOptions {
471
502
  customPath?: string;
472
503
  cacheDir?: string;
@@ -487,19 +518,28 @@ export type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
487
518
  export declare const LOG_LEVELS: ReadonlyArray<LogLevel>;
488
519
  export declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
489
520
  export declare const DEFAULT_LOG_LEVEL: LogLevel;
521
+ /** Validates whether a string corresponds to a recognized log level. */
490
522
  export declare function isValidLogLevel(level: string): level is LogLevel;
523
+ /** Parses a string into a valid LogLevel, defaulting to 'warn'. */
491
524
  export declare function parseLogLevel(raw?: string | null): LogLevel;
492
525
  export declare class Logger {
493
526
  private level;
494
527
  constructor(initialLevel?: LogLevel);
528
+ /** Sets the active minimum logging level. */
495
529
  setLevel(level: LogLevel): void;
530
+ /** Returns the current active log level. */
496
531
  getLevel(): LogLevel;
532
+ /** Checks if a message at the specified level should be emitted. */
497
533
  isEnabledFor(level: LogLevel): boolean;
498
534
  /** Whether command results should be written; only `silent` disables them. */
499
535
  isOutputEnabled(): boolean;
536
+ /** Logs an error-level message to stderr. */
500
537
  error(...args: unknown[]): void;
538
+ /** Logs a warning-level message to stderr. */
501
539
  warn(...args: unknown[]): void;
540
+ /** Logs an informational message to stdout. */
502
541
  info(...args: unknown[]): void;
542
+ /** Logs a debug-level diagnostic message to stdout. */
503
543
  debug(...args: unknown[]): void;
504
544
  }
505
545
  export declare const logger: Logger;
@@ -555,7 +595,9 @@ export interface CacheStatusReport {
555
595
  luals: LuaLSCacheStatus;
556
596
  annotations: AnnotationsCacheStatus;
557
597
  }
598
+ /** Collects detailed status and disk usage information for LuaLS and annotations caches. */
558
599
  export declare function getCacheStatus(baseCacheDir?: string): CacheStatusReport;
600
+ /** Formats a cache status report into human-readable terminal output. */
559
601
  export declare function formatCacheStatusPretty(report: CacheStatusReport): string;
560
602
  //#endregion
561
603
  export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/config.ts","../src/luals/version.ts","../src/luals/platform.ts","../src/luals/cache.ts","../src/luals/validation.ts","../src/luals/download.ts","../src/luals/files.ts","../src/luals/runner.ts","../src/reporter.ts","../node_modules/env-paths/index.d.ts","../src/paths.ts","../src/annotations.ts","../src/logger.ts","../src/errors.ts","../src/cache-status.ts"],"x_google_ignoreList":[10],"mappings":";;YAGY;YACA;iBAEK;EACf;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;EACf,OAAO;EACP,UAAU;EACV;EACA;EACA;;YAGU,mBAAmB,eAAe;iBAE7B;EACf;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;;iBAGE;EACf;EACA;IACE;IACA;IACA,UAAU;KACT;;EAEH;IACE;IACA;IACA;KACC;;EAEH;IACE;KACC;;EAEH;IACE;IACA;IACA;IACA,WAAW;IACX,mBAAmB;KAClB;;GAEF;;;;;;wBAOa,cAAc;;;;;;wBCnEd;wBAWA;;;;;wBAmBA;wBAIA;;;;wBAQA,kBAAkB;wBAKlB,WAAW,aAAa,eAAe;wBAavC,eAAe,mBAAmB;;;;;;;;;wBAgClC,qBAAqB;iBAQpB;EACf;;;;;;;;qBASW,8BAA8B;;;;;;;;;;;wBA2E3B,aACd,MAAM,aACN,WAAU,aACV,0BACA,UAAU,qBACT;iBAgJc;EACf;EACA;;;;;;wBAOc,uBACd,uBACA,2BACA,UAAU;EACP;EAAoB;;iBA6ER;EACf;EACA;;;;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/version.ts","../src/luals/platform.ts","../src/luals/cache.ts","../src/luals/validation.ts","../src/luals/download.ts","../src/luals/files.ts","../src/luals/runner.ts","../src/reporter.ts","../node_modules/env-paths/index.d.ts","../src/paths.ts","../src/annotations-metadata.ts","../src/annotations-download.ts","../src/annotations.ts","../src/logger.ts","../src/errors.ts","../src/cache-status.ts"],"x_google_ignoreList":[10],"mappings":";;YAGY;YACA;iBAEK;EACf;IACE;IACA;;EAEF;IACE;IACA;;;iBAIa;EACf,OAAO;EACP,UAAU;EACV;EACA;EACA;;YAGU,mBAAmB,eAAe;iBAE7B;EACf;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;;iBAGE;EACf;EACA;IACE;IACA;IACA,UAAU;KACT;;EAEH;IACE;IACA;IACA;KACC;;EAEH;IACE;KACC;;EAEH;IACE;IACA;IACA;IACA,WAAW;IACX,mBAAmB;KAClB;;GAEF;;;;;;wBAOa,cAAc;;;;;;wBCnEd;;wBAYA;;;;;wBAmBA;;wBAKA;;;;wBAQA,kBAAkB;;wBAMlB,WAAW,aAAa,eAAe;;wBAcvC,eAAe,mBAAmB;;;;;;;;;wBAgClC,qBAAqB;iBAQpB;EACf;;;;;;;;qBASW,8BAA8B;;;;;;;;;;;wBA2E3B,aACd,MAAM,aACN,WAAU,aACV,0BACA,UAAU,qBACT;iBAoJc;EACf;EACA;;;;;;wBAOc,uBACd,uBACA,2BACA,UAAU;EACP;EAAoB;;iBA8ER;EACf;EACA;;;;;wBAMc,cAAc,uBAAuB,UAAU;;;qBCrclD;qBACA;;;;;wBAaG,qBAAqB;;;;;wBAkCf,qCAAqC;;;;;wBAkCrC,6BAA6B;;;;;;wBAU7B,oBAAoB,mBAAmB;;;iBC3F5C;EACf;EACA;EACA;EACA;;;wBAIc,gBAAgB,mBAA2C;;;;wBCD3D;;;;;wBAQA,YACd,kBACA;;;;wBAQc,kBAAkB;qBAQrB;iBAEI;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f;EACA;EACA,MAAM;;qBAGK;qBACA;qBACA;qBACA;qBACA;;wBAGG,mBAAmB,IAAG;EACpC;EACA,SAAS;;;wBAUK;;wBAKA;;wBAKA;;wBAKA,wBACd,oBACC;;wBA+Ba,mBAAmB;;wBA2BnB,sBACd,kBACA,oBACC;;;qBCjGU;qBACA;qBACA;qBAEA;;wBAyDS,uBAAuB;;wBA2C7B,qBAAqB;;wBAQf,2BAA2B,qBAAqB;;wBAsDhD,4BACpB,kBACA,mBACA;EAAY;IACX;;;iBC1Kc;EACf;EACA;EACA;;;;;;;;;;wBA6EoB,mBAAmB,UAAS,4BAAiC;;;YClGvE;qBAEC,YAAY,cAAc;qBAQ1B,oBAAoB,OAAO;qBAQ3B,mBAAmB;;wBAGhB,gBAAgB,gBAAgB,SAAS;;wBAKzC,cAAc,sBAAsB;qBAMvC;UACH;EAEI,YAAA,eAAe;;EAYpB,SAAS,OAAO;;EAOhB,YAAY;;EAKZ,aAAa,OAAO;;EAKpB;;EAKA,SAAS;;EAOT,QAAQ;;EAOR,QAAQ;;EAOR,SAAS;;qBAOL,QAAM;;;qBCjGN,uBAAuB;WAKhB;WACA;WALO;EAGvB,YAAA,iBACgB,cACA,6BAChB;IAAY;;;qBAMH,oBAAoB;WACN;;qBAGd,mBAAmB;WACL;;qBAGd,yBAAyB;WACX;;qBAGd,mBAAmB;WACL;;;;iBClBV;EACf;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,UAAU;;iBAGK;EACf;EACA;EACA;EACA;EACA;EACA;;iBAGe;EACf;EACA;EACA;EACA,OAAO;EACP,aAAa;;;wBAIC,eAAe,wBAA2C;;wBA0E1D,wBAAwB,QAAQ"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as listCachedLuaLSVersionDirs, A as formatSeverityBadge, At as NanosLintError, B as computeFileSha256, Bt as isValidLogLevel, C as readAnnotationsMetadata, Ct as resolveWorkspaceConfig, D as formatPretty, Dt as CacheError, E as formatGitHubAnnotations, Et as AnnotationsError, F as runLuaLSCheck, Ft as fileUriToPath, G as LUALS_METADATA_FILENAME, H as escapePowerShellSingleQuote, Ht as parseLogLevel, I as countCheckedFiles, It as DEFAULT_LOG_LEVEL, J as getBaseLuaLSCacheDir, K as cleanupOldCachedLuaLSVersions, L as ALLOWED_DOWNLOAD_DOMAINS, Lt as LOG_LEVELS, M as pluralize, Mt as formatBytes, N as shouldEnableColor, Nt as getDirectorySize, O as formatProblemSummary, Ot as ConfigError, P as resolveLuaLSBinary, Pt as systemPaths, Q as getLuaLSMetadataPath, R as DOWNLOAD_TIMEOUT_MS, Rt as LOG_LEVEL_PRIORITY, S as isAnnotationsValid, St as parseJsonc, T as updateLastCheckedDate, Tt as stripTrailingSlashes, U as isAllowedDownloadUrl, V as downloadAndExtractLuaLS, Vt as logger, W as limitDownloadStream, X as getIsoWeek, Y as getCacheDir, Z as getLegacyCacheDir, _ as getAnnotationsCacheDir, _t as getDefinitionsDir, a as formatCacheStatusPretty, at as isBinaryRunnable, b as getRawAnnotationsUrl, bt as loadConfigFile, c as DOCGEN_BRANCH, ct as DEFAULT_LUALS_VERSION, d as METADATA_FILENAME, dt as resolveLatestLuaLSVersion, et as listCachedLuaLSVersions, f as MIN_ANNOTATIONS_SIZE_BYTES, ft as resolveLuaLSVersion, g as fetchRawAnnotationsContent, gt as getDefaultTemplatePath, h as fetchLatestCommitId, ht as getDefaultAnnotationsPath, i as runCLI, it as assertValidLuaLSBinary, j as getColors, jt as cleanCache, k as formatReport, kt as LuaLSError, l as DOCGEN_REPO, lt as FALLBACK_LUALS_VERSION, m as downloadAndCacheAnnotations, mt as VALID_LUALS_DIAGNOSTIC_CODES, n as createProgram, nt as writeLuaLSMetadata, o as getCacheStatus, ot as isBinaryValid, p as RAW_ANNOTATIONS_URL, pt as sanitizeLuaLSVersion, q as findExistingLuaLSDir, r as isDirectExecution, rt as MIN_DOWNLOADED_BINARY_SIZE_BYTES, s as ANNOTATIONS_FILENAME, st as getPlatformInfo, t as collectIgnorePatterns, tt as readLuaLSMetadata, u as GITHUB_COMMITS_API, ut as fetchLatestLuaLSVersionFromGitHub, v as getAnnotationsMetadataFilePath, vt as getPackageRoot, w as resolveAnnotations, wt as stripJsonComments, x as getTodayDateString, xt as mergeConfigs, y as getCachedAnnotationsFilePath, yt as initWorkspace, z as MAX_ARCHIVE_SIZE_BYTES, zt as Logger } from "./cli-BAy_Ztvh.js";
2
- export { ALLOWED_DOWNLOAD_DOMAINS, ANNOTATIONS_FILENAME, AnnotationsError, CacheError, ConfigError, DEFAULT_LOG_LEVEL, DEFAULT_LUALS_VERSION, DOCGEN_BRANCH, DOCGEN_REPO, DOWNLOAD_TIMEOUT_MS, FALLBACK_LUALS_VERSION, GITHUB_COMMITS_API, LOG_LEVELS, LOG_LEVEL_PRIORITY, LUALS_METADATA_FILENAME, Logger, LuaLSError, MAX_ARCHIVE_SIZE_BYTES, METADATA_FILENAME, MIN_ANNOTATIONS_SIZE_BYTES, MIN_DOWNLOADED_BINARY_SIZE_BYTES, NanosLintError, RAW_ANNOTATIONS_URL, VALID_LUALS_DIAGNOSTIC_CODES, assertValidLuaLSBinary, cleanCache, cleanupOldCachedLuaLSVersions, collectIgnorePatterns, computeFileSha256, countCheckedFiles, createProgram, downloadAndCacheAnnotations, downloadAndExtractLuaLS, escapePowerShellSingleQuote, fetchLatestCommitId, fetchLatestLuaLSVersionFromGitHub, fetchRawAnnotationsContent, fileUriToPath, findExistingLuaLSDir, formatBytes, formatCacheStatusPretty, formatGitHubAnnotations, formatPretty, formatProblemSummary, formatReport, formatSeverityBadge, getAnnotationsCacheDir, getAnnotationsMetadataFilePath, getBaseLuaLSCacheDir, getCacheDir, getCacheStatus, getCachedAnnotationsFilePath, getColors, getDefaultAnnotationsPath, getDefaultTemplatePath, getDefinitionsDir, getDirectorySize, getIsoWeek, getLegacyCacheDir, getLuaLSMetadataPath, getPackageRoot, getPlatformInfo, getRawAnnotationsUrl, getTodayDateString, initWorkspace, isAllowedDownloadUrl, isAnnotationsValid, isBinaryRunnable, isBinaryValid, isDirectExecution, isValidLogLevel, limitDownloadStream, listCachedLuaLSVersionDirs, listCachedLuaLSVersions, loadConfigFile, logger, mergeConfigs, parseJsonc, parseLogLevel, pluralize, readAnnotationsMetadata, readLuaLSMetadata, resolveAnnotations, resolveLatestLuaLSVersion, resolveLuaLSBinary, resolveLuaLSVersion, resolveWorkspaceConfig, runCLI, runLuaLSCheck, sanitizeLuaLSVersion, shouldEnableColor, stripJsonComments, stripTrailingSlashes, systemPaths, updateLastCheckedDate, writeLuaLSMetadata };
1
+ import { $ as getLuaLSMetadataPath, A as formatProblemSummary, At as loadConfigFile, B as DOWNLOAD_TIMEOUT_MS, Bt as NanosLintError, C as getCachedAnnotationsFilePath, Ct as sanitizeLuaLSVersion, D as updateLastCheckedDate, Dt as getDefinitionsDir, E as readAnnotationsMetadata, Et as getDefaultTemplatePath, F as shouldEnableColor, Ft as stripTrailingSlashes, G as limitDownloadStream, Gt as fileUriToPath, H as computeFileSha256, Ht as formatBytes, I as resolveLuaLSBinary, It as AnnotationsError, J as findExistingLuaLSDir, Jt as LOG_LEVEL_PRIORITY, K as LUALS_METADATA_FILENAME, Kt as DEFAULT_LOG_LEVEL, L as runLuaLSCheck, Lt as CacheError, M as formatSeverityBadge, Mt as parseJsonc, N as getColors, Nt as resolveWorkspaceConfig, O as formatGitHubAnnotations, Ot as getPackageRoot, P as pluralize, Pt as stripJsonComments, Q as getLegacyCacheDir, Qt as parseLogLevel, R as countCheckedFiles, Rt as ConfigError, S as getAnnotationsMetadataFilePath, St as resolveLuaLSVersion, T as isAnnotationsValid, Tt as getDefaultAnnotationsPath, U as downloadAndExtractLuaLS, Ut as getDirectorySize, V as MAX_ARCHIVE_SIZE_BYTES, Vt as cleanCache, W as isAllowedDownloadUrl, Wt as systemPaths, X as getCacheDir, Xt as isValidLogLevel, Y as getBaseLuaLSCacheDir, Yt as Logger, Z as getIsoWeek, Zt as logger, _ as MAX_ANNOTATIONS_SIZE_BYTES, _t as getPlatformInfo, a as formatCacheStatusPretty, at as MAX_DECOMPRESSED_SIZE_BYTES, b as MIN_ANNOTATIONS_SIZE_BYTES, bt as fetchLatestLuaLSVersionFromGitHub, c as DOCGEN_BRANCH, ct as escapePowerShellSingleQuote, d as RAW_ANNOTATIONS_URL, dt as isBinaryRunnable, et as listCachedLuaLSVersionDirs, f as downloadAndCacheAnnotations, ft as isBinaryValid, g as ANNOTATIONS_FILENAME, gt as validateArchiveMembers, h as getRawAnnotationsUrl, ht as parseTarTvSize, i as runCLI, it as MAX_ARCHIVE_MEMBER_COUNT, j as formatReport, jt as mergeConfigs, k as formatPretty, kt as initWorkspace, l as DOCGEN_REPO, lt as getTarBinary, m as fetchRawAnnotationsContent, mt as isZipArchive, n as createProgram, nt as readLuaLSMetadata, o as getCacheStatus, ot as MIN_DOWNLOADED_BINARY_SIZE_BYTES, p as fetchLatestCommitId, pt as isGzipArchive, q as cleanupOldCachedLuaLSVersions, qt as LOG_LEVELS, r as isDirectExecution, rt as writeLuaLSMetadata, s as resolveAnnotations, st as assertValidLuaLSBinary, t as collectIgnorePatterns, tt as listCachedLuaLSVersions, u as GITHUB_COMMITS_API, ut as inspectZipMembers, v as MAX_COMMIT_JSON_SIZE_BYTES, vt as DEFAULT_LUALS_VERSION, w as getTodayDateString, wt as VALID_LUALS_DIAGNOSTIC_CODES, x as getAnnotationsCacheDir, xt as resolveLatestLuaLSVersion, y as METADATA_FILENAME, yt as FALLBACK_LUALS_VERSION, z as ALLOWED_DOWNLOAD_DOMAINS, zt as LuaLSError } from "./cli-BTHx4yp_.js";
2
+ export { ALLOWED_DOWNLOAD_DOMAINS, ANNOTATIONS_FILENAME, AnnotationsError, CacheError, ConfigError, DEFAULT_LOG_LEVEL, DEFAULT_LUALS_VERSION, DOCGEN_BRANCH, DOCGEN_REPO, DOWNLOAD_TIMEOUT_MS, FALLBACK_LUALS_VERSION, GITHUB_COMMITS_API, LOG_LEVELS, LOG_LEVEL_PRIORITY, LUALS_METADATA_FILENAME, Logger, LuaLSError, MAX_ANNOTATIONS_SIZE_BYTES, MAX_ARCHIVE_MEMBER_COUNT, MAX_ARCHIVE_SIZE_BYTES, MAX_COMMIT_JSON_SIZE_BYTES, MAX_DECOMPRESSED_SIZE_BYTES, METADATA_FILENAME, MIN_ANNOTATIONS_SIZE_BYTES, MIN_DOWNLOADED_BINARY_SIZE_BYTES, NanosLintError, RAW_ANNOTATIONS_URL, VALID_LUALS_DIAGNOSTIC_CODES, assertValidLuaLSBinary, cleanCache, cleanupOldCachedLuaLSVersions, collectIgnorePatterns, computeFileSha256, countCheckedFiles, createProgram, downloadAndCacheAnnotations, downloadAndExtractLuaLS, escapePowerShellSingleQuote, fetchLatestCommitId, fetchLatestLuaLSVersionFromGitHub, fetchRawAnnotationsContent, fileUriToPath, findExistingLuaLSDir, formatBytes, formatCacheStatusPretty, formatGitHubAnnotations, formatPretty, formatProblemSummary, formatReport, formatSeverityBadge, getAnnotationsCacheDir, getAnnotationsMetadataFilePath, getBaseLuaLSCacheDir, getCacheDir, getCacheStatus, getCachedAnnotationsFilePath, getColors, getDefaultAnnotationsPath, getDefaultTemplatePath, getDefinitionsDir, getDirectorySize, getIsoWeek, getLegacyCacheDir, getLuaLSMetadataPath, getPackageRoot, getPlatformInfo, getRawAnnotationsUrl, getTarBinary, getTodayDateString, initWorkspace, inspectZipMembers, isAllowedDownloadUrl, isAnnotationsValid, isBinaryRunnable, isBinaryValid, isDirectExecution, isGzipArchive, isValidLogLevel, isZipArchive, limitDownloadStream, listCachedLuaLSVersionDirs, listCachedLuaLSVersions, loadConfigFile, logger, mergeConfigs, parseJsonc, parseLogLevel, parseTarTvSize, pluralize, readAnnotationsMetadata, readLuaLSMetadata, resolveAnnotations, resolveLatestLuaLSVersion, resolveLuaLSBinary, resolveLuaLSVersion, resolveWorkspaceConfig, runCLI, runLuaLSCheck, sanitizeLuaLSVersion, shouldEnableColor, stripJsonComments, stripTrailingSlashes, systemPaths, updateLastCheckedDate, validateArchiveMembers, writeLuaLSMetadata };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanos-lint",
3
- "version": "2.8.1",
3
+ "version": "2.8.2",
4
4
  "description": "Linter and type-checker for nanos world Lua scripts powered by LuaLS",
5
5
  "keywords": [
6
6
  "nanos-world",
@@ -38,11 +38,18 @@
38
38
  "scripts": {
39
39
  "build": "tsdown",
40
40
  "typecheck": "tsc --noEmit",
41
- "lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --max-warnings=0",
42
- "lint:fix": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" --fix --max-warnings=0",
41
+ "format:check": "prettier --check .",
42
+ "format:fix": "prettier --write .",
43
+ "lint": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" --max-warnings=0",
44
+ "lint:fix": "eslint \"src/**/*.ts\" \"tests/**/*.ts\" \"scripts/**/*.ts\" --fix --max-warnings=0",
45
+ "lint:deps": "depcruise --config .dependency-cruiser.cjs src tests",
46
+ "lint:comments": "tsx scripts/lint-comments.ts",
47
+ "lint:docstrings": "tsx scripts/lint-docstrings.ts",
43
48
  "test": "vitest run",
44
49
  "test:watch": "vitest",
45
50
  "test:coverage": "vitest run --coverage",
51
+ "gates": "npm run format:check && npm run lint && npm run lint:deps && npm run lint:comments && npm run lint:docstrings && npm run typecheck && npm run build && npm run test:coverage",
52
+ "check:all": "npm run gates",
46
53
  "prepare": "node -e \"try { require('node:child_process').execSync('git config core.hooksPath .githooks'); } catch {}\""
47
54
  },
48
55
  "devDependencies": {
@@ -52,10 +59,13 @@
52
59
  "@typescript-eslint/parser": "^8.70.1",
53
60
  "@vitest/coverage-v8": "^5.0.1",
54
61
  "commander": "^15.0.0",
62
+ "dependency-cruiser": "^18.4.0",
55
63
  "env-paths": "^4.0.0",
56
64
  "eslint": "^10.11.0",
65
+ "eslint-config-prettier": "^10.1.8",
57
66
  "glob": "^13.0.6",
58
67
  "jsonc-parser": "^3.3.1",
68
+ "prettier": "^3.9.9",
59
69
  "tsdown": "^0.23.0",
60
70
  "tsx": "^4.23.15",
61
71
  "typescript": "^6.0.3",
@@ -2,12 +2,7 @@
2
2
  "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
3
3
  "runtime": {
4
4
  "version": "Lua 5.4",
5
- "path": [
6
- "?.lua",
7
- "Shared/?.lua",
8
- "Client/?.lua",
9
- "Server/?.lua"
10
- ],
5
+ "path": ["?.lua", "Shared/?.lua", "Client/?.lua", "Server/?.lua"],
11
6
  "special": {
12
7
  "Package.Require": "require"
13
8
  }
@@ -30,9 +25,7 @@
30
25
  "library": []
31
26
  },
32
27
  "files": {
33
- "exclude": [
34
- ".nanos-lint/**"
35
- ]
28
+ "exclude": [".nanos-lint/**"]
36
29
  },
37
30
  "diagnostics": {
38
31
  "enable": true,