Skip to content

Commit bdfd944

Browse files
authored
fix(bitbucket): fix rebasing mistakes in bitbucket backend and deps (#1522)
1 parent 6eb8695 commit bdfd944

File tree

8 files changed

+9
-11
lines changed

8 files changed

+9
-11
lines changed

packages/netlify-cms-backend-bitbucket/src/API.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { flow } from "lodash";
1+
import { flow, has } from "lodash";
22
import {
3-
LocalForage,
3+
localForage,
44
unsentRequest,
55
responseParser,
66
then,
@@ -67,13 +67,13 @@ export default class API {
6767

6868
readFile = async (path, sha, { ref = this.branch, parseText = true } = {}) => {
6969
const cacheKey = parseText ? `bb.${ sha }` : `bb.${ sha }.blob`;
70-
const cachedFile = sha ? await LocalForage.getItem(cacheKey) : null;
70+
const cachedFile = sha ? await localForage.getItem(cacheKey) : null;
7171
if (cachedFile) { return cachedFile; }
7272
const result = await this.request({
7373
url: `${ this.repoURL }/src/${ ref }/${ path }`,
7474
cache: "no-store",
7575
}).then(parseText ? responseParser({ format: "text" }) : responseParser({ format: "blob" }));
76-
if (sha) { LocalForage.setItem(cacheKey, result); }
76+
if (sha) { localForage.setItem(cacheKey, result); }
7777
return result;
7878
}
7979

packages/netlify-cms-backend-bitbucket/src/AuthenticationPage.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,12 @@ export default class BitbucketAuthenticationPage extends React.Component {
3535
};
3636

3737
render() {
38+
const { inProgress } = this.props;
39+
3840
return (
3941
<AuthenticationPage
4042
onLogin={this.handleLogin}
41-
loginDisabled={this.props.inProgress}
43+
loginDisabled={inProgress}
4244
loginErrorMessage={this.state.loginError}
4345
renderButtonContent={() => (
4446
<React.Fragment>

packages/netlify-cms-backend-bitbucket/src/implementation.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default class Bitbucket {
8181
base_url: this.base_url,
8282
site_id: this.site_id,
8383
};
84-
this.authenticator = new Authenticator(cfg);
84+
this.authenticator = new NetlifyAuthenticator(cfg);
8585
}
8686

8787
this.refreshedTokenPromise = this.authenticator.refresh({ provider: "bitbucket", refresh_token: this.refreshToken })

packages/netlify-cms-backend-git-gateway/src/AuthenticationPage.js

-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,6 @@ export default class GitGatewayAuthenticationPage extends React.Component {
147147
);
148148
}
149149

150-
console.log('returning');
151-
152150
return (
153151
<AuthenticationPage renderPageContent={() => (
154152
<AuthForm onSubmit={this.handleLogin}>

packages/netlify-cms-backend-git-gateway/src/implementation.js

-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ export default class GitGateway {
113113
requestFunction: this.requestFunction,
114114
hasWriteAccess: async () => true,
115115
});
116-
console.log(this.api);
117116
this.backend = new BitBucketBackend(this.config, { proxied: true, API: this.api });
118117
}
119118

packages/netlify-cms-lib-auth/src/netlify-auth.js

-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class Authenticator {
6161
cb(null, data);
6262
}
6363
if (e.data.indexOf('authorization:' + options.provider + ':error:') === 0) {
64-
console.log('Got authorization error');
6564
const err = JSON.parse(e.data.match(new RegExp('^authorization:' + options.provider + ':error:(.+)$'))[1]);
6665
window.removeEventListener('message', fn, false);
6766
this.authWindow.close();

packages/netlify-cms-lib-util/src/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ export localForage from './localForage';
55
export { resolvePath, basename, fileExtensionWithSeparator, fileExtension } from './path';
66
export { filterPromises, resolvePromiseProperties, then } from './promise';
77
export unsentRequest from './unsentRequest';
8+
export { filterByPropExtension, parseResponse, responseParser } from './backendUtil';

packages/netlify-cms-ui-default/src/AuthenticationPage.js

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const AuthenticationPage = ({
3737
renderButtonContent,
3838
renderPageContent,
3939
}) => {
40-
console.log(renderPageContent);
4140
return (
4241
<StyledAuthenticationPage>
4342
<PageLogoIcon size="300px" type="netlify-cms"/>

0 commit comments

Comments
 (0)