Skip to content

Commit

Permalink
Merge pull request #2 from brionmario/restructure
Browse files Browse the repository at this point in the history
chore: update repo structure
  • Loading branch information
brionmario authored Dec 19, 2024
2 parents b1f45a0 + 793487c commit 4f9c624
Show file tree
Hide file tree
Showing 46 changed files with 9,190 additions and 10,105 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
15 changes: 15 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": ["@changesets/changelog-github", { "repo": "asgardeo/remix-auth-asgardeo" }],
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"privatePackages": {
"version": true,
"tag": true
},
"updateInternalDependencies": "patch",
"ignore": []
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Global ignore file incase if a child package doesn't include one.

/dist
/build
/node_modules
/coverage
42 changes: 23 additions & 19 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
/* eslint-disable unicorn/prefer-module */
/**
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

module.exports = {
root: true,
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint", "unicorn", "jest", "prettier"],
extends: [
"plugin:unicorn/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
],
rules: {
"prefer-const": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"no-unused-vars": "off",
"no-var": "off",
"unicorn/no-null": "off",
"unicorn/prefer-node-protocol": "off",
"unicorn/filename-case": "off",
"unicorn/prevent-abbreviations": "off",
env: {
es6: true,
node: true,
},
extends: ['plugin:@wso2/internal', 'plugin:@wso2/prettier'],
plugins: ['@wso2'],
};
35 changes: 17 additions & 18 deletions issue_template.md → .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
**Description:**
<!-- Give a brief description of the issue -->

**Suggested Labels:**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees:**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->

**Affected Product Version:**

**OS, DB, other environment details and versions:**

**Steps to reproduce:**


**Related Issues:**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->
**Description:**
<!-- Give a brief description of the issue -->

**Suggested Labels:**
<!-- Optional comma separated list of suggested labels. Non committers can’t assign labels to issues, so this will help issue creators who are not a committer to suggest possible labels-->

**Suggested Assignees:**
<!--Optional comma separated list of suggested team members who should attend the issue. Non committers can’t assign issues to assignees, so this will help issue creators who are not a committer to suggest possible assignees-->

**Affected Version:**

**OS, DB, other environment details and versions:**

**Steps to reproduce:**

**Related Issues:**
<!-- Any related issues such as sub tasks, issues reported in other repositories (e.g component repositories), similar problems, etc. -->
21 changes: 21 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
### Purpose
<!-- Describe the problem, feature, improvement or the change introduces by the PR briefly. Add screenshots/GIFs if UI/UX changes are introduced. -->

### Related Issues
-

### Related PRs
-

### Checklist
- [ ] e2e cypress tests locally verified.
- [ ] Manual test round performed and verified.
- [ ] UX/UI review done on the final implementation.
- [ ] Documentation provided. (Add links if there are any)
- [ ] Unit tests provided. (Add links if there are any)
- [ ] Integration tests provided. (Add links if there are any)

### Security checks
- [ ] Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines?
- [ ] Ran ESLint & Prettier plugins and verified?
- [ ] Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets?
235 changes: 235 additions & 0 deletions .github/workflows/pr-builder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# This workflow will build PRs submitted to the main branch.

name: 👷 PR Builder

on:
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
workflow_dispatch:

# Avoid running multiple builds for the same PR.
concurrency:
group: pr-builder-${{ github.ref }}
cancel-in-progress: true

env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
lint:
name: ⬣ ESLint (STATIC ANALYSIS)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: 🐳 Set SHAs for Nx
id: set-shas
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: "main"

- name: 🥡 Setup pnpm
id: setup-pnpm
uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
run_install: false

- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install

- name: 🦄 Lint All Files
id: lint-with-eslint
run: pnpm nx affected --target=lint --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}

typecheck:
name: ʦ Typecheck (STATIC ANALYSIS)
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: 🐳 Set SHAs for Nx
id: set-shas
uses: nrwl/nx-set-shas@v3
with:
main-branch-name: "main"

- name: 🥡 Setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
run_install: false

- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install

- name: ☄️ Check Type Errors
run: pnpm nx affected --target=typecheck --parallel=3 --base=${{ env.NX_BASE }} --head=${{ env.NX_HEAD }}

test:
name: 👾 Unit Test (TESTING)
# needs: [lint, typecheck]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]
with:
# We need to fetch all branches and commits so that Nx affected has a base to compare against.
fetch-depth: 0

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: 🥡 Setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
run_install: false

- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install

- name: 🃏 Run Jest & Collect Coverage
id: run-jest-test-and-coverage
run: pnpm test:ci

- name: Upload `@asgardeo/remix-auth-asgardeo` coverage reports to Codecov
id: upload-asgardeo-js-coverage
uses: codecov/[email protected]
with:
files: ./lib/coverage/coverage-final.json
flags: '@asgardeo/remix-auth-asgardeo'
token: ${{ secrets.CODECOV_TOKEN }}

build:
name: 🚧 Build
# needs: [ lint, typecheck, test ]
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [lts/*]
pnpm-version: [latest]
steps:
- name: ⬇️ Checkout
id: checkout
uses: actions/[email protected]

- name: 🟢 Setup node
id: setup-node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: 🥡 Setup pnpm
uses: pnpm/[email protected]
with:
version: ${{ matrix.pnpm-version }}
run_install: false

- name: 🎈 Get pnpm store directory
id: get-pnpm-cache-dir
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: 🔆 Cache pnpm modules
uses: actions/cache@v3
id: pnpm-cache
with:
path: ${{ steps.get-pnpm-cache-dir.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: 🧩 Install Dependencies
id: install-dependencies
run: pnpm install

- name: 🏗️ Build
id: build
run: pnpm build
Loading

0 comments on commit 4f9c624

Please sign in to comment.