10000 Updated repo to use yarn v3 by dgreene-r7 · Pull Request #212 · rapid7/awsaml · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Updated repo to use yarn v3 #212

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

Merged
merged 2 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"settings": {
"react": {
"version": "detect"
}
},
"extends": ["rapid7/base"],
"globals": {
"require": true,
Expand Down
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,10 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
*~
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
873 changes: 873 additions & 0 deletions .yarn/releases/yarn-3.4.1.cjs

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.4.1.cjs
7 changes: 4 additions & 3 deletions api/aws-credentials.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class AwsCredentials {
this.saveAsIniFile(credentials, profile, done, region);
}

saveAsIniFile(credentials, profile, done, region = "") {
saveAsIniFile(credentials, profile, done, region = '') {
const home = AwsCredentials.resolveHomePath();

if (!home) {
Expand Down Expand Up @@ -46,8 +46,9 @@ class AwsCredentials {
config[profile].aws_access_key_id = credentials.AccessKeyId;
config[profile].aws_secret_access_key = credentials.SecretAccessKey;
config[profile].aws_session_token = credentials.SessionToken;
if (region.includes("gov"))
config[profile].region = region
if (region.includes('gov')) {
config[profile].region = region;
}
// Some libraries e.g. boto v2.38.0, expect an "aws_security_token" entry.
config[profile].aws_security_token = credentials.SessionToken;
config = ini.encode(config, {whitespace: true});
Expand Down
7 changes: 4 additions & 3 deletions api/routes/refresh.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ module.exports = (app) => {
});
}

const region = session.roleArn.includes("aws-us-gov") ? 'us-gov-west-1' : 'us-east-1';
Aws.config.update({region: region});
const region = session.roleArn.includes('aws-us-gov') ? 'us-gov-west-1' : 'us-east-1';

Aws.config.update({region});

const sts = new Aws.STS();

Expand Down Expand Up @@ -69,7 +70,7 @@ module.exports = (app) => {
const profile = metadataUrls.find((metadata) => metadata.url === metadataUrl);

credentialResponseObj.profileName = profile.name;

credentials.save(data.Credentials, profileName, (credSaveErr) => {
if (credSaveErr) {
res.json(Object.assign({}, credentialResponseObj, {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"bugs": {
"url": "https://github.com/rapid7/awsaml/issues"
},
"packageManager": "yarn@3.4.1",
"scripts": {
"electron": "electron electron/electron.js",
"electron-dev": "NODE_ENV=development ELECTRON_START_URL=http://localhost:3000 electron electron/electron.js",
Expand All @@ -20,7 +21,7 @@
"lint": "eslint '*.js' 'electron/**/*.js' 'api/**/*.js' 'src/**/*.js' 'test/**/*.js'",
"report": "coveralls < ./coverage/lcov.info",
"prebuild": "rm -rf dist/ && rm -rf build/",
"build": "export PLATFORM=${PLATFORM:=darwin,linux,win32}; yarn react-build && node packager.js",
"build": "yarn react-build && node packager.js",
"postbuild": "for platform in `echo $PLATFORM | sed 's/,/ /g'`; do export platform=$platform; npm run zip; done",
"zip": "cd dist/Awsaml-${platform}-x64 && zip -q -y -FS -r ../awsaml-v${npm_package_version}-${platform}-x64.zip .",
"show-appcast-checkpoint": "curl --compressed --location --user-agent 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.152 Safari/537.36' 'https://github.com/rapid7/awsaml/releases.atom' | /usr/bin/sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256"
Expand Down
4 changes: 3 additions & 1 deletion src/containers/configure/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ class LoginComponent extends Component {
const {profileName} = this.state;

const text = `Are you sure you want to delete the profile "${profileName ? profileName : this.props.pretty}"?`;

if (window.confirm(text)) {
const payload = { profileUuid: this.props.profileUuid };
const payload = {profileUuid: this.props.profileUuid};

this.props.deleteProfile(payload);
}
};
Expand Down
Loading
0