Skip to content

Commit 9b72ac8

Browse files
author
Dijana Pavlovic
committed
Rename edgedb to gel
1 parent 08fd2b0 commit 9b72ac8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+170
-175
lines changed

packages/create/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# `@edgedb/create`: Project scaffolding for EdgeDB-backed applications
1+
# `@gel/create`: Project scaffolding for Gel-backed applications
22

3-
The `@edgedb/create` package provides a starting point for various frameworks with everything you need to start building an EdgeDB-backed application. We aim to follow the same conventions as the original "create-app" templates, but with EdgeDB as the database. There are a few different templates to choose from, including: Next.js, Remix, Express, Node HTTP Server.
3+
The `@gel/create` package provides a starting point for various frameworks with everything you need to start building an Gel-backed application. We aim to follow the same conventions as the original "create-app" templates, but with Gel as the database. There are a few different templates to choose from, including: Next.js, Remix, Express, Node HTTP Server.
44

55
Important points to note:
66

77
- **Upstream changes:** We try to actively monitor and incorporate significant changes from the original "create-app" templates to to ensure developers have access to the latest features and best practices.
88
- **Support for major options:** While we strive to support the major options offered by the upstream "create-apps", we might not cover every possible configuration or permutation due to the vast scope of possibilities.
9-
- **EdgeDB CLI installation:** For users who do not have the EdgeDB CLI installed, we automatically install it using our typical installation procedure.
9+
- **Gel CLI installation:** For users who do not have the Gel CLI installed, we automatically install it using our typical installation procedure.
1010

1111
## Usage
1212

1313
```bash
14-
$ npm create @edgedb
14+
$ npm create @gel
1515
# or
16-
yarn create @edgedb
16+
yarn create @gel
1717
# or
18-
pnpm create @edgedb
18+
pnpm create @gel
1919
# or
20-
bun create @edgedb
20+
bun create @gel
2121
```
2222

23-
After running the command, you will be prompted to provide a project name and choose a template. You can also specify whether to use EdgeDB Auth, initialize a git repository, and install dependencies.
23+
After running the command, you will be prompted to provide a project name and choose a template. You can also specify whether to use Gel Auth, initialize a git repository, and install dependencies.
2424

2525
The tool will then create a new directory with the specified name and set up the project.
2626

@@ -42,7 +42,7 @@ Navigate into `packages/create`:
4242
$ cd packages/create
4343
```
4444

45-
Build `@edgedb/generate`
45+
Build `@gel/generate`
4646

4747
```bash
4848
$ yarn build

packages/create/package.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
{
2-
"name": "@edgedb/create",
2+
"name": "@gel/create",
33
"version": "0.2.2",
44
"type": "module",
5-
"description": "Create a new EdgeDB-based project",
6-
"homepage": "https://edgedb.com/docs",
7-
"author": "EdgeDB <info@edgedb.com>",
5+
"description": "Create a new Gel-based project",
6+
"homepage": "https://gel.com/docs",
7+
"author": "Gel <info@gel.com>",
88
"engines": {
99
"node": ">= 18.0.0"
1010
},
1111
"repository": {
1212
"type": "git",
13-
"url": "https://github.com/edgedb/edgedb-js.git"
13+
"url": "https://github.com/gel/gel-js.git",
14+
"directory": "packages/create"
1415
},
1516
"license": "Apache-2.0",
1617
"sideEffects": false,

packages/create/src/cli.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import pc from "picocolors";
66
import { baseRecipe, recipes as _recipes } from "./recipes/index.js";
77

88
async function main() {
9-
p.intro("Welcome to the EdgeDB Create CLI 🚀");
9+
p.intro("Welcome to the Gel Create CLI 🚀");
1010

1111
const baseOptions = await baseRecipe.getOptions();
1212
const recipeOptions: any[] = [];
@@ -25,14 +25,14 @@ async function main() {
2525
}
2626

2727
p.outro(`\
28-
Your EdgeDB project has been initialized! 🚀
28+
Your Gel project has been initialized! 🚀
2929
3030
Enter your project directory using: ${pc.green(
3131
`cd ${baseOptions.projectName}`,
3232
)}
3333
Follow the instructions in the ${pc.green("README.md")} file to get started.
3434
35-
Need help? Join our community at ${pc.green("https://edgedb.com/community")}`);
35+
Need help? Join our community at ${pc.green("https://gel.com/community")}`);
3636
}
3737

3838
await main();

packages/create/src/recipes/_base/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { updatePackage } from "write-package";
99
import { getPackageManager, copyTemplateFiles } from "../../utils.js";
1010
import type { Framework, BaseRecipe, BaseOptions } from "../types.js";
1111

12-
const logger = debug("@edgedb/create:recipe:base");
12+
const logger = debug("@gel/create:recipe:base");
1313

1414
const recipe: BaseRecipe = {
1515
async getOptions() {
@@ -34,9 +34,9 @@ const recipe: BaseRecipe = {
3434
{ value: "none", label: "None" },
3535
],
3636
}),
37-
useEdgeDBAuth: () =>
37+
useGelAuth: () =>
3838
p.confirm({
39-
message: "Use the EdgeDB Auth extension?",
39+
message: "Use the Gel Auth extension?",
4040
initialValue: true,
4141
}),
4242
},

packages/create/src/recipes/_base/template/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "0.1.0",
44
"private": true,
55
"dependencies": {
6-
"edgedb": "1.x"
6+
"gel": "1.x"
77
},
88
"devDependencies": {
9-
"@edgedb/generate": "0.x",
9+
"@gel/generate": "0.x",
1010
"@typescript-eslint/eslint-plugin": "6.x",
1111
"@typescript-eslint/parser": "6.x",
1212
"@eslint/eslintrc": "2.x",

packages/create/src/recipes/_edgedb/index.ts renamed to packages/create/src/recipes/_gel/index.ts

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,126 +6,126 @@ import debug from "debug";
66
import type { BaseOptions, Recipe } from "../types.js";
77
import { copyTemplateFiles, execInLoginShell } from "../../utils.js";
88

9-
const logger = debug("@edgedb/create:recipe:edgedb");
9+
const logger = debug("@gel/create:recipe:gel");
1010

11-
interface EdgeDBOptions {
11+
interface GelOptions {
1212
initializeProject: boolean;
1313
}
1414

15-
const recipe: Recipe<EdgeDBOptions> = {
15+
const recipe: Recipe<GelOptions> = {
1616
getOptions() {
1717
return p.group({
1818
initializeProject: () =>
1919
p.confirm({
20-
message: "Initialize a new EdgeDB project with edgedb project init?",
20+
message: "Initialize a new Gel project with gel project init?",
2121
initialValue: true,
2222
}),
2323
});
2424
},
2525

2626
async apply(
27-
{ projectDir, useEdgeDBAuth }: BaseOptions,
28-
{ initializeProject }: EdgeDBOptions,
27+
{ projectDir, useGelAuth }: BaseOptions,
28+
{ initializeProject }: GelOptions,
2929
) {
30-
logger("Running edgedb recipe");
31-
logger("Checking for existing EdgeDB CLI");
30+
logger("Running gel recipe");
31+
logger("Checking for existing Gel CLI");
3232

3333
const spinner = p.spinner();
3434

3535
if (initializeProject) {
36-
let edgedbCliVersion: string | null = null;
36+
let gelCliVersion: string | null = null;
3737
let shouldInstallCli: boolean | symbol = true;
3838
try {
39-
const { stdout } = await execInLoginShell("edgedb --version");
40-
edgedbCliVersion = stdout.trim();
41-
logger(edgedbCliVersion);
39+
const { stdout } = await execInLoginShell("gel --version");
40+
gelCliVersion = stdout.trim();
41+
logger(gelCliVersion);
4242
} catch (_error) {
43-
logger("No EdgeDB CLI detected");
43+
logger("No Gel CLI detected");
4444
shouldInstallCli = await p.confirm({
4545
message:
46-
"The EdgeDB CLI is required to initialize a project. Install now?",
46+
"The Gel CLI is required to initialize a project. Install now?",
4747
initialValue: true,
4848
});
4949
}
5050

51-
if (edgedbCliVersion === null) {
51+
if (gelCliVersion === null) {
5252
if (shouldInstallCli === false) {
53-
logger("User declined to install EdgeDB CLI");
54-
throw new Error("EdgeDB CLI is required");
53+
logger("User declined to install Gel CLI");
54+
throw new Error("Gel CLI is required");
5555
}
5656

57-
logger("Installing EdgeDB CLI");
57+
logger("Installing Gel CLI");
5858

59-
spinner.start("Installing EdgeDB CLI");
59+
spinner.start("Installing Gel CLI");
6060
const { stdout, stderr } = await execInLoginShell(
61-
"curl --proto '=https' --tlsv1.2 -sSf https://sh.edgedb.com | sh -s -- -y",
61+
"curl --proto '=https' --tlsv1.2 -sSf https://sh.gel.com | sh -s -- -y",
6262
);
6363
logger({ stdout, stderr });
64-
spinner.stop("EdgeDB CLI installed");
64+
spinner.stop("Gel CLI installed");
6565
}
6666

6767
try {
68-
const { stdout } = await execInLoginShell("edgedb --version");
69-
edgedbCliVersion = stdout.trim();
70-
logger(edgedbCliVersion);
68+
const { stdout } = await execInLoginShell("gel --version");
69+
gelCliVersion = stdout.trim();
70+
logger(gelCliVersion);
7171
} catch (error) {
72-
logger("EdgeDB CLI could not be installed.");
72+
logger("Gel CLI could not be installed.");
7373
logger(error);
74-
throw new Error("EdgeDB CLI could not be installed.");
74+
throw new Error("Gel CLI could not be installed.");
7575
}
7676

77-
spinner.start("Initializing EdgeDB project");
77+
spinner.start("Initializing Gel project");
7878
try {
79-
await execInLoginShell("edgedb project init --non-interactive", {
79+
await execInLoginShell("gel project init --non-interactive", {
8080
cwd: projectDir,
8181
});
8282
const { stdout, stderr } = await execInLoginShell(
83-
"edgedb query 'select sys::get_version_as_str()'",
83+
"gel query 'select sys::get_version_as_str()'",
8484
{ cwd: projectDir },
8585
);
8686
const serverVersion = JSON.parse(stdout.trim());
87-
logger(`EdgeDB server version: ${serverVersion}`);
87+
logger(`Gel server version: ${serverVersion}`);
8888
if (serverVersion === "") {
8989
const err = new Error(
90-
"There was a problem initializing the EdgeDB project",
90+
"There was a problem initializing the Gel project",
9191
);
9292
spinner.stop(err.message);
9393
logger({ stdout, stderr });
9494

9595
throw err;
9696
}
97-
spinner.stop(`EdgeDB v${serverVersion} project initialized`);
97+
spinner.stop(`Gel v${serverVersion} project initialized`);
9898
} catch (error) {
9999
logger(error);
100100
throw error;
101101
} finally {
102102
spinner.stop();
103103
}
104104
} else {
105-
logger("Skipping edgedb project init");
106-
logger("Copying basic EdgeDB project files");
105+
logger("Skipping gel project init");
106+
logger("Copying basic Gel project files");
107107

108108
const dirname = path.dirname(new URL(import.meta.url).pathname);
109109
await copyTemplateFiles(path.resolve(dirname, "./template"), projectDir);
110110
}
111111

112-
if (useEdgeDBAuth) {
112+
if (useGelAuth) {
113113
logger("Adding auth extension to project");
114114

115-
spinner.start("Enabling auth extension in EdgeDB schema");
115+
spinner.start("Enabling auth extension in Gel schema");
116116
const filePath = path.resolve(projectDir, "./dbschema/default.esdl");
117117
const data = await fs.readFile(filePath, "utf8");
118118
await fs.writeFile(filePath, `using extension auth;\n\n${data}`);
119-
spinner.stop("Auth extension enabled in EdgeDB schema");
119+
spinner.stop("Auth extension enabled in Gel schema");
120120

121121
if (initializeProject) {
122122
logger("Creating and applying initial migration");
123123
spinner.start("Creating and applying initial migration");
124124
try {
125-
await execInLoginShell("edgedb migration create", {
125+
await execInLoginShell("gel migration create", {
126126
cwd: projectDir,
127127
});
128-
await execInLoginShell("edgedb migrate", { cwd: projectDir });
128+
await execInLoginShell("gel migrate", { cwd: projectDir });
129129
spinner.stop("Initial migration created and applied");
130130
} catch (error) {
131131
logger(error);

packages/create/src/recipes/_install/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as p from "@clack/prompts";
44
import type { BaseOptions, Recipe } from "../types.js";
55
import { execInLoginShell } from "../../utils.js";
66

7-
const logger = debug("@edgedb/create:recipe:install");
7+
const logger = debug("@gel/create:recipe:install");
88

99
interface InstallOptions {
1010
shouldGitInit: boolean;

packages/create/src/recipes/express/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
# Express Integration Recipe for EdgeDB
1+
# Express Integration Recipe for Gel
22

3-
This recipe provides a starting point for building an [Express](https://expressjs.com/) application with EdgeDB as the database.
3+
This recipe provides a starting point for building an [Express](https://expressjs.com/) application with Gel as the database.
44

5-
✨ Check out the [`@edgedb/create` package](https://github.com/edgedb/edgedb-js/blob/master/packages/create/README.md) for more information.
5+
✨ Check out the [`@gel/create` package](https://github.com/gel/gel-js/blob/master/packages/create/README.md) for more information.
66

77
## Usage
88

99
```bash
10-
$ npm create @edgedb
10+
$ npm create @gel
1111
# or
12-
yarn create @edgedb
12+
yarn create @gel
1313
# or
14-
pnpm create @edgedb
14+
pnpm create @gel
1515
# or
16-
bun create @edgedb
16+
bun create @gel
1717
```
1818

19-
After running the command, you will be prompted to provide a project name and choose the **"Express"** template. You can also specify whether to use EdgeDB Auth, initialize a git repository, and install dependencies.
19+
After running the command, you will be prompted to provide a project name and choose the **"Express"** template. You can also specify whether to use Gel Auth, initialize a git repository, and install dependencies.
2020

2121
The tool will then create a new directory with the specified name and set up the project.
2222

@@ -34,7 +34,7 @@ Navigate into `packages/create`:
3434
$ cd packages/create
3535
```
3636

37-
Build @edgedb/create
37+
Build @gel/create
3838

3939
```bash
4040
$ yarn build

packages/create/src/recipes/express/index.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { updatePackage } from "write-package";
55
import type { BaseOptions, Recipe } from "../types.js";
66
import { copyTemplateFiles } from "../../utils.js";
77

8-
const logger = debug("@edgedb/create:recipe:express");
8+
const logger = debug("@gel/create:recipe:express");
99

1010
const recipe: Recipe = {
1111
skip(opts: BaseOptions) {
@@ -24,15 +24,13 @@ const recipe: Recipe = {
2424
sideEffects: false,
2525
type: "module",
2626
scripts: {
27-
dev: "DEBUG=* EDGEDB_CLIENT_SECURITY=insecure_dev_mode tsx watch --clear-screen=false src/index.ts",
27+
dev: "DEBUG=* GEL_CLIENT_SECURITY=insecure_dev_mode tsx watch --clear-screen=false src/index.ts",
2828
build: "tsc",
2929
lint: "eslint --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint .",
3030
typecheck: "tsc --noEmit",
3131
},
3232
dependencies: {
33-
...(baseOptions.useEdgeDBAuth
34-
? { "@edgedb/auth-express": "^0.1.0" }
35-
: {}),
33+
...(baseOptions.useGelAuth ? { "@gel/auth-express": "^0.1.0" } : {}),
3634
"cookie-parser": "^1.4.6",
3735
express: "^4.18.2",
3836
},

packages/create/src/recipes/express/template/src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { type NextFunction, type Response, Router } from "express";
22
import createExpressAuth, {
33
type AuthRequest,
44
type CallbackRequest,
5-
} from "@edgedb/auth-express";
5+
} from "@gel/auth-express";
66
import { client } from "./db.js";
77
import { PORT } from "./env.js";
88

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
import { createClient } from "edgedb";
1+
import { createClient } from "gel";
22

33
export const client = createClient();

packages/create/src/recipes/express/template/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import express from "express";
22
import cookieParser from "cookie-parser";
3-
import { type AuthRequest } from "@edgedb/auth-express";
3+
import { type AuthRequest } from "@gel/auth-express";
44

55
import { styles } from "./styles.js";
66
import { auth, requireAuth, signoutRoute, builtinUIRouter } from "./auth.js";
@@ -14,7 +14,7 @@ app.use(cookieParser());
1414
app.use(auth.createSessionMiddleware());
1515

1616
app.get("/api/deep-thought", requireAuth, async (req: AuthRequest, res) => {
17-
// See more examples of making queries here: https://github.com/edgedb/edgedb-examples/blob/main/express-auth/todos.ts
17+
// See more examples of making queries here: https://github.com/gel/gel-examples/blob/main/express-auth/todos.ts
1818
const answer = await req.session!.client.query<number>("select 42;");
1919
res.json(answer);
2020
});

0 commit comments

Comments
 (0)