New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

pinia-orm

Package Overview
Dependencies
Maintainers
1
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pinia-orm - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

dist/Contracts-4af90274.d.ts

2

dist/casts.d.ts

@@ -1,2 +0,2 @@

import { U as CastAttribute, m as ModelFields } from './Data-aad5308e.js';
import { V as CastAttribute, m as ModelFields } from './Data-7a26480b.js';
import 'pinia';

@@ -3,0 +3,0 @@ import '@pinia-orm/normalizr';

'use strict';
const CastAttribute = require('./shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('./shared/pinia-orm.2155f08d.cjs');
class ArrayCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {

@@ -12,2 +15,5 @@ super(attributes);

}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -19,2 +25,5 @@ return JSON.stringify(value);

class StringCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {

@@ -26,2 +35,5 @@ super(attributes);

}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -33,2 +45,5 @@ return this.get(value);

class BooleanCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {

@@ -50,2 +65,5 @@ super(attributes);

}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -57,2 +75,5 @@ return this.get(value);

class NumberCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {

@@ -70,2 +91,5 @@ super(attributes);

}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -77,2 +101,5 @@ return this.get(value);

class DateCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {

@@ -84,2 +111,5 @@ super(attributes);

}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -86,0 +116,0 @@ if (value === null)

@@ -1,4 +0,3 @@

import { P as PropertyDecorator, T as TypeOptions } from './Contracts-560faa26.js';
export { P as PropertyDecorator, T as TypeOptions } from './Contracts-560faa26.js';
import { V as TypeDefault, M as Model, v as deleteModes, U as CastAttribute, a3 as Mutator } from './Data-aad5308e.js';
import { P as PropertyDecorator, T as TypeOptions } from './Contracts-4af90274.js';
import { X as TypeDefault, M as Model, P as PrimaryKey, v as deleteModes, V as CastAttribute, a4 as Mutator } from './Data-7a26480b.js';
import 'pinia';

@@ -35,3 +34,3 @@ import '@pinia-orm/normalizr';

*/
declare function HasOne(related: () => typeof Model, foreignKey: string, localKey?: string): PropertyDecorator;
declare function HasOne(related: () => typeof Model, foreignKey: PrimaryKey, localKey?: PrimaryKey): PropertyDecorator;

@@ -41,3 +40,3 @@ /**

*/
declare function BelongsTo(related: () => typeof Model, foreignKey: string, ownerKey?: string): PropertyDecorator;
declare function BelongsTo(related: () => typeof Model, foreignKey: PrimaryKey, ownerKey?: PrimaryKey): PropertyDecorator;

@@ -52,3 +51,3 @@ /**

*/
declare function HasMany(related: () => typeof Model, foreignKey: string, localKey?: string): PropertyDecorator;
declare function HasMany(related: () => typeof Model, foreignKey: PrimaryKey, localKey?: PrimaryKey): PropertyDecorator;

@@ -105,2 +104,2 @@ /**

export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, Mutate, NonEnumerable, Num, OnDelete, Str, Uid };
export { Attr, BelongsTo, BelongsToMany, Bool, Cast, HasMany, HasManyBy, HasManyThrough, HasOne, Hidden, MorphMany, MorphOne, MorphTo, Mutate, NonEnumerable, Num, OnDelete, PropertyDecorator, Str, TypeOptions, Uid };

@@ -1,2 +0,2 @@

import { M as Model, e as Collection } from './Data-aad5308e.js';
import { M as Model, e as Collection } from './Data-7a26480b.js';
import 'pinia';

@@ -3,0 +3,0 @@ import '@pinia-orm/normalizr';

@@ -1,3 +0,3 @@

import { M as Model, C as Constructor, E as Elements, D as Database, W as WeakCache, Q as Query, a as WherePrimaryClosure, b as WhereSecondaryClosure, c as EagerLoadConstraint, G as GroupByFields, O as OrderBy, d as OrderDirection, e as Collection, I as Item, f as Element } from './Data-aad5308e.js';
export { A as AfterHook, t as Attribute, B as BeforeHook, w as BelongsTo, x as BelongsToMany, i as CacheConfigOptions, U as CastAttribute, T as Casts, e as Collection, D as Database, u as Dictionary, a2 as EagerLoad, c as EagerLoadConstraint, f as Element, E as Elements, F as FilledInstallOptions, a0 as Group, a1 as GroupBy, G as GroupByFields, g as GroupedCollection, H as HasMany, z as HasManyBy, J as HasManyThrough, y as HasOne, s as InheritanceTypes, j as InstallOptions, Y as Interpreter, I as Item, r as MetaValues, M as Model, h as ModelConfigOptions, m as ModelFields, q as ModelOptions, o as ModelRegistries, p as ModelRegistry, n as ModelSchemas, K as MorphMany, P as MorphOne, L as MorphTo, N as NormalizedData, $ as Order, O as OrderBy, d as OrderDirection, Q as Query, R as Relation, l as Schema, S as Schemas, X as Type, V as TypeDefault, Z as Where, _ as WhereGroup, a as WherePrimaryClosure, b as WhereSecondaryClosure, k as createORM, v as deleteModes } from './Data-aad5308e.js';
import { M as Model, C as Constructor, E as Elements, D as Database, W as WeakCache, Q as Query, a as WherePrimaryClosure, b as WhereSecondaryClosure, c as EagerLoadConstraint, G as GroupByFields, O as OrderBy, d as OrderDirection, e as Collection, I as Item, f as Element } from './Data-7a26480b.js';
export { A as AfterHook, t as Attribute, B as BeforeHook, w as BelongsTo, x as BelongsToMany, i as CacheConfigOptions, V as CastAttribute, U as Casts, u as Dictionary, a3 as EagerLoad, F as FilledInstallOptions, a1 as Group, a2 as GroupBy, g as GroupedCollection, H as HasMany, z as HasManyBy, J as HasManyThrough, y as HasOne, s as InheritanceTypes, j as InstallOptions, Z as Interpreter, r as MetaValues, h as ModelConfigOptions, m as ModelFields, q as ModelOptions, o as ModelRegistries, p as ModelRegistry, n as ModelSchemas, K as MorphMany, T as MorphOne, L as MorphTo, N as NormalizedData, a0 as Order, P as PrimaryKey, R as Relation, l as Schema, S as Schemas, Y as Type, X as TypeDefault, _ as Where, $ as WhereGroup, k as createORM, v as deleteModes } from './Data-7a26480b.js';
import * as pinia from 'pinia';

@@ -53,3 +53,3 @@ import { DefineStoreOptionsBase, Pinia } from 'pinia';

*/
hydratedData: Map<string, M>;
hydratedDataCache: Map<string, M>;
/**

@@ -209,3 +209,3 @@ * The model object to be used for the custom repository.

*/
new(): M;
new(): M | null;
/**

@@ -258,2 +258,2 @@ * Insert the given records to the store.

export { DataStore, DataStoreState, MappedRepositories, ModelOrRepository, ModelsOrRepositories, Repository, mapRepos, useDataStore, useRepo, useStoreActions };
export { Collection, DataStore, DataStoreState, Database, EagerLoadConstraint, Element, Elements, GroupByFields, Item, MappedRepositories, Model, ModelOrRepository, ModelsOrRepositories, OrderBy, OrderDirection, Query, Repository, WherePrimaryClosure, WhereSecondaryClosure, mapRepos, useDataStore, useRepo, useStoreActions };

@@ -1,3 +0,3 @@

import { U as CastAttribute, m as ModelFields } from '../Data-aad5308e.js';
import { P as PropertyDecorator } from '../Contracts-560faa26.js';
import { V as CastAttribute, m as ModelFields } from '../Data-7a26480b.js';
import { P as PropertyDecorator } from '../Contracts-4af90274.js';
import 'pinia';

@@ -4,0 +4,0 @@ import '@pinia-orm/normalizr';

'use strict';
const async = require('nanoid/async');
const CastAttribute = require('../shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('../shared/pinia-orm.2155f08d.cjs');
class UidCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {
super(attributes);
}
/**
* Make the value for the attribute.
*/
async set(value) {

@@ -11,0 +17,0 @@ return value ?? await async.nanoid();

@@ -1,3 +0,3 @@

import { U as CastAttribute, m as ModelFields } from '../Data-aad5308e.js';
import { P as PropertyDecorator } from '../Contracts-560faa26.js';
import { V as CastAttribute, m as ModelFields } from '../Data-7a26480b.js';
import { P as PropertyDecorator } from '../Contracts-4af90274.js';
import 'pinia';

@@ -4,0 +4,0 @@ import '@pinia-orm/normalizr';

'use strict';
const nanoid = require('nanoid');
const CastAttribute = require('../shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('../shared/pinia-orm.2155f08d.cjs');
class UidCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {
super(attributes);
}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -11,0 +17,0 @@ return value ?? nanoid.nanoid();

@@ -1,3 +0,3 @@

import { U as CastAttribute, m as ModelFields } from '../Data-aad5308e.js';
import { P as PropertyDecorator } from '../Contracts-560faa26.js';
import { V as CastAttribute, m as ModelFields } from '../Data-7a26480b.js';
import { P as PropertyDecorator } from '../Contracts-4af90274.js';
import 'pinia';

@@ -4,0 +4,0 @@ import '@pinia-orm/normalizr';

'use strict';
const nonSecure = require('nanoid/non-secure');
const CastAttribute = require('../shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('../shared/pinia-orm.2155f08d.cjs');
class UidCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {
super(attributes);
}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -11,0 +17,0 @@ return value ?? nonSecure.nanoid();

@@ -1,3 +0,3 @@

import { U as CastAttribute, m as ModelFields } from '../Data-aad5308e.js';
import { P as PropertyDecorator } from '../Contracts-560faa26.js';
import { V as CastAttribute, m as ModelFields } from '../Data-7a26480b.js';
import { P as PropertyDecorator } from '../Contracts-4af90274.js';
import 'pinia';

@@ -4,0 +4,0 @@ import '@pinia-orm/normalizr';

'use strict';
const uuid = require('uuid');
const CastAttribute = require('../shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('../shared/pinia-orm.2155f08d.cjs');
class UidCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {
super(attributes);
}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -11,0 +17,0 @@ return value ?? uuid.v1();

@@ -1,3 +0,3 @@

import { U as CastAttribute, m as ModelFields } from '../Data-aad5308e.js';
import { P as PropertyDecorator } from '../Contracts-560faa26.js';
import { V as CastAttribute, m as ModelFields } from '../Data-7a26480b.js';
import { P as PropertyDecorator } from '../Contracts-4af90274.js';
import 'pinia';

@@ -4,0 +4,0 @@ import '@pinia-orm/normalizr';

'use strict';
const uuid = require('uuid');
const CastAttribute = require('../shared/pinia-orm.30e59d59.cjs');
const CastAttribute = require('../shared/pinia-orm.2155f08d.cjs');
class UidCast extends CastAttribute.CastAttribute {
/**
* Create a new String attribute instance.
*/
constructor(attributes) {
super(attributes);
}
/**
* Make the value for the attribute.
*/
set(value) {

@@ -11,0 +17,0 @@ return value ?? uuid.v4();

{
"name": "pinia-orm",
"version": "1.4.0",
"version": "1.5.0",
"description": "The Pinia plugin to enable Object-Relational Mapping access to the Pinia Store.",

@@ -47,33 +47,33 @@ "keywords": [

"peerDependencies": {
"pinia": "^2.0.28"
"pinia": "^2.0.29"
},
"dependencies": {
"@pinia-orm/normalizr": ">=1.0.6"
"@pinia-orm/normalizr": ">=1.1.0"
},
"devDependencies": {
"@antfu/eslint-config": "^0.34.0",
"@antfu/eslint-config": "^0.34.1",
"@pinia/testing": "^0.0.14",
"@size-limit/preset-small-lib": "^8.1.0",
"@size-limit/preset-small-lib": "^8.1.2",
"@types/prettier": "^2",
"@types/uuid": "^9.0.0",
"@vitest/coverage-c8": "^0.26.2",
"@vitest/ui": "^0.26.2",
"@vitest/coverage-c8": "^0.28.1",
"@vitest/ui": "^0.28.1",
"@vue/composition-api": "^1.7.1",
"@vue/test-utils": "^2.2.6",
"@vue/test-utils": "^2.2.7",
"c8": "^7.12.0",
"core-js": "^3.26.1",
"eslint": "^8.30.0",
"happy-dom": "^8.1.1",
"mkdist": "^1.0.0",
"core-js": "^3.27.2",
"eslint": "^8.32.0",
"happy-dom": "^8.1.5",
"mkdist": "^1.1.0",
"nanoid": "^4.0.0",
"pinia": "^2.0.28",
"prettier": "^2.8.1",
"size-limit": "^8.1.0",
"pinia": "^2.0.29",
"prettier": "^2.8.3",
"size-limit": "^8.1.2",
"std-env": "^3.3.1",
"tsup": "^6.5.0",
"typescript": "^4.9.4",
"unbuild": "^1.0.2",
"unbuild": "^1.1.1",
"uuid": "^9.0.0",
"vite": "^4.0.3",
"vitest": "^0.26.2",
"vite": "^4.0.4",
"vitest": "^0.28.1",
"vue": "^3.2.45",

@@ -102,3 +102,3 @@ "vue-demi": "^0.13.11",

"volta": {
"node": "18.12.1"
"node": "18.13.0"
},

@@ -105,0 +105,0 @@ "repository": {

@@ -1,13 +0,3 @@

<p align="center">
<a href="https://github.com/storm-tail/pinia-orm" target="_blank" rel="noopener noreferrer">
<img width="120" src="https://pinia-orm.codedredd.de/logo_pinia_orm.png" alt="Pinia ORM logo">
</a>
</p>
[![Pinia ORM banner](./.github/assets/banner.png)](https://github.com/storm-tail/pinia-orm)
<p align="center">
<i>Artwork from <a href="https://pinia.vuejs.org/">Pinia</a></i>
</p>
<h1 align="center">pinia-orm</h1>
[![npm version][npm-version-src]][npm-version-href]

@@ -19,2 +9,4 @@ [![npm downloads][npm-downloads-src]][npm-downloads-href]

# Welcome to pinia-orm
> Intuitive, type safe and flexible ORM for Pinia based on [Vuex ORM Next](https://github.com/vuex-orm/vuex-orm-next)

@@ -21,0 +13,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc