warframe-public-export-plus 0.6.1 → 0.6.2
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/ExportArcanes.json +13373 -0
- package/ExportTilesets.json +16 -0
- package/ExportUpgrades.json +2864 -1432
- package/ExportVendors.json +250 -50
- package/README.md +2 -2
- package/dict.de.json +204 -0
- package/dict.en.json +204 -0
- package/dict.es.json +204 -0
- package/dict.fr.json +204 -0
- package/dict.it.json +204 -0
- package/dict.ja.json +204 -0
- package/dict.ko.json +204 -0
- package/dict.pl.json +204 -0
- package/dict.pt.json +204 -0
- package/dict.ru.json +204 -0
- package/dict.tc.json +204 -0
- package/dict.th.json +204 -0
- package/dict.tr.json +204 -0
- package/dict.uk.json +204 -0
- package/dict.zh.json +204 -0
- package/index.d.ts +17 -3
- package/package.json +3 -4
- package/validate-typings.js +17 -17
package/validate-typings.js
CHANGED
|
@@ -11,33 +11,32 @@ for (const line of indexTypes.split(/\r?\n/)) {
|
|
|
11
11
|
}
|
|
12
12
|
types += "\n}";
|
|
13
13
|
|
|
14
|
-
console.log("
|
|
14
|
+
console.log("Generating schemas...");
|
|
15
15
|
fs.writeFileSync("tmp-types.ts", types);
|
|
16
|
-
execSync("npx ts-to-zod tmp-types.ts tmp-schemas.
|
|
17
|
-
stdio: "inherit",
|
|
18
|
-
});
|
|
16
|
+
execSync("npx ts-to-zod tmp-types.ts tmp-schemas.js --skipValidation");
|
|
19
17
|
|
|
20
18
|
const schemas = fs
|
|
21
|
-
.readFileSync("tmp-schemas.
|
|
22
|
-
.
|
|
23
|
-
.replace("iAbilitySchema = z.strictObject({", "iAbilitySchema = z.object({")
|
|
24
|
-
|
|
19
|
+
.readFileSync("tmp-schemas.js", "utf8")
|
|
20
|
+
.replaceAll("z.object", "z.strictObject")
|
|
21
|
+
.replace("iAbilitySchema = z.strictObject({", "iAbilitySchema = z.object({")
|
|
22
|
+
.replace("z.record(tMissionTypeSchema, iTilesetMissionSchema).partial()", "z.partialRecord(tMissionTypeSchema, iTilesetMissionSchema)");
|
|
23
|
+
fs.writeFileSync("tmp-schemas.mjs", schemas);
|
|
25
24
|
|
|
26
|
-
console.log("
|
|
25
|
+
console.log("Validating schemas...");
|
|
27
26
|
const test = `import { z } from "zod";
|
|
28
|
-
import { iPublicExportPlusSchema } from "./tmp-schemas";
|
|
29
|
-
import publicExportPlus from "./index";
|
|
27
|
+
import { iPublicExportPlusSchema } from "./tmp-schemas.mjs";
|
|
28
|
+
import publicExportPlus from "./index.js";
|
|
30
29
|
try {
|
|
31
30
|
iPublicExportPlusSchema.parse(publicExportPlus);
|
|
32
|
-
console.log("
|
|
31
|
+
console.log("Schemas validated successfully.");
|
|
33
32
|
} catch (e) {
|
|
34
|
-
console.error(
|
|
33
|
+
console.error(e.message);
|
|
35
34
|
process.exit(1);
|
|
36
35
|
}`;
|
|
37
|
-
fs.writeFileSync("tmp-test.
|
|
36
|
+
fs.writeFileSync("tmp-test.mjs", test);
|
|
38
37
|
|
|
39
38
|
try {
|
|
40
|
-
execSync("
|
|
39
|
+
execSync("node tmp-test.mjs", {
|
|
41
40
|
stdio: "inherit",
|
|
42
41
|
env: {
|
|
43
42
|
...process.env,
|
|
@@ -51,7 +50,8 @@ try {
|
|
|
51
50
|
process.exitCode = 1;
|
|
52
51
|
}
|
|
53
52
|
} finally {
|
|
54
|
-
fs.unlinkSync("tmp-schemas.ts");
|
|
55
53
|
fs.unlinkSync("tmp-types.ts");
|
|
56
|
-
fs.unlinkSync("tmp-
|
|
54
|
+
fs.unlinkSync("tmp-schemas.mjs");
|
|
55
|
+
fs.unlinkSync("tmp-schemas.js");
|
|
56
|
+
fs.unlinkSync("tmp-test.mjs");
|
|
57
57
|
}
|