@amalgm/live 0.2.81-preview.47344318064 → 0.2.81-preview.47413265404
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/dist/git/config-text.d.ts +4 -0
- package/dist/git/config-text.js +1 -0
- package/dist/git/disk-settings.d.ts +3 -0
- package/dist/git/disk-settings.js +6 -0
- package/dist/git/index.d.ts +1 -0
- package/dist/git/index.js +1 -1
- package/dist/git/tag.d.ts +1 -1
- package/dist/git/tag.js +3 -3
- package/dist-cjs/git/config-text.js +1 -0
- package/dist-cjs/git/disk-settings.js +6 -0
- package/dist-cjs/git/index.js +1 -1
- package/dist-cjs/git/tag.js +3 -3
- package/package.json +4 -4
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function sectionOf(line: string): string | null | undefined;
|
|
2
|
+
export declare const configLines: (text: string) => string[];
|
|
3
|
+
export declare const bareLine: (line: string) => string;
|
|
4
|
+
export declare function gitConfigWithout(text: string, drops: (section: string | null, key: string) => boolean): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var x=Object.defineProperty;var o=(n,t)=>x(n,"name",{value:t,configurable:!0});function g(n){const t=/^\s*\[([^\]]*)\]\s*([#;].*)?$/.exec(n);if(t===null)return/^\s*\[/.test(n)?null:void 0;const e=t[1].trim();return/^[A-Za-z0-9-]+$/.test(e)?e.toLowerCase():null}o(g,"sectionOf");const h=/(^|[^\\])(\\\\)*\\$/,$=/^\s*([A-Za-z][A-Za-z0-9-]*)\s*(=|$|[#;])/,C=o(n=>n.split(/(?<=\n)/).filter(t=>t!==""),"configLines"),L=o(n=>n.replace(/\r?\n$/,""),"bareLine");function A(n,t){const e=[];let i=null,l=-1,r=0,c=null;const f=o(()=>{l>=0&&r===0&&(i==="core"||i==="extensions")&&e.splice(l)},"close");for(const s of C(n)){const u=L(s);if(c!==null){c||e.push(s),h.test(u)||(c=null);continue}const p=g(u);if(p!==void 0){f(),i=p,l=e.length,r=0,e.push(s);continue}const a=$.exec(u)?.[1]?.toLowerCase();if(a===void 0){e.push(s);continue}const d=t(i,a);c=h.test(u)?d:null,!d&&(r+=1,e.push(s))}return f(),e.join("")}o(A,"gitConfigWithout");export{L as bareLine,C as configLines,A as gitConfigWithout,g as sectionOf};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var l=Object.defineProperty;var i=(e,t)=>l(e,"name",{value:t,configurable:!0});import{bareLine as c,configLines as d,gitConfigWithout as a,sectionOf as u}from"./config-text.js";const G="config",p=new Set(["filemode","symlinks","ignorecase","precomposeunicode"]),m=i((e,t)=>e==="core"&&p.has(t),"measured"),h=i(e=>a(e,m),"portableGitConfig");function j(e,t){const o=d(h(e)),s=d(a(t,(n,g)=>!m(n,g))).filter(n=>u(c(n))===void 0&&c(n).trim()!=="").map(n=>n.endsWith(`
|
|
2
|
+
`)?n:`${n}
|
|
3
|
+
`);if(s.length===0)return o.join("");const r=o.findIndex(n=>u(c(n))==="core");if(r>=0)return[...o.slice(0,r+1),...s,...o.slice(r+1)].join("");const f=o.at(-1);return[...o,f===void 0||f.endsWith(`
|
|
4
|
+
`)?"":`
|
|
5
|
+
`,`[core]
|
|
6
|
+
`,...s].join("")}i(j,"localGitConfig");export{G as GIT_CONFIG_PATH,j as localGitConfig,h as portableGitConfig};
|
package/dist/git/index.d.ts
CHANGED
package/dist/git/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export*from"./state.js";export*from"./alternates.js";import{compareGitText as
|
|
1
|
+
export*from"./state.js";export*from"./alternates.js";export*from"./disk-settings.js";import{compareGitText as p}from"./text.js";export*from"./artifact.js";export*from"./chain.js";export*from"./plan.js";export*from"./play.js";export*from"./tag.js";export*from"./turns.js";export*from"./holds.js";export*from"./checkout.js";export*from"./checkout-view.js";export*from"./places.js";import{GIT_PARTS as d,gitPartBlobs as h,gitParts as l,gitPartsChanged as n}from"./parts.js";export*from"./restore.js";export{d as GIT_PARTS,p as compareGitText,h as gitPartBlobs,l as gitParts,n as gitPartsChanged};
|
package/dist/git/tag.d.ts
CHANGED
|
@@ -5,4 +5,4 @@ export declare const GIT_TAG_OFF: string;
|
|
|
5
5
|
export type GitTagEdit = readonly string[];
|
|
6
6
|
export declare function gitNamedObjectFormat(configuration: string): GitObjectFormat;
|
|
7
7
|
export declare function gitTagEdits(listing: string, on: boolean): readonly GitTagEdit[];
|
|
8
|
-
export declare
|
|
8
|
+
export declare const gitConfigUntagged: (text: string) => string;
|
package/dist/git/tag.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
2
|
-
`);function
|
|
3
|
-
`);return
|
|
1
|
+
var d=Object.defineProperty;var f=(s,a)=>d(s,"name",{value:a,configurable:!0});import{gitConfigWithout as T}from"./config-text.js";const l="extensions.amalgm",p=4,n="core.repositoryformatversion",c="extensions.objectformat",h="index.version",u={sha1:"run-amalgm-setup-or-use-amalgm-git",sha256:"run-amalgm-setup-or-use-amalgm-git-sha256"},I=/^[\x21-\x7e]{1,64}$/,_=[`git config --file .git/config ${n} 1`,"git config --file .git/config --unset extensions.objectFormat",`git config --file .git/config --unset ${l}`,`git config --file .git/config ${n} 0`].join(`
|
|
2
|
+
`);function F(s){return/^\s*objectformat\s*=\s*"?(?:sha256|run-amalgm-setup-or-use-amalgm-git-sha256)"?\s*(?:[#;].*)?$/im.test(s)?"sha256":"sha1"}f(F,"gitNamedObjectFormat");function N(s,a){const e=new Map(s.split("\0").filter(t=>t!=="").map(t=>{const o=t.indexOf(`
|
|
3
|
+
`);return o<0?[t,""]:[t.slice(0,o),t.slice(o+1)]})),i=e.get(n)??"0",r=e.get(c)?.toLowerCase(),g=e.get(l);if(a){const t=g!==void 0&&I.test(g),o=u[r==="sha256"||r===u.sha256?"sha256":"sha1"];return[...e.get(h)===String(p)?[]:[["--replace-all",h,String(p)]],...t?[]:[...i==="1"?[]:[["--replace-all",n,"1"]],["--replace-all",l,"true"]],...t&&i==="2"?[]:[["--replace-all",n,"2"]],...r===o?[]:[["--replace-all",c,o]]]}const m=r===u.sha256?"sha256":r===u.sha1?"sha1":null;if(g===void 0&&i!=="2"&&m===null)return[];const x=[...e.keys()].some(t=>t.startsWith("extensions.")&&t!==l&&!(t===c&&m==="sha1"));return[...i==="2"?[["--replace-all",n,"1"]]:[],...m==="sha256"?[["--replace-all",c,"sha256"]]:m==="sha1"?[["--unset-all",c]]:[],...g===void 0?[]:[["--unset-all",l]],...x||i==="0"?[]:[["--replace-all",n,"0"]]]}f(N,"gitTagEdits");const G=f(s=>T(s,(a,e)=>a==="core"&&e==="repositoryformatversion"||a==="extensions"&&e==="amalgm"),"gitConfigUntagged");export{p as GIT_INDEX_VERSION,l as GIT_TAG,_ as GIT_TAG_OFF,G as gitConfigUntagged,F as gitNamedObjectFormat,N as gitTagEdits};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var p=Object.defineProperty;var i=(e,t)=>p(e,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.bareLine=exports.configLines=void 0,exports.sectionOf=L,exports.gitConfigWithout=O;function L(e){const t=/^\s*\[([^\]]*)\]\s*([#;].*)?$/.exec(e);if(t===null)return/^\s*\[/.test(e)?null:void 0;const n=t[1].trim();return/^[A-Za-z0-9-]+$/.test(n)?n.toLowerCase():null}i(L,"sectionOf");const h=/(^|[^\\])(\\\\)*\\$/,b=/^\s*([A-Za-z][A-Za-z0-9-]*)\s*(=|$|[#;])/,C=i(e=>e.split(/(?<=\n)/).filter(t=>t!==""),"configLines");exports.configLines=C;const $=i(e=>e.replace(/\r?\n$/,""),"bareLine");exports.bareLine=$;function O(e,t){const n=[];let s=null,l=-1,r=0,c=null;const f=i(()=>{l>=0&&r===0&&(s==="core"||s==="extensions")&&n.splice(l)},"close");for(const o of(0,exports.configLines)(e)){const u=(0,exports.bareLine)(o);if(c!==null){c||n.push(o),h.test(u)||(c=null);continue}const a=L(u);if(a!==void 0){f(),s=a,l=n.length,r=0,n.push(o);continue}const d=b.exec(u)?.[1]?.toLowerCase();if(d===void 0){n.push(o);continue}const g=t(s,d);c=h.test(u)?g:null,!g&&(r+=1,n.push(o))}return f(),n.join("")}i(O,"gitConfigWithout");
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";var u=Object.defineProperty;var s=(i,t)=>u(i,"name",{value:t,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.portableGitConfig=exports.GIT_CONFIG_PATH=void 0,exports.localGitConfig=C;const n=require("./config-text.js");exports.GIT_CONFIG_PATH="config";const l=new Set(["filemode","symlinks","ignorecase","precomposeunicode"]),a=s((i,t)=>i==="core"&&l.has(t),"measured"),d=s(i=>(0,n.gitConfigWithout)(i,a),"portableGitConfig");exports.portableGitConfig=d;function C(i,t){const o=(0,n.configLines)((0,exports.portableGitConfig)(i)),r=(0,n.configLines)((0,n.gitConfigWithout)(t,(e,g)=>!a(e,g))).filter(e=>(0,n.sectionOf)((0,n.bareLine)(e))===void 0&&(0,n.bareLine)(e).trim()!=="").map(e=>e.endsWith(`
|
|
2
|
+
`)?e:`${e}
|
|
3
|
+
`);if(r.length===0)return o.join("");const c=o.findIndex(e=>(0,n.sectionOf)((0,n.bareLine)(e))==="core");if(c>=0)return[...o.slice(0,c+1),...r,...o.slice(c+1)].join("");const f=o.at(-1);return[...o,f===void 0||f.endsWith(`
|
|
4
|
+
`)?"":`
|
|
5
|
+
`,`[core]
|
|
6
|
+
`,...r].join("")}s(C,"localGitConfig");
|
package/dist-cjs/git/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=Object.defineProperty;var u=(i,r)=>o(i,"name",{value:r,configurable:!0});var f=exports&&exports.__createBinding||(Object.create?(function(i,r,t,n){n===void 0&&(n=t);var a=Object.getOwnPropertyDescriptor(r,t);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:u(function(){return r[t]},"get")}),Object.defineProperty(i,n,a)}):(function(i,r,t,n){n===void 0&&(n=t),i[n]=r[t]})),e=exports&&exports.__exportStar||function(i,r){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&f(r,i,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitPartsChanged=exports.gitParts=exports.gitPartBlobs=exports.GIT_PARTS=exports.compareGitText=void 0,e(require("./state.js"),exports),e(require("./alternates.js"),exports);var g=require("./text.js");Object.defineProperty(exports,"compareGitText",{enumerable:!0,get:u(function(){return g.compareGitText},"get")}),e(require("./artifact.js"),exports),e(require("./chain.js"),exports),e(require("./plan.js"),exports),e(require("./play.js"),exports),e(require("./tag.js"),exports),e(require("./turns.js"),exports),e(require("./holds.js"),exports),e(require("./checkout.js"),exports),e(require("./checkout-view.js"),exports),e(require("./places.js"),exports);var c=require("./parts.js");Object.defineProperty(exports,"GIT_PARTS",{enumerable:!0,get:u(function(){return c.GIT_PARTS},"get")}),Object.defineProperty(exports,"gitPartBlobs",{enumerable:!0,get:u(function(){return c.gitPartBlobs},"get")}),Object.defineProperty(exports,"gitParts",{enumerable:!0,get:u(function(){return c.gitParts},"get")}),Object.defineProperty(exports,"gitPartsChanged",{enumerable:!0,get:u(function(){return c.gitPartsChanged},"get")}),e(require("./restore.js"),exports);
|
|
1
|
+
"use strict";var o=Object.defineProperty;var u=(i,r)=>o(i,"name",{value:r,configurable:!0});var f=exports&&exports.__createBinding||(Object.create?(function(i,r,t,n){n===void 0&&(n=t);var a=Object.getOwnPropertyDescriptor(r,t);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:u(function(){return r[t]},"get")}),Object.defineProperty(i,n,a)}):(function(i,r,t,n){n===void 0&&(n=t),i[n]=r[t]})),e=exports&&exports.__exportStar||function(i,r){for(var t in i)t!=="default"&&!Object.prototype.hasOwnProperty.call(r,t)&&f(r,i,t)};Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitPartsChanged=exports.gitParts=exports.gitPartBlobs=exports.GIT_PARTS=exports.compareGitText=void 0,e(require("./state.js"),exports),e(require("./alternates.js"),exports),e(require("./disk-settings.js"),exports);var g=require("./text.js");Object.defineProperty(exports,"compareGitText",{enumerable:!0,get:u(function(){return g.compareGitText},"get")}),e(require("./artifact.js"),exports),e(require("./chain.js"),exports),e(require("./plan.js"),exports),e(require("./play.js"),exports),e(require("./tag.js"),exports),e(require("./turns.js"),exports),e(require("./holds.js"),exports),e(require("./checkout.js"),exports),e(require("./checkout-view.js"),exports),e(require("./places.js"),exports);var c=require("./parts.js");Object.defineProperty(exports,"GIT_PARTS",{enumerable:!0,get:u(function(){return c.GIT_PARTS},"get")}),Object.defineProperty(exports,"gitPartBlobs",{enumerable:!0,get:u(function(){return c.gitPartBlobs},"get")}),Object.defineProperty(exports,"gitParts",{enumerable:!0,get:u(function(){return c.gitParts},"get")}),Object.defineProperty(exports,"gitPartsChanged",{enumerable:!0,get:u(function(){return c.gitPartsChanged},"get")}),e(require("./restore.js"),exports);
|
package/dist-cjs/git/tag.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
`);function
|
|
3
|
-
`);return
|
|
1
|
+
"use strict";var _=Object.defineProperty;var u=(s,a)=>_(s,"name",{value:a,configurable:!0});Object.defineProperty(exports,"__esModule",{value:!0}),exports.gitConfigUntagged=exports.GIT_TAG_OFF=exports.GIT_INDEX_VERSION=exports.GIT_TAG=void 0,exports.gitNamedObjectFormat=h,exports.gitTagEdits=d;const I=require("./config-text.js");exports.GIT_TAG="extensions.amalgm",exports.GIT_INDEX_VERSION=4;const n="core.repositoryformatversion",l="extensions.objectformat",m="index.version",f={sha1:"run-amalgm-setup-or-use-amalgm-git",sha256:"run-amalgm-setup-or-use-amalgm-git-sha256"},G=/^[\x21-\x7e]{1,64}$/;exports.GIT_TAG_OFF=[`git config --file .git/config ${n} 1`,"git config --file .git/config --unset extensions.objectFormat",`git config --file .git/config --unset ${exports.GIT_TAG}`,`git config --file .git/config ${n} 0`].join(`
|
|
2
|
+
`);function h(s){return/^\s*objectformat\s*=\s*"?(?:sha256|run-amalgm-setup-or-use-amalgm-git-sha256)"?\s*(?:[#;].*)?$/im.test(s)?"sha256":"sha1"}u(h,"gitNamedObjectFormat");function d(s,a){const e=new Map(s.split("\0").filter(t=>t!=="").map(t=>{const i=t.indexOf(`
|
|
3
|
+
`);return i<0?[t,""]:[t.slice(0,i),t.slice(i+1)]})),o=e.get(n)??"0",g=e.get(l)?.toLowerCase(),r=e.get(exports.GIT_TAG);if(a){const t=r!==void 0&&G.test(r),i=f[g==="sha256"||g===f.sha256?"sha256":"sha1"];return[...e.get(m)===String(exports.GIT_INDEX_VERSION)?[]:[["--replace-all",m,String(exports.GIT_INDEX_VERSION)]],...t?[]:[...o==="1"?[]:[["--replace-all",n,"1"]],["--replace-all",exports.GIT_TAG,"true"]],...t&&o==="2"?[]:[["--replace-all",n,"2"]],...g===i?[]:[["--replace-all",l,i]]]}const c=g===f.sha256?"sha256":g===f.sha1?"sha1":null;if(r===void 0&&o!=="2"&&c===null)return[];const T=[...e.keys()].some(t=>t.startsWith("extensions.")&&t!==exports.GIT_TAG&&!(t===l&&c==="sha1"));return[...o==="2"?[["--replace-all",n,"1"]]:[],...c==="sha256"?[["--replace-all",l,"sha256"]]:c==="sha1"?[["--unset-all",l]]:[],...r===void 0?[]:[["--unset-all",exports.GIT_TAG]],...T||o==="0"?[]:[["--replace-all",n,"0"]]]}u(d,"gitTagEdits");const p=u(s=>(0,I.gitConfigWithout)(s,(a,e)=>a==="core"&&e==="repositoryformatversion"||a==="extensions"&&e==="amalgm"),"gitConfigUntagged");exports.gitConfigUntagged=p;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amalgm/live",
|
|
3
|
-
"version": "0.2.81-preview.
|
|
3
|
+
"version": "0.2.81-preview.47413265404",
|
|
4
4
|
"description": "Portable realtime SDK for Amalgm — wire contracts, mutation discipline, and delivery state machines behind host-injected adapters.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist-cjs/index.js",
|
|
@@ -133,11 +133,11 @@
|
|
|
133
133
|
"dependencies": {
|
|
134
134
|
"@amalgm/core": "0.5.1-preview.46345295340"
|
|
135
135
|
},
|
|
136
|
-
"gitHead": "
|
|
136
|
+
"gitHead": "98fb07b41d439be6758938cbc7162d8e15a993b7",
|
|
137
137
|
"amalgmSource": {
|
|
138
138
|
"repository": "amalgm-inc/amalgm-live",
|
|
139
139
|
"branch": "preview",
|
|
140
|
-
"commit": "
|
|
141
|
-
"occurrence": "
|
|
140
|
+
"commit": "98fb07b41d439be6758938cbc7162d8e15a993b7",
|
|
141
|
+
"occurrence": "47413265404"
|
|
142
142
|
}
|
|
143
143
|
}
|