isomorphic-git 1.38.3 → 1.38.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +16 -6
- package/index.js +16 -6
- package/index.umd.min.js +1 -1
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -9331,6 +9331,16 @@ async function hasObject({
|
|
|
9331
9331
|
return result
|
|
9332
9332
|
}
|
|
9333
9333
|
|
|
9334
|
+
function addCredentialUsername({ config, onAuth }) {
|
|
9335
|
+
if (!onAuth) return onAuth
|
|
9336
|
+
|
|
9337
|
+
return async (url, auth) => {
|
|
9338
|
+
const username =
|
|
9339
|
+
auth.username || (await config.get(`credential.${url}.username`));
|
|
9340
|
+
return onAuth(url, username ? { ...auth, username } : auth)
|
|
9341
|
+
}
|
|
9342
|
+
}
|
|
9343
|
+
|
|
9334
9344
|
// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0
|
|
9335
9345
|
function emptyPackfile(pack) {
|
|
9336
9346
|
const pheader = '5041434b';
|
|
@@ -9350,8 +9360,8 @@ function filterCapabilities(server, client) {
|
|
|
9350
9360
|
|
|
9351
9361
|
const pkg = {
|
|
9352
9362
|
name: 'isomorphic-git',
|
|
9353
|
-
version: '1.38.
|
|
9354
|
-
agent: 'git/isomorphic-git@1.38.
|
|
9363
|
+
version: '1.38.4',
|
|
9364
|
+
agent: 'git/isomorphic-git@1.38.4',
|
|
9355
9365
|
};
|
|
9356
9366
|
|
|
9357
9367
|
class FIFO {
|
|
@@ -9765,9 +9775,9 @@ async function _fetch({
|
|
|
9765
9775
|
const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url });
|
|
9766
9776
|
const remoteHTTP = await GitRemoteHTTP.discover({
|
|
9767
9777
|
http,
|
|
9768
|
-
onAuth,
|
|
9778
|
+
onAuth: addCredentialUsername({ config, onAuth }),
|
|
9769
9779
|
onAuthSuccess,
|
|
9770
|
-
onAuthFailure,
|
|
9780
|
+
onAuthFailure: addCredentialUsername({ config, onAuth: onAuthFailure }),
|
|
9771
9781
|
corsProxy,
|
|
9772
9782
|
service: 'git-upload-pack',
|
|
9773
9783
|
url,
|
|
@@ -13886,9 +13896,9 @@ async function _push({
|
|
|
13886
13896
|
const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url });
|
|
13887
13897
|
const httpRemote = await GitRemoteHTTP.discover({
|
|
13888
13898
|
http,
|
|
13889
|
-
onAuth,
|
|
13899
|
+
onAuth: addCredentialUsername({ config, onAuth }),
|
|
13890
13900
|
onAuthSuccess,
|
|
13891
|
-
onAuthFailure,
|
|
13901
|
+
onAuthFailure: addCredentialUsername({ config, onAuth: onAuthFailure }),
|
|
13892
13902
|
corsProxy,
|
|
13893
13903
|
service: 'git-receive-pack',
|
|
13894
13904
|
url,
|
package/index.js
CHANGED
|
@@ -9318,6 +9318,16 @@ async function hasObject({
|
|
|
9318
9318
|
return result
|
|
9319
9319
|
}
|
|
9320
9320
|
|
|
9321
|
+
function addCredentialUsername({ config, onAuth }) {
|
|
9322
|
+
if (!onAuth) return onAuth
|
|
9323
|
+
|
|
9324
|
+
return async (url, auth) => {
|
|
9325
|
+
const username =
|
|
9326
|
+
auth.username || (await config.get(`credential.${url}.username`));
|
|
9327
|
+
return onAuth(url, username ? { ...auth, username } : auth)
|
|
9328
|
+
}
|
|
9329
|
+
}
|
|
9330
|
+
|
|
9321
9331
|
// TODO: make a function that just returns obCount. then emptyPackfile = () => sizePack(pack) === 0
|
|
9322
9332
|
function emptyPackfile(pack) {
|
|
9323
9333
|
const pheader = '5041434b';
|
|
@@ -9337,8 +9347,8 @@ function filterCapabilities(server, client) {
|
|
|
9337
9347
|
|
|
9338
9348
|
const pkg = {
|
|
9339
9349
|
name: 'isomorphic-git',
|
|
9340
|
-
version: '1.38.
|
|
9341
|
-
agent: 'git/isomorphic-git@1.38.
|
|
9350
|
+
version: '1.38.4',
|
|
9351
|
+
agent: 'git/isomorphic-git@1.38.4',
|
|
9342
9352
|
};
|
|
9343
9353
|
|
|
9344
9354
|
class FIFO {
|
|
@@ -9752,9 +9762,9 @@ async function _fetch({
|
|
|
9752
9762
|
const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url });
|
|
9753
9763
|
const remoteHTTP = await GitRemoteHTTP.discover({
|
|
9754
9764
|
http,
|
|
9755
|
-
onAuth,
|
|
9765
|
+
onAuth: addCredentialUsername({ config, onAuth }),
|
|
9756
9766
|
onAuthSuccess,
|
|
9757
|
-
onAuthFailure,
|
|
9767
|
+
onAuthFailure: addCredentialUsername({ config, onAuth: onAuthFailure }),
|
|
9758
9768
|
corsProxy,
|
|
9759
9769
|
service: 'git-upload-pack',
|
|
9760
9770
|
url,
|
|
@@ -13873,9 +13883,9 @@ async function _push({
|
|
|
13873
13883
|
const GitRemoteHTTP = GitRemoteManager.getRemoteHelperFor({ url });
|
|
13874
13884
|
const httpRemote = await GitRemoteHTTP.discover({
|
|
13875
13885
|
http,
|
|
13876
|
-
onAuth,
|
|
13886
|
+
onAuth: addCredentialUsername({ config, onAuth }),
|
|
13877
13887
|
onAuthSuccess,
|
|
13878
|
-
onAuthFailure,
|
|
13888
|
+
onAuthFailure: addCredentialUsername({ config, onAuth: onAuthFailure }),
|
|
13879
13889
|
corsProxy,
|
|
13880
13890
|
service: 'git-receive-pack',
|
|
13881
13891
|
url,
|