hypertune
Advanced tools
Comparing version 1.7.9 to 1.7.10
# Changelog | ||
## 1.7.10 | ||
- Code generation bug fixes. | ||
## 1.7.9 | ||
@@ -4,0 +8,0 @@ |
import { Command } from "cac"; | ||
import { z } from "zod"; | ||
import { ZodTypeAny, z } from "zod"; | ||
export type Schema<Options extends object = object, OptionsInput extends object = object> = z.ZodObject<z.ZodRawShape, "strip", z.ZodTypeAny, Options, OptionsInput>; | ||
@@ -30,2 +30,3 @@ /** | ||
export declare function withValidation<Options extends object, OptionsInput extends object, HandlerResult>(schema: Schema<Options, OptionsInput>, handler: Handler<Options, HandlerResult>): Handler<OptionsInput, HandlerResult>; | ||
export declare function parseOptionValueWithSchema(schema: ZodTypeAny, value: string): number | boolean | string; | ||
//# sourceMappingURL=helpers.d.ts.map |
@@ -15,3 +15,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.withValidation = exports.withOtherOptionSources = exports.registerDocs = void 0; | ||
exports.parseOptionValueWithSchema = exports.withValidation = exports.withOtherOptionSources = exports.registerDocs = void 0; | ||
const joycon_1 = __importDefault(require("joycon")); | ||
@@ -155,3 +155,6 @@ const zod_1 = require("zod"); | ||
function parseOptionValueWithSchema(schema, value) { | ||
switch (schema._def.innerType._def.typeName) { | ||
const typeName = schema._def.innerType | ||
? schema._def.innerType._def.typeName | ||
: schema._def.typeName; | ||
switch (typeName) { | ||
case zod_1.ZodFirstPartyTypeKind.ZodBoolean: { | ||
@@ -181,2 +184,3 @@ switch (value.toLowerCase().trim()) { | ||
} | ||
exports.parseOptionValueWithSchema = parseOptionValueWithSchema; | ||
/** | ||
@@ -183,0 +187,0 @@ * @example envNameToOptionName("NEXT_PUBLIC_HYPERTUNE_OUTPUT_FILE_PATH") == "outputFilePath" |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
/** Replaced by the value in package.json on build */ | ||
exports.default = "1.7.9"; | ||
exports.default = "1.7.10"; | ||
//# sourceMappingURL=sdkVersion.js.map |
{ | ||
"name": "hypertune", | ||
"version": "1.7.9", | ||
"version": "1.7.10", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
@@ -222,7 +222,11 @@ /* eslint-disable no-underscore-dangle */ | ||
function parseOptionValueWithSchema( | ||
export function parseOptionValueWithSchema( | ||
schema: ZodTypeAny, | ||
value: string | ||
): number | boolean | string { | ||
switch (schema._def.innerType._def.typeName) { | ||
const typeName = schema._def.innerType | ||
? schema._def.innerType._def.typeName | ||
: schema._def.typeName; | ||
switch (typeName) { | ||
case ZodFirstPartyTypeKind.ZodBoolean: { | ||
@@ -229,0 +233,0 @@ switch (value.toLowerCase().trim()) { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
657066
279
12221
3