Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@neoskop/adamant
Advanced tools
PouchDB ORM written in pure Typescript
adamant: too hard to cut, break, or pierce.
$ yarn add @neoskop/adamant
$ npm i @neoskop/adamant
Write you entities/interfaces at once
An entity requires an Entity and an Id annotation.
@Entity('person')
class PersonEntity {
@Id()
id!: string;
@Property()
name?: string;
}
Create/update/read from database
declare const connection : AdamantConnectionManager;
const repo = connection.getRepository(PersonEntity);
const person = repo.build({ id: '1', name: 'Jon Doe' });
await repo.create(person); // persist in database
person.name = 'Jane Doe';
await repo.update(person); // update database entry
await repo.upsert(person); // inserts/updates if needed
const personCopy = await repo.read('1'); // personCopy equals person
await repo.delete(personCopy); // marks database entry as deleted (_deleted = true)
Create and resolve relations
@Entity('class')
class ClassEntity {
@Id()
id!: string;
@HasMany(Person)
persons?: Person[];
}
const classRepo = connection.getRepository(ClassEntity);
const personRepo = connection.getRepository(PersonEntity);
const janeDoe = personRepo.build({ id: '1', name: 'Jane Doe' });
const jonDoe = personRepo.build({ id: '2', name: 'Jon Doe' });
await personRepo.bulk.create([ janeDoe, jonDoe ]); // persist multiple entities at once
const cls = classRepo.build({ id: '2a', persons: [ janeDoe, jonDoe ] });
await classRepo.create(cls); // relations will be replace with their id's
Angular Module
@NgModule({
imports: [
CommonModule,
AdamantModule.forRoot({
factory: …,
entities: […],
designDocs: […]
})
]
})
export class AppModule {}
$ yarn
$ yarn test
$ yarn run coverage
$ yarn build
MIT License
Copyright (c) 2018 Neoskop GmbH
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
PouchDB ORM
The npm package @neoskop/adamant receives a total of 41 weekly downloads. As such, @neoskop/adamant popularity was classified as not popular.
We found that @neoskop/adamant demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.