@displaydev/cli 0.12.0 → 0.15.1
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/api-client.js +7 -6
- package/dist/main.js +1 -1
- package/dist/mcp-server.js +76 -2
- package/package.json +1 -1
package/dist/api-client.js
CHANGED
|
@@ -448,14 +448,15 @@ export var ApiClient = /*#__PURE__*/ function() {
|
|
|
448
448
|
value: /**
|
|
449
449
|
* Metadata-only rename: updates the artifact's display name and
|
|
450
450
|
* re-derives the URL slug. Does not bump the version or touch
|
|
451
|
-
* storage. Maps to `
|
|
452
|
-
* feat-artifact-rename.md §2a.
|
|
451
|
+
* storage. Maps to `POST /v1/artifacts/:shortId/rename` — see
|
|
452
|
+
* feat-artifact-rename.md §2a + api-conventions.md §1.3 (atomic
|
|
453
|
+
* action endpoints over generic PATCH).
|
|
453
454
|
*/ function renameArtifact(shortId, name) {
|
|
454
455
|
return _async_to_generator(function() {
|
|
455
456
|
return _ts_generator(this, function(_state) {
|
|
456
457
|
return [
|
|
457
458
|
2,
|
|
458
|
-
this.request('
|
|
459
|
+
this.request('POST', "/v1/artifacts/".concat(shortId, "/rename"), {
|
|
459
460
|
name: name
|
|
460
461
|
})
|
|
461
462
|
];
|
|
@@ -521,8 +522,8 @@ export var ApiClient = /*#__PURE__*/ function() {
|
|
|
521
522
|
if (params.mine) {
|
|
522
523
|
searchParams.append('author', 'me');
|
|
523
524
|
}
|
|
524
|
-
if (params.
|
|
525
|
-
searchParams.set('
|
|
525
|
+
if (params.publishedBy) {
|
|
526
|
+
searchParams.set('publishedBy', params.publishedBy);
|
|
526
527
|
}
|
|
527
528
|
if (params.since) {
|
|
528
529
|
searchParams.set('since', params.since);
|
|
@@ -695,7 +696,7 @@ export var ApiClient = /*#__PURE__*/ function() {
|
|
|
695
696
|
return _ts_generator(this, function(_state) {
|
|
696
697
|
return [
|
|
697
698
|
2,
|
|
698
|
-
this.requestNoAuth('POST', '/cli/auth-check', {
|
|
699
|
+
this.requestNoAuth('POST', '/v1/cli/auth-check', {
|
|
699
700
|
email: email
|
|
700
701
|
})
|
|
701
702
|
];
|
package/dist/main.js
CHANGED
package/dist/mcp-server.js
CHANGED
|
@@ -27,6 +27,19 @@ function _async_to_generator(fn) {
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
function _define_property(obj, key, value) {
|
|
31
|
+
if (key in obj) {
|
|
32
|
+
Object.defineProperty(obj, key, {
|
|
33
|
+
value: value,
|
|
34
|
+
enumerable: true,
|
|
35
|
+
configurable: true,
|
|
36
|
+
writable: true
|
|
37
|
+
});
|
|
38
|
+
} else {
|
|
39
|
+
obj[key] = value;
|
|
40
|
+
}
|
|
41
|
+
return obj;
|
|
42
|
+
}
|
|
30
43
|
function _instanceof(left, right) {
|
|
31
44
|
"@swc/helpers - instanceof";
|
|
32
45
|
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
|
|
@@ -35,6 +48,57 @@ function _instanceof(left, right) {
|
|
|
35
48
|
return left instanceof right;
|
|
36
49
|
}
|
|
37
50
|
}
|
|
51
|
+
function _object_spread(target) {
|
|
52
|
+
for(var i = 1; i < arguments.length; i++){
|
|
53
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
54
|
+
var ownKeys = Object.keys(source);
|
|
55
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
56
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
57
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
ownKeys.forEach(function(key) {
|
|
61
|
+
_define_property(target, key, source[key]);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
return target;
|
|
65
|
+
}
|
|
66
|
+
function _object_without_properties(source, excluded) {
|
|
67
|
+
if (source == null) return {};
|
|
68
|
+
var target = {}, sourceKeys, key, i;
|
|
69
|
+
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
70
|
+
sourceKeys = Reflect.ownKeys(Object(source));
|
|
71
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
72
|
+
key = sourceKeys[i];
|
|
73
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
74
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
75
|
+
target[key] = source[key];
|
|
76
|
+
}
|
|
77
|
+
return target;
|
|
78
|
+
}
|
|
79
|
+
target = _object_without_properties_loose(source, excluded);
|
|
80
|
+
if (Object.getOwnPropertySymbols) {
|
|
81
|
+
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
82
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
83
|
+
key = sourceKeys[i];
|
|
84
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
85
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
86
|
+
target[key] = source[key];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return target;
|
|
90
|
+
}
|
|
91
|
+
function _object_without_properties_loose(source, excluded) {
|
|
92
|
+
if (source == null) return {};
|
|
93
|
+
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
94
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
95
|
+
key = sourceKeys[i];
|
|
96
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
97
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
98
|
+
target[key] = source[key];
|
|
99
|
+
}
|
|
100
|
+
return target;
|
|
101
|
+
}
|
|
38
102
|
function _ts_generator(thisArg, body) {
|
|
39
103
|
var f, y, t, _ = {
|
|
40
104
|
label: 0,
|
|
@@ -577,7 +641,7 @@ export function registerTools(server, api) {
|
|
|
577
641
|
limit: z.number().optional().describe('Max results to return (1-100)')
|
|
578
642
|
}, function(args) {
|
|
579
643
|
return _async_to_generator(function() {
|
|
580
|
-
var results, err;
|
|
644
|
+
var publishedBy, rest, results, err;
|
|
581
645
|
return _ts_generator(this, function(_state) {
|
|
582
646
|
switch(_state.label){
|
|
583
647
|
case 0:
|
|
@@ -587,9 +651,19 @@ export function registerTools(server, api) {
|
|
|
587
651
|
,
|
|
588
652
|
3
|
|
589
653
|
]);
|
|
654
|
+
// Translate the snake_case MCP arg to the camelCase wire shape that
|
|
655
|
+
// ApiClient.find() forwards to GET /v1/artifacts. MCP convention
|
|
656
|
+
// prefers snake_case in tool schemas; the wire is camelCase
|
|
657
|
+
// (api-conventions §1.2). Without this map, `published_by` was
|
|
658
|
+
// silently dropped on the floor and the filter went unfiltered.
|
|
659
|
+
publishedBy = args.published_by, rest = _object_without_properties(args, [
|
|
660
|
+
"published_by"
|
|
661
|
+
]);
|
|
590
662
|
return [
|
|
591
663
|
4,
|
|
592
|
-
api.find(
|
|
664
|
+
api.find(_object_spread({}, rest, publishedBy !== undefined ? {
|
|
665
|
+
publishedBy: publishedBy
|
|
666
|
+
} : {}))
|
|
593
667
|
];
|
|
594
668
|
case 1:
|
|
595
669
|
results = _state.sent();
|