@eliceio/cdk-cli 0.1.0-alpha.3 → 0.1.0-alpha.5
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 +288 -200
- package/es/cli.js +70 -66
- package/es/commands/build/index.d.ts +1 -1
- package/es/commands/build/index.js +27 -15
- package/es/commands/create/index.d.ts +5 -1
- package/es/commands/create/index.js +34 -15
- package/es/commands/create/install.d.ts +17 -0
- package/es/commands/create/install.js +53 -0
- package/es/commands/create/scaffold.d.ts +4 -1
- package/es/commands/create/scaffold.js +19 -13
- package/es/commands/dev/index.d.ts +1 -1
- package/es/commands/dev/index.js +5 -5
- package/es/commands/doctor/index.d.ts +29 -2
- package/es/commands/doctor/index.js +253 -55
- package/es/commands/mcp/index.d.ts +0 -12
- package/es/commands/mcp/index.js +6 -57
- package/es/commands/setup/index.d.ts +11 -3
- package/es/commands/setup/index.js +112 -37
- package/es/commands/skill/index.d.ts +46 -8
- package/es/commands/skill/index.js +151 -35
- package/es/commands/uninstall/index.d.ts +54 -0
- package/es/commands/uninstall/index.js +304 -0
- package/es/commands/update/index.d.ts +59 -0
- package/es/commands/update/index.js +251 -0
- package/es/commands/validate/index.d.ts +18 -0
- package/es/commands/{check → validate}/index.js +16 -10
- package/es/core/collect.d.ts +5 -2
- package/es/core/config.d.ts +99 -50
- package/es/core/config.js +244 -91
- package/es/core/latest.d.ts +21 -0
- package/es/core/latest.js +43 -0
- package/es/core/manifest.d.ts +2 -1
- package/es/core/manifest.js +2 -1
- package/es/core/minify.js +2 -2
- package/es/core/prepare.d.ts +18 -2
- package/es/core/prepare.js +48 -16
- package/es/core/project-check.d.ts +19 -8
- package/es/core/project-check.js +36 -9
- package/es/core/sandbox.js +2 -2
- package/es/core/sdk.d.ts +39 -0
- package/es/core/sdk.js +95 -0
- package/es/core/templates.d.ts +2 -4
- package/es/core/templates.js +2 -5
- package/es/dev/grading.d.ts +7 -8
- package/es/dev/grading.js +6 -16
- package/es/dev/host-page.d.ts +1 -1
- package/es/dev/host-page.js +12 -10
- package/es/dev/mock-api.d.ts +13 -18
- package/es/dev/mock-api.js +56 -66
- package/es/dev/server.js +52 -52
- package/es/rules/check.js +43 -31
- package/es/rules/index.d.ts +1 -1
- package/es/rules/index.js +1 -1
- package/es/rules/manifest.d.ts +28 -20
- package/es/rules/manifest.js +58 -55
- package/es/rules/types.d.ts +18 -20
- package/es/rules.json.js +2 -2
- package/es/test-packages.d.ts +7 -0
- package/package.json +3 -4
- package/rules.json +27 -43
- package/skills/_shared/always.md +4 -4
- package/skills/elice-content-check/SKILL.md +11 -8
- package/skills/elice-content-create/SKILL.md +8 -7
- package/skills/elice-content-guide/SKILL.md +42 -0
- package/skills/elice-content-guide/topics/00-what-the-person-decides.md +11 -0
- package/skills/elice-content-guide/topics/01-check-the-environment.md +10 -0
- package/skills/elice-content-guide/topics/02-design-the-material.md +35 -0
- package/skills/elice-content-guide/topics/03-create-the-project.md +22 -0
- package/skills/elice-content-guide/topics/04-rules.md +12 -0
- package/skills/elice-content-guide/topics/05-screen-code.md +101 -0
- package/skills/elice-content-guide/topics/06-using-the-quiz-template.md +22 -0
- package/skills/elice-content-guide/topics/07-move-existing-html.md +10 -0
- package/skills/elice-content-guide/topics/08-fix-check-errors.md +24 -0
- package/skills/elice-content-guide/topics/09-check.md +10 -0
- package/skills/elice-content-guide/topics/10-build.md +8 -0
- package/skills/elice-content-guide/topics/11-more.md +4 -0
- package/skills/elice-content-guide/topics/12-upload-with-the-material-mcp.md +41 -0
- package/skills/elice-content-migrate/SKILL.md +8 -7
- package/skills/elice-content-publish/SKILL.md +8 -7
- package/templates/_shared/lib/cdk-mock.d.ts +5 -13
- package/templates/_shared/lib/cdk-mock.js +49 -144
- package/templates/_shared/lib/elice-content.css +68 -1
- package/templates/_shared/lib/elice-content.d.ts +11 -38
- package/templates/_shared/lib/elice-content.js +43 -248
- package/templates/blank/README.md +12 -10
- package/templates/blank/metadata.json +9 -0
- package/templates/blank/package.json +13 -0
- package/templates/blank/screens/edit.js +1 -1
- package/templates/blank/screens/instructor.js +12 -5
- package/templates/blank/screens/learn.js +16 -11
- package/templates/blank/template.json +2 -2
- package/templates/quiz/README.md +15 -12
- package/templates/quiz/core/behaviors.js +4 -1
- package/templates/quiz/core/editor.d.ts +21 -10
- package/templates/quiz/core/editor.js +44 -31
- package/templates/quiz/core/model.d.ts +14 -0
- package/templates/quiz/core/model.js +76 -4
- package/templates/quiz/metadata.json +9 -0
- package/templates/quiz/package.json +13 -0
- package/templates/quiz/screens/edit.js +101 -34
- package/templates/quiz/screens/instructor.js +18 -12
- package/templates/quiz/screens/learn.js +45 -36
- package/templates/quiz/styles.css +65 -22
- package/templates/quiz/template.json +2 -2
- package/templates/quiz/ui/templates/edit.d.ts +1 -0
- package/templates/quiz/ui/templates/edit.js +65 -19
- package/templates/quiz/ui/templates/group.js +10 -2
- package/templates/quiz/ui/texts.js +11 -11
- package/es/commands/check/index.d.ts +0 -15
- package/es/commands/guide/index.d.ts +0 -29
- package/es/commands/guide/index.js +0 -120
- package/guides/content-development.md +0 -294
- package/templates/_shared/lib/cdk.js +0 -3
- package/templates/blank/completion.html +0 -15
- package/templates/blank/content.json +0 -4
- package/templates/blank/elice.config.json +0 -10
- package/templates/blank/screens/completion.js +0 -7
- package/templates/quiz/content.json +0 -35
- package/templates/quiz/elice.config.json +0 -9
- package/templates/quiz/grading.json +0 -4
package/es/dev/mock-api.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { parseGrading } from '../core/config.js';
|
|
2
2
|
import { grade } from './grading.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -21,10 +21,6 @@ const TOKEN_SCENARIOS = Object.freeze({
|
|
|
21
21
|
scope: 'edit',
|
|
22
22
|
viewer: 'instructor'
|
|
23
23
|
},
|
|
24
|
-
completionPolicy: {
|
|
25
|
-
scope: 'edit',
|
|
26
|
-
viewer: 'instructor'
|
|
27
|
-
},
|
|
28
24
|
instructor: {
|
|
29
25
|
scope: 'learn',
|
|
30
26
|
viewer: 'instructor'
|
|
@@ -136,7 +132,7 @@ function record(state, accountId, change, completed) {
|
|
|
136
132
|
const now = new Date().toISOString();
|
|
137
133
|
state.results.set(accountId, {
|
|
138
134
|
score: change.score ?? prev.score,
|
|
139
|
-
submit_count: prev.submit_count + (change.submit_count
|
|
135
|
+
submit_count: prev.submit_count + (change.submit_count),
|
|
140
136
|
completed_at: prev.completed_at ?? (completed ? now : null)
|
|
141
137
|
});
|
|
142
138
|
}
|
|
@@ -162,24 +158,21 @@ async function handleMockApi(req, res, path, opts) {
|
|
|
162
158
|
expires_at: new Date(exp * 1000).toISOString()
|
|
163
159
|
});
|
|
164
160
|
}
|
|
165
|
-
const m = path.match(/^\/materials\/([0-9a-f-]{36})(\/me|\/submissions|\/submissions\/me)?$/);
|
|
161
|
+
const m = path.match(/^\/materials\/([0-9a-f-]{36})(\/me|\/draft|\/submissions|\/submissions\/me)?$/);
|
|
166
162
|
if (!m) return fail(res, 404, 'RESOURCE_NOT_FOUND', `no route: ${method} ${path}`);
|
|
167
163
|
const claims = readClaims(req);
|
|
168
164
|
if (!claims) return fail(res, 401, 'AUTHENTICATION_INVALID', 'missing or expired token (dev)');
|
|
169
165
|
if (m[1] !== claims.material_id) return fail(res, 403, 'AUTH_PERMISSION_DENIED', 'material mismatch');
|
|
170
166
|
const sub = m[2] ?? '';
|
|
171
167
|
const subject = claims.account_id;
|
|
172
|
-
// 서버처럼 학생 · 튜터 · 교육자(learn scope)에게는 settings.grading(정답)을 빼고, edit
|
|
168
|
+
// 서버처럼 학생 · 튜터 · 교육자(learn scope)에게는 settings.grading(정답)을 빼고, edit 범위에는 그대로 준다
|
|
173
169
|
const withGrading = settings => {
|
|
170
|
+
if (claims.scope === 'edit') return settings;
|
|
174
171
|
const {
|
|
175
172
|
grading: _ignored,
|
|
176
173
|
...rest
|
|
177
174
|
} = settings;
|
|
178
|
-
|
|
179
|
-
return saved ? {
|
|
180
|
-
...rest,
|
|
181
|
-
grading: saved
|
|
182
|
-
} : rest;
|
|
175
|
+
return rest;
|
|
183
176
|
};
|
|
184
177
|
const material = settings => ({
|
|
185
178
|
id: DEV_MATERIAL_ID,
|
|
@@ -198,74 +191,70 @@ async function handleMockApi(req, res, path, opts) {
|
|
|
198
191
|
screens: Object.fromEntries(Object.entries(opts.getEntries()).map(([screen, entry]) => [screen, {
|
|
199
192
|
entry,
|
|
200
193
|
enabled: true
|
|
201
|
-
}]))
|
|
202
|
-
completionPolicies: opts.getCompletionPolicies?.() ?? []
|
|
194
|
+
}]))
|
|
203
195
|
},
|
|
204
196
|
file_tree: [],
|
|
205
|
-
settings: withGrading(settings)
|
|
206
|
-
completion_policy: opts.getGrading()?.completion_policy ?? 'on_access'
|
|
197
|
+
settings: withGrading(settings)
|
|
207
198
|
}
|
|
208
199
|
});
|
|
209
200
|
if (method === 'GET' && sub === '') return send(res, 200, material(state.settings));
|
|
210
|
-
//
|
|
211
|
-
// 기준 버전이 다르면 409 (그 사이 다른 저장)
|
|
201
|
+
// 서버처럼 PATCH /materials/{id}는 settings를 받지 않는다 (422 extra_forbidden). dev는 발행 · 복원을 흉내 내지 않는다
|
|
212
202
|
if (method === 'PATCH' && sub === '') {
|
|
203
|
+
if (claims.scope !== 'edit') return fail(res, 403, 'AUTH_PERMISSION_DENIED', 'save only with an edit token');
|
|
204
|
+
const {
|
|
205
|
+
json
|
|
206
|
+
} = await body(req);
|
|
207
|
+
if (json && typeof json === 'object' && 'settings' in json) return fail(res, 422, 'VALIDATION_ERROR', 'settings: use PATCH /materials/{id}/draft', [{
|
|
208
|
+
type: 'extra_forbidden',
|
|
209
|
+
loc: ['body', 'settings']
|
|
210
|
+
}]);
|
|
211
|
+
return fail(res, 400, 'INVALID_INPUT', 'empty_patch');
|
|
212
|
+
}
|
|
213
|
+
// 편집 화면의 saveSettings: edit 토큰으로 draft의 settings를 고침 (dev에서는 바로 지금 버전 settings)
|
|
214
|
+
if (method === 'PATCH' && sub === '/draft') {
|
|
213
215
|
if (claims.scope !== 'edit') return fail(res, 403, 'AUTH_PERMISSION_DENIED', 'settings only with an edit token');
|
|
214
216
|
const {
|
|
215
217
|
json
|
|
216
218
|
} = await body(req);
|
|
217
|
-
const
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
state.version += 1;
|
|
252
|
-
log(`자료를 저장했습니다 (${settings !== undefined ? 'settings' : 'completion_policy'}, 버전 dev-${state.version})`);
|
|
253
|
-
return send(res, 200, material(state.settings));
|
|
219
|
+
const settings = json?.settings;
|
|
220
|
+
if (settings === undefined) return fail(res, 400, 'INVALID_INPUT', 'empty_patch');
|
|
221
|
+
if (!settings || typeof settings !== 'object') return fail(res, 400, 'INVALID_INPUT', 'settings must be an object');
|
|
222
|
+
// 편집 화면이 보낸 settings는 통째로 .ecdk/settings.json으로 (dev 전용 저장 위치). grading이 없으면 저장된 채점 설정은 그대로
|
|
223
|
+
const {
|
|
224
|
+
grading,
|
|
225
|
+
...rest
|
|
226
|
+
} = settings;
|
|
227
|
+
let next = rest;
|
|
228
|
+
if (grading !== undefined && grading !== null) {
|
|
229
|
+
const parsed = parseGrading(grading);
|
|
230
|
+
if (typeof parsed === 'string') return fail(res, 400, 'INVALID_INPUT', `grading: ${parsed}`);
|
|
231
|
+
next = {
|
|
232
|
+
...rest,
|
|
233
|
+
grading: parsed
|
|
234
|
+
};
|
|
235
|
+
} else if (state.settings.grading !== undefined) next = {
|
|
236
|
+
...rest,
|
|
237
|
+
grading: state.settings.grading
|
|
238
|
+
};
|
|
239
|
+
state.settings = next;
|
|
240
|
+
await opts.saveSettings?.(next);
|
|
241
|
+
log(`내용을 .ecdk/settings.json에 저장했습니다${next.grading ? ` (채점 설정 ${next.grading.type})` : ''}`);
|
|
242
|
+
const {
|
|
243
|
+
metadata
|
|
244
|
+
} = material(state.settings).current_version;
|
|
245
|
+
return send(res, 200, {
|
|
246
|
+
id: 'dev-draft',
|
|
247
|
+
status: 'ready',
|
|
248
|
+
metadata,
|
|
249
|
+
file_tree: [],
|
|
250
|
+
settings: state.settings
|
|
251
|
+
});
|
|
254
252
|
}
|
|
255
253
|
if (method === 'GET' && sub === '/me') {
|
|
256
254
|
const user = claims.viewer === 'instructor' ? MANAGER : STUDENT;
|
|
257
|
-
if (claims.scope === 'learn' && claims.viewer === 'student' && opts.getGrading()?.completion_policy === 'on_access' && !state.results.has(subject)) {
|
|
258
|
-
record(state, subject, {
|
|
259
|
-
score: 100
|
|
260
|
-
}, true);
|
|
261
|
-
log('열람 완료로 100점 (on_access)');
|
|
262
|
-
}
|
|
263
|
-
const local = opts.getGrading();
|
|
264
255
|
return send(res, 200, {
|
|
265
256
|
scope: claims.scope,
|
|
266
257
|
viewer: claims.viewer,
|
|
267
|
-
completion_policy: local?.completion_policy ?? 'on_access',
|
|
268
|
-
grading_type: local?.completion_policy === 'on_graded' ? local.grading?.type ?? null : null,
|
|
269
258
|
user: {
|
|
270
259
|
anonymous_id: user.anonymous_id,
|
|
271
260
|
fullname: user.fullname
|
|
@@ -314,10 +303,11 @@ async function handleMockApi(req, res, path, opts) {
|
|
|
314
303
|
is_correct: isCorrect,
|
|
315
304
|
score
|
|
316
305
|
});
|
|
306
|
+
// 채점 설정이 있으면 통과해야, 없으면 제출만으로 기록에 완료 시각을 남긴다 (운영 완료 여부는 LXP 완료 정책이 정함)
|
|
317
307
|
record(state, subject, {
|
|
318
308
|
score,
|
|
319
309
|
submit_count: 1
|
|
320
|
-
}, isCorrect === true);
|
|
310
|
+
}, isCorrect === true || !opts.getGrading()?.grading);
|
|
321
311
|
log(`학생 제출: ${score ?? '-'}점 (${isCorrect === null ? '채점 없음' : isCorrect ? '정답' : '오답'})`);
|
|
322
312
|
return send(res, 200, {
|
|
323
313
|
is_correct: isCorrect,
|
package/es/dev/server.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { watch
|
|
2
|
-
import { mkdir, writeFile } from 'node:fs/promises';
|
|
1
|
+
import { watch } from 'node:fs';
|
|
2
|
+
import { rm, mkdir, writeFile } from 'node:fs/promises';
|
|
3
3
|
import { createServer } from 'node:http';
|
|
4
|
-
import { resolve,
|
|
5
|
-
import { loadConfig,
|
|
4
|
+
import { resolve, extname, join, basename, relative, sep, dirname } from 'node:path';
|
|
5
|
+
import { loadConfig, loadSavedSettings, savedGrading, SETTINGS_DATA_FILE, PACKAGE_FILE, CONFIG_FILE } from '../core/config.js';
|
|
6
6
|
import { prepareContent } from '../core/prepare.js';
|
|
7
7
|
import { projectCheckOptions } from '../core/project-check.js';
|
|
8
8
|
import { inlineModuleScripts } from '../core/sandbox.js';
|
|
9
|
+
import { missingSdkMessage } from '../core/sdk.js';
|
|
9
10
|
import { checkFiles } from '../rules/check.js';
|
|
10
11
|
import '../rules/spec.js';
|
|
11
12
|
import 'fflate';
|
|
@@ -48,7 +49,7 @@ function summarize(check) {
|
|
|
48
49
|
const warns = check.issues.length - errors.length;
|
|
49
50
|
const head = `${check.ok ? '[ok]' : '[fail]'} 검사 오류 ${errors.length} · 경고 ${warns} (규칙 ${check.rulesVersion})`;
|
|
50
51
|
const lines = check.issues.slice(0, 5).map(i => ` [${i.level}] ${i.id}${i.path ? ` ${i.path}${i.line ? `:${i.line}` : ''}` : ''} ${i.message}`);
|
|
51
|
-
if (check.issues.length > 5) lines.push(` … 외 ${check.issues.length - 5}개 (ecdk
|
|
52
|
+
if (check.issues.length > 5) lines.push(` … 외 ${check.issues.length - 5}개 (ecdk validate로 전체 보기)`);
|
|
52
53
|
return [head, ...lines].join('\n');
|
|
53
54
|
}
|
|
54
55
|
/** 포트가 이미 쓰일 때: 어느 포트(호스트 · 콘텐츠)인지 알린다 */
|
|
@@ -92,37 +93,36 @@ async function startDevServer(opts) {
|
|
|
92
93
|
const dir = resolve(opts.dir);
|
|
93
94
|
const log = opts.log ?? (l => process.stdout.write(`${l}\n`));
|
|
94
95
|
let config = await loadConfig(dir);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
/**
|
|
106
|
-
* 완료 정책 화면의 saveCompletionPolicy(PATCH completion_policy)를 흉내 서버가 받으면 `.ecdk/completion.json`에 쓴다
|
|
107
|
-
* (운영은 material_version.completion_policy). 값 검사는 흉내 서버가 한다
|
|
108
|
-
*/
|
|
109
|
-
async function saveCompletionPolicy(policy) {
|
|
110
|
-
const path = join(dir, COMPLETION_DATA_FILE);
|
|
96
|
+
const state = createState();
|
|
97
|
+
// 편집 화면이 저장한 settings(내용 + grading)는 .ecdk/settings.json에 남겨 dev를 다시 열어도 그대로 (운영은 서버 settings)
|
|
98
|
+
state.settings = await loadSavedSettings(dir);
|
|
99
|
+
savedGrading(state.settings); // grading 형식이 틀리면 시작할 때 알린다
|
|
100
|
+
/** 로컬 채점 흉내: 저장한 settings.grading (없으면 제출만 받음). 문제 설명은 채점 없음 */
|
|
101
|
+
const localGrading = () => config.kind === 'description' ? undefined : {
|
|
102
|
+
grading: savedGrading(state.settings)
|
|
103
|
+
};
|
|
104
|
+
async function writeJson(file, data) {
|
|
105
|
+
const path = join(dir, file);
|
|
111
106
|
await mkdir(dirname(path), {
|
|
112
107
|
recursive: true
|
|
113
108
|
});
|
|
114
|
-
await writeFile(path, `${JSON.stringify(
|
|
115
|
-
completion_policy: policy
|
|
116
|
-
}, null, 2)}\n`);
|
|
117
|
-
grading = await loadGrading(dir, config);
|
|
109
|
+
await writeFile(path, `${JSON.stringify(data, null, 2)}\n`);
|
|
118
110
|
}
|
|
119
|
-
|
|
120
|
-
|
|
111
|
+
/**
|
|
112
|
+
* 편집 화면의 saveSettings(PATCH /draft settings)를 흉내 서버가 받으면 settings 전체(내용 + grading)를 `.ecdk/settings.json`에 쓴다
|
|
113
|
+
* (운영은 material_version.settings). 값 검사는 흉내 서버가 한다. 점(.) 폴더라 감시 · zip에서 빠진다
|
|
114
|
+
*/
|
|
115
|
+
const saveSettings = settings => writeJson(SETTINGS_DATA_FILE, settings);
|
|
116
|
+
// SDK를 설치하기 전에도 mock으로는 열린다 (실제 SDK 모드 ?sdk=real만 lib/cdk.js가 없어 실패, 아래에서 알림)
|
|
117
|
+
let prepared = await prepareContent(dir, config, {
|
|
118
|
+
requireSdk: false
|
|
119
|
+
});
|
|
120
|
+
const warnSdk = () => {
|
|
121
|
+
if (prepared.sdk.missing) log(`[dev] ${missingSdkMessage()} 그 전에는 mock SDK로만 열립니다 (?sdk=real은 lib/cdk.js가 없어 실패).`);
|
|
122
|
+
};
|
|
123
|
+
warnSdk();
|
|
121
124
|
let files = await servedFiles(prepared, log);
|
|
122
|
-
let check = checkFiles(prepared.files, projectCheckOptions(
|
|
123
|
-
grading: grading?.grading ?? null
|
|
124
|
-
}));
|
|
125
|
-
const state = createState();
|
|
125
|
+
let check = checkFiles(prepared.files, await projectCheckOptions(dir, config));
|
|
126
126
|
const clients = new Set();
|
|
127
127
|
let hostOrigin = '';
|
|
128
128
|
let contentOrigin = '';
|
|
@@ -190,30 +190,24 @@ async function startDevServer(opts) {
|
|
|
190
190
|
for (const [k, v] of Object.entries(cors)) res.setHeader(k, v);
|
|
191
191
|
await handleMockApi(req, res, url.pathname.slice(4), {
|
|
192
192
|
state,
|
|
193
|
-
getGrading:
|
|
194
|
-
|
|
195
|
-
writeGradingFile,
|
|
193
|
+
getGrading: localGrading,
|
|
194
|
+
saveSettings,
|
|
196
195
|
getEntries: entries,
|
|
197
|
-
getCompletionPolicies: () => check.manifest?.completionPolicies ?? [],
|
|
198
|
-
saveCompletionPolicy,
|
|
199
196
|
onEvent: m => log(`[api] ${m}`)
|
|
200
197
|
});
|
|
201
198
|
return;
|
|
202
199
|
}
|
|
203
|
-
// 콘텐츠 주소를 직접 열어 mock으로 돌 때:
|
|
200
|
+
// 콘텐츠 주소를 직접 열어 mock으로 돌 때: .ecdk(저장한 settings)는 zip에 없어 콘텐츠 서버가 주지 않으므로
|
|
204
201
|
// 흉내 서버가 채점에 쓰는 것과 같은 로컬 채점 설정을 여기서 준다 (dev 전용)
|
|
205
|
-
// CORS *로 둔다: ecdk dev는 작성자 PC에서만 돌고 내주는 값도 작성자
|
|
202
|
+
// CORS *로 둔다: ecdk dev는 작성자 PC에서만 돌고 내주는 값도 작성자 본인이 저장한 답이라, 막아도 지킬 대상이 없다
|
|
206
203
|
// (실행마다 열쇠를 두는 방식은 콘텐츠 주소가 예측 가능해 열쇠까지 읽혀 효과가 없어서 되돌림, !19 리뷰)
|
|
207
204
|
if (url.pathname === '/__ecdk/grading') {
|
|
208
205
|
res.writeHead(200, {
|
|
209
206
|
...cors,
|
|
210
207
|
'Content-Type': 'application/json; charset=utf-8'
|
|
211
208
|
});
|
|
212
|
-
// {
|
|
213
|
-
res.end(JSON.stringify(
|
|
214
|
-
...grading,
|
|
215
|
-
completion_policies: check.manifest?.completionPolicies ?? []
|
|
216
|
-
} : null));
|
|
209
|
+
// { grading }: 콘텐츠를 직접 연 mock이 로컬 채점 흉내에 쓴다
|
|
210
|
+
res.end(JSON.stringify(localGrading() ?? null));
|
|
217
211
|
return;
|
|
218
212
|
}
|
|
219
213
|
if (url.pathname === '/favicon.ico') {
|
|
@@ -253,7 +247,10 @@ async function startDevServer(opts) {
|
|
|
253
247
|
}
|
|
254
248
|
if (url.pathname === '/__ecdk/reset' && req.method === 'POST') {
|
|
255
249
|
Object.assign(state, createState());
|
|
256
|
-
|
|
250
|
+
await rm(join(dir, SETTINGS_DATA_FILE), {
|
|
251
|
+
force: true
|
|
252
|
+
});
|
|
253
|
+
log(`[api] 저장 내용(${SETTINGS_DATA_FILE})과 제출 기록을 지웠습니다`);
|
|
257
254
|
res.writeHead(204).end();
|
|
258
255
|
return;
|
|
259
256
|
}
|
|
@@ -313,12 +310,16 @@ async function startDevServer(opts) {
|
|
|
313
310
|
async function reload() {
|
|
314
311
|
try {
|
|
315
312
|
config = await loadConfig(dir);
|
|
316
|
-
|
|
317
|
-
|
|
313
|
+
// 손으로 고친 .ecdk/settings.json도 다시 읽는다 (편집 화면 저장은 흉내 서버가 이미 state에 넣음)
|
|
314
|
+
const saved = await loadSavedSettings(dir);
|
|
315
|
+
savedGrading(saved);
|
|
316
|
+
state.settings = saved;
|
|
317
|
+
prepared = await prepareContent(dir, config, {
|
|
318
|
+
requireSdk: false
|
|
319
|
+
});
|
|
320
|
+
warnSdk();
|
|
318
321
|
files = await servedFiles(prepared, log);
|
|
319
|
-
check = checkFiles(prepared.files, projectCheckOptions(
|
|
320
|
-
grading: grading?.grading ?? null
|
|
321
|
-
}));
|
|
322
|
+
check = checkFiles(prepared.files, await projectCheckOptions(dir, config));
|
|
322
323
|
log(summarize(check));
|
|
323
324
|
const payload = JSON.stringify(snapshot());
|
|
324
325
|
for (const c of clients) c.write(`event: reload\ndata: ${payload}\n\n`);
|
|
@@ -336,16 +337,15 @@ async function startDevServer(opts) {
|
|
|
336
337
|
}, (_e, name) => {
|
|
337
338
|
const first = String(name ?? '').split(/[\\/]/)[0];
|
|
338
339
|
if (!first || first === outRel || first === 'node_modules' || first.startsWith('.')) return;
|
|
339
|
-
if (isSelfWrite(first)) return;
|
|
340
340
|
if (timer) clearTimeout(timer);
|
|
341
341
|
timer = setTimeout(() => void reload(), 150);
|
|
342
342
|
});
|
|
343
343
|
} catch {
|
|
344
344
|
log('[dev] 이 환경에서는 파일 감시를 못 합니다. 고친 뒤 새로고침하세요.');
|
|
345
345
|
}
|
|
346
|
-
// 프로젝트
|
|
346
|
+
// 프로젝트 맨 위의 설정 파일(원본 폴더 밖일 수 있음): package.json "ecdk" · 옛 elice.config.json
|
|
347
347
|
const configWatcher = prepared.srcDir === dir ? null : watch(dir, (_e, name) => {
|
|
348
|
-
if (name ===
|
|
348
|
+
if (name === PACKAGE_FILE || name === CONFIG_FILE) void reload();
|
|
349
349
|
});
|
|
350
350
|
log(summarize(check));
|
|
351
351
|
return {
|
package/es/rules/check.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { zipSync } from 'fflate';
|
|
2
|
-
import { parseManifest
|
|
2
|
+
import { parseManifest } from './manifest.js';
|
|
3
3
|
import { isUnsafePath, extname, globToRegExp, resolveRef } from './path.js';
|
|
4
4
|
import { lineAt, parseTags, extractRefs, classifyRef } from './refs.js';
|
|
5
5
|
import { compareVersions } from './semver.js';
|
|
@@ -52,9 +52,9 @@ function answerKeyPath(value, path = []) {
|
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
-
* 화면 코드가
|
|
56
|
-
*
|
|
57
|
-
*
|
|
55
|
+
* 화면 코드가 편집 화면 · 채점 설정과 맞는지 (키트 lib/는 빼고 콘텐츠 코드에서 함수 이름을 찾는 방식이라 경고만).
|
|
56
|
+
* 완료 정책은 LXP 설정이라 (ADR 0012) 정책으로는 판단하지 않는다. 편집 화면이 채점 설정을 저장하는데 제출이 없으면
|
|
57
|
+
* 그 채점 설정을 쓸 곳이 없고, 편집 화면인데 저장이 없으면 바꾼 내용이 LXP로 넘어가지 않는다.
|
|
58
58
|
*/
|
|
59
59
|
function checkScreenCode(files, manifest, add) {
|
|
60
60
|
const decoder = new TextDecoder();
|
|
@@ -63,15 +63,10 @@ function checkScreenCode(files, manifest, add) {
|
|
|
63
63
|
// 이런 zip은 판단하지 않는다: build가 묶기 전 원본으로 이미 검사했다
|
|
64
64
|
if (texts.some(t => /<script\b[^>]*\sdata-ecdk-bundle\b/i.test(t))) return;
|
|
65
65
|
const code = texts.join('\n');
|
|
66
|
-
// completionPolicies 안에 제출 · 채점이 있으면 (첫 값이든 완료 정책 화면에서 고를 수 있는 값이든) 제출이 있어야 한다
|
|
67
|
-
const policies = manifest.completionPolicies ?? [];
|
|
68
|
-
const submitting = policies.filter(p => p !== 'on_access');
|
|
69
|
-
if (submitting.length > 0 && !/\buseSubmit\b|\.submit\s*\(/.test(code)) add('completion.no-submit', `completionPolicies에 ${submitting.join(' · ')}가 있는데 화면 코드에 제출(app.useSubmit · sdk.submit)이 없습니다. 그 정책이면 학생이 완료할 수 없습니다. 제출을 넣거나 completionPolicies를 ["on_access"]로 바꿔 주세요.`);
|
|
70
66
|
// 채점 방식 · 답은 편집 화면이 settings.grading으로 저장한다. 주석은 빼고 본다 (blank 템플릿 주석에 예시가 있음)
|
|
71
67
|
const uncommented = code.replace(/\/\*[\s\S]*?\*\/|(^|[^:])\/\/.*$/gm, '$1');
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (screen && !/\buseCompletion\b|\bsaveCompletionPolicy\s*\(/.test(code)) add('completion.no-save', `완료 정책 화면(${screen})을 켰는데 저장(app.useCompletion · sdk.saveCompletionPolicy)이 없습니다. 교육자가 고른 완료 정책이 저장되지 않습니다.`);
|
|
68
|
+
const savesGrading = /\buseGradingBlock\b|\bgetGrading\b|\bgrading\s*:/.test(uncommented);
|
|
69
|
+
if (manifest.entries.edit && savesGrading && !/\buseSubmit\b|\.submit\s*\(/.test(uncommented)) add('grading.no-submit', `편집 화면(${manifest.entries.edit})이 채점 설정(settings.grading)을 저장하는데 화면 코드에 제출(app.useSubmit · sdk.submit)이 없습니다. 학생이 제출할 수 없어 채점 설정을 쓸 곳이 없고, LXP에서 '제출하면 완료' · '채점해 완료'를 골라도 학생이 완료할 수 없습니다. 학생 화면에 제출을 넣거나, 채점하지 않는 자료면 편집 화면에서 채점 설정(useGradingBlock · getGrading)을 빼 주세요.`);
|
|
75
70
|
if (manifest.entries.edit && !/\buseSave\b|\bsaveSettings\s*\(|\bsaveContent\s*\(/.test(code)) add('edit.no-save', `편집 화면(${manifest.entries.edit})을 켰는데 저장(app.useSave · sdk.saveSettings)이 없습니다. 편집한 내용이 LXP로 넘어가지 않습니다.`);
|
|
76
71
|
}
|
|
77
72
|
/**
|
|
@@ -86,29 +81,45 @@ function checkTemplate(manifest, opts, add) {
|
|
|
86
81
|
const version = at > 0 ? ref.slice(at + 1) : undefined;
|
|
87
82
|
const known = opts.templates[name];
|
|
88
83
|
if (known === undefined) {
|
|
89
|
-
add(`이 ecdk가 모르는 템플릿입니다: ${ref} (아는 템플릿: ${Object.entries(opts.templates).map(([n, v]) => `${n}@${v}`).join(', ')}). ecdk를 올리거나(npm i -g @eliceio/cdk-cli)
|
|
84
|
+
add(`이 ecdk가 모르는 템플릿입니다: ${ref} (아는 템플릿: ${Object.entries(opts.templates).map(([n, v]) => `${n}@${v}`).join(', ')}). ecdk를 올리거나(npm i -g @eliceio/cdk-cli) package.json "ecdk"의 template을 확인해 주세요.`);
|
|
90
85
|
return;
|
|
91
86
|
}
|
|
92
87
|
if (version !== undefined && (compareVersions(version, known) ?? 0) > 0) add(`${ref}은 이 ecdk가 가진 ${name}@${known}보다 새 템플릿 버전입니다. 검사 · 가이드가 새 템플릿의 변경을 모를 수 있으니 ecdk를 올려 주세요.`);
|
|
93
88
|
}
|
|
94
89
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
97
|
-
* settings.grading은 편집 화면만 저장). 여럿이면 완료 정책 화면이 있어야 고를 수 있다. 프로젝트 검사면 grading.json도 본다.
|
|
90
|
+
* 프로젝트에 남은 옛 파일 (ADR 0011, 프로젝트 검사만). 옮기는 법을 알려 준다. 내용 · 정답은 옮기지 않고
|
|
91
|
+
* 편집 화면에서 다시 넣는다
|
|
98
92
|
*/
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
93
|
+
const LEGACY_FILE_MESSAGES = {
|
|
94
|
+
'elice.config.json': 'elice.config.json은 더 쓰지 않습니다 (ADR 0011). 화면 · 학습 참고 내용(kind · screens · commentary)은 원본의 metadata.json에, 빌드 옵션 · template은 package.json "ecdk"에 둡니다. ecdk doctor --fix가 옮기고 elice.config.json을 지웁니다 (옮기기 전까지는 지금처럼 빌드됨).',
|
|
95
|
+
'content.json': 'content.json은 더 쓰지 않습니다 (기본 내용 파일 없음, ADR 0011). 화면은 편집 화면이 저장한 내용만 읽고, 저장하기 전에는 "아직 내용이 없습니다" 안내를 보입니다. 그 내용은 LXP에 올린 뒤 편집 화면에서 다시 넣고 파일을 지워 주세요. 화면 코드가 직접 fetch하는 데이터 파일이면 다른 이름(예: data.json)으로 바꿔 주세요.',
|
|
96
|
+
'grading.json': "grading.json은 더 쓰지 않습니다 (ADR 0011). 채점 방식 · 답은 LXP에 올린 뒤 편집 화면에서 정합니다 (ecdk dev의 '내용 편집'에 넣은 답은 로컬 견본, .ecdk/settings.json). 파일은 지워 주세요 (zip에는 들어가지 않음)."
|
|
97
|
+
};
|
|
98
|
+
function checkLegacyFiles(opts, add) {
|
|
99
|
+
for (const path of opts.legacyFiles ?? []) {
|
|
100
|
+
const name = path.split('/').pop() ?? path;
|
|
101
|
+
add(LEGACY_FILE_MESSAGES[name] ?? `${path}은 더 쓰지 않는 파일입니다 (ADR 0011).`, path);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
/** SDK를 올리는 명령 (ADR 0010) */
|
|
105
|
+
const SDK_UPDATE_COMMAND = 'npm update @eliceio/cdk';
|
|
106
|
+
/**
|
|
107
|
+
* SDK 버전 (ADR 0010). metadata.json build.sdk가 rules.json minVersions.sdk보다 낮으면 오류:
|
|
108
|
+
* LXP 프로토콜과 맞지 않아 저장 · 제출이 안 될 수 있다 (G163: alpha.3 이하는 LXP 편집 화면 초안 저장이 422). 옛 lib/cdk.js 복사본 프로젝트는 sdk.lib-copy 경고로 알린다
|
|
109
|
+
*/
|
|
110
|
+
function checkSdk(manifest, spec, opts, add) {
|
|
111
|
+
// 옛 머리말은 "1.0.0 (브랜치@커밋)"일 수 있어 첫 낱말만 비교한다
|
|
112
|
+
const version = manifest?.build?.sdk?.split(' ')[0];
|
|
113
|
+
const min = spec.minVersions.sdk;
|
|
114
|
+
const order = version ? compareVersions(version, min) : undefined;
|
|
115
|
+
const below = order !== undefined && order < 0;
|
|
116
|
+
if (opts.legacySdkCopy) {
|
|
117
|
+
add('sdk.lib-copy', `${opts.legacySdkCopy}는 옛 ecdk create가 복사한 SDK${version ? ` ${version}` : ''}입니다${below ? ` (최소 ${min}보다 낮음)` : ''}. 이제 SDK는 package.json 의존성입니다: ecdk doctor --fix(또는 package.json dependencies에 "@eliceio/cdk": "^${min}")로 넣고 npm install 하면 ecdk build가 node_modules에서 넣습니다. 그다음 ${opts.legacySdkCopy}는 지워도 됩니다.`, opts.legacySdkCopy);
|
|
118
|
+
// 옛 복사본도 최소 미만이면 오류 (zip 검사와 같은 판정, 옛 SDK로 올리는 것을 막음)
|
|
119
|
+
if (below) add('sdk.outdated', `${opts.legacySdkCopy}의 SDK ${version}은 최소 버전 ${min}보다 낮아 LXP 편집 화면 저장(초안 저장, alpha.3 이하는 실패) · 제출 · 교육자 화면이 안 될 수 있습니다. ecdk doctor --fix && npm install 후 다시 빌드해 주세요.`, opts.legacySdkCopy);
|
|
104
120
|
return;
|
|
105
121
|
}
|
|
106
|
-
|
|
107
|
-
if (policies.length > 1 && !screen) add('completion.no-screen', `completionPolicies가 ${policies.join(' · ')}인데 완료 정책 화면(screens.completionPolicy)이 없어 첫 값(${policies[0]})만 쓰입니다. 교육자가 고르게 하려면 완료 정책 화면을 켜고(app.useCompletion), 아니면 ["${policies[0]}"] 하나만 적어 주세요.`, spec.manifest.file);
|
|
108
|
-
if (policies.length === 1 && screen) add('completion.screen-unused', `completionPolicies가 ${policies[0]} 하나(고정)인데 완료 정책 화면(${screen})이 켜져 있습니다. 고를 것이 없으니 화면을 끄거나 고를 정책을 더 적어 주세요.`, spec.manifest.file);
|
|
109
|
-
if (!policies.includes('on_graded')) return;
|
|
110
|
-
if (!manifest.entries.edit) add('completion.no-edit', `completionPolicies에 채점해 완료(on_graded)가 있는데 편집 화면이 없습니다. 채점 방식 · 답(settings.grading)은 편집 화면만 저장할 수 있어, 이대로면 LXP에서 정답을 정할 곳이 없습니다 (서버는 채점 설정 없는 on_graded를 MATERIAL_GRADING_REQUIRED로 거절). 편집 화면(screens.edit)을 켜거나 on_graded를 빼 주세요.`, spec.manifest.file);
|
|
111
|
-
if (opts.grading === null) add('grading.missing', `completionPolicies에 채점해 완료(on_graded)가 있는데 grading.json이 없어 ecdk dev가 채점을 흉내 내지 못합니다 (운영에서는 편집 화면이 정함). ecdk dev의 '내용 편집'에서 답을 저장하면 생깁니다. 예: { "type": "pattern", "answer_key": "^…$" }`, 'grading.json');
|
|
122
|
+
if (below) add('sdk.outdated', `@eliceio/cdk(SDK) ${version}은 최소 버전 ${min}보다 낮아 LXP 편집 화면에서 저장(초안 저장)이 안 됩니다 (alpha.3 이하). 프로젝트 폴더에서 ${SDK_UPDATE_COMMAND} 후 다시 빌드해 주세요.`, spec.manifest.file);
|
|
112
123
|
}
|
|
113
124
|
/** `<script type="module" data-ecdk-bundle>` 본문을 줄 수만 남기고 비운다 (줄 번호 유지) */
|
|
114
125
|
function blankBundles(html) {
|
|
@@ -161,7 +172,7 @@ function checkFiles(input, opts = {}) {
|
|
|
161
172
|
const parsed = parseManifest(decoder.decode(mfile.data), spec);
|
|
162
173
|
if (parsed.ok) {
|
|
163
174
|
manifest = parsed.manifest;
|
|
164
|
-
for (const w of parsed.warnings ?? []) add(
|
|
175
|
+
for (const w of parsed.warnings ?? []) add(w.id, `${spec.manifest.file}: ${w.message}`, spec.manifest.file);
|
|
165
176
|
} else add('manifest.invalid', `${spec.manifest.file}: ${parsed.error}`, spec.manifest.file);
|
|
166
177
|
} else if (kind !== 'html' && !nestedRoot) {
|
|
167
178
|
add('manifest.missing', `최상위에 ${spec.manifest.file}이 없습니다. 학생 화면·교육자 화면 등 어떤 화면이 있는지 적어 주세요 (ecdk build가 만들어 줍니다).`);
|
|
@@ -172,7 +183,7 @@ function checkFiles(input, opts = {}) {
|
|
|
172
183
|
}
|
|
173
184
|
const commentaryFile = manifest.commentary === undefined ? undefined : files.find(f => f.path === manifest.commentary);
|
|
174
185
|
// LXP 업로드는 학습 참고 내용이 없는 자료 본문을 거절한다 (qa5에서 확인. 스펙은 선택이었음)
|
|
175
|
-
if ((manifest.kind ?? spec.manifest.defaultKind) !== 'description' && manifest.commentary === undefined) add('manifest.commentary-missing', `학습 참고 내용 파일이 없어 LXP 업로드가 거절됩니다. 프로젝트 맨 위에 ${spec.manifest.commentaryFile}(이 자료의 핵심 개념 · 활동 · 문제 의도, 정답 제외)을
|
|
186
|
+
if ((manifest.kind ?? spec.manifest.defaultKind) !== 'description' && manifest.commentary === undefined) add('manifest.commentary-missing', `학습 참고 내용 파일이 없어 LXP 업로드가 거절됩니다. 프로젝트 맨 위에 ${spec.manifest.commentaryFile}(이 자료의 핵심 개념 · 활동 · 문제 의도, 정답 제외)을 만들고 ${spec.manifest.file}에 "commentary": "${spec.manifest.commentaryFile}"를 적어 주세요.`, spec.manifest.file);
|
|
176
187
|
if (manifest.commentary !== undefined && !commentaryFile) add('manifest.entry-missing', `${spec.manifest.file}에 적은 학습 참고 내용 파일이 없습니다: ${manifest.commentary}`, spec.manifest.file);
|
|
177
188
|
// LXP 학습 참고 내용 칸으로 옮길 텍스트라 UTF-8이어야 한다 (메모장 ANSI · EUC-KR 저장이면 깨짐)
|
|
178
189
|
if (commentaryFile) {
|
|
@@ -186,10 +197,11 @@ function checkFiles(input, opts = {}) {
|
|
|
186
197
|
// 메모장 등이 붙이는 BOM은 학습 참고 내용 칸에 보이지 않는 글자로 들어간다
|
|
187
198
|
if (startsWithBom(commentaryFile.data)) add('file.bom', `학습 참고 내용 파일 맨 앞에 BOM(보이지 않는 글자)이 있습니다: ${commentaryFile.path}. "UTF-8(BOM 없음)"으로 다시 저장해 주세요.`, commentaryFile.path);
|
|
188
199
|
}
|
|
189
|
-
checkCompletion(manifest, spec, opts, (id, message, path) => add(id, message, path));
|
|
190
200
|
checkTemplate(manifest, opts, message => add('build.template-unknown', message, spec.manifest.file));
|
|
191
201
|
checkScreenCode(files, manifest, (id, message) => add(id, message, spec.manifest.file));
|
|
192
202
|
}
|
|
203
|
+
checkLegacyFiles(opts, (message, path) => add('project.legacy-file', message, path));
|
|
204
|
+
checkSdk(manifest, spec, opts, add);
|
|
193
205
|
const entry = manifest?.entries.learn ?? spec.manifest.defaultEntry;
|
|
194
206
|
if (!manifest && !exact.has(entry)) add('entry.missing', `최상위에 ${entry} 파일이 없습니다.`);
|
|
195
207
|
// 한도
|
|
@@ -221,7 +233,7 @@ function checkFiles(input, opts = {}) {
|
|
|
221
233
|
add('file.encoding', `UTF-8이 아닌 파일입니다 (EUC-KR · ANSI로 저장하면 한글이 깨집니다): ${f.path}. UTF-8로 다시 저장해 주세요.`, f.path);
|
|
222
234
|
continue;
|
|
223
235
|
}
|
|
224
|
-
//
|
|
236
|
+
// zip 안 JSON(작성자가 넣은 데이터 파일)은 학생 브라우저로 그대로 내려간다. 파일 이름(answers.*)만 막아서는 파일 안의 정답을 못 잡는다
|
|
225
237
|
if (ext === 'json' && f.path !== spec.manifest.file) {
|
|
226
238
|
let data = null;
|
|
227
239
|
try {
|
|
@@ -230,7 +242,7 @@ function checkFiles(input, opts = {}) {
|
|
|
230
242
|
data = null;
|
|
231
243
|
}
|
|
232
244
|
const key = answerKeyPath(data);
|
|
233
|
-
if (key) add('content.answer-key', `학생에게 내려가는 JSON에 정답처럼 보이는 키가 있습니다: ${key}. 정답은
|
|
245
|
+
if (key) add('content.answer-key', `학생에게 내려가는 JSON에 정답처럼 보이는 키가 있습니다: ${key}. 정답은 편집 화면의 채점 설정(settings.grading)에 두고 zip에서 빼 주세요.`, f.path);
|
|
234
246
|
}
|
|
235
247
|
}
|
|
236
248
|
for (const paths of byLower.values()) {
|
package/es/rules/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { checkFiles } from './check.js';
|
|
2
|
-
export {
|
|
2
|
+
export { COMPLETION_POLICIES_IGNORED, graderTypeError, LEGACY_COMPLETION_FIELDS, LEGACY_COMPLETION_SCREENS, type ManifestWarning, parseManifest, serializeManifest, stripCompletionPolicy, } from './manifest.js';
|
|
3
3
|
export { globToRegExp } from './path.js';
|
|
4
4
|
export { commentOnlyLines, lineSkipper } from './skip.js';
|
|
5
5
|
export { rules, RULES_VERSION } from './spec.js';
|
package/es/rules/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { checkFiles } from './check.js';
|
|
2
|
-
export {
|
|
2
|
+
export { COMPLETION_POLICIES_IGNORED, LEGACY_COMPLETION_FIELDS, LEGACY_COMPLETION_SCREENS, graderTypeError, parseManifest, serializeManifest, stripCompletionPolicy } from './manifest.js';
|
|
3
3
|
export { globToRegExp } from './path.js';
|
|
4
4
|
export { commentOnlyLines, lineSkipper } from './skip.js';
|
|
5
5
|
export { RULES_VERSION, rules } from './spec.js';
|