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.
- package/dist/cjs/install-wizard.cjs +396 -25
- package/dist/cjs/install-wizard.cjs.map +1 -1
- package/dist/cjs/wizard/index.cjs +633 -395
- package/dist/cjs/wizard/index.cjs.map +1 -1
- package/dist/cli/ai-auto-install.cjs +57161 -0
- package/dist/cli/ai-auto-install.cjs.map +1 -0
- package/dist/cli/ai-auto-install.js +520 -575
- package/dist/cli/ai-auto-install.js.map +1 -1
- package/dist/cli/auto-install.cjs +56352 -0
- package/dist/cli/auto-install.cjs.map +1 -0
- package/dist/cli/auto-install.js +925 -140
- package/dist/cli/auto-install.js.map +1 -1
- package/dist/esm/install-wizard.js +396 -25
- package/dist/esm/install-wizard.js.map +1 -1
- package/dist/esm/wizard/index.js +631 -394
- package/dist/esm/wizard/index.js.map +1 -1
- package/dist/types/install-wizard.d.ts +31 -1
- package/dist/types/wizard/index.d.ts +44 -10
- package/package.json +3 -1
- package/rollup.config.js +5 -1
- package/src/types/clack.d.ts +31 -0
- package/src/wizard/ai/ai-install-wizard.ts +4 -1
- package/src/wizard/ai/manual-framework-wizard.ts +2 -0
- package/src/wizard/cli/ai-auto-install.ts +122 -248
- package/src/wizard/cli/auto-install.ts +116 -117
- package/src/wizard/core/install-wizard.ts +498 -60
- package/src/wizard/services/centralized-ai-service.ts +1 -1
- package/src/wizard/services/remote-ai-service.ts +18 -2
- package/tsconfig.json +1 -1
|
@@ -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
|
}
|