Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .devcontainer/Dockerfile

This file was deleted.

9 changes: 9 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"features": {
"ghcr.io/devcontainers/features/node:2": {
"version": "2.1.0",
"resolved": "ghcr.io/devcontainers/features/node@sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857",
"integrity": "sha256:586c9a6f7dd40bd3ba2cd41e7f2f88dcc31fbe5d1442afcbf07ffbc66b686857"
}
}
}
24 changes: 8 additions & 16 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,14 @@
// README at: https://github.com/devcontainers/templates/tree/main/src/typescript-node
{
"name": "PasswordGeneratorExtension",
"build": {
"dockerfile": "Dockerfile"
},

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"dbaeumer.vscode-eslint",
"github.vscode-github-actions",
"GitHub.vscode-pull-request-github",
"bierner.github-markdown-preview",
"mrmlnc.vscode-scss",
"Gruntfuggly.todo-tree",
"redhat.vscode-yaml"
]
"image": "mcr.microsoft.com/devcontainers/base:resolute",
"features": {
"ghcr.io/devcontainers/features/node:2": {
"nodeGypDependencies": true,
"version": "latest",
"npmVersion": "latest",
"pnpmVersion": "none",
"nvmVersion": "latest"
}
},

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cd_pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
with:
name: chrome

- uses: wdzeng/chrome-extension@v1.3.0
- uses: wdzeng/chrome-extension@v2.0.1
with:
extension-id: jnjobgjobffgmgfnkpkjfjkkfhfikmfl
zip-path: password-generator-*-chrome.zip
Expand All @@ -119,7 +119,7 @@ jobs:
with:
name: chrome

- uses: wdzeng/edge-addon@v2.1.0
- uses: wdzeng/edge-addon@v2.1.1
with:
product-id: ${{ secrets.EDGE_PRODUCT_ID }}
zip-path: password-generator-*-chrome.zip
Expand All @@ -136,7 +136,7 @@ jobs:
with:
name: firefox

- uses: wdzeng/firefox-addon@v1.2.0
- uses: wdzeng/firefox-addon@v1.2.1
with:
addon-guid: ${{ secrets.FIREFOX_EXT_UUID }}
xpi-path: password-generator-*-firefox.zip
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@main

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr_next.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
extver=`jq -r ".version" package.json`
echo "version=$extver" >> "$GITHUB_OUTPUT"

- uses: dev-build-deploy/release-me@v0.18.2
- uses: dev-build-deploy/release-me@v1.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
prefix: v
Expand Down
11 changes: 0 additions & 11 deletions .vscode/extensions.json

This file was deleted.

7 changes: 3 additions & 4 deletions entrypoints/advanced/components/GeneratorForm.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Button, Input, InputOnChangeData, MessageBar, MessageBarBody, MessageBarTitle, Text, Toast, ToastTitle, useToastController } from "@fluentui/react-components";
import { Button, Input, type InputOnChangeData, MessageBar, MessageBarBody, MessageBarTitle, Text, Toast, ToastTitle, useToastController } from "@fluentui/react-components";
import { bundleIcon, Key24Regular, Save20Filled, Save20Regular } from "@fluentui/react-icons";
import { PropsWithChildren, ReactElement } from "react";
import { useStyles } from "./GeneratorForm.styles";

export default function GeneratorForm(props: GeneratorFormProps): ReactElement
export default function GeneratorForm(props: GeneratorFormProps): React.ReactElement
{
const [passwordCount, private_setPasswordCount] = useState<number | null>(5);
const [error, setError] = useState<string | null>(null);
Expand Down Expand Up @@ -84,7 +83,7 @@ export default function GeneratorForm(props: GeneratorFormProps): ReactElement
);
}

export type GeneratorFormProps = PropsWithChildren &
export type GeneratorFormProps = React.PropsWithChildren &
{
onSave: () => void;
onGenerate: (count: number) => void;
Expand Down
23 changes: 12 additions & 11 deletions entrypoints/advanced/sections/PassphraseSection.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import generatePassphrase, { PassphraseProps } from "@/utils/generators/generatePassphrase";
import generatePassphrase, { type PassphraseProps } from "@/utils/generators/generatePassphrase";
import infoLabel from "@/utils/infoLabel";
import { Checkbox, Field, Input, InputOnChangeData } from "@fluentui/react-components";
import { ReactElement } from "react";
import { Checkbox, Field, Input, type InputOnChangeData } from "@fluentui/react-components";
import GeneratorForm from "../components/GeneratorForm";
import { GeneratorProps } from "../Page";
import { type GeneratorProps } from "../Page";
import { useStyles } from "./PassphraseSection.styles";

export default function PassphraseSection(props: GeneratorProps): ReactElement
export default function PassphraseSection(props: GeneratorProps): React.ReactElement
{
const [wordCount, private_setWordCount] = useState<number | null>(2);
const [swapCharacters, setSwapCharacters] = useState<boolean>(false);
Expand Down Expand Up @@ -53,12 +52,14 @@ export default function PassphraseSection(props: GeneratorProps): ReactElement
if (!AdvancedPassphraseOptions)
return;

private_setWordCount(AdvancedPassphraseOptions.wordCount ?? 2);
setAllowRepeating(AdvancedPassphraseOptions.allowRepeating);
setSwapCharacters(AdvancedPassphraseOptions.swapCharacters);
setRandomizeCase(AdvancedPassphraseOptions.randomizeCase);
setSeparate(!!AdvancedPassphraseOptions.separator);
setSeparator(AdvancedPassphraseOptions.separator ?? "");
const options: PassphraseProps = AdvancedPassphraseOptions as PassphraseProps;

private_setWordCount(options.wordCount ?? 2);
setAllowRepeating(options.allowRepeating);
setSwapCharacters(options.swapCharacters);
setRandomizeCase(options.randomizeCase);
setSeparate(!!options.separator);
setSeparator(options.separator ?? "");
});
}, []);

Expand Down
9 changes: 4 additions & 5 deletions entrypoints/advanced/sections/PasswordSection.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import { DEFAULT_PASSWORD_LENGTH, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH } from "@/utils/constants";
import { CharacterHints, generatePassword } from "@/utils/generators/generatePassword";
import infoLabel from "@/utils/infoLabel";
import * as fui from "@fluentui/react-components";
import { ReactElement } from "react";
import { GeneratorProps } from "../Page";
import { type GeneratorProps } from "../Page";
import GeneratorForm from "../components/GeneratorForm";
import { DEFAULT_PASSWORD_LENGTH, MAX_PASSWORD_LENGTH, MIN_PASSWORD_LENGTH } from "@/utils/constants";

// TODO: needs refactoring
export default function PasswordSection(props: GeneratorProps): ReactElement
export default function PasswordSection(props: GeneratorProps): React.ReactElement
{
const [state, private_setState] = useState<PasswordSectionState>({
length: DEFAULT_PASSWORD_LENGTH,
Expand Down Expand Up @@ -199,7 +198,7 @@ function parseCount(value: string): number | null
return isNaN(n) || n < 1 ? null : Math.min(n, 100);
};

function Row(props: { children: ReactElement[]; }): ReactElement
function Row(props: { children: React.ReactElement[]; }): React.ReactElement
{
return (
<fui.TableRow as="div">
Expand Down
6 changes: 3 additions & 3 deletions entrypoints/options/main.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Tab, TabList } from "@fluentui/react-components";
import { bundleIcon, FluentIcon, Info20Filled, Info20Regular, Settings20Filled, Settings20Regular } from "@fluentui/react-icons";
import { ReactElement, StrictMode } from "react";
import { bundleIcon, type FluentIcon, Info20Filled, Info20Regular, Settings20Filled, Settings20Regular } from "@fluentui/react-icons";
import { StrictMode } from "react";
import ReactDOM from "react-dom/client";
import App from "../../shared/App";
import AboutSection from "./AboutSection";
import "./main.css";
import SettingsSection from "./SettingsSection";

function Options(): ReactElement
function Options(): React.ReactElement
{
const [selection, setSelection] = useState<string>("settings");

Expand Down
2 changes: 1 addition & 1 deletion entrypoints/popup/main.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GeneratorOptions } from "@/utils/storage";
import { Button, Divider, makeStyles, tokens, Tooltip } from "@fluentui/react-components";
import { bundleIcon, FluentIcon, Open20Filled, Open20Regular, Settings20Filled, Settings20Regular } from "@fluentui/react-icons";
import { bundleIcon, type FluentIcon, Open20Filled, Open20Regular, Settings20Filled, Settings20Regular } from "@fluentui/react-icons";
import React from "react";
import ReactDOM from "react-dom/client";
import App from "../../shared/App";
Expand Down
2 changes: 0 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import jsConfigs from "@eslint/js";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import tsParser from "@typescript-eslint/parser";
import reactPlugin from "eslint-plugin-react";
import globals from "globals";
import autoImports from "./.wxt/eslint-auto-imports.mjs";

export default [
autoImports,
jsConfigs.configs.recommended,
reactPlugin.configs.flat.recommended,
{
ignores: [".wxt/", ".output/"],
},
Expand Down
Loading
Loading