@viberails/types 0.3.1 → 0.3.3
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/dist/index.cjs +9 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -10
- package/dist/index.d.ts +18 -10
- package/dist/index.js +8 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
+
CONVENTION_LABELS: () => CONVENTION_LABELS,
|
|
23
24
|
FRAMEWORK_NAMES: () => FRAMEWORK_NAMES,
|
|
24
25
|
LIBRARY_NAMES: () => LIBRARY_NAMES,
|
|
25
26
|
ORM_NAMES: () => ORM_NAMES,
|
|
@@ -128,6 +129,12 @@ var LIBRARY_NAMES = {
|
|
|
128
129
|
nx: "Nx",
|
|
129
130
|
lerna: "Lerna"
|
|
130
131
|
};
|
|
132
|
+
var CONVENTION_LABELS = {
|
|
133
|
+
fileNaming: "File naming",
|
|
134
|
+
componentNaming: "Component naming",
|
|
135
|
+
hookNaming: "Hook naming",
|
|
136
|
+
importAlias: "Import alias"
|
|
137
|
+
};
|
|
131
138
|
var ROLE_DESCRIPTIONS = {
|
|
132
139
|
pages: "Pages / Routes",
|
|
133
140
|
components: "Components",
|
|
@@ -141,9 +148,10 @@ var ROLE_DESCRIPTIONS = {
|
|
|
141
148
|
};
|
|
142
149
|
|
|
143
150
|
// src/index.ts
|
|
144
|
-
var VERSION = "0.3.
|
|
151
|
+
var VERSION = "0.3.3";
|
|
145
152
|
// Annotate the CommonJS export names for ESM import in node:
|
|
146
153
|
0 && (module.exports = {
|
|
154
|
+
CONVENTION_LABELS,
|
|
147
155
|
FRAMEWORK_NAMES,
|
|
148
156
|
LIBRARY_NAMES,
|
|
149
157
|
ORM_NAMES,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/confidence.ts","../src/display-names.ts"],"sourcesContent":["declare const __PACKAGE_VERSION__: string;\nexport const VERSION: string = __PACKAGE_VERSION__;\n\nexport type { BoundaryRule, BoundaryViolation } from './boundary.js';\nexport type { CheckResult, CheckRule, CheckViolation } from './check-result.js';\nexport type { Confidence, DetectedConvention } from './confidence.js';\nexport { confidenceFromConsistency } from './confidence.js';\nexport type {\n ConfigConventions,\n ConfigRules,\n ConfigStack,\n ConfigStructure,\n ConventionValue,\n PackageConfigOverrides,\n ViberailsConfig,\n WorkspaceConfig,\n} from './config.js';\nexport {\n FRAMEWORK_NAMES,\n LIBRARY_NAMES,\n ORM_NAMES,\n ROLE_DESCRIPTIONS,\n STYLING_NAMES,\n} from './display-names.js';\nexport type {\n ImportEdge,\n ImportGraph,\n ImportGraphNode,\n ImportKind,\n WorkspacePackage,\n} from './graph.js';\nexport type {\n CodebaseStatistics,\n DetectedStack,\n DetectedStructure,\n DetectedWorkspace,\n DirectoryInfo,\n DirectoryRole,\n FileStatistic,\n PackageScanResult,\n ScanResult,\n StackItem,\n} from './scan-result.js';\n","/**\n * Confidence level for a detected convention or pattern.\n *\n * - `'high'` — ≥90% consistency across analyzed files. Enforced by default.\n * - `'medium'` — 70–89% consistency. Included in config but not enforced.\n * - `'low'` — <70% consistency. Omitted from config entirely.\n */\nexport type Confidence = 'high' | 'medium' | 'low';\n\n/**\n * A convention or pattern detected by the scanner, with metadata\n * about how confidently it was identified.\n *\n * @typeParam T - The type of the detected value. Defaults to `string`.\n */\nexport interface DetectedConvention<T = string> {\n /** The detected value (e.g. a naming pattern, file extension, or path). */\n value: T;\n\n /** How confident the scanner is in this detection. */\n confidence: Confidence;\n\n /** Number of files analyzed to determine this convention. */\n sampleSize: number;\n\n /** Percentage (0–100) of files that follow this convention. */\n consistency: number;\n}\n\n/**\n * Derives a confidence level from a consistency percentage.\n *\n * @param consistency - A number from 0 to 100 representing the percentage\n * of files that follow a given convention.\n * @returns The corresponding confidence level:\n * - `'high'` for consistency ≥ 90\n * - `'medium'` for consistency ≥ 70 and < 90\n * - `'low'` for consistency < 70\n */\nexport function confidenceFromConsistency(consistency: number): Confidence {\n if (consistency >= 90) return 'high';\n if (consistency >= 70) return 'medium';\n return 'low';\n}\n","/** Display names for framework identifiers. */\nexport const FRAMEWORK_NAMES: Record<string, string> = {\n nextjs: 'Next.js',\n expo: 'Expo',\n 'react-native': 'React Native',\n angular: 'Angular',\n remix: 'Remix',\n nuxt: 'Nuxt',\n sveltekit: 'SvelteKit',\n astro: 'Astro',\n gatsby: 'Gatsby',\n solidjs: 'Solid.js',\n qwik: 'Qwik',\n electron: 'Electron',\n tauri: 'Tauri',\n nestjs: 'NestJS',\n express: 'Express',\n fastify: 'Fastify',\n koa: 'Koa',\n hono: 'Hono',\n supabase: 'Supabase',\n firebase: 'Firebase',\n convex: 'Convex',\n};\n\n/** Display names for styling libraries. */\nexport const STYLING_NAMES: Record<string, string> = {\n tailwindcss: 'Tailwind CSS',\n 'css-modules': 'CSS Modules',\n 'styled-components': 'styled-components',\n emotion: 'Emotion',\n sass: 'Sass',\n 'vanilla-extract': 'Vanilla Extract',\n unocss: 'UnoCSS',\n 'panda-css': 'Panda CSS',\n nativewind: 'NativeWind',\n};\n\n/** Display names for ORM / database clients. */\nexport const ORM_NAMES: Record<string, string> = {\n prisma: 'Prisma',\n drizzle: 'Drizzle',\n typeorm: 'TypeORM',\n sequelize: 'Sequelize',\n mongoose: 'Mongoose',\n kysely: 'Kysely',\n 'mikro-orm': 'MikroORM',\n};\n\n/** Display names for notable libraries. */\nexport const LIBRARY_NAMES: Record<string, string> = {\n 'react-query': 'React Query',\n 'tanstack-query': 'TanStack Query',\n zod: 'Zod',\n trpc: 'tRPC',\n expo: 'Expo',\n 'react-native': 'React Native',\n nextjs: 'Next.js',\n react: 'React',\n sveltekit: 'SvelteKit',\n svelte: 'Svelte',\n astro: 'Astro',\n vue: 'Vue',\n apollo: 'Apollo Client',\n urql: 'urql',\n graphql: 'GraphQL',\n 'redux-toolkit': 'Redux Toolkit',\n zustand: 'Zustand',\n jotai: 'Jotai',\n recoil: 'Recoil',\n mobx: 'MobX',\n xstate: 'XState',\n valtio: 'Valtio',\n 'react-hook-form': 'React Hook Form',\n formik: 'Formik',\n axios: 'Axios',\n 'next-auth': 'NextAuth.js',\n 'auth-js': 'Auth.js',\n clerk: 'Clerk',\n lucia: 'Lucia',\n 'date-fns': 'date-fns',\n dayjs: 'Day.js',\n luxon: 'Luxon',\n i18next: 'i18next',\n 'next-i18next': 'next-i18next',\n stripe: 'Stripe',\n 'socket.io': 'Socket.IO',\n 'testing-library': 'Testing Library',\n msw: 'MSW',\n storybook: 'Storybook',\n vite: 'Vite',\n webpack: 'webpack',\n esbuild: 'esbuild',\n rspack: 'Rspack',\n nx: 'Nx',\n lerna: 'Lerna',\n};\n\n/** Display names for directory roles. */\nexport const ROLE_DESCRIPTIONS: Record<string, string> = {\n pages: 'Pages / Routes',\n components: 'Components',\n hooks: 'Hooks',\n utils: 'Utilities',\n types: 'Type definitions',\n tests: 'Tests',\n styles: 'Styles',\n api: 'API routes',\n config: 'Configuration',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACuCO,SAAS,0BAA0B,aAAiC;AACzE,MAAI,eAAe,GAAI,QAAO;AAC9B,MAAI,eAAe,GAAI,QAAO;AAC9B,SAAO;AACT;;;AC1CO,IAAM,kBAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU;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AAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,OAAO;AACT;AAGO,IAAM,oBAA4C;AAAA,EACvD,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AACV;;;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/confidence.ts","../src/display-names.ts"],"sourcesContent":["declare const __PACKAGE_VERSION__: string;\nexport const VERSION: string = __PACKAGE_VERSION__;\n\nexport type { BoundaryConfig, BoundaryRule, BoundaryViolation } from './boundary.js';\nexport type { CheckResult, CheckRule, CheckViolation } from './check-result.js';\nexport type { Confidence, DetectedConvention } from './confidence.js';\nexport { confidenceFromConsistency } from './confidence.js';\nexport type {\n ConfigConventions,\n ConfigRules,\n ConfigStack,\n ConfigStructure,\n ConventionValue,\n PackageConfigOverrides,\n ViberailsConfig,\n WorkspaceConfig,\n} from './config.js';\nexport {\n CONVENTION_LABELS,\n FRAMEWORK_NAMES,\n LIBRARY_NAMES,\n ORM_NAMES,\n ROLE_DESCRIPTIONS,\n STYLING_NAMES,\n} from './display-names.js';\nexport type {\n ImportEdge,\n ImportGraph,\n ImportGraphNode,\n ImportKind,\n WorkspacePackage,\n} from './graph.js';\nexport type {\n CodebaseStatistics,\n DetectedStack,\n DetectedStructure,\n DetectedWorkspace,\n DirectoryInfo,\n DirectoryRole,\n FileStatistic,\n PackageScanResult,\n ScanResult,\n StackItem,\n} from './scan-result.js';\n","/**\n * Confidence level for a detected convention or pattern.\n *\n * - `'high'` — ≥90% consistency across analyzed files. Enforced by default.\n * - `'medium'` — 70–89% consistency. Included in config but not enforced.\n * - `'low'` — <70% consistency. Omitted from config entirely.\n */\nexport type Confidence = 'high' | 'medium' | 'low';\n\n/**\n * A convention or pattern detected by the scanner, with metadata\n * about how confidently it was identified.\n *\n * @typeParam T - The type of the detected value. Defaults to `string`.\n */\nexport interface DetectedConvention<T = string> {\n /** The detected value (e.g. a naming pattern, file extension, or path). */\n value: T;\n\n /** How confident the scanner is in this detection. */\n confidence: Confidence;\n\n /** Number of files analyzed to determine this convention. */\n sampleSize: number;\n\n /** Percentage (0–100) of files that follow this convention. */\n consistency: number;\n}\n\n/**\n * Derives a confidence level from a consistency percentage.\n *\n * @param consistency - A number from 0 to 100 representing the percentage\n * of files that follow a given convention.\n * @returns The corresponding confidence level:\n * - `'high'` for consistency ≥ 90\n * - `'medium'` for consistency ≥ 70 and < 90\n * - `'low'` for consistency < 70\n */\nexport function confidenceFromConsistency(consistency: number): Confidence {\n if (consistency >= 90) return 'high';\n if (consistency >= 70) return 'medium';\n return 'low';\n}\n","/** Display names for framework identifiers. */\nexport const FRAMEWORK_NAMES: Record<string, string> = {\n nextjs: 'Next.js',\n expo: 'Expo',\n 'react-native': 'React Native',\n angular: 'Angular',\n remix: 'Remix',\n nuxt: 'Nuxt',\n sveltekit: 'SvelteKit',\n astro: 'Astro',\n gatsby: 'Gatsby',\n solidjs: 'Solid.js',\n qwik: 'Qwik',\n electron: 'Electron',\n tauri: 'Tauri',\n nestjs: 'NestJS',\n express: 'Express',\n fastify: 'Fastify',\n koa: 'Koa',\n hono: 'Hono',\n supabase: 'Supabase',\n firebase: 'Firebase',\n convex: 'Convex',\n};\n\n/** Display names for styling libraries. */\nexport const STYLING_NAMES: Record<string, string> = {\n tailwindcss: 'Tailwind CSS',\n 'css-modules': 'CSS Modules',\n 'styled-components': 'styled-components',\n emotion: 'Emotion',\n sass: 'Sass',\n 'vanilla-extract': 'Vanilla Extract',\n unocss: 'UnoCSS',\n 'panda-css': 'Panda CSS',\n nativewind: 'NativeWind',\n};\n\n/** Display names for ORM / database clients. */\nexport const ORM_NAMES: Record<string, string> = {\n prisma: 'Prisma',\n drizzle: 'Drizzle',\n typeorm: 'TypeORM',\n sequelize: 'Sequelize',\n mongoose: 'Mongoose',\n kysely: 'Kysely',\n 'mikro-orm': 'MikroORM',\n};\n\n/** Display names for notable libraries. */\nexport const LIBRARY_NAMES: Record<string, string> = {\n 'react-query': 'React Query',\n 'tanstack-query': 'TanStack Query',\n zod: 'Zod',\n trpc: 'tRPC',\n expo: 'Expo',\n 'react-native': 'React Native',\n nextjs: 'Next.js',\n react: 'React',\n sveltekit: 'SvelteKit',\n svelte: 'Svelte',\n astro: 'Astro',\n vue: 'Vue',\n apollo: 'Apollo Client',\n urql: 'urql',\n graphql: 'GraphQL',\n 'redux-toolkit': 'Redux Toolkit',\n zustand: 'Zustand',\n jotai: 'Jotai',\n recoil: 'Recoil',\n mobx: 'MobX',\n xstate: 'XState',\n valtio: 'Valtio',\n 'react-hook-form': 'React Hook Form',\n formik: 'Formik',\n axios: 'Axios',\n 'next-auth': 'NextAuth.js',\n 'auth-js': 'Auth.js',\n clerk: 'Clerk',\n lucia: 'Lucia',\n 'date-fns': 'date-fns',\n dayjs: 'Day.js',\n luxon: 'Luxon',\n i18next: 'i18next',\n 'next-i18next': 'next-i18next',\n stripe: 'Stripe',\n 'socket.io': 'Socket.IO',\n 'testing-library': 'Testing Library',\n msw: 'MSW',\n storybook: 'Storybook',\n vite: 'Vite',\n webpack: 'webpack',\n esbuild: 'esbuild',\n rspack: 'Rspack',\n nx: 'Nx',\n lerna: 'Lerna',\n};\n\n/** Display labels for convention keys. */\nexport const CONVENTION_LABELS: Record<string, string> = {\n fileNaming: 'File naming',\n componentNaming: 'Component naming',\n hookNaming: 'Hook naming',\n importAlias: 'Import alias',\n};\n\n/** Display names for directory roles. */\nexport const ROLE_DESCRIPTIONS: Record<string, string> = {\n pages: 'Pages / Routes',\n components: 'Components',\n hooks: 'Hooks',\n utils: 'Utilities',\n types: 'Type definitions',\n tests: 'Tests',\n styles: 'Styles',\n api: 'API routes',\n config: 'Configuration',\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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ACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,mBAAmB;AAAA,EACnB,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,aAAa;AAAA,EACb,WAAW;AAAA,EACX,OAAO;AAAA,EACP,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,gBAAgB;AAAA,EAChB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,KAAK;AAAA,EACL,WAAW;AAAA,EACX,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,IAAI;AAAA,EACJ,OAAO;AACT;AAGO,IAAM,oBAA4C;AAAA,EACvD,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,aAAa;AACf;AAGO,IAAM,oBAA4C;AAAA,EACvD,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AACV;;;AFpHO,IAAM,UAAkB;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Boundary configuration for import enforcement.
|
|
3
|
+
* Maps source packages/directories to the targets they must NOT import from.
|
|
4
|
+
*/
|
|
5
|
+
interface BoundaryConfig {
|
|
6
|
+
/** Source → denied targets. Each key is a package/directory name, value is the list it must not import from. */
|
|
7
|
+
deny: Record<string, string[]>;
|
|
8
|
+
/** File paths that bypass boundary checks entirely (escape hatch for legitimate exceptions). */
|
|
9
|
+
ignore?: string[];
|
|
10
|
+
}
|
|
11
|
+
/** A single boundary rule (from → to deny pair), used internally by violation reporting. */
|
|
2
12
|
interface BoundaryRule {
|
|
3
|
-
/** Source package or directory
|
|
13
|
+
/** Source package or directory. */
|
|
4
14
|
from: string;
|
|
5
|
-
/** Target package or directory
|
|
15
|
+
/** Target package or directory that is denied. */
|
|
6
16
|
to: string;
|
|
7
|
-
/** Whether this import direction is allowed (`true`) or disallowed (`false`). */
|
|
8
|
-
allow: boolean;
|
|
9
|
-
/** Human-readable explanation of why this boundary exists. */
|
|
10
|
-
reason?: string;
|
|
11
17
|
}
|
|
12
18
|
/** A boundary violation detected during checking. */
|
|
13
19
|
interface BoundaryViolation {
|
|
@@ -111,8 +117,8 @@ interface ViberailsConfig {
|
|
|
111
117
|
rules: ConfigRules;
|
|
112
118
|
/** Glob patterns for files and directories to ignore. */
|
|
113
119
|
ignore: string[];
|
|
114
|
-
/** Module boundary rules for import enforcement
|
|
115
|
-
boundaries?:
|
|
120
|
+
/** Module boundary rules for import enforcement. */
|
|
121
|
+
boundaries?: BoundaryConfig;
|
|
116
122
|
/** Workspace configuration for monorepo support (V1.1+). */
|
|
117
123
|
workspace?: WorkspaceConfig;
|
|
118
124
|
/** Per-package overrides for monorepo projects. Only packages that differ from global. */
|
|
@@ -265,6 +271,8 @@ declare const STYLING_NAMES: Record<string, string>;
|
|
|
265
271
|
declare const ORM_NAMES: Record<string, string>;
|
|
266
272
|
/** Display names for notable libraries. */
|
|
267
273
|
declare const LIBRARY_NAMES: Record<string, string>;
|
|
274
|
+
/** Display labels for convention keys. */
|
|
275
|
+
declare const CONVENTION_LABELS: Record<string, string>;
|
|
268
276
|
/** Display names for directory roles. */
|
|
269
277
|
declare const ROLE_DESCRIPTIONS: Record<string, string>;
|
|
270
278
|
|
|
@@ -461,4 +469,4 @@ interface FileStatistic {
|
|
|
461
469
|
|
|
462
470
|
declare const VERSION: string;
|
|
463
471
|
|
|
464
|
-
export { type BoundaryRule, type BoundaryViolation, type CheckResult, type CheckRule, type CheckViolation, type CodebaseStatistics, type Confidence, type ConfigConventions, type ConfigRules, type ConfigStack, type ConfigStructure, type ConventionValue, type DetectedConvention, type DetectedStack, type DetectedStructure, type DetectedWorkspace, type DirectoryInfo, type DirectoryRole, FRAMEWORK_NAMES, type FileStatistic, type ImportEdge, type ImportGraph, type ImportGraphNode, type ImportKind, LIBRARY_NAMES, ORM_NAMES, type PackageConfigOverrides, type PackageScanResult, ROLE_DESCRIPTIONS, STYLING_NAMES, type ScanResult, type StackItem, VERSION, type ViberailsConfig, type WorkspaceConfig, type WorkspacePackage, confidenceFromConsistency };
|
|
472
|
+
export { type BoundaryConfig, type BoundaryRule, type BoundaryViolation, CONVENTION_LABELS, type CheckResult, type CheckRule, type CheckViolation, type CodebaseStatistics, type Confidence, type ConfigConventions, type ConfigRules, type ConfigStack, type ConfigStructure, type ConventionValue, type DetectedConvention, type DetectedStack, type DetectedStructure, type DetectedWorkspace, type DirectoryInfo, type DirectoryRole, FRAMEWORK_NAMES, type FileStatistic, type ImportEdge, type ImportGraph, type ImportGraphNode, type ImportKind, LIBRARY_NAMES, ORM_NAMES, type PackageConfigOverrides, type PackageScanResult, ROLE_DESCRIPTIONS, STYLING_NAMES, type ScanResult, type StackItem, VERSION, type ViberailsConfig, type WorkspaceConfig, type WorkspacePackage, confidenceFromConsistency };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Boundary configuration for import enforcement.
|
|
3
|
+
* Maps source packages/directories to the targets they must NOT import from.
|
|
4
|
+
*/
|
|
5
|
+
interface BoundaryConfig {
|
|
6
|
+
/** Source → denied targets. Each key is a package/directory name, value is the list it must not import from. */
|
|
7
|
+
deny: Record<string, string[]>;
|
|
8
|
+
/** File paths that bypass boundary checks entirely (escape hatch for legitimate exceptions). */
|
|
9
|
+
ignore?: string[];
|
|
10
|
+
}
|
|
11
|
+
/** A single boundary rule (from → to deny pair), used internally by violation reporting. */
|
|
2
12
|
interface BoundaryRule {
|
|
3
|
-
/** Source package or directory
|
|
13
|
+
/** Source package or directory. */
|
|
4
14
|
from: string;
|
|
5
|
-
/** Target package or directory
|
|
15
|
+
/** Target package or directory that is denied. */
|
|
6
16
|
to: string;
|
|
7
|
-
/** Whether this import direction is allowed (`true`) or disallowed (`false`). */
|
|
8
|
-
allow: boolean;
|
|
9
|
-
/** Human-readable explanation of why this boundary exists. */
|
|
10
|
-
reason?: string;
|
|
11
17
|
}
|
|
12
18
|
/** A boundary violation detected during checking. */
|
|
13
19
|
interface BoundaryViolation {
|
|
@@ -111,8 +117,8 @@ interface ViberailsConfig {
|
|
|
111
117
|
rules: ConfigRules;
|
|
112
118
|
/** Glob patterns for files and directories to ignore. */
|
|
113
119
|
ignore: string[];
|
|
114
|
-
/** Module boundary rules for import enforcement
|
|
115
|
-
boundaries?:
|
|
120
|
+
/** Module boundary rules for import enforcement. */
|
|
121
|
+
boundaries?: BoundaryConfig;
|
|
116
122
|
/** Workspace configuration for monorepo support (V1.1+). */
|
|
117
123
|
workspace?: WorkspaceConfig;
|
|
118
124
|
/** Per-package overrides for monorepo projects. Only packages that differ from global. */
|
|
@@ -265,6 +271,8 @@ declare const STYLING_NAMES: Record<string, string>;
|
|
|
265
271
|
declare const ORM_NAMES: Record<string, string>;
|
|
266
272
|
/** Display names for notable libraries. */
|
|
267
273
|
declare const LIBRARY_NAMES: Record<string, string>;
|
|
274
|
+
/** Display labels for convention keys. */
|
|
275
|
+
declare const CONVENTION_LABELS: Record<string, string>;
|
|
268
276
|
/** Display names for directory roles. */
|
|
269
277
|
declare const ROLE_DESCRIPTIONS: Record<string, string>;
|
|
270
278
|
|
|
@@ -461,4 +469,4 @@ interface FileStatistic {
|
|
|
461
469
|
|
|
462
470
|
declare const VERSION: string;
|
|
463
471
|
|
|
464
|
-
export { type BoundaryRule, type BoundaryViolation, type CheckResult, type CheckRule, type CheckViolation, type CodebaseStatistics, type Confidence, type ConfigConventions, type ConfigRules, type ConfigStack, type ConfigStructure, type ConventionValue, type DetectedConvention, type DetectedStack, type DetectedStructure, type DetectedWorkspace, type DirectoryInfo, type DirectoryRole, FRAMEWORK_NAMES, type FileStatistic, type ImportEdge, type ImportGraph, type ImportGraphNode, type ImportKind, LIBRARY_NAMES, ORM_NAMES, type PackageConfigOverrides, type PackageScanResult, ROLE_DESCRIPTIONS, STYLING_NAMES, type ScanResult, type StackItem, VERSION, type ViberailsConfig, type WorkspaceConfig, type WorkspacePackage, confidenceFromConsistency };
|
|
472
|
+
export { type BoundaryConfig, type BoundaryRule, type BoundaryViolation, CONVENTION_LABELS, type CheckResult, type CheckRule, type CheckViolation, type CodebaseStatistics, type Confidence, type ConfigConventions, type ConfigRules, type ConfigStack, type ConfigStructure, type ConventionValue, type DetectedConvention, type DetectedStack, type DetectedStructure, type DetectedWorkspace, type DirectoryInfo, type DirectoryRole, FRAMEWORK_NAMES, type FileStatistic, type ImportEdge, type ImportGraph, type ImportGraphNode, type ImportKind, LIBRARY_NAMES, ORM_NAMES, type PackageConfigOverrides, type PackageScanResult, ROLE_DESCRIPTIONS, STYLING_NAMES, type ScanResult, type StackItem, VERSION, type ViberailsConfig, type WorkspaceConfig, type WorkspacePackage, confidenceFromConsistency };
|
package/dist/index.js
CHANGED
|
@@ -96,6 +96,12 @@ var LIBRARY_NAMES = {
|
|
|
96
96
|
nx: "Nx",
|
|
97
97
|
lerna: "Lerna"
|
|
98
98
|
};
|
|
99
|
+
var CONVENTION_LABELS = {
|
|
100
|
+
fileNaming: "File naming",
|
|
101
|
+
componentNaming: "Component naming",
|
|
102
|
+
hookNaming: "Hook naming",
|
|
103
|
+
importAlias: "Import alias"
|
|
104
|
+
};
|
|
99
105
|
var ROLE_DESCRIPTIONS = {
|
|
100
106
|
pages: "Pages / Routes",
|
|
101
107
|
components: "Components",
|
|
@@ -109,8 +115,9 @@ var ROLE_DESCRIPTIONS = {
|
|
|
109
115
|
};
|
|
110
116
|
|
|
111
117
|
// src/index.ts
|
|
112
|
-
var VERSION = "0.3.
|
|
118
|
+
var VERSION = "0.3.3";
|
|
113
119
|
export {
|
|
120
|
+
CONVENTION_LABELS,
|
|
114
121
|
FRAMEWORK_NAMES,
|
|
115
122
|
LIBRARY_NAMES,
|
|
116
123
|
ORM_NAMES,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/confidence.ts","../src/display-names.ts","../src/index.ts"],"sourcesContent":["/**\n * Confidence level for a detected convention or pattern.\n *\n * - `'high'` — ≥90% consistency across analyzed files. Enforced by default.\n * - `'medium'` — 70–89% consistency. Included in config but not enforced.\n * - `'low'` — <70% consistency. Omitted from config entirely.\n */\nexport type Confidence = 'high' | 'medium' | 'low';\n\n/**\n * A convention or pattern detected by the scanner, with metadata\n * about how confidently it was identified.\n *\n * @typeParam T - The type of the detected value. Defaults to `string`.\n */\nexport interface DetectedConvention<T = string> {\n /** The detected value (e.g. a naming pattern, file extension, or path). */\n value: T;\n\n /** How confident the scanner is in this detection. */\n confidence: Confidence;\n\n /** Number of files analyzed to determine this convention. */\n sampleSize: number;\n\n /** Percentage (0–100) of files that follow this convention. */\n consistency: number;\n}\n\n/**\n * Derives a confidence level from a consistency percentage.\n *\n * @param consistency - A number from 0 to 100 representing the percentage\n * of files that follow a given convention.\n * @returns The corresponding confidence level:\n * - `'high'` for consistency ≥ 90\n * - `'medium'` for consistency ≥ 70 and < 90\n * - `'low'` for consistency < 70\n */\nexport function confidenceFromConsistency(consistency: number): Confidence {\n if (consistency >= 90) return 'high';\n if (consistency >= 70) return 'medium';\n return 'low';\n}\n","/** Display names for framework identifiers. */\nexport const FRAMEWORK_NAMES: Record<string, string> = {\n nextjs: 'Next.js',\n expo: 'Expo',\n 'react-native': 'React Native',\n angular: 'Angular',\n remix: 'Remix',\n nuxt: 'Nuxt',\n sveltekit: 'SvelteKit',\n astro: 'Astro',\n gatsby: 'Gatsby',\n solidjs: 'Solid.js',\n qwik: 'Qwik',\n electron: 'Electron',\n tauri: 'Tauri',\n nestjs: 'NestJS',\n express: 'Express',\n fastify: 'Fastify',\n koa: 'Koa',\n hono: 'Hono',\n supabase: 'Supabase',\n firebase: 'Firebase',\n convex: 'Convex',\n};\n\n/** Display names for styling libraries. */\nexport const STYLING_NAMES: Record<string, string> = {\n tailwindcss: 'Tailwind CSS',\n 'css-modules': 'CSS Modules',\n 'styled-components': 'styled-components',\n emotion: 'Emotion',\n sass: 'Sass',\n 'vanilla-extract': 'Vanilla Extract',\n unocss: 'UnoCSS',\n 'panda-css': 'Panda CSS',\n nativewind: 'NativeWind',\n};\n\n/** Display names for ORM / database clients. */\nexport const ORM_NAMES: Record<string, string> = {\n prisma: 'Prisma',\n drizzle: 'Drizzle',\n typeorm: 'TypeORM',\n sequelize: 'Sequelize',\n mongoose: 'Mongoose',\n kysely: 'Kysely',\n 'mikro-orm': 'MikroORM',\n};\n\n/** Display names for notable libraries. */\nexport const LIBRARY_NAMES: Record<string, string> = {\n 'react-query': 'React Query',\n 'tanstack-query': 'TanStack Query',\n zod: 'Zod',\n trpc: 'tRPC',\n expo: 'Expo',\n 'react-native': 'React Native',\n nextjs: 'Next.js',\n react: 'React',\n sveltekit: 'SvelteKit',\n svelte: 'Svelte',\n astro: 'Astro',\n vue: 'Vue',\n apollo: 'Apollo Client',\n urql: 'urql',\n graphql: 'GraphQL',\n 'redux-toolkit': 'Redux Toolkit',\n zustand: 'Zustand',\n jotai: 'Jotai',\n recoil: 'Recoil',\n mobx: 'MobX',\n xstate: 'XState',\n valtio: 'Valtio',\n 'react-hook-form': 'React Hook Form',\n formik: 'Formik',\n axios: 'Axios',\n 'next-auth': 'NextAuth.js',\n 'auth-js': 'Auth.js',\n clerk: 'Clerk',\n lucia: 'Lucia',\n 'date-fns': 'date-fns',\n dayjs: 'Day.js',\n luxon: 'Luxon',\n i18next: 'i18next',\n 'next-i18next': 'next-i18next',\n stripe: 'Stripe',\n 'socket.io': 'Socket.IO',\n 'testing-library': 'Testing Library',\n msw: 'MSW',\n storybook: 'Storybook',\n vite: 'Vite',\n webpack: 'webpack',\n esbuild: 'esbuild',\n rspack: 'Rspack',\n nx: 'Nx',\n lerna: 'Lerna',\n};\n\n/** Display names for directory roles. */\nexport const ROLE_DESCRIPTIONS: Record<string, string> = {\n pages: 'Pages / Routes',\n components: 'Components',\n hooks: 'Hooks',\n utils: 'Utilities',\n types: 'Type definitions',\n tests: 'Tests',\n styles: 'Styles',\n api: 'API routes',\n config: 'Configuration',\n};\n","declare const __PACKAGE_VERSION__: string;\nexport const VERSION: string = __PACKAGE_VERSION__;\n\nexport type { BoundaryRule, BoundaryViolation } from './boundary.js';\nexport type { CheckResult, CheckRule, CheckViolation } from './check-result.js';\nexport type { Confidence, DetectedConvention } from './confidence.js';\nexport { confidenceFromConsistency } from './confidence.js';\nexport type {\n ConfigConventions,\n ConfigRules,\n ConfigStack,\n ConfigStructure,\n ConventionValue,\n PackageConfigOverrides,\n ViberailsConfig,\n WorkspaceConfig,\n} from './config.js';\nexport {\n FRAMEWORK_NAMES,\n LIBRARY_NAMES,\n ORM_NAMES,\n ROLE_DESCRIPTIONS,\n STYLING_NAMES,\n} from './display-names.js';\nexport type {\n ImportEdge,\n ImportGraph,\n ImportGraphNode,\n ImportKind,\n WorkspacePackage,\n} from './graph.js';\nexport type {\n CodebaseStatistics,\n DetectedStack,\n DetectedStructure,\n DetectedWorkspace,\n DirectoryInfo,\n DirectoryRole,\n FileStatistic,\n PackageScanResult,\n ScanResult,\n StackItem,\n} from './scan-result.js';\n"],"mappings":";AAuCO,SAAS,0BAA0B,aAAiC;AACzE,MAAI,eAAe,GAAI,QAAO;AAC9B,MAAI,eAAe,GAAI,QAAO;AAC9B,SAAO;AACT;;;AC1CO,IAAM,kBAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,gBAAgB;AAAA,EAChB,SAAS;AAAA,EACT,OAAO;AAAA,EACP,MAAM;AAAA,EACN,WAAW;AAAA,EACX,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,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EACJ,OAAO;AACT;AAGO,IAAM,oBAA4C;AAAA,EACvD,OAAO;AAAA,EACP,YAAY;AAAA,EACZ,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AACV;;;
|
|
1
|
+
{"version":3,"sources":["../src/confidence.ts","../src/display-names.ts","../src/index.ts"],"sourcesContent":["/**\n * Confidence level for a detected convention or pattern.\n *\n * - `'high'` — ≥90% consistency across analyzed files. Enforced by default.\n * - `'medium'` — 70–89% consistency. Included in config but not enforced.\n * - `'low'` — <70% consistency. Omitted from config entirely.\n */\nexport type Confidence = 'high' | 'medium' | 'low';\n\n/**\n * A convention or pattern detected by the scanner, with metadata\n * about how confidently it was identified.\n *\n * @typeParam T - The type of the detected value. Defaults to `string`.\n */\nexport interface DetectedConvention<T = string> {\n /** The detected value (e.g. a naming pattern, file extension, or path). */\n value: T;\n\n /** How confident the scanner is in this detection. */\n confidence: Confidence;\n\n /** Number of files analyzed to determine this convention. */\n sampleSize: number;\n\n /** Percentage (0–100) of files that follow this convention. */\n consistency: number;\n}\n\n/**\n * Derives a confidence level from a consistency percentage.\n *\n * @param consistency - A number from 0 to 100 representing the percentage\n * of files that follow a given convention.\n * @returns The corresponding confidence level:\n * - `'high'` for consistency ≥ 90\n * - `'medium'` for consistency ≥ 70 and < 90\n * - `'low'` for consistency < 70\n */\nexport function confidenceFromConsistency(consistency: number): Confidence {\n if (consistency >= 90) return 'high';\n if (consistency >= 70) return 'medium';\n return 'low';\n}\n","/** Display names for framework identifiers. */\nexport const FRAMEWORK_NAMES: Record<string, string> = {\n nextjs: 'Next.js',\n expo: 'Expo',\n 'react-native': 'React Native',\n angular: 'Angular',\n remix: 'Remix',\n nuxt: 'Nuxt',\n sveltekit: 'SvelteKit',\n astro: 'Astro',\n gatsby: 'Gatsby',\n solidjs: 'Solid.js',\n qwik: 'Qwik',\n electron: 'Electron',\n tauri: 'Tauri',\n nestjs: 'NestJS',\n express: 'Express',\n fastify: 'Fastify',\n koa: 'Koa',\n hono: 'Hono',\n supabase: 'Supabase',\n firebase: 'Firebase',\n convex: 'Convex',\n};\n\n/** Display names for styling libraries. */\nexport const STYLING_NAMES: Record<string, string> = {\n tailwindcss: 'Tailwind CSS',\n 'css-modules': 'CSS Modules',\n 'styled-components': 'styled-components',\n emotion: 'Emotion',\n sass: 'Sass',\n 'vanilla-extract': 'Vanilla Extract',\n unocss: 'UnoCSS',\n 'panda-css': 'Panda CSS',\n nativewind: 'NativeWind',\n};\n\n/** Display names for ORM / database clients. */\nexport const ORM_NAMES: Record<string, string> = {\n prisma: 'Prisma',\n drizzle: 'Drizzle',\n typeorm: 'TypeORM',\n sequelize: 'Sequelize',\n mongoose: 'Mongoose',\n kysely: 'Kysely',\n 'mikro-orm': 'MikroORM',\n};\n\n/** Display names for notable libraries. */\nexport const LIBRARY_NAMES: Record<string, string> = {\n 'react-query': 'React Query',\n 'tanstack-query': 'TanStack Query',\n zod: 'Zod',\n trpc: 'tRPC',\n expo: 'Expo',\n 'react-native': 'React Native',\n nextjs: 'Next.js',\n react: 'React',\n sveltekit: 'SvelteKit',\n svelte: 'Svelte',\n astro: 'Astro',\n vue: 'Vue',\n apollo: 'Apollo Client',\n urql: 'urql',\n graphql: 'GraphQL',\n 'redux-toolkit': 'Redux Toolkit',\n zustand: 'Zustand',\n jotai: 'Jotai',\n recoil: 'Recoil',\n mobx: 'MobX',\n xstate: 'XState',\n valtio: 'Valtio',\n 'react-hook-form': 'React Hook Form',\n formik: 'Formik',\n axios: 'Axios',\n 'next-auth': 'NextAuth.js',\n 'auth-js': 'Auth.js',\n clerk: 'Clerk',\n lucia: 'Lucia',\n 'date-fns': 'date-fns',\n dayjs: 'Day.js',\n luxon: 'Luxon',\n i18next: 'i18next',\n 'next-i18next': 'next-i18next',\n stripe: 'Stripe',\n 'socket.io': 'Socket.IO',\n 'testing-library': 'Testing Library',\n msw: 'MSW',\n storybook: 'Storybook',\n vite: 'Vite',\n webpack: 'webpack',\n esbuild: 'esbuild',\n rspack: 'Rspack',\n nx: 'Nx',\n lerna: 'Lerna',\n};\n\n/** Display labels for convention keys. */\nexport const CONVENTION_LABELS: Record<string, string> = {\n fileNaming: 'File naming',\n componentNaming: 'Component naming',\n hookNaming: 'Hook naming',\n importAlias: 'Import alias',\n};\n\n/** Display names for directory roles. */\nexport const ROLE_DESCRIPTIONS: Record<string, string> = {\n pages: 'Pages / Routes',\n components: 'Components',\n hooks: 'Hooks',\n utils: 'Utilities',\n types: 'Type definitions',\n tests: 'Tests',\n styles: 'Styles',\n api: 'API routes',\n config: 'Configuration',\n};\n","declare const __PACKAGE_VERSION__: string;\nexport const VERSION: string = __PACKAGE_VERSION__;\n\nexport type { BoundaryConfig, BoundaryRule, BoundaryViolation } from './boundary.js';\nexport type { CheckResult, CheckRule, CheckViolation } from './check-result.js';\nexport type { Confidence, DetectedConvention } from './confidence.js';\nexport { confidenceFromConsistency } from './confidence.js';\nexport type {\n ConfigConventions,\n ConfigRules,\n ConfigStack,\n ConfigStructure,\n ConventionValue,\n PackageConfigOverrides,\n ViberailsConfig,\n WorkspaceConfig,\n} from './config.js';\nexport {\n CONVENTION_LABELS,\n FRAMEWORK_NAMES,\n LIBRARY_NAMES,\n ORM_NAMES,\n ROLE_DESCRIPTIONS,\n STYLING_NAMES,\n} from './display-names.js';\nexport type {\n ImportEdge,\n ImportGraph,\n ImportGraphNode,\n ImportKind,\n WorkspacePackage,\n} from './graph.js';\nexport type {\n CodebaseStatistics,\n DetectedStack,\n DetectedStructure,\n DetectedWorkspace,\n DirectoryInfo,\n DirectoryRole,\n FileStatistic,\n PackageScanResult,\n ScanResult,\n StackItem,\n} from './scan-result.js';\n"],"mappings":";AAuCO,SAAS,0BAA0B,aAAiC;AACzE,MAAI,eAAe,GAAI,QAAO;AAC9B,MAAI,eAAe,GAAI,QAAO;AAC9B,SAAO;AACT;;;AC1CO,IAAM,kBAA0C;AAAA,EACrD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