From 28e04c251b602915399d25bef1e3d76a73fc3ad7 Mon Sep 17 00:00:00 2001 From: Shane Froebel Date: Fri, 17 Nov 2023 22:46:10 -0500 Subject: [PATCH 1/2] feat: big blob of structure #1 new setup --- .eslintignore | 2 + .github/dependabot.yml | 8 +++ .github/release-drafter.yml | 4 ++ .github/workflows/ci.yaml | 46 ++++++++++++ .gitignore | 138 ++++++++++++++++++++++++++++++++++++ .npmignore | 11 +++ README.md | 22 ++++++ bin/build-types.sh | 11 +++ jest.config.ts | 10 +++ package.json | 65 +++++++++++++++++ release.config.js | 27 +++++++ tsconfig.cjs.json | 9 +++ tsconfig.json | 38 ++++++++++ tsconfig.types.json | 8 +++ typedoc.json | 9 +++ 15 files changed, 408 insertions(+) create mode 100644 .eslintignore create mode 100644 .github/dependabot.yml create mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/ci.yaml create mode 100644 .gitignore create mode 100644 .npmignore create mode 100644 README.md create mode 100755 bin/build-types.sh create mode 100644 jest.config.ts create mode 100644 package.json create mode 100644 release.config.js create mode 100644 tsconfig.cjs.json create mode 100644 tsconfig.json create mode 100644 tsconfig.types.json create mode 100644 typedoc.json diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..88f4908 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +jest.config.ts +release.config.js \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8e7c591 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,8 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: "/" + schedule: + interval: daily + time: "10:00" + open-pull-requests-limit: 10 \ No newline at end of file diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml new file mode 100644 index 0000000..0a5d792 --- /dev/null +++ b/.github/release-drafter.yml @@ -0,0 +1,4 @@ +template: | + ## What’s Changed + + $CHANGES \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..202dc95 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,46 @@ +name: GitHub CI +on: + push: + branches: [ main ] + pull_request: + +jobs: + Test: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [ 18.x, 20.x, 'lts/*' ] + steps: + - uses: actions/checkout@v3 + with: + persist-credentials: false + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - name: Install Dependencies + run: npm install --ignore-scripts + - name: Run Unit Tests + run: npm run test:ci + - name: Release Drafter + uses: release-drafter/release-drafter@v5.9.0 + env: + GITHUB_TOKEN: ${{ secrets.GH_SECRET }} + Release: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + needs: [ test ] + steps: + - uses: actions/checkout@v3 + with: + persist-credentials: false + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 'lts/*' + - run: npm install + - name: Semantic Release + run: npm run semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GH_SECRET }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e6a8d3d --- /dev/null +++ b/.gitignore @@ -0,0 +1,138 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunta + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Typedoc +docs + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# NPM +package-lock.json + +# Webstorm +.idea diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..9a03929 --- /dev/null +++ b/.npmignore @@ -0,0 +1,11 @@ +# Folders +.github +.idea +src +__tests__ +coverage + +# Files +jest.config.ts +*.json +*.yml \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..811969a --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +## Node HL7 Client +Node.js client library for creating a HL7 Client which can publish a properlly formatted HL7 message to a source. + +Benefits: + +- No dependencies, making this ultra-fast. +- Automatically re-connect, re-subscribe, or retry sending +- Written in typescript and published with heavily commented type definitions +- Intuitive API with named parameters instead of positional + +## Table of Contents + +1. [Acknowledgements](#acknowledgements) +2. [License](#license) + +## Acknowledgements + +- My Wife and Baby Girl. + +## License + +Licensed under [MIT](LICENSE). \ No newline at end of file diff --git a/bin/build-types.sh b/bin/build-types.sh new file mode 100755 index 0000000..f2e1311 --- /dev/null +++ b/bin/build-types.sh @@ -0,0 +1,11 @@ +cat >lib/cjs/package.json <lib/esm/package.json < Date: Fri, 17 Nov 2023 22:48:43 -0500 Subject: [PATCH 2/2] ci: no run test #1 --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 202dc95..e7c7337 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,8 +20,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Install Dependencies run: npm install --ignore-scripts - - name: Run Unit Tests - run: npm run test:ci +# - name: Run Unit Tests +# run: npm run test:ci - name: Release Drafter uses: release-drafter/release-drafter@v5.9.0 env: