Skip to content

Commit

Permalink
feat: ditch inferencer (#384)
Browse files Browse the repository at this point in the history
* feat: remove inferencer, i18n, chakra and mantine from refine-vite

* chore: remove refine-react

* chore: remove unused files

* feat: remove inferencer, i18n, chakra and mantine from refine-nextjs

* feat: remove inferencer, i18n, chakra and mantine from refine-remix

* fix: import path

* fix: minor fixes for remix

* fix: nextjs auth

* fix: import path

* chore: remove unsued files

* fix: document title

* feat: add hasura test to local e2e vite

* feat: add nestjs-query examples

* fix: table field name

* fix: table field name

* fix: syntax error

* fix: category form field on react hook form

* fix: syntax error

* fix: syntax error

* fix: syntax error

* fix: meta usage

* fix: supabase

* fix: syntax

* fix: remove duplicate object literal

* fix: category id field name

* chore: test CI should fail

* Revert "chore: test CI should fail"

This reverts commit 27b6d57.

* chore: remove i18n test

* fix: wrong test

* fix: auth0 test

* fix: hasRoutes

* fix: remix auth

* feat: refactor nextjs to appdir (#387)

* feat: update nextjs to appdir

* feat(refine-nextjs): minor improvements

* feat(refine-nextjs): fix import

* feat(refine-nextjs): fix import

* feat(refine-nextjs): update dependencies

* feat(refine-nextjs): update nextjs-router import

* revert(refine-nextjs): test

* fix(refine-nextjs): keycloak and google login
  • Loading branch information
alicanerdurmaz authored Feb 14, 2024
1 parent aaa09b5 commit 6ffb1fd
Show file tree
Hide file tree
Showing 647 changed files with 11,253 additions and 18,355 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-remote.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ const buildRemote = async () => {
hasura: ["keycloak", "custom"],
};

const uiFrameworkToExampleMap = {
antd: "antd-example",
mui: "mui-example",
no: "headless-example",
};

let AUTH_PROVIDER = dataProviderMap[DATA_PROVIDER];

if (Array.isArray(AUTH_PROVIDER)) {
Expand All @@ -47,11 +53,9 @@ const buildRemote = async () => {
icon: "refine.svg",
"data-provider": `data-provider-${DATA_PROVIDER}`,
"ui-framework": UI_FRAMEWORK,
[UI_FRAMEWORK === "no" ? "inferencer-headless" : "inferencer"]:
UI_FRAMEWORK === "no" ? "inferencer-headless" : "inferencer",
[uiFrameworkToExampleMap[UI_FRAMEWORK]]:
uiFrameworkToExampleMap[UI_FRAMEWORK],
"auth-provider": `auth-provider-${AUTH_PROVIDER}`,
[`i18n-${UI_FRAMEWORK}`]:
UI_FRAMEWORK === "no" ? "i18n" : `i18n-${UI_FRAMEWORK}`,
},
};

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/build-template.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ const buildTemplate = async () => {
hasura: ["keycloak", "custom"],
};

const uiFrameworkToExampleMap = {
antd: "antd-example",
mui: "mui-example",
no: "headless-example",
};

let AUTH_PROVIDER = dataProviderMap[DATA_PROVIDER];

if (Array.isArray(AUTH_PROVIDER)) {
Expand All @@ -55,11 +61,9 @@ const buildTemplate = async () => {
icon: "refine.svg",
"data-provider": `data-provider-${DATA_PROVIDER}`,
"ui-framework": UI_FRAMEWORK,
[UI_FRAMEWORK === "no" ? "inferencer-headless" : "inferencer"]:
UI_FRAMEWORK === "no" ? "inferencer-headless" : "inferencer",
[uiFrameworkToExampleMap[UI_FRAMEWORK]]:
uiFrameworkToExampleMap[UI_FRAMEWORK],
"auth-provider": `auth-provider-${AUTH_PROVIDER}`,
[`i18n-${UI_FRAMEWORK}`]:
UI_FRAMEWORK === "no" ? "i18n" : `i18n-${UI_FRAMEWORK}`,
},
};

Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ jobs:
airtable,
supabase,
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -79,7 +80,7 @@ jobs:
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -137,7 +138,7 @@ jobs:
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/test-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
appwrite,
hasura,
]
ui_framework: [antd, chakra, mantine, mui, no]
ui_framework: [antd, mui, no]
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
37 changes: 9 additions & 28 deletions cypress/e2e/build-test.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,9 @@ describe("build test", () => {

cy.wait(1000);

cy.visit("http://localhost:3000/i-dont-exist").wait(1000);
cy.visit("http://localhost:3000/i-dont-exist", {
failOnStatusCode: false,
}).wait(1000);

cy.url().should("be.oneOf", [
"http://localhost:3000/login?to=%2Fi-dont-exist",
Expand Down Expand Up @@ -115,40 +117,19 @@ describe("build test", () => {
cy.contains("Blog Posts", { matchCase: false }).should("exist");

// document title check
// ignore remix
if (Cypress.env("FRAMEWORK") !== "remix") {
cy.title().should("eq", "Blog Posts | refine");
// ignore remix and nextjs
if (
Cypress.env("FRAMEWORK") !== "remix" &&
Cypress.env("FRAMEWORK") !== "nextjs"
) {
cy.title().should("eq", "Blog posts | refine");
}

if (Cypress.env("UI_FRAMEWORK") !== "no") {
cy.contains("Categories").should("exist");

cy.contains("Logout").should("exist");
}

// hide language name and name on mui custom-json-rest
if (Cypress.env("UI_FRAMEWORK") === "mui") {
if (Cypress.env("FRAMEWORK") !== "remix") {
cy.get(".MuiPaper-elevation4 > .MuiToolbar-root").contains(
"English",
);

cy.viewport(375, 667)
.get(".MuiPaper-elevation4 > .MuiToolbar-root")
.contains("English")
.should("have.css", "display", "none");
}

if (Cypress.env("DATA_PROVIDER") === "custom-json-rest") {
cy.get(".MuiPaper-elevation4 > .MuiToolbar-root").contains(
"John Doe",
);
cy.viewport(375, 667)
.get(".MuiPaper-elevation4 > .MuiToolbar-root")
.contains("John Doe")
.should("have.css", "display", "none");
}
}
}
});
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "ejslint ./refine-*/**/*",
"prepare": "husky install",
"cypress": "cypress open --env=AUTH_PROVIDER=custom,UI_FRAMEWORK=mui,FRAMEWORK=react,DATA_PROVIDER=custom-json-rest"
"cypress": "cypress open --env=AUTH_PROVIDER=keycloak,UI_FRAMEWORK=antd,FRAMEWORK=nextjs,DATA_PROVIDER=custom-json-rest"
},
"repository": {
"type": "git",
Expand Down
100 changes: 24 additions & 76 deletions presets.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,9 @@ module.exports = {
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -24,12 +21,9 @@ module.exports = {
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -40,50 +34,9 @@ module.exports = {
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
inferencer: "no",
},
},
{
name: "refine-mantine",
type: "refine-vite",
answers: {
"ui-framework": "mantine",
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"mantine-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"i18n-mantine": "no",
inferencer: "no",
},
},
{
name: "refine-chakra-ui",
type: "refine-vite",
answers: {
"ui-framework": "chakra",
"router-provider": "react-router-v6",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"mantine-example-pages": "no",
"chakra-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"i18n-mantine": "no",
"i18n-chakra": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -93,9 +46,9 @@ module.exports = {
"ui-framework": "no",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -105,12 +58,9 @@ module.exports = {
"ui-framework": "antd",
"data-provider": "data-provider-custom-json-rest",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -120,12 +70,9 @@ module.exports = {
"ui-framework": "antd",
"router-provider": "react-router-v6",
"data-provider": "data-provider-supabase",
"auth-provider": "none",
"antd-example-pages": "no",
"mui-example-pages": "no",
"i18n-no": "no",
"i18n-antd": "no",
"i18n-mui": "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -135,8 +82,9 @@ module.exports = {
"ui-framework": "no",
"router-provider": "react-router-v6",
"data-provider": "data-provider-supabase",
"i18n-no": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
{
Expand All @@ -146,9 +94,9 @@ module.exports = {
"ui-framework": "antd",
"router-provider": "react-router-v6",
"data-provider": "data-provider-appwrite",
"antd-example-pages": "no",
"i18n-antd": "no",
inferencer: "no",
"antd-example": "no",
"mui-example": "no",
"headless-example": "no",
},
},
],
Expand Down
Loading

0 comments on commit 6ffb1fd

Please sign in to comment.