diff --git a/.github/labeler.yml b/.github/labeler.yml index 66de71e..3f23e55 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -8,13 +8,16 @@ - svelte/* "module: quack": - - src/quack.ts + - src/util/quack.ts "module: telemetry": - - src/analytics.ts + - src/util/analytics.ts -"module: util": - - src/util/* +"module: github": + - src/util/github.ts + +"module: session": + - src/util/session.ts "module: webviews": - src/webviews/* @@ -28,6 +31,7 @@ - tsconfig.json - rollup.config.js - webpack.config.js + - .vscode/* "topic: ci": - .github/* diff --git a/src/extension.ts b/src/extension.ts index 6495427..115cce9 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -11,7 +11,7 @@ import { GuidelineTreeItem, GuidelineTreeProvider, } from "./webviews/guidelineView"; -import analyticsClient from "./analytics"; +import analyticsClient from "./util/analytics"; import { getCurrentRepoName, getSelectionText, @@ -28,7 +28,7 @@ import { ComplianceResult, verifyQuackEndpoint, authenticate, -} from "./quack"; +} from "./util/quack"; function updateContext(context: vscode.ExtensionContext) { const quackToken = context.workspaceState.get( diff --git a/src/analytics.ts b/src/util/analytics.ts similarity index 100% rename from src/analytics.ts rename to src/util/analytics.ts diff --git a/src/util/getNonce.ts b/src/util/getNonce.ts deleted file mode 100644 index 01e3fb1..0000000 --- a/src/util/getNonce.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2023, Quack AI. - -// This program is licensed under the Apache License 2.0. -// See LICENSE or go to for full license details. - -export function getNonce() { - let text = ""; - const possible = - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; - for (let i = 0; i < 32; i++) { - text += possible.charAt(Math.floor(Math.random() * possible.length)); - } - return text; -} diff --git a/src/quack.ts b/src/util/quack.ts similarity index 100% rename from src/quack.ts rename to src/util/quack.ts diff --git a/styles/reset.css b/styles/reset.css deleted file mode 100644 index 0e3b4cf..0000000 --- a/styles/reset.css +++ /dev/null @@ -1,30 +0,0 @@ -html { - box-sizing: border-box; - font-size: 13px; -} - -*, -*:before, -*:after { - box-sizing: inherit; -} - -body, -h1, -h2, -h3, -h4, -h5, -h6, -p, -ol, -ul { - margin: 0; - padding: 0; - font-weight: normal; -} - -img { - max-width: 100%; - height: auto; -} diff --git a/styles/vscode.css b/styles/vscode.css deleted file mode 100644 index 4ea74be..0000000 --- a/styles/vscode.css +++ /dev/null @@ -1,91 +0,0 @@ -:root { - --container-padding: 20px; - --input-padding-vertical: 6px; - --input-padding-horizontal: 4px; - --input-margin-vertical: 4px; - --input-margin-horizontal: 0; -} - -body { - padding: 0 var(--container-padding); - color: var(--vscode-foreground); - font-size: var(--vscode-font-size); - font-weight: var(--vscode-font-weight); - font-family: var(--vscode-font-family); - background-color: var(--vscode-editor-background); -} - -ol, -ul { - padding-left: var(--container-padding); -} - -body > *, -form > * { - margin-block-start: var(--input-margin-vertical); - margin-block-end: var(--input-margin-vertical); -} - -*:focus { - outline-color: var(--vscode-focusBorder) !important; -} - -a { - color: var(--vscode-textLink-foreground); -} - -a:hover, -a:active { - color: var(--vscode-textLink-activeForeground); -} - -code { - font-size: var(--vscode-editor-font-size); - font-family: var(--vscode-editor-font-family); -} - -button { - border: none; - padding: var(--input-padding-vertical) var(--input-padding-horizontal); - width: 100%; - text-align: center; - outline: 1px solid transparent; - outline-offset: 2px !important; - color: var(--vscode-button-foreground); - background: var(--vscode-button-background); -} - -button:hover { - cursor: pointer; - background: var(--vscode-button-hoverBackground); -} - -button:focus { - outline-color: var(--vscode-focusBorder); -} - -button.secondary { - color: var(--vscode-button-secondaryForeground); - background: var(--vscode-button-secondaryBackground); -} - -button.secondary:hover { - background: var(--vscode-button-secondaryHoverBackground); -} - -input:not([type="checkbox"]), -textarea { - display: block; - width: 100%; - border: none; - font-family: var(--vscode-font-family); - padding: var(--input-padding-vertical) var(--input-padding-horizontal); - color: var(--vscode-input-foreground); - outline-color: var(--vscode-input-border); - background-color: var(--vscode-input-background); -} - -input::placeholder, -textarea::placeholder { - color: var(--vscode-input-placeholderForeground); -}