satisfactory-json
Advanced tools
Comparing version 0.0.62 to 0.0.63
@@ -161,3 +161,3 @@ "use strict"; | ||
if (result !== 0) { | ||
throw new Error("Not zero, but " + result); | ||
throw new Error("Not zero, but ".concat(result)); | ||
} | ||
@@ -292,3 +292,3 @@ return true; | ||
// TODO russian characters for some reason do not end with double zero? | ||
console.error("string " + resultStr + " (len: " + length + ") does not end with double zero, but with " + result_3); | ||
console.error("string ".concat(resultStr, " (len: ").concat(length, ") does not end with double zero, but with ").concat(result_3)); | ||
/*throw new Error( | ||
@@ -306,3 +306,3 @@ `string(len: ${length}) does not end with zero, but with ${result}` | ||
if (result !== 0) { | ||
throw new Error("string " + resultStr + " (len: " + length + ") does not end with zero, but with " + result); | ||
throw new Error("string ".concat(resultStr, " (len: ").concat(length, ") does not end with zero, but with ").concat(result)); | ||
//console.error(`string ${resultStr} (len: ${length}) does not end with zero, but with ${result}`) | ||
@@ -447,3 +447,3 @@ } | ||
if (value === undefined) { | ||
throw new Error("Undefined integer " + ref.name); | ||
throw new Error("Undefined integer ".concat(ref.name)); | ||
} | ||
@@ -472,3 +472,3 @@ return this.writeInt(value, shouldCount); | ||
if (value === undefined) { | ||
throw new Error("Undefined string " + ref.name); | ||
throw new Error("Undefined string ".concat(ref.name)); | ||
} | ||
@@ -496,3 +496,3 @@ if (value.length === 0) { | ||
if (value === undefined) { | ||
throw new Error("Undefined byte " + ref.name); | ||
throw new Error("Undefined byte ".concat(ref.name)); | ||
} | ||
@@ -522,3 +522,3 @@ return this.writeByte(value, shouldCount); | ||
if (value === undefined) { | ||
throw new Error("Undefined long " + ref.name); | ||
throw new Error("Undefined long ".concat(ref.name)); | ||
} | ||
@@ -546,3 +546,3 @@ // TODO remove when this is no longer stored as a string in json | ||
if (value === undefined) { | ||
throw new Error("Undefined float " + ref.name); | ||
throw new Error("Undefined float ".concat(ref.name)); | ||
} | ||
@@ -568,3 +568,3 @@ var bytes = 4; | ||
if (value === undefined) { | ||
throw new Error("Undefined float " + ref.name); | ||
throw new Error("Undefined float ".concat(ref.name)); | ||
} | ||
@@ -625,3 +625,3 @@ var bytes = 8; | ||
if (value === undefined) { | ||
throw new Error("Undefined hex " + ref.name); | ||
throw new Error("Undefined hex ".concat(ref.name)); | ||
} | ||
@@ -628,0 +628,0 @@ return this.writeBuffer(Buffer.from(value, 'hex'), shouldCount); // TODO somehow directly write the buffer? |
@@ -453,3 +453,3 @@ "use strict"; | ||
if (Builder_1.functionCommands[this.name] === undefined) { | ||
throw new Error("No commands build for function " + this.name); | ||
throw new Error("No commands build for function ".concat(this.name)); | ||
} | ||
@@ -544,3 +544,3 @@ newStackFrameCallback(Builder_1.functionCommands[this.name]); | ||
else { | ||
console.warn("No case found for " + value + " and no default case provided"); | ||
console.warn("No case found for ".concat(value, " and no default case provided")); | ||
} | ||
@@ -547,0 +547,0 @@ return 0; |
@@ -366,3 +366,3 @@ "use strict"; | ||
if (this.needBytes !== 0) { | ||
callback(new Error("Missing " + this.needBytes + " bytes")); | ||
callback(new Error("Missing ".concat(this.needBytes, " bytes"))); | ||
} | ||
@@ -369,0 +369,0 @@ else if (!this.finished) { |
@@ -45,3 +45,3 @@ "use strict"; | ||
if (encoding !== 'buffer') { | ||
throw new Error("We can only handle Buffers and not " + encoding); | ||
throw new Error("We can only handle Buffers and not ".concat(encoding)); | ||
} | ||
@@ -48,0 +48,0 @@ var result = void 0; |
@@ -84,3 +84,3 @@ "use strict"; | ||
if (ctx.tmp._extraObjectCount !== 0) { | ||
console.error("Extra object count not zero, but " + ctx.tmp._extraObjectCount, ctx); | ||
console.error("Extra object count not zero, but ".concat(ctx.tmp._extraObjectCount), ctx); | ||
} | ||
@@ -87,0 +87,0 @@ }) |
@@ -81,3 +81,3 @@ "use strict"; | ||
if (ctx.tmp._zero !== 0) { | ||
throw new Error("Not zero, but " + ctx.tmp._zero); | ||
throw new Error("Not zero, but ".concat(ctx.tmp._zero)); | ||
} | ||
@@ -109,3 +109,3 @@ }) | ||
$default: function (builder) { | ||
builder.error(function (ctx) { return "Unknown array type: " + ctx.obj.type; }); | ||
builder.error(function (ctx) { return "Unknown array type: ".concat(ctx.obj.type); }); | ||
}, | ||
@@ -112,0 +112,0 @@ }) |
@@ -14,3 +14,3 @@ "use strict"; | ||
if (ctx.tmp._zero !== 0) { | ||
throw Error("Not 0, but " + ctx.tmp._zero); | ||
throw Error("Not 0, but ".concat(ctx.tmp._zero)); | ||
} | ||
@@ -75,3 +75,3 @@ }) | ||
builder.exec(function (ctx) { | ||
throw Error("Unimplemented key type " + ctx.tmp._keyTransform); | ||
throw Error("Unimplemented key type ".concat(ctx.tmp._keyTransform)); | ||
}); | ||
@@ -104,3 +104,3 @@ }, | ||
builder.exec(function (ctx) { | ||
throw Error("Unimplemented value type " + ctx.tmp._valueTransform); | ||
throw Error("Unimplemented value type ".concat(ctx.tmp._valueTransform)); | ||
}); | ||
@@ -107,0 +107,0 @@ }, |
@@ -51,3 +51,3 @@ "use strict"; | ||
$default: function (builder) { | ||
builder.error(function (ctx) { return "Unknown set type: " + ctx.obj.type; }); | ||
builder.error(function (ctx) { return "Unknown set type: ".concat(ctx.obj.type); }); | ||
}, | ||
@@ -54,0 +54,0 @@ }) |
@@ -53,2 +53,3 @@ "use strict"; | ||
Quat: function (builder) { return (0, Quat_1.transformQuat)(builder); }, | ||
Vector4: function (builder) { return (0, Quat_1.transformQuat)(builder); }, | ||
InventoryItem: function (builder) { return (0, InventoryItem_1.transformInventoryItem)(builder); }, | ||
@@ -104,4 +105,13 @@ RailroadTrackPosition: function (builder) { | ||
ItemAmount: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssSignData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssSignMaterialData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssElementTextData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssElementImageData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssElementEffectData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssElementSharedData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RssHologramData: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
RuntimeFloatCurve: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
MWProductionTask: function (builder) { return (0, ArbitraryStruct_1.transformArbitraryStruct)(builder); }, | ||
$default: function (builder) { | ||
return builder.error(function (ctx) { return "Unknown struct property: " + ctx.obj.type; }); | ||
return builder.error(function (ctx) { return "Unknown struct property: ".concat(ctx.obj.type); }); | ||
}, | ||
@@ -108,0 +118,0 @@ }) |
@@ -78,3 +78,3 @@ "use strict"; | ||
builder.error(function (ctx) { | ||
return "Unhandled FormatArgumentType: " + ctx.obj.argumentValueType; | ||
return "Unhandled FormatArgumentType: ".concat(ctx.obj.argumentValueType); | ||
}); | ||
@@ -95,3 +95,3 @@ }, | ||
$default: function (builder) { | ||
builder.error(function (ctx) { return "Unhandled HistoryType: " + ctx.obj.historyType; }); | ||
builder.error(function (ctx) { return "Unhandled HistoryType: ".concat(ctx.obj.historyType); }); | ||
}, | ||
@@ -98,0 +98,0 @@ }); |
@@ -69,3 +69,3 @@ "use strict"; | ||
$default: function (builder) { | ||
return builder.error(function (ctx) { return "Unknown property: " + ctx.obj.type; }); | ||
return builder.error(function (ctx) { return "Unknown property: ".concat(ctx.obj.type); }); | ||
}, | ||
@@ -72,0 +72,0 @@ }) |
{ | ||
"name": "satisfactory-json", | ||
"version": "0.0.62", | ||
"version": "0.0.63", | ||
"description": "Convert Satisfactory save files to JSON and back", | ||
"author": "ficsit-felix", | ||
"dependencies": { | ||
"jsbi": "^4.0.0", | ||
"jsbi": "^4.1.0", | ||
"pako": "^2.0.4" | ||
@@ -12,14 +12,14 @@ }, | ||
"@types/commander": "^2.12.2", | ||
"@types/node": "^16.11.6", | ||
"@types/pako": "^1.0.2", | ||
"@typescript-eslint/eslint-plugin": "^5.2.0", | ||
"@typescript-eslint/parser": "^5.2.0", | ||
"commander": "^8.3.0", | ||
"eslint": "^8.1.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"@types/node": "^17.0.18", | ||
"@types/pako": "^1.0.3", | ||
"@typescript-eslint/eslint-plugin": "^5.12.0", | ||
"@typescript-eslint/parser": "^5.12.0", | ||
"commander": "^9.0.0", | ||
"eslint": "^8.9.0", | ||
"eslint-config-prettier": "^8.4.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"prettier": "^2.4.1", | ||
"ts-node": "^10.4.0", | ||
"typescript": "^4.4.4", | ||
"v8-profiler-next": "^1.4.3" | ||
"prettier": "^2.5.1", | ||
"ts-node": "^10.5.0", | ||
"typescript": "^4.5.5", | ||
"v8-profiler-next": "^1.5.1" | ||
}, | ||
@@ -26,0 +26,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
313118
4660
Updatedjsbi@^4.1.0