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,841 @@
|
|
|
1
|
+
// ミッション1: ここはどこ?
|
|
2
|
+
const mission1FS = {
|
|
3
|
+
type: 'directory',
|
|
4
|
+
children: {
|
|
5
|
+
home: {
|
|
6
|
+
type: 'directory',
|
|
7
|
+
children: {
|
|
8
|
+
watashi: {
|
|
9
|
+
type: 'directory',
|
|
10
|
+
children: {
|
|
11
|
+
'写真': {
|
|
12
|
+
type: 'directory',
|
|
13
|
+
children: {},
|
|
14
|
+
},
|
|
15
|
+
'音楽': {
|
|
16
|
+
type: 'directory',
|
|
17
|
+
children: {},
|
|
18
|
+
},
|
|
19
|
+
'メモ': {
|
|
20
|
+
type: 'directory',
|
|
21
|
+
children: {},
|
|
22
|
+
},
|
|
23
|
+
'ようこそ.txt': {
|
|
24
|
+
type: 'file',
|
|
25
|
+
content: 'はじめまして!これはあなたの新しいパソコンです。\nまずは、今いる場所を確認してみましょう。\n',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
// ミッション2: フォルダの中を見て回ろう
|
|
34
|
+
const mission2FS = {
|
|
35
|
+
type: 'directory',
|
|
36
|
+
children: {
|
|
37
|
+
home: {
|
|
38
|
+
type: 'directory',
|
|
39
|
+
children: {
|
|
40
|
+
watashi: {
|
|
41
|
+
type: 'directory',
|
|
42
|
+
children: {
|
|
43
|
+
'写真': {
|
|
44
|
+
type: 'directory',
|
|
45
|
+
children: {
|
|
46
|
+
'旅行の写真.txt': {
|
|
47
|
+
type: 'file',
|
|
48
|
+
content: '海辺で撮った写真です。とてもきれいでした。\n',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
'音楽': {
|
|
53
|
+
type: 'directory',
|
|
54
|
+
children: {
|
|
55
|
+
'お気に入り.txt': {
|
|
56
|
+
type: 'file',
|
|
57
|
+
content: '1. 夏の思い出\n2. 星空のメロディー\n3. 雨の日の歌\n',
|
|
58
|
+
},
|
|
59
|
+
'プレイリスト': {
|
|
60
|
+
type: 'directory',
|
|
61
|
+
children: {
|
|
62
|
+
'ドライブ用.txt': {
|
|
63
|
+
type: 'file',
|
|
64
|
+
content: 'アップテンポな曲を集めました!\n',
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
'レシピ': {
|
|
71
|
+
type: 'directory',
|
|
72
|
+
children: {
|
|
73
|
+
'カレー.txt': {
|
|
74
|
+
type: 'file',
|
|
75
|
+
content: '材料: じゃがいも、にんじん、たまねぎ、お肉\n作り方: 野菜を切って煮込む\n',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
};
|
|
85
|
+
// ミッション3: 写真アルバムを作ろう
|
|
86
|
+
const mission3FS = {
|
|
87
|
+
type: 'directory',
|
|
88
|
+
children: {
|
|
89
|
+
home: {
|
|
90
|
+
type: 'directory',
|
|
91
|
+
children: {
|
|
92
|
+
watashi: {
|
|
93
|
+
type: 'directory',
|
|
94
|
+
children: {
|
|
95
|
+
'写真': {
|
|
96
|
+
type: 'directory',
|
|
97
|
+
children: {
|
|
98
|
+
'海の写真.txt': {
|
|
99
|
+
type: 'file',
|
|
100
|
+
content: '青い海と白い砂浜の写真です。\n',
|
|
101
|
+
},
|
|
102
|
+
'山の写真.txt': {
|
|
103
|
+
type: 'file',
|
|
104
|
+
content: '紅葉がきれいな山の写真です。\n',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
// ミッション4: ファイルを整理しよう
|
|
115
|
+
const mission4FS = {
|
|
116
|
+
type: 'directory',
|
|
117
|
+
children: {
|
|
118
|
+
home: {
|
|
119
|
+
type: 'directory',
|
|
120
|
+
children: {
|
|
121
|
+
watashi: {
|
|
122
|
+
type: 'directory',
|
|
123
|
+
children: {
|
|
124
|
+
'写真': {
|
|
125
|
+
type: 'directory',
|
|
126
|
+
children: {
|
|
127
|
+
'旅行': {
|
|
128
|
+
type: 'directory',
|
|
129
|
+
children: {},
|
|
130
|
+
},
|
|
131
|
+
'ペット': {
|
|
132
|
+
type: 'directory',
|
|
133
|
+
children: {},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
'メモ': {
|
|
138
|
+
type: 'directory',
|
|
139
|
+
children: {
|
|
140
|
+
'買い物リスト.txt': {
|
|
141
|
+
type: 'file',
|
|
142
|
+
content: '牛乳、パン、たまご\n',
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
'大事なメモ.txt': {
|
|
147
|
+
type: 'file',
|
|
148
|
+
content: '明日の会議は10時から。\n',
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
// ミッション5: いらないファイルを片付けよう
|
|
157
|
+
const mission5FS = {
|
|
158
|
+
type: 'directory',
|
|
159
|
+
children: {
|
|
160
|
+
home: {
|
|
161
|
+
type: 'directory',
|
|
162
|
+
children: {
|
|
163
|
+
watashi: {
|
|
164
|
+
type: 'directory',
|
|
165
|
+
children: {
|
|
166
|
+
'メモ': {
|
|
167
|
+
type: 'directory',
|
|
168
|
+
children: {
|
|
169
|
+
'買い物リスト.txt': {
|
|
170
|
+
type: 'file',
|
|
171
|
+
content: '牛乳、パン、たまご\n',
|
|
172
|
+
},
|
|
173
|
+
'やることリスト.txt': {
|
|
174
|
+
type: 'file',
|
|
175
|
+
content: '1. 掃除\n2. 買い物\n3. 料理\n',
|
|
176
|
+
},
|
|
177
|
+
'古いメモ.tmp': {
|
|
178
|
+
type: 'file',
|
|
179
|
+
content: '一時ファイルです。\n',
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
'写真': {
|
|
184
|
+
type: 'directory',
|
|
185
|
+
children: {
|
|
186
|
+
'旅行': {
|
|
187
|
+
type: 'directory',
|
|
188
|
+
children: {
|
|
189
|
+
'おもいで.txt': {
|
|
190
|
+
type: 'file',
|
|
191
|
+
content: '楽しい旅行の思い出です。\n',
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
},
|
|
195
|
+
'ゴミ.tmp': {
|
|
196
|
+
type: 'file',
|
|
197
|
+
content: '不要な一時ファイルです。\n',
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
'レシピ': {
|
|
202
|
+
type: 'directory',
|
|
203
|
+
children: {
|
|
204
|
+
'カレー.txt': {
|
|
205
|
+
type: 'file',
|
|
206
|
+
content: '材料: じゃがいも、にんじん、たまねぎ、お肉\n作り方: 野菜を切って煮込む\n',
|
|
207
|
+
},
|
|
208
|
+
'一時ファイル.tmp': {
|
|
209
|
+
type: 'file',
|
|
210
|
+
content: '不要な一時ファイルです。\n',
|
|
211
|
+
},
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
},
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
// ミッション6: 日記を書こう
|
|
221
|
+
const mission6FS = {
|
|
222
|
+
type: 'directory',
|
|
223
|
+
children: {
|
|
224
|
+
home: {
|
|
225
|
+
type: 'directory',
|
|
226
|
+
children: {
|
|
227
|
+
watashi: {
|
|
228
|
+
type: 'directory',
|
|
229
|
+
children: {
|
|
230
|
+
'日記': {
|
|
231
|
+
type: 'directory',
|
|
232
|
+
children: {
|
|
233
|
+
'2024-01-15.txt': {
|
|
234
|
+
type: 'file',
|
|
235
|
+
content: '今日は天気がよかった。公園で散歩をした。\n桜がきれいに咲いていた。\n',
|
|
236
|
+
},
|
|
237
|
+
'2024-01-16.txt': {
|
|
238
|
+
type: 'file',
|
|
239
|
+
content: '今日は雨だった。家で本を読んだ。\n夕方に虹が見えた。\n',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
// ミッション7: 長いレポートを確認しよう
|
|
250
|
+
const reportContent = [
|
|
251
|
+
'旅行報告書',
|
|
252
|
+
'',
|
|
253
|
+
'日程: 2024年1月10日〜1月14日',
|
|
254
|
+
'目的地: 北海道',
|
|
255
|
+
'',
|
|
256
|
+
'1日目:',
|
|
257
|
+
'新千歳空港に到着。レンタカーを借りて札幌へ。',
|
|
258
|
+
'札幌ラーメンを食べた。とてもおいしかった。',
|
|
259
|
+
'',
|
|
260
|
+
'2日目:',
|
|
261
|
+
'小樽運河を観光した。ガラス細工のお店を見て回った。',
|
|
262
|
+
'お寿司がとても新鮮でおいしかった。',
|
|
263
|
+
'',
|
|
264
|
+
'3日目:',
|
|
265
|
+
'富良野に移動。ラベンダー畑がきれいだった。',
|
|
266
|
+
'ファーム富田でソフトクリームを食べた。',
|
|
267
|
+
'',
|
|
268
|
+
'4日目:',
|
|
269
|
+
'旭山動物園に行った。ペンギンの散歩が見られた。',
|
|
270
|
+
'お土産をたくさん買った。',
|
|
271
|
+
'',
|
|
272
|
+
'5日目:',
|
|
273
|
+
'新千歳空港でお土産を追加購入。白い恋人を買った。',
|
|
274
|
+
'飛行機で帰宅。とても楽しい旅行だった。',
|
|
275
|
+
].join('\n');
|
|
276
|
+
const mission7FS = {
|
|
277
|
+
type: 'directory',
|
|
278
|
+
children: {
|
|
279
|
+
home: {
|
|
280
|
+
type: 'directory',
|
|
281
|
+
children: {
|
|
282
|
+
watashi: {
|
|
283
|
+
type: 'directory',
|
|
284
|
+
children: {
|
|
285
|
+
'レポート.txt': {
|
|
286
|
+
type: 'file',
|
|
287
|
+
content: reportContent,
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
},
|
|
294
|
+
};
|
|
295
|
+
// ミッション8: 連絡先を整理しよう
|
|
296
|
+
const contactsCSV = [
|
|
297
|
+
'名前,メール,グループ',
|
|
298
|
+
'田中さん,tanaka@example.com,友達',
|
|
299
|
+
'鈴木さん,suzuki@example.com,仕事',
|
|
300
|
+
'田中さん,tanaka@example.com,友達',
|
|
301
|
+
'佐藤さん,sato@example.com,家族',
|
|
302
|
+
'山田さん,yamada@example.com,仕事',
|
|
303
|
+
'鈴木さん,suzuki@example.com,仕事',
|
|
304
|
+
'伊藤さん,ito@example.com,友達',
|
|
305
|
+
'佐藤さん,sato@example.com,家族',
|
|
306
|
+
].join('\n');
|
|
307
|
+
const mission8FS = {
|
|
308
|
+
type: 'directory',
|
|
309
|
+
children: {
|
|
310
|
+
home: {
|
|
311
|
+
type: 'directory',
|
|
312
|
+
children: {
|
|
313
|
+
watashi: {
|
|
314
|
+
type: 'directory',
|
|
315
|
+
children: {
|
|
316
|
+
'連絡先.csv': {
|
|
317
|
+
type: 'file',
|
|
318
|
+
content: contactsCSV,
|
|
319
|
+
},
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
};
|
|
326
|
+
// ミッション9: 共有ファイルの設定
|
|
327
|
+
const mission9FS = {
|
|
328
|
+
type: 'directory',
|
|
329
|
+
children: {
|
|
330
|
+
home: {
|
|
331
|
+
type: 'directory',
|
|
332
|
+
children: {
|
|
333
|
+
watashi: {
|
|
334
|
+
type: 'directory',
|
|
335
|
+
children: {
|
|
336
|
+
'共有フォルダ': {
|
|
337
|
+
type: 'directory',
|
|
338
|
+
children: {
|
|
339
|
+
'レポート.txt': {
|
|
340
|
+
type: 'file',
|
|
341
|
+
content: 'チームの月次レポートです。\n',
|
|
342
|
+
},
|
|
343
|
+
'集計スクリプト.sh': {
|
|
344
|
+
type: 'file',
|
|
345
|
+
content: '#!/bin/bash\necho "集計完了!"\n',
|
|
346
|
+
permissions: '-rw-r--r--',
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
},
|
|
350
|
+
'メモ': {
|
|
351
|
+
type: 'directory',
|
|
352
|
+
children: {
|
|
353
|
+
'やることリスト.txt': {
|
|
354
|
+
type: 'file',
|
|
355
|
+
content: '1. レポート提出\n2. 会議準備\n',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
},
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
};
|
|
365
|
+
// ミッション10: 変更履歴を管理しよう
|
|
366
|
+
const gitLogContent10 = [
|
|
367
|
+
'commit f1a2b3c (HEAD -> main)',
|
|
368
|
+
'Author: watashi <watashi@example.com>',
|
|
369
|
+
'Date: Mon Jan 15 14:00:00 2024',
|
|
370
|
+
'',
|
|
371
|
+
' update monthly report',
|
|
372
|
+
'',
|
|
373
|
+
'commit d4e5f6g',
|
|
374
|
+
'Author: watashi <watashi@example.com>',
|
|
375
|
+
'Date: Mon Jan 15 10:00:00 2024',
|
|
376
|
+
'',
|
|
377
|
+
' add initial report',
|
|
378
|
+
'',
|
|
379
|
+
'commit h7i8j9k',
|
|
380
|
+
'Author: watashi <watashi@example.com>',
|
|
381
|
+
'Date: Mon Jan 14 09:00:00 2024',
|
|
382
|
+
'',
|
|
383
|
+
' initial commit',
|
|
384
|
+
].join('\n');
|
|
385
|
+
const gitStatusOutput10 = [
|
|
386
|
+
'On branch main',
|
|
387
|
+
'Changes not staged for commit:',
|
|
388
|
+
' (use "git add <file>..." to update what will be committed)',
|
|
389
|
+
' (use "git restore <file>..." to discard changes in working directory)',
|
|
390
|
+
'',
|
|
391
|
+
'\tmodified: 月次レポート.txt',
|
|
392
|
+
'',
|
|
393
|
+
'no changes added to commit (use "git add" to track)',
|
|
394
|
+
].join('\n');
|
|
395
|
+
const mission10FS = {
|
|
396
|
+
type: 'directory',
|
|
397
|
+
children: {
|
|
398
|
+
home: {
|
|
399
|
+
type: 'directory',
|
|
400
|
+
children: {
|
|
401
|
+
watashi: {
|
|
402
|
+
type: 'directory',
|
|
403
|
+
children: {
|
|
404
|
+
'レポート': {
|
|
405
|
+
type: 'directory',
|
|
406
|
+
children: {
|
|
407
|
+
'.git': {
|
|
408
|
+
type: 'directory',
|
|
409
|
+
children: {
|
|
410
|
+
HEAD: {
|
|
411
|
+
type: 'file',
|
|
412
|
+
content: 'ref: refs/heads/main',
|
|
413
|
+
},
|
|
414
|
+
branches: {
|
|
415
|
+
type: 'file',
|
|
416
|
+
content: '* main',
|
|
417
|
+
},
|
|
418
|
+
log: {
|
|
419
|
+
type: 'file',
|
|
420
|
+
content: gitLogContent10,
|
|
421
|
+
},
|
|
422
|
+
'status-output': {
|
|
423
|
+
type: 'file',
|
|
424
|
+
content: gitStatusOutput10,
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
},
|
|
428
|
+
'月次レポート.txt': {
|
|
429
|
+
type: 'file',
|
|
430
|
+
content: '1月の活動報告\n- プロジェクトA: 順調に進行中\n- プロジェクトB: 来月開始予定\n',
|
|
431
|
+
},
|
|
432
|
+
},
|
|
433
|
+
},
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
};
|
|
440
|
+
export const story00 = {
|
|
441
|
+
id: 'story-00',
|
|
442
|
+
title: 'はじめてのパソコン冒険',
|
|
443
|
+
description: 'パソコンを手に入れたばかりのあなた。ターミナルを使って、ファイルやフォルダの基本操作を学びましょう。日常的な作業を通じて、パソコンの使い方をマスターしよう!',
|
|
444
|
+
emoji: '\u{1F4BB}',
|
|
445
|
+
course: 'beginner',
|
|
446
|
+
missions: [
|
|
447
|
+
// ミッション1: ここはどこ?
|
|
448
|
+
{
|
|
449
|
+
id: 'mission-00-01',
|
|
450
|
+
title: 'ここはどこ?',
|
|
451
|
+
description: '新しいパソコンを開いたら、まずは今いる場所を確認して、どんなファイルがあるか見てみよう。',
|
|
452
|
+
narrative: 'やったー!新しいパソコンが届いた!さっそくターミナルを開いてみたけど、真っ黒な画面が出てきた。ここはどこだろう?まずは自分がどこにいるのか確認して、周りに何があるのか見てみよう。',
|
|
453
|
+
initialCwd: '/home/watashi',
|
|
454
|
+
initialFS: mission1FS,
|
|
455
|
+
newCommands: ['pwd', 'ls'],
|
|
456
|
+
objectives: [
|
|
457
|
+
{
|
|
458
|
+
id: 'obj-00-01-01',
|
|
459
|
+
description: '今いる場所を確認しよう(pwd コマンド)',
|
|
460
|
+
checks: [{ type: 'command_executed', command: 'pwd' }],
|
|
461
|
+
hints: [
|
|
462
|
+
{ level: 1, text: '今いる場所を画面に表示するコマンドがあります。' },
|
|
463
|
+
{ level: 2, text: '「Print Working Directory」の略で、3文字のコマンドです。' },
|
|
464
|
+
{ level: 3, text: '「pwd」と入力してEnterキーを押してみましょう。' },
|
|
465
|
+
],
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
id: 'obj-00-01-02',
|
|
469
|
+
description: 'ファイルやフォルダの一覧を見よう(ls コマンド)',
|
|
470
|
+
checks: [{ type: 'command_executed', command: 'ls' }],
|
|
471
|
+
hints: [
|
|
472
|
+
{ level: 1, text: '今いる場所にあるファイルやフォルダを一覧表示するコマンドがあります。' },
|
|
473
|
+
{ level: 2, text: '「List」の略で、2文字のコマンドです。' },
|
|
474
|
+
{ level: 3, text: '「ls」と入力してEnterキーを押してみましょう。' },
|
|
475
|
+
],
|
|
476
|
+
},
|
|
477
|
+
],
|
|
478
|
+
},
|
|
479
|
+
// ミッション2: フォルダの中を見て回ろう
|
|
480
|
+
{
|
|
481
|
+
id: 'mission-00-02',
|
|
482
|
+
title: 'フォルダの中を見て回ろう',
|
|
483
|
+
description: 'フォルダを移動して、中にあるファイルを読んでみよう。',
|
|
484
|
+
narrative: 'パソコンの中には「写真」「音楽」「レシピ」などのフォルダがあるみたい。フォルダの中に移動して、どんなファイルがあるか見てみよう!',
|
|
485
|
+
initialCwd: '/home/watashi',
|
|
486
|
+
initialFS: mission2FS,
|
|
487
|
+
newCommands: ['cd', 'cat'],
|
|
488
|
+
objectives: [
|
|
489
|
+
{
|
|
490
|
+
id: 'obj-00-02-01',
|
|
491
|
+
description: '音楽フォルダに移動しよう',
|
|
492
|
+
checks: [{ type: 'cwd_equals', path: '/home/watashi/音楽' }],
|
|
493
|
+
hints: [
|
|
494
|
+
{ level: 1, text: 'フォルダを移動するコマンドがあります。' },
|
|
495
|
+
{ level: 2, text: '「Change Directory」の略で、2文字のコマンドの後に移動先のフォルダ名を指定します。' },
|
|
496
|
+
{ level: 3, text: '「cd 音楽」と入力してEnterキーを押してみましょう。' },
|
|
497
|
+
],
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
id: 'obj-00-02-02',
|
|
501
|
+
description: 'お気に入り.txt の中身を読もう',
|
|
502
|
+
checks: [{ type: 'output_contains', pattern: '星空' }],
|
|
503
|
+
hints: [
|
|
504
|
+
{ level: 1, text: 'ファイルの中身を画面に表示するコマンドがあります。' },
|
|
505
|
+
{ level: 2, text: '猫の鳴き声に似た3文字のコマンドです。' },
|
|
506
|
+
{ level: 3, text: '「cat お気に入り.txt」と入力してみましょう。' },
|
|
507
|
+
],
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
id: 'obj-00-02-03',
|
|
511
|
+
description: 'ホームフォルダに戻ろう',
|
|
512
|
+
checks: [{ type: 'cwd_equals', path: '/home/watashi' }],
|
|
513
|
+
hints: [
|
|
514
|
+
{ level: 1, text: 'cd コマンドで上のフォルダに戻れます。' },
|
|
515
|
+
{ level: 2, text: '「..」は「ひとつ上のフォルダ」を意味します。' },
|
|
516
|
+
{ level: 3, text: '「cd ..」と入力してみましょう。または「cd /home/watashi」でも戻れます。' },
|
|
517
|
+
],
|
|
518
|
+
},
|
|
519
|
+
],
|
|
520
|
+
},
|
|
521
|
+
// ミッション3: 写真アルバムを作ろう
|
|
522
|
+
{
|
|
523
|
+
id: 'mission-00-03',
|
|
524
|
+
title: '写真アルバムを作ろう',
|
|
525
|
+
description: '写真を整理するために、新しいフォルダやファイルを作ってみよう。',
|
|
526
|
+
narrative: '写真フォルダの中がごちゃごちゃしてきた。「旅行」や「ペット」のフォルダを作って、写真を整理しよう!',
|
|
527
|
+
initialCwd: '/home/watashi/写真',
|
|
528
|
+
initialFS: mission3FS,
|
|
529
|
+
newCommands: ['mkdir', 'touch'],
|
|
530
|
+
objectives: [
|
|
531
|
+
{
|
|
532
|
+
id: 'obj-00-03-01',
|
|
533
|
+
description: '「旅行」フォルダを作ろう',
|
|
534
|
+
checks: [{ type: 'file_exists', path: '/home/watashi/写真/旅行' }],
|
|
535
|
+
hints: [
|
|
536
|
+
{ level: 1, text: '新しいフォルダを作るコマンドがあります。' },
|
|
537
|
+
{ level: 2, text: '「Make Directory」の略で、5文字のコマンドです。' },
|
|
538
|
+
{ level: 3, text: '「mkdir 旅行」と入力してEnterキーを押してみましょう。' },
|
|
539
|
+
],
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
id: 'obj-00-03-02',
|
|
543
|
+
description: '「ペット」フォルダを作ろう',
|
|
544
|
+
checks: [{ type: 'file_exists', path: '/home/watashi/写真/ペット' }],
|
|
545
|
+
hints: [
|
|
546
|
+
{ level: 1, text: 'さっきと同じコマンドで、別の名前のフォルダを作りましょう。' },
|
|
547
|
+
{ level: 2, text: 'mkdir の後にフォルダ名を指定します。' },
|
|
548
|
+
{ level: 3, text: '「mkdir ペット」と入力してみましょう。' },
|
|
549
|
+
],
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: 'obj-00-03-03',
|
|
553
|
+
description: '旅行フォルダの中に「おもいで.txt」ファイルを作ろう',
|
|
554
|
+
checks: [{ type: 'file_exists', path: '/home/watashi/写真/旅行/おもいで.txt' }],
|
|
555
|
+
hints: [
|
|
556
|
+
{ level: 1, text: '空のファイルを作るコマンドがあります。' },
|
|
557
|
+
{ level: 2, text: 'touch コマンドでファイルを作れます。フォルダ名/ファイル名 で指定できます。' },
|
|
558
|
+
{ level: 3, text: '「touch 旅行/おもいで.txt」と入力してみましょう。' },
|
|
559
|
+
],
|
|
560
|
+
},
|
|
561
|
+
],
|
|
562
|
+
},
|
|
563
|
+
// ミッション4: ファイルを整理しよう
|
|
564
|
+
{
|
|
565
|
+
id: 'mission-00-04',
|
|
566
|
+
title: 'ファイルを整理しよう',
|
|
567
|
+
description: '間違った場所にあるファイルをコピーしたり、移動したりして整理しよう。',
|
|
568
|
+
narrative: 'あれ?「大事なメモ.txt」がホームフォルダに置きっぱなしだ。これは「メモ」フォルダに入れるべきだよね。ファイルをコピーしたり移動したりして、きちんと整理しよう。',
|
|
569
|
+
initialCwd: '/home/watashi',
|
|
570
|
+
initialFS: mission4FS,
|
|
571
|
+
newCommands: ['cp', 'mv'],
|
|
572
|
+
objectives: [
|
|
573
|
+
{
|
|
574
|
+
id: 'obj-00-04-01',
|
|
575
|
+
description: '大事なメモ.txt をメモフォルダにコピーしよう',
|
|
576
|
+
checks: [{ type: 'file_exists', path: '/home/watashi/メモ/大事なメモ.txt' }],
|
|
577
|
+
hints: [
|
|
578
|
+
{ level: 1, text: 'ファイルをコピーするコマンドがあります。' },
|
|
579
|
+
{ level: 2, text: '「Copy」の略で、2文字のコマンドです。コピー元とコピー先を指定します。' },
|
|
580
|
+
{ level: 3, text: '「cp 大事なメモ.txt メモ/大事なメモ.txt」と入力してみましょう。' },
|
|
581
|
+
],
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
id: 'obj-00-04-02',
|
|
585
|
+
description: 'ホームフォルダの大事なメモ.txt を片付けよう(移動または削除)',
|
|
586
|
+
checks: [{ type: 'file_not_exists', path: '/home/watashi/大事なメモ.txt' }],
|
|
587
|
+
hints: [
|
|
588
|
+
{ level: 1, text: 'ファイルを移動するコマンドや、削除するコマンドがあります。' },
|
|
589
|
+
{ level: 2, text: 'mv コマンドで移動、rm コマンドで削除できます。もうコピー済みなので削除でもOKです。' },
|
|
590
|
+
{ level: 3, text: '「rm 大事なメモ.txt」と入力してみましょう。' },
|
|
591
|
+
],
|
|
592
|
+
},
|
|
593
|
+
],
|
|
594
|
+
},
|
|
595
|
+
// ミッション5: いらないファイルを片付けよう
|
|
596
|
+
{
|
|
597
|
+
id: 'mission-00-05',
|
|
598
|
+
title: 'いらないファイルを片付けよう',
|
|
599
|
+
description: '不要な一時ファイルを探し出して、削除しよう。',
|
|
600
|
+
narrative: 'パソコンの中に「.tmp」という拡張子の一時ファイルがたまっている。これは不要なファイルなので、探し出して片付けよう!',
|
|
601
|
+
initialCwd: '/home/watashi',
|
|
602
|
+
initialFS: mission5FS,
|
|
603
|
+
newCommands: ['rm', 'find'],
|
|
604
|
+
objectives: [
|
|
605
|
+
{
|
|
606
|
+
id: 'obj-00-05-01',
|
|
607
|
+
description: '.tmp ファイルを探そう',
|
|
608
|
+
checks: [{ type: 'output_contains', pattern: '.tmp' }],
|
|
609
|
+
hints: [
|
|
610
|
+
{ level: 1, text: 'ファイルを名前で検索するコマンドがあります。' },
|
|
611
|
+
{ level: 2, text: 'find コマンドで、特定の名前のファイルを探せます。-name オプションを使います。' },
|
|
612
|
+
{ level: 3, text: '「find . -name "*.tmp"」と入力してみましょう。' },
|
|
613
|
+
],
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
id: 'obj-00-05-02',
|
|
617
|
+
description: 'メモ/古いメモ.tmp を削除しよう',
|
|
618
|
+
checks: [{ type: 'file_not_exists', path: '/home/watashi/メモ/古いメモ.tmp' }],
|
|
619
|
+
hints: [
|
|
620
|
+
{ level: 1, text: 'ファイルを削除するコマンドがあります。' },
|
|
621
|
+
{ level: 2, text: '「Remove」の略で、2文字のコマンドです。' },
|
|
622
|
+
{ level: 3, text: '「rm メモ/古いメモ.tmp」と入力してみましょう。' },
|
|
623
|
+
],
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
id: 'obj-00-05-03',
|
|
627
|
+
description: '写真/ゴミ.tmp を削除しよう',
|
|
628
|
+
checks: [{ type: 'file_not_exists', path: '/home/watashi/写真/ゴミ.tmp' }],
|
|
629
|
+
hints: [
|
|
630
|
+
{ level: 1, text: 'さっきと同じコマンドで別のファイルを削除しましょう。' },
|
|
631
|
+
{ level: 2, text: 'rm コマンドにファイルのパスを指定します。' },
|
|
632
|
+
{ level: 3, text: '「rm 写真/ゴミ.tmp」と入力してみましょう。' },
|
|
633
|
+
],
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
id: 'obj-00-05-04',
|
|
637
|
+
description: 'レシピ/一時ファイル.tmp を削除しよう',
|
|
638
|
+
checks: [{ type: 'file_not_exists', path: '/home/watashi/レシピ/一時ファイル.tmp' }],
|
|
639
|
+
hints: [
|
|
640
|
+
{ level: 1, text: '最後の一時ファイルも削除しましょう。' },
|
|
641
|
+
{ level: 2, text: 'rm コマンドにファイルのパスを指定します。' },
|
|
642
|
+
{ level: 3, text: '「rm レシピ/一時ファイル.tmp」と入力してみましょう。' },
|
|
643
|
+
],
|
|
644
|
+
},
|
|
645
|
+
],
|
|
646
|
+
},
|
|
647
|
+
// ミッション6: 日記を書こう
|
|
648
|
+
{
|
|
649
|
+
id: 'mission-00-06',
|
|
650
|
+
title: '日記を書こう',
|
|
651
|
+
description: '新しい日記を書いて、過去の日記から特定の言葉を探してみよう。',
|
|
652
|
+
narrative: '日記フォルダに過去の日記がある。今日の日記を書いて、それから過去の日記から気になる言葉を探してみよう!',
|
|
653
|
+
initialCwd: '/home/watashi/日記',
|
|
654
|
+
initialFS: mission6FS,
|
|
655
|
+
newCommands: ['echo', 'grep'],
|
|
656
|
+
objectives: [
|
|
657
|
+
{
|
|
658
|
+
id: 'obj-00-06-01',
|
|
659
|
+
description: '新しい日記ファイル 2024-01-17.txt を作ろう',
|
|
660
|
+
checks: [{ type: 'file_exists', path: '/home/watashi/日記/2024-01-17.txt' }],
|
|
661
|
+
hints: [
|
|
662
|
+
{ level: 1, text: 'echo コマンドとリダイレクト(>)を使うとファイルに文字を書き込めます。' },
|
|
663
|
+
{ level: 2, text: 'echo "内容" > ファイル名 の形式で、ファイルを作って内容を書き込めます。' },
|
|
664
|
+
{ level: 3, text: '「echo "今日はいい天気だった。" > 2024-01-17.txt」と入力してみましょう。' },
|
|
665
|
+
],
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
id: 'obj-00-06-02',
|
|
669
|
+
description: '過去の日記から「桜」という言葉を探そう',
|
|
670
|
+
checks: [{ type: 'output_contains', pattern: '桜' }],
|
|
671
|
+
hints: [
|
|
672
|
+
{ level: 1, text: 'ファイルの中から特定の言葉を検索するコマンドがあります。' },
|
|
673
|
+
{ level: 2, text: 'grep コマンドで、指定した言葉を含む行を探せます。' },
|
|
674
|
+
{ level: 3, text: '「grep 桜 2024-01-15.txt」と入力してみましょう。' },
|
|
675
|
+
],
|
|
676
|
+
},
|
|
677
|
+
],
|
|
678
|
+
},
|
|
679
|
+
// ミッション7: 長いレポートを確認しよう
|
|
680
|
+
{
|
|
681
|
+
id: 'mission-00-07',
|
|
682
|
+
title: '長いレポートを確認しよう',
|
|
683
|
+
description: '長いレポートの最初と最後だけを見たり、行数を数えたりしてみよう。',
|
|
684
|
+
narrative: '旅行のレポートが長くて全部読むのは大変。最初の部分と最後の部分だけ確認して、全体の行数も数えてみよう。',
|
|
685
|
+
initialCwd: '/home/watashi',
|
|
686
|
+
initialFS: mission7FS,
|
|
687
|
+
newCommands: ['head', 'tail', 'wc'],
|
|
688
|
+
objectives: [
|
|
689
|
+
{
|
|
690
|
+
id: 'obj-00-07-01',
|
|
691
|
+
description: 'レポートの最初の部分を表示しよう(head コマンド)',
|
|
692
|
+
checks: [{ type: 'command_executed', command: 'head' }],
|
|
693
|
+
hints: [
|
|
694
|
+
{ level: 1, text: 'ファイルの最初の数行だけを表示するコマンドがあります。' },
|
|
695
|
+
{ level: 2, text: '「頭」を意味する英語のコマンドです。' },
|
|
696
|
+
{ level: 3, text: '「head レポート.txt」と入力してみましょう。' },
|
|
697
|
+
],
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
id: 'obj-00-07-02',
|
|
701
|
+
description: 'レポートの最後の部分を表示しよう(tail コマンド)',
|
|
702
|
+
checks: [{ type: 'command_executed', command: 'tail' }],
|
|
703
|
+
hints: [
|
|
704
|
+
{ level: 1, text: 'ファイルの最後の数行だけを表示するコマンドがあります。' },
|
|
705
|
+
{ level: 2, text: '「しっぽ」を意味する英語のコマンドです。head の反対です。' },
|
|
706
|
+
{ level: 3, text: '「tail レポート.txt」と入力してみましょう。' },
|
|
707
|
+
],
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
id: 'obj-00-07-03',
|
|
711
|
+
description: 'レポートの行数を数えよう(wc コマンド)',
|
|
712
|
+
checks: [
|
|
713
|
+
{ type: 'command_executed', command: 'wc' },
|
|
714
|
+
],
|
|
715
|
+
hints: [
|
|
716
|
+
{ level: 1, text: 'ファイルの行数や文字数を数えるコマンドがあります。' },
|
|
717
|
+
{ level: 2, text: '「Word Count」の略のコマンドで、-l オプションをつけると行数だけ表示できます。' },
|
|
718
|
+
{ level: 3, text: '「wc -l レポート.txt」と入力してみましょう。' },
|
|
719
|
+
],
|
|
720
|
+
},
|
|
721
|
+
],
|
|
722
|
+
},
|
|
723
|
+
// ミッション8: 連絡先を整理しよう
|
|
724
|
+
{
|
|
725
|
+
id: 'mission-00-08',
|
|
726
|
+
title: '連絡先を整理しよう',
|
|
727
|
+
description: '連絡先データを並べ替えたり、重複を取り除いたりしてみよう。',
|
|
728
|
+
narrative: '連絡先のファイルがぐちゃぐちゃで、同じ人が何回も登録されている。きれいに並べ替えて、重複を取り除こう!',
|
|
729
|
+
initialCwd: '/home/watashi',
|
|
730
|
+
initialFS: mission8FS,
|
|
731
|
+
newCommands: ['sort', 'uniq', 'cut'],
|
|
732
|
+
objectives: [
|
|
733
|
+
{
|
|
734
|
+
id: 'obj-00-08-01',
|
|
735
|
+
description: '連絡先を名前順に並べ替えよう(sort コマンド)',
|
|
736
|
+
checks: [{ type: 'command_executed', command: 'sort' }],
|
|
737
|
+
hints: [
|
|
738
|
+
{ level: 1, text: 'ファイルの中身を並べ替えるコマンドがあります。' },
|
|
739
|
+
{ level: 2, text: '「並べ替え」を意味する英語のコマンドです。' },
|
|
740
|
+
{ level: 3, text: '「sort 連絡先.csv」と入力してみましょう。' },
|
|
741
|
+
],
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
id: 'obj-00-08-02',
|
|
745
|
+
description: '重複を取り除こう(sort | uniq を使おう)',
|
|
746
|
+
checks: [{ type: 'command_executed', command: 'uniq' }],
|
|
747
|
+
hints: [
|
|
748
|
+
{ level: 1, text: '重複した行を取り除くコマンドがあります。「|」(パイプ)で sort と組み合わせます。' },
|
|
749
|
+
{ level: 2, text: 'sort で並べ替えた結果を uniq に渡すと、重複が取り除かれます。' },
|
|
750
|
+
{ level: 3, text: '「sort 連絡先.csv | uniq」と入力してみましょう。' },
|
|
751
|
+
],
|
|
752
|
+
},
|
|
753
|
+
{
|
|
754
|
+
id: 'obj-00-08-03',
|
|
755
|
+
description: '名前の列だけを取り出そう(cut コマンド)',
|
|
756
|
+
checks: [
|
|
757
|
+
{ type: 'command_executed', command: 'cut' },
|
|
758
|
+
{ type: 'output_contains', pattern: '名前' },
|
|
759
|
+
],
|
|
760
|
+
hints: [
|
|
761
|
+
{ level: 1, text: 'CSVの特定の列だけを切り出すコマンドがあります。' },
|
|
762
|
+
{ level: 2, text: 'cut コマンドで区切り文字(-d)と列番号(-f)を指定します。' },
|
|
763
|
+
{ level: 3, text: '「cut -d, -f1 連絡先.csv」と入力してみましょう。' },
|
|
764
|
+
],
|
|
765
|
+
},
|
|
766
|
+
],
|
|
767
|
+
},
|
|
768
|
+
// ミッション9: 共有ファイルの設定
|
|
769
|
+
{
|
|
770
|
+
id: 'mission-00-09',
|
|
771
|
+
title: '共有ファイルの設定',
|
|
772
|
+
description: 'ファイルの権限を設定して、スクリプトを実行できるようにしよう。',
|
|
773
|
+
narrative: '共有フォルダにある集計スクリプトを実行したいけど、実行する権限がない。権限を設定して使えるようにしよう!',
|
|
774
|
+
initialCwd: '/home/watashi',
|
|
775
|
+
initialFS: mission9FS,
|
|
776
|
+
newCommands: ['chmod'],
|
|
777
|
+
objectives: [
|
|
778
|
+
{
|
|
779
|
+
id: 'obj-00-09-01',
|
|
780
|
+
description: '集計スクリプトに実行権限をつけよう(chmod コマンド)',
|
|
781
|
+
checks: [{ type: 'command_executed', command: 'chmod' }],
|
|
782
|
+
hints: [
|
|
783
|
+
{ level: 1, text: 'ファイルの権限(パーミッション)を変更するコマンドがあります。' },
|
|
784
|
+
{ level: 2, text: '「Change Mode」の略のコマンドで、+x をつけると実行権限を追加できます。' },
|
|
785
|
+
{ level: 3, text: '「chmod +x 共有フォルダ/集計スクリプト.sh」と入力してみましょう。' },
|
|
786
|
+
],
|
|
787
|
+
},
|
|
788
|
+
{
|
|
789
|
+
id: 'obj-00-09-02',
|
|
790
|
+
description: 'やることリストを sort で並べ替えて表示しよう',
|
|
791
|
+
checks: [{ type: 'command_executed', command: 'sort' }],
|
|
792
|
+
hints: [
|
|
793
|
+
{ level: 1, text: 'cat でファイルの中身を表示し、パイプ(|)で sort に渡してみましょう。' },
|
|
794
|
+
{ level: 2, text: 'cat ファイル | sort の形式でコマンドをつなげます。' },
|
|
795
|
+
{ level: 3, text: '「cat メモ/やることリスト.txt | sort」と入力してみましょう。' },
|
|
796
|
+
],
|
|
797
|
+
},
|
|
798
|
+
],
|
|
799
|
+
},
|
|
800
|
+
// ミッション10: 変更履歴を管理しよう
|
|
801
|
+
{
|
|
802
|
+
id: 'mission-00-10',
|
|
803
|
+
title: '変更履歴を管理しよう',
|
|
804
|
+
description: 'git を使ってレポートの変更履歴を確認してみよう。',
|
|
805
|
+
narrative: 'レポートフォルダでは git を使って変更履歴を管理している。どんな変更が行われたか確認してみよう!',
|
|
806
|
+
initialCwd: '/home/watashi/レポート',
|
|
807
|
+
initialFS: mission10FS,
|
|
808
|
+
newCommands: ['git'],
|
|
809
|
+
objectives: [
|
|
810
|
+
{
|
|
811
|
+
id: 'obj-00-10-01',
|
|
812
|
+
description: 'レポートの現在の状態を確認しよう(git status)',
|
|
813
|
+
checks: [
|
|
814
|
+
{ type: 'command_executed', command: 'git' },
|
|
815
|
+
{ type: 'output_contains', pattern: 'modified' },
|
|
816
|
+
],
|
|
817
|
+
hints: [
|
|
818
|
+
{ level: 1, text: 'ファイルの変更状態を確認するGitコマンドがあります。' },
|
|
819
|
+
{ level: 2, text: 'git status コマンドで、どのファイルが変更されたか確認できます。' },
|
|
820
|
+
{ level: 3, text: '「git status」と入力してEnterキーを押してみましょう。' },
|
|
821
|
+
],
|
|
822
|
+
},
|
|
823
|
+
{
|
|
824
|
+
id: 'obj-00-10-02',
|
|
825
|
+
description: '変更の履歴を見てみよう(git log)',
|
|
826
|
+
checks: [
|
|
827
|
+
{ type: 'command_executed', command: 'git' },
|
|
828
|
+
{ type: 'output_contains', pattern: 'commit' },
|
|
829
|
+
],
|
|
830
|
+
hints: [
|
|
831
|
+
{ level: 1, text: '過去の変更履歴を表示するGitコマンドがあります。' },
|
|
832
|
+
{ level: 2, text: 'git log コマンドで、過去にどんな変更が行われたか確認できます。' },
|
|
833
|
+
{ level: 3, text: '「git log」と入力してEnterキーを押してみましょう。' },
|
|
834
|
+
],
|
|
835
|
+
},
|
|
836
|
+
],
|
|
837
|
+
},
|
|
838
|
+
],
|
|
839
|
+
unlockRequires: [],
|
|
840
|
+
};
|
|
841
|
+
//# sourceMappingURL=00-beginner-pc.js.map
|