New:Socket for Asana Is Now Available.Learn more
Sign In

@aurorajs.dev/core-common

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurorajs.dev/core-common

Aurora npm core common package

latest
npmnpm
Version
2.0.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

@aurorajs.dev/core-common

Shared TypeScript library for the Aurora ecosystem. Provides SQL query abstractions (Sequelize-compatible) consumed by NestJS applications using GraphQL, Sequelize ORM and PostgreSQL.

  • Dual CJS/ESM output
  • Full TypeScript declarations
  • Zero runtime dependencies

Installation

npm install @aurorajs.dev/core-common

Usage

import {
  QueryStatement,
  Operator,
  IndexHints,
} from '@aurorajs.dev/core-common';

// Build a query statement
const queryStatement: QueryStatement = {
  where: {
    name: { [Operator.like]: '%aurora%' },
    age: { [Operator.gte]: 18 },
  },
  attributes: ['id', 'name', 'email'],
  order: [['name', 'ASC']],
  limit: 25,
  offset: 0,
};

API

QueryStatement

Sequelize-compatible query options class with the following properties:

PropertyTypeDescription
whereanyConditions to match rows
attributesanyColumns to select (supports renaming via arrays)
includeanyAssociations to eagerly load (left join)
orderanyColumn ordering ([['name', 'DESC']])
groupanyGROUP BY clause
limitnumberMax rows to return
offsetnumberRows to skip
lockanyRow-level locking
skipLockedbooleanSkip locked rows (Postgres only)
rawbooleanReturn raw result
havinganyFilter after GROUP BY
subQuerybooleanUse sub queries
indexHintsIndexHint[]Index hints for the query
distinctbooleanApply COUNT(DISTINCT(col))
colstringColumn to aggregate on

Operator

Enum mapping SQL operators for use in where clauses:

CategoryOperators
Concatenationand, or
Comparisoneq, ne, gt, gte, lt, lte
Patternlike, notLike, startsWith, endsWith, substring
Rangebetween, notBetween, in, notIn
Regexregexp, notRegexp
Postgres-specificiLike, notILike, iRegexp, notIRegexp, overlap, contains, contained, adjacent, strictLeft, strictRight, noExtendRight, noExtendLeft, any
Utilscol, join, not, is, all, values, placeholder

IndexHints

Enum for index hint types: USE, FORCE, IGNORE.

Types

ExportDescription
AnyUtility type alias (any)
IndexHintInterface with type: IndexHints and values: string[]
LiteralObjectRecord<string, unknown>

Development

# Install dependencies
pnpm install

# Build (CJS + ESM + .d.ts)
pnpm run build

# Watch mode
pnpm run start:dev

# Run tests
pnpm run test

# Lint
pnpm run lint

# Format
pnpm run format

License

MIT

FAQs

Package last updated on 16 Jun 2026

Related posts