ccman 3.0.28 → 3.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +183 -152
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39,13 +39,14 @@ var init_package = __esm({
|
|
|
39
39
|
"../core/package.json"() {
|
|
40
40
|
package_default = {
|
|
41
41
|
name: "@ccman/core",
|
|
42
|
-
version: "3.0.
|
|
42
|
+
version: "3.0.29",
|
|
43
43
|
type: "module",
|
|
44
44
|
description: "Core business logic for ccman",
|
|
45
45
|
main: "./dist/index.js",
|
|
46
46
|
types: "./dist/index.d.ts",
|
|
47
47
|
files: [
|
|
48
|
-
"dist"
|
|
48
|
+
"dist",
|
|
49
|
+
"templates"
|
|
49
50
|
],
|
|
50
51
|
scripts: {
|
|
51
52
|
build: "tsc",
|
|
@@ -1779,20 +1780,20 @@ var require_parse_async = __commonJS({
|
|
|
1779
1780
|
const index = 0;
|
|
1780
1781
|
const blocksize = opts.blocksize || 40960;
|
|
1781
1782
|
const parser = new TOMLParser();
|
|
1782
|
-
return new Promise((
|
|
1783
|
-
setImmediate(parseAsyncNext, index, blocksize,
|
|
1783
|
+
return new Promise((resolve3, reject) => {
|
|
1784
|
+
setImmediate(parseAsyncNext, index, blocksize, resolve3, reject);
|
|
1784
1785
|
});
|
|
1785
|
-
function parseAsyncNext(index2, blocksize2,
|
|
1786
|
+
function parseAsyncNext(index2, blocksize2, resolve3, reject) {
|
|
1786
1787
|
if (index2 >= str.length) {
|
|
1787
1788
|
try {
|
|
1788
|
-
return
|
|
1789
|
+
return resolve3(parser.finish());
|
|
1789
1790
|
} catch (err) {
|
|
1790
1791
|
return reject(prettyError(err, str));
|
|
1791
1792
|
}
|
|
1792
1793
|
}
|
|
1793
1794
|
try {
|
|
1794
1795
|
parser.parse(str.slice(index2, index2 + blocksize2));
|
|
1795
|
-
setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2,
|
|
1796
|
+
setImmediate(parseAsyncNext, index2 + blocksize2, blocksize2, resolve3, reject);
|
|
1796
1797
|
} catch (err) {
|
|
1797
1798
|
reject(prettyError(err, str));
|
|
1798
1799
|
}
|
|
@@ -1818,7 +1819,7 @@ var require_parse_stream = __commonJS({
|
|
|
1818
1819
|
function parseReadable(stm) {
|
|
1819
1820
|
const parser = new TOMLParser();
|
|
1820
1821
|
stm.setEncoding("utf8");
|
|
1821
|
-
return new Promise((
|
|
1822
|
+
return new Promise((resolve3, reject) => {
|
|
1822
1823
|
let readable;
|
|
1823
1824
|
let ended = false;
|
|
1824
1825
|
let errored = false;
|
|
@@ -1826,7 +1827,7 @@ var require_parse_stream = __commonJS({
|
|
|
1826
1827
|
ended = true;
|
|
1827
1828
|
if (readable) return;
|
|
1828
1829
|
try {
|
|
1829
|
-
|
|
1830
|
+
resolve3(parser.finish());
|
|
1830
1831
|
} catch (err) {
|
|
1831
1832
|
reject(err);
|
|
1832
1833
|
}
|
|
@@ -2191,6 +2192,17 @@ var init_template = __esm({
|
|
|
2191
2192
|
});
|
|
2192
2193
|
|
|
2193
2194
|
// ../core/dist/writers/codex.js
|
|
2195
|
+
function loadCodexTemplateConfig() {
|
|
2196
|
+
try {
|
|
2197
|
+
const templatePath = path3.resolve(__dirname, "../../templates/codex/config.toml");
|
|
2198
|
+
if (fs2.existsSync(templatePath)) {
|
|
2199
|
+
const content = fs2.readFileSync(templatePath, "utf-8");
|
|
2200
|
+
return (0, import_toml.parse)(content);
|
|
2201
|
+
}
|
|
2202
|
+
} catch {
|
|
2203
|
+
}
|
|
2204
|
+
return CODEX_DEFAULT_CONFIG;
|
|
2205
|
+
}
|
|
2194
2206
|
function writeCodexConfig(provider) {
|
|
2195
2207
|
ensureDir(getCodexDir());
|
|
2196
2208
|
const configPath = getCodexConfigPath();
|
|
@@ -2199,7 +2211,8 @@ function writeCodexConfig(provider) {
|
|
|
2199
2211
|
const content = fs2.readFileSync(configPath, "utf-8");
|
|
2200
2212
|
userConfig = (0, import_toml.parse)(content);
|
|
2201
2213
|
}
|
|
2202
|
-
const
|
|
2214
|
+
const templateConfig = loadCodexTemplateConfig();
|
|
2215
|
+
const mergedConfig = deepMerge(templateConfig, userConfig);
|
|
2203
2216
|
mergedConfig.model_provider = provider.name;
|
|
2204
2217
|
mergedConfig.model = provider.model || mergedConfig.model || "gpt-5-codex";
|
|
2205
2218
|
mergedConfig.model_providers = mergedConfig.model_providers || {};
|
|
@@ -2221,15 +2234,20 @@ function writeCodexConfig(provider) {
|
|
|
2221
2234
|
auth.OPENAI_API_KEY = provider.apiKey;
|
|
2222
2235
|
fs2.writeFileSync(authPath, JSON.stringify(auth, null, 2), { mode: 384 });
|
|
2223
2236
|
}
|
|
2224
|
-
var fs2, import_toml, CODEX_DEFAULT_CONFIG;
|
|
2237
|
+
var fs2, path3, import_url, import_toml, import_meta, __filename, __dirname, CODEX_DEFAULT_CONFIG;
|
|
2225
2238
|
var init_codex = __esm({
|
|
2226
2239
|
"../core/dist/writers/codex.js"() {
|
|
2227
2240
|
"use strict";
|
|
2228
2241
|
fs2 = __toESM(require("fs"), 1);
|
|
2242
|
+
path3 = __toESM(require("path"), 1);
|
|
2243
|
+
import_url = require("url");
|
|
2229
2244
|
import_toml = __toESM(require_toml(), 1);
|
|
2230
2245
|
init_paths();
|
|
2231
2246
|
init_file();
|
|
2232
2247
|
init_template();
|
|
2248
|
+
import_meta = {};
|
|
2249
|
+
__filename = (0, import_url.fileURLToPath)(import_meta.url);
|
|
2250
|
+
__dirname = path3.dirname(__filename);
|
|
2233
2251
|
CODEX_DEFAULT_CONFIG = {
|
|
2234
2252
|
model_reasoning_effort: "high",
|
|
2235
2253
|
disable_response_storage: true,
|
|
@@ -2244,10 +2262,6 @@ var init_codex = __esm({
|
|
|
2244
2262
|
streamable_shell: false,
|
|
2245
2263
|
rmcp_client: true
|
|
2246
2264
|
},
|
|
2247
|
-
tools: {
|
|
2248
|
-
web_search: true,
|
|
2249
|
-
view_image: true
|
|
2250
|
-
},
|
|
2251
2265
|
sandbox_workspace_write: {
|
|
2252
2266
|
network_access: true
|
|
2253
2267
|
}
|
|
@@ -2256,6 +2270,17 @@ var init_codex = __esm({
|
|
|
2256
2270
|
});
|
|
2257
2271
|
|
|
2258
2272
|
// ../core/dist/writers/claude.js
|
|
2273
|
+
function loadClaudeTemplateConfig() {
|
|
2274
|
+
try {
|
|
2275
|
+
const templatePath = path4.resolve(__dirname2, "../../templates/claude/settings.json");
|
|
2276
|
+
if (fs3.existsSync(templatePath)) {
|
|
2277
|
+
const content = fs3.readFileSync(templatePath, "utf-8");
|
|
2278
|
+
return JSON.parse(content);
|
|
2279
|
+
}
|
|
2280
|
+
} catch {
|
|
2281
|
+
}
|
|
2282
|
+
return CLAUDE_CONFIG_TEMPLATE;
|
|
2283
|
+
}
|
|
2259
2284
|
function writeClaudeConfig(provider) {
|
|
2260
2285
|
ensureDir(getClaudeDir());
|
|
2261
2286
|
const configPath = getClaudeConfigPath();
|
|
@@ -2264,7 +2289,8 @@ function writeClaudeConfig(provider) {
|
|
|
2264
2289
|
const content = fs3.readFileSync(configPath, "utf-8");
|
|
2265
2290
|
userConfig = JSON.parse(content);
|
|
2266
2291
|
}
|
|
2267
|
-
const
|
|
2292
|
+
const defaultTemplate = loadClaudeTemplateConfig();
|
|
2293
|
+
const defaultConfig = replaceVariables(defaultTemplate, {
|
|
2268
2294
|
apiKey: provider.apiKey,
|
|
2269
2295
|
baseUrl: provider.baseUrl
|
|
2270
2296
|
});
|
|
@@ -2274,14 +2300,19 @@ function writeClaudeConfig(provider) {
|
|
|
2274
2300
|
mergedConfig.env.ANTHROPIC_BASE_URL = provider.baseUrl;
|
|
2275
2301
|
fs3.writeFileSync(configPath, JSON.stringify(mergedConfig, null, 2), { mode: 384 });
|
|
2276
2302
|
}
|
|
2277
|
-
var fs3, CLAUDE_CONFIG_TEMPLATE;
|
|
2303
|
+
var fs3, path4, import_url2, import_meta2, __filename2, __dirname2, CLAUDE_CONFIG_TEMPLATE;
|
|
2278
2304
|
var init_claude = __esm({
|
|
2279
2305
|
"../core/dist/writers/claude.js"() {
|
|
2280
2306
|
"use strict";
|
|
2281
2307
|
fs3 = __toESM(require("fs"), 1);
|
|
2308
|
+
path4 = __toESM(require("path"), 1);
|
|
2309
|
+
import_url2 = require("url");
|
|
2282
2310
|
init_paths();
|
|
2283
2311
|
init_file();
|
|
2284
2312
|
init_template();
|
|
2313
|
+
import_meta2 = {};
|
|
2314
|
+
__filename2 = (0, import_url2.fileURLToPath)(import_meta2.url);
|
|
2315
|
+
__dirname2 = path4.dirname(__filename2);
|
|
2285
2316
|
CLAUDE_CONFIG_TEMPLATE = {
|
|
2286
2317
|
env: {
|
|
2287
2318
|
ANTHROPIC_AUTH_TOKEN: "{{apiKey}}",
|
|
@@ -2299,7 +2330,7 @@ var init_claude = __esm({
|
|
|
2299
2330
|
|
|
2300
2331
|
// ../core/dist/writers/mcp.js
|
|
2301
2332
|
function getMCPConfigPath() {
|
|
2302
|
-
return
|
|
2333
|
+
return path5.join(getCcmanDir(), "mcp.json");
|
|
2303
2334
|
}
|
|
2304
2335
|
function migrateMCPConfig(config) {
|
|
2305
2336
|
if (Array.isArray(config.managedServerNames)) {
|
|
@@ -2449,12 +2480,12 @@ function writeMCPConfigForApp(app, _provider) {
|
|
|
2449
2480
|
function writeMCPConfig(_provider) {
|
|
2450
2481
|
writeMCPConfigForApp("claude", _provider);
|
|
2451
2482
|
}
|
|
2452
|
-
var fs4,
|
|
2483
|
+
var fs4, path5;
|
|
2453
2484
|
var init_mcp = __esm({
|
|
2454
2485
|
"../core/dist/writers/mcp.js"() {
|
|
2455
2486
|
"use strict";
|
|
2456
2487
|
fs4 = __toESM(require("fs"), 1);
|
|
2457
|
-
|
|
2488
|
+
path5 = __toESM(require("path"), 1);
|
|
2458
2489
|
init_paths();
|
|
2459
2490
|
init_file();
|
|
2460
2491
|
}
|
|
@@ -2865,11 +2896,11 @@ function createClaudeManager() {
|
|
|
2865
2896
|
function createMCPManager() {
|
|
2866
2897
|
return createToolManager("mcp");
|
|
2867
2898
|
}
|
|
2868
|
-
var
|
|
2899
|
+
var path6, TOOL_CONFIGS;
|
|
2869
2900
|
var init_tool_manager = __esm({
|
|
2870
2901
|
"../core/dist/tool-manager.js"() {
|
|
2871
2902
|
"use strict";
|
|
2872
|
-
|
|
2903
|
+
path6 = __toESM(require("path"), 1);
|
|
2873
2904
|
init_paths();
|
|
2874
2905
|
init_file();
|
|
2875
2906
|
init_codex();
|
|
@@ -2881,17 +2912,17 @@ var init_tool_manager = __esm({
|
|
|
2881
2912
|
init_tool_manager_types();
|
|
2882
2913
|
TOOL_CONFIGS = {
|
|
2883
2914
|
codex: {
|
|
2884
|
-
configPath:
|
|
2915
|
+
configPath: path6.join(getCcmanDir(), "codex.json"),
|
|
2885
2916
|
builtinPresets: CODEX_PRESETS,
|
|
2886
2917
|
writer: writeCodexConfig
|
|
2887
2918
|
},
|
|
2888
2919
|
claude: {
|
|
2889
|
-
configPath:
|
|
2920
|
+
configPath: path6.join(getCcmanDir(), "claude.json"),
|
|
2890
2921
|
builtinPresets: CC_PRESETS,
|
|
2891
2922
|
writer: writeClaudeConfig
|
|
2892
2923
|
},
|
|
2893
2924
|
mcp: {
|
|
2894
|
-
configPath:
|
|
2925
|
+
configPath: path6.join(getCcmanDir(), "mcp.json"),
|
|
2895
2926
|
builtinPresets: MCP_PRESETS,
|
|
2896
2927
|
writer: writeMCPConfig,
|
|
2897
2928
|
autoSync: true,
|
|
@@ -3177,24 +3208,24 @@ var require_url_parse = __commonJS({
|
|
|
3177
3208
|
rest
|
|
3178
3209
|
};
|
|
3179
3210
|
}
|
|
3180
|
-
function
|
|
3211
|
+
function resolve3(relative, base) {
|
|
3181
3212
|
if (relative === "") return base;
|
|
3182
|
-
var
|
|
3213
|
+
var path15 = (base || "/").split("/").slice(0, -1).concat(relative.split("/")), i2 = path15.length, last = path15[i2 - 1], unshift = false, up = 0;
|
|
3183
3214
|
while (i2--) {
|
|
3184
|
-
if (
|
|
3185
|
-
|
|
3186
|
-
} else if (
|
|
3187
|
-
|
|
3215
|
+
if (path15[i2] === ".") {
|
|
3216
|
+
path15.splice(i2, 1);
|
|
3217
|
+
} else if (path15[i2] === "..") {
|
|
3218
|
+
path15.splice(i2, 1);
|
|
3188
3219
|
up++;
|
|
3189
3220
|
} else if (up) {
|
|
3190
3221
|
if (i2 === 0) unshift = true;
|
|
3191
|
-
|
|
3222
|
+
path15.splice(i2, 1);
|
|
3192
3223
|
up--;
|
|
3193
3224
|
}
|
|
3194
3225
|
}
|
|
3195
|
-
if (unshift)
|
|
3196
|
-
if (last === "." || last === "..")
|
|
3197
|
-
return
|
|
3226
|
+
if (unshift) path15.unshift("");
|
|
3227
|
+
if (last === "." || last === "..") path15.push("");
|
|
3228
|
+
return path15.join("/");
|
|
3198
3229
|
}
|
|
3199
3230
|
function Url(address, location, parser) {
|
|
3200
3231
|
address = trimLeft(address);
|
|
@@ -3247,7 +3278,7 @@ var require_url_parse = __commonJS({
|
|
|
3247
3278
|
}
|
|
3248
3279
|
if (parser) url.query = parser(url.query);
|
|
3249
3280
|
if (relative && location.slashes && url.pathname.charAt(0) !== "/" && (url.pathname !== "" || location.pathname !== "")) {
|
|
3250
|
-
url.pathname =
|
|
3281
|
+
url.pathname = resolve3(url.pathname, location.pathname);
|
|
3251
3282
|
}
|
|
3252
3283
|
if (url.pathname.charAt(0) !== "/" && isSpecial(url.protocol)) {
|
|
3253
3284
|
url.pathname = "/" + url.pathname;
|
|
@@ -3620,14 +3651,14 @@ var require_path_posix = __commonJS({
|
|
|
3620
3651
|
posix.resolve = function() {
|
|
3621
3652
|
var resolvedPath = "", resolvedAbsolute = false;
|
|
3622
3653
|
for (var i2 = arguments.length - 1; i2 >= -1 && !resolvedAbsolute; i2--) {
|
|
3623
|
-
var
|
|
3624
|
-
if (!isString(
|
|
3654
|
+
var path15 = i2 >= 0 ? arguments[i2] : process.cwd();
|
|
3655
|
+
if (!isString(path15)) {
|
|
3625
3656
|
throw new TypeError("Arguments to path.resolve must be strings");
|
|
3626
|
-
} else if (!
|
|
3657
|
+
} else if (!path15) {
|
|
3627
3658
|
continue;
|
|
3628
3659
|
}
|
|
3629
|
-
resolvedPath =
|
|
3630
|
-
resolvedAbsolute =
|
|
3660
|
+
resolvedPath = path15 + "/" + resolvedPath;
|
|
3661
|
+
resolvedAbsolute = path15.charAt(0) === "/";
|
|
3631
3662
|
}
|
|
3632
3663
|
resolvedPath = normalizeArray(
|
|
3633
3664
|
resolvedPath.split("/"),
|
|
@@ -3635,36 +3666,36 @@ var require_path_posix = __commonJS({
|
|
|
3635
3666
|
).join("/");
|
|
3636
3667
|
return (resolvedAbsolute ? "/" : "") + resolvedPath || ".";
|
|
3637
3668
|
};
|
|
3638
|
-
posix.normalize = function(
|
|
3639
|
-
var isAbsolute = posix.isAbsolute(
|
|
3640
|
-
|
|
3641
|
-
if (!
|
|
3642
|
-
|
|
3669
|
+
posix.normalize = function(path15) {
|
|
3670
|
+
var isAbsolute = posix.isAbsolute(path15), trailingSlash = path15.substr(-1) === "/";
|
|
3671
|
+
path15 = normalizeArray(path15.split("/"), !isAbsolute).join("/");
|
|
3672
|
+
if (!path15 && !isAbsolute) {
|
|
3673
|
+
path15 = ".";
|
|
3643
3674
|
}
|
|
3644
|
-
if (
|
|
3645
|
-
|
|
3675
|
+
if (path15 && trailingSlash) {
|
|
3676
|
+
path15 += "/";
|
|
3646
3677
|
}
|
|
3647
|
-
return (isAbsolute ? "/" : "") +
|
|
3678
|
+
return (isAbsolute ? "/" : "") + path15;
|
|
3648
3679
|
};
|
|
3649
|
-
posix.isAbsolute = function(
|
|
3650
|
-
return
|
|
3680
|
+
posix.isAbsolute = function(path15) {
|
|
3681
|
+
return path15.charAt(0) === "/";
|
|
3651
3682
|
};
|
|
3652
3683
|
posix.join = function() {
|
|
3653
|
-
var
|
|
3684
|
+
var path15 = "";
|
|
3654
3685
|
for (var i2 = 0; i2 < arguments.length; i2++) {
|
|
3655
3686
|
var segment = arguments[i2];
|
|
3656
3687
|
if (!isString(segment)) {
|
|
3657
3688
|
throw new TypeError("Arguments to path.join must be strings");
|
|
3658
3689
|
}
|
|
3659
3690
|
if (segment) {
|
|
3660
|
-
if (!
|
|
3661
|
-
|
|
3691
|
+
if (!path15) {
|
|
3692
|
+
path15 += segment;
|
|
3662
3693
|
} else {
|
|
3663
|
-
|
|
3694
|
+
path15 += "/" + segment;
|
|
3664
3695
|
}
|
|
3665
3696
|
}
|
|
3666
3697
|
}
|
|
3667
|
-
return posix.normalize(
|
|
3698
|
+
return posix.normalize(path15);
|
|
3668
3699
|
};
|
|
3669
3700
|
posix.relative = function(from, to) {
|
|
3670
3701
|
from = posix.resolve(from).substr(1);
|
|
@@ -3698,11 +3729,11 @@ var require_path_posix = __commonJS({
|
|
|
3698
3729
|
outputParts = outputParts.concat(toParts.slice(samePartsLength));
|
|
3699
3730
|
return outputParts.join("/");
|
|
3700
3731
|
};
|
|
3701
|
-
posix._makeLong = function(
|
|
3702
|
-
return
|
|
3732
|
+
posix._makeLong = function(path15) {
|
|
3733
|
+
return path15;
|
|
3703
3734
|
};
|
|
3704
|
-
posix.dirname = function(
|
|
3705
|
-
var result = posixSplitPath(
|
|
3735
|
+
posix.dirname = function(path15) {
|
|
3736
|
+
var result = posixSplitPath(path15), root = result[0], dir = result[1];
|
|
3706
3737
|
if (!root && !dir) {
|
|
3707
3738
|
return ".";
|
|
3708
3739
|
}
|
|
@@ -3711,15 +3742,15 @@ var require_path_posix = __commonJS({
|
|
|
3711
3742
|
}
|
|
3712
3743
|
return root + dir;
|
|
3713
3744
|
};
|
|
3714
|
-
posix.basename = function(
|
|
3715
|
-
var f3 = posixSplitPath(
|
|
3745
|
+
posix.basename = function(path15, ext2) {
|
|
3746
|
+
var f3 = posixSplitPath(path15)[2];
|
|
3716
3747
|
if (ext2 && f3.substr(-1 * ext2.length) === ext2) {
|
|
3717
3748
|
f3 = f3.substr(0, f3.length - ext2.length);
|
|
3718
3749
|
}
|
|
3719
3750
|
return f3;
|
|
3720
3751
|
};
|
|
3721
|
-
posix.extname = function(
|
|
3722
|
-
return posixSplitPath(
|
|
3752
|
+
posix.extname = function(path15) {
|
|
3753
|
+
return posixSplitPath(path15)[3];
|
|
3723
3754
|
};
|
|
3724
3755
|
posix.format = function(pathObject) {
|
|
3725
3756
|
if (!util.isObject(pathObject)) {
|
|
@@ -4562,7 +4593,7 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
4562
4593
|
return new originalPromise(executor);
|
|
4563
4594
|
}
|
|
4564
4595
|
function promiseResolvedWith(value) {
|
|
4565
|
-
return newPromise((
|
|
4596
|
+
return newPromise((resolve3) => resolve3(value));
|
|
4566
4597
|
}
|
|
4567
4598
|
function promiseRejectedWith(reason) {
|
|
4568
4599
|
return originalPromiseReject(reason);
|
|
@@ -4732,8 +4763,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
4732
4763
|
return new TypeError("Cannot " + name + " a stream using a released reader");
|
|
4733
4764
|
}
|
|
4734
4765
|
function defaultReaderClosedPromiseInitialize(reader) {
|
|
4735
|
-
reader._closedPromise = newPromise((
|
|
4736
|
-
reader._closedPromise_resolve =
|
|
4766
|
+
reader._closedPromise = newPromise((resolve3, reject) => {
|
|
4767
|
+
reader._closedPromise_resolve = resolve3;
|
|
4737
4768
|
reader._closedPromise_reject = reject;
|
|
4738
4769
|
});
|
|
4739
4770
|
}
|
|
@@ -4907,8 +4938,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
4907
4938
|
}
|
|
4908
4939
|
let resolvePromise;
|
|
4909
4940
|
let rejectPromise;
|
|
4910
|
-
const promise = newPromise((
|
|
4911
|
-
resolvePromise =
|
|
4941
|
+
const promise = newPromise((resolve3, reject) => {
|
|
4942
|
+
resolvePromise = resolve3;
|
|
4912
4943
|
rejectPromise = reject;
|
|
4913
4944
|
});
|
|
4914
4945
|
const readRequest = {
|
|
@@ -5013,8 +5044,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
5013
5044
|
const reader = this._reader;
|
|
5014
5045
|
let resolvePromise;
|
|
5015
5046
|
let rejectPromise;
|
|
5016
|
-
const promise = newPromise((
|
|
5017
|
-
resolvePromise =
|
|
5047
|
+
const promise = newPromise((resolve3, reject) => {
|
|
5048
|
+
resolvePromise = resolve3;
|
|
5018
5049
|
rejectPromise = reject;
|
|
5019
5050
|
});
|
|
5020
5051
|
const readRequest = {
|
|
@@ -6033,8 +6064,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
6033
6064
|
}
|
|
6034
6065
|
let resolvePromise;
|
|
6035
6066
|
let rejectPromise;
|
|
6036
|
-
const promise = newPromise((
|
|
6037
|
-
resolvePromise =
|
|
6067
|
+
const promise = newPromise((resolve3, reject) => {
|
|
6068
|
+
resolvePromise = resolve3;
|
|
6038
6069
|
rejectPromise = reject;
|
|
6039
6070
|
});
|
|
6040
6071
|
const readIntoRequest = {
|
|
@@ -6346,10 +6377,10 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
6346
6377
|
wasAlreadyErroring = true;
|
|
6347
6378
|
reason = void 0;
|
|
6348
6379
|
}
|
|
6349
|
-
const promise = newPromise((
|
|
6380
|
+
const promise = newPromise((resolve3, reject) => {
|
|
6350
6381
|
stream._pendingAbortRequest = {
|
|
6351
6382
|
_promise: void 0,
|
|
6352
|
-
_resolve:
|
|
6383
|
+
_resolve: resolve3,
|
|
6353
6384
|
_reject: reject,
|
|
6354
6385
|
_reason: reason,
|
|
6355
6386
|
_wasAlreadyErroring: wasAlreadyErroring
|
|
@@ -6366,9 +6397,9 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
6366
6397
|
if (state === "closed" || state === "errored") {
|
|
6367
6398
|
return promiseRejectedWith(new TypeError(`The stream (in ${state} state) is not in the writable state and cannot be closed`));
|
|
6368
6399
|
}
|
|
6369
|
-
const promise = newPromise((
|
|
6400
|
+
const promise = newPromise((resolve3, reject) => {
|
|
6370
6401
|
const closeRequest = {
|
|
6371
|
-
_resolve:
|
|
6402
|
+
_resolve: resolve3,
|
|
6372
6403
|
_reject: reject
|
|
6373
6404
|
};
|
|
6374
6405
|
stream._closeRequest = closeRequest;
|
|
@@ -6381,9 +6412,9 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
6381
6412
|
return promise;
|
|
6382
6413
|
}
|
|
6383
6414
|
function WritableStreamAddWriteRequest(stream) {
|
|
6384
|
-
const promise = newPromise((
|
|
6415
|
+
const promise = newPromise((resolve3, reject) => {
|
|
6385
6416
|
const writeRequest = {
|
|
6386
|
-
_resolve:
|
|
6417
|
+
_resolve: resolve3,
|
|
6387
6418
|
_reject: reject
|
|
6388
6419
|
};
|
|
6389
6420
|
stream._writeRequests.push(writeRequest);
|
|
@@ -6999,8 +7030,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
6999
7030
|
return new TypeError("Cannot " + name + " a stream using a released writer");
|
|
7000
7031
|
}
|
|
7001
7032
|
function defaultWriterClosedPromiseInitialize(writer) {
|
|
7002
|
-
writer._closedPromise = newPromise((
|
|
7003
|
-
writer._closedPromise_resolve =
|
|
7033
|
+
writer._closedPromise = newPromise((resolve3, reject) => {
|
|
7034
|
+
writer._closedPromise_resolve = resolve3;
|
|
7004
7035
|
writer._closedPromise_reject = reject;
|
|
7005
7036
|
writer._closedPromiseState = "pending";
|
|
7006
7037
|
});
|
|
@@ -7036,8 +7067,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7036
7067
|
writer._closedPromiseState = "resolved";
|
|
7037
7068
|
}
|
|
7038
7069
|
function defaultWriterReadyPromiseInitialize(writer) {
|
|
7039
|
-
writer._readyPromise = newPromise((
|
|
7040
|
-
writer._readyPromise_resolve =
|
|
7070
|
+
writer._readyPromise = newPromise((resolve3, reject) => {
|
|
7071
|
+
writer._readyPromise_resolve = resolve3;
|
|
7041
7072
|
writer._readyPromise_reject = reject;
|
|
7042
7073
|
});
|
|
7043
7074
|
writer._readyPromiseState = "pending";
|
|
@@ -7124,7 +7155,7 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7124
7155
|
source._disturbed = true;
|
|
7125
7156
|
let shuttingDown = false;
|
|
7126
7157
|
let currentWrite = promiseResolvedWith(void 0);
|
|
7127
|
-
return newPromise((
|
|
7158
|
+
return newPromise((resolve3, reject) => {
|
|
7128
7159
|
let abortAlgorithm;
|
|
7129
7160
|
if (signal !== void 0) {
|
|
7130
7161
|
abortAlgorithm = () => {
|
|
@@ -7269,7 +7300,7 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7269
7300
|
if (isError2) {
|
|
7270
7301
|
reject(error);
|
|
7271
7302
|
} else {
|
|
7272
|
-
|
|
7303
|
+
resolve3(void 0);
|
|
7273
7304
|
}
|
|
7274
7305
|
return null;
|
|
7275
7306
|
}
|
|
@@ -7550,8 +7581,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7550
7581
|
let branch1;
|
|
7551
7582
|
let branch2;
|
|
7552
7583
|
let resolveCancelPromise;
|
|
7553
|
-
const cancelPromise = newPromise((
|
|
7554
|
-
resolveCancelPromise =
|
|
7584
|
+
const cancelPromise = newPromise((resolve3) => {
|
|
7585
|
+
resolveCancelPromise = resolve3;
|
|
7555
7586
|
});
|
|
7556
7587
|
function pullAlgorithm() {
|
|
7557
7588
|
if (reading) {
|
|
@@ -7642,8 +7673,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
7642
7673
|
let branch1;
|
|
7643
7674
|
let branch2;
|
|
7644
7675
|
let resolveCancelPromise;
|
|
7645
|
-
const cancelPromise = newPromise((
|
|
7646
|
-
resolveCancelPromise =
|
|
7676
|
+
const cancelPromise = newPromise((resolve3) => {
|
|
7677
|
+
resolveCancelPromise = resolve3;
|
|
7647
7678
|
});
|
|
7648
7679
|
function forwardReaderError(thisReader) {
|
|
7649
7680
|
uponRejection(thisReader._closedPromise, (r2) => {
|
|
@@ -8423,8 +8454,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
8423
8454
|
const writableHighWaterMark = ExtractHighWaterMark(writableStrategy, 1);
|
|
8424
8455
|
const writableSizeAlgorithm = ExtractSizeAlgorithm(writableStrategy);
|
|
8425
8456
|
let startPromise_resolve;
|
|
8426
|
-
const startPromise = newPromise((
|
|
8427
|
-
startPromise_resolve =
|
|
8457
|
+
const startPromise = newPromise((resolve3) => {
|
|
8458
|
+
startPromise_resolve = resolve3;
|
|
8428
8459
|
});
|
|
8429
8460
|
InitializeTransformStream(this, startPromise, writableHighWaterMark, writableSizeAlgorithm, readableHighWaterMark, readableSizeAlgorithm);
|
|
8430
8461
|
SetUpTransformStreamDefaultControllerFromTransformer(this, transformer);
|
|
@@ -8517,8 +8548,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
8517
8548
|
if (stream._backpressureChangePromise !== void 0) {
|
|
8518
8549
|
stream._backpressureChangePromise_resolve();
|
|
8519
8550
|
}
|
|
8520
|
-
stream._backpressureChangePromise = newPromise((
|
|
8521
|
-
stream._backpressureChangePromise_resolve =
|
|
8551
|
+
stream._backpressureChangePromise = newPromise((resolve3) => {
|
|
8552
|
+
stream._backpressureChangePromise_resolve = resolve3;
|
|
8522
8553
|
});
|
|
8523
8554
|
stream._backpressure = backpressure;
|
|
8524
8555
|
}
|
|
@@ -8686,8 +8717,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
8686
8717
|
return controller._finishPromise;
|
|
8687
8718
|
}
|
|
8688
8719
|
const readable = stream._readable;
|
|
8689
|
-
controller._finishPromise = newPromise((
|
|
8690
|
-
controller._finishPromise_resolve =
|
|
8720
|
+
controller._finishPromise = newPromise((resolve3, reject) => {
|
|
8721
|
+
controller._finishPromise_resolve = resolve3;
|
|
8691
8722
|
controller._finishPromise_reject = reject;
|
|
8692
8723
|
});
|
|
8693
8724
|
const cancelPromise = controller._cancelAlgorithm(reason);
|
|
@@ -8713,8 +8744,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
8713
8744
|
return controller._finishPromise;
|
|
8714
8745
|
}
|
|
8715
8746
|
const readable = stream._readable;
|
|
8716
|
-
controller._finishPromise = newPromise((
|
|
8717
|
-
controller._finishPromise_resolve =
|
|
8747
|
+
controller._finishPromise = newPromise((resolve3, reject) => {
|
|
8748
|
+
controller._finishPromise_resolve = resolve3;
|
|
8718
8749
|
controller._finishPromise_reject = reject;
|
|
8719
8750
|
});
|
|
8720
8751
|
const flushPromise = controller._flushAlgorithm();
|
|
@@ -8744,8 +8775,8 @@ var require_ponyfill_es2018 = __commonJS({
|
|
|
8744
8775
|
return controller._finishPromise;
|
|
8745
8776
|
}
|
|
8746
8777
|
const writable = stream._writable;
|
|
8747
|
-
controller._finishPromise = newPromise((
|
|
8748
|
-
controller._finishPromise_resolve =
|
|
8778
|
+
controller._finishPromise = newPromise((resolve3, reject) => {
|
|
8779
|
+
controller._finishPromise_resolve = resolve3;
|
|
8749
8780
|
controller._finishPromise_reject = reject;
|
|
8750
8781
|
});
|
|
8751
8782
|
const cancelPromise = controller._cancelAlgorithm(reason);
|
|
@@ -10641,7 +10672,7 @@ var init_abort_error = __esm({
|
|
|
10641
10672
|
|
|
10642
10673
|
// ../../node_modules/.pnpm/node-fetch@3.3.2/node_modules/node-fetch/src/index.js
|
|
10643
10674
|
async function fetch(url, options_) {
|
|
10644
|
-
return new Promise((
|
|
10675
|
+
return new Promise((resolve3, reject) => {
|
|
10645
10676
|
const request2 = new Request(url, options_);
|
|
10646
10677
|
const { parsedURL, options } = getNodeRequestOptions(request2);
|
|
10647
10678
|
if (!supportedSchemas.has(parsedURL.protocol)) {
|
|
@@ -10650,7 +10681,7 @@ async function fetch(url, options_) {
|
|
|
10650
10681
|
if (parsedURL.protocol === "data:") {
|
|
10651
10682
|
const data = dist_default(request2.url);
|
|
10652
10683
|
const response2 = new Response(data, { headers: { "Content-Type": data.typeFull } });
|
|
10653
|
-
|
|
10684
|
+
resolve3(response2);
|
|
10654
10685
|
return;
|
|
10655
10686
|
}
|
|
10656
10687
|
const send = (parsedURL.protocol === "https:" ? import_node_https.default : import_node_http2.default).request;
|
|
@@ -10772,7 +10803,7 @@ async function fetch(url, options_) {
|
|
|
10772
10803
|
if (responseReferrerPolicy) {
|
|
10773
10804
|
requestOptions.referrerPolicy = responseReferrerPolicy;
|
|
10774
10805
|
}
|
|
10775
|
-
|
|
10806
|
+
resolve3(fetch(new Request(locationURL, requestOptions)));
|
|
10776
10807
|
finalize();
|
|
10777
10808
|
return;
|
|
10778
10809
|
}
|
|
@@ -10805,7 +10836,7 @@ async function fetch(url, options_) {
|
|
|
10805
10836
|
const codings = headers.get("Content-Encoding");
|
|
10806
10837
|
if (!request2.compress || request2.method === "HEAD" || codings === null || response_.statusCode === 204 || response_.statusCode === 304) {
|
|
10807
10838
|
response = new Response(body, responseOptions);
|
|
10808
|
-
|
|
10839
|
+
resolve3(response);
|
|
10809
10840
|
return;
|
|
10810
10841
|
}
|
|
10811
10842
|
const zlibOptions = {
|
|
@@ -10819,7 +10850,7 @@ async function fetch(url, options_) {
|
|
|
10819
10850
|
}
|
|
10820
10851
|
});
|
|
10821
10852
|
response = new Response(body, responseOptions);
|
|
10822
|
-
|
|
10853
|
+
resolve3(response);
|
|
10823
10854
|
return;
|
|
10824
10855
|
}
|
|
10825
10856
|
if (codings === "deflate" || codings === "x-deflate") {
|
|
@@ -10843,12 +10874,12 @@ async function fetch(url, options_) {
|
|
|
10843
10874
|
});
|
|
10844
10875
|
}
|
|
10845
10876
|
response = new Response(body, responseOptions);
|
|
10846
|
-
|
|
10877
|
+
resolve3(response);
|
|
10847
10878
|
});
|
|
10848
10879
|
raw.once("end", () => {
|
|
10849
10880
|
if (!response) {
|
|
10850
10881
|
response = new Response(body, responseOptions);
|
|
10851
|
-
|
|
10882
|
+
resolve3(response);
|
|
10852
10883
|
}
|
|
10853
10884
|
});
|
|
10854
10885
|
return;
|
|
@@ -10860,11 +10891,11 @@ async function fetch(url, options_) {
|
|
|
10860
10891
|
}
|
|
10861
10892
|
});
|
|
10862
10893
|
response = new Response(body, responseOptions);
|
|
10863
|
-
|
|
10894
|
+
resolve3(response);
|
|
10864
10895
|
return;
|
|
10865
10896
|
}
|
|
10866
10897
|
response = new Response(body, responseOptions);
|
|
10867
|
-
|
|
10898
|
+
resolve3(response);
|
|
10868
10899
|
});
|
|
10869
10900
|
writeToStream(request_, request2).catch(reject);
|
|
10870
10901
|
});
|
|
@@ -12381,7 +12412,7 @@ var init_escape2 = __esm({
|
|
|
12381
12412
|
});
|
|
12382
12413
|
|
|
12383
12414
|
// ../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js
|
|
12384
|
-
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform,
|
|
12415
|
+
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path8, sep, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
|
|
12385
12416
|
var init_esm2 = __esm({
|
|
12386
12417
|
"../../node_modules/.pnpm/minimatch@9.0.5/node_modules/minimatch/dist/esm/index.js"() {
|
|
12387
12418
|
"use strict";
|
|
@@ -12451,11 +12482,11 @@ var init_esm2 = __esm({
|
|
|
12451
12482
|
return (f3) => f3.length === len && f3 !== "." && f3 !== "..";
|
|
12452
12483
|
};
|
|
12453
12484
|
defaultPlatform = typeof process === "object" && process ? typeof process.env === "object" && process.env && process.env.__MINIMATCH_TESTING_PLATFORM__ || process.platform : "posix";
|
|
12454
|
-
|
|
12485
|
+
path8 = {
|
|
12455
12486
|
win32: { sep: "\\" },
|
|
12456
12487
|
posix: { sep: "/" }
|
|
12457
12488
|
};
|
|
12458
|
-
sep = defaultPlatform === "win32" ?
|
|
12489
|
+
sep = defaultPlatform === "win32" ? path8.win32.sep : path8.posix.sep;
|
|
12459
12490
|
minimatch.sep = sep;
|
|
12460
12491
|
GLOBSTAR = Symbol("globstar **");
|
|
12461
12492
|
minimatch.GLOBSTAR = GLOBSTAR;
|
|
@@ -15117,10 +15148,10 @@ var require_nested_property = __commonJS({
|
|
|
15117
15148
|
return false;
|
|
15118
15149
|
}
|
|
15119
15150
|
}
|
|
15120
|
-
function traverse(object,
|
|
15151
|
+
function traverse(object, path15) {
|
|
15121
15152
|
var callback = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : function() {
|
|
15122
15153
|
};
|
|
15123
|
-
var segments =
|
|
15154
|
+
var segments = path15.split(PATH_DELIMITER);
|
|
15124
15155
|
var length = segments.length;
|
|
15125
15156
|
var _loop = function _loop2(idx2) {
|
|
15126
15157
|
var currentSegment = segments[idx2];
|
|
@@ -15228,9 +15259,9 @@ function normaliseResult(result) {
|
|
|
15228
15259
|
return output;
|
|
15229
15260
|
}
|
|
15230
15261
|
function parseXML(xml) {
|
|
15231
|
-
return new Promise((
|
|
15262
|
+
return new Promise((resolve3) => {
|
|
15232
15263
|
const result = getParser().parse(xml);
|
|
15233
|
-
|
|
15264
|
+
resolve3(normaliseResult(result));
|
|
15234
15265
|
});
|
|
15235
15266
|
}
|
|
15236
15267
|
function prepareFileFromProps(props, filename, isDetailed = false) {
|
|
@@ -15362,11 +15393,11 @@ async function createDirectory(context, dirPath, options = {}) {
|
|
|
15362
15393
|
const response = await request(requestOptions, context);
|
|
15363
15394
|
handleResponseCode(context, response);
|
|
15364
15395
|
}
|
|
15365
|
-
function ensureCollectionPath(
|
|
15366
|
-
if (!
|
|
15367
|
-
return
|
|
15396
|
+
function ensureCollectionPath(path15) {
|
|
15397
|
+
if (!path15.endsWith("/")) {
|
|
15398
|
+
return path15 + "/";
|
|
15368
15399
|
}
|
|
15369
|
-
return
|
|
15400
|
+
return path15;
|
|
15370
15401
|
}
|
|
15371
15402
|
async function createDirectoryRecursively(context, dirPath, options = {}) {
|
|
15372
15403
|
const paths = getAllDirectories(normalisePath(dirPath));
|
|
@@ -15741,7 +15772,7 @@ var init_xml = __esm({
|
|
|
15741
15772
|
});
|
|
15742
15773
|
|
|
15743
15774
|
// ../../node_modules/.pnpm/webdav@5.8.0/node_modules/webdav/dist/node/operations/lock.js
|
|
15744
|
-
async function lock(context,
|
|
15775
|
+
async function lock(context, path15, options = {}) {
|
|
15745
15776
|
const { refreshToken, timeout = DEFAULT_TIMEOUT } = options;
|
|
15746
15777
|
const headers = {
|
|
15747
15778
|
Accept: "text/plain,application/xml",
|
|
@@ -15751,7 +15782,7 @@ async function lock(context, path13, options = {}) {
|
|
|
15751
15782
|
headers.If = refreshToken;
|
|
15752
15783
|
}
|
|
15753
15784
|
const requestOptions = prepareRequestOptions({
|
|
15754
|
-
url: joinURL(context.remoteURL, encodePath(
|
|
15785
|
+
url: joinURL(context.remoteURL, encodePath(path15)),
|
|
15755
15786
|
method: "LOCK",
|
|
15756
15787
|
headers,
|
|
15757
15788
|
data: generateLockXML(context.contactHref)
|
|
@@ -15771,9 +15802,9 @@ async function lock(context, path13, options = {}) {
|
|
|
15771
15802
|
serverTimeout
|
|
15772
15803
|
};
|
|
15773
15804
|
}
|
|
15774
|
-
async function unlock(context,
|
|
15805
|
+
async function unlock(context, path15, token, options = {}) {
|
|
15775
15806
|
const requestOptions = prepareRequestOptions({
|
|
15776
|
-
url: joinURL(context.remoteURL, encodePath(
|
|
15807
|
+
url: joinURL(context.remoteURL, encodePath(path15)),
|
|
15777
15808
|
method: "UNLOCK",
|
|
15778
15809
|
headers: {
|
|
15779
15810
|
"Lock-Token": token
|
|
@@ -15823,9 +15854,9 @@ var init_quota = __esm({
|
|
|
15823
15854
|
|
|
15824
15855
|
// ../../node_modules/.pnpm/webdav@5.8.0/node_modules/webdav/dist/node/operations/getQuota.js
|
|
15825
15856
|
async function getQuota(context, options = {}) {
|
|
15826
|
-
const
|
|
15857
|
+
const path15 = options.path || "/";
|
|
15827
15858
|
const requestOptions = prepareRequestOptions({
|
|
15828
|
-
url: joinURL(context.remoteURL,
|
|
15859
|
+
url: joinURL(context.remoteURL, path15),
|
|
15829
15860
|
method: "PROPFIND",
|
|
15830
15861
|
headers: {
|
|
15831
15862
|
Accept: "text/plain,application/xml",
|
|
@@ -16165,29 +16196,29 @@ function createClient(remoteURL, options = {}) {
|
|
|
16165
16196
|
setupAuth(context, username, password, token, ha1);
|
|
16166
16197
|
return {
|
|
16167
16198
|
copyFile: (filename, destination, options2) => copyFile(context, filename, destination, options2),
|
|
16168
|
-
createDirectory: (
|
|
16199
|
+
createDirectory: (path15, options2) => createDirectory(context, path15, options2),
|
|
16169
16200
|
createReadStream: (filename, options2) => createReadStream2(context, filename, options2),
|
|
16170
16201
|
createWriteStream: (filename, options2, callback) => createWriteStream(context, filename, options2, callback),
|
|
16171
|
-
customRequest: (
|
|
16202
|
+
customRequest: (path15, requestOptions) => customRequest(context, path15, requestOptions),
|
|
16172
16203
|
deleteFile: (filename, options2) => deleteFile(context, filename, options2),
|
|
16173
|
-
exists: (
|
|
16174
|
-
getDirectoryContents: (
|
|
16204
|
+
exists: (path15, options2) => exists(context, path15, options2),
|
|
16205
|
+
getDirectoryContents: (path15, options2) => getDirectoryContents(context, path15, options2),
|
|
16175
16206
|
getFileContents: (filename, options2) => getFileContents(context, filename, options2),
|
|
16176
16207
|
getFileDownloadLink: (filename) => getFileDownloadLink(context, filename),
|
|
16177
16208
|
getFileUploadLink: (filename) => getFileUploadLink(context, filename),
|
|
16178
16209
|
getHeaders: () => Object.assign({}, context.headers),
|
|
16179
16210
|
getQuota: (options2) => getQuota(context, options2),
|
|
16180
|
-
lock: (
|
|
16211
|
+
lock: (path15, options2) => lock(context, path15, options2),
|
|
16181
16212
|
moveFile: (filename, destinationFilename, options2) => moveFile(context, filename, destinationFilename, options2),
|
|
16182
16213
|
putFileContents: (filename, data, options2) => putFileContents(context, filename, data, options2),
|
|
16183
16214
|
partialUpdateFileContents: (filePath, start, end, data, options2) => partialUpdateFileContents(context, filePath, start, end, data, options2),
|
|
16184
|
-
getDAVCompliance: (
|
|
16185
|
-
search: (
|
|
16215
|
+
getDAVCompliance: (path15) => getDAVCompliance(context, path15),
|
|
16216
|
+
search: (path15, options2) => getSearch2(context, path15, options2),
|
|
16186
16217
|
setHeaders: (headers2) => {
|
|
16187
16218
|
context.headers = Object.assign({}, headers2);
|
|
16188
16219
|
},
|
|
16189
|
-
stat: (
|
|
16190
|
-
unlock: (
|
|
16220
|
+
stat: (path15, options2) => getStat(context, path15, options2),
|
|
16221
|
+
unlock: (path15, token2, options2) => unlock(context, path15, token2, options2)
|
|
16191
16222
|
};
|
|
16192
16223
|
}
|
|
16193
16224
|
var DEFAULT_CONTACT_HREF;
|
|
@@ -16819,8 +16850,8 @@ var init_sync_v2 = __esm({
|
|
|
16819
16850
|
// ../core/dist/export.js
|
|
16820
16851
|
function validateExport() {
|
|
16821
16852
|
const ccmanDir2 = getCcmanDir();
|
|
16822
|
-
const codexPath =
|
|
16823
|
-
const claudePath =
|
|
16853
|
+
const codexPath = path12.join(ccmanDir2, CODEX_CONFIG_FILE);
|
|
16854
|
+
const claudePath = path12.join(ccmanDir2, CLAUDE_CONFIG_FILE);
|
|
16824
16855
|
const missingFiles = [];
|
|
16825
16856
|
if (!fileExists(codexPath)) {
|
|
16826
16857
|
missingFiles.push(CODEX_CONFIG_FILE);
|
|
@@ -16853,8 +16884,8 @@ function validateImportDir(sourceDir) {
|
|
|
16853
16884
|
foundFiles: []
|
|
16854
16885
|
};
|
|
16855
16886
|
}
|
|
16856
|
-
const codexPath =
|
|
16857
|
-
const claudePath =
|
|
16887
|
+
const codexPath = path12.join(sourceDir, CODEX_CONFIG_FILE);
|
|
16888
|
+
const claudePath = path12.join(sourceDir, CLAUDE_CONFIG_FILE);
|
|
16858
16889
|
const foundFiles = [];
|
|
16859
16890
|
if (fileExists(codexPath)) {
|
|
16860
16891
|
foundFiles.push(CODEX_CONFIG_FILE);
|
|
@@ -16882,14 +16913,14 @@ function exportConfig(targetDir) {
|
|
|
16882
16913
|
ensureDir(targetDir);
|
|
16883
16914
|
const ccmanDir2 = getCcmanDir();
|
|
16884
16915
|
const exportedFiles = [];
|
|
16885
|
-
const codexSrc =
|
|
16886
|
-
const codexDst =
|
|
16916
|
+
const codexSrc = path12.join(ccmanDir2, CODEX_CONFIG_FILE);
|
|
16917
|
+
const codexDst = path12.join(targetDir, CODEX_CONFIG_FILE);
|
|
16887
16918
|
if (fileExists(codexSrc)) {
|
|
16888
16919
|
fs9.copyFileSync(codexSrc, codexDst);
|
|
16889
16920
|
exportedFiles.push(CODEX_CONFIG_FILE);
|
|
16890
16921
|
}
|
|
16891
|
-
const claudeSrc =
|
|
16892
|
-
const claudeDst =
|
|
16922
|
+
const claudeSrc = path12.join(ccmanDir2, CLAUDE_CONFIG_FILE);
|
|
16923
|
+
const claudeDst = path12.join(targetDir, CLAUDE_CONFIG_FILE);
|
|
16893
16924
|
if (fileExists(claudeSrc)) {
|
|
16894
16925
|
fs9.copyFileSync(claudeSrc, claudeDst);
|
|
16895
16926
|
exportedFiles.push(CLAUDE_CONFIG_FILE);
|
|
@@ -16911,22 +16942,22 @@ function importConfig(sourceDir) {
|
|
|
16911
16942
|
ensureDir(ccmanDir2);
|
|
16912
16943
|
try {
|
|
16913
16944
|
if (validation.foundFiles.includes(CODEX_CONFIG_FILE)) {
|
|
16914
|
-
const codexDst =
|
|
16945
|
+
const codexDst = path12.join(ccmanDir2, CODEX_CONFIG_FILE);
|
|
16915
16946
|
if (fileExists(codexDst)) {
|
|
16916
16947
|
const backupPath = backupConfig(codexDst);
|
|
16917
16948
|
backupPaths.push(backupPath);
|
|
16918
16949
|
}
|
|
16919
|
-
const codexSrc =
|
|
16950
|
+
const codexSrc = path12.join(sourceDir, CODEX_CONFIG_FILE);
|
|
16920
16951
|
fs9.copyFileSync(codexSrc, codexDst);
|
|
16921
16952
|
importedFiles.push(CODEX_CONFIG_FILE);
|
|
16922
16953
|
}
|
|
16923
16954
|
if (validation.foundFiles.includes(CLAUDE_CONFIG_FILE)) {
|
|
16924
|
-
const claudeDst =
|
|
16955
|
+
const claudeDst = path12.join(ccmanDir2, CLAUDE_CONFIG_FILE);
|
|
16925
16956
|
if (fileExists(claudeDst)) {
|
|
16926
16957
|
const backupPath = backupConfig(claudeDst);
|
|
16927
16958
|
backupPaths.push(backupPath);
|
|
16928
16959
|
}
|
|
16929
|
-
const claudeSrc =
|
|
16960
|
+
const claudeSrc = path12.join(sourceDir, CLAUDE_CONFIG_FILE);
|
|
16930
16961
|
fs9.copyFileSync(claudeSrc, claudeDst);
|
|
16931
16962
|
importedFiles.push(CLAUDE_CONFIG_FILE);
|
|
16932
16963
|
}
|
|
@@ -16945,12 +16976,12 @@ function importConfig(sourceDir) {
|
|
|
16945
16976
|
throw new Error(`\u5BFC\u5165\u5931\u8D25\uFF0C\u5DF2\u6062\u590D\u5907\u4EFD: ${error.message}`);
|
|
16946
16977
|
}
|
|
16947
16978
|
}
|
|
16948
|
-
var fs9,
|
|
16979
|
+
var fs9, path12, CODEX_CONFIG_FILE, CLAUDE_CONFIG_FILE;
|
|
16949
16980
|
var init_export = __esm({
|
|
16950
16981
|
"../core/dist/export.js"() {
|
|
16951
16982
|
"use strict";
|
|
16952
16983
|
fs9 = __toESM(require("fs"), 1);
|
|
16953
|
-
|
|
16984
|
+
path12 = __toESM(require("path"), 1);
|
|
16954
16985
|
init_paths();
|
|
16955
16986
|
init_file();
|
|
16956
16987
|
init_merge2();
|
|
@@ -17588,8 +17619,8 @@ function downloadCommand(program2) {
|
|
|
17588
17619
|
console.log();
|
|
17589
17620
|
if (backupPaths.length > 0) {
|
|
17590
17621
|
console.log(import_chalk7.default.gray("\u672C\u5730\u5907\u4EFD:"));
|
|
17591
|
-
backupPaths.forEach((
|
|
17592
|
-
console.log(import_chalk7.default.gray(` ${
|
|
17622
|
+
backupPaths.forEach((path15) => {
|
|
17623
|
+
console.log(import_chalk7.default.gray(` ${path15}`));
|
|
17593
17624
|
});
|
|
17594
17625
|
console.log();
|
|
17595
17626
|
}
|
|
@@ -17651,8 +17682,8 @@ function mergeCommand(program2) {
|
|
|
17651
17682
|
console.log();
|
|
17652
17683
|
if (result.backupPaths.length > 0) {
|
|
17653
17684
|
console.log(import_chalk8.default.gray("\u5907\u4EFD:"));
|
|
17654
|
-
result.backupPaths.forEach((
|
|
17655
|
-
console.log(import_chalk8.default.gray(` ${
|
|
17685
|
+
result.backupPaths.forEach((path15) => {
|
|
17686
|
+
console.log(import_chalk8.default.gray(` ${path15}`));
|
|
17656
17687
|
});
|
|
17657
17688
|
console.log();
|
|
17658
17689
|
}
|