nanos-lint 2.8.2 → 3.0.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.
- package/README.md +75 -3
- package/action.yml +16 -7
- package/dist/{cli-BTHx4yp_.js → cli-B9EpAClV.js} +3612 -2518
- package/dist/cli-B9EpAClV.js.map +1 -0
- package/dist/cli-dxsaVVVq.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +154 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +3 -3
- package/templates/.luarc.json +7 -0
- package/dist/cli-BTHx4yp_.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
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;;;;;;;;;;;EAYP,UAAU;;;;;;;;;;;EAYV,QAAQ,cAAc;;;;;;;EAQtB,IAAI;;;;EAKJ,UAAU,GAAG,KAAK,eAAe,UAAU,MAAM;;;;EAKjD,oBAAo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AAY,UAAU,qBAAqB;EAC3C,YACE,UAAU,qBACV,OAAO,SAAS;;;;EAMlB,GAAG,wBAAwB,cAAc;;UAG1B;EACf;EACA;;EAEA;;UAEe,iCAAiC;EAChD;;UAGe;EACf;EACA;;;;;
|
|
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;;;;;;;;;;;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;;EA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BACA"}
|
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-
|
|
1
|
+
import { i as runCLI, n as createProgram, r as isDirectExecution, t as collectIgnorePatterns } from "./cli-B9EpAClV.js";
|
|
2
2
|
export { collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,6 @@ export interface CheckOptions {
|
|
|
27
27
|
lualsVersion?: string;
|
|
28
28
|
format?: "pretty" | "json" | "github";
|
|
29
29
|
failOnError?: boolean;
|
|
30
|
-
quiet?: boolean;
|
|
31
30
|
lualsBin?: string;
|
|
32
31
|
ignore?: string[];
|
|
33
32
|
}
|
|
@@ -40,6 +39,14 @@ export interface CheckResult {
|
|
|
40
39
|
totalFilesChecked?: number;
|
|
41
40
|
diagnostics: DiagnosticReport;
|
|
42
41
|
}
|
|
42
|
+
/** Execution realm of a nanos world script, as loaded by the server or client VM. */
|
|
43
|
+
export type RealmName = "client" | "server" | "shared" | "global";
|
|
44
|
+
/** nanos-lint specific settings embedded in `.luarc.json` under the `nanos` key. */
|
|
45
|
+
export interface NanosConfig {
|
|
46
|
+
/** Maps glob patterns (relative to the checked root) to realm names. */
|
|
47
|
+
realms?: Record<string, RealmName>;
|
|
48
|
+
[key: string]: unknown;
|
|
49
|
+
}
|
|
43
50
|
export interface LuaRCConfig {
|
|
44
51
|
$schema?: string;
|
|
45
52
|
runtime?: {
|
|
@@ -66,6 +73,7 @@ export interface LuaRCConfig {
|
|
|
66
73
|
neededFileStatus?: Record<string, string>;
|
|
67
74
|
[key: string]: unknown;
|
|
68
75
|
};
|
|
76
|
+
nanos?: NanosConfig;
|
|
69
77
|
[key: string]: unknown;
|
|
70
78
|
}
|
|
71
79
|
/**
|
|
@@ -131,13 +139,48 @@ export interface ResolveWorkspaceConfigOptions {
|
|
|
131
139
|
annotationsPath?: string;
|
|
132
140
|
}
|
|
133
141
|
/**
|
|
134
|
-
*
|
|
135
|
-
*
|
|
142
|
+
* Loads the user workspace configuration from `--config` or `<workspace>/.luarc.json`,
|
|
143
|
+
* returning an empty object when neither exists. Parse failures are reported with the
|
|
144
|
+
* offending path so a broken `.luarc.json` is never silently ignored.
|
|
145
|
+
*/
|
|
146
|
+
export declare function loadUserConfig(workspacePath: string, customConfigPath?: string): LuaRCConfig;
|
|
147
|
+
/** Writes a merged configuration to a unique temporary file and returns its path. */
|
|
148
|
+
export declare function writeTempConfig(config: LuaRCConfig): string;
|
|
149
|
+
/**
|
|
150
|
+
* Discovers any existing workspace configuration and merges it with the nanos template,
|
|
151
|
+
* returning a LuaLS-ready configuration object without writing anything to disk.
|
|
152
|
+
*/
|
|
153
|
+
export declare function buildWorkspaceConfig(workspacePath: string, customConfigPath?: string, options?: ResolveWorkspaceConfigOptions): LuaRCConfig;
|
|
154
|
+
/**
|
|
155
|
+
* Builds the merged workspace configuration for a single standard LuaLS pass and writes
|
|
156
|
+
* it to a temporary file (deleted by the caller after the run).
|
|
136
157
|
*/
|
|
137
158
|
export declare function resolveWorkspaceConfig(workspacePath: string, customConfigPath?: string, options?: ResolveWorkspaceConfigOptions): {
|
|
138
159
|
configPath: string;
|
|
139
160
|
isTemp: boolean;
|
|
140
161
|
};
|
|
162
|
+
/** A glob pattern (relative to the checked root) bound to an execution realm. */
|
|
163
|
+
export interface RealmMapping {
|
|
164
|
+
pattern: string;
|
|
165
|
+
realm: "client" | "server" | "shared";
|
|
166
|
+
}
|
|
167
|
+
/** Conventional nanos world package layout used when `nanos.realms` is omitted. */
|
|
168
|
+
export declare const DEFAULT_REALM_MAPPINGS: ReadonlyArray<RealmMapping>;
|
|
169
|
+
export interface ResolvedRealmMappings {
|
|
170
|
+
/** `false` when the user explicitly disabled realms with `nanos.realms: {}`. */
|
|
171
|
+
enabled: boolean;
|
|
172
|
+
mappings: RealmMapping[];
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Resolves the realm mappings declared in `nanos.realms`.
|
|
176
|
+
*
|
|
177
|
+
* - The key is omitted: the conventional `Server/**`, `Client/**`, `Shared/**` layout is
|
|
178
|
+
* used, and realms only activate when those patterns actually match files (#15, #35).
|
|
179
|
+
* - The key is `{}`: realms are disabled and a single standard pass runs.
|
|
180
|
+
* - Otherwise the declared mapping replaces the defaults, and `global` is accepted as an
|
|
181
|
+
* alias of `shared`. Unusable entries are dropped with a warning.
|
|
182
|
+
*/
|
|
183
|
+
export declare function resolveRealmMappings(userConfig: LuaRCConfig): ResolvedRealmMappings;
|
|
141
184
|
export interface InitWorkspaceOptions {
|
|
142
185
|
force?: boolean;
|
|
143
186
|
annotationsPath?: string;
|
|
@@ -147,6 +190,82 @@ export interface InitWorkspaceOptions {
|
|
|
147
190
|
*/
|
|
148
191
|
export declare function initWorkspace(workspacePath: string, options?: InitWorkspaceOptions): string;
|
|
149
192
|
//#endregion
|
|
193
|
+
//#region src/annotations-realms.d.ts
|
|
194
|
+
/** Realm name used by a pass; `global` is normalized to `shared` before this point. */
|
|
195
|
+
type RealmPassName = "client" | "server" | "shared";
|
|
196
|
+
/**
|
|
197
|
+
* Splits a nanos world `annotations.lua` into realm-scoped libraries (#15).
|
|
198
|
+
*
|
|
199
|
+
* Upstream marks every declaration with a side image, so the split is data-driven:
|
|
200
|
+
* `both`/`authority` stay in every realm, `client-only` and `server-only` are restricted
|
|
201
|
+
* to their own realm, unmarked declarations inherit their class or sibling member realm,
|
|
202
|
+
* and a realm-specific class table is dropped from the other realm unless it still has
|
|
203
|
+
* instance members there.
|
|
204
|
+
*/
|
|
205
|
+
export declare function splitAnnotationsByRealm(text: string): {
|
|
206
|
+
client: string;
|
|
207
|
+
server: string;
|
|
208
|
+
};
|
|
209
|
+
interface DerivedRealmAnnotations {
|
|
210
|
+
client: string;
|
|
211
|
+
server: string;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Derives `annotations.client.lua` and `annotations.server.lua` from the resolved
|
|
215
|
+
* annotations file, caching them under the system cache keyed by the source revision.
|
|
216
|
+
* A concurrent derivation is safe: files are written atomically (#7).
|
|
217
|
+
*/
|
|
218
|
+
export declare function deriveRealmAnnotationFiles(annotationsPath: string, cacheDir?: string): DerivedRealmAnnotations;
|
|
219
|
+
//#endregion
|
|
220
|
+
//#region src/realms.d.ts
|
|
221
|
+
/** `--realm` selection: `all` runs every pass, others keep the shared pass too. */
|
|
222
|
+
export type RealmSelection = "all" | RealmPassName;
|
|
223
|
+
export interface RealmFileSets {
|
|
224
|
+
client: string[];
|
|
225
|
+
server: string[];
|
|
226
|
+
/** Files matched by a shared/global pattern. */
|
|
227
|
+
shared: string[];
|
|
228
|
+
/** Files matched by no pattern: they are checked with full context. */
|
|
229
|
+
unmatched: string[];
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Assigns every checked Lua file to a realm, returning the paths exactly as they are on
|
|
233
|
+
* disk (comparisons are case-insensitive on Windows). The last matching `nanos.realms`
|
|
234
|
+
* entry wins, and files matched by no entry belong to the shared (full-context) pass.
|
|
235
|
+
*/
|
|
236
|
+
export declare function collectRealmFiles(root: string, mappings: RealmMapping[], checkedFiles: string[]): RealmFileSets;
|
|
237
|
+
export interface RealmPass {
|
|
238
|
+
realm: RealmPassName;
|
|
239
|
+
configPath: string;
|
|
240
|
+
/** Workspace-relative files whose diagnostics belong to this pass. */
|
|
241
|
+
reportFiles: Set<string>;
|
|
242
|
+
}
|
|
243
|
+
export interface RealmCheckPlan {
|
|
244
|
+
baseConfigPath: string;
|
|
245
|
+
passes: RealmPass[];
|
|
246
|
+
cleanup: () => void;
|
|
247
|
+
}
|
|
248
|
+
export interface PlanRealmCheckOptions {
|
|
249
|
+
targetPath: string;
|
|
250
|
+
userConfig: LuaRCConfig;
|
|
251
|
+
selection: RealmSelection;
|
|
252
|
+
annotationsPath: string;
|
|
253
|
+
customConfigPath?: string;
|
|
254
|
+
ignore?: string[];
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Plans realm-aware checking for a target. Returns `null` when a single standard pass is
|
|
258
|
+
* the right answer: realms disabled, the target is a file, or no configured realm pattern
|
|
259
|
+
* matches a checked Lua file.
|
|
260
|
+
*/
|
|
261
|
+
export declare function planRealmCheck(options: PlanRealmCheckOptions): RealmCheckPlan | null;
|
|
262
|
+
/**
|
|
263
|
+
* Runs every planned realm pass, merges the per-realm reports into one result, and
|
|
264
|
+
* recomputes the totals. Shared files are reported by the full-context pass only, so a
|
|
265
|
+
* file never yields duplicate diagnostics.
|
|
266
|
+
*/
|
|
267
|
+
export declare function runRealmAwareCheck(plan: RealmCheckPlan, targetPath: string, options: CheckOptions): Promise<CheckResult>;
|
|
268
|
+
//#endregion
|
|
150
269
|
//#region src/luals/version.d.ts
|
|
151
270
|
export declare const FALLBACK_LUALS_VERSION = "3.19.1";
|
|
152
271
|
export declare const DEFAULT_LUALS_VERSION = "latest";
|
|
@@ -190,10 +309,6 @@ export declare function getBaseLuaLSCacheDir(): string;
|
|
|
190
309
|
* cache and can be overridden to keep a caller isolated from it.
|
|
191
310
|
*/
|
|
192
311
|
export declare function getCacheDir(version?: string, baseCacheDir?: string): string;
|
|
193
|
-
/**
|
|
194
|
-
* Returns the legacy cache directory used in nanos-lint <= 2.2.1.
|
|
195
|
-
*/
|
|
196
|
-
export declare function getLegacyCacheDir(version?: string): string;
|
|
197
312
|
export declare const LUALS_METADATA_FILENAME = "metadata.json";
|
|
198
313
|
export interface LuaLSMetadata {
|
|
199
314
|
lastCheckedWeek: string;
|
|
@@ -208,7 +323,10 @@ export declare function getIsoWeek(d?: Date): string;
|
|
|
208
323
|
export declare function getLuaLSMetadataPath(baseCacheDir?: string): string;
|
|
209
324
|
/** Reads and parses the LuaLS metadata.json file, purging corrupted or invalid files automatically. */
|
|
210
325
|
export declare function readLuaLSMetadata(baseCacheDir?: string): LuaLSMetadata | null;
|
|
211
|
-
/**
|
|
326
|
+
/**
|
|
327
|
+
* Writes metadata.json containing the latest checked version and timestamp.
|
|
328
|
+
* The write is atomic (#7), so a parallel reader never observes a half-written file.
|
|
329
|
+
*/
|
|
212
330
|
export declare function writeLuaLSMetadata(metadata: LuaLSMetadata, baseCacheDir?: string): void;
|
|
213
331
|
/**
|
|
214
332
|
* Lists all candidate LuaLS version directories under baseCacheDir without running
|
|
@@ -227,7 +345,7 @@ export declare function listCachedLuaLSVersions(baseCacheDir?: string): string[]
|
|
|
227
345
|
export declare function cleanupOldCachedLuaLSVersions(keepVersion: string, baseCacheDir?: string): string[];
|
|
228
346
|
/**
|
|
229
347
|
* Locates an existing, valid LuaLS directory for the specified version in the
|
|
230
|
-
* primary cache (`baseCacheDir`)
|
|
348
|
+
* primary cache (`baseCacheDir`) or the package root.
|
|
231
349
|
*/
|
|
232
350
|
export declare function findExistingLuaLSDir(version: string, baseCacheDir?: string): string | null;
|
|
233
351
|
//#endregion
|
|
@@ -250,7 +368,12 @@ export declare const MAX_ARCHIVE_MEMBER_COUNT = 10000;
|
|
|
250
368
|
export declare function parseTarTvSize(line: string): number;
|
|
251
369
|
/** Locates the platform tar executable path, checking System32 on Windows. */
|
|
252
370
|
export declare function getTarBinary(): string;
|
|
253
|
-
/**
|
|
371
|
+
/**
|
|
372
|
+
* Pre-inspects a ZIP archive's central directory to enforce extraction safety
|
|
373
|
+
* constraints (#31). Fails closed: the directory is walked record by record and
|
|
374
|
+
* rejected unless the walk terminates on a valid end record, matches the
|
|
375
|
+
* declared member count and central directory size, and holds at least one member.
|
|
376
|
+
*/
|
|
254
377
|
export declare function inspectZipMembers(archivePath: string): {
|
|
255
378
|
memberCount: number;
|
|
256
379
|
totalDeclaredSize: number;
|
|
@@ -315,21 +438,31 @@ export declare function computeFileSha256(filePath: string): string;
|
|
|
315
438
|
*/
|
|
316
439
|
export declare function limitDownloadStream(source: AsyncIterable<Uint8Array | Buffer>): AsyncGenerator<Uint8Array | Buffer, void, unknown>;
|
|
317
440
|
export interface DownloadOptions {
|
|
318
|
-
quiet?: boolean;
|
|
319
441
|
reuseExisting?: boolean;
|
|
320
442
|
/** Base directory searched for an installed copy when reusing. Defaults to the system cache. */
|
|
321
443
|
cacheDir?: string;
|
|
322
444
|
}
|
|
323
|
-
/**
|
|
445
|
+
/**
|
|
446
|
+
* Downloads, verifies, and extracts the LuaLS release archive for the current platform.
|
|
447
|
+
*
|
|
448
|
+
* Concurrent callers targeting the same cache directory serialize on a version lock
|
|
449
|
+
* (`.luals-<version>.lock`) and the completion check is repeated once the lock is held,
|
|
450
|
+
* so exactly one worker downloads while the others reuse the promoted directory (#7).
|
|
451
|
+
*/
|
|
324
452
|
export declare function downloadAndExtractLuaLS(version?: string, targetDir?: string, options?: DownloadOptions): Promise<string>;
|
|
325
453
|
//#endregion
|
|
326
454
|
//#region src/luals/files.d.ts
|
|
455
|
+
/**
|
|
456
|
+
* Lists the Lua files LuaLS checks under `targetPath` as slash-normalized relative paths,
|
|
457
|
+
* honoring `workspace.ignoreDir` and `files.exclude` (#27). Absolute paths are returned
|
|
458
|
+
* for single-file targets, and an empty list is returned when the walk fails.
|
|
459
|
+
*/
|
|
460
|
+
export declare function listCheckedFiles(targetPath: string, configPath?: string): string[];
|
|
327
461
|
/** Counts candidate Lua files within targetPath, taking workspace ignoreDir and files.exclude into account (#27). */
|
|
328
462
|
export declare function countCheckedFiles(targetPath: string, configPath?: string): number;
|
|
329
463
|
//#endregion
|
|
330
464
|
//#region src/luals/runner.d.ts
|
|
331
465
|
export interface ResolveLuaLSOptions {
|
|
332
|
-
quiet?: boolean;
|
|
333
466
|
/** Cache base directory (version directories, metadata, temp extraction). Defaults to the system cache. */
|
|
334
467
|
cacheDir?: string;
|
|
335
468
|
/** Set to `false` to always fetch the archive instead of reusing an installed copy. */
|
|
@@ -492,16 +625,18 @@ export declare function fetchLatestCommitId(): Promise<string | null>;
|
|
|
492
625
|
export declare function getRawAnnotationsUrl(commitSha?: string): string;
|
|
493
626
|
/** Downloads raw annotations.lua content from GitHub raw content endpoints. */
|
|
494
627
|
export declare function fetchRawAnnotationsContent(commitSha?: string): Promise<string>;
|
|
495
|
-
/**
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
628
|
+
/**
|
|
629
|
+
* Downloads annotations.lua and writes it with its metadata inside an exclusive cache
|
|
630
|
+
* lock (`.annotations.lock`). The completion check is repeated once the lock is held, so
|
|
631
|
+
* parallel callers reuse the file a concurrent worker just wrote instead of racing on
|
|
632
|
+
* the same paths, and both files are replaced atomically (#7).
|
|
633
|
+
*/
|
|
634
|
+
export declare function downloadAndCacheAnnotations(commitId: string, cacheDir?: string): Promise<string>;
|
|
499
635
|
//#endregion
|
|
500
636
|
//#region src/annotations.d.ts
|
|
501
637
|
export interface ResolveAnnotationsOptions {
|
|
502
638
|
customPath?: string;
|
|
503
639
|
cacheDir?: string;
|
|
504
|
-
quiet?: boolean;
|
|
505
640
|
}
|
|
506
641
|
/**
|
|
507
642
|
* Resolves the nanos world annotations.lua definitions file path.
|
|
@@ -600,5 +735,5 @@ export declare function getCacheStatus(baseCacheDir?: string): CacheStatusReport
|
|
|
600
735
|
/** Formats a cache status report into human-readable terminal output. */
|
|
601
736
|
export declare function formatCacheStatusPretty(report: CacheStatusReport): string;
|
|
602
737
|
//#endregion
|
|
603
|
-
export { CreateProgramOptions, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
|
|
738
|
+
export { CreateProgramOptions, type DerivedRealmAnnotations, type RealmPassName, collectIgnorePatterns, createProgram, isDirectExecution, runCLI };
|
|
604
739
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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-metadata.ts","../src/annotations-download.ts","../src/annotations.ts","../src/logger.ts","../src/errors.ts","../src/cache-status.ts"],"x_google_ignoreList":[
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["_$env_paths0.Paths"],"sources":["../src/types.ts","../src/config.ts","../src/annotations-realms.ts","../src/realms.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-metadata.ts","../src/annotations-download.ts","../src/annotations.ts","../src/logger.ts","../src/errors.ts","../src/cache-status.ts"],"x_google_ignoreList":[12],"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;;iBAGe;EACf;EACA;EACA;EACA;EACA;EACA;EACA,aAAa;;;YAIH;;iBAGK;;EAEf,SAAS,eAAe;GACvB;;iBAGc;EACf;EACA;IACE;IACA;IACA,UAAU;KACT;;EAEH;IACE;IACA;IACA;KACC;;EAEH;IACE;KACC;;EAEH;IACE;IACA;IACA;IACA,WAAW;IACX,mBAAmB;KAClB;;EAEH,QAAQ;GACP;;;;;;wBAOa,cAAc;;;;;;wBC7Ed;;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;;;;;;;wBAQc,eAAe,uBAAuB,4BAA4B;;wBAmBlE,gBAAgB,QAAQ;;;;;wBAexB,qBACd,uBACA,2BACA,UAAU,gCACT;;;;;wBAwDa,uBACd,uBACA,2BACA,UAA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,4BAAiC;;;YCjGvE;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
|
|
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,
|
|
1
|
+
import { $ as getBaseLuaLSCacheDir, $t as getDirectorySize, A as formatProblemSummary, At as VALID_LUALS_DIAGNOSTIC_CODES, B as runLuaLSCheck, Bt as parseJsonc, C as getCachedAnnotationsFilePath, Ct as fetchLatestLuaLSVersionFromGitHub, D as updateLastCheckedDate, Dt as deriveRealmAnnotationFiles, E as readAnnotationsMetadata, Et as sanitizeLuaLSVersion, F as shouldEnableColor, Ft as getPackageRoot, G as MAX_ARCHIVE_SIZE_BYTES, Gt as writeTempConfig, H as listCheckedFiles, Ht as resolveWorkspaceConfig, I as collectRealmFiles, It as initWorkspace, J as isAllowedDownloadUrl, Jt as ConfigError, K as computeFileSha256, Kt as AnnotationsError, L as planRealmCheck, Lt as loadConfigFile, M as formatSeverityBadge, Mt as getDefaultAnnotationsPath, N as getColors, Nt as getDefaultTemplatePath, O as formatGitHubAnnotations, Ot as splitAnnotationsByRealm, P as pluralize, Pt as getDefinitionsDir, Q as findExistingLuaLSDir, Qt as formatBytes, R as runRealmAwareCheck, Rt as loadUserConfig, S as getAnnotationsMetadataFilePath, St as FALLBACK_LUALS_VERSION, T as isAnnotationsValid, Tt as resolveLuaLSVersion, U as ALLOWED_DOWNLOAD_DOMAINS, Ut as stripJsonComments, V as countCheckedFiles, Vt as resolveRealmMappings, W as DOWNLOAD_TIMEOUT_MS, Wt as stripTrailingSlashes, X as LUALS_METADATA_FILENAME, Xt as NanosLintError, Y as limitDownloadStream, Yt as LuaLSError, Z as cleanupOldCachedLuaLSVersions, Zt as cleanCache, _ as MAX_ANNOTATIONS_SIZE_BYTES, _t as isZipArchive, a as formatCacheStatusPretty, an as Logger, at as readLuaLSMetadata, b as MIN_ANNOTATIONS_SIZE_BYTES, bt as getPlatformInfo, c as DOCGEN_BRANCH, cn as parseLogLevel, ct as MAX_DECOMPRESSED_SIZE_BYTES, d as RAW_ANNOTATIONS_URL, dt as escapePowerShellSingleQuote, en as systemPaths, et as getCacheDir, f as downloadAndCacheAnnotations, ft as getTarBinary, g as ANNOTATIONS_FILENAME, gt as isGzipArchive, h as getRawAnnotationsUrl, ht as isBinaryValid, i as runCLI, in as LOG_LEVEL_PRIORITY, it as listCachedLuaLSVersions, j as formatReport, jt as buildWorkspaceConfig, k as formatPretty, kt as DEFAULT_REALM_MAPPINGS, l as DOCGEN_REPO, lt as MIN_DOWNLOADED_BINARY_SIZE_BYTES, m as fetchRawAnnotationsContent, mt as isBinaryRunnable, n as createProgram, nn as DEFAULT_LOG_LEVEL, nt as getLuaLSMetadataPath, o as getCacheStatus, on as isValidLogLevel, ot as writeLuaLSMetadata, p as fetchLatestCommitId, pt as inspectZipMembers, q as downloadAndExtractLuaLS, qt as CacheError, r as isDirectExecution, rn as LOG_LEVELS, rt as listCachedLuaLSVersionDirs, s as resolveAnnotations, sn as logger, st as MAX_ARCHIVE_MEMBER_COUNT, t as collectIgnorePatterns, tn as fileUriToPath, tt as getIsoWeek, u as GITHUB_COMMITS_API, ut as assertValidLuaLSBinary, v as MAX_COMMIT_JSON_SIZE_BYTES, vt as parseTarTvSize, w as getTodayDateString, wt as resolveLatestLuaLSVersion, x as getAnnotationsCacheDir, xt as DEFAULT_LUALS_VERSION, y as METADATA_FILENAME, yt as validateArchiveMembers, z as resolveLuaLSBinary, zt as mergeConfigs } from "./cli-B9EpAClV.js";
|
|
2
|
+
export { ALLOWED_DOWNLOAD_DOMAINS, ANNOTATIONS_FILENAME, AnnotationsError, CacheError, ConfigError, DEFAULT_LOG_LEVEL, DEFAULT_LUALS_VERSION, DEFAULT_REALM_MAPPINGS, 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, buildWorkspaceConfig, cleanCache, cleanupOldCachedLuaLSVersions, collectIgnorePatterns, collectRealmFiles, computeFileSha256, countCheckedFiles, createProgram, deriveRealmAnnotationFiles, 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, getLuaLSMetadataPath, getPackageRoot, getPlatformInfo, getRawAnnotationsUrl, getTarBinary, getTodayDateString, initWorkspace, inspectZipMembers, isAllowedDownloadUrl, isAnnotationsValid, isBinaryRunnable, isBinaryValid, isDirectExecution, isGzipArchive, isValidLogLevel, isZipArchive, limitDownloadStream, listCachedLuaLSVersionDirs, listCachedLuaLSVersions, listCheckedFiles, loadConfigFile, loadUserConfig, logger, mergeConfigs, parseJsonc, parseLogLevel, parseTarTvSize, planRealmCheck, pluralize, readAnnotationsMetadata, readLuaLSMetadata, resolveAnnotations, resolveLatestLuaLSVersion, resolveLuaLSBinary, resolveLuaLSVersion, resolveRealmMappings, resolveWorkspaceConfig, runCLI, runLuaLSCheck, runRealmAwareCheck, sanitizeLuaLSVersion, shouldEnableColor, splitAnnotationsByRealm, stripJsonComments, stripTrailingSlashes, systemPaths, updateLastCheckedDate, validateArchiveMembers, writeLuaLSMetadata, writeTempConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nanos-lint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Linter and type-checker for nanos world Lua scripts powered by LuaLS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nanos-world",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@types/node": "^26.6.2",
|
|
58
58
|
"@typescript-eslint/eslint-plugin": "^8.70.1",
|
|
59
59
|
"@typescript-eslint/parser": "^8.70.1",
|
|
60
|
-
"@vitest/coverage-v8": "^5.0.
|
|
60
|
+
"@vitest/coverage-v8": "^5.0.2",
|
|
61
61
|
"commander": "^15.0.0",
|
|
62
62
|
"dependency-cruiser": "^18.4.0",
|
|
63
63
|
"env-paths": "^4.0.0",
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"tsx": "^4.23.15",
|
|
71
71
|
"typescript": "^6.0.3",
|
|
72
72
|
"typescript-eslint": "^8.70.1",
|
|
73
|
-
"vitest": "^5.0.
|
|
73
|
+
"vitest": "^5.0.2"
|
|
74
74
|
},
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=24.0.0"
|