@uniformdev/cli 20.49.2 → 20.49.3-alpha.9
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.mjs +23 -17
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1343,16 +1343,12 @@ function getMcpDirectory(agentType, customDir) {
|
|
|
1343
1343
|
// src/commands/ai/lib/mcp.ts
|
|
1344
1344
|
import { yellow as yellow2 } from "colorette";
|
|
1345
1345
|
import { existsSync as existsSync3, readFileSync } from "fs";
|
|
1346
|
-
function createUniformMcpServerConfig(apiKey, projectId, aiApiHost,
|
|
1346
|
+
function createUniformMcpServerConfig(apiKey, projectId, aiApiHost, _apiHost) {
|
|
1347
1347
|
return {
|
|
1348
|
-
type: "
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
UNIFORM_API_KEY: apiKey,
|
|
1353
|
-
UNIFORM_PROJECT_ID: projectId,
|
|
1354
|
-
UNIFORM_AI_API_HOST: aiApiHost,
|
|
1355
|
-
UNIFORM_API_HOST: apiHost
|
|
1348
|
+
type: "streamable-http",
|
|
1349
|
+
url: `${aiApiHost}/projects/${projectId}/mcp`,
|
|
1350
|
+
headers: {
|
|
1351
|
+
"x-api-key": apiKey
|
|
1356
1352
|
}
|
|
1357
1353
|
};
|
|
1358
1354
|
}
|
|
@@ -2616,6 +2612,15 @@ var compareCompositionsOrEntriesWithoutAssetUrls = (source, target) => {
|
|
|
2616
2612
|
removeUrlsFromAssetParameters(structuredClone(target.object))
|
|
2617
2613
|
);
|
|
2618
2614
|
};
|
|
2615
|
+
var PUBLISH_TIMESTAMP_TOLERANCE_MS = 2e3;
|
|
2616
|
+
var compareCompositionsOrEntriesWithoutAssetUrlsForPublishing = (source, target) => {
|
|
2617
|
+
const sourceModified = new Date(source.object.modified).getTime();
|
|
2618
|
+
const targetModified = new Date(target.object.modified).getTime();
|
|
2619
|
+
if (sourceModified - targetModified > PUBLISH_TIMESTAMP_TOLERANCE_MS) {
|
|
2620
|
+
return false;
|
|
2621
|
+
}
|
|
2622
|
+
return compareCompositionsOrEntriesWithoutAssetUrls(source, target);
|
|
2623
|
+
};
|
|
2619
2624
|
var removeUrlFromAsset = (asset) => {
|
|
2620
2625
|
if (asset.asset.fields?.url?.value) {
|
|
2621
2626
|
asset.asset.fields.url.value = "";
|
|
@@ -4205,7 +4210,7 @@ var CompositionPublishModule = {
|
|
|
4205
4210
|
fileClient
|
|
4206
4211
|
});
|
|
4207
4212
|
},
|
|
4208
|
-
compareContents:
|
|
4213
|
+
compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
|
|
4209
4214
|
onBeforeWriteObject: async (sourceObject) => {
|
|
4210
4215
|
return uploadFilesForCompositionOrEntry({
|
|
4211
4216
|
entity: sourceObject,
|
|
@@ -4746,7 +4751,6 @@ var CompositionUnpublishModule = {
|
|
|
4746
4751
|
console.log(`Composition ${id} was not found`);
|
|
4747
4752
|
return;
|
|
4748
4753
|
}
|
|
4749
|
-
console.log(`\u{1F41B} unpublishing composition: (id: ${id})`);
|
|
4750
4754
|
if (!whatIf) {
|
|
4751
4755
|
actions.push(client.removeComposition({ compositionId: id, state: CANVAS_PUBLISHED_STATE2 }));
|
|
4752
4756
|
}
|
|
@@ -4759,6 +4763,7 @@ var CompositionUnpublishModule = {
|
|
|
4759
4763
|
diff: () => diffJson2(targetObject.object, sourceObject.object)
|
|
4760
4764
|
});
|
|
4761
4765
|
}
|
|
4766
|
+
await Promise.all(actions);
|
|
4762
4767
|
}
|
|
4763
4768
|
};
|
|
4764
4769
|
|
|
@@ -6049,10 +6054,10 @@ var EntryPublishModule = {
|
|
|
6049
6054
|
command: "publish [ids]",
|
|
6050
6055
|
describe: "Publishes entry(ies)",
|
|
6051
6056
|
builder: (yargs42) => withConfiguration(
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6057
|
+
withDebugOptions(
|
|
6058
|
+
withDiffOptions(
|
|
6059
|
+
withApiOptions(
|
|
6060
|
+
withProjectOptions(
|
|
6056
6061
|
yargs42.positional("ids", {
|
|
6057
6062
|
describe: "Publishes entry(ies) by ID. Comma-separate multiple IDs. Use --all to publish all instead.",
|
|
6058
6063
|
type: "string"
|
|
@@ -6112,7 +6117,7 @@ var EntryPublishModule = {
|
|
|
6112
6117
|
fileClient
|
|
6113
6118
|
});
|
|
6114
6119
|
},
|
|
6115
|
-
compareContents:
|
|
6120
|
+
compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
|
|
6116
6121
|
onBeforeWriteObject: async (sourceObject) => {
|
|
6117
6122
|
return uploadFilesForCompositionOrEntry({
|
|
6118
6123
|
entity: sourceObject,
|
|
@@ -6431,6 +6436,7 @@ var EntryUnpublishModule = {
|
|
|
6431
6436
|
diff: () => diffJson3(targetObject.object, sourceObject.object)
|
|
6432
6437
|
});
|
|
6433
6438
|
}
|
|
6439
|
+
await Promise.all(actions);
|
|
6434
6440
|
}
|
|
6435
6441
|
};
|
|
6436
6442
|
|
|
@@ -6664,7 +6670,7 @@ var EntryPatternPublishModule = {
|
|
|
6664
6670
|
fileClient
|
|
6665
6671
|
});
|
|
6666
6672
|
},
|
|
6667
|
-
compareContents:
|
|
6673
|
+
compareContents: compareCompositionsOrEntriesWithoutAssetUrlsForPublishing,
|
|
6668
6674
|
onBeforeWriteObject: async (sourceObject) => {
|
|
6669
6675
|
return uploadFilesForCompositionOrEntry({
|
|
6670
6676
|
entity: sourceObject,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/cli",
|
|
3
|
-
"version": "20.49.
|
|
3
|
+
"version": "20.49.3-alpha.9+e5b9a8ca05",
|
|
4
4
|
"description": "Uniform command line interface tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./cli.js",
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@inquirer/prompts": "^7.10.1",
|
|
30
30
|
"@thi.ng/mime": "^2.2.23",
|
|
31
|
-
"@uniformdev/assets": "20.49.
|
|
32
|
-
"@uniformdev/canvas": "20.49.
|
|
33
|
-
"@uniformdev/context": "20.49.
|
|
34
|
-
"@uniformdev/files": "20.49.
|
|
35
|
-
"@uniformdev/project-map": "20.49.
|
|
36
|
-
"@uniformdev/redirect": "20.49.
|
|
37
|
-
"@uniformdev/richtext": "20.49.
|
|
31
|
+
"@uniformdev/assets": "20.49.3-alpha.9+e5b9a8ca05",
|
|
32
|
+
"@uniformdev/canvas": "20.49.3-alpha.9+e5b9a8ca05",
|
|
33
|
+
"@uniformdev/context": "20.49.3-alpha.9+e5b9a8ca05",
|
|
34
|
+
"@uniformdev/files": "20.49.3-alpha.9+e5b9a8ca05",
|
|
35
|
+
"@uniformdev/project-map": "20.49.3-alpha.9+e5b9a8ca05",
|
|
36
|
+
"@uniformdev/redirect": "20.49.3-alpha.9+e5b9a8ca05",
|
|
37
|
+
"@uniformdev/richtext": "20.49.3-alpha.9+e5b9a8ca05",
|
|
38
38
|
"call-bind": "^1.0.2",
|
|
39
39
|
"colorette": "2.0.20",
|
|
40
40
|
"cosmiconfig": "9.0.0",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "e5b9a8ca05d0b8b26886079b687417e53d44f9cb"
|
|
85
85
|
}
|