terminal-quest 1.0.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/LICENSE +21 -0
- package/bin/terminal-quest.js +2 -0
- package/dist/App.d.ts +2 -0
- package/dist/App.js +33 -0
- package/dist/components/HintBar.d.ts +9 -0
- package/dist/components/HintBar.js +11 -0
- package/dist/components/MenuItem.d.ts +9 -0
- package/dist/components/MenuItem.js +9 -0
- package/dist/components/ObjectivePanel.d.ts +8 -0
- package/dist/components/ObjectivePanel.js +10 -0
- package/dist/components/ProgressBar.d.ts +8 -0
- package/dist/components/ProgressBar.js +10 -0
- package/dist/components/TerminalOutput.d.ts +11 -0
- package/dist/components/TerminalOutput.js +25 -0
- package/dist/components/TerminalPrompt.d.ts +10 -0
- package/dist/components/TerminalPrompt.js +46 -0
- package/dist/data/commands-meta.d.ts +17 -0
- package/dist/data/commands-meta.js +256 -0
- package/dist/data/stories/00-beginner-pc.d.ts +3 -0
- package/dist/data/stories/00-beginner-pc.js +841 -0
- package/dist/data/stories/01-first-server.d.ts +3 -0
- package/dist/data/stories/01-first-server.js +364 -0
- package/dist/data/stories/02-messy-project.d.ts +3 -0
- package/dist/data/stories/02-messy-project.js +433 -0
- package/dist/data/stories/03-log-detective.d.ts +3 -0
- package/dist/data/stories/03-log-detective.js +291 -0
- package/dist/data/stories/04-deploy-day.d.ts +3 -0
- package/dist/data/stories/04-deploy-day.js +337 -0
- package/dist/data/stories/05-git-incident.d.ts +3 -0
- package/dist/data/stories/05-git-incident.js +534 -0
- package/dist/data/stories/06-pipe-master.d.ts +3 -0
- package/dist/data/stories/06-pipe-master.js +377 -0
- package/dist/data/stories/07-dangerous-commands.d.ts +3 -0
- package/dist/data/stories/07-dangerous-commands.js +411 -0
- package/dist/data/stories/index.d.ts +4 -0
- package/dist/data/stories/index.js +14 -0
- package/dist/data/stories/k1-treasure-hunt.d.ts +3 -0
- package/dist/data/stories/k1-treasure-hunt.js +815 -0
- package/dist/data/types.d.ts +97 -0
- package/dist/data/types.js +2 -0
- package/dist/engine/Achievements.d.ts +5 -0
- package/dist/engine/Achievements.js +93 -0
- package/dist/engine/CommandHandler.d.ts +17 -0
- package/dist/engine/CommandHandler.js +177 -0
- package/dist/engine/HintEngine.d.ts +10 -0
- package/dist/engine/HintEngine.js +26 -0
- package/dist/engine/MissionEngine.d.ts +17 -0
- package/dist/engine/MissionEngine.js +84 -0
- package/dist/engine/TabCompletion.d.ts +14 -0
- package/dist/engine/TabCompletion.js +93 -0
- package/dist/engine/VirtualFS.d.ts +33 -0
- package/dist/engine/VirtualFS.js +276 -0
- package/dist/engine/commands/cat.d.ts +4 -0
- package/dist/engine/commands/cat.js +18 -0
- package/dist/engine/commands/cd.d.ts +4 -0
- package/dist/engine/commands/cd.js +12 -0
- package/dist/engine/commands/chmod.d.ts +4 -0
- package/dist/engine/commands/chmod.js +98 -0
- package/dist/engine/commands/clear.d.ts +4 -0
- package/dist/engine/commands/clear.js +4 -0
- package/dist/engine/commands/cp.d.ts +4 -0
- package/dist/engine/commands/cp.js +26 -0
- package/dist/engine/commands/cut.d.ts +4 -0
- package/dist/engine/commands/cut.js +76 -0
- package/dist/engine/commands/echo.d.ts +4 -0
- package/dist/engine/commands/echo.js +4 -0
- package/dist/engine/commands/find.d.ts +4 -0
- package/dist/engine/commands/find.js +60 -0
- package/dist/engine/commands/git.d.ts +4 -0
- package/dist/engine/commands/git.js +510 -0
- package/dist/engine/commands/grep.d.ts +4 -0
- package/dist/engine/commands/grep.js +127 -0
- package/dist/engine/commands/head.d.ts +4 -0
- package/dist/engine/commands/head.js +59 -0
- package/dist/engine/commands/help.d.ts +4 -0
- package/dist/engine/commands/help.js +32 -0
- package/dist/engine/commands/hint.d.ts +4 -0
- package/dist/engine/commands/hint.js +4 -0
- package/dist/engine/commands/index.d.ts +8 -0
- package/dist/engine/commands/index.js +51 -0
- package/dist/engine/commands/ls.d.ts +4 -0
- package/dist/engine/commands/ls.js +50 -0
- package/dist/engine/commands/man.d.ts +4 -0
- package/dist/engine/commands/man.js +51 -0
- package/dist/engine/commands/mkdir.d.ts +4 -0
- package/dist/engine/commands/mkdir.js +31 -0
- package/dist/engine/commands/mv.d.ts +4 -0
- package/dist/engine/commands/mv.js +15 -0
- package/dist/engine/commands/pwd.d.ts +4 -0
- package/dist/engine/commands/pwd.js +4 -0
- package/dist/engine/commands/rm.d.ts +4 -0
- package/dist/engine/commands/rm.js +49 -0
- package/dist/engine/commands/sort.d.ts +4 -0
- package/dist/engine/commands/sort.js +100 -0
- package/dist/engine/commands/tail.d.ts +4 -0
- package/dist/engine/commands/tail.js +59 -0
- package/dist/engine/commands/touch.d.ts +4 -0
- package/dist/engine/commands/touch.js +18 -0
- package/dist/engine/commands/uniq.d.ts +4 -0
- package/dist/engine/commands/uniq.js +61 -0
- package/dist/engine/commands/wc.d.ts +4 -0
- package/dist/engine/commands/wc.js +67 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +6 -0
- package/dist/screens/MissionBriefScreen.d.ts +9 -0
- package/dist/screens/MissionBriefScreen.js +27 -0
- package/dist/screens/MissionCompleteScreen.d.ts +9 -0
- package/dist/screens/MissionCompleteScreen.js +30 -0
- package/dist/screens/ProgressScreen.d.ts +8 -0
- package/dist/screens/ProgressScreen.js +24 -0
- package/dist/screens/SettingsScreen.d.ts +8 -0
- package/dist/screens/SettingsScreen.js +45 -0
- package/dist/screens/StorySelectScreen.d.ts +8 -0
- package/dist/screens/StorySelectScreen.js +81 -0
- package/dist/screens/TerminalScreen.d.ts +12 -0
- package/dist/screens/TerminalScreen.js +150 -0
- package/dist/screens/TitleScreen.d.ts +7 -0
- package/dist/screens/TitleScreen.js +27 -0
- package/dist/state/GameState.d.ts +8 -0
- package/dist/state/GameState.js +12 -0
- package/dist/state/ProgressStore.d.ts +9 -0
- package/dist/state/ProgressStore.js +45 -0
- package/dist/state/useGameState.d.ts +11 -0
- package/dist/state/useGameState.js +92 -0
- package/dist/utils/ascii-art.d.ts +4 -0
- package/dist/utils/ascii-art.js +22 -0
- package/dist/utils/colors.d.ts +17 -0
- package/dist/utils/colors.js +17 -0
- package/dist/utils/text.d.ts +4 -0
- package/dist/utils/text.js +28 -0
- package/package.json +58 -0
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
const mission1FS = {
|
|
2
|
+
type: 'directory',
|
|
3
|
+
children: {
|
|
4
|
+
home: {
|
|
5
|
+
type: 'directory',
|
|
6
|
+
children: {
|
|
7
|
+
project: {
|
|
8
|
+
type: 'directory',
|
|
9
|
+
children: {
|
|
10
|
+
'app.js': {
|
|
11
|
+
type: 'file',
|
|
12
|
+
content: [
|
|
13
|
+
'const express = require("express");',
|
|
14
|
+
'const app = express();',
|
|
15
|
+
'app.get("/", (req, res) => res.send("Hello"));',
|
|
16
|
+
'app.listen(3000);',
|
|
17
|
+
].join('\n'),
|
|
18
|
+
},
|
|
19
|
+
'config.json': {
|
|
20
|
+
type: 'file',
|
|
21
|
+
content: '{"port": 3000, "env": "production", "secret": "abc123"}\n',
|
|
22
|
+
},
|
|
23
|
+
'README.md': {
|
|
24
|
+
type: 'file',
|
|
25
|
+
content: '# My Project\n\nA sample web application.\n',
|
|
26
|
+
},
|
|
27
|
+
data: {
|
|
28
|
+
type: 'directory',
|
|
29
|
+
children: {
|
|
30
|
+
'important.csv': {
|
|
31
|
+
type: 'file',
|
|
32
|
+
content: [
|
|
33
|
+
'id,name,email',
|
|
34
|
+
'1,Tanaka,tanaka@example.com',
|
|
35
|
+
'2,Suzuki,suzuki@example.com',
|
|
36
|
+
'3,Sato,sato@example.com',
|
|
37
|
+
].join('\n'),
|
|
38
|
+
},
|
|
39
|
+
'backup.csv': {
|
|
40
|
+
type: 'file',
|
|
41
|
+
content: [
|
|
42
|
+
'id,name,email',
|
|
43
|
+
'1,Old Data,old@example.com',
|
|
44
|
+
].join('\n'),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
const mission2FS = {
|
|
55
|
+
type: 'directory',
|
|
56
|
+
children: {
|
|
57
|
+
home: {
|
|
58
|
+
type: 'directory',
|
|
59
|
+
children: {
|
|
60
|
+
project: {
|
|
61
|
+
type: 'directory',
|
|
62
|
+
children: {
|
|
63
|
+
'server.conf': {
|
|
64
|
+
type: 'file',
|
|
65
|
+
content: [
|
|
66
|
+
'server {',
|
|
67
|
+
' listen 80;',
|
|
68
|
+
' server_name example.com;',
|
|
69
|
+
' root /var/www/html;',
|
|
70
|
+
'}',
|
|
71
|
+
].join('\n'),
|
|
72
|
+
},
|
|
73
|
+
'database.conf': {
|
|
74
|
+
type: 'file',
|
|
75
|
+
content: [
|
|
76
|
+
'[database]',
|
|
77
|
+
'host = localhost',
|
|
78
|
+
'port = 5432',
|
|
79
|
+
'name = mydb',
|
|
80
|
+
'user = admin',
|
|
81
|
+
].join('\n'),
|
|
82
|
+
},
|
|
83
|
+
'app.log': {
|
|
84
|
+
type: 'file',
|
|
85
|
+
content: [
|
|
86
|
+
'[2024-01-15 10:00:01] INFO: Server started',
|
|
87
|
+
'[2024-01-15 10:05:23] INFO: Request received',
|
|
88
|
+
'[2024-01-15 10:12:45] WARN: Slow query detected',
|
|
89
|
+
'[2024-01-15 11:00:00] INFO: Scheduled task completed',
|
|
90
|
+
].join('\n'),
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
const mission3FS = {
|
|
99
|
+
type: 'directory',
|
|
100
|
+
children: {
|
|
101
|
+
home: {
|
|
102
|
+
type: 'directory',
|
|
103
|
+
children: {
|
|
104
|
+
project: {
|
|
105
|
+
type: 'directory',
|
|
106
|
+
children: {
|
|
107
|
+
'old-build': {
|
|
108
|
+
type: 'directory',
|
|
109
|
+
children: {
|
|
110
|
+
'bundle.js': {
|
|
111
|
+
type: 'file',
|
|
112
|
+
content: '// old build output - v0.1.0\nconsole.log("old");\n',
|
|
113
|
+
},
|
|
114
|
+
'bundle.css': {
|
|
115
|
+
type: 'file',
|
|
116
|
+
content: '/* old styles */\nbody { color: red; }\n',
|
|
117
|
+
},
|
|
118
|
+
'manifest.json': {
|
|
119
|
+
type: 'file',
|
|
120
|
+
content: '{"version": "0.1.0"}\n',
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
src: {
|
|
125
|
+
type: 'directory',
|
|
126
|
+
children: {
|
|
127
|
+
'main.ts': {
|
|
128
|
+
type: 'file',
|
|
129
|
+
content: [
|
|
130
|
+
'import { createApp } from "./utils";',
|
|
131
|
+
'',
|
|
132
|
+
'const app = createApp();',
|
|
133
|
+
'app.run();',
|
|
134
|
+
].join('\n'),
|
|
135
|
+
},
|
|
136
|
+
'utils.ts': {
|
|
137
|
+
type: 'file',
|
|
138
|
+
content: [
|
|
139
|
+
'export function createApp() {',
|
|
140
|
+
' return {',
|
|
141
|
+
' run() { console.log("Running..."); }',
|
|
142
|
+
' };',
|
|
143
|
+
'}',
|
|
144
|
+
].join('\n'),
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
dist: {
|
|
149
|
+
type: 'directory',
|
|
150
|
+
children: {
|
|
151
|
+
'output.js': {
|
|
152
|
+
type: 'file',
|
|
153
|
+
content: '// current build output - v1.0.0\nconsole.log("current");\n',
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
},
|
|
162
|
+
};
|
|
163
|
+
const mission4FS = {
|
|
164
|
+
type: 'directory',
|
|
165
|
+
children: {
|
|
166
|
+
home: {
|
|
167
|
+
type: 'directory',
|
|
168
|
+
children: {
|
|
169
|
+
project: {
|
|
170
|
+
type: 'directory',
|
|
171
|
+
children: {
|
|
172
|
+
logs: {
|
|
173
|
+
type: 'directory',
|
|
174
|
+
children: {
|
|
175
|
+
'app-2024-01.log': {
|
|
176
|
+
type: 'file',
|
|
177
|
+
content: [
|
|
178
|
+
'[2024-01-01] INFO: Server started',
|
|
179
|
+
'[2024-01-15] ERROR: Connection timeout',
|
|
180
|
+
'[2024-01-31] INFO: Monthly cleanup',
|
|
181
|
+
].join('\n'),
|
|
182
|
+
},
|
|
183
|
+
'app-2024-02.log': {
|
|
184
|
+
type: 'file',
|
|
185
|
+
content: [
|
|
186
|
+
'[2024-02-01] INFO: Server started',
|
|
187
|
+
'[2024-02-14] WARN: High memory usage',
|
|
188
|
+
'[2024-02-28] INFO: Monthly cleanup',
|
|
189
|
+
].join('\n'),
|
|
190
|
+
},
|
|
191
|
+
'app-2024-03.log': {
|
|
192
|
+
type: 'file',
|
|
193
|
+
content: [
|
|
194
|
+
'[2024-03-01] INFO: Server started',
|
|
195
|
+
'[2024-03-10] ERROR: Disk full',
|
|
196
|
+
'[2024-03-31] INFO: Monthly cleanup',
|
|
197
|
+
].join('\n'),
|
|
198
|
+
},
|
|
199
|
+
'error.log': {
|
|
200
|
+
type: 'file',
|
|
201
|
+
content: [
|
|
202
|
+
'[2024-01-15] ERROR: Connection timeout',
|
|
203
|
+
'[2024-02-20] ERROR: Out of memory',
|
|
204
|
+
'[2024-03-10] ERROR: Disk full',
|
|
205
|
+
].join('\n'),
|
|
206
|
+
},
|
|
207
|
+
'access.log': {
|
|
208
|
+
type: 'file',
|
|
209
|
+
content: [
|
|
210
|
+
'192.168.1.1 - GET /index.html 200',
|
|
211
|
+
'192.168.1.2 - POST /api/data 201',
|
|
212
|
+
'192.168.1.3 - GET /style.css 200',
|
|
213
|
+
].join('\n'),
|
|
214
|
+
},
|
|
215
|
+
keep: {
|
|
216
|
+
type: 'directory',
|
|
217
|
+
children: {
|
|
218
|
+
'.gitkeep': {
|
|
219
|
+
type: 'file',
|
|
220
|
+
content: '',
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
},
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
},
|
|
231
|
+
};
|
|
232
|
+
export const story07 = {
|
|
233
|
+
id: 'story-07',
|
|
234
|
+
title: '\u5371\u967A\u306A\u30B3\u30DE\u30F3\u30C9',
|
|
235
|
+
description: '\u524A\u9664\u30B3\u30DE\u30F3\u30C9\u306E\u5371\u967A\u6027\u3092\u5B66\u3073\u3001\u5B89\u5168\u306A\u7FD2\u6163\u3092\u8EAB\u306B\u3064\u3051\u3088\u3046\u3002',
|
|
236
|
+
emoji: '\u26A0\uFE0F',
|
|
237
|
+
unlockRequires: ['story-02', 'story-04'],
|
|
238
|
+
course: 'engineer',
|
|
239
|
+
missions: [
|
|
240
|
+
{
|
|
241
|
+
id: 'mission-07-01',
|
|
242
|
+
title: '\u3046\u3063\u304B\u308A\u524A\u9664',
|
|
243
|
+
description: '\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3059\u308B\u524D\u306B\u3001\u307E\u305A\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3059\u308B\u7FD2\u6163\u3092\u3064\u3051\u3088\u3046\u3002',
|
|
244
|
+
narrative: '\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u4E0D\u8981\u306A\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u30D5\u30A1\u30A4\u30EB\u304C\u6B8B\u3063\u3066\u3044\u308B\u3089\u3057\u3044\u3002\u3067\u3082\u524A\u9664\u3059\u308B\u524D\u306B\u3001\u307E\u305A\u4F55\u304C\u3042\u308B\u304B\u78BA\u8A8D\u3057\u3088\u3046\u3002\u91CD\u8981\u306A\u30D5\u30A1\u30A4\u30EB\u3092\u9593\u9055\u3048\u3066\u524A\u9664\u3057\u305F\u3089\u5927\u5909\u3060\uFF01',
|
|
245
|
+
initialCwd: '/home/project',
|
|
246
|
+
initialFS: mission1FS,
|
|
247
|
+
objectives: [
|
|
248
|
+
{
|
|
249
|
+
id: 'obj-07-01-01',
|
|
250
|
+
description: 'ls \u3067\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u3092\u78BA\u8A8D\u3059\u308B',
|
|
251
|
+
checks: [{ type: 'command_executed', command: 'ls' }],
|
|
252
|
+
hints: [
|
|
253
|
+
{ level: 1, text: '\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3092\u8868\u793A\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u3044\u307E\u3057\u3087\u3046\u3002' },
|
|
254
|
+
{ level: 2, text: 'ls \u30B3\u30DE\u30F3\u30C9\u3067\u30D5\u30A1\u30A4\u30EB\u3084\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E00\u89A7\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002' },
|
|
255
|
+
{ level: 3, text: '\u300Cls\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
256
|
+
],
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
id: 'obj-07-01-02',
|
|
260
|
+
description: 'cat \u3067\u91CD\u8981\u30D5\u30A1\u30A4\u30EB\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3059\u308B',
|
|
261
|
+
checks: [
|
|
262
|
+
{ type: 'command_executed', command: 'cat' },
|
|
263
|
+
{ type: 'output_contains', pattern: 'important' },
|
|
264
|
+
],
|
|
265
|
+
hints: [
|
|
266
|
+
{ level: 1, text: '\u30D5\u30A1\u30A4\u30EB\u306E\u4E2D\u8EAB\u3092\u8868\u793A\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3067\u3001\u91CD\u8981\u306A\u30C7\u30FC\u30BF\u3092\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
267
|
+
{ level: 2, text: 'cat \u30B3\u30DE\u30F3\u30C9\u3067 data \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u5185\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u898B\u3066\u307F\u307E\u3057\u3087\u3046\u3002' },
|
|
268
|
+
{ level: 3, text: '\u300Ccat data/important.csv\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
269
|
+
],
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
id: 'obj-07-01-03',
|
|
273
|
+
description: 'rm \u3067\u4E0D\u8981\u30D5\u30A1\u30A4\u30EB\uFF08backup.csv\uFF09\u3092\u524A\u9664\u3059\u308B',
|
|
274
|
+
checks: [{ type: 'file_not_exists', path: '/home/project/data/backup.csv' }],
|
|
275
|
+
hints: [
|
|
276
|
+
{ level: 1, text: '\u4E0D\u8981\u306A\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u3044\u307E\u3057\u3087\u3046\u3002' },
|
|
277
|
+
{ level: 2, text: 'rm \u30B3\u30DE\u30F3\u30C9\u3067\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3067\u304D\u307E\u3059\u3002\u524A\u9664\u5BFE\u8C61\u3092\u9593\u9055\u3048\u306A\u3044\u3088\u3046\u306B\uFF01' },
|
|
278
|
+
{ level: 3, text: '\u300Crm data/backup.csv\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
279
|
+
],
|
|
280
|
+
},
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
id: 'mission-07-02',
|
|
285
|
+
title: '\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u306E\u6975\u610F',
|
|
286
|
+
description: '\u524A\u9664\u3059\u308B\u524D\u306B\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u53D6\u308B\u7FD2\u6163\u3092\u8EAB\u306B\u3064\u3051\u3088\u3046\u3002',
|
|
287
|
+
narrative: '\u30B5\u30FC\u30D0\u30FC\u306E\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u6574\u7406\u3059\u308B\u3053\u3068\u306B\u306A\u3063\u305F\u3002\u3067\u3082\u3044\u304D\u306A\u308A\u524A\u9664\u3059\u308B\u306E\u306F\u5371\u967A\u3060\u3002\u307E\u305A\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3092\u53D6\u3063\u3066\u304B\u3089\u3001\u4E0D\u8981\u306A\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u3088\u3046\u3002',
|
|
288
|
+
initialCwd: '/home/project',
|
|
289
|
+
initialFS: mission2FS,
|
|
290
|
+
objectives: [
|
|
291
|
+
{
|
|
292
|
+
id: 'obj-07-02-01',
|
|
293
|
+
description: 'backups \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B',
|
|
294
|
+
checks: [
|
|
295
|
+
{ type: 'command_executed', command: 'mkdir' },
|
|
296
|
+
{ type: 'file_exists', path: '/home/project/backups' },
|
|
297
|
+
],
|
|
298
|
+
hints: [
|
|
299
|
+
{ level: 1, text: '\u65B0\u3057\u3044\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u3044\u307E\u3057\u3087\u3046\u3002' },
|
|
300
|
+
{ level: 2, text: 'mkdir \u30B3\u30DE\u30F3\u30C9\u3067\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u4F5C\u6210\u3067\u304D\u307E\u3059\u3002' },
|
|
301
|
+
{ level: 3, text: '\u300Cmkdir backups\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
302
|
+
],
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
id: 'obj-07-02-02',
|
|
306
|
+
description: '\u8A2D\u5B9A\u30D5\u30A1\u30A4\u30EB\u3092\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u3059\u308B',
|
|
307
|
+
checks: [{ type: 'file_exists', path: '/home/project/backups/server.conf' }],
|
|
308
|
+
hints: [
|
|
309
|
+
{ level: 1, text: '\u30D5\u30A1\u30A4\u30EB\u3092\u30B3\u30D4\u30FC\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3092\u4F7F\u3044\u307E\u3057\u3087\u3046\u3002' },
|
|
310
|
+
{ level: 2, text: 'cp \u30B3\u30DE\u30F3\u30C9\u3067\u30D5\u30A1\u30A4\u30EB\u3092\u30B3\u30D4\u30FC\u3067\u304D\u307E\u3059\u3002' },
|
|
311
|
+
{ level: 3, text: '\u300Ccp server.conf backups/\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
312
|
+
],
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
id: 'obj-07-02-03',
|
|
316
|
+
description: '\u5B89\u5168\u306B\u5143\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3059\u308B',
|
|
317
|
+
checks: [{ type: 'file_not_exists', path: '/home/project/app.log' }],
|
|
318
|
+
hints: [
|
|
319
|
+
{ level: 1, text: '\u4E0D\u8981\u306B\u306A\u3063\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
320
|
+
{ level: 2, text: 'rm \u30B3\u30DE\u30F3\u30C9\u3067\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3067\u304D\u307E\u3059\u3002\u30ED\u30B0\u30D5\u30A1\u30A4\u30EB\u306F\u4E0D\u8981\u3067\u3059\u306D\u3002' },
|
|
321
|
+
{ level: 3, text: '\u300Crm app.log\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
id: 'mission-07-03',
|
|
328
|
+
title: 'rm -rf \u306E\u6B63\u4F53',
|
|
329
|
+
description: 'rm -rf \u306E\u5A01\u529B\u3092\u7406\u89E3\u3057\u3001\u6B63\u3057\u3044\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3060\u3051\u3092\u524A\u9664\u3057\u3088\u3046\u3002',
|
|
330
|
+
narrative: '\u30D3\u30EB\u30C9\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u304C\u6563\u3089\u304B\u3063\u3066\u3044\u308B\u3002\u53E4\u3044\u30D3\u30EB\u30C9\u7D50\u679C\u3092 rm -rf \u3067\u524A\u9664\u3057\u305F\u3044\u304C\u3001\u9593\u9055\u3048\u3066\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u305F\u3089\u53D6\u308A\u8FD4\u3057\u304C\u3064\u304B\u306A\u3044\u3002\u307E\u305A\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3057\u3066\u304B\u3089\u524A\u9664\u3057\u3088\u3046\u3002',
|
|
331
|
+
initialCwd: '/home/project',
|
|
332
|
+
initialFS: mission3FS,
|
|
333
|
+
objectives: [
|
|
334
|
+
{
|
|
335
|
+
id: 'obj-07-03-01',
|
|
336
|
+
description: 'ls \u3067\u5168\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3059\u308B',
|
|
337
|
+
checks: [{ type: 'command_executed', command: 'ls' }],
|
|
338
|
+
hints: [
|
|
339
|
+
{ level: 1, text: '\u307E\u305A\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
340
|
+
{ level: 2, text: 'ls \u30B3\u30DE\u30F3\u30C9\u3067\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002\u5404\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3082\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
341
|
+
{ level: 3, text: '\u300Cls\u300D\u3084\u300Cls old-build\u300D\u300Cls src\u300D\u3067\u305D\u308C\u305E\u308C\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
342
|
+
],
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
id: 'obj-07-03-02',
|
|
346
|
+
description: '\u6B63\u3057\u3044\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3060\u3051\u3092 rm -rf \u3067\u524A\u9664\u3059\u308B',
|
|
347
|
+
checks: [{ type: 'file_not_exists', path: '/home/project/old-build' }],
|
|
348
|
+
hints: [
|
|
349
|
+
{ level: 1, text: '\u53E4\u3044\u30D3\u30EB\u30C9\u7D50\u679C\u3060\u3051\u3092\u524A\u9664\u3057\u307E\u3057\u3087\u3046\u3002\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u3092\u524A\u9664\u3057\u306A\u3044\u3088\u3046\u6CE8\u610F\uFF01' },
|
|
350
|
+
{ level: 2, text: 'rm -rf \u3067\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3054\u3068\u524A\u9664\u3067\u304D\u307E\u3059\u3002old-build \u3092\u524A\u9664\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
351
|
+
{ level: 3, text: '\u300Crm -rf old-build\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
352
|
+
],
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
id: 'obj-07-03-03',
|
|
356
|
+
description: 'src \u304C\u6B8B\u3063\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B',
|
|
357
|
+
checks: [{ type: 'output_contains', pattern: 'main.ts' }],
|
|
358
|
+
hints: [
|
|
359
|
+
{ level: 1, text: '\u30BD\u30FC\u30B9\u30B3\u30FC\u30C9\u304C\u7121\u4E8B\u306B\u6B8B\u3063\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
360
|
+
{ level: 2, text: 'ls \u30B3\u30DE\u30F3\u30C9\u3067 src \u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
361
|
+
{ level: 3, text: '\u300Cls src\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
362
|
+
],
|
|
363
|
+
},
|
|
364
|
+
],
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
id: 'mission-07-04',
|
|
368
|
+
title: '\u5B89\u5168\u306A\u7FD2\u6163',
|
|
369
|
+
description: 'find \u3067\u524A\u9664\u5BFE\u8C61\u3092\u78BA\u8A8D\u3057\u3066\u304B\u3089\u3001\u5B89\u5168\u306B\u524A\u9664\u3057\u3088\u3046\u3002',
|
|
370
|
+
narrative: '\u30ED\u30B0\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306B\u53E4\u3044\u30ED\u30B0\u30D5\u30A1\u30A4\u30EB\u304C\u6EA2\u308C\u3066\u3044\u308B\u3002\u53E4\u3044\u6708\u6B21\u30ED\u30B0\u3092\u524A\u9664\u3057\u3066\u6574\u7406\u3057\u305F\u3044\u304C\u3001error.log \u3084 access.log \u306F\u6D88\u3057\u3066\u306F\u3044\u3051\u306A\u3044\u3002\u307E\u305A find \u3067\u524A\u9664\u5BFE\u8C61\u3092\u7D5E\u308A\u8FBC\u3082\u3046\u3002',
|
|
371
|
+
initialCwd: '/home/project/logs',
|
|
372
|
+
initialFS: mission4FS,
|
|
373
|
+
objectives: [
|
|
374
|
+
{
|
|
375
|
+
id: 'obj-07-04-01',
|
|
376
|
+
description: 'find \u3067\u524A\u9664\u5BFE\u8C61\u3092\u30EA\u30B9\u30C8\u30A2\u30C3\u30D7\u3059\u308B',
|
|
377
|
+
checks: [
|
|
378
|
+
{ type: 'command_executed', command: 'find' },
|
|
379
|
+
{ type: 'output_contains', pattern: 'app-2024' },
|
|
380
|
+
],
|
|
381
|
+
hints: [
|
|
382
|
+
{ level: 1, text: '\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u30B3\u30DE\u30F3\u30C9\u3067\u3001\u524A\u9664\u5BFE\u8C61\u3092\u5148\u306B\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
383
|
+
{ level: 2, text: 'find \u30B3\u30DE\u30F3\u30C9\u306E -name \u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u30D5\u30A1\u30A4\u30EB\u540D\u30D1\u30BF\u30FC\u30F3\u3092\u6307\u5B9A\u3067\u304D\u307E\u3059\u3002' },
|
|
384
|
+
{ level: 3, text: '\u300Cfind . -name "app-2024*"\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
id: 'obj-07-04-02',
|
|
389
|
+
description: '\u53E4\u3044\u30ED\u30B0\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3059\u308B',
|
|
390
|
+
checks: [{ type: 'file_not_exists', path: '/home/project/logs/app-2024-01.log' }],
|
|
391
|
+
hints: [
|
|
392
|
+
{ level: 1, text: 'find \u3067\u898B\u3064\u3051\u305F\u30D5\u30A1\u30A4\u30EB\u3092\u524A\u9664\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
393
|
+
{ level: 2, text: 'rm \u30B3\u30DE\u30F3\u30C9\u3067\u53E4\u3044\u6708\u6B21\u30ED\u30B0\u3092\u524A\u9664\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
394
|
+
{ level: 3, text: '\u300Crm app-2024-01.log app-2024-02.log app-2024-03.log\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
395
|
+
],
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
id: 'obj-07-04-03',
|
|
399
|
+
description: 'error.log \u3092\u6B8B\u3057\u3066\u3044\u308B\u3053\u3068\u3092\u78BA\u8A8D\u3059\u308B',
|
|
400
|
+
checks: [{ type: 'output_contains', pattern: 'error.log' }],
|
|
401
|
+
hints: [
|
|
402
|
+
{ level: 1, text: '\u6B8B\u3059\u3079\u304D\u30D5\u30A1\u30A4\u30EB\u304C\u7121\u4E8B\u306B\u6B8B\u3063\u3066\u3044\u308B\u304B\u78BA\u8A8D\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
403
|
+
{ level: 2, text: 'ls \u30B3\u30DE\u30F3\u30C9\u3067\u73FE\u5728\u306E\u30D5\u30A1\u30A4\u30EB\u4E00\u89A7\u3092\u8868\u793A\u3057\u307E\u3057\u3087\u3046\u3002' },
|
|
404
|
+
{ level: 3, text: '\u300Cls\u300D\u3068\u5165\u529B\u3057\u3066Enter\u3092\u62BC\u3057\u3066\u304F\u3060\u3055\u3044\u3002' },
|
|
405
|
+
],
|
|
406
|
+
},
|
|
407
|
+
],
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
};
|
|
411
|
+
//# sourceMappingURL=07-dangerous-commands.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { storyK1 } from './k1-treasure-hunt.js';
|
|
2
|
+
import { story00 } from './00-beginner-pc.js';
|
|
3
|
+
import { story01 } from './01-first-server.js';
|
|
4
|
+
import { story02 } from './02-messy-project.js';
|
|
5
|
+
import { story03 } from './03-log-detective.js';
|
|
6
|
+
import { story04 } from './04-deploy-day.js';
|
|
7
|
+
import { story05 } from './05-git-incident.js';
|
|
8
|
+
import { story06 } from './06-pipe-master.js';
|
|
9
|
+
import { story07 } from './07-dangerous-commands.js';
|
|
10
|
+
export const stories = [storyK1, story00, story01, story02, story03, story04, story05, story06, story07];
|
|
11
|
+
export function getStoryById(id) {
|
|
12
|
+
return stories.find((s) => s.id === id);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=index.js.map
|