@soda-gql/runtime 0.0.2 → 0.0.4
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/index.cjs +16 -9
- package/dist/index.d.cts +247 -167
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +247 -167
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -9
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.cjs
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
|
|
2
|
-
//#region packages/core/src/types/
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
this.name = name;
|
|
2
|
+
//#region packages/core/src/types/type-foundation/var-ref.ts
|
|
3
|
+
var VarRef = class {
|
|
4
|
+
constructor(inner) {
|
|
5
|
+
this.inner = inner;
|
|
7
6
|
}
|
|
8
|
-
static
|
|
9
|
-
return
|
|
7
|
+
static getInner(varRef) {
|
|
8
|
+
return varRef.inner;
|
|
10
9
|
}
|
|
11
10
|
};
|
|
11
|
+
const createVarRefFromVariable = (name) => {
|
|
12
|
+
return new VarRef({
|
|
13
|
+
type: "variable",
|
|
14
|
+
name
|
|
15
|
+
});
|
|
16
|
+
};
|
|
12
17
|
|
|
13
18
|
//#endregion
|
|
14
19
|
//#region packages/core/src/utils/map-values.ts
|
|
15
|
-
|
|
20
|
+
function mapValues(obj, fn) {
|
|
21
|
+
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, fn(value, key)]));
|
|
22
|
+
}
|
|
16
23
|
|
|
17
24
|
//#endregion
|
|
18
25
|
//#region packages/core/src/composer/input.ts
|
|
19
|
-
const createVarRefs = (definitions) => mapValues(definitions, (_ref, name) =>
|
|
26
|
+
const createVarRefs = (definitions) => mapValues(definitions, (_ref, name) => createVarRefFromVariable(name));
|
|
20
27
|
|
|
21
28
|
//#endregion
|
|
22
29
|
//#region packages/core/src/types/runtime/projection.ts
|