kiwi-schema
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -14,2 +14,3 @@ #!/usr/bin/env node | ||
const bb_1 = require("./bb"); | ||
const skew_types_1 = require("./skew-types"); | ||
let usage = [ | ||
@@ -28,2 +29,3 @@ '', | ||
' --skew [PATH] Generate Skew code.', | ||
' --skew-types [PATH] Generate Skew type definitions.', | ||
' --text [PATH] Encode the schema as text.', | ||
@@ -74,2 +76,3 @@ ' --binary [PATH] Encode the schema as a binary blob.', | ||
'--skew': null, | ||
'--skew-types': null, | ||
'--binary': null, | ||
@@ -145,2 +148,5 @@ '--text': null, | ||
} | ||
if (flags['--skew-types'] !== null) { | ||
writeFileString(flags['--skew-types'], skew_types_1.compileSchemaSkewTypes(parsed)); | ||
} | ||
// Generate a binary schema file | ||
@@ -147,0 +153,0 @@ if (flags['--binary'] !== null) { |
@@ -7,2 +7,3 @@ export { Definition, Schema, DefinitionKind, Field } from "./schema"; | ||
export { compileSchemaSkew } from "./skew"; | ||
export { compileSchemaSkewTypes } from "./skew-types"; | ||
export { compileSchemaTypeScript } from "./ts"; | ||
@@ -9,0 +10,0 @@ export { decodeBinarySchema, encodeBinarySchema } from "./binary"; |
@@ -14,2 +14,4 @@ "use strict"; | ||
exports.compileSchemaSkew = skew_1.compileSchemaSkew; | ||
var skew_types_1 = require("./skew-types"); | ||
exports.compileSchemaSkewTypes = skew_types_1.compileSchemaSkewTypes; | ||
var ts_1 = require("./ts"); | ||
@@ -16,0 +18,0 @@ exports.compileSchemaTypeScript = ts_1.compileSchemaTypeScript; |
{ | ||
"name": "kiwi-schema", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "A schema-based binary format for efficiently encoding trees of data", | ||
@@ -13,3 +13,5 @@ "license": "MIT", | ||
"build": "tsc -d", | ||
"prepublishOnly": "tsc -d && ls *.ts | grep -v d.ts > .npmignore && echo tsconfig.json >> .npmignore" | ||
"browser": "tsc -p tsconfig.browser.json && rollup browser.js --format=iife --name=kiwi | terser -cm > browser.min.js", | ||
"typedefs": "tsc -d && ls *.ts | grep -v d.ts > .npmignore && echo tsconfig.json >> .npmignore", | ||
"prepublishOnly": "npm run browser && npm run typedefs" | ||
}, | ||
@@ -23,5 +25,7 @@ "repository": { | ||
"mocha": "7.0.0", | ||
"rollup": "1.31.0", | ||
"skew": "0.7.43", | ||
"terser": "4.6.3", | ||
"typescript": "3.7.4" | ||
} | ||
} |
108854
33
2508
6