isomorphic-git 1.38.3 → 1.38.5

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/models/index.cjs CHANGED
@@ -22,6 +22,18 @@ function dirname(path) {
22
22
  * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.
23
23
  * SPDX-License-Identifier: LGPL-3.0-or-later
24
24
  * Copyright (c) James Prevett and other ZenFS contributors.
25
+ *
26
+ * Windows support added:
27
+ * - Backslashes are normalised to forward slashes before processing.
28
+ * - Drive-letter prefixes (e.g. "C:") are detected and preserved through
29
+ * normalisation, so absolute Windows paths are handled correctly.
30
+ * - An absolute argument passed to join() resets the accumulated path,
31
+ * matching Node behaviour and handling worktree gitdir paths properly.
32
+ *
33
+ * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading
34
+ * backslashes are normalised to forward slashes and then collapsed by
35
+ * normalizeString, losing the UNC root. Git on Windows works with
36
+ * drive-letter paths, so this is not expected to be a practical issue.
25
37
  */
26
38
 
27
39
  function normalizeString(path, aar) {
@@ -85,29 +97,67 @@ function normalizeString(path, aar) {
85
97
  return res
86
98
  }
87
99
 
100
+ // Returns the Windows drive prefix ("C:") if present, otherwise null.
101
+ function getWindowsDrivePrefix(path) {
102
+ if (path.length >= 2 && /^[a-zA-Z]:/.test(path)) {
103
+ return path.slice(0, 2) // e.g. "C:"
104
+ }
105
+ return null
106
+ }
107
+
88
108
  function normalize(path) {
89
109
  if (!path.length) return '.'
90
110
 
91
- const isAbsolute = path[0] === '/';
92
- const trailingSeparator = path.at(-1) === '/';
111
+ // Normalise backslashes to forward slashes before any other processing.
112
+ path = path.replace(/\\/g, '/');
93
113
 
94
- path = normalizeString(path, !isAbsolute);
114
+ const drivePrefix = getWindowsDrivePrefix(path);
115
+ // isAbsolute: Unix root ('/foo') OR Windows drive+slash ('C:/foo').
116
+ const isAbsolute =
117
+ path[0] === '/' || (drivePrefix !== null && path[2] === '/');
118
+ const trailingSeparator = path.at(-1) === '/';
95
119
 
96
- if (!path.length) {
97
- if (isAbsolute) return '/'
98
- return trailingSeparator ? './' : '.'
120
+ // Strip the drive prefix before feeding into normalizeString so that the
121
+ // core algorithm only ever sees a plain POSIX-style string.
122
+ const pathBody = drivePrefix ? path.slice(2) : path;
123
+
124
+ let normalized = normalizeString(pathBody, !isAbsolute);
125
+
126
+ if (!normalized.length) {
127
+ const root = drivePrefix
128
+ ? isAbsolute
129
+ ? drivePrefix + '/'
130
+ : drivePrefix
131
+ : isAbsolute
132
+ ? '/'
133
+ : '.';
134
+ return trailingSeparator && !isAbsolute ? root + '/' : root
99
135
  }
100
- if (trailingSeparator) path += '/';
136
+ if (trailingSeparator) normalized += '/';
101
137
 
102
- return isAbsolute ? `/${path}` : path
138
+ if (drivePrefix) {
139
+ return isAbsolute
140
+ ? `${drivePrefix}/${normalized}`
141
+ : `${drivePrefix}${normalized}`
142
+ }
143
+ return isAbsolute ? `/${normalized}` : normalized
103
144
  }
104
145
 
105
146
  function join(...args) {
106
147
  if (args.length === 0) return '.'
107
148
  let joined;
108
149
  for (let i = 0; i < args.length; ++i) {
109
- const arg = args[i];
110
- if (arg.length > 0) {
150
+ // Normalise separators before processing.
151
+ const arg = args[i].replace(/\\/g, '/');
152
+ if (arg.length === 0) continue
153
+
154
+ // A Windows drive-letter path (e.g. "C:/worktrees/foo") cannot be
155
+ // meaningfully appended to any base, so it resets the accumulator.
156
+ // Unix absolute paths (leading '/') are NOT reset here — that would be
157
+ // path.resolve() semantics; path.join('foo', '/bar') must yield 'foo/bar'.
158
+ if (/^[a-zA-Z]:\//.test(arg)) {
159
+ joined = arg;
160
+ } else {
111
161
  if (joined === undefined) joined = arg;
112
162
  else joined += '/' + arg;
113
163
  }
package/models/index.js CHANGED
@@ -16,6 +16,18 @@ function dirname(path) {
16
16
  * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.
17
17
  * SPDX-License-Identifier: LGPL-3.0-or-later
18
18
  * Copyright (c) James Prevett and other ZenFS contributors.
19
+ *
20
+ * Windows support added:
21
+ * - Backslashes are normalised to forward slashes before processing.
22
+ * - Drive-letter prefixes (e.g. "C:") are detected and preserved through
23
+ * normalisation, so absolute Windows paths are handled correctly.
24
+ * - An absolute argument passed to join() resets the accumulated path,
25
+ * matching Node behaviour and handling worktree gitdir paths properly.
26
+ *
27
+ * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading
28
+ * backslashes are normalised to forward slashes and then collapsed by
29
+ * normalizeString, losing the UNC root. Git on Windows works with
30
+ * drive-letter paths, so this is not expected to be a practical issue.
19
31
  */
20
32
 
21
33
  function normalizeString(path, aar) {
@@ -79,29 +91,67 @@ function normalizeString(path, aar) {
79
91
  return res
80
92
  }
81
93
 
94
+ // Returns the Windows drive prefix ("C:") if present, otherwise null.
95
+ function getWindowsDrivePrefix(path) {
96
+ if (path.length >= 2 && /^[a-zA-Z]:/.test(path)) {
97
+ return path.slice(0, 2) // e.g. "C:"
98
+ }
99
+ return null
100
+ }
101
+
82
102
  function normalize(path) {
83
103
  if (!path.length) return '.'
84
104
 
85
- const isAbsolute = path[0] === '/';
86
- const trailingSeparator = path.at(-1) === '/';
105
+ // Normalise backslashes to forward slashes before any other processing.
106
+ path = path.replace(/\\/g, '/');
87
107
 
88
- path = normalizeString(path, !isAbsolute);
108
+ const drivePrefix = getWindowsDrivePrefix(path);
109
+ // isAbsolute: Unix root ('/foo') OR Windows drive+slash ('C:/foo').
110
+ const isAbsolute =
111
+ path[0] === '/' || (drivePrefix !== null && path[2] === '/');
112
+ const trailingSeparator = path.at(-1) === '/';
89
113
 
90
- if (!path.length) {
91
- if (isAbsolute) return '/'
92
- return trailingSeparator ? './' : '.'
114
+ // Strip the drive prefix before feeding into normalizeString so that the
115
+ // core algorithm only ever sees a plain POSIX-style string.
116
+ const pathBody = drivePrefix ? path.slice(2) : path;
117
+
118
+ let normalized = normalizeString(pathBody, !isAbsolute);
119
+
120
+ if (!normalized.length) {
121
+ const root = drivePrefix
122
+ ? isAbsolute
123
+ ? drivePrefix + '/'
124
+ : drivePrefix
125
+ : isAbsolute
126
+ ? '/'
127
+ : '.';
128
+ return trailingSeparator && !isAbsolute ? root + '/' : root
93
129
  }
94
- if (trailingSeparator) path += '/';
130
+ if (trailingSeparator) normalized += '/';
95
131
 
96
- return isAbsolute ? `/${path}` : path
132
+ if (drivePrefix) {
133
+ return isAbsolute
134
+ ? `${drivePrefix}/${normalized}`
135
+ : `${drivePrefix}${normalized}`
136
+ }
137
+ return isAbsolute ? `/${normalized}` : normalized
97
138
  }
98
139
 
99
140
  function join(...args) {
100
141
  if (args.length === 0) return '.'
101
142
  let joined;
102
143
  for (let i = 0; i < args.length; ++i) {
103
- const arg = args[i];
104
- if (arg.length > 0) {
144
+ // Normalise separators before processing.
145
+ const arg = args[i].replace(/\\/g, '/');
146
+ if (arg.length === 0) continue
147
+
148
+ // A Windows drive-letter path (e.g. "C:/worktrees/foo") cannot be
149
+ // meaningfully appended to any base, so it resets the accumulator.
150
+ // Unix absolute paths (leading '/') are NOT reset here — that would be
151
+ // path.resolve() semantics; path.join('foo', '/bar') must yield 'foo/bar'.
152
+ if (/^[a-zA-Z]:\//.test(arg)) {
153
+ joined = arg;
154
+ } else {
105
155
  if (joined === undefined) joined = arg;
106
156
  else joined += '/' + arg;
107
157
  }
@@ -1,3 +1,3 @@
1
1
  /*! For license information please see index.umd.min.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,()=>(()=>{"use strict";var t={6867:t=>{const e=(t,e)=>function(...r){return new(0,e.promiseModule)((n,i)=>{e.multiArgs?r.push((...t)=>{e.errorFirst?t[0]?i(t):(t.shift(),n(t)):n(t)}):e.errorFirst?r.push((t,e)=>{t?i(t):n(e)}):r.push(n),t.apply(this,r)})};t.exports=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const i=t=>{const e=e=>"string"==typeof e?t===e:e.test(t);return r.include?r.include.some(e):!r.exclude.some(e)};let o;o="function"===n?function(...n){return r.excludeMain?t(...n):e(t,r).apply(this,n)}:Object.create(Object.getPrototypeOf(t));for(const n in t){const c=t[n];o[n]="function"==typeof c&&i(n)?e(c,r):c}return o}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{FileSystem:()=>f});var i=r(6867);function o(t,e){return-(t<e)||+(t>e)}function c(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}async function s(t,e){const r=await t.readdir(e);null==r?await t.rm(e):r.length?await Promise.all(r.map(r=>{const n=function(...t){if(0===t.length)return".";let e;for(let r=0;r<t.length;++r){const n=t[r];n.length>0&&(void 0===e?e=n:e+="/"+n)}return void 0===e?".":function(t){if(!t.length)return".";const e="/"===t[0],r="/"===t.at(-1);return(t=function(t,e){let r="",n=0,i=-1,o=0,c="\0";for(let s=0;s<=t.length;++s){if(s<t.length)c=t[s];else{if("/"===c)break;c="/"}if("/"===c){if(i===s-1||1===o);else if(2===o){if(r.length<2||2!==n||"."!==r.at(-1)||"."!==r.at(-2)){if(r.length>2){const t=r.lastIndexOf("/");-1===t?(r="",n=0):(r=r.slice(0,t),n=r.length-1-r.lastIndexOf("/")),i=s,o=0;continue}if(0!==r.length){r="",n=0,i=s,o=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),n=s-i-1;i=s,o=0}else"."===c&&-1!==o?++o:o=-1}return r}(t,!e)).length?(r&&(t+="/"),e?`/${t}`:t):e?"/":r?"./":"."}(e)}(e,r);return t.lstat(n).then(e=>{if(e)return e.isDirectory()?s(t,n):t.rm(n)})})).then(()=>t.rmdir(e)):await t.rmdir(e)}function a(t){return"function"==typeof t}function l(t){return function(t){return t&&"object"==typeof t}(e=(t=>{try{return t.readFile().catch(t=>t)}catch(t){return t}})(t))&&a(e.then)&&a(e.catch);var e}const u=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function d(t,e){if(l(e))for(const r of u)t[`_${r}`]=e[r].bind(e);else for(const r of u)t[`_${r}`]=i(e[r].bind(e));l(e)?(e.cp&&(t._cp=e.cp.bind(e)),e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=s.bind(null,t)):(e.cp&&(t._cp=i(e.cp.bind(e))),e.rm?t._rm=i(e.rm.bind(e)):e.rmdir.length>2?t._rm=i(e.rmdir.bind(e)):t._rm=s.bind(null,t))}class f{constructor(t){if(void 0!==t._original_unwrapped_fs)return t;const e=Object.getOwnPropertyDescriptor(t,"promises");e&&e.enumerable?d(this,t.promises):d(this,t),this._original_unwrapped_fs=t}async exists(t,e={}){try{return await this._stat(t),!0}catch(t){if("ENOENT"===t.code||"ENOTDIR"===t.code||(t.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',t),t}}async read(t,e={}){try{let r=await this._readFile(t,e);if("true"===e.autocrlf)try{r=new TextDecoder("utf8",{fatal:!0}).decode(r),r=r.replace(/\r\n/g,"\n"),r=(new TextEncoder).encode(r)}catch(t){}return"string"!=typeof r&&(r=Buffer.from(r)),r}catch(t){return null}}async write(t,e,r={}){try{await this._writeFile(t,e,r)}catch(n){await this.mkdir(c(t)),await this._writeFile(t,e,r)}}async mkdir(t,e=!1){try{await this._mkdir(t)}catch(r){if(null===r)return;if("EEXIST"===r.code)return;if(e)throw r;if("ENOENT"===r.code){const e=c(t);if("."===e||"/"===e||e===t)throw r;await this.mkdir(e),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(t){if("ENOENT"!==t.code)throw t}}async rmdir(t,e){try{e&&e.recursive?await this._rm(t,e):await this._rmdir(t)}catch(t){if("ENOENT"!==t.code)throw t}}async readdir(t){try{const e=await this._readdir(t);return e.sort(o),e}catch(t){return"ENOTDIR"===t.code?null:[]}}async readdirDeep(t){const e=await this._readdir(t);return(await Promise.all(e.map(async e=>{const r=t+"/"+e;return(await this._stat(r)).isDirectory()?this.readdirDeep(r):r}))).reduce((t,e)=>t.concat(e),[])}async lstat(t){try{return await this._lstat(t)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}async readlink(t,e={encoding:"buffer"}){try{const r=await this._readlink(t,e);return Buffer.isBuffer(r)?r:Buffer.from(r)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}async writelink(t,e){return this._symlink(e.toString("utf8"),t)}}return n})());
2
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.git=e():t.git=e()}(self,()=>(()=>{"use strict";var t={6867:t=>{const e=(t,e)=>function(...r){return new(0,e.promiseModule)((n,i)=>{e.multiArgs?r.push((...t)=>{e.errorFirst?t[0]?i(t):(t.shift(),n(t)):n(t)}):e.errorFirst?r.push((t,e)=>{t?i(t):n(e)}):r.push(n),t.apply(this,r)})};t.exports=(t,r)=>{r=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},r);const n=typeof t;if(null===t||"object"!==n&&"function"!==n)throw new TypeError(`Expected \`input\` to be a \`Function\` or \`Object\`, got \`${null===t?"null":n}\``);const i=t=>{const e=e=>"string"==typeof e?t===e:e.test(t);return r.include?r.include.some(e):!r.exclude.some(e)};let o;o="function"===n?function(...n){return r.excludeMain?t(...n):e(t,r).apply(this,n)}:Object.create(Object.getPrototypeOf(t));for(const n in t){const c=t[n];o[n]="function"==typeof c&&i(n)?e(c,r):c}return o}}},e={};function r(n){var i=e[n];if(void 0!==i)return i.exports;var o=e[n]={exports:{}};return t[n](o,o.exports,r),o.exports}r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{FileSystem:()=>f});var i=r(6867);function o(t,e){return-(t<e)||+(t>e)}function c(t){const e=Math.max(t.lastIndexOf("/"),t.lastIndexOf("\\"));return-1===e?".":0===e?"/":t.slice(0,e)}async function s(t,e){const r=await t.readdir(e);null==r?await t.rm(e):r.length?await Promise.all(r.map(r=>{const n=function(...t){if(0===t.length)return".";let e;for(let r=0;r<t.length;++r){const n=t[r].replace(/\\/g,"/");0!==n.length&&(/^[a-zA-Z]:\//.test(n)||void 0===e?e=n:e+="/"+n)}return void 0===e?".":function(t){if(!t.length)return".";const e=function(t){return t.length>=2&&/^[a-zA-Z]:/.test(t)?t.slice(0,2):null}(t=t.replace(/\\/g,"/")),r="/"===t[0]||null!==e&&"/"===t[2],n="/"===t.at(-1);let i=function(t,e){let r="",n=0,i=-1,o=0,c="\0";for(let s=0;s<=t.length;++s){if(s<t.length)c=t[s];else{if("/"===c)break;c="/"}if("/"===c){if(i===s-1||1===o);else if(2===o){if(r.length<2||2!==n||"."!==r.at(-1)||"."!==r.at(-2)){if(r.length>2){const t=r.lastIndexOf("/");-1===t?(r="",n=0):(r=r.slice(0,t),n=r.length-1-r.lastIndexOf("/")),i=s,o=0;continue}if(0!==r.length){r="",n=0,i=s,o=0;continue}}e&&(r+=r.length>0?"/..":"..",n=2)}else r.length>0?r+="/"+t.slice(i+1,s):r=t.slice(i+1,s),n=s-i-1;i=s,o=0}else"."===c&&-1!==o?++o:o=-1}return r}(e?t.slice(2):t,!r);if(!i.length){const t=e?r?e+"/":e:r?"/":".";return n&&!r?t+"/":t}return n&&(i+="/"),e?r?`${e}/${i}`:`${e}${i}`:r?`/${i}`:i}(e)}(e,r);return t.lstat(n).then(e=>{if(e)return e.isDirectory()?s(t,n):t.rm(n)})})).then(()=>t.rmdir(e)):await t.rmdir(e)}function a(t){return"function"==typeof t}function l(t){return function(t){return t&&"object"==typeof t}(e=(t=>{try{return t.readFile().catch(t=>t)}catch(t){return t}})(t))&&a(e.then)&&a(e.catch);var e}const u=["readFile","writeFile","mkdir","rmdir","unlink","stat","lstat","readdir","readlink","symlink"];function d(t,e){if(l(e))for(const r of u)t[`_${r}`]=e[r].bind(e);else for(const r of u)t[`_${r}`]=i(e[r].bind(e));l(e)?(e.cp&&(t._cp=e.cp.bind(e)),e.rm?t._rm=e.rm.bind(e):e.rmdir.length>1?t._rm=e.rmdir.bind(e):t._rm=s.bind(null,t)):(e.cp&&(t._cp=i(e.cp.bind(e))),e.rm?t._rm=i(e.rm.bind(e)):e.rmdir.length>2?t._rm=i(e.rmdir.bind(e)):t._rm=s.bind(null,t))}class f{constructor(t){if(void 0!==t._original_unwrapped_fs)return t;const e=Object.getOwnPropertyDescriptor(t,"promises");e&&e.enumerable?d(this,t.promises):d(this,t),this._original_unwrapped_fs=t}async exists(t,e={}){try{return await this._stat(t),!0}catch(t){if("ENOENT"===t.code||"ENOTDIR"===t.code||(t.code||"").includes("ENS"))return!1;throw console.log('Unhandled error in "FileSystem.exists()" function',t),t}}async read(t,e={}){try{let r=await this._readFile(t,e);if("true"===e.autocrlf)try{r=new TextDecoder("utf8",{fatal:!0}).decode(r),r=r.replace(/\r\n/g,"\n"),r=(new TextEncoder).encode(r)}catch(t){}return"string"!=typeof r&&(r=Buffer.from(r)),r}catch(t){return null}}async write(t,e,r={}){try{await this._writeFile(t,e,r)}catch(n){await this.mkdir(c(t)),await this._writeFile(t,e,r)}}async mkdir(t,e=!1){try{await this._mkdir(t)}catch(r){if(null===r)return;if("EEXIST"===r.code)return;if(e)throw r;if("ENOENT"===r.code){const e=c(t);if("."===e||"/"===e||e===t)throw r;await this.mkdir(e),await this.mkdir(t,!0)}}}async rm(t){try{await this._unlink(t)}catch(t){if("ENOENT"!==t.code)throw t}}async rmdir(t,e){try{e&&e.recursive?await this._rm(t,e):await this._rmdir(t)}catch(t){if("ENOENT"!==t.code)throw t}}async readdir(t){try{const e=await this._readdir(t);return e.sort(o),e}catch(t){return"ENOTDIR"===t.code?null:[]}}async readdirDeep(t){const e=await this._readdir(t);return(await Promise.all(e.map(async e=>{const r=t+"/"+e;return(await this._stat(r)).isDirectory()?this.readdirDeep(r):r}))).reduce((t,e)=>t.concat(e),[])}async lstat(t){try{return await this._lstat(t)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}async readlink(t,e={encoding:"buffer"}){try{const r=await this._readlink(t,e);return Buffer.isBuffer(r)?r:Buffer.from(r)}catch(t){if("ENOENT"===t.code||(t.code||"").includes("ENS"))return null;throw t}}async writelink(t,e){return this._symlink(e.toString("utf8"),t)}}return n})());
3
3
  //# sourceMappingURL=index.umd.min.js.map
@@ -2,4 +2,16 @@
2
2
  * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.
3
3
  * SPDX-License-Identifier: LGPL-3.0-or-later
4
4
  * Copyright (c) James Prevett and other ZenFS contributors.
5
+ *
6
+ * Windows support added:
7
+ * - Backslashes are normalised to forward slashes before processing.
8
+ * - Drive-letter prefixes (e.g. "C:") are detected and preserved through
9
+ * normalisation, so absolute Windows paths are handled correctly.
10
+ * - An absolute argument passed to join() resets the accumulated path,
11
+ * matching Node behaviour and handling worktree gitdir paths properly.
12
+ *
13
+ * Limitation: UNC paths (e.g. \\server\share) are not supported. The leading
14
+ * backslashes are normalised to forward slashes and then collapsed by
15
+ * normalizeString, losing the UNC root. Git on Windows works with
16
+ * drive-letter paths, so this is not expected to be a practical issue.
5
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"models/index.umd.min.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAa,IAAID,IAEjBD,EAAU,IAAIC,GACf,CATD,CASGK,KAAM,I,mCCPT,MAAMC,EAAY,CAACC,EAAIC,IAAY,YAAaC,GAG/C,OAAO,IAAIC,EAFDF,EAAQG,eAEL,CAACC,EAASC,KAClBL,EAAQM,UACXL,EAAKM,KAAK,IAAIC,KACTR,EAAQS,WACPD,EAAO,GACVH,EAAOG,IAEPA,EAAOE,QACPN,EAAQI,IAGTJ,EAAQI,KAGAR,EAAQS,WAClBR,EAAKM,KAAK,CAACI,EAAOH,KACbG,EACHN,EAAOM,GAEPP,EAAQI,KAIVP,EAAKM,KAAKH,GAGXL,EAAGa,MAAMC,KAAMZ,IAEjB,EAEAP,EAAOD,QAAU,CAACqB,EAAOd,KACxBA,EAAUe,OAAOC,OAAO,CACvBC,QAAS,CAAC,oBACVR,YAAY,EACZN,cAAee,SACblB,GAEH,MAAMmB,SAAiBL,EACvB,GAAgB,OAAVA,GAA+B,WAAZK,GAAoC,aAAZA,EAChD,MAAM,IAAIC,UAAU,gEAA0E,OAAVN,EAAiB,OAASK,OAG/G,MAAME,EAASC,IACd,MAAMC,EAAQC,GAA8B,iBAAZA,EAAuBF,IAAQE,EAAUA,EAAQC,KAAKH,GACtF,OAAOtB,EAAQ0B,QAAU1B,EAAQ0B,QAAQC,KAAKJ,IAAUvB,EAAQiB,QAAQU,KAAKJ,IAG9E,IAAIK,EAEHA,EADe,aAAZT,EACG,YAAalB,GAClB,OA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P,GAAiB,WAAbA,EAAIC,KAAmB,MAAMD,CACnC,CACF,CAQA,aAAMnD,CAAQF,GACZ,IACE,MAAMiF,QAAcvI,KAAKwI,SAASlF,GAIlC,OADAiF,EAAME,KAAKhG,GACJ8F,CACT,CAAE,MAAO5B,GACP,MAAiB,YAAbA,EAAIC,KAA2B,KAC5B,EACT,CACF,CAWA,iBAAM8B,CAAYC,GAChB,MAAMC,QAAgB5I,KAAKwI,SAASG,GASpC,aARoBtI,QAAQsD,IAC1BiF,EAAQhF,IAAIT,UACV,MAAMmB,EAAMqE,EAAM,IAAME,EACxB,aAAc7I,KAAK0G,MAAMpC,IAAMY,cAC3BlF,KAAK0I,YAAYpE,GACjBA,MAGKwE,OAAO,CAACpG,EAAGqG,IAAMrG,EAAEsG,OAAOD,GAAI,GAC7C,CASA,WAAMhE,CAAMkE,GACV,IAEE,aADoBjJ,KAAKkJ,OAAOD,EAElC,CAAE,MAAOtC,GACP,GAAiB,WAAbA,EAAIC,OAAsBD,EAAIC,MAAQ,IAAIC,SAAS,OACrD,OAAO,KAET,MAAMF,CACR,CACF,CAUA,cAAMwC,CAASF,EAAUb,EAAO,CAAEgB,SAAU,WAG1C,IACE,MAAMC,QAAarJ,KAAKsJ,UAAUL,EAAUb,GAC5C,OAAOV,OAAO6B,SAASF,GAAQA,EAAO3B,OAAOC,KAAK0B,EACpD,CAAE,MAAO1C,GACP,GAAiB,WAAbA,EAAIC,OAAsBD,EAAIC,MAAQ,IAAIC,SAAS,OACrD,OAAO,KAET,MAAMF,CACR,CACF,CASA,eAAM6C,CAAUP,EAAUhC,GACxB,OAAOjH,KAAKyJ,SAASxC,EAAOyC,SAAS,QAAST,EAChD,E","sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/./node_modules/pify/index.js","webpack://git/webpack/bootstrap","webpack://git/webpack/runtime/define property getters","webpack://git/webpack/runtime/hasOwnProperty shorthand","webpack://git/webpack/runtime/make namespace object","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/dirname.js","webpack://git/./src/utils/rmRecursive.js","webpack://git/./src/utils/join.js","webpack://git/./src/utils/types.js","webpack://git/./src/models/FileSystem.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nconst processFn = (fn, options) => function (...args) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targs.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targs.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(resolve);\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (input, options) => {\n\toptions = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, options);\n\n\tconst objType = typeof input;\n\tif (!(input !== null && (objType === 'object' || objType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objType}\\``);\n\t}\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn options.include ? options.include.some(match) : !options.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (objType === 'function') {\n\t\tret = function (...args) {\n\t\t\treturn options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(input));\n\t}\n\n\tfor (const key in input) { // eslint-disable-line guard-for-in\n\t\tconst property = input[key];\n\t\tret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;\n\t}\n\n\treturn ret;\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export function compareStrings(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","export function dirname(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","import { join } from './join.js'\n\n/**\n * Removes the directory at the specified filepath recursively. Used internally to replicate the behavior of\n * fs.promises.rm({ recursive: true, force: true }) from Node.js 14 and above when not available. If the provided\n * filepath resolves to a file, it will be removed.\n *\n * @param {import('../models/FileSystem.js').FileSystem} fs\n * @param {string} filepath - The file or directory to remove.\n */\nexport async function rmRecursive(fs, filepath) {\n const entries = await fs.readdir(filepath)\n if (entries == null) {\n await fs.rm(filepath)\n } else if (entries.length) {\n await Promise.all(\n entries.map(entry => {\n const subpath = join(filepath, entry)\n return fs.lstat(subpath).then(stat => {\n if (!stat) return\n return stat.isDirectory() ? rmRecursive(fs, subpath) : fs.rm(subpath)\n })\n })\n ).then(() => fs.rmdir(filepath))\n } else {\n await fs.rmdir(filepath)\n }\n}\n","/*!\n * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.\n * SPDX-License-Identifier: LGPL-3.0-or-later\n * Copyright (c) James Prevett and other ZenFS contributors.\n */\n\nfunction normalizeString(path, aar) {\n let res = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let char = '\\x00'\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) char = path[i]\n else if (char === '/') break\n else char = '/'\n\n if (char === '/') {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.at(-1) !== '.' ||\n res.at(-2) !== '.'\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/')\n if (lastSlashIndex === -1) {\n res = ''\n lastSegmentLength = 0\n } else {\n res = res.slice(0, lastSlashIndex)\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/')\n }\n lastSlash = i\n dots = 0\n continue\n } else if (res.length !== 0) {\n res = ''\n lastSegmentLength = 0\n lastSlash = i\n dots = 0\n continue\n }\n }\n if (aar) {\n res += res.length > 0 ? '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (res.length > 0) res += '/' + path.slice(lastSlash + 1, i)\n else res = path.slice(lastSlash + 1, i)\n lastSegmentLength = i - lastSlash - 1\n }\n lastSlash = i\n dots = 0\n } else if (char === '.' && dots !== -1) {\n ++dots\n } else {\n dots = -1\n }\n }\n return res\n}\n\nfunction normalize(path) {\n if (!path.length) return '.'\n\n const isAbsolute = path[0] === '/'\n const trailingSeparator = path.at(-1) === '/'\n\n path = normalizeString(path, !isAbsolute)\n\n if (!path.length) {\n if (isAbsolute) return '/'\n return trailingSeparator ? './' : '.'\n }\n if (trailingSeparator) path += '/'\n\n return isAbsolute ? `/${path}` : path\n}\n\nexport function join(...args) {\n if (args.length === 0) return '.'\n let joined\n for (let i = 0; i < args.length; ++i) {\n const arg = args[i]\n if (arg.length > 0) {\n if (joined === undefined) joined = arg\n else joined += '/' + arg\n }\n }\n if (joined === undefined) return '.'\n return normalize(joined)\n}\n","export function isPromiseLike(obj) {\n return isObject(obj) && isFunction(obj.then) && isFunction(obj.catch)\n}\n\nexport function isObject(obj) {\n return obj && typeof obj === 'object'\n}\n\nexport function isFunction(obj) {\n return typeof obj === 'function'\n}\n","import pify from 'pify'\n\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { dirname } from '../utils/dirname.js'\nimport { rmRecursive } from '../utils/rmRecursive.js'\nimport { isPromiseLike } from '../utils/types.js'\n\nfunction isPromiseFs(fs) {\n const test = targetFs => {\n try {\n // If readFile returns a promise then we can probably assume the other\n // commands do as well\n return targetFs.readFile().catch(e => e)\n } catch (e) {\n return e\n }\n }\n return isPromiseLike(test(fs))\n}\n\n// List of commands all filesystems are expected to provide. `rm` is not\n// included since it may not exist and must be handled as a special case\n// Likewise with `cp`.\nconst commands = [\n 'readFile',\n 'writeFile',\n 'mkdir',\n 'rmdir',\n 'unlink',\n 'stat',\n 'lstat',\n 'readdir',\n 'readlink',\n 'symlink',\n]\n\nfunction bindFs(target, fs) {\n if (isPromiseFs(fs)) {\n for (const command of commands) {\n target[`_${command}`] = fs[command].bind(fs)\n }\n } else {\n for (const command of commands) {\n target[`_${command}`] = pify(fs[command].bind(fs))\n }\n }\n\n // Handle the special cases of `rm` and `cp`\n if (isPromiseFs(fs)) {\n if (fs.cp) target._cp = fs.cp.bind(fs)\n if (fs.rm) target._rm = fs.rm.bind(fs)\n else if (fs.rmdir.length > 1) target._rm = fs.rmdir.bind(fs)\n else target._rm = rmRecursive.bind(null, target)\n } else {\n if (fs.cp) target._cp = pify(fs.cp.bind(fs))\n if (fs.rm) target._rm = pify(fs.rm.bind(fs))\n else if (fs.rmdir.length > 2) target._rm = pify(fs.rmdir.bind(fs))\n else target._rm = rmRecursive.bind(null, target)\n }\n}\n\n/**\n * A wrapper class for file system operations, providing a consistent API for both promise-based\n * and callback-based file systems. It includes utility methods for common file system tasks.\n */\nexport class FileSystem {\n /**\n * Creates an instance of FileSystem.\n *\n * @param {Object} fs - A file system implementation to wrap.\n */\n constructor(fs) {\n if (typeof fs._original_unwrapped_fs !== 'undefined') return fs\n\n const promises = Object.getOwnPropertyDescriptor(fs, 'promises')\n if (promises && promises.enumerable) {\n bindFs(this, fs.promises)\n } else {\n bindFs(this, fs)\n }\n this._original_unwrapped_fs = fs\n }\n\n /**\n * Return true if a file exists, false if it doesn't exist.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filepath - The path to the file.\n * @param {Object} [options] - Additional options.\n * @returns {Promise<boolean>} - `true` if the file exists, `false` otherwise.\n */\n async exists(filepath, options = {}) {\n try {\n await this._stat(filepath)\n return true\n } catch (err) {\n if (\n err.code === 'ENOENT' ||\n err.code === 'ENOTDIR' ||\n (err.code || '').includes('ENS')\n ) {\n return false\n } else {\n console.log('Unhandled error in \"FileSystem.exists()\" function', err)\n throw err\n }\n }\n }\n\n /**\n * Return the contents of a file if it exists, otherwise returns null.\n *\n * @param {string} filepath - The path to the file.\n * @param {Object} [options] - Options for reading the file.\n * @returns {Promise<Buffer|string|null>} - The file contents, or `null` if the file doesn't exist.\n */\n async read(filepath, options = {}) {\n try {\n let buffer = await this._readFile(filepath, options)\n if (options.autocrlf === 'true') {\n try {\n buffer = new TextDecoder('utf8', { fatal: true }).decode(buffer)\n buffer = buffer.replace(/\\r\\n/g, '\\n')\n buffer = new TextEncoder().encode(buffer)\n } catch (error) {\n // non utf8 file\n }\n }\n // Convert plain ArrayBuffers to Buffers\n if (typeof buffer !== 'string') {\n buffer = Buffer.from(buffer)\n }\n return buffer\n } catch (err) {\n return null\n }\n }\n\n /**\n * Write a file (creating missing directories if need be) without throwing errors.\n *\n * @param {string} filepath - The path to the file.\n * @param {Buffer|Uint8Array|string} contents - The data to write.\n * @param {Object|string} [options] - Options for writing the file.\n * @returns {Promise<void>}\n */\n async write(filepath, contents, options = {}) {\n try {\n await this._writeFile(filepath, contents, options)\n } catch (err) {\n // Hmm. Let's try mkdirp and try again.\n await this.mkdir(dirname(filepath))\n await this._writeFile(filepath, contents, options)\n }\n }\n\n /**\n * Make a directory (or series of nested directories) without throwing an error if it already exists.\n *\n * @param {string} filepath - The path to the directory.\n * @param {boolean} [_selfCall=false] - Internal flag to prevent infinite recursion.\n * @returns {Promise<void>}\n */\n async mkdir(filepath, _selfCall = false) {\n try {\n await this._mkdir(filepath)\n } catch (err) {\n // If err is null then operation succeeded!\n if (err === null) return\n // If the directory already exists, that's OK!\n if (err.code === 'EEXIST') return\n // Avoid infinite loops of failure\n if (_selfCall) throw err\n // If we got a \"no such file or directory error\" backup and try again.\n if (err.code === 'ENOENT') {\n const parent = dirname(filepath)\n // Check to see if we've gone too far\n if (parent === '.' || parent === '/' || parent === filepath) throw err\n // Infinite recursion, what could go wrong?\n await this.mkdir(parent)\n await this.mkdir(filepath, true)\n }\n }\n }\n\n /**\n * Delete a file without throwing an error if it is already deleted.\n *\n * @param {string} filepath - The path to the file.\n * @returns {Promise<void>}\n */\n async rm(filepath) {\n try {\n await this._unlink(filepath)\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Delete a directory without throwing an error if it is already deleted.\n *\n * @param {string} filepath - The path to the directory.\n * @param {Object} [opts] - Options for deleting the directory.\n * @returns {Promise<void>}\n */\n async rmdir(filepath, opts) {\n try {\n if (opts && opts.recursive) {\n await this._rm(filepath, opts)\n } else {\n await this._rmdir(filepath)\n }\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Read a directory without throwing an error is the directory doesn't exist\n *\n * @param {string} filepath - The path to the directory.\n * @returns {Promise<string[]|null>} - An array of file names, or `null` if the path is not a directory.\n */\n async readdir(filepath) {\n try {\n const names = await this._readdir(filepath)\n // Ordering is not guaranteed, and system specific (Windows vs Unix)\n // so we must sort them ourselves.\n names.sort(compareStrings)\n return names\n } catch (err) {\n if (err.code === 'ENOTDIR') return null\n return []\n }\n }\n\n /**\n * Return a flat list of all the files nested inside a directory\n *\n * Based on an elegant concurrent recursive solution from SO\n * https://stackoverflow.com/a/45130990/2168416\n *\n * @param {string} dir - The directory to read.\n * @returns {Promise<string[]>} - A flat list of all files in the directory.\n */\n async readdirDeep(dir) {\n const subdirs = await this._readdir(dir)\n const files = await Promise.all(\n subdirs.map(async subdir => {\n const res = dir + '/' + subdir\n return (await this._stat(res)).isDirectory()\n ? this.readdirDeep(res)\n : res\n })\n )\n return files.reduce((a, f) => a.concat(f), [])\n }\n\n /**\n * Return the Stats of a file/symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filename - The path to the file or symlink.\n * @returns {Promise<Object|null>} - The stats object, or `null` if the file doesn't exist.\n */\n async lstat(filename) {\n try {\n const stats = await this._lstat(filename)\n return stats\n } catch (err) {\n if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {\n return null\n }\n throw err\n }\n }\n\n /**\n * Reads the contents of a symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filename - The path to the symlink.\n * @param {Object} [opts={ encoding: 'buffer' }] - Options for reading the symlink.\n * @returns {Promise<Buffer|null>} - The symlink target, or `null` if it doesn't exist.\n */\n async readlink(filename, opts = { encoding: 'buffer' }) {\n // Note: FileSystem.readlink returns a buffer by default\n // so we can dump it into GitObject.write just like any other file.\n try {\n const link = await this._readlink(filename, opts)\n return Buffer.isBuffer(link) ? link : Buffer.from(link)\n } catch (err) {\n if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {\n return null\n }\n throw err\n }\n }\n\n /**\n * Write the contents of buffer to a symlink.\n *\n * @param {string} filename - The path to the symlink.\n * @param {Buffer} buffer - The symlink target.\n * @returns {Promise<void>}\n */\n async writelink(filename, buffer) {\n return this._symlink(buffer.toString('utf8'), filename)\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","processFn","fn","options","args","P","promiseModule","resolve","reject","multiArgs","push","result","errorFirst","shift","error","apply","this","input","Object","assign","exclude","Promise","objType","TypeError","filter","key","match","pattern","test","include","some","ret","excludeMain","create","getPrototypeOf","property","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","compareStrings","a","b","dirname","path","last","Math","max","lastIndexOf","slice","async","rmRecursive","fs","filepath","entries","readdir","rm","length","all","map","entry","subpath","joined","i","arg","isAbsolute","trailingSeparator","at","aar","res","lastSegmentLength","lastSlash","dots","char","lastSlashIndex","normalizeString","normalize","join","lstat","then","stat","isDirectory","rmdir","isFunction","isPromiseFs","isObject","targetFs","readFile","catch","e","commands","bindFs","target","command","bind","pify","cp","_cp","_rm","FileSystem","constructor","_original_unwrapped_fs","promises","getOwnPropertyDescriptor","exists","_stat","err","code","includes","console","log","read","buffer","_readFile","autocrlf","TextDecoder","fatal","decode","replace","TextEncoder","encode","Buffer","from","write","contents","_writeFile","mkdir","_selfCall","_mkdir","parent","_unlink","opts","recursive","_rmdir","names","_readdir","sort","readdirDeep","dir","subdirs","subdir","reduce","f","concat","filename","_lstat","readlink","encoding","link","_readlink","isBuffer","writelink","_symlink","toString"],"sourceRoot":""}
1
+ {"version":3,"file":"models/index.umd.min.js","mappings":";CAAA,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xB,OAAOrH,KAAK4J,SAASvC,EAAOwC,SAAS,QAAST,EAChD,E","sources":["webpack://git/webpack/universalModuleDefinition","webpack://git/./node_modules/pify/index.js","webpack://git/webpack/bootstrap","webpack://git/webpack/runtime/define property getters","webpack://git/webpack/runtime/hasOwnProperty shorthand","webpack://git/webpack/runtime/make namespace object","webpack://git/./src/utils/compareStrings.js","webpack://git/./src/utils/dirname.js","webpack://git/./src/utils/rmRecursive.js","webpack://git/./src/utils/join.js","webpack://git/./src/utils/types.js","webpack://git/./src/models/FileSystem.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"git\"] = factory();\n\telse\n\t\troot[\"git\"] = factory();\n})(self, () => {\nreturn ","'use strict';\n\nconst processFn = (fn, options) => function (...args) {\n\tconst P = options.promiseModule;\n\n\treturn new P((resolve, reject) => {\n\t\tif (options.multiArgs) {\n\t\t\targs.push((...result) => {\n\t\t\t\tif (options.errorFirst) {\n\t\t\t\t\tif (result[0]) {\n\t\t\t\t\t\treject(result);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresult.shift();\n\t\t\t\t\t\tresolve(result);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else if (options.errorFirst) {\n\t\t\targs.push((error, result) => {\n\t\t\t\tif (error) {\n\t\t\t\t\treject(error);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\targs.push(resolve);\n\t\t}\n\n\t\tfn.apply(this, args);\n\t});\n};\n\nmodule.exports = (input, options) => {\n\toptions = Object.assign({\n\t\texclude: [/.+(Sync|Stream)$/],\n\t\terrorFirst: true,\n\t\tpromiseModule: Promise\n\t}, options);\n\n\tconst objType = typeof input;\n\tif (!(input !== null && (objType === 'object' || objType === 'function'))) {\n\t\tthrow new TypeError(`Expected \\`input\\` to be a \\`Function\\` or \\`Object\\`, got \\`${input === null ? 'null' : objType}\\``);\n\t}\n\n\tconst filter = key => {\n\t\tconst match = pattern => typeof pattern === 'string' ? key === pattern : pattern.test(key);\n\t\treturn options.include ? options.include.some(match) : !options.exclude.some(match);\n\t};\n\n\tlet ret;\n\tif (objType === 'function') {\n\t\tret = function (...args) {\n\t\t\treturn options.excludeMain ? input(...args) : processFn(input, options).apply(this, args);\n\t\t};\n\t} else {\n\t\tret = Object.create(Object.getPrototypeOf(input));\n\t}\n\n\tfor (const key in input) { // eslint-disable-line guard-for-in\n\t\tconst property = input[key];\n\t\tret[key] = typeof property === 'function' && filter(key) ? processFn(property, options) : property;\n\t}\n\n\treturn ret;\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export function compareStrings(a, b) {\n // https://stackoverflow.com/a/40355107/2168416\n return -(a < b) || +(a > b)\n}\n","export function dirname(path) {\n const last = Math.max(path.lastIndexOf('/'), path.lastIndexOf('\\\\'))\n if (last === -1) return '.'\n if (last === 0) return '/'\n return path.slice(0, last)\n}\n","import { join } from './join.js'\n\n/**\n * Removes the directory at the specified filepath recursively. Used internally to replicate the behavior of\n * fs.promises.rm({ recursive: true, force: true }) from Node.js 14 and above when not available. If the provided\n * filepath resolves to a file, it will be removed.\n *\n * @param {import('../models/FileSystem.js').FileSystem} fs\n * @param {string} filepath - The file or directory to remove.\n */\nexport async function rmRecursive(fs, filepath) {\n const entries = await fs.readdir(filepath)\n if (entries == null) {\n await fs.rm(filepath)\n } else if (entries.length) {\n await Promise.all(\n entries.map(entry => {\n const subpath = join(filepath, entry)\n return fs.lstat(subpath).then(stat => {\n if (!stat) return\n return stat.isDirectory() ? rmRecursive(fs, subpath) : fs.rm(subpath)\n })\n })\n ).then(() => fs.rmdir(filepath))\n } else {\n await fs.rmdir(filepath)\n }\n}\n","/*!\n * This code for `path.join` is directly copied from @zenfs/core/path for bundle size improvements.\n * SPDX-License-Identifier: LGPL-3.0-or-later\n * Copyright (c) James Prevett and other ZenFS contributors.\n *\n * Windows support added:\n * - Backslashes are normalised to forward slashes before processing.\n * - Drive-letter prefixes (e.g. \"C:\") are detected and preserved through\n * normalisation, so absolute Windows paths are handled correctly.\n * - An absolute argument passed to join() resets the accumulated path,\n * matching Node behaviour and handling worktree gitdir paths properly.\n *\n * Limitation: UNC paths (e.g. \\\\server\\share) are not supported. The leading\n * backslashes are normalised to forward slashes and then collapsed by\n * normalizeString, losing the UNC root. Git on Windows works with\n * drive-letter paths, so this is not expected to be a practical issue.\n */\n\nfunction normalizeString(path, aar) {\n let res = ''\n let lastSegmentLength = 0\n let lastSlash = -1\n let dots = 0\n let char = '\\x00'\n for (let i = 0; i <= path.length; ++i) {\n if (i < path.length) char = path[i]\n else if (char === '/') break\n else char = '/'\n\n if (char === '/') {\n if (lastSlash === i - 1 || dots === 1) {\n // NOOP\n } else if (dots === 2) {\n if (\n res.length < 2 ||\n lastSegmentLength !== 2 ||\n res.at(-1) !== '.' ||\n res.at(-2) !== '.'\n ) {\n if (res.length > 2) {\n const lastSlashIndex = res.lastIndexOf('/')\n if (lastSlashIndex === -1) {\n res = ''\n lastSegmentLength = 0\n } else {\n res = res.slice(0, lastSlashIndex)\n lastSegmentLength = res.length - 1 - res.lastIndexOf('/')\n }\n lastSlash = i\n dots = 0\n continue\n } else if (res.length !== 0) {\n res = ''\n lastSegmentLength = 0\n lastSlash = i\n dots = 0\n continue\n }\n }\n if (aar) {\n res += res.length > 0 ? '/..' : '..'\n lastSegmentLength = 2\n }\n } else {\n if (res.length > 0) res += '/' + path.slice(lastSlash + 1, i)\n else res = path.slice(lastSlash + 1, i)\n lastSegmentLength = i - lastSlash - 1\n }\n lastSlash = i\n dots = 0\n } else if (char === '.' && dots !== -1) {\n ++dots\n } else {\n dots = -1\n }\n }\n return res\n}\n\n// Returns the Windows drive prefix (\"C:\") if present, otherwise null.\nfunction getWindowsDrivePrefix(path) {\n if (path.length >= 2 && /^[a-zA-Z]:/.test(path)) {\n return path.slice(0, 2) // e.g. \"C:\"\n }\n return null\n}\n\nfunction normalize(path) {\n if (!path.length) return '.'\n\n // Normalise backslashes to forward slashes before any other processing.\n path = path.replace(/\\\\/g, '/')\n\n const drivePrefix = getWindowsDrivePrefix(path)\n // isAbsolute: Unix root ('/foo') OR Windows drive+slash ('C:/foo').\n const isAbsolute =\n path[0] === '/' || (drivePrefix !== null && path[2] === '/')\n const trailingSeparator = path.at(-1) === '/'\n\n // Strip the drive prefix before feeding into normalizeString so that the\n // core algorithm only ever sees a plain POSIX-style string.\n const pathBody = drivePrefix ? path.slice(2) : path\n\n let normalized = normalizeString(pathBody, !isAbsolute)\n\n if (!normalized.length) {\n const root = drivePrefix\n ? isAbsolute\n ? drivePrefix + '/'\n : drivePrefix\n : isAbsolute\n ? '/'\n : '.'\n return trailingSeparator && !isAbsolute ? root + '/' : root\n }\n if (trailingSeparator) normalized += '/'\n\n if (drivePrefix) {\n return isAbsolute\n ? `${drivePrefix}/${normalized}`\n : `${drivePrefix}${normalized}`\n }\n return isAbsolute ? `/${normalized}` : normalized\n}\n\nexport function join(...args) {\n if (args.length === 0) return '.'\n let joined\n for (let i = 0; i < args.length; ++i) {\n // Normalise separators before processing.\n const arg = args[i].replace(/\\\\/g, '/')\n if (arg.length === 0) continue\n\n // A Windows drive-letter path (e.g. \"C:/worktrees/foo\") cannot be\n // meaningfully appended to any base, so it resets the accumulator.\n // Unix absolute paths (leading '/') are NOT reset here — that would be\n // path.resolve() semantics; path.join('foo', '/bar') must yield 'foo/bar'.\n if (/^[a-zA-Z]:\\//.test(arg)) {\n joined = arg\n } else {\n if (joined === undefined) joined = arg\n else joined += '/' + arg\n }\n }\n if (joined === undefined) return '.'\n return normalize(joined)\n}\n","export function isPromiseLike(obj) {\n return isObject(obj) && isFunction(obj.then) && isFunction(obj.catch)\n}\n\nexport function isObject(obj) {\n return obj && typeof obj === 'object'\n}\n\nexport function isFunction(obj) {\n return typeof obj === 'function'\n}\n","import pify from 'pify'\n\nimport { compareStrings } from '../utils/compareStrings.js'\nimport { dirname } from '../utils/dirname.js'\nimport { rmRecursive } from '../utils/rmRecursive.js'\nimport { isPromiseLike } from '../utils/types.js'\n\nfunction isPromiseFs(fs) {\n const test = targetFs => {\n try {\n // If readFile returns a promise then we can probably assume the other\n // commands do as well\n return targetFs.readFile().catch(e => e)\n } catch (e) {\n return e\n }\n }\n return isPromiseLike(test(fs))\n}\n\n// List of commands all filesystems are expected to provide. `rm` is not\n// included since it may not exist and must be handled as a special case\n// Likewise with `cp`.\nconst commands = [\n 'readFile',\n 'writeFile',\n 'mkdir',\n 'rmdir',\n 'unlink',\n 'stat',\n 'lstat',\n 'readdir',\n 'readlink',\n 'symlink',\n]\n\nfunction bindFs(target, fs) {\n if (isPromiseFs(fs)) {\n for (const command of commands) {\n target[`_${command}`] = fs[command].bind(fs)\n }\n } else {\n for (const command of commands) {\n target[`_${command}`] = pify(fs[command].bind(fs))\n }\n }\n\n // Handle the special cases of `rm` and `cp`\n if (isPromiseFs(fs)) {\n if (fs.cp) target._cp = fs.cp.bind(fs)\n if (fs.rm) target._rm = fs.rm.bind(fs)\n else if (fs.rmdir.length > 1) target._rm = fs.rmdir.bind(fs)\n else target._rm = rmRecursive.bind(null, target)\n } else {\n if (fs.cp) target._cp = pify(fs.cp.bind(fs))\n if (fs.rm) target._rm = pify(fs.rm.bind(fs))\n else if (fs.rmdir.length > 2) target._rm = pify(fs.rmdir.bind(fs))\n else target._rm = rmRecursive.bind(null, target)\n }\n}\n\n/**\n * A wrapper class for file system operations, providing a consistent API for both promise-based\n * and callback-based file systems. It includes utility methods for common file system tasks.\n */\nexport class FileSystem {\n /**\n * Creates an instance of FileSystem.\n *\n * @param {Object} fs - A file system implementation to wrap.\n */\n constructor(fs) {\n if (typeof fs._original_unwrapped_fs !== 'undefined') return fs\n\n const promises = Object.getOwnPropertyDescriptor(fs, 'promises')\n if (promises && promises.enumerable) {\n bindFs(this, fs.promises)\n } else {\n bindFs(this, fs)\n }\n this._original_unwrapped_fs = fs\n }\n\n /**\n * Return true if a file exists, false if it doesn't exist.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filepath - The path to the file.\n * @param {Object} [options] - Additional options.\n * @returns {Promise<boolean>} - `true` if the file exists, `false` otherwise.\n */\n async exists(filepath, options = {}) {\n try {\n await this._stat(filepath)\n return true\n } catch (err) {\n if (\n err.code === 'ENOENT' ||\n err.code === 'ENOTDIR' ||\n (err.code || '').includes('ENS')\n ) {\n return false\n } else {\n console.log('Unhandled error in \"FileSystem.exists()\" function', err)\n throw err\n }\n }\n }\n\n /**\n * Return the contents of a file if it exists, otherwise returns null.\n *\n * @param {string} filepath - The path to the file.\n * @param {Object} [options] - Options for reading the file.\n * @returns {Promise<Buffer|string|null>} - The file contents, or `null` if the file doesn't exist.\n */\n async read(filepath, options = {}) {\n try {\n let buffer = await this._readFile(filepath, options)\n if (options.autocrlf === 'true') {\n try {\n buffer = new TextDecoder('utf8', { fatal: true }).decode(buffer)\n buffer = buffer.replace(/\\r\\n/g, '\\n')\n buffer = new TextEncoder().encode(buffer)\n } catch (error) {\n // non utf8 file\n }\n }\n // Convert plain ArrayBuffers to Buffers\n if (typeof buffer !== 'string') {\n buffer = Buffer.from(buffer)\n }\n return buffer\n } catch (err) {\n return null\n }\n }\n\n /**\n * Write a file (creating missing directories if need be) without throwing errors.\n *\n * @param {string} filepath - The path to the file.\n * @param {Buffer|Uint8Array|string} contents - The data to write.\n * @param {Object|string} [options] - Options for writing the file.\n * @returns {Promise<void>}\n */\n async write(filepath, contents, options = {}) {\n try {\n await this._writeFile(filepath, contents, options)\n } catch (err) {\n // Hmm. Let's try mkdirp and try again.\n await this.mkdir(dirname(filepath))\n await this._writeFile(filepath, contents, options)\n }\n }\n\n /**\n * Make a directory (or series of nested directories) without throwing an error if it already exists.\n *\n * @param {string} filepath - The path to the directory.\n * @param {boolean} [_selfCall=false] - Internal flag to prevent infinite recursion.\n * @returns {Promise<void>}\n */\n async mkdir(filepath, _selfCall = false) {\n try {\n await this._mkdir(filepath)\n } catch (err) {\n // If err is null then operation succeeded!\n if (err === null) return\n // If the directory already exists, that's OK!\n if (err.code === 'EEXIST') return\n // Avoid infinite loops of failure\n if (_selfCall) throw err\n // If we got a \"no such file or directory error\" backup and try again.\n if (err.code === 'ENOENT') {\n const parent = dirname(filepath)\n // Check to see if we've gone too far\n if (parent === '.' || parent === '/' || parent === filepath) throw err\n // Infinite recursion, what could go wrong?\n await this.mkdir(parent)\n await this.mkdir(filepath, true)\n }\n }\n }\n\n /**\n * Delete a file without throwing an error if it is already deleted.\n *\n * @param {string} filepath - The path to the file.\n * @returns {Promise<void>}\n */\n async rm(filepath) {\n try {\n await this._unlink(filepath)\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Delete a directory without throwing an error if it is already deleted.\n *\n * @param {string} filepath - The path to the directory.\n * @param {Object} [opts] - Options for deleting the directory.\n * @returns {Promise<void>}\n */\n async rmdir(filepath, opts) {\n try {\n if (opts && opts.recursive) {\n await this._rm(filepath, opts)\n } else {\n await this._rmdir(filepath)\n }\n } catch (err) {\n if (err.code !== 'ENOENT') throw err\n }\n }\n\n /**\n * Read a directory without throwing an error is the directory doesn't exist\n *\n * @param {string} filepath - The path to the directory.\n * @returns {Promise<string[]|null>} - An array of file names, or `null` if the path is not a directory.\n */\n async readdir(filepath) {\n try {\n const names = await this._readdir(filepath)\n // Ordering is not guaranteed, and system specific (Windows vs Unix)\n // so we must sort them ourselves.\n names.sort(compareStrings)\n return names\n } catch (err) {\n if (err.code === 'ENOTDIR') return null\n return []\n }\n }\n\n /**\n * Return a flat list of all the files nested inside a directory\n *\n * Based on an elegant concurrent recursive solution from SO\n * https://stackoverflow.com/a/45130990/2168416\n *\n * @param {string} dir - The directory to read.\n * @returns {Promise<string[]>} - A flat list of all files in the directory.\n */\n async readdirDeep(dir) {\n const subdirs = await this._readdir(dir)\n const files = await Promise.all(\n subdirs.map(async subdir => {\n const res = dir + '/' + subdir\n return (await this._stat(res)).isDirectory()\n ? this.readdirDeep(res)\n : res\n })\n )\n return files.reduce((a, f) => a.concat(f), [])\n }\n\n /**\n * Return the Stats of a file/symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filename - The path to the file or symlink.\n * @returns {Promise<Object|null>} - The stats object, or `null` if the file doesn't exist.\n */\n async lstat(filename) {\n try {\n const stats = await this._lstat(filename)\n return stats\n } catch (err) {\n if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {\n return null\n }\n throw err\n }\n }\n\n /**\n * Reads the contents of a symlink if it exists, otherwise returns null.\n * Rethrows errors that aren't related to file existence.\n *\n * @param {string} filename - The path to the symlink.\n * @param {Object} [opts={ encoding: 'buffer' }] - Options for reading the symlink.\n * @returns {Promise<Buffer|null>} - The symlink target, or `null` if it doesn't exist.\n */\n async readlink(filename, opts = { encoding: 'buffer' }) {\n // Note: FileSystem.readlink returns a buffer by default\n // so we can dump it into GitObject.write just like any other file.\n try {\n const link = await this._readlink(filename, opts)\n return Buffer.isBuffer(link) ? link : Buffer.from(link)\n } catch (err) {\n if (err.code === 'ENOENT' || (err.code || '').includes('ENS')) {\n return null\n }\n throw err\n }\n }\n\n /**\n * Write the contents of buffer to a symlink.\n *\n * @param {string} filename - The path to the symlink.\n * @param {Buffer} buffer - The symlink target.\n * @returns {Promise<void>}\n */\n async writelink(filename, buffer) {\n return this._symlink(buffer.toString('utf8'), filename)\n }\n}\n"],"names":["root","factory","exports","module","define","amd","self","processFn","fn","options","args","P","promiseModule","resolve","reject","multiArgs","push","result","errorFirst","shift","error","apply","this","input","Object","assign","exclude","Promise","objType","TypeError","filter","key","match","pattern","test","include","some","ret","excludeMain","create","getPrototypeOf","property","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","d","definition","o","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","compareStrings","a","b","dirname","path","last","Math","max","lastIndexOf","slice","async","rmRecursive","fs","filepath","entries","readdir","rm","length","all","map","entry","subpath","joined","i","arg","replace","drivePrefix","getWindowsDrivePrefix","isAbsolute","trailingSeparator","at","normalized","aar","res","lastSegmentLength","lastSlash","dots","char","lastSlashIndex","normalizeString","normalize","join","lstat","then","stat","isDirectory","rmdir","isFunction","isPromiseFs","isObject","targetFs","readFile","catch","e","commands","bindFs","target","command","bind","pify","cp","_cp","_rm","FileSystem","constructor","_original_unwrapped_fs","promises","getOwnPropertyDescriptor","exists","_stat","err","code","includes","console","log","read","buffer","_readFile","autocrlf","TextDecoder","fatal","decode","TextEncoder","encode","Buffer","from","write","contents","_writeFile","mkdir","_selfCall","_mkdir","parent","_unlink","opts","recursive","_rmdir","names","_readdir","sort","readdirDeep","dir","subdirs","subdir","reduce","f","concat","filename","_lstat","readlink","encoding","link","_readlink","isBuffer","writelink","_symlink","toString"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "isomorphic-git",
3
- "version": "1.38.3",
3
+ "version": "1.38.5",
4
4
  "description": "A pure JavaScript reimplementation of git for node and browsers",
5
5
  "type": "module",
6
6
  "typings": "./index.d.cts",
@@ -118,7 +118,7 @@
118
118
  "simple-get": "^4.0.1"
119
119
  },
120
120
  "devDependencies": {
121
- "@isomorphic-git/cors-proxy": "^3.0.0",
121
+ "@isomorphic-git/cors-proxy": "^3.0.2",
122
122
  "@isomorphic-git/lightning-fs": "^3.3.0",
123
123
  "@isomorphic-git/pgp-plugin": "0.0.7",
124
124
  "@semantic-release/exec": "5.0.0",