nanos-lint 2.6.1 → 2.8.0

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.
@@ -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;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;;;;;;;;;;;EAYP,UAAU;;;;;;;;;;;EAYV,QAAQ,cAAc;;;;;;;EAQtB,IAAI;;;;EAKJ,UAAU,GAAG,KAAK,eAAe,UAAU,MAAM;;;;EAKjD,oBAAoB;;;;EAKpB,SAAS;;;;EAKT,QAAQ;;;;EAKR;;;;;EAMA;;;;EAKA,UAAU;;;;;;EAOV;;cAGW;;EAEX;EACA;EACA;EACA;EACA;EAEA;;;;;;;EAQA,eAAe;IACb;IACA;IACA;;;EAIF,eAAe,KAAK;;EAEpB,sBAAsB,KAAK;;EAE3B,WAAW,QAAQ;;EAEnB,kBAAkB,QAAQ;;EAE1B,aAAa,UAAU;;EAEvB,oBAAoB,UAAU;;EAG9B,aAAa,KAAK;;EA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AuBnB,MAAM,0BAA0B,eAAe;;;;;;;;;;;;;;;;;;;;EAqB/C,WACE,0BACA,eAAe,eACd;;;;;;;EAQH;;;;;;;EAQA;;;;;;;;;;;;;EAcA,aAAa,iBAAiB;;;;EAK9B,KAAK,UAAU,iBAAiB;;;;EAKhC,gBAAgB,UAAU,iBAAiB;;;;;;EAQ3C,YAAY;;EAEZ,YAAY,aAAa,iBAAiB;;;;EAI1C;;;;;;EAQA,QAAQ;;;;EAIR;;;;;;;;EASA,MAAM;;;;EAIN;;;;;;;;EASA,QAAQ;;;;EAIR;;;;;;EAOA,MAAM;;;;EAIN;;;;;;EAOA,KAAK;;;;EAIL;;;;;;;;;;;;;;EAeA,iBAAiB;;;;;;;;;;;;;EAcjB,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"}
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-5LLXRlN7.js";
1
+ import { i as runCLI, n as createProgram, r as isDirectExecution, t as collectIgnorePatterns } from "./cli-DGez8MSI.js";
2
2
  export { collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
package/dist/index.d.ts CHANGED
@@ -45,6 +45,7 @@ export interface LuaRCConfig {
45
45
  runtime?: {
46
46
  version?: string;
47
47
  path?: string[];
48
+ special?: Record<string, string>;
48
49
  [key: string]: unknown;
49
50
  };
50
51
  workspace?: {
@@ -103,6 +104,13 @@ export declare function stripTrailingSlashes(value: string): string;
103
104
  export interface MergeConfigOptions {
104
105
  cliIgnore?: string[];
105
106
  }
107
+ /**
108
+ * Set of recognized diagnostic codes supported by Lua Language Server (LuaLS).
109
+ * LuaLS discards the entire `diagnostics.severity` object if it contains a single
110
+ * unrecognized key (such as obsolete 'syntax-error'). nanos-lint filters severity
111
+ * and neededFileStatus maps against this allow-list to ensure valid configuration.
112
+ */
113
+ export declare const VALID_LUALS_DIAGNOSTIC_CODES: ReadonlySet<string>;
106
114
  /**
107
115
  * Merges a base nanos configuration with a workspace override configuration.
108
116
  * Guarantees that nanos API annotations are included in workspace.library,
@@ -135,7 +143,7 @@ export interface InitWorkspaceOptions {
135
143
  */
136
144
  export declare function initWorkspace(workspacePath: string, options?: InitWorkspaceOptions): string;
137
145
  //#endregion
138
- //#region src/luals.d.ts
146
+ //#region src/luals/version.d.ts
139
147
  export declare const FALLBACK_LUALS_VERSION = "3.19.1";
140
148
  export declare const DEFAULT_LUALS_VERSION = "latest";
141
149
  /**
@@ -153,11 +161,13 @@ export declare const DEFAULT_LUALS_VERSION = "latest";
153
161
  */
154
162
  export declare function sanitizeLuaLSVersion(raw: string): string | null;
155
163
  /**
156
- * Escapes single quotes for safe PowerShell single-quoted string interpolation.
164
+ * Fetches the latest available LuaLS release tag from the GitHub API.
165
+ * Returns null if the request fails, times out, or receives an invalid tag.
157
166
  */
158
- export declare function escapePowerShellSingleQuote(str: string): string;
167
+ export declare function fetchLatestLuaLSVersionFromGitHub(): Promise<string | null>;
159
168
  /**
160
- * Resolves the latest available LuaLS release tag from the GitHub API.
169
+ * Resolves the latest available LuaLS release tag from the GitHub API,
170
+ * falling back to FALLBACK_LUALS_VERSION if offline or unreachable.
161
171
  */
162
172
  export declare function resolveLatestLuaLSVersion(): Promise<string>;
163
173
  /**
@@ -166,6 +176,8 @@ export declare function resolveLatestLuaLSVersion(): Promise<string>;
166
176
  * @throws when an explicitly requested version is not a valid tag.
167
177
  */
168
178
  export declare function resolveLuaLSVersion(version?: string): Promise<string>;
179
+ //#endregion
180
+ //#region src/luals/platform.d.ts
169
181
  export interface PlatformInfo {
170
182
  platform: "win32" | "linux" | "darwin";
171
183
  arch: "x64" | "arm64" | "ia32";
@@ -173,29 +185,88 @@ export interface PlatformInfo {
173
185
  binaryRelativePath: string;
174
186
  }
175
187
  export declare function getPlatformInfo(version?: string): PlatformInfo;
176
- export declare function getCacheDir(version?: string): string;
188
+ //#endregion
189
+ //#region src/luals/cache.d.ts
190
+ export declare function getBaseLuaLSCacheDir(): string;
191
+ /**
192
+ * Cache directory of a LuaLS version. `baseCacheDir` defaults to the system
193
+ * cache and can be overridden to keep a caller isolated from it.
194
+ */
195
+ export declare function getCacheDir(version?: string, baseCacheDir?: string): string;
177
196
  /**
178
197
  * Returns the legacy cache directory used in nanos-lint <= 2.2.1.
179
198
  */
180
199
  export declare function getLegacyCacheDir(version?: string): string;
181
- export interface DownloadOptions {
182
- quiet?: boolean;
200
+ export declare const LUALS_METADATA_FILENAME = "metadata.json";
201
+ export interface LuaLSMetadata {
202
+ lastCheckedWeek: string;
203
+ latestVersion: string;
204
+ lastCheckedDate?: string;
183
205
  }
206
+ /**
207
+ * Calculates the ISO 8601 week string for a given date in the format 'YYYY-Www' (e.g. '2026-W39').
208
+ */
209
+ export declare function getIsoWeek(d?: Date): string;
210
+ export declare function getLuaLSMetadataPath(baseCacheDir?: string): string;
211
+ export declare function readLuaLSMetadata(baseCacheDir?: string): LuaLSMetadata | null;
212
+ export declare function writeLuaLSMetadata(metadata: LuaLSMetadata, baseCacheDir?: string): void;
213
+ /**
214
+ * Lists all candidate LuaLS version directories under baseCacheDir without running
215
+ * execution smoke tests on the binaries.
216
+ */
217
+ export declare function listCachedLuaLSVersionDirs(baseCacheDir?: string): string[];
218
+ /**
219
+ * Lists all cached LuaLS versions in baseCacheDir that have a valid .complete marker
220
+ * and a functional executable binary.
221
+ */
222
+ export declare function listCachedLuaLSVersions(baseCacheDir?: string): string[];
223
+ /**
224
+ * Removes older cached LuaLS version directories, preserving keepVersion,
225
+ * hidden/temporary directories, and metadata files.
226
+ */
227
+ export declare function cleanupOldCachedLuaLSVersions(keepVersion: string, baseCacheDir?: string): string[];
228
+ /**
229
+ * Locates an existing, valid LuaLS directory for the specified version in the
230
+ * primary cache (`baseCacheDir`), the legacy cache, or the package root.
231
+ */
232
+ export declare function findExistingLuaLSDir(version: string, baseCacheDir?: string): string | null;
233
+ //#endregion
234
+ //#region src/luals/validation.d.ts
184
235
  /**
185
236
  * Verifies that a LuaLS binary exists, has non-trivial size, and is executable.
186
237
  */
187
238
  export declare function isBinaryValid(binaryPath: string): boolean;
188
- export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
189
- export interface ResolveLuaLSOptions {
239
+ //#endregion
240
+ //#region src/luals/download.d.ts
241
+ /**
242
+ * Escapes single quotes for safe PowerShell single-quoted string interpolation.
243
+ */
244
+ export declare function escapePowerShellSingleQuote(str: string): string;
245
+ export interface DownloadOptions {
190
246
  quiet?: boolean;
247
+ reuseExisting?: boolean;
248
+ /** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
249
+ cacheDir?: string;
191
250
  }
192
- export declare function resolveLuaLSBinary(version?: string, options?: ResolveLuaLSOptions): Promise<string>;
193
- export declare function runLuaLSCheck(targetPath: string, configPath: string, options: CheckOptions): Promise<CheckResult>;
251
+ export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
252
+ //#endregion
253
+ //#region src/luals/files.d.ts
194
254
  /**
195
255
  * Counts candidate Lua files within targetPath, taking ignoreDir and files.exclude into account.
196
256
  */
197
257
  export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
198
258
  //#endregion
259
+ //#region src/luals/runner.d.ts
260
+ export interface ResolveLuaLSOptions {
261
+ quiet?: boolean;
262
+ /** Cache base directory (version directories, metadata, temp extraction). Defaults to the system cache. */
263
+ cacheDir?: string;
264
+ /** Set to `false` to always fetch the archive instead of reusing an installed copy. */
265
+ reuseExisting?: boolean;
266
+ }
267
+ export declare function resolveLuaLSBinary(version?: string, options?: ResolveLuaLSOptions): Promise<string>;
268
+ export declare function runLuaLSCheck(targetPath: string, configPath: string, options: CheckOptions): Promise<CheckResult>;
269
+ //#endregion
199
270
  //#region src/reporter.d.ts
200
271
  /**
201
272
  * Determines whether ANSI color codes should be enabled according to the NO_COLOR convention
@@ -286,6 +357,15 @@ export declare const systemPaths: Paths;
286
357
  * Returns the path of the cleared cache directory, or null if it did not exist.
287
358
  */
288
359
  export declare function cleanCache(targetDir?: string): string | null;
360
+ /**
361
+ * Recursively calculates total disk usage of a file or directory in bytes.
362
+ * Handles missing paths and inaccessible files gracefully.
363
+ */
364
+ export declare function getDirectorySize(targetPath: string): number;
365
+ /**
366
+ * Formats byte values into human-readable strings (e.g. "86.4 MB", "1.42 MB", "42.5 MB").
367
+ */
368
+ export declare function formatBytes(bytes: number): string;
289
369
  //#endregion
290
370
  //#region src/annotations.d.ts
291
371
  export declare const DOCGEN_REPO = "nanos-world/vscode-extension";
@@ -312,6 +392,11 @@ export declare function getAnnotationsCacheDir(): string;
312
392
  export declare function getCachedAnnotationsFilePath(): string;
313
393
  export declare function getAnnotationsMetadataFilePath(): string;
314
394
  export declare function readAnnotationsMetadata(cacheDir?: string): AnnotationsMetadata | null;
395
+ /**
396
+ * Verifies that an annotations file exists, is a regular file, is of non-trivial size (>= 1000 bytes),
397
+ * and begins with valid Lua comments or nanos world definitions.
398
+ */
399
+ export declare function isAnnotationsValid(filePath: string): boolean;
315
400
  export declare function fetchLatestCommitId(): Promise<string | null>;
316
401
  export declare function fetchRawAnnotationsContent(): Promise<string>;
317
402
  /**
@@ -340,5 +425,81 @@ export interface ResolveAnnotationsOptions {
340
425
  */
341
426
  export declare function resolveAnnotations(options?: ResolveAnnotationsOptions): Promise<string>;
342
427
  //#endregion
428
+ //#region src/logger.d.ts
429
+ export type LogLevel = "silent" | "error" | "warn" | "info" | "debug";
430
+ export declare const LOG_LEVELS: ReadonlyArray<LogLevel>;
431
+ export declare const LOG_LEVEL_PRIORITY: Record<LogLevel, number>;
432
+ export declare const DEFAULT_LOG_LEVEL: LogLevel;
433
+ export declare function isValidLogLevel(level: string): level is LogLevel;
434
+ export declare function parseLogLevel(raw?: string | null): LogLevel;
435
+ export declare class Logger {
436
+ private level;
437
+ constructor(initialLevel?: LogLevel);
438
+ setLevel(level: LogLevel): void;
439
+ getLevel(): LogLevel;
440
+ isEnabledFor(level: LogLevel): boolean;
441
+ /** Whether command results should be written; only `silent` disables them. */
442
+ isOutputEnabled(): boolean;
443
+ error(...args: unknown[]): void;
444
+ warn(...args: unknown[]): void;
445
+ info(...args: unknown[]): void;
446
+ debug(...args: unknown[]): void;
447
+ }
448
+ export declare const logger: Logger;
449
+ //#endregion
450
+ //#region src/errors.d.ts
451
+ export declare class NanosLintError extends Error {
452
+ readonly code: string;
453
+ readonly remedy?: string | undefined;
454
+ readonly name: string;
455
+ constructor(message: string, code: string, remedy?: string | undefined, options?: {
456
+ cause?: unknown;
457
+ });
458
+ }
459
+ export declare class ConfigError extends NanosLintError {
460
+ readonly name: string;
461
+ }
462
+ export declare class LuaLSError extends NanosLintError {
463
+ readonly name: string;
464
+ }
465
+ export declare class AnnotationsError extends NanosLintError {
466
+ readonly name: string;
467
+ }
468
+ export declare class CacheError extends NanosLintError {
469
+ readonly name: string;
470
+ }
471
+ //#endregion
472
+ //#region src/cache-status.d.ts
473
+ export interface CachedLuaLSVersionInfo {
474
+ version: string;
475
+ status: "valid" | "corrupted";
476
+ size: number;
477
+ sizeFormatted: string;
478
+ path: string;
479
+ }
480
+ export interface LuaLSCacheStatus {
481
+ weeklyCheck: string | null;
482
+ lastCheckedDate: string | null;
483
+ targetVersion: string | null;
484
+ versions: CachedLuaLSVersionInfo[];
485
+ }
486
+ export interface AnnotationsCacheStatus {
487
+ status: "valid" | "corrupted" | "missing";
488
+ size: number;
489
+ sizeFormatted: string;
490
+ path: string;
491
+ commitId: string | null;
492
+ lastChecked: string | null;
493
+ }
494
+ export interface CacheStatusReport {
495
+ cacheDirectory: string;
496
+ totalSize: number;
497
+ totalSizeFormatted: string;
498
+ luals: LuaLSCacheStatus;
499
+ annotations: AnnotationsCacheStatus;
500
+ }
501
+ export declare function getCacheStatus(baseCacheDir?: string): CacheStatusReport;
502
+ export declare function formatCacheStatusPretty(report: CacheStatusReport): string;
503
+ //#endregion
343
504
  export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
344
505
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/config.ts","../src/luals.ts","../src/reporter.ts","../node_modules/env-paths/index.d.ts","../src/paths.ts","../src/annotations.ts"],"x_google_ignoreList":[4],"mappings":";;YAEY;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;KACC;;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;;;;;;;;;wBAgBlC,qBAAqB;iBAQpB;EACf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BACA;EAAY;IACX;iBAiHc;EACf;EACA;EACA;;;;;;;;;;wBAWoB,mBAAmB,UAAS,4BAAiC"}
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;;;;;wBAMc,cAAc,uBAAuB,UAAU;;;qBC5blD;qBACA;;;;;;;;;;;;;;wBA0BG,qBAAqB;;;;;wBAmCf,qCAAqC;;;;;wBAiCrC,6BAA6B;;;;;;wBAU7B,oBAAoB,mBAAmB;;;iBCxG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ACC;;;;;wBAgCmB,4BACpB,kBACA,mBACA;EAAY;IACX;iBAiHc;EACf;EACA;EACA;;;;;;;;;;wBAWoB,mBAAmB,UAAS,4BAAiC;;;YCnVvE;qBAEC,YAAY,cAAc;qBAQ1B,oBAAoB,OAAO;qBAQ3B,mBAAmB;wBAEhB,gBAAgB,gBAAgB,SAAS;wBAIzC,cAAc,sBAAsB;qBAMvC;UACH;EAEI,YAAA,eAAe;EAYpB,SAAS,OAAO;EAMhB,YAAY;EAIZ,aAAa,OAAO;;EAKpB;EAIA,SAAS;EAMT,QAAQ;EAMR,QAAQ;EAMR,SAAS;;qBAOL,QAAM;;;qBCzFN,uBAAuB;WAKhB;WACA;WALO;EAGvB,YAAA,iBACgB,cACA,6BAChB;IAAY;;;qBAMH,oBAAoB;WACN;;qBAGd,mBAAmB;WACL;;qBAGd,yBAAyB;WACX;;qBAGd,mBAAmB;WACL;;;;iBCXV;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;;wBAGC,eAAe,wBAA2C;wBAyE1D,wBAAwB,QAAQ"}
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as stripTrailingSlashes, A as FALLBACK_LUALS_VERSION, B as resolveLuaLSVersion, C as formatProblemSummary, D as pluralize, E as getColors, F as getLegacyCacheDir, G as getDefinitionsDir, H as sanitizeLuaLSVersion, I as getPlatformInfo, J as loadConfigFile, K as getPackageRoot, L as isBinaryValid, M as downloadAndExtractLuaLS, N as escapePowerShellSingleQuote, O as shouldEnableColor, P as getCacheDir, Q as stripJsonComments, R as resolveLatestLuaLSVersion, S as formatPretty, T as formatSeverityBadge, U as getDefaultAnnotationsPath, V as runLuaLSCheck, W as getDefaultTemplatePath, X as parseJsonc, Y as mergeConfigs, Z as resolveWorkspaceConfig, _ as getTodayDateString, a as ANNOTATIONS_FILENAME, b as updateLastCheckedDate, c as GITHUB_COMMITS_API, d as downloadAndCacheAnnotations, et as cleanCache, f as fetchLatestCommitId, g as getCachedAnnotationsFilePath, h as getAnnotationsMetadataFilePath, i as runCLI, j as countCheckedFiles, k as DEFAULT_LUALS_VERSION, l as METADATA_FILENAME, m as getAnnotationsCacheDir, n as createProgram, nt as fileUriToPath, o as DOCGEN_BRANCH, p as fetchRawAnnotationsContent, q as initWorkspace, r as isDirectExecution, s as DOCGEN_REPO, t as collectIgnorePatterns, tt as systemPaths, u as RAW_ANNOTATIONS_URL, v as readAnnotationsMetadata, w as formatReport, x as formatGitHubAnnotations, y as resolveAnnotations, z as resolveLuaLSBinary } from "./cli-5LLXRlN7.js";
2
- export { ANNOTATIONS_FILENAME, DEFAULT_LUALS_VERSION, DOCGEN_BRANCH, DOCGEN_REPO, FALLBACK_LUALS_VERSION, GITHUB_COMMITS_API, METADATA_FILENAME, RAW_ANNOTATIONS_URL, cleanCache, collectIgnorePatterns, countCheckedFiles, createProgram, downloadAndCacheAnnotations, downloadAndExtractLuaLS, escapePowerShellSingleQuote, fetchLatestCommitId, fetchRawAnnotationsContent, fileUriToPath, formatGitHubAnnotations, formatPretty, formatProblemSummary, formatReport, formatSeverityBadge, getAnnotationsCacheDir, getAnnotationsMetadataFilePath, getCacheDir, getCachedAnnotationsFilePath, getColors, getDefaultAnnotationsPath, getDefaultTemplatePath, getDefinitionsDir, getLegacyCacheDir, getPackageRoot, getPlatformInfo, getTodayDateString, initWorkspace, isBinaryValid, isDirectExecution, loadConfigFile, mergeConfigs, parseJsonc, pluralize, readAnnotationsMetadata, resolveAnnotations, resolveLatestLuaLSVersion, resolveLuaLSBinary, resolveLuaLSVersion, resolveWorkspaceConfig, runCLI, runLuaLSCheck, sanitizeLuaLSVersion, shouldEnableColor, stripJsonComments, stripTrailingSlashes, systemPaths, updateLastCheckedDate };
1
+ import { $ as fetchLatestLuaLSVersionFromGitHub, A as pluralize, At as logger, B as getBaseLuaLSCacheDir, C as updateLastCheckedDate, Ct as systemPaths, D as formatReport, Dt as LOG_LEVEL_PRIORITY, E as formatProblemSummary, Et as LOG_LEVELS, F as downloadAndExtractLuaLS, G as listCachedLuaLSVersionDirs, H as getIsoWeek, I as escapePowerShellSingleQuote, J as writeLuaLSMetadata, K as listCachedLuaLSVersions, L as LUALS_METADATA_FILENAME, M as resolveLuaLSBinary, N as runLuaLSCheck, O as formatSeverityBadge, Ot as Logger, P as countCheckedFiles, Q as FALLBACK_LUALS_VERSION, R as cleanupOldCachedLuaLSVersions, S as resolveAnnotations, St as getDirectorySize, T as formatPretty, Tt as DEFAULT_LOG_LEVEL, U as getLegacyCacheDir, V as getCacheDir, W as getLuaLSMetadataPath, X as getPlatformInfo, Y as isBinaryValid, Z as DEFAULT_LUALS_VERSION, _ as getAnnotationsMetadataFilePath, _t as ConfigError, a as formatCacheStatusPretty, at as getDefaultTemplatePath, b as isAnnotationsValid, bt as cleanCache, c as DOCGEN_BRANCH, ct as initWorkspace, d as METADATA_FILENAME, dt as parseJsonc, et as resolveLatestLuaLSVersion, f as RAW_ANNOTATIONS_URL, ft as resolveWorkspaceConfig, g as getAnnotationsCacheDir, gt as CacheError, h as fetchRawAnnotationsContent, ht as AnnotationsError, i as runCLI, it as getDefaultAnnotationsPath, j as shouldEnableColor, jt as parseLogLevel, k as getColors, kt as isValidLogLevel, l as DOCGEN_REPO, lt as loadConfigFile, m as fetchLatestCommitId, mt as stripTrailingSlashes, n as createProgram, nt as sanitizeLuaLSVersion, o as getCacheStatus, ot as getDefinitionsDir, p as downloadAndCacheAnnotations, pt as stripJsonComments, q as readLuaLSMetadata, r as isDirectExecution, rt as VALID_LUALS_DIAGNOSTIC_CODES, s as ANNOTATIONS_FILENAME, st as getPackageRoot, t as collectIgnorePatterns, tt as resolveLuaLSVersion, u as GITHUB_COMMITS_API, ut as mergeConfigs, v as getCachedAnnotationsFilePath, vt as LuaLSError, w as formatGitHubAnnotations, wt as fileUriToPath, x as readAnnotationsMetadata, xt as formatBytes, y as getTodayDateString, yt as NanosLintError, z as findExistingLuaLSDir } from "./cli-DGez8MSI.js";
2
+ export { ANNOTATIONS_FILENAME, AnnotationsError, CacheError, ConfigError, DEFAULT_LOG_LEVEL, DEFAULT_LUALS_VERSION, DOCGEN_BRANCH, DOCGEN_REPO, FALLBACK_LUALS_VERSION, GITHUB_COMMITS_API, LOG_LEVELS, LOG_LEVEL_PRIORITY, LUALS_METADATA_FILENAME, Logger, LuaLSError, METADATA_FILENAME, NanosLintError, RAW_ANNOTATIONS_URL, VALID_LUALS_DIAGNOSTIC_CODES, cleanCache, cleanupOldCachedLuaLSVersions, collectIgnorePatterns, 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, getTodayDateString, initWorkspace, isAnnotationsValid, isBinaryValid, isDirectExecution, isValidLogLevel, listCachedLuaLSVersionDirs, listCachedLuaLSVersions, loadConfigFile, logger, mergeConfigs, parseJsonc, parseLogLevel, pluralize, readAnnotationsMetadata, readLuaLSMetadata, resolveAnnotations, resolveLatestLuaLSVersion, resolveLuaLSBinary, resolveLuaLSVersion, resolveWorkspaceConfig, runCLI, runLuaLSCheck, sanitizeLuaLSVersion, shouldEnableColor, stripJsonComments, stripTrailingSlashes, systemPaths, updateLastCheckedDate, writeLuaLSMetadata };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanos-lint",
3
- "version": "2.6.1",
3
+ "version": "2.8.0",
4
4
  "description": "Linter and type-checker for nanos world Lua scripts powered by LuaLS",
5
5
  "keywords": [
6
6
  "nanos-world",
@@ -1,11 +1,16 @@
1
1
  {
2
- "$schema": "https://raw.githubusercontent.com/LuaLS/lua-language-server/master/setting/schema.json",
2
+ "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
3
3
  "runtime": {
4
4
  "version": "Lua 5.4",
5
5
  "path": [
6
6
  "?.lua",
7
- "?/init.lua"
8
- ]
7
+ "Shared/?.lua",
8
+ "Client/?.lua",
9
+ "Server/?.lua"
10
+ ],
11
+ "special": {
12
+ "Package.Require": "require"
13
+ }
9
14
  },
10
15
  "workspace": {
11
16
  "checkThirdParty": false,
@@ -31,25 +36,14 @@
31
36
  },
32
37
  "diagnostics": {
33
38
  "enable": true,
34
- "globals": [
35
- "Package",
36
- "Server",
37
- "Client",
38
- "Events",
39
- "Assets",
40
- "Trace",
41
- "Timer",
42
- "HTTP",
43
- "File",
44
- "Database"
45
- ],
39
+ "neededFileStatus": {
40
+ "unused-local": "Any",
41
+ "redefined-local": "Any"
42
+ },
46
43
  "severity": {
47
- "param-type-mismatch": "Warning",
48
- "cast-type-mismatch": "Warning",
49
- "undefined-field": "Warning",
50
- "undefined-global": "Warning",
51
- "syntax-error": "Error"
44
+ "redefined-local": "Warning",
45
+ "unused-local": "Warning",
46
+ "unused-vararg": "Warning"
52
47
  }
53
48
  }
54
49
  }
55
-