@genroc/eval-node 0.0.0-edge.078687d → 0.0.0-edge.07a2a1d
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/import.js +0 -7
- package/import.ts +0 -11
- package/package.json +1 -1
package/dist/import.js
CHANGED
|
@@ -106,13 +106,6 @@ function union(parts) {
|
|
|
106
106
|
const IDENT = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
|
|
107
107
|
const propKey = (k) => (IDENT.test(k) ? k : JSON.stringify(k));
|
|
108
108
|
const identifier = (n) => IDENT.test(n) ? n : `Def_${n.replace(/[^A-Za-z0-9_$]/g, "_")}`;
|
|
109
|
-
function deref(s, defs) {
|
|
110
|
-
let cur = s;
|
|
111
|
-
for (let i = 0; cur && typeof cur.$ref === "string" && i < 16; i++) {
|
|
112
|
-
cur = defs[cur.$ref.replace(/^#\/\$defs\//, "")];
|
|
113
|
-
}
|
|
114
|
-
return cur;
|
|
115
|
-
}
|
|
116
109
|
/** Emits one named type per reachable $def rather than inlining: a task output may
|
|
117
110
|
* reference itself (specs/recursive-type-inference.md) and inlining would not terminate. */
|
|
118
111
|
function declarations(at) {
|
package/import.ts
CHANGED
|
@@ -157,17 +157,6 @@ const propKey = (k: string) => (IDENT.test(k) ? k : JSON.stringify(k));
|
|
|
157
157
|
const identifier = (n: string) =>
|
|
158
158
|
IDENT.test(n) ? n : `Def_${n.replace(/[^A-Za-z0-9_$]/g, "_")}`;
|
|
159
159
|
|
|
160
|
-
function deref(
|
|
161
|
-
s: Schema | undefined,
|
|
162
|
-
defs: Record<string, Schema>,
|
|
163
|
-
): Schema | undefined {
|
|
164
|
-
let cur = s;
|
|
165
|
-
for (let i = 0; cur && typeof cur.$ref === "string" && i < 16; i++) {
|
|
166
|
-
cur = defs[cur.$ref.replace(/^#\/\$defs\//, "")];
|
|
167
|
-
}
|
|
168
|
-
return cur;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
160
|
/** Emits one named type per reachable $def rather than inlining: a task output may
|
|
172
161
|
* reference itself (specs/recursive-type-inference.md) and inlining would not terminate. */
|
|
173
162
|
function declarations(at: Located): string {
|