diff-mindustry-bundles 1.0.6 → 1.0.7
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 +4 -3
- package/build/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,11 +38,12 @@ ARGUMENTS
|
|
|
38
38
|
|
|
39
39
|
OPTIONS
|
|
40
40
|
-V, --version output the version number
|
|
41
|
-
--base-dir <dirpath> Path to the directory containing Mindustry
|
|
41
|
+
--base-dir <dirpath> Path to the directory containing Mindustry (default:
|
|
42
|
+
".")
|
|
42
43
|
--bundles-dir <dirpath> Path to the directory containing bundles. Relative to
|
|
43
|
-
the base directory.
|
|
44
|
+
the base directory. (default: "core/assets/bundles")
|
|
44
45
|
|
|
45
|
-
Version: 1.0.
|
|
46
|
+
Version: 1.0.7
|
|
46
47
|
Repository: https://github.com/murolem/diff-mindustry-bundles
|
|
47
48
|
|
|
48
49
|
```
|
package/build/index.js
CHANGED
|
@@ -28,8 +28,8 @@ Expecting one of '${z.join("', '")}'`);let Q=`${q}Help`;return this.on(Q,(X)=>{l
|
|
|
28
28
|
`:`
|
|
29
29
|
`)+z,X=Q+1,Q=q.indexOf(`
|
|
30
30
|
`,X)}while(Q!==-1);return Z+=q.slice(X),Z}var{stdout:Aq,stderr:Oq}=Nq,s=Symbol("GENERATOR"),D=Symbol("STYLER"),O=Symbol("IS_EMPTY"),kq=["ansi","ansi","ansi256","ansi16m"],N=Object.create(null),t1=(q,J={})=>{if(J.level&&!(Number.isInteger(J.level)&&J.level>=0&&J.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let z=Aq?Aq.level:0;q.level=J.level===void 0?z:J.level};var a1=(q)=>{let J=(...z)=>z.join(" ");return t1(J,q),Object.setPrototypeOf(J,k.prototype),J};function k(q){return a1(q)}Object.setPrototypeOf(k.prototype,Function.prototype);for(let[q,J]of Object.entries(L))N[q]={get(){let z=b(this,r(J.open,J.close,this[D]),this[O]);return Object.defineProperty(this,q,{value:z}),z}};N.visible={get(){let q=b(this,this[D],!0);return Object.defineProperty(this,"visible",{value:q}),q}};var n=(q,J,z,...Q)=>{if(q==="rgb"){if(J==="ansi16m")return L[z].ansi16m(...Q);if(J==="ansi256")return L[z].ansi256(L.rgbToAnsi256(...Q));return L[z].ansi(L.rgbToAnsi(...Q))}if(q==="hex")return n("rgb",J,z,...L.hexToRgb(...Q));return L[z][q](...Q)},o1=["rgb","hex","ansi256"];for(let q of o1){N[q]={get(){let{level:z}=this;return function(...Q){let X=r(n(q,kq[z],"color",...Q),L.color.close,this[D]);return b(this,X,this[O])}}};let J="bg"+q[0].toUpperCase()+q.slice(1);N[J]={get(){let{level:z}=this;return function(...Q){let X=r(n(q,kq[z],"bgColor",...Q),L.bgColor.close,this[D]);return b(this,X,this[O])}}}}var e1=Object.defineProperties(()=>{},{...N,level:{enumerable:!0,get(){return this[s].level},set(q){this[s].level=q}}}),r=(q,J,z)=>{let Q,X;if(z===void 0)Q=q,X=J;else Q=z.openAll+q,X=J+z.closeAll;return{open:q,close:J,openAll:Q,closeAll:X,parent:z}},b=(q,J,z)=>{let Q=(...X)=>qJ(Q,X.length===1?""+X[0]:X.join(" "));return Object.setPrototypeOf(Q,e1),Q[s]=q,Q[D]=J,Q[O]=z,Q},qJ=(q,J)=>{if(q.level<=0||!J)return q[O]?"":J;let z=q[D];if(z===void 0)return J;let{openAll:Q,closeAll:X}=z;if(J.includes("\x1B"))while(z!==void 0)J=Fq(J,z.close,z.open),z=z.parent;let Z=J.indexOf(`
|
|
31
|
-
`);if(Z!==-1)J=wq(J,X,Q,Z);return Q+J+X};Object.defineProperties(k.prototype,N);var JJ=k(),uJ=k({level:Oq?Oq.level:0});var T=JJ;import Cq from"fs";import F from"path";import v from"fs";function y(q,J){if(v.existsSync(q)&&v.statSync(q).isFile())return q;let z=J?typeof J==="string"?J:J(q):"Path not found or is not a file: "+q;throw Error(z)}function t(q,J){if(v.existsSync(q)&&v.statSync(q).isDirectory())return q;let z=J?typeof J==="string"?J:J(q):"Path not found or is not a directory: "+q;throw Error(z)}function yq(q,J,z){return Math.max(Math.min(q,z),J)}import zJ from"fs";function a(){try{return"1.0.
|
|
32
|
-
Version: ${a()}`)).addHelpText("afterAll",T.gray("Repository: https://github.com/murolem/diff-mindustry-bundles")).configureHelp({formatHelp(q,J){let z=[];z.push(T.bold("DESCRIPTION")),z.push(S.description()),z.push(""),z.push(T.bold("USAGE")),z.push(J.commandUsage(q));let Q=J.padWidth(q,J);if(S.arguments.length>0)z.push(""),z.push(T.bold("ARGUMENTS")),S.registeredArguments.forEach((X)=>{let Z=(X.required?"<":"[")+
|
|
31
|
+
`);if(Z!==-1)J=wq(J,X,Q,Z);return Q+J+X};Object.defineProperties(k.prototype,N);var JJ=k(),uJ=k({level:Oq?Oq.level:0});var T=JJ;import Cq from"fs";import F from"path";import v from"fs";function y(q,J){if(v.existsSync(q)&&v.statSync(q).isFile())return q;let z=J?typeof J==="string"?J:J(q):"Path not found or is not a file: "+q;throw Error(z)}function t(q,J){if(v.existsSync(q)&&v.statSync(q).isDirectory())return q;let z=J?typeof J==="string"?J:J(q):"Path not found or is not a directory: "+q;throw Error(z)}function yq(q,J,z){return Math.max(Math.min(q,z),J)}import zJ from"fs";function a(){try{return"1.0.7"}catch(Q){}let q="package.json";y(q,(Q)=>`Failed to determine version: ${Q} not found and no version was baked`);let J;try{J=JSON.parse(zJ.readFileSync(q,"utf-8"))}catch(Q){throw Error(`Failed to determine version: failed to parse ${q}`)}let z=J.version;if(!z)throw Error("Failed to determine version: version is undefined or an empty string");return z}Error.stackTraceLimit=0;S.name("diff-mindustry-bundles").description("A handy utility to view missing/extra/untranslated keys between bundles.").version(a()).addHelpText("afterAll",T.gray(`
|
|
32
|
+
Version: ${a()}`)).addHelpText("afterAll",T.gray("Repository: https://github.com/murolem/diff-mindustry-bundles")).configureHelp({formatHelp(q,J){let z=[];z.push(T.bold("DESCRIPTION")),z.push(S.description()),z.push(""),z.push(T.bold("USAGE")),z.push(J.commandUsage(q));let Q=J.padWidth(q,J);if(S.arguments.length>0)z.push(""),z.push(T.bold("ARGUMENTS")),S.registeredArguments.forEach((X)=>{let Z=(X.required?"<":"[")+J.argumentTerm(X)+(X.required?">":"]");z.push(J.formatItem(Z,Q,J.argumentDescription(X),J))});if(S.options.length>0)z.push(""),z.push(T.bold("OPTIONS")),S.options.forEach((X)=>{z.push(J.formatItem(J.optionTerm(X),Q,J.optionDescription(X),J))});return z.join(`
|
|
33
33
|
`)+`
|
|
34
34
|
`}}).argument("<top-bundle>","Bundle with your localization (no extension). For example: 'bundle_ru'").argument("[base-bundle]","Bundle to compare with.","bundle").option("--base-dir <dirpath>",`Path to the directory containing ${T.bold("Mindustry")}`,".").option("--bundles-dir <dirpath>",`Path to the directory containing ${T.bold("bundles")}. Relative to the base directory.`,F.normalize("./core/assets/bundles")).action((q,J,z)=>{let Q=F.resolve(z.baseDir),X=F.resolve(F.join(Q,z.bundlesDir));console.log(" Mindustry directory: "+Q),console.log("Looking for bundles at: "+X),t(Q,"Mindustry directory not found."),t(X,"Bundles directory not found.");let Z=q+".properties",$=J+".properties",U=y(F.join(X,Z),(B)=>`Top bundle not found at: ${B}
|
|
35
35
|
- Bundle filename: ${Z}`),Y=y(F.join(X,$),(B)=>`Base bundle not found at: ${B}
|