Skip to content

Commit

Permalink
Misc improvements (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
macjuul authored Feb 13, 2024
1 parent 82e4daf commit 334388f
Show file tree
Hide file tree
Showing 36 changed files with 257 additions and 191 deletions.
13 changes: 0 additions & 13 deletions .github/FUNDING.yml

This file was deleted.

121 changes: 26 additions & 95 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,53 @@
# Contributor Covenant Code of Conduct
<h1>Contributor Covenant Code of Conduct</h1>

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:
Examples of behaviour that contributes to creating a positive environment include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior include:
Examples of unacceptable behaviour by participants include:

* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* The use of sexualised language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities
## Our Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers are responsible for clarifying the standards of acceptable behaviour and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behaviour.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[email protected]. All complaints will be reviewed and investigated
promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported by contacting the project team at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

### 2. Warning
Code of Conduct violations and associated penalties typically fall into one of the following categories:
- Warning - For first-time, minor violations, the offender will receive a written warning, their account will be noted for future moderation, and the offending content will be removed.
- Suspension - Repeated minor violations and first-time more serious violations may result in the suspension of the account for a period of time at the discretion of the moderators.
- Removal/Ban - Actions that are seriously harmful to individuals in the community or the community as a whole will lead to account removal and a permanent ban from the community.

**Community Impact**: A violation through a single incident or series
of actions.
All actions will be taken on a case-by-case basis at the discretion of the moderators.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
Thank you for helping make this a welcoming and friendly community for everyone!

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within
the community, extending to all Starlane Studios projects.

## Attribution

This Code of Conduct is adapted from the Contributor Covenant,
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4, available [here](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html). For answers to common questions about this code of conduct, see [FAQs](https://www.contributor-covenant.org/faq).
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Before partaking in development on Surrealist we do ask you to read through our
Please follow our [Code of Conduct](CODE_OF_CONDUCT.md) to help keep Surrealist an inclusive space for all.

## Final words
For general questions and discussions, please join our [Starlane Discord Community](https://discord.gg/exaQDX2). We hope you enjoy contributing to the development of Surrealist, and of course thank you for reading!
For general questions and discussions, please join our [Discord](https://discord.gg/surrealdb). We hope you enjoy contributing to the development of Surrealist, and of course thank you for reading!
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2022 Starlane Studios
Copyright 2024 © SurrealDB Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

Expand Down
6 changes: 3 additions & 3 deletions embed/new.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<meta name="theme-color" content="#e600a4" />
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta name="author" content="Starlane Studios">
<meta name="author" content="SurrealDB">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

Expand All @@ -14,11 +14,11 @@
<meta name="description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="twitter:card" content="content">
<meta name="twitter:title" content="Surrealist">
<meta name="twitter:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="twitter:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
<meta name="og:title" content="Surrealist">
<meta name="og:type" content="website">
<meta name="og:description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="og:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="og:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
</head>
<body>
<div id="root"></div>
Expand Down
6 changes: 3 additions & 3 deletions embed/run.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<meta name="theme-color" content="#e600a4" />
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta name="author" content="Starlane Studios">
<meta name="author" content="SurrealDB">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

Expand All @@ -14,11 +14,11 @@
<meta name="description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="twitter:card" content="content">
<meta name="twitter:title" content="Surrealist">
<meta name="twitter:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="twitter:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
<meta name="og:title" content="Surrealist">
<meta name="og:type" content="website">
<meta name="og:description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="og:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="og:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
<meta name="embed">
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8"/>
<meta name="theme-color" content="#e600a4" />
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta name="author" content="Starlane Studios">
<meta name="author" content="SurrealDB Ltd">

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />

Expand All @@ -14,11 +14,11 @@
<meta name="description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="twitter:card" content="content">
<meta name="twitter:title" content="Surrealist">
<meta name="twitter:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="twitter:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
<meta name="og:title" content="Surrealist">
<meta name="og:type" content="website">
<meta name="og:description" content="Powerful graphical SurrealDB query playground and database explorer, available for web and desktop ⚡">
<meta name="og:image" content="https://raw.githubusercontent.com/StarlaneStudios/Surrealist/main/.github/branding/banner.png">
<meta name="og:image" content="https://raw.githubusercontent.com/surrealdb/surrealist/main/.github/branding/banner.png">
</head>
<body>
<div id="root"></div>
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "frontend",
"name": "surrealist",
"private": true,
"version": "1.11.3",
"surreal": "1.0.0",
"type": "module",
"author": "Starlane Studios",
"author": "SurrealDB",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
Expand Down
4 changes: 2 additions & 2 deletions src-embed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "surrealist-embed"
version = "0.0.0"
description = "Embedded functionality for Surrealist"
authors = ["Starlane Studios"]
authors = []
license = "MIT"
repository = "https://github.com/StarlaneStudios/Surrealist"
repository = "https://github.com/surrealdb/surrealist"
edition = "2021"
publish = false

Expand Down
2 changes: 1 addition & 1 deletion src-embed/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use wasm_bindgen::prelude::*;
mod console;
mod query;
mod schema;
mod utils;
mod types;
mod utils;

#[wasm_bindgen]
pub fn initialize_embed() {
Expand Down
8 changes: 4 additions & 4 deletions src-embed/src/query.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use wasm_bindgen::prelude::*;
use surrealdb::sql::Array;
use surrealdb::sql::Object;
use surrealdb::sql::Value;
use once_cell::sync::Lazy;
use regex::Regex;
use serde_wasm_bindgen::{from_value, to_value};
use std::collections::HashMap;
use surrealdb::sql::Array;
use surrealdb::sql::Object;
use surrealdb::sql::Value;
use tokio::sync::RwLock;
use wasm_bindgen::prelude::*;

use surrealdb::{
engine::any::{connect, Any},
Expand Down
4 changes: 2 additions & 2 deletions src-embed/src/schema.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use concat_string::concat_string;
use serde::Serialize;
use serde_wasm_bindgen::to_value;
use wasm_bindgen::prelude::*;
use surrealdb::sql::{
parse, statements::DefineStatement, thing, Index, Permissions, Statement, Strand,
};
use wasm_bindgen::prelude::*;

fn to_response<T: serde::ser::Serialize>(value: &T, name: &str) -> Result<JsValue, String> {
Ok(to_value(value).expect(&concat_string!(name, " should be serializable")))
Expand Down Expand Up @@ -360,4 +360,4 @@ pub fn validate_thing(value: &str) -> bool {
#[wasm_bindgen]
pub fn format_query(value: &str) -> Option<String> {
parse(value).ok().map(|q| q.to_string())
}
}
2 changes: 1 addition & 1 deletion src-embed/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ pub struct SurrealVersion {
pub major: u64,
pub minor: u64,
pub patch: u64,
}
}
2 changes: 1 addition & 1 deletion src-embed/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ pub fn make_error(err: &str) -> Array {
results.push(Value::Object(entry));

results
}
}
2 changes: 2 additions & 0 deletions src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
name = "surrealist"
version = "0.0.0"
description = "Powerful graphical SurrealDB query playground and database explorer for Browser and Desktop"
authors = ["Starlane Studios"]
authors = []
license = "MIT"
repository = "https://github.com/StarlaneStudios/Surrealist"
repository = "https://github.com/surrealdb/surrealist"
edition = "2021"
publish = false

Expand All @@ -16,6 +16,12 @@ tauri = { version = "1.4.1", features = [ "path-all", "dialog-open", "fs-read-fi
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
portpicker = "0.1"

[target.'cfg(target_os = "linux")'.dependencies]
webkit2gtk = "0.18" # if tauri build fails, make sure to match this version to what we have in tauri

[target.'cfg(target_os = "macos")'.dependencies]
objc = "0.2"

[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
Loading

0 comments on commit 334388f

Please sign in to comment.