@next-vibe/checker 1.0.12 → 1.0.13

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.
@@ -0,0 +1,4 @@
1
+ (function() {
2
+ "use strict";
3
+ })();
4
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,4 @@
1
+ (function() {
2
+ "use strict";
3
+ })();
4
+ //# sourceMappingURL=jsx-capitalization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jsx-capitalization.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -0,0 +1,4 @@
1
+ (function() {
2
+ "use strict";
3
+ })();
4
+ //# sourceMappingURL=restricted-syntax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restricted-syntax.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
package/check.config.ts CHANGED
@@ -123,20 +123,12 @@ const oxlint: CheckConfig["oxlint"] = {
123
123
  ],
124
124
  jsPlugins: [
125
125
  ...(features.restrictedSyntax
126
- ? [
127
- "@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/restricted-syntax/src/index.ts",
128
- ]
126
+ ? ["@next-vibe/checker/oxlint-plugins/restricted-syntax.ts"]
129
127
  : []),
130
128
  ...(features.jsxCapitalization
131
- ? [
132
- "@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/jsx-capitalization/src/index.ts",
133
- ]
134
- : []),
135
- ...(features.i18n
136
- ? [
137
- "@next-vibe/checker/src/app/api/[locale]/system/check/oxlint/plugins/i18n/src/index.ts",
138
- ]
129
+ ? ["@next-vibe/checker/oxlint-plugins/jsx-capitalization.ts"]
139
130
  : []),
131
+ ...(features.i18n ? ["@next-vibe/checker/oxlint-plugins/i18n.ts"] : []),
140
132
  ],
141
133
  categories: {
142
134
  correctness: "error",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-vibe/checker",
3
- "version": "1.0.12",
3
+ "version": "1.0.13",
4
4
  "main": "./.dist/bin/vibe-runtime.js",
5
5
  "author": "Max Brandstätter",
6
6
  "description": "TypeScript code quality checker with CLI and MCP support",
@@ -25,6 +25,7 @@ export enum ViteBuildTypeEnum {
25
25
  /** Bun build types */
26
26
  export enum BunBuildTypeEnum {
27
27
  EXECUTABLE = "executable",
28
+ MODULE = "module",
28
29
  }
29
30
 
30
31
  /** All build types combined */
@@ -82,19 +82,79 @@ export class ConfigRepositoryImpl implements ConfigRepositoryInterface {
82
82
  }
83
83
 
84
84
  private static resolveJsPluginPath(pluginPath: string): string {
85
- const patterns = [
86
- { prefix: "@next-vibe/checker/", nodeModules: ["@next-vibe", "checker"] },
87
- { prefix: "next-vibe/", nodeModules: ["next-vibe"] },
88
- ];
89
-
90
- for (const { prefix, nodeModules } of patterns) {
91
- if (pluginPath.startsWith(prefix)) {
92
- const relativePath = pluginPath.slice(prefix.length);
93
- return resolve(process.cwd(), "node_modules", ...nodeModules, relativePath);
85
+ // Pattern: @next-vibe/checker/oxlint-plugins/restricted-syntax.ts or .js
86
+ if (pluginPath.startsWith("@next-vibe/checker/oxlint-plugins/")) {
87
+ const fileName = pluginPath.slice("@next-vibe/checker/oxlint-plugins/".length);
88
+ const baseName = fileName.replace(/\.(ts|js)$/, "");
89
+ const extension = fileName.endsWith(".ts") ? "ts" : "js";
90
+
91
+ if (extension === "ts") {
92
+ // Local development: .ts -> source files
93
+ const sourcePath = resolve(
94
+ process.cwd(),
95
+ "src",
96
+ "app",
97
+ "api",
98
+ "[locale]",
99
+ "system",
100
+ "check",
101
+ "oxlint",
102
+ "plugins",
103
+ baseName,
104
+ "src",
105
+ "index.ts",
106
+ );
107
+ if (existsSync(sourcePath)) {
108
+ return sourcePath;
109
+ }
110
+ } else {
111
+ // Installed package: .js -> compiled files
112
+ const compiledPath = resolve(
113
+ process.cwd(),
114
+ "node_modules",
115
+ "@next-vibe",
116
+ "checker",
117
+ "oxlint-plugins",
118
+ fileName,
119
+ );
120
+ if (existsSync(compiledPath)) {
121
+ return compiledPath;
122
+ }
94
123
  }
95
- }
96
124
 
97
- return pluginPath;
125
+ // Fallback: return expected path
126
+ return extension === "ts"
127
+ ? resolve(
128
+ process.cwd(),
129
+ "src",
130
+ "app",
131
+ "api",
132
+ "[locale]",
133
+ "system",
134
+ "check",
135
+ "oxlint",
136
+ "plugins",
137
+ baseName,
138
+ "src",
139
+ "index.ts",
140
+ )
141
+ : resolve(
142
+ process.cwd(),
143
+ "node_modules",
144
+ "@next-vibe",
145
+ "checker",
146
+ "oxlint-plugins",
147
+ fileName,
148
+ );
149
+ }
150
+
151
+ // If no prefix matched, return absolute path if it exists, otherwise as-is
152
+ if (pluginPath.startsWith("/")) {
153
+ return pluginPath;
154
+ }
155
+
156
+ const absolutePath = resolve(process.cwd(), pluginPath);
157
+ return existsSync(absolutePath) ? absolutePath : pluginPath;
98
158
  }
99
159
 
100
160
  private static resolveJsPlugins(
@@ -580,7 +640,14 @@ export default checkConfig.eslint?.buildFlatConfig?.(
580
640
  };
581
641
  }
582
642
 
583
- const templateContent = await fs.readFile(templatePath, "utf8");
643
+ let templateContent = await fs.readFile(templatePath, "utf8");
644
+
645
+ // Replace .ts extensions with .js for installed package usage
646
+ templateContent = templateContent.replace(
647
+ /@next-vibe\/checker\/oxlint-plugins\/([^"']+)\.ts/g,
648
+ "@next-vibe/checker/oxlint-plugins/$1.js",
649
+ );
650
+
584
651
  await fs.writeFile(configPath, templateContent, "utf8");
585
652
 
586
653
  logger.info("Created check.config.ts from template", {
@@ -718,7 +718,7 @@ export class OxlintRepositoryImpl implements OxlintRepositoryInterface {
718
718
  parseError instanceof Error
719
719
  ? parseError.message
720
720
  : String(parseError),
721
- stdoutPreview: stdout.slice(0, 200),
721
+ stdout,
722
722
  });
723
723
  return { issues };
724
724
  }