
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@calenderjs/event-model
Advanced tools
Event Data Model - Single Source of Truth (SSOT) for Event data structures
Event Data Model - Single Source of Truth (SSOT) for Event data structures.
此包提供 Event 数据模型的类型定义和 JSON Schema 验证,作为所有其他包的单一数据源(SSOT)。
@calenderjs/event-model 包有两个核心职责:
定义数据模型和 JSON Schema
Event.ts)validator.ts 中的 EVENT_BASE_SCHEMA)types.ts)使用 JSON Schema 验证数据
validator.ts 和 validators/EventValidator.ts)@calenderjs/event-model (SSOT)
↑ ↑
│ │
@calenderjs/calendar @calenderjs/event-dsl
import { Event, EventMetadata } from '@calenderjs/event-model';
const event: Event = {
id: "event-1",
type: "meeting",
title: "团队会议",
startTime: new Date("2025-01-15T10:00:00"),
endTime: new Date("2025-01-15T11:00:00"),
data: {
attendees: ["user1@example.com"],
location: "会议室 A"
}
};
import { EVENT_BASE_SCHEMA } from '@calenderjs/event-model';
// EVENT_BASE_SCHEMA 定义了 Event 接口的 JSON Schema
// 用于验证 Event 对象的基本结构
console.log(EVENT_BASE_SCHEMA);
import { EventValidator, EVENT_BASE_SCHEMA } from '@calenderjs/event-model';
import type { Event } from '@calenderjs/event-model';
const validator = new EventValidator();
// 验证 Event 对象是否符合 Event Data Model
const event: Event = {
id: "event-1",
type: "meeting",
title: "团队会议",
startTime: new Date("2025-01-15T10:00:00"),
endTime: new Date("2025-01-15T11:00:00"),
data: {}
};
const result = validator.validateBase(event);
if (!result.valid) {
console.error('验证失败:', result.errors);
}
import type { Event } from '@calenderjs/event-model';
export class Calendar {
private events: Event[] = [];
addEvent(event: Event) {
this.events.push(event);
}
}
import type { Event } from '@calenderjs/event-model';
export class EventRuntime {
validate(event: Event): ValidationResult {
// 验证逻辑
}
}
FAQs
Event Data Model - Single Source of Truth (SSOT) for Event data structures
We found that @calenderjs/event-model 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.
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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.