@foss.global/interfaces 2.1.0 → 2.1.1
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/changelog.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-10-13 - 2.1.1
|
|
4
|
+
|
|
5
|
+
### Fixes
|
|
6
|
+
|
|
7
|
+
- Correct the atomic push contract docs: `http` push remotes must be loopback IP literals (`127.0.0.0/8`, `[::1]`), never `localhost`; a ref already at `newObjectId` reports `ok` without a lease check
|
|
8
|
+
|
|
3
9
|
## 2026-10-13 - 2.1.0
|
|
4
10
|
|
|
5
11
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@foss.global/interfaces',
|
|
6
|
-
version: '2.1.
|
|
6
|
+
version: '2.1.1',
|
|
7
7
|
description: 'Shared TypeScript interfaces and TypedRequest contracts for the foss.global Git platform ecosystem.'
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx5QkFBeUI7SUFDL0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHFHQUFxRztDQUNuSCxDQUFBIn0=
|
|
@@ -83,11 +83,13 @@ export interface IGitManagerAtomicPushRefUpdate {
|
|
|
83
83
|
* before any ref is sent and never falls back to ref-by-ref updates.
|
|
84
84
|
*
|
|
85
85
|
* `remoteUrl` is used for this push only and is never stored in the
|
|
86
|
-
* repository. It must be `https`, or `http` to a loopback
|
|
87
|
-
* (`127.0.0.0/8
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
86
|
+
* repository. It must be `https`, or `http` to a loopback IP address
|
|
87
|
+
* (`127.0.0.0/8` or `[::1]`); host names such as `localhost` are refused for
|
|
88
|
+
* `http` because their resolution is not checked. `ssh`, `git`, `file` and
|
|
89
|
+
* scp-like URLs are refused. Transfer options behave as for `importMirror`,
|
|
90
|
+
* except that a push credential is also accepted for `http` to a loopback IP
|
|
91
|
+
* address, which never leaves the machine; the URL must not carry user
|
|
92
|
+
* information.
|
|
91
93
|
*/
|
|
92
94
|
export interface IGitManagerAtomicPushRequest extends IGitManagerRepositorySelector, IGitManagerRemoteTransferOptions {
|
|
93
95
|
remoteUrl: string;
|
|
@@ -96,7 +98,11 @@ export interface IGitManagerAtomicPushRequest extends IGitManagerRepositorySelec
|
|
|
96
98
|
}
|
|
97
99
|
/**
|
|
98
100
|
* Outcome of one ref as the remote reported it. `stale` means the lease
|
|
99
|
-
* failed: the remote ref did not point at the expected object.
|
|
101
|
+
* failed: the remote ref did not point at the expected object. A ref that
|
|
102
|
+
* already points at `newObjectId` is reported `ok` without its lease being
|
|
103
|
+
* checked, because git skips it as up to date before the lease check; such a
|
|
104
|
+
* ref is not changed, so an `ok` result never overwrote an object the caller
|
|
105
|
+
* did not expect. `rejected`
|
|
100
106
|
* covers every other refusal, such as a hook or ref protection, and also the
|
|
101
107
|
* refs the remote refused only because another ref of the same atomic push
|
|
102
108
|
* failed.
|
package/package.json
CHANGED
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/gitmanager.ts
CHANGED
|
@@ -104,11 +104,13 @@ export interface IGitManagerAtomicPushRefUpdate {
|
|
|
104
104
|
* before any ref is sent and never falls back to ref-by-ref updates.
|
|
105
105
|
*
|
|
106
106
|
* `remoteUrl` is used for this push only and is never stored in the
|
|
107
|
-
* repository. It must be `https`, or `http` to a loopback
|
|
108
|
-
* (`127.0.0.0/8
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
*
|
|
107
|
+
* repository. It must be `https`, or `http` to a loopback IP address
|
|
108
|
+
* (`127.0.0.0/8` or `[::1]`); host names such as `localhost` are refused for
|
|
109
|
+
* `http` because their resolution is not checked. `ssh`, `git`, `file` and
|
|
110
|
+
* scp-like URLs are refused. Transfer options behave as for `importMirror`,
|
|
111
|
+
* except that a push credential is also accepted for `http` to a loopback IP
|
|
112
|
+
* address, which never leaves the machine; the URL must not carry user
|
|
113
|
+
* information.
|
|
112
114
|
*/
|
|
113
115
|
export interface IGitManagerAtomicPushRequest extends IGitManagerRepositorySelector, IGitManagerRemoteTransferOptions {
|
|
114
116
|
remoteUrl: string;
|
|
@@ -118,7 +120,11 @@ export interface IGitManagerAtomicPushRequest extends IGitManagerRepositorySelec
|
|
|
118
120
|
|
|
119
121
|
/**
|
|
120
122
|
* Outcome of one ref as the remote reported it. `stale` means the lease
|
|
121
|
-
* failed: the remote ref did not point at the expected object.
|
|
123
|
+
* failed: the remote ref did not point at the expected object. A ref that
|
|
124
|
+
* already points at `newObjectId` is reported `ok` without its lease being
|
|
125
|
+
* checked, because git skips it as up to date before the lease check; such a
|
|
126
|
+
* ref is not changed, so an `ok` result never overwrote an object the caller
|
|
127
|
+
* did not expect. `rejected`
|
|
122
128
|
* covers every other refusal, such as a hook or ref protection, and also the
|
|
123
129
|
* refs the remote refused only because another ref of the same atomic push
|
|
124
130
|
* failed.
|