Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Auth plugins #155

Merged
merged 17 commits into from
Jan 17, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into auth-plugins
# Conflicts:
#	src-tauri/src/template_callback.rs
#	src-tauri/yaak-plugins/src/events.rs
#	src-tauri/yaak_plugin_runtime/src/handle.rs
gschier committed Jan 15, 2025
commit 81e932ebbf21bf66f4dc8c4d50f303011b9f8f65
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
dist/
.prettierrc.cjs
.eslintrc.cjs
env.d.ts
.prettierrc.cjs
src-web/postcss.config.cjs
src-web/vite.config.ts
10 changes: 6 additions & 4 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -8,17 +8,18 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'eslint-config-prettier',
],
plugins: ['react-refresh'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: ['./tsconfig.json'],
},
ignorePatterns: [
'scripts/**/*',
'plugin-runtime/**/*',
'plugin-runtime-types/**/*',
'packages/plugin-runtime/**/*',
'packages/plugin-runtime-types/**/*',
'src-tauri/**/*',
'plugins/**/*',
'tailwind.config.cjs',
'src-web/tailwind.config.cjs',
'src-web/vite.config.ts',
],
settings: {
react: {
@@ -32,6 +33,7 @@ module.exports = {
},
},
rules: {
'react-refresh/only-export-components': 'error',
'jsx-a11y/no-autofocus': 'off',
'react/react-in-jsx-scope': 'off',
'import/no-unresolved': 'off',
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src-tauri/vendored/**/* linguist-generated=true
src-tauri/gen/schemas/**/* linguist-generated=true
45 changes: 0 additions & 45 deletions .github/ISSUE_TEMPLATE/bug-report.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request, Question, etc.
- name: Bugs, Feedback, Feature Requests, and Questions
url: https://feedback.yaak.app
about: Report all non-bugs to the feedback board 👉🏼
about: "Please report to Yaak's public feedback board. Issues will be created and linked here when applicable."
59 changes: 33 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -16,31 +16,28 @@ jobs:
fail-fast: false
matrix:
include:
- platform: 'macos-latest' # for Arm-based macs (M1 and above).
- platform: 'macos-latest' # for Arm-based Macs (M1 and above).
args: '--target aarch64-apple-darwin'
yaak_arch: 'arm64'
- platform: 'macos-latest' # for Intel-based macs.
- platform: 'macos-latest' # for Intel-based Macs.
args: '--target x86_64-apple-darwin'
yaak_arch: 'x64'
- platform: 'ubuntu-22.04' # for Tauri v1, you could replace this with ubuntu-20.04.
- platform: 'ubuntu-22.04'
args: ''
yaak_arch: 'x64'
- platform: 'windows-latest'
args: ''
yaak_arch: 'x64'
runs-on: ${{ matrix.platform }}
timeout-minutes: 40
steps:
- name: Checkout yaakapp/app
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- uses: actions/setup-go@v5
with:
go-version: '1.22'
node-version: 22

- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
@@ -56,7 +53,7 @@ jobs:
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
src-tauri/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

@@ -66,24 +63,22 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf

- name: Install Node dependencies
run: |
npm ci
- name: install dependencies (windows only)
if: matrix.platform == 'windows-latest'
run: cargo install --force trusted-signing-cli

- name: Install plugin-runtime Node dependencies
working-directory: plugin-runtime
- name: Install NPM Dependencies
run: |
npm ci
npm install @yaakapp/cli

- name: Install Protoc for plugin-runtime
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install yaak CLI
run: |
npm install -g @yaakapp/cli
yaakcli --version
- name: Run JS build
run: npm run build

- name: Run lint
run: npm run lint
@@ -103,20 +98,32 @@ jobs:
env:
YAAK_PLUGINS_DIR: ${{ env.YAAK_PLUGINS_DIR }}
YAAK_TARGET_ARCH: ${{ matrix.yaak_arch }}

ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
ENABLE_CODE_SIGNING: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}

# Apple signing stuff
APPLE_CERTIFICATE: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE }}
APPLE_CERTIFICATE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_CERTIFICATE_PASSWORD }}
APPLE_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_PASSWORD }}
APPLE_SIGNING_IDENTITY: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_SIGNING_IDENTITY }}
APPLE_TEAM_ID: ${{ matrix.platform == 'macos-latest' && secrets.APPLE_TEAM_ID }}

# Windows signing stuff
AZURE_CLIENT_ID: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_CLIENT_ID }}
AZURE_CLIENT_SECRET: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_CLIENT_SECRET }}
AZURE_TENANT_ID: ${{ matrix.platform == 'windows-latest' && secrets.AZURE_TENANT_ID }}
with:
tagName: 'v__VERSION__'
releaseName: 'Release __VERSION__'
releaseBody: 'https://yaak.app/blog/__VERSION__'
releaseBody: |
> [!IMPORTANT]
> The Yaak project is open source. However, to fund development, these pre-built binaries require a license for commercial use. Please see the [Pricing Page](https://yaak.app/pricing) for more details.

You can view the full release notes here → https://yaak.app/blog/2024.13.0
releaseDraft: true
prerelease: false
args: ${{ matrix.args }}
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

5 changes: 0 additions & 5 deletions .sqllsrc.json

This file was deleted.

62 changes: 62 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Developer Setup

Yaak is a combined Node.js and Rust monorepo. It is a [Tauri](https://tauri.app) project, so
uses Rust and HTML/CSS/JS for the main application but there is also a plugin system powered
by a Node.js sidecar that communicates to the app over gRPC.

Because of the moving parts, there are a few setup steps required before development can
begin.

## Prerequisites

Make sure you have the following tools installed:

- [Node.js](https://nodejs.org/en/download/package-manager)
- [Rust](https://www.rust-lang.org/tools/install)

Check the installations with the following commands:

```shell
node -v
npm -v
rustc --version
```

Install the NPM dependencies:

```shell
npm install
```

Run the `bootstrap` command to do some initial setup:

```shell
npm run bootstrap
```

_NOTE: Run with `YAAK_PLUGINS_DIR=<Path to yaakapp/plugins>` to re-build bundled plugins_

## Run the App

After bootstrapping, start the app in development mode:

```shell
npm start
```

_NOTE: If working on bundled plugins, run with `YAAK_PLUGINS_DIR=<Path to yaakapp/plugins>`_

## SQLite Migrations

New migrations can be created from the `src-tauri/` directory:

```shell
cd src-tauri
sqlx migrate add migration-name
```

Run the app to apply the migrations.

If nothing happens, try `cargo clean` and run the app again.

_Note: Development builds use a separate database location from production builds._
13 changes: 0 additions & 13 deletions Makefile

This file was deleted.

26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
# Yaak API Client

Yaak is a desktop API client for organizing and executing REST, GraphQL, and gRPC
requests. It's built using [Tauri](https://tauri.app), [Rust](https://www.rust-lang.org), and [ReactJS](https://react.dev).
requests. It's built using [Tauri](https://tauri.app), Rust, and ReactJS.

![screenshot](https://github.com/user-attachments/assets/f18e963f-0b68-4ecb-b8b8-cb71aa9aec02)


## Feedback and Bug Reports

Please [Create an Issue](https://github.com/yaakapp/app/issues/new) for bug reports and
submit all other feedback to [feedback.yaak.app](https://feedback.yaak.app).
All feedback, bug reports, questions, and feature requests should be reported to
[feedback.yaak.app](https://feedback.yaak.app). Issues will be duplicated
in this repository if applicable.

## Contribution Policy
## Community Projects

Yaak was initially closed-source, with no plan of ever becoming open
(see [Blog Post](https://yaak.app/blog/why-not-open-source)). However, Open source does
offer many benefits:
- [`yaak2postman`](https://github.com/BiteCraft/yaak2postman) CLI for converting Yaak data
exports to Postman-compatible collections

## Contribution Policy

- Full transparency over what is happening
- Code can be audited
- Users can help identify and fix bugs
Yaak is open source, but only accepting contributions for bug fixes. See the
[`good first issue`](https://github.com/yaakapp/app/labels/good%20first%20issue) label for
issues that are more approachable for contribution.

For these reasons, Yaak is now open source but only accepting contributions for bug fixes.
To get started, visit [`DEVELOPMENT.md`](DEVELOPMENT.md) for tips on setting up your
environment.
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.