@coze-arch/cli 0.0.1-alpha.a3fb1a → 0.0.1-alpha.c49cb2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coze-arch/cli",
3
- "version": "0.0.1-alpha.a3fb1a",
3
+ "version": "0.0.1-alpha.c49cb2",
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
- });