@coze-arch/cli 0.0.1-alpha.1d232d → 0.0.1-alpha.6a5120

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.
@@ -49,4 +49,4 @@ echo "Clearing port ${PORT} before start."
49
49
  kill_port_if_listening
50
50
  echo "Starting HTTP service on port ${PORT} for dev..."
51
51
 
52
- TURBOPACK=0 PORT=$PORT node server.mjs
52
+ npx next dev --webpack --port $PORT
@@ -1,6 +1,5 @@
1
1
  import type { Metadata } from 'next';
2
2
  import { Geist, Geist_Mono } from 'next/font/google';
3
- import { Inspector } from 'react-dev-inspector';
4
3
  import './globals.css';
5
4
 
6
5
  const geistSans = Geist({
@@ -72,14 +71,11 @@ export default function RootLayout({
72
71
  }: Readonly<{
73
72
  children: React.ReactNode;
74
73
  }>) {
75
- const isDev = process.env.NODE_ENV === 'development';
76
-
77
74
  return (
78
75
  <html lang="en">
79
76
  <body
80
77
  className={`${geistSans.variable} ${geistMono.variable} antialiased`}
81
78
  >
82
- {isDev && <Inspector />}
83
79
  {children}
84
80
  </body>
85
81
  </html>
@@ -34,7 +34,7 @@ const config = {
34
34
  // 显式定义默认参数,确保在渲染时可用
35
35
  defaultParams: {
36
36
  port: 5000,
37
- appName: 'my-nextjs-app',
37
+ appName: 'projects',
38
38
  },
39
39
 
40
40
  onBeforeRender: async context => {
@@ -34,7 +34,7 @@ const config = {
34
34
 
35
35
  defaultParams: {
36
36
  port: 6000,
37
- appName: 'app',
37
+ appName: 'projects',
38
38
  },
39
39
 
40
40
  onBeforeRender: async context => {
package/lib/cli.js CHANGED
@@ -1719,7 +1719,7 @@ const registerCommand = program => {
1719
1719
  });
1720
1720
  };
1721
1721
 
1722
- var version = "0.0.1-alpha.1d232d";
1722
+ var version = "0.0.1-alpha.6a5120";
1723
1723
  var packageJson = {
1724
1724
  version: version};
1725
1725
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.1-alpha.1d232d",
3
+ "version": "0.0.1-alpha.6a5120",
4
4
  "private": false,
5
5
  "description": "coze coding devtools cli",
6
6
  "license": "MIT",
@@ -19,7 +19,6 @@
19
19
  "scripts": {
20
20
  "prebuild": "tsx scripts/prebuild.ts",
21
21
  "build": "tsx scripts/build.ts",
22
- "generate-templates": "tsx scripts/generate-templates-config.ts",
23
22
  "lint": "eslint ./ --cache",
24
23
  "postpublish": "bash scripts/sync-npmmirror.sh",
25
24
  "test": "vitest --run --passWithNoTests",
@@ -1,15 +0,0 @@
1
- {
2
- "presets": [
3
- [
4
- "next/babel",
5
- {
6
- "preset-react": {
7
- "development": true
8
- }
9
- }
10
- ]
11
- ],
12
- "plugins": [
13
- "@react-dev-inspector/babel-plugin"
14
- ]
15
- }
@@ -1,50 +0,0 @@
1
- import { createServer } from 'node:http';
2
- import next from 'next';
3
- import { launchEditorMiddleware } from '@react-dev-inspector/middleware';
4
-
5
- const dev = process.env.NODE_ENV !== 'production';
6
- const hostname = process.env.HOSTNAME || 'localhost';
7
- const port = parseInt(process.env.PORT || '3000', 10);
8
-
9
- const app = next({ dev, hostname, port });
10
- const handle = app.getRequestHandler();
11
-
12
- app.prepare().then(() => {
13
- createServer((req, res) => {
14
- /**
15
- * Middlewares, from top to bottom
16
- */
17
- const middlewares = [
18
- /**
19
- * react-dev-inspector middleware for launching editor
20
- * Only active in development mode
21
- */
22
- ...(dev ? [launchEditorMiddleware] : []),
23
-
24
- /**
25
- * Next.js default app handler
26
- */
27
- (req, res) => handle(req, res),
28
- ];
29
-
30
- /**
31
- * Build middleware pipeline using reduceRight
32
- * Executes middlewares from top to bottom
33
- */
34
- const middlewarePipeline = middlewares.reduceRight(
35
- (next, middleware) => () => {
36
- middleware(req, res, next);
37
- },
38
- () => {},
39
- );
40
-
41
- middlewarePipeline();
42
- })
43
- .once('error', (err) => {
44
- console.error(err);
45
- process.exit(1);
46
- })
47
- .listen(port, () => {
48
- console.log(`> Ready on http://${hostname}:${port}`);
49
- });
50
- });