Skip to content

Commit 8836e8a

Browse files
authored
chore(test-project): Separate test project for testing framework changes (#1034)
1 parent 4f81194 commit 8836e8a

File tree

164 files changed

+25561
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

164 files changed

+25561
-0
lines changed

test-project/.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
end_of_line = lf
7+
indent_size = 2
8+
indent_style = space
9+
insert_final_newline = true
10+
trim_trailing_whitespace = true

test-project/.env.defaults

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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:./dev.db
8+
9+
# location of the test database for api service scenarios (defaults to ./.redwood/test.db if not set)
10+
# TEST_DATABASE_URL=file:./.redwood/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

test-project/.env.example

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# DATABASE_URL=file:./dev.db
2+
# TEST_DATABASE_URL=file:./.redwood/test.db
3+
# PRISMA_HIDE_UPDATE_MESSAGE=true
4+
# LOG_LEVEL=trace

test-project/.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.idea
2+
.DS_Store
3+
.env*
4+
!.env.example
5+
!.env.defaults
6+
.netlify
7+
.redwood/*
8+
!.redwood/README.md
9+
dev.db*
10+
dist
11+
dist-babel
12+
node_modules
13+
tsconfig.tsbuildinfo
14+
yarn-error.log
15+
web/public/mockServiceWorker.js
16+
web/types/graphql.d.ts
17+
api/types/graphql.d.ts
18+
api/src/lib/generateGraphiQLHeader.*
19+
.pnp.*
20+
.yarn/*
21+
!.yarn/patches
22+
!.yarn/plugins
23+
!.yarn/releases
24+
!.yarn/sdks
25+
!.yarn/versions

test-project/.redwood/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# .redwood
2+
3+
## What is this directory?
4+
5+
Cedar uses this `.redwood` 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 `rw 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 `.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+
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 in the [RedwoodJS Community](https://community.redwoodjs.com/) forum if you have any questions.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"recommendations": [
3+
"dbaeumer.vscode-eslint",
4+
"eamodio.gitlens",
5+
"ofhumanbondage.react-proptypes-intellisense",
6+
"mgmcdermott.vscode-language-babel",
7+
"wix.vscode-import-cost",
8+
"pflannery.vscode-versionlens",
9+
"editorconfig.editorconfig",
10+
"prisma.prisma",
11+
"graphql.vscode-graphql",
12+
"csstools.postcss",
13+
"bradlc.vscode-tailwindcss"
14+
],
15+
"unwantedRecommendations": []
16+
}

test-project/.vscode/launch.json

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{
2+
"version": "0.3.0",
3+
"configurations": [
4+
{
5+
"command": "yarn cedar dev --apiDebugPort 18911", // you can add --fwd='--open=false' to prevent the browser from opening
6+
"name": "Run Dev Server",
7+
"request": "launch",
8+
"type": "node-terminal"
9+
},
10+
{
11+
"name": "Attach API debugger",
12+
"port": 18911, // you can change this port, see https://cedarjs.com/docs/project-configuration-dev-test-build#debugger-configuration
13+
"request": "attach",
14+
"skipFiles": ["<node_internals>/**"],
15+
"type": "node",
16+
"localRoot": "${workspaceFolder}/node_modules/@cedarjs/api-server/dist",
17+
"remoteRoot": "${workspaceFolder}/node_modules/@cedarjs/api-server/dist",
18+
"sourceMaps": true,
19+
"restart": true,
20+
"preLaunchTask": "WaitForDevServer"
21+
},
22+
{
23+
"name": "Launch Web debugger",
24+
"type": "chrome",
25+
"request": "launch",
26+
"url": "http://localhost:8910",
27+
"webRoot": "${workspaceRoot}/web/src",
28+
"preLaunchTask": "WaitForDevServer"
29+
},
30+
{
31+
"command": "yarn cedar test api",
32+
"name": "Test api",
33+
"request": "launch",
34+
"type": "node-terminal"
35+
},
36+
{
37+
"command": "yarn cedar test web",
38+
"name": "Test web",
39+
"request": "launch",
40+
"type": "node-terminal"
41+
}
42+
],
43+
"compounds": [
44+
{
45+
"name": "Start Debug",
46+
"configurations": [
47+
"Run Dev Server",
48+
"Attach API debugger",
49+
"Launch Web debugger"
50+
],
51+
"stopAll": true
52+
}
53+
]
54+
}

test-project/.vscode/settings.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"editor.tabSize": 2,
3+
"files.trimTrailingWhitespace": true,
4+
"editor.formatOnSave": false,
5+
"editor.codeActionsOnSave": {
6+
"source.fixAll.eslint": "explicit"
7+
},
8+
"[prisma]": {
9+
"editor.formatOnSave": true
10+
},
11+
"tailwindCSS.classAttributes": [
12+
"class",
13+
"className",
14+
"activeClassName",
15+
"errorClassName"
16+
]
17+
}

test-project/.vscode/tasks.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "WaitForDevServer",
6+
"group": "none",
7+
"type": "shell",
8+
"command": "bash",
9+
"args": [
10+
"-c",
11+
"while ! echo -n > /dev/tcp/localhost/18911; do sleep 1; done;"
12+
],
13+
"windows": {
14+
"command": "powershell",
15+
"args": [
16+
"-NoProfile",
17+
"-ExecutionPolicy",
18+
"Bypass",
19+
"while (-not (Test-NetConnection -ComputerName localhost -Port 18911)) { Start-Sleep -Seconds 1 };"
20+
]
21+
},
22+
"presentation": {
23+
"reveal": "silent",
24+
"revealProblems": "onProblem",
25+
"panel": "shared",
26+
"close": true
27+
}
28+
}
29+
]
30+
}

test-project/.yarnrc.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Yarn's manifest file. You can configure yarn here.
2+
# See https://yarnpkg.com/configuration/yarnrc.
3+
4+
# For `node_modules` (see `nodeLinker` below), this is almost always the preferred option.
5+
compressionLevel: 0
6+
7+
enableGlobalCache: true
8+
9+
# Lets yarn use hardlinks inside `node_modules` to dedupe packages.
10+
# For a more pnpm-like experience, consider `hardlinks-global` where hardlinks point to a global store.
11+
nmMode: hardlinks-local
12+
13+
# How to install Node packages.
14+
# Heads up: right now, Cedar expects this to be `node-modules`.
15+
nodeLinker: node-modules

0 commit comments

Comments
 (0)