Skip to content

Commit

Permalink
refactor: migration to aviationweather api
Browse files Browse the repository at this point in the history
  • Loading branch information
samarmeena committed Nov 6, 2023
1 parent 65883cc commit da43b92
Show file tree
Hide file tree
Showing 45 changed files with 135,627 additions and 4,012 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)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
tests
dist
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
Expand All @@ -16,7 +20,6 @@
"require-await": "warn",
"no-await-in-loop": "warn",
"spaced-comment": "warn",
"sort-imports": "warn",
"no-unused-vars": "off",
"curly": "warn",

Expand Down
13 changes: 0 additions & 13 deletions .github/dependabot.yml

This file was deleted.

58 changes: 11 additions & 47 deletions .github/workflows/Builld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ on:
- main

jobs:
lint:
name: ESLint
check:
name: Build
runs-on: ubuntu-latest
steps:
- name: check out code 🛎
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install Node v17
uses: actions/setup-node@v2
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "17.x"
node-version: 18
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: "**/package-lock.json"
Expand All @@ -28,46 +28,10 @@ jobs:
run: npm ci

- name: Run ESLint
run: npm run lint
run: npm run check:lint

typescript:
name: TypeScript
runs-on: ubuntu-latest
steps:
- name: check out code 🛎
uses: actions/checkout@v2

- name: Install Node v17
uses: actions/setup-node@v2
with:
node-version: "17.x"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Install dependencies
run: npm ci

- name: Run TypeScript compiler
run: npm run type-check

prettier:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: check out code 🛎
uses: actions/checkout@v2

- name: Install Node v17
uses: actions/setup-node@v2
with:
node-version: "17.x"
registry-url: "https://registry.npmjs.org"
cache: "npm"
cache-dependency-path: "**/package-lock.json"

- name: Install dependencies
run: npm ci
- name: Run Prettier
run: npm run check:prettier

- name: Run prettier
run: npm run format-check
- name: Run Type
run: npm run build
8 changes: 3 additions & 5 deletions .github/workflows/Publish - Stable.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Publish - Stable
on:
workflow_dispatch:
#release:
# types: [created]

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: 18
registry-url: "https://registry.npmjs.org"

- name: Install root dependencies
Expand Down
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"endOfLine": "auto"
}
148 changes: 3 additions & 145 deletions CHANGELOG.md

Large diffs are not rendered by default.

33 changes: 2 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,11 @@ Node.js engine for global aviation weather. Written with typescript.
# Examples

```ts
import { Client } from "aviationweather";
import { getMetar } from "aviationweather";

const client = new Client({ debug: false });

client
.AW({
datasource: "METARS",
stationString: "KJFK",
hoursBeforeNow: 2,
})
.then((res) => {
res.forEach((r) => console.log(r));
});

client.AVT7("ZJQH").then((res) => {
console.log(res);
});
getMetar({ ids: "KJFK", format: "json" }).then(({ data }) => console.log(data));
```

# API Coverage

## AVIATION WEATHER CENTER

- METARs
- Aircraft Reports
- TAFs
- AIR/SIGMETs
- G-AIRMETs
- STATION INFO

## AVT7

- METAR

# Help or support

Join [discord server](https://discord.gg/xkP9paz5X3)
Loading

0 comments on commit da43b92

Please sign in to comment.