From d1e85e61d1e24cac10bf1f2da070e04dbe86d0f3 Mon Sep 17 00:00:00 2001 From: Dennis Torres Date: Thu, 23 May 2024 03:06:58 -0400 Subject: [PATCH] Fix release --- .changeset/slimy-turkeys-cross.md | 7 +++++++ .github/workflows/release.yaml | 7 +++++++ package.json | 4 ++-- .../.env | 0 .../.env.development | 0 .../.gitignore | 0 .../.gmrc.cjs | 2 +- .../.prettierignore | 0 .../.squawk.toml | 0 .../README.md | 2 +- .../docker-compose.yaml | 4 ++-- .../eslint.config.js | 0 .../next-env.d.ts | 0 .../next.config.js | 9 +++++++++ .../npmpackagejsonlint.config.cjs | 0 .../package.json | 7 ++++--- .../src/app/api/graphiql/route.ts | 0 .../src/app/api/graphql/route.ts | 0 .../src/app/api/graphql/schema.graphql | 0 .../src/migrations/current/1-migration.sql | 0 .../fixtures/functions/trigger--update-datetime.sql | 0 .../tsconfig.json | 0 turbo.json | 2 +- workspace.code-workspace | 4 ++-- yarn.lock | 4 ++-- 25 files changed, 38 insertions(+), 14 deletions(-) create mode 100644 .changeset/slimy-turkeys-cross.md rename packages/{example-postgraphile-server => example-postgraphile-api}/.env (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/.env.development (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/.gitignore (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/.gmrc.cjs (59%) rename packages/{example-postgraphile-server => example-postgraphile-api}/.prettierignore (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/.squawk.toml (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/README.md (84%) rename packages/{example-postgraphile-server => example-postgraphile-api}/docker-compose.yaml (82%) rename packages/{example-postgraphile-server => example-postgraphile-api}/eslint.config.js (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/next-env.d.ts (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/next.config.js (74%) rename packages/{example-postgraphile-server => example-postgraphile-api}/npmpackagejsonlint.config.cjs (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/package.json (93%) rename packages/{example-postgraphile-server => example-postgraphile-api}/src/app/api/graphiql/route.ts (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/src/app/api/graphql/route.ts (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/src/app/api/graphql/schema.graphql (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/src/migrations/current/1-migration.sql (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/src/migrations/fixtures/functions/trigger--update-datetime.sql (100%) rename packages/{example-postgraphile-server => example-postgraphile-api}/tsconfig.json (100%) diff --git a/.changeset/slimy-turkeys-cross.md b/.changeset/slimy-turkeys-cross.md new file mode 100644 index 0000000..f971055 --- /dev/null +++ b/.changeset/slimy-turkeys-cross.md @@ -0,0 +1,7 @@ +--- +"@spear-ai/example-postgraphile-api": patch +"@spear-ai/grafserv-next-server": patch +"@spear-ai/graphile-sort-schema-plugin": patch +--- + +Fixed release. diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c307bb7..58913c6 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,11 +20,18 @@ jobs: uses: actions/checkout@v4.1.6 with: fetch-depth: 0 + - name: Install Poetry + run: pipx install poetry - name: Setup Node.js uses: actions/setup-node@v4.0.2 with: cache: yarn node-version-file: .node-version + - name: Setup Python + uses: actions/setup-python@v5.1.0 + with: + cache: poetry + python-version-file: .python-version - name: Install Node.js dependencies run: yarn install - name: Build packages diff --git a/package.json b/package.json index b442985..cae43f4 100644 --- a/package.json +++ b/package.json @@ -53,8 +53,8 @@ "publish-packages:custom": "yarn workspaces foreach -A run publish-package", "publish-packages:github": "npm_config_registry=https://npm.pkg.github.com changeset publish --no-git-tag", "publish-packages:npm": "changeset publish --no-git-tag", - "sqlfluff:check": "poetry run sqlfluff lint packages/example-postgraphile-server/src/**/*.sql", - "sqlfluff:fix": "poetry run sqlfluff fix packages/example-postgraphile-server/src/**/*.sql --force", + "sqlfluff:check": "poetry run sqlfluff lint packages/example-postgraphile-api/src/**/*.sql", + "sqlfluff:fix": "poetry run sqlfluff fix packages/example-postgraphile-api/src/**/*.sql --force", "typescript:check": "tsc --noEmit" }, "workspaces": [ diff --git a/packages/example-postgraphile-server/.env b/packages/example-postgraphile-api/.env similarity index 100% rename from packages/example-postgraphile-server/.env rename to packages/example-postgraphile-api/.env diff --git a/packages/example-postgraphile-server/.env.development b/packages/example-postgraphile-api/.env.development similarity index 100% rename from packages/example-postgraphile-server/.env.development rename to packages/example-postgraphile-api/.env.development diff --git a/packages/example-postgraphile-server/.gitignore b/packages/example-postgraphile-api/.gitignore similarity index 100% rename from packages/example-postgraphile-server/.gitignore rename to packages/example-postgraphile-api/.gitignore diff --git a/packages/example-postgraphile-server/.gmrc.cjs b/packages/example-postgraphile-api/.gmrc.cjs similarity index 59% rename from packages/example-postgraphile-server/.gmrc.cjs rename to packages/example-postgraphile-api/.gmrc.cjs index f9618c9..c0b7deb 100644 --- a/packages/example-postgraphile-server/.gmrc.cjs +++ b/packages/example-postgraphile-api/.gmrc.cjs @@ -1,5 +1,5 @@ const graphileMigrateConfig = { - connectionString: "postgresql://postgres:postgres@localhost:5432/postgres", + connectionString: process.env.POSTGRES_URL, migrationsFolder: "src/migrations", }; diff --git a/packages/example-postgraphile-server/.prettierignore b/packages/example-postgraphile-api/.prettierignore similarity index 100% rename from packages/example-postgraphile-server/.prettierignore rename to packages/example-postgraphile-api/.prettierignore diff --git a/packages/example-postgraphile-server/.squawk.toml b/packages/example-postgraphile-api/.squawk.toml similarity index 100% rename from packages/example-postgraphile-server/.squawk.toml rename to packages/example-postgraphile-api/.squawk.toml diff --git a/packages/example-postgraphile-server/README.md b/packages/example-postgraphile-api/README.md similarity index 84% rename from packages/example-postgraphile-server/README.md rename to packages/example-postgraphile-api/README.md index 73cba3b..84b562d 100644 --- a/packages/example-postgraphile-server/README.md +++ b/packages/example-postgraphile-api/README.md @@ -1,4 +1,4 @@ -# @spear-ai/example-postgraphile-server +# @spear-ai/example-postgraphile-api An example [PostGraphile](https://postgraphile.org) server to test against custom plugins. diff --git a/packages/example-postgraphile-server/docker-compose.yaml b/packages/example-postgraphile-api/docker-compose.yaml similarity index 82% rename from packages/example-postgraphile-server/docker-compose.yaml rename to packages/example-postgraphile-api/docker-compose.yaml index 9a650fc..6255328 100644 --- a/packages/example-postgraphile-server/docker-compose.yaml +++ b/packages/example-postgraphile-api/docker-compose.yaml @@ -1,7 +1,7 @@ -name: forerunner-database +name: example-postgraphile-api services: postgresql: - container_name: postgraphile-postgresql + container_name: example-postgraphile-api-postgresql environment: PGHOST: /var/run/postgresql POSTGRES_DB: postgres diff --git a/packages/example-postgraphile-server/eslint.config.js b/packages/example-postgraphile-api/eslint.config.js similarity index 100% rename from packages/example-postgraphile-server/eslint.config.js rename to packages/example-postgraphile-api/eslint.config.js diff --git a/packages/example-postgraphile-server/next-env.d.ts b/packages/example-postgraphile-api/next-env.d.ts similarity index 100% rename from packages/example-postgraphile-server/next-env.d.ts rename to packages/example-postgraphile-api/next-env.d.ts diff --git a/packages/example-postgraphile-server/next.config.js b/packages/example-postgraphile-api/next.config.js similarity index 74% rename from packages/example-postgraphile-server/next.config.js rename to packages/example-postgraphile-api/next.config.js index 729de10..878ad80 100644 --- a/packages/example-postgraphile-server/next.config.js +++ b/packages/example-postgraphile-api/next.config.js @@ -15,6 +15,15 @@ const nextConfig = { ], }, poweredByHeader: false, + redirects() { + return [ + { + destination: "/api/graphiql", + permanent: false, + source: "/", + }, + ]; + }, typescript: { ignoreBuildErrors: true, }, diff --git a/packages/example-postgraphile-server/npmpackagejsonlint.config.cjs b/packages/example-postgraphile-api/npmpackagejsonlint.config.cjs similarity index 100% rename from packages/example-postgraphile-server/npmpackagejsonlint.config.cjs rename to packages/example-postgraphile-api/npmpackagejsonlint.config.cjs diff --git a/packages/example-postgraphile-server/package.json b/packages/example-postgraphile-api/package.json similarity index 93% rename from packages/example-postgraphile-server/package.json rename to packages/example-postgraphile-api/package.json index e1d2804..57b0205 100644 --- a/packages/example-postgraphile-server/package.json +++ b/packages/example-postgraphile-api/package.json @@ -1,7 +1,7 @@ { - "name": "@spear-ai/example-postgraphile-server", + "name": "@spear-ai/example-postgraphile-api", "version": "1.0.0", - "description": "Example PostGraphile server", + "description": "Example PostGraphile API", "author": { "name": "Spear AI", "email": "org@spear.ai", @@ -44,7 +44,7 @@ "private": true, "repository": { "type": "git", - "directory": "packages/example-postgraphile-server", + "directory": "packages/example-postgraphile-api", "url": "https://github.com/spear-ai/api.git" }, "scripts": { @@ -65,6 +65,7 @@ "prettier:check": "prettier --check .", "prettier:fix": "prettier --write .", "squawk:check": "squawk --assume-in-transaction src/migrations/current/*.sql", + "start": "next start", "typescript:check": "tsc --noEmit" } } diff --git a/packages/example-postgraphile-server/src/app/api/graphiql/route.ts b/packages/example-postgraphile-api/src/app/api/graphiql/route.ts similarity index 100% rename from packages/example-postgraphile-server/src/app/api/graphiql/route.ts rename to packages/example-postgraphile-api/src/app/api/graphiql/route.ts diff --git a/packages/example-postgraphile-server/src/app/api/graphql/route.ts b/packages/example-postgraphile-api/src/app/api/graphql/route.ts similarity index 100% rename from packages/example-postgraphile-server/src/app/api/graphql/route.ts rename to packages/example-postgraphile-api/src/app/api/graphql/route.ts diff --git a/packages/example-postgraphile-server/src/app/api/graphql/schema.graphql b/packages/example-postgraphile-api/src/app/api/graphql/schema.graphql similarity index 100% rename from packages/example-postgraphile-server/src/app/api/graphql/schema.graphql rename to packages/example-postgraphile-api/src/app/api/graphql/schema.graphql diff --git a/packages/example-postgraphile-server/src/migrations/current/1-migration.sql b/packages/example-postgraphile-api/src/migrations/current/1-migration.sql similarity index 100% rename from packages/example-postgraphile-server/src/migrations/current/1-migration.sql rename to packages/example-postgraphile-api/src/migrations/current/1-migration.sql diff --git a/packages/example-postgraphile-server/src/migrations/fixtures/functions/trigger--update-datetime.sql b/packages/example-postgraphile-api/src/migrations/fixtures/functions/trigger--update-datetime.sql similarity index 100% rename from packages/example-postgraphile-server/src/migrations/fixtures/functions/trigger--update-datetime.sql rename to packages/example-postgraphile-api/src/migrations/fixtures/functions/trigger--update-datetime.sql diff --git a/packages/example-postgraphile-server/tsconfig.json b/packages/example-postgraphile-api/tsconfig.json similarity index 100% rename from packages/example-postgraphile-server/tsconfig.json rename to packages/example-postgraphile-api/tsconfig.json diff --git a/turbo.json b/turbo.json index 2d64b29..d9654ca 100644 --- a/turbo.json +++ b/turbo.json @@ -20,7 +20,7 @@ "build": { "dependsOn": ["^build"], "dotEnv": [".env", ".env.local", ".env.production", ".env.production.local"], - "outputs": ["build/**", "dist/**"] + "outputs": ["build/**", "dist/**", ".next"] }, "check": { "dependsOn": [ diff --git a/workspace.code-workspace b/workspace.code-workspace index 8f8e410..c532199 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -27,8 +27,8 @@ "path": "packages/graphile-sort-schema-plugin", }, { - "name": "spear-ai/example-postgraphile-server", - "path": "packages/example-postgraphile-server", + "name": "spear-ai/example-postgraphile-api", + "path": "packages/example-postgraphile-api", }, ], "settings": { diff --git a/yarn.lock b/yarn.lock index f2bf57d..e329779 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1837,9 +1837,9 @@ __metadata: languageName: node linkType: hard -"@spear-ai/example-postgraphile-server@workspace:packages/example-postgraphile-server": +"@spear-ai/example-postgraphile-api@workspace:packages/example-postgraphile-api": version: 0.0.0-use.local - resolution: "@spear-ai/example-postgraphile-server@workspace:packages/example-postgraphile-server" + resolution: "@spear-ai/example-postgraphile-api@workspace:packages/example-postgraphile-api" dependencies: "@dataplan/pg": "npm:0.0.1-beta.22" "@dotenv-run/cli": "npm:1.3.5"