diff --git a/proxy.config.json b/proxy.config.json index bdaedff4f..a57d51da8 100644 --- a/proxy.config.json +++ b/proxy.config.json @@ -67,11 +67,7 @@ } } ], - "api": { - "github": { - "baseUrl": "https://api.github.com" - } - }, + "api": {}, "commitConfig": { "author": { "email": { diff --git a/src/proxy/processors/push-action/gitleaks.ts b/src/proxy/processors/push-action/gitleaks.ts index af28a499b..1cf5b2236 100644 --- a/src/proxy/processors/push-action/gitleaks.ts +++ b/src/proxy/processors/push-action/gitleaks.ts @@ -171,7 +171,7 @@ const exec = async (req: any, action: Action): Promise => { step.setError('\n' + gitleaks.stdout + gitleaks.stderr); } } else { - console.log('succeded'); + console.log('succeeded'); console.log(gitleaks.stderr); } } catch (e) { diff --git a/test/fixtures/test-package/package-lock.json b/test/fixtures/test-package/package-lock.json new file mode 100644 index 000000000..0207cbe83 --- /dev/null +++ b/test/fixtures/test-package/package-lock.json @@ -0,0 +1,129 @@ +{ + "name": "test-package", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "test-package", + "version": "0.0.0", + "dependencies": { + "@finos/git-proxy": "file:../../.." + } + }, + "../../..": { + "name": "@finos/git-proxy", + "version": "2.0.0-rc.3", + "license": "Apache-2.0", + "workspaces": [ + "./packages/git-proxy-cli" + ], + "dependencies": { + "@material-ui/core": "^4.12.4", + "@material-ui/icons": "4.11.3", + "@primer/octicons-react": "^19.18.0", + "@seald-io/nedb": "^4.1.2", + "axios": "^1.12.2", + "bcryptjs": "^3.0.2", + "clsx": "^2.1.1", + "concurrently": "^9.2.1", + "connect-mongo": "^5.1.0", + "cors": "^2.8.5", + "diff2html": "^3.4.52", + "env-paths": "^3.0.0", + "express": "^4.21.2", + "express-http-proxy": "^2.1.2", + "express-rate-limit": "^8.1.0", + "express-session": "^1.18.2", + "history": "5.3.0", + "isomorphic-git": "^1.33.1", + "jsonwebtoken": "^9.0.2", + "jwk-to-pem": "^2.0.7", + "load-plugin": "^6.0.3", + "lodash": "^4.17.21", + "lusca": "^1.7.0", + "moment": "^2.30.1", + "mongodb": "^5.9.2", + "nodemailer": "^6.10.1", + "openid-client": "^6.8.0", + "parse-diff": "^0.11.1", + "passport": "^0.7.0", + "passport-activedirectory": "^1.4.0", + "passport-local": "^1.0.0", + "perfect-scrollbar": "^1.5.6", + "prop-types": "15.8.1", + "react": "^16.14.0", + "react-dom": "^16.14.0", + "react-html-parser": "^2.0.2", + "react-router-dom": "6.30.1", + "simple-git": "^3.28.0", + "uuid": "^11.1.0", + "validator": "^13.15.15", + "yargs": "^17.7.2" + }, + "bin": { + "git-proxy": "index.js", + "git-proxy-all": "concurrently 'npm run server' 'npm run client'" + }, + "devDependencies": { + "@babel/core": "^7.28.4", + "@babel/preset-react": "^7.27.1", + "@commitlint/cli": "^19.8.1", + "@commitlint/config-conventional": "^19.8.1", + "@eslint/compat": "^1.4.0", + "@eslint/js": "^9.36.0", + "@eslint/json": "^0.13.2", + "@types/domutils": "^1.7.8", + "@types/express": "^5.0.3", + "@types/express-http-proxy": "^1.6.7", + "@types/lodash": "^4.17.20", + "@types/mocha": "^10.0.10", + "@types/node": "^22.18.6", + "@types/react-dom": "^17.0.26", + "@types/react-html-parser": "^2.0.7", + "@types/sinon": "^17.0.4", + "@types/validator": "^13.15.3", + "@types/yargs": "^17.0.33", + "@vitejs/plugin-react": "^4.7.0", + "chai": "^4.5.0", + "chai-http": "^4.4.0", + "cypress": "^15.3.0", + "eslint": "^9.36.0", + "eslint-config-prettier": "^10.1.8", + "eslint-plugin-cypress": "^5.1.1", + "eslint-plugin-react": "^7.37.5", + "fast-check": "^4.3.0", + "globals": "^16.4.0", + "husky": "^9.1.7", + "lint-staged": "^16.2.0", + "mocha": "^10.8.2", + "nyc": "^17.1.0", + "prettier": "^3.6.2", + "proxyquire": "^2.1.3", + "quicktype": "^23.2.6", + "sinon": "^21.0.0", + "sinon-chai": "^3.7.0", + "ts-mocha": "^11.1.0", + "ts-node": "^10.9.2", + "tsx": "^4.20.5", + "typescript": "^5.9.2", + "typescript-eslint": "^8.44.1", + "vite": "^4.5.14", + "vite-tsconfig-paths": "^5.1.4" + }, + "engines": { + "node": ">=20.19.2" + }, + "optionalDependencies": { + "@esbuild/darwin-arm64": "^0.25.10", + "@esbuild/darwin-x64": "^0.25.10", + "@esbuild/linux-x64": "0.25.10", + "@esbuild/win32-x64": "0.25.10" + } + }, + "node_modules/@finos/git-proxy": { + "resolved": "../../..", + "link": true + } + } +} diff --git a/test/generated-config.test.js b/test/generated-config.test.js index cecee7038..4961827d7 100644 --- a/test/generated-config.test.js +++ b/test/generated-config.test.js @@ -212,9 +212,6 @@ describe('Generated Config (QuickType)', () => { userInADGroup: 'https://somedomain.com/some/path/checkUserGroups?domain=&name=&id=', }, - github: { - baseUrl: 'https://api.github.com', - }, }, domains: { @@ -224,13 +221,10 @@ describe('Generated Config (QuickType)', () => { // Complex nested structures attestationConfig: { - enabled: true, questions: [ { - id: 'q1', - type: 'boolean', - required: true, label: 'Test Question', + tooltip: { text: 'Test tooltip content', links: ['https://git-proxy.finos.org./'] }, }, ], }, diff --git a/test/processors/gitLeaks.test.js b/test/processors/gitLeaks.test.js index eca181c61..1461611f8 100644 --- a/test/processors/gitLeaks.test.js +++ b/test/processors/gitLeaks.test.js @@ -117,7 +117,7 @@ describe('gitleaks', () => { expect(result.error).to.be.false; expect(result.steps).to.have.lengthOf(1); expect(result.steps[0].error).to.be.false; - expect(logStub.calledWith('succeded')).to.be.true; + expect(logStub.calledWith('succeeded')).to.be.true; expect(logStub.calledWith('No leaks found')).to.be.true; });