Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@keycloakify/angular #5

Closed
wants to merge 64 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
a57a263
Reset
garronej Sep 29, 2024
0ad788b
Repatriate login src
garronej Sep 29, 2024
1c3926d
No relative imports in ejectable components
garronej Sep 29, 2024
81323e6
Setup scripts
garronej Sep 29, 2024
0df1e0c
Fix CI
garronej Sep 29, 2024
3ef36bd
Building
garronej Sep 29, 2024
2ca875a
Release candidate
garronej Sep 29, 2024
f7ec875
Add config for publishing under a namespace
garronej Sep 29, 2024
f4499ca
Working angular build
garronej Sep 30, 2024
63cd2d9
Working angular build
garronej Sep 30, 2024
b7b9c8c
add example story
garronej Sep 30, 2024
7a08c6b
A few aditional tweak
garronej Sep 30, 2024
6efaa01
Release candidate
garronej Sep 30, 2024
7d4c235
Do not remove the dist every time
garronej Sep 30, 2024
73b4b28
Add hello-world component
garronej Sep 30, 2024
f46b238
Release candidate
garronej Sep 30, 2024
e61f7d6
Other attempt
garronej Sep 30, 2024
90e1a1b
Test on mac
garronej Sep 30, 2024
4647712
Attempt to fix strange recursion
garronej Sep 30, 2024
6e4ed78
Add debug
garronej Sep 30, 2024
0812724
Add debug log
garronej Sep 30, 2024
38cea13
use yarn install explicitely
garronej Sep 30, 2024
90f93b2
new test
garronej Sep 30, 2024
7380343
Fix ci build (hopefully)
garronej Sep 30, 2024
ffd701d
New test
garronej Sep 30, 2024
87faf53
Rollback
garronej Sep 30, 2024
bd39bd1
Fix linking script
garronej Sep 30, 2024
08a3700
Remove workspace
garronej Sep 30, 2024
fb9cd4d
Track workspace not as a git repo
garronej Sep 30, 2024
05d1d98
Hot reload and dynamic linking works
garronej Sep 30, 2024
8f79467
fix config
Sep 30, 2024
1992937
clean yarn install automatic packageManager add
Sep 30, 2024
3b5accf
Minor fix in linking script
garronej Sep 30, 2024
f106683
Update tsafe to get rid of CJS warnings
garronej Sep 30, 2024
dbdab83
Remove already installed at the root level dependency from workspace
garronej Sep 30, 2024
d447bb1
Fix ref path for final location
garronej Sep 30, 2024
c263d2c
Clean dist before new build
garronej Sep 30, 2024
a2b8198
Fix readdir on non existing dir
garronej Sep 30, 2024
f90aa11
Release candidate
garronej Sep 30, 2024
21ea77b
login/pages relative kcContext import
Sep 30, 2024
fa640a4
code refactor
Sep 30, 2024
1537b2b
missing dependencies
Sep 30, 2024
0edb48d
spacing
Sep 30, 2024
796d457
We don't need evt
garronej Sep 30, 2024
5d647a8
Use internal implem Deferred
garronej Sep 30, 2024
3d8c454
Use .js instead of .mjs ext
garronej Sep 30, 2024
b53eb9f
Release candidate
garronej Sep 30, 2024
8bf0f5e
fix null injector
Sep 30, 2024
3df76cc
Release candidate
Sep 30, 2024
12187a5
import type
luca-peruzzo Sep 30, 2024
38b5a45
Release Candidate
luca-peruzzo Sep 30, 2024
c883fb7
try to use user-profile-form-fields dynamically
luca-peruzzo Oct 1, 2024
6ccad34
Release Candidate
luca-peruzzo Oct 1, 2024
1736499
try absolute path
luca-peruzzo Oct 1, 2024
020eb99
Release Candidate
luca-peruzzo Oct 1, 2024
85fbf47
use user-profile-form-fields dynamically
luca-peruzzo Oct 1, 2024
42b7389
Release Candidate
luca-peruzzo Oct 1, 2024
4608499
account implementation
luca-peruzzo Oct 1, 2024
667a965
Release Candidate
luca-peruzzo Oct 1, 2024
8f8d29b
fix providers compatibility
luca-peruzzo Oct 1, 2024
ff3103a
Release Candidate
luca-peruzzo Oct 1, 2024
8a7740a
Fix build on windows
garronej Oct 1, 2024
4217b2f
Make the linking script more friendly
garronej Oct 1, 2024
ac0780f
Fix deleting node_modules that can throw on windows
garronej Oct 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
16 changes: 0 additions & 16 deletions .editorconfig

This file was deleted.

116 changes: 116 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:

test_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: bahmutov/npm-install@v1
- name: If this step fails run 'npm run format' then commit again.
run: npm run _format --list-different

test:
runs-on: ubuntu-latest
needs: test_format
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: bahmutov/npm-install@v1
- run: npm run build
#- run: npm run test

check_if_version_upgraded:
name: Check if version upgrade
# When someone forks the repo and opens a PR we want to enables the tests to be run (the previous jobs)
# but obviously only us should be allowed to release.
# In the following check we make sure that we own the branch this CI workflow is running on before continuing.
# Without this check, trying to release would fail anyway because only us have the correct secret.NPM_TOKEN but
# it's cleaner to stop the execution instead of letting the CI crash.
if: |
github.event_name == 'push' ||
github.event.pull_request.head.repo.owner.login == github.event.pull_request.base.repo.owner.login
runs-on: ubuntu-latest
needs: test
outputs:
from_version: ${{ steps.step1.outputs.from_version }}
to_version: ${{ steps.step1.outputs.to_version }}
is_upgraded_version: ${{ steps.step1.outputs.is_upgraded_version }}
is_pre_release: ${{steps.step1.outputs.is_pre_release }}
steps:
- uses: garronej/[email protected]
id: step1
with:
action_name: is_package_json_version_upgraded

create_github_release:
runs-on: ubuntu-latest
# We create release only if the version in the package.json have been upgraded and this CI is running against the main branch.
# We allow branches with a PR open on main to publish pre-release (x.y.z-rc.u) but not actual releases.
if: |
needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true' &&
(
github.event_name == 'push' ||
needs.check_if_version_upgraded.outputs.is_pre_release == 'true'
)
needs:
- check_if_version_upgraded
steps:
- uses: softprops/action-gh-release@v2
with:
name: Release v${{ needs.check_if_version_upgraded.outputs.to_version }}
tag_name: v${{ needs.check_if_version_upgraded.outputs.to_version }}
target_commitish: ${{ github.head_ref || github.ref }}
generate_release_notes: true
draft: false
prerelease: ${{ needs.check_if_version_upgraded.outputs.is_pre_release == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish_on_npm:
runs-on: ubuntu-latest
needs:
- create_github_release
- check_if_version_upgraded
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/setup-node@v4
with:
registry-url: https://registry.npmjs.org/
- uses: bahmutov/npm-install@v1
- run: npm run build
- run: npx -y -p [email protected] enable_short_npm_import_path
env:
DRY_RUN: "0"
- uses: garronej/[email protected]
with:
action_name: remove_dark_mode_specific_images_from_readme
- name: Publishing on NPM
run: |
if [ "$(npm show . version)" = "$VERSION" ]; then
echo "This version is already published"
exit 0
fi
if [ "$NODE_AUTH_TOKEN" = "" ]; then
echo "Can't publish on NPM, You must first create a secret called NPM_TOKEN that contains your NPM auth token. https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets"
false
fi
EXTRA_ARGS=""
if [ "$IS_PRE_RELEASE" = "true" ]; then
EXTRA_ARGS="--tag next"
fi
npm publish $EXTRA_ARGS
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
VERSION: ${{ needs.check_if_version_upgraded.outputs.to_version }}
IS_PRE_RELEASE: ${{ needs.check_if_version_upgraded.outputs.is_pre_release }}
115 changes: 52 additions & 63 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,63 +1,52 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# Compiled output
/dist
/tmp
/out-tsc
/bazel-out

# Node
/node_modules
npm-debug.log
yarn-error.log

# IDEs and editors
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# Miscellaneous
/.angular/cache
/.nx/cache
/.nx/workspace-data
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings

# System files
.DS_Store
Thumbs.db

/src/login/i18n/messages_defaultSet/
/src/account/i18n/

# VS Code devcontainers
.devcontainer
/.yarn
/.yarnrc.yml

/dist_keycloak
/dist_dev
/build
/storybook-static

/stories/assets/fonts/
/build_storybook/
/storybook-static/

*storybook.log
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

.vscode

.DS_Store

/dist
/.yarn_home/

.idea

# VS Code devcontainers
.devcontainer
/.yarn
/.yarnrc.yml

16 changes: 13 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
node_modules/
/dist/
/dist_keycloak/
/public/keycloak-resources/
/.vscode/
/CHANGELOG.md
/.yarn_home/
/src/test/apps/
/src/tools/types/
/build_keycloak/
/.vscode/
/src/login/i18n/messages_defaultSet/
/src/account/i18n/messages_defaultSet/
/dist_test
/sample_react_project/
/sample_custom_react_project/
/keycloakify_starter_test/
/.storybook/static/keycloak-resources/
26 changes: 26 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"printWidth": 90,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid",
"singleAttributePerLine": true,
"overrides": [
{
"files": "*.component.ts",
"options": {
"printWidth": 150
}
},
{
"files": "*.html",
"options": {
"parser": "angular",
"printWidth": 150
}
}
]
}
41 changes: 0 additions & 41 deletions .storybook/main.ts

This file was deleted.

25 changes: 0 additions & 25 deletions .storybook/preview-head.html

This file was deleted.

14 changes: 0 additions & 14 deletions .storybook/preview.ts

This file was deleted.

10 changes: 0 additions & 10 deletions .storybook/tsconfig.doc.json

This file was deleted.

Loading