Fix migration table naming and migrate:commit exit code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-11-19 22:56:36 +00:00
parent 2fdf0ab9be
commit c8d87f47b7
116 changed files with 90 additions and 77 deletions

33
node_modules/@jqhtml/parser/dist/codegen.js generated vendored Normal file → Executable file
View File

@@ -308,19 +308,26 @@ export class CodeGenerator {
catch (error) {
// Extract JavaScript error details
const errorDetail = error.message || String(error);
let sourceLine = 1; // Default to component definition line (line numbers not critical for bracket errors)
let sourceLine = 1; // Default to component definition line
let sourceColumn = 0;
// Attempt to extract line number from vm.Script error if available
if (typeof error.lineNumber === 'number') {
const generatedLine = error.lineNumber;
// Map generated line to source line
// The bodyLines array has 1:1 correspondence with source lines
// Generated code includes 3-line header, so subtract that offset
const headerOffset = 3; // "let _output = [];\n const _cid = this._cid;\n const that = this;"
const bodyLineIndex = generatedLine - headerOffset - 1; // Convert to 0-based
if (bodyLineIndex >= 0 && bodyLineIndex < bodyLines.length) {
// Map to actual source line (bodyLines starts at source line 2)
sourceLine = bodyLineIndex + 2;
// Extract line number from vm.Script stack trace
// Stack format: "filename.jqhtml:LINE\n..." or "evalmachine.<anonymous>:LINE\n..."
if (error.stack && typeof error.stack === 'string') {
// Extract line number from first line of stack (before first newline)
const firstLine = error.stack.split('\n')[0];
const lineMatch = firstLine.match(/:(\d+)/);
if (lineMatch) {
const generatedLine = parseInt(lineMatch[1], 10);
// Map generated line to source line
// The bodyLines array has 1:1 correspondence with source lines
// Generated code includes 3-line header, so subtract that offset
const headerOffset = 3; // "let _output = [];\n const _cid = this._cid;\n const that = this;"
const bodyLineIndex = generatedLine - headerOffset - 1; // Convert to 0-based
if (bodyLineIndex >= 0 && bodyLineIndex < bodyLines.length) {
// Map to actual source line (bodyLines starts at source line 2)
// Subtract 1 because syntax errors typically get detected on the line AFTER the problem
sourceLine = Math.max(1, bodyLineIndex + 2 - 1);
}
}
}
// Build error message emphasizing unbalanced brackets
@@ -1341,7 +1348,7 @@ export class CodeGenerator {
for (const [name, component] of this.components) {
code += `// Component: ${name}\n`;
code += `jqhtml_components.set('${name}', {\n`;
code += ` _jqhtml_version: '2.2.216',\n`; // Version will be replaced during build
code += ` _jqhtml_version: '2.2.217',\n`; // Version will be replaced during build
code += ` name: '${name}',\n`;
code += ` tag: '${component.tagName}',\n`;
code += ` defaultAttributes: ${this.serializeAttributeObject(component.defaultAttributes)},\n`;