chore: update .gitignore to include 'dist/' and modify TypeScript build configuration for ES2022; adjust type assertions in npm collector

This commit is contained in:
Luke Hagar
2025-08-14 21:38:30 -05:00
parent 66eb2c48ac
commit 4cb80c543a
5 changed files with 20 additions and 16 deletions

1
.gitignore vendored
View File

@@ -7,6 +7,7 @@ yarn-error.log*
# Build outputs
build/
*.tsbuildinfo
dist/
# Environment variables
.env

View File

@@ -1,7 +1,7 @@
<!-- METRICS_START -->
# Usage Statistics
Last updated: 8/14/2025, 9:11:29 PM
Last updated: 8/14/2025, 9:38:02 PM
Below are stats from artifacts tracked across NPM, GitHub, PyPI and PowerShell.

View File

@@ -50,7 +50,7 @@ async function fetchChunk(start: Date, end: Date, packageName: string): Promise<
if (!res.ok) {
throw new Error(`Failed to fetch data: ${res.status} ${res.statusText}`);
}
const json = await res.json();
const json = await res.json() as any;
return json.downloads;
}
@@ -80,7 +80,7 @@ export async function collectNpm(packageName: string): Promise<MetricResult> {
// Get package info from npm registry
const packageUrl = `https://registry.npmjs.org/${packageName}`;
const packageResponse = await fetch(packageUrl);
const packageData: NpmPackageInfo = await packageResponse.json();
const packageData: NpmPackageInfo = await packageResponse.json() as NpmPackageInfo;
// Get download statistics
let downloadsMonthly
@@ -91,7 +91,7 @@ export async function collectNpm(packageName: string): Promise<MetricResult> {
// Monthly downloads
const monthlyUrl = `https://api.npmjs.org/downloads/point/last-month/${packageName}`;
const monthlyResponse = await fetch(monthlyUrl);
const monthlyData: NpmDownloadStats = await monthlyResponse.json();
const monthlyData: NpmDownloadStats = await monthlyResponse.json() as NpmDownloadStats;
downloadsMonthly = monthlyData.downloads || null;
} catch (error) {
console.warn(`Could not fetch NPM monthly downloads for ${packageName}:`, error);
@@ -101,7 +101,7 @@ export async function collectNpm(packageName: string): Promise<MetricResult> {
// Weekly downloads
const weeklyUrl = `https://api.npmjs.org/downloads/point/last-week/${packageName}`;
const weeklyResponse = await fetch(weeklyUrl);
const weeklyData: NpmDownloadStats = await weeklyResponse.json();
const weeklyData: NpmDownloadStats = await weeklyResponse.json() as NpmDownloadStats;
downloadsWeekly = weeklyData.downloads || null;
} catch (error) {
console.warn(`Could not fetch NPM weekly downloads for ${packageName}:`, error);
@@ -111,7 +111,7 @@ export async function collectNpm(packageName: string): Promise<MetricResult> {
// Daily downloads
const dailyUrl = `https://api.npmjs.org/downloads/point/last-day/${packageName}`;
const dailyResponse = await fetch(dailyUrl);
const dailyData: NpmDownloadStats = await dailyResponse.json();
const dailyData: NpmDownloadStats = await dailyResponse.json() as NpmDownloadStats;
downloadsDaily = dailyData.downloads || null;
} catch (error) {
console.warn(`Could not fetch NPM daily downloads for ${packageName}:`, error);

View File

@@ -2,7 +2,7 @@
{
"platform": "NPM",
"name": "sailpoint-api-client",
"timestamp": "2025-08-15T02:11:27.288Z",
"timestamp": "2025-08-15T02:38:00.197Z",
"metrics": {
"downloadsTotal": 16740,
"downloadsMonthly": 1308,
@@ -3611,7 +3611,7 @@
{
"platform": "GitHub",
"name": "sailpoint-oss/sailpoint-cli",
"timestamp": "2025-08-15T02:11:29.099Z",
"timestamp": "2025-08-15T02:38:02.906Z",
"metrics": {
"stars": 35,
"forks": 24,
@@ -3796,7 +3796,7 @@
{
"platform": "PyPI",
"name": "sailpoint",
"timestamp": "2025-08-15T02:11:25.888Z",
"timestamp": "2025-08-15T02:38:00.079Z",
"metrics": {
"downloadsTotal": 21614,
"downloadsMonthly": 10108,
@@ -7443,7 +7443,7 @@
{
"platform": "PowerShell",
"name": "PSSailPoint",
"timestamp": "2025-08-15T02:11:28.449Z",
"timestamp": "2025-08-15T02:38:02.518Z",
"metrics": {
"downloadsTotal": 20447,
"downloadsRange": [
@@ -7623,7 +7623,7 @@
{
"platform": "PowerShell",
"name": "PSSailpoint.V3",
"timestamp": "2025-08-15T02:11:26.467Z",
"timestamp": "2025-08-15T02:38:00.476Z",
"metrics": {
"downloadsTotal": 11721,
"downloadsRange": [
@@ -7738,7 +7738,7 @@
{
"platform": "PowerShell",
"name": "PSSailpoint.Beta",
"timestamp": "2025-08-15T02:11:27.208Z",
"timestamp": "2025-08-15T02:38:01.195Z",
"metrics": {
"downloadsTotal": 12049,
"downloadsRange": [
@@ -7853,7 +7853,7 @@
{
"platform": "PowerShell",
"name": "PSSailpoint.V2024",
"timestamp": "2025-08-15T02:11:26.888Z",
"timestamp": "2025-08-15T02:38:00.920Z",
"metrics": {
"downloadsTotal": 11716,
"downloadsRange": [
@@ -7968,7 +7968,7 @@
{
"platform": "PowerShell",
"name": "PSSailpoint.V2025",
"timestamp": "2025-08-15T02:11:26.285Z",
"timestamp": "2025-08-15T02:38:00.288Z",
"metrics": {
"downloadsTotal": 1009,
"downloadsRange": [

View File

@@ -5,10 +5,13 @@
"outDir": "dist",
"declaration": false,
"sourceMap": false,
"module": "CommonJS",
"target": "ES2020",
"module": "ES2022",
"target": "ES2022",
"moduleResolution": "Node",
"allowImportingTsExtensions": false,
"verbatimModuleSyntax": false,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"lib": ["ES2020"],
"types": ["node"]
},