Gathering detailed insights and metrics for @suin/esa-exporter
Gathering detailed insights and metrics for @suin/esa-exporter
Gathering detailed insights and metrics for @suin/esa-exporter
Gathering detailed insights and metrics for @suin/esa-exporter
npm install @suin/esa-exporter
Typescript
Module System
Node Version
NPM Version
70.3
Supply Chain
95.2
Quality
74.9
Maintenance
50
Vulnerability
100
License
TypeScript (100%)
Total Downloads
414
Last Day
1
Last Week
3
Last Month
6
Last Year
98
1 Stars
4 Commits
3 Watching
1 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
@suin/esa-exporter@1.0.0
Unpacked Size
20.05 kB
Size
6.62 kB
File Count
9
NPM Version
6.14.11
Node Version
12.21.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
200%
3
Compared to previous week
Last month
50%
6
Compared to previous month
Last year
-3.9%
98
Compared to previous year
esa.io API から全データをエクスポートするライブラリ。
esa.io のエクスポート機能はマークダウンファイルがダウンロードできるだけで、他の情報が入ってこないためこれを開発しました。
1yarn add @suin/esa-exporter 2# or 3npm install @suin/esa-exporter
基本的な用法:
1import { exportAll, Entity } from "@suin/esa-exporter"; 2 3(async () => { 4 const team = process.env.ESA_TEAM; 5 const token = process.env.ESA_TOKEN; 6 const entities: Entity[] = []; 7 8 for await (const entity of exportAll({ team, token })) { 9 entities.push(entity); 10 } 11 12 console.log(entities); 13})();
出力例:
1[ 2 { 3 $type: "member", 4 myself: true, 5 name: "Taro Tanaka", 6 screen_name: "tanaka", 7 icon: 8 "https://img.esa.io/uploads/production/users/1/icon/thumb_m_********.png", 9 role: "owner", 10 posts_count: 222, 11 joined_at: "2014-07-01T08:10:55+09:00", 12 last_accessed_at: "2019-12-27T16:23:23+09:00", 13 email: "tanaka@example.com", 14 }, 15 { 16 $type: "member", 17 myself: false, 18 name: "Hanako Sato", 19 screen_name: "sato", 20 icon: 21 "https://img.esa.io/uploads/production/users/2/icon/thumb_m_********.jpg", 22 role: "owner", 23 posts_count: 111, 24 joined_at: "2014-07-01T08:19:26+09:00", 25 last_accessed_at: "2019-08-13T18:07:24+09:00", 26 email: "sato@example.com", 27 }, 28 { 29 $type: "post", 30 number: 1, 31 name: "esa APIの使い方", 32 full_name: "日報/2015/05/09/esa APIの使い方 #api #dev", 33 wip: true, 34 body_md: "...", 35 body_html: "...", 36 created_at: "2015-05-09T11:54:50+09:00", 37 message: "初稿です!", 38 url: "https://example.esa.io/posts/1", 39 updated_at: "2015-05-09T11:54:51+09:00", 40 tags: ["api", "dev"], 41 category: "日報/2015/05/09", 42 revision_number: 1, 43 created_by: { 44 myself: true, 45 name: "Taro Tanaka", 46 screen_name: "tanaka", 47 icon: 48 "https://img.esa.io/uploads/production/users/1/icon/thumb_m_********.png", 49 }, 50 updated_by: { 51 myself: true, 52 name: "Taro Tanaka", 53 screen_name: "tanaka", 54 icon: 55 "https://img.esa.io/uploads/production/users/1/icon/thumb_m_********.png", 56 }, 57 }, 58];
exportAll
は様々なエンティティをごちゃまぜで返してくるので、 エンティティ種別ごとに何らかの処理をする必要がある場合は、Entity[$type]
で分岐処理を書いてください:
1import { exportAll, Member, Post } from "@suin/esa-exporter"; 2 3(async () => { 4 const team = process.env.ESA_TEAM; 5 const token = process.env.ESA_TOKEN; 6 7 const members: Member[] = []; 8 const posts: Post[] = []; 9 10 for await (const entity of exportAll({ team, token })) { 11 switch (entity.$type) { 12 case "member": 13 members.push(entity); 14 break; 15 case "post": 16 posts.push(posts); 17 break; 18 } 19 } 20})();
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 0/4 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no SAST tool detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More