create-cedar-app 7.0.0 → 7.0.1-next.307
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/database-overlays/neon-postgres/api/package.json +3 -3
- package/database-overlays/pglite/api/package.json +3 -3
- package/dist/create-cedar-app.js +366 -368
- package/package.json +5 -7
- package/templates/js/api/jsconfig.json +2 -2
- package/templates/js/api/package.json +12 -6
- package/templates/js/api/src/directives/requireAuth/requireAuth.js +1 -1
- package/templates/js/api/src/directives/skipAuth/skipAuth.js +1 -1
- package/templates/js/api/src/lib/auth.js +2 -2
- package/templates/js/api/src/lib/db.js +3 -1
- package/templates/js/package.json +12 -7
- package/templates/js/scripts/jsconfig.json +1 -2
- package/templates/js/web/jsconfig.json +1 -2
- package/templates/js/web/package.json +13 -9
- package/templates/js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +0 -1
- package/templates/js/web/src/pages/NotFoundPage/NotFoundPage.jsx +0 -1
- package/templates/js/web/vite.config.js +11 -3
- package/templates/overlays/{esm/npm → npm}/package.json +8 -8
- package/templates/overlays/{esm/pnpm → pnpm}/package.json +7 -7
- package/templates/overlays/{esm/pnpm → pnpm}/pnpm-workspace.yaml +1 -1
- package/templates/overlays/{esm/yarn → yarn}/package.json +8 -8
- package/templates/ts/api/package.json +12 -6
- package/templates/ts/api/src/directives/requireAuth/requireAuth.ts +1 -1
- package/templates/ts/api/src/directives/skipAuth/skipAuth.ts +1 -1
- package/templates/ts/api/src/lib/auth.ts +2 -2
- package/templates/ts/api/src/lib/db.ts +3 -1
- package/templates/ts/api/tsconfig.json +1 -0
- package/templates/ts/eslint.config.js +11 -0
- package/templates/ts/package.json +12 -7
- package/templates/ts/scripts/tsconfig.json +0 -1
- package/templates/ts/web/package.json +13 -9
- package/templates/ts/web/vite.config.ts +11 -3
- package/templates/esm-js/.cedar/README.md +0 -44
- package/templates/esm-js/.editorconfig +0 -10
- package/templates/esm-js/.env +0 -15
- package/templates/esm-js/.env.defaults +0 -19
- package/templates/esm-js/.env.example +0 -4
- package/templates/esm-js/.vscode/extensions.json +0 -14
- package/templates/esm-js/.vscode/launch.json +0 -56
- package/templates/esm-js/.vscode/settings.json +0 -11
- package/templates/esm-js/.vscode/tasks.json +0 -29
- package/templates/esm-js/README.md +0 -17
- package/templates/esm-js/api/db/schema.prisma +0 -29
- package/templates/esm-js/api/jsconfig.json +0 -41
- package/templates/esm-js/api/package.json +0 -19
- package/templates/esm-js/api/prisma.config.cjs +0 -12
- package/templates/esm-js/api/src/directives/requireAuth/requireAuth.js +0 -22
- package/templates/esm-js/api/src/directives/requireAuth/requireAuth.test.js +0 -18
- package/templates/esm-js/api/src/directives/skipAuth/skipAuth.js +0 -16
- package/templates/esm-js/api/src/directives/skipAuth/skipAuth.test.js +0 -10
- package/templates/esm-js/api/src/functions/graphql.js +0 -19
- package/templates/esm-js/api/src/graphql/.keep +0 -0
- package/templates/esm-js/api/src/lib/auth.js +0 -32
- package/templates/esm-js/api/src/lib/db.js +0 -46
- package/templates/esm-js/api/src/lib/logger.js +0 -17
- package/templates/esm-js/api/src/services/.keep +0 -0
- package/templates/esm-js/cedar.toml +0 -26
- package/templates/esm-js/gitignore.template +0 -27
- package/templates/esm-js/graphql.config.cjs +0 -11
- package/templates/esm-js/package.json +0 -33
- package/templates/esm-js/prettier.config.cjs +0 -18
- package/templates/esm-js/scripts/.keep +0 -0
- package/templates/esm-js/scripts/jsconfig.json +0 -60
- package/templates/esm-js/scripts/seed.js +0 -27
- package/templates/esm-js/web/index.html +0 -15
- package/templates/esm-js/web/jsconfig.json +0 -53
- package/templates/esm-js/web/package.json +0 -30
- package/templates/esm-js/web/public/README.md +0 -43
- package/templates/esm-js/web/public/favicon.png +0 -0
- package/templates/esm-js/web/public/robots.txt +0 -2
- package/templates/esm-js/web/src/App.jsx +0 -16
- package/templates/esm-js/web/src/Routes.jsx +0 -20
- package/templates/esm-js/web/src/components/.keep +0 -0
- package/templates/esm-js/web/src/entry.client.jsx +0 -35
- package/templates/esm-js/web/src/index.css +0 -0
- package/templates/esm-js/web/src/layouts/.keep +0 -0
- package/templates/esm-js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +0 -58
- package/templates/esm-js/web/src/pages/NotFoundPage/NotFoundPage.jsx +0 -45
- package/templates/esm-js/web/vite.config.js +0 -15
- package/templates/esm-ts/.cedar/README.md +0 -44
- package/templates/esm-ts/.editorconfig +0 -10
- package/templates/esm-ts/.env +0 -15
- package/templates/esm-ts/.env.defaults +0 -19
- package/templates/esm-ts/.env.example +0 -4
- package/templates/esm-ts/.vscode/extensions.json +0 -14
- package/templates/esm-ts/.vscode/launch.json +0 -56
- package/templates/esm-ts/.vscode/settings.json +0 -11
- package/templates/esm-ts/.vscode/tasks.json +0 -29
- package/templates/esm-ts/README.md +0 -17
- package/templates/esm-ts/api/db/schema.prisma +0 -29
- package/templates/esm-ts/api/package.json +0 -19
- package/templates/esm-ts/api/prisma.config.cjs +0 -12
- package/templates/esm-ts/api/src/directives/requireAuth/requireAuth.test.ts +0 -18
- package/templates/esm-ts/api/src/directives/requireAuth/requireAuth.ts +0 -25
- package/templates/esm-ts/api/src/directives/skipAuth/skipAuth.test.ts +0 -10
- package/templates/esm-ts/api/src/directives/skipAuth/skipAuth.ts +0 -16
- package/templates/esm-ts/api/src/functions/graphql.ts +0 -19
- package/templates/esm-ts/api/src/graphql/.keep +0 -0
- package/templates/esm-ts/api/src/lib/auth.ts +0 -32
- package/templates/esm-ts/api/src/lib/db.ts +0 -46
- package/templates/esm-ts/api/src/lib/logger.ts +0 -17
- package/templates/esm-ts/api/src/services/.keep +0 -0
- package/templates/esm-ts/api/tsconfig.json +0 -27
- package/templates/esm-ts/cedar.toml +0 -26
- package/templates/esm-ts/eslint.config.js +0 -3
- package/templates/esm-ts/gitignore.template +0 -27
- package/templates/esm-ts/graphql.config.cjs +0 -11
- package/templates/esm-ts/package.json +0 -33
- package/templates/esm-ts/prettier.config.cjs +0 -18
- package/templates/esm-ts/scripts/.keep +0 -0
- package/templates/esm-ts/scripts/seed.ts +0 -27
- package/templates/esm-ts/scripts/tsconfig.json +0 -35
- package/templates/esm-ts/web/index.html +0 -15
- package/templates/esm-ts/web/package.json +0 -30
- package/templates/esm-ts/web/public/README.md +0 -43
- package/templates/esm-ts/web/public/favicon.png +0 -0
- package/templates/esm-ts/web/public/robots.txt +0 -2
- package/templates/esm-ts/web/src/App.tsx +0 -22
- package/templates/esm-ts/web/src/Routes.tsx +0 -20
- package/templates/esm-ts/web/src/components/.keep +0 -0
- package/templates/esm-ts/web/src/entry.client.tsx +0 -35
- package/templates/esm-ts/web/src/index.css +0 -0
- package/templates/esm-ts/web/src/layouts/.keep +0 -0
- package/templates/esm-ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +0 -57
- package/templates/esm-ts/web/src/pages/NotFoundPage/NotFoundPage.tsx +0 -44
- package/templates/esm-ts/web/tsconfig.json +0 -45
- package/templates/esm-ts/web/vite.config.ts +0 -15
- package/templates/js/api/jest.config.js +0 -8
- package/templates/js/eslint.config.mjs +0 -3
- package/templates/js/jest.config.js +0 -8
- package/templates/js/web/jest.config.js +0 -8
- package/templates/overlays/cjs/npm/package-lock.json +0 -28868
- package/templates/overlays/cjs/npm/package.json +0 -31
- package/templates/overlays/cjs/pnpm/package.json +0 -32
- package/templates/overlays/cjs/pnpm/pnpm-lock.yaml +0 -18204
- package/templates/overlays/cjs/pnpm/pnpm-workspace.yaml +0 -23
- package/templates/overlays/cjs/yarn/package.json +0 -73
- package/templates/overlays/cjs/yarn/yarn.lock +0 -18896
- package/templates/overlays/esm/npm/package-lock.json +0 -29256
- package/templates/overlays/esm/pnpm/pnpm-lock.yaml +0 -18683
- package/templates/overlays/esm/yarn/.yarnrc.yml +0 -17
- package/templates/overlays/esm/yarn/yarn.lock +0 -19181
- package/templates/ts/api/jest.config.js +0 -8
- package/templates/ts/eslint.config.mjs +0 -3
- package/templates/ts/jest.config.js +0 -8
- package/templates/ts/web/jest.config.js +0 -8
- /package/templates/{esm-js → js}/api/vitest.config.js +0 -0
- /package/templates/{esm-js → js}/eslint.config.js +0 -0
- /package/templates/{esm-js → js}/vitest.config.mjs +0 -0
- /package/templates/{esm-js → js}/web/vitest.setup.js +0 -0
- /package/templates/overlays/{cjs/yarn → yarn}/.yarnrc.yml +0 -0
- /package/templates/{esm-ts → ts}/api/vitest.config.ts +0 -0
- /package/templates/{esm-ts → ts}/vitest.config.ts +0 -0
- /package/templates/{esm-ts → ts}/web/vitest.setup.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cedar-app",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.1-next.307",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -25,16 +25,14 @@
|
|
|
25
25
|
"ts-to-js": "yarn node ./scripts/tsToJS.js"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@cedarjs/
|
|
31
|
-
"@cedarjs/tui": "7.0.0",
|
|
28
|
+
"@cedarjs/cli-helpers": "7.0.1-next.307",
|
|
29
|
+
"@cedarjs/framework-tools": "7.0.1-next.307",
|
|
30
|
+
"@cedarjs/tui": "7.0.1-next.307",
|
|
32
31
|
"@opentelemetry/api": "1.9.1",
|
|
33
32
|
"@opentelemetry/exporter-trace-otlp-http": "0.222.0",
|
|
34
33
|
"@opentelemetry/resources": "2.11.0",
|
|
35
34
|
"@opentelemetry/sdk-trace-node": "2.11.0",
|
|
36
35
|
"@opentelemetry/semantic-conventions": "1.43.0",
|
|
37
|
-
"@types/babel__core": "7.20.5",
|
|
38
36
|
"@types/klaw-sync": "6.0.5",
|
|
39
37
|
"ansis": "4.4.0",
|
|
40
38
|
"ci-info": "4.4.0",
|
|
@@ -42,11 +40,11 @@
|
|
|
42
40
|
"execa": "5.1.1",
|
|
43
41
|
"gradient-string": "3.0.0",
|
|
44
42
|
"klaw-sync": "7.0.0",
|
|
45
|
-
"semver": "7.8.5",
|
|
46
43
|
"systeminformation": "5.33.13",
|
|
47
44
|
"termi-link": "1.1.0",
|
|
48
45
|
"untildify": "4.0.0",
|
|
49
46
|
"uuid": "11.1.1",
|
|
47
|
+
"verkit": "0.5.0",
|
|
50
48
|
"vitest": "4.1.11",
|
|
51
49
|
"yargs": "17.7.3"
|
|
52
50
|
},
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"target": "es2023",
|
|
6
6
|
"module": "ESNext",
|
|
7
7
|
"moduleResolution": "Bundler",
|
|
8
|
-
"allowImportingTsExtensions": true,
|
|
9
8
|
"skipLibCheck": false,
|
|
10
9
|
"rootDirs": [
|
|
11
10
|
"./src",
|
|
@@ -35,8 +34,9 @@
|
|
|
35
34
|
},
|
|
36
35
|
"include": [
|
|
37
36
|
"src",
|
|
37
|
+
"db",
|
|
38
38
|
"../.cedar/types/includes/all-*",
|
|
39
39
|
"../.cedar/types/includes/api-*",
|
|
40
40
|
"../types"
|
|
41
41
|
]
|
|
42
|
-
}
|
|
42
|
+
}
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api",
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@
|
|
8
|
-
"@
|
|
9
|
-
"@
|
|
10
|
-
"@
|
|
11
|
-
"better-sqlite3": "12.11.1"
|
|
7
|
+
"@prisma/adapter-better-sqlite3": "7.10.0",
|
|
8
|
+
"@prisma/client": "7.10.0",
|
|
9
|
+
"@cedarjs/api": "7.0.1-next.307",
|
|
10
|
+
"@cedarjs/graphql-server": "7.0.1-next.307",
|
|
11
|
+
"better-sqlite3": "12.11.1",
|
|
12
|
+
"@cedarjs/context": "7.0.1-next.307",
|
|
13
|
+
"graphql-tag": "2.12.7"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@cedarjs/vite": "7.0.1-next.307",
|
|
17
|
+
"vitest": "4.1.11"
|
|
12
18
|
}
|
|
13
19
|
}
|
|
@@ -26,7 +26,7 @@ export const requireAuth = ({ roles }) => {
|
|
|
26
26
|
|
|
27
27
|
export const getCurrentUser = async () => {
|
|
28
28
|
throw new Error(
|
|
29
|
-
'Auth is not set up yet. See https://cedarjs.com/docs/authentication ' +
|
|
30
|
-
'
|
|
29
|
+
'Auth is not set up yet. See https://cedarjs.com/docs/authentication to ' +
|
|
30
|
+
'get started'
|
|
31
31
|
)
|
|
32
32
|
}
|
|
@@ -18,7 +18,9 @@ const resolveSqliteUrl = (url = 'file:./db/dev.db') => {
|
|
|
18
18
|
return url
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const apiDir = getPaths().api.base
|
|
22
|
+
|
|
23
|
+
return `file:${path.resolve(apiDir, url.slice('file:'.length))}`
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const adapter = new PrismaBetterSqlite3({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"api",
|
|
6
6
|
"web"
|
|
@@ -13,16 +13,21 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "7.0.
|
|
16
|
+
"@cedarjs/api-server": "7.0.1-next.307"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "7.0.
|
|
20
|
-
"@cedarjs/eslint-config": "7.0.
|
|
21
|
-
"@cedarjs/project-config": "7.0.
|
|
22
|
-
"@cedarjs/testing": "7.0.
|
|
19
|
+
"@cedarjs/core": "7.0.1-next.307",
|
|
20
|
+
"@cedarjs/eslint-config": "7.0.1-next.307",
|
|
21
|
+
"@cedarjs/project-config": "7.0.1-next.307",
|
|
22
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
23
|
+
"vitest": "4.1.11"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|
|
25
26
|
"node": "24.x"
|
|
26
27
|
},
|
|
27
|
-
"packageManager": "yarn@4.14.1"
|
|
28
|
+
"packageManager": "yarn@4.14.1",
|
|
29
|
+
"resolutions": {
|
|
30
|
+
"react-is": "19.3.0",
|
|
31
|
+
"vite": "7.3.6"
|
|
32
|
+
}
|
|
28
33
|
}
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
"target": "es2023",
|
|
6
6
|
"module": "node20",
|
|
7
7
|
"moduleResolution": "node16",
|
|
8
|
-
"allowImportingTsExtensions": true,
|
|
9
8
|
"rootDirs": [
|
|
10
9
|
"../api/src",
|
|
11
10
|
"../.cedar/types/mirror/api/src",
|
|
@@ -58,4 +57,4 @@
|
|
|
58
57
|
"../.cedar/types/includes/web-*",
|
|
59
58
|
"../types"
|
|
60
59
|
]
|
|
61
|
-
}
|
|
60
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web",
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"browserslist": {
|
|
@@ -12,15 +12,19 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cedarjs/forms": "7.0.
|
|
16
|
-
"@cedarjs/router": "7.0.
|
|
17
|
-
"@cedarjs/web": "7.0.
|
|
18
|
-
"react": "
|
|
19
|
-
"react-dom": "
|
|
15
|
+
"@cedarjs/forms": "7.0.1-next.307",
|
|
16
|
+
"@cedarjs/router": "7.0.1-next.307",
|
|
17
|
+
"@cedarjs/web": "7.0.1-next.307",
|
|
18
|
+
"react": "19.3.0",
|
|
19
|
+
"react-dom": "19.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "7.0.
|
|
23
|
-
"@types/react": "^
|
|
24
|
-
"@types/react-dom": "^
|
|
22
|
+
"@cedarjs/vite": "7.0.1-next.307",
|
|
23
|
+
"@types/react": "^19.2.0",
|
|
24
|
+
"@types/react-dom": "^19.2.0",
|
|
25
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
26
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
27
|
+
"@testing-library/react": "16.3.3",
|
|
28
|
+
"vite": "7.3.6"
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
/// <reference types="vitest/config" />
|
|
2
|
+
|
|
1
3
|
import { defineConfig } from 'vite'
|
|
2
4
|
|
|
3
5
|
import { cedar } from '@cedarjs/vite'
|
|
4
6
|
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [cedar()],
|
|
7
|
-
|
|
7
|
+
export default defineConfig(({ mode }) => ({
|
|
8
|
+
plugins: [cedar({ mode })],
|
|
9
|
+
test: {
|
|
10
|
+
environment: 'jsdom',
|
|
11
|
+
setupFiles: ['./vitest.setup.js'],
|
|
12
|
+
// Enables global test APIs like describe, it, expect
|
|
13
|
+
globals: true,
|
|
14
|
+
},
|
|
15
|
+
}))
|
|
@@ -13,21 +13,21 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "7.0.
|
|
16
|
+
"@cedarjs/api-server": "7.0.1-next.307"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@cedarjs/
|
|
21
|
-
"@cedarjs/
|
|
22
|
-
"@cedarjs/
|
|
23
|
-
"
|
|
24
|
-
"vitest": "4.1.
|
|
19
|
+
"prisma": "7.10.0",
|
|
20
|
+
"@cedarjs/core": "7.0.1-next.307",
|
|
21
|
+
"@cedarjs/eslint-config": "7.0.1-next.307",
|
|
22
|
+
"@cedarjs/project-config": "7.0.1-next.307",
|
|
23
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
24
|
+
"vitest": "4.1.11"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": "24.x"
|
|
28
28
|
},
|
|
29
29
|
"overrides": {
|
|
30
|
-
"react-is": "19.
|
|
30
|
+
"react-is": "19.3.0",
|
|
31
31
|
"vite": "7.3.6"
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
"start:web": "cedarjs-server web"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@cedarjs/api-server": "7.0.
|
|
12
|
+
"@cedarjs/api-server": "7.0.1-next.307"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"
|
|
16
|
-
"@cedarjs/
|
|
17
|
-
"@cedarjs/
|
|
18
|
-
"@cedarjs/
|
|
19
|
-
"
|
|
20
|
-
"vitest": "4.1.
|
|
15
|
+
"prisma": "7.10.0",
|
|
16
|
+
"@cedarjs/core": "7.0.1-next.307",
|
|
17
|
+
"@cedarjs/eslint-config": "7.0.1-next.307",
|
|
18
|
+
"@cedarjs/project-config": "7.0.1-next.307",
|
|
19
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
20
|
+
"vitest": "4.1.11"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
23
|
"node": "24.x",
|
|
@@ -13,22 +13,22 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "7.0.
|
|
16
|
+
"@cedarjs/api-server": "7.0.1-next.307"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@cedarjs/
|
|
21
|
-
"@cedarjs/
|
|
22
|
-
"@cedarjs/
|
|
23
|
-
"
|
|
24
|
-
"vitest": "4.1.
|
|
19
|
+
"prisma": "7.10.0",
|
|
20
|
+
"@cedarjs/core": "7.0.1-next.307",
|
|
21
|
+
"@cedarjs/eslint-config": "7.0.1-next.307",
|
|
22
|
+
"@cedarjs/project-config": "7.0.1-next.307",
|
|
23
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
24
|
+
"vitest": "4.1.11"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
27
|
"node": "24.x"
|
|
28
28
|
},
|
|
29
29
|
"packageManager": "yarn@4.14.1",
|
|
30
30
|
"resolutions": {
|
|
31
|
-
"react-is": "19.
|
|
31
|
+
"react-is": "19.3.0",
|
|
32
32
|
"vite": "7.3.6"
|
|
33
33
|
},
|
|
34
34
|
"dependenciesMeta": {
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api",
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@
|
|
8
|
-
"@
|
|
9
|
-
"@
|
|
10
|
-
"@
|
|
11
|
-
"better-sqlite3": "12.11.1"
|
|
7
|
+
"@prisma/adapter-better-sqlite3": "7.10.0",
|
|
8
|
+
"@prisma/client": "7.10.0",
|
|
9
|
+
"@cedarjs/api": "7.0.1-next.307",
|
|
10
|
+
"@cedarjs/graphql-server": "7.0.1-next.307",
|
|
11
|
+
"better-sqlite3": "12.11.1",
|
|
12
|
+
"@cedarjs/context": "7.0.1-next.307",
|
|
13
|
+
"graphql-tag": "2.12.7"
|
|
14
|
+
},
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@cedarjs/vite": "7.0.1-next.307",
|
|
17
|
+
"vitest": "4.1.11"
|
|
12
18
|
}
|
|
13
19
|
}
|
|
@@ -26,7 +26,7 @@ export const requireAuth = ({ roles }) => {
|
|
|
26
26
|
|
|
27
27
|
export const getCurrentUser = async () => {
|
|
28
28
|
throw new Error(
|
|
29
|
-
'Auth is not set up yet. See https://cedarjs.com/docs/authentication ' +
|
|
30
|
-
'
|
|
29
|
+
'Auth is not set up yet. See https://cedarjs.com/docs/authentication to ' +
|
|
30
|
+
'get started'
|
|
31
31
|
)
|
|
32
32
|
}
|
|
@@ -18,7 +18,9 @@ const resolveSqliteUrl = (url = 'file:./db/dev.db') => {
|
|
|
18
18
|
return url
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
const apiDir = getPaths().api.base
|
|
22
|
+
|
|
23
|
+
return `file:${path.resolve(apiDir, url.slice('file:'.length))}`
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
const adapter = new PrismaBetterSqlite3({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"private": true,
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"workspaces": [
|
|
5
5
|
"api",
|
|
6
6
|
"web"
|
|
@@ -13,16 +13,21 @@
|
|
|
13
13
|
"start:web": "cedarjs-server web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@cedarjs/api-server": "7.0.
|
|
16
|
+
"@cedarjs/api-server": "7.0.1-next.307"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@cedarjs/core": "7.0.
|
|
20
|
-
"@cedarjs/eslint-config": "7.0.
|
|
21
|
-
"@cedarjs/project-config": "7.0.
|
|
22
|
-
"@cedarjs/testing": "7.0.
|
|
19
|
+
"@cedarjs/core": "7.0.1-next.307",
|
|
20
|
+
"@cedarjs/eslint-config": "7.0.1-next.307",
|
|
21
|
+
"@cedarjs/project-config": "7.0.1-next.307",
|
|
22
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
23
|
+
"vitest": "4.1.11"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|
|
25
26
|
"node": "24.x"
|
|
26
27
|
},
|
|
27
|
-
"packageManager": "yarn@4.14.1"
|
|
28
|
+
"packageManager": "yarn@4.14.1",
|
|
29
|
+
"resolutions": {
|
|
30
|
+
"react-is": "19.3.0",
|
|
31
|
+
"vite": "7.3.6"
|
|
32
|
+
}
|
|
28
33
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web",
|
|
3
|
-
"type": "
|
|
3
|
+
"type": "module",
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"private": true,
|
|
6
6
|
"browserslist": {
|
|
@@ -12,15 +12,19 @@
|
|
|
12
12
|
]
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cedarjs/forms": "7.0.
|
|
16
|
-
"@cedarjs/router": "7.0.
|
|
17
|
-
"@cedarjs/web": "7.0.
|
|
18
|
-
"react": "
|
|
19
|
-
"react-dom": "
|
|
15
|
+
"@cedarjs/forms": "7.0.1-next.307",
|
|
16
|
+
"@cedarjs/router": "7.0.1-next.307",
|
|
17
|
+
"@cedarjs/web": "7.0.1-next.307",
|
|
18
|
+
"react": "19.3.0",
|
|
19
|
+
"react-dom": "19.3.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@cedarjs/vite": "7.0.
|
|
23
|
-
"@types/react": "^
|
|
24
|
-
"@types/react-dom": "^
|
|
22
|
+
"@cedarjs/vite": "7.0.1-next.307",
|
|
23
|
+
"@types/react": "^19.2.0",
|
|
24
|
+
"@types/react-dom": "^19.2.0",
|
|
25
|
+
"@cedarjs/testing": "7.0.1-next.307",
|
|
26
|
+
"@testing-library/jest-dom": "6.9.1",
|
|
27
|
+
"@testing-library/react": "16.3.3",
|
|
28
|
+
"vite": "7.3.6"
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
+
/// <reference types="vitest/config" />
|
|
2
|
+
|
|
1
3
|
import { defineConfig } from 'vite'
|
|
2
4
|
|
|
3
5
|
import { cedar } from '@cedarjs/vite'
|
|
4
6
|
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
plugins: [cedar()],
|
|
7
|
-
|
|
7
|
+
export default defineConfig(({ mode }) => ({
|
|
8
|
+
plugins: [cedar({ mode })],
|
|
9
|
+
test: {
|
|
10
|
+
environment: 'jsdom',
|
|
11
|
+
setupFiles: ['./vitest.setup.ts'],
|
|
12
|
+
// Enables global test APIs like describe, it, expect
|
|
13
|
+
globals: true,
|
|
14
|
+
},
|
|
15
|
+
}))
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# .cedar
|
|
2
|
-
|
|
3
|
-
## What is this directory?
|
|
4
|
-
|
|
5
|
-
Cedar uses this `.cedar` directory to store transitory data that aids in the smooth and convenient operation of your Cedar project.
|
|
6
|
-
|
|
7
|
-
## Do I need to do anything with this directory?
|
|
8
|
-
|
|
9
|
-
No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Cedar.
|
|
10
|
-
|
|
11
|
-
You don't need to commit any other contents of this directory to your version control system. It's ignored by default.
|
|
12
|
-
|
|
13
|
-
## What's in this directory?
|
|
14
|
-
|
|
15
|
-
### Files
|
|
16
|
-
|
|
17
|
-
| Name | Description |
|
|
18
|
-
| :---------------- | :----------------------------------------------------------------------------------------------------------------- |
|
|
19
|
-
| commandCache.json | This file contains mappings to assist the Cedar CLI in efficiently executing commands. |
|
|
20
|
-
| schema.graphql | This is the GraphQL schema which has been automatically generated from your Cedar project. |
|
|
21
|
-
| telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. |
|
|
22
|
-
| test.db | The sqlite database used when running tests. |
|
|
23
|
-
|
|
24
|
-
### Directories
|
|
25
|
-
|
|
26
|
-
| Name | Description |
|
|
27
|
-
| :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
-
| locks | Stores temporary files that Cedar uses to keep track of the execution of async/background tasks between processes. |
|
|
29
|
-
| logs | Stores log files for background tasks such as update checking. |
|
|
30
|
-
| prebuild | Stores transpiled JavaScript that is generated as part of Cedar's build process. |
|
|
31
|
-
| telemetry | Stores the recent telemetry that the Cedar CLI has generated. You may inspect these files to see everything Cedar is anonymously collecting. |
|
|
32
|
-
| types | Stores the results of type generation. |
|
|
33
|
-
| updateCheck | Stores a file which contains the results of checking for Cedar updates. |
|
|
34
|
-
| studio | Used to store data for `cedar studio` |
|
|
35
|
-
|
|
36
|
-
We try to keep this README up to date but you may, from time to time, find other files or directories in this `.cedar` directory that have not yet been documented here. This is likely nothing to worry about but feel free to let us know and we'll update this list.
|
|
37
|
-
|
|
38
|
-
### Telemetry
|
|
39
|
-
|
|
40
|
-
CedarJS collects completely anonymous telemetry data about general usage. For transparency, that data is viewable in the respective directories and files. To learn more and manage your project's settings, visit [telemetry.redwoodjs.com](https://telemetry.redwoodjs.com).
|
|
41
|
-
|
|
42
|
-
### Have any questions?
|
|
43
|
-
|
|
44
|
-
Feel free to reach out to us on the [CedarJS Discord](https://cedarjs.com/discord) if you have any questions.
|
package/templates/esm-js/.env
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
# THIS FILE SHOULD NOT BE CHECKED INTO YOUR VERSION CONTROL SYSTEM
|
|
2
|
-
#
|
|
3
|
-
# Environment variables set here will override those in .env.defaults.
|
|
4
|
-
# Any environment variables you need in production you will need to setup with
|
|
5
|
-
# your hosting provider. For example in Netlify you can add environment
|
|
6
|
-
# variables in Settings > Build & Deploy > environment
|
|
7
|
-
#
|
|
8
|
-
# DATABASE_URL=postgres://user:pass@postgreshost.com:5432/database_name
|
|
9
|
-
# TEST_DATABASE_URL=postgres://user:pass@postgreshost.com:5432/test_database_name
|
|
10
|
-
#
|
|
11
|
-
# Sets an app-specific secret used to sign and verify your own app's webhooks.
|
|
12
|
-
# For example if you schedule a cron job with a signed payload that later will
|
|
13
|
-
# then invoke your api-side webhook function you will use this secret to sign and the verify.
|
|
14
|
-
# Important: Please change this default to a strong password or other secret
|
|
15
|
-
# WEBHOOK_SECRET=THIS_IS_NOT_SECRET_PLEASE_CHANGE
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
# These environment variables will be used by default if you do not create any
|
|
2
|
-
# yourself in .env. This file should be safe to check into your version control
|
|
3
|
-
# system. Any custom values should go in .env and .env should *not* be checked
|
|
4
|
-
# into version control.
|
|
5
|
-
|
|
6
|
-
# schema.prisma defaults
|
|
7
|
-
DATABASE_URL=file:./db/dev.db
|
|
8
|
-
|
|
9
|
-
# location of the test database for api service scenarios (defaults to ./.cedar/test.db if not set)
|
|
10
|
-
# TEST_DATABASE_URL=file:./.cedar/test.db
|
|
11
|
-
|
|
12
|
-
# disables Prisma CLI update notifier
|
|
13
|
-
PRISMA_HIDE_UPDATE_MESSAGE=true
|
|
14
|
-
|
|
15
|
-
# Option to override the current environment's default api-side log level
|
|
16
|
-
# See: https://cedarjs.com/docs/logger for level options, defaults to "trace" otherwise.
|
|
17
|
-
# Most applications want "debug" or "info" during dev, "trace" when you have issues and "warn" in production.
|
|
18
|
-
# Ordered by how verbose they are: trace | debug | info | warn | error | silent
|
|
19
|
-
# LOG_LEVEL=debug
|