@typegraph/sdk
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -217,4 +217,6 @@ export namespace MetatypeTypegraphRuntimes { | ||
* ## `"find-available-operations"` | ||
* | ||
* ## `"find-prisma-models"` | ||
*/ | ||
export type TypegateOperation = 'list-typegraphs' | 'find-typegraph' | 'add-typegraph' | 'remove-typegraphs' | 'get-serialized-typegraph' | 'get-arg-info-by-path' | 'find-available-operations'; | ||
export type TypegateOperation = 'list-typegraphs' | 'find-typegraph' | 'add-typegraph' | 'remove-typegraphs' | 'get-serialized-typegraph' | 'get-arg-info-by-path' | 'find-available-operations' | 'find-prisma-models'; | ||
/** | ||
@@ -221,0 +223,0 @@ * # Variants |
{ | ||
"name": "@typegraph/sdk", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "Declarative API development platform. Build serverless backends with zero-trust and less code, no matter where and how your (legacy) systems are.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
// Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
import * as t from "../types.js"; | ||
import { runtimes, wit_utils } from "../wit.js"; | ||
import { runtimes } from "../wit.js"; | ||
import Policy from "../policy.js"; | ||
@@ -60,4 +60,4 @@ import { Runtime } from "./mod.js"; | ||
}; | ||
const out = wit_utils.removeInjections(inp._id); | ||
return t.func(inp, new t.Typedef(out, {}), mat); | ||
// const out = wit_utils.removeInjections(inp._id); | ||
return t.func(inp, inp, mat); | ||
} | ||
@@ -64,0 +64,0 @@ static(out, value) { |
@@ -19,3 +19,4 @@ import * as t from "./types.js"; | ||
name: string | null; | ||
constructor(name: string | null); | ||
type: number | null; | ||
constructor(name: string | null, type: number | null); | ||
} | ||
@@ -31,4 +32,5 @@ export declare class ApplyFromStatic { | ||
export declare class ApplyFromContext { | ||
key: string; | ||
constructor(key: string); | ||
key: string | null; | ||
type: number | null; | ||
constructor(key: string | null, type: number | null); | ||
} | ||
@@ -40,6 +42,6 @@ export declare class ApplyFromParent { | ||
declare const InjectionSource: { | ||
readonly asArg: (name?: string) => ApplyFromArg; | ||
readonly asArg: (name?: string, type?: t.Typedef) => ApplyFromArg; | ||
readonly set: (value: any) => ApplyFromStatic; | ||
readonly fromSecret: (key: string) => ApplyFromSecret; | ||
readonly fromContext: (key: string) => ApplyFromContext; | ||
readonly fromContext: (key: string, type?: t.Typedef) => ApplyFromContext; | ||
readonly fromParent: (typeName: string) => ApplyFromParent; | ||
@@ -46,0 +48,0 @@ }; |
@@ -10,4 +10,5 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. | ||
export class ApplyFromArg { | ||
constructor(name) { | ||
constructor(name, type) { | ||
this.name = name; | ||
this.type = type; | ||
} | ||
@@ -26,4 +27,5 @@ } | ||
export class ApplyFromContext { | ||
constructor(key) { | ||
constructor(key, type) { | ||
this.key = key; | ||
this.type = type; | ||
} | ||
@@ -37,6 +39,6 @@ } | ||
const InjectionSource = { | ||
asArg: (name) => new ApplyFromArg(name !== null && name !== void 0 ? name : null), | ||
asArg: (name, type) => { var _a; return new ApplyFromArg(name !== null && name !== void 0 ? name : null, (_a = type === null || type === void 0 ? void 0 : type._id) !== null && _a !== void 0 ? _a : null); }, | ||
set: (value) => new ApplyFromStatic(value), | ||
fromSecret: (key) => new ApplyFromSecret(key), | ||
fromContext: (key) => new ApplyFromContext(key), | ||
fromContext: (key, type) => { var _a; return new ApplyFromContext(key, (_a = type === null || type === void 0 ? void 0 : type._id) !== null && _a !== void 0 ? _a : null); }, | ||
fromParent: (typeName) => new ApplyFromParent(typeName), | ||
@@ -43,0 +45,0 @@ }; |
@@ -335,3 +335,3 @@ // Copyright Metatype OÜ, licensed under the Mozilla Public License Version 2.0. | ||
if (node instanceof ApplyFromArg) { | ||
return { source: "arg", name: node.name }; | ||
return { source: "arg", name: node.name, typeId: node.type }; | ||
} | ||
@@ -342,3 +342,3 @@ else if (node instanceof ApplyFromStatic) { | ||
else if (node instanceof ApplyFromContext) { | ||
return { source: "context", key: node.key }; | ||
return { source: "context", key: node.key, typeId: node.type }; | ||
} | ||
@@ -345,0 +345,0 @@ else if (node instanceof ApplyFromSecret) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4374631
9532