@yamada-ui/cli 1.2.4 → 1.2.5-dev-20250801135100
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/command/index.js +3 -3
- package/dist/command/theme/index.js +3 -3
- package/dist/command/tokens/create-theme-typings.js +2 -2
- package/dist/command/tokens/index.js +2 -2
- package/dist/index.js +221 -135
- package/dist/utils/cli.js +220 -134
- package/dist/utils/index.js +220 -134
- package/package.json +1 -1
package/dist/command/index.js
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -640,7 +640,7 @@ var prettier = async (content, options) => {
|
|
|
640
640
|
// src/command/theme/index.ts
|
|
641
641
|
var ORG_NAME = "yamada-ui";
|
|
642
642
|
var REPO_NAME = "yamada-ui";
|
|
643
|
-
var DEFAULT_BRANCH_NAME = "
|
|
643
|
+
var DEFAULT_BRANCH_NAME = "v1";
|
|
644
644
|
var isOnline = async () => {
|
|
645
645
|
return new Promise((resolve) => {
|
|
646
646
|
import_dns.default.lookup("github.com", (err) => {
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -588,7 +588,7 @@ var prettier = async (content, options) => {
|
|
|
588
588
|
// src/command/theme/index.ts
|
|
589
589
|
var ORG_NAME = "yamada-ui";
|
|
590
590
|
var REPO_NAME = "yamada-ui";
|
|
591
|
-
var DEFAULT_BRANCH_NAME = "
|
|
591
|
+
var DEFAULT_BRANCH_NAME = "v1";
|
|
592
592
|
var isOnline = async () => {
|
|
593
593
|
return new Promise((resolve) => {
|
|
594
594
|
import_dns.default.lookup("github.com", (err) => {
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
33
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
34
34
|
var init_cjs_shims = __esm({
|
|
35
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
35
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
}
|
|
38
38
|
});
|
package/dist/index.js
CHANGED
|
@@ -33,10 +33,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var getImportMetaUrl, importMetaUrl;
|
|
38
38
|
var init_cjs_shims = __esm({
|
|
39
|
-
"../../node_modules/.pnpm/tsup@8.
|
|
39
|
+
"../../node_modules/.pnpm/tsup@8.4.0_@swc+core@1.11.24_jiti@2.4.2_tsx@4.19.4_typescript@5.8.3/node_modules/tsup/assets/cjs_shims.js"() {
|
|
40
40
|
"use strict";
|
|
41
41
|
getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
|
|
42
42
|
importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
|
|
@@ -7324,13 +7324,13 @@ init_cjs_shims();
|
|
|
7324
7324
|
// ../../node_modules/.pnpm/package-json@10.0.1/node_modules/package-json/index.js
|
|
7325
7325
|
init_cjs_shims();
|
|
7326
7326
|
|
|
7327
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7327
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/index.js
|
|
7328
7328
|
init_cjs_shims();
|
|
7329
7329
|
|
|
7330
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7330
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/core/Ky.js
|
|
7331
7331
|
init_cjs_shims();
|
|
7332
7332
|
|
|
7333
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7333
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/errors/HTTPError.js
|
|
7334
7334
|
init_cjs_shims();
|
|
7335
7335
|
var HTTPError = class extends Error {
|
|
7336
7336
|
response;
|
|
@@ -7349,7 +7349,7 @@ var HTTPError = class extends Error {
|
|
|
7349
7349
|
}
|
|
7350
7350
|
};
|
|
7351
7351
|
|
|
7352
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7352
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/errors/TimeoutError.js
|
|
7353
7353
|
init_cjs_shims();
|
|
7354
7354
|
var TimeoutError = class extends Error {
|
|
7355
7355
|
request;
|
|
@@ -7360,78 +7360,10 @@ var TimeoutError = class extends Error {
|
|
|
7360
7360
|
}
|
|
7361
7361
|
};
|
|
7362
7362
|
|
|
7363
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7363
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/body.js
|
|
7364
7364
|
init_cjs_shims();
|
|
7365
7365
|
|
|
7366
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7367
|
-
init_cjs_shims();
|
|
7368
|
-
var isObject3 = (value) => value !== null && typeof value === "object";
|
|
7369
|
-
|
|
7370
|
-
// ../../node_modules/.pnpm/ky@1.7.5/node_modules/ky/distribution/utils/merge.js
|
|
7371
|
-
var validateAndMerge = (...sources) => {
|
|
7372
|
-
for (const source of sources) {
|
|
7373
|
-
if ((!isObject3(source) || Array.isArray(source)) && source !== void 0) {
|
|
7374
|
-
throw new TypeError("The `options` argument must be an object");
|
|
7375
|
-
}
|
|
7376
|
-
}
|
|
7377
|
-
return deepMerge({}, ...sources);
|
|
7378
|
-
};
|
|
7379
|
-
var mergeHeaders = (source1 = {}, source2 = {}) => {
|
|
7380
|
-
const result = new globalThis.Headers(source1);
|
|
7381
|
-
const isHeadersInstance = source2 instanceof globalThis.Headers;
|
|
7382
|
-
const source = new globalThis.Headers(source2);
|
|
7383
|
-
for (const [key, value] of source.entries()) {
|
|
7384
|
-
if (isHeadersInstance && value === "undefined" || value === void 0) {
|
|
7385
|
-
result.delete(key);
|
|
7386
|
-
} else {
|
|
7387
|
-
result.set(key, value);
|
|
7388
|
-
}
|
|
7389
|
-
}
|
|
7390
|
-
return result;
|
|
7391
|
-
};
|
|
7392
|
-
function newHookValue(original, incoming, property) {
|
|
7393
|
-
return Object.hasOwn(incoming, property) && incoming[property] === void 0 ? [] : deepMerge(original[property] ?? [], incoming[property] ?? []);
|
|
7394
|
-
}
|
|
7395
|
-
var mergeHooks = (original = {}, incoming = {}) => ({
|
|
7396
|
-
beforeRequest: newHookValue(original, incoming, "beforeRequest"),
|
|
7397
|
-
beforeRetry: newHookValue(original, incoming, "beforeRetry"),
|
|
7398
|
-
afterResponse: newHookValue(original, incoming, "afterResponse"),
|
|
7399
|
-
beforeError: newHookValue(original, incoming, "beforeError")
|
|
7400
|
-
});
|
|
7401
|
-
var deepMerge = (...sources) => {
|
|
7402
|
-
let returnValue = {};
|
|
7403
|
-
let headers = {};
|
|
7404
|
-
let hooks = {};
|
|
7405
|
-
for (const source of sources) {
|
|
7406
|
-
if (Array.isArray(source)) {
|
|
7407
|
-
if (!Array.isArray(returnValue)) {
|
|
7408
|
-
returnValue = [];
|
|
7409
|
-
}
|
|
7410
|
-
returnValue = [...returnValue, ...source];
|
|
7411
|
-
} else if (isObject3(source)) {
|
|
7412
|
-
for (let [key, value] of Object.entries(source)) {
|
|
7413
|
-
if (isObject3(value) && key in returnValue) {
|
|
7414
|
-
value = deepMerge(returnValue[key], value);
|
|
7415
|
-
}
|
|
7416
|
-
returnValue = { ...returnValue, [key]: value };
|
|
7417
|
-
}
|
|
7418
|
-
if (isObject3(source.hooks)) {
|
|
7419
|
-
hooks = mergeHooks(hooks, source.hooks);
|
|
7420
|
-
returnValue.hooks = hooks;
|
|
7421
|
-
}
|
|
7422
|
-
if (isObject3(source.headers)) {
|
|
7423
|
-
headers = mergeHeaders(headers, source.headers);
|
|
7424
|
-
returnValue.headers = headers;
|
|
7425
|
-
}
|
|
7426
|
-
}
|
|
7427
|
-
}
|
|
7428
|
-
return returnValue;
|
|
7429
|
-
};
|
|
7430
|
-
|
|
7431
|
-
// ../../node_modules/.pnpm/ky@1.7.5/node_modules/ky/distribution/utils/normalize.js
|
|
7432
|
-
init_cjs_shims();
|
|
7433
|
-
|
|
7434
|
-
// ../../node_modules/.pnpm/ky@1.7.5/node_modules/ky/distribution/core/constants.js
|
|
7366
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/core/constants.js
|
|
7435
7367
|
init_cjs_shims();
|
|
7436
7368
|
var supportsRequestStreams = (() => {
|
|
7437
7369
|
let duplexAccessed = false;
|
|
@@ -7472,6 +7404,7 @@ var responseTypes = {
|
|
|
7472
7404
|
blob: "*/*"
|
|
7473
7405
|
};
|
|
7474
7406
|
var maxSafeTimeout = 2147483647;
|
|
7407
|
+
var usualFormBoundarySize = new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length;
|
|
7475
7408
|
var stop = Symbol("stop");
|
|
7476
7409
|
var kyOptionKeys = {
|
|
7477
7410
|
json: true,
|
|
@@ -7484,6 +7417,7 @@ var kyOptionKeys = {
|
|
|
7484
7417
|
hooks: true,
|
|
7485
7418
|
throwHttpErrors: true,
|
|
7486
7419
|
onDownloadProgress: true,
|
|
7420
|
+
onUploadProgress: true,
|
|
7487
7421
|
fetch: true
|
|
7488
7422
|
};
|
|
7489
7423
|
var requestOptionsRegistry = {
|
|
@@ -7505,7 +7439,191 @@ var requestOptionsRegistry = {
|
|
|
7505
7439
|
priority: true
|
|
7506
7440
|
};
|
|
7507
7441
|
|
|
7508
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7442
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/body.js
|
|
7443
|
+
var getBodySize = (body) => {
|
|
7444
|
+
if (!body) {
|
|
7445
|
+
return 0;
|
|
7446
|
+
}
|
|
7447
|
+
if (body instanceof FormData) {
|
|
7448
|
+
let size = 0;
|
|
7449
|
+
for (const [key, value] of body) {
|
|
7450
|
+
size += usualFormBoundarySize;
|
|
7451
|
+
size += new TextEncoder().encode(`Content-Disposition: form-data; name="${key}"`).length;
|
|
7452
|
+
size += typeof value === "string" ? new TextEncoder().encode(value).length : value.size;
|
|
7453
|
+
}
|
|
7454
|
+
return size;
|
|
7455
|
+
}
|
|
7456
|
+
if (body instanceof Blob) {
|
|
7457
|
+
return body.size;
|
|
7458
|
+
}
|
|
7459
|
+
if (body instanceof ArrayBuffer) {
|
|
7460
|
+
return body.byteLength;
|
|
7461
|
+
}
|
|
7462
|
+
if (typeof body === "string") {
|
|
7463
|
+
return new TextEncoder().encode(body).length;
|
|
7464
|
+
}
|
|
7465
|
+
if (body instanceof URLSearchParams) {
|
|
7466
|
+
return new TextEncoder().encode(body.toString()).length;
|
|
7467
|
+
}
|
|
7468
|
+
if ("byteLength" in body) {
|
|
7469
|
+
return body.byteLength;
|
|
7470
|
+
}
|
|
7471
|
+
if (typeof body === "object" && body !== null) {
|
|
7472
|
+
try {
|
|
7473
|
+
const jsonString = JSON.stringify(body);
|
|
7474
|
+
return new TextEncoder().encode(jsonString).length;
|
|
7475
|
+
} catch {
|
|
7476
|
+
return 0;
|
|
7477
|
+
}
|
|
7478
|
+
}
|
|
7479
|
+
return 0;
|
|
7480
|
+
};
|
|
7481
|
+
var streamResponse = (response, onDownloadProgress) => {
|
|
7482
|
+
const totalBytes = Number(response.headers.get("content-length")) || 0;
|
|
7483
|
+
let transferredBytes = 0;
|
|
7484
|
+
if (response.status === 204) {
|
|
7485
|
+
if (onDownloadProgress) {
|
|
7486
|
+
onDownloadProgress({ percent: 1, totalBytes, transferredBytes }, new Uint8Array());
|
|
7487
|
+
}
|
|
7488
|
+
return new Response(null, {
|
|
7489
|
+
status: response.status,
|
|
7490
|
+
statusText: response.statusText,
|
|
7491
|
+
headers: response.headers
|
|
7492
|
+
});
|
|
7493
|
+
}
|
|
7494
|
+
return new Response(new ReadableStream({
|
|
7495
|
+
async start(controller) {
|
|
7496
|
+
const reader = response.body.getReader();
|
|
7497
|
+
if (onDownloadProgress) {
|
|
7498
|
+
onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());
|
|
7499
|
+
}
|
|
7500
|
+
async function read() {
|
|
7501
|
+
const { done, value } = await reader.read();
|
|
7502
|
+
if (done) {
|
|
7503
|
+
controller.close();
|
|
7504
|
+
return;
|
|
7505
|
+
}
|
|
7506
|
+
if (onDownloadProgress) {
|
|
7507
|
+
transferredBytes += value.byteLength;
|
|
7508
|
+
const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;
|
|
7509
|
+
onDownloadProgress({ percent, transferredBytes, totalBytes }, value);
|
|
7510
|
+
}
|
|
7511
|
+
controller.enqueue(value);
|
|
7512
|
+
await read();
|
|
7513
|
+
}
|
|
7514
|
+
await read();
|
|
7515
|
+
}
|
|
7516
|
+
}), {
|
|
7517
|
+
status: response.status,
|
|
7518
|
+
statusText: response.statusText,
|
|
7519
|
+
headers: response.headers
|
|
7520
|
+
});
|
|
7521
|
+
};
|
|
7522
|
+
var streamRequest = (request, onUploadProgress) => {
|
|
7523
|
+
const totalBytes = getBodySize(request.body);
|
|
7524
|
+
let transferredBytes = 0;
|
|
7525
|
+
return new Request(request, {
|
|
7526
|
+
// @ts-expect-error - Types are outdated.
|
|
7527
|
+
duplex: "half",
|
|
7528
|
+
body: new ReadableStream({
|
|
7529
|
+
async start(controller) {
|
|
7530
|
+
const reader = request.body instanceof ReadableStream ? request.body.getReader() : new Response("").body.getReader();
|
|
7531
|
+
async function read() {
|
|
7532
|
+
const { done, value } = await reader.read();
|
|
7533
|
+
if (done) {
|
|
7534
|
+
if (onUploadProgress) {
|
|
7535
|
+
onUploadProgress({ percent: 1, transferredBytes, totalBytes: Math.max(totalBytes, transferredBytes) }, new Uint8Array());
|
|
7536
|
+
}
|
|
7537
|
+
controller.close();
|
|
7538
|
+
return;
|
|
7539
|
+
}
|
|
7540
|
+
transferredBytes += value.byteLength;
|
|
7541
|
+
let percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;
|
|
7542
|
+
if (totalBytes < transferredBytes || percent === 1) {
|
|
7543
|
+
percent = 0.99;
|
|
7544
|
+
}
|
|
7545
|
+
if (onUploadProgress) {
|
|
7546
|
+
onUploadProgress({ percent: Number(percent.toFixed(2)), transferredBytes, totalBytes }, value);
|
|
7547
|
+
}
|
|
7548
|
+
controller.enqueue(value);
|
|
7549
|
+
await read();
|
|
7550
|
+
}
|
|
7551
|
+
await read();
|
|
7552
|
+
}
|
|
7553
|
+
})
|
|
7554
|
+
});
|
|
7555
|
+
};
|
|
7556
|
+
|
|
7557
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/merge.js
|
|
7558
|
+
init_cjs_shims();
|
|
7559
|
+
|
|
7560
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/is.js
|
|
7561
|
+
init_cjs_shims();
|
|
7562
|
+
var isObject3 = (value) => value !== null && typeof value === "object";
|
|
7563
|
+
|
|
7564
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/merge.js
|
|
7565
|
+
var validateAndMerge = (...sources) => {
|
|
7566
|
+
for (const source of sources) {
|
|
7567
|
+
if ((!isObject3(source) || Array.isArray(source)) && source !== void 0) {
|
|
7568
|
+
throw new TypeError("The `options` argument must be an object");
|
|
7569
|
+
}
|
|
7570
|
+
}
|
|
7571
|
+
return deepMerge({}, ...sources);
|
|
7572
|
+
};
|
|
7573
|
+
var mergeHeaders = (source1 = {}, source2 = {}) => {
|
|
7574
|
+
const result = new globalThis.Headers(source1);
|
|
7575
|
+
const isHeadersInstance = source2 instanceof globalThis.Headers;
|
|
7576
|
+
const source = new globalThis.Headers(source2);
|
|
7577
|
+
for (const [key, value] of source.entries()) {
|
|
7578
|
+
if (isHeadersInstance && value === "undefined" || value === void 0) {
|
|
7579
|
+
result.delete(key);
|
|
7580
|
+
} else {
|
|
7581
|
+
result.set(key, value);
|
|
7582
|
+
}
|
|
7583
|
+
}
|
|
7584
|
+
return result;
|
|
7585
|
+
};
|
|
7586
|
+
function newHookValue(original, incoming, property) {
|
|
7587
|
+
return Object.hasOwn(incoming, property) && incoming[property] === void 0 ? [] : deepMerge(original[property] ?? [], incoming[property] ?? []);
|
|
7588
|
+
}
|
|
7589
|
+
var mergeHooks = (original = {}, incoming = {}) => ({
|
|
7590
|
+
beforeRequest: newHookValue(original, incoming, "beforeRequest"),
|
|
7591
|
+
beforeRetry: newHookValue(original, incoming, "beforeRetry"),
|
|
7592
|
+
afterResponse: newHookValue(original, incoming, "afterResponse"),
|
|
7593
|
+
beforeError: newHookValue(original, incoming, "beforeError")
|
|
7594
|
+
});
|
|
7595
|
+
var deepMerge = (...sources) => {
|
|
7596
|
+
let returnValue = {};
|
|
7597
|
+
let headers = {};
|
|
7598
|
+
let hooks = {};
|
|
7599
|
+
for (const source of sources) {
|
|
7600
|
+
if (Array.isArray(source)) {
|
|
7601
|
+
if (!Array.isArray(returnValue)) {
|
|
7602
|
+
returnValue = [];
|
|
7603
|
+
}
|
|
7604
|
+
returnValue = [...returnValue, ...source];
|
|
7605
|
+
} else if (isObject3(source)) {
|
|
7606
|
+
for (let [key, value] of Object.entries(source)) {
|
|
7607
|
+
if (isObject3(value) && key in returnValue) {
|
|
7608
|
+
value = deepMerge(returnValue[key], value);
|
|
7609
|
+
}
|
|
7610
|
+
returnValue = { ...returnValue, [key]: value };
|
|
7611
|
+
}
|
|
7612
|
+
if (isObject3(source.hooks)) {
|
|
7613
|
+
hooks = mergeHooks(hooks, source.hooks);
|
|
7614
|
+
returnValue.hooks = hooks;
|
|
7615
|
+
}
|
|
7616
|
+
if (isObject3(source.headers)) {
|
|
7617
|
+
headers = mergeHeaders(headers, source.headers);
|
|
7618
|
+
returnValue.headers = headers;
|
|
7619
|
+
}
|
|
7620
|
+
}
|
|
7621
|
+
}
|
|
7622
|
+
return returnValue;
|
|
7623
|
+
};
|
|
7624
|
+
|
|
7625
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/normalize.js
|
|
7626
|
+
init_cjs_shims();
|
|
7509
7627
|
var normalizeRequestMethod = (input) => requestMethods.includes(input) ? input.toUpperCase() : input;
|
|
7510
7628
|
var retryMethods = ["get", "put", "head", "delete", "options", "trace"];
|
|
7511
7629
|
var retryStatusCodes = [408, 413, 429, 500, 502, 503, 504];
|
|
@@ -7538,7 +7656,7 @@ var normalizeRetryOptions = (retry = {}) => {
|
|
|
7538
7656
|
};
|
|
7539
7657
|
};
|
|
7540
7658
|
|
|
7541
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7659
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/timeout.js
|
|
7542
7660
|
init_cjs_shims();
|
|
7543
7661
|
async function timeout(request, init, abortController, options) {
|
|
7544
7662
|
return new Promise((resolve, reject) => {
|
|
@@ -7554,7 +7672,7 @@ async function timeout(request, init, abortController, options) {
|
|
|
7554
7672
|
});
|
|
7555
7673
|
}
|
|
7556
7674
|
|
|
7557
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7675
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/delay.js
|
|
7558
7676
|
init_cjs_shims();
|
|
7559
7677
|
async function delay(ms, { signal }) {
|
|
7560
7678
|
return new Promise((resolve, reject) => {
|
|
@@ -7573,7 +7691,7 @@ async function delay(ms, { signal }) {
|
|
|
7573
7691
|
});
|
|
7574
7692
|
}
|
|
7575
7693
|
|
|
7576
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7694
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/utils/options.js
|
|
7577
7695
|
init_cjs_shims();
|
|
7578
7696
|
var findUnknownOptions = (request, options) => {
|
|
7579
7697
|
const unknownOptions = {};
|
|
@@ -7585,7 +7703,7 @@ var findUnknownOptions = (request, options) => {
|
|
|
7585
7703
|
return unknownOptions;
|
|
7586
7704
|
};
|
|
7587
7705
|
|
|
7588
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7706
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/core/Ky.js
|
|
7589
7707
|
var Ky = class _Ky {
|
|
7590
7708
|
static create(input, options) {
|
|
7591
7709
|
const ky2 = new _Ky(input, options);
|
|
@@ -7616,12 +7734,16 @@ var Ky = class _Ky {
|
|
|
7616
7734
|
if (!supportsResponseStreams) {
|
|
7617
7735
|
throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
|
|
7618
7736
|
}
|
|
7619
|
-
return
|
|
7737
|
+
return streamResponse(response.clone(), ky2._options.onDownloadProgress);
|
|
7620
7738
|
}
|
|
7621
7739
|
return response;
|
|
7622
7740
|
};
|
|
7623
7741
|
const isRetriableMethod = ky2._options.retry.methods.includes(ky2.request.method.toLowerCase());
|
|
7624
|
-
const result = isRetriableMethod ? ky2._retry(function_) : function_()
|
|
7742
|
+
const result = (isRetriableMethod ? ky2._retry(function_) : function_()).finally(async () => {
|
|
7743
|
+
if (!ky2.request.bodyUsed) {
|
|
7744
|
+
await ky2.request.body?.cancel();
|
|
7745
|
+
}
|
|
7746
|
+
});
|
|
7625
7747
|
for (const [type, mimeType] of Object.entries(responseTypes)) {
|
|
7626
7748
|
result[type] = async () => {
|
|
7627
7749
|
ky2.request.headers.set("accept", ky2.request.headers.get("accept") || mimeType);
|
|
@@ -7682,15 +7804,9 @@ var Ky = class _Ky {
|
|
|
7682
7804
|
this._input = this._options.prefixUrl + this._input;
|
|
7683
7805
|
}
|
|
7684
7806
|
if (supportsAbortController) {
|
|
7685
|
-
this.abortController = new globalThis.AbortController();
|
|
7686
7807
|
const originalSignal = this._options.signal ?? this._input.signal;
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
}
|
|
7690
|
-
originalSignal?.addEventListener("abort", () => {
|
|
7691
|
-
this.abortController.abort(originalSignal.reason);
|
|
7692
|
-
});
|
|
7693
|
-
this._options.signal = this.abortController.signal;
|
|
7808
|
+
this.abortController = new globalThis.AbortController();
|
|
7809
|
+
this._options.signal = originalSignal ? AbortSignal.any([originalSignal, this.abortController.signal]) : this.abortController.signal;
|
|
7694
7810
|
}
|
|
7695
7811
|
if (supportsRequestStreams) {
|
|
7696
7812
|
this._options.duplex = "half";
|
|
@@ -7709,6 +7825,18 @@ var Ky = class _Ky {
|
|
|
7709
7825
|
}
|
|
7710
7826
|
this.request = new globalThis.Request(new globalThis.Request(url, { ...this.request }), this._options);
|
|
7711
7827
|
}
|
|
7828
|
+
if (this._options.onUploadProgress) {
|
|
7829
|
+
if (typeof this._options.onUploadProgress !== "function") {
|
|
7830
|
+
throw new TypeError("The `onUploadProgress` option must be a function");
|
|
7831
|
+
}
|
|
7832
|
+
if (!supportsRequestStreams) {
|
|
7833
|
+
throw new Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");
|
|
7834
|
+
}
|
|
7835
|
+
const originalBody = this.request.body;
|
|
7836
|
+
if (originalBody) {
|
|
7837
|
+
this.request = streamRequest(this.request, this._options.onUploadProgress);
|
|
7838
|
+
}
|
|
7839
|
+
}
|
|
7712
7840
|
}
|
|
7713
7841
|
_calculateRetryDelay(error) {
|
|
7714
7842
|
this._retryCount++;
|
|
@@ -7785,51 +7913,9 @@ var Ky = class _Ky {
|
|
|
7785
7913
|
}
|
|
7786
7914
|
return timeout(mainRequest, nonRequestOptions, this.abortController, this._options);
|
|
7787
7915
|
}
|
|
7788
|
-
/* istanbul ignore next */
|
|
7789
|
-
_stream(response, onDownloadProgress) {
|
|
7790
|
-
const totalBytes = Number(response.headers.get("content-length")) || 0;
|
|
7791
|
-
let transferredBytes = 0;
|
|
7792
|
-
if (response.status === 204) {
|
|
7793
|
-
if (onDownloadProgress) {
|
|
7794
|
-
onDownloadProgress({ percent: 1, totalBytes, transferredBytes }, new Uint8Array());
|
|
7795
|
-
}
|
|
7796
|
-
return new globalThis.Response(null, {
|
|
7797
|
-
status: response.status,
|
|
7798
|
-
statusText: response.statusText,
|
|
7799
|
-
headers: response.headers
|
|
7800
|
-
});
|
|
7801
|
-
}
|
|
7802
|
-
return new globalThis.Response(new globalThis.ReadableStream({
|
|
7803
|
-
async start(controller) {
|
|
7804
|
-
const reader = response.body.getReader();
|
|
7805
|
-
if (onDownloadProgress) {
|
|
7806
|
-
onDownloadProgress({ percent: 0, transferredBytes: 0, totalBytes }, new Uint8Array());
|
|
7807
|
-
}
|
|
7808
|
-
async function read() {
|
|
7809
|
-
const { done, value } = await reader.read();
|
|
7810
|
-
if (done) {
|
|
7811
|
-
controller.close();
|
|
7812
|
-
return;
|
|
7813
|
-
}
|
|
7814
|
-
if (onDownloadProgress) {
|
|
7815
|
-
transferredBytes += value.byteLength;
|
|
7816
|
-
const percent = totalBytes === 0 ? 0 : transferredBytes / totalBytes;
|
|
7817
|
-
onDownloadProgress({ percent, transferredBytes, totalBytes }, value);
|
|
7818
|
-
}
|
|
7819
|
-
controller.enqueue(value);
|
|
7820
|
-
await read();
|
|
7821
|
-
}
|
|
7822
|
-
await read();
|
|
7823
|
-
}
|
|
7824
|
-
}), {
|
|
7825
|
-
status: response.status,
|
|
7826
|
-
statusText: response.statusText,
|
|
7827
|
-
headers: response.headers
|
|
7828
|
-
});
|
|
7829
|
-
}
|
|
7830
7916
|
};
|
|
7831
7917
|
|
|
7832
|
-
// ../../node_modules/.pnpm/ky@1.
|
|
7918
|
+
// ../../node_modules/.pnpm/ky@1.8.1/node_modules/ky/distribution/index.js
|
|
7833
7919
|
var createInstance = (defaults) => {
|
|
7834
7920
|
const ky2 = (input, options) => Ky.create(input, validateAndMerge(defaults, options));
|
|
7835
7921
|
for (const method of requestMethods) {
|
|
@@ -9174,7 +9260,7 @@ var prettier = async (content, options) => {
|
|
|
9174
9260
|
// src/command/theme/index.ts
|
|
9175
9261
|
var ORG_NAME = "yamada-ui";
|
|
9176
9262
|
var REPO_NAME = "yamada-ui";
|
|
9177
|
-
var DEFAULT_BRANCH_NAME = "
|
|
9263
|
+
var DEFAULT_BRANCH_NAME = "v1";
|
|
9178
9264
|
var isOnline = async () => {
|
|
9179
9265
|
return new Promise((resolve) => {
|
|
9180
9266
|
import_dns.default.lookup("github.com", (err) => {
|