
Security News
upm Launches as a Fast, Tiny Package Manager Written in TypeScript
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.
@galaxy-stack/orbit-common
Advanced tools
Part of the Orbit framework — a NestJS-style backend framework for Bun.
bun add @galaxy-stack/orbit-common
Package chứa các decorators, pipes, guards, interceptors và exceptions dùng chung trong Orbit framework.
import {
Controller,
Get, Post, Put, Patch, Delete,
Body, Query, Param, Headers, Req, Res
} from '@galaxy-stack/orbit-common';
@Controller('api')
class ApiController {
@Get('items')
getItems(@Query('page') page: string) {}
@Post('items')
createItem(@Body() data: any) {}
}
ParseIntPipe: Chuyển string thành numberParseFloatPipe: Chuyển string thành floatParseBoolPipe: Chuyển string thành booleanParseArrayPipe: Chuyển string thành arrayDefaultValuePipe: Giá trị mặc địnhTrimPipe: Xóa khoảng trắng@Get(':id')
getUser(@Param('id', ParseIntPipe) id: number) {
// id đã được convert sang number
}
import {
BadRequestException,
UnauthorizedException,
ForbiddenException,
NotFoundException,
ConflictException,
InternalServerErrorException,
} from '@galaxy-stack/orbit-common';
throw new NotFoundException('User not found');
import { CanActivate, ExecutionContext } from '@galaxy-stack/orbit-common';
class AuthGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean {
const request = context.switchToHttp().getRequest();
return !!request.headers.authorization;
}
}
import { Interceptor, ExecutionContext } from '@galaxy-stack/orbit-common';
class LoggingInterceptor implements Interceptor {
async intercept(context: ExecutionContext, next: () => Promise<any>) {
console.log('Before...');
const result = await next();
console.log('After...');
return result;
}
}
import {
Controller, Get, UseGuards, UsePipes,
ParseIntPipe, AuthGuard
} from '@galaxy-stack/orbit-common';
@Controller('users')
@UseGuards(AuthGuard)
class UserController {
@Get(':id')
@UsePipes(ParseIntPipe)
getUser(@Param('id') id: number) {
return { id };
}
}
FAQs
Common decorators, pipes, guards, interceptors for Orbit
The npm package @galaxy-stack/orbit-common receives a total of 4,842 weekly downloads. As such, @galaxy-stack/orbit-common popularity was classified as popular.
We found that @galaxy-stack/orbit-common demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
upm uses Node.js to deliver fast npm installs in about 250 KB, with a JavaScript API and security defaults.

Company News
Socket is joining the OpenJS Security Stewardship Program to fund Node.js vulnerability research, maintainer remediation, and security releases.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.