-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
10,859 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"access": "public", | ||
"baseBranch": "main", | ||
"changelog": ["@changesets/changelog-github", { "repo": "spear-ai/api" }], | ||
"commit": false, | ||
"fixed": [], | ||
"ignore": [], | ||
"linked": [], | ||
"privatePackages": { | ||
"version": true, | ||
"tag": true | ||
}, | ||
"updateInternalDependencies": "patch" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@spear-ai/graphile-sort-schema-plugin": major | ||
--- | ||
|
||
Added Graphile plugin to sort schemas. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
version: 2 | ||
updates: | ||
- directory: / | ||
labels: | ||
- 🔧 maintenance | ||
package-ecosystem: github-actions | ||
schedule: | ||
interval: monthly | ||
- directory: / | ||
labels: | ||
- 🔧 maintenance | ||
package-ecosystem: npm | ||
schedule: | ||
interval: monthly | ||
- directory: /packages/graphile-sort-schema-plugin | ||
labels: | ||
- 🔧 maintenance | ||
package-ecosystem: npm | ||
schedule: | ||
interval: monthly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"ref": "refs/tags/@spear-ai/[email protected]" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Build and check | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
push: | ||
branches: | ||
- main | ||
env: | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
jobs: | ||
checks: | ||
name: Build and check | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
env: | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
node-version-file: .node-version | ||
- name: Install Node.js dependencies | ||
run: yarn install --immutable | ||
- name: Build | ||
run: yarn turbo run build | ||
- name: Check | ||
run: yarn turbo run check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Release | ||
on: | ||
push: | ||
branches: | ||
- main | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
env: | ||
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
jobs: | ||
changesets: | ||
name: Changesets | ||
runs-on: ubuntu-latest | ||
outputs: | ||
should-deploy: ${{ steps.changesets.outputs.hasChangesets == 'false' }} | ||
permissions: write-all | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/[email protected] | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
cache: yarn | ||
node-version-file: .node-version | ||
- name: Install Node.js dependencies | ||
run: yarn install | ||
- name: Build packages | ||
run: yarn turbo run build | ||
- name: Import GPG key | ||
uses: crazy-max/[email protected] | ||
with: | ||
git_commit_gpgsign: true | ||
git_user_signingkey: true | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
- name: Setup Git user | ||
run: | | ||
git config --global user.email [email protected] | ||
git config --global user.name org-spear-ai | ||
- name: Authenticate with NPM | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN | ||
- name: Authenticate with GitHub Packages | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
run: npm config set //npm.pkg.github.com/:_authToken=$GITHUB_TOKEN | ||
- id: changesets | ||
name: Run Changesets — Create a Release Pull Request or merge a Release Pull Request | ||
uses: changesets/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
with: | ||
title: Release 🚀 | ||
version: yarn run version | ||
commit: Release 🚀 | ||
publish: yarn run publish-packages | ||
setupGitUser: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
*.log | ||
.DS_Store | ||
.turbo | ||
node_modules | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npx --no -- commitlint --edit ${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yarn | ||
node_modules | ||
packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.yarn | ||
node_modules | ||
packages |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
||
nodeLinker: node-modules | ||
|
||
npmPublishAccess: public | ||
|
||
yarnPath: .yarn/releases/yarn-4.2.2.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
# api | ||
# Spear API | ||
|
||
Spear AI’s API [monorepo](https://monorepo.tools). Packages are managed with [Turborepo](https://turbo.build/repo) and versioned with [🦋 Changesets](https://github.com/changesets/changesets). | ||
|
||
## Requirements | ||
|
||
- [Yarn package manager](https://yarnpkg.com) | ||
- [Fast Node Manager](https://github.com/Schniz/fnm) | ||
|
||
## Installation | ||
|
||
```shell | ||
yarn install | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import type { UserConfig } from "@commitlint/types"; | ||
|
||
const commitlintConfig: UserConfig = { | ||
extends: ["@spear-ai/commitlint-config"], | ||
}; | ||
|
||
export default commitlintConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { baseEslintConfig, prettierConfig } from "@spear-ai/eslint-config"; | ||
|
||
/** @type {import("eslint").Linter.FlatConfig} */ | ||
const eslintConfig = [ | ||
{ | ||
ignores: ["packages/**"], | ||
}, | ||
...baseEslintConfig, | ||
prettierConfig, | ||
]; | ||
|
||
export default eslintConfig; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
module.exports = { | ||
extends: ["@spear-ai/npm-package-json-lint-config/spear-application"], | ||
rules: { | ||
"prefer-absolute-version-dependencies": "off", | ||
"prefer-absolute-version-devDependencies": "off", | ||
"prefer-alphabetical-scripts": "off", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "@spear-ai/api-monorepo", | ||
"version": "1.0.0", | ||
"description": "Spear API", | ||
"author": { | ||
"name": "Spear AI", | ||
"email": "[email protected]", | ||
"url": "https://spear.ai" | ||
}, | ||
"type": "module", | ||
"dependencies": { | ||
"@changesets/changelog-github": "0.5.0", | ||
"@changesets/cli": "2.27.2", | ||
"@commitlint/cli": "19.3.0", | ||
"@commitlint/types": "19.0.3", | ||
"@spear-ai/commitlint-config": "3.1.1", | ||
"@spear-ai/eslint-config": "19.0.0", | ||
"@spear-ai/npm-package-json-lint-config": "3.1.1", | ||
"@spear-ai/prettier-config": "2.2.0", | ||
"@spear-ai/tsconfig": "4.0.0", | ||
"commitlint": "19.3.0", | ||
"eslint": "8.57.0", | ||
"graphql": "16.8.1", | ||
"husky": "9.0.11", | ||
"npm-package-json-lint": "7.1.0", | ||
"prettier": "3.2.5", | ||
"react": "18.3.1", | ||
"tailwindcss": "3.4.3", | ||
"turbo": "1.13.3", | ||
"typescript": "5.4.5" | ||
}, | ||
"license": "UNLICENSED", | ||
"packageManager": "[email protected]", | ||
"private": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/spear-ai/api.git" | ||
}, | ||
"scripts": { | ||
"version": "changeset version && yarn workspaces foreach -A run sync-version", | ||
"commitlint:check": "commitlint --from=HEAD^1", | ||
"eslint:check": "eslint --max-warnings 0 .", | ||
"eslint:fix": "yarn eslint:check --fix", | ||
"github-actions:push": "act push -s GH_PAT=$GH_PAT -s GITHUB_TOKEN=$GH_PAT -s NPM_TOKEN=$NPM_TOKEN", | ||
"github-actions:push:release-tag": "act push -e .github/test-events/push-release-tag.json -s GH_PAT=$GH_PAT -s GITHUB_TOKEN=$GH_PAT", | ||
"npmpkgjsonlint:check": "npmPkgJsonLint .", | ||
"prettier:check": "prettier --check .", | ||
"prettier:fix": "prettier --write .", | ||
"publish-packages": "yarn run publish-packages:npm && yarn run publish-packages:github && yarn run publish-packages:custom && yarn changeset tag", | ||
"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", | ||
"typescript:check": "tsc --noEmit" | ||
}, | ||
"workspaces": [ | ||
"packages/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
dist | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# @spear-ai/graphile-sort-schema-plugin | ||
|
||
A [Graphile](https://www.graphile.org) plugin to lexicographically sort your schema. | ||
|
||
## Installation | ||
|
||
```shell | ||
yarn add -D @spear-ai/graphile-sort-schema-plugin | ||
``` | ||
|
||
## Usage | ||
|
||
Add the plugin to your graphile preset: | ||
|
||
```ts | ||
import { sortSchemaPlugin } from "@spear-ai/graphile-sort-schema-plugin"; | ||
|
||
const createPreset: GraphileConfig.Preset = { | ||
// … | ||
plugins: [ | ||
// … | ||
sortSchemaPlugin, | ||
], | ||
}; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { baseEslintConfig, prettierConfig } from "@spear-ai/eslint-config"; | ||
|
||
/** @type {import("eslint").Linter.FlatConfig} */ | ||
const eslintConfig = [ | ||
{ | ||
ignores: ["dist", "node_modules"], | ||
}, | ||
...baseEslintConfig, | ||
prettierConfig, | ||
]; | ||
|
||
export default eslintConfig; |
3 changes: 3 additions & 0 deletions
3
packages/graphile-sort-schema-plugin/npmpackagejsonlint.config.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ["@spear-ai/npm-package-json-lint-config/spear-library"], | ||
}; |
Oops, something went wrong.