Skip to content

Commit

Permalink
try flat
Browse files Browse the repository at this point in the history
  • Loading branch information
huangjien committed Sep 12, 2024
1 parent fd751d2 commit 2fe1211
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const webviewConfig = {
...baseConfig,
target: "es2020",
format: "esm",
entryPoints: ["./src/webview/main.ts"],
entryPoints: ["./src/main.ts"],
outfile: "./out/webview.js",
bundle: true,
};
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "jenkins-log-reader",
"displayName": "jenkins-log-reader",
"description": "read jenkins log, analyse with local AI.",
"version": "0.3.31",
"version": "0.3.32",
"engines": {
"vscode": "^1.93.0"
},
Expand Down Expand Up @@ -150,6 +150,7 @@
"watch": "node ./esbuild.js && npx tailwindcss -i ./src/extension.css -o ./out/extension.css --minify",
"prettier": "prettier --write .",
"update-package-lock": "npm install --package-lock-only",
"tsc": "tsc -p ./",
"prepare": "husky"
},
"devDependencies": {
Expand Down
11 changes: 6 additions & 5 deletions src/panels/JenkinsPanel.ts → src/JenkinsPanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ import {
commands,
ProgressLocation,
} from "vscode";
import { getUri } from "../utilities/getUri";
import { getNonce } from "../utilities/getNonce";
import { getUri } from "./getUri";
import { getNonce } from "./getNonce";
import {
digest,
getAllBuild,
getLog,
getAnalysis,
readExistedResult,
} from "../utilities/getInfoFromJenkins";
import "../extension.css";
} from "./getInfoFromJenkins";
import "./extension.css";
import JenkinsSettings from "./JenkinsSettings";
import * as fs from "fs";
// import * as path from "path";
Expand Down Expand Up @@ -66,7 +66,8 @@ export class JenkinsPanel {
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src ${webview.cspSource} https:; style-src ${webview.cspSource}; script-src 'nonce-${nonce}'; style-src-elem ${webview.cspSource} 'unsafe-inline'; font-src ${webview.cspSource}">
<link rel="stylesheet" href="./extension.css">
<link href="https://unpkg.com/tailwindcss@^3.4.10/dist/tailwind.min.css" rel="stylesheet">
<link rel="stylesheet" href="${stylesUri}">
<title>Jenkins Logs Analysis</title>
</head>
<body>
Expand Down
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ExtensionContext, window, commands, ViewColumn, workspace } from "vscode";
import { JenkinsPanel } from "./panels/JenkinsPanel";
import JenkinsSettings from "./panels/JenkinsSettings";
import { JenkinsPanel } from "./JenkinsPanel";
import JenkinsSettings from "./JenkinsSettings";
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
import { LogReaderResultWebViewProvider } from "./providers/LogReaderResultWebViewProvider";
import { LogReaderResultWebViewProvider } from "./LogReaderResultWebViewProvider";

export function activate(context: ExtensionContext) {
const storagePath = context.globalStorageUri.fsPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from "axios";
import OpenAI from "openai";
import * as fs from "fs";
import { createHash } from "crypto";
import { JenkinsPanel } from "../panels/JenkinsPanel";
import { JenkinsPanel } from "./JenkinsPanel";

type Build = {
url: string;
Expand Down
File renamed without changes.
File renamed without changes.
9 changes: 0 additions & 9 deletions src/webview/main.ts → src/main.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
import {
provideVSCodeDesignSystem,
Button,
Dropdown,
DataGrid,
Checkbox,
Radio,
RadioGroup,
DataGridCell,
DataGridRow,
ProgressRing,
Divider,
TextField,
vsCodeButton,
vsCodeDropdown,
vsCodeDivider,
Expand All @@ -19,16 +13,13 @@ import {
vsCodeDataGrid,
vsCodeDataGridRow,
vsCodeDataGridCell,
vsCodeLink,
vsCodeCheckbox,
vsCodeRadioGroup,
vsCodeRadio,
vsCodePanelTab,
vsCodeTextField,
vsCodeProgressRing,
TextArea,
} from "@vscode/webview-ui-toolkit";
import * as fs from "fs";

// In order to use the Webview UI Toolkit web components they
// must be registered with the browser (i.e. webview) using the
Expand Down

0 comments on commit 2fe1211

Please sign in to comment.