@alint-js/config 0.0.4 → 0.0.5

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/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AlintConfig, AlintConfig as AlintConfig$1, ModelSize, ProviderDefinition, ProviderType, RunnerConfig, SetupConfig, SetupConfig as SetupConfig$1, SetupModelDefinition } from "@alint-js/core";
2
2
 
3
- //#region src/load-config.d.ts
3
+ //#region src/config/load.d.ts
4
4
  declare function loadAlintConfig(cwd: string, configFile?: string): Promise<AlintConfig$1>;
5
5
  //#endregion
6
6
  //#region src/paths.d.ts
@@ -11,16 +11,16 @@ interface GlobalSetupConfigPathOptions {
11
11
  declare function getGlobalSetupConfigPath(env?: NodeJS.ProcessEnv, options?: GlobalSetupConfigPathOptions): string;
12
12
  declare function getProjectSetupConfigPath(cwd: string): string;
13
13
  //#endregion
14
- //#region src/setup-load.d.ts
14
+ //#region src/setup/load.d.ts
15
15
  declare const emptySetupConfig: SetupConfig$1;
16
16
  declare function loadSetupConfig(filePath: string): Promise<SetupConfig$1>;
17
17
  declare function mergeSetupConfigs(...configs: SetupConfig$1[]): SetupConfig$1;
18
18
  //#endregion
19
- //#region src/setup-toml.d.ts
19
+ //#region src/setup/toml.d.ts
20
20
  declare function parseSetupConfigToml(toml: string): SetupConfig$1;
21
21
  declare function stringifySetupConfigToml(config: SetupConfig$1): string;
22
22
  //#endregion
23
- //#region src/setup-write.d.ts
23
+ //#region src/setup/write.d.ts
24
24
  declare function writeSetupConfig(filePath: string, config: SetupConfig$1): Promise<void>;
25
25
  //#endregion
26
26
  export { type AlintConfig, type GlobalSetupConfigPathOptions, type ModelSize, type ProviderDefinition, type ProviderType, type RunnerConfig, type SetupConfig, type SetupModelDefinition, emptySetupConfig, getGlobalSetupConfigPath, getProjectSetupConfigPath, loadAlintConfig, loadSetupConfig, mergeSetupConfigs, parseSetupConfigToml, stringifySetupConfigToml, writeSetupConfig };
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { dirname, join } from "pathe";
5
5
  import { xdgConfig } from "xdg-basedir";
6
6
  import { mkdir, readFile, writeFile } from "node:fs/promises";
7
7
  import { parse, stringify } from "smol-toml";
8
- //#region src/load-config.ts
8
+ //#region src/config/load.ts
9
9
  async function loadAlintConfig(cwd, configFile) {
10
10
  return (await loadConfig({
11
11
  configFile,
@@ -31,7 +31,7 @@ function resolveDefaultConfigHome(options) {
31
31
  return options.xdgConfig ?? xdgConfig ?? join(homedir(), ".config");
32
32
  }
33
33
  //#endregion
34
- //#region src/setup-toml.ts
34
+ //#region src/setup/toml.ts
35
35
  const modelSizes = /* @__PURE__ */ new Set([
36
36
  "large",
37
37
  "medium",
@@ -172,7 +172,7 @@ function toTomlRunnerCache(cache) {
172
172
  return cache;
173
173
  }
174
174
  //#endregion
175
- //#region src/setup-load.ts
175
+ //#region src/setup/load.ts
176
176
  const emptySetupConfig = {
177
177
  providers: [],
178
178
  version: 1
@@ -273,7 +273,7 @@ function prioritizeProviders(providers, prioritizedProviders) {
273
273
  return [...prioritizedProviders, ...providers.filter((provider) => !prioritizedProviderIds.has(provider.id))];
274
274
  }
275
275
  //#endregion
276
- //#region src/setup-write.ts
276
+ //#region src/setup/write.ts
277
277
  async function writeSetupConfig(filePath, config) {
278
278
  await mkdir(dirname(filePath), { recursive: true });
279
279
  await writeFile(filePath, stringifySetupConfigToml(config), "utf8");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@alint-js/config",
3
3
  "type": "module",
4
- "version": "0.0.4",
4
+ "version": "0.0.5",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -17,7 +17,7 @@
17
17
  "pathe": "^2.0.3",
18
18
  "smol-toml": "^1.7.0",
19
19
  "xdg-basedir": "^5.1.0",
20
- "@alint-js/core": "0.0.4"
20
+ "@alint-js/core": "0.0.5"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/node": "^26.0.1",