Skip to content

Commit 0cbb957

Browse files
authored
Bump version to 0.1.14 (#954)
- CLI: Ignore Cypress files in ESLint config, remove unused error variable - common-ui: Replace 'any' types with more specific types for better type safety - e2e-db: Configure ESLint to allow 'var' in declare blocks and namespaces for Jest matchers
2 parents bbd5a30 + ac96ead commit 0cbb957

File tree

31 files changed

+242
-253
lines changed

31 files changed

+242
-253
lines changed

packages/cli/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import backendConfig from '../../eslint.config.backend.mjs';
33
export default [
44
...backendConfig,
55
{
6-
ignores: ['node_modules/**', 'dist/**', 'eslint.config.mjs', 'tsconfig.json', 'testproject/**'],
6+
ignores: ['node_modules/**', 'dist/**', 'eslint.config.mjs', 'tsconfig.json', 'testproject/**', 'cypress/**', 'cypress.config.js'],
77
},
88
{
99
languageOptions: {

packages/cli/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.14-2",
6+
"version": "0.1.14",
77
"type": "module",
88
"description": "CLI scaffolding tool for vue-skuilder projects",
99
"bin": {
@@ -76,5 +76,5 @@
7676
"node": ">=18.0.0"
7777
},
7878
"packageManager": "yarn@4.6.0",
79-
"stableVersion": "0.1.13"
79+
"stableVersion": "0.1.14"
8080
}

packages/cli/src/commands/studio.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,11 @@ async function buildStudioUIWithCustomQuestions(
11421142
const distConfigPath = path.join(distPath, 'custom-questions-config.json');
11431143

11441144
if (fs.existsSync(sourceConfigPath)) {
1145-
fs.copyFileSync(sourceConfigPath, distConfigPath);
1145+
// Read, update import path, and write to dist
1146+
const configContent = JSON.parse(fs.readFileSync(sourceConfigPath, 'utf-8'));
1147+
// Use absolute path from root so browser can load it
1148+
configContent.importPath = '/assets/questions.mjs';
1149+
fs.writeFileSync(distConfigPath, JSON.stringify(configContent, null, 2));
11461150
console.log(chalk.gray(` Custom questions config copied to dist directory`));
11471151
}
11481152

packages/cli/src/mcp-server.ts

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33

44
import { initializeDataLayer, getDataLayer, initializeTuiLogging } from '@vue-skuilder/db';
55
import { MCPServer } from '@vue-skuilder/mcp';
6-
import { consoleLogger } from '@vue-skuilder/common';
6+
import { createFileLogger } from '@vue-skuilder/common';
77
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
8+
import * as path from 'path';
9+
import * as os from 'os';
810

911
initializeTuiLogging();
1012

@@ -44,11 +46,16 @@ async function main() {
4446
await initializeDataLayer(couchdbConfig);
4547
const courseDB = getDataLayer().getCourseDB(courseId);
4648

47-
// Create and start MCP server with console logger
49+
// Create file logger for debugging
50+
const logFilePath = path.join(os.tmpdir(), 'vue-skuilder-mcp-debug.log');
51+
const fileLogger = createFileLogger(logFilePath);
52+
console.error(`MCP Server: Debug logs will be written to ${logFilePath}`);
53+
54+
// Create and start MCP server with file logger
4855
const server = new MCPServer(courseDB, {
4956
enableSourceLinking: true,
5057
maxCardsPerQuery: 50,
51-
logger: consoleLogger,
58+
logger: fileLogger,
5259
});
5360

5461
const transport = new StdioServerTransport();

packages/cli/src/utils/pack-courses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export async function packCourses(options: PackCoursesOptions): Promise<void> {
5151
const manifestContent = await fs.readFile(manifestPath, 'utf-8');
5252
const manifest = JSON.parse(manifestContent);
5353
courseTitle = manifest.courseName || manifest.courseConfig?.name || courseId;
54-
} catch (error) {
54+
} catch {
5555
console.warn(chalk.yellow(`⚠️ Could not read manifest for course title, using courseId`));
5656
}
5757

packages/client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.14-2",
6+
"version": "0.1.14",
77
"license": "MIT",
88
"main": "dist/index.js",
99
"module": "dist/index.esm.js",
@@ -47,5 +47,5 @@
4747
"tslib": "^2.6.2",
4848
"typescript": "~5.7.2"
4949
},
50-
"stableVersion": "0.1.13"
50+
"stableVersion": "0.1.14"
5151
}

packages/common-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publishConfig": {
44
"access": "public"
55
},
6-
"version": "0.1.14-2",
6+
"version": "0.1.14",
77
"main": "./dist/common-ui.umd.js",
88
"module": "./dist/common-ui.es.js",
99
"types": "./dist/index.d.ts",
@@ -70,5 +70,5 @@
7070
"vite": "^6.0.9",
7171
"vitest": "^3.0.5"
7272
},
73-
"stableVersion": "0.1.13"
73+
"stableVersion": "0.1.14"
7474
}

packages/common-ui/src/components/cardRendering/MarkdownRendererHelpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,6 @@ export function parseComponentToken(token: MarkedToken): {
191191
componentName: string;
192192
props: Record<string, string>;
193193
} | null {
194-
const text = (token as any).text || (token as any).raw;
194+
const text = ('text' in token ? token.text : 'raw' in token ? token.raw : '') as string;
195195
return parseComponentSyntax(text);
196196
}

packages/common-ui/src/composables/CompositionViewable.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,13 @@ export function useQuestionView<Q extends Question>(
133133
}
134134

135135
// Helper functions
136-
export function isQuestionView(component: any): component is QuestionViewUtils<Question> {
137-
return 'submitAnswer' in component && 'priorAttempts' in component;
136+
export function isQuestionView(component: unknown): component is QuestionViewUtils<Question> {
137+
return (
138+
typeof component === 'object' &&
139+
component !== null &&
140+
'submitAnswer' in component &&
141+
'priorAttempts' in component
142+
);
138143
}
139144

140145
// Example usage in a child component:

packages/common-ui/src/composables/Displayable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export abstract class Displayable {
2121
public static dataShapes: DataShape[];
2222

2323
public static views: Array<ViewComponent>;
24-
public static seedData?: Array<any>;
24+
public static seedData?: Array<unknown>;
2525
/**
2626
* True if this displayable content type is meant to have
2727
* user-submitted questions. False if supplied seedData array

0 commit comments

Comments
 (0)