@mdfriday/foundry 26.3.16 → 26.3.18
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/cli.js
CHANGED
|
@@ -1151,6 +1151,19 @@ var init_project = __esm({
|
|
|
1151
1151
|
this.setNestedValue(this.config, key2, value);
|
|
1152
1152
|
log2.debug(`Project config updated: ${key2}`, { projectName: this.metadata.name });
|
|
1153
1153
|
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Set entire configuration object (replaces current config)
|
|
1156
|
+
*
|
|
1157
|
+
* This method replaces the entire configuration with the provided object.
|
|
1158
|
+
* Useful for bulk updates to avoid race conditions from multiple writes.
|
|
1159
|
+
*/
|
|
1160
|
+
setConfig(config) {
|
|
1161
|
+
if (this.config === null) {
|
|
1162
|
+
throw new Error("Configuration not loaded. Call loadConfig() first.");
|
|
1163
|
+
}
|
|
1164
|
+
this.config = config;
|
|
1165
|
+
log2.debug(`Project config replaced entirely`, { projectName: this.metadata.name });
|
|
1166
|
+
}
|
|
1154
1167
|
/**
|
|
1155
1168
|
* Unset configuration value (supports nested keys with dot notation)
|
|
1156
1169
|
*/
|
|
@@ -8808,6 +8821,7 @@ var init_mdfriday_publisher = __esm({
|
|
|
8808
8821
|
const formData = this.buildFormData(
|
|
8809
8822
|
zipContent,
|
|
8810
8823
|
projectName,
|
|
8824
|
+
this.config.path || "",
|
|
8811
8825
|
this.config.deploymentType
|
|
8812
8826
|
);
|
|
8813
8827
|
const response = await this.httpClient.postMultipart(
|
|
@@ -8870,10 +8884,10 @@ var init_mdfriday_publisher = __esm({
|
|
|
8870
8884
|
/**
|
|
8871
8885
|
* Build multipart form data for upload
|
|
8872
8886
|
*/
|
|
8873
|
-
buildFormData(zipContent, projectName, deploymentType) {
|
|
8887
|
+
buildFormData(zipContent, projectName, path43, deploymentType) {
|
|
8874
8888
|
return {
|
|
8875
8889
|
type: deploymentType,
|
|
8876
|
-
path:
|
|
8890
|
+
path: path43,
|
|
8877
8891
|
id: "-1",
|
|
8878
8892
|
// NEW_ID
|
|
8879
8893
|
name: projectName,
|
|
@@ -9598,6 +9612,8 @@ var init_publish2 = __esm({
|
|
|
9598
9612
|
accessToken,
|
|
9599
9613
|
apiUrl,
|
|
9600
9614
|
deploymentType: mdConfig.type || "share",
|
|
9615
|
+
path: "",
|
|
9616
|
+
// TODO: 未来支持自定义路径
|
|
9601
9617
|
enabled: true
|
|
9602
9618
|
};
|
|
9603
9619
|
default:
|
|
@@ -55146,7 +55162,7 @@ For more information, visit: https://help.mdfriday.com
|
|
|
55146
55162
|
* Show version
|
|
55147
55163
|
*/
|
|
55148
55164
|
showVersion() {
|
|
55149
|
-
const version = "26.3.
|
|
55165
|
+
const version = "26.3.18";
|
|
55150
55166
|
return {
|
|
55151
55167
|
success: true,
|
|
55152
55168
|
message: `MDFriday CLI v${version}`
|