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

Search Clients from Registry #2

Merged
merged 3 commits into from
Oct 25, 2023
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
8 changes: 8 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This is an example environment file for configuring dynamic values.
# This can be removed or changed with better solutions in the future.
# It should *only* be kept as long as there are no sensitive values in here.
E2E_BASE_URL=http://localhost:8080/openmrs
E2E_USER_ADMIN_USERNAME=Admin
E2E_USER_ADMIN_PASSWORD=Admin123
E2E_LOGIN_DEFAULT_LOCATION_NAME=Outpatient Clinic
E2E_LOGIN_DEFAULT_LOCATION_UUID=44c3efb0-2583-4c80-a79e-1f756a03c0a1
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
src/**/*.test.tsx
**/*.d.tsx
src/**/*.spec.tsx
**/*.d.tsx
**/node_modules/**/*
26 changes: 13 additions & 13 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
{
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"root": true,
"extends": [
"eslint:recommended",
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"ts-react-important-stuff"
],
"extends": ["ts-react-important-stuff", "plugin:prettier/recommended"],
"rules": {
"curly": ["error", "all"],
"no-restricted-imports": [
"error",
{
"paths": [
{
"name": "lodash",
"message": "Import specific methods from `lodash`. e.g. `import map from 'lodash/map'`"
"message": "Import specific methods from `lodash-es`. e.g. `import map from 'lodash-es/map'`"
},
{
"name": "lodash-es",
"importNames": ["default"],
"message": "Import specific methods from `lodash-es`. e.g. `import { map } from 'lodash-es'`"
},
"message": "Import specific methods from `lodash-es`. e.g. `import map from 'lodash-es/map'`"
}
],
"patterns": [
{
"name": "carbon-components-react",
"group": ["carbon-components-react"],
"message": "Import from `@carbon/react` directly. e.g. `import { Toggle } from '@carbon/react'`"
},
{
"name": "@carbon/icons-react",
"group": ["@carbon/icons-react"],
"message": "Import from `@carbon/react/icons`. e.g. `import { ChevronUp } from '@carbon/react/icons'`"
},
{
"group": ["@import '~carbon-components/src/globals/scss/vars'"],
"message": "Import from `@carbon/styles/scss`. e.g. `@use '@carbon/styles/scss/type'`"
}
]
}
Expand Down
72 changes: 34 additions & 38 deletions .github/workflows/ci.yml → .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,52 +8,48 @@ on:
release:
types:
- created

env:
ESM_NAME: "@ugandaemr/esm-patient-registration-app"
JS_NAME: "esm-ugandaemr-patient-registration-app.js"
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }}
TURBO_TEAM: ${{ github.repository_owner }}

jobs:
build:
runs-on: ubuntu-latest
env:
TURBO_API: 'http://127.0.0.1:9080'
TURBO_TOKEN: ${{ secrets.TURBO_SERVER_TOKEN }}
TURBO_TEAM: ${{ github.repository_owner }}
permissions:
actions: read

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
node-version: '16'

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Setup local cache server for Turborepo
- name: Setup a local cache server for Turborepo
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- run: yarn verify
- run: yarn turbo build --color --concurrency=5

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist
- name: Run lint, type checks and tests
run: yarn verify

- name: Run build
run: yarn turbo build --color --concurrency=5

pre_release:
runs-on: ubuntu-latest
Expand All @@ -64,18 +60,17 @@ jobs:

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: '16'
registry-url: "https://registry.npmjs.org"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
Expand All @@ -86,10 +81,10 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- name: Version
run: yarn version "$(node -e "console.log(require('semver').inc(require('./package.json').version, 'patch'))")-pre.${{ github.run_number }}"
run: yarn lerna version "$(node -e "console.log(require('semver').inc(require('./lerna.json').version, 'patch'))")-pre.${{ github.run_number }}" --no-git-tag-version --no-push --yes

- name: Build
run: yarn turbo build --color --concurrency=5
Expand All @@ -98,16 +93,17 @@ jobs:
- run: git add . && git commit -m "Prerelease version" --no-verify

- name: Pre-release
run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public --tag next
run: yarn run ci:prepublish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

- name: Upload Artifacts
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: dist
name: packages
path: |
dist
packages/**/dist


release:
runs-on: ubuntu-latest
Expand All @@ -118,20 +114,17 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v3

- name: Setup Node.js
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "18.x"
node-version: '16'
registry-url: "https://registry.npmjs.org"

- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: "**/node_modules"
path: '**/node_modules'
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}

- name: Install dependencies
Expand All @@ -142,9 +135,12 @@ jobs:
uses: felixmosh/turborepo-gh-artifacts@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
server-token: ${{ secrets.TURBO_SERVER_TOKEN }}
server-token: ${{ env.TURBO_TOKEN }}

- run: yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish
- name: Build
run: yarn turbo build --color --concurrency=5

- name: Publish
run: yarn run ci:publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}

Empty file.
39 changes: 21 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# OS files
.DS_Store

# Logs
logs
*.log
Expand Down Expand Up @@ -45,6 +42,15 @@ typings/
# Optional npm cache directory
.npm

# ignores for Yarn v3 w/o PNP
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

# Optional eslint cache
.eslintcache

Expand All @@ -57,25 +63,22 @@ typings/
# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

dist/
dist

# Intellij integration
*.iml
.idea/

# ignores for Yarn v3 w/o PNP
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.DS_Store

.turbo/
~

# Turborepo
.turbo
# Playwright and e2e tests
/test-results/
/playwright-report/
/playwright/.cache/
e2e/storageState.json
results.xml
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
9 changes: 6 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
set -e # die on error

npx pretty-quick --staged
yarn run extract-translations
6 changes: 6 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

set -e # die on error

yarn run verify
1 change: 0 additions & 1 deletion .npmignore

This file was deleted.

11 changes: 1 addition & 10 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
# directories
.husky/
dist/
node_modules/

# dotfiles and generated
.*
yarn.lock

# by file type
**/*.css
**/*.scss
**/*.md
**/*.json
**/*.yml
17 changes: 0 additions & 17 deletions .turbo.json

This file was deleted.

39 changes: 39 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[main]
host = https://www.transifex.com


[openmrs-esm-patient-management.esm-outpatient-app]
file_filter = packages/esm-outpatient-app/translations/<lang>.json
source_file = packages/esm-outpatient-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-management.esm-patient-registration-app]
file_filter = packages/esm-patient-registration-app/translations/<lang>.json
source_file = packages/esm-patient-registration-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-management.esm-appointments-app]
file_filter = packages/esm-appointments-app/translations/<lang>.json
source_file = packages/esm-appointments-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-management.esm-patient-search-app]
file_filter = packages/esm-patient-search-app/translations/<lang>.json
source_file = packages/esm-patient-search-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-management.esm-active-visits-app]
file_filter = packages/esm-active-visits-app/translations/<lang>.json
source_file = packages/esm-active-visits-app/translations/en.json
source_lang = en
type = KEYVALUEJSON

[openmrs-esm-patient-management.esm-patient-list-app]
file_filter = packages/esm-patient-list-app/translations/<lang>.json
source_file = packages/esm-patient-list-app/translations/en.json
source_lang = en
type = KEYVALUEJSON
550 changes: 0 additions & 550 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

Loading
Loading