@yamada-ui/cli 2.0.7 → 2.0.8-next-20260217114151

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 (2) hide show
  1. package/dist/index.mjs +54 -207
  2. package/package.json +2 -2
package/dist/index.mjs CHANGED
@@ -947,7 +947,7 @@ const FS = {
947
947
  var dist_default = FS;
948
948
 
949
949
  //#endregion
950
- //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/constants.js
950
+ //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/constants.js
951
951
  const DEFAULT_ENCODING = "utf8";
952
952
  const DEFAULT_FILE_MODE = 438;
953
953
  const DEFAULT_FOLDER_MODE = 511;
@@ -960,7 +960,7 @@ const IS_USER_ROOT = process$1.getuid ? !process$1.getuid() : false;
960
960
  const LIMIT_BASENAME_LENGTH = 128;
961
961
 
962
962
  //#endregion
963
- //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/utils/lang.js
963
+ //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/utils/lang.js
964
964
  const isException = (value) => {
965
965
  return value instanceof Error && "code" in value;
966
966
  };
@@ -1023,7 +1023,7 @@ const whenExit = interceptor_default.register;
1023
1023
  var node_default = whenExit;
1024
1024
 
1025
1025
  //#endregion
1026
- //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/utils/temp.js
1026
+ //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/utils/temp.js
1027
1027
  const Temp = {
1028
1028
  store: {},
1029
1029
  create: (filePath) => {
@@ -1063,7 +1063,7 @@ node_default(Temp.purgeSyncAll);
1063
1063
  var temp_default = Temp;
1064
1064
 
1065
1065
  //#endregion
1066
- //#region ../../node_modules/.pnpm/atomically@2.1.1/node_modules/atomically/dist/index.js
1066
+ //#region ../../node_modules/.pnpm/atomically@2.1.0/node_modules/atomically/dist/index.js
1067
1067
  function writeFileSync(filePath, data, options = DEFAULT_WRITE_OPTIONS) {
1068
1068
  if (isString$1(options)) return writeFileSync(filePath, data, { encoding: options });
1069
1069
  const retryOptions = { timeout: options.timeout ?? DEFAULT_TIMEOUT_SYNC };
@@ -1762,7 +1762,7 @@ const chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
1762
1762
  var source_default = chalk;
1763
1763
 
1764
1764
  //#endregion
1765
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/HTTPError.js
1765
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/HTTPError.js
1766
1766
  var HTTPError = class extends Error {
1767
1767
  response;
1768
1768
  request;
@@ -1779,7 +1779,7 @@ var HTTPError = class extends Error {
1779
1779
  };
1780
1780
 
1781
1781
  //#endregion
1782
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/NonError.js
1782
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/NonError.js
1783
1783
  /**
1784
1784
  Wrapper for non-Error values that were thrown.
1785
1785
 
@@ -1800,27 +1800,7 @@ var NonError = class extends Error {
1800
1800
  };
1801
1801
 
1802
1802
  //#endregion
1803
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/ForceRetryError.js
1804
- /**
1805
- Internal error used to signal a forced retry from afterResponse hooks.
1806
- This is thrown when a user returns ky.retry() from an afterResponse hook.
1807
- */
1808
- var ForceRetryError = class extends Error {
1809
- name = "ForceRetryError";
1810
- customDelay;
1811
- code;
1812
- customRequest;
1813
- constructor(options) {
1814
- const cause = options?.cause ? options.cause instanceof Error ? options.cause : new NonError(options.cause) : void 0;
1815
- super(options?.code ? `Forced retry: ${options.code}` : "Forced retry", cause ? { cause } : void 0);
1816
- this.customDelay = options?.delay;
1817
- this.code = options?.code;
1818
- this.customRequest = options?.request;
1819
- }
1820
- };
1821
-
1822
- //#endregion
1823
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/core/constants.js
1803
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/core/constants.js
1824
1804
  const supportsRequestStreams = (() => {
1825
1805
  let duplexAccessed = false;
1826
1806
  let hasContentType = false;
@@ -1866,99 +1846,6 @@ const responseTypes = {
1866
1846
  const maxSafeTimeout = 2147483647;
1867
1847
  const usualFormBoundarySize = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length;
1868
1848
  const stop = Symbol("stop");
1869
- /**
1870
- Marker returned by ky.retry() to signal a forced retry from afterResponse hooks.
1871
- */
1872
- var RetryMarker = class {
1873
- options;
1874
- constructor(options) {
1875
- this.options = options;
1876
- }
1877
- };
1878
- /**
1879
- Force a retry from an `afterResponse` hook.
1880
-
1881
- This allows you to retry a request based on the response content, even if the response has a successful status code. The retry will respect the `retry.limit` option and skip the `shouldRetry` check. The forced retry is observable in `beforeRetry` hooks, where the error will be a `ForceRetryError`.
1882
-
1883
- @param options - Optional configuration for the retry.
1884
-
1885
- @example
1886
- ```
1887
- import ky, {isForceRetryError} from 'ky';
1888
-
1889
- const api = ky.extend({
1890
- hooks: {
1891
- afterResponse: [
1892
- async (request, options, response) => {
1893
- // Retry based on response body content
1894
- if (response.status === 200) {
1895
- const data = await response.clone().json();
1896
-
1897
- // Simple retry with default delay
1898
- if (data.error?.code === 'TEMPORARY_ERROR') {
1899
- return ky.retry();
1900
- }
1901
-
1902
- // Retry with custom delay from API response
1903
- if (data.error?.code === 'RATE_LIMIT') {
1904
- return ky.retry({
1905
- delay: data.error.retryAfter * 1000,
1906
- code: 'RATE_LIMIT'
1907
- });
1908
- }
1909
-
1910
- // Retry with a modified request (e.g., fallback endpoint)
1911
- if (data.error?.code === 'FALLBACK_TO_BACKUP') {
1912
- return ky.retry({
1913
- request: new Request('https://backup-api.com/endpoint', {
1914
- method: request.method,
1915
- headers: request.headers,
1916
- }),
1917
- code: 'BACKUP_ENDPOINT'
1918
- });
1919
- }
1920
-
1921
- // Retry with refreshed authentication
1922
- if (data.error?.code === 'TOKEN_REFRESH' && data.newToken) {
1923
- return ky.retry({
1924
- request: new Request(request, {
1925
- headers: {
1926
- ...Object.fromEntries(request.headers),
1927
- 'Authorization': `Bearer ${data.newToken}`
1928
- }
1929
- }),
1930
- code: 'TOKEN_REFRESHED'
1931
- });
1932
- }
1933
-
1934
- // Retry with cause to preserve error chain
1935
- try {
1936
- validateResponse(data);
1937
- } catch (error) {
1938
- return ky.retry({
1939
- code: 'VALIDATION_FAILED',
1940
- cause: error
1941
- });
1942
- }
1943
- }
1944
- }
1945
- ],
1946
- beforeRetry: [
1947
- ({error, retryCount}) => {
1948
- // Observable in beforeRetry hooks
1949
- if (isForceRetryError(error)) {
1950
- console.log(`Forced retry #${retryCount}: ${error.message}`);
1951
- // Example output: "Forced retry #1: Forced retry: RATE_LIMIT"
1952
- }
1953
- }
1954
- ]
1955
- }
1956
- });
1957
-
1958
- const response = await api.get('https://example.com/api');
1959
- ```
1960
- */
1961
- const retry = (options) => new RetryMarker(options);
1962
1849
  const kyOptionKeys = {
1963
1850
  json: true,
1964
1851
  parseJson: true,
@@ -1993,7 +1880,7 @@ const requestOptionsRegistry = {
1993
1880
  };
1994
1881
 
1995
1882
  //#endregion
1996
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/body.js
1883
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/body.js
1997
1884
  const getBodySize = (body) => {
1998
1885
  if (!body) return 0;
1999
1886
  if (body instanceof FormData) {
@@ -2072,11 +1959,11 @@ const streamRequest = (request, onUploadProgress, originalBody) => {
2072
1959
  };
2073
1960
 
2074
1961
  //#endregion
2075
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/is.js
1962
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/is.js
2076
1963
  const isObject$1 = (value) => value !== null && typeof value === "object";
2077
1964
 
2078
1965
  //#endregion
2079
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/merge.js
1966
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/merge.js
2080
1967
  const validateAndMerge = (...sources) => {
2081
1968
  for (const source of sources) if ((!isObject$1(source) || Array.isArray(source)) && source !== void 0) throw new TypeError("The `options` argument must be an object");
2082
1969
  return deepMerge({}, ...sources);
@@ -2166,11 +2053,12 @@ const deepMerge = (...sources) => {
2166
2053
  if (signals.length > 0) if (signals.length === 1) returnValue.signal = signals[0];
2167
2054
  else if (supportsAbortSignal) returnValue.signal = AbortSignal.any(signals);
2168
2055
  else returnValue.signal = signals.at(-1);
2056
+ if (returnValue.context === void 0) returnValue.context = {};
2169
2057
  return returnValue;
2170
2058
  };
2171
2059
 
2172
2060
  //#endregion
2173
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/normalize.js
2061
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/normalize.js
2174
2062
  const normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
2175
2063
  const defaultRetryOptions = {
2176
2064
  limit: 2,
@@ -2202,23 +2090,21 @@ const defaultRetryOptions = {
2202
2090
  jitter: void 0,
2203
2091
  retryOnTimeout: false
2204
2092
  };
2205
- const normalizeRetryOptions = (retry$1 = {}) => {
2206
- if (typeof retry$1 === "number") return {
2093
+ const normalizeRetryOptions = (retry = {}) => {
2094
+ if (typeof retry === "number") return {
2207
2095
  ...defaultRetryOptions,
2208
- limit: retry$1
2096
+ limit: retry
2209
2097
  };
2210
- if (retry$1.methods && !Array.isArray(retry$1.methods)) throw new Error("retry.methods must be an array");
2211
- retry$1.methods &&= retry$1.methods.map((method) => method.toLowerCase());
2212
- if (retry$1.statusCodes && !Array.isArray(retry$1.statusCodes)) throw new Error("retry.statusCodes must be an array");
2213
- const normalizedRetry = Object.fromEntries(Object.entries(retry$1).filter(([, value]) => value !== void 0));
2098
+ if (retry.methods && !Array.isArray(retry.methods)) throw new Error("retry.methods must be an array");
2099
+ if (retry.statusCodes && !Array.isArray(retry.statusCodes)) throw new Error("retry.statusCodes must be an array");
2214
2100
  return {
2215
2101
  ...defaultRetryOptions,
2216
- ...normalizedRetry
2102
+ ...retry
2217
2103
  };
2218
2104
  };
2219
2105
 
2220
2106
  //#endregion
2221
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/errors/TimeoutError.js
2107
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/errors/TimeoutError.js
2222
2108
  var TimeoutError = class extends Error {
2223
2109
  request;
2224
2110
  constructor(request) {
@@ -2229,7 +2115,7 @@ var TimeoutError = class extends Error {
2229
2115
  };
2230
2116
 
2231
2117
  //#endregion
2232
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/timeout.js
2118
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/timeout.js
2233
2119
  async function timeout(request, init$1, abortController, options) {
2234
2120
  return new Promise((resolve, reject) => {
2235
2121
  const timeoutId = setTimeout(() => {
@@ -2243,7 +2129,7 @@ async function timeout(request, init$1, abortController, options) {
2243
2129
  }
2244
2130
 
2245
2131
  //#endregion
2246
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/delay.js
2132
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/delay.js
2247
2133
  async function delay(ms, { signal }) {
2248
2134
  return new Promise((resolve, reject) => {
2249
2135
  if (signal) {
@@ -2262,7 +2148,7 @@ async function delay(ms, { signal }) {
2262
2148
  }
2263
2149
 
2264
2150
  //#endregion
2265
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/options.js
2151
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/options.js
2266
2152
  const findUnknownOptions = (request, options) => {
2267
2153
  const unknownOptions = {};
2268
2154
  for (const key in options) {
@@ -2281,7 +2167,7 @@ const hasSearchParameters = (search) => {
2281
2167
  };
2282
2168
 
2283
2169
  //#endregion
2284
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/utils/type-guards.js
2170
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/utils/type-guards.js
2285
2171
  /**
2286
2172
  Type guard to check if an error is an HTTPError.
2287
2173
 
@@ -2326,7 +2212,7 @@ function isTimeoutError(error) {
2326
2212
  }
2327
2213
 
2328
2214
  //#endregion
2329
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/core/Ky.js
2215
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/core/Ky.js
2330
2216
  var Ky = class Ky {
2331
2217
  static create(input, options) {
2332
2218
  const ky$1 = new Ky(input, options);
@@ -2335,27 +2221,11 @@ var Ky = class Ky {
2335
2221
  await Promise.resolve();
2336
2222
  let response = await ky$1.#fetch();
2337
2223
  for (const hook of ky$1.#options.hooks.afterResponse) {
2338
- const clonedResponse = ky$1.#decorateResponse(response.clone());
2339
- let modifiedResponse;
2340
- try {
2341
- modifiedResponse = await hook(ky$1.request, ky$1.#getNormalizedOptions(), clonedResponse, { retryCount: ky$1.#retryCount });
2342
- } catch (error) {
2343
- ky$1.#cancelResponseBody(clonedResponse);
2344
- ky$1.#cancelResponseBody(response);
2345
- throw error;
2346
- }
2347
- if (modifiedResponse instanceof RetryMarker) {
2348
- ky$1.#cancelResponseBody(clonedResponse);
2349
- ky$1.#cancelResponseBody(response);
2350
- throw new ForceRetryError(modifiedResponse.options);
2351
- }
2352
- const nextResponse = modifiedResponse instanceof globalThis.Response ? modifiedResponse : response;
2353
- if (clonedResponse !== nextResponse) ky$1.#cancelResponseBody(clonedResponse);
2354
- if (response !== nextResponse) ky$1.#cancelResponseBody(response);
2355
- response = nextResponse;
2224
+ const modifiedResponse = await hook(ky$1.request, ky$1.#getNormalizedOptions(), ky$1.#decorateResponse(response.clone()), { retryCount: ky$1.#retryCount });
2225
+ if (modifiedResponse instanceof globalThis.Response) response = modifiedResponse;
2356
2226
  }
2357
2227
  ky$1.#decorateResponse(response);
2358
- if (!response.ok && (typeof ky$1.#options.throwHttpErrors === "function" ? ky$1.#options.throwHttpErrors(response.status) : ky$1.#options.throwHttpErrors)) {
2228
+ if (!response.ok && ky$1.#options.throwHttpErrors) {
2359
2229
  let error = new HTTPError(response, ky$1.request, ky$1.#getNormalizedOptions());
2360
2230
  for (const hook of ky$1.#options.hooks.beforeError) error = await hook(error, { retryCount: ky$1.#retryCount });
2361
2231
  throw error;
@@ -2363,16 +2233,16 @@ var Ky = class Ky {
2363
2233
  if (ky$1.#options.onDownloadProgress) {
2364
2234
  if (typeof ky$1.#options.onDownloadProgress !== "function") throw new TypeError("The `onDownloadProgress` option must be a function");
2365
2235
  if (!supportsResponseStreams) throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
2366
- const progressResponse = response.clone();
2367
- ky$1.#cancelResponseBody(response);
2368
- return streamResponse(progressResponse, ky$1.#options.onDownloadProgress);
2236
+ return streamResponse(response.clone(), ky$1.#options.onDownloadProgress);
2369
2237
  }
2370
2238
  return response;
2371
2239
  };
2372
- const result = ky$1.#retry(function_).finally(() => {
2240
+ const result = (ky$1.#options.retry.methods.includes(ky$1.request.method.toLowerCase()) ? ky$1.#retry(function_) : function_()).finally(async () => {
2373
2241
  const originalRequest = ky$1.#originalRequest;
2374
- ky$1.#cancelBody(originalRequest?.body ?? void 0);
2375
- ky$1.#cancelBody(ky$1.request.body ?? void 0);
2242
+ const cleanupPromises = [];
2243
+ if (originalRequest && !originalRequest.bodyUsed) cleanupPromises.push(originalRequest.body?.cancel());
2244
+ if (!ky$1.request.bodyUsed) cleanupPromises.push(ky$1.request.body?.cancel());
2245
+ await Promise.all(cleanupPromises);
2376
2246
  });
2377
2247
  for (const [type$1, mimeType] of Object.entries(responseTypes)) {
2378
2248
  if (type$1 === "bytes" && typeof globalThis.Response?.prototype?.bytes !== "function") continue;
@@ -2417,7 +2287,7 @@ var Ky = class Ky {
2417
2287
  method: normalizeRequestMethod(options.method ?? this.#input.method ?? "GET"),
2418
2288
  prefixUrl: String(options.prefixUrl || ""),
2419
2289
  retry: normalizeRetryOptions(options.retry),
2420
- throwHttpErrors: options.throwHttpErrors ?? true,
2290
+ throwHttpErrors: options.throwHttpErrors !== false,
2421
2291
  timeout: options.timeout ?? 1e4,
2422
2292
  fetch: options.fetch ?? globalThis.fetch.bind(globalThis),
2423
2293
  context: options.context ?? {}
@@ -2444,12 +2314,12 @@ var Ky = class Ky {
2444
2314
  if (hasSearchParameters(this.#options.searchParams)) {
2445
2315
  const searchParams = "?" + (typeof this.#options.searchParams === "string" ? this.#options.searchParams.replace(/^\?/, "") : new URLSearchParams(Ky.#normalizeSearchParams(this.#options.searchParams)).toString());
2446
2316
  const url$2 = this.request.url.replace(/(?:\?.*?)?(?=#|$)/, searchParams);
2447
- this.request = new globalThis.Request(url$2, this.#options);
2317
+ this.request = new globalThis.Request(new globalThis.Request(url$2, { ...this.request }), this.#options);
2448
2318
  }
2449
2319
  if (this.#options.onUploadProgress) {
2450
2320
  if (typeof this.#options.onUploadProgress !== "function") throw new TypeError("The `onUploadProgress` option must be a function");
2451
2321
  if (!supportsRequestStreams) throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");
2452
- this.request = this.#wrapRequestWithUploadProgress(this.request, this.#options.body ?? void 0);
2322
+ if (this.request.body) this.request = streamRequest(this.request, this.#options.onUploadProgress, this.#options.body);
2453
2323
  }
2454
2324
  }
2455
2325
  #calculateDelay() {
@@ -2460,15 +2330,12 @@ var Ky = class Ky {
2460
2330
  jitteredDelay = this.#options.retry.jitter(retryDelay);
2461
2331
  if (!Number.isFinite(jitteredDelay) || jitteredDelay < 0) jitteredDelay = retryDelay;
2462
2332
  }
2463
- const backoffLimit = this.#options.retry.backoffLimit ?? Number.POSITIVE_INFINITY;
2464
- return Math.min(backoffLimit, jitteredDelay);
2333
+ return Math.min(this.#options.retry.backoffLimit, jitteredDelay);
2465
2334
  }
2466
2335
  async #calculateRetryDelay(error) {
2467
2336
  this.#retryCount++;
2468
2337
  if (this.#retryCount > this.#options.retry.limit) throw error;
2469
2338
  const errorObject = error instanceof Error ? error : new NonError(error);
2470
- if (errorObject instanceof ForceRetryError) return errorObject.customDelay ?? this.#calculateDelay();
2471
- if (!this.#options.retry.methods.includes(this.request.method.toLowerCase())) throw error;
2472
2339
  if (this.#options.retry.shouldRetry !== void 0) {
2473
2340
  const result = await this.#options.retry.shouldRetry({
2474
2341
  error: errorObject,
@@ -2496,13 +2363,6 @@ var Ky = class Ky {
2496
2363
  if (this.#options.parseJson) response.json = async () => this.#options.parseJson(await response.text());
2497
2364
  return response;
2498
2365
  }
2499
- #cancelBody(body) {
2500
- if (!body) return;
2501
- body.cancel().catch(() => void 0);
2502
- }
2503
- #cancelResponseBody(response) {
2504
- this.#cancelBody(response.body ?? void 0);
2505
- }
2506
2366
  async #retry(function_) {
2507
2367
  try {
2508
2368
  return await function_();
@@ -2510,10 +2370,6 @@ var Ky = class Ky {
2510
2370
  const ms = Math.min(await this.#calculateRetryDelay(error), maxSafeTimeout);
2511
2371
  if (this.#retryCount < 1) throw error;
2512
2372
  await delay(ms, this.#userProvidedAbortSignal ? { signal: this.#userProvidedAbortSignal } : {});
2513
- if (error instanceof ForceRetryError && error.customRequest) {
2514
- const managedRequest = this.#options.signal ? new globalThis.Request(error.customRequest, { signal: this.#options.signal }) : new globalThis.Request(error.customRequest);
2515
- this.#assignRequest(managedRequest);
2516
- }
2517
2373
  for (const hook of this.#options.hooks.beforeRetry) {
2518
2374
  const hookResult = await hook({
2519
2375
  request: this.request,
@@ -2522,7 +2378,7 @@ var Ky = class Ky {
2522
2378
  retryCount: this.#retryCount
2523
2379
  });
2524
2380
  if (hookResult instanceof globalThis.Request) {
2525
- this.#assignRequest(hookResult);
2381
+ this.request = hookResult;
2526
2382
  break;
2527
2383
  }
2528
2384
  if (hookResult instanceof globalThis.Response) return hookResult;
@@ -2539,11 +2395,11 @@ var Ky = class Ky {
2539
2395
  }
2540
2396
  for (const hook of this.#options.hooks.beforeRequest) {
2541
2397
  const result = await hook(this.request, this.#getNormalizedOptions(), { retryCount: this.#retryCount });
2542
- if (result instanceof Response) return result;
2543
- if (result instanceof globalThis.Request) {
2544
- this.#assignRequest(result);
2398
+ if (result instanceof Request) {
2399
+ this.request = result;
2545
2400
  break;
2546
2401
  }
2402
+ if (result instanceof Response) return result;
2547
2403
  }
2548
2404
  const nonRequestOptions = findUnknownOptions(this.request, this.#options);
2549
2405
  this.#originalRequest = this.request;
@@ -2558,18 +2414,10 @@ var Ky = class Ky {
2558
2414
  }
2559
2415
  return this.#cachedNormalizedOptions;
2560
2416
  }
2561
- #assignRequest(request) {
2562
- this.#cachedNormalizedOptions = void 0;
2563
- this.request = this.#wrapRequestWithUploadProgress(request);
2564
- }
2565
- #wrapRequestWithUploadProgress(request, originalBody) {
2566
- if (!this.#options.onUploadProgress || !request.body) return request;
2567
- return streamRequest(request, this.#options.onUploadProgress, originalBody ?? this.#options.body ?? void 0);
2568
- }
2569
2417
  };
2570
2418
 
2571
2419
  //#endregion
2572
- //#region ../../node_modules/.pnpm/ky@1.14.3/node_modules/ky/distribution/index.js
2420
+ //#region ../../node_modules/.pnpm/ky@1.13.0/node_modules/ky/distribution/index.js
2573
2421
  /*! MIT License © Sindre Sorhus */
2574
2422
  const createInstance = (defaults) => {
2575
2423
  const ky$1 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
@@ -2580,7 +2428,6 @@ const createInstance = (defaults) => {
2580
2428
  return createInstance(validateAndMerge(defaults, newDefaults));
2581
2429
  };
2582
2430
  ky$1.stop = stop;
2583
- ky$1.retry = retry;
2584
2431
  return ky$1;
2585
2432
  };
2586
2433
  const ky = createInstance();
@@ -4235,12 +4082,14 @@ var require_config_chain = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4235
4082
  }));
4236
4083
 
4237
4084
  //#endregion
4238
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
4085
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/envKeyToSetting.js
4239
4086
  var require_envKeyToSetting = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4240
4087
  module.exports = function(x) {
4241
4088
  const colonIndex = x.indexOf(":");
4242
4089
  if (colonIndex === -1) return normalize(x);
4243
- return `${x.substr(0, colonIndex)}:${normalize(x.substr(colonIndex + 1))}`;
4090
+ const firstPart = x.substr(0, colonIndex);
4091
+ const secondPart = x.substr(colonIndex + 1);
4092
+ return `${normalize(firstPart)}:${normalize(secondPart)}`;
4244
4093
  };
4245
4094
  function normalize(s) {
4246
4095
  s = s.toLowerCase();
@@ -4292,7 +4141,7 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
4292
4141
  }));
4293
4142
 
4294
4143
  //#endregion
4295
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/util.js
4144
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/util.js
4296
4145
  var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
4297
4146
  const fs$3 = __require("fs");
4298
4147
  const path$6 = __require("path");
@@ -4321,9 +4170,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
4321
4170
  case "null": return null;
4322
4171
  case "undefined": return;
4323
4172
  }
4324
- const processedField = envReplace(field, process.env);
4325
- if ((key.endsWith(":tokenHelper") || key === "tokenHelper") && processedField !== field) throw new Error(`It is not allowed to use environment variables in the value of the ${key} setting.`);
4326
- else field = processedField;
4173
+ field = envReplace(field, process.env);
4327
4174
  if (isPath) {
4328
4175
  if ((process.platform === "win32" ? /^~(\/|\\)/ : /^~\//).test(field) && process.env.HOME) field = path$6.resolve(process.env.HOME, field.substr(2));
4329
4176
  field = path$6.resolve(field);
@@ -4364,7 +4211,7 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
4364
4211
  }));
4365
4212
 
4366
4213
  //#endregion
4367
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/types.js
4214
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/types.js
4368
4215
  var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
4369
4216
  const path$5 = __require("path");
4370
4217
  const Stream = __require("stream").Stream;
@@ -4550,7 +4397,7 @@ var require_types = /* @__PURE__ */ __commonJSMin(((exports) => {
4550
4397
  }));
4551
4398
 
4552
4399
  //#endregion
4553
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/conf.js
4400
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/conf.js
4554
4401
  var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4555
4402
  const { readCAFileSync } = require_dist$1();
4556
4403
  const fs$2 = __require("fs");
@@ -4680,7 +4527,7 @@ var require_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4680
4527
  }));
4681
4528
 
4682
4529
  //#endregion
4683
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/lib/defaults.js
4530
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/lib/defaults.js
4684
4531
  var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
4685
4532
  const os$2 = __require("os");
4686
4533
  const path$3 = __require("path");
@@ -4782,7 +4629,7 @@ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
4782
4629
  "prefer-offline": false,
4783
4630
  "prefer-online": false,
4784
4631
  prefix: globalPrefix,
4785
- production: false,
4632
+ production: process.env.NODE_ENV === "production",
4786
4633
  "progress": !process.env.TRAVIS && !process.env.CI,
4787
4634
  provenance: false,
4788
4635
  proxy: null,
@@ -4834,7 +4681,7 @@ var require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {
4834
4681
  }));
4835
4682
 
4836
4683
  //#endregion
4837
- //#region ../../node_modules/.pnpm/@pnpm+npm-conf@3.0.2/node_modules/@pnpm/npm-conf/index.js
4684
+ //#region ../../node_modules/.pnpm/@pnpm+npm-conf@2.3.1/node_modules/@pnpm/npm-conf/index.js
4838
4685
  var require_npm_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4839
4686
  const path$2 = __require("path");
4840
4687
  const Conf = require_conf();
@@ -4894,7 +4741,7 @@ var require_npm_conf = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4894
4741
  }));
4895
4742
 
4896
4743
  //#endregion
4897
- //#region ../../node_modules/.pnpm/registry-auth-token@5.1.1/node_modules/registry-auth-token/index.js
4744
+ //#region ../../node_modules/.pnpm/registry-auth-token@5.1.0/node_modules/registry-auth-token/index.js
4898
4745
  var require_registry_auth_token = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4899
4746
  const npmConf = require_npm_conf();
4900
4747
  const tokenKey = ":_authToken";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yamada-ui/cli",
3
3
  "type": "module",
4
- "version": "2.0.7",
4
+ "version": "2.0.8-next-20260217114151",
5
5
  "description": "The official CLI for Yamada UI projects",
6
6
  "keywords": [
7
7
  "theme",
@@ -54,7 +54,7 @@
54
54
  "sucrase": "^3.35.1",
55
55
  "validate-npm-package-name": "^7.0.2",
56
56
  "yamljs": "^0.3.0",
57
- "@yamada-ui/utils": "2.0.6"
57
+ "@yamada-ui/utils": "2.1.0-next-20260217114151"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/prompts": "^2.4.9",