Skip to content

Commit

Permalink
Merge branch 'main' into gagik/fix-vscode-test
Browse files Browse the repository at this point in the history
  • Loading branch information
gagik authored Nov 22, 2024
2 parents 95585cb + dce0b68 commit cb365f6
Show file tree
Hide file tree
Showing 25 changed files with 155 additions and 334 deletions.
238 changes: 0 additions & 238 deletions .evergreen.yml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .evergreen/compile-artifact.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if [ `uname` = Darwin ]; then
# match what Node.js 20 does on their own builder machines
export CFLAGS='-mmacosx-version-min=10.15'
export CXXFLAGS='-mmacosx-version-min=10.15'
export MACOSX_DEPLOYMENT_TARGET=10.15
fi

# The CI machines we have for Windows and x64 macOS are not
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/evergreen.yml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1547,7 +1547,7 @@ buildvariants:
node_js_version: "<% out(variant.nVersion) %>"
mongosh_skip_node_version_check: "<% out(variant.skipNodeVersionCheck) %>"
tasks:
<% for (const test of ALL_UNIT_TESTS) { %>
<% for (const test of ALL_UNIT_TESTS.filter(test => test.variants.includes(variant.platform))) { %>
- name: test_<% out(test.id) %>
<% } %>
<% } %>
Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/cron-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ jobs:
name: Update automatically generated files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
# don't checkout a detatched HEAD
ref: ${{ github.head_ref }}

# this is important so git log can pick up on
# the whole history to generate the list of AUTHORS
fetch-depth: '0'
fetch-depth: "0"

- name: Set up Git
run: |
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: ^16.x
cache: 'npm'
cache: "npm"

- name: Install npm@8
run: |
Expand All @@ -50,41 +50,36 @@ jobs:
run: |
npm run update-authors
git add AUTHORS \*/AUTHORS
git commit --no-allow-empty -m "chore: update AUTHORS" || true
- name: Generate Error Documentation
run: |
npm run generate-error-overview
mv error-overview.md error-overview.rst packages/errors/generated/
npm run reformat
git add packages/errors/generated
git commit --no-allow-empty -m "chore: update error documentation" || true
- name: Regenerate Evergreen Config
run: |
npm run update-evergreen-config
git add .evergreen.yml
git commit --no-allow-empty -m "chore: update evergreen config" || true
- name: Update Security Test Summary
run: |
npm run update-security-test-summary
git add docs/security-test-summary.md
git commit --no-allow-empty -m "chore: update security test summary" || true
- name: Regenerate CLI usage text in README files
run: |
npm run update-cli-usage-text packages/*/*.md *.md
git add packages/*/*.md *.md
git commit --no-allow-empty -m "chore: update CLI usage text" || true
- name: Create pull request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
commit-message: Update auto-generated files
branch: ci/cron-tasks-update-files
title: 'chore: update auto-generated files'
title: "chore: update auto-generated files"
body: |
- Update auto-generated files
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ variable. For detailed instructions for each of our supported platforms, please
--oidcTrustedEndpoint Treat the cluster/database mongosh as a trusted endpoint
--oidcIdTokenAsAccessToken Use ID tokens in place of access tokens for auth
--oidcDumpTokens[=mode] Debug OIDC by printing tokens to mongosh's output [full|include-secrets]
--oidcNoNonce Don't send a nonce argument in the OIDC auth request

DB Address Examples:

Expand Down
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
The following third-party software is used by and included in **mongosh**.
This document was automatically generated on Sun Nov 17 2024.
This document was automatically generated on Thu Nov 21 2024.

## List of dependencies

Expand Down
150 changes: 86 additions & 64 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/arg-parser/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Basit <[email protected]>
Alena Khineika <[email protected]>
Sergey Petushkov <[email protected]>
Gagik Amaryan <[email protected]>
Nikola Irinchev <[email protected]>
16 changes: 16 additions & 0 deletions packages/arg-parser/src/arg-mapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,22 @@ describe('arg-mapper.mapCliToDriver', function () {
});
});

context('when cli args have oidcNoNonce', function () {
const cliOptions: CliOptions = {
oidcNoNonce: true,
};

it('maps to oidc skipNonceInAuthCodeRequest', function () {
expect(optionsTest(cliOptions)).to.deep.equal({
driver: {
oidc: {
skipNonceInAuthCodeRequest: true,
},
},
});
});
});

context('when cli args have browser', function () {
it('maps to oidc command', function () {
expect(optionsTest({ browser: '/usr/bin/browser' })).to.deep.equal({
Expand Down
3 changes: 2 additions & 1 deletion packages/arg-parser/src/arg-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function setServerApi<Key extends keyof ServerApi>(
const serverApi =
typeof previousServerApi === 'string'
? { version: previousServerApi }
: { ...previousServerApi } ?? {};
: { ...previousServerApi };
serverApi[key] = value;
return setDriver(i, 'serverApi', serverApi as Required<ServerApi>);
}
Expand Down Expand Up @@ -237,6 +237,7 @@ const MAPPINGS: {
v.split(',').filter(Boolean) as OIDCOptions['allowedFlows']
),
oidcIdTokenAsAccessToken: (i, v) => setOIDC(i, 'passIdTokenAsAccessToken', v),
oidcNoNonce: (i, v) => setOIDC(i, 'skipNonceInAuthCodeRequest', v),
browser: (i, v) =>
setOIDC(i, 'openBrowser', typeof v === 'string' ? { command: v } : v),
};
Expand Down
1 change: 1 addition & 0 deletions packages/arg-parser/src/cli-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@ export interface CliOptions {
oidcTrustedEndpoint?: boolean;
oidcIdTokenAsAccessToken?: boolean;
oidcDumpTokens?: boolean | 'redacted' | 'include-secrets';
oidcNoNonce?: boolean;
browser?: string | false;
}
Loading

0 comments on commit cb365f6

Please sign in to comment.