humanbehavior-js 0.4.13 → 0.4.15

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.
@@ -15,7 +15,7 @@ import { AICodeAnalysis } from '../ai/ai-install-wizard';
15
15
 
16
16
  export interface FrameworkInfo {
17
17
  name: string;
18
- type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node';
18
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'astro' | 'node';
19
19
  bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
20
20
  packageManager?: 'npm' | 'yarn' | 'pnpm';
21
21
  hasTypeScript?: boolean;
@@ -8,12 +8,22 @@ import { AICodeAnalysis } from '../ai/ai-install-wizard';
8
8
 
9
9
  export interface FrameworkInfo {
10
10
  name: string;
11
- type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'node';
11
+ type: 'react' | 'vue' | 'angular' | 'svelte' | 'nextjs' | 'nuxt' | 'remix' | 'vanilla' | 'astro' | 'gatsby' | 'node';
12
12
  bundler?: 'vite' | 'webpack' | 'esbuild' | 'rollup';
13
13
  packageManager?: 'npm' | 'yarn' | 'pnpm';
14
14
  hasTypeScript?: boolean;
15
15
  hasRouter?: boolean;
16
16
  projectRoot?: string;
17
+ version?: string;
18
+ majorVersion?: number;
19
+ features?: {
20
+ hasReact18?: boolean;
21
+ hasVue3?: boolean;
22
+ hasNuxt3?: boolean;
23
+ hasAngularStandalone?: boolean;
24
+ hasNextAppRouter?: boolean;
25
+ hasSvelteKit?: boolean;
26
+ };
17
27
  }
18
28
 
19
29
  export interface RemoteAIServiceConfig {
@@ -125,6 +135,9 @@ export class RemoteAIService {
125
135
  } else if (patterns.includes('next') || patterns.includes('nextjs') || patterns.includes('next/link') || patterns.includes('next/image') || patterns.includes('next/navigation') || patterns.includes('next/router') || patterns.includes('getserverSideProps') || patterns.includes('getstaticProps') || patterns.includes('getstaticPaths') || patterns.includes('app/layout') || patterns.includes('app/page') || patterns.includes('pages/')) {
126
136
  framework = { name: 'nextjs', type: 'nextjs' };
127
137
  confidence = 0.95;
138
+ } else if (patterns.includes('gatsby') || patterns.includes('gatsby-browser') || patterns.includes('gatsby-ssr') || patterns.includes('gatsby-node') || patterns.includes('gatsby-config') || patterns.includes('useStaticQuery') || patterns.includes('graphql')) {
139
+ framework = { name: 'gatsby', type: 'gatsby' };
140
+ confidence = 0.95;
128
141
  } else if (patterns.includes('react')) {
129
142
  framework = { name: 'react', type: 'react' };
130
143
  confidence = 0.9;
@@ -137,11 +150,14 @@ export class RemoteAIService {
137
150
  } else if (patterns.includes('svelte')) {
138
151
  framework = { name: 'svelte', type: 'svelte' };
139
152
  confidence = 0.9;
153
+ } else if (patterns.includes('astro')) {
154
+ framework = { name: 'astro', type: 'astro' };
155
+ confidence = 0.9;
140
156
  }
141
157
 
142
158
  // Integration strategy
143
159
  let integrationStrategy: 'provider' | 'plugin' | 'module' | 'script' | 'standalone' = 'script';
144
- if (framework.type === 'react' || framework.type === 'nextjs') {
160
+ if (framework.type === 'react' || framework.type === 'nextjs' || framework.type === 'gatsby') {
145
161
  integrationStrategy = 'provider';
146
162
  } else if (framework.type === 'vue') {
147
163
  integrationStrategy = 'plugin';
package/tsconfig.json CHANGED
@@ -18,7 +18,7 @@
18
18
  "forceConsistentCasingInFileNames": true,
19
19
  "lib": ["dom", "dom.iterable", "esnext"]
20
20
  },
21
- "include": ["src/**/*.ts", "src/**/*.tsx"],
21
+ "include": ["src/**/*.ts", "src/**/*.tsx", "src/types/**/*.d.ts"],
22
22
 
23
23
  "exclude": ["node_modules", "dist", "test-website"]
24
24
  }