nanos-lint 2.7.0 → 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-sEO_MZ-K.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
  /**
@@ -152,10 +160,6 @@ export declare const DEFAULT_LUALS_VERSION = "latest";
152
160
  * when the input cannot be used as a version tag.
153
161
  */
154
162
  export declare function sanitizeLuaLSVersion(raw: string): string | null;
155
- /**
156
- * Escapes single quotes for safe PowerShell single-quoted string interpolation.
157
- */
158
- export declare function escapePowerShellSingleQuote(str: string): string;
159
163
  /**
160
164
  * Fetches the latest available LuaLS release tag from the GitHub API.
161
165
  * Returns null if the request fails, times out, or receives an invalid tag.
@@ -172,6 +176,8 @@ export declare function resolveLatestLuaLSVersion(): Promise<string>;
172
176
  * @throws when an explicitly requested version is not a valid tag.
173
177
  */
174
178
  export declare function resolveLuaLSVersion(version?: string): Promise<string>;
179
+ //#endregion
180
+ //#region src/luals/platform.d.ts
175
181
  export interface PlatformInfo {
176
182
  platform: "win32" | "linux" | "darwin";
177
183
  arch: "x64" | "arm64" | "ia32";
@@ -179,6 +185,8 @@ export interface PlatformInfo {
179
185
  binaryRelativePath: string;
180
186
  }
181
187
  export declare function getPlatformInfo(version?: string): PlatformInfo;
188
+ //#endregion
189
+ //#region src/luals/cache.d.ts
182
190
  export declare function getBaseLuaLSCacheDir(): string;
183
191
  /**
184
192
  * Cache directory of a LuaLS version. `baseCacheDir` defaults to the system
@@ -202,6 +210,11 @@ export declare function getIsoWeek(d?: Date): string;
202
210
  export declare function getLuaLSMetadataPath(baseCacheDir?: string): string;
203
211
  export declare function readLuaLSMetadata(baseCacheDir?: string): LuaLSMetadata | null;
204
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[];
205
218
  /**
206
219
  * Lists all cached LuaLS versions in baseCacheDir that have a valid .complete marker
207
220
  * and a functional executable binary.
@@ -212,22 +225,38 @@ export declare function listCachedLuaLSVersions(baseCacheDir?: string): string[]
212
225
  * hidden/temporary directories, and metadata files.
213
226
  */
214
227
  export declare function cleanupOldCachedLuaLSVersions(keepVersion: string, baseCacheDir?: string): string[];
215
- export interface DownloadOptions {
216
- quiet?: boolean;
217
- reuseExisting?: boolean;
218
- /** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
219
- cacheDir?: string;
220
- }
221
228
  /**
222
229
  * Locates an existing, valid LuaLS directory for the specified version in the
223
230
  * primary cache (`baseCacheDir`), the legacy cache, or the package root.
224
231
  */
225
232
  export declare function findExistingLuaLSDir(version: string, baseCacheDir?: string): string | null;
233
+ //#endregion
234
+ //#region src/luals/validation.d.ts
226
235
  /**
227
236
  * Verifies that a LuaLS binary exists, has non-trivial size, and is executable.
228
237
  */
229
238
  export declare function isBinaryValid(binaryPath: string): boolean;
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 {
246
+ quiet?: boolean;
247
+ reuseExisting?: boolean;
248
+ /** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
249
+ cacheDir?: string;
250
+ }
230
251
  export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
252
+ //#endregion
253
+ //#region src/luals/files.d.ts
254
+ /**
255
+ * Counts candidate Lua files within targetPath, taking ignoreDir and files.exclude into account.
256
+ */
257
+ export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
258
+ //#endregion
259
+ //#region src/luals/runner.d.ts
231
260
  export interface ResolveLuaLSOptions {
232
261
  quiet?: boolean;
233
262
  /** Cache base directory (version directories, metadata, temp extraction). Defaults to the system cache. */
@@ -237,10 +266,6 @@ export interface ResolveLuaLSOptions {
237
266
  }
238
267
  export declare function resolveLuaLSBinary(version?: string, options?: ResolveLuaLSOptions): Promise<string>;
239
268
  export declare function runLuaLSCheck(targetPath: string, configPath: string, options: CheckOptions): Promise<CheckResult>;
240
- /**
241
- * Counts candidate Lua files within targetPath, taking ignoreDir and files.exclude into account.
242
- */
243
- export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
244
269
  //#endregion
245
270
  //#region src/reporter.d.ts
246
271
  /**
@@ -332,6 +357,15 @@ export declare const systemPaths: Paths;
332
357
  * Returns the path of the cleared cache directory, or null if it did not exist.
333
358
  */
334
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;
335
369
  //#endregion
336
370
  //#region src/annotations.d.ts
337
371
  export declare const DOCGEN_REPO = "nanos-world/vscode-extension";
@@ -358,6 +392,11 @@ export declare function getAnnotationsCacheDir(): string;
358
392
  export declare function getCachedAnnotationsFilePath(): string;
359
393
  export declare function getAnnotationsMetadataFilePath(): string;
360
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;
361
400
  export declare function fetchLatestCommitId(): Promise<string | null>;
362
401
  export declare function fetchRawAnnotationsContent(): Promise<string>;
363
402
  /**
@@ -408,5 +447,59 @@ export declare class Logger {
408
447
  }
409
448
  export declare const logger: Logger;
410
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
411
504
  export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
412
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","../src/logger.ts"],"x_google_ignoreList":[4],"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;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;;;;;;;;;;;;wBAac,aACd,MAAM,aACN,WAAU,aACV,0BACA,UAAU,qBACT;iBAqHc;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,mBAAmB,IAAG;EAAsB;EAAiB,SAAS;;wBAWtE;wBAIA;wBAIA;wBAIA,wBAAwB,oBAA8C;wBAiBhE,uBAAuB;wBAsBvB,8BAA8B;;;;wBAkCpC,sBACd,kBACA,oBACC;;;;;wBAgCmB,4BACpB,kBACA,mBACA;EAAY;IACX;iBAiHc;EACf;EACA;EACA;;;;;;;;;;wBAWoB,mBAAmB,UAAS,4BAAiC;;;YCnSvE;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"}
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;;;;;w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CHANGED
@@ -1,2 +1,2 @@
1
- import { $ as getDefaultAnnotationsPath, A as FALLBACK_LUALS_VERSION, B as getIsoWeek, C as formatProblemSummary, D as pluralize, E as getColors, F as escapePowerShellSingleQuote, G as listCachedLuaLSVersions, H as getLuaLSMetadataPath, I as fetchLatestLuaLSVersionFromGitHub, J as resolveLuaLSBinary, K as readLuaLSMetadata, L as findExistingLuaLSDir, M as cleanupOldCachedLuaLSVersions, N as countCheckedFiles, O as shouldEnableColor, P as downloadAndExtractLuaLS, Q as writeLuaLSMetadata, R as getBaseLuaLSCacheDir, S as formatPretty, T as formatSeverityBadge, U as getPlatformInfo, V as getLegacyCacheDir, W as isBinaryValid, X as runLuaLSCheck, Y as resolveLuaLSVersion, Z as sanitizeLuaLSVersion, _ as getTodayDateString, _t as isValidLogLevel, a as ANNOTATIONS_FILENAME, at as mergeConfigs, b as updateLastCheckedDate, c as GITHUB_COMMITS_API, ct as stripJsonComments, d as downloadAndCacheAnnotations, dt as systemPaths, et as getDefaultTemplatePath, f as fetchLatestCommitId, ft as fileUriToPath, g as getCachedAnnotationsFilePath, gt as Logger, h as getAnnotationsMetadataFilePath, ht as LOG_LEVEL_PRIORITY, i as runCLI, it as loadConfigFile, j as LUALS_METADATA_FILENAME, k as DEFAULT_LUALS_VERSION, l as METADATA_FILENAME, lt as stripTrailingSlashes, m as getAnnotationsCacheDir, mt as LOG_LEVELS, n as createProgram, nt as getPackageRoot, o as DOCGEN_BRANCH, ot as parseJsonc, p as fetchRawAnnotationsContent, pt as DEFAULT_LOG_LEVEL, q as resolveLatestLuaLSVersion, r as isDirectExecution, rt as initWorkspace, s as DOCGEN_REPO, st as resolveWorkspaceConfig, t as collectIgnorePatterns, tt as getDefinitionsDir, u as RAW_ANNOTATIONS_URL, ut as cleanCache, v as readAnnotationsMetadata, vt as logger, w as formatReport, x as formatGitHubAnnotations, y as resolveAnnotations, yt as parseLogLevel, z as getCacheDir } from "./cli-sEO_MZ-K.js";
2
- export { ANNOTATIONS_FILENAME, 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, METADATA_FILENAME, RAW_ANNOTATIONS_URL, cleanCache, cleanupOldCachedLuaLSVersions, collectIgnorePatterns, countCheckedFiles, createProgram, downloadAndCacheAnnotations, downloadAndExtractLuaLS, escapePowerShellSingleQuote, fetchLatestCommitId, fetchLatestLuaLSVersionFromGitHub, fetchRawAnnotationsContent, fileUriToPath, findExistingLuaLSDir, formatGitHubAnnotations, formatPretty, formatProblemSummary, formatReport, formatSeverityBadge, getAnnotationsCacheDir, getAnnotationsMetadataFilePath, getBaseLuaLSCacheDir, getCacheDir, getCachedAnnotationsFilePath, getColors, getDefaultAnnotationsPath, getDefaultTemplatePath, getDefinitionsDir, getIsoWeek, getLegacyCacheDir, getLuaLSMetadataPath, getPackageRoot, getPlatformInfo, getTodayDateString, initWorkspace, isBinaryValid, isDirectExecution, isValidLogLevel, 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 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.7.0",
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
-