Skip to content

refactor: Add TypeScript support #26

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

Open
wants to merge 30 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
5211d0e
Merge branch 'main' into typescript-setup
JamieSlome Mar 24, 2025
773754e
Merge branch 'main' into typescript-setup
fabiovincenzi Apr 2, 2025
b6b19d0
Merge branch 'main' into typescript-setup
fabiovincenzi Apr 25, 2025
50327f6
chore: enable TS declarations, add build step to workflow, update ign…
fabiovincenzi Apr 25, 2025
1dcc04b
fix(deps): update npm - li-cli - experimental/li-cli/package.json
renovate[bot] Apr 28, 2025
1c0816e
Merge pull request #959 from finos/renovate/li-cli-manager
JamieSlome Apr 29, 2025
ee149fa
chore(deps): update github-actions - workflows - .github/workflows/de…
renovate[bot] Apr 29, 2025
bdf0fc7
chore: run npm audit fix
JamieSlome Apr 29, 2025
c65f89f
Merge pull request #988 from finos/renovate/workflows-manager
JamieSlome Apr 29, 2025
c5715a9
Merge branch 'main' into run-npm-audit
JamieSlome Apr 29, 2025
1c0d999
Merge pull request #989 from finos/run-npm-audit
JamieSlome Apr 29, 2025
734a908
chore: bump by minor to v1.11.0
JamieSlome Apr 29, 2025
484248e
Merge pull request #991 from finos/release-1.11.0
JamieSlome Apr 29, 2025
1e7b181
chore: switch @typescript-eslint/no-explicit-any to off instead of warn
JamieSlome Apr 29, 2025
5be08b3
Merge pull request #992 from finos/disable-no-explicit-any
JamieSlome Apr 29, 2025
044ae8d
chore(deps): update dependency @finos/git-proxy to ^1.11.0 - git-prox…
renovate[bot] Apr 29, 2025
9cf16d2
Merge pull request #990 from finos/renovate/git-proxy-plugin-samples-…
JamieSlome Apr 29, 2025
909d383
fix(deps): update dependency axios to ^1.9.0 - git-proxy-cli - packag…
renovate[bot] Apr 29, 2025
82c45d8
Merge pull request #993 from finos/renovate/git-proxy-cli-manager
JamieSlome Apr 29, 2025
ced6237
fix(deps): update npm - website - website/package.json
renovate[bot] Apr 29, 2025
9ad2d07
Merge pull request #995 from finos/renovate/website-manager
JamieSlome Apr 30, 2025
d996d0f
Merge branch 'main' into typescript-setup
fabiovincenzi Apr 30, 2025
fb6271d
feat: api rate limiting configuration
kriswest Apr 30, 2025
2d69e94
test: rateLimit config testing
kriswest May 1, 2025
958d87e
Merge branch 'main' into 997-rate-limiter-config
kriswest May 1, 2025
d0c20c4
fix: use limit rather than max in rateLimit config
kriswest May 1, 2025
f252d74
Merge remote-tracking branch 'upstream/997-rate-limiter-config' into …
kriswest May 1, 2025
aef5313
docs: regenerate schema reference for rateLimit
kriswest May 1, 2025
d34a486
Merge pull request #999 from kriswest/997-rate-limiter-config
JamieSlome May 6, 2025
8aa3eda
Merge branch 'main' into typescript-setup
fabiovincenzi May 6, 2025
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
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"react/prop-types": "off",
"require-jsdoc": "off",
"no-async-promise-executor": "off",
"@typescript-eslint/no-explicit-any": "warn", // temporary until TS refactor is complete
"@typescript-eslint/no-explicit-any": "off", // temporary until TS refactor is complete
"@typescript-eslint/no-unused-vars": "off", // temporary until TS refactor is complete
"@typescript-eslint/no-require-imports": "off", // prevents error on old "require" imports
"@typescript-eslint/no-unused-expressions": "off" // prevents error on test "expect" expressions
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

Expand All @@ -33,7 +33,7 @@ jobs:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -52,7 +52,7 @@ jobs:
npm run test-coverage-ci --workspaces --if-present

- name: Upload test coverage report
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574 # v5.4.0
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
with:
files: ./coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}
Expand All @@ -71,7 +71,7 @@ jobs:
path: build

- name: Download the build folders
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
with:
name: build
path: build
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2
with:
egress-policy: audit

Expand All @@ -60,7 +60,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3
uses: github/codeql-action/init@28deaeda66b76a05916b6923827895f2b14ab387 # v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -74,7 +74,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3
uses: github/codeql-action/autobuild@28deaeda66b76a05916b6923827895f2b14ab387 # v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -87,6 +87,6 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3
uses: github/codeql-action/analyze@28deaeda66b76a05916b6923827895f2b14ab387 # v3
with:
category: "/language:${{matrix.language}}"
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: Dependency Review
uses: actions/dependency-review-action@3b139cfc5fae8b618d3eae3675e383bb1769c019 # v4
uses: actions/dependency-review-action@67d4f4bd7a9b17a0db54d2a7519187c65e339de8 # v4
with:
comment-summary-in-pr: always
fail-on-severity: high
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/experimental-inventory-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

Expand All @@ -33,7 +33,7 @@ jobs:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/experimental-inventory-cli-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/experimental-inventory-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

# Setup .npmrc file to publish to npm
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ jobs:
runs-on: ubuntu-latest
steps: # list of steps
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2
with:
egress-policy: audit

- name: Install NodeJS
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: ${{ env.NODE_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

Expand Down
27 changes: 20 additions & 7 deletions .github/workflows/sample-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,35 @@ permissions:
contents: read

jobs:
build:
build-and-publish:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
- name: Checkout repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Setup Node.js # Setup .npmrc file to publish to npm
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- name: publish sample package
run: npm install --include peer && npm publish --access=public

- name: Install dependencies
working-directory: plugins/git-proxy-plugin-samples
run: npm ci

- name: Build TypeScript
working-directory: plugins/git-proxy-plugin-samples
run: npm run build

- name: Install peers and publish
working-directory: plugins/git-proxy-plugin-samples
run: |
npm install --include=peer
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
with:
egress-policy: audit

Expand Down Expand Up @@ -72,6 +72,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@1b549b9259bda1cb5ddde3b41741a82a2d15a841 # v3.28.13
uses: github/codeql-action/upload-sarif@28deaeda66b76a05916b6923827895f2b14ab387 # v3.28.16
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/unused-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2
with:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- name: 'Setup Node.js'
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: '18.x'
- name: 'Run depcheck'
Expand Down
11 changes: 10 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# This file required to override .gitignore when publishing to npm
src/
tests/
*.test.ts

tsconfig.json
jest.config.js
.eslintrc.js
.prettierrc

website/
plugins/
plugins/
24 changes: 24 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,30 @@
"description": "Provide domains to use alternative to the defaults",
"type": "object"
},
"rateLimit": {
"description": "API Rate limiting configuration.",
"type": "object",
"properties": {
"windowMs": {
"type": "number",
"description": "How long to remember requests for, in milliseconds (default 10 mins)."
},
"limit": {
"type": "number",
"description": "How many requests to allow (default 150)."
},
"statusCode": {
"type": "number",
"description": "HTTP status code after limit is reached (default is 429)."
},
"message": {
"type": "string",
"description": "Response to return after limit is reached."
}
},
"required": ["windowMs", "limit"],
"additionalProperties": false
},
"privateOrganizations": {
"description": "Pattern searches for listed private organizations are disabled",
"type": "array"
Expand Down
Loading
Loading