cmx-sdk 0.2.13 → 0.2.15
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 +503 -59
- package/dist/index.d.ts +564 -36
- package/dist/index.js +1104 -165
- package/dist/index.js.map +1 -1
- package/dist/styles/cmx-mdx.css +686 -0
- package/package.json +5 -2
package/dist/cli.js
CHANGED
|
@@ -1205,45 +1205,149 @@ import { z as z2 } from "zod";
|
|
|
1205
1205
|
// src/mdx/component-catalog.ts
|
|
1206
1206
|
import { z } from "zod";
|
|
1207
1207
|
var componentSchemas = {
|
|
1208
|
-
|
|
1209
|
-
|
|
1208
|
+
// --- content ---
|
|
1209
|
+
Callout: z.object({
|
|
1210
|
+
type: z.enum(["info", "warning", "error", "success", "tip"]).default("info").describe("\u30BF\u30A4\u30D7"),
|
|
1211
|
+
title: z.string().optional().describe("\u30BF\u30A4\u30C8\u30EB"),
|
|
1212
|
+
children: z.string().describe("\u672C\u6587\uFF08Markdown\u53EF\uFF09")
|
|
1213
|
+
}),
|
|
1214
|
+
Button: z.object({
|
|
1215
|
+
href: z.string().describe("\u30EA\u30F3\u30AF\u5148URL"),
|
|
1216
|
+
children: z.string().describe("\u30DC\u30BF\u30F3\u30C6\u30AD\u30B9\u30C8"),
|
|
1217
|
+
variant: z.enum(["primary", "secondary", "outline"]).default("primary").describe("\u30B9\u30BF\u30A4\u30EB")
|
|
1210
1218
|
}),
|
|
1219
|
+
// --- media ---
|
|
1211
1220
|
Image: z.object({
|
|
1212
1221
|
assetId: z.string().uuid().describe("\u30A2\u30BB\u30C3\u30C8\u306EUUID"),
|
|
1213
1222
|
alt: z.string().optional().describe("\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8"),
|
|
1214
1223
|
size: z.enum(["thumbnail", "medium", "large", "original"]).default("large").describe("\u8868\u793A\u30B5\u30A4\u30BA"),
|
|
1215
1224
|
caption: z.string().optional().describe("\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3")
|
|
1216
1225
|
}),
|
|
1217
|
-
|
|
1218
|
-
|
|
1226
|
+
Audio: z.object({
|
|
1227
|
+
src: z.string().url().describe("\u97F3\u58F0\u30D5\u30A1\u30A4\u30EBURL"),
|
|
1228
|
+
title: z.string().optional().describe("\u30BF\u30A4\u30C8\u30EB")
|
|
1229
|
+
}),
|
|
1230
|
+
Video: z.object({
|
|
1231
|
+
src: z.string().url().describe("\u52D5\u753B\u30D5\u30A1\u30A4\u30EBURL"),
|
|
1219
1232
|
title: z.string().optional().describe("\u30BF\u30A4\u30C8\u30EB"),
|
|
1220
|
-
|
|
1233
|
+
poster: z.string().url().optional().describe("\u30DD\u30B9\u30BF\u30FC\u753B\u50CFURL")
|
|
1234
|
+
}),
|
|
1235
|
+
Gallery: z.object({
|
|
1236
|
+
assetIds: z.array(z.string().uuid()).describe("\u30A2\u30BB\u30C3\u30C8UUID\u306E\u914D\u5217"),
|
|
1237
|
+
columns: z.number().min(1).max(6).default(3).describe("\u5217\u6570"),
|
|
1238
|
+
caption: z.string().optional().describe("\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3")
|
|
1239
|
+
}),
|
|
1240
|
+
// --- reference ---
|
|
1241
|
+
BlogCard: z.object({
|
|
1242
|
+
contentId: z.string().uuid().describe("\u53C2\u7167\u5148\u30B3\u30F3\u30C6\u30F3\u30C4\u306EUUID")
|
|
1243
|
+
}),
|
|
1244
|
+
// --- embed ---
|
|
1245
|
+
YouTube: z.object({
|
|
1246
|
+
url: z.string().url().describe("YouTube\u52D5\u753BURL"),
|
|
1247
|
+
start: z.number().optional().describe("\u958B\u59CB\u79D2\u6570")
|
|
1248
|
+
}),
|
|
1249
|
+
Twitter: z.object({
|
|
1250
|
+
url: z.string().url().describe("\u30C4\u30A4\u30FC\u30C8URL")
|
|
1251
|
+
}),
|
|
1252
|
+
Instagram: z.object({
|
|
1253
|
+
url: z.string().url().describe("Instagram\u6295\u7A3FURL")
|
|
1254
|
+
}),
|
|
1255
|
+
TikTok: z.object({
|
|
1256
|
+
url: z.string().url().describe("TikTok\u52D5\u753BURL")
|
|
1257
|
+
}),
|
|
1258
|
+
Bluesky: z.object({
|
|
1259
|
+
url: z.string().url().describe("Bluesky\u30DD\u30B9\u30C8URL")
|
|
1260
|
+
}),
|
|
1261
|
+
Vimeo: z.object({
|
|
1262
|
+
url: z.string().url().describe("Vimeo\u52D5\u753BURL")
|
|
1263
|
+
}),
|
|
1264
|
+
Spotify: z.object({
|
|
1265
|
+
url: z.string().url().describe("Spotify\u30B3\u30F3\u30C6\u30F3\u30C4URL"),
|
|
1266
|
+
theme: z.enum(["light", "dark"]).default("light").describe("\u30C6\u30FC\u30DE")
|
|
1267
|
+
}),
|
|
1268
|
+
Gist: z.object({
|
|
1269
|
+
url: z.string().url().describe("GitHub Gist URL")
|
|
1270
|
+
}),
|
|
1271
|
+
CodePen: z.object({
|
|
1272
|
+
url: z.string().url().describe("CodePen URL"),
|
|
1273
|
+
height: z.number().default(400).describe("\u9AD8\u3055\uFF08px\uFF09"),
|
|
1274
|
+
defaultTab: z.enum(["html", "css", "js", "result"]).default("result").describe("\u30C7\u30D5\u30A9\u30EB\u30C8\u30BF\u30D6")
|
|
1275
|
+
}),
|
|
1276
|
+
CodeSandbox: z.object({
|
|
1277
|
+
url: z.string().url().describe("CodeSandbox URL"),
|
|
1278
|
+
height: z.number().default(500).describe("\u9AD8\u3055\uFF08px\uFF09")
|
|
1279
|
+
}),
|
|
1280
|
+
GoogleMap: z.object({
|
|
1281
|
+
url: z.string().url().describe("Google Maps URL"),
|
|
1282
|
+
height: z.number().default(450).describe("\u9AD8\u3055\uFF08px\uFF09")
|
|
1283
|
+
}),
|
|
1284
|
+
// --- layout ---
|
|
1285
|
+
Details: z.object({
|
|
1286
|
+
summary: z.string().describe("\u6298\u308A\u305F\u305F\u307F\u306E\u898B\u51FA\u3057"),
|
|
1287
|
+
children: z.string().describe("\u6298\u308A\u305F\u305F\u307E\u308C\u308B\u5185\u5BB9")
|
|
1288
|
+
}),
|
|
1289
|
+
Tabs: z.object({
|
|
1290
|
+
children: z.string().describe("Tab\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4E26\u3073")
|
|
1291
|
+
}),
|
|
1292
|
+
Tab: z.object({
|
|
1293
|
+
label: z.string().describe("\u30BF\u30D6\u306E\u30E9\u30D9\u30EB"),
|
|
1294
|
+
children: z.string().describe("\u30BF\u30D6\u306E\u5185\u5BB9")
|
|
1295
|
+
}),
|
|
1296
|
+
Columns: z.object({
|
|
1297
|
+
cols: z.number().min(2).max(4).default(2).describe("\u5217\u6570"),
|
|
1298
|
+
children: z.string().describe("Column\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u4E26\u3073")
|
|
1221
1299
|
}),
|
|
1300
|
+
Column: z.object({
|
|
1301
|
+
children: z.string().describe("\u30AB\u30E9\u30E0\u306E\u5185\u5BB9")
|
|
1302
|
+
}),
|
|
1303
|
+
// --- utility ---
|
|
1222
1304
|
Embed: z.object({
|
|
1223
|
-
url: z.string().url().describe("\u57CB\u3081\u8FBC\u307FURL")
|
|
1224
|
-
type: z.enum(["youtube", "twitter", "generic"]).default("generic").describe("\u30BF\u30A4\u30D7")
|
|
1305
|
+
url: z.string().url().describe("\u57CB\u3081\u8FBC\u307FURL")
|
|
1225
1306
|
}),
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1307
|
+
FileDownload: z.object({
|
|
1308
|
+
url: z.string().url().describe("\u30D5\u30A1\u30A4\u30EBURL"),
|
|
1309
|
+
filename: z.string().optional().describe("\u8868\u793A\u30D5\u30A1\u30A4\u30EB\u540D"),
|
|
1310
|
+
size: z.string().optional().describe("\u30D5\u30A1\u30A4\u30EB\u30B5\u30A4\u30BA\u8868\u793A")
|
|
1311
|
+
}),
|
|
1312
|
+
TableOfContents: z.object({
|
|
1313
|
+
maxDepth: z.number().min(1).max(6).default(3).describe("\u898B\u51FA\u3057\u306E\u6700\u5927\u6DF1\u3055")
|
|
1230
1314
|
})
|
|
1231
1315
|
};
|
|
1232
1316
|
var componentCatalog = {
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1317
|
+
// --- content ---
|
|
1318
|
+
Callout: {
|
|
1319
|
+
name: "Callout",
|
|
1320
|
+
displayName: "\u30B3\u30FC\u30EB\u30A2\u30A6\u30C8",
|
|
1321
|
+
description: "\u6CE8\u610F\u66F8\u304D\u3084\u88DC\u8DB3\u60C5\u5831\u3092\u76EE\u7ACB\u305F\u305B\u308B\u30DC\u30C3\u30AF\u30B9",
|
|
1322
|
+
category: "content",
|
|
1323
|
+
schema: componentSchemas.Callout,
|
|
1324
|
+
examples: [
|
|
1325
|
+
'<Callout type="info">\u3053\u308C\u306F\u60C5\u5831\u3067\u3059</Callout>',
|
|
1326
|
+
'<Callout type="warning" title="\u6CE8\u610F">\u91CD\u8981\u306A\u6CE8\u610F\u4E8B\u9805\u3067\u3059</Callout>'
|
|
1327
|
+
],
|
|
1328
|
+
hasReferences: false,
|
|
1241
1329
|
source: "standard",
|
|
1242
|
-
kind: "
|
|
1330
|
+
kind: "presentational",
|
|
1243
1331
|
locked: true,
|
|
1244
|
-
editable: false
|
|
1245
|
-
bindings: [{ prop: "contentId", target: "content", strategy: "by-id" }]
|
|
1332
|
+
editable: false
|
|
1246
1333
|
},
|
|
1334
|
+
Button: {
|
|
1335
|
+
name: "Button",
|
|
1336
|
+
displayName: "\u30DC\u30BF\u30F3",
|
|
1337
|
+
description: "\u30A2\u30AF\u30B7\u30E7\u30F3\u3092\u4FC3\u3059\u30DC\u30BF\u30F3\u30EA\u30F3\u30AF",
|
|
1338
|
+
category: "content",
|
|
1339
|
+
schema: componentSchemas.Button,
|
|
1340
|
+
examples: [
|
|
1341
|
+
'<Button href="/contact">\u304A\u554F\u3044\u5408\u308F\u305B</Button>',
|
|
1342
|
+
'<Button href="https://example.com" variant="secondary">\u8A73\u7D30\u3092\u898B\u308B</Button>'
|
|
1343
|
+
],
|
|
1344
|
+
hasReferences: false,
|
|
1345
|
+
source: "standard",
|
|
1346
|
+
kind: "presentational",
|
|
1347
|
+
locked: true,
|
|
1348
|
+
editable: false
|
|
1349
|
+
},
|
|
1350
|
+
// --- media ---
|
|
1247
1351
|
Image: {
|
|
1248
1352
|
name: "Image",
|
|
1249
1353
|
displayName: "\u753B\u50CF",
|
|
@@ -1261,31 +1365,74 @@ var componentCatalog = {
|
|
|
1261
1365
|
editable: false,
|
|
1262
1366
|
bindings: [{ prop: "assetId", target: "asset", strategy: "by-id" }]
|
|
1263
1367
|
},
|
|
1264
|
-
|
|
1265
|
-
name: "
|
|
1266
|
-
displayName: "\
|
|
1267
|
-
description: "\
|
|
1268
|
-
category: "
|
|
1269
|
-
schema: componentSchemas.
|
|
1270
|
-
examples: [
|
|
1271
|
-
'<Callout type="info">\u3053\u308C\u306F\u60C5\u5831\u3067\u3059</Callout>',
|
|
1272
|
-
'<Callout type="warning" title="\u6CE8\u610F">\u91CD\u8981\u306A\u6CE8\u610F\u4E8B\u9805\u3067\u3059</Callout>'
|
|
1273
|
-
],
|
|
1368
|
+
Audio: {
|
|
1369
|
+
name: "Audio",
|
|
1370
|
+
displayName: "\u97F3\u58F0\u30D7\u30EC\u30A4\u30E4\u30FC",
|
|
1371
|
+
description: "\u97F3\u58F0\u30D5\u30A1\u30A4\u30EB\u3092\u518D\u751F\u3059\u308B\u30D7\u30EC\u30A4\u30E4\u30FC",
|
|
1372
|
+
category: "media",
|
|
1373
|
+
schema: componentSchemas.Audio,
|
|
1374
|
+
examples: ['<Audio src="https://example.com/podcast.mp3" title="\u30A8\u30D4\u30BD\u30FC\u30C91" />'],
|
|
1274
1375
|
hasReferences: false,
|
|
1275
1376
|
source: "standard",
|
|
1276
1377
|
kind: "presentational",
|
|
1277
1378
|
locked: true,
|
|
1278
1379
|
editable: false
|
|
1279
1380
|
},
|
|
1280
|
-
|
|
1281
|
-
name: "
|
|
1282
|
-
displayName: "\
|
|
1283
|
-
description: "
|
|
1381
|
+
Video: {
|
|
1382
|
+
name: "Video",
|
|
1383
|
+
displayName: "\u52D5\u753B\u30D7\u30EC\u30A4\u30E4\u30FC",
|
|
1384
|
+
description: "\u30BB\u30EB\u30D5\u30DB\u30B9\u30C8\u52D5\u753B\u3092\u518D\u751F\u3059\u308B\u30D7\u30EC\u30A4\u30E4\u30FC",
|
|
1284
1385
|
category: "media",
|
|
1285
|
-
schema: componentSchemas.
|
|
1386
|
+
schema: componentSchemas.Video,
|
|
1387
|
+
examples: ['<Video src="https://example.com/video.mp4" poster="https://example.com/thumb.jpg" />'],
|
|
1388
|
+
hasReferences: false,
|
|
1389
|
+
source: "standard",
|
|
1390
|
+
kind: "presentational",
|
|
1391
|
+
locked: true,
|
|
1392
|
+
editable: false
|
|
1393
|
+
},
|
|
1394
|
+
Gallery: {
|
|
1395
|
+
name: "Gallery",
|
|
1396
|
+
displayName: "\u753B\u50CF\u30AE\u30E3\u30E9\u30EA\u30FC",
|
|
1397
|
+
description: "\u8907\u6570\u306E\u753B\u50CF\u3092\u30B0\u30EA\u30C3\u30C9\u30EC\u30A4\u30A2\u30A6\u30C8\u3067\u8868\u793A\u3057\u307E\u3059",
|
|
1398
|
+
category: "media",
|
|
1399
|
+
schema: componentSchemas.Gallery,
|
|
1400
|
+
examples: [
|
|
1401
|
+
'<Gallery assetIds={["uuid1", "uuid2", "uuid3"]} />',
|
|
1402
|
+
'<Gallery assetIds={["uuid1", "uuid2"]} columns={2} caption="\u5199\u771F\u96C6" />'
|
|
1403
|
+
],
|
|
1404
|
+
hasReferences: true,
|
|
1405
|
+
source: "standard",
|
|
1406
|
+
kind: "data-bound",
|
|
1407
|
+
locked: true,
|
|
1408
|
+
editable: false,
|
|
1409
|
+
bindings: [{ prop: "assetIds", target: "asset", strategy: "by-id" }]
|
|
1410
|
+
},
|
|
1411
|
+
// --- reference ---
|
|
1412
|
+
BlogCard: {
|
|
1413
|
+
name: "BlogCard",
|
|
1414
|
+
displayName: "\u8A18\u4E8B\u30AB\u30FC\u30C9",
|
|
1415
|
+
description: "\u4ED6\u306E\u8A18\u4E8B\u3078\u306E\u30EA\u30F3\u30AF\u30AB\u30FC\u30C9\u3092\u8868\u793A\u3057\u307E\u3059",
|
|
1416
|
+
category: "reference",
|
|
1417
|
+
schema: componentSchemas.BlogCard,
|
|
1418
|
+
examples: ['<BlogCard contentId="123e4567-e89b-12d3-a456-426614174000" />'],
|
|
1419
|
+
hasReferences: true,
|
|
1420
|
+
source: "standard",
|
|
1421
|
+
kind: "data-bound",
|
|
1422
|
+
locked: true,
|
|
1423
|
+
editable: false,
|
|
1424
|
+
bindings: [{ prop: "contentId", target: "content", strategy: "by-id" }]
|
|
1425
|
+
},
|
|
1426
|
+
// --- embed ---
|
|
1427
|
+
YouTube: {
|
|
1428
|
+
name: "YouTube",
|
|
1429
|
+
displayName: "YouTube",
|
|
1430
|
+
description: "YouTube\u52D5\u753B\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1431
|
+
category: "embed",
|
|
1432
|
+
schema: componentSchemas.YouTube,
|
|
1286
1433
|
examples: [
|
|
1287
|
-
'<
|
|
1288
|
-
'<
|
|
1434
|
+
'<YouTube url="https://www.youtube.com/watch?v=dQw4w9WgXcQ" />',
|
|
1435
|
+
'<YouTube url="https://youtu.be/dQw4w9WgXcQ" start={30} />'
|
|
1289
1436
|
],
|
|
1290
1437
|
hasReferences: false,
|
|
1291
1438
|
source: "standard",
|
|
@@ -1293,23 +1440,252 @@ var componentCatalog = {
|
|
|
1293
1440
|
locked: true,
|
|
1294
1441
|
editable: false
|
|
1295
1442
|
},
|
|
1296
|
-
|
|
1297
|
-
name: "
|
|
1298
|
-
displayName: "
|
|
1299
|
-
description: "\
|
|
1300
|
-
category: "
|
|
1301
|
-
schema: componentSchemas.
|
|
1443
|
+
Twitter: {
|
|
1444
|
+
name: "Twitter",
|
|
1445
|
+
displayName: "Twitter / X",
|
|
1446
|
+
description: "\u30C4\u30A4\u30FC\u30C8\u30FB\u30DD\u30B9\u30C8\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1447
|
+
category: "embed",
|
|
1448
|
+
schema: componentSchemas.Twitter,
|
|
1449
|
+
examples: ['<Twitter url="https://twitter.com/example/status/123456789" />'],
|
|
1450
|
+
hasReferences: false,
|
|
1451
|
+
source: "standard",
|
|
1452
|
+
kind: "presentational",
|
|
1453
|
+
locked: true,
|
|
1454
|
+
editable: false
|
|
1455
|
+
},
|
|
1456
|
+
Instagram: {
|
|
1457
|
+
name: "Instagram",
|
|
1458
|
+
displayName: "Instagram",
|
|
1459
|
+
description: "Instagram\u6295\u7A3F\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1460
|
+
category: "embed",
|
|
1461
|
+
schema: componentSchemas.Instagram,
|
|
1462
|
+
examples: ['<Instagram url="https://www.instagram.com/p/ABC123/" />'],
|
|
1463
|
+
hasReferences: false,
|
|
1464
|
+
source: "standard",
|
|
1465
|
+
kind: "presentational",
|
|
1466
|
+
locked: true,
|
|
1467
|
+
editable: false
|
|
1468
|
+
},
|
|
1469
|
+
TikTok: {
|
|
1470
|
+
name: "TikTok",
|
|
1471
|
+
displayName: "TikTok",
|
|
1472
|
+
description: "TikTok\u52D5\u753B\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1473
|
+
category: "embed",
|
|
1474
|
+
schema: componentSchemas.TikTok,
|
|
1475
|
+
examples: ['<TikTok url="https://www.tiktok.com/@user/video/123456789" />'],
|
|
1476
|
+
hasReferences: false,
|
|
1477
|
+
source: "standard",
|
|
1478
|
+
kind: "presentational",
|
|
1479
|
+
locked: true,
|
|
1480
|
+
editable: false
|
|
1481
|
+
},
|
|
1482
|
+
Bluesky: {
|
|
1483
|
+
name: "Bluesky",
|
|
1484
|
+
displayName: "Bluesky",
|
|
1485
|
+
description: "Bluesky\u30DD\u30B9\u30C8\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1486
|
+
category: "embed",
|
|
1487
|
+
schema: componentSchemas.Bluesky,
|
|
1488
|
+
examples: ['<Bluesky url="https://bsky.app/profile/user.bsky.social/post/abc123" />'],
|
|
1489
|
+
hasReferences: false,
|
|
1490
|
+
source: "standard",
|
|
1491
|
+
kind: "presentational",
|
|
1492
|
+
locked: true,
|
|
1493
|
+
editable: false
|
|
1494
|
+
},
|
|
1495
|
+
Vimeo: {
|
|
1496
|
+
name: "Vimeo",
|
|
1497
|
+
displayName: "Vimeo",
|
|
1498
|
+
description: "Vimeo\u52D5\u753B\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1499
|
+
category: "embed",
|
|
1500
|
+
schema: componentSchemas.Vimeo,
|
|
1501
|
+
examples: ['<Vimeo url="https://vimeo.com/123456789" />'],
|
|
1502
|
+
hasReferences: false,
|
|
1503
|
+
source: "standard",
|
|
1504
|
+
kind: "presentational",
|
|
1505
|
+
locked: true,
|
|
1506
|
+
editable: false
|
|
1507
|
+
},
|
|
1508
|
+
Spotify: {
|
|
1509
|
+
name: "Spotify",
|
|
1510
|
+
displayName: "Spotify",
|
|
1511
|
+
description: "Spotify\u697D\u66F2\u30FB\u30D7\u30EC\u30A4\u30EA\u30B9\u30C8\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1512
|
+
category: "embed",
|
|
1513
|
+
schema: componentSchemas.Spotify,
|
|
1302
1514
|
examples: [
|
|
1303
|
-
'<
|
|
1304
|
-
'<
|
|
1515
|
+
'<Spotify url="https://open.spotify.com/track/xxx" />',
|
|
1516
|
+
'<Spotify url="https://open.spotify.com/playlist/xxx" theme="dark" />'
|
|
1305
1517
|
],
|
|
1306
1518
|
hasReferences: false,
|
|
1307
1519
|
source: "standard",
|
|
1308
1520
|
kind: "presentational",
|
|
1309
1521
|
locked: true,
|
|
1310
1522
|
editable: false
|
|
1523
|
+
},
|
|
1524
|
+
Gist: {
|
|
1525
|
+
name: "Gist",
|
|
1526
|
+
displayName: "GitHub Gist",
|
|
1527
|
+
description: "GitHub Gist\u306E\u30B3\u30FC\u30C9\u30B9\u30CB\u30DA\u30C3\u30C8\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1528
|
+
category: "embed",
|
|
1529
|
+
schema: componentSchemas.Gist,
|
|
1530
|
+
examples: ['<Gist url="https://gist.github.com/user/abc123" />'],
|
|
1531
|
+
hasReferences: false,
|
|
1532
|
+
source: "standard",
|
|
1533
|
+
kind: "presentational",
|
|
1534
|
+
locked: true,
|
|
1535
|
+
editable: false
|
|
1536
|
+
},
|
|
1537
|
+
CodePen: {
|
|
1538
|
+
name: "CodePen",
|
|
1539
|
+
displayName: "CodePen",
|
|
1540
|
+
description: "CodePen\u306E\u30E9\u30A4\u30D6\u30C7\u30E2\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1541
|
+
category: "embed",
|
|
1542
|
+
schema: componentSchemas.CodePen,
|
|
1543
|
+
examples: ['<CodePen url="https://codepen.io/user/pen/abc123" height={500} defaultTab="result" />'],
|
|
1544
|
+
hasReferences: false,
|
|
1545
|
+
source: "standard",
|
|
1546
|
+
kind: "presentational",
|
|
1547
|
+
locked: true,
|
|
1548
|
+
editable: false
|
|
1549
|
+
},
|
|
1550
|
+
CodeSandbox: {
|
|
1551
|
+
name: "CodeSandbox",
|
|
1552
|
+
displayName: "CodeSandbox",
|
|
1553
|
+
description: "CodeSandbox\u306E\u30E9\u30A4\u30D6\u30C7\u30E2\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1554
|
+
category: "embed",
|
|
1555
|
+
schema: componentSchemas.CodeSandbox,
|
|
1556
|
+
examples: ['<CodeSandbox url="https://codesandbox.io/s/abc123" height={500} />'],
|
|
1557
|
+
hasReferences: false,
|
|
1558
|
+
source: "standard",
|
|
1559
|
+
kind: "presentational",
|
|
1560
|
+
locked: true,
|
|
1561
|
+
editable: false
|
|
1562
|
+
},
|
|
1563
|
+
GoogleMap: {
|
|
1564
|
+
name: "GoogleMap",
|
|
1565
|
+
displayName: "Google Maps",
|
|
1566
|
+
description: "Google Maps\u306E\u5730\u56F3\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1567
|
+
category: "embed",
|
|
1568
|
+
schema: componentSchemas.GoogleMap,
|
|
1569
|
+
examples: ['<GoogleMap url="https://www.google.com/maps/embed?pb=..." height={400} />'],
|
|
1570
|
+
hasReferences: false,
|
|
1571
|
+
source: "standard",
|
|
1572
|
+
kind: "presentational",
|
|
1573
|
+
locked: true,
|
|
1574
|
+
editable: false
|
|
1575
|
+
},
|
|
1576
|
+
// --- layout ---
|
|
1577
|
+
Details: {
|
|
1578
|
+
name: "Details",
|
|
1579
|
+
displayName: "\u6298\u308A\u305F\u305F\u307F",
|
|
1580
|
+
description: "\u30AF\u30EA\u30C3\u30AF\u3067\u5C55\u958B\u30FB\u6298\u308A\u305F\u305F\u307F\u53EF\u80FD\u306A\u30BB\u30AF\u30B7\u30E7\u30F3",
|
|
1581
|
+
category: "layout",
|
|
1582
|
+
schema: componentSchemas.Details,
|
|
1583
|
+
examples: ['<Details summary="\u8A73\u7D30\u3092\u898B\u308B">\u6298\u308A\u305F\u305F\u307E\u308C\u305F\u5185\u5BB9</Details>'],
|
|
1584
|
+
hasReferences: false,
|
|
1585
|
+
source: "standard",
|
|
1586
|
+
kind: "presentational",
|
|
1587
|
+
locked: true,
|
|
1588
|
+
editable: false
|
|
1589
|
+
},
|
|
1590
|
+
Tabs: {
|
|
1591
|
+
name: "Tabs",
|
|
1592
|
+
displayName: "\u30BF\u30D6",
|
|
1593
|
+
description: "\u30BF\u30D6\u3067\u5207\u308A\u66FF\u3048\u53EF\u80FD\u306A\u30B3\u30F3\u30C6\u30F3\u30C4",
|
|
1594
|
+
category: "layout",
|
|
1595
|
+
schema: componentSchemas.Tabs,
|
|
1596
|
+
examples: ['<Tabs><Tab label="\u30BF\u30D61">\u5185\u5BB91</Tab><Tab label="\u30BF\u30D62">\u5185\u5BB92</Tab></Tabs>'],
|
|
1597
|
+
hasReferences: false,
|
|
1598
|
+
source: "standard",
|
|
1599
|
+
kind: "presentational",
|
|
1600
|
+
locked: true,
|
|
1601
|
+
editable: false
|
|
1602
|
+
},
|
|
1603
|
+
Tab: {
|
|
1604
|
+
name: "Tab",
|
|
1605
|
+
displayName: "\u30BF\u30D6\uFF08\u5B50\uFF09",
|
|
1606
|
+
description: "Tabs\u306E\u5B50\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8",
|
|
1607
|
+
category: "layout",
|
|
1608
|
+
schema: componentSchemas.Tab,
|
|
1609
|
+
examples: ['<Tab label="\u30BF\u30D6\u540D">\u5185\u5BB9</Tab>'],
|
|
1610
|
+
hasReferences: false,
|
|
1611
|
+
source: "standard",
|
|
1612
|
+
kind: "presentational",
|
|
1613
|
+
locked: true,
|
|
1614
|
+
editable: false,
|
|
1615
|
+
parentComponent: "Tabs"
|
|
1616
|
+
},
|
|
1617
|
+
Columns: {
|
|
1618
|
+
name: "Columns",
|
|
1619
|
+
displayName: "\u30AB\u30E9\u30E0",
|
|
1620
|
+
description: "\u30DE\u30EB\u30C1\u30AB\u30E9\u30E0\u30EC\u30A4\u30A2\u30A6\u30C8",
|
|
1621
|
+
category: "layout",
|
|
1622
|
+
schema: componentSchemas.Columns,
|
|
1623
|
+
examples: ["<Columns cols={2}><Column>\u5DE6</Column><Column>\u53F3</Column></Columns>"],
|
|
1624
|
+
hasReferences: false,
|
|
1625
|
+
source: "standard",
|
|
1626
|
+
kind: "presentational",
|
|
1627
|
+
locked: true,
|
|
1628
|
+
editable: false
|
|
1629
|
+
},
|
|
1630
|
+
Column: {
|
|
1631
|
+
name: "Column",
|
|
1632
|
+
displayName: "\u30AB\u30E9\u30E0\uFF08\u5B50\uFF09",
|
|
1633
|
+
description: "Columns\u306E\u5B50\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8",
|
|
1634
|
+
category: "layout",
|
|
1635
|
+
schema: componentSchemas.Column,
|
|
1636
|
+
examples: ["<Column>\u30AB\u30E9\u30E0\u306E\u5185\u5BB9</Column>"],
|
|
1637
|
+
hasReferences: false,
|
|
1638
|
+
source: "standard",
|
|
1639
|
+
kind: "presentational",
|
|
1640
|
+
locked: true,
|
|
1641
|
+
editable: false,
|
|
1642
|
+
parentComponent: "Columns"
|
|
1643
|
+
},
|
|
1644
|
+
// --- utility ---
|
|
1645
|
+
Embed: {
|
|
1646
|
+
name: "Embed",
|
|
1647
|
+
displayName: "\u6C4E\u7528\u57CB\u3081\u8FBC\u307F",
|
|
1648
|
+
description: "\u6C4E\u7528iframe\u3067\u5916\u90E8\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u57CB\u3081\u8FBC\u307F\u307E\u3059",
|
|
1649
|
+
category: "utility",
|
|
1650
|
+
schema: componentSchemas.Embed,
|
|
1651
|
+
examples: ['<Embed url="https://example.com/widget" />'],
|
|
1652
|
+
hasReferences: false,
|
|
1653
|
+
source: "standard",
|
|
1654
|
+
kind: "presentational",
|
|
1655
|
+
locked: true,
|
|
1656
|
+
editable: false
|
|
1657
|
+
},
|
|
1658
|
+
FileDownload: {
|
|
1659
|
+
name: "FileDownload",
|
|
1660
|
+
displayName: "\u30D5\u30A1\u30A4\u30EB\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9",
|
|
1661
|
+
description: "\u30D5\u30A1\u30A4\u30EB\u30C0\u30A6\u30F3\u30ED\u30FC\u30C9\u30EA\u30F3\u30AF\u3092\u8868\u793A\u3057\u307E\u3059",
|
|
1662
|
+
category: "utility",
|
|
1663
|
+
schema: componentSchemas.FileDownload,
|
|
1664
|
+
examples: ['<FileDownload url="https://example.com/doc.pdf" filename="\u8CC7\u6599.pdf" size="2.4MB" />'],
|
|
1665
|
+
hasReferences: false,
|
|
1666
|
+
source: "standard",
|
|
1667
|
+
kind: "presentational",
|
|
1668
|
+
locked: true,
|
|
1669
|
+
editable: false
|
|
1670
|
+
},
|
|
1671
|
+
TableOfContents: {
|
|
1672
|
+
name: "TableOfContents",
|
|
1673
|
+
displayName: "\u76EE\u6B21",
|
|
1674
|
+
description: "\u8A18\u4E8B\u5185\u306E\u898B\u51FA\u3057\u304B\u3089\u76EE\u6B21\u3092\u81EA\u52D5\u751F\u6210\u3057\u307E\u3059",
|
|
1675
|
+
category: "utility",
|
|
1676
|
+
schema: componentSchemas.TableOfContents,
|
|
1677
|
+
examples: ["<TableOfContents />", "<TableOfContents maxDepth={2} />"],
|
|
1678
|
+
hasReferences: false,
|
|
1679
|
+
source: "standard",
|
|
1680
|
+
kind: "presentational",
|
|
1681
|
+
locked: true,
|
|
1682
|
+
editable: false
|
|
1311
1683
|
}
|
|
1312
1684
|
};
|
|
1685
|
+
var CHILD_COMPONENT_MAP = {
|
|
1686
|
+
Tab: "Tabs",
|
|
1687
|
+
Column: "Columns"
|
|
1688
|
+
};
|
|
1313
1689
|
function isValidComponent(name) {
|
|
1314
1690
|
return name in componentCatalog;
|
|
1315
1691
|
}
|
|
@@ -2987,16 +3363,30 @@ ${result.skipped.length} \u4EF6\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u30B9\u30AD\
|
|
|
2987
3363
|
}
|
|
2988
3364
|
|
|
2989
3365
|
// src/commands/create-data-entry.ts
|
|
3366
|
+
var VALID_STATUSES = ["draft", "review", "published"];
|
|
2990
3367
|
async function createDataEntry(options) {
|
|
2991
3368
|
ensureApiCredentials();
|
|
2992
3369
|
if (!options.typeSlug) {
|
|
2993
3370
|
console.error("\u30A8\u30E9\u30FC: --type-slug \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
2994
3371
|
process.exit(1);
|
|
2995
3372
|
}
|
|
2996
|
-
const
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3373
|
+
const raw = readJsonInput(options);
|
|
3374
|
+
let input;
|
|
3375
|
+
if (raw.dataJson && typeof raw.dataJson === "object" && !Array.isArray(raw.dataJson)) {
|
|
3376
|
+
const statusFromJson = typeof raw.status === "string" && VALID_STATUSES.includes(raw.status) ? raw.status : void 0;
|
|
3377
|
+
input = {
|
|
3378
|
+
dataJson: raw.dataJson,
|
|
3379
|
+
...statusFromJson ? { status: statusFromJson } : {}
|
|
3380
|
+
};
|
|
3381
|
+
} else {
|
|
3382
|
+
input = { dataJson: raw };
|
|
3383
|
+
}
|
|
3384
|
+
if (options.status) {
|
|
3385
|
+
if (!VALID_STATUSES.includes(options.status)) {
|
|
3386
|
+
console.error("\u30A8\u30E9\u30FC: --status \u306F draft, review, published \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
3387
|
+
process.exit(1);
|
|
3388
|
+
}
|
|
3389
|
+
input.status = options.status;
|
|
3000
3390
|
}
|
|
3001
3391
|
console.log(`\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059: ${options.typeSlug}...`);
|
|
3002
3392
|
const result = assertSdkSuccess(await postManageDataTypeSlug(options.typeSlug, input));
|
|
@@ -3047,7 +3437,8 @@ async function createContent(options) {
|
|
|
3047
3437
|
slug: input.slug,
|
|
3048
3438
|
mdx: input.mdx ?? "",
|
|
3049
3439
|
collectionId,
|
|
3050
|
-
...input.description !== void 0 ? { description: input.description } : {}
|
|
3440
|
+
...input.description !== void 0 ? { description: input.description } : {},
|
|
3441
|
+
...options.publish ? { autoPublish: true } : {}
|
|
3051
3442
|
};
|
|
3052
3443
|
console.log(`\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059: ${collectionSlug || collectionId}...`);
|
|
3053
3444
|
const result = assertSdkSuccess(await postManageContents(requestBody));
|
|
@@ -3056,6 +3447,9 @@ async function createContent(options) {
|
|
|
3056
3447
|
console.log(`
|
|
3057
3448
|
\u30B3\u30F3\u30C6\u30F3\u30C4 ID: ${result.id}`);
|
|
3058
3449
|
console.log(`\u30B3\u30F3\u30C6\u30F3\u30C4 slug: ${result.slug}`);
|
|
3450
|
+
if (result.published) {
|
|
3451
|
+
console.log("\u30B9\u30C6\u30FC\u30BF\u30B9: \u516C\u958B\u6E08\u307F");
|
|
3452
|
+
}
|
|
3059
3453
|
}
|
|
3060
3454
|
|
|
3061
3455
|
// src/commands/request-review-content.ts
|
|
@@ -3177,6 +3571,7 @@ async function getDataEntry(options) {
|
|
|
3177
3571
|
}
|
|
3178
3572
|
|
|
3179
3573
|
// src/commands/update-data-entry.ts
|
|
3574
|
+
var VALID_STATUSES2 = ["draft", "review", "published"];
|
|
3180
3575
|
async function updateDataEntry(options) {
|
|
3181
3576
|
ensureApiCredentials();
|
|
3182
3577
|
if (!options.typeSlug) {
|
|
@@ -3187,7 +3582,27 @@ async function updateDataEntry(options) {
|
|
|
3187
3582
|
console.error("\u30A8\u30E9\u30FC: --id \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
3188
3583
|
process.exit(1);
|
|
3189
3584
|
}
|
|
3190
|
-
|
|
3585
|
+
let input;
|
|
3586
|
+
if (options.json || options.file) {
|
|
3587
|
+
const raw = readJsonInput(options);
|
|
3588
|
+
if (raw.dataJson && typeof raw.dataJson === "object") {
|
|
3589
|
+
input = raw;
|
|
3590
|
+
} else {
|
|
3591
|
+
input = { dataJson: raw };
|
|
3592
|
+
}
|
|
3593
|
+
} else if (options.status) {
|
|
3594
|
+
input = {};
|
|
3595
|
+
} else {
|
|
3596
|
+
console.error("\u30A8\u30E9\u30FC: --json\u3001--file\u3001\u307E\u305F\u306F --status \u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
3597
|
+
process.exit(1);
|
|
3598
|
+
}
|
|
3599
|
+
if (options.status) {
|
|
3600
|
+
if (!VALID_STATUSES2.includes(options.status)) {
|
|
3601
|
+
console.error("\u30A8\u30E9\u30FC: --status \u306F draft, review, published \u306E\u3044\u305A\u308C\u304B\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044");
|
|
3602
|
+
process.exit(1);
|
|
3603
|
+
}
|
|
3604
|
+
input.status = options.status;
|
|
3605
|
+
}
|
|
3191
3606
|
console.log(`\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u66F4\u65B0\u3057\u3066\u3044\u307E\u3059: ${options.id}...`);
|
|
3192
3607
|
const result = assertSdkSuccess(
|
|
3193
3608
|
await patchManageDataTypeSlugId(options.typeSlug, options.id, input)
|
|
@@ -3528,6 +3943,7 @@ import { extname as extname2, join as join7, relative as relative2, resolve as r
|
|
|
3528
3943
|
|
|
3529
3944
|
// src/mdx/validator.ts
|
|
3530
3945
|
import { compile } from "@mdx-js/mdx";
|
|
3946
|
+
import remarkGfm from "remark-gfm";
|
|
3531
3947
|
var FORBIDDEN_PATTERNS = [
|
|
3532
3948
|
// import/export statements (at MDX level, not inside code blocks)
|
|
3533
3949
|
{ pattern: /^\s*import\s+/m, message: "import\u6587\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093" },
|
|
@@ -3706,13 +4122,18 @@ function extractReferences(components) {
|
|
|
3706
4122
|
if (component.name === "Image" && typeof component.props.assetId === "string") {
|
|
3707
4123
|
assetIds.push(component.props.assetId);
|
|
3708
4124
|
}
|
|
4125
|
+
if (component.name === "Gallery" && Array.isArray(component.props.assetIds)) {
|
|
4126
|
+
for (const id of component.props.assetIds) {
|
|
4127
|
+
if (typeof id === "string") assetIds.push(id);
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
3709
4130
|
}
|
|
3710
4131
|
return {
|
|
3711
4132
|
contentIds: [...new Set(contentIds)],
|
|
3712
4133
|
assetIds: [...new Set(assetIds)]
|
|
3713
4134
|
};
|
|
3714
4135
|
}
|
|
3715
|
-
async function validateMdx(mdx) {
|
|
4136
|
+
async function validateMdx(mdx, options) {
|
|
3716
4137
|
const errors = [];
|
|
3717
4138
|
const warnings = [];
|
|
3718
4139
|
const mdxWithoutCodeBlocks = stripCodeBlocksForPatternCheck(mdx);
|
|
@@ -3734,7 +4155,8 @@ async function validateMdx(mdx) {
|
|
|
3734
4155
|
const escapedMdx = escapeCodeBlocksForCompile(mdx);
|
|
3735
4156
|
try {
|
|
3736
4157
|
await compile(escapedMdx, {
|
|
3737
|
-
development: false
|
|
4158
|
+
development: false,
|
|
4159
|
+
remarkPlugins: [remarkGfm]
|
|
3738
4160
|
});
|
|
3739
4161
|
} catch (error) {
|
|
3740
4162
|
const err = error;
|
|
@@ -3747,6 +4169,7 @@ async function validateMdx(mdx) {
|
|
|
3747
4169
|
}
|
|
3748
4170
|
const mdxForComponentExtraction = stripCodeBlocksForPatternCheck(mdx);
|
|
3749
4171
|
const components = extractComponents(mdxForComponentExtraction);
|
|
4172
|
+
const enabledSet = options?.enabledComponents ? new Set(options.enabledComponents) : void 0;
|
|
3750
4173
|
for (const component of components) {
|
|
3751
4174
|
if (!isValidComponent(component.name)) {
|
|
3752
4175
|
errors.push({
|
|
@@ -3757,6 +4180,27 @@ async function validateMdx(mdx) {
|
|
|
3757
4180
|
});
|
|
3758
4181
|
continue;
|
|
3759
4182
|
}
|
|
4183
|
+
if (enabledSet && !enabledSet.has(component.name)) {
|
|
4184
|
+
errors.push({
|
|
4185
|
+
type: "component",
|
|
4186
|
+
message: `\u7121\u52B9\u306A\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8: ${component.name}\uFF08\u3053\u306E\u74B0\u5883\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\uFF09`,
|
|
4187
|
+
line: component.line,
|
|
4188
|
+
component: component.name
|
|
4189
|
+
});
|
|
4190
|
+
continue;
|
|
4191
|
+
}
|
|
4192
|
+
const parentName = CHILD_COMPONENT_MAP[component.name];
|
|
4193
|
+
if (parentName) {
|
|
4194
|
+
const hasParent = components.some((c) => c.name === parentName);
|
|
4195
|
+
if (!hasParent) {
|
|
4196
|
+
errors.push({
|
|
4197
|
+
type: "component",
|
|
4198
|
+
message: `${component.name} \u306F ${parentName} \u306E\u4E2D\u3067\u4F7F\u7528\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`,
|
|
4199
|
+
line: component.line,
|
|
4200
|
+
component: component.name
|
|
4201
|
+
});
|
|
4202
|
+
}
|
|
4203
|
+
}
|
|
3760
4204
|
const result = validateComponentProps(component.name, component.props);
|
|
3761
4205
|
if (!result.success) {
|
|
3762
4206
|
for (const issue of result.error.issues) {
|
|
@@ -4522,15 +4966,15 @@ program.command("add-collection-data-type").description("\u30B3\u30EC\u30AF\u30B
|
|
|
4522
4966
|
program.command("remove-collection-data-type").description("\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u304B\u3089\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u3092\u524A\u9664").requiredOption("--collection <slug>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--data-type <slug>", "\u524A\u9664\u3059\u308B\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").action(removeCollectionDataType);
|
|
4523
4967
|
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);
|
|
4524
4968
|
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);
|
|
4525
|
-
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").action(createDataEntry);
|
|
4969
|
+
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);
|
|
4526
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);
|
|
4527
4971
|
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);
|
|
4528
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);
|
|
4529
|
-
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
|
|
4973
|
+
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);
|
|
4530
4974
|
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);
|
|
4531
|
-
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").action(updateDataEntry);
|
|
4975
|
+
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);
|
|
4532
4976
|
program.command("delete-data-entry").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u524A\u9664").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("--force", "\u78BA\u8A8D\u30D7\u30ED\u30F3\u30D7\u30C8\u3092\u30B9\u30AD\u30C3\u30D7").action(deleteDataEntry);
|
|
4533
|
-
program.command("create-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u4F5C\u6210").option("--collection <slug>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30B9\u30E9\u30C3\u30B0").option("--json <json>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u5B9A\u7FA9\u306E JSON \u6587\u5B57\u5217\uFF08\u63A8\u5968\uFF09").option("--file <file>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u5B9A\u7FA9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--title <title>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u30BF\u30A4\u30C8\u30EB").option("--slug <slug>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u30B9\u30E9\u30C3\u30B0").option("--description <description>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u8AAC\u660E").option("--mdx <mdx>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u306E MDX \u672C\u6587").action(createContent);
|
|
4977
|
+
program.command("create-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u4F5C\u6210").option("--collection <slug>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30B9\u30E9\u30C3\u30B0").option("--json <json>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u5B9A\u7FA9\u306E JSON \u6587\u5B57\u5217\uFF08\u63A8\u5968\uFF09").option("--file <file>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u5B9A\u7FA9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--title <title>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u30BF\u30A4\u30C8\u30EB").option("--slug <slug>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u30B9\u30E9\u30C3\u30B0").option("--description <description>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u8AAC\u660E").option("--mdx <mdx>", "\u30B3\u30F3\u30C6\u30F3\u30C4\u306E MDX \u672C\u6587").option("--publish", "\u4F5C\u6210\u3068\u540C\u6642\u306B\u516C\u958B\u3059\u308B").action(createContent);
|
|
4534
4978
|
program.command("request-review-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u30EC\u30D3\u30E5\u30FC\u4F9D\u983C\u306B\u3059\u308B").requiredOption("--id <id>", "\u30B3\u30F3\u30C6\u30F3\u30C4 ID").action(requestReviewContent);
|
|
4535
4979
|
program.command("publish-content").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u516C\u958B").requiredOption("--id <id>", "\u30B3\u30F3\u30C6\u30F3\u30C4 ID").action(publishContent);
|
|
4536
4980
|
program.command("get-content-references").description("\u30B3\u30F3\u30C6\u30F3\u30C4\u53C2\u7167\u60C5\u5831\u3092\u53D6\u5F97").requiredOption("--id <id>", "\u30B3\u30F3\u30C6\u30F3\u30C4 ID").action(getContentReferences);
|