nanos-lint 2.7.0 → 2.8.1

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-BAy_Ztvh.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,90 @@ 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
235
+ /**
236
+ * Minimum plausible size of a downloaded LuaLS executable. Release assets are
237
+ * several megabytes, so anything smaller is a truncated download or a stray
238
+ * file. This floor only applies to binaries nanos-lint fetched itself: a
239
+ * user-supplied `LUALS_BIN` may legitimately be a small wrapper script.
240
+ */
241
+ export declare const MIN_DOWNLOADED_BINARY_SIZE_BYTES = 100000;
226
242
  /**
227
- * Verifies that a LuaLS binary exists, has non-trivial size, and is executable.
243
+ * Verifies that a downloaded or cached LuaLS binary exists, has non-trivial
244
+ * size, and is executable.
228
245
  */
229
246
  export declare function isBinaryValid(binaryPath: string): boolean;
247
+ /**
248
+ * Verifies that an explicitly configured binary is a regular file that runs and
249
+ * reports a LuaLS version, without the downloaded-archive size heuristic so
250
+ * wrapper scripts (`LUALS_BIN=/usr/local/bin/lua-language-server`) keep working.
251
+ */
252
+ export declare function isBinaryRunnable(binaryPath: string): boolean;
253
+ /**
254
+ * Validates an explicitly configured LuaLS binary (`LUALS_BIN` environment
255
+ * variable or `--luals-bin` CLI option) and returns its path.
256
+ *
257
+ * Both are documented escape hatches, so a typo, a stale path, a directory or an
258
+ * unrelated executable must fail with an actionable error instead of a
259
+ * confusing low-level failure deep inside the check run (#26). Executables are
260
+ * accepted as-is when `--version` reports a version, including the thin wrapper
261
+ * scripts that Homebrew/mason-style installations put on `PATH`: the size floor
262
+ * used for downloaded archives would reject those.
263
+ *
264
+ * @param binaryPath Path exactly as the user supplied it.
265
+ * @param source Name of the setting being validated (`LUALS_BIN` / `--luals-bin`).
266
+ */
267
+ export declare function assertValidLuaLSBinary(binaryPath: string, source: string): string;
268
+ //#endregion
269
+ //#region src/luals/download.d.ts
270
+ export declare const DOWNLOAD_TIMEOUT_MS = 120000;
271
+ export declare const MAX_ARCHIVE_SIZE_BYTES: number;
272
+ export declare const ALLOWED_DOWNLOAD_DOMAINS: readonly string[];
273
+ /**
274
+ * Validates that a download URL uses HTTPS and targets an allowlisted host.
275
+ */
276
+ export declare function isAllowedDownloadUrl(urlString: string): boolean;
277
+ /**
278
+ * Calculates the SHA-256 hash of a file on disk in bounded memory.
279
+ */
280
+ 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
+ /**
286
+ * Enforces a maximum byte count on an asynchronous download stream.
287
+ */
288
+ export declare function limitDownloadStream(source: AsyncIterable<Uint8Array | Buffer>): AsyncGenerator<Uint8Array | Buffer, void, unknown>;
289
+ export interface DownloadOptions {
290
+ quiet?: boolean;
291
+ reuseExisting?: boolean;
292
+ /** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
293
+ cacheDir?: string;
294
+ }
230
295
  export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
296
+ //#endregion
297
+ //#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
+ */
309
+ export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
310
+ //#endregion
311
+ //#region src/luals/runner.d.ts
231
312
  export interface ResolveLuaLSOptions {
232
313
  quiet?: boolean;
233
314
  /** Cache base directory (version directories, metadata, temp extraction). Defaults to the system cache. */
@@ -237,10 +318,6 @@ export interface ResolveLuaLSOptions {
237
318
  }
238
319
  export declare function resolveLuaLSBinary(version?: string, options?: ResolveLuaLSOptions): Promise<string>;
239
320
  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
321
  //#endregion
245
322
  //#region src/reporter.d.ts
246
323
  /**
@@ -332,6 +409,15 @@ export declare const systemPaths: Paths;
332
409
  * Returns the path of the cleared cache directory, or null if it did not exist.
333
410
  */
334
411
  export declare function cleanCache(targetDir?: string): string | null;
412
+ /**
413
+ * Recursively calculates total disk usage of a file or directory in bytes.
414
+ * Handles missing paths and inaccessible files gracefully.
415
+ */
416
+ export declare function getDirectorySize(targetPath: string): number;
417
+ /**
418
+ * Formats byte values into human-readable strings (e.g. "86.4 MB", "1.42 MB", "42.5 MB").
419
+ */
420
+ export declare function formatBytes(bytes: number): string;
335
421
  //#endregion
336
422
  //#region src/annotations.d.ts
337
423
  export declare const DOCGEN_REPO = "nanos-world/vscode-extension";
@@ -358,8 +444,18 @@ export declare function getAnnotationsCacheDir(): string;
358
444
  export declare function getCachedAnnotationsFilePath(): string;
359
445
  export declare function getAnnotationsMetadataFilePath(): string;
360
446
  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
+ */
452
+ export declare function isAnnotationsValid(filePath: string): boolean;
361
453
  export declare function fetchLatestCommitId(): Promise<string | null>;
362
- export declare function fetchRawAnnotationsContent(): Promise<string>;
454
+ /**
455
+ * Returns raw annotations URL, pinned to commit SHA if provided and valid.
456
+ */
457
+ export declare function getRawAnnotationsUrl(commitSha?: string): string;
458
+ export declare function fetchRawAnnotationsContent(commitSha?: string): Promise<string>;
363
459
  /**
364
460
  * Updates the metadata lastChecked date atomically without modifying annotations.lua.
365
461
  */
@@ -408,5 +504,59 @@ export declare class Logger {
408
504
  }
409
505
  export declare const logger: Logger;
410
506
  //#endregion
507
+ //#region src/errors.d.ts
508
+ export declare class NanosLintError extends Error {
509
+ readonly code: string;
510
+ readonly remedy?: string | undefined;
511
+ readonly name: string;
512
+ constructor(message: string, code: string, remedy?: string | undefined, options?: {
513
+ cause?: unknown;
514
+ });
515
+ }
516
+ export declare class ConfigError extends NanosLintError {
517
+ readonly name: string;
518
+ }
519
+ export declare class LuaLSError extends NanosLintError {
520
+ readonly name: string;
521
+ }
522
+ export declare class AnnotationsError extends NanosLintError {
523
+ readonly name: string;
524
+ }
525
+ export declare class CacheError extends NanosLintError {
526
+ readonly name: string;
527
+ }
528
+ //#endregion
529
+ //#region src/cache-status.d.ts
530
+ export interface CachedLuaLSVersionInfo {
531
+ version: string;
532
+ status: "valid" | "corrupted";
533
+ size: number;
534
+ sizeFormatted: string;
535
+ path: string;
536
+ }
537
+ export interface LuaLSCacheStatus {
538
+ weeklyCheck: string | null;
539
+ lastCheckedDate: string | null;
540
+ targetVersion: string | null;
541
+ versions: CachedLuaLSVersionInfo[];
542
+ }
543
+ export interface AnnotationsCacheStatus {
544
+ status: "valid" | "corrupted" | "missing";
545
+ size: number;
546
+ sizeFormatted: string;
547
+ path: string;
548
+ commitId: string | null;
549
+ lastChecked: string | null;
550
+ }
551
+ export interface CacheStatusReport {
552
+ cacheDirectory: string;
553
+ totalSize: number;
554
+ totalSizeFormatted: string;
555
+ luals: LuaLSCacheStatus;
556
+ annotations: AnnotationsCacheStatus;
557
+ }
558
+ export declare function getCacheStatus(baseCacheDir?: string): CacheStatusReport;
559
+ export declare function formatCacheStatusPretty(report: CacheStatusReport): string;
560
+ //#endregion
411
561
  export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
412
562
  //# 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;iBAE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f;;EAEA;;EAEA;;wBAGoB,mBACpB,kBACA,UAAU,sBACT;wBAkNmB,cACpB,oBACA,oBACA,SAAS,eACR,QAAQ;;;;wBAsIK,kBAAkB,oBAAoB;;;;;;;wBC39BtC;wBAUA,UAAU;;;;;;;;;;;;wBA6BV,oBACd,kBACA;wBAgBc,UAAU,eAAe,kBAAkB;wBAI3C,qBACd,uBACA,gBACA,kBACA;wBAqBc,aACd,QAAQ,aACR,cACA;wBAmFc,wBAAwB,QAAQ,aAAa;wBAsC7C,aACd,QAAQ,aACR,uCACA,cACA;;;KC5NU;;;;;;;;;;WAUF;;;;;;;;;;WAWA;;;;;;;;;;WAWA;;;;;;;;;;WAWA;;;;;;;;;;WAWA;;;;;;;;qBC1DG,aAAA;;;;;wBAMG,WAAW;;;qBCNd;qBACA;qBACA;qBAEA;iBAGI;EACf;EACA;EACA;;iBAGe;EACf;EACA;EACA,MAAM;;qBAGK;qBACA;wBAEG,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;;;;;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;;;iBCxG5C;EACf;EACA;EACA;EACA;;wBAGc,gBAAgB,mBAA2C;;;wBCD3D;;;;;wBAQA,YACd,kBACA;;;;wBAQc,kBAAkB;qBAQrB;iBAEI;EACf;EACA;EACA;;;;;wBAMc,WAAW,IAAG;wBASd,qBAAqB;wBAIrB,kBAAkB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7B,qBAAqB;wBAOf,2BAA2B,qBAAqB;;;;wBA2CtD,sBACd,kBACA,oBACC;;;;;wBAgCmB,4BACpB,kBACA,mBACA;EAAY;IACX;iBAiHc;EACf;EACA;EACA;;;;;;;;;;wBA8EoB,mBAAmB,UAAS,4BAAiC;;;YCvavE;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 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 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nanos-lint",
3
- "version": "2.7.0",
3
+ "version": "2.8.1",
4
4
  "description": "Linter and type-checker for nanos world Lua scripts powered by LuaLS",
5
5
  "keywords": [
6
6
  "nanos-world",
@@ -54,6 +54,7 @@
54
54
  "commander": "^15.0.0",
55
55
  "env-paths": "^4.0.0",
56
56
  "eslint": "^10.11.0",
57
+ "glob": "^13.0.6",
57
58
  "jsonc-parser": "^3.3.1",
58
59
  "tsdown": "^0.23.0",
59
60
  "tsx": "^4.23.15",
@@ -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
-