Fork from @sinclair/typebox 0.34.49 as @alkdev/typebox
- Rename package from @sinclair/typebox to @alkdev/typebox - Update author, repository, and homepage to alkdev - Remove GitHub workflows, .vscode config, and branding assets - Update all source, test, example, changelog, and task imports - Update tsconfig.json path mappings - Clean up readme header (remove upstream badges/branding)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox
|
||||
@alkdev/typebox
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import * as Types from '@sinclair/typebox'
|
||||
import * as Types from '@alkdev/typebox'
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
// Annotation
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/collections
|
||||
@alkdev/typebox/collections
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,9 +26,9 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@sinclair/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@sinclair/typebox'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@alkdev/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@alkdev/typebox'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// TypeArrayError
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/collections
|
||||
@alkdev/typebox/collections
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/collections
|
||||
@alkdev/typebox/collections
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,9 +26,9 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@sinclair/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@sinclair/typebox'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@alkdev/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@alkdev/typebox'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// TypeMapKeyError
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/collections
|
||||
@alkdev/typebox/collections
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,9 +26,9 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@sinclair/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@sinclair/typebox'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { TypeCheck, TypeCompiler, ValueError } from '@alkdev/typebox/compiler'
|
||||
import { TSchema, Static, TypeBoxError } from '@alkdev/typebox'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// Errors
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/format
|
||||
@alkdev/typebox/format
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { TypeSystem } from '@sinclair/typebox/system'
|
||||
import { TypeCompiler } from '@sinclair/typebox/compiler'
|
||||
import { Value, ValuePointer } from '@sinclair/typebox/value'
|
||||
import { Type, TypeGuard, Kind, Static, TSchema } from '@sinclair/typebox'
|
||||
import { Syntax } from '@sinclair/typebox/syntax'
|
||||
import { TypeSystem } from '@alkdev/typebox/system'
|
||||
import { TypeCompiler } from '@alkdev/typebox/compiler'
|
||||
import { Value, ValuePointer } from '@alkdev/typebox/value'
|
||||
import { Type, TypeGuard, Kind, Static, TSchema } from '@alkdev/typebox'
|
||||
import { Syntax } from '@alkdev/typebox/syntax'
|
||||
|
||||
// -----------------------------------------------------------
|
||||
// Create: Type
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -27,9 +27,9 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { Static, Kind, TSchema, TObject, SchemaOptions, CreateType, TLiteral, TypeRegistry, ValueGuard, KindGuard, TUnion } from '@sinclair/typebox'
|
||||
import { Static, Kind, TSchema, TObject, SchemaOptions, CreateType, TLiteral, TypeRegistry, ValueGuard, KindGuard, TUnion } from '@alkdev/typebox'
|
||||
import { GetErrorFunction, SetErrorFunction } from 'src/errors/function'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// DiscriminatedUnionError
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import * as Type from '@sinclair/typebox'
|
||||
import * as Type from '@alkdev/typebox'
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Schematics
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TSchema, CloneType } from '@sinclair/typebox'
|
||||
import { TSchema, CloneType } from '@alkdev/typebox'
|
||||
|
||||
// prettier-ignore
|
||||
export type TOptions<Type extends TSchema, Options extends Record<PropertyKey, unknown>> = (
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeGuard, Type, TSchema, TIntersect, TUnion, TObject, TPartial, TProperties, Evaluate } from '@sinclair/typebox'
|
||||
import { TypeGuard, Type, TSchema, TIntersect, TUnion, TObject, TPartial, TProperties, Evaluate } from '@alkdev/typebox'
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// TPartialDeepProperties
|
||||
|
||||
@@ -86,7 +86,7 @@ type A = typeof A extends { foo: number } ? true : false // true: foo property i
|
||||
## Recursive Map
|
||||
The Recursive Map type enables deep structural remapping of a type and it's internal constituents. This type accepts a TSchema type and a mapping type function (expressed via HKT). The HKT is applied when traversing the type and it's interior. The mapping HKT can apply conditional tests to each visited type to remap into a new form. The following augments a schematic via Options, and conditionally remaps any schema with an default annotation to make it optional.
|
||||
```typescript
|
||||
import { Type, TOptional, Static, TSchema } from '@sinclair/typebox'
|
||||
import { Type, TOptional, Static, TSchema } from '@alkdev/typebox'
|
||||
|
||||
import { TRecursiveMap, TMappingType, Options } from './prototypes'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import * as Types from '@sinclair/typebox'
|
||||
import * as Types from '@alkdev/typebox'
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Mapping: Functions and Type
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,7 +26,7 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeRegistry, Kind, TSchema, SchemaOptions } from '@sinclair/typebox'
|
||||
import { TypeRegistry, Kind, TSchema, SchemaOptions } from '@alkdev/typebox'
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// TUnionEnum
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/prototypes
|
||||
@alkdev/typebox/prototypes
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,8 +26,8 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { TypeRegistry, Kind, Static, TSchema, SchemaOptions } from '@sinclair/typebox'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { TypeRegistry, Kind, Static, TSchema, SchemaOptions } from '@alkdev/typebox'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
// -------------------------------------------------------------------------------------
|
||||
// TUnionOneOf
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/standard-schema
|
||||
@alkdev/typebox/standard-schema
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ The following example augments a TypeBox schema with the required `~standard` in
|
||||
|
||||
```typescript
|
||||
import { StandardSchema } from './standard'
|
||||
import { Type } from '@sinclair/typebox'
|
||||
import { Type } from '@alkdev/typebox'
|
||||
|
||||
const T = StandardSchema(Type.Object({ // const A = {
|
||||
x: Type.Number(), // (non-enumerable) '~standard': {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/standard-schema
|
||||
@alkdev/typebox/standard-schema
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,8 +26,8 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { AssertError, Value, ValueError, ValueErrorType } from '@sinclair/typebox/value'
|
||||
import { TSchema, StaticDecode, CloneType } from '@sinclair/typebox'
|
||||
import { AssertError, Value, ValueError, ValueErrorType } from '@alkdev/typebox/value'
|
||||
import { TSchema, StaticDecode, CloneType } from '@alkdev/typebox'
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// StandardSchema
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/typedef
|
||||
@alkdev/typebox/typedef
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ License MIT
|
||||
|
||||
## Usage
|
||||
|
||||
TypeBox currently doesn't publish TypeDef as part of the mainline package. However the TypeDef functionality is written to be a standalone module you can copy into your project. You will also need `@sinclair/typebox` installed. You can obtain the `typedef` module from `example/typedef/typedef.ts` contained within this repository.
|
||||
TypeBox currently doesn't publish TypeDef as part of the mainline package. However the TypeDef functionality is written to be a standalone module you can copy into your project. You will also need `@alkdev/typebox` installed. You can obtain the `typedef` module from `example/typedef/typedef.ts` contained within this repository.
|
||||
|
||||
```typescript
|
||||
import { Type, Static } from './typedef'
|
||||
@@ -245,8 +245,8 @@ TypeDef types are partially supported with the `TypeCompiler` and `Value` checki
|
||||
The following is TypeDef used with TypeBox's type checking infrastructure.
|
||||
|
||||
```typescript
|
||||
import { TypeCompiler } from '@sinclair/typebox/compiler'
|
||||
import { Value } from '@sinclair/typebox/value'
|
||||
import { TypeCompiler } from '@alkdev/typebox/compiler'
|
||||
import { Value } from '@alkdev/typebox/value'
|
||||
|
||||
const T = Type.Struct({
|
||||
x: Type.Float32(),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*--------------------------------------------------------------------------
|
||||
|
||||
@sinclair/typebox/typedef
|
||||
@alkdev/typebox/typedef
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
@@ -26,8 +26,8 @@ THE SOFTWARE.
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
||||
import { SetErrorFunction, DefaultErrorFunction } from '@sinclair/typebox/errors'
|
||||
import * as Types from '@sinclair/typebox/type'
|
||||
import { SetErrorFunction, DefaultErrorFunction } from '@alkdev/typebox/errors'
|
||||
import * as Types from '@alkdev/typebox/type'
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Metadata
|
||||
|
||||
Reference in New Issue
Block a user