create-cedar-app 0.15.0 → 0.15.1-next.23

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.
Files changed (61) hide show
  1. package/README.md +2 -2
  2. package/dist/create-cedar-app.js +202 -202
  3. package/package.json +3 -3
  4. package/templates/esm-js/.env.defaults +1 -1
  5. package/templates/esm-js/.redwood/README.md +9 -9
  6. package/templates/esm-js/.vscode/launch.json +4 -4
  7. package/templates/esm-js/.yarnrc.yml +1 -1
  8. package/templates/esm-js/README.md +1 -1
  9. package/templates/esm-js/api/db/schema.prisma +1 -1
  10. package/templates/esm-js/api/src/lib/auth.js +3 -3
  11. package/templates/esm-js/redwood.toml +5 -5
  12. package/templates/esm-js/scripts/seed.js +1 -1
  13. package/templates/esm-js/web/public/README.md +1 -1
  14. package/templates/esm-js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +1 -1
  15. package/templates/esm-ts/.env.defaults +1 -1
  16. package/templates/esm-ts/.redwood/README.md +9 -9
  17. package/templates/esm-ts/.vscode/launch.json +4 -4
  18. package/templates/esm-ts/.yarnrc.yml +1 -1
  19. package/templates/esm-ts/README.md +1 -1
  20. package/templates/esm-ts/api/db/schema.prisma +1 -1
  21. package/templates/esm-ts/api/src/lib/auth.ts +4 -4
  22. package/templates/esm-ts/redwood.toml +5 -5
  23. package/templates/esm-ts/scripts/seed.ts +1 -1
  24. package/templates/esm-ts/web/public/README.md +1 -1
  25. package/templates/esm-ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +1 -1
  26. package/templates/js/.env.defaults +1 -1
  27. package/templates/js/.redwood/README.md +9 -9
  28. package/templates/js/.vscode/launch.json +4 -4
  29. package/templates/js/.yarnrc.yml +1 -1
  30. package/templates/js/README.md +1 -1
  31. package/templates/js/api/db/schema.prisma +1 -1
  32. package/templates/js/api/jest.config.js +1 -1
  33. package/templates/js/api/package.json +2 -2
  34. package/templates/js/api/src/lib/auth.js +4 -4
  35. package/templates/js/jest.config.js +2 -2
  36. package/templates/js/package.json +3 -3
  37. package/templates/js/redwood.toml +5 -5
  38. package/templates/js/scripts/seed.js +1 -1
  39. package/templates/js/web/jest.config.js +1 -1
  40. package/templates/js/web/package.json +4 -4
  41. package/templates/js/web/public/README.md +1 -1
  42. package/templates/js/web/src/pages/FatalErrorPage/FatalErrorPage.jsx +1 -1
  43. package/templates/ts/.env.defaults +1 -1
  44. package/templates/ts/.redwood/README.md +9 -9
  45. package/templates/ts/.vscode/launch.json +4 -4
  46. package/templates/ts/.yarnrc.yml +1 -1
  47. package/templates/ts/README.md +1 -1
  48. package/templates/ts/api/db/schema.prisma +1 -1
  49. package/templates/ts/api/jest.config.js +1 -1
  50. package/templates/ts/api/package.json +2 -2
  51. package/templates/ts/api/src/lib/auth.ts +3 -3
  52. package/templates/ts/jest.config.js +2 -2
  53. package/templates/ts/package.json +3 -3
  54. package/templates/ts/redwood.toml +5 -5
  55. package/templates/ts/scripts/seed.ts +1 -1
  56. package/templates/ts/web/jest.config.js +1 -1
  57. package/templates/ts/web/package.json +4 -4
  58. package/templates/ts/web/public/README.md +1 -1
  59. package/templates/ts/web/src/pages/FatalErrorPage/FatalErrorPage.tsx +1 -1
  60. package/templates/esm-js/.yarn/install-state.gz +0 -0
  61. package/templates/esm-ts/.yarn/install-state.gz +0 -0
@@ -7,9 +7,9 @@
7
7
  ]
8
8
  },
9
9
  "devDependencies": {
10
- "@cedarjs/core": "0.15.0",
11
- "@cedarjs/project-config": "0.15.0",
12
- "@cedarjs/testing": "0.15.0"
10
+ "@cedarjs/core": "0.15.1-next.23",
11
+ "@cedarjs/project-config": "0.15.1-next.23",
12
+ "@cedarjs/testing": "0.15.1-next.23"
13
13
  },
14
14
  "eslintConfig": {
15
15
  "extends": "@cedarjs/eslint-config",
@@ -1,9 +1,9 @@
1
- # This file contains the configuration settings for your Redwood app.
2
- # This file is also what makes your Redwood app a Redwood app.
3
- # If you remove it and try to run `yarn rw dev`, you'll get an error.
1
+ # This file contains the configuration settings for your Cedar app.
2
+ # This file is also what makes your Cedar app a Cedar app.
3
+ # If you remove it and try to run `yarn cedar dev`, you'll get an error.
4
4
  #
5
5
  # For the full list of options, see the "App Configuration: redwood.toml" doc:
6
- # https://redwoodjs.com/docs/app-configuration-redwood-toml
6
+ # https://cedarjs.com/docs/app-configuration-redwood-toml
7
7
 
8
8
  [web]
9
9
  title = "Cedar App"
@@ -11,7 +11,7 @@
11
11
  apiUrl = "/.redwood/functions"
12
12
  includeEnvironmentVariables = [
13
13
  # Add any ENV vars that should be available to the web side to this array
14
- # See https://redwoodjs.com/docs/environment-variables#web
14
+ # See https://cedarjs.com/docs/environment-variables#web
15
15
  ]
16
16
  [api]
17
17
  port = 8911
@@ -5,7 +5,7 @@
5
5
  // Seeds automatically run the first time you run the `yarn rw prisma migrate dev`
6
6
  // command and every time you run the `yarn rw prisma migrate reset` command.
7
7
  //
8
- // See https://redwoodjs.com/docs/database-seeds for more info
8
+ // See https://cedarjs.com/docs/database-seeds for more info
9
9
 
10
10
  export default async () => {
11
11
  try {
@@ -1,4 +1,4 @@
1
- // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
1
+ // More info at https://cedarjs.com/docs/project-configuration-dev-test-build
2
2
 
3
3
  const config = {
4
4
  rootDir: '../',
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "dependencies": {
14
- "@cedarjs/forms": "0.15.0",
15
- "@cedarjs/router": "0.15.0",
16
- "@cedarjs/web": "0.15.0",
14
+ "@cedarjs/forms": "0.15.1-next.23",
15
+ "@cedarjs/router": "0.15.1-next.23",
16
+ "@cedarjs/web": "0.15.1-next.23",
17
17
  "react": "18.3.1",
18
18
  "react-dom": "18.3.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@cedarjs/vite": "0.15.0",
21
+ "@cedarjs/vite": "0.15.1-next.23",
22
22
  "@types/react": "^18.2.55",
23
23
  "@types/react-dom": "^18.2.19"
24
24
  }
@@ -1,6 +1,6 @@
1
1
  # Static Assets
2
2
 
3
- Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn rw dev`.
3
+ Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn cedar dev`.
4
4
 
5
5
  > Note: files will _not_ hot reload while the development server is running. You'll need to manually stop/start to access file changes.
6
6
 
@@ -3,7 +3,7 @@
3
3
  // boundary.
4
4
  //
5
5
  // You can modify this page as you wish, but it is important to keep things simple to
6
- // avoid the possibility that it will cause its own error. If it does, Redwood will
6
+ // avoid the possibility that it will cause its own error. If it does, Cedar will
7
7
  // still render a generic error page, but your users will prefer something a bit more
8
8
  // thoughtful :)
9
9
 
@@ -13,7 +13,7 @@ DATABASE_URL=file:./dev.db
13
13
  PRISMA_HIDE_UPDATE_MESSAGE=true
14
14
 
15
15
  # Option to override the current environment's default api-side log level
16
- # See: https://redwoodjs.com/docs/logger for level options, defaults to "trace" otherwise.
16
+ # See: https://cedarjs.com/docs/logger for level options, defaults to "trace" otherwise.
17
17
  # Most applications want "debug" or "info" during dev, "trace" when you have issues and "warn" in production.
18
18
  # Ordered by how verbose they are: trace | debug | info | warn | error | silent
19
19
  # LOG_LEVEL=debug
@@ -2,11 +2,11 @@
2
2
 
3
3
  ## What is this directory?
4
4
 
5
- Redwood uses this `.redwood` directory to store transitory data that aids in the smooth and convenient operation of your Redwood project.
5
+ Cedar uses this `.redwood` directory to store transitory data that aids in the smooth and convenient operation of your Cedar project.
6
6
 
7
7
  ## Do I need to do anything with this directory?
8
8
 
9
- No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Redwood.
9
+ No. You shouldn't have to create, edit or delete anything in this directory in your day-to-day work with Cedar.
10
10
 
11
11
  You don't need to commit any other contents of this directory to your version control system. It's ignored by default.
12
12
 
@@ -16,8 +16,8 @@ You don't need to commit any other contents of this directory to your version co
16
16
 
17
17
  | Name | Description |
18
18
  | :---------------- | :----------------------------------------------------------------------------------------------------------------- |
19
- | commandCache.json | This file contains mappings to assist the Redwood CLI in efficiently executing commands. |
20
- | schema.graphql | This is the GraphQL schema which has been automatically generated from your Redwood project. |
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
21
  | telemetry.txt | Contains a unique ID used for telemetry. This value is rotated every 24 hours to protect your project's anonymity. |
22
22
  | test.db | The sqlite database used when running tests. |
23
23
 
@@ -25,19 +25,19 @@ You don't need to commit any other contents of this directory to your version co
25
25
 
26
26
  | Name | Description |
27
27
  | :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | locks | Stores temporary files that Redwood uses to keep track of the execution of async/background tasks between processes. |
28
+ | locks | Stores temporary files that Cedar uses to keep track of the execution of async/background tasks between processes. |
29
29
  | logs | Stores log files for background tasks such as update checking. |
30
- | prebuild | Stores transpiled JavaScript that is generated as part of Redwood's build process. |
31
- | telemetry | Stores the recent telemetry that the Redwood CLI has generated. You may inspect these files to see everything Redwood is anonymously collecting. |
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
32
  | types | Stores the results of type generation. |
33
- | updateCheck | Stores a file which contains the results of checking for Redwood updates. |
33
+ | updateCheck | Stores a file which contains the results of checking for Cedar updates. |
34
34
  | studio | Used to store data for `rw studio` |
35
35
 
36
36
  We try to keep this README up to date but you may, from time to time, find other files or directories in this `.redwood` 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
37
 
38
38
  ### Telemetry
39
39
 
40
- RedwoodJS 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).
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
41
 
42
42
  ### Have any questions?
43
43
 
@@ -2,14 +2,14 @@
2
2
  "version": "0.3.0",
3
3
  "configurations": [
4
4
  {
5
- "command": "yarn redwood dev --apiDebugPort 18911", // you can add --fwd='--open=false' to prevent the browser from opening
5
+ "command": "yarn cedar dev --apiDebugPort 18911", // you can add --fwd='--open=false' to prevent the browser from opening
6
6
  "name": "Run Dev Server",
7
7
  "request": "launch",
8
8
  "type": "node-terminal"
9
9
  },
10
10
  {
11
11
  "name": "Attach API debugger",
12
- "port": 18911, // you can change this port, see https://redwoodjs.com/docs/project-configuration-dev-test-build#debugger-configuration
12
+ "port": 18911, // you can change this port, see https://cedarjs.com/docs/project-configuration-dev-test-build#debugger-configuration
13
13
  "request": "attach",
14
14
  "skipFiles": [
15
15
  "<node_internals>/**"
@@ -30,13 +30,13 @@
30
30
  "preLaunchTask": "WaitForDevServer",
31
31
  },
32
32
  {
33
- "command": "yarn redwood test api",
33
+ "command": "yarn cedar test api",
34
34
  "name": "Test api",
35
35
  "request": "launch",
36
36
  "type": "node-terminal"
37
37
  },
38
38
  {
39
- "command": "yarn redwood test web",
39
+ "command": "yarn cedar test web",
40
40
  "name": "Test web",
41
41
  "request": "launch",
42
42
  "type": "node-terminal"
@@ -11,5 +11,5 @@ enableGlobalCache: true
11
11
  nmMode: hardlinks-local
12
12
 
13
13
  # How to install Node packages.
14
- # Heads up: right now, Redwood expects this to be `node-modules`.
14
+ # Heads up: right now, Cedar expects this to be `node-modules`.
15
15
  nodeLinker: node-modules
@@ -11,7 +11,7 @@ yarn install
11
11
  Then start the development server:
12
12
 
13
13
  ```
14
- yarn redwood dev
14
+ yarn cedar dev
15
15
  ```
16
16
 
17
17
  Your browser should automatically open to [http://localhost:8910](http://localhost:8910) where you'll see the Welcome Page, which links out to many great resources.
@@ -14,7 +14,7 @@ generator client {
14
14
  binaryTargets = "native"
15
15
  }
16
16
 
17
- // Define your own datamodels here and run `yarn redwood prisma migrate dev`
17
+ // Define your own datamodels here and run `yarn cedar prisma migrate dev`
18
18
  // to create migrations for them and apply to your dev DB.
19
19
  // TODO: Please remove the following example:
20
20
  model UserExample {
@@ -1,4 +1,4 @@
1
- // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
1
+ // More info at https://cedarjs.com/docs/project-configuration-dev-test-build
2
2
 
3
3
  const config = {
4
4
  rootDir: '../',
@@ -3,7 +3,7 @@
3
3
  "version": "0.0.0",
4
4
  "private": true,
5
5
  "dependencies": {
6
- "@cedarjs/api": "0.15.0",
7
- "@cedarjs/graphql-server": "0.15.0"
6
+ "@cedarjs/api": "0.15.1-next.23",
7
+ "@cedarjs/graphql-server": "0.15.1-next.23"
8
8
  }
9
9
  }
@@ -5,7 +5,7 @@
5
5
  * have something to check against, simulating a logged
6
6
  * in user that is allowed to access that service.
7
7
  *
8
- * See https://redwoodjs.com/docs/authentication for more info.
8
+ * See https://cedarjs.com/docs/authentication for more info.
9
9
  */
10
10
  export const isAuthenticated = () => {
11
11
  return true
@@ -15,7 +15,7 @@ export const hasRole = ({ roles }) => {
15
15
  return roles !== undefined
16
16
  }
17
17
 
18
- // This is used by the redwood directive
18
+ // This is used by the cedar directive
19
19
  // in ./api/src/directives/requireAuth
20
20
 
21
21
  // Roles are passed in by the requireAuth directive if you have auth setup
@@ -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://redwoodjs.com/docs/authentication ' +
29
+ 'Auth is not set up yet. See https://cedarjs.com/docs/authentication ' +
30
30
  'to get started'
31
31
  )
32
32
  }
@@ -1,6 +1,6 @@
1
- // This the Redwood root jest config
1
+ // This the Cedar root jest config
2
2
  // Each side, e.g. ./web/ and ./api/ has specific config that references this root
3
- // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
3
+ // More info at https://cedarjs.com/docs/project-configuration-dev-test-build
4
4
 
5
5
  module.exports = {
6
6
  rootDir: '.',
@@ -7,9 +7,9 @@
7
7
  ]
8
8
  },
9
9
  "devDependencies": {
10
- "@cedarjs/core": "0.15.0",
11
- "@cedarjs/project-config": "0.15.0",
12
- "@cedarjs/testing": "0.15.0"
10
+ "@cedarjs/core": "0.15.1-next.23",
11
+ "@cedarjs/project-config": "0.15.1-next.23",
12
+ "@cedarjs/testing": "0.15.1-next.23"
13
13
  },
14
14
  "eslintConfig": {
15
15
  "extends": "@cedarjs/eslint-config",
@@ -1,9 +1,9 @@
1
- # This file contains the configuration settings for your Redwood app.
2
- # This file is also what makes your Redwood app a Redwood app.
3
- # If you remove it and try to run `yarn rw dev`, you'll get an error.
1
+ # This file contains the configuration settings for your Cedar app.
2
+ # This file is also what makes your Cedar app a Cedar app.
3
+ # If you remove it and try to run `yarn cedar dev`, you'll get an error.
4
4
  #
5
5
  # For the full list of options, see the "App Configuration: redwood.toml" doc:
6
- # https://redwoodjs.com/docs/app-configuration-redwood-toml
6
+ # https://cedarjs.com/docs/app-configuration-redwood-toml
7
7
 
8
8
  [web]
9
9
  title = "Cedar App"
@@ -11,7 +11,7 @@
11
11
  apiUrl = "/.redwood/functions"
12
12
  includeEnvironmentVariables = [
13
13
  # Add any ENV vars that should be available to the web side to this array
14
- # See https://redwoodjs.com/docs/environment-variables#web
14
+ # See https://cedarjs.com/docs/environment-variables#web
15
15
  ]
16
16
  [api]
17
17
  port = 8911
@@ -5,7 +5,7 @@
5
5
  // Seeds automatically run the first time you run the `yarn rw prisma migrate dev`
6
6
  // command and every time you run the `yarn rw prisma migrate reset` command.
7
7
  //
8
- // See https://redwoodjs.com/docs/database-seeds for more info
8
+ // See https://cedarjs.com/docs/database-seeds for more info
9
9
 
10
10
  export default async () => {
11
11
  try {
@@ -1,4 +1,4 @@
1
- // More info at https://redwoodjs.com/docs/project-configuration-dev-test-build
1
+ // More info at https://cedarjs.com/docs/project-configuration-dev-test-build
2
2
 
3
3
  const config = {
4
4
  rootDir: '../',
@@ -11,14 +11,14 @@
11
11
  ]
12
12
  },
13
13
  "dependencies": {
14
- "@cedarjs/forms": "0.15.0",
15
- "@cedarjs/router": "0.15.0",
16
- "@cedarjs/web": "0.15.0",
14
+ "@cedarjs/forms": "0.15.1-next.23",
15
+ "@cedarjs/router": "0.15.1-next.23",
16
+ "@cedarjs/web": "0.15.1-next.23",
17
17
  "react": "18.3.1",
18
18
  "react-dom": "18.3.1"
19
19
  },
20
20
  "devDependencies": {
21
- "@cedarjs/vite": "0.15.0",
21
+ "@cedarjs/vite": "0.15.1-next.23",
22
22
  "@types/react": "^18.2.55",
23
23
  "@types/react-dom": "^18.2.19"
24
24
  }
@@ -1,6 +1,6 @@
1
1
  # Static Assets
2
2
 
3
- Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn rw dev`.
3
+ Use this folder to add static files directly to your app. All included files and folders will be copied directly into the `/dist` folder (created when Vite builds for production). They will also be available during development when you run `yarn cedar dev`.
4
4
 
5
5
  > Note: files will _not_ hot reload while the development server is running. You'll need to manually stop/start to access file changes.
6
6
 
@@ -3,7 +3,7 @@
3
3
  // boundary.
4
4
  //
5
5
  // You can modify this page as you wish, but it is important to keep things simple to
6
- // avoid the possibility that it will cause its own error. If it does, Redwood will
6
+ // avoid the possibility that it will cause its own error. If it does, Cedar will
7
7
  // still render a generic error page, but your users will prefer something a bit more
8
8
  // thoughtful :)
9
9