@viberails/types 0.3.0 → 0.3.2
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 +59 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -16
- package/dist/index.d.ts +9 -16
- package/dist/index.js +58 -7
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -22,6 +22,7 @@ var index_exports = {};
|
|
|
22
22
|
__export(index_exports, {
|
|
23
23
|
FRAMEWORK_NAMES: () => FRAMEWORK_NAMES,
|
|
24
24
|
LIBRARY_NAMES: () => LIBRARY_NAMES,
|
|
25
|
+
ORM_NAMES: () => ORM_NAMES,
|
|
25
26
|
ROLE_DESCRIPTIONS: () => ROLE_DESCRIPTIONS,
|
|
26
27
|
STYLING_NAMES: () => STYLING_NAMES,
|
|
27
28
|
VERSION: () => VERSION,
|
|
@@ -46,28 +47,45 @@ var FRAMEWORK_NAMES = {
|
|
|
46
47
|
nuxt: "Nuxt",
|
|
47
48
|
sveltekit: "SvelteKit",
|
|
48
49
|
astro: "Astro",
|
|
49
|
-
vite: "Vite",
|
|
50
50
|
gatsby: "Gatsby",
|
|
51
|
+
solidjs: "Solid.js",
|
|
52
|
+
qwik: "Qwik",
|
|
53
|
+
electron: "Electron",
|
|
54
|
+
tauri: "Tauri",
|
|
51
55
|
nestjs: "NestJS",
|
|
52
56
|
express: "Express",
|
|
53
57
|
fastify: "Fastify",
|
|
54
58
|
koa: "Koa",
|
|
55
|
-
hono: "Hono"
|
|
59
|
+
hono: "Hono",
|
|
60
|
+
supabase: "Supabase",
|
|
61
|
+
firebase: "Firebase",
|
|
62
|
+
convex: "Convex"
|
|
56
63
|
};
|
|
57
64
|
var STYLING_NAMES = {
|
|
58
65
|
tailwindcss: "Tailwind CSS",
|
|
59
66
|
"css-modules": "CSS Modules",
|
|
60
67
|
"styled-components": "styled-components",
|
|
61
68
|
emotion: "Emotion",
|
|
62
|
-
sass: "Sass"
|
|
69
|
+
sass: "Sass",
|
|
70
|
+
"vanilla-extract": "Vanilla Extract",
|
|
71
|
+
unocss: "UnoCSS",
|
|
72
|
+
"panda-css": "Panda CSS",
|
|
73
|
+
nativewind: "NativeWind"
|
|
74
|
+
};
|
|
75
|
+
var ORM_NAMES = {
|
|
76
|
+
prisma: "Prisma",
|
|
77
|
+
drizzle: "Drizzle",
|
|
78
|
+
typeorm: "TypeORM",
|
|
79
|
+
sequelize: "Sequelize",
|
|
80
|
+
mongoose: "Mongoose",
|
|
81
|
+
kysely: "Kysely",
|
|
82
|
+
"mikro-orm": "MikroORM"
|
|
63
83
|
};
|
|
64
84
|
var LIBRARY_NAMES = {
|
|
65
85
|
"react-query": "React Query",
|
|
66
86
|
"tanstack-query": "TanStack Query",
|
|
67
87
|
zod: "Zod",
|
|
68
88
|
trpc: "tRPC",
|
|
69
|
-
prisma: "Prisma",
|
|
70
|
-
drizzle: "Drizzle",
|
|
71
89
|
expo: "Expo",
|
|
72
90
|
"react-native": "React Native",
|
|
73
91
|
nextjs: "Next.js",
|
|
@@ -75,7 +93,40 @@ var LIBRARY_NAMES = {
|
|
|
75
93
|
sveltekit: "SvelteKit",
|
|
76
94
|
svelte: "Svelte",
|
|
77
95
|
astro: "Astro",
|
|
78
|
-
vue: "Vue"
|
|
96
|
+
vue: "Vue",
|
|
97
|
+
apollo: "Apollo Client",
|
|
98
|
+
urql: "urql",
|
|
99
|
+
graphql: "GraphQL",
|
|
100
|
+
"redux-toolkit": "Redux Toolkit",
|
|
101
|
+
zustand: "Zustand",
|
|
102
|
+
jotai: "Jotai",
|
|
103
|
+
recoil: "Recoil",
|
|
104
|
+
mobx: "MobX",
|
|
105
|
+
xstate: "XState",
|
|
106
|
+
valtio: "Valtio",
|
|
107
|
+
"react-hook-form": "React Hook Form",
|
|
108
|
+
formik: "Formik",
|
|
109
|
+
axios: "Axios",
|
|
110
|
+
"next-auth": "NextAuth.js",
|
|
111
|
+
"auth-js": "Auth.js",
|
|
112
|
+
clerk: "Clerk",
|
|
113
|
+
lucia: "Lucia",
|
|
114
|
+
"date-fns": "date-fns",
|
|
115
|
+
dayjs: "Day.js",
|
|
116
|
+
luxon: "Luxon",
|
|
117
|
+
i18next: "i18next",
|
|
118
|
+
"next-i18next": "next-i18next",
|
|
119
|
+
stripe: "Stripe",
|
|
120
|
+
"socket.io": "Socket.IO",
|
|
121
|
+
"testing-library": "Testing Library",
|
|
122
|
+
msw: "MSW",
|
|
123
|
+
storybook: "Storybook",
|
|
124
|
+
vite: "Vite",
|
|
125
|
+
webpack: "webpack",
|
|
126
|
+
esbuild: "esbuild",
|
|
127
|
+
rspack: "Rspack",
|
|
128
|
+
nx: "Nx",
|
|
129
|
+
lerna: "Lerna"
|
|
79
130
|
};
|
|
80
131
|
var ROLE_DESCRIPTIONS = {
|
|
81
132
|
pages: "Pages / Routes",
|
|
@@ -90,11 +141,12 @@ var ROLE_DESCRIPTIONS = {
|
|
|
90
141
|
};
|
|
91
142
|
|
|
92
143
|
// src/index.ts
|
|
93
|
-
var VERSION = "0.3.
|
|
144
|
+
var VERSION = "0.3.2";
|
|
94
145
|
// Annotate the CommonJS export names for ESM import in node:
|
|
95
146
|
0 && (module.exports = {
|
|
96
147
|
FRAMEWORK_NAMES,
|
|
97
148
|
LIBRARY_NAMES,
|
|
149
|
+
ORM_NAMES,
|
|
98
150
|
ROLE_DESCRIPTIONS,
|
|
99
151
|
STYLING_NAMES,
|
|
100
152
|
VERSION,
|
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 {
|
|
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;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,SAAS;AAAA,EACT,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AAAA,EACV,QAAQ;AACV;AAGO,IAAM,gBAAwC;AAAA,EACn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AA,EACP,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,QAAQ;AACV;;;AF5GO,IAAM,UAAkB;","names":[]}
|
package/dist/index.d.cts
CHANGED
|
@@ -9,19 +9,6 @@ interface BoundaryRule {
|
|
|
9
9
|
/** Human-readable explanation of why this boundary exists. */
|
|
10
10
|
reason?: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Compact boundary map format: each key is a package/directory,
|
|
14
|
-
* the value is an array of packages/directories it must NOT import from.
|
|
15
|
-
*
|
|
16
|
-
* Example:
|
|
17
|
-
* ```json
|
|
18
|
-
* {
|
|
19
|
-
* "@app/types": ["@app/scanner", "@app/config"],
|
|
20
|
-
* "@app/scanner": ["@app/config"]
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
type BoundaryMap = Record<string, string[]>;
|
|
25
12
|
/** A boundary violation detected during checking. */
|
|
26
13
|
interface BoundaryViolation {
|
|
27
14
|
/** File containing the violating import. */
|
|
@@ -124,8 +111,8 @@ interface ViberailsConfig {
|
|
|
124
111
|
rules: ConfigRules;
|
|
125
112
|
/** Glob patterns for files and directories to ignore. */
|
|
126
113
|
ignore: string[];
|
|
127
|
-
/** Module boundary rules for import enforcement
|
|
128
|
-
boundaries?:
|
|
114
|
+
/** Module boundary rules for import enforcement (V1.1+). */
|
|
115
|
+
boundaries?: BoundaryRule[];
|
|
129
116
|
/** Workspace configuration for monorepo support (V1.1+). */
|
|
130
117
|
workspace?: WorkspaceConfig;
|
|
131
118
|
/** Per-package overrides for monorepo projects. Only packages that differ from global. */
|
|
@@ -171,6 +158,8 @@ interface ConfigStack {
|
|
|
171
158
|
styling?: string;
|
|
172
159
|
/** Backend framework (e.g. `"express@5"`, `"fastify"`). */
|
|
173
160
|
backend?: string;
|
|
161
|
+
/** ORM or database client (e.g. `"prisma"`, `"drizzle"`, `"typeorm"`). */
|
|
162
|
+
orm?: string;
|
|
174
163
|
/** Package manager (e.g. `"pnpm"`, `"npm"`, `"yarn"`). */
|
|
175
164
|
packageManager: string;
|
|
176
165
|
/** Linter (e.g. `"eslint@9"`, `"biome"`). */
|
|
@@ -272,6 +261,8 @@ interface ConfigRules {
|
|
|
272
261
|
declare const FRAMEWORK_NAMES: Record<string, string>;
|
|
273
262
|
/** Display names for styling libraries. */
|
|
274
263
|
declare const STYLING_NAMES: Record<string, string>;
|
|
264
|
+
/** Display names for ORM / database clients. */
|
|
265
|
+
declare const ORM_NAMES: Record<string, string>;
|
|
275
266
|
/** Display names for notable libraries. */
|
|
276
267
|
declare const LIBRARY_NAMES: Record<string, string>;
|
|
277
268
|
/** Display names for directory roles. */
|
|
@@ -393,6 +384,8 @@ interface DetectedStack {
|
|
|
393
384
|
styling?: StackItem;
|
|
394
385
|
/** Backend framework or runtime (e.g. Express, Fastify). */
|
|
395
386
|
backend?: StackItem;
|
|
387
|
+
/** ORM or database client (e.g. Prisma, Drizzle, TypeORM). */
|
|
388
|
+
orm?: StackItem;
|
|
396
389
|
/** Package manager used (e.g. pnpm, npm, yarn). */
|
|
397
390
|
packageManager: StackItem;
|
|
398
391
|
/** Linter in use (e.g. ESLint, Biome). */
|
|
@@ -468,4 +461,4 @@ interface FileStatistic {
|
|
|
468
461
|
|
|
469
462
|
declare const VERSION: string;
|
|
470
463
|
|
|
471
|
-
export { type
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -9,19 +9,6 @@ interface BoundaryRule {
|
|
|
9
9
|
/** Human-readable explanation of why this boundary exists. */
|
|
10
10
|
reason?: string;
|
|
11
11
|
}
|
|
12
|
-
/**
|
|
13
|
-
* Compact boundary map format: each key is a package/directory,
|
|
14
|
-
* the value is an array of packages/directories it must NOT import from.
|
|
15
|
-
*
|
|
16
|
-
* Example:
|
|
17
|
-
* ```json
|
|
18
|
-
* {
|
|
19
|
-
* "@app/types": ["@app/scanner", "@app/config"],
|
|
20
|
-
* "@app/scanner": ["@app/config"]
|
|
21
|
-
* }
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
type BoundaryMap = Record<string, string[]>;
|
|
25
12
|
/** A boundary violation detected during checking. */
|
|
26
13
|
interface BoundaryViolation {
|
|
27
14
|
/** File containing the violating import. */
|
|
@@ -124,8 +111,8 @@ interface ViberailsConfig {
|
|
|
124
111
|
rules: ConfigRules;
|
|
125
112
|
/** Glob patterns for files and directories to ignore. */
|
|
126
113
|
ignore: string[];
|
|
127
|
-
/** Module boundary rules for import enforcement
|
|
128
|
-
boundaries?:
|
|
114
|
+
/** Module boundary rules for import enforcement (V1.1+). */
|
|
115
|
+
boundaries?: BoundaryRule[];
|
|
129
116
|
/** Workspace configuration for monorepo support (V1.1+). */
|
|
130
117
|
workspace?: WorkspaceConfig;
|
|
131
118
|
/** Per-package overrides for monorepo projects. Only packages that differ from global. */
|
|
@@ -171,6 +158,8 @@ interface ConfigStack {
|
|
|
171
158
|
styling?: string;
|
|
172
159
|
/** Backend framework (e.g. `"express@5"`, `"fastify"`). */
|
|
173
160
|
backend?: string;
|
|
161
|
+
/** ORM or database client (e.g. `"prisma"`, `"drizzle"`, `"typeorm"`). */
|
|
162
|
+
orm?: string;
|
|
174
163
|
/** Package manager (e.g. `"pnpm"`, `"npm"`, `"yarn"`). */
|
|
175
164
|
packageManager: string;
|
|
176
165
|
/** Linter (e.g. `"eslint@9"`, `"biome"`). */
|
|
@@ -272,6 +261,8 @@ interface ConfigRules {
|
|
|
272
261
|
declare const FRAMEWORK_NAMES: Record<string, string>;
|
|
273
262
|
/** Display names for styling libraries. */
|
|
274
263
|
declare const STYLING_NAMES: Record<string, string>;
|
|
264
|
+
/** Display names for ORM / database clients. */
|
|
265
|
+
declare const ORM_NAMES: Record<string, string>;
|
|
275
266
|
/** Display names for notable libraries. */
|
|
276
267
|
declare const LIBRARY_NAMES: Record<string, string>;
|
|
277
268
|
/** Display names for directory roles. */
|
|
@@ -393,6 +384,8 @@ interface DetectedStack {
|
|
|
393
384
|
styling?: StackItem;
|
|
394
385
|
/** Backend framework or runtime (e.g. Express, Fastify). */
|
|
395
386
|
backend?: StackItem;
|
|
387
|
+
/** ORM or database client (e.g. Prisma, Drizzle, TypeORM). */
|
|
388
|
+
orm?: StackItem;
|
|
396
389
|
/** Package manager used (e.g. pnpm, npm, yarn). */
|
|
397
390
|
packageManager: StackItem;
|
|
398
391
|
/** Linter in use (e.g. ESLint, Biome). */
|
|
@@ -468,4 +461,4 @@ interface FileStatistic {
|
|
|
468
461
|
|
|
469
462
|
declare const VERSION: string;
|
|
470
463
|
|
|
471
|
-
export { type
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -15,28 +15,45 @@ var FRAMEWORK_NAMES = {
|
|
|
15
15
|
nuxt: "Nuxt",
|
|
16
16
|
sveltekit: "SvelteKit",
|
|
17
17
|
astro: "Astro",
|
|
18
|
-
vite: "Vite",
|
|
19
18
|
gatsby: "Gatsby",
|
|
19
|
+
solidjs: "Solid.js",
|
|
20
|
+
qwik: "Qwik",
|
|
21
|
+
electron: "Electron",
|
|
22
|
+
tauri: "Tauri",
|
|
20
23
|
nestjs: "NestJS",
|
|
21
24
|
express: "Express",
|
|
22
25
|
fastify: "Fastify",
|
|
23
26
|
koa: "Koa",
|
|
24
|
-
hono: "Hono"
|
|
27
|
+
hono: "Hono",
|
|
28
|
+
supabase: "Supabase",
|
|
29
|
+
firebase: "Firebase",
|
|
30
|
+
convex: "Convex"
|
|
25
31
|
};
|
|
26
32
|
var STYLING_NAMES = {
|
|
27
33
|
tailwindcss: "Tailwind CSS",
|
|
28
34
|
"css-modules": "CSS Modules",
|
|
29
35
|
"styled-components": "styled-components",
|
|
30
36
|
emotion: "Emotion",
|
|
31
|
-
sass: "Sass"
|
|
37
|
+
sass: "Sass",
|
|
38
|
+
"vanilla-extract": "Vanilla Extract",
|
|
39
|
+
unocss: "UnoCSS",
|
|
40
|
+
"panda-css": "Panda CSS",
|
|
41
|
+
nativewind: "NativeWind"
|
|
42
|
+
};
|
|
43
|
+
var ORM_NAMES = {
|
|
44
|
+
prisma: "Prisma",
|
|
45
|
+
drizzle: "Drizzle",
|
|
46
|
+
typeorm: "TypeORM",
|
|
47
|
+
sequelize: "Sequelize",
|
|
48
|
+
mongoose: "Mongoose",
|
|
49
|
+
kysely: "Kysely",
|
|
50
|
+
"mikro-orm": "MikroORM"
|
|
32
51
|
};
|
|
33
52
|
var LIBRARY_NAMES = {
|
|
34
53
|
"react-query": "React Query",
|
|
35
54
|
"tanstack-query": "TanStack Query",
|
|
36
55
|
zod: "Zod",
|
|
37
56
|
trpc: "tRPC",
|
|
38
|
-
prisma: "Prisma",
|
|
39
|
-
drizzle: "Drizzle",
|
|
40
57
|
expo: "Expo",
|
|
41
58
|
"react-native": "React Native",
|
|
42
59
|
nextjs: "Next.js",
|
|
@@ -44,7 +61,40 @@ var LIBRARY_NAMES = {
|
|
|
44
61
|
sveltekit: "SvelteKit",
|
|
45
62
|
svelte: "Svelte",
|
|
46
63
|
astro: "Astro",
|
|
47
|
-
vue: "Vue"
|
|
64
|
+
vue: "Vue",
|
|
65
|
+
apollo: "Apollo Client",
|
|
66
|
+
urql: "urql",
|
|
67
|
+
graphql: "GraphQL",
|
|
68
|
+
"redux-toolkit": "Redux Toolkit",
|
|
69
|
+
zustand: "Zustand",
|
|
70
|
+
jotai: "Jotai",
|
|
71
|
+
recoil: "Recoil",
|
|
72
|
+
mobx: "MobX",
|
|
73
|
+
xstate: "XState",
|
|
74
|
+
valtio: "Valtio",
|
|
75
|
+
"react-hook-form": "React Hook Form",
|
|
76
|
+
formik: "Formik",
|
|
77
|
+
axios: "Axios",
|
|
78
|
+
"next-auth": "NextAuth.js",
|
|
79
|
+
"auth-js": "Auth.js",
|
|
80
|
+
clerk: "Clerk",
|
|
81
|
+
lucia: "Lucia",
|
|
82
|
+
"date-fns": "date-fns",
|
|
83
|
+
dayjs: "Day.js",
|
|
84
|
+
luxon: "Luxon",
|
|
85
|
+
i18next: "i18next",
|
|
86
|
+
"next-i18next": "next-i18next",
|
|
87
|
+
stripe: "Stripe",
|
|
88
|
+
"socket.io": "Socket.IO",
|
|
89
|
+
"testing-library": "Testing Library",
|
|
90
|
+
msw: "MSW",
|
|
91
|
+
storybook: "Storybook",
|
|
92
|
+
vite: "Vite",
|
|
93
|
+
webpack: "webpack",
|
|
94
|
+
esbuild: "esbuild",
|
|
95
|
+
rspack: "Rspack",
|
|
96
|
+
nx: "Nx",
|
|
97
|
+
lerna: "Lerna"
|
|
48
98
|
};
|
|
49
99
|
var ROLE_DESCRIPTIONS = {
|
|
50
100
|
pages: "Pages / Routes",
|
|
@@ -59,10 +109,11 @@ var ROLE_DESCRIPTIONS = {
|
|
|
59
109
|
};
|
|
60
110
|
|
|
61
111
|
// src/index.ts
|
|
62
|
-
var VERSION = "0.3.
|
|
112
|
+
var VERSION = "0.3.2";
|
|
63
113
|
export {
|
|
64
114
|
FRAMEWORK_NAMES,
|
|
65
115
|
LIBRARY_NAMES,
|
|
116
|
+
ORM_NAMES,
|
|
66
117
|
ROLE_DESCRIPTIONS,
|
|
67
118
|
STYLING_NAMES,
|
|
68
119
|
VERSION,
|
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
|
|
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,SAAS;AAAA,EACT,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAA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