@ssobig/writer-cli 0.2.1 → 0.3.0
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/README.md +13 -1
- package/config.js +2 -1
- package/package.json +1 -1
- package/templates/mystery-v1/authoring-view-preference.js +22 -5
- package/templates/mystery-v1/character-perspective-preview.js +3 -3
- package/templates/mystery-v1/codemirror6-runtime.min.js +28 -0
- package/templates/mystery-v1/component-asset-operations.js +5 -4
- package/templates/mystery-v1/component-catalog-contract.js +26 -35
- package/templates/mystery-v1/component-draft-operations.js +19 -8
- package/templates/mystery-v1/component-field-contracts.js +29 -49
- package/templates/mystery-v1/component-id-policy.js +1 -1
- package/templates/mystery-v1/component-manager.js +21 -11
- package/templates/mystery-v1/component-navigation-counts.js +3 -8
- package/templates/mystery-v1/component-registry.js +11 -5
- package/templates/mystery-v1/component-renderers.js +12 -8
- package/templates/mystery-v1/markdown-live-editor.js +350 -0
- package/templates/mystery-v1/page-header.js +2 -1
- package/tools/writer-cli/package-lock.json +2 -2
- package/tools/writer-cli/package.json +1 -1
- package/tools/writer-cli/skills/ssobig-writer-cli/SKILL.md +1 -1
- package/tools/writer-cli/skills/ssobig-writer-cli/references/errors.md +1 -1
- package/tools/writer-cli/skills/ssobig-writer-cli/references/install-auth.md +1 -1
- package/tools/writer-cli/skills/ssobig-writer-cli/references/projects-components.md +1 -1
- package/tools/writer-cli/src/agent-service.cjs +3 -1
- package/tools/writer-cli/src/command-registry.cjs +3 -0
- package/tools/writer-cli/src/commands.cjs +85 -3
- package/tools/writer-cli/src/domain.cjs +250 -1
- package/tools/writer-cli/src/gateway.cjs +14 -0
- package/tools/writer-cli/src/mutations.cjs +167 -1
- package/tools/writer-cli/src/project-import.cjs +12 -21
- package/tools/writer-cli/src/update-remediation.cjs +4 -0
|
@@ -164,13 +164,12 @@ function characterComponent(characterSource) {
|
|
|
164
164
|
tag: "플레이어 캐릭터",
|
|
165
165
|
color: CHARACTER_COLORS[characterId],
|
|
166
166
|
customSections,
|
|
167
|
-
containers: [{ id: crypto.randomUUID(), role: "primary", title: "기본 정보", sectionIds: customSections.map(section => section.id) }]
|
|
168
|
-
authorNote: ""
|
|
167
|
+
containers: [{ id: crypto.randomUUID(), role: "primary", title: "기본 정보", sectionIds: customSections.map(section => section.id) }]
|
|
169
168
|
};
|
|
170
169
|
}
|
|
171
170
|
return {
|
|
172
171
|
characters, names, order, customCharacters: [], deletedColumns: [],
|
|
173
|
-
enabledOptionalFields: ["image", "color", "tag"
|
|
172
|
+
enabledOptionalFields: ["image", "color", "tag"]
|
|
174
173
|
};
|
|
175
174
|
}
|
|
176
175
|
|
|
@@ -195,7 +194,7 @@ function progressComponent(flowSource) {
|
|
|
195
194
|
};
|
|
196
195
|
}
|
|
197
196
|
|
|
198
|
-
function cluesComponent(resourceSource
|
|
197
|
+
function cluesComponent(resourceSource) {
|
|
199
198
|
if (!isObject(resourceSource)) throw cliError("E_VALIDATION", "단서 resource 원본이 객체가 아닙니다.");
|
|
200
199
|
const clues = [];
|
|
201
200
|
Object.entries(resourceSource).forEach(([sourceId, item]) => {
|
|
@@ -207,7 +206,6 @@ function cluesComponent(resourceSource, writerNote) {
|
|
|
207
206
|
title: name,
|
|
208
207
|
location: source.verification === undefined ? "1차 조사" : "2차 조사",
|
|
209
208
|
description: text(source.content),
|
|
210
|
-
secret: text(source.verification),
|
|
211
209
|
tags: [source.verification === undefined ? "자료" : "제보"],
|
|
212
210
|
color: source.verification === undefined ? "#497fa8" : "#a86b49",
|
|
213
211
|
confirmed: true,
|
|
@@ -216,8 +214,7 @@ function cluesComponent(resourceSource, writerNote) {
|
|
|
216
214
|
});
|
|
217
215
|
return {
|
|
218
216
|
clues,
|
|
219
|
-
enabledOptionalFields: ["confirmed", "image", "location", "tags", "color"
|
|
220
|
-
writerNote
|
|
217
|
+
enabledOptionalFields: ["confirmed", "image", "location", "tags", "color"]
|
|
221
218
|
};
|
|
222
219
|
}
|
|
223
220
|
|
|
@@ -372,25 +369,19 @@ function loadTrueWriterCase(input, options = {}) {
|
|
|
372
369
|
}),
|
|
373
370
|
component("progress", progress),
|
|
374
371
|
component("common", {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
deletedBaseSections: []
|
|
372
|
+
documents: [
|
|
373
|
+
{ id: crypto.randomUUID(), title: "작품 개요", body: docs["00-overview.md"], subdocuments: [] },
|
|
374
|
+
{ id: crypto.randomUUID(), title: "프롤로그", body: text(jsonData.game_set.flow?.["00 - 프롤로그"]?.script), subdocuments: [] },
|
|
375
|
+
{ id: crypto.randomUUID(), title: "사건의 전말", body: "디자이너 전용 정답 및 사건의 전말", subdocuments: [{ id: crypto.randomUUID(), title: "사건의 진실", body: docs["01-truth.md"] }] },
|
|
376
|
+
{ id: crypto.randomUUID(), title: "에필로그", body: "게임 종료 후 공개 문서", subdocuments: [{ id: crypto.randomUUID(), title: "에필로그", body: text(jsonData.game_set.flow?.["14 - 에필로그"]?.script) }] }
|
|
377
|
+
],
|
|
378
|
+
deletedDocumentIds: []
|
|
383
379
|
}),
|
|
384
380
|
component("characters", characterComponent(jsonData.game_set.character)),
|
|
385
381
|
component("assets", { assets: {} }),
|
|
386
|
-
component("clues", cluesComponent(jsonData.resource
|
|
382
|
+
component("clues", cluesComponent(jsonData.resource)),
|
|
387
383
|
component("timeline", { events: timelineEvents }),
|
|
388
384
|
component("ending", ending),
|
|
389
|
-
component("postgame", {
|
|
390
|
-
truth: [{ id: crypto.randomUUID(), title: "사건의 진실", body: docs["01-truth.md"] }],
|
|
391
|
-
epilogue: [{ id: crypto.randomUUID(), title: "에필로그", body: text(jsonData.game_set.flow?.["14 - 에필로그"]?.script) }],
|
|
392
|
-
intro: { truth: "디자이너 전용 정답 및 사건의 전말", epilogue: "게임 종료 후 공개 문서" }
|
|
393
|
-
}),
|
|
394
385
|
component("author-notes", {
|
|
395
386
|
notes: [
|
|
396
387
|
["character-design", "캐릭터 설계 원문", docs["02-characters.md"]],
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const INSTALL_COMMAND = "npm install --global @ssobig/writer-cli@latest";
|
|
4
4
|
const DOWNLOAD_URL = "https://writer.ssobig.com/cli-download";
|
|
5
|
+
const PACKAGE_URL = "https://www.npmjs.com/package/@ssobig/writer-cli";
|
|
5
6
|
const SKILL_COMMANDS = Object.freeze({
|
|
6
7
|
status: "ssobig-writer skills status --target <workspace>",
|
|
7
8
|
install: "ssobig-writer skills install --target <workspace>",
|
|
@@ -10,8 +11,10 @@ const SKILL_COMMANDS = Object.freeze({
|
|
|
10
11
|
|
|
11
12
|
function updateRemediation() {
|
|
12
13
|
return Object.freeze({
|
|
14
|
+
distribution: "npm",
|
|
13
15
|
installCommand: INSTALL_COMMAND,
|
|
14
16
|
downloadUrl: DOWNLOAD_URL,
|
|
17
|
+
packageUrl: PACKAGE_URL,
|
|
15
18
|
skillCommands: SKILL_COMMANDS,
|
|
16
19
|
agentReloadRequired: true
|
|
17
20
|
});
|
|
@@ -20,6 +23,7 @@ function updateRemediation() {
|
|
|
20
23
|
module.exports = Object.freeze({
|
|
21
24
|
INSTALL_COMMAND,
|
|
22
25
|
DOWNLOAD_URL,
|
|
26
|
+
PACKAGE_URL,
|
|
23
27
|
SKILL_COMMANDS,
|
|
24
28
|
updateRemediation
|
|
25
29
|
});
|