Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "RedwoodGraphQL",
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-20-bullseye",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {}
},
"workspaceFolder": "/workspaces/RedwoodGraphQL",
"forwardPorts": [8910, 8911],
"portsAttributes": {
"8910": {
"label": "RedwoodJS Web",
"onAutoForward": "notify"
},
"8911": {
"label": "RedwoodJS API",
"onAutoForward": "ignore"
}
},
"postCreateCommand": "npm i -g corepack --force && corepack enable"
}
53 changes: 0 additions & 53 deletions .gitpod.yml

This file was deleted.

130 changes: 130 additions & 0 deletions .ona/automations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
services:
dev-server:
name: RedwoodJS Development Server
description: Runs the RedwoodJS development server for both web and api sides
commands:
start: |
# Ensure corepack is enabled in service environment
corepack enable
cd /workspaces/rw-test-app
NODE_ENV=development corepack yarn rw dev
Comment on lines +9 to +10
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Working directory and command reference incorrect project directory. Cedar uses cdr instead of rw command.

Suggested change
cd /workspaces/rw-test-app
NODE_ENV=development corepack yarn rw dev
cd /workspaces/cedar-test-app
NODE_ENV=development corepack yarn cdr dev
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 9:10

Comment:
**logic:** Working directory and command reference incorrect project directory. Cedar uses `cdr` instead of `rw` command.

```suggestion
        cd /workspaces/cedar-test-app
        NODE_ENV=development corepack yarn cdr dev
```

How can I resolve this? If you propose a fix, please make it concise.

tasks:
setup-environment:
name: Setup RedwoodJS Environment
description: Setup RedwoodJS development environment (runs automatically after devcontainer starts)
Comment on lines +14 to +15
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Task references "RedwoodJS" instead of "Cedar"

Suggested change
name: Setup RedwoodJS Environment
description: Setup RedwoodJS development environment (runs automatically after devcontainer starts)
name: Setup Cedar Environment
description: Setup Cedar development environment (runs automatically after devcontainer starts)
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 14:15

Comment:
**logic:** Task references "RedwoodJS" instead of "Cedar"

```suggestion
    name: Setup Cedar Environment
    description: Setup Cedar development environment (runs automatically after devcontainer starts)
```

How can I resolve this? If you propose a fix, please make it concise.

triggeredBy:
- postDevcontainerStart
command: |
export RWFW_PATH="/workspaces/RedwoodGraphQL"
export REDWOOD_DISABLE_TELEMETRY=1
echo "Setting up RedwoodJS development environment..."
mkdir -p /workspaces/rw-test-app
cd /workspaces/RedwoodGraphQL
Comment on lines +19 to +23
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Environment variables and paths reference "RedwoodGraphQL" and "RedwoodJS" instead of "cedar"

Suggested change
export RWFW_PATH="/workspaces/RedwoodGraphQL"
export REDWOOD_DISABLE_TELEMETRY=1
echo "Setting up RedwoodJS development environment..."
mkdir -p /workspaces/rw-test-app
cd /workspaces/RedwoodGraphQL
export RWFW_PATH="/workspaces/cedar"
export REDWOOD_DISABLE_TELEMETRY=1
echo "Setting up Cedar development environment..."
mkdir -p /workspaces/cedar-test-app
cd /workspaces/cedar
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 19:23

Comment:
**logic:** Environment variables and paths reference "RedwoodGraphQL" and "RedwoodJS" instead of "cedar"

```suggestion
      export RWFW_PATH="/workspaces/cedar"
      export REDWOOD_DISABLE_TELEMETRY=1
      echo "Setting up Cedar development environment..."
      mkdir -p /workspaces/cedar-test-app
      cd /workspaces/cedar
```

How can I resolve this? If you propose a fix, please make it concise.

echo "Cleaning up existing symlinks and cache..."
rm -rf node_modules/@redwoodjs
rm -rf node_modules/.cache
rm -f yarn.lock
Comment on lines +25 to +27
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Cleanup references @redwoodjs packages. Should reference @cedarjs.

Suggested change
rm -rf node_modules/@redwoodjs
rm -rf node_modules/.cache
rm -f yarn.lock
echo "Cleaning up existing symlinks and cache..."
rm -rf node_modules/@cedarjs
rm -rf node_modules/.cache
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 25:27

Comment:
**logic:** Cleanup references `@redwoodjs` packages. Should reference `@cedarjs`.

```suggestion
      echo "Cleaning up existing symlinks and cache..."
      rm -rf node_modules/@cedarjs
      rm -rf node_modules/.cache
```

How can I resolve this? If you propose a fix, please make it concise.

corepack yarn cache clean --all 2>/dev/null || true
echo "Installing framework dependencies..."
corepack yarn install
echo "Building test project..."
corepack yarn run build:test-project ../rw-test-app --typescript --link --verbose
cd /workspaces/rw-test-app
sed -i "s/\(open *= *\).*/\1false/" redwood.toml
Comment on lines +32 to +34
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Build command references wrong test app directory and redwood.toml. Cedar uses cedar.toml.

Suggested change
corepack yarn run build:test-project ../rw-test-app --typescript --link --verbose
cd /workspaces/rw-test-app
sed -i "s/\(open *= *\).*/\1false/" redwood.toml
echo "Building test project..."
corepack yarn run build:test-project ../cedar-test-app --typescript --link --verbose
cd /workspaces/cedar-test-app
sed -i "s/\(open *= *\).*/\1false/" cedar.toml
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 32:34

Comment:
**logic:** Build command references wrong test app directory and `redwood.toml`. Cedar uses `cedar.toml`.

```suggestion
      echo "Building test project..."
      corepack yarn run build:test-project ../cedar-test-app --typescript --link --verbose
      cd /workspaces/cedar-test-app
      sed -i "s/\(open *= *\).*/\1false/" cedar.toml
```

How can I resolve this? If you propose a fix, please make it concise.

echo -e "\n\n\033[94m ======================================================\n\033[33m ⌛ RedwoodJS development environment is ready!\n Test app \"rw-test-app\" has been generated & linked with framework code.\n\n If you make changes to the framework:\n 1. \033[33mEnsure env vars are set \033[92mexport RWFW_PATH=\"/workspaces/RedwoodGraphQL\"\033[33m\n 2. \033[33mRun \033[92mcorepack yarn rwfw project:sync\033[33m to sync changes\n 3. \033[33mOr use the \033[92mSync Framework Changes\033[33m task from Ona dashboard\n\033[94m ======================================================\n\n"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Echo message references "RedwoodJS" and incorrect paths. Should reference "Cedar" and correct workspace paths.

Suggested change
echo -e "\n\n\033[94m ======================================================\n\033[33m ⌛ RedwoodJS development environment is ready!\n Test app \"rw-test-app\" has been generated & linked with framework code.\n\n If you make changes to the framework:\n 1. \033[33mEnsure env vars are set \033[92mexport RWFW_PATH=\"/workspaces/RedwoodGraphQL\"\033[33m\n 2. \033[33mRun \033[92mcorepack yarn rwfw project:sync\033[33m to sync changes\n 3. \033[33mOr use the \033[92mSync Framework Changes\033[33m task from Ona dashboard\n\033[94m ======================================================\n\n"
echo -e "\n\n\033[94m ======================================================\n\033[33m ⌛ Cedar development environment is ready!\n Test app \"cedar-test-app\" has been generated & linked with framework code.\n\n If you make changes to the framework:\n 1. \033[33mEnsure env vars are set \033[92mexport RWFW_PATH=\"/workspaces/cedar\"\033[33m\n 2. \033[33mRun \033[92mcorepack yarn rwfw project:sync\033[33m to sync changes\n 3. \033[33mOr use the \033[92mSync Framework Changes\033[33m task from Ona dashboard\n\033[94m ======================================================\n\n"
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 35:35

Comment:
**logic:** Echo message references "RedwoodJS" and incorrect paths. Should reference "Cedar" and correct workspace paths.

```suggestion
      echo -e "\n\n\033[94m ======================================================\n\033[33m ⌛ Cedar development environment is ready!\n Test app \"cedar-test-app\" has been generated & linked with framework code.\n\n If you make changes to the framework:\n 1. \033[33mEnsure env vars are set \033[92mexport RWFW_PATH=\"/workspaces/cedar\"\033[33m\n 2. \033[33mRun \033[92mcorepack yarn rwfw project:sync\033[33m to sync changes\n 3. \033[33mOr use the \033[92mSync Framework Changes\033[33m task from Ona dashboard\n\033[94m ======================================================\n\n"
```

How can I resolve this? If you propose a fix, please make it concise.

# Open ports for RedwoodJS development servers
echo "Opening ports for development servers..."
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https
echo "✅ Ports 8910 (Web) and 8911 (API) are now open with HTTPS"
Comment on lines +38 to +40
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Port names reference "RedwoodJS" instead of "Cedar"

Suggested change
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https
echo "✅ Ports 8910 (Web) and 8911 (API) are now open with HTTPS"
echo "Opening ports for development servers..."
gitpod environment port open 8910 --name "Cedar Web Server" --protocol https
gitpod environment port open 8911 --name "Cedar API Server" --protocol https
echo "✅ Ports 8910 (Web) and 8911 (API) are now open with HTTPS"
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 38:40

Comment:
**logic:** Port names reference "RedwoodJS" instead of "Cedar"

```suggestion
      echo "Opening ports for development servers..."
      gitpod environment port open 8910 --name "Cedar Web Server" --protocol https
      gitpod environment port open 8911 --name "Cedar API Server" --protocol https
      echo "✅ Ports 8910 (Web) and 8911 (API) are now open with HTTPS"
```

How can I resolve this? If you propose a fix, please make it concise.

# Signal completion
touch /tmp/redwood-setup-complete
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: Completion marker references "redwood". Should use "cedar" for consistency.

Suggested change
touch /tmp/redwood-setup-complete
touch /tmp/cedar-setup-complete
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 42:42

Comment:
**style:** Completion marker references "redwood". Should use "cedar" for consistency.

```suggestion
      touch /tmp/cedar-setup-complete
```

How can I resolve this? If you propose a fix, please make it concise.

echo "✅ Setup task completed successfully"
start-dev-after-setup:
name: Start Development Server After Setup
description: Automatically start the development server after setup completes
triggeredBy:
- postDevcontainerStart
command: |
# Wait for setup to complete
echo "Waiting for setup to complete..."
while [ ! -f /tmp/redwood-setup-complete ]; do
sleep 2
done
Comment on lines +53 to +55
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Waiting logic references wrong completion file. Should match the file created in setup.

Suggested change
while [ ! -f /tmp/redwood-setup-complete ]; do
sleep 2
done
echo "Waiting for setup to complete..."
while [ ! -f /tmp/cedar-setup-complete ]; do
sleep 2
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 53:55

Comment:
**logic:** Waiting logic references wrong completion file. Should match the file created in setup.

```suggestion
      echo "Waiting for setup to complete..."
      while [ ! -f /tmp/cedar-setup-complete ]; do
          sleep 2
```

How can I resolve this? If you propose a fix, please make it concise.

echo "Setup completed, starting development server..."
# Ensure ports are open before starting service
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https 2>/dev/null || true
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https 2>/dev/null || true
Comment on lines +58 to +59
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Port open commands reference "RedwoodJS" instead of "Cedar"

Suggested change
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https 2>/dev/null || true
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https 2>/dev/null || true
gitpod environment port open 8910 --name "Cedar Web Server" --protocol https 2>/dev/null || true
gitpod environment port open 8911 --name "Cedar API Server" --protocol https 2>/dev/null || true
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 58:59

Comment:
**logic:** Port open commands reference "RedwoodJS" instead of "Cedar"

```suggestion
      gitpod environment port open 8910 --name "Cedar Web Server" --protocol https 2>/dev/null || true
      gitpod environment port open 8911 --name "Cedar API Server" --protocol https 2>/dev/null || true
```

How can I resolve this? If you propose a fix, please make it concise.

gitpod automations service start dev-server
echo "✅ Development server started"
sync-framework-changes:
name: Sync Framework Changes
description: Manually sync framework changes to test project
triggeredBy:
- manual
command: |
export RWFW_PATH="/workspaces/RedwoodGraphQL"
cd /workspaces/rw-test-app
corepack yarn rwfw project:sync
Comment on lines +69 to +71
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Sync task references wrong workspace path and test app directory

Suggested change
export RWFW_PATH="/workspaces/RedwoodGraphQL"
cd /workspaces/rw-test-app
corepack yarn rwfw project:sync
export RWFW_PATH="/workspaces/cedar"
cd /workspaces/cedar-test-app
corepack yarn rwfw project:sync
Prompt To Fix With AI
This is a comment left during a code review.
Path: .ona/automations.yaml
Line: 69:71

Comment:
**logic:** Sync task references wrong workspace path and test app directory

```suggestion
      export RWFW_PATH="/workspaces/cedar"
      cd /workspaces/cedar-test-app
      corepack yarn rwfw project:sync
```

How can I resolve this? If you propose a fix, please make it concise.

echo "Framework changes synced to test project"
start-dev-server:
name: Start Development Server
description: Start the RedwoodJS development server
triggeredBy:
- manual
command: |
gitpod automations service start dev-server
stop-dev-server:
name: Stop Development Server
description: Stop the RedwoodJS development server
triggeredBy:
- manual
command: |
gitpod automations service stop dev-server
restart-dev-server:
name: Restart Development Server
description: Restart the RedwoodJS development server
triggeredBy:
- manual
command: |
gitpod automations service stop dev-server
sleep 2
gitpod automations service start dev-server
open-ports:
name: Open Development Ports
description: Open ports 8910 (Web) and 8911 (API) for external access with HTTPS
triggeredBy:
- manual
command: |
echo "Opening RedwoodJS development ports with HTTPS..."
gitpod environment port open 8910 --name "RedwoodJS Web Server" --protocol https
gitpod environment port open 8911 --name "RedwoodJS API Server" --protocol https
echo "✅ Ports opened successfully with HTTPS protocol"
gitpod environment port list
close-ports:
name: Close Development Ports
description: Close ports 8910 (Web) and 8911 (API)
triggeredBy:
- manual
command: |
echo "Closing RedwoodJS development ports..."
gitpod environment port close 8910
gitpod environment port close 8911
echo "✅ Ports closed successfully"
list-ports:
name: List Port Status
description: Show current status of all ports
triggeredBy:
- manual
command: |
echo "Current port status:"
gitpod environment port list
15 changes: 9 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,12 @@ You can use the button below to start a developer environment in the cloud and a

This generates a functional test project and links it with the Cedar Framework code in `main`, giving you an easy playground to try out your fixes and contributions.

> Note: if you make changes to the framework, you will need to run `yarn rwfw project:sync` in the terminal, so that your changes are watched and reflected in the test project
> Note: if you make changes to the framework, you will need to sync your changes to the test project. You can either:
>
> - Run `yarn rwfw project:sync` in the terminal, or
> - Use the **"Sync Framework Changes"** task directly from the Ona dashboard

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cedarjs/cedar)
[![Open in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cedarjs/cedar)

## Local QA and Integration Tests

Expand Down Expand Up @@ -305,17 +308,17 @@ If needed, there's more information in [this PR #3154 comment](https://github.co

# Creating a Reproduction to Include with Issues

Are you about to open an issue? Including a reproduction, either as a series of steps, as a public GitHub repo, or as a Gitpod snapshot, will definitely let us help you faster!
Are you about to open an issue? Including a reproduction, either as a series of steps, as a public GitHub repo, or as an Ona snapshot, will definitely let us help you faster!

## Option 1: Create a Gitpod Snapshot
## Option 1: Create an Ona Snapshot

This is a great option when the issue you're reporting is cross-platform. I.e., it isn't a Windows-specific issue. Here's a video walkthrough on how to create a snapshot of the [Redwood-Gitpod starter repo](https://github.com/redwoodjs/starter):
This is a great option when the issue you're reporting is cross-platform. I.e., it isn't a Windows-specific issue. You can create a snapshot of the [Redwood starter repo](https://github.com/redwoodjs/starter) using Ona's cloud development environment.

https://user-images.githubusercontent.com/1521877/176033049-d3c57b92-3ee6-4c60-918b-fdbcfa83fd0f.mp4

## Option 2: Fork the Starter Repo

You can always fork the [Redwood-Gitpod starter repo](https://github.com/redwoodjs/starter) which is a brand new project with the latest stable version of Redwood.
You can always fork the [Redwood starter repo](https://github.com/redwoodjs/starter) which is a brand new project with the latest stable version of Redwood.
Once you make your changes in your fork, include the link to your repo in your issue. This'll make it much easier for us to understand what's going on.

# Release Publishing
Expand Down
31 changes: 16 additions & 15 deletions docs/docs/how-to/using-gitpod.md → docs/docs/how-to/using-ona.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# Using GitPod
# Using Ona

## What is GitPod?
## What is Ona?

GitPod is a cloud development environment with all the necessary tools and dependencies, allowing you to focus on building your CedarJS application without worrying about the setup. Get started quickly and efficiently by launching CedarJS inside GitPod!
Ona is a cloud development environment with all the necessary tools and dependencies, allowing you to focus on building your Cedar application without worrying about the setup. Get started quickly and efficiently by launching CedarJS inside Ona!

## Getting Started
## Getting started

Click on the Open in GitPod button:
Click on the Run in Ona button:

[![Open in GitPod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)
[![Run in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/redwoodjs/starter)

<iframe width="100%" height="315" src="https://www.youtube.com/embed/guz67aa_1Wk?si=p1uc2EK6o8HJGBax" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
This will launch Ona and ask you to configure a new workspace. Click continue.

This will launch GitPod and ask you to configure a new workspace. Click continue.
Ona will then begin to build your workspace using Dev Containers and Automations. This may take several minutes as it:

![GitPod Onboarding Screen](https://github.com/redwoodjs/starter/raw/main/images/gitpod-new-workspace.png)

GitPod will then begin to build your workspace. This may take several minutes.
1. Sets up the development environment
2. Installs dependencies
3. Creates a test project linked to the framework
4. Starts the development server automatically

What's going on behind the scenes:

- GitPod is setting up the workspace
- Ona is setting up the environment
- It installs our recommended VS Code plugins:
- [ESLint](https://github.com/redwoodjs/starter/blob/main)
- [Git Lens](https://github.com/redwoodjs/starter/blob/main)
Expand Down Expand Up @@ -48,11 +49,11 @@ You can click on the address or the globe icon to open that particular port in a
- Port 8911 is your backend and will show you a list of all available functions. If you add `/graphql` to the end of the URL, you should see the GraphQL Playground
![Port 8911 GraphQL Playground](https://github.com/redwoodjs/starter/raw/main/images/gitpod-graphql.png)

## How to Use GitPod
## How to use Gitpod (Ona)

<iframe width="560" height="315" src="https://www.youtube.com/embed/5pNHaqJWKL4?si=OmkQvmPL_Cc3djLg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

If you have an existing project, you can still use GitPod:
If you have an existing project, you can still use Gitpod:

1. Take any repository within GitHub and append `gitpod.io/#` to the URL. This will quickly launch a GitPod workspace.
1. Take any repository within GitHub and append `gitpod.io/#` to the URL. This will quickly launch a Ona environment.
2. Within the Terminal, run `yarn install` to install all the dependencies
6 changes: 3 additions & 3 deletions docs/docs/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ yarn cedarjs --help

For all the details, see the [CLI reference](cli-commands.md).

### GitPod
### Ona

The fastest way to start a new Cedar project is to use GitPod ([additional documentation for working with GitPod](./how-to/using-gitpod)).
The fastest way to start a new Cedar project is to use Ona's (formerly Gitpod) cloud development environment ([additional documentation for working with Ona](./how-to/using-ona)).

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cedarjs/starter)
[![Run in Ona](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cedarjs/starter)

## Prisma and the database

Expand Down
Loading