Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ jobs:
(cd reactjs-todo-journey && npm run e2e -- --shard=${{ matrix.shardIndex }}/4)
(cd reactjs-todo-oidc && npm run e2e -- --shard=${{ matrix.shardIndex }}/4)
(cd reactjs-todo-davinci && npm run e2e -- --shard=${{ matrix.shardIndex }}/4)
(cd reactjs-todo-login-widget && npm run e2e -- --shard=${{ matrix.shardIndex }}/4)
env:
REST_OAUTH_SECRET: ${{ secrets.REST_OAUTH_SECRET }}

Expand All @@ -56,3 +57,5 @@ jobs:
./javascript/reactjs-todo-oidc/playwright-report
./javascript/reactjs-todo-davinci/test-results
./javascript/reactjs-todo-davinci/playwright-report
./javascript/reactjs-todo-login-widget/test-results
./javascript/reactjs-todo-login-widget/playwright-report
268 changes: 0 additions & 268 deletions javascript/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions javascript/reactjs-todo-davinci/.env.example
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
API_URL=
DEBUGGER_OFF=true
DEVELOPMENT=
PORT=
WELLKNOWN_URL=
WEB_OAUTH_CLIENT=
API_URL=http://localhost:9443
DEBUGGER_OFF=true
DEVELOPMENT=true
PORT=8443
SCOPE="openid profile email phone name revoke"
Comment on lines +1 to 7
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Reorder env keys to satisfy dotenv-linter

Line 1 through Line 7 currently trigger [UnorderedKey] warnings. If dotenv-linter is enforced in CI, this can fail checks even though values are correct.

Suggested reorder
-WELLKNOWN_URL=
-WEB_OAUTH_CLIENT=
 API_URL=http://localhost:9443
 DEBUGGER_OFF=true
 DEVELOPMENT=true
 PORT=8443
 SCOPE="openid profile email phone name revoke"
+WEB_OAUTH_CLIENT=
+WELLKNOWN_URL=
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
WELLKNOWN_URL=
WEB_OAUTH_CLIENT=
API_URL=http://localhost:9443
DEBUGGER_OFF=true
DEVELOPMENT=true
PORT=8443
SCOPE="openid profile email phone name revoke"
API_URL=http://localhost:9443
DEBUGGER_OFF=true
DEVELOPMENT=true
PORT=8443
SCOPE="openid profile email phone name revoke"
WEB_OAUTH_CLIENT=
WELLKNOWN_URL=
🧰 Tools
🪛 dotenv-linter (4.0.0)

[warning] 2-2: [UnorderedKey] The WEB_OAUTH_CLIENT key should go before the WELLKNOWN_URL key

(UnorderedKey)


[warning] 3-3: [UnorderedKey] The API_URL key should go before the WEB_OAUTH_CLIENT key

(UnorderedKey)


[warning] 4-4: [UnorderedKey] The DEBUGGER_OFF key should go before the WEB_OAUTH_CLIENT key

(UnorderedKey)


[warning] 5-5: [UnorderedKey] The DEVELOPMENT key should go before the WEB_OAUTH_CLIENT key

(UnorderedKey)


[warning] 6-6: [UnorderedKey] The PORT key should go before the WEB_OAUTH_CLIENT key

(UnorderedKey)


[warning] 7-7: [UnorderedKey] The SCOPE key should go before the WEB_OAUTH_CLIENT key

(UnorderedKey)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@javascript/reactjs-todo-davinci/.env.example` around lines 1 - 7, Reorder the
keys in .env.example to satisfy dotenv-linter's UnorderedKey rule: sort the
environment variable entries (WELLKNOWN_URL, WEB_OAUTH_CLIENT, API_URL,
DEBUGGER_OFF, DEVELOPMENT, PORT, SCOPE) into the expected alphabetical order and
update the file accordingly so CI dotenv-linter checks pass; ensure you only
reorder lines and do not change values or quoting.

WELLKNOWN_URL=
# bootstrap | flow

# INIT_PROTECT (optional) - bootstrap | flow
# 'bootstrap' will initialize protect at app bootstrap time
# 'flow' relies on the PingOne Protect collector for initialization
INIT_PROTECT=
# required when ProtectCollector is present
# PINGONE_ENV_ID - required when ProtectCollector is present
PINGONE_ENV_ID=
9 changes: 4 additions & 5 deletions javascript/reactjs-todo-davinci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 +57,21 @@ Change the name of `.env.example` to `.env` and replace the dummy values (e.g. `
Example with annotations:

```text
WELLKNOWN_URL=<<PingOne wellknown url>>
WEB_OAUTH_CLIENT=<<PingOne application client id>>
API_URL=http://localhost:9443
DEBUGGER_OFF=true
DEVELOPMENT=true
PORT=8443
CLIENT_ID=<<PingOne application client id>>
REDIRECT_URI=http://localhost:8443
SCOPE="openid profile email phone name revoke"
WELLKNOWN_URL=<<PingOne wellknown url>>/
```

### Installing Dependencies

**Run from root of `/javascript`**: since this sample app uses npm's workspaces, we recommend running the npm commands from the root of the `/javascript` folder.

```sh
# Install all dependencies (no need to pass the -w option)
# Install all dependencies
npm install
```

Expand All @@ -81,7 +80,7 @@ npm install
Now, run the below commands to start the processes needed for building the application and running the servers for both client and API server:

```sh
# In one terminal window, run the following watch command from the root of the repository
# In a terminal window, run the following command from the /javascript folder
npm run start:reactjs-todo-dv
```

Expand Down
5 changes: 5 additions & 0 deletions javascript/reactjs-todo-davinci/client/context/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# React Context

This application leverages "global state" with React's Context API. This can be useful to share state with any component without having to pass props through deeply nested components. Authentication status and theme state are good examples.

If global state becomes a more complex function of the app, something like Redux might be a better option.
Loading
Loading