cmx-sdk 0.2.15 → 0.2.17
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/chunk-ZBI5OLBT.js +844 -0
- package/dist/cli.js +68 -796
- package/dist/index.d.ts +139 -9
- package/dist/index.js.map +1 -1
- package/dist/report-bug-PT7NNFNN.js +44 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11,789 +11,55 @@ import {
|
|
|
11
11
|
import "./chunk-NZQ6SBFS.js";
|
|
12
12
|
import "./chunk-EDXXR5BE.js";
|
|
13
13
|
import "./chunk-IIQLQIDP.js";
|
|
14
|
+
import {
|
|
15
|
+
assertSdkSuccess,
|
|
16
|
+
deleteManageCollectionsSlug,
|
|
17
|
+
deleteManageCollectionsSlugDataTypesDtSlug,
|
|
18
|
+
deleteManageContentsId,
|
|
19
|
+
deleteManageDataTypeSlugId,
|
|
20
|
+
deleteManageDataTypesSlug,
|
|
21
|
+
deleteManageFormDefinitionsSlug,
|
|
22
|
+
ensureApiCredentials,
|
|
23
|
+
formatApiErrorMessage,
|
|
24
|
+
getManageCollectionPresets,
|
|
25
|
+
getManageCollections,
|
|
26
|
+
getManageCollectionsSlug,
|
|
27
|
+
getManageCollectionsSlugDataTypes,
|
|
28
|
+
getManageComponents,
|
|
29
|
+
getManageContents,
|
|
30
|
+
getManageContentsId,
|
|
31
|
+
getManageContentsIdReferences,
|
|
32
|
+
getManageContentsIdValidate,
|
|
33
|
+
getManageDataTypeSlug,
|
|
34
|
+
getManageDataTypeSlugId,
|
|
35
|
+
getManageDataTypeSlugIdDeletionImpact,
|
|
36
|
+
getManageDataTypes,
|
|
37
|
+
getManageFormDefinitions,
|
|
38
|
+
installSdkFetchInterceptor,
|
|
39
|
+
patchManageDataTypeSlugId,
|
|
40
|
+
postManageCollections,
|
|
41
|
+
postManageCollectionsSlugDataTypes,
|
|
42
|
+
postManageCollectionsSlugDataTypesLink,
|
|
43
|
+
postManageComponentsSync,
|
|
44
|
+
postManageContents,
|
|
45
|
+
postManageContentsIdPublish,
|
|
46
|
+
postManageContentsIdRequestReview,
|
|
47
|
+
postManageDataTypeSlug,
|
|
48
|
+
postManageDataTypes,
|
|
49
|
+
postManageFormDefinitions,
|
|
50
|
+
putManageCollectionsSlug,
|
|
51
|
+
putManageContentsId,
|
|
52
|
+
putManageContentsIdReferences,
|
|
53
|
+
putManageDataTypesSlug,
|
|
54
|
+
putManageDocsType,
|
|
55
|
+
putManageFormDefinitionsSlug,
|
|
56
|
+
readJsonInput
|
|
57
|
+
} from "./chunk-ZBI5OLBT.js";
|
|
14
58
|
|
|
15
59
|
// src/cli.ts
|
|
16
60
|
import { Command } from "commander";
|
|
17
61
|
import { config } from "dotenv";
|
|
18
62
|
|
|
19
|
-
// src/commands/utils.ts
|
|
20
|
-
import { readFileSync } from "fs";
|
|
21
|
-
function stringifyErrorValue(value) {
|
|
22
|
-
if (typeof value === "string") return value;
|
|
23
|
-
if (value === null || value === void 0) return "";
|
|
24
|
-
if (typeof value === "object") {
|
|
25
|
-
const objectValue = value;
|
|
26
|
-
if (typeof objectValue.message === "string" && objectValue.message.length > 0) {
|
|
27
|
-
return objectValue.message;
|
|
28
|
-
}
|
|
29
|
-
try {
|
|
30
|
-
return JSON.stringify(value);
|
|
31
|
-
} catch {
|
|
32
|
-
return String(value);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return String(value);
|
|
36
|
-
}
|
|
37
|
-
function formatApiErrorPayload(payload) {
|
|
38
|
-
if (typeof payload === "string") {
|
|
39
|
-
return formatApiErrorMessage(payload);
|
|
40
|
-
}
|
|
41
|
-
const parsed = payload ?? {};
|
|
42
|
-
const main = stringifyErrorValue(parsed.error ?? parsed.message);
|
|
43
|
-
const details = stringifyErrorValue(parsed.details);
|
|
44
|
-
const code = typeof parsed.code === "string" ? parsed.code : void 0;
|
|
45
|
-
const message = [main, details].filter((part, index, parts) => part.length > 0 && parts.indexOf(part) === index).join(" | ");
|
|
46
|
-
if (code && message) return `${code}: ${message}`;
|
|
47
|
-
if (code) return code;
|
|
48
|
-
if (message) return message;
|
|
49
|
-
return "\u4E0D\u660E\u306A\u30A8\u30E9\u30FC";
|
|
50
|
-
}
|
|
51
|
-
function formatApiErrorMessage(errorBody) {
|
|
52
|
-
if (!errorBody) return "\u4E0D\u660E\u306A\u30A8\u30E9\u30FC";
|
|
53
|
-
try {
|
|
54
|
-
return formatApiErrorPayload(JSON.parse(errorBody));
|
|
55
|
-
} catch {
|
|
56
|
-
}
|
|
57
|
-
return errorBody;
|
|
58
|
-
}
|
|
59
|
-
var sdkFetchInterceptorInstalled = false;
|
|
60
|
-
function installSdkFetchInterceptor() {
|
|
61
|
-
if (sdkFetchInterceptorInstalled) return;
|
|
62
|
-
if (typeof globalThis.fetch !== "function") return;
|
|
63
|
-
const originalFetch = globalThis.fetch.bind(globalThis);
|
|
64
|
-
globalThis.fetch = async (input, init) => {
|
|
65
|
-
if (typeof input === "string" || input instanceof URL) {
|
|
66
|
-
const rawUrl = input.toString();
|
|
67
|
-
if (rawUrl.startsWith("/api/v1/sdk")) {
|
|
68
|
-
const apiUrl = process.env.CMX_API_URL;
|
|
69
|
-
const apiKey = process.env.CMX_API_KEY;
|
|
70
|
-
if (!apiUrl || !apiKey) {
|
|
71
|
-
throw new Error("\u74B0\u5883\u5909\u6570 CMX_API_URL \u3068 CMX_API_KEY \u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
72
|
-
}
|
|
73
|
-
const baseUrl = apiUrl.replace(/\/$/, "");
|
|
74
|
-
const absoluteUrl = `${baseUrl}${rawUrl}`;
|
|
75
|
-
const headers = new Headers(init?.headers);
|
|
76
|
-
headers.set("Authorization", `Bearer ${apiKey}`);
|
|
77
|
-
return originalFetch(absoluteUrl, {
|
|
78
|
-
...init,
|
|
79
|
-
headers
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return originalFetch(input, init);
|
|
84
|
-
};
|
|
85
|
-
sdkFetchInterceptorInstalled = true;
|
|
86
|
-
}
|
|
87
|
-
function assertSdkSuccess(response) {
|
|
88
|
-
if (response.status >= 200 && response.status < 300) {
|
|
89
|
-
return response.data;
|
|
90
|
-
}
|
|
91
|
-
throw new Error(`API \u30A8\u30E9\u30FC (${response.status}): ${formatApiErrorPayload(response.data)}`);
|
|
92
|
-
}
|
|
93
|
-
function readJsonInput(options) {
|
|
94
|
-
if (options.json) {
|
|
95
|
-
try {
|
|
96
|
-
return JSON.parse(options.json);
|
|
97
|
-
} catch {
|
|
98
|
-
console.error("\u30A8\u30E9\u30FC: --json \u306E JSON \u6587\u5B57\u5217\u304C\u4E0D\u6B63\u3067\u3059");
|
|
99
|
-
process.exit(1);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
if (options.file) {
|
|
103
|
-
try {
|
|
104
|
-
const content = readFileSync(options.file, "utf-8");
|
|
105
|
-
return JSON.parse(content);
|
|
106
|
-
} catch (err) {
|
|
107
|
-
console.error(`\u30A8\u30E9\u30FC: JSON \u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${options.file}`);
|
|
108
|
-
console.error(err instanceof Error ? err.message : err);
|
|
109
|
-
process.exit(1);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
console.error("\u30A8\u30E9\u30FC: --json \u307E\u305F\u306F --file \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
113
|
-
process.exit(1);
|
|
114
|
-
}
|
|
115
|
-
function ensureApiCredentials() {
|
|
116
|
-
if (!process.env.CMX_API_URL || !process.env.CMX_API_KEY) {
|
|
117
|
-
console.error("\u30A8\u30E9\u30FC: \u74B0\u5883\u5909\u6570 CMX_API_URL \u3068 CMX_API_KEY \u3092\u8A2D\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
118
|
-
process.exit(1);
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// src/core/date-reviver.ts
|
|
123
|
-
var isoDateFormat = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/;
|
|
124
|
-
function dateReviver(_key, value) {
|
|
125
|
-
if (typeof value === "string" && isoDateFormat.test(value)) {
|
|
126
|
-
return new Date(value);
|
|
127
|
-
}
|
|
128
|
-
return value;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// src/generated/sdk/endpoints/sdk.ts
|
|
132
|
-
var getGetManageCollectionsUrl = () => {
|
|
133
|
-
return `/api/v1/sdk/manage/collections`;
|
|
134
|
-
};
|
|
135
|
-
var getManageCollections = async (options) => {
|
|
136
|
-
const res = await fetch(
|
|
137
|
-
getGetManageCollectionsUrl(),
|
|
138
|
-
{
|
|
139
|
-
...options,
|
|
140
|
-
method: "GET"
|
|
141
|
-
}
|
|
142
|
-
);
|
|
143
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
144
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
145
|
-
return { data, status: res.status, headers: res.headers };
|
|
146
|
-
};
|
|
147
|
-
var getPostManageCollectionsUrl = () => {
|
|
148
|
-
return `/api/v1/sdk/manage/collections`;
|
|
149
|
-
};
|
|
150
|
-
var postManageCollections = async (createCollectionRequest, options) => {
|
|
151
|
-
const res = await fetch(
|
|
152
|
-
getPostManageCollectionsUrl(),
|
|
153
|
-
{
|
|
154
|
-
...options,
|
|
155
|
-
method: "POST",
|
|
156
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
157
|
-
body: JSON.stringify(
|
|
158
|
-
createCollectionRequest
|
|
159
|
-
)
|
|
160
|
-
}
|
|
161
|
-
);
|
|
162
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
163
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
164
|
-
return { data, status: res.status, headers: res.headers };
|
|
165
|
-
};
|
|
166
|
-
var getGetManageCollectionsSlugUrl = (slug) => {
|
|
167
|
-
return `/api/v1/sdk/manage/collections/${slug}`;
|
|
168
|
-
};
|
|
169
|
-
var getManageCollectionsSlug = async (slug, options) => {
|
|
170
|
-
const res = await fetch(
|
|
171
|
-
getGetManageCollectionsSlugUrl(slug),
|
|
172
|
-
{
|
|
173
|
-
...options,
|
|
174
|
-
method: "GET"
|
|
175
|
-
}
|
|
176
|
-
);
|
|
177
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
178
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
179
|
-
return { data, status: res.status, headers: res.headers };
|
|
180
|
-
};
|
|
181
|
-
var getPutManageCollectionsSlugUrl = (slug) => {
|
|
182
|
-
return `/api/v1/sdk/manage/collections/${slug}`;
|
|
183
|
-
};
|
|
184
|
-
var putManageCollectionsSlug = async (slug, updateCollectionRequest, options) => {
|
|
185
|
-
const res = await fetch(
|
|
186
|
-
getPutManageCollectionsSlugUrl(slug),
|
|
187
|
-
{
|
|
188
|
-
...options,
|
|
189
|
-
method: "PUT",
|
|
190
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
191
|
-
body: JSON.stringify(
|
|
192
|
-
updateCollectionRequest
|
|
193
|
-
)
|
|
194
|
-
}
|
|
195
|
-
);
|
|
196
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
197
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
198
|
-
return { data, status: res.status, headers: res.headers };
|
|
199
|
-
};
|
|
200
|
-
var getDeleteManageCollectionsSlugUrl = (slug) => {
|
|
201
|
-
return `/api/v1/sdk/manage/collections/${slug}`;
|
|
202
|
-
};
|
|
203
|
-
var deleteManageCollectionsSlug = async (slug, options) => {
|
|
204
|
-
const res = await fetch(
|
|
205
|
-
getDeleteManageCollectionsSlugUrl(slug),
|
|
206
|
-
{
|
|
207
|
-
...options,
|
|
208
|
-
method: "DELETE"
|
|
209
|
-
}
|
|
210
|
-
);
|
|
211
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
212
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
213
|
-
return { data, status: res.status, headers: res.headers };
|
|
214
|
-
};
|
|
215
|
-
var getGetManageDataTypesUrl = () => {
|
|
216
|
-
return `/api/v1/sdk/manage/data-types`;
|
|
217
|
-
};
|
|
218
|
-
var getManageDataTypes = async (options) => {
|
|
219
|
-
const res = await fetch(
|
|
220
|
-
getGetManageDataTypesUrl(),
|
|
221
|
-
{
|
|
222
|
-
...options,
|
|
223
|
-
method: "GET"
|
|
224
|
-
}
|
|
225
|
-
);
|
|
226
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
227
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
228
|
-
return { data, status: res.status, headers: res.headers };
|
|
229
|
-
};
|
|
230
|
-
var getPostManageDataTypesUrl = () => {
|
|
231
|
-
return `/api/v1/sdk/manage/data-types`;
|
|
232
|
-
};
|
|
233
|
-
var postManageDataTypes = async (createDataTypeRequest, options) => {
|
|
234
|
-
const res = await fetch(
|
|
235
|
-
getPostManageDataTypesUrl(),
|
|
236
|
-
{
|
|
237
|
-
...options,
|
|
238
|
-
method: "POST",
|
|
239
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
240
|
-
body: JSON.stringify(
|
|
241
|
-
createDataTypeRequest
|
|
242
|
-
)
|
|
243
|
-
}
|
|
244
|
-
);
|
|
245
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
246
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
247
|
-
return { data, status: res.status, headers: res.headers };
|
|
248
|
-
};
|
|
249
|
-
var getPutManageDataTypesSlugUrl = (slug) => {
|
|
250
|
-
return `/api/v1/sdk/manage/data-types/${slug}`;
|
|
251
|
-
};
|
|
252
|
-
var putManageDataTypesSlug = async (slug, updateDataTypeRequest, options) => {
|
|
253
|
-
const res = await fetch(
|
|
254
|
-
getPutManageDataTypesSlugUrl(slug),
|
|
255
|
-
{
|
|
256
|
-
...options,
|
|
257
|
-
method: "PUT",
|
|
258
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
259
|
-
body: JSON.stringify(
|
|
260
|
-
updateDataTypeRequest
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
);
|
|
264
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
265
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
266
|
-
return { data, status: res.status, headers: res.headers };
|
|
267
|
-
};
|
|
268
|
-
var getDeleteManageDataTypesSlugUrl = (slug) => {
|
|
269
|
-
return `/api/v1/sdk/manage/data-types/${slug}`;
|
|
270
|
-
};
|
|
271
|
-
var deleteManageDataTypesSlug = async (slug, options) => {
|
|
272
|
-
const res = await fetch(
|
|
273
|
-
getDeleteManageDataTypesSlugUrl(slug),
|
|
274
|
-
{
|
|
275
|
-
...options,
|
|
276
|
-
method: "DELETE"
|
|
277
|
-
}
|
|
278
|
-
);
|
|
279
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
280
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
281
|
-
return { data, status: res.status, headers: res.headers };
|
|
282
|
-
};
|
|
283
|
-
var getGetManageDataTypeSlugUrl = (typeSlug, params) => {
|
|
284
|
-
const normalizedParams = new URLSearchParams();
|
|
285
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
286
|
-
if (value !== void 0) {
|
|
287
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
288
|
-
}
|
|
289
|
-
});
|
|
290
|
-
const stringifiedParams = normalizedParams.toString();
|
|
291
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}`;
|
|
292
|
-
};
|
|
293
|
-
var getManageDataTypeSlug = async (typeSlug, params, options) => {
|
|
294
|
-
const res = await fetch(
|
|
295
|
-
getGetManageDataTypeSlugUrl(typeSlug, params),
|
|
296
|
-
{
|
|
297
|
-
...options,
|
|
298
|
-
method: "GET"
|
|
299
|
-
}
|
|
300
|
-
);
|
|
301
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
302
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
303
|
-
return { data, status: res.status, headers: res.headers };
|
|
304
|
-
};
|
|
305
|
-
var getPostManageDataTypeSlugUrl = (typeSlug) => {
|
|
306
|
-
return `/api/v1/sdk/manage/data/${typeSlug}`;
|
|
307
|
-
};
|
|
308
|
-
var postManageDataTypeSlug = async (typeSlug, sdkCreateEntryRequest, options) => {
|
|
309
|
-
const res = await fetch(
|
|
310
|
-
getPostManageDataTypeSlugUrl(typeSlug),
|
|
311
|
-
{
|
|
312
|
-
...options,
|
|
313
|
-
method: "POST",
|
|
314
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
315
|
-
body: JSON.stringify(
|
|
316
|
-
sdkCreateEntryRequest
|
|
317
|
-
)
|
|
318
|
-
}
|
|
319
|
-
);
|
|
320
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
321
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
322
|
-
return { data, status: res.status, headers: res.headers };
|
|
323
|
-
};
|
|
324
|
-
var getGetManageDataTypeSlugIdUrl = (typeSlug, id, params) => {
|
|
325
|
-
const normalizedParams = new URLSearchParams();
|
|
326
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
327
|
-
if (value !== void 0) {
|
|
328
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
const stringifiedParams = normalizedParams.toString();
|
|
332
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`;
|
|
333
|
-
};
|
|
334
|
-
var getManageDataTypeSlugId = async (typeSlug, id, params, options) => {
|
|
335
|
-
const res = await fetch(
|
|
336
|
-
getGetManageDataTypeSlugIdUrl(typeSlug, id, params),
|
|
337
|
-
{
|
|
338
|
-
...options,
|
|
339
|
-
method: "GET"
|
|
340
|
-
}
|
|
341
|
-
);
|
|
342
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
343
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
344
|
-
return { data, status: res.status, headers: res.headers };
|
|
345
|
-
};
|
|
346
|
-
var getPatchManageDataTypeSlugIdUrl = (typeSlug, id) => {
|
|
347
|
-
return `/api/v1/sdk/manage/data/${typeSlug}/${id}`;
|
|
348
|
-
};
|
|
349
|
-
var patchManageDataTypeSlugId = async (typeSlug, id, sdkUpdateEntryRequest, options) => {
|
|
350
|
-
const res = await fetch(
|
|
351
|
-
getPatchManageDataTypeSlugIdUrl(typeSlug, id),
|
|
352
|
-
{
|
|
353
|
-
...options,
|
|
354
|
-
method: "PATCH",
|
|
355
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
356
|
-
body: JSON.stringify(
|
|
357
|
-
sdkUpdateEntryRequest
|
|
358
|
-
)
|
|
359
|
-
}
|
|
360
|
-
);
|
|
361
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
362
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
363
|
-
return { data, status: res.status, headers: res.headers };
|
|
364
|
-
};
|
|
365
|
-
var getDeleteManageDataTypeSlugIdUrl = (typeSlug, id, params) => {
|
|
366
|
-
const normalizedParams = new URLSearchParams();
|
|
367
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
368
|
-
if (value !== void 0) {
|
|
369
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
const stringifiedParams = normalizedParams.toString();
|
|
373
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/data/${typeSlug}/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/data/${typeSlug}/${id}`;
|
|
374
|
-
};
|
|
375
|
-
var deleteManageDataTypeSlugId = async (typeSlug, id, params, options) => {
|
|
376
|
-
const res = await fetch(
|
|
377
|
-
getDeleteManageDataTypeSlugIdUrl(typeSlug, id, params),
|
|
378
|
-
{
|
|
379
|
-
...options,
|
|
380
|
-
method: "DELETE"
|
|
381
|
-
}
|
|
382
|
-
);
|
|
383
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
384
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
385
|
-
return { data, status: res.status, headers: res.headers };
|
|
386
|
-
};
|
|
387
|
-
var getGetManageDataTypeSlugIdDeletionImpactUrl = (typeSlug, id) => {
|
|
388
|
-
return `/api/v1/sdk/manage/data/${typeSlug}/${id}/deletion-impact`;
|
|
389
|
-
};
|
|
390
|
-
var getManageDataTypeSlugIdDeletionImpact = async (typeSlug, id, options) => {
|
|
391
|
-
const res = await fetch(
|
|
392
|
-
getGetManageDataTypeSlugIdDeletionImpactUrl(typeSlug, id),
|
|
393
|
-
{
|
|
394
|
-
...options,
|
|
395
|
-
method: "GET"
|
|
396
|
-
}
|
|
397
|
-
);
|
|
398
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
399
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
400
|
-
return { data, status: res.status, headers: res.headers };
|
|
401
|
-
};
|
|
402
|
-
var getGetManageComponentsUrl = () => {
|
|
403
|
-
return `/api/v1/sdk/manage/components`;
|
|
404
|
-
};
|
|
405
|
-
var getManageComponents = async (options) => {
|
|
406
|
-
const res = await fetch(
|
|
407
|
-
getGetManageComponentsUrl(),
|
|
408
|
-
{
|
|
409
|
-
...options,
|
|
410
|
-
method: "GET"
|
|
411
|
-
}
|
|
412
|
-
);
|
|
413
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
414
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
415
|
-
return { data, status: res.status, headers: res.headers };
|
|
416
|
-
};
|
|
417
|
-
var getPostManageComponentsSyncUrl = () => {
|
|
418
|
-
return `/api/v1/sdk/manage/components/sync`;
|
|
419
|
-
};
|
|
420
|
-
var postManageComponentsSync = async (sdkComponentSyncRequest, options) => {
|
|
421
|
-
const res = await fetch(
|
|
422
|
-
getPostManageComponentsSyncUrl(),
|
|
423
|
-
{
|
|
424
|
-
...options,
|
|
425
|
-
method: "POST",
|
|
426
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
427
|
-
body: JSON.stringify(
|
|
428
|
-
sdkComponentSyncRequest
|
|
429
|
-
)
|
|
430
|
-
}
|
|
431
|
-
);
|
|
432
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
433
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
434
|
-
return { data, status: res.status, headers: res.headers };
|
|
435
|
-
};
|
|
436
|
-
var getGetManageFormDefinitionsUrl = () => {
|
|
437
|
-
return `/api/v1/sdk/manage/form-definitions`;
|
|
438
|
-
};
|
|
439
|
-
var getManageFormDefinitions = async (options) => {
|
|
440
|
-
const res = await fetch(
|
|
441
|
-
getGetManageFormDefinitionsUrl(),
|
|
442
|
-
{
|
|
443
|
-
...options,
|
|
444
|
-
method: "GET"
|
|
445
|
-
}
|
|
446
|
-
);
|
|
447
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
448
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
449
|
-
return { data, status: res.status, headers: res.headers };
|
|
450
|
-
};
|
|
451
|
-
var getPostManageFormDefinitionsUrl = () => {
|
|
452
|
-
return `/api/v1/sdk/manage/form-definitions`;
|
|
453
|
-
};
|
|
454
|
-
var postManageFormDefinitions = async (createFormDefinitionRequest, options) => {
|
|
455
|
-
const res = await fetch(
|
|
456
|
-
getPostManageFormDefinitionsUrl(),
|
|
457
|
-
{
|
|
458
|
-
...options,
|
|
459
|
-
method: "POST",
|
|
460
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
461
|
-
body: JSON.stringify(
|
|
462
|
-
createFormDefinitionRequest
|
|
463
|
-
)
|
|
464
|
-
}
|
|
465
|
-
);
|
|
466
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
467
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
468
|
-
return { data, status: res.status, headers: res.headers };
|
|
469
|
-
};
|
|
470
|
-
var getPutManageFormDefinitionsSlugUrl = (slug) => {
|
|
471
|
-
return `/api/v1/sdk/manage/form-definitions/${slug}`;
|
|
472
|
-
};
|
|
473
|
-
var putManageFormDefinitionsSlug = async (slug, updateFormDefinitionRequest, options) => {
|
|
474
|
-
const res = await fetch(
|
|
475
|
-
getPutManageFormDefinitionsSlugUrl(slug),
|
|
476
|
-
{
|
|
477
|
-
...options,
|
|
478
|
-
method: "PUT",
|
|
479
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
480
|
-
body: JSON.stringify(
|
|
481
|
-
updateFormDefinitionRequest
|
|
482
|
-
)
|
|
483
|
-
}
|
|
484
|
-
);
|
|
485
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
486
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
487
|
-
return { data, status: res.status, headers: res.headers };
|
|
488
|
-
};
|
|
489
|
-
var getDeleteManageFormDefinitionsSlugUrl = (slug) => {
|
|
490
|
-
return `/api/v1/sdk/manage/form-definitions/${slug}`;
|
|
491
|
-
};
|
|
492
|
-
var deleteManageFormDefinitionsSlug = async (slug, options) => {
|
|
493
|
-
const res = await fetch(
|
|
494
|
-
getDeleteManageFormDefinitionsSlugUrl(slug),
|
|
495
|
-
{
|
|
496
|
-
...options,
|
|
497
|
-
method: "DELETE"
|
|
498
|
-
}
|
|
499
|
-
);
|
|
500
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
501
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
502
|
-
return { data, status: res.status, headers: res.headers };
|
|
503
|
-
};
|
|
504
|
-
var getGetManageCollectionsSlugDataTypesUrl = (slug) => {
|
|
505
|
-
return `/api/v1/sdk/manage/collections/${slug}/data-types`;
|
|
506
|
-
};
|
|
507
|
-
var getManageCollectionsSlugDataTypes = async (slug, options) => {
|
|
508
|
-
const res = await fetch(
|
|
509
|
-
getGetManageCollectionsSlugDataTypesUrl(slug),
|
|
510
|
-
{
|
|
511
|
-
...options,
|
|
512
|
-
method: "GET"
|
|
513
|
-
}
|
|
514
|
-
);
|
|
515
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
516
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
517
|
-
return { data, status: res.status, headers: res.headers };
|
|
518
|
-
};
|
|
519
|
-
var getPostManageCollectionsSlugDataTypesUrl = (slug) => {
|
|
520
|
-
return `/api/v1/sdk/manage/collections/${slug}/data-types`;
|
|
521
|
-
};
|
|
522
|
-
var postManageCollectionsSlugDataTypes = async (slug, sdkAddCollectionDataTypeRequest, options) => {
|
|
523
|
-
const res = await fetch(
|
|
524
|
-
getPostManageCollectionsSlugDataTypesUrl(slug),
|
|
525
|
-
{
|
|
526
|
-
...options,
|
|
527
|
-
method: "POST",
|
|
528
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
529
|
-
body: JSON.stringify(
|
|
530
|
-
sdkAddCollectionDataTypeRequest
|
|
531
|
-
)
|
|
532
|
-
}
|
|
533
|
-
);
|
|
534
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
535
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
536
|
-
return { data, status: res.status, headers: res.headers };
|
|
537
|
-
};
|
|
538
|
-
var getDeleteManageCollectionsSlugDataTypesDtSlugUrl = (slug, dtSlug) => {
|
|
539
|
-
return `/api/v1/sdk/manage/collections/${slug}/data-types/${dtSlug}`;
|
|
540
|
-
};
|
|
541
|
-
var deleteManageCollectionsSlugDataTypesDtSlug = async (slug, dtSlug, options) => {
|
|
542
|
-
const res = await fetch(
|
|
543
|
-
getDeleteManageCollectionsSlugDataTypesDtSlugUrl(slug, dtSlug),
|
|
544
|
-
{
|
|
545
|
-
...options,
|
|
546
|
-
method: "DELETE"
|
|
547
|
-
}
|
|
548
|
-
);
|
|
549
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
550
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
551
|
-
return { data, status: res.status, headers: res.headers };
|
|
552
|
-
};
|
|
553
|
-
var getPostManageCollectionsSlugDataTypesLinkUrl = (slug) => {
|
|
554
|
-
return `/api/v1/sdk/manage/collections/${slug}/data-types/link`;
|
|
555
|
-
};
|
|
556
|
-
var postManageCollectionsSlugDataTypesLink = async (slug, sdkLinkExistingDataTypeRequest, options) => {
|
|
557
|
-
const res = await fetch(
|
|
558
|
-
getPostManageCollectionsSlugDataTypesLinkUrl(slug),
|
|
559
|
-
{
|
|
560
|
-
...options,
|
|
561
|
-
method: "POST",
|
|
562
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
563
|
-
body: JSON.stringify(
|
|
564
|
-
sdkLinkExistingDataTypeRequest
|
|
565
|
-
)
|
|
566
|
-
}
|
|
567
|
-
);
|
|
568
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
569
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
570
|
-
return { data, status: res.status, headers: res.headers };
|
|
571
|
-
};
|
|
572
|
-
var getGetManageCollectionPresetsUrl = (params) => {
|
|
573
|
-
const normalizedParams = new URLSearchParams();
|
|
574
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
575
|
-
if (value !== void 0) {
|
|
576
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
577
|
-
}
|
|
578
|
-
});
|
|
579
|
-
const stringifiedParams = normalizedParams.toString();
|
|
580
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/collection-presets?${stringifiedParams}` : `/api/v1/sdk/manage/collection-presets`;
|
|
581
|
-
};
|
|
582
|
-
var getManageCollectionPresets = async (params, options) => {
|
|
583
|
-
const res = await fetch(
|
|
584
|
-
getGetManageCollectionPresetsUrl(params),
|
|
585
|
-
{
|
|
586
|
-
...options,
|
|
587
|
-
method: "GET"
|
|
588
|
-
}
|
|
589
|
-
);
|
|
590
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
591
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
592
|
-
return { data, status: res.status, headers: res.headers };
|
|
593
|
-
};
|
|
594
|
-
var getPostManageContentsUrl = () => {
|
|
595
|
-
return `/api/v1/sdk/manage/contents`;
|
|
596
|
-
};
|
|
597
|
-
var postManageContents = async (createContentRequest, options) => {
|
|
598
|
-
const res = await fetch(
|
|
599
|
-
getPostManageContentsUrl(),
|
|
600
|
-
{
|
|
601
|
-
...options,
|
|
602
|
-
method: "POST",
|
|
603
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
604
|
-
body: JSON.stringify(
|
|
605
|
-
createContentRequest
|
|
606
|
-
)
|
|
607
|
-
}
|
|
608
|
-
);
|
|
609
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
610
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
611
|
-
return { data, status: res.status, headers: res.headers };
|
|
612
|
-
};
|
|
613
|
-
var getGetManageContentsUrl = (params) => {
|
|
614
|
-
const normalizedParams = new URLSearchParams();
|
|
615
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
616
|
-
if (value !== void 0) {
|
|
617
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
618
|
-
}
|
|
619
|
-
});
|
|
620
|
-
const stringifiedParams = normalizedParams.toString();
|
|
621
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents?${stringifiedParams}` : `/api/v1/sdk/manage/contents`;
|
|
622
|
-
};
|
|
623
|
-
var getManageContents = async (params, options) => {
|
|
624
|
-
const res = await fetch(
|
|
625
|
-
getGetManageContentsUrl(params),
|
|
626
|
-
{
|
|
627
|
-
...options,
|
|
628
|
-
method: "GET"
|
|
629
|
-
}
|
|
630
|
-
);
|
|
631
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
632
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
633
|
-
return { data, status: res.status, headers: res.headers };
|
|
634
|
-
};
|
|
635
|
-
var getPostManageContentsIdRequestReviewUrl = (id) => {
|
|
636
|
-
return `/api/v1/sdk/manage/contents/${id}/request-review`;
|
|
637
|
-
};
|
|
638
|
-
var postManageContentsIdRequestReview = async (id, options) => {
|
|
639
|
-
const res = await fetch(
|
|
640
|
-
getPostManageContentsIdRequestReviewUrl(id),
|
|
641
|
-
{
|
|
642
|
-
...options,
|
|
643
|
-
method: "POST"
|
|
644
|
-
}
|
|
645
|
-
);
|
|
646
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
647
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
648
|
-
return { data, status: res.status, headers: res.headers };
|
|
649
|
-
};
|
|
650
|
-
var getPostManageContentsIdPublishUrl = (id) => {
|
|
651
|
-
return `/api/v1/sdk/manage/contents/${id}/publish`;
|
|
652
|
-
};
|
|
653
|
-
var postManageContentsIdPublish = async (id, options) => {
|
|
654
|
-
const res = await fetch(
|
|
655
|
-
getPostManageContentsIdPublishUrl(id),
|
|
656
|
-
{
|
|
657
|
-
...options,
|
|
658
|
-
method: "POST"
|
|
659
|
-
}
|
|
660
|
-
);
|
|
661
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
662
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
663
|
-
return { data, status: res.status, headers: res.headers };
|
|
664
|
-
};
|
|
665
|
-
var getGetManageContentsIdReferencesUrl = (id) => {
|
|
666
|
-
return `/api/v1/sdk/manage/contents/${id}/references`;
|
|
667
|
-
};
|
|
668
|
-
var getManageContentsIdReferences = async (id, options) => {
|
|
669
|
-
const res = await fetch(
|
|
670
|
-
getGetManageContentsIdReferencesUrl(id),
|
|
671
|
-
{
|
|
672
|
-
...options,
|
|
673
|
-
method: "GET"
|
|
674
|
-
}
|
|
675
|
-
);
|
|
676
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
677
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
678
|
-
return { data, status: res.status, headers: res.headers };
|
|
679
|
-
};
|
|
680
|
-
var getPutManageContentsIdReferencesUrl = (id) => {
|
|
681
|
-
return `/api/v1/sdk/manage/contents/${id}/references`;
|
|
682
|
-
};
|
|
683
|
-
var putManageContentsIdReferences = async (id, sdkSetContentReferencesRequest, options) => {
|
|
684
|
-
const res = await fetch(
|
|
685
|
-
getPutManageContentsIdReferencesUrl(id),
|
|
686
|
-
{
|
|
687
|
-
...options,
|
|
688
|
-
method: "PUT",
|
|
689
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
690
|
-
body: JSON.stringify(
|
|
691
|
-
sdkSetContentReferencesRequest
|
|
692
|
-
)
|
|
693
|
-
}
|
|
694
|
-
);
|
|
695
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
696
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
697
|
-
return { data, status: res.status, headers: res.headers };
|
|
698
|
-
};
|
|
699
|
-
var getGetManageContentsIdUrl = (id, params) => {
|
|
700
|
-
const normalizedParams = new URLSearchParams();
|
|
701
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
702
|
-
if (value !== void 0) {
|
|
703
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
704
|
-
}
|
|
705
|
-
});
|
|
706
|
-
const stringifiedParams = normalizedParams.toString();
|
|
707
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`;
|
|
708
|
-
};
|
|
709
|
-
var getManageContentsId = async (id, params, options) => {
|
|
710
|
-
const res = await fetch(
|
|
711
|
-
getGetManageContentsIdUrl(id, params),
|
|
712
|
-
{
|
|
713
|
-
...options,
|
|
714
|
-
method: "GET"
|
|
715
|
-
}
|
|
716
|
-
);
|
|
717
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
718
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
719
|
-
return { data, status: res.status, headers: res.headers };
|
|
720
|
-
};
|
|
721
|
-
var getPutManageContentsIdUrl = (id) => {
|
|
722
|
-
return `/api/v1/sdk/manage/contents/${id}`;
|
|
723
|
-
};
|
|
724
|
-
var putManageContentsId = async (id, updateContentRequest, options) => {
|
|
725
|
-
const res = await fetch(
|
|
726
|
-
getPutManageContentsIdUrl(id),
|
|
727
|
-
{
|
|
728
|
-
...options,
|
|
729
|
-
method: "PUT",
|
|
730
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
731
|
-
body: JSON.stringify(
|
|
732
|
-
updateContentRequest
|
|
733
|
-
)
|
|
734
|
-
}
|
|
735
|
-
);
|
|
736
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
737
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
738
|
-
return { data, status: res.status, headers: res.headers };
|
|
739
|
-
};
|
|
740
|
-
var getDeleteManageContentsIdUrl = (id, params) => {
|
|
741
|
-
const normalizedParams = new URLSearchParams();
|
|
742
|
-
Object.entries(params || {}).forEach(([key, value]) => {
|
|
743
|
-
if (value !== void 0) {
|
|
744
|
-
normalizedParams.append(key, value === null ? "null" : value.toString());
|
|
745
|
-
}
|
|
746
|
-
});
|
|
747
|
-
const stringifiedParams = normalizedParams.toString();
|
|
748
|
-
return stringifiedParams.length > 0 ? `/api/v1/sdk/manage/contents/${id}?${stringifiedParams}` : `/api/v1/sdk/manage/contents/${id}`;
|
|
749
|
-
};
|
|
750
|
-
var deleteManageContentsId = async (id, params, options) => {
|
|
751
|
-
const res = await fetch(
|
|
752
|
-
getDeleteManageContentsIdUrl(id, params),
|
|
753
|
-
{
|
|
754
|
-
...options,
|
|
755
|
-
method: "DELETE"
|
|
756
|
-
}
|
|
757
|
-
);
|
|
758
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
759
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
760
|
-
return { data, status: res.status, headers: res.headers };
|
|
761
|
-
};
|
|
762
|
-
var getGetManageContentsIdValidateUrl = (id) => {
|
|
763
|
-
return `/api/v1/sdk/manage/contents/${id}/validate`;
|
|
764
|
-
};
|
|
765
|
-
var getManageContentsIdValidate = async (id, options) => {
|
|
766
|
-
const res = await fetch(
|
|
767
|
-
getGetManageContentsIdValidateUrl(id),
|
|
768
|
-
{
|
|
769
|
-
...options,
|
|
770
|
-
method: "GET"
|
|
771
|
-
}
|
|
772
|
-
);
|
|
773
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
774
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
775
|
-
return { data, status: res.status, headers: res.headers };
|
|
776
|
-
};
|
|
777
|
-
var getPutManageDocsTypeUrl = (type) => {
|
|
778
|
-
return `/api/v1/sdk/manage/docs/${type}`;
|
|
779
|
-
};
|
|
780
|
-
var putManageDocsType = async (type, sdkUpsertDocBody, options) => {
|
|
781
|
-
const res = await fetch(
|
|
782
|
-
getPutManageDocsTypeUrl(type),
|
|
783
|
-
{
|
|
784
|
-
...options,
|
|
785
|
-
method: "PUT",
|
|
786
|
-
headers: { "Content-Type": "application/json", ...options?.headers },
|
|
787
|
-
body: JSON.stringify(
|
|
788
|
-
sdkUpsertDocBody
|
|
789
|
-
)
|
|
790
|
-
}
|
|
791
|
-
);
|
|
792
|
-
const body = [204, 205, 304].includes(res.status) ? null : await res.text();
|
|
793
|
-
const data = body ? JSON.parse(body, dateReviver) : {};
|
|
794
|
-
return { data, status: res.status, headers: res.headers };
|
|
795
|
-
};
|
|
796
|
-
|
|
797
63
|
// src/commands/list-collections.ts
|
|
798
64
|
async function listCollections() {
|
|
799
65
|
ensureApiCredentials();
|
|
@@ -1198,7 +464,7 @@ async function deleteForm(options) {
|
|
|
1198
464
|
}
|
|
1199
465
|
|
|
1200
466
|
// src/commands/sync-components.ts
|
|
1201
|
-
import { readdirSync, readFileSync
|
|
467
|
+
import { readdirSync, readFileSync, existsSync } from "fs";
|
|
1202
468
|
import { join } from "path";
|
|
1203
469
|
import { z as z2 } from "zod";
|
|
1204
470
|
|
|
@@ -1726,7 +992,7 @@ function readComponentDefinitions(componentsDir) {
|
|
|
1726
992
|
for (const file of files) {
|
|
1727
993
|
try {
|
|
1728
994
|
const filePath = join(componentsDir, file);
|
|
1729
|
-
const content =
|
|
995
|
+
const content = readFileSync(filePath, "utf-8");
|
|
1730
996
|
const parsed = JSON.parse(content);
|
|
1731
997
|
const result = ComponentDefinitionSchema.safeParse(parsed);
|
|
1732
998
|
if (!result.success) {
|
|
@@ -1779,7 +1045,7 @@ async function syncComponents() {
|
|
|
1779
1045
|
}
|
|
1780
1046
|
|
|
1781
1047
|
// src/commands/sync-docs.ts
|
|
1782
|
-
import { readFileSync as
|
|
1048
|
+
import { readFileSync as readFileSync2, existsSync as existsSync2 } from "fs";
|
|
1783
1049
|
import { join as join2 } from "path";
|
|
1784
1050
|
var DOC_FILES = [
|
|
1785
1051
|
{ type: "style_guide", file: "cmx/style-guide.md", label: "\u30B9\u30BF\u30A4\u30EB\u30AC\u30A4\u30C9" }
|
|
@@ -1795,7 +1061,7 @@ async function syncDocs() {
|
|
|
1795
1061
|
results.push({ type, label, status: "skipped" });
|
|
1796
1062
|
continue;
|
|
1797
1063
|
}
|
|
1798
|
-
const markdown =
|
|
1064
|
+
const markdown = readFileSync2(filePath, "utf-8");
|
|
1799
1065
|
console.log(` ${label} \u3092\u540C\u671F\u3057\u3066\u3044\u307E\u3059...`);
|
|
1800
1066
|
assertSdkSuccess(await putManageDocsType(type, { markdown }));
|
|
1801
1067
|
results.push({ type, label, status: "synced" });
|
|
@@ -3649,7 +2915,7 @@ async function deleteDataEntry(options) {
|
|
|
3649
2915
|
}
|
|
3650
2916
|
|
|
3651
2917
|
// src/commands/scaffold-component.ts
|
|
3652
|
-
import { existsSync as existsSync4, mkdirSync, readFileSync as
|
|
2918
|
+
import { existsSync as existsSync4, mkdirSync, readFileSync as readFileSync3, writeFileSync } from "fs";
|
|
3653
2919
|
import { join as join5 } from "path";
|
|
3654
2920
|
function toPascalCase(input) {
|
|
3655
2921
|
const cleaned = input.replace(/[^a-zA-Z0-9_-]/g, "-");
|
|
@@ -3670,7 +2936,7 @@ function ensureExport(indexPath, exportName) {
|
|
|
3670
2936
|
writeFileSync(indexPath, exportLine, "utf-8");
|
|
3671
2937
|
return;
|
|
3672
2938
|
}
|
|
3673
|
-
const current =
|
|
2939
|
+
const current = readFileSync3(indexPath, "utf-8");
|
|
3674
2940
|
if (current.includes(exportLine.trim())) {
|
|
3675
2941
|
return;
|
|
3676
2942
|
}
|
|
@@ -3762,7 +3028,7 @@ export function ${pascalName}({ title, children }: ${pascalName}Props) {
|
|
|
3762
3028
|
}
|
|
3763
3029
|
|
|
3764
3030
|
// src/commands/codegen-check.ts
|
|
3765
|
-
import { existsSync as existsSync5, readFileSync as
|
|
3031
|
+
import { existsSync as existsSync5, readFileSync as readFileSync4, readdirSync as readdirSync2, statSync } from "fs";
|
|
3766
3032
|
import { extname, join as join6, relative, resolve as resolve2 } from "path";
|
|
3767
3033
|
import stripJsonComments from "strip-json-comments";
|
|
3768
3034
|
function stripTrailingCommas(input) {
|
|
@@ -3839,7 +3105,7 @@ async function runCodegenCheck(options = {}) {
|
|
|
3839
3105
|
errors.push(`tsconfig \u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${relative(projectRoot, tsconfigAbs)}`);
|
|
3840
3106
|
} else {
|
|
3841
3107
|
try {
|
|
3842
|
-
const raw =
|
|
3108
|
+
const raw = readFileSync4(tsconfigAbs, "utf-8");
|
|
3843
3109
|
const parsed = JSON.parse(stripTrailingCommas(stripJsonComments(raw)));
|
|
3844
3110
|
const aliasValues = parsed.compilerOptions?.paths?.["@cmx/*"] ?? [];
|
|
3845
3111
|
if (aliasValues.length === 0) {
|
|
@@ -3872,7 +3138,7 @@ async function runCodegenCheck(options = {}) {
|
|
|
3872
3138
|
const legacyImportHits = [];
|
|
3873
3139
|
const generatedImportHits = [];
|
|
3874
3140
|
for (const sourceFile of sourceFiles) {
|
|
3875
|
-
const code =
|
|
3141
|
+
const code = readFileSync4(sourceFile, "utf-8");
|
|
3876
3142
|
const imports = extractImports(code);
|
|
3877
3143
|
for (const importPath of imports) {
|
|
3878
3144
|
if (importPath.startsWith("@/cmx/generated")) {
|
|
@@ -3938,7 +3204,7 @@ Codegen \u30C1\u30A7\u30C3\u30AF\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${pr
|
|
|
3938
3204
|
}
|
|
3939
3205
|
|
|
3940
3206
|
// src/commands/mdx-validate.ts
|
|
3941
|
-
import { existsSync as existsSync6, readFileSync as
|
|
3207
|
+
import { existsSync as existsSync6, readFileSync as readFileSync5, readdirSync as readdirSync3, statSync as statSync2 } from "fs";
|
|
3942
3208
|
import { extname as extname2, join as join7, relative as relative2, resolve as resolve3 } from "path";
|
|
3943
3209
|
|
|
3944
3210
|
// src/mdx/validator.ts
|
|
@@ -4267,7 +3533,7 @@ async function mdxValidate(options) {
|
|
|
4267
3533
|
let invalidCount = 0;
|
|
4268
3534
|
let warningCount = 0;
|
|
4269
3535
|
for (const filePath of targets) {
|
|
4270
|
-
const mdx =
|
|
3536
|
+
const mdx = readFileSync5(filePath, "utf-8");
|
|
4271
3537
|
const result = await validateMdx(mdx);
|
|
4272
3538
|
const relPath = relative2(projectRoot, filePath);
|
|
4273
3539
|
if (result.valid) {
|
|
@@ -4297,7 +3563,7 @@ async function mdxValidate(options) {
|
|
|
4297
3563
|
}
|
|
4298
3564
|
|
|
4299
3565
|
// src/commands/mdx-doctor.ts
|
|
4300
|
-
import { existsSync as existsSync7, readFileSync as
|
|
3566
|
+
import { existsSync as existsSync7, readFileSync as readFileSync6, readdirSync as readdirSync4, statSync as statSync3 } from "fs";
|
|
4301
3567
|
import { basename, extname as extname3, join as join8, relative as relative3, resolve as resolve4 } from "path";
|
|
4302
3568
|
function collectFiles2(rootDir, extension) {
|
|
4303
3569
|
const files = [];
|
|
@@ -4326,7 +3592,7 @@ function parseDefinitionFiles(projectRoot, files) {
|
|
|
4326
3592
|
const errors = [];
|
|
4327
3593
|
for (const file of files) {
|
|
4328
3594
|
try {
|
|
4329
|
-
const raw =
|
|
3595
|
+
const raw = readFileSync6(file, "utf-8");
|
|
4330
3596
|
const parsed = JSON.parse(raw);
|
|
4331
3597
|
if (typeof parsed.name !== "string" || parsed.name.length === 0) {
|
|
4332
3598
|
errors.push(`${relative3(projectRoot, file)}: \u6587\u5B57\u5217\u306E 'name' \u304C\u5FC5\u8981\u3067\u3059`);
|
|
@@ -4405,7 +3671,7 @@ async function mdxDoctor(options = {}) {
|
|
|
4405
3671
|
if (!existsSync7(indexFile)) {
|
|
4406
3672
|
issues.push(`\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u7528 index \u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: ${relative3(projectRoot, indexFile)}`);
|
|
4407
3673
|
} else {
|
|
4408
|
-
const indexContent =
|
|
3674
|
+
const indexContent = readFileSync6(indexFile, "utf-8");
|
|
4409
3675
|
const exportedNames = collectExportedComponentNames(indexContent);
|
|
4410
3676
|
for (const implName of implementationNames) {
|
|
4411
3677
|
if (!exportedNames.has(implName)) {
|
|
@@ -4462,7 +3728,7 @@ async function getContent(options) {
|
|
|
4462
3728
|
}
|
|
4463
3729
|
|
|
4464
3730
|
// src/commands/update-content.ts
|
|
4465
|
-
import { readFileSync as
|
|
3731
|
+
import { readFileSync as readFileSync7 } from "fs";
|
|
4466
3732
|
async function updateContent(options) {
|
|
4467
3733
|
ensureApiCredentials();
|
|
4468
3734
|
if (!options.id) {
|
|
@@ -4476,7 +3742,7 @@ async function updateContent(options) {
|
|
|
4476
3742
|
if (options.status !== void 0) body.status = options.status;
|
|
4477
3743
|
if (options.mdxFile) {
|
|
4478
3744
|
try {
|
|
4479
|
-
body.mdx =
|
|
3745
|
+
body.mdx = readFileSync7(options.mdxFile, "utf-8");
|
|
4480
3746
|
} catch {
|
|
4481
3747
|
console.error(`\u30A8\u30E9\u30FC: MDX\u30D5\u30A1\u30A4\u30EB\u306E\u8AAD\u307F\u8FBC\u307F\u306B\u5931\u6557\u3057\u307E\u3057\u305F: ${options.mdxFile}`);
|
|
4482
3748
|
process.exit(1);
|
|
@@ -4677,6 +3943,7 @@ async function uploadAsset(options) {
|
|
|
4677
3943
|
formData.append("file", new Blob([fileBuffer], { type: mimeType }), basename2(options.file));
|
|
4678
3944
|
if (options.alt) formData.append("alt", options.alt);
|
|
4679
3945
|
if (options.description) formData.append("description", options.description);
|
|
3946
|
+
if (options.aiSummary) formData.append("aiSummary", options.aiSummary);
|
|
4680
3947
|
if (options.group) formData.append("group", options.group);
|
|
4681
3948
|
if (options.tags) formData.append("tags", options.tags);
|
|
4682
3949
|
console.log(`\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u3044\u307E\u3059: ${options.file}...`);
|
|
@@ -4799,6 +4066,7 @@ async function updateAsset(options) {
|
|
|
4799
4066
|
};
|
|
4800
4067
|
if (options.alt !== void 0) requestBody.alt = options.alt;
|
|
4801
4068
|
if (options.description !== void 0) requestBody.description = options.description;
|
|
4069
|
+
if (options.aiSummary !== void 0) requestBody.aiSummary = options.aiSummary;
|
|
4802
4070
|
if (options.clearGroup) {
|
|
4803
4071
|
requestBody.groupSlug = null;
|
|
4804
4072
|
} else if (options.group !== void 0) {
|
|
@@ -4967,9 +4235,9 @@ program.command("remove-collection-data-type").description("\u30B3\u30EC\u30AF\u
|
|
|
4967
4235
|
program.command("link-collection-data-type").description("\u65E2\u5B58\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u3092\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3078\u7D10\u3065\u3051").requiredOption("--collection <slug>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--data-type <slug>", "\u7D10\u3065\u3051\u308B\u30B0\u30ED\u30FC\u30D0\u30EB\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--field-slug <slug>", "\u53C2\u7167\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--label <label>", "\u53C2\u7167\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8868\u793A\u540D").option("--reference-type <type>", "\u53C2\u7167\u30BF\u30A4\u30D7\uFF08single \u307E\u305F\u306F multiple\u3001\u65E2\u5B9A: single\uFF09", "single").action(linkCollectionDataType);
|
|
4968
4236
|
program.command("list-collection-presets").description("\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u5411\u3051\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u30D7\u30EA\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u8868\u793A").option("--type <type>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u7A2E\u5225 (post, news, doc, page)").action(listCollectionPresets);
|
|
4969
4237
|
program.command("create-data-entry").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u4F5C\u6210").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--json <json>", "\u30A8\u30F3\u30C8\u30EA\u30FC\u5185\u5BB9\u306E JSON \u6587\u5B57\u5217").option("--file <file>", "\u30A8\u30F3\u30C8\u30EA\u30FC\u5185\u5BB9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\uFF08draft, review, published\uFF09").action(createDataEntry);
|
|
4970
|
-
program.command("upload-asset").description("\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\uFF08MCP Assets API\uFF09").requiredOption("--file <path>", "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8").option("--description <text>", "\u8AAC\u660E").option("--group <slug>", "\u30A2\u30BB\u30C3\u30C8\u30B0\u30EB\u30FC\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--mime <type>", "MIME type\uFF08\u672A\u6307\u5B9A\u6642\u306F\u62E1\u5F35\u5B50\u304B\u3089\u63A8\u5B9A\uFF09").action(uploadAsset);
|
|
4238
|
+
program.command("upload-asset").description("\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\uFF08MCP Assets API\uFF09").requiredOption("--file <path>", "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8").option("--description <text>", "\u8AAC\u660E").option("--ai-summary <text>", "AI\u5411\u3051\u30B5\u30DE\u30EA\uFF08\u753B\u50CF\u5185\u5BB9\u306E\u6587\u7AE0\u8AAC\u660E\uFF09").option("--group <slug>", "\u30A2\u30BB\u30C3\u30C8\u30B0\u30EB\u30FC\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--mime <type>", "MIME type\uFF08\u672A\u6307\u5B9A\u6642\u306F\u62E1\u5F35\u5B50\u304B\u3089\u63A8\u5B9A\uFF09").action(uploadAsset);
|
|
4971
4239
|
program.command("list-assets").description("\u30A2\u30BB\u30C3\u30C8\u3092\u691C\u7D22\u30FB\u4E00\u89A7\u8868\u793A\uFF08MCP Assets API\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0\u3067\u7D5E\u308A\u8FBC\u307F").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09\u3067\u7D5E\u308A\u8FBC\u307F").option("--query <text>", "\u691C\u7D22\u30AF\u30A8\u30EA\uFF08alt/description \u3092\u691C\u7D22\uFF09").option("--mime <type>", "MIME type\uFF08\u4F8B: image, video, image/png\uFF09").option("--limit <number>", "\u53D6\u5F97\u4EF6\u6570\uFF08\u6700\u592750\uFF09").option("--offset <number>", "\u30AA\u30D5\u30BB\u30C3\u30C8").action(listAssets);
|
|
4972
|
-
program.command("update-asset").description("\u30A2\u30BB\u30C3\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u66F4\u65B0\uFF08MCP Assets API\uFF09").requiredOption("--id <id>", "\u30A2\u30BB\u30C3\u30C8 ID").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--description <text>", "\u8AAC\u660E\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0").option("--clear-group", "\u30B0\u30EB\u30FC\u30D7\u3092\u89E3\u9664").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--clear-tags", "\u30BF\u30B0\u3092\u5168\u524A\u9664").action(updateAsset);
|
|
4240
|
+
program.command("update-asset").description("\u30A2\u30BB\u30C3\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u66F4\u65B0\uFF08MCP Assets API\uFF09").requiredOption("--id <id>", "\u30A2\u30BB\u30C3\u30C8 ID").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--description <text>", "\u8AAC\u660E\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--ai-summary <text>", "AI\u5411\u3051\u30B5\u30DE\u30EA\uFF08\u753B\u50CF\u5185\u5BB9\u306E\u6587\u7AE0\u8AAC\u660E\u3002\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0").option("--clear-group", "\u30B0\u30EB\u30FC\u30D7\u3092\u89E3\u9664").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--clear-tags", "\u30BF\u30B0\u3092\u5168\u524A\u9664").action(updateAsset);
|
|
4973
4241
|
program.command("list-data-entries").description("\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u3054\u3068\u306E\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u4E00\u89A7\u3092\u8868\u793A").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--sort-by <field>", "\u4E26\u3073\u66FF\u3048\u5BFE\u8C61\u30D5\u30A3\u30FC\u30EB\u30C9").option("--sort-order <order>", "\u4E26\u3073\u9806 (asc \u307E\u305F\u306F desc)").option("--limit <number>", "\u53D6\u5F97\u4EF6\u6570\u306E\u4E0A\u9650").option("--offset <number>", "\u30B9\u30AD\u30C3\u30D7\u4EF6\u6570").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\u3067\u7D5E\u308A\u8FBC\u307F\uFF08draft, review, published\uFF09").action(listDataEntries);
|
|
4974
4242
|
program.command("get-data-entry").description("\u5358\u4E00\u306E\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u53D6\u5F97").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--id <id>", "\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC ID").action(getDataEntry);
|
|
4975
4243
|
program.command("update-data-entry").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u66F4\u65B0").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--id <id>", "\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC ID").option("--json <json>", "\u66F4\u65B0\u5185\u5BB9\u306E JSON \u6587\u5B57\u5217").option("--file <file>", "\u66F4\u65B0\u5185\u5BB9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\uFF08draft, review, published\uFF09").action(updateDataEntry);
|
|
@@ -4988,4 +4256,8 @@ program.command("unpublish-content").description("\u516C\u958B\u6E08\u307F\u30B3
|
|
|
4988
4256
|
program.command("archive-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30A2\u30FC\u30AB\u30A4\u30D6").requiredOption("--id <id>", "\u30B3\u30F3\u30C6\u30F3\u30C4 ID").action(archiveContent);
|
|
4989
4257
|
program.command("validate-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u306E MDX \u53C2\u7167\u6574\u5408\u6027\u3092\u691C\u8A3C\uFF08\u554F\u984C\u3042\u308A\u6642\u306F exit code 1\uFF09").requiredOption("--id <id>", "\u30B3\u30F3\u30C6\u30F3\u30C4 ID").action(validateContent);
|
|
4990
4258
|
program.command("get-data-entry-deletion-impact").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u524A\u9664\u6642\u306E\u5F71\u97FF\u3092\u78BA\u8A8D").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--id <id>", "\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC ID").action(getDataEntryDeletionImpact);
|
|
4259
|
+
program.command("report-bug").description("CMX \u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u306E\u30D0\u30B0\u3092\u5831\u544A").requiredOption("--title <title>", "\u30D0\u30B0\u306E\u6982\u8981\u30BF\u30A4\u30C8\u30EB").requiredOption("--description <description>", "\u30D0\u30B0\u306E\u8A73\u7D30\u8AAC\u660E").option("--severity <severity>", "\u91CD\u8981\u5EA6 (low, medium, high, critical)", "medium").option("--steps <steps>", "\u518D\u73FE\u624B\u9806").option("--error <message>", "\u30A8\u30E9\u30FC\u30E1\u30C3\u30BB\u30FC\u30B8").option("--command <command>", "\u5B9F\u884C\u3057\u305F CLI \u30B3\u30DE\u30F3\u30C9").action(async (options) => {
|
|
4260
|
+
const { reportBug } = await import("./report-bug-PT7NNFNN.js");
|
|
4261
|
+
await reportBug(options);
|
|
4262
|
+
});
|
|
4991
4263
|
program.parse();
|