Skip to content

Commit

Permalink
Merge branch 'feat/generator-custom' into feature/embedded-form
Browse files Browse the repository at this point in the history
  • Loading branch information
cregourd committed Oct 9, 2024
2 parents 6c917d1 + 7589800 commit 13ccca4
Show file tree
Hide file tree
Showing 129 changed files with 20,147 additions and 12,075 deletions.
5 changes: 5 additions & 0 deletions .changeset/cool-meals-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@premieroctet/next-admin": major
---

feat: add custom generator (#414)
6 changes: 6 additions & 0 deletions .changeset/fifty-chairs-travel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@premieroctet/next-admin-generator-prisma": patch
"@premieroctet/next-admin-json-schema": patch
---

feat: new json-schema libraries (#414)
5 changes: 5 additions & 0 deletions .changeset/lemon-bears-attend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@premieroctet/next-admin-cli": patch
---

feat: support new generator (#414)
20 changes: 20 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"mode": "pre",
"tag": "rc",
"initialVersions": {
"docs": "0.0.0",
"example": "0.0.0",
"@premieroctet/next-admin-cli": "0.0.4",
"eslint-config-custom": "0.0.0",
"@premieroctet/next-admin-generator-prisma": "0.0.0",
"@premieroctet/next-admin-json-schema": "0.0.0",
"@premieroctet/next-admin": "6.1.5",
"tsconfig": "0.0.0"
},
"changesets": [
"cool-meals-obey",
"fifty-chairs-travel",
"lemon-bears-attend",
"sour-garlics-dress"
]
}
5 changes: 5 additions & 0 deletions .changeset/sour-garlics-dress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@premieroctet/next-admin": patch
---

Merge main
4 changes: 3 additions & 1 deletion .github/workflows/check-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Enable corepack
run: corepack enable
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: Install dependencies
run: yarn install
- name: Check for changeset
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Enable corepack
run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 20
Expand All @@ -23,8 +25,14 @@ jobs:
run: docker compose up -d
- name: Install dependencies
run: yarn install
- name: Build required packages
run: yarn turbo run build --filter=@premieroctet/next-admin-json-schema --filter=@premieroctet/next-admin-generator-prisma
- name: Generate Prisma client
run: cd apps/example && yarn prisma generate
- name: Run linter
run: yarn lint
- name: Run typecheck
run: yarn typecheck
- name: Install playwright dependencies
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: npx playwright install --with-deps
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Enable corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install Dependencies
run: yarn install
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/reset-database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: yarn install
- name: Create .env file in exemple
run: |
rm apps/example/.env
touch apps/example/.env
echo POSTGRES_URL_NON_POOLING=${{ secrets.POSTGRES_URL_NON_POOLING }} >> apps/example/.env
echo POSTGRES_PRISMA_URL=${{ secrets.POSTGRES_PRISMA_URL }} >> apps/example/.env
- name: Reset database
run: yarn reset-database
env:
POSTGRES_PRISMA_URL: ${{ secrets.POSTGRES_PRISMA_URL }}
POSTGRES_URL_NON_POOLING: ${{ secrets.POSTGRES_URL_NON_POOLING }}
run: yarn reset-database
13 changes: 11 additions & 2 deletions .github/workflows/vercel-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,25 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Enable corepack
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20

- name: Install Dependencies
run: yarn install

- name: Build required packages
run: yarn turbo run build --filter=@premieroctet/next-admin-json-schema --filter=@premieroctet/next-admin-generator-prisma

- name: Generate Prisma client
run: cd apps/example && yarn prisma generate

- name: Install Vercel CLI
run: npm install --global vercel@latest
run: npm install --global vercel@37.6.1

- name: Pull Vercel Environment Information (Docs)
run: vercel pull --yes --environment=${{ inputs.environment }} --token=${{ secrets.VERCEL_TOKEN }}
Expand Down
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@

# dependencies
node_modules
.pnp
.pnp.js
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# testing
coverage
Expand Down Expand Up @@ -33,4 +38,4 @@ yarn-error.log*
.turbo

# E2E
test-results
test-results
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
9 changes: 5 additions & 4 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"dev": "next dev --port 3001",
"build": "next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"clean": "rm -rf .next"
},
"dependencies": {
"@heroicons/react": "^2.1.1",
"@premieroctet/next-admin": "6.0.1",
"@premieroctet/next-admin": "7.0.0-rc.1",
"clsx": "^2.1.0",
"framer-motion": "^11.0.8",
"mini-svg-data-uri": "^1.4.4",
Expand All @@ -28,10 +29,10 @@
"@types/react-dom": "^18.2.0",
"autoprefixer": "^10.0.1",
"eslint": "7.32.0",
"eslint-config-custom": "*",
"eslint-config-custom": "workspace:*",
"postcss": "^8",
"tailwindcss": "^3.3.0",
"tsconfig": "*",
"tsconfig": "workspace:*",
"typescript": "^4.5.3"
}
}
58 changes: 58 additions & 0 deletions apps/docs/pages/changelog/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,63 @@
# @premieroctet/next-admin

## 6.1.6

### Patch Changes

- [56ea03b](https://github.com/premieroctet/next-admin/commit/56ea03b): feat: add depth selection for actions ([#443](https://github.com/premieroctet/next-admin/issues/443))
- [81b2e54](https://github.com/premieroctet/next-admin/commit/81b2e54): Fix relation one-to-many - nullable relation
- [3225788](https://github.com/premieroctet/next-admin/commit/3225788): Fix image (get async)

## 6.1.5

### Patch Changes

- [6077955](https://github.com/premieroctet/next-admin/commit/6077955): fix: default boolean display ([#466](https://github.com/premieroctet/next-admin/issues/466))
- [c25f61c](https://github.com/premieroctet/next-admin/commit/c25f61c): fix: crash on undefined relationship length ([#465](https://github.com/premieroctet/next-admin/issues/465))

## 6.1.4

### Patch Changes

- [11dff98](https://github.com/premieroctet/next-admin/commit/11dff98): Fix in/notin operators in advanced filters

## 6.1.3

### Patch Changes

- [62436a5](https://github.com/premieroctet/next-admin/commit/62436a5): fix: pass locale to page router props ([#452](https://github.com/premieroctet/next-admin/issues/452))

## 6.1.2

### Patch Changes

- [017a2e0](https://github.com/premieroctet/next-admin/commit/017a2e0): Add refresh on action perform (list and form)
- [89b38df](https://github.com/premieroctet/next-admin/commit/89b38df): add refresh on dialog action

## 6.1.1

### Patch Changes

- [003805d](https://github.com/premieroctet/next-admin/commit/003805d): fix: correctly display path in advanced search
- [84ae5d6](https://github.com/premieroctet/next-admin/commit/84ae5d6): improve dialog UI

## 6.1.0

### Minor Changes

- [68700e6](https://github.com/premieroctet/next-admin/commit/68700e6): - Allow custom actions messages
- Allow custom dialog actions messages
- `type` prop is now required on `actions` items
- `action` function now can return a Message object to display a message after the action is done
- Error thrown by `action` function are now caught and displayed in a message
- `onClose` prop can now receive a Message object to display a message after the dialog is closed

### Patch Changes

- [0ccbbab](https://github.com/premieroctet/next-admin/commit/0ccbbab): Add align on RichText Editor
- [a338dda](https://github.com/premieroctet/next-admin/commit/a338dda): Add conditional action through `canExecute` function
- [68700e6](https://github.com/premieroctet/next-admin/commit/68700e6): Fix form action message

## 6.0.1

### Patch Changes
Expand Down
24 changes: 12 additions & 12 deletions apps/docs/pages/docs/api/create-handler-function.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import { Callout, Tabs } from "nextra/components";
import OptionsTable from "../../../components/OptionsTable";

# `createHandler` function

<Callout type="info">
This is the documentation for the latest version of Next Admin. If you are using an older version (`<5.0.0`), please refer to the [documentation](/v4/docs)
</Callout>
Expand All @@ -12,21 +12,21 @@ import OptionsTable from "../../../components/OptionsTable";
<OptionsTable
options={[
{
name: 'prisma',
description: 'Your Prisma client instance. This is mandatory.'
},
{
name: 'schema',
description: 'Your JSON Schema generated by Prisma. This is mandatory.'
name: "prisma",
description: "Your Prisma client instance. This is mandatory.",
},
{
name: 'onRequest',
description: 'A function that is executed before any request. Useful for authentication.'
name: "onRequest",
description:
"A function that is executed before any request. Useful for authentication.",
},
{
name: 'options',
description: <>Your Next Admin <a href="/docs/api/options">options</a> - optional. </>
name: "options",
description: (
<>
Your Next Admin <a href="/docs/api/options">options</a> - optional.{" "}
</>
),
},

]}
/>
13 changes: 3 additions & 10 deletions apps/docs/pages/docs/api/get-next-admin-props-function.mdx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

import { Callout, Tabs } from "nextra/components";
import OptionsTable from "../../../components/OptionsTable";

# `getNextAdminProps` function

<Callout type="info">
This is the documentation for the latest version of Next Admin. If you are using an older version (`<5.0.0`), please refer to the [documentation](/v4/docs)
</Callout>
Expand Down Expand Up @@ -31,10 +31,6 @@ import OptionsTable from "../../../components/OptionsTable";
name: 'apiBasePath',
description: 'The base path of your admin API. It is used to build the admin API URL. It is mandatory.'
},
{
name: 'schema',
description: <>The JSON schema generated by the <code>prisma generate</code> command.</>
},
{
name: 'prisma',
description: 'Your Prisma client instance.'
Expand Down Expand Up @@ -70,10 +66,6 @@ import OptionsTable from "../../../components/OptionsTable";
name: 'apiBasePath',
description: <>The base path of your admin API. It is used to build the admin API URL. It is optional and defaults to <code>/api/admin</code>.</>
},
{
name: 'schema',
description: <>The JSON schema generated by the <code>prisma generate</code> command.</>
},
{
name: 'prisma',
description: 'Your Prisma client instance.'
Expand All @@ -94,8 +86,9 @@ import OptionsTable from "../../../components/OptionsTable";
name: 'options',
description: <>The <a href="/docs/api/options">options</a> object - optional.</>
}

]}
/>

</Tabs.Tab>
</Tabs>
Loading

0 comments on commit 13ccca4

Please sign in to comment.