@based/schema 5.0.0-alpha.13 → 5.0.0-alpha.15
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/dist/def/selvaBuffer.js +5 -1
- package/dist/lang.d.ts +3 -1
- package/dist/lang.js +2 -0
- package/package.json +1 -1
package/dist/def/selvaBuffer.js
CHANGED
|
@@ -94,7 +94,11 @@ export function schemaToSelvaBuffer(schema) {
|
|
|
94
94
|
return Object.values(schema).map((t, i) => {
|
|
95
95
|
const props = Object.values(t.props);
|
|
96
96
|
const rest = [];
|
|
97
|
+
const nrFields = 1 + sepPropCount(props);
|
|
97
98
|
let refFields = 0;
|
|
99
|
+
if (nrFields >= 250) {
|
|
100
|
+
throw new Error('Too many fields');
|
|
101
|
+
}
|
|
98
102
|
for (const f of props) {
|
|
99
103
|
if (f.separate) {
|
|
100
104
|
if (f.typeIndex === REFERENCE || f.typeIndex === REFERENCES) {
|
|
@@ -106,7 +110,7 @@ export function schemaToSelvaBuffer(schema) {
|
|
|
106
110
|
rest.sort((a, b) => a.prop - b.prop);
|
|
107
111
|
return Uint8Array.from([
|
|
108
112
|
...blockCapacity(t.blockCapacity),
|
|
109
|
-
|
|
113
|
+
nrFields,
|
|
110
114
|
1 + refFields,
|
|
111
115
|
...propDefBuffer(schema, {
|
|
112
116
|
...EMPTY_MICRO_BUFFER,
|
package/dist/lang.d.ts
CHANGED
|
@@ -144,8 +144,10 @@ declare const langCodes: {
|
|
|
144
144
|
readonly yi: 142;
|
|
145
145
|
readonly yo: 143;
|
|
146
146
|
readonly zu: 144;
|
|
147
|
+
readonly ka: 145;
|
|
148
|
+
readonly cnr: 146;
|
|
147
149
|
};
|
|
148
|
-
export declare const langCodesMap: Map<string, 0 |
|
|
150
|
+
export declare const langCodesMap: Map<string, 0 | 2 | 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146>;
|
|
149
151
|
export declare const inverseLangMap: Map<any, any>;
|
|
150
152
|
export type LangName = keyof typeof langCodes;
|
|
151
153
|
export type LangCode = (typeof langCodes)[LangName];
|
package/dist/lang.js
CHANGED