@ronin/schema
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -1,2 +0,2 @@ | ||
import { ModelIndex, ModelField, ModelTrigger } from '@ronin/compiler'; | ||
import { Model as Model$1, ModelIndex, ModelField, ModelTrigger } from '@ronin/compiler'; | ||
import { GetInstructions, WithInstruction } from 'ronin/types'; | ||
@@ -9,13 +9,4 @@ | ||
type Primitives = ReturnType<typeof link> | ReturnType<typeof string> | ReturnType<typeof boolean> | ReturnType<typeof number> | ReturnType<typeof json> | ReturnType<typeof date> | ReturnType<typeof blob>; | ||
interface Model<Fields> { | ||
name?: string; | ||
pluralName?: string; | ||
slug: string; | ||
pluralSlug?: string; | ||
identifiers?: { | ||
title?: string; | ||
slug?: string; | ||
}; | ||
interface Model<Fields> extends Omit<Model$1, 'fields' | 'indexes' | 'triggers' | 'presets'> { | ||
fields?: Fields; | ||
idPrefix?: string; | ||
presets?: Record<string, GetInstructions | WithInstruction>; | ||
@@ -22,0 +13,0 @@ indexes?: Array<ModelIndex<Array<ModelField & { |
@@ -76,9 +76,2 @@ // src/model/primitives/blob.ts | ||
// src/model/utils/formatter.ts | ||
import title from "title"; | ||
var slugToName = (slug) => { | ||
const name = slug.replace(/([a-z])([A-Z])/g, "$1 $2"); | ||
return title(name); | ||
}; | ||
// src/model/utils/serializers.ts | ||
@@ -93,3 +86,3 @@ import { getBatchProxy } from "ronin/utils"; | ||
slug: key, | ||
name: name ?? slugToName(key), | ||
name, | ||
unique: unique ?? false, | ||
@@ -96,0 +89,0 @@ required: required ?? false, |
{ | ||
"name": "@ronin/schema", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"type": "module", | ||
@@ -31,7 +31,5 @@ "description": "Allows for defining the schema of a RONIN database in code.", | ||
"dependencies": { | ||
"@ronin/compiler": "0.10.3", | ||
"@ronin/compiler": "0.12.4", | ||
"@types/bun": "1.1.10", | ||
"@types/title": "3.4.3", | ||
"ronin": "5.0.1", | ||
"title": "3.5.3", | ||
"ronin": "5.1.4", | ||
"zod": "3.23.8" | ||
@@ -38,0 +36,0 @@ }, |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
4
0
26017
375
+ Added@ronin/compiler@0.12.30.12.4(transitive)
+ Addedronin@5.1.4(transitive)
+ Addedzod@3.24.1(transitive)
- Removed@types/title@3.4.3
- Removedtitle@3.5.3
- Removed@ronin/compiler@0.10.3(transitive)
- Removed@types/title@3.4.3(transitive)
- Removedronin@5.0.1(transitive)
Updated@ronin/compiler@0.12.4
Updatedronin@5.1.4