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
20 changes: 0 additions & 20 deletions .github/workflows/post-release.yml

This file was deleted.

4 changes: 2 additions & 2 deletions docs/bun.lock

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

2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@radix-ui/react-separator": "1.1.7",
"@radix-ui/react-slot": "1.2.3",
"@radix-ui/react-tooltip": "1.2.7",
"blade": "3.29.6",
"blade": "3.29.8",
"@tabler/icons-react": "3.34.0",
"class-variance-authority": "0.7.1",
"clsx": "2.1.1",
Expand Down
10 changes: 2 additions & 8 deletions packages/blade-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# RONIN CLI
# Blade CLI

[![tests](https://img.shields.io/github/actions/workflow/status/ronin-co/cli/validate.yml?label=tests)](https://github.com/ronin-co/cli/actions/workflows/validate.yml)
[![code coverage](https://img.shields.io/codecov/c/github/ronin-co/cli)](https://codecov.io/github/ronin-co/cli)
[![install size](https://packagephobia.com/badge?p=blade-cli)](https://packagephobia.com/result?p=blade-cli)

This package exposes the `blade` command, which you can run from your terminal to interact with [RONIN](https://ronin.co).

## Setup

You don't need to install this package explicitly, as it is already included in the [RONIN client](https://github.com/ronin-co/client).

However, we would be excited to welcome your feature suggestions or bug fixes for the RONIN CLI. Read on to learn more about how to suggest changes.
This package exposes the `blade` command.

## Contributing

Expand Down
28 changes: 1 addition & 27 deletions packages/blade-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,7 @@
[![code coverage](https://img.shields.io/codecov/c/github/ronin-co/client)](https://codecov.io/github/ronin-co/client)
[![install size](https://packagephobia.com/badge?p=blade-client)](https://packagephobia.com/result?p=blade-client)

This package allows for querying data from [RONIN](https://ronin.co) with ease.

## Setup

First, install the [package](https://www.npmjs.com/package/blade-client) with a package manager of your choice:

```bash
# Bun
bun add blade-client

# npm
npm install blade-client
```

Next, create a new app token on the [RONIN dashboard](http://ronin.co) (under "Apps" in the sidebar), and add it as a environment variable named `RONIN_TOKEN` to your project.

Afterward, you can start invoking RONIN from anywhere in your code:

```typescript
import { get } from 'blade-client';

const posts = await get.posts();
```

That's it! 🎉

You can now start inserting records with the [RONIN query syntax](https://ronin.co/docs/queries), or add them on the [RONIN dashboard](http://ronin.co). Everything you can do with the RONIN client, you can also do on the dashboard (creating records, retrieving them, filtering them, updating them, etc).
This package allows for querying data with ease.

## Contributing

Expand Down
1 change: 0 additions & 1 deletion packages/blade-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"author": "ronin",
"license": "Apache-2.0",
"repository": "ronin-co/client",
"homepage": "https://ronin.co/docs/typescript-client",
"engines": {
"node": ">=18.17.0"
},
Expand Down
32 changes: 16 additions & 16 deletions packages/blade-client/tests/integration/triggers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ describe('triggers', () => {
accounts: {
with: {
email: {
endingWith: 'ronin.co',
endingWith: 'example.com',
},
},
},
Expand Down Expand Up @@ -53,7 +53,7 @@ describe('triggers', () => {
if (multipleRecords) {
query.with = {
email: {
endingWith: '@ronin.co',
endingWith: '@example.com',
},
};
} else {
Expand Down Expand Up @@ -87,10 +87,10 @@ describe('triggers', () => {

await factory.get.accounts();
// Make sure the email address of all resolved accounts ends with the
// `@ronin.co` domain name.
// `@example.com` domain name.
expect(mockStatements?.[0]).toMatchObject({
sql: 'SELECT "id", "ronin.createdAt", "ronin.createdBy", "ronin.updatedAt", "ronin.updatedBy", "handle", "email" FROM "accounts" WHERE "email" LIKE ?1',
params: ['%@ronin.co'],
params: ['%@example.com'],
});
});

Expand Down Expand Up @@ -139,7 +139,7 @@ describe('triggers', () => {
if (multipleRecords) {
query.with = {
email: {
endingWith: '@ronin.co',
endingWith: '@example.com',
},
};
} else {
Expand Down Expand Up @@ -173,14 +173,14 @@ describe('triggers', () => {
});

await factory.get.accounts.with({
email: { endingWith: '@ronin.co' },
email: { endingWith: '@example.com' },
});

// Make sure the email address of all resolved accounts ends with the
// `@ronin.co` domain name.
// `@example.com` domain name.
expect(mockStatements?.[0]).toMatchObject({
sql: 'SELECT "id", "ronin.createdAt", "ronin.createdBy", "ronin.updatedAt", "ronin.updatedBy", "handle", "email" FROM "accounts" WHERE "email" LIKE ?1',
params: ['%@ronin.co'],
params: ['%@example.com'],
});
});

Expand Down Expand Up @@ -537,21 +537,21 @@ describe('triggers', () => {
'ronin.createdBy': '1234',
'ronin.updatedAt': '2024-04-16T15:02:12.710Z',
'ronin.updatedBy': '1234',
email: 'prev@ronin.co',
email: 'prev@example.com',
},
{
id: '2',
'ronin.createdAt': '2024-04-16T15:02:12.710Z',
'ronin.createdBy': '1234',
'ronin.updatedAt': '2024-04-16T15:02:12.710Z',
'ronin.updatedBy': '1234',
email: 'prev@ronin.co',
email: 'prev@example.com',
},
];

const nextAccounts = previousAccounts.map((account) => ({
...account,
email: 'test@ronin.co',
email: 'test@example.com',
}));

const { set } = createSyntaxFactory({
Expand Down Expand Up @@ -581,26 +581,26 @@ describe('triggers', () => {
const accounts = (await set.accounts({
with: {
email: {
endingWith: '@ronin.co',
endingWith: '@example.com',
},
},
to: {
email: 'test@ronin.co',
email: 'test@example.com',
},
})) as unknown as Array<Record<string, unknown>>;

// Make sure all accounts were updated successfully.
expect(accounts.every(({ email }) => email === 'test@ronin.co')).toBe(true);
expect(accounts.every(({ email }) => email === 'test@example.com')).toBe(true);

// Make sure `finalQuery` matches the initial query.
expect(finalQuery).toMatchObject({
with: {
email: {
endingWith: '@ronin.co',
endingWith: '@example.com',
},
},
to: {
email: 'test@ronin.co',
email: 'test@example.com',
},
});

Expand Down
10 changes: 2 additions & 8 deletions packages/blade-compiler/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# RONIN Compiler
# Blade Compiler

[![tests](https://img.shields.io/github/actions/workflow/status/ronin-co/compiler/validate.yml?label=tests)](https://github.com/ronin-co/compiler/actions/workflows/validate.yml)
[![code coverage](https://img.shields.io/codecov/c/github/ronin-co/compiler)](https://codecov.io/github/ronin-co/compiler)
[![install size](https://packagephobia.com/badge?p=blade-compiler)](https://packagephobia.com/result?p=blade-compiler)

This package compiles [RONIN queries](https://ronin.co/docs/queries) to [SQLite](https://www.sqlite.org) statements.

## Setup

You don't need to install this package explicitly, as it is already included in the [RONIN client](https://github.com/ronin-co/client).

However, we would be excited to welcome your feature suggestions or bug fixes for the RONIN compiler. Read on to learn more about how to suggest changes.
This package compiles [Blade queries](https://blade.im/queries) to [SQLite](https://www.sqlite.org) statements.

## Contributing

Expand Down
10 changes: 2 additions & 8 deletions packages/blade-syntax/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# RONIN Syntax
# Blade Syntax

[![tests](https://img.shields.io/github/actions/workflow/status/ronin-co/syntax/validate.yml?label=tests)](https://github.com/ronin-co/syntax/actions/workflows/validate.yml)
[![code coverage](https://img.shields.io/codecov/c/github/ronin-co/syntax)](https://codecov.io/github/ronin-co/syntax)
[![install size](https://packagephobia.com/badge?p=blade-syntax)](https://packagephobia.com/result?p=blade-syntax)

This package makes it possible to define [RONIN](https://ronin.co) queries and schemas in TypeScript code.

## Setup

You don't need to install this package explicitly, as it is already included in the [RONIN client](https://github.com/ronin-co/client).

However, we would be excited to welcome your feature suggestions or bug fixes for the RONIN schema. Read on to learn more about how to suggest changes.
This package makes it possible to define [Blade](https://blade.im) queries and schemas in TypeScript code.

## Contributing

Expand Down
4 changes: 0 additions & 4 deletions packages/blade/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ A [React](https://react.dev) framework for building instant web apps.
- **Automatic REST API** (Blade auto-generates a REST API at `/api` for you, for models that you want to expose)
- **Zero Config Deployments** (Vercel, Cloudflare, containers, and more)

Blade works most efficiently when using SQLite databases provided by [RONIN](https://ronin.co). You can also use any other data source, however you will see performance drawbacks if that data source isn't globally fast (replicated).

The first and currently largest known implementation of Blade is the UI of [RONIN](https://ronin.co), which has been implemented with Blade since its inception.

## Considerations

Blade purposefully does not (and likely won't ever) comply with the official specification for React Server Components, because it provides different solutions to the problems that RSC aims to solve.
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/private/server/worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ app.use('*', secureHeaders({ xFrameOptions: false }));
app.use('*', async (c, next) => {
const requestURL = new URL(c.req.url);

// - `requestOrigin` might be `https://ronin.co`
// - `requestOrigin` might be `https://example.com`
// - `requestPath` might be `/account/settings`
const { origin: requestOrigin, pathname: requestPath } = requestURL;

Expand Down
4 changes: 2 additions & 2 deletions packages/create-blade/templates/advanced/bun.lock

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

2 changes: 1 addition & 1 deletion packages/create-blade/templates/advanced/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"author": "ronin",
"dependencies": {
"blade": "3.29.6",
"blade": "3.29.8",
"react": "19.2.0",
"react-dom": "19.2.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/create-blade/templates/basic/bun.lock

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

2 changes: 1 addition & 1 deletion packages/create-blade/templates/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"author": "ronin",
"dependencies": {
"blade": "3.29.6",
"blade": "3.29.8",
"react": "19.2.0",
"react-dom": "19.2.0"
},
Expand Down
Loading