Skip to content

Commit e8b2adc

Browse files
committed
feat: add amadeus sdk v1.0.0
0 parents  commit e8b2adc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+10824
-0
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = tab
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

.eslintrc.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 2022,
6+
"sourceType": "module",
7+
"project": "./tsconfig.json"
8+
},
9+
"plugins": ["@typescript-eslint"],
10+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
11+
"rules": {
12+
"@typescript-eslint/no-explicit-any": "warn",
13+
"@typescript-eslint/explicit-module-boundary-types": "off",
14+
"@typescript-eslint/no-unused-vars": [
15+
"error",
16+
{
17+
"argsIgnorePattern": "^_",
18+
"varsIgnorePattern": "^_"
19+
}
20+
]
21+
},
22+
"env": {
23+
"node": true,
24+
"es2022": true
25+
}
26+
}

.github/workflows/build-check.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Check
2+
3+
on:
4+
pull_request:
5+
branches: [main, master]
6+
7+
jobs:
8+
build:
9+
name: Verify Build
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20.x'
20+
cache: 'npm'
21+
22+
- name: Install dependencies
23+
run: npm ci
24+
25+
- name: Build package
26+
run: npm run build
27+
28+
- name: Verify build output
29+
run: |
30+
if [ ! -d "dist" ]; then
31+
echo "Error: dist directory not found"
32+
exit 1
33+
fi
34+
if [ ! -f "dist/index.js" ]; then
35+
echo "Error: dist/index.js not found"
36+
exit 1
37+
fi
38+
if [ ! -f "dist/index.d.ts" ]; then
39+
echo "Error: dist/index.d.ts not found"
40+
exit 1
41+
fi
42+
echo "Build output verified successfully"
43+
44+
- name: Check bundle size
45+
run: |
46+
SIZE=$(du -sh dist | cut -f1)
47+
echo "Build size: $SIZE"
48+
# Fail if build is suspiciously large (>50MB)
49+
SIZE_BYTES=$(du -sb dist | cut -f1)
50+
if [ $SIZE_BYTES -gt 52428800 ]; then
51+
echo "Warning: Build size exceeds 50MB"
52+
fi

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
9+
jobs:
10+
test:
11+
name: Test & Lint
12+
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
node-version: [20.x, 22.x]
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Run linter
32+
run: npm run lint
33+
34+
- name: Check formatting
35+
run: npm run prettier:check
36+
37+
- name: Build
38+
run: npm run build
39+
40+
- name: Run tests
41+
run: npm test
42+
43+
- name: Generate coverage
44+
if: matrix.node-version == '20.x'
45+
run: npm run test:coverage
46+
47+
- name: Upload coverage reports
48+
if: matrix.node-version == '20.x'
49+
uses: codecov/codecov-action@v4
50+
with:
51+
files: ./coverage/coverage-final.json
52+
fail_ci_if_error: false
53+
token: ${{ secrets.CODECOV_TOKEN }}
54+
55+
type-check:
56+
name: Type Check
57+
runs-on: ubuntu-latest
58+
59+
steps:
60+
- name: Checkout code
61+
uses: actions/checkout@v4
62+
63+
- name: Setup Node.js
64+
uses: actions/setup-node@v4
65+
with:
66+
node-version: '20.x'
67+
cache: 'npm'
68+
69+
- name: Install dependencies
70+
run: npm ci
71+
72+
- name: Type check
73+
run: npx tsc --noEmit

.github/workflows/publish.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Publish to npm
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
version:
9+
description: 'Version to publish (e.g., 1.0.0)'
10+
required: true
11+
type: string
12+
13+
jobs:
14+
publish:
15+
name: Publish Package
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
id-token: write
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: '20.x'
31+
registry-url: 'https://registry.npmjs.org'
32+
cache: 'npm'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Run tests
38+
run: npm test
39+
40+
- name: Build
41+
run: npm run build
42+
43+
- name: Verify package
44+
run: npm pack --dry-run
45+
46+
- name: Extract version from release
47+
if: github.event_name == 'release'
48+
id: version
49+
run: |
50+
VERSION=${GITHUB_REF#refs/tags/v}
51+
VERSION=${VERSION#refs/tags/}
52+
echo "version=$VERSION" >> $GITHUB_OUTPUT
53+
echo "Publishing version: $VERSION"
54+
55+
- name: Verify version matches package.json
56+
if: github.event_name == 'release'
57+
run: |
58+
PACKAGE_VERSION=$(node -p "require('./package.json').version")
59+
RELEASE_VERSION="${{ steps.version.outputs.version }}"
60+
if [ "$PACKAGE_VERSION" != "$RELEASE_VERSION" ]; then
61+
echo "Error: package.json version ($PACKAGE_VERSION) doesn't match release tag ($RELEASE_VERSION)"
62+
exit 1
63+
fi
64+
echo "Version verified: $PACKAGE_VERSION"
65+
66+
- name: Update package.json version (manual)
67+
if: github.event_name == 'workflow_dispatch'
68+
run: |
69+
npm version "${{ github.event.inputs.version }}" --no-git-tag-version
70+
echo "Updated package.json to version ${{ github.event.inputs.version }}"
71+
72+
- name: Publish to npm
73+
uses: JS-DevTools/npm-publish@v3
74+
with:
75+
token: ${{ secrets.NPM_TOKEN }}
76+
registry: https://registry.npmjs.org
77+
access: public

.github/workflows/security.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
schedule:
9+
# Run weekly on Monday at 00:00 UTC
10+
- cron: '0 0 * * 1'
11+
12+
jobs:
13+
audit:
14+
name: Security Audit
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v4
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: '20.x'
25+
cache: 'npm'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Run npm audit
31+
run: npm audit --audit-level=moderate
32+
continue-on-error: true
33+
34+
- name: Check for known vulnerabilities
35+
run: npm audit --audit-level=high
36+
continue-on-error: true
37+
38+
dependency-review:
39+
name: Dependency Review
40+
runs-on: ubuntu-latest
41+
if: github.event_name == 'pull_request'
42+
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v4
46+
47+
- name: Dependency Review
48+
uses: actions/dependency-review-action@v4
49+
with:
50+
fail-on-severity: moderate

.gitignore

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Dependencies
2+
node_modules/
3+
.pnp
4+
.pnp.js
5+
6+
# Build outputs
7+
dist/
8+
build/
9+
*.tsbuildinfo
10+
11+
# Testing
12+
coverage/
13+
.nyc_output/
14+
15+
# Environment
16+
.env
17+
.env.local
18+
.env.*.local
19+
20+
# IDE
21+
.vscode/
22+
.idea/
23+
*.swp
24+
*.swo
25+
*~
26+
27+
# OS
28+
.DS_Store
29+
Thumbs.db
30+
31+
# Logs
32+
logs/
33+
*.log
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
lerna-debug.log*
38+
39+
# Temporary files
40+
*.tmp
41+
*.temp

.npmignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
src/
2+
tsconfig.json
3+
.gitignore
4+
*.log
5+
.DS_Store
6+
node_modules/
7+

.nvmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
20
2+

.prettierignore

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Ignore Vite build output
2+
dist/
3+
build/
4+
5+
# Ignore dependencies
6+
node_modules/
7+
8+
# Logs
9+
logs
10+
*.log
11+
12+
# Ignore Vite cache
13+
.vite/
14+
.cache/
15+
16+
# Ignore TypeScript build output
17+
*.tsbuildinfo
18+
*.d.ts
19+
20+
# Ignore editor config files
21+
*.log
22+
*.swp
23+
*.swo
24+
*.DS_Store
25+
26+
# Ignore tests coverage reports
27+
coverage/
28+
29+
# Ignore package lock files
30+
bun.lockb
31+
32+
# Ignore .idea folder from WebStorm/IntelliJ
33+
.idea/
34+
35+
# Ignore miscellaneous
36+
.vscode/
37+
38+
# Ignore release files
39+
CHANGELOG.md

0 commit comments

Comments
 (0)