@powerlines/plugin-env 0.16.67 → 0.16.68

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.
Files changed (104) hide show
  1. package/dist/_virtual/_rolldown/runtime.cjs +0 -2
  2. package/dist/_virtual/_rolldown/runtime.mjs +2 -31
  3. package/dist/helpers/load.cjs +4 -4
  4. package/dist/helpers/load.mjs +2 -2
  5. package/dist/helpers/load.mjs.map +1 -1
  6. package/package.json +11 -26
  7. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.cjs +0 -346
  8. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs +0 -347
  9. package/dist/node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs.map +0 -1
  10. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.cjs +0 -23
  11. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs +0 -23
  12. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs.map +0 -1
  13. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.cjs +0 -10
  14. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs +0 -11
  15. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs.map +0 -1
  16. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.cjs +0 -1060
  17. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs +0 -1060
  18. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/js-yaml.mjs.map +0 -1
  19. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.cjs +0 -761
  20. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs +0 -761
  21. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/json5.mjs.map +0 -1
  22. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.cjs +0 -388
  23. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs +0 -388
  24. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/jsonc-parser.mjs.map +0 -1
  25. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.cjs +0 -639
  26. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs +0 -639
  27. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/libs/smol-toml.mjs.map +0 -1
  28. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.cjs +0 -17
  29. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs +0 -17
  30. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/rolldown-runtime.mjs.map +0 -1
  31. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.cjs +0 -13
  32. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs +0 -14
  33. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/json5.mjs.map +0 -1
  34. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.cjs +0 -11
  35. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs +0 -12
  36. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs.map +0 -1
  37. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.cjs +0 -11
  38. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs +0 -12
  39. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/toml.mjs.map +0 -1
  40. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.cjs +0 -11
  41. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs +0 -12
  42. package/dist/node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/yaml.mjs.map +0 -1
  43. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.cjs +0 -46
  44. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs +0 -46
  45. package/dist/node_modules/.pnpm/destr@2.0.5/node_modules/destr/dist/index.mjs.map +0 -1
  46. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.cjs +0 -285
  47. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs +0 -283
  48. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/lib/main.mjs.map +0 -1
  49. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.cjs +0 -71
  50. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs +0 -69
  51. package/dist/node_modules/.pnpm/dotenv@17.3.1/node_modules/dotenv/package.mjs.map +0 -1
  52. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.cjs +0 -1013
  53. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs +0 -1008
  54. package/dist/node_modules/.pnpm/exsolve@1.0.8/node_modules/exsolve/dist/index.mjs.map +0 -1
  55. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.cjs +0 -23
  56. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs +0 -14
  57. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/index.mjs.map +0 -1
  58. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.cjs +0 -2695
  59. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -2683
  60. package/dist/node_modules/.pnpm/giget@2.0.0/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs.map +0 -1
  61. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.cjs +0 -4457
  62. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs +0 -4455
  63. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/dist/jiti.mjs.map +0 -1
  64. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.cjs +0 -29
  65. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs +0 -30
  66. package/dist/node_modules/.pnpm/jiti@2.6.1/node_modules/jiti/lib/jiti.mjs.map +0 -1
  67. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -181
  68. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -177
  69. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs.map +0 -1
  70. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.cjs +0 -22
  71. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs +0 -18
  72. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/index.mjs.map +0 -1
  73. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.cjs +0 -3967
  74. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs +0 -3963
  75. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/node.mjs.map +0 -1
  76. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.cjs +0 -11766
  77. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs +0 -11762
  78. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/proxy.mjs.map +0 -1
  79. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -25
  80. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs +0 -21
  81. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.mjs.map +0 -1
  82. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.cjs +0 -20
  83. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs +0 -18
  84. package/dist/node_modules/.pnpm/node-fetch-native@1.6.7/node_modules/node-fetch-native/lib/index.mjs.map +0 -1
  85. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.cjs +0 -178
  86. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs +0 -176
  87. package/dist/node_modules/.pnpm/nypm@0.6.5/node_modules/nypm/dist/index.mjs.map +0 -1
  88. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.cjs +0 -13
  89. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs +0 -13
  90. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/crypto/node/index.mjs.map +0 -1
  91. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.cjs +0 -3
  92. package/dist/node_modules/.pnpm/ohash@2.0.11/node_modules/ohash/dist/index.mjs +0 -3
  93. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.cjs +0 -145
  94. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs +0 -139
  95. package/dist/node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs.map +0 -1
  96. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.cjs +0 -128
  97. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs +0 -127
  98. package/dist/node_modules/.pnpm/pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs.map +0 -1
  99. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.cjs +0 -138
  100. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs +0 -137
  101. package/dist/node_modules/.pnpm/rc9@2.1.2/node_modules/rc9/dist/index.mjs.map +0 -1
  102. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.cjs +0 -629
  103. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs +0 -628
  104. package/dist/node_modules/.pnpm/tinyexec@1.0.2/node_modules/tinyexec/dist/main.mjs.map +0 -1
@@ -1,347 +0,0 @@
1
- import { __toESM } from "../../../../../../_virtual/_rolldown/runtime.mjs";
2
- import { basename, dirname, extname, join, normalize, resolve } from "../../../../pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs";
3
- import { require_main } from "../../../../dotenv@17.3.1/node_modules/dotenv/lib/main.mjs";
4
- import { resolveModulePath } from "../../../../exsolve@1.0.8/node_modules/exsolve/dist/index.mjs";
5
- import createJiti from "../../../../jiti@2.6.1/node_modules/jiti/lib/jiti.mjs";
6
- import { read, readUser } from "../../../../rc9@2.1.2/node_modules/rc9/dist/index.mjs";
7
- import { findWorkspaceDir, readPackageJSON } from "../../../../pkg-types@2.3.0/node_modules/pkg-types/dist/index.mjs";
8
- import { existsSync, promises, statSync } from "node:fs";
9
- import { homedir } from "node:os";
10
- import { readFile, rm } from "node:fs/promises";
11
- import { pathToFileURL } from "node:url";
12
- import { defu as defu$1 } from "defu";
13
-
14
- //#region ../../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs
15
- var import_main = /* @__PURE__ */ __toESM(require_main(), 1);
16
- /**
17
- * Load and interpolate environment variables into `process.env`.
18
- * If you need more control (or access to the values), consider using `loadDotenv` instead
19
- *
20
- */
21
- async function setupDotenv(options) {
22
- const targetEnvironment = options.env ?? process.env;
23
- const environment = await loadDotenv({
24
- cwd: options.cwd,
25
- fileName: options.fileName ?? ".env",
26
- env: targetEnvironment,
27
- interpolate: options.interpolate ?? true
28
- });
29
- const dotenvVars = getDotEnvVars(targetEnvironment);
30
- for (const key in environment) {
31
- if (key.startsWith("_")) continue;
32
- if (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];
33
- }
34
- return environment;
35
- }
36
- /** Load environment variables into an object. */
37
- async function loadDotenv(options) {
38
- const environment = Object.create(null);
39
- const cwd = resolve(options.cwd || ".");
40
- const _fileName = options.fileName || ".env";
41
- const dotenvFiles = typeof _fileName === "string" ? [_fileName] : _fileName;
42
- const dotenvVars = getDotEnvVars(options.env || {});
43
- Object.assign(environment, options.env);
44
- for (const file of dotenvFiles) {
45
- const dotenvFile = resolve(cwd, file);
46
- if (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;
47
- const parsed = import_main.parse(await promises.readFile(dotenvFile, "utf8"));
48
- for (const key in parsed) {
49
- if (key in environment && !dotenvVars.has(key)) continue;
50
- environment[key] = parsed[key];
51
- dotenvVars.add(key);
52
- }
53
- }
54
- if (options.interpolate) interpolate(environment);
55
- return environment;
56
- }
57
- function interpolate(target, source = {}, parse = (v) => v) {
58
- function getValue(key) {
59
- return source[key] === void 0 ? target[key] : source[key];
60
- }
61
- function interpolate$1(value, parents = []) {
62
- if (typeof value !== "string") return value;
63
- return parse((value.match(/(.?\${?(?:[\w:]+)?}?)/g) || []).reduce((newValue, match) => {
64
- const parts = /(.?)\${?([\w:]+)?}?/g.exec(match) || [];
65
- const prefix = parts[1];
66
- let value$1, replacePart;
67
- if (prefix === "\\") {
68
- replacePart = parts[0] || "";
69
- value$1 = replacePart.replace(String.raw`\$`, "$");
70
- } else {
71
- const key = parts[2];
72
- replacePart = (parts[0] || "").slice(prefix.length);
73
- if (parents.includes(key)) {
74
- console.warn(`Please avoid recursive environment variables ( loop: ${parents.join(" > ")} > ${key} )`);
75
- return "";
76
- }
77
- value$1 = getValue(key);
78
- value$1 = interpolate$1(value$1, [...parents, key]);
79
- }
80
- return value$1 === void 0 ? newValue : newValue.replace(replacePart, value$1);
81
- }, value));
82
- }
83
- for (const key in target) target[key] = interpolate$1(getValue(key));
84
- }
85
- function getDotEnvVars(targetEnvironment) {
86
- const globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();
87
- if (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());
88
- return globalRegistry.get(targetEnvironment);
89
- }
90
- const _normalize = (p) => p?.replace(/\\/g, "/");
91
- const ASYNC_LOADERS = {
92
- ".yaml": () => import("../../../../confbox@0.2.4/node_modules/confbox/dist/yaml.mjs").then((r) => r.parseYAML),
93
- ".yml": () => import("../../../../confbox@0.2.4/node_modules/confbox/dist/yaml.mjs").then((r) => r.parseYAML),
94
- ".jsonc": () => import("../../../../confbox@0.2.4/node_modules/confbox/dist/jsonc.mjs").then((r) => r.parseJSONC),
95
- ".json5": () => import("../../../../confbox@0.2.4/node_modules/confbox/dist/json5.mjs").then((r) => r.parseJSON5),
96
- ".toml": () => import("../../../../confbox@0.2.4/node_modules/confbox/dist/toml.mjs").then((r) => r.parseTOML)
97
- };
98
- const SUPPORTED_EXTENSIONS = Object.freeze([
99
- ".js",
100
- ".ts",
101
- ".mjs",
102
- ".cjs",
103
- ".mts",
104
- ".cts",
105
- ".json",
106
- ".jsonc",
107
- ".json5",
108
- ".yaml",
109
- ".yml",
110
- ".toml"
111
- ]);
112
- async function loadConfig(options) {
113
- options.cwd = resolve(process.cwd(), options.cwd || ".");
114
- options.name = options.name || "config";
115
- options.envName = options.envName ?? process.env.NODE_ENV;
116
- options.configFile = options.configFile ?? (options.name === "config" ? "config" : `${options.name}.config`);
117
- options.rcFile = options.rcFile ?? `.${options.name}rc`;
118
- if (options.extend !== false) options.extend = {
119
- extendKey: "extends",
120
- ...options.extend
121
- };
122
- const _merger = options.merger || defu$1;
123
- options.jiti = options.jiti || createJiti(join(options.cwd, options.configFile), {
124
- interopDefault: true,
125
- moduleCache: false,
126
- extensions: [...SUPPORTED_EXTENSIONS],
127
- ...options.jitiOptions
128
- });
129
- const r = {
130
- config: {},
131
- cwd: options.cwd,
132
- configFile: resolve(options.cwd, options.configFile),
133
- layers: [],
134
- _configFile: void 0
135
- };
136
- const rawConfigs = {
137
- overrides: options.overrides,
138
- main: void 0,
139
- rc: void 0,
140
- packageJson: void 0,
141
- defaultConfig: options.defaultConfig
142
- };
143
- if (options.dotenv) await setupDotenv({
144
- cwd: options.cwd,
145
- ...options.dotenv === true ? {} : options.dotenv
146
- });
147
- const _mainConfig = await resolveConfig(".", options);
148
- if (_mainConfig.configFile) {
149
- rawConfigs.main = _mainConfig.config;
150
- r.configFile = _mainConfig.configFile;
151
- r._configFile = _mainConfig._configFile;
152
- }
153
- if (_mainConfig.meta) r.meta = _mainConfig.meta;
154
- if (options.rcFile) {
155
- const rcSources = [];
156
- rcSources.push(read({
157
- name: options.rcFile,
158
- dir: options.cwd
159
- }));
160
- if (options.globalRc) {
161
- const workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});
162
- if (workspaceDir) rcSources.push(read({
163
- name: options.rcFile,
164
- dir: workspaceDir
165
- }));
166
- rcSources.push(readUser({
167
- name: options.rcFile,
168
- dir: options.cwd
169
- }));
170
- }
171
- rawConfigs.rc = _merger({}, ...rcSources);
172
- }
173
- if (options.packageJson) {
174
- const keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === "string" ? options.packageJson : options.name]).filter((t) => t && typeof t === "string");
175
- const pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});
176
- rawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));
177
- }
178
- const configs = {};
179
- for (const key in rawConfigs) {
180
- const value = rawConfigs[key];
181
- configs[key] = await (typeof value === "function" ? value({
182
- configs,
183
- rawConfigs
184
- }) : value);
185
- }
186
- if (Array.isArray(configs.main)) r.config = configs.main;
187
- else {
188
- r.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);
189
- if (options.extend) {
190
- await extendConfig(r.config, options);
191
- r.layers = r.config._layers;
192
- delete r.config._layers;
193
- r.config = _merger(r.config, ...r.layers.map((e) => e.config));
194
- }
195
- }
196
- r.layers = [...[
197
- configs.overrides && {
198
- config: configs.overrides,
199
- configFile: void 0,
200
- cwd: void 0
201
- },
202
- {
203
- config: configs.main,
204
- configFile: options.configFile,
205
- cwd: options.cwd
206
- },
207
- configs.rc && {
208
- config: configs.rc,
209
- configFile: options.rcFile
210
- },
211
- configs.packageJson && {
212
- config: configs.packageJson,
213
- configFile: "package.json"
214
- }
215
- ].filter((l) => l && l.config), ...r.layers];
216
- if (options.defaults) r.config = _merger(r.config, options.defaults);
217
- if (options.omit$Keys) {
218
- for (const key in r.config) if (key.startsWith("$")) delete r.config[key];
219
- }
220
- if (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);
221
- return r;
222
- }
223
- async function extendConfig(config, options) {
224
- config._layers = config._layers || [];
225
- if (!options.extend) return;
226
- let keys = options.extend.extendKey;
227
- if (typeof keys === "string") keys = [keys];
228
- const extendSources = [];
229
- for (const key of keys) {
230
- extendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));
231
- delete config[key];
232
- }
233
- for (let extendSource of extendSources) {
234
- const originalExtendSource = extendSource;
235
- let sourceOptions = {};
236
- if (extendSource.source) {
237
- sourceOptions = extendSource.options || {};
238
- extendSource = extendSource.source;
239
- }
240
- if (Array.isArray(extendSource)) {
241
- sourceOptions = extendSource[1] || {};
242
- extendSource = extendSource[0];
243
- }
244
- if (typeof extendSource !== "string") {
245
- console.warn(`Cannot extend config from \`${JSON.stringify(originalExtendSource)}\` in ${options.cwd}`);
246
- continue;
247
- }
248
- const _config = await resolveConfig(extendSource, options, sourceOptions);
249
- if (!_config.config) {
250
- console.warn(`Cannot extend config from \`${extendSource}\` in ${options.cwd}`);
251
- continue;
252
- }
253
- await extendConfig(_config.config, {
254
- ...options,
255
- cwd: _config.cwd
256
- });
257
- config._layers.push(_config);
258
- if (_config.config._layers) {
259
- config._layers.push(..._config.config._layers);
260
- delete _config.config._layers;
261
- }
262
- }
263
- }
264
- const GIGET_PREFIXES = [
265
- "gh:",
266
- "github:",
267
- "gitlab:",
268
- "bitbucket:",
269
- "https://",
270
- "http://"
271
- ];
272
- const NPM_PACKAGE_RE = /^(@[\da-z~-][\d._a-z~-]*\/)?[\da-z~-][\d._a-z~-]*($|\/.*)/;
273
- async function resolveConfig(source, options, sourceOptions = {}) {
274
- if (options.resolve) {
275
- const res$1 = await options.resolve(source, options);
276
- if (res$1) return res$1;
277
- }
278
- const _merger = options.merger || defu$1;
279
- const customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);
280
- const gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;
281
- if (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {
282
- const { downloadTemplate } = await import("../../../../giget@2.0.0/node_modules/giget/dist/index.mjs");
283
- const { digest } = await import("../../../../ohash@2.0.11/node_modules/ohash/dist/index.mjs");
284
- const cloneName = source.replace(/\W+/g, "_").split("_").splice(0, 3).join("_") + "_" + digest(source).slice(0, 10).replace(/[-_]/g, "");
285
- let cloneDir;
286
- const localNodeModules = resolve(options.cwd, "node_modules");
287
- const parentDir = dirname(options.cwd);
288
- if (basename(parentDir) === ".c12") cloneDir = join(parentDir, cloneName);
289
- else if (existsSync(localNodeModules)) cloneDir = join(localNodeModules, ".c12", cloneName);
290
- else cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, "c12", cloneName) : resolve(homedir(), ".cache/c12", cloneName);
291
- if (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });
292
- source = (await downloadTemplate(source, {
293
- dir: cloneDir,
294
- install: sourceOptions.install,
295
- force: sourceOptions.install,
296
- auth: sourceOptions.auth,
297
- ...options.giget,
298
- ...sourceOptions.giget
299
- })).dir;
300
- }
301
- if (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;
302
- const ext = extname(source);
303
- const isDir = !ext || ext === basename(source);
304
- const cwd = resolve(options.cwd, isDir ? source : dirname(source));
305
- if (isDir) source = options.configFile;
306
- const res = {
307
- config: void 0,
308
- configFile: void 0,
309
- cwd,
310
- source,
311
- sourceOptions
312
- };
313
- res.configFile = tryResolve(resolve(cwd, source), options) || tryResolve(resolve(cwd, ".config", source.replace(/\.config$/, "")), options) || tryResolve(resolve(cwd, ".config", source), options) || source;
314
- if (!existsSync(res.configFile)) return res;
315
- res._configFile = res.configFile;
316
- const configFileExt = extname(res.configFile) || "";
317
- if (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, "utf8"));
318
- else res.config = await options.jiti.import(res.configFile, { default: true });
319
- if (typeof res.config === "function") res.config = await res.config(options.context);
320
- if (options.envName) {
321
- const envConfig = {
322
- ...res.config["$" + options.envName],
323
- ...res.config.$env?.[options.envName]
324
- };
325
- if (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);
326
- }
327
- res.meta = defu$1(res.sourceOptions.meta, res.config.$meta);
328
- delete res.config.$meta;
329
- if (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);
330
- res.configFile = _normalize(res.configFile);
331
- res.source = _normalize(res.source);
332
- return res;
333
- }
334
- function tryResolve(id, options) {
335
- const res = resolveModulePath(id, {
336
- try: true,
337
- from: pathToFileURL(join(options.cwd || ".", options.configFile || "/")),
338
- suffixes: ["", "/index"],
339
- extensions: SUPPORTED_EXTENSIONS,
340
- cache: false
341
- });
342
- return res ? normalize(res) : void 0;
343
- }
344
-
345
- //#endregion
346
- export { loadConfig };
347
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","names":["dotenv","defu","rc9.read","rc9.readUser"],"sources":["../../../../../../../../../node_modules/.pnpm/c12@3.3.3_magicast@0.5.2/node_modules/c12/dist/index.mjs"],"sourcesContent":["import { existsSync, promises, statSync } from \"node:fs\";\nimport { basename, dirname, extname, join, normalize, resolve } from \"pathe\";\nimport * as dotenv from \"dotenv\";\nimport { readFile, rm } from \"node:fs/promises\";\nimport { pathToFileURL } from \"node:url\";\nimport { homedir } from \"node:os\";\nimport { resolveModulePath } from \"exsolve\";\nimport { createJiti } from \"jiti\";\nimport * as rc9 from \"rc9\";\nimport { defu } from \"defu\";\nimport { findWorkspaceDir, readPackageJSON } from \"pkg-types\";\nimport { debounce } from \"perfect-debounce\";\n\n//#region src/dotenv.ts\n/**\n* Load and interpolate environment variables into `process.env`.\n* If you need more control (or access to the values), consider using `loadDotenv` instead\n*\n*/\nasync function setupDotenv(options) {\n\tconst targetEnvironment = options.env ?? process.env;\n\tconst environment = await loadDotenv({\n\t\tcwd: options.cwd,\n\t\tfileName: options.fileName ?? \".env\",\n\t\tenv: targetEnvironment,\n\t\tinterpolate: options.interpolate ?? true\n\t});\n\tconst dotenvVars = getDotEnvVars(targetEnvironment);\n\tfor (const key in environment) {\n\t\tif (key.startsWith(\"_\")) continue;\n\t\tif (targetEnvironment[key] === void 0 || dotenvVars.has(key)) targetEnvironment[key] = environment[key];\n\t}\n\treturn environment;\n}\n/** Load environment variables into an object. */\nasync function loadDotenv(options) {\n\tconst environment = Object.create(null);\n\tconst cwd = resolve(options.cwd || \".\");\n\tconst _fileName = options.fileName || \".env\";\n\tconst dotenvFiles = typeof _fileName === \"string\" ? [_fileName] : _fileName;\n\tconst dotenvVars = getDotEnvVars(options.env || {});\n\tObject.assign(environment, options.env);\n\tfor (const file of dotenvFiles) {\n\t\tconst dotenvFile = resolve(cwd, file);\n\t\tif (!statSync(dotenvFile, { throwIfNoEntry: false })?.isFile()) continue;\n\t\tconst parsed = dotenv.parse(await promises.readFile(dotenvFile, \"utf8\"));\n\t\tfor (const key in parsed) {\n\t\t\tif (key in environment && !dotenvVars.has(key)) continue;\n\t\t\tenvironment[key] = parsed[key];\n\t\t\tdotenvVars.add(key);\n\t\t}\n\t}\n\tif (options.interpolate) interpolate(environment);\n\treturn environment;\n}\nfunction interpolate(target, source = {}, parse = (v) => v) {\n\tfunction getValue(key) {\n\t\treturn source[key] === void 0 ? target[key] : source[key];\n\t}\n\tfunction interpolate$1(value, parents = []) {\n\t\tif (typeof value !== \"string\") return value;\n\t\treturn parse((value.match(/(.?\\${?(?:[\\w:]+)?}?)/g) || []).reduce((newValue, match) => {\n\t\t\tconst parts = /(.?)\\${?([\\w:]+)?}?/g.exec(match) || [];\n\t\t\tconst prefix = parts[1];\n\t\t\tlet value$1, replacePart;\n\t\t\tif (prefix === \"\\\\\") {\n\t\t\t\treplacePart = parts[0] || \"\";\n\t\t\t\tvalue$1 = replacePart.replace(String.raw`\\$`, \"$\");\n\t\t\t} else {\n\t\t\t\tconst key = parts[2];\n\t\t\t\treplacePart = (parts[0] || \"\").slice(prefix.length);\n\t\t\t\tif (parents.includes(key)) {\n\t\t\t\t\tconsole.warn(`Please avoid recursive environment variables ( loop: ${parents.join(\" > \")} > ${key} )`);\n\t\t\t\t\treturn \"\";\n\t\t\t\t}\n\t\t\t\tvalue$1 = getValue(key);\n\t\t\t\tvalue$1 = interpolate$1(value$1, [...parents, key]);\n\t\t\t}\n\t\t\treturn value$1 === void 0 ? newValue : newValue.replace(replacePart, value$1);\n\t\t}, value));\n\t}\n\tfor (const key in target) target[key] = interpolate$1(getValue(key));\n}\nfunction getDotEnvVars(targetEnvironment) {\n\tconst globalRegistry = globalThis.__c12_dotenv_vars__ ||= /* @__PURE__ */ new Map();\n\tif (!globalRegistry.has(targetEnvironment)) globalRegistry.set(targetEnvironment, /* @__PURE__ */ new Set());\n\treturn globalRegistry.get(targetEnvironment);\n}\n\n//#endregion\n//#region src/loader.ts\nconst _normalize = (p) => p?.replace(/\\\\/g, \"/\");\nconst ASYNC_LOADERS = {\n\t\".yaml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".yml\": () => import(\"confbox/yaml\").then((r) => r.parseYAML),\n\t\".jsonc\": () => import(\"confbox/jsonc\").then((r) => r.parseJSONC),\n\t\".json5\": () => import(\"confbox/json5\").then((r) => r.parseJSON5),\n\t\".toml\": () => import(\"confbox/toml\").then((r) => r.parseTOML)\n};\nconst SUPPORTED_EXTENSIONS = Object.freeze([\n\t\".js\",\n\t\".ts\",\n\t\".mjs\",\n\t\".cjs\",\n\t\".mts\",\n\t\".cts\",\n\t\".json\",\n\t\".jsonc\",\n\t\".json5\",\n\t\".yaml\",\n\t\".yml\",\n\t\".toml\"\n]);\nasync function loadConfig(options) {\n\toptions.cwd = resolve(process.cwd(), options.cwd || \".\");\n\toptions.name = options.name || \"config\";\n\toptions.envName = options.envName ?? process.env.NODE_ENV;\n\toptions.configFile = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\toptions.rcFile = options.rcFile ?? `.${options.name}rc`;\n\tif (options.extend !== false) options.extend = {\n\t\textendKey: \"extends\",\n\t\t...options.extend\n\t};\n\tconst _merger = options.merger || defu;\n\toptions.jiti = options.jiti || createJiti(join(options.cwd, options.configFile), {\n\t\tinteropDefault: true,\n\t\tmoduleCache: false,\n\t\textensions: [...SUPPORTED_EXTENSIONS],\n\t\t...options.jitiOptions\n\t});\n\tconst r = {\n\t\tconfig: {},\n\t\tcwd: options.cwd,\n\t\tconfigFile: resolve(options.cwd, options.configFile),\n\t\tlayers: [],\n\t\t_configFile: void 0\n\t};\n\tconst rawConfigs = {\n\t\toverrides: options.overrides,\n\t\tmain: void 0,\n\t\trc: void 0,\n\t\tpackageJson: void 0,\n\t\tdefaultConfig: options.defaultConfig\n\t};\n\tif (options.dotenv) await setupDotenv({\n\t\tcwd: options.cwd,\n\t\t...options.dotenv === true ? {} : options.dotenv\n\t});\n\tconst _mainConfig = await resolveConfig(\".\", options);\n\tif (_mainConfig.configFile) {\n\t\trawConfigs.main = _mainConfig.config;\n\t\tr.configFile = _mainConfig.configFile;\n\t\tr._configFile = _mainConfig._configFile;\n\t}\n\tif (_mainConfig.meta) r.meta = _mainConfig.meta;\n\tif (options.rcFile) {\n\t\tconst rcSources = [];\n\t\trcSources.push(rc9.read({\n\t\t\tname: options.rcFile,\n\t\t\tdir: options.cwd\n\t\t}));\n\t\tif (options.globalRc) {\n\t\t\tconst workspaceDir = await findWorkspaceDir(options.cwd).catch(() => {});\n\t\t\tif (workspaceDir) rcSources.push(rc9.read({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: workspaceDir\n\t\t\t}));\n\t\t\trcSources.push(rc9.readUser({\n\t\t\t\tname: options.rcFile,\n\t\t\t\tdir: options.cwd\n\t\t\t}));\n\t\t}\n\t\trawConfigs.rc = _merger({}, ...rcSources);\n\t}\n\tif (options.packageJson) {\n\t\tconst keys = (Array.isArray(options.packageJson) ? options.packageJson : [typeof options.packageJson === \"string\" ? options.packageJson : options.name]).filter((t) => t && typeof t === \"string\");\n\t\tconst pkgJsonFile = await readPackageJSON(options.cwd).catch(() => {});\n\t\trawConfigs.packageJson = _merger({}, ...keys.map((key) => pkgJsonFile?.[key]));\n\t}\n\tconst configs = {};\n\tfor (const key in rawConfigs) {\n\t\tconst value = rawConfigs[key];\n\t\tconfigs[key] = await (typeof value === \"function\" ? value({\n\t\t\tconfigs,\n\t\t\trawConfigs\n\t\t}) : value);\n\t}\n\tif (Array.isArray(configs.main)) r.config = configs.main;\n\telse {\n\t\tr.config = _merger(configs.overrides, configs.main, configs.rc, configs.packageJson, configs.defaultConfig);\n\t\tif (options.extend) {\n\t\t\tawait extendConfig(r.config, options);\n\t\t\tr.layers = r.config._layers;\n\t\t\tdelete r.config._layers;\n\t\t\tr.config = _merger(r.config, ...r.layers.map((e) => e.config));\n\t\t}\n\t}\n\tr.layers = [...[\n\t\tconfigs.overrides && {\n\t\t\tconfig: configs.overrides,\n\t\t\tconfigFile: void 0,\n\t\t\tcwd: void 0\n\t\t},\n\t\t{\n\t\t\tconfig: configs.main,\n\t\t\tconfigFile: options.configFile,\n\t\t\tcwd: options.cwd\n\t\t},\n\t\tconfigs.rc && {\n\t\t\tconfig: configs.rc,\n\t\t\tconfigFile: options.rcFile\n\t\t},\n\t\tconfigs.packageJson && {\n\t\t\tconfig: configs.packageJson,\n\t\t\tconfigFile: \"package.json\"\n\t\t}\n\t].filter((l) => l && l.config), ...r.layers];\n\tif (options.defaults) r.config = _merger(r.config, options.defaults);\n\tif (options.omit$Keys) {\n\t\tfor (const key in r.config) if (key.startsWith(\"$\")) delete r.config[key];\n\t}\n\tif (options.configFileRequired && !r._configFile) throw new Error(`Required config (${r.configFile}) cannot be resolved.`);\n\treturn r;\n}\nasync function extendConfig(config, options) {\n\tconfig._layers = config._layers || [];\n\tif (!options.extend) return;\n\tlet keys = options.extend.extendKey;\n\tif (typeof keys === \"string\") keys = [keys];\n\tconst extendSources = [];\n\tfor (const key of keys) {\n\t\textendSources.push(...(Array.isArray(config[key]) ? config[key] : [config[key]]).filter(Boolean));\n\t\tdelete config[key];\n\t}\n\tfor (let extendSource of extendSources) {\n\t\tconst originalExtendSource = extendSource;\n\t\tlet sourceOptions = {};\n\t\tif (extendSource.source) {\n\t\t\tsourceOptions = extendSource.options || {};\n\t\t\textendSource = extendSource.source;\n\t\t}\n\t\tif (Array.isArray(extendSource)) {\n\t\t\tsourceOptions = extendSource[1] || {};\n\t\t\textendSource = extendSource[0];\n\t\t}\n\t\tif (typeof extendSource !== \"string\") {\n\t\t\tconsole.warn(`Cannot extend config from \\`${JSON.stringify(originalExtendSource)}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tconst _config = await resolveConfig(extendSource, options, sourceOptions);\n\t\tif (!_config.config) {\n\t\t\tconsole.warn(`Cannot extend config from \\`${extendSource}\\` in ${options.cwd}`);\n\t\t\tcontinue;\n\t\t}\n\t\tawait extendConfig(_config.config, {\n\t\t\t...options,\n\t\t\tcwd: _config.cwd\n\t\t});\n\t\tconfig._layers.push(_config);\n\t\tif (_config.config._layers) {\n\t\t\tconfig._layers.push(..._config.config._layers);\n\t\t\tdelete _config.config._layers;\n\t\t}\n\t}\n}\nconst GIGET_PREFIXES = [\n\t\"gh:\",\n\t\"github:\",\n\t\"gitlab:\",\n\t\"bitbucket:\",\n\t\"https://\",\n\t\"http://\"\n];\nconst NPM_PACKAGE_RE = /^(@[\\da-z~-][\\d._a-z~-]*\\/)?[\\da-z~-][\\d._a-z~-]*($|\\/.*)/;\nasync function resolveConfig(source, options, sourceOptions = {}) {\n\tif (options.resolve) {\n\t\tconst res$1 = await options.resolve(source, options);\n\t\tif (res$1) return res$1;\n\t}\n\tconst _merger = options.merger || defu;\n\tconst customProviderKeys = Object.keys(sourceOptions.giget?.providers || {}).map((key) => `${key}:`);\n\tconst gigetPrefixes = customProviderKeys.length > 0 ? [...new Set([...customProviderKeys, ...GIGET_PREFIXES])] : GIGET_PREFIXES;\n\tif (options.giget !== false && gigetPrefixes.some((prefix) => source.startsWith(prefix))) {\n\t\tconst { downloadTemplate } = await import(\"giget\");\n\t\tconst { digest } = await import(\"ohash\");\n\t\tconst cloneName = source.replace(/\\W+/g, \"_\").split(\"_\").splice(0, 3).join(\"_\") + \"_\" + digest(source).slice(0, 10).replace(/[-_]/g, \"\");\n\t\tlet cloneDir;\n\t\tconst localNodeModules = resolve(options.cwd, \"node_modules\");\n\t\tconst parentDir = dirname(options.cwd);\n\t\tif (basename(parentDir) === \".c12\") cloneDir = join(parentDir, cloneName);\n\t\telse if (existsSync(localNodeModules)) cloneDir = join(localNodeModules, \".c12\", cloneName);\n\t\telse cloneDir = process.env.XDG_CACHE_HOME ? resolve(process.env.XDG_CACHE_HOME, \"c12\", cloneName) : resolve(homedir(), \".cache/c12\", cloneName);\n\t\tif (existsSync(cloneDir) && !sourceOptions.install) await rm(cloneDir, { recursive: true });\n\t\tsource = (await downloadTemplate(source, {\n\t\t\tdir: cloneDir,\n\t\t\tinstall: sourceOptions.install,\n\t\t\tforce: sourceOptions.install,\n\t\t\tauth: sourceOptions.auth,\n\t\t\t...options.giget,\n\t\t\t...sourceOptions.giget\n\t\t})).dir;\n\t}\n\tif (NPM_PACKAGE_RE.test(source)) source = tryResolve(source, options) || source;\n\tconst ext = extname(source);\n\tconst isDir = !ext || ext === basename(source);\n\tconst cwd = resolve(options.cwd, isDir ? source : dirname(source));\n\tif (isDir) source = options.configFile;\n\tconst res = {\n\t\tconfig: void 0,\n\t\tconfigFile: void 0,\n\t\tcwd,\n\t\tsource,\n\t\tsourceOptions\n\t};\n\tres.configFile = tryResolve(resolve(cwd, source), options) || tryResolve(resolve(cwd, \".config\", source.replace(/\\.config$/, \"\")), options) || tryResolve(resolve(cwd, \".config\", source), options) || source;\n\tif (!existsSync(res.configFile)) return res;\n\tres._configFile = res.configFile;\n\tconst configFileExt = extname(res.configFile) || \"\";\n\tif (configFileExt in ASYNC_LOADERS) res.config = (await ASYNC_LOADERS[configFileExt]())(await readFile(res.configFile, \"utf8\"));\n\telse res.config = await options.jiti.import(res.configFile, { default: true });\n\tif (typeof res.config === \"function\") res.config = await res.config(options.context);\n\tif (options.envName) {\n\t\tconst envConfig = {\n\t\t\t...res.config[\"$\" + options.envName],\n\t\t\t...res.config.$env?.[options.envName]\n\t\t};\n\t\tif (Object.keys(envConfig).length > 0) res.config = _merger(envConfig, res.config);\n\t}\n\tres.meta = defu(res.sourceOptions.meta, res.config.$meta);\n\tdelete res.config.$meta;\n\tif (res.sourceOptions.overrides) res.config = _merger(res.sourceOptions.overrides, res.config);\n\tres.configFile = _normalize(res.configFile);\n\tres.source = _normalize(res.source);\n\treturn res;\n}\nfunction tryResolve(id, options) {\n\tconst res = resolveModulePath(id, {\n\t\ttry: true,\n\t\tfrom: pathToFileURL(join(options.cwd || \".\", options.configFile || \"/\")),\n\t\tsuffixes: [\"\", \"/index\"],\n\t\textensions: SUPPORTED_EXTENSIONS,\n\t\tcache: false\n\t});\n\treturn res ? normalize(res) : void 0;\n}\n\n//#endregion\n//#region src/types.ts\nfunction createDefineConfig() {\n\treturn (input) => input;\n}\n\n//#endregion\n//#region src/watch.ts\nconst eventMap = {\n\tadd: \"created\",\n\tchange: \"updated\",\n\tunlink: \"removed\"\n};\nasync function watchConfig(options) {\n\tlet config = await loadConfig(options);\n\tconst configName = options.name || \"config\";\n\tconst configFileName = options.configFile ?? (options.name === \"config\" ? \"config\" : `${options.name}.config`);\n\tconst watchingFiles = [...new Set((config.layers || []).filter((l) => l.cwd).flatMap((l) => [\n\t\t...SUPPORTED_EXTENSIONS.flatMap((ext) => [\n\t\t\tresolve(l.cwd, configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName + ext),\n\t\t\tresolve(l.cwd, \".config\", configFileName.replace(/\\.config$/, \"\") + ext)\n\t\t]),\n\t\tl.source && resolve(l.cwd, l.source),\n\t\toptions.rcFile && resolve(l.cwd, typeof options.rcFile === \"string\" ? options.rcFile : `.${configName}rc`),\n\t\toptions.packageJson && resolve(l.cwd, \"package.json\")\n\t]).filter(Boolean))];\n\tconst watch = await import(\"chokidar\").then((r) => r.watch || r.default || r);\n\tconst { diff } = await import(\"ohash/utils\");\n\tconst _fswatcher = watch(watchingFiles, {\n\t\tignoreInitial: true,\n\t\t...options.chokidarOptions\n\t});\n\tconst onChange = async (event, path) => {\n\t\tconst type = eventMap[event];\n\t\tif (!type) return;\n\t\tif (options.onWatch) await options.onWatch({\n\t\t\ttype,\n\t\t\tpath\n\t\t});\n\t\tconst oldConfig = config;\n\t\ttry {\n\t\t\tconfig = await loadConfig(options);\n\t\t} catch (error) {\n\t\t\tconsole.warn(`Failed to load config ${path}\\n${error}`);\n\t\t\treturn;\n\t\t}\n\t\tconst changeCtx = {\n\t\t\tnewConfig: config,\n\t\t\toldConfig,\n\t\t\tgetDiff: () => diff(oldConfig.config, config.config)\n\t\t};\n\t\tif (options.acceptHMR) {\n\t\t\tif (await options.acceptHMR(changeCtx)) return;\n\t\t}\n\t\tif (options.onUpdate) await options.onUpdate(changeCtx);\n\t};\n\tif (options.debounce === false) _fswatcher.on(\"all\", onChange);\n\telse _fswatcher.on(\"all\", debounce(onChange, options.debounce ?? 100));\n\tconst utils = {\n\t\twatchingFiles,\n\t\tunwatch: async () => {\n\t\t\tawait _fswatcher.close();\n\t\t}\n\t};\n\treturn new Proxy(utils, { get(_, prop) {\n\t\tif (prop in utils) return utils[prop];\n\t\treturn config[prop];\n\t} });\n}\n\n//#endregion\nexport { SUPPORTED_EXTENSIONS, createDefineConfig, loadConfig, loadDotenv, setupDotenv, watchConfig };"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;;;;;;;;;AAmBA,eAAe,YAAY,SAAS;CACnC,MAAM,oBAAoB,QAAQ,OAAO,QAAQ;CACjD,MAAM,cAAc,MAAM,WAAW;EACpC,KAAK,QAAQ;E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{}) {
5
- return {
6
- sample: t.indent === void 0 && t.preserveIndentation !== !1 && e.slice(0, t?.sampleSize || 1024),
7
- whiteSpace: t.preserveWhitespace === !1 ? void 0 : {
8
- start: n.exec(e)?.[0] || ``,
9
- end: r.exec(e)?.[0] || ``
10
- }
11
- };
12
- }
13
- function a(e, n, r) {
14
- !n || typeof n != `object` || Object.defineProperty(n, t, {
15
- enumerable: !1,
16
- configurable: !0,
17
- writable: !0,
18
- value: i(e, r)
19
- });
20
- }
21
-
22
- //#endregion
23
- exports.a = a;
@@ -1,23 +0,0 @@
1
- //#region ../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs
2
- const t = Symbol.for(`__confbox_fmt__`), n = /^(\s+)/, r = /(\s+)$/;
3
- function i(e, t = {}) {
4
- return {
5
- sample: t.indent === void 0 && t.preserveIndentation !== !1 && e.slice(0, t?.sampleSize || 1024),
6
- whiteSpace: t.preserveWhitespace === !1 ? void 0 : {
7
- start: n.exec(e)?.[0] || ``,
8
- end: r.exec(e)?.[0] || ``
9
- }
10
- };
11
- }
12
- function a(e, n, r) {
13
- !n || typeof n != `object` || Object.defineProperty(n, t, {
14
- enumerable: !1,
15
- configurable: !0,
16
- writable: !0,
17
- value: i(e, r)
18
- });
19
- }
20
-
21
- //#endregion
22
- export { a };
23
- //# sourceMappingURL=_format.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_format.mjs","names":[],"sources":["../../../../../../../../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/_format.mjs"],"sourcesContent":["import{t as e}from\"./libs/detect-indent.mjs\";const t=Symbol.for(`__confbox_fmt__`),n=/^(\\s+)/,r=/(\\s+)$/;function i(e,t={}){return{sample:t.indent===void 0&&t.preserveIndentation!==!1&&e.slice(0,t?.sampleSize||1024),whiteSpace:t.preserveWhitespace===!1?void 0:{start:n.exec(e)?.[0]||``,end:r.exec(e)?.[0]||``}}}function a(e,n,r){!n||typeof n!=`object`||Object.defineProperty(n,t,{enumerable:!1,configurable:!0,writable:!0,value:i(e,r)})}function o(n,r){if(!n||typeof n!=`object`||!(t in n))return{indent:r?.indent??2,whitespace:{start:``,end:``}};let i=n[t];return{indent:r?.indent||e(i.sample||``).indent,whitespace:i.whiteSpace||{start:``,end:``}}}export{a as n,o as t};"],"x_google_ignoreList":[0],"mappings":";AAA6C,MAAM,IAAE,OAAO,IAAI,kBAAkB,EAAC,IAAE,UAAS,IAAE;AAAS,SAAS,EAAE,GAAE,IAAE,EAAE,EAAC;AAAC,QAAM;EAAC,QAAO,EAAE,WAAS,KAAK,KAAG,EAAE,wBAAsB,CAAC,KAAG,EAAE,MAAM,GAAE,GAAG,cAAY,KAAK;EAAC,YAAW,EAAE,uBAAqB,CAAC,IAAE,KAAK,IAAE;GAAC,OAAM,EAAE,KAAK,EAAE,GAAG,MAAI;GAAG,KAAI,EAAE,KAAK,EAAE,GAAG,MAAI;GAAG;EAAC;;AAAC,SAAS,EAAE,GAAE,GAAE,GAAE;AAAC,EAAC,KAAG,OAAO,KAAG,YAAU,OAAO,eAAe,GAAE,GAAE;EAAC,YAAW,CAAC;EAAE,cAAa,CAAC;EAAE,UAAS,CAAC;EAAE,OAAM,EAAE,GAAE,EAAE;EAAC,CAAC"}
@@ -1,10 +0,0 @@
1
- const require__format = require('./_format.cjs');
2
-
3
- //#region ../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
4
- function n(t, n) {
5
- let r = JSON.parse(t, n?.reviver);
6
- return require__format.a(t, r, n), r;
7
- }
8
-
9
- //#endregion
10
- exports.n = n;
@@ -1,11 +0,0 @@
1
- import { a } from "./_format.mjs";
2
-
3
- //#region ../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs
4
- function n(t, n) {
5
- let r = JSON.parse(t, n?.reviver);
6
- return a(t, r, n), r;
7
- }
8
-
9
- //#endregion
10
- export { n };
11
- //# sourceMappingURL=json.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"json.mjs","names":["e"],"sources":["../../../../../../../../../../node_modules/.pnpm/confbox@0.2.4/node_modules/confbox/dist/_chunks/json.mjs"],"sourcesContent":["import{n as e,t}from\"./_format.mjs\";function n(t,n){let r=JSON.parse(t,n?.reviver);return e(t,r,n),r}function r(e,n){let r=t(e,n),i=JSON.stringify(e,n?.replacer,r.indent);return r.whitespace.start+i+r.whitespace.end}export{r as n,n as t};"],"x_google_ignoreList":[0],"mappings":";;;AAAoC,SAAS,EAAE,GAAE,GAAE;CAAC,IAAI,IAAE,KAAK,MAAM,GAAE,GAAG,QAAQ;AAAC,QAAOA,EAAE,GAAE,GAAE,EAAE,EAAC"}