@xdevops/issue-auto-finish 1.0.7 → 1.0.8
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/cli/commands/init.d.ts.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/{init-G4JOLOGK.js → init-YMWYE6XB.js} +8 -3
- package/dist/init-YMWYE6XB.js.map +1 -0
- package/package.json +1 -1
- package/src/web/frontend/dist/assets/{index-DfmC7aW5.js → index-DAtwReKV.js} +18 -18
- package/src/web/frontend/dist/index.html +1 -1
- package/dist/init-G4JOLOGK.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
6
|
<title>Issue Auto-Finish Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-DAtwReKV.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-DbfGH6xE.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body class="bg-gray-50 min-h-screen">
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/cli/commands/init.ts"],"sourcesContent":["import express from 'express';\nimport fs from 'node:fs';\nimport path from 'node:path';\nimport { fileURLToPath } from 'node:url';\nimport { createSetupRouter } from '../../web/routes/setup.js';\n\nconst __dirname = path.dirname(fileURLToPath(import.meta.url));\n\nexport interface InitOptions {\n port: number;\n config?: string;\n}\n\nexport async function initCommand(options: InitOptions): Promise<void> {\n const app = express();\n app.use(express.json());\n\n let serverRef: ReturnType<typeof app.listen> | null = null;\n\n const setupRouter = createSetupRouter({\n configPath: options.config,\n onComplete: (configPath) => {\n console.log(`\\n Configuration saved to: ${configPath}`);\n console.log(' Run \"issue-auto-finish start\" to start the service.\\n');\n setTimeout(() => {\n serverRef?.close();\n process.exit(0);\n }, 1000);\n },\n });\n\n app.use(setupRouter);\n\n const packageRoot = path.resolve(__dirname, '..');\n const publicDir = path.resolve(packageRoot, 'src/web/frontend/dist');\n\n if (fs.existsSync(publicDir)) {\n app.use(express.static(publicDir));\n app.get('{*path}', (_req, res) => {\n res.sendFile(path.join(publicDir, 'index.html'));\n });\n } else {\n app.get('/', (_req, res) => {\n res.type('html').send(`<!DOCTYPE html>\n<html><head><title>Issue Auto-Finish Setup</title></head>\n<body style=\"font-family:system-ui;max-width:600px;margin:60px auto;padding:20px\">\n<h1>Issue Auto-Finish Setup</h1>\n<p>Frontend assets not found. Please build the frontend first:</p>\n<pre>cd issue-auto-finish && pnpm web:build</pre>\n<p>Or use the API directly at <code>/api/setup/*</code></p>\n</body></html>`);\n });\n }\n\n serverRef = app.listen(options.port, async () => {\n const url = `http://localhost:${options.port}`;\n console.log(`\\n Issue Auto-Finish Setup Wizard`);\n console.log(` Open: ${url}\\n`);\n\n try {\n const open = (await import('open')).default;\n await open(url);\n } catch {\n // Browser open failed, user can manually navigate\n }\n });\n}\n"],"mappings":";;;;;;;;;;;;AAAA,OAAO,aAAa;AACpB,OAAO,QAAQ;AACf,OAAO,UAAU;AACjB,SAAS,qBAAqB;AAG9B,IAAM,YAAY,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC;AAO7D,eAAsB,YAAY,SAAqC;AACrE,QAAM,MAAM,QAAQ;AACpB,MAAI,IAAI,QAAQ,KAAK,CAAC;AAEtB,MAAI,YAAkD;AAEtD,QAAM,cAAc,kBAAkB;AAAA,IACpC,YAAY,QAAQ;AAAA,IACpB,YAAY,CAAC,eAAe;AAC1B,cAAQ,IAAI;AAAA,4BAA+B,UAAU,EAAE;AACvD,cAAQ,IAAI,yDAAyD;AACrE,iBAAW,MAAM;AACf,mBAAW,MAAM;AACjB,gBAAQ,KAAK,CAAC;AAAA,MAChB,GAAG,GAAI;AAAA,IACT;AAAA,EACF,CAAC;AAED,MAAI,IAAI,WAAW;AAEnB,QAAM,cAAc,KAAK,QAAQ,WAAW,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