@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.
Files changed (31) hide show
  1. package/README.md +13 -1
  2. package/config.js +2 -1
  3. package/package.json +1 -1
  4. package/templates/mystery-v1/authoring-view-preference.js +22 -5
  5. package/templates/mystery-v1/character-perspective-preview.js +3 -3
  6. package/templates/mystery-v1/codemirror6-runtime.min.js +28 -0
  7. package/templates/mystery-v1/component-asset-operations.js +5 -4
  8. package/templates/mystery-v1/component-catalog-contract.js +26 -35
  9. package/templates/mystery-v1/component-draft-operations.js +19 -8
  10. package/templates/mystery-v1/component-field-contracts.js +29 -49
  11. package/templates/mystery-v1/component-id-policy.js +1 -1
  12. package/templates/mystery-v1/component-manager.js +21 -11
  13. package/templates/mystery-v1/component-navigation-counts.js +3 -8
  14. package/templates/mystery-v1/component-registry.js +11 -5
  15. package/templates/mystery-v1/component-renderers.js +12 -8
  16. package/templates/mystery-v1/markdown-live-editor.js +350 -0
  17. package/templates/mystery-v1/page-header.js +2 -1
  18. package/tools/writer-cli/package-lock.json +2 -2
  19. package/tools/writer-cli/package.json +1 -1
  20. package/tools/writer-cli/skills/ssobig-writer-cli/SKILL.md +1 -1
  21. package/tools/writer-cli/skills/ssobig-writer-cli/references/errors.md +1 -1
  22. package/tools/writer-cli/skills/ssobig-writer-cli/references/install-auth.md +1 -1
  23. package/tools/writer-cli/skills/ssobig-writer-cli/references/projects-components.md +1 -1
  24. package/tools/writer-cli/src/agent-service.cjs +3 -1
  25. package/tools/writer-cli/src/command-registry.cjs +3 -0
  26. package/tools/writer-cli/src/commands.cjs +85 -3
  27. package/tools/writer-cli/src/domain.cjs +250 -1
  28. package/tools/writer-cli/src/gateway.cjs +14 -0
  29. package/tools/writer-cli/src/mutations.cjs +167 -1
  30. package/tools/writer-cli/src/project-import.cjs +12 -21
  31. 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", "authorNote"]
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, writerNote) {
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", "secret"],
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
- sections: {
376
- overview: docs["00-overview.md"],
377
- prologue: text(jsonData.game_set.flow?.["00 - 프롤로그"]?.script)
378
- },
379
- customSections: [],
380
- sectionOrder: ["overview", "prologue"],
381
- baseTitles: { overview: "작품 개요", prologue: "프롤로그" },
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, docs["04-clues.md"])),
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
  });