Comparing version 1.2.1 to 1.2.2
@@ -1,2 +0,2 @@ | ||
import { X as CastAttribute, o as ModelFields } from './Data-20947668.js'; | ||
import { X as CastAttribute, o as ModelFields } from './Data-ca039808.js'; | ||
import 'pinia'; | ||
@@ -59,9 +59,9 @@ import '@/composables'; | ||
constructor(attributes: ModelFields); | ||
get(value?: any): Date; | ||
get(value: string | null): Date | null; | ||
/** | ||
* Make the value for the attribute. | ||
*/ | ||
set(value: string | Date): string; | ||
set(value: string | Date | null): string | null; | ||
} | ||
export { ArrayCast, BooleanCast, DateCast, NumberCast, StringCast }; |
@@ -74,5 +74,7 @@ 'use strict'; | ||
get(value) { | ||
return new Date(value); | ||
return value === null ? null : new Date(value); | ||
} | ||
set(value) { | ||
if (value === null) | ||
return null; | ||
return (typeof value === "string" ? new Date(Date.parse(value)) : value).toISOString(); | ||
@@ -79,0 +81,0 @@ } |
@@ -1,4 +0,4 @@ | ||
import { P as PropertyDecorator, T as TypeOptions } from './Contracts-dffe036f.js'; | ||
export { P as PropertyDecorator, T as TypeOptions } from './Contracts-dffe036f.js'; | ||
import { Y as TypeDefault, M as Model, y as deleteModes, X as CastAttribute, a5 as Mutator } from './Data-20947668.js'; | ||
import { P as PropertyDecorator, T as TypeOptions } from './Contracts-927eedb4.js'; | ||
export { P as PropertyDecorator, T as TypeOptions } from './Contracts-927eedb4.js'; | ||
import { Y as TypeDefault, M as Model, y as deleteModes, X as CastAttribute, a5 as Mutator } from './Data-ca039808.js'; | ||
import 'pinia'; | ||
@@ -5,0 +5,0 @@ import '@/composables'; |
@@ -1,2 +0,2 @@ | ||
import { M as Model, f as Collection } from './Data-20947668.js'; | ||
import { M as Model, f as Collection } from './Data-ca039808.js'; | ||
import 'pinia'; | ||
@@ -3,0 +3,0 @@ import '@/composables'; |
@@ -1,3 +0,3 @@ | ||
import { M as Model, C as Constructor, D as Database, W as WeakCache, a as DataStoreState, E as Elements, Q as Query, b as WherePrimaryClosure, c as WhereSecondaryClosure, d as EagerLoadConstraint, G as GroupByFields, O as OrderBy, e as OrderDirection, f as Collection, I as Item, g as Element, h as DataStore } from './Data-20947668.js'; | ||
export { A as AfterHook, w as Attribute, B as BeforeHook, z as BelongsTo, H as BelongsToMany, k as CacheConfigOptions, X as CastAttribute, V as Casts, f as Collection, h as DataStore, a as DataStoreState, D as Database, x as Dictionary, a4 as EagerLoad, d as EagerLoadConstraint, g as Element, E as Elements, F as FilledInstallOptions, a2 as Group, a3 as GroupBy, G as GroupByFields, i as GroupedCollection, J as HasMany, L as HasManyBy, K as HasOne, v as InheritanceTypes, l as InstallOptions, _ as Interpreter, I as Item, t as MetaValues, M as Model, j as ModelConfigOptions, o as ModelFields, s as ModelOptions, q as ModelRegistries, r as ModelRegistry, p as ModelSchemas, P as MorphMany, U as MorphOne, T as MorphTo, N as NormalizedData, a1 as Order, O as OrderBy, e as OrderDirection, Q as Query, R as Relation, n as Schema, S as Schemas, Z as Type, Y as TypeDefault, $ as Where, a0 as WhereGroup, b as WherePrimaryClosure, c as WhereSecondaryClosure, m as createORM, y as deleteModes, u as useDataStore } from './Data-20947668.js'; | ||
import { M as Model, C as Constructor, D as Database, W as WeakCache, a as DataStoreState, E as Elements, Q as Query, b as WherePrimaryClosure, c as WhereSecondaryClosure, d as EagerLoadConstraint, G as GroupByFields, O as OrderBy, e as OrderDirection, f as Collection, I as Item, g as Element, h as DataStore } from './Data-ca039808.js'; | ||
export { A as AfterHook, w as Attribute, B as BeforeHook, z as BelongsTo, H as BelongsToMany, k as CacheConfigOptions, X as CastAttribute, V as Casts, f as Collection, h as DataStore, a as DataStoreState, D as Database, x as Dictionary, a4 as EagerLoad, d as EagerLoadConstraint, g as Element, E as Elements, F as FilledInstallOptions, a2 as Group, a3 as GroupBy, G as GroupByFields, i as GroupedCollection, J as HasMany, L as HasManyBy, K as HasOne, v as InheritanceTypes, l as InstallOptions, _ as Interpreter, I as Item, t as MetaValues, M as Model, j as ModelConfigOptions, o as ModelFields, s as ModelOptions, q as ModelRegistries, r as ModelRegistry, p as ModelSchemas, P as MorphMany, U as MorphOne, T as MorphTo, N as NormalizedData, a1 as Order, O as OrderBy, e as OrderDirection, Q as Query, R as Relation, n as Schema, S as Schemas, Z as Type, Y as TypeDefault, $ as Where, a0 as WhereGroup, b as WherePrimaryClosure, c as WhereSecondaryClosure, m as createORM, y as deleteModes, u as useDataStore } from './Data-ca039808.js'; | ||
import * as pinia from 'pinia'; | ||
@@ -4,0 +4,0 @@ import { Pinia } from 'pinia'; |
@@ -1,3 +0,3 @@ | ||
import { X as CastAttribute, o as ModelFields } from '../Data-20947668.js'; | ||
import { P as PropertyDecorator } from '../Contracts-dffe036f.js'; | ||
import { X as CastAttribute, o as ModelFields } from '../Data-ca039808.js'; | ||
import { P as PropertyDecorator } from '../Contracts-927eedb4.js'; | ||
import 'pinia'; | ||
@@ -4,0 +4,0 @@ import '@/composables'; |
@@ -1,3 +0,3 @@ | ||
import { X as CastAttribute, o as ModelFields } from '../Data-20947668.js'; | ||
import { P as PropertyDecorator } from '../Contracts-dffe036f.js'; | ||
import { X as CastAttribute, o as ModelFields } from '../Data-ca039808.js'; | ||
import { P as PropertyDecorator } from '../Contracts-927eedb4.js'; | ||
import 'pinia'; | ||
@@ -4,0 +4,0 @@ import '@/composables'; |
@@ -1,3 +0,3 @@ | ||
import { X as CastAttribute, o as ModelFields } from '../Data-20947668.js'; | ||
import { P as PropertyDecorator } from '../Contracts-dffe036f.js'; | ||
import { X as CastAttribute, o as ModelFields } from '../Data-ca039808.js'; | ||
import { P as PropertyDecorator } from '../Contracts-927eedb4.js'; | ||
import 'pinia'; | ||
@@ -4,0 +4,0 @@ import '@/composables'; |
@@ -1,3 +0,3 @@ | ||
import { X as CastAttribute, o as ModelFields } from '../Data-20947668.js'; | ||
import { P as PropertyDecorator } from '../Contracts-dffe036f.js'; | ||
import { X as CastAttribute, o as ModelFields } from '../Data-ca039808.js'; | ||
import { P as PropertyDecorator } from '../Contracts-927eedb4.js'; | ||
import 'pinia'; | ||
@@ -4,0 +4,0 @@ import '@/composables'; |
@@ -1,3 +0,3 @@ | ||
import { X as CastAttribute, o as ModelFields } from '../Data-20947668.js'; | ||
import { P as PropertyDecorator } from '../Contracts-dffe036f.js'; | ||
import { X as CastAttribute, o as ModelFields } from '../Data-ca039808.js'; | ||
import { P as PropertyDecorator } from '../Contracts-927eedb4.js'; | ||
import 'pinia'; | ||
@@ -4,0 +4,0 @@ import '@/composables'; |
{ | ||
"name": "pinia-orm", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.", | ||
@@ -53,3 +53,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@antfu/eslint-config": "^0.29.4", | ||
"@antfu/eslint-config": "^0.30.1", | ||
"@size-limit/preset-small-lib": "^8.1.0", | ||
@@ -62,5 +62,5 @@ "@types/prettier": "^2", | ||
"c8": "^7.12.0", | ||
"core-js": "^3.26.0", | ||
"core-js": "^3.26.1", | ||
"eslint": "^8.27.0", | ||
"happy-dom": "^7.6.7", | ||
"happy-dom": "^7.7.0", | ||
"mkdist": "^0.4.0", | ||
@@ -78,3 +78,3 @@ "nanoid": "^4.0.0", | ||
"vitest": "^0.25.1", | ||
"vue": "^3.2.44", | ||
"vue": "^3.2.45", | ||
"vue-demi": "^0.13.11", | ||
@@ -81,0 +81,0 @@ "vue2": "npm:vue@^2.7.3" |
Sorry, the diff of this file is not supported yet
211264
6737