@ronin/compiler
Advanced tools
Comparing version 0.13.3 to 0.13.4-leo-ron-1071-experimental-295
@@ -150,3 +150,6 @@ /** | ||
type ModelFieldCollation = 'BINARY' | 'NOCASE' | 'RTRIM'; | ||
type ModelFieldLinkAction = 'CASCADE' | 'RESTRICT' | 'SET NULL' | 'SET DEFAULT' | 'NO ACTION'; | ||
type ModelFieldBasics = { | ||
/** The kind of value that should be stored inside the field. */ | ||
type?: 'boolean' | 'date' | 'json'; | ||
/** The label that should be used when displaying the field on the RONIN dashboard. */ | ||
@@ -184,27 +187,30 @@ name?: string; | ||
check?: Expression; | ||
/** | ||
* If the field is of type `string`, setting this attribute defines the collation | ||
* sequence to use for the field value. | ||
*/ | ||
}; | ||
type ModelField = ModelFieldBasics | (Omit<ModelFieldBasics, 'type'> & { | ||
/** The kind of value that should be stored inside the field. */ | ||
type: 'string'; | ||
/** The collation sequence to use for the field value. */ | ||
collation?: ModelFieldCollation; | ||
}) | (Omit<ModelFieldBasics, 'type'> & { | ||
/** The kind of value that should be stored inside the field. */ | ||
type: 'number'; | ||
/** | ||
* If the field is of type `number`, setting this attribute will automatically increment | ||
* the value of the field with every new record that gets inserted. | ||
* Automatically increments the value of the field with every new inserted record. | ||
*/ | ||
increment?: boolean; | ||
}; | ||
type ModelFieldNormal = ModelFieldBasics & { | ||
type?: 'string' | 'number' | 'boolean' | 'date' | 'json'; | ||
}; | ||
type ModelFieldReferenceAction = 'CASCADE' | 'RESTRICT' | 'SET NULL' | 'SET DEFAULT' | 'NO ACTION'; | ||
type ModelFieldReference = ModelFieldBasics & { | ||
}) | (Omit<ModelFieldBasics, 'type'> & { | ||
/** The kind of value that should be stored inside the field. */ | ||
type: 'link'; | ||
/** The target model of the relationship that is being established. */ | ||
target: string; | ||
/** Whether the field should be related to one record, or many records. */ | ||
kind?: 'one' | 'many'; | ||
/** | ||
* If the target record is updated or deleted, the defined actions maybe executed. | ||
*/ | ||
actions?: { | ||
onDelete?: ModelFieldReferenceAction; | ||
onUpdate?: ModelFieldReferenceAction; | ||
onDelete?: ModelFieldLinkAction; | ||
onUpdate?: ModelFieldLinkAction; | ||
}; | ||
}; | ||
type ModelField = ModelFieldNormal | ModelFieldReference; | ||
}); | ||
type ModelIndexField<T extends Array<ModelField> = Array<ModelField>> = { | ||
@@ -211,0 +217,0 @@ /** The collating sequence used for text placed inside the field. */ |
{ | ||
"name": "@ronin/compiler", | ||
"version": "0.13.3", | ||
"version": "0.13.4-leo-ron-1071-experimental-295", | ||
"type": "module", | ||
@@ -30,5 +30,7 @@ "description": "Compiles RONIN queries to SQL statements.", | ||
"license": "Apache-2.0", | ||
"dependencies": { | ||
"@paralleldrive/cuid2": "2.2.2" | ||
}, | ||
"devDependencies": { | ||
"@biomejs/biome": "1.9.4", | ||
"@paralleldrive/cuid2": "2.2.2", | ||
"@ronin/engine": "0.0.27", | ||
@@ -35,0 +37,0 @@ "@types/bun": "1.1.14", |
Sorry, the diff of this file is too big to display
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6
1
102368
1
2310
+ Added@paralleldrive/cuid2@2.2.2
+ Added@noble/hashes@1.7.0(transitive)
+ Added@paralleldrive/cuid2@2.2.2(transitive)