sf-git-merge-driver 1.0.0-dev-3.13704714225-2 → 1.0.0-dev-3.13724775513-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/README.md CHANGED
@@ -11,29 +11,72 @@ A custom Git merge driver designed specifically for Salesforce metadata files. T
11
11
 
12
12
  ## Installation
13
13
 
14
- ### As SFDX Plugin
15
-
16
14
  ```bash
17
15
  sf plugins install sf-git-merge-driver
18
16
  ```
19
17
 
20
- ### Local Repository Installation
18
+ ## Usage
19
+
20
+ <!-- commands -->
21
+ * [`sf git merge driver install`](#sf-git-merge-driver-install)
22
+ * [`sf git merge driver uninstall`](#sf-git-merge-driver-uninstall)
23
+
24
+ ## `sf git merge driver install`
25
+
26
+ Installs a local git merge driver for the given org and branch.
21
27
 
22
- ```bash
23
- sf git merge driver install
24
28
  ```
29
+ USAGE
30
+ $ sf git merge driver install [--json] [--flags-dir <value>]
25
31
 
26
- This will:
27
- - Configure your Git settings to use the merge driver
28
- - Add appropriate entries to your `.gitattributes` file
29
- - Set up the driver to handle XML files
32
+ GLOBAL FLAGS
33
+ --flags-dir=<value> Import flag values from a directory.
34
+ --json Format output as json.
30
35
 
31
- ## Uninstallation
36
+ DESCRIPTION
37
+ Installs a local git merge driver for the given org and branch.
32
38
 
33
- ```bash
34
- sf git merge driver uninstall
39
+ Installs a local git merge driver for the given org and branch, by updating the `.gitattributes` files in the project,
40
+ creating a new merge driver configuration in the `.git/config` of the project, and installing the binary in the
41
+ node_modules/.bin directory.
42
+
43
+ EXAMPLES
44
+ Install the driver for a given project:
45
+
46
+ $ sf git merge driver install
35
47
  ```
36
48
 
49
+ _See code: [src/commands/git/merge/driver/install.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.13724775513-1/src/commands/git/merge/driver/install.ts)_
50
+
51
+ ## `sf git merge driver uninstall`
52
+
53
+ Uninstalls the local git merge driver for the given org and branch.
54
+
55
+ ```
56
+ USAGE
57
+ $ sf git merge driver uninstall [--json] [--flags-dir <value>]
58
+
59
+ GLOBAL FLAGS
60
+ --flags-dir=<value> Import flag values from a directory.
61
+ --json Format output as json.
62
+
63
+ DESCRIPTION
64
+ Uninstalls the local git merge driver for the given org and branch.
65
+
66
+ Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the
67
+ `.gitattributes` files in the project, deleting the merge driver configuration from the `.git/config` of the project,
68
+ and removing the installed binary from the node_modules/.bin directory.
69
+
70
+ EXAMPLES
71
+ Uninstall the driver for a given project:
72
+
73
+ $ sf git merge driver uninstall
74
+ ```
75
+
76
+ _See code: [src/commands/git/merge/driver/uninstall.ts](https://github.com/scolladon/sf-git-merge-driver/blob/v1.0.0-dev-3.13724775513-1/src/commands/git/merge/driver/uninstall.ts)_
77
+ <!-- commandsstop -->
78
+
79
+
37
80
  ## How It Works
38
81
 
39
82
  The merge driver works by:
package/lib/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- #!/usr/bin/env -S NODE_OPTIONS="--no-warnings=ExperimentalWarning" npx ts-node --project tsconfig.json --esm
2
1
  export {};
package/lib/index.js CHANGED
@@ -1,18 +1,2 @@
1
- #!/usr/bin/env -S NODE_OPTIONS="--no-warnings=ExperimentalWarning" npx ts-node --project tsconfig.json --esm
2
- import { MergeDriver } from './driver/MergeDriver.js';
3
- if (process.argv.length >= 6) {
4
- const [, , ancestorFile, ourFile, theirFile, outputFile] = process.argv;
5
- const mergeDriver = new MergeDriver();
6
- mergeDriver
7
- .mergeFiles(ancestorFile, ourFile, theirFile, outputFile)
8
- .then(() => process.exit(0));
9
- }
10
- else {
11
- console.error('Usage: sf-git-merge-driver %O %A %B %P');
12
- console.error(' %O: ancestor file');
13
- console.error(' %A: our file');
14
- console.error(' %B: their file');
15
- console.error(' %P: output file path');
16
- process.exit(1);
17
- }
18
- //# sourceMappingURL=index.js.map
1
+ #!/usr/bin/env node
2
+ import{readFile as t,writeFile as e}from"node:fs/promises";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^"+("["+n+"]["+(n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*")+"$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t<r;t++)s.push(i[t]);n.push(s),i=e.exec(t)}return n}const r=function(t){const e=i.exec(t);return!(null==e)};const o={allowBooleanAttributes:!1,unpairedTags:[]};function a(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function l(t,e){const n=e;for(;e<t.length;e++)if("?"!=t[e]&&" "!=t[e]);else{const i=t.substr(n,e-n);if(e>5&&"xml"===i)return m("InvalidXml","XML declaration allowed only at the start of the document.",b(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function u(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e<t.length;e++)if("-"===t[e]&&"-"===t[e+1]&&">"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e<t.length;e++)if("<"===t[e])n++;else if(">"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e<t.length;e++)if("]"===t[e]&&"]"===t[e+1]&&">"===t[e+2]){e+=2;break}return e}const h='"',c="'";function f(t,e){let n="",i="",s=!1;for(;e<t.length;e++){if(t[e]===h||t[e]===c)""===i?i=t[e]:i!==t[e]||(i="");else if(">"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function d(t,e){const n=s(t,p),i={};for(let t=0;t<n.length;t++){if(0===n[t][1].length)return m("InvalidAttr","Attribute '"+n[t][2]+"' has no space in starting.",N(n[t]));if(void 0!==n[t][3]&&void 0===n[t][4])return m("InvalidAttr","Attribute '"+n[t][2]+"' is without value.",N(n[t]));if(void 0===n[t][3]&&!e.allowBooleanAttributes)return m("InvalidAttr","boolean attribute '"+n[t][2]+"' is not allowed.",N(n[t]));const s=n[t][2];if(!x(s))return m("InvalidAttr","Attribute '"+s+"' is an invalid name.",N(n[t]));if(i.hasOwnProperty(s))return m("InvalidAttr","Attribute '"+s+"' is repeated.",N(n[t]));i[s]=1}return!0}function g(t,e){if(";"===t[++e])return-1;if("#"===t[e])return function(t,e){let n=/\d/;for("x"===t[e]&&(e++,n=/[\da-fA-F]/);e<t.length;e++){if(";"===t[e])return e;if(!t[e].match(n))break}return-1}(t,++e);let n=0;for(;e<t.length;e++,n++)if(!(t[e].match(/\w/)&&n<20)){if(";"===t[e])break;return-1}return e}function m(t,e,n){return{err:{code:t,msg:e,line:n.line||n,col:n.col}}}function x(t){return r(t)}function b(t,e){const n=t.substring(0,e).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function N(t){return t.startIndex+t[1].length}const E={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t}};class v{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child})}}function y(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e<t.length;e++)if("<"!==t[e]||r)if(">"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&A(t,e)){let i,s;e+=7,[i,s,e]=T(t,e+1),-1===s.indexOf("&")&&(n[C(i)]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&O(t,e))e+=8;else if(s&&P(t,e))e+=8;else if(s&&I(t,e))e+=9;else{if(!w)throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}function T(t,e){let n="";for(;e<t.length&&"'"!==t[e]&&'"'!==t[e];e++)n+=t[e];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const i=t[e++];let s="";for(;e<t.length&&t[e]!==i;e++)s+=t[e];return[n,s,e]}function w(t,e){return"!"===t[e+1]&&"-"===t[e+2]&&"-"===t[e+3]}function A(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"N"===t[e+3]&&"T"===t[e+4]&&"I"===t[e+5]&&"T"===t[e+6]&&"Y"===t[e+7]}function O(t,e){return"!"===t[e+1]&&"E"===t[e+2]&&"L"===t[e+3]&&"E"===t[e+4]&&"M"===t[e+5]&&"E"===t[e+6]&&"N"===t[e+7]&&"T"===t[e+8]}function P(t,e){return"!"===t[e+1]&&"A"===t[e+2]&&"T"===t[e+3]&&"T"===t[e+4]&&"L"===t[e+5]&&"I"===t[e+6]&&"S"===t[e+7]&&"T"===t[e+8]}function I(t,e){return"!"===t[e+1]&&"N"===t[e+2]&&"O"===t[e+3]&&"T"===t[e+4]&&"A"===t[e+5]&&"T"===t[e+6]&&"I"===t[e+7]&&"O"===t[e+8]&&"N"===t[e+9]}function C(t){if(r(t))return t;throw new Error(`Invalid entity name ${t}`)}const S=/^[-+]?0x[a-fA-F0-9]+$/,j=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,F={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function V(t,e={}){if(e=Object.assign({},F,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&S.test(n))return function(t,e){if(parseInt)return parseInt(t,e);if(Number.parseInt)return Number.parseInt(t,e);if(window&&window.parseInt)return window.parseInt(t,e);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n,16);if(-1!==n.search(/[eE]/)){const i=n.match(/^([-\+])?(0*)([0-9]*(\.[0-9]*)?[eE][-\+]?[0-9]+)$/);if(i){if(e.leadingZeros)n=(i[1]||"")+i[3];else if("0"!==i[2]||"."!==i[3][0])return t;return e.eNotation?Number(n):t}return t}{const i=j.exec(n);if(i){const s=i[1],r=i[2];let o=function(t){if(t&&-1!==t.indexOf("."))return"."===(t=t.replace(/0+$/,""))?t="0":"."===t[0]?t="0"+t:"."===t[t.length-1]&&(t=t.substr(0,t.length-1)),t;return t}(i[3]);if(!e.leadingZeros&&r.length>0&&s&&"."!==n[2])return t;if(!e.leadingZeros&&r.length>0&&!s&&"."!==n[1])return t;if(e.leadingZeros&&r===t)return 0;{const i=Number(n),a=""+i;return-1!==a.search(/[eE]/)?e.eNotation?i:t:-1!==n.indexOf(".")?"0"===a&&""===o||a===o||s&&a==="-"+o?i:t:r?o===a||s+o===a?i:t:n===a||n===s+a?i:t}}return t}}function $(t){return"function"==typeof t?t:Array.isArray(t)?e=>{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCharCode(Number.parseInt(e,16))}},this.addExternalEntities=_,this.parseXml=G,this.parseTextData=D,this.resolveNameSpace=B,this.buildAttributesMap=M,this.isItStopNode=Z,this.replaceEntitiesValue=X,this.readStopNodeData=W,this.saveTextToParentTag=U,this.addChild=R,this.ignoreAttributesFn=$(this.options.ignoreAttributes)}}function _(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];this.lastEntities[i]={regex:new RegExp("&"+i+";","g"),val:t[i]}}}function D(t,e,n,i,s,r,o){if(void 0!==t&&(this.options.trimValues&&!i&&(t=t.trim()),t.length>0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);if(null==i)return t;if(typeof i!=typeof t||i!==t)return i;if(this.options.trimValues)return z(t,this.options.parseTagValue,this.options.numberParseOptions);return t.trim()===t?z(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const L=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function M(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,L),i=n.length,r={};for(let t=0;t<i;t++){const i=this.resolveNameSpace(n[t][1]);if(this.ignoreAttributesFn(i,e))continue;let s=n[t][4],o=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(o=this.options.transformAttributeName(o)),"__proto__"===o&&(o="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);const t=this.options.attributeValueProcessor(i,s,e);r[o]=null==t?s:typeof t!=typeof s||t!==s?t:z(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(r[o]=!0)}if(!Object.keys(r).length)return;if(this.options.attributesGroupName){const t={};return t[this.options.attributesGroupName]=r,t}return r}}const G=function(t){t=t.replace(/\r\n?/g,"\n");const e=new v("!xml");let n=e,i="",s="";for(let r=0;r<t.length;r++){if("<"===t[r])if("/"===t[r+1]){const e=Y(t,">",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=q(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new v(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=Y(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=y(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=Y(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=q(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,c=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;if(f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a),this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,c+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new v(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new v(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s),s=s.substr(0,s.lastIndexOf("."))}else{const t=new v(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s),n=t}i="",r=c}}else i+=t[r]}return e.child};function R(t,e,n){const i=this.options.updateTag(e.tagname,n,e[":@"]);!1===i||("string"==typeof i?(e.tagname=i,t.addChild(e)):t.addChild(e))}const X=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function U(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function Y(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function q(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r<t.length;r++){let e=t[r];if(i)e===i&&(i="");else if('"'===e||"'"===e)i=e;else if(e===n[0]){if(!n[1])return{data:s,index:r};if(t[r+1]===n[1])return{data:s,index:r}}else"\t"===e&&(e=" ");s+=e}}(t,e+1,i);if(!s)return;let r=s.data;const o=s.index,a=r.search(/\s/);let l=r,u=!0;-1!==a&&(l=r.substring(0,a),r=r.substring(a+1).trimStart());const h=l;if(n){const t=l.indexOf(":");-1!==t&&(l=l.substr(t+1),u=l!==s.data.substr(t+1))}return{tagName:l,tagExp:r,closeIndex:o,attrExpPresent:u,rawTagName:h}}function W(t,e,n){const i=n;let s=1;for(;n<t.length;n++)if("<"===t[n])if("/"===t[n+1]){const r=Y(t,">",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1]){n=Y(t,"?>",n+1,"StopNode is not closed.")}else if("!--"===t.substr(n+1,3)){n=Y(t,"--\x3e",n+3,"StopNode is not closed.")}else if("!["===t.substr(n+1,2)){n=Y(t,"]]>",n,"StopNode is not closed.")-2}else{const i=q(t,n,">");if(i){(i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex}}}function z(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&V(t,n)}return void 0!==t?t:""}function J(t,e){return H(t,e)}function H(t,e,n){let i;const s={};for(let r=0;r<t.length;r++){const o=t[r],a=K(o);let l="";if(l=void 0===n?a:n+"."+a,a===e.textNodeName)void 0===i?i=o[a]:i+=""+o[a];else{if(void 0===a)continue;if(o[a]){let t=H(o[a],e,l);const n=tt(t,e);o[":@"]?Q(t,o[":@"],l,e):1!==Object.keys(t).length||void 0===t[e.textNodeName]||e.alwaysCreateTextNode?0===Object.keys(t).length&&(e.alwaysCreateTextNode?t[e.textNodeName]="":t=""):t=t[e.textNodeName],void 0!==s[a]&&s.hasOwnProperty(a)?(Array.isArray(s[a])||(s[a]=[s[a]]),s[a].push(t)):e.isArray(a,l,n)?s[a]=[t]:s[a]=t}}}return"string"==typeof i?i.length>0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function K(t){const e=Object.keys(t);for(let t=0;t<e.length;t++){const n=e[t];if(":@"!==n)return n}}function Q(t,e,n,i){if(e){const s=Object.keys(e),r=s.length;for(let o=0;o<r;o++){const r=s[o];i.isArray(r,n+"."+r,!0,!0)?t[r]=[e[r]]:t[r]=e[r]}}}function tt(t,e){const{textNodeName:n}=e,i=Object.keys(t).length;return 0===i||!(1!==i||!t[n]&&"boolean"!=typeof t[n]&&0!==t[n])}class et{constructor(t){this.externalEntities={},this.options=function(t){return Object.assign({},E,t)}(t)}parse(t,e){if("string"==typeof t);else{if(!t.toString)throw new Error("XML data is accepted in String or Bytes[] form.");t=t.toString()}if(e){!0===e&&(e={});const n=function(t,e){e=Object.assign({},o,e);const n=[];let i=!1,s=!1;"\ufeff"===t[0]&&(t=t.substr(1));for(let o=0;o<t.length;o++)if("<"===t[o]&&"?"===t[o+1]){if(o+=2,o=l(t,o),o.err)return o}else{if("<"!==t[o]){if(a(t[o]))continue;return m("InvalidChar","char '"+t[o]+"' is not expected.",b(t,o))}{let h=o;if(o++,"!"===t[o]){o=u(t,o);continue}{let c=!1;"/"===t[o]&&(c=!0,o++);let p="";for(;o<t.length&&">"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)p+=t[o];if(p=p.trim(),"/"===p[p.length-1]&&(p=p.substring(0,p.length-1),o--),!r(p)){let e;return e=0===p.trim().length?"Invalid space after '<'.":"Tag '"+p+"' is an invalid name.",m("InvalidTag",e,b(t,o))}const x=f(t,o);if(!1===x)return m("InvalidAttr","Attributes for '"+p+"' have open quote.",b(t,o));let N=x.value;if(o=x.index,"/"===N[N.length-1]){const n=o-N.length;N=N.substring(0,N.length-1);const s=d(N,e);if(!0!==s)return m(s.err.code,s.err.msg,b(t,n+s.err.line));i=!0}else if(c){if(!x.tagClosed)return m("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",b(t,o));if(N.trim().length>0)return m("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",b(t,h));if(0===n.length)return m("InvalidTag","Closing tag '"+p+"' has not been opened.",b(t,h));{const e=n.pop();if(p!==e.tagName){let n=b(t,e.tagStartPos);return m("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+p+"'.",b(t,h))}0==n.length&&(s=!0)}}else{const r=d(N,e);if(!0!==r)return m(r.err.code,r.err.msg,b(t,o-N.length+r.err.line));if(!0===s)return m("InvalidXml","Multiple possible root nodes found.",b(t,o));-1!==e.unpairedTags.indexOf(p)||n.push({tagName:p,tagStartPos:h}),i=!0}for(o++;o<t.length;o++)if("<"===t[o]){if("!"===t[o+1]){o++,o=u(t,o);continue}if("?"!==t[o+1])break;if(o=l(t,++o),o.err)return o}else if("&"===t[o]){const e=g(t,o);if(-1==e)return m("InvalidChar","char '&' is not expected.",b(t,o));o=e}else if(!0===s&&!a(t[o]))return m("InvalidXml","Extra text at the end",b(t,o));"<"===t[o]&&o--}}}return i?1==n.length?m("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",b(t,n[0].tagStartPos)):!(n.length>0)||m("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)}(t,e);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new k(this.options);n.addExternalEntities(this.externalEntities);const i=n.parseXml(t);return this.options.preserveOrder||void 0===i?i:J(i,this.options)}addEntity(t,e){if(-1!==e.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==t.indexOf("&")||-1!==t.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===e)throw new Error("An entity with value '&' is not permitted");this.externalEntities[t]=e}}function nt(t,e){let n="";return e.format&&e.indentBy.length>0&&(n="\n"),it(t,e,"",n)}function it(t,e,n,i){let s="",r=!1;for(let o=0;o<t.length;o++){const a=t[o],l=st(a);if(void 0===l)continue;let u="";if(u=0===n.length?l:`${n}.${l}`,l===e.textNodeName){let t=a[l];ot(u,e)||(t=e.tagValueProcessor(l,t),t=at(t,e)),r&&(s+=i),s+=t,r=!1;continue}if(l===e.cdataPropName){r&&(s+=i),s+=`<![CDATA[${a[l][0][e.textNodeName]}]]>`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=rt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const c=i+`<${l}${rt(a[":@"],e)}`,f=it(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=c+">":s+=c+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?s+=c+`>${f}${i}</${l}>`:(s+=c+">",f&&""!==i&&(f.includes("/>")||f.includes("</"))?s+=i+e.indentBy+f+i:s+=f,s+=`</${l}>`):s+=c+"/>",r=!0}return s}function st(t){const e=Object.keys(t);for(let n=0;n<e.length;n++){const i=e[n];if(t.hasOwnProperty(i)&&":@"!==i)return i}}function rt(t,e){let n="";if(t&&!e.ignoreAttributes)for(let i in t){if(!t.hasOwnProperty(i))continue;let s=e.attributeValueProcessor(i,t[i]);s=at(s,e),!0===s&&e.suppressBooleanAttributes?n+=` ${i.substr(e.attributeNamePrefix.length)}`:n+=` ${i.substr(e.attributeNamePrefix.length)}="${s}"`}return n}function ot(t,e){let n=(t=t.substr(0,t.length-e.textNodeName.length-1)).substr(t.lastIndexOf(".")+1);for(let i in e.stopNodes)if(e.stopNodes[i]===t||e.stopNodes[i]==="*."+n)return!0;return!1}function at(t,e){if(t&&t.length>0&&e.processEntities)for(let n=0;n<e.entities.length;n++){const i=e.entities[n];t=t.replace(i.regex,i.val)}return t}const lt={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(t,e){return e},attributeValueProcessor:function(t,e){return e},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ut(t){this.options=Object.assign({},lt,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=$(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ft),this.processTextOrObjNode=ht,this.options.format?(this.indentate=ct,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ht(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function ct(t){return this.options.indentBy.repeat(t)}function ft(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ut.prototype.build=function(t){return this.options.preserveOrder?nt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ut.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l<i;l++){const i=t[o][l];if(void 0===i);else if(null===i)"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if("object"==typeof i)if(this.options.oneListGroup){const t=this.j2x(i,e+1,n.concat(o));r+=t.val,this.options.attributesGroupName&&i.hasOwnProperty(this.options.attributesGroupName)&&(a+=t.attrStr)}else r+=this.processTextOrObjNode(i,o,e,n);else if(this.options.oneListGroup){let t=this.options.tagValueProcessor(o,i);t=this.replaceEntitiesValue(t),r+=t}else r+=this.buildTextValNode(i,o,"",e)}this.options.oneListGroup&&(r=this.buildObjectNode(r,o,a,e)),s+=r}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const e=Object.keys(t[o]),n=e.length;for(let s=0;s<n;s++)i+=this.buildAttrPairStr(e[s],""+t[o][e[s]])}else s+=this.processTextOrObjNode(t[o],o,e,n);return{attrStr:i,val:s}},ut.prototype.buildAttrPairStr=function(t,e){return e=this.options.attributeValueProcessor(t,""+e),e=this.replaceEntitiesValue(e),this.options.suppressBooleanAttributes&&"true"===e?" "+t:" "+t+'="'+e+'"'},ut.prototype.buildObjectNode=function(t,e,n,i){if(""===t)return"?"===e[0]?this.indentate(i)+"<"+e+n+"?"+this.tagEndChar:this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar;{let s="</"+e+this.tagEndChar,r="";return"?"===e[0]&&(r="?",s=""),!n&&""!==n||-1!==t.indexOf("<")?!1!==this.options.commentPropName&&e===this.options.commentPropName&&0===r.length?this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine:this.indentate(i)+"<"+e+n+r+this.tagEndChar+t+this.indentate(i)+s:this.indentate(i)+"<"+e+n+r+">"+t+s}},ut.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`></${t}`,e},ut.prototype.buildTextValNode=function(t,e,n,i){if(!1!==this.options.cdataPropName&&e===this.options.cdataPropName)return this.indentate(i)+`<![CDATA[${t}]]>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"</"+e+this.tagEndChar}},ut.prototype.replaceEntitiesValue=function(t){if(t&&t.length>0&&this.options.processEntities)for(let e=0;e<this.options.entities.length;e++){const n=this.options.entities[e];t=t.replace(n.regex,n.val)}return t};class pt{idFields=["fullName","name","field","label","id","@_name"];mergeObjects(t,e,n){if(null===e||null===n)return e??n;if(typeof e!=typeof n)return e;if(Array.isArray(e)&&Array.isArray(n))return this.mergeArrays(Array.isArray(t)?t:void 0,e,n);if("object"==typeof e&&"object"==typeof n){const i={...e},s=t??{},r=n,o=new Set([...Object.keys(e),...Object.keys(n)]);for(const t of o)t in r&&(i[t]=t in i?this.mergeObjects(s[t],i[t],r[t]):r[t]);return i}return n!==t&&e===t?n:e}mergeArrays(t,e,n){const i=this.idFields.find((t=>e.some((e=>this.hasIdField(e,t)))&&n.some((e=>this.hasIdField(e,t)))));if(!i)return e;const s=this.createIdMap(e,i),r=this.createIdMap(n,i),o=t?this.createIdMap(t,i):new Map,a=[...e],l=new Set;for(const[t,e]of s){const n=r.get(t);if(n){const s=a.findIndex((e=>this.hasIdField(e,i)&&e[i]===t));-1!==s&&(a[s]=this.mergeObjects(o.get(t),e,n))}l.add(t)}for(const[t,e]of r)l.has(t)||a.push(e);return a}hasIdField(t,e){return null!==t&&"object"==typeof t&&!Array.isArray(t)&&e in t}createIdMap(t,e){return new Map(t.filter((t=>this.hasIdField(t,e))).map((t=>[String(t[e]),t])))}}const dt={attributeNamePrefix:"@_",commentPropName:"#comment",format:!0,ignoreAttributes:!1,ignoreNameSpace:!1,indentBy:" ",parseAttributeValue:!1,parseNodeValue:!1,parseTagValue:!1,processEntities:!1,suppressEmptyNode:!1,trimValues:!0};class gt{async tripartXmlMerge(t,e,n){const i=new et(dt),s=i.parse(t),r=i.parse(e),o=i.parse(n),a=(new pt).mergeObjects(s,r,o);return new ut(dt).build(a)}}class mt{async mergeFiles(n,i,s,r){const[o,a,l]=await Promise.all([t(n,"utf8"),t(i,"utf8"),t(s,"utf8")]),u=new gt,h=await u.tripartXmlMerge(o,a,l);await e(r,h)}}if(process.argv.length>=6){const[,,t,e,n,i]=process.argv;(new mt).mergeFiles(t,e,n,i).then((()=>process.exit(0)))}else console.error("Usage: sf-git-merge-driver %O %A %B %P"),console.error(" %O: ancestor file"),console.error(" %A: our file"),console.error(" %B: their file"),console.error(" %P: output file path"),process.exit(1);
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,AAAD,EAAG,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;IACvE,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;IACrC,WAAW;SACR,UAAU,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;SACxD,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACvD,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACpC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IACjC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;IAC7B,MAAM,CAAC,EAAE,AAAD,EAAG,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;IACvE,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAA;IACrC,WAAW;SACR,UAAU,CAAC,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,CAAC;SACxD,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAA;AAChC,CAAC;KAAM,CAAC;IACN,OAAO,CAAC,KAAK,CAAC,wCAAwC,CAAC,CAAA;IACvD,OAAO,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAA;IACpC,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;IAC/B,OAAO,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAA;IACjC,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAA;IACvC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC"}
@@ -4,7 +4,7 @@ Installs a local git merge driver for the given org and branch.
4
4
 
5
5
  # description
6
6
 
7
- Installs a local git merge driver for the given org and branch, by updating the `.gitattributes` files in the project and creating a new merge driver configuration file in the `.git/config` of the project.
7
+ Installs a local git merge driver for the given org and branch, by updating the `.gitattributes` files in the project, creating a new merge driver configuration in the `.git/config` of the project, and installing the binary in the node_modules/.bin directory.
8
8
 
9
9
  # examples
10
10
 
@@ -4,7 +4,7 @@ Uninstalls the local git merge driver for the given org and branch.
4
4
 
5
5
  # description
6
6
 
7
- Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the `.gitattributes` files in the project and deleting the merge driver configuration file in the `.git/config` of the project.
7
+ Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the `.gitattributes` files in the project, deleting the merge driver configuration from the `.git/config` of the project, and removing the installed binary from the node_modules/.bin directory.
8
8
 
9
9
  # examples
10
10
 
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "sf-git-merge-driver",
3
- "version": "1.0.0-dev-3.13704714225-2",
3
+ "version": "1.0.0-dev-3.13724775513-1",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "sf-git-merge-driver",
9
- "version": "1.0.0-dev-3.13704714225-2",
9
+ "version": "1.0.0-dev-3.13724775513-1",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@oclif/core": "^4.2.8",
@@ -20,8 +20,12 @@
20
20
  },
21
21
  "devDependencies": {
22
22
  "@biomejs/biome": "1.9.4",
23
- "@commitlint/config-conventional": "^19.7.1",
23
+ "@commitlint/config-conventional": "^19.8.0",
24
24
  "@oclif/plugin-help": "^6.2.26",
25
+ "@rollup/plugin-commonjs": "^28.0.3",
26
+ "@rollup/plugin-node-resolve": "^16.0.0",
27
+ "@rollup/plugin-terser": "^0.4.4",
28
+ "@rollup/plugin-typescript": "^12.1.2",
25
29
  "@salesforce/cli-plugins-testkit": "^5.3.39",
26
30
  "@salesforce/dev-config": "^4.3.1",
27
31
  "@types/chai": "^5.2.0",
@@ -33,6 +37,8 @@
33
37
  "mocha": "^11.1.0",
34
38
  "nyc": "^17.1.0",
35
39
  "oclif": "^4.17.34",
40
+ "rollup": "^4.34.9",
41
+ "rollup-plugin-preserve-shebangs": "^0.2.0",
36
42
  "shx": "^0.3.4",
37
43
  "ts-jest": "^29.2.6",
38
44
  "ts-jest-mock-import-meta": "^1.2.1",
@@ -1741,13 +1747,13 @@
1741
1747
  }
1742
1748
  },
1743
1749
  "node_modules/@commitlint/config-conventional": {
1744
- "version": "19.7.1",
1745
- "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.7.1.tgz",
1746
- "integrity": "sha512-fsEIF8zgiI/FIWSnykdQNj/0JE4av08MudLTyYHm4FlLWemKoQvPNUYU2M/3tktWcCEyq7aOkDDgtjrmgWFbvg==",
1750
+ "version": "19.8.0",
1751
+ "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-19.8.0.tgz",
1752
+ "integrity": "sha512-9I2kKJwcAPwMoAj38hwqFXG0CzS2Kj+SAByPUQ0SlHTfb7VUhYVmo7G2w2tBrqmOf7PFd6MpZ/a1GQJo8na8kw==",
1747
1753
  "dev": true,
1748
1754
  "license": "MIT",
1749
1755
  "dependencies": {
1750
- "@commitlint/types": "^19.5.0",
1756
+ "@commitlint/types": "^19.8.0",
1751
1757
  "conventional-changelog-conventionalcommits": "^7.0.2"
1752
1758
  },
1753
1759
  "engines": {
@@ -1755,9 +1761,9 @@
1755
1761
  }
1756
1762
  },
1757
1763
  "node_modules/@commitlint/types": {
1758
- "version": "19.5.0",
1759
- "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.5.0.tgz",
1760
- "integrity": "sha512-DSHae2obMSMkAtTBSOulg5X7/z+rGLxcXQIkg3OmWvY6wifojge5uVMydfhUvs7yQj+V7jNmRZ2Xzl8GJyqRgg==",
1764
+ "version": "19.8.0",
1765
+ "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-19.8.0.tgz",
1766
+ "integrity": "sha512-LRjP623jPyf3Poyfb0ohMj8I3ORyBDOwXAgxxVPbSD0unJuW2mJWeiRfaQinjtccMqC5Wy1HOMfa4btKjbNxbg==",
1761
1767
  "dev": true,
1762
1768
  "license": "MIT",
1763
1769
  "dependencies": {
@@ -3813,6 +3819,17 @@
3813
3819
  "node": ">=6.0.0"
3814
3820
  }
3815
3821
  },
3822
+ "node_modules/@jridgewell/source-map": {
3823
+ "version": "0.3.6",
3824
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz",
3825
+ "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==",
3826
+ "dev": true,
3827
+ "license": "MIT",
3828
+ "dependencies": {
3829
+ "@jridgewell/gen-mapping": "^0.3.5",
3830
+ "@jridgewell/trace-mapping": "^0.3.25"
3831
+ }
3832
+ },
3816
3833
  "node_modules/@jridgewell/sourcemap-codec": {
3817
3834
  "version": "1.5.0",
3818
3835
  "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz",
@@ -4176,6 +4193,475 @@
4176
4193
  "node": ">=12"
4177
4194
  }
4178
4195
  },
4196
+ "node_modules/@rollup/plugin-commonjs": {
4197
+ "version": "28.0.3",
4198
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-28.0.3.tgz",
4199
+ "integrity": "sha512-pyltgilam1QPdn+Zd9gaCfOLcnjMEJ9gV+bTw6/r73INdvzf1ah9zLIJBm+kW7R6IUFIQ1YO+VqZtYxZNWFPEQ==",
4200
+ "dev": true,
4201
+ "license": "MIT",
4202
+ "dependencies": {
4203
+ "@rollup/pluginutils": "^5.0.1",
4204
+ "commondir": "^1.0.1",
4205
+ "estree-walker": "^2.0.2",
4206
+ "fdir": "^6.2.0",
4207
+ "is-reference": "1.2.1",
4208
+ "magic-string": "^0.30.3",
4209
+ "picomatch": "^4.0.2"
4210
+ },
4211
+ "engines": {
4212
+ "node": ">=16.0.0 || 14 >= 14.17"
4213
+ },
4214
+ "peerDependencies": {
4215
+ "rollup": "^2.68.0||^3.0.0||^4.0.0"
4216
+ },
4217
+ "peerDependenciesMeta": {
4218
+ "rollup": {
4219
+ "optional": true
4220
+ }
4221
+ }
4222
+ },
4223
+ "node_modules/@rollup/plugin-commonjs/node_modules/fdir": {
4224
+ "version": "6.4.3",
4225
+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.3.tgz",
4226
+ "integrity": "sha512-PMXmW2y1hDDfTSRc9gaXIuCCRpuoz3Kaz8cUelp3smouvfT632ozg2vrT6lJsHKKOF59YLbOGfAWGUcKEfRMQw==",
4227
+ "dev": true,
4228
+ "license": "MIT",
4229
+ "peerDependencies": {
4230
+ "picomatch": "^3 || ^4"
4231
+ },
4232
+ "peerDependenciesMeta": {
4233
+ "picomatch": {
4234
+ "optional": true
4235
+ }
4236
+ }
4237
+ },
4238
+ "node_modules/@rollup/plugin-commonjs/node_modules/picomatch": {
4239
+ "version": "4.0.2",
4240
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
4241
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
4242
+ "dev": true,
4243
+ "license": "MIT",
4244
+ "engines": {
4245
+ "node": ">=12"
4246
+ },
4247
+ "funding": {
4248
+ "url": "https://github.com/sponsors/jonschlinkert"
4249
+ }
4250
+ },
4251
+ "node_modules/@rollup/plugin-node-resolve": {
4252
+ "version": "16.0.0",
4253
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-16.0.0.tgz",
4254
+ "integrity": "sha512-0FPvAeVUT/zdWoO0jnb/V5BlBsUSNfkIOtFHzMO4H9MOklrmQFY6FduVHKucNb/aTFxvnGhj4MNj/T1oNdDfNg==",
4255
+ "dev": true,
4256
+ "license": "MIT",
4257
+ "dependencies": {
4258
+ "@rollup/pluginutils": "^5.0.1",
4259
+ "@types/resolve": "1.20.2",
4260
+ "deepmerge": "^4.2.2",
4261
+ "is-module": "^1.0.0",
4262
+ "resolve": "^1.22.1"
4263
+ },
4264
+ "engines": {
4265
+ "node": ">=14.0.0"
4266
+ },
4267
+ "peerDependencies": {
4268
+ "rollup": "^2.78.0||^3.0.0||^4.0.0"
4269
+ },
4270
+ "peerDependenciesMeta": {
4271
+ "rollup": {
4272
+ "optional": true
4273
+ }
4274
+ }
4275
+ },
4276
+ "node_modules/@rollup/plugin-terser": {
4277
+ "version": "0.4.4",
4278
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.4.4.tgz",
4279
+ "integrity": "sha512-XHeJC5Bgvs8LfukDwWZp7yeqin6ns8RTl2B9avbejt6tZqsqvVoWI7ZTQrcNsfKEDWBTnTxM8nMDkO2IFFbd0A==",
4280
+ "dev": true,
4281
+ "license": "MIT",
4282
+ "dependencies": {
4283
+ "serialize-javascript": "^6.0.1",
4284
+ "smob": "^1.0.0",
4285
+ "terser": "^5.17.4"
4286
+ },
4287
+ "engines": {
4288
+ "node": ">=14.0.0"
4289
+ },
4290
+ "peerDependencies": {
4291
+ "rollup": "^2.0.0||^3.0.0||^4.0.0"
4292
+ },
4293
+ "peerDependenciesMeta": {
4294
+ "rollup": {
4295
+ "optional": true
4296
+ }
4297
+ }
4298
+ },
4299
+ "node_modules/@rollup/plugin-terser/node_modules/commander": {
4300
+ "version": "2.20.3",
4301
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
4302
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
4303
+ "dev": true,
4304
+ "license": "MIT"
4305
+ },
4306
+ "node_modules/@rollup/plugin-terser/node_modules/source-map-support": {
4307
+ "version": "0.5.21",
4308
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
4309
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
4310
+ "dev": true,
4311
+ "license": "MIT",
4312
+ "dependencies": {
4313
+ "buffer-from": "^1.0.0",
4314
+ "source-map": "^0.6.0"
4315
+ }
4316
+ },
4317
+ "node_modules/@rollup/plugin-terser/node_modules/terser": {
4318
+ "version": "5.39.0",
4319
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.39.0.tgz",
4320
+ "integrity": "sha512-LBAhFyLho16harJoWMg/nZsQYgTrg5jXOn2nCYjRUcZZEdE3qa2zb8QEDRUGVZBW4rlazf2fxkg8tztybTaqWw==",
4321
+ "dev": true,
4322
+ "license": "BSD-2-Clause",
4323
+ "dependencies": {
4324
+ "@jridgewell/source-map": "^0.3.3",
4325
+ "acorn": "^8.8.2",
4326
+ "commander": "^2.20.0",
4327
+ "source-map-support": "~0.5.20"
4328
+ },
4329
+ "bin": {
4330
+ "terser": "bin/terser"
4331
+ },
4332
+ "engines": {
4333
+ "node": ">=10"
4334
+ }
4335
+ },
4336
+ "node_modules/@rollup/plugin-typescript": {
4337
+ "version": "12.1.2",
4338
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-12.1.2.tgz",
4339
+ "integrity": "sha512-cdtSp154H5sv637uMr1a8OTWB0L1SWDSm1rDGiyfcGcvQ6cuTs4MDk2BVEBGysUWago4OJN4EQZqOTl/QY3Jgg==",
4340
+ "dev": true,
4341
+ "license": "MIT",
4342
+ "dependencies": {
4343
+ "@rollup/pluginutils": "^5.1.0",
4344
+ "resolve": "^1.22.1"
4345
+ },
4346
+ "engines": {
4347
+ "node": ">=14.0.0"
4348
+ },
4349
+ "peerDependencies": {
4350
+ "rollup": "^2.14.0||^3.0.0||^4.0.0",
4351
+ "tslib": "*",
4352
+ "typescript": ">=3.7.0"
4353
+ },
4354
+ "peerDependenciesMeta": {
4355
+ "rollup": {
4356
+ "optional": true
4357
+ },
4358
+ "tslib": {
4359
+ "optional": true
4360
+ }
4361
+ }
4362
+ },
4363
+ "node_modules/@rollup/pluginutils": {
4364
+ "version": "5.1.4",
4365
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.4.tgz",
4366
+ "integrity": "sha512-USm05zrsFxYLPdWWq+K3STlWiT/3ELn3RcV5hJMghpeAIhxfsUIg6mt12CBJBInWMV4VneoV7SfGv8xIwo2qNQ==",
4367
+ "dev": true,
4368
+ "license": "MIT",
4369
+ "dependencies": {
4370
+ "@types/estree": "^1.0.0",
4371
+ "estree-walker": "^2.0.2",
4372
+ "picomatch": "^4.0.2"
4373
+ },
4374
+ "engines": {
4375
+ "node": ">=14.0.0"
4376
+ },
4377
+ "peerDependencies": {
4378
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
4379
+ },
4380
+ "peerDependenciesMeta": {
4381
+ "rollup": {
4382
+ "optional": true
4383
+ }
4384
+ }
4385
+ },
4386
+ "node_modules/@rollup/pluginutils/node_modules/picomatch": {
4387
+ "version": "4.0.2",
4388
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz",
4389
+ "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==",
4390
+ "dev": true,
4391
+ "license": "MIT",
4392
+ "engines": {
4393
+ "node": ">=12"
4394
+ },
4395
+ "funding": {
4396
+ "url": "https://github.com/sponsors/jonschlinkert"
4397
+ }
4398
+ },
4399
+ "node_modules/@rollup/rollup-android-arm-eabi": {
4400
+ "version": "4.34.9",
4401
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.9.tgz",
4402
+ "integrity": "sha512-qZdlImWXur0CFakn2BJ2znJOdqYZKiedEPEVNTBrpfPjc/YuTGcaYZcdmNFTkUj3DU0ZM/AElcM8Ybww3xVLzA==",
4403
+ "cpu": [
4404
+ "arm"
4405
+ ],
4406
+ "dev": true,
4407
+ "license": "MIT",
4408
+ "optional": true,
4409
+ "os": [
4410
+ "android"
4411
+ ]
4412
+ },
4413
+ "node_modules/@rollup/rollup-android-arm64": {
4414
+ "version": "4.34.9",
4415
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.9.tgz",
4416
+ "integrity": "sha512-4KW7P53h6HtJf5Y608T1ISKvNIYLWRKMvfnG0c44M6In4DQVU58HZFEVhWINDZKp7FZps98G3gxwC1sb0wXUUg==",
4417
+ "cpu": [
4418
+ "arm64"
4419
+ ],
4420
+ "dev": true,
4421
+ "license": "MIT",
4422
+ "optional": true,
4423
+ "os": [
4424
+ "android"
4425
+ ]
4426
+ },
4427
+ "node_modules/@rollup/rollup-darwin-arm64": {
4428
+ "version": "4.34.9",
4429
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.9.tgz",
4430
+ "integrity": "sha512-0CY3/K54slrzLDjOA7TOjN1NuLKERBgk9nY5V34mhmuu673YNb+7ghaDUs6N0ujXR7fz5XaS5Aa6d2TNxZd0OQ==",
4431
+ "cpu": [
4432
+ "arm64"
4433
+ ],
4434
+ "dev": true,
4435
+ "license": "MIT",
4436
+ "optional": true,
4437
+ "os": [
4438
+ "darwin"
4439
+ ]
4440
+ },
4441
+ "node_modules/@rollup/rollup-darwin-x64": {
4442
+ "version": "4.34.9",
4443
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.9.tgz",
4444
+ "integrity": "sha512-eOojSEAi/acnsJVYRxnMkPFqcxSMFfrw7r2iD9Q32SGkb/Q9FpUY1UlAu1DH9T7j++gZ0lHjnm4OyH2vCI7l7Q==",
4445
+ "cpu": [
4446
+ "x64"
4447
+ ],
4448
+ "dev": true,
4449
+ "license": "MIT",
4450
+ "optional": true,
4451
+ "os": [
4452
+ "darwin"
4453
+ ]
4454
+ },
4455
+ "node_modules/@rollup/rollup-freebsd-arm64": {
4456
+ "version": "4.34.9",
4457
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.9.tgz",
4458
+ "integrity": "sha512-2lzjQPJbN5UnHm7bHIUKFMulGTQwdvOkouJDpPysJS+QFBGDJqcfh+CxxtG23Ik/9tEvnebQiylYoazFMAgrYw==",
4459
+ "cpu": [
4460
+ "arm64"
4461
+ ],
4462
+ "dev": true,
4463
+ "license": "MIT",
4464
+ "optional": true,
4465
+ "os": [
4466
+ "freebsd"
4467
+ ]
4468
+ },
4469
+ "node_modules/@rollup/rollup-freebsd-x64": {
4470
+ "version": "4.34.9",
4471
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.9.tgz",
4472
+ "integrity": "sha512-SLl0hi2Ah2H7xQYd6Qaiu01kFPzQ+hqvdYSoOtHYg/zCIFs6t8sV95kaoqjzjFwuYQLtOI0RZre/Ke0nPaQV+g==",
4473
+ "cpu": [
4474
+ "x64"
4475
+ ],
4476
+ "dev": true,
4477
+ "license": "MIT",
4478
+ "optional": true,
4479
+ "os": [
4480
+ "freebsd"
4481
+ ]
4482
+ },
4483
+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {
4484
+ "version": "4.34.9",
4485
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.9.tgz",
4486
+ "integrity": "sha512-88I+D3TeKItrw+Y/2ud4Tw0+3CxQ2kLgu3QvrogZ0OfkmX/DEppehus7L3TS2Q4lpB+hYyxhkQiYPJ6Mf5/dPg==",
4487
+ "cpu": [
4488
+ "arm"
4489
+ ],
4490
+ "dev": true,
4491
+ "license": "MIT",
4492
+ "optional": true,
4493
+ "os": [
4494
+ "linux"
4495
+ ]
4496
+ },
4497
+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {
4498
+ "version": "4.34.9",
4499
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.9.tgz",
4500
+ "integrity": "sha512-3qyfWljSFHi9zH0KgtEPG4cBXHDFhwD8kwg6xLfHQ0IWuH9crp005GfoUUh/6w9/FWGBwEHg3lxK1iHRN1MFlA==",
4501
+ "cpu": [
4502
+ "arm"
4503
+ ],
4504
+ "dev": true,
4505
+ "license": "MIT",
4506
+ "optional": true,
4507
+ "os": [
4508
+ "linux"
4509
+ ]
4510
+ },
4511
+ "node_modules/@rollup/rollup-linux-arm64-gnu": {
4512
+ "version": "4.34.9",
4513
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.9.tgz",
4514
+ "integrity": "sha512-6TZjPHjKZUQKmVKMUowF3ewHxctrRR09eYyvT5eFv8w/fXarEra83A2mHTVJLA5xU91aCNOUnM+DWFMSbQ0Nxw==",
4515
+ "cpu": [
4516
+ "arm64"
4517
+ ],
4518
+ "dev": true,
4519
+ "license": "MIT",
4520
+ "optional": true,
4521
+ "os": [
4522
+ "linux"
4523
+ ]
4524
+ },
4525
+ "node_modules/@rollup/rollup-linux-arm64-musl": {
4526
+ "version": "4.34.9",
4527
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.9.tgz",
4528
+ "integrity": "sha512-LD2fytxZJZ6xzOKnMbIpgzFOuIKlxVOpiMAXawsAZ2mHBPEYOnLRK5TTEsID6z4eM23DuO88X0Tq1mErHMVq0A==",
4529
+ "cpu": [
4530
+ "arm64"
4531
+ ],
4532
+ "dev": true,
4533
+ "license": "MIT",
4534
+ "optional": true,
4535
+ "os": [
4536
+ "linux"
4537
+ ]
4538
+ },
4539
+ "node_modules/@rollup/rollup-linux-loongarch64-gnu": {
4540
+ "version": "4.34.9",
4541
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.9.tgz",
4542
+ "integrity": "sha512-dRAgTfDsn0TE0HI6cmo13hemKpVHOEyeciGtvlBTkpx/F65kTvShtY/EVyZEIfxFkV5JJTuQ9tP5HGBS0hfxIg==",
4543
+ "cpu": [
4544
+ "loong64"
4545
+ ],
4546
+ "dev": true,
4547
+ "license": "MIT",
4548
+ "optional": true,
4549
+ "os": [
4550
+ "linux"
4551
+ ]
4552
+ },
4553
+ "node_modules/@rollup/rollup-linux-powerpc64le-gnu": {
4554
+ "version": "4.34.9",
4555
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.9.tgz",
4556
+ "integrity": "sha512-PHcNOAEhkoMSQtMf+rJofwisZqaU8iQ8EaSps58f5HYll9EAY5BSErCZ8qBDMVbq88h4UxaNPlbrKqfWP8RfJA==",
4557
+ "cpu": [
4558
+ "ppc64"
4559
+ ],
4560
+ "dev": true,
4561
+ "license": "MIT",
4562
+ "optional": true,
4563
+ "os": [
4564
+ "linux"
4565
+ ]
4566
+ },
4567
+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {
4568
+ "version": "4.34.9",
4569
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.9.tgz",
4570
+ "integrity": "sha512-Z2i0Uy5G96KBYKjeQFKbbsB54xFOL5/y1P5wNBsbXB8yE+At3oh0DVMjQVzCJRJSfReiB2tX8T6HUFZ2k8iaKg==",
4571
+ "cpu": [
4572
+ "riscv64"
4573
+ ],
4574
+ "dev": true,
4575
+ "license": "MIT",
4576
+ "optional": true,
4577
+ "os": [
4578
+ "linux"
4579
+ ]
4580
+ },
4581
+ "node_modules/@rollup/rollup-linux-s390x-gnu": {
4582
+ "version": "4.34.9",
4583
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.9.tgz",
4584
+ "integrity": "sha512-U+5SwTMoeYXoDzJX5dhDTxRltSrIax8KWwfaaYcynuJw8mT33W7oOgz0a+AaXtGuvhzTr2tVKh5UO8GVANTxyQ==",
4585
+ "cpu": [
4586
+ "s390x"
4587
+ ],
4588
+ "dev": true,
4589
+ "license": "MIT",
4590
+ "optional": true,
4591
+ "os": [
4592
+ "linux"
4593
+ ]
4594
+ },
4595
+ "node_modules/@rollup/rollup-linux-x64-gnu": {
4596
+ "version": "4.34.9",
4597
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.9.tgz",
4598
+ "integrity": "sha512-FwBHNSOjUTQLP4MG7y6rR6qbGw4MFeQnIBrMe161QGaQoBQLqSUEKlHIiVgF3g/mb3lxlxzJOpIBhaP+C+KP2A==",
4599
+ "cpu": [
4600
+ "x64"
4601
+ ],
4602
+ "dev": true,
4603
+ "license": "MIT",
4604
+ "optional": true,
4605
+ "os": [
4606
+ "linux"
4607
+ ]
4608
+ },
4609
+ "node_modules/@rollup/rollup-linux-x64-musl": {
4610
+ "version": "4.34.9",
4611
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.9.tgz",
4612
+ "integrity": "sha512-cYRpV4650z2I3/s6+5/LONkjIz8MBeqrk+vPXV10ORBnshpn8S32bPqQ2Utv39jCiDcO2eJTuSlPXpnvmaIgRA==",
4613
+ "cpu": [
4614
+ "x64"
4615
+ ],
4616
+ "dev": true,
4617
+ "license": "MIT",
4618
+ "optional": true,
4619
+ "os": [
4620
+ "linux"
4621
+ ]
4622
+ },
4623
+ "node_modules/@rollup/rollup-win32-arm64-msvc": {
4624
+ "version": "4.34.9",
4625
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.9.tgz",
4626
+ "integrity": "sha512-z4mQK9dAN6byRA/vsSgQiPeuO63wdiDxZ9yg9iyX2QTzKuQM7T4xlBoeUP/J8uiFkqxkcWndWi+W7bXdPbt27Q==",
4627
+ "cpu": [
4628
+ "arm64"
4629
+ ],
4630
+ "dev": true,
4631
+ "license": "MIT",
4632
+ "optional": true,
4633
+ "os": [
4634
+ "win32"
4635
+ ]
4636
+ },
4637
+ "node_modules/@rollup/rollup-win32-ia32-msvc": {
4638
+ "version": "4.34.9",
4639
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.9.tgz",
4640
+ "integrity": "sha512-KB48mPtaoHy1AwDNkAJfHXvHp24H0ryZog28spEs0V48l3H1fr4i37tiyHsgKZJnCmvxsbATdZGBpbmxTE3a9w==",
4641
+ "cpu": [
4642
+ "ia32"
4643
+ ],
4644
+ "dev": true,
4645
+ "license": "MIT",
4646
+ "optional": true,
4647
+ "os": [
4648
+ "win32"
4649
+ ]
4650
+ },
4651
+ "node_modules/@rollup/rollup-win32-x64-msvc": {
4652
+ "version": "4.34.9",
4653
+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.9.tgz",
4654
+ "integrity": "sha512-AyleYRPU7+rgkMWbEh71fQlrzRfeP6SyMnRf9XX4fCdDPAJumdSBqYEcWPMzVQ4ScAl7E4oFfK0GUVn77xSwbw==",
4655
+ "cpu": [
4656
+ "x64"
4657
+ ],
4658
+ "dev": true,
4659
+ "license": "MIT",
4660
+ "optional": true,
4661
+ "os": [
4662
+ "win32"
4663
+ ]
4664
+ },
4179
4665
  "node_modules/@salesforce/cli-plugins-testkit": {
4180
4666
  "version": "5.3.39",
4181
4667
  "resolved": "https://registry.npmjs.org/@salesforce/cli-plugins-testkit/-/cli-plugins-testkit-5.3.39.tgz",
@@ -5274,6 +5760,13 @@
5274
5760
  "dev": true,
5275
5761
  "license": "MIT"
5276
5762
  },
5763
+ "node_modules/@types/estree": {
5764
+ "version": "1.0.6",
5765
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz",
5766
+ "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==",
5767
+ "dev": true,
5768
+ "license": "MIT"
5769
+ },
5277
5770
  "node_modules/@types/glob": {
5278
5771
  "version": "7.2.0",
5279
5772
  "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.2.0.tgz",
@@ -5381,6 +5874,13 @@
5381
5874
  "csstype": "^3.0.2"
5382
5875
  }
5383
5876
  },
5877
+ "node_modules/@types/resolve": {
5878
+ "version": "1.20.2",
5879
+ "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.20.2.tgz",
5880
+ "integrity": "sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==",
5881
+ "dev": true,
5882
+ "license": "MIT"
5883
+ },
5384
5884
  "node_modules/@types/shelljs": {
5385
5885
  "version": "0.8.15",
5386
5886
  "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.15.tgz",
@@ -7196,6 +7696,13 @@
7196
7696
  "node": ">=4"
7197
7697
  }
7198
7698
  },
7699
+ "node_modules/estree-walker": {
7700
+ "version": "2.0.2",
7701
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
7702
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
7703
+ "dev": true,
7704
+ "license": "MIT"
7705
+ },
7199
7706
  "node_modules/event-target-shim": {
7200
7707
  "version": "5.0.1",
7201
7708
  "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
@@ -8593,6 +9100,13 @@
8593
9100
  "url": "https://github.com/sponsors/sindresorhus"
8594
9101
  }
8595
9102
  },
9103
+ "node_modules/is-module": {
9104
+ "version": "1.0.0",
9105
+ "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz",
9106
+ "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==",
9107
+ "dev": true,
9108
+ "license": "MIT"
9109
+ },
8596
9110
  "node_modules/is-number": {
8597
9111
  "version": "7.0.0",
8598
9112
  "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
@@ -8625,6 +9139,16 @@
8625
9139
  "url": "https://github.com/sponsors/sindresorhus"
8626
9140
  }
8627
9141
  },
9142
+ "node_modules/is-reference": {
9143
+ "version": "1.2.1",
9144
+ "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.2.1.tgz",
9145
+ "integrity": "sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==",
9146
+ "dev": true,
9147
+ "license": "MIT",
9148
+ "dependencies": {
9149
+ "@types/estree": "*"
9150
+ }
9151
+ },
8628
9152
  "node_modules/is-retry-allowed": {
8629
9153
  "version": "1.2.0",
8630
9154
  "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz",
@@ -10689,6 +11213,16 @@
10689
11213
  "yallist": "^3.0.2"
10690
11214
  }
10691
11215
  },
11216
+ "node_modules/magic-string": {
11217
+ "version": "0.30.17",
11218
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz",
11219
+ "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==",
11220
+ "dev": true,
11221
+ "license": "MIT",
11222
+ "dependencies": {
11223
+ "@jridgewell/sourcemap-codec": "^1.5.0"
11224
+ }
11225
+ },
10692
11226
  "node_modules/make-dir": {
10693
11227
  "version": "4.0.0",
10694
11228
  "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
@@ -12367,6 +12901,68 @@
12367
12901
  "url": "https://github.com/sponsors/isaacs"
12368
12902
  }
12369
12903
  },
12904
+ "node_modules/rollup": {
12905
+ "version": "4.34.9",
12906
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.34.9.tgz",
12907
+ "integrity": "sha512-nF5XYqWWp9hx/LrpC8sZvvvmq0TeTjQgaZHYmAgwysT9nh8sWnZhBnM8ZyVbbJFIQBLwHDNoMqsBZBbUo4U8sQ==",
12908
+ "dev": true,
12909
+ "license": "MIT",
12910
+ "dependencies": {
12911
+ "@types/estree": "1.0.6"
12912
+ },
12913
+ "bin": {
12914
+ "rollup": "dist/bin/rollup"
12915
+ },
12916
+ "engines": {
12917
+ "node": ">=18.0.0",
12918
+ "npm": ">=8.0.0"
12919
+ },
12920
+ "optionalDependencies": {
12921
+ "@rollup/rollup-android-arm-eabi": "4.34.9",
12922
+ "@rollup/rollup-android-arm64": "4.34.9",
12923
+ "@rollup/rollup-darwin-arm64": "4.34.9",
12924
+ "@rollup/rollup-darwin-x64": "4.34.9",
12925
+ "@rollup/rollup-freebsd-arm64": "4.34.9",
12926
+ "@rollup/rollup-freebsd-x64": "4.34.9",
12927
+ "@rollup/rollup-linux-arm-gnueabihf": "4.34.9",
12928
+ "@rollup/rollup-linux-arm-musleabihf": "4.34.9",
12929
+ "@rollup/rollup-linux-arm64-gnu": "4.34.9",
12930
+ "@rollup/rollup-linux-arm64-musl": "4.34.9",
12931
+ "@rollup/rollup-linux-loongarch64-gnu": "4.34.9",
12932
+ "@rollup/rollup-linux-powerpc64le-gnu": "4.34.9",
12933
+ "@rollup/rollup-linux-riscv64-gnu": "4.34.9",
12934
+ "@rollup/rollup-linux-s390x-gnu": "4.34.9",
12935
+ "@rollup/rollup-linux-x64-gnu": "4.34.9",
12936
+ "@rollup/rollup-linux-x64-musl": "4.34.9",
12937
+ "@rollup/rollup-win32-arm64-msvc": "4.34.9",
12938
+ "@rollup/rollup-win32-ia32-msvc": "4.34.9",
12939
+ "@rollup/rollup-win32-x64-msvc": "4.34.9",
12940
+ "fsevents": "~2.3.2"
12941
+ }
12942
+ },
12943
+ "node_modules/rollup-plugin-preserve-shebangs": {
12944
+ "version": "0.2.0",
12945
+ "resolved": "https://registry.npmjs.org/rollup-plugin-preserve-shebangs/-/rollup-plugin-preserve-shebangs-0.2.0.tgz",
12946
+ "integrity": "sha512-OEyTIfZwUJ7yUAVAbegac/bNvp1WJzgZcQNCFprWX42wwwOqlJwrev9lUmzZdYVgCWct+03xUPvZg4RfgkM9oQ==",
12947
+ "dev": true,
12948
+ "license": "MIT",
12949
+ "dependencies": {
12950
+ "magic-string": "^0.25.7"
12951
+ },
12952
+ "peerDependencies": {
12953
+ "rollup": "*"
12954
+ }
12955
+ },
12956
+ "node_modules/rollup-plugin-preserve-shebangs/node_modules/magic-string": {
12957
+ "version": "0.25.9",
12958
+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz",
12959
+ "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==",
12960
+ "dev": true,
12961
+ "license": "MIT",
12962
+ "dependencies": {
12963
+ "sourcemap-codec": "^1.4.8"
12964
+ }
12965
+ },
12370
12966
  "node_modules/run-parallel": {
12371
12967
  "version": "1.2.0",
12372
12968
  "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
@@ -12680,6 +13276,13 @@
12680
13276
  "url": "https://github.com/sponsors/sindresorhus"
12681
13277
  }
12682
13278
  },
13279
+ "node_modules/smob": {
13280
+ "version": "1.5.0",
13281
+ "resolved": "https://registry.npmjs.org/smob/-/smob-1.5.0.tgz",
13282
+ "integrity": "sha512-g6T+p7QO8npa+/hNx9ohv1E5pVCmWrVCUzUXJyLdMmftX6ER0oiWY/w9knEonLpnOp6b6FenKnMfR8gqwWdwig==",
13283
+ "dev": true,
13284
+ "license": "MIT"
13285
+ },
12683
13286
  "node_modules/smol-toml": {
12684
13287
  "version": "1.3.1",
12685
13288
  "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.3.1.tgz",
@@ -12773,6 +13376,14 @@
12773
13376
  "source-map": "^0.6.0"
12774
13377
  }
12775
13378
  },
13379
+ "node_modules/sourcemap-codec": {
13380
+ "version": "1.4.8",
13381
+ "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz",
13382
+ "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==",
13383
+ "deprecated": "Please use @jridgewell/sourcemap-codec instead",
13384
+ "dev": true,
13385
+ "license": "MIT"
13386
+ },
12776
13387
  "node_modules/spawn-wrap": {
12777
13388
  "version": "2.0.0",
12778
13389
  "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz",
@@ -3,7 +3,7 @@
3
3
  "git:merge:driver:install": {
4
4
  "aliases": [],
5
5
  "args": {},
6
- "description": "Installs a local git merge driver for the given org and branch, by updating the `.gitattributes` files in the project and creating a new merge driver configuration file in the `.git/config` of the project.",
6
+ "description": "Installs a local git merge driver for the given org and branch, by updating the `.gitattributes` files in the project, creating a new merge driver configuration in the `.git/config` of the project, and installing the binary in the node_modules/.bin directory.",
7
7
  "examples": [
8
8
  "Install the driver for a given project:\n<%= config.bin %> <%= command.id %>"
9
9
  ],
@@ -73,7 +73,7 @@
73
73
  "git:merge:driver:uninstall": {
74
74
  "aliases": [],
75
75
  "args": {},
76
- "description": "Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the `.gitattributes` files in the project and deleting the merge driver configuration file in the `.git/config` of the project.",
76
+ "description": "Uninstalls the local git merge driver for the given org and branch, by removing the merge driver content in the `.gitattributes` files in the project, deleting the merge driver configuration from the `.git/config` of the project, and removing the installed binary from the node_modules/.bin directory.",
77
77
  "examples": [
78
78
  "Uninstall the driver for a given project:\n<%= config.bin %> <%= command.id %>"
79
79
  ],
@@ -141,5 +141,5 @@
141
141
  ]
142
142
  }
143
143
  },
144
- "version": "1.0.0-dev-3.13704714225-2"
144
+ "version": "1.0.0-dev-3.13724775513-1"
145
145
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "sf-git-merge-driver",
3
3
  "description": "git remote add origin git@github.com:scolladon/sf-git-merge-driver.git",
4
- "version": "1.0.0-dev-3.13704714225-2",
4
+ "version": "1.0.0-dev-3.13724775513-1",
5
5
  "exports": "./lib/driver/MergeDriver.js",
6
6
  "bin": {
7
7
  "sf-git-merge-driver": "./lib/index.js"
@@ -21,8 +21,12 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@biomejs/biome": "1.9.4",
24
- "@commitlint/config-conventional": "^19.7.1",
24
+ "@commitlint/config-conventional": "^19.8.0",
25
25
  "@oclif/plugin-help": "^6.2.26",
26
+ "@rollup/plugin-commonjs": "^28.0.3",
27
+ "@rollup/plugin-node-resolve": "^16.0.0",
28
+ "@rollup/plugin-terser": "^0.4.4",
29
+ "@rollup/plugin-typescript": "^12.1.2",
26
30
  "@salesforce/cli-plugins-testkit": "^5.3.39",
27
31
  "@salesforce/dev-config": "^4.3.1",
28
32
  "@types/chai": "^5.2.0",
@@ -34,6 +38,8 @@
34
38
  "mocha": "^11.1.0",
35
39
  "nyc": "^17.1.0",
36
40
  "oclif": "^4.17.34",
41
+ "rollup": "^4.34.9",
42
+ "rollup-plugin-preserve-shebangs": "^0.2.0",
37
43
  "shx": "^0.3.4",
38
44
  "ts-jest": "^29.2.6",
39
45
  "ts-jest-mock-import-meta": "^1.2.1",
@@ -73,6 +79,7 @@
73
79
  },
74
80
  "scripts": {
75
81
  "build": "wireit",
82
+ "bundle": "wireit",
76
83
  "clean:package-manager": "wireit",
77
84
  "clean": "wireit",
78
85
  "compile": "wireit",
@@ -96,10 +103,23 @@
96
103
  "wireit": {
97
104
  "build": {
98
105
  "dependencies": [
99
- "compile",
106
+ "bundle",
100
107
  "lint"
101
108
  ]
102
109
  },
110
+ "bundle": {
111
+ "command": "rollup -c",
112
+ "files": [
113
+ "src/**/*.ts",
114
+ "rollup.config.js"
115
+ ],
116
+ "output": [
117
+ "lib/index.js"
118
+ ],
119
+ "dependencies": [
120
+ "compile"
121
+ ]
122
+ },
103
123
  "clean": {
104
124
  "command": "shx rm -rf 'reports/*' .nyc_output oclif.manifest.json package.tgz 'sfdx-git-delta-*.tgz' 'stderr*.txt' 'stdout*.txt' '.stryker-tmp/*' perf-result.txt",
105
125
  "files": [