final commit v1
This commit is contained in:
parent
7ed44ac60e
commit
464245d435
473
dist/assets/index-BailLCJ0.js
vendored
473
dist/assets/index-BailLCJ0.js
vendored
File diff suppressed because one or more lines are too long
1
dist/assets/index-CW56MEbw.css
vendored
Normal file
1
dist/assets/index-CW56MEbw.css
vendored
Normal file
File diff suppressed because one or more lines are too long
516
dist/assets/index-DMWoNld2.js
vendored
Normal file
516
dist/assets/index-DMWoNld2.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
dist/assets/index-HYQ6lVkA.css
vendored
1
dist/assets/index-HYQ6lVkA.css
vendored
File diff suppressed because one or more lines are too long
4
dist/index.html
vendored
4
dist/index.html
vendored
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>💕 Our Musical Journey</title>
|
||||
<meta name="description" content="A private musical journey for two hearts connected through music" />
|
||||
<script type="module" crossorigin src="/assets/index-BailLCJ0.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-HYQ6lVkA.css">
|
||||
<script type="module" crossorigin src="/assets/index-DMWoNld2.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-CW56MEbw.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
|
|
|||
344
server/dist/routes/users.js
vendored
344
server/dist/routes/users.js
vendored
|
|
@ -4,6 +4,90 @@ import axios from 'axios';
|
|||
import { requireAuth } from '../middleware/auth.js';
|
||||
import { syncUserData } from '../lib/sync.js';
|
||||
import { ensureValidAccessToken } from '../lib/spotify.js';
|
||||
// Helper functions for unique categories
|
||||
function calculateLongestSession(tracks) {
|
||||
if (tracks.length === 0)
|
||||
return { duration: 0, startTime: 0, endTime: 0 };
|
||||
const sortedTracks = tracks.sort((a, b) => a.played_at - b.played_at);
|
||||
let longestSession = { duration: 0, startTime: 0, endTime: 0 };
|
||||
let currentSession = { startTime: sortedTracks[0]?.played_at || 0, endTime: sortedTracks[0]?.played_at || 0 };
|
||||
for (let i = 1; i < sortedTracks.length; i++) {
|
||||
const timeDiff = sortedTracks[i].played_at - sortedTracks[i - 1].played_at;
|
||||
if (timeDiff <= 30 * 60 * 1000) { // 30 minutes gap
|
||||
currentSession.endTime = sortedTracks[i].played_at;
|
||||
}
|
||||
else {
|
||||
const sessionDuration = currentSession.endTime - currentSession.startTime;
|
||||
if (sessionDuration > longestSession.duration) {
|
||||
longestSession = { ...currentSession, duration: sessionDuration };
|
||||
}
|
||||
currentSession = { startTime: sortedTracks[i].played_at, endTime: sortedTracks[i].played_at };
|
||||
}
|
||||
}
|
||||
// Check the final session
|
||||
const finalSessionDuration = currentSession.endTime - currentSession.startTime;
|
||||
if (finalSessionDuration > longestSession.duration) {
|
||||
longestSession = { ...currentSession, duration: finalSessionDuration };
|
||||
}
|
||||
// If no session is longer than 0, use the first track as a 1-minute session
|
||||
if (longestSession.duration === 0 && tracks.length > 0) {
|
||||
const firstTrack = sortedTracks[0];
|
||||
longestSession = {
|
||||
startTime: firstTrack.played_at,
|
||||
endTime: firstTrack.played_at + 60000, // 1 minute
|
||||
duration: 60000
|
||||
};
|
||||
}
|
||||
return longestSession;
|
||||
}
|
||||
function calculateMostDiverseDay(tracks) {
|
||||
const dayGroups = tracks.reduce((acc, track) => {
|
||||
const date = new Date(track.played_at).toDateString();
|
||||
if (!acc[date])
|
||||
acc[date] = new Set();
|
||||
track.artists?.forEach((artist) => acc[date].add(artist.id));
|
||||
return acc;
|
||||
}, {});
|
||||
let mostDiverse = { date: '', artistCount: 0 };
|
||||
Object.entries(dayGroups).forEach(([date, artists]) => {
|
||||
if (artists.size > mostDiverse.artistCount) {
|
||||
mostDiverse = { date, artistCount: artists.size };
|
||||
}
|
||||
});
|
||||
return mostDiverse;
|
||||
}
|
||||
function getMostActiveMonth(tracks) {
|
||||
const monthGroups = tracks.reduce((acc, track) => {
|
||||
const date = new Date(track.played_at);
|
||||
const monthKey = `${date.getFullYear()}-${date.getMonth() + 1}`;
|
||||
acc[monthKey] = (acc[monthKey] || 0) + 1;
|
||||
return acc;
|
||||
}, {});
|
||||
let mostActive = { month: '', count: 0 };
|
||||
Object.entries(monthGroups).forEach(([month, count]) => {
|
||||
if (count > mostActive.count) {
|
||||
mostActive = { month, count: count };
|
||||
}
|
||||
});
|
||||
return mostActive;
|
||||
}
|
||||
function calculateListeningVelocity(tracks, timeRange) {
|
||||
if (tracks.length === 0)
|
||||
return 0;
|
||||
let daysInRange = 1;
|
||||
if (timeRange === 'year')
|
||||
daysInRange = 365;
|
||||
else if (timeRange === 'month')
|
||||
daysInRange = 30;
|
||||
else if (timeRange === 'week')
|
||||
daysInRange = 7;
|
||||
else {
|
||||
const firstTrack = Math.min(...tracks.map(t => t.played_at));
|
||||
const lastTrack = Math.max(...tracks.map(t => t.played_at));
|
||||
daysInRange = Math.max(1, (lastTrack - firstTrack) / (1000 * 60 * 60 * 24));
|
||||
}
|
||||
return tracks.length / daysInRange;
|
||||
}
|
||||
export const usersRouter = Router();
|
||||
// Fetch and store user data (recently played, top tracks/artists)
|
||||
usersRouter.post('/:uid/sync', requireAuth, async (req, res) => {
|
||||
|
|
@ -126,3 +210,263 @@ usersRouter.get('/:uid/audio-features', requireAuth, async (req, res) => {
|
|||
res.status(500).json({ error: 'Failed to fetch audio features', detail: e?.response?.data || e?.message });
|
||||
}
|
||||
});
|
||||
// Wrapped feature - generate personalized music statistics
|
||||
usersRouter.get('/:uid/wrapped', requireAuth, async (req, res) => {
|
||||
try {
|
||||
const { uid } = req.params;
|
||||
if (!req.user)
|
||||
return res.status(403).json({ error: 'Forbidden' });
|
||||
if (req.user.uid !== uid) {
|
||||
const paired = db.db.prepare('SELECT 1 FROM friendships WHERE (user_a_id=? AND user_b_id=?) OR (user_a_id=? AND user_b_id=?)').get(req.user.uid, uid, uid, req.user.uid);
|
||||
if (!paired)
|
||||
return res.status(403).json({ error: 'Forbidden' });
|
||||
}
|
||||
// Get time range from query (default to all time)
|
||||
const timeRange = req.query.range || 'all';
|
||||
let timeFilter = '';
|
||||
let timeParams = [uid];
|
||||
if (timeRange === 'year') {
|
||||
const oneYearAgo = Date.now() - (365 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneYearAgo);
|
||||
}
|
||||
else if (timeRange === 'month') {
|
||||
const oneMonthAgo = Date.now() - (30 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneMonthAgo);
|
||||
}
|
||||
else if (timeRange === 'week') {
|
||||
const oneWeekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneWeekAgo);
|
||||
}
|
||||
// Get all played tracks for analysis
|
||||
const playedTracks = db.db.prepare(`
|
||||
SELECT played_at, track_json
|
||||
FROM recently_played
|
||||
WHERE user_id = ? ${timeFilter}
|
||||
ORDER BY played_at DESC
|
||||
`).all(...timeParams);
|
||||
if (playedTracks.length === 0) {
|
||||
return res.json({
|
||||
totalTracks: 0,
|
||||
totalListeningTime: 0,
|
||||
topSongs: [],
|
||||
topArtists: [],
|
||||
topGenres: [],
|
||||
listeningPatterns: {
|
||||
mostActiveHour: 0,
|
||||
mostActiveDay: 'Monday',
|
||||
listeningStreak: 0
|
||||
},
|
||||
timeRange,
|
||||
generatedAt: Date.now()
|
||||
});
|
||||
}
|
||||
// Parse tracks and calculate statistics
|
||||
const tracks = playedTracks.map(row => {
|
||||
const track = JSON.parse(row.track_json);
|
||||
return {
|
||||
...track,
|
||||
played_at: row.played_at,
|
||||
duration_ms: track.duration_ms || 0
|
||||
};
|
||||
});
|
||||
// Calculate total listening time
|
||||
const totalListeningTime = tracks.reduce((sum, track) => sum + (track.duration_ms || 0), 0);
|
||||
// Top songs (by play count)
|
||||
const songCounts = new Map();
|
||||
tracks.forEach(track => {
|
||||
const key = track.id;
|
||||
if (songCounts.has(key)) {
|
||||
const existing = songCounts.get(key);
|
||||
existing.count++;
|
||||
existing.totalDuration += track.duration_ms || 0;
|
||||
}
|
||||
else {
|
||||
songCounts.set(key, { track, count: 1, totalDuration: track.duration_ms || 0 });
|
||||
}
|
||||
});
|
||||
const topSongs = Array.from(songCounts.values())
|
||||
.sort((a, b) => b.count - a.count)
|
||||
.slice(0, 10)
|
||||
.map(item => ({
|
||||
...item.track,
|
||||
playCount: item.count,
|
||||
totalDuration: item.totalDuration
|
||||
}));
|
||||
// Top artists (by play count)
|
||||
const artistCounts = new Map();
|
||||
tracks.forEach(track => {
|
||||
track.artists?.forEach((artist) => {
|
||||
const key = artist.id;
|
||||
if (artistCounts.has(key)) {
|
||||
const existing = artistCounts.get(key);
|
||||
existing.count++;
|
||||
existing.totalDuration += track.duration_ms || 0;
|
||||
}
|
||||
else {
|
||||
artistCounts.set(key, { artist, count: 1, totalDuration: track.duration_ms || 0 });
|
||||
}
|
||||
});
|
||||
});
|
||||
const topArtists = Array.from(artistCounts.values())
|
||||
.sort((a, b) => b.count - a.count)
|
||||
.slice(0, 10)
|
||||
.map(item => ({
|
||||
...item.artist,
|
||||
playCount: item.count,
|
||||
totalDuration: item.totalDuration
|
||||
}));
|
||||
// Top genres (extract from track data if available)
|
||||
const genreCounts = new Map();
|
||||
tracks.forEach(track => {
|
||||
// Try to extract genres from track data
|
||||
if (track.album?.genres) {
|
||||
track.album.genres.forEach((genre) => {
|
||||
genreCounts.set(genre, (genreCounts.get(genre) || 0) + 1);
|
||||
});
|
||||
}
|
||||
});
|
||||
const topGenres = Array.from(genreCounts.entries())
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.slice(0, 10)
|
||||
.map(([genre, count]) => ({ genre, count }));
|
||||
// Listening patterns
|
||||
const hours = new Array(24).fill(0);
|
||||
const days = new Array(7).fill(0);
|
||||
const dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
tracks.forEach(track => {
|
||||
const date = new Date(track.played_at);
|
||||
hours[date.getHours()]++;
|
||||
days[date.getDay()]++;
|
||||
});
|
||||
const mostActiveHour = hours.indexOf(Math.max(...hours));
|
||||
const mostActiveDay = dayNames[days.indexOf(Math.max(...days))];
|
||||
// Calculate listening streak (consecutive days with at least one play)
|
||||
const playDates = new Set(tracks.map(track => new Date(track.played_at).toDateString()));
|
||||
const sortedDates = Array.from(playDates).sort().reverse();
|
||||
let streak = 0;
|
||||
let currentDate = new Date();
|
||||
let lastPlayDate = null;
|
||||
for (let i = 0; i < sortedDates.length; i++) {
|
||||
const playDate = new Date(sortedDates[i]);
|
||||
const daysDiff = lastPlayDate ?
|
||||
Math.floor((lastPlayDate.getTime() - playDate.getTime()) / (1000 * 60 * 60 * 24)) :
|
||||
Math.floor((currentDate.getTime() - playDate.getTime()) / (1000 * 60 * 60 * 24));
|
||||
if (daysDiff === 1 || (i === 0 && daysDiff <= 1)) {
|
||||
streak++;
|
||||
lastPlayDate = playDate;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Get partner data if available
|
||||
let partnerData = null;
|
||||
try {
|
||||
const partner = db.db.prepare('SELECT user_b_id FROM friendships WHERE user_a_id = ? UNION SELECT user_a_id FROM friendships WHERE user_b_id = ?').get(uid, uid);
|
||||
if (partner?.user_b_id) {
|
||||
const partnerTracks = db.db.prepare(`
|
||||
SELECT played_at, track_json
|
||||
FROM recently_played
|
||||
WHERE user_id = ? ${timeFilter}
|
||||
ORDER BY played_at DESC
|
||||
`).all(...timeParams.slice(0, -1), partner.user_b_id, ...timeParams.slice(-1));
|
||||
if (partnerTracks.length > 0) {
|
||||
const partnerTracksParsed = partnerTracks.map(row => {
|
||||
const track = JSON.parse(row.track_json);
|
||||
return { ...track, played_at: row.played_at, duration_ms: track.duration_ms || 0 };
|
||||
});
|
||||
partnerData = {
|
||||
totalTracks: partnerTracksParsed.length,
|
||||
totalListeningTime: partnerTracksParsed.reduce((sum, track) => sum + (track.duration_ms || 0), 0),
|
||||
topSongs: partnerTracksParsed.slice(0, 5),
|
||||
topArtists: partnerTracksParsed.slice(0, 5).map(track => track.artists?.[0]).filter(Boolean)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
// Partner data not available
|
||||
}
|
||||
// Calculate additional unique categories
|
||||
const uniqueCategories = {
|
||||
// Most played song this week
|
||||
songOfTheWeek: tracks.filter(track => {
|
||||
const weekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000);
|
||||
return track.played_at >= weekAgo;
|
||||
}).reduce((acc, track) => {
|
||||
acc[track.id] = (acc[track.id] || 0) + 1;
|
||||
return acc;
|
||||
}, {}),
|
||||
// Longest listening session (consecutive plays)
|
||||
longestSession: calculateLongestSession(tracks),
|
||||
// Most diverse day (most unique artists in one day)
|
||||
mostDiverseDay: calculateMostDiverseDay(tracks),
|
||||
// Late night listener (plays after 11 PM)
|
||||
lateNightListener: tracks.filter(track => new Date(track.played_at).getHours() >= 23).length,
|
||||
// Early bird (plays before 6 AM)
|
||||
earlyBird: tracks.filter(track => new Date(track.played_at).getHours() < 6).length,
|
||||
// Weekend warrior (plays on weekends)
|
||||
weekendWarrior: tracks.filter(track => {
|
||||
const day = new Date(track.played_at).getDay();
|
||||
return day === 0 || day === 6;
|
||||
}).length,
|
||||
// Discovery rate (new artists discovered)
|
||||
discoveryRate: new Set(tracks.map(track => track.artists?.[0]?.id).filter(Boolean)).size,
|
||||
// Average song length
|
||||
averageSongLength: tracks.length > 0 ? tracks.reduce((sum, track) => sum + (track.duration_ms || 0), 0) / tracks.length : 0,
|
||||
// Most active month
|
||||
mostActiveMonth: getMostActiveMonth(tracks),
|
||||
// Listening velocity (songs per day)
|
||||
listeningVelocity: calculateListeningVelocity(tracks, timeRange)
|
||||
};
|
||||
// Get data collection start date
|
||||
const firstPlay = db.db.prepare('SELECT MIN(played_at) as first_play FROM recently_played WHERE user_id = ?').get(uid);
|
||||
const dataCollectionStart = firstPlay?.first_play || Date.now();
|
||||
res.json({
|
||||
totalTracks: tracks.length,
|
||||
totalListeningTime,
|
||||
topSongs,
|
||||
topArtists,
|
||||
topGenres,
|
||||
listeningPatterns: {
|
||||
mostActiveHour,
|
||||
mostActiveDay,
|
||||
listeningStreak: streak
|
||||
},
|
||||
uniqueCategories,
|
||||
partnerData,
|
||||
dataCollectionStart,
|
||||
timeRange,
|
||||
generatedAt: Date.now()
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
console.error('Wrapped generation error:', e);
|
||||
res.status(500).json({ error: 'Failed to generate wrapped data', detail: e?.message });
|
||||
}
|
||||
});
|
||||
// Get artist details with profile picture
|
||||
usersRouter.get('/:uid/artist/:artistId', requireAuth, async (req, res) => {
|
||||
try {
|
||||
const { uid, artistId } = req.params;
|
||||
if (!req.user)
|
||||
return res.status(403).json({ error: 'Forbidden' });
|
||||
if (req.user.uid !== uid) {
|
||||
const paired = db.db.prepare('SELECT 1 FROM friendships WHERE (user_a_id=? AND user_b_id=?) OR (user_a_id=? AND user_b_id=?)').get(req.user.uid, uid, uid, req.user.uid);
|
||||
if (!paired)
|
||||
return res.status(403).json({ error: 'Forbidden' });
|
||||
}
|
||||
const accessToken = await ensureValidAccessToken(uid);
|
||||
const response = await axios.get(`https://api.spotify.com/v1/artists/${artistId}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` }
|
||||
});
|
||||
res.json(response.data);
|
||||
}
|
||||
catch (e) {
|
||||
console.error('Artist fetch error:', e);
|
||||
res.status(500).json({ error: 'Failed to fetch artist data', detail: e?.message });
|
||||
}
|
||||
});
|
||||
|
|
|
|||
58
server/node_modules/.package-lock.json
generated
vendored
58
server/node_modules/.package-lock.json
generated
vendored
|
|
@ -331,8 +331,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
]
|
||||
},
|
||||
"node_modules/basic-auth": {
|
||||
"version": "2.0.1",
|
||||
|
|
@ -357,7 +356,6 @@
|
|||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-9.6.0.tgz",
|
||||
"integrity": "sha512-yR5HATnqeYNVnkaUTf4bOP2dJSnyhP4puJN/QPRyx4YkBEEUxib422n2XzPqDEHjQQqazoYoADdAm5vE15+dAQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"prebuild-install": "^7.1.1"
|
||||
|
|
@ -367,7 +365,6 @@
|
|||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
|
|
@ -376,7 +373,6 @@
|
|||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
|
|
@ -425,7 +421,6 @@
|
|||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
|
|
@ -478,8 +473,7 @@
|
|||
"node_modules/chownr": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
|
|
@ -555,7 +549,6 @@
|
|||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
||||
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mimic-response": "^3.1.0"
|
||||
},
|
||||
|
|
@ -570,7 +563,6 @@
|
|||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
|
|
@ -666,7 +658,6 @@
|
|||
"version": "1.4.5",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
|
||||
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
|
|
@ -777,7 +768,6 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
||||
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
|
||||
"license": "(MIT OR WTFPL)",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
|
|
@ -831,8 +821,7 @@
|
|||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.3.1",
|
||||
|
|
@ -909,8 +898,7 @@
|
|||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.2",
|
||||
|
|
@ -974,8 +962,7 @@
|
|||
"node_modules/github-from-package": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.2.0",
|
||||
|
|
@ -1082,8 +1069,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
]
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
|
|
@ -1094,8 +1080,7 @@
|
|||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
|
|
@ -1270,7 +1255,6 @@
|
|||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
||||
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
|
|
@ -1282,7 +1266,6 @@
|
|||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
|
|
@ -1290,8 +1273,7 @@
|
|||
"node_modules/mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
||||
},
|
||||
"node_modules/morgan": {
|
||||
"version": "1.10.1",
|
||||
|
|
@ -1330,8 +1312,7 @@
|
|||
"node_modules/napi-build-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA=="
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "0.6.3",
|
||||
|
|
@ -1346,7 +1327,6 @@
|
|||
"version": "3.78.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.78.0.tgz",
|
||||
"integrity": "sha512-E2wEyrgX/CqvicaQYU3Ze1PFGjc4QYPGsjUrlYkqAE0WjHEZwgOsGMPMzkMse4LjJbDmaEuDX3CM036j5K2DSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
|
|
@ -1400,7 +1380,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
|
@ -1424,7 +1403,6 @@
|
|||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
|
||||
"integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.0",
|
||||
"expand-template": "^2.0.3",
|
||||
|
|
@ -1469,7 +1447,6 @@
|
|||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
|
||||
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
|
|
@ -1518,7 +1495,6 @@
|
|||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
|
||||
"dependencies": {
|
||||
"deep-extend": "^0.6.0",
|
||||
"ini": "~1.3.0",
|
||||
|
|
@ -1533,7 +1509,6 @@
|
|||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
|
|
@ -1782,8 +1757,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
]
|
||||
},
|
||||
"node_modules/simple-get": {
|
||||
"version": "4.0.1",
|
||||
|
|
@ -1803,7 +1777,6 @@
|
|||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"decompress-response": "^6.0.0",
|
||||
"once": "^1.3.1",
|
||||
|
|
@ -1823,7 +1796,6 @@
|
|||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
|
|
@ -1832,7 +1804,6 @@
|
|||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
|
@ -1841,7 +1812,6 @@
|
|||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
|
||||
"integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chownr": "^1.1.1",
|
||||
"mkdirp-classic": "^0.5.2",
|
||||
|
|
@ -1853,7 +1823,6 @@
|
|||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bl": "^4.0.3",
|
||||
"end-of-stream": "^1.4.1",
|
||||
|
|
@ -1898,7 +1867,6 @@
|
|||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
|
|
@ -1952,8 +1920,7 @@
|
|||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/utils-merge": {
|
||||
"version": "1.0.1",
|
||||
|
|
@ -1989,8 +1956,7 @@
|
|||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
339
server/node_modules/better-sqlite3/build/Makefile
generated
vendored
Normal file
339
server/node_modules/better-sqlite3/build/Makefile
generated
vendored
Normal file
|
|
@ -0,0 +1,339 @@
|
|||
# We borrow heavily from the kernel build setup, though we are simpler since
|
||||
# we don't have Kconfig tweaking settings on us.
|
||||
|
||||
# The implicit make rules have it looking for RCS files, among other things.
|
||||
# We instead explicitly write all the rules we care about.
|
||||
# It's even quicker (saves ~200ms) to pass -r on the command line.
|
||||
MAKEFLAGS=-r
|
||||
|
||||
# The source directory tree.
|
||||
srcdir := ..
|
||||
abs_srcdir := $(abspath $(srcdir))
|
||||
|
||||
# The name of the builddir.
|
||||
builddir_name ?= .
|
||||
|
||||
# The V=1 flag on command line makes us verbosely print command lines.
|
||||
ifdef V
|
||||
quiet=
|
||||
else
|
||||
quiet=quiet_
|
||||
endif
|
||||
|
||||
# Specify BUILDTYPE=Release on the command line for a release build.
|
||||
BUILDTYPE ?= Release
|
||||
|
||||
# Directory all our build output goes into.
|
||||
# Note that this must be two directories beneath src/ for unit tests to pass,
|
||||
# as they reach into the src/ directory for data with relative paths.
|
||||
builddir ?= $(builddir_name)/$(BUILDTYPE)
|
||||
abs_builddir := $(abspath $(builddir))
|
||||
depsdir := $(builddir)/.deps
|
||||
|
||||
# Object output directory.
|
||||
obj := $(builddir)/obj
|
||||
abs_obj := $(abspath $(obj))
|
||||
|
||||
# We build up a list of every single one of the targets so we can slurp in the
|
||||
# generated dependency rule Makefiles in one pass.
|
||||
all_deps :=
|
||||
|
||||
|
||||
|
||||
CC.target ?= $(CC)
|
||||
CFLAGS.target ?= $(CPPFLAGS) $(CFLAGS)
|
||||
CXX.target ?= $(CXX)
|
||||
CXXFLAGS.target ?= $(CPPFLAGS) $(CXXFLAGS)
|
||||
LINK.target ?= $(LINK)
|
||||
LDFLAGS.target ?= $(LDFLAGS)
|
||||
AR.target ?= $(AR)
|
||||
|
||||
# C++ apps need to be linked with g++.
|
||||
LINK ?= $(CXX.target)
|
||||
|
||||
# TODO(evan): move all cross-compilation logic to gyp-time so we don't need
|
||||
# to replicate this environment fallback in make as well.
|
||||
CC.host ?= gcc
|
||||
CFLAGS.host ?= $(CPPFLAGS_host) $(CFLAGS_host)
|
||||
CXX.host ?= g++
|
||||
CXXFLAGS.host ?= $(CPPFLAGS_host) $(CXXFLAGS_host)
|
||||
LINK.host ?= $(CXX.host)
|
||||
LDFLAGS.host ?= $(LDFLAGS_host)
|
||||
AR.host ?= ar
|
||||
|
||||
# Define a dir function that can handle spaces.
|
||||
# http://www.gnu.org/software/make/manual/make.html#Syntax-of-Functions
|
||||
# "leading spaces cannot appear in the text of the first argument as written.
|
||||
# These characters can be put into the argument value by variable substitution."
|
||||
empty :=
|
||||
space := $(empty) $(empty)
|
||||
|
||||
# http://stackoverflow.com/questions/1189781/using-make-dir-or-notdir-on-a-path-with-spaces
|
||||
replace_spaces = $(subst $(space),?,$1)
|
||||
unreplace_spaces = $(subst ?,$(space),$1)
|
||||
dirx = $(call unreplace_spaces,$(dir $(call replace_spaces,$1)))
|
||||
|
||||
# Flags to make gcc output dependency info. Note that you need to be
|
||||
# careful here to use the flags that ccache and distcc can understand.
|
||||
# We write to a dep file on the side first and then rename at the end
|
||||
# so we can't end up with a broken dep file.
|
||||
depfile = $(depsdir)/$(call replace_spaces,$@).d
|
||||
DEPFLAGS = -MMD -MF $(depfile).raw
|
||||
|
||||
# We have to fixup the deps output in a few ways.
|
||||
# (1) the file output should mention the proper .o file.
|
||||
# ccache or distcc lose the path to the target, so we convert a rule of
|
||||
# the form:
|
||||
# foobar.o: DEP1 DEP2
|
||||
# into
|
||||
# path/to/foobar.o: DEP1 DEP2
|
||||
# (2) we want missing files not to cause us to fail to build.
|
||||
# We want to rewrite
|
||||
# foobar.o: DEP1 DEP2 \
|
||||
# DEP3
|
||||
# to
|
||||
# DEP1:
|
||||
# DEP2:
|
||||
# DEP3:
|
||||
# so if the files are missing, they're just considered phony rules.
|
||||
# We have to do some pretty insane escaping to get those backslashes
|
||||
# and dollar signs past make, the shell, and sed at the same time.
|
||||
# Doesn't work with spaces, but that's fine: .d files have spaces in
|
||||
# their names replaced with other characters.
|
||||
define fixup_dep
|
||||
# The depfile may not exist if the input file didn't have any #includes.
|
||||
touch $(depfile).raw
|
||||
# Fixup path as in (1).
|
||||
sed -e "s|^$(notdir $@)|$@|" $(depfile).raw >> $(depfile)
|
||||
# Add extra rules as in (2).
|
||||
# We remove slashes and replace spaces with new lines;
|
||||
# remove blank lines;
|
||||
# delete the first line and append a colon to the remaining lines.
|
||||
sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\
|
||||
grep -v '^$$' |\
|
||||
sed -e 1d -e 's|$$|:|' \
|
||||
>> $(depfile)
|
||||
rm $(depfile).raw
|
||||
endef
|
||||
|
||||
# Command definitions:
|
||||
# - cmd_foo is the actual command to run;
|
||||
# - quiet_cmd_foo is the brief-output summary of the command.
|
||||
|
||||
quiet_cmd_cc = CC($(TOOLSET)) $@
|
||||
cmd_cc = $(CC.$(TOOLSET)) -o $@ $< $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c
|
||||
|
||||
quiet_cmd_cxx = CXX($(TOOLSET)) $@
|
||||
cmd_cxx = $(CXX.$(TOOLSET)) -o $@ $< $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c
|
||||
|
||||
quiet_cmd_touch = TOUCH $@
|
||||
cmd_touch = touch $@
|
||||
|
||||
quiet_cmd_copy = COPY $@
|
||||
# send stderr to /dev/null to ignore messages when linking directories.
|
||||
cmd_copy = ln -f "$<" "$@" 2>/dev/null || (rm -rf "$@" && cp -af "$<" "$@")
|
||||
|
||||
quiet_cmd_alink = AR($(TOOLSET)) $@
|
||||
cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)
|
||||
|
||||
quiet_cmd_alink_thin = AR($(TOOLSET)) $@
|
||||
cmd_alink_thin = rm -f $@ && $(AR.$(TOOLSET)) crsT $@ $(filter %.o,$^)
|
||||
|
||||
# Due to circular dependencies between libraries :(, we wrap the
|
||||
# special "figure out circular dependencies" flags around the entire
|
||||
# input list during linking.
|
||||
quiet_cmd_link = LINK($(TOOLSET)) $@
|
||||
cmd_link = $(LINK.$(TOOLSET)) -o $@ $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,--start-group $(LD_INPUTS) $(LIBS) -Wl,--end-group
|
||||
|
||||
# We support two kinds of shared objects (.so):
|
||||
# 1) shared_library, which is just bundling together many dependent libraries
|
||||
# into a link line.
|
||||
# 2) loadable_module, which is generating a module intended for dlopen().
|
||||
#
|
||||
# They differ only slightly:
|
||||
# In the former case, we want to package all dependent code into the .so.
|
||||
# In the latter case, we want to package just the API exposed by the
|
||||
# outermost module.
|
||||
# This means shared_library uses --whole-archive, while loadable_module doesn't.
|
||||
# (Note that --whole-archive is incompatible with the --start-group used in
|
||||
# normal linking.)
|
||||
|
||||
# Other shared-object link notes:
|
||||
# - Set SONAME to the library filename so our binaries don't reference
|
||||
# the local, absolute paths used on the link command-line.
|
||||
quiet_cmd_solink = SOLINK($(TOOLSET)) $@
|
||||
cmd_solink = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--whole-archive $(LD_INPUTS) -Wl,--no-whole-archive $(LIBS)
|
||||
|
||||
quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@
|
||||
cmd_solink_module = $(LINK.$(TOOLSET)) -o $@ -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -Wl,-soname=$(@F) -Wl,--start-group $(filter-out FORCE_DO_CMD, $^) -Wl,--end-group $(LIBS)
|
||||
|
||||
|
||||
# Define an escape_quotes function to escape single quotes.
|
||||
# This allows us to handle quotes properly as long as we always use
|
||||
# use single quotes and escape_quotes.
|
||||
escape_quotes = $(subst ','\'',$(1))
|
||||
# This comment is here just to include a ' to unconfuse syntax highlighting.
|
||||
# Define an escape_vars function to escape '$' variable syntax.
|
||||
# This allows us to read/write command lines with shell variables (e.g.
|
||||
# $LD_LIBRARY_PATH), without triggering make substitution.
|
||||
escape_vars = $(subst $$,$$$$,$(1))
|
||||
# Helper that expands to a shell command to echo a string exactly as it is in
|
||||
# make. This uses printf instead of echo because printf's behaviour with respect
|
||||
# to escape sequences is more portable than echo's across different shells
|
||||
# (e.g., dash, bash).
|
||||
exact_echo = printf '%s\n' '$(call escape_quotes,$(1))'
|
||||
|
||||
# Helper to compare the command we're about to run against the command
|
||||
# we logged the last time we ran the command. Produces an empty
|
||||
# string (false) when the commands match.
|
||||
# Tricky point: Make has no string-equality test function.
|
||||
# The kernel uses the following, but it seems like it would have false
|
||||
# positives, where one string reordered its arguments.
|
||||
# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \
|
||||
# $(filter-out $(cmd_$@), $(cmd_$(1))))
|
||||
# We instead substitute each for the empty string into the other, and
|
||||
# say they're equal if both substitutions produce the empty string.
|
||||
# .d files contain ? instead of spaces, take that into account.
|
||||
command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\
|
||||
$(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1))))
|
||||
|
||||
# Helper that is non-empty when a prerequisite changes.
|
||||
# Normally make does this implicitly, but we force rules to always run
|
||||
# so we can check their command lines.
|
||||
# $? -- new prerequisites
|
||||
# $| -- order-only dependencies
|
||||
prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?))
|
||||
|
||||
# Helper that executes all postbuilds until one fails.
|
||||
define do_postbuilds
|
||||
@E=0;\
|
||||
for p in $(POSTBUILDS); do\
|
||||
eval $$p;\
|
||||
E=$$?;\
|
||||
if [ $$E -ne 0 ]; then\
|
||||
break;\
|
||||
fi;\
|
||||
done;\
|
||||
if [ $$E -ne 0 ]; then\
|
||||
rm -rf "$@";\
|
||||
exit $$E;\
|
||||
fi
|
||||
endef
|
||||
|
||||
# do_cmd: run a command via the above cmd_foo names, if necessary.
|
||||
# Should always run for a given target to handle command-line changes.
|
||||
# Second argument, if non-zero, makes it do asm/C/C++ dependency munging.
|
||||
# Third argument, if non-zero, makes it do POSTBUILDS processing.
|
||||
# Note: We intentionally do NOT call dirx for depfile, since it contains ? for
|
||||
# spaces already and dirx strips the ? characters.
|
||||
define do_cmd
|
||||
$(if $(or $(command_changed),$(prereq_changed)),
|
||||
@$(call exact_echo, $($(quiet)cmd_$(1)))
|
||||
@mkdir -p "$(call dirx,$@)" "$(dir $(depfile))"
|
||||
$(if $(findstring flock,$(word 1,$(cmd_$1))),
|
||||
@$(cmd_$(1))
|
||||
@echo " $(quiet_cmd_$(1)): Finished",
|
||||
@$(cmd_$(1))
|
||||
)
|
||||
@$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile)
|
||||
@$(if $(2),$(fixup_dep))
|
||||
$(if $(and $(3), $(POSTBUILDS)),
|
||||
$(call do_postbuilds)
|
||||
)
|
||||
)
|
||||
endef
|
||||
|
||||
# Declare the "all" target first so it is the default,
|
||||
# even though we don't have the deps yet.
|
||||
.PHONY: all
|
||||
all:
|
||||
|
||||
# make looks for ways to re-generate included makefiles, but in our case, we
|
||||
# don't have a direct way. Explicitly telling make that it has nothing to do
|
||||
# for them makes it go faster.
|
||||
%.d: ;
|
||||
|
||||
# Use FORCE_DO_CMD to force a target to run. Should be coupled with
|
||||
# do_cmd.
|
||||
.PHONY: FORCE_DO_CMD
|
||||
FORCE_DO_CMD:
|
||||
|
||||
TOOLSET := target
|
||||
# Suffix rules, putting all outputs into $(obj).
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
# Try building from generated source, too.
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
|
||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
||||
$(findstring $(join ^,$(prefix)),\
|
||||
$(join ^,better_sqlite3.target.mk)))),)
|
||||
include better_sqlite3.target.mk
|
||||
endif
|
||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
||||
$(findstring $(join ^,$(prefix)),\
|
||||
$(join ^,deps/locate_sqlite3.target.mk)))),)
|
||||
include deps/locate_sqlite3.target.mk
|
||||
endif
|
||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
||||
$(findstring $(join ^,$(prefix)),\
|
||||
$(join ^,deps/sqlite3.target.mk)))),)
|
||||
include deps/sqlite3.target.mk
|
||||
endif
|
||||
ifeq ($(strip $(foreach prefix,$(NO_LOAD),\
|
||||
$(findstring $(join ^,$(prefix)),\
|
||||
$(join ^,test_extension.target.mk)))),)
|
||||
include test_extension.target.mk
|
||||
endif
|
||||
|
||||
quiet_cmd_regen_makefile = ACTION Regenerating $@
|
||||
cmd_regen_makefile = cd $(srcdir); /usr/share/nodejs/node-gyp/gyp/gyp_main.py -fmake --ignore-environment "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/usr/include/nodejs" "-Dnode_gyp_dir=/usr/share/nodejs/node-gyp" "-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib" "-Dmodule_root_dir=/home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3" "-Dnode_engine=v8" "--depth=." "-Goutput_dir=." "--generator-output=build" -I/home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3/build/config.gypi -I/usr/share/nodejs/node-gyp/addon.gypi -I/usr/include/nodejs/common.gypi "--toplevel-dir=." binding.gyp
|
||||
Makefile: $(srcdir)/build/config.gypi $(srcdir)/deps/sqlite3.gyp $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../usr/share/nodejs/node-gyp/addon.gypi $(srcdir)/../../../../../../../../usr/include/nodejs/common.gypi $(srcdir)/deps/common.gypi $(srcdir)/deps/defines.gypi
|
||||
$(call do_cmd,regen_makefile)
|
||||
|
||||
# "all" is a concatenation of the "all" targets from all the included
|
||||
# sub-makefiles. This is just here to clarify.
|
||||
all:
|
||||
|
||||
# Add in dependency-tracking rules. $(all_deps) is the list of every single
|
||||
# target in our tree. Only consider the ones with .d (dependency) info:
|
||||
d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d))
|
||||
ifneq ($(d_files),)
|
||||
include $(d_files)
|
||||
endif
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/better_sqlite3.node.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/better_sqlite3.node.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/better_sqlite3.node := ln -f "Release/obj.target/better_sqlite3.node" "Release/better_sqlite3.node" 2>/dev/null || (rm -rf "Release/better_sqlite3.node" && cp -af "Release/obj.target/better_sqlite3.node" "Release/better_sqlite3.node")
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3.node.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3.node.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/obj.target/better_sqlite3.node := g++ -o Release/obj.target/better_sqlite3.node -shared -pthread -rdynamic -Wl,-Bsymbolic -Wl,--exclude-libs,ALL -m64 -Wl,-soname=better_sqlite3.node -Wl,--start-group Release/obj.target/better_sqlite3/src/better_sqlite3.o Release/obj.target/deps/sqlite3.a -Wl,--end-group -lnode
|
||||
123
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3/src/better_sqlite3.o.d
generated
vendored
Normal file
123
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/better_sqlite3/src/better_sqlite3.o.d
generated
vendored
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
cmd_Release/obj.target/better_sqlite3/src/better_sqlite3.o := g++ -o Release/obj.target/better_sqlite3/src/better_sqlite3.o ../src/better_sqlite3.cpp '-DNODE_GYP_MODULE_NAME=better_sqlite3' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DBUILDING_NODE_EXTENSION' '-DNDEBUG' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/openssl/config -I/usr/include/nodejs/deps/openssl/openssl/include -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/zlib -I/usr/include/nodejs/deps/v8/include -I./Release/obj/gen/sqlite3 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -m64 -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++17 -std=c++17 -MMD -MF ./Release/.deps/Release/obj.target/better_sqlite3/src/better_sqlite3.o.d.raw -c
|
||||
Release/obj.target/better_sqlite3/src/better_sqlite3.o: \
|
||||
../src/better_sqlite3.cpp ../src/better_sqlite3.hpp \
|
||||
Release/obj/gen/sqlite3/sqlite3.h /usr/include/nodejs/src/node.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8.h \
|
||||
/usr/include/nodejs/deps/v8/include/cppgc/common.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8config.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-array-buffer.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-local-handle.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-internal.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-version.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8config.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-object.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-maybe.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-persistent-handle.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-weak-callback-info.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-primitive.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-data.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-value.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-traced-handle.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-container.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-context.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-snapshot.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-date.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-debug.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-script.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-message.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-exception.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-extension.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-external.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-function.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-function-callback.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-template.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-memory-span.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-initialization.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-callbacks.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-isolate.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-embedder-heap.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-microtask.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-statistics.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-promise.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-unwinder.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-embedder-state-scope.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-platform.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-json.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-locker.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-microtask-queue.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-primitive-object.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-proxy.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-regexp.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-typed-array.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-value-serializer.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-wasm.h \
|
||||
/usr/include/nodejs/deps/v8/include/v8-platform.h \
|
||||
/usr/include/nodejs/src/node_version.h \
|
||||
/usr/include/nodejs/src/node_api.h \
|
||||
/usr/include/nodejs/src/js_native_api.h \
|
||||
/usr/include/nodejs/src/js_native_api_types.h \
|
||||
/usr/include/nodejs/src/node_api_types.h \
|
||||
/usr/include/nodejs/src/node_object_wrap.h \
|
||||
/usr/include/nodejs/src/node_buffer.h /usr/include/nodejs/src/node.h
|
||||
../src/better_sqlite3.cpp:
|
||||
../src/better_sqlite3.hpp:
|
||||
Release/obj/gen/sqlite3/sqlite3.h:
|
||||
/usr/include/nodejs/src/node.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8.h:
|
||||
/usr/include/nodejs/deps/v8/include/cppgc/common.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8config.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-array-buffer.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-local-handle.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-internal.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-version.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8config.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-object.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-maybe.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-persistent-handle.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-weak-callback-info.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-primitive.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-data.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-value.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-traced-handle.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-container.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-context.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-snapshot.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-date.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-debug.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-script.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-message.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-exception.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-extension.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-external.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-function.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-function-callback.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-template.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-memory-span.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-initialization.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-callbacks.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-isolate.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-embedder-heap.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-microtask.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-statistics.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-promise.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-unwinder.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-embedder-state-scope.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-platform.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-json.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-locker.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-microtask-queue.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-primitive-object.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-proxy.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-regexp.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-typed-array.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-value-serializer.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-wasm.h:
|
||||
/usr/include/nodejs/deps/v8/include/v8-platform.h:
|
||||
/usr/include/nodejs/src/node_version.h:
|
||||
/usr/include/nodejs/src/node_api.h:
|
||||
/usr/include/nodejs/src/js_native_api.h:
|
||||
/usr/include/nodejs/src/js_native_api_types.h:
|
||||
/usr/include/nodejs/src/node_api_types.h:
|
||||
/usr/include/nodejs/src/node_object_wrap.h:
|
||||
/usr/include/nodejs/src/node_buffer.h:
|
||||
/usr/include/nodejs/src/node.h:
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/locate_sqlite3.stamp.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/locate_sqlite3.stamp.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/obj.target/deps/locate_sqlite3.stamp := touch Release/obj.target/deps/locate_sqlite3.stamp
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/sqlite3.a.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/deps/sqlite3.a.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/obj.target/deps/sqlite3.a := rm -f Release/obj.target/deps/sqlite3.a && ar crs Release/obj.target/deps/sqlite3.a Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
|
||||
4
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d
generated
vendored
Normal file
4
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d
generated
vendored
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
cmd_Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o := cc -o Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o Release/obj/gen/sqlite3/sqlite3.c '-DNODE_GYP_MODULE_NAME=sqlite3' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DHAVE_INT16_T=1' '-DHAVE_INT32_T=1' '-DHAVE_INT8_T=1' '-DHAVE_STDINT_H=1' '-DHAVE_UINT16_T=1' '-DHAVE_UINT32_T=1' '-DHAVE_UINT8_T=1' '-DHAVE_USLEEP=1' '-DSQLITE_DEFAULT_CACHE_SIZE=-16000' '-DSQLITE_DEFAULT_FOREIGN_KEYS=1' '-DSQLITE_DEFAULT_MEMSTATUS=0' '-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1' '-DSQLITE_DQS=0' '-DSQLITE_ENABLE_COLUMN_METADATA' '-DSQLITE_ENABLE_DESERIALIZE' '-DSQLITE_ENABLE_FTS3' '-DSQLITE_ENABLE_FTS3_PARENTHESIS' '-DSQLITE_ENABLE_FTS4' '-DSQLITE_ENABLE_FTS5' '-DSQLITE_ENABLE_GEOPOLY' '-DSQLITE_ENABLE_JSON1' '-DSQLITE_ENABLE_MATH_FUNCTIONS' '-DSQLITE_ENABLE_RTREE' '-DSQLITE_ENABLE_STAT4' '-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT' '-DSQLITE_LIKE_DOESNT_MATCH_BLOBS' '-DSQLITE_OMIT_DEPRECATED' '-DSQLITE_OMIT_PROGRESS_CALLBACK' '-DSQLITE_OMIT_SHARED_CACHE' '-DSQLITE_OMIT_TCL_VARIABLE' '-DSQLITE_SOUNDEX' '-DSQLITE_THREADSAFE=2' '-DSQLITE_TRACE_SIZE_LIMIT=32' '-DSQLITE_USE_URI=0' '-DNDEBUG' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/openssl/config -I/usr/include/nodejs/deps/openssl/openssl/include -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/zlib -I/usr/include/nodejs/deps/v8/include -I./Release/obj/gen/sqlite3 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -std=c99 -w -m64 -O3 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o.d.raw -c
|
||||
Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o: \
|
||||
Release/obj/gen/sqlite3/sqlite3.c
|
||||
Release/obj/gen/sqlite3/sqlite3.c:
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension.node.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension.node.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/obj.target/test_extension.node := g++ -o Release/obj.target/test_extension.node -shared -pthread -rdynamic -m64 -Wl,-soname=test_extension.node -Wl,--start-group Release/obj.target/test_extension/deps/test_extension.o Release/obj.target/deps/sqlite3.a -Wl,--end-group -lnode
|
||||
7
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension/deps/test_extension.o.d
generated
vendored
Normal file
7
server/node_modules/better-sqlite3/build/Release/.deps/Release/obj.target/test_extension/deps/test_extension.o.d
generated
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
cmd_Release/obj.target/test_extension/deps/test_extension.o := cc -o Release/obj.target/test_extension/deps/test_extension.o ../deps/test_extension.c '-DNODE_GYP_MODULE_NAME=test_extension' '-DUSING_UV_SHARED=1' '-DUSING_V8_SHARED=1' '-DV8_DEPRECATION_WARNINGS=1' '-DV8_DEPRECATION_WARNINGS' '-DV8_IMMINENT_DEPRECATION_WARNINGS' '-D_GLIBCXX_USE_CXX11_ABI=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-D__STDC_FORMAT_MACROS' '-DBUILDING_NODE_EXTENSION' '-DNDEBUG' -I/usr/include/nodejs/include/node -I/usr/include/nodejs/src -I/usr/include/nodejs/deps/openssl/config -I/usr/include/nodejs/deps/openssl/openssl/include -I/usr/include/nodejs/deps/uv/include -I/usr/include/nodejs/deps/zlib -I/usr/include/nodejs/deps/v8/include -I./Release/obj/gen/sqlite3 -fPIC -pthread -Wall -Wextra -Wno-unused-parameter -fPIC -m64 -O3 -O3 -fno-omit-frame-pointer -MMD -MF ./Release/.deps/Release/obj.target/test_extension/deps/test_extension.o.d.raw -c
|
||||
Release/obj.target/test_extension/deps/test_extension.o: \
|
||||
../deps/test_extension.c Release/obj/gen/sqlite3/sqlite3ext.h \
|
||||
Release/obj/gen/sqlite3/sqlite3.h
|
||||
../deps/test_extension.c:
|
||||
Release/obj/gen/sqlite3/sqlite3ext.h:
|
||||
Release/obj/gen/sqlite3/sqlite3.h:
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/sqlite3.a.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/sqlite3.a.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/sqlite3.a := ln -f "Release/obj.target/deps/sqlite3.a" "Release/sqlite3.a" 2>/dev/null || (rm -rf "Release/sqlite3.a" && cp -af "Release/obj.target/deps/sqlite3.a" "Release/sqlite3.a")
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/test_extension.node.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/Release/test_extension.node.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_Release/test_extension.node := ln -f "Release/obj.target/test_extension.node" "Release/test_extension.node" 2>/dev/null || (rm -rf "Release/test_extension.node" && cp -af "Release/obj.target/test_extension.node" "Release/test_extension.node")
|
||||
1
server/node_modules/better-sqlite3/build/Release/.deps/ba23eeee118cd63e16015df367567cb043fed872.intermediate.d
generated
vendored
Normal file
1
server/node_modules/better-sqlite3/build/Release/.deps/ba23eeee118cd63e16015df367567cb043fed872.intermediate.d
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
cmd_ba23eeee118cd63e16015df367567cb043fed872.intermediate := LD_LIBRARY_PATH=/home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3/build/Release/lib.host:/home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3/build/Release/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps; mkdir -p /home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3; node copy.js "/home/pschneid/Gulfslab/projects/spotify/server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3" ""
|
||||
BIN
server/node_modules/better-sqlite3/build/Release/better_sqlite3.node
generated
vendored
BIN
server/node_modules/better-sqlite3/build/Release/better_sqlite3.node
generated
vendored
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3.node
generated
vendored
Executable file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3.node
generated
vendored
Executable file
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3/src/better_sqlite3.o
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/better_sqlite3/src/better_sqlite3.o
generated
vendored
Normal file
Binary file not shown.
0
server/node_modules/better-sqlite3/build/Release/obj.target/deps/locate_sqlite3.stamp
generated
vendored
Normal file
0
server/node_modules/better-sqlite3/build/Release/obj.target/deps/locate_sqlite3.stamp
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/deps/sqlite3.a
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/deps/sqlite3.a
generated
vendored
Normal file
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
generated
vendored
Normal file
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/test_extension.node
generated
vendored
Executable file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/test_extension.node
generated
vendored
Executable file
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/test_extension/deps/test_extension.o
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/obj.target/test_extension/deps/test_extension.o
generated
vendored
Normal file
Binary file not shown.
255954
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c
generated
vendored
Normal file
255954
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.c
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
13374
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.h
generated
vendored
Normal file
13374
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3.h
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
719
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3ext.h
generated
vendored
Normal file
719
server/node_modules/better-sqlite3/build/Release/obj/gen/sqlite3/sqlite3ext.h
generated
vendored
Normal file
|
|
@ -0,0 +1,719 @@
|
|||
/*
|
||||
** 2006 June 7
|
||||
**
|
||||
** The author disclaims copyright to this source code. In place of
|
||||
** a legal notice, here is a blessing:
|
||||
**
|
||||
** May you do good and not evil.
|
||||
** May you find forgiveness for yourself and forgive others.
|
||||
** May you share freely, never taking more than you give.
|
||||
**
|
||||
*************************************************************************
|
||||
** This header file defines the SQLite interface for use by
|
||||
** shared libraries that want to be imported as extensions into
|
||||
** an SQLite instance. Shared libraries that intend to be loaded
|
||||
** as extensions by SQLite should #include this file instead of
|
||||
** sqlite3.h.
|
||||
*/
|
||||
#ifndef SQLITE3EXT_H
|
||||
#define SQLITE3EXT_H
|
||||
#include "sqlite3.h"
|
||||
|
||||
/*
|
||||
** The following structure holds pointers to all of the SQLite API
|
||||
** routines.
|
||||
**
|
||||
** WARNING: In order to maintain backwards compatibility, add new
|
||||
** interfaces to the end of this structure only. If you insert new
|
||||
** interfaces in the middle of this structure, then older different
|
||||
** versions of SQLite will not be able to load each other's shared
|
||||
** libraries!
|
||||
*/
|
||||
struct sqlite3_api_routines {
|
||||
void * (*aggregate_context)(sqlite3_context*,int nBytes);
|
||||
int (*aggregate_count)(sqlite3_context*);
|
||||
int (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
|
||||
int (*bind_double)(sqlite3_stmt*,int,double);
|
||||
int (*bind_int)(sqlite3_stmt*,int,int);
|
||||
int (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
|
||||
int (*bind_null)(sqlite3_stmt*,int);
|
||||
int (*bind_parameter_count)(sqlite3_stmt*);
|
||||
int (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
|
||||
const char * (*bind_parameter_name)(sqlite3_stmt*,int);
|
||||
int (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
|
||||
int (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
|
||||
int (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
|
||||
int (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
|
||||
int (*busy_timeout)(sqlite3*,int ms);
|
||||
int (*changes)(sqlite3*);
|
||||
int (*close)(sqlite3*);
|
||||
int (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const char*));
|
||||
int (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
|
||||
int eTextRep,const void*));
|
||||
const void * (*column_blob)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes)(sqlite3_stmt*,int iCol);
|
||||
int (*column_bytes16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_count)(sqlite3_stmt*pStmt);
|
||||
const char * (*column_database_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_database_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_decltype)(sqlite3_stmt*,int i);
|
||||
const void * (*column_decltype16)(sqlite3_stmt*,int);
|
||||
double (*column_double)(sqlite3_stmt*,int iCol);
|
||||
int (*column_int)(sqlite3_stmt*,int iCol);
|
||||
sqlite_int64 (*column_int64)(sqlite3_stmt*,int iCol);
|
||||
const char * (*column_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_origin_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_origin_name16)(sqlite3_stmt*,int);
|
||||
const char * (*column_table_name)(sqlite3_stmt*,int);
|
||||
const void * (*column_table_name16)(sqlite3_stmt*,int);
|
||||
const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
|
||||
const void * (*column_text16)(sqlite3_stmt*,int iCol);
|
||||
int (*column_type)(sqlite3_stmt*,int iCol);
|
||||
sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
|
||||
void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
|
||||
int (*complete)(const char*sql);
|
||||
int (*complete16)(const void*sql);
|
||||
int (*create_collation)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_collation16)(sqlite3*,const void*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*));
|
||||
int (*create_function)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_function16)(sqlite3*,const void*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*));
|
||||
int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
|
||||
int (*data_count)(sqlite3_stmt*pStmt);
|
||||
sqlite3 * (*db_handle)(sqlite3_stmt*);
|
||||
int (*declare_vtab)(sqlite3*,const char*);
|
||||
int (*enable_shared_cache)(int);
|
||||
int (*errcode)(sqlite3*db);
|
||||
const char * (*errmsg)(sqlite3*);
|
||||
const void * (*errmsg16)(sqlite3*);
|
||||
int (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
|
||||
int (*expired)(sqlite3_stmt*);
|
||||
int (*finalize)(sqlite3_stmt*pStmt);
|
||||
void (*free)(void*);
|
||||
void (*free_table)(char**result);
|
||||
int (*get_autocommit)(sqlite3*);
|
||||
void * (*get_auxdata)(sqlite3_context*,int);
|
||||
int (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
|
||||
int (*global_recover)(void);
|
||||
void (*interruptx)(sqlite3*);
|
||||
sqlite_int64 (*last_insert_rowid)(sqlite3*);
|
||||
const char * (*libversion)(void);
|
||||
int (*libversion_number)(void);
|
||||
void *(*malloc)(int);
|
||||
char * (*mprintf)(const char*,...);
|
||||
int (*open)(const char*,sqlite3**);
|
||||
int (*open16)(const void*,sqlite3**);
|
||||
int (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
|
||||
void (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
|
||||
void *(*realloc)(void*,int);
|
||||
int (*reset)(sqlite3_stmt*pStmt);
|
||||
void (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_double)(sqlite3_context*,double);
|
||||
void (*result_error)(sqlite3_context*,const char*,int);
|
||||
void (*result_error16)(sqlite3_context*,const void*,int);
|
||||
void (*result_int)(sqlite3_context*,int);
|
||||
void (*result_int64)(sqlite3_context*,sqlite_int64);
|
||||
void (*result_null)(sqlite3_context*);
|
||||
void (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
|
||||
void (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
|
||||
void (*result_value)(sqlite3_context*,sqlite3_value*);
|
||||
void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
|
||||
int (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
|
||||
const char*,const char*),void*);
|
||||
void (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
|
||||
char * (*xsnprintf)(int,char*,const char*,...);
|
||||
int (*step)(sqlite3_stmt*);
|
||||
int (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
|
||||
char const**,char const**,int*,int*,int*);
|
||||
void (*thread_cleanup)(void);
|
||||
int (*total_changes)(sqlite3*);
|
||||
void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
|
||||
int (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
|
||||
void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
|
||||
sqlite_int64),void*);
|
||||
void * (*user_data)(sqlite3_context*);
|
||||
const void * (*value_blob)(sqlite3_value*);
|
||||
int (*value_bytes)(sqlite3_value*);
|
||||
int (*value_bytes16)(sqlite3_value*);
|
||||
double (*value_double)(sqlite3_value*);
|
||||
int (*value_int)(sqlite3_value*);
|
||||
sqlite_int64 (*value_int64)(sqlite3_value*);
|
||||
int (*value_numeric_type)(sqlite3_value*);
|
||||
const unsigned char * (*value_text)(sqlite3_value*);
|
||||
const void * (*value_text16)(sqlite3_value*);
|
||||
const void * (*value_text16be)(sqlite3_value*);
|
||||
const void * (*value_text16le)(sqlite3_value*);
|
||||
int (*value_type)(sqlite3_value*);
|
||||
char *(*vmprintf)(const char*,va_list);
|
||||
/* Added ??? */
|
||||
int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
|
||||
/* Added by 3.3.13 */
|
||||
int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
|
||||
int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
|
||||
int (*clear_bindings)(sqlite3_stmt*);
|
||||
/* Added by 3.4.1 */
|
||||
int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
|
||||
void (*xDestroy)(void *));
|
||||
/* Added by 3.5.0 */
|
||||
int (*bind_zeroblob)(sqlite3_stmt*,int,int);
|
||||
int (*blob_bytes)(sqlite3_blob*);
|
||||
int (*blob_close)(sqlite3_blob*);
|
||||
int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
|
||||
int,sqlite3_blob**);
|
||||
int (*blob_read)(sqlite3_blob*,void*,int,int);
|
||||
int (*blob_write)(sqlite3_blob*,const void*,int,int);
|
||||
int (*create_collation_v2)(sqlite3*,const char*,int,void*,
|
||||
int(*)(void*,int,const void*,int,const void*),
|
||||
void(*)(void*));
|
||||
int (*file_control)(sqlite3*,const char*,int,void*);
|
||||
sqlite3_int64 (*memory_highwater)(int);
|
||||
sqlite3_int64 (*memory_used)(void);
|
||||
sqlite3_mutex *(*mutex_alloc)(int);
|
||||
void (*mutex_enter)(sqlite3_mutex*);
|
||||
void (*mutex_free)(sqlite3_mutex*);
|
||||
void (*mutex_leave)(sqlite3_mutex*);
|
||||
int (*mutex_try)(sqlite3_mutex*);
|
||||
int (*open_v2)(const char*,sqlite3**,int,const char*);
|
||||
int (*release_memory)(int);
|
||||
void (*result_error_nomem)(sqlite3_context*);
|
||||
void (*result_error_toobig)(sqlite3_context*);
|
||||
int (*sleep)(int);
|
||||
void (*soft_heap_limit)(int);
|
||||
sqlite3_vfs *(*vfs_find)(const char*);
|
||||
int (*vfs_register)(sqlite3_vfs*,int);
|
||||
int (*vfs_unregister)(sqlite3_vfs*);
|
||||
int (*xthreadsafe)(void);
|
||||
void (*result_zeroblob)(sqlite3_context*,int);
|
||||
void (*result_error_code)(sqlite3_context*,int);
|
||||
int (*test_control)(int, ...);
|
||||
void (*randomness)(int,void*);
|
||||
sqlite3 *(*context_db_handle)(sqlite3_context*);
|
||||
int (*extended_result_codes)(sqlite3*,int);
|
||||
int (*limit)(sqlite3*,int,int);
|
||||
sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
|
||||
const char *(*sql)(sqlite3_stmt*);
|
||||
int (*status)(int,int*,int*,int);
|
||||
int (*backup_finish)(sqlite3_backup*);
|
||||
sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
|
||||
int (*backup_pagecount)(sqlite3_backup*);
|
||||
int (*backup_remaining)(sqlite3_backup*);
|
||||
int (*backup_step)(sqlite3_backup*,int);
|
||||
const char *(*compileoption_get)(int);
|
||||
int (*compileoption_used)(const char*);
|
||||
int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*),
|
||||
void(*xDestroy)(void*));
|
||||
int (*db_config)(sqlite3*,int,...);
|
||||
sqlite3_mutex *(*db_mutex)(sqlite3*);
|
||||
int (*db_status)(sqlite3*,int,int*,int*,int);
|
||||
int (*extended_errcode)(sqlite3*);
|
||||
void (*log)(int,const char*,...);
|
||||
sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
|
||||
const char *(*sourceid)(void);
|
||||
int (*stmt_status)(sqlite3_stmt*,int,int);
|
||||
int (*strnicmp)(const char*,const char*,int);
|
||||
int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
|
||||
int (*wal_autocheckpoint)(sqlite3*,int);
|
||||
int (*wal_checkpoint)(sqlite3*,const char*);
|
||||
void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
|
||||
int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
|
||||
int (*vtab_config)(sqlite3*,int op,...);
|
||||
int (*vtab_on_conflict)(sqlite3*);
|
||||
/* Version 3.7.16 and later */
|
||||
int (*close_v2)(sqlite3*);
|
||||
const char *(*db_filename)(sqlite3*,const char*);
|
||||
int (*db_readonly)(sqlite3*,const char*);
|
||||
int (*db_release_memory)(sqlite3*);
|
||||
const char *(*errstr)(int);
|
||||
int (*stmt_busy)(sqlite3_stmt*);
|
||||
int (*stmt_readonly)(sqlite3_stmt*);
|
||||
int (*stricmp)(const char*,const char*);
|
||||
int (*uri_boolean)(const char*,const char*,int);
|
||||
sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
|
||||
const char *(*uri_parameter)(const char*,const char*);
|
||||
char *(*xvsnprintf)(int,char*,const char*,va_list);
|
||||
int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
|
||||
/* Version 3.8.7 and later */
|
||||
int (*auto_extension)(void(*)(void));
|
||||
int (*bind_blob64)(sqlite3_stmt*,int,const void*,sqlite3_uint64,
|
||||
void(*)(void*));
|
||||
int (*bind_text64)(sqlite3_stmt*,int,const char*,sqlite3_uint64,
|
||||
void(*)(void*),unsigned char);
|
||||
int (*cancel_auto_extension)(void(*)(void));
|
||||
int (*load_extension)(sqlite3*,const char*,const char*,char**);
|
||||
void *(*malloc64)(sqlite3_uint64);
|
||||
sqlite3_uint64 (*msize)(void*);
|
||||
void *(*realloc64)(void*,sqlite3_uint64);
|
||||
void (*reset_auto_extension)(void);
|
||||
void (*result_blob64)(sqlite3_context*,const void*,sqlite3_uint64,
|
||||
void(*)(void*));
|
||||
void (*result_text64)(sqlite3_context*,const char*,sqlite3_uint64,
|
||||
void(*)(void*), unsigned char);
|
||||
int (*strglob)(const char*,const char*);
|
||||
/* Version 3.8.11 and later */
|
||||
sqlite3_value *(*value_dup)(const sqlite3_value*);
|
||||
void (*value_free)(sqlite3_value*);
|
||||
int (*result_zeroblob64)(sqlite3_context*,sqlite3_uint64);
|
||||
int (*bind_zeroblob64)(sqlite3_stmt*, int, sqlite3_uint64);
|
||||
/* Version 3.9.0 and later */
|
||||
unsigned int (*value_subtype)(sqlite3_value*);
|
||||
void (*result_subtype)(sqlite3_context*,unsigned int);
|
||||
/* Version 3.10.0 and later */
|
||||
int (*status64)(int,sqlite3_int64*,sqlite3_int64*,int);
|
||||
int (*strlike)(const char*,const char*,unsigned int);
|
||||
int (*db_cacheflush)(sqlite3*);
|
||||
/* Version 3.12.0 and later */
|
||||
int (*system_errno)(sqlite3*);
|
||||
/* Version 3.14.0 and later */
|
||||
int (*trace_v2)(sqlite3*,unsigned,int(*)(unsigned,void*,void*,void*),void*);
|
||||
char *(*expanded_sql)(sqlite3_stmt*);
|
||||
/* Version 3.18.0 and later */
|
||||
void (*set_last_insert_rowid)(sqlite3*,sqlite3_int64);
|
||||
/* Version 3.20.0 and later */
|
||||
int (*prepare_v3)(sqlite3*,const char*,int,unsigned int,
|
||||
sqlite3_stmt**,const char**);
|
||||
int (*prepare16_v3)(sqlite3*,const void*,int,unsigned int,
|
||||
sqlite3_stmt**,const void**);
|
||||
int (*bind_pointer)(sqlite3_stmt*,int,void*,const char*,void(*)(void*));
|
||||
void (*result_pointer)(sqlite3_context*,void*,const char*,void(*)(void*));
|
||||
void *(*value_pointer)(sqlite3_value*,const char*);
|
||||
int (*vtab_nochange)(sqlite3_context*);
|
||||
int (*value_nochange)(sqlite3_value*);
|
||||
const char *(*vtab_collation)(sqlite3_index_info*,int);
|
||||
/* Version 3.24.0 and later */
|
||||
int (*keyword_count)(void);
|
||||
int (*keyword_name)(int,const char**,int*);
|
||||
int (*keyword_check)(const char*,int);
|
||||
sqlite3_str *(*str_new)(sqlite3*);
|
||||
char *(*str_finish)(sqlite3_str*);
|
||||
void (*str_appendf)(sqlite3_str*, const char *zFormat, ...);
|
||||
void (*str_vappendf)(sqlite3_str*, const char *zFormat, va_list);
|
||||
void (*str_append)(sqlite3_str*, const char *zIn, int N);
|
||||
void (*str_appendall)(sqlite3_str*, const char *zIn);
|
||||
void (*str_appendchar)(sqlite3_str*, int N, char C);
|
||||
void (*str_reset)(sqlite3_str*);
|
||||
int (*str_errcode)(sqlite3_str*);
|
||||
int (*str_length)(sqlite3_str*);
|
||||
char *(*str_value)(sqlite3_str*);
|
||||
/* Version 3.25.0 and later */
|
||||
int (*create_window_function)(sqlite3*,const char*,int,int,void*,
|
||||
void (*xStep)(sqlite3_context*,int,sqlite3_value**),
|
||||
void (*xFinal)(sqlite3_context*),
|
||||
void (*xValue)(sqlite3_context*),
|
||||
void (*xInv)(sqlite3_context*,int,sqlite3_value**),
|
||||
void(*xDestroy)(void*));
|
||||
/* Version 3.26.0 and later */
|
||||
const char *(*normalized_sql)(sqlite3_stmt*);
|
||||
/* Version 3.28.0 and later */
|
||||
int (*stmt_isexplain)(sqlite3_stmt*);
|
||||
int (*value_frombind)(sqlite3_value*);
|
||||
/* Version 3.30.0 and later */
|
||||
int (*drop_modules)(sqlite3*,const char**);
|
||||
/* Version 3.31.0 and later */
|
||||
sqlite3_int64 (*hard_heap_limit64)(sqlite3_int64);
|
||||
const char *(*uri_key)(const char*,int);
|
||||
const char *(*filename_database)(const char*);
|
||||
const char *(*filename_journal)(const char*);
|
||||
const char *(*filename_wal)(const char*);
|
||||
/* Version 3.32.0 and later */
|
||||
const char *(*create_filename)(const char*,const char*,const char*,
|
||||
int,const char**);
|
||||
void (*free_filename)(const char*);
|
||||
sqlite3_file *(*database_file_object)(const char*);
|
||||
/* Version 3.34.0 and later */
|
||||
int (*txn_state)(sqlite3*,const char*);
|
||||
/* Version 3.36.1 and later */
|
||||
sqlite3_int64 (*changes64)(sqlite3*);
|
||||
sqlite3_int64 (*total_changes64)(sqlite3*);
|
||||
/* Version 3.37.0 and later */
|
||||
int (*autovacuum_pages)(sqlite3*,
|
||||
unsigned int(*)(void*,const char*,unsigned int,unsigned int,unsigned int),
|
||||
void*, void(*)(void*));
|
||||
/* Version 3.38.0 and later */
|
||||
int (*error_offset)(sqlite3*);
|
||||
int (*vtab_rhs_value)(sqlite3_index_info*,int,sqlite3_value**);
|
||||
int (*vtab_distinct)(sqlite3_index_info*);
|
||||
int (*vtab_in)(sqlite3_index_info*,int,int);
|
||||
int (*vtab_in_first)(sqlite3_value*,sqlite3_value**);
|
||||
int (*vtab_in_next)(sqlite3_value*,sqlite3_value**);
|
||||
/* Version 3.39.0 and later */
|
||||
int (*deserialize)(sqlite3*,const char*,unsigned char*,
|
||||
sqlite3_int64,sqlite3_int64,unsigned);
|
||||
unsigned char *(*serialize)(sqlite3*,const char *,sqlite3_int64*,
|
||||
unsigned int);
|
||||
const char *(*db_name)(sqlite3*,int);
|
||||
/* Version 3.40.0 and later */
|
||||
int (*value_encoding)(sqlite3_value*);
|
||||
/* Version 3.41.0 and later */
|
||||
int (*is_interrupted)(sqlite3*);
|
||||
/* Version 3.43.0 and later */
|
||||
int (*stmt_explain)(sqlite3_stmt*,int);
|
||||
/* Version 3.44.0 and later */
|
||||
void *(*get_clientdata)(sqlite3*,const char*);
|
||||
int (*set_clientdata)(sqlite3*, const char*, void*, void(*)(void*));
|
||||
};
|
||||
|
||||
/*
|
||||
** This is the function signature used for all extension entry points. It
|
||||
** is also defined in the file "loadext.c".
|
||||
*/
|
||||
typedef int (*sqlite3_loadext_entry)(
|
||||
sqlite3 *db, /* Handle to the database. */
|
||||
char **pzErrMsg, /* Used to set error string on failure. */
|
||||
const sqlite3_api_routines *pThunk /* Extension API function pointers. */
|
||||
);
|
||||
|
||||
/*
|
||||
** The following macros redefine the API routines so that they are
|
||||
** redirected through the global sqlite3_api structure.
|
||||
**
|
||||
** This header file is also used by the loadext.c source file
|
||||
** (part of the main SQLite library - not an extension) so that
|
||||
** it can get access to the sqlite3_api_routines structure
|
||||
** definition. But the main library does not want to redefine
|
||||
** the API. So the redefinition macros are only valid if the
|
||||
** SQLITE_CORE macros is undefined.
|
||||
*/
|
||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||
#define sqlite3_aggregate_context sqlite3_api->aggregate_context
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_aggregate_count sqlite3_api->aggregate_count
|
||||
#endif
|
||||
#define sqlite3_bind_blob sqlite3_api->bind_blob
|
||||
#define sqlite3_bind_double sqlite3_api->bind_double
|
||||
#define sqlite3_bind_int sqlite3_api->bind_int
|
||||
#define sqlite3_bind_int64 sqlite3_api->bind_int64
|
||||
#define sqlite3_bind_null sqlite3_api->bind_null
|
||||
#define sqlite3_bind_parameter_count sqlite3_api->bind_parameter_count
|
||||
#define sqlite3_bind_parameter_index sqlite3_api->bind_parameter_index
|
||||
#define sqlite3_bind_parameter_name sqlite3_api->bind_parameter_name
|
||||
#define sqlite3_bind_text sqlite3_api->bind_text
|
||||
#define sqlite3_bind_text16 sqlite3_api->bind_text16
|
||||
#define sqlite3_bind_value sqlite3_api->bind_value
|
||||
#define sqlite3_busy_handler sqlite3_api->busy_handler
|
||||
#define sqlite3_busy_timeout sqlite3_api->busy_timeout
|
||||
#define sqlite3_changes sqlite3_api->changes
|
||||
#define sqlite3_close sqlite3_api->close
|
||||
#define sqlite3_collation_needed sqlite3_api->collation_needed
|
||||
#define sqlite3_collation_needed16 sqlite3_api->collation_needed16
|
||||
#define sqlite3_column_blob sqlite3_api->column_blob
|
||||
#define sqlite3_column_bytes sqlite3_api->column_bytes
|
||||
#define sqlite3_column_bytes16 sqlite3_api->column_bytes16
|
||||
#define sqlite3_column_count sqlite3_api->column_count
|
||||
#define sqlite3_column_database_name sqlite3_api->column_database_name
|
||||
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
|
||||
#define sqlite3_column_decltype sqlite3_api->column_decltype
|
||||
#define sqlite3_column_decltype16 sqlite3_api->column_decltype16
|
||||
#define sqlite3_column_double sqlite3_api->column_double
|
||||
#define sqlite3_column_int sqlite3_api->column_int
|
||||
#define sqlite3_column_int64 sqlite3_api->column_int64
|
||||
#define sqlite3_column_name sqlite3_api->column_name
|
||||
#define sqlite3_column_name16 sqlite3_api->column_name16
|
||||
#define sqlite3_column_origin_name sqlite3_api->column_origin_name
|
||||
#define sqlite3_column_origin_name16 sqlite3_api->column_origin_name16
|
||||
#define sqlite3_column_table_name sqlite3_api->column_table_name
|
||||
#define sqlite3_column_table_name16 sqlite3_api->column_table_name16
|
||||
#define sqlite3_column_text sqlite3_api->column_text
|
||||
#define sqlite3_column_text16 sqlite3_api->column_text16
|
||||
#define sqlite3_column_type sqlite3_api->column_type
|
||||
#define sqlite3_column_value sqlite3_api->column_value
|
||||
#define sqlite3_commit_hook sqlite3_api->commit_hook
|
||||
#define sqlite3_complete sqlite3_api->complete
|
||||
#define sqlite3_complete16 sqlite3_api->complete16
|
||||
#define sqlite3_create_collation sqlite3_api->create_collation
|
||||
#define sqlite3_create_collation16 sqlite3_api->create_collation16
|
||||
#define sqlite3_create_function sqlite3_api->create_function
|
||||
#define sqlite3_create_function16 sqlite3_api->create_function16
|
||||
#define sqlite3_create_module sqlite3_api->create_module
|
||||
#define sqlite3_create_module_v2 sqlite3_api->create_module_v2
|
||||
#define sqlite3_data_count sqlite3_api->data_count
|
||||
#define sqlite3_db_handle sqlite3_api->db_handle
|
||||
#define sqlite3_declare_vtab sqlite3_api->declare_vtab
|
||||
#define sqlite3_enable_shared_cache sqlite3_api->enable_shared_cache
|
||||
#define sqlite3_errcode sqlite3_api->errcode
|
||||
#define sqlite3_errmsg sqlite3_api->errmsg
|
||||
#define sqlite3_errmsg16 sqlite3_api->errmsg16
|
||||
#define sqlite3_exec sqlite3_api->exec
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_expired sqlite3_api->expired
|
||||
#endif
|
||||
#define sqlite3_finalize sqlite3_api->finalize
|
||||
#define sqlite3_free sqlite3_api->free
|
||||
#define sqlite3_free_table sqlite3_api->free_table
|
||||
#define sqlite3_get_autocommit sqlite3_api->get_autocommit
|
||||
#define sqlite3_get_auxdata sqlite3_api->get_auxdata
|
||||
#define sqlite3_get_table sqlite3_api->get_table
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_global_recover sqlite3_api->global_recover
|
||||
#endif
|
||||
#define sqlite3_interrupt sqlite3_api->interruptx
|
||||
#define sqlite3_last_insert_rowid sqlite3_api->last_insert_rowid
|
||||
#define sqlite3_libversion sqlite3_api->libversion
|
||||
#define sqlite3_libversion_number sqlite3_api->libversion_number
|
||||
#define sqlite3_malloc sqlite3_api->malloc
|
||||
#define sqlite3_mprintf sqlite3_api->mprintf
|
||||
#define sqlite3_open sqlite3_api->open
|
||||
#define sqlite3_open16 sqlite3_api->open16
|
||||
#define sqlite3_prepare sqlite3_api->prepare
|
||||
#define sqlite3_prepare16 sqlite3_api->prepare16
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_profile sqlite3_api->profile
|
||||
#define sqlite3_progress_handler sqlite3_api->progress_handler
|
||||
#define sqlite3_realloc sqlite3_api->realloc
|
||||
#define sqlite3_reset sqlite3_api->reset
|
||||
#define sqlite3_result_blob sqlite3_api->result_blob
|
||||
#define sqlite3_result_double sqlite3_api->result_double
|
||||
#define sqlite3_result_error sqlite3_api->result_error
|
||||
#define sqlite3_result_error16 sqlite3_api->result_error16
|
||||
#define sqlite3_result_int sqlite3_api->result_int
|
||||
#define sqlite3_result_int64 sqlite3_api->result_int64
|
||||
#define sqlite3_result_null sqlite3_api->result_null
|
||||
#define sqlite3_result_text sqlite3_api->result_text
|
||||
#define sqlite3_result_text16 sqlite3_api->result_text16
|
||||
#define sqlite3_result_text16be sqlite3_api->result_text16be
|
||||
#define sqlite3_result_text16le sqlite3_api->result_text16le
|
||||
#define sqlite3_result_value sqlite3_api->result_value
|
||||
#define sqlite3_rollback_hook sqlite3_api->rollback_hook
|
||||
#define sqlite3_set_authorizer sqlite3_api->set_authorizer
|
||||
#define sqlite3_set_auxdata sqlite3_api->set_auxdata
|
||||
#define sqlite3_snprintf sqlite3_api->xsnprintf
|
||||
#define sqlite3_step sqlite3_api->step
|
||||
#define sqlite3_table_column_metadata sqlite3_api->table_column_metadata
|
||||
#define sqlite3_thread_cleanup sqlite3_api->thread_cleanup
|
||||
#define sqlite3_total_changes sqlite3_api->total_changes
|
||||
#define sqlite3_trace sqlite3_api->trace
|
||||
#ifndef SQLITE_OMIT_DEPRECATED
|
||||
#define sqlite3_transfer_bindings sqlite3_api->transfer_bindings
|
||||
#endif
|
||||
#define sqlite3_update_hook sqlite3_api->update_hook
|
||||
#define sqlite3_user_data sqlite3_api->user_data
|
||||
#define sqlite3_value_blob sqlite3_api->value_blob
|
||||
#define sqlite3_value_bytes sqlite3_api->value_bytes
|
||||
#define sqlite3_value_bytes16 sqlite3_api->value_bytes16
|
||||
#define sqlite3_value_double sqlite3_api->value_double
|
||||
#define sqlite3_value_int sqlite3_api->value_int
|
||||
#define sqlite3_value_int64 sqlite3_api->value_int64
|
||||
#define sqlite3_value_numeric_type sqlite3_api->value_numeric_type
|
||||
#define sqlite3_value_text sqlite3_api->value_text
|
||||
#define sqlite3_value_text16 sqlite3_api->value_text16
|
||||
#define sqlite3_value_text16be sqlite3_api->value_text16be
|
||||
#define sqlite3_value_text16le sqlite3_api->value_text16le
|
||||
#define sqlite3_value_type sqlite3_api->value_type
|
||||
#define sqlite3_vmprintf sqlite3_api->vmprintf
|
||||
#define sqlite3_vsnprintf sqlite3_api->xvsnprintf
|
||||
#define sqlite3_overload_function sqlite3_api->overload_function
|
||||
#define sqlite3_prepare_v2 sqlite3_api->prepare_v2
|
||||
#define sqlite3_prepare16_v2 sqlite3_api->prepare16_v2
|
||||
#define sqlite3_clear_bindings sqlite3_api->clear_bindings
|
||||
#define sqlite3_bind_zeroblob sqlite3_api->bind_zeroblob
|
||||
#define sqlite3_blob_bytes sqlite3_api->blob_bytes
|
||||
#define sqlite3_blob_close sqlite3_api->blob_close
|
||||
#define sqlite3_blob_open sqlite3_api->blob_open
|
||||
#define sqlite3_blob_read sqlite3_api->blob_read
|
||||
#define sqlite3_blob_write sqlite3_api->blob_write
|
||||
#define sqlite3_create_collation_v2 sqlite3_api->create_collation_v2
|
||||
#define sqlite3_file_control sqlite3_api->file_control
|
||||
#define sqlite3_memory_highwater sqlite3_api->memory_highwater
|
||||
#define sqlite3_memory_used sqlite3_api->memory_used
|
||||
#define sqlite3_mutex_alloc sqlite3_api->mutex_alloc
|
||||
#define sqlite3_mutex_enter sqlite3_api->mutex_enter
|
||||
#define sqlite3_mutex_free sqlite3_api->mutex_free
|
||||
#define sqlite3_mutex_leave sqlite3_api->mutex_leave
|
||||
#define sqlite3_mutex_try sqlite3_api->mutex_try
|
||||
#define sqlite3_open_v2 sqlite3_api->open_v2
|
||||
#define sqlite3_release_memory sqlite3_api->release_memory
|
||||
#define sqlite3_result_error_nomem sqlite3_api->result_error_nomem
|
||||
#define sqlite3_result_error_toobig sqlite3_api->result_error_toobig
|
||||
#define sqlite3_sleep sqlite3_api->sleep
|
||||
#define sqlite3_soft_heap_limit sqlite3_api->soft_heap_limit
|
||||
#define sqlite3_vfs_find sqlite3_api->vfs_find
|
||||
#define sqlite3_vfs_register sqlite3_api->vfs_register
|
||||
#define sqlite3_vfs_unregister sqlite3_api->vfs_unregister
|
||||
#define sqlite3_threadsafe sqlite3_api->xthreadsafe
|
||||
#define sqlite3_result_zeroblob sqlite3_api->result_zeroblob
|
||||
#define sqlite3_result_error_code sqlite3_api->result_error_code
|
||||
#define sqlite3_test_control sqlite3_api->test_control
|
||||
#define sqlite3_randomness sqlite3_api->randomness
|
||||
#define sqlite3_context_db_handle sqlite3_api->context_db_handle
|
||||
#define sqlite3_extended_result_codes sqlite3_api->extended_result_codes
|
||||
#define sqlite3_limit sqlite3_api->limit
|
||||
#define sqlite3_next_stmt sqlite3_api->next_stmt
|
||||
#define sqlite3_sql sqlite3_api->sql
|
||||
#define sqlite3_status sqlite3_api->status
|
||||
#define sqlite3_backup_finish sqlite3_api->backup_finish
|
||||
#define sqlite3_backup_init sqlite3_api->backup_init
|
||||
#define sqlite3_backup_pagecount sqlite3_api->backup_pagecount
|
||||
#define sqlite3_backup_remaining sqlite3_api->backup_remaining
|
||||
#define sqlite3_backup_step sqlite3_api->backup_step
|
||||
#define sqlite3_compileoption_get sqlite3_api->compileoption_get
|
||||
#define sqlite3_compileoption_used sqlite3_api->compileoption_used
|
||||
#define sqlite3_create_function_v2 sqlite3_api->create_function_v2
|
||||
#define sqlite3_db_config sqlite3_api->db_config
|
||||
#define sqlite3_db_mutex sqlite3_api->db_mutex
|
||||
#define sqlite3_db_status sqlite3_api->db_status
|
||||
#define sqlite3_extended_errcode sqlite3_api->extended_errcode
|
||||
#define sqlite3_log sqlite3_api->log
|
||||
#define sqlite3_soft_heap_limit64 sqlite3_api->soft_heap_limit64
|
||||
#define sqlite3_sourceid sqlite3_api->sourceid
|
||||
#define sqlite3_stmt_status sqlite3_api->stmt_status
|
||||
#define sqlite3_strnicmp sqlite3_api->strnicmp
|
||||
#define sqlite3_unlock_notify sqlite3_api->unlock_notify
|
||||
#define sqlite3_wal_autocheckpoint sqlite3_api->wal_autocheckpoint
|
||||
#define sqlite3_wal_checkpoint sqlite3_api->wal_checkpoint
|
||||
#define sqlite3_wal_hook sqlite3_api->wal_hook
|
||||
#define sqlite3_blob_reopen sqlite3_api->blob_reopen
|
||||
#define sqlite3_vtab_config sqlite3_api->vtab_config
|
||||
#define sqlite3_vtab_on_conflict sqlite3_api->vtab_on_conflict
|
||||
/* Version 3.7.16 and later */
|
||||
#define sqlite3_close_v2 sqlite3_api->close_v2
|
||||
#define sqlite3_db_filename sqlite3_api->db_filename
|
||||
#define sqlite3_db_readonly sqlite3_api->db_readonly
|
||||
#define sqlite3_db_release_memory sqlite3_api->db_release_memory
|
||||
#define sqlite3_errstr sqlite3_api->errstr
|
||||
#define sqlite3_stmt_busy sqlite3_api->stmt_busy
|
||||
#define sqlite3_stmt_readonly sqlite3_api->stmt_readonly
|
||||
#define sqlite3_stricmp sqlite3_api->stricmp
|
||||
#define sqlite3_uri_boolean sqlite3_api->uri_boolean
|
||||
#define sqlite3_uri_int64 sqlite3_api->uri_int64
|
||||
#define sqlite3_uri_parameter sqlite3_api->uri_parameter
|
||||
#define sqlite3_uri_vsnprintf sqlite3_api->xvsnprintf
|
||||
#define sqlite3_wal_checkpoint_v2 sqlite3_api->wal_checkpoint_v2
|
||||
/* Version 3.8.7 and later */
|
||||
#define sqlite3_auto_extension sqlite3_api->auto_extension
|
||||
#define sqlite3_bind_blob64 sqlite3_api->bind_blob64
|
||||
#define sqlite3_bind_text64 sqlite3_api->bind_text64
|
||||
#define sqlite3_cancel_auto_extension sqlite3_api->cancel_auto_extension
|
||||
#define sqlite3_load_extension sqlite3_api->load_extension
|
||||
#define sqlite3_malloc64 sqlite3_api->malloc64
|
||||
#define sqlite3_msize sqlite3_api->msize
|
||||
#define sqlite3_realloc64 sqlite3_api->realloc64
|
||||
#define sqlite3_reset_auto_extension sqlite3_api->reset_auto_extension
|
||||
#define sqlite3_result_blob64 sqlite3_api->result_blob64
|
||||
#define sqlite3_result_text64 sqlite3_api->result_text64
|
||||
#define sqlite3_strglob sqlite3_api->strglob
|
||||
/* Version 3.8.11 and later */
|
||||
#define sqlite3_value_dup sqlite3_api->value_dup
|
||||
#define sqlite3_value_free sqlite3_api->value_free
|
||||
#define sqlite3_result_zeroblob64 sqlite3_api->result_zeroblob64
|
||||
#define sqlite3_bind_zeroblob64 sqlite3_api->bind_zeroblob64
|
||||
/* Version 3.9.0 and later */
|
||||
#define sqlite3_value_subtype sqlite3_api->value_subtype
|
||||
#define sqlite3_result_subtype sqlite3_api->result_subtype
|
||||
/* Version 3.10.0 and later */
|
||||
#define sqlite3_status64 sqlite3_api->status64
|
||||
#define sqlite3_strlike sqlite3_api->strlike
|
||||
#define sqlite3_db_cacheflush sqlite3_api->db_cacheflush
|
||||
/* Version 3.12.0 and later */
|
||||
#define sqlite3_system_errno sqlite3_api->system_errno
|
||||
/* Version 3.14.0 and later */
|
||||
#define sqlite3_trace_v2 sqlite3_api->trace_v2
|
||||
#define sqlite3_expanded_sql sqlite3_api->expanded_sql
|
||||
/* Version 3.18.0 and later */
|
||||
#define sqlite3_set_last_insert_rowid sqlite3_api->set_last_insert_rowid
|
||||
/* Version 3.20.0 and later */
|
||||
#define sqlite3_prepare_v3 sqlite3_api->prepare_v3
|
||||
#define sqlite3_prepare16_v3 sqlite3_api->prepare16_v3
|
||||
#define sqlite3_bind_pointer sqlite3_api->bind_pointer
|
||||
#define sqlite3_result_pointer sqlite3_api->result_pointer
|
||||
#define sqlite3_value_pointer sqlite3_api->value_pointer
|
||||
/* Version 3.22.0 and later */
|
||||
#define sqlite3_vtab_nochange sqlite3_api->vtab_nochange
|
||||
#define sqlite3_value_nochange sqlite3_api->value_nochange
|
||||
#define sqlite3_vtab_collation sqlite3_api->vtab_collation
|
||||
/* Version 3.24.0 and later */
|
||||
#define sqlite3_keyword_count sqlite3_api->keyword_count
|
||||
#define sqlite3_keyword_name sqlite3_api->keyword_name
|
||||
#define sqlite3_keyword_check sqlite3_api->keyword_check
|
||||
#define sqlite3_str_new sqlite3_api->str_new
|
||||
#define sqlite3_str_finish sqlite3_api->str_finish
|
||||
#define sqlite3_str_appendf sqlite3_api->str_appendf
|
||||
#define sqlite3_str_vappendf sqlite3_api->str_vappendf
|
||||
#define sqlite3_str_append sqlite3_api->str_append
|
||||
#define sqlite3_str_appendall sqlite3_api->str_appendall
|
||||
#define sqlite3_str_appendchar sqlite3_api->str_appendchar
|
||||
#define sqlite3_str_reset sqlite3_api->str_reset
|
||||
#define sqlite3_str_errcode sqlite3_api->str_errcode
|
||||
#define sqlite3_str_length sqlite3_api->str_length
|
||||
#define sqlite3_str_value sqlite3_api->str_value
|
||||
/* Version 3.25.0 and later */
|
||||
#define sqlite3_create_window_function sqlite3_api->create_window_function
|
||||
/* Version 3.26.0 and later */
|
||||
#define sqlite3_normalized_sql sqlite3_api->normalized_sql
|
||||
/* Version 3.28.0 and later */
|
||||
#define sqlite3_stmt_isexplain sqlite3_api->stmt_isexplain
|
||||
#define sqlite3_value_frombind sqlite3_api->value_frombind
|
||||
/* Version 3.30.0 and later */
|
||||
#define sqlite3_drop_modules sqlite3_api->drop_modules
|
||||
/* Version 3.31.0 and later */
|
||||
#define sqlite3_hard_heap_limit64 sqlite3_api->hard_heap_limit64
|
||||
#define sqlite3_uri_key sqlite3_api->uri_key
|
||||
#define sqlite3_filename_database sqlite3_api->filename_database
|
||||
#define sqlite3_filename_journal sqlite3_api->filename_journal
|
||||
#define sqlite3_filename_wal sqlite3_api->filename_wal
|
||||
/* Version 3.32.0 and later */
|
||||
#define sqlite3_create_filename sqlite3_api->create_filename
|
||||
#define sqlite3_free_filename sqlite3_api->free_filename
|
||||
#define sqlite3_database_file_object sqlite3_api->database_file_object
|
||||
/* Version 3.34.0 and later */
|
||||
#define sqlite3_txn_state sqlite3_api->txn_state
|
||||
/* Version 3.36.1 and later */
|
||||
#define sqlite3_changes64 sqlite3_api->changes64
|
||||
#define sqlite3_total_changes64 sqlite3_api->total_changes64
|
||||
/* Version 3.37.0 and later */
|
||||
#define sqlite3_autovacuum_pages sqlite3_api->autovacuum_pages
|
||||
/* Version 3.38.0 and later */
|
||||
#define sqlite3_error_offset sqlite3_api->error_offset
|
||||
#define sqlite3_vtab_rhs_value sqlite3_api->vtab_rhs_value
|
||||
#define sqlite3_vtab_distinct sqlite3_api->vtab_distinct
|
||||
#define sqlite3_vtab_in sqlite3_api->vtab_in
|
||||
#define sqlite3_vtab_in_first sqlite3_api->vtab_in_first
|
||||
#define sqlite3_vtab_in_next sqlite3_api->vtab_in_next
|
||||
/* Version 3.39.0 and later */
|
||||
#ifndef SQLITE_OMIT_DESERIALIZE
|
||||
#define sqlite3_deserialize sqlite3_api->deserialize
|
||||
#define sqlite3_serialize sqlite3_api->serialize
|
||||
#endif
|
||||
#define sqlite3_db_name sqlite3_api->db_name
|
||||
/* Version 3.40.0 and later */
|
||||
#define sqlite3_value_encoding sqlite3_api->value_encoding
|
||||
/* Version 3.41.0 and later */
|
||||
#define sqlite3_is_interrupted sqlite3_api->is_interrupted
|
||||
/* Version 3.43.0 and later */
|
||||
#define sqlite3_stmt_explain sqlite3_api->stmt_explain
|
||||
/* Version 3.44.0 and later */
|
||||
#define sqlite3_get_clientdata sqlite3_api->get_clientdata
|
||||
#define sqlite3_set_clientdata sqlite3_api->set_clientdata
|
||||
#endif /* !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION) */
|
||||
|
||||
#if !defined(SQLITE_CORE) && !defined(SQLITE_OMIT_LOAD_EXTENSION)
|
||||
/* This case when the file really is being compiled as a loadable
|
||||
** extension */
|
||||
# define SQLITE_EXTENSION_INIT1 const sqlite3_api_routines *sqlite3_api=0;
|
||||
# define SQLITE_EXTENSION_INIT2(v) sqlite3_api=v;
|
||||
# define SQLITE_EXTENSION_INIT3 \
|
||||
extern const sqlite3_api_routines *sqlite3_api;
|
||||
#else
|
||||
/* This case when the file is being statically linked into the
|
||||
** application */
|
||||
# define SQLITE_EXTENSION_INIT1 /*no-op*/
|
||||
# define SQLITE_EXTENSION_INIT2(v) (void)v; /* unused parameter */
|
||||
# define SQLITE_EXTENSION_INIT3 /*no-op*/
|
||||
#endif
|
||||
|
||||
#endif /* SQLITE3EXT_H */
|
||||
BIN
server/node_modules/better-sqlite3/build/Release/sqlite3.a
generated
vendored
Normal file
BIN
server/node_modules/better-sqlite3/build/Release/sqlite3.a
generated
vendored
Normal file
Binary file not shown.
BIN
server/node_modules/better-sqlite3/build/Release/test_extension.node
generated
vendored
Executable file
BIN
server/node_modules/better-sqlite3/build/Release/test_extension.node
generated
vendored
Executable file
Binary file not shown.
176
server/node_modules/better-sqlite3/build/better_sqlite3.target.mk
generated
vendored
Normal file
176
server/node_modules/better-sqlite3/build/better_sqlite3.target.mk
generated
vendored
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
TOOLSET := target
|
||||
TARGET := better_sqlite3
|
||||
DEFS_Debug := \
|
||||
'-DNODE_GYP_MODULE_NAME=better_sqlite3' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DBUILDING_NODE_EXTENSION' \
|
||||
'-DDEBUG' \
|
||||
'-D_DEBUG' \
|
||||
'-DV8_ENABLE_CHECKS' \
|
||||
'-DSQLITE_DEBUG' \
|
||||
'-DSQLITE_MEMDEBUG' \
|
||||
'-DSQLITE_ENABLE_API_ARMOR' \
|
||||
'-DSQLITE_WIN32_MALLOC_VALIDATE'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Debug := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-m64 \
|
||||
-g \
|
||||
-O0 \
|
||||
-O0
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Debug :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Debug := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17 \
|
||||
-std=c++17
|
||||
|
||||
INCS_Debug := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
DEFS_Release := \
|
||||
'-DNODE_GYP_MODULE_NAME=better_sqlite3' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DBUILDING_NODE_EXTENSION' \
|
||||
'-DNDEBUG'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Release := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-m64 \
|
||||
-O3 \
|
||||
-O3 \
|
||||
-fno-omit-frame-pointer
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Release :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Release := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17 \
|
||||
-std=c++17
|
||||
|
||||
INCS_Release := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
OBJS := \
|
||||
$(obj).target/$(TARGET)/src/better_sqlite3.o
|
||||
|
||||
# Add to the list of files we specially track dependencies for.
|
||||
all_deps += $(OBJS)
|
||||
|
||||
# Make sure our dependencies are built before any of us.
|
||||
$(OBJS): | $(builddir)/sqlite3.a $(obj).target/deps/locate_sqlite3.stamp $(obj).target/deps/sqlite3.a
|
||||
|
||||
# CFLAGS et al overrides must be target-local.
|
||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
||||
$(OBJS): TOOLSET := $(TOOLSET)
|
||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
||||
|
||||
# Suffix rules, putting all outputs into $(obj).
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
|
||||
# Try building from generated source, too.
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cpp FORCE_DO_CMD
|
||||
@$(call do_cmd,cxx,1)
|
||||
|
||||
# End of this set of suffix rules
|
||||
### Rules for final target.
|
||||
LDFLAGS_Debug := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--exclude-libs,ALL \
|
||||
-m64
|
||||
|
||||
LDFLAGS_Release := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-Wl,-Bsymbolic \
|
||||
-Wl,--exclude-libs,ALL \
|
||||
-m64
|
||||
|
||||
LIBS := \
|
||||
-lnode
|
||||
|
||||
$(obj).target/better_sqlite3.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
||||
$(obj).target/better_sqlite3.node: LIBS := $(LIBS)
|
||||
$(obj).target/better_sqlite3.node: TOOLSET := $(TOOLSET)
|
||||
$(obj).target/better_sqlite3.node: $(OBJS) $(obj).target/deps/sqlite3.a FORCE_DO_CMD
|
||||
$(call do_cmd,solink_module)
|
||||
|
||||
all_deps += $(obj).target/better_sqlite3.node
|
||||
# Add target alias
|
||||
.PHONY: better_sqlite3
|
||||
better_sqlite3: $(builddir)/better_sqlite3.node
|
||||
|
||||
# Copy this to the executable output path.
|
||||
$(builddir)/better_sqlite3.node: TOOLSET := $(TOOLSET)
|
||||
$(builddir)/better_sqlite3.node: $(obj).target/better_sqlite3.node FORCE_DO_CMD
|
||||
$(call do_cmd,copy)
|
||||
|
||||
all_deps += $(builddir)/better_sqlite3.node
|
||||
# Short alias for building this executable.
|
||||
.PHONY: better_sqlite3.node
|
||||
better_sqlite3.node: $(obj).target/better_sqlite3.node $(builddir)/better_sqlite3.node
|
||||
|
||||
# Add executable to "all" target.
|
||||
.PHONY: all
|
||||
all: $(builddir)/better_sqlite3.node
|
||||
|
||||
6
server/node_modules/better-sqlite3/build/binding.Makefile
generated
vendored
Normal file
6
server/node_modules/better-sqlite3/build/binding.Makefile
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
export builddir_name ?= ./build/.
|
||||
.PHONY: all
|
||||
all:
|
||||
$(MAKE) test_extension better_sqlite3
|
||||
416
server/node_modules/better-sqlite3/build/config.gypi
generated
vendored
Normal file
416
server/node_modules/better-sqlite3/build/config.gypi
generated
vendored
Normal file
|
|
@ -0,0 +1,416 @@
|
|||
# Do not edit. File was generated by node-gyp's "configure" step
|
||||
{
|
||||
"target_defaults": {
|
||||
"cflags": [],
|
||||
"default_configuration": "Release",
|
||||
"defines": [],
|
||||
"include_dirs": [],
|
||||
"libraries": []
|
||||
},
|
||||
"variables": {
|
||||
"arch_triplet": "x86_64-linux-gnu",
|
||||
"asan": 0,
|
||||
"coverage": "false",
|
||||
"dcheck_always_on": 0,
|
||||
"debug_nghttp2": "false",
|
||||
"debug_node": "false",
|
||||
"enable_lto": "false",
|
||||
"enable_pgo_generate": "false",
|
||||
"enable_pgo_use": "false",
|
||||
"error_on_warn": "false",
|
||||
"force_dynamic_crt": 1,
|
||||
"host_arch": "x64",
|
||||
"icu_gyp_path": "tools/icu/icu-system.gyp",
|
||||
"icu_small": "false",
|
||||
"icu_ver_major": "74",
|
||||
"is_debug": 0,
|
||||
"libdir": "lib",
|
||||
"llvm_version": "0.0",
|
||||
"napi_build_version": "9",
|
||||
"node_builtin_shareable_builtins": [],
|
||||
"node_byteorder": "little",
|
||||
"node_debug_lib": "false",
|
||||
"node_enable_d8": "false",
|
||||
"node_enable_v8_vtunejit": "false",
|
||||
"node_fipsinstall": "false",
|
||||
"node_install_corepack": "false",
|
||||
"node_install_npm": "false",
|
||||
"node_library_files": [
|
||||
"lib/_http_agent.js",
|
||||
"lib/_http_client.js",
|
||||
"lib/_http_common.js",
|
||||
"lib/_http_incoming.js",
|
||||
"lib/_http_outgoing.js",
|
||||
"lib/_http_server.js",
|
||||
"lib/_stream_duplex.js",
|
||||
"lib/_stream_passthrough.js",
|
||||
"lib/_stream_readable.js",
|
||||
"lib/_stream_transform.js",
|
||||
"lib/_stream_wrap.js",
|
||||
"lib/_stream_writable.js",
|
||||
"lib/_tls_common.js",
|
||||
"lib/_tls_wrap.js",
|
||||
"lib/assert.js",
|
||||
"lib/assert/strict.js",
|
||||
"lib/async_hooks.js",
|
||||
"lib/buffer.js",
|
||||
"lib/child_process.js",
|
||||
"lib/cluster.js",
|
||||
"lib/console.js",
|
||||
"lib/constants.js",
|
||||
"lib/crypto.js",
|
||||
"lib/dgram.js",
|
||||
"lib/diagnostics_channel.js",
|
||||
"lib/dns.js",
|
||||
"lib/dns/promises.js",
|
||||
"lib/domain.js",
|
||||
"lib/events.js",
|
||||
"lib/fs.js",
|
||||
"lib/fs/promises.js",
|
||||
"lib/http.js",
|
||||
"lib/http2.js",
|
||||
"lib/https.js",
|
||||
"lib/inspector.js",
|
||||
"lib/internal/abort_controller.js",
|
||||
"lib/internal/assert.js",
|
||||
"lib/internal/assert/assertion_error.js",
|
||||
"lib/internal/assert/calltracker.js",
|
||||
"lib/internal/async_hooks.js",
|
||||
"lib/internal/blob.js",
|
||||
"lib/internal/blocklist.js",
|
||||
"lib/internal/bootstrap/browser.js",
|
||||
"lib/internal/bootstrap/node.js",
|
||||
"lib/internal/bootstrap/realm.js",
|
||||
"lib/internal/bootstrap/switches/does_not_own_process_state.js",
|
||||
"lib/internal/bootstrap/switches/does_own_process_state.js",
|
||||
"lib/internal/bootstrap/switches/is_main_thread.js",
|
||||
"lib/internal/bootstrap/switches/is_not_main_thread.js",
|
||||
"lib/internal/buffer.js",
|
||||
"lib/internal/child_process.js",
|
||||
"lib/internal/child_process/serialization.js",
|
||||
"lib/internal/cli_table.js",
|
||||
"lib/internal/cluster/child.js",
|
||||
"lib/internal/cluster/primary.js",
|
||||
"lib/internal/cluster/round_robin_handle.js",
|
||||
"lib/internal/cluster/shared_handle.js",
|
||||
"lib/internal/cluster/utils.js",
|
||||
"lib/internal/cluster/worker.js",
|
||||
"lib/internal/console/constructor.js",
|
||||
"lib/internal/console/global.js",
|
||||
"lib/internal/constants.js",
|
||||
"lib/internal/crypto/aes.js",
|
||||
"lib/internal/crypto/certificate.js",
|
||||
"lib/internal/crypto/cfrg.js",
|
||||
"lib/internal/crypto/cipher.js",
|
||||
"lib/internal/crypto/diffiehellman.js",
|
||||
"lib/internal/crypto/ec.js",
|
||||
"lib/internal/crypto/hash.js",
|
||||
"lib/internal/crypto/hashnames.js",
|
||||
"lib/internal/crypto/hkdf.js",
|
||||
"lib/internal/crypto/keygen.js",
|
||||
"lib/internal/crypto/keys.js",
|
||||
"lib/internal/crypto/mac.js",
|
||||
"lib/internal/crypto/pbkdf2.js",
|
||||
"lib/internal/crypto/random.js",
|
||||
"lib/internal/crypto/rsa.js",
|
||||
"lib/internal/crypto/scrypt.js",
|
||||
"lib/internal/crypto/sig.js",
|
||||
"lib/internal/crypto/util.js",
|
||||
"lib/internal/crypto/webcrypto.js",
|
||||
"lib/internal/crypto/webidl.js",
|
||||
"lib/internal/crypto/x509.js",
|
||||
"lib/internal/debugger/inspect.js",
|
||||
"lib/internal/debugger/inspect_client.js",
|
||||
"lib/internal/debugger/inspect_repl.js",
|
||||
"lib/internal/dgram.js",
|
||||
"lib/internal/dns/callback_resolver.js",
|
||||
"lib/internal/dns/promises.js",
|
||||
"lib/internal/dns/utils.js",
|
||||
"lib/internal/dtrace.js",
|
||||
"lib/internal/encoding.js",
|
||||
"lib/internal/error_serdes.js",
|
||||
"lib/internal/errors.js",
|
||||
"lib/internal/event_target.js",
|
||||
"lib/internal/file.js",
|
||||
"lib/internal/fixed_queue.js",
|
||||
"lib/internal/freelist.js",
|
||||
"lib/internal/freeze_intrinsics.js",
|
||||
"lib/internal/fs/cp/cp-sync.js",
|
||||
"lib/internal/fs/cp/cp.js",
|
||||
"lib/internal/fs/dir.js",
|
||||
"lib/internal/fs/promises.js",
|
||||
"lib/internal/fs/read_file_context.js",
|
||||
"lib/internal/fs/recursive_watch.js",
|
||||
"lib/internal/fs/rimraf.js",
|
||||
"lib/internal/fs/streams.js",
|
||||
"lib/internal/fs/sync_write_stream.js",
|
||||
"lib/internal/fs/utils.js",
|
||||
"lib/internal/fs/watchers.js",
|
||||
"lib/internal/heap_utils.js",
|
||||
"lib/internal/histogram.js",
|
||||
"lib/internal/http.js",
|
||||
"lib/internal/http2/compat.js",
|
||||
"lib/internal/http2/core.js",
|
||||
"lib/internal/http2/util.js",
|
||||
"lib/internal/idna.js",
|
||||
"lib/internal/inspector_async_hook.js",
|
||||
"lib/internal/js_stream_socket.js",
|
||||
"lib/internal/legacy/processbinding.js",
|
||||
"lib/internal/linkedlist.js",
|
||||
"lib/internal/main/check_syntax.js",
|
||||
"lib/internal/main/environment.js",
|
||||
"lib/internal/main/eval_stdin.js",
|
||||
"lib/internal/main/eval_string.js",
|
||||
"lib/internal/main/inspect.js",
|
||||
"lib/internal/main/mksnapshot.js",
|
||||
"lib/internal/main/print_help.js",
|
||||
"lib/internal/main/prof_process.js",
|
||||
"lib/internal/main/repl.js",
|
||||
"lib/internal/main/run_main_module.js",
|
||||
"lib/internal/main/single_executable_application.js",
|
||||
"lib/internal/main/test_runner.js",
|
||||
"lib/internal/main/watch_mode.js",
|
||||
"lib/internal/main/worker_thread.js",
|
||||
"lib/internal/mime.js",
|
||||
"lib/internal/modules/cjs/loader.js",
|
||||
"lib/internal/modules/esm/assert.js",
|
||||
"lib/internal/modules/esm/create_dynamic_module.js",
|
||||
"lib/internal/modules/esm/fetch_module.js",
|
||||
"lib/internal/modules/esm/formats.js",
|
||||
"lib/internal/modules/esm/get_format.js",
|
||||
"lib/internal/modules/esm/handle_process_exit.js",
|
||||
"lib/internal/modules/esm/hooks.js",
|
||||
"lib/internal/modules/esm/initialize_import_meta.js",
|
||||
"lib/internal/modules/esm/load.js",
|
||||
"lib/internal/modules/esm/loader.js",
|
||||
"lib/internal/modules/esm/module_job.js",
|
||||
"lib/internal/modules/esm/module_map.js",
|
||||
"lib/internal/modules/esm/package_config.js",
|
||||
"lib/internal/modules/esm/resolve.js",
|
||||
"lib/internal/modules/esm/shared_constants.js",
|
||||
"lib/internal/modules/esm/translators.js",
|
||||
"lib/internal/modules/esm/utils.js",
|
||||
"lib/internal/modules/esm/worker.js",
|
||||
"lib/internal/modules/helpers.js",
|
||||
"lib/internal/modules/package_json_reader.js",
|
||||
"lib/internal/modules/run_main.js",
|
||||
"lib/internal/net.js",
|
||||
"lib/internal/options.js",
|
||||
"lib/internal/per_context/domexception.js",
|
||||
"lib/internal/per_context/messageport.js",
|
||||
"lib/internal/per_context/primordials.js",
|
||||
"lib/internal/perf/event_loop_delay.js",
|
||||
"lib/internal/perf/event_loop_utilization.js",
|
||||
"lib/internal/perf/nodetiming.js",
|
||||
"lib/internal/perf/observe.js",
|
||||
"lib/internal/perf/performance.js",
|
||||
"lib/internal/perf/performance_entry.js",
|
||||
"lib/internal/perf/resource_timing.js",
|
||||
"lib/internal/perf/timerify.js",
|
||||
"lib/internal/perf/usertiming.js",
|
||||
"lib/internal/perf/utils.js",
|
||||
"lib/internal/policy/manifest.js",
|
||||
"lib/internal/policy/sri.js",
|
||||
"lib/internal/priority_queue.js",
|
||||
"lib/internal/process/esm_loader.js",
|
||||
"lib/internal/process/execution.js",
|
||||
"lib/internal/process/per_thread.js",
|
||||
"lib/internal/process/policy.js",
|
||||
"lib/internal/process/pre_execution.js",
|
||||
"lib/internal/process/promises.js",
|
||||
"lib/internal/process/report.js",
|
||||
"lib/internal/process/signal.js",
|
||||
"lib/internal/process/task_queues.js",
|
||||
"lib/internal/process/warning.js",
|
||||
"lib/internal/process/worker_thread_only.js",
|
||||
"lib/internal/promise_hooks.js",
|
||||
"lib/internal/querystring.js",
|
||||
"lib/internal/readline/callbacks.js",
|
||||
"lib/internal/readline/emitKeypressEvents.js",
|
||||
"lib/internal/readline/interface.js",
|
||||
"lib/internal/readline/promises.js",
|
||||
"lib/internal/readline/utils.js",
|
||||
"lib/internal/repl.js",
|
||||
"lib/internal/repl/await.js",
|
||||
"lib/internal/repl/history.js",
|
||||
"lib/internal/repl/utils.js",
|
||||
"lib/internal/socket_list.js",
|
||||
"lib/internal/socketaddress.js",
|
||||
"lib/internal/source_map/prepare_stack_trace.js",
|
||||
"lib/internal/source_map/source_map.js",
|
||||
"lib/internal/source_map/source_map_cache.js",
|
||||
"lib/internal/stream_base_commons.js",
|
||||
"lib/internal/streams/add-abort-signal.js",
|
||||
"lib/internal/streams/buffer_list.js",
|
||||
"lib/internal/streams/compose.js",
|
||||
"lib/internal/streams/destroy.js",
|
||||
"lib/internal/streams/duplex.js",
|
||||
"lib/internal/streams/duplexify.js",
|
||||
"lib/internal/streams/end-of-stream.js",
|
||||
"lib/internal/streams/from.js",
|
||||
"lib/internal/streams/lazy_transform.js",
|
||||
"lib/internal/streams/legacy.js",
|
||||
"lib/internal/streams/operators.js",
|
||||
"lib/internal/streams/passthrough.js",
|
||||
"lib/internal/streams/pipeline.js",
|
||||
"lib/internal/streams/readable.js",
|
||||
"lib/internal/streams/state.js",
|
||||
"lib/internal/streams/transform.js",
|
||||
"lib/internal/streams/utils.js",
|
||||
"lib/internal/streams/writable.js",
|
||||
"lib/internal/structured_clone.js",
|
||||
"lib/internal/test/binding.js",
|
||||
"lib/internal/test/transfer.js",
|
||||
"lib/internal/test_runner/coverage.js",
|
||||
"lib/internal/test_runner/harness.js",
|
||||
"lib/internal/test_runner/mock/mock.js",
|
||||
"lib/internal/test_runner/mock/mock_timers.js",
|
||||
"lib/internal/test_runner/reporter/dot.js",
|
||||
"lib/internal/test_runner/reporter/junit.js",
|
||||
"lib/internal/test_runner/reporter/spec.js",
|
||||
"lib/internal/test_runner/reporter/tap.js",
|
||||
"lib/internal/test_runner/reporter/v8-serializer.js",
|
||||
"lib/internal/test_runner/runner.js",
|
||||
"lib/internal/test_runner/test.js",
|
||||
"lib/internal/test_runner/tests_stream.js",
|
||||
"lib/internal/test_runner/utils.js",
|
||||
"lib/internal/timers.js",
|
||||
"lib/internal/tls/secure-context.js",
|
||||
"lib/internal/tls/secure-pair.js",
|
||||
"lib/internal/trace_events_async_hooks.js",
|
||||
"lib/internal/tty.js",
|
||||
"lib/internal/url.js",
|
||||
"lib/internal/util.js",
|
||||
"lib/internal/util/colors.js",
|
||||
"lib/internal/util/comparisons.js",
|
||||
"lib/internal/util/debuglog.js",
|
||||
"lib/internal/util/inspect.js",
|
||||
"lib/internal/util/inspector.js",
|
||||
"lib/internal/util/iterable_weak_map.js",
|
||||
"lib/internal/util/parse_args/parse_args.js",
|
||||
"lib/internal/util/parse_args/utils.js",
|
||||
"lib/internal/util/types.js",
|
||||
"lib/internal/v8/startup_snapshot.js",
|
||||
"lib/internal/v8_prof_polyfill.js",
|
||||
"lib/internal/v8_prof_processor.js",
|
||||
"lib/internal/validators.js",
|
||||
"lib/internal/vm.js",
|
||||
"lib/internal/vm/module.js",
|
||||
"lib/internal/wasm_web_api.js",
|
||||
"lib/internal/watch_mode/files_watcher.js",
|
||||
"lib/internal/watchdog.js",
|
||||
"lib/internal/webidl.js",
|
||||
"lib/internal/webstreams/adapters.js",
|
||||
"lib/internal/webstreams/compression.js",
|
||||
"lib/internal/webstreams/encoding.js",
|
||||
"lib/internal/webstreams/queuingstrategies.js",
|
||||
"lib/internal/webstreams/readablestream.js",
|
||||
"lib/internal/webstreams/transfer.js",
|
||||
"lib/internal/webstreams/transformstream.js",
|
||||
"lib/internal/webstreams/util.js",
|
||||
"lib/internal/webstreams/writablestream.js",
|
||||
"lib/internal/worker.js",
|
||||
"lib/internal/worker/io.js",
|
||||
"lib/internal/worker/js_transferable.js",
|
||||
"lib/module.js",
|
||||
"lib/net.js",
|
||||
"lib/os.js",
|
||||
"lib/path.js",
|
||||
"lib/path/posix.js",
|
||||
"lib/path/win32.js",
|
||||
"lib/perf_hooks.js",
|
||||
"lib/process.js",
|
||||
"lib/punycode.js",
|
||||
"lib/querystring.js",
|
||||
"lib/readline.js",
|
||||
"lib/readline/promises.js",
|
||||
"lib/repl.js",
|
||||
"lib/stream.js",
|
||||
"lib/stream/consumers.js",
|
||||
"lib/stream/promises.js",
|
||||
"lib/stream/web.js",
|
||||
"lib/string_decoder.js",
|
||||
"lib/sys.js",
|
||||
"lib/test.js",
|
||||
"lib/test/reporters.js",
|
||||
"lib/timers.js",
|
||||
"lib/timers/promises.js",
|
||||
"lib/tls.js",
|
||||
"lib/trace_events.js",
|
||||
"lib/tty.js",
|
||||
"lib/url.js",
|
||||
"lib/util.js",
|
||||
"lib/util/types.js",
|
||||
"lib/v8.js",
|
||||
"lib/vm.js",
|
||||
"lib/wasi.js",
|
||||
"lib/worker_threads.js",
|
||||
"lib/zlib.js"
|
||||
],
|
||||
"node_module_version": 109,
|
||||
"node_no_browser_globals": "false",
|
||||
"node_prefix": "/usr",
|
||||
"node_relative_path": "lib/x86_64-linux-gnu/nodejs:share/nodejs",
|
||||
"node_release_urlbase": "",
|
||||
"node_section_ordering_info": "",
|
||||
"node_shared": "true",
|
||||
"node_shared_brotli": "true",
|
||||
"node_shared_cares": "true",
|
||||
"node_shared_http_parser": "false",
|
||||
"node_shared_libuv": "true",
|
||||
"node_shared_nghttp2": "true",
|
||||
"node_shared_nghttp3": "false",
|
||||
"node_shared_ngtcp2": "false",
|
||||
"node_shared_openssl": "true",
|
||||
"node_shared_zlib": "true",
|
||||
"node_tag": "",
|
||||
"node_target_type": "shared_library",
|
||||
"node_use_bundled_v8": "true",
|
||||
"node_use_dtrace": "false",
|
||||
"node_use_etw": "false",
|
||||
"node_use_node_code_cache": "false",
|
||||
"node_use_node_snapshot": "false",
|
||||
"node_use_openssl": "true",
|
||||
"node_use_v8_platform": "true",
|
||||
"node_with_ltcg": "false",
|
||||
"node_without_node_options": "false",
|
||||
"openssl_is_fips": "false",
|
||||
"openssl_quic": "false",
|
||||
"ossfuzz": "false",
|
||||
"shlib_suffix": "so.109",
|
||||
"single_executable_application": "true",
|
||||
"target_arch": "x64",
|
||||
"v8_enable_31bit_smis_on_64bit_arch": 0,
|
||||
"v8_enable_gdbjit": 0,
|
||||
"v8_enable_hugepage": 0,
|
||||
"v8_enable_i18n_support": 1,
|
||||
"v8_enable_inspector": 1,
|
||||
"v8_enable_javascript_promise_hooks": 1,
|
||||
"v8_enable_lite_mode": 0,
|
||||
"v8_enable_object_print": 1,
|
||||
"v8_enable_pointer_compression": 0,
|
||||
"v8_enable_shared_ro_heap": 1,
|
||||
"v8_enable_short_builtin_calls": 1,
|
||||
"v8_enable_webassembly": 1,
|
||||
"v8_no_strict_aliasing": 1,
|
||||
"v8_optimized_debug": 1,
|
||||
"v8_promise_internal_field_count": 1,
|
||||
"v8_random_seed": 0,
|
||||
"v8_trace_maps": 0,
|
||||
"v8_use_siphash": 1,
|
||||
"want_separate_host_toolset": 0,
|
||||
"nodedir": "/usr/include/nodejs",
|
||||
"standalone_static_library": 1,
|
||||
"user_agent": "npm/9.2.0 node/v18.19.1 linux x64 workspaces/false",
|
||||
"userconfig": "/home/pschneid/.npmrc",
|
||||
"local_prefix": "/home/pschneid/Gulfslab/projects/spotify/server",
|
||||
"metrics_registry": "https://registry.npmjs.org/",
|
||||
"prefix": "/usr/local",
|
||||
"cache": "/home/pschneid/.npm",
|
||||
"node_gyp": "/usr/share/nodejs/node-gyp/bin/node-gyp.js",
|
||||
"globalconfig": "/etc/npmrc",
|
||||
"init_module": "/home/pschneid/.npm-init.js",
|
||||
"globalignorefile": "/etc/npmignore",
|
||||
"global_prefix": "/usr/local"
|
||||
}
|
||||
}
|
||||
42
server/node_modules/better-sqlite3/build/deps/locate_sqlite3.target.mk
generated
vendored
Normal file
42
server/node_modules/better-sqlite3/build/deps/locate_sqlite3.target.mk
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
TOOLSET := target
|
||||
TARGET := locate_sqlite3
|
||||
### Rules for action "copy_builtin_sqlite3":
|
||||
quiet_cmd_deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 = ACTION deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 $@
|
||||
cmd_deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3 = LD_LIBRARY_PATH=$(builddir)/lib.host:$(builddir)/lib.target:$$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd $(srcdir)/deps; mkdir -p $(obj)/gen/sqlite3; node copy.js "$(obj)/gen/sqlite3" ""
|
||||
|
||||
$(obj)/gen/sqlite3/sqlite3.c: obj := $(abs_obj)
|
||||
$(obj)/gen/sqlite3/sqlite3.c: builddir := $(abs_builddir)
|
||||
$(obj)/gen/sqlite3/sqlite3.c: TOOLSET := $(TOOLSET)
|
||||
$(obj)/gen/sqlite3/sqlite3.c $(obj)/gen/sqlite3/sqlite3.h $(obj)/gen/sqlite3/sqlite3ext.h: ba23eeee118cd63e16015df367567cb043fed872.intermediate
|
||||
@:
|
||||
.INTERMEDIATE: ba23eeee118cd63e16015df367567cb043fed872.intermediate
|
||||
ba23eeee118cd63e16015df367567cb043fed872.intermediate: $(srcdir)/deps/sqlite3/sqlite3.c $(srcdir)/deps/sqlite3/sqlite3.h $(srcdir)/deps/sqlite3/sqlite3ext.h FORCE_DO_CMD
|
||||
$(call do_cmd,touch)
|
||||
$(call do_cmd,deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3)
|
||||
|
||||
all_deps += $(obj)/gen/sqlite3/sqlite3.c $(obj)/gen/sqlite3/sqlite3.h $(obj)/gen/sqlite3/sqlite3ext.h
|
||||
action_deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3_outputs := $(obj)/gen/sqlite3/sqlite3.c $(obj)/gen/sqlite3/sqlite3.h $(obj)/gen/sqlite3/sqlite3ext.h
|
||||
|
||||
|
||||
### Rules for final target.
|
||||
# Build our special outputs first.
|
||||
$(obj).target/deps/locate_sqlite3.stamp: | $(action_deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3_outputs)
|
||||
|
||||
# Preserve order dependency of special output on deps.
|
||||
$(action_deps_sqlite3_gyp_locate_sqlite3_target_copy_builtin_sqlite3_outputs): |
|
||||
|
||||
$(obj).target/deps/locate_sqlite3.stamp: TOOLSET := $(TOOLSET)
|
||||
$(obj).target/deps/locate_sqlite3.stamp: FORCE_DO_CMD
|
||||
$(call do_cmd,touch)
|
||||
|
||||
all_deps += $(obj).target/deps/locate_sqlite3.stamp
|
||||
# Add target alias
|
||||
.PHONY: locate_sqlite3
|
||||
locate_sqlite3: $(obj).target/deps/locate_sqlite3.stamp
|
||||
|
||||
# Add target alias to "all" target.
|
||||
.PHONY: all
|
||||
all: locate_sqlite3
|
||||
|
||||
6
server/node_modules/better-sqlite3/build/deps/sqlite3.Makefile
generated
vendored
Normal file
6
server/node_modules/better-sqlite3/build/deps/sqlite3.Makefile
generated
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
export builddir_name ?= ./build/deps/.
|
||||
.PHONY: all
|
||||
all:
|
||||
$(MAKE) -C .. locate_sqlite3 sqlite3
|
||||
248
server/node_modules/better-sqlite3/build/deps/sqlite3.target.mk
generated
vendored
Normal file
248
server/node_modules/better-sqlite3/build/deps/sqlite3.target.mk
generated
vendored
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
TOOLSET := target
|
||||
TARGET := sqlite3
|
||||
DEFS_Debug := \
|
||||
'-DNODE_GYP_MODULE_NAME=sqlite3' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DHAVE_INT16_T=1' \
|
||||
'-DHAVE_INT32_T=1' \
|
||||
'-DHAVE_INT8_T=1' \
|
||||
'-DHAVE_STDINT_H=1' \
|
||||
'-DHAVE_UINT16_T=1' \
|
||||
'-DHAVE_UINT32_T=1' \
|
||||
'-DHAVE_UINT8_T=1' \
|
||||
'-DHAVE_USLEEP=1' \
|
||||
'-DSQLITE_DEFAULT_CACHE_SIZE=-16000' \
|
||||
'-DSQLITE_DEFAULT_FOREIGN_KEYS=1' \
|
||||
'-DSQLITE_DEFAULT_MEMSTATUS=0' \
|
||||
'-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1' \
|
||||
'-DSQLITE_DQS=0' \
|
||||
'-DSQLITE_ENABLE_COLUMN_METADATA' \
|
||||
'-DSQLITE_ENABLE_DESERIALIZE' \
|
||||
'-DSQLITE_ENABLE_FTS3' \
|
||||
'-DSQLITE_ENABLE_FTS3_PARENTHESIS' \
|
||||
'-DSQLITE_ENABLE_FTS4' \
|
||||
'-DSQLITE_ENABLE_FTS5' \
|
||||
'-DSQLITE_ENABLE_GEOPOLY' \
|
||||
'-DSQLITE_ENABLE_JSON1' \
|
||||
'-DSQLITE_ENABLE_MATH_FUNCTIONS' \
|
||||
'-DSQLITE_ENABLE_RTREE' \
|
||||
'-DSQLITE_ENABLE_STAT4' \
|
||||
'-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT' \
|
||||
'-DSQLITE_LIKE_DOESNT_MATCH_BLOBS' \
|
||||
'-DSQLITE_OMIT_DEPRECATED' \
|
||||
'-DSQLITE_OMIT_PROGRESS_CALLBACK' \
|
||||
'-DSQLITE_OMIT_SHARED_CACHE' \
|
||||
'-DSQLITE_OMIT_TCL_VARIABLE' \
|
||||
'-DSQLITE_SOUNDEX' \
|
||||
'-DSQLITE_THREADSAFE=2' \
|
||||
'-DSQLITE_TRACE_SIZE_LIMIT=32' \
|
||||
'-DSQLITE_USE_URI=0' \
|
||||
'-DDEBUG' \
|
||||
'-D_DEBUG' \
|
||||
'-DV8_ENABLE_CHECKS' \
|
||||
'-DSQLITE_DEBUG' \
|
||||
'-DSQLITE_MEMDEBUG' \
|
||||
'-DSQLITE_ENABLE_API_ARMOR' \
|
||||
'-DSQLITE_WIN32_MALLOC_VALIDATE'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Debug := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-std=c99 \
|
||||
-w \
|
||||
-m64 \
|
||||
-g \
|
||||
-O0 \
|
||||
-O0
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Debug :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Debug := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17
|
||||
|
||||
INCS_Debug := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
DEFS_Release := \
|
||||
'-DNODE_GYP_MODULE_NAME=sqlite3' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DHAVE_INT16_T=1' \
|
||||
'-DHAVE_INT32_T=1' \
|
||||
'-DHAVE_INT8_T=1' \
|
||||
'-DHAVE_STDINT_H=1' \
|
||||
'-DHAVE_UINT16_T=1' \
|
||||
'-DHAVE_UINT32_T=1' \
|
||||
'-DHAVE_UINT8_T=1' \
|
||||
'-DHAVE_USLEEP=1' \
|
||||
'-DSQLITE_DEFAULT_CACHE_SIZE=-16000' \
|
||||
'-DSQLITE_DEFAULT_FOREIGN_KEYS=1' \
|
||||
'-DSQLITE_DEFAULT_MEMSTATUS=0' \
|
||||
'-DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1' \
|
||||
'-DSQLITE_DQS=0' \
|
||||
'-DSQLITE_ENABLE_COLUMN_METADATA' \
|
||||
'-DSQLITE_ENABLE_DESERIALIZE' \
|
||||
'-DSQLITE_ENABLE_FTS3' \
|
||||
'-DSQLITE_ENABLE_FTS3_PARENTHESIS' \
|
||||
'-DSQLITE_ENABLE_FTS4' \
|
||||
'-DSQLITE_ENABLE_FTS5' \
|
||||
'-DSQLITE_ENABLE_GEOPOLY' \
|
||||
'-DSQLITE_ENABLE_JSON1' \
|
||||
'-DSQLITE_ENABLE_MATH_FUNCTIONS' \
|
||||
'-DSQLITE_ENABLE_RTREE' \
|
||||
'-DSQLITE_ENABLE_STAT4' \
|
||||
'-DSQLITE_ENABLE_UPDATE_DELETE_LIMIT' \
|
||||
'-DSQLITE_LIKE_DOESNT_MATCH_BLOBS' \
|
||||
'-DSQLITE_OMIT_DEPRECATED' \
|
||||
'-DSQLITE_OMIT_PROGRESS_CALLBACK' \
|
||||
'-DSQLITE_OMIT_SHARED_CACHE' \
|
||||
'-DSQLITE_OMIT_TCL_VARIABLE' \
|
||||
'-DSQLITE_SOUNDEX' \
|
||||
'-DSQLITE_THREADSAFE=2' \
|
||||
'-DSQLITE_TRACE_SIZE_LIMIT=32' \
|
||||
'-DSQLITE_USE_URI=0' \
|
||||
'-DNDEBUG'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Release := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-std=c99 \
|
||||
-w \
|
||||
-m64 \
|
||||
-O3 \
|
||||
-O3 \
|
||||
-fno-omit-frame-pointer
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Release :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Release := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17
|
||||
|
||||
INCS_Release := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
OBJS := \
|
||||
$(obj).target/$(TARGET)/gen/sqlite3/sqlite3.o
|
||||
|
||||
# Add to the list of files we specially track dependencies for.
|
||||
all_deps += $(OBJS)
|
||||
|
||||
# Make sure our dependencies are built before any of us.
|
||||
$(OBJS): | $(obj).target/deps/locate_sqlite3.stamp
|
||||
|
||||
# CFLAGS et al overrides must be target-local.
|
||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
||||
$(OBJS): TOOLSET := $(TOOLSET)
|
||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
||||
|
||||
# Suffix rules, putting all outputs into $(obj).
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
# Try building from generated source, too.
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
# End of this set of suffix rules
|
||||
### Rules for final target.
|
||||
LDFLAGS_Debug := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-m64
|
||||
|
||||
LDFLAGS_Release := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-m64
|
||||
|
||||
LIBS := \
|
||||
-lnode
|
||||
|
||||
$(obj).target/deps/sqlite3.a: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
||||
$(obj).target/deps/sqlite3.a: LIBS := $(LIBS)
|
||||
$(obj).target/deps/sqlite3.a: TOOLSET := $(TOOLSET)
|
||||
$(obj).target/deps/sqlite3.a: $(OBJS) FORCE_DO_CMD
|
||||
$(call do_cmd,alink)
|
||||
|
||||
all_deps += $(obj).target/deps/sqlite3.a
|
||||
# Add target alias
|
||||
.PHONY: sqlite3
|
||||
sqlite3: $(obj).target/deps/sqlite3.a
|
||||
|
||||
# Add target alias to "all" target.
|
||||
.PHONY: all
|
||||
all: sqlite3
|
||||
|
||||
# Add target alias
|
||||
.PHONY: sqlite3
|
||||
sqlite3: $(builddir)/sqlite3.a
|
||||
|
||||
# Copy this to the static library output path.
|
||||
$(builddir)/sqlite3.a: TOOLSET := $(TOOLSET)
|
||||
$(builddir)/sqlite3.a: $(obj).target/deps/sqlite3.a FORCE_DO_CMD
|
||||
$(call do_cmd,copy)
|
||||
|
||||
all_deps += $(builddir)/sqlite3.a
|
||||
# Short alias for building this static library.
|
||||
.PHONY: sqlite3.a
|
||||
sqlite3.a: $(obj).target/deps/sqlite3.a $(builddir)/sqlite3.a
|
||||
|
||||
# Add static library to "all" target.
|
||||
.PHONY: all
|
||||
all: $(builddir)/sqlite3.a
|
||||
|
||||
1
server/node_modules/better-sqlite3/build/node_gyp_bins/python3
generated
vendored
Symbolic link
1
server/node_modules/better-sqlite3/build/node_gyp_bins/python3
generated
vendored
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
/usr/bin/python3
|
||||
170
server/node_modules/better-sqlite3/build/test_extension.target.mk
generated
vendored
Normal file
170
server/node_modules/better-sqlite3/build/test_extension.target.mk
generated
vendored
Normal file
|
|
@ -0,0 +1,170 @@
|
|||
# This file is generated by gyp; do not edit.
|
||||
|
||||
TOOLSET := target
|
||||
TARGET := test_extension
|
||||
DEFS_Debug := \
|
||||
'-DNODE_GYP_MODULE_NAME=test_extension' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DBUILDING_NODE_EXTENSION' \
|
||||
'-DDEBUG' \
|
||||
'-D_DEBUG' \
|
||||
'-DV8_ENABLE_CHECKS' \
|
||||
'-DSQLITE_DEBUG' \
|
||||
'-DSQLITE_MEMDEBUG' \
|
||||
'-DSQLITE_ENABLE_API_ARMOR' \
|
||||
'-DSQLITE_WIN32_MALLOC_VALIDATE'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Debug := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-m64 \
|
||||
-g \
|
||||
-O0 \
|
||||
-O0
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Debug :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Debug := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17
|
||||
|
||||
INCS_Debug := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
DEFS_Release := \
|
||||
'-DNODE_GYP_MODULE_NAME=test_extension' \
|
||||
'-DUSING_UV_SHARED=1' \
|
||||
'-DUSING_V8_SHARED=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS=1' \
|
||||
'-DV8_DEPRECATION_WARNINGS' \
|
||||
'-DV8_IMMINENT_DEPRECATION_WARNINGS' \
|
||||
'-D_GLIBCXX_USE_CXX11_ABI=1' \
|
||||
'-D_LARGEFILE_SOURCE' \
|
||||
'-D_FILE_OFFSET_BITS=64' \
|
||||
'-D__STDC_FORMAT_MACROS' \
|
||||
'-DBUILDING_NODE_EXTENSION' \
|
||||
'-DNDEBUG'
|
||||
|
||||
# Flags passed to all source files.
|
||||
CFLAGS_Release := \
|
||||
-fPIC \
|
||||
-pthread \
|
||||
-Wall \
|
||||
-Wextra \
|
||||
-Wno-unused-parameter \
|
||||
-fPIC \
|
||||
-m64 \
|
||||
-O3 \
|
||||
-O3 \
|
||||
-fno-omit-frame-pointer
|
||||
|
||||
# Flags passed to only C files.
|
||||
CFLAGS_C_Release :=
|
||||
|
||||
# Flags passed to only C++ files.
|
||||
CFLAGS_CC_Release := \
|
||||
-fno-rtti \
|
||||
-fno-exceptions \
|
||||
-std=gnu++17
|
||||
|
||||
INCS_Release := \
|
||||
-I/usr/include/nodejs/include/node \
|
||||
-I/usr/include/nodejs/src \
|
||||
-I/usr/include/nodejs/deps/openssl/config \
|
||||
-I/usr/include/nodejs/deps/openssl/openssl/include \
|
||||
-I/usr/include/nodejs/deps/uv/include \
|
||||
-I/usr/include/nodejs/deps/zlib \
|
||||
-I/usr/include/nodejs/deps/v8/include \
|
||||
-I$(obj)/gen/sqlite3
|
||||
|
||||
OBJS := \
|
||||
$(obj).target/$(TARGET)/deps/test_extension.o
|
||||
|
||||
# Add to the list of files we specially track dependencies for.
|
||||
all_deps += $(OBJS)
|
||||
|
||||
# Make sure our dependencies are built before any of us.
|
||||
$(OBJS): | $(builddir)/sqlite3.a $(obj).target/deps/locate_sqlite3.stamp $(obj).target/deps/sqlite3.a
|
||||
|
||||
# CFLAGS et al overrides must be target-local.
|
||||
# See "Target-specific Variable Values" in the GNU Make manual.
|
||||
$(OBJS): TOOLSET := $(TOOLSET)
|
||||
$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE))
|
||||
$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE))
|
||||
|
||||
# Suffix rules, putting all outputs into $(obj).
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
# Try building from generated source, too.
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.c FORCE_DO_CMD
|
||||
@$(call do_cmd,cc,1)
|
||||
|
||||
# End of this set of suffix rules
|
||||
### Rules for final target.
|
||||
LDFLAGS_Debug := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-m64
|
||||
|
||||
LDFLAGS_Release := \
|
||||
-pthread \
|
||||
-rdynamic \
|
||||
-m64
|
||||
|
||||
LIBS := \
|
||||
-lnode
|
||||
|
||||
$(obj).target/test_extension.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE))
|
||||
$(obj).target/test_extension.node: LIBS := $(LIBS)
|
||||
$(obj).target/test_extension.node: TOOLSET := $(TOOLSET)
|
||||
$(obj).target/test_extension.node: $(OBJS) $(obj).target/deps/sqlite3.a FORCE_DO_CMD
|
||||
$(call do_cmd,solink_module)
|
||||
|
||||
all_deps += $(obj).target/test_extension.node
|
||||
# Add target alias
|
||||
.PHONY: test_extension
|
||||
test_extension: $(builddir)/test_extension.node
|
||||
|
||||
# Copy this to the executable output path.
|
||||
$(builddir)/test_extension.node: TOOLSET := $(TOOLSET)
|
||||
$(builddir)/test_extension.node: $(obj).target/test_extension.node FORCE_DO_CMD
|
||||
$(call do_cmd,copy)
|
||||
|
||||
all_deps += $(builddir)/test_extension.node
|
||||
# Short alias for building this executable.
|
||||
.PHONY: test_extension.node
|
||||
test_extension.node: $(obj).target/test_extension.node $(builddir)/test_extension.node
|
||||
|
||||
# Add executable to "all" target.
|
||||
.PHONY: all
|
||||
all: $(builddir)/test_extension.node
|
||||
|
||||
60
server/package-lock.json
generated
60
server/package-lock.json
generated
|
|
@ -10,7 +10,7 @@
|
|||
"dependencies": {
|
||||
"@types/uuid": "^10.0.0",
|
||||
"axios": "^1.7.2",
|
||||
"better-sqlite3": "^9.4.3",
|
||||
"better-sqlite3": "^9.6.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
|
|
@ -1134,8 +1134,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
]
|
||||
},
|
||||
"node_modules/basic-auth": {
|
||||
"version": "2.0.1",
|
||||
|
|
@ -1160,7 +1159,6 @@
|
|||
"resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-9.6.0.tgz",
|
||||
"integrity": "sha512-yR5HATnqeYNVnkaUTf4bOP2dJSnyhP4puJN/QPRyx4YkBEEUxib422n2XzPqDEHjQQqazoYoADdAm5vE15+dAQ==",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bindings": "^1.5.0",
|
||||
"prebuild-install": "^7.1.1"
|
||||
|
|
@ -1170,7 +1168,6 @@
|
|||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
|
||||
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"file-uri-to-path": "1.0.0"
|
||||
}
|
||||
|
|
@ -1179,7 +1176,6 @@
|
|||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"buffer": "^5.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
|
|
@ -1228,7 +1224,6 @@
|
|||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.1.13"
|
||||
|
|
@ -1281,8 +1276,7 @@
|
|||
"node_modules/chownr": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz",
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg=="
|
||||
},
|
||||
"node_modules/combined-stream": {
|
||||
"version": "1.0.8",
|
||||
|
|
@ -1358,7 +1352,6 @@
|
|||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz",
|
||||
"integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"mimic-response": "^3.1.0"
|
||||
},
|
||||
|
|
@ -1373,7 +1366,6 @@
|
|||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
|
||||
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=4.0.0"
|
||||
}
|
||||
|
|
@ -1469,7 +1461,6 @@
|
|||
"version": "1.4.5",
|
||||
"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz",
|
||||
"integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"once": "^1.4.0"
|
||||
}
|
||||
|
|
@ -1580,7 +1571,6 @@
|
|||
"version": "2.0.3",
|
||||
"resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz",
|
||||
"integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==",
|
||||
"license": "(MIT OR WTFPL)",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
|
|
@ -1634,8 +1624,7 @@
|
|||
"node_modules/file-uri-to-path": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw=="
|
||||
},
|
||||
"node_modules/finalhandler": {
|
||||
"version": "1.3.1",
|
||||
|
|
@ -1712,8 +1701,7 @@
|
|||
"node_modules/fs-constants": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow=="
|
||||
},
|
||||
"node_modules/fsevents": {
|
||||
"version": "2.3.3",
|
||||
|
|
@ -1792,8 +1780,7 @@
|
|||
"node_modules/github-from-package": {
|
||||
"version": "0.0.0",
|
||||
"resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz",
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw=="
|
||||
},
|
||||
"node_modules/gopd": {
|
||||
"version": "1.2.0",
|
||||
|
|
@ -1900,8 +1887,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "BSD-3-Clause"
|
||||
]
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
|
|
@ -1912,8 +1898,7 @@
|
|||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz",
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="
|
||||
},
|
||||
"node_modules/ipaddr.js": {
|
||||
"version": "1.9.1",
|
||||
|
|
@ -2088,7 +2073,6 @@
|
|||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz",
|
||||
"integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
|
|
@ -2100,7 +2084,6 @@
|
|||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"license": "MIT",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
|
|
@ -2108,8 +2091,7 @@
|
|||
"node_modules/mkdirp-classic": {
|
||||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz",
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A=="
|
||||
},
|
||||
"node_modules/morgan": {
|
||||
"version": "1.10.1",
|
||||
|
|
@ -2148,8 +2130,7 @@
|
|||
"node_modules/napi-build-utils": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
|
||||
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA=="
|
||||
},
|
||||
"node_modules/negotiator": {
|
||||
"version": "0.6.3",
|
||||
|
|
@ -2164,7 +2145,6 @@
|
|||
"version": "3.78.0",
|
||||
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.78.0.tgz",
|
||||
"integrity": "sha512-E2wEyrgX/CqvicaQYU3Ze1PFGjc4QYPGsjUrlYkqAE0WjHEZwgOsGMPMzkMse4LjJbDmaEuDX3CM036j5K2DSQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"semver": "^7.3.5"
|
||||
},
|
||||
|
|
@ -2218,7 +2198,6 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
|
@ -2242,7 +2221,6 @@
|
|||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
|
||||
"integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.0",
|
||||
"expand-template": "^2.0.3",
|
||||
|
|
@ -2287,7 +2265,6 @@
|
|||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.3.tgz",
|
||||
"integrity": "sha512-todwxLMY7/heScKmntwQG8CXVkWUOdYxIvY2s0VWAAMh/nd8SoYiRaKjlr7+iCs984f2P8zvrfWcDDYVb73NfA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"end-of-stream": "^1.1.0",
|
||||
"once": "^1.3.1"
|
||||
|
|
@ -2336,7 +2313,6 @@
|
|||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
|
||||
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
|
||||
"license": "(BSD-2-Clause OR MIT OR Apache-2.0)",
|
||||
"dependencies": {
|
||||
"deep-extend": "^0.6.0",
|
||||
"ini": "~1.3.0",
|
||||
|
|
@ -2351,7 +2327,6 @@
|
|||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
|
|
@ -2600,8 +2575,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT"
|
||||
]
|
||||
},
|
||||
"node_modules/simple-get": {
|
||||
"version": "4.0.1",
|
||||
|
|
@ -2621,7 +2595,6 @@
|
|||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"decompress-response": "^6.0.0",
|
||||
"once": "^1.3.1",
|
||||
|
|
@ -2641,7 +2614,6 @@
|
|||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
|
|
@ -2650,7 +2622,6 @@
|
|||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
|
||||
"integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
|
@ -2659,7 +2630,6 @@
|
|||
"version": "2.1.4",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.4.tgz",
|
||||
"integrity": "sha512-mDAjwmZdh7LTT6pNleZ05Yt65HC3E+NiQzl672vQG38jIrehtJk/J3mNwIg+vShQPcLF/LV7CMnDW6vjj6sfYQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"chownr": "^1.1.1",
|
||||
"mkdirp-classic": "^0.5.2",
|
||||
|
|
@ -2671,7 +2641,6 @@
|
|||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz",
|
||||
"integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"bl": "^4.0.3",
|
||||
"end-of-stream": "^1.4.1",
|
||||
|
|
@ -2723,7 +2692,6 @@
|
|||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
|
||||
"integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"safe-buffer": "^5.0.1"
|
||||
},
|
||||
|
|
@ -2777,8 +2745,7 @@
|
|||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"license": "MIT"
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/utils-merge": {
|
||||
"version": "1.0.1",
|
||||
|
|
@ -2814,8 +2781,7 @@
|
|||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"license": "ISC"
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
"dependencies": {
|
||||
"@types/uuid": "^10.0.0",
|
||||
"axios": "^1.7.2",
|
||||
"better-sqlite3": "^9.4.3",
|
||||
"better-sqlite3": "^9.6.0",
|
||||
"cors": "^2.8.5",
|
||||
"dotenv": "^16.4.5",
|
||||
"express": "^4.19.2",
|
||||
|
|
|
|||
|
|
@ -5,6 +5,98 @@ import { requireAuth, AuthedRequest } from '../middleware/auth.js';
|
|||
import { syncUserData } from '../lib/sync.js';
|
||||
import { ensureValidAccessToken } from '../lib/spotify.js';
|
||||
|
||||
// Helper functions for unique categories
|
||||
function calculateLongestSession(tracks: any[]) {
|
||||
if (tracks.length === 0) return { duration: 0, startTime: 0, endTime: 0 };
|
||||
|
||||
const sortedTracks = tracks.sort((a, b) => a.played_at - b.played_at);
|
||||
let longestSession = { duration: 0, startTime: 0, endTime: 0 };
|
||||
let currentSession = { startTime: sortedTracks[0]?.played_at || 0, endTime: sortedTracks[0]?.played_at || 0 };
|
||||
|
||||
for (let i = 1; i < sortedTracks.length; i++) {
|
||||
const timeDiff = sortedTracks[i].played_at - sortedTracks[i - 1].played_at;
|
||||
if (timeDiff <= 30 * 60 * 1000) { // 30 minutes gap
|
||||
currentSession.endTime = sortedTracks[i].played_at;
|
||||
} else {
|
||||
const sessionDuration = currentSession.endTime - currentSession.startTime;
|
||||
if (sessionDuration > longestSession.duration) {
|
||||
longestSession = { ...currentSession, duration: sessionDuration };
|
||||
}
|
||||
currentSession = { startTime: sortedTracks[i].played_at, endTime: sortedTracks[i].played_at };
|
||||
}
|
||||
}
|
||||
|
||||
// Check the final session
|
||||
const finalSessionDuration = currentSession.endTime - currentSession.startTime;
|
||||
if (finalSessionDuration > longestSession.duration) {
|
||||
longestSession = { ...currentSession, duration: finalSessionDuration };
|
||||
}
|
||||
|
||||
// If no session is longer than 0, use the first track as a 1-minute session
|
||||
if (longestSession.duration === 0 && tracks.length > 0) {
|
||||
const firstTrack = sortedTracks[0];
|
||||
longestSession = {
|
||||
startTime: firstTrack.played_at,
|
||||
endTime: firstTrack.played_at + 60000, // 1 minute
|
||||
duration: 60000
|
||||
};
|
||||
}
|
||||
|
||||
return longestSession;
|
||||
}
|
||||
|
||||
function calculateMostDiverseDay(tracks: any[]) {
|
||||
const dayGroups = tracks.reduce((acc, track) => {
|
||||
const date = new Date(track.played_at).toDateString();
|
||||
if (!acc[date]) acc[date] = new Set();
|
||||
track.artists?.forEach((artist: any) => acc[date].add(artist.id));
|
||||
return acc;
|
||||
}, {} as Record<string, Set<string>>);
|
||||
|
||||
let mostDiverse = { date: '', artistCount: 0 };
|
||||
Object.entries(dayGroups).forEach(([date, artists]) => {
|
||||
if ((artists as Set<string>).size > mostDiverse.artistCount) {
|
||||
mostDiverse = { date, artistCount: (artists as Set<string>).size };
|
||||
}
|
||||
});
|
||||
|
||||
return mostDiverse;
|
||||
}
|
||||
|
||||
function getMostActiveMonth(tracks: any[]) {
|
||||
const monthGroups = tracks.reduce((acc, track) => {
|
||||
const date = new Date(track.played_at);
|
||||
const monthKey = `${date.getFullYear()}-${date.getMonth() + 1}`;
|
||||
acc[monthKey] = (acc[monthKey] || 0) + 1;
|
||||
return acc;
|
||||
}, {} as Record<string, number>);
|
||||
|
||||
let mostActive = { month: '', count: 0 };
|
||||
Object.entries(monthGroups).forEach(([month, count]) => {
|
||||
if ((count as number) > mostActive.count) {
|
||||
mostActive = { month, count: count as number };
|
||||
}
|
||||
});
|
||||
|
||||
return mostActive;
|
||||
}
|
||||
|
||||
function calculateListeningVelocity(tracks: any[], timeRange: string) {
|
||||
if (tracks.length === 0) return 0;
|
||||
|
||||
let daysInRange = 1;
|
||||
if (timeRange === 'year') daysInRange = 365;
|
||||
else if (timeRange === 'month') daysInRange = 30;
|
||||
else if (timeRange === 'week') daysInRange = 7;
|
||||
else {
|
||||
const firstTrack = Math.min(...tracks.map(t => t.played_at));
|
||||
const lastTrack = Math.max(...tracks.map(t => t.played_at));
|
||||
daysInRange = Math.max(1, (lastTrack - firstTrack) / (1000 * 60 * 60 * 24));
|
||||
}
|
||||
|
||||
return tracks.length / daysInRange;
|
||||
}
|
||||
|
||||
export const usersRouter = Router();
|
||||
|
||||
// Fetch and store user data (recently played, top tracks/artists)
|
||||
|
|
@ -124,4 +216,293 @@ usersRouter.get('/:uid/audio-features', requireAuth, async (req: AuthedRequest,
|
|||
}
|
||||
});
|
||||
|
||||
// Wrapped feature - generate personalized music statistics
|
||||
usersRouter.get('/:uid/wrapped', requireAuth, async (req: AuthedRequest, res) => {
|
||||
try {
|
||||
const { uid } = req.params;
|
||||
if (!req.user) return res.status(403).json({ error: 'Forbidden' });
|
||||
if (req.user.uid !== uid) {
|
||||
const paired = db.db.prepare('SELECT 1 FROM friendships WHERE (user_a_id=? AND user_b_id=?) OR (user_a_id=? AND user_b_id=?)').get(req.user.uid, uid, uid, req.user.uid);
|
||||
if (!paired) return res.status(403).json({ error: 'Forbidden' });
|
||||
}
|
||||
|
||||
// Get time range from query (default to all time)
|
||||
const timeRange = req.query.range as string || 'all';
|
||||
let timeFilter = '';
|
||||
let timeParams: any[] = [uid];
|
||||
|
||||
if (timeRange === 'year') {
|
||||
const oneYearAgo = Date.now() - (365 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneYearAgo);
|
||||
} else if (timeRange === 'month') {
|
||||
const oneMonthAgo = Date.now() - (30 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneMonthAgo);
|
||||
} else if (timeRange === 'week') {
|
||||
const oneWeekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000);
|
||||
timeFilter = 'AND played_at >= ?';
|
||||
timeParams.push(oneWeekAgo);
|
||||
}
|
||||
|
||||
// Get all played tracks for analysis
|
||||
const playedTracks = db.db.prepare(`
|
||||
SELECT played_at, track_json
|
||||
FROM recently_played
|
||||
WHERE user_id = ? ${timeFilter}
|
||||
ORDER BY played_at DESC
|
||||
`).all(...timeParams) as Array<{ played_at: number; track_json: string }>;
|
||||
|
||||
if (playedTracks.length === 0) {
|
||||
return res.json({
|
||||
totalTracks: 0,
|
||||
totalListeningTime: 0,
|
||||
topSongs: [],
|
||||
topArtists: [],
|
||||
topGenres: [],
|
||||
listeningPatterns: {
|
||||
mostActiveHour: 0,
|
||||
mostActiveDay: 'Monday',
|
||||
listeningStreak: 0
|
||||
},
|
||||
timeRange,
|
||||
generatedAt: Date.now()
|
||||
});
|
||||
}
|
||||
|
||||
// Parse tracks and calculate statistics
|
||||
const tracks = playedTracks.map(row => {
|
||||
const track = JSON.parse(row.track_json);
|
||||
return {
|
||||
...track,
|
||||
played_at: row.played_at,
|
||||
duration_ms: track.duration_ms || 0
|
||||
};
|
||||
});
|
||||
|
||||
// Calculate total listening time
|
||||
const totalListeningTime = tracks.reduce((sum, track) => sum + (track.duration_ms || 0), 0);
|
||||
|
||||
// Top songs (by play count)
|
||||
const songCounts = new Map<string, { track: any; count: number; totalDuration: number }>();
|
||||
tracks.forEach(track => {
|
||||
const key = track.id;
|
||||
if (songCounts.has(key)) {
|
||||
const existing = songCounts.get(key)!;
|
||||
existing.count++;
|
||||
existing.totalDuration += track.duration_ms || 0;
|
||||
} else {
|
||||
songCounts.set(key, { track, count: 1, totalDuration: track.duration_ms || 0 });
|
||||
}
|
||||
});
|
||||
|
||||
const topSongs = Array.from(songCounts.values())
|
||||
.sort((a, b) => b.count - a.count)
|
||||
.slice(0, 10)
|
||||
.map(item => ({
|
||||
...item.track,
|
||||
playCount: item.count,
|
||||
totalDuration: item.totalDuration
|
||||
}));
|
||||
|
||||
// Top artists (by play count)
|
||||
const artistCounts = new Map<string, { artist: any; count: number; totalDuration: number }>();
|
||||
tracks.forEach(track => {
|
||||
track.artists?.forEach((artist: any) => {
|
||||
const key = artist.id;
|
||||
if (artistCounts.has(key)) {
|
||||
const existing = artistCounts.get(key)!;
|
||||
existing.count++;
|
||||
existing.totalDuration += track.duration_ms || 0;
|
||||
} else {
|
||||
artistCounts.set(key, { artist, count: 1, totalDuration: track.duration_ms || 0 });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const topArtists = Array.from(artistCounts.values())
|
||||
.sort((a, b) => b.count - a.count)
|
||||
.slice(0, 10)
|
||||
.map(item => ({
|
||||
...item.artist,
|
||||
playCount: item.count,
|
||||
totalDuration: item.totalDuration
|
||||
}));
|
||||
|
||||
// Top genres (extract from track data if available)
|
||||
const genreCounts = new Map<string, number>();
|
||||
tracks.forEach(track => {
|
||||
// Try to extract genres from track data
|
||||
if (track.album?.genres) {
|
||||
track.album.genres.forEach((genre: string) => {
|
||||
genreCounts.set(genre, (genreCounts.get(genre) || 0) + 1);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const topGenres = Array.from(genreCounts.entries())
|
||||
.sort((a, b) => b[1] - a[1])
|
||||
.slice(0, 10)
|
||||
.map(([genre, count]) => ({ genre, count }));
|
||||
|
||||
// Listening patterns
|
||||
const hours = new Array(24).fill(0);
|
||||
const days = new Array(7).fill(0);
|
||||
const dayNames = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
|
||||
|
||||
tracks.forEach(track => {
|
||||
const date = new Date(track.played_at);
|
||||
hours[date.getHours()]++;
|
||||
days[date.getDay()]++;
|
||||
});
|
||||
|
||||
const mostActiveHour = hours.indexOf(Math.max(...hours));
|
||||
const mostActiveDay = dayNames[days.indexOf(Math.max(...days))];
|
||||
|
||||
// Calculate listening streak (consecutive days with at least one play)
|
||||
const playDates = new Set(tracks.map(track =>
|
||||
new Date(track.played_at).toDateString()
|
||||
));
|
||||
const sortedDates = Array.from(playDates).sort().reverse();
|
||||
|
||||
let streak = 0;
|
||||
let currentDate = new Date();
|
||||
let lastPlayDate = null;
|
||||
|
||||
for (let i = 0; i < sortedDates.length; i++) {
|
||||
const playDate = new Date(sortedDates[i]);
|
||||
const daysDiff = lastPlayDate ?
|
||||
Math.floor((lastPlayDate.getTime() - playDate.getTime()) / (1000 * 60 * 60 * 24)) :
|
||||
Math.floor((currentDate.getTime() - playDate.getTime()) / (1000 * 60 * 60 * 24));
|
||||
|
||||
if (daysDiff === 1 || (i === 0 && daysDiff <= 1)) {
|
||||
streak++;
|
||||
lastPlayDate = playDate;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Get partner data if available
|
||||
let partnerData = null;
|
||||
try {
|
||||
const partner = db.db.prepare('SELECT user_b_id FROM friendships WHERE user_a_id = ? UNION SELECT user_a_id FROM friendships WHERE user_b_id = ?').get(uid, uid) as { user_b_id?: string } | undefined;
|
||||
if (partner?.user_b_id) {
|
||||
const partnerTracks = db.db.prepare(`
|
||||
SELECT played_at, track_json
|
||||
FROM recently_played
|
||||
WHERE user_id = ? ${timeFilter}
|
||||
ORDER BY played_at DESC
|
||||
`).all(...timeParams.slice(0, -1), partner.user_b_id, ...timeParams.slice(-1)) as Array<{ played_at: number; track_json: string }>;
|
||||
|
||||
if (partnerTracks.length > 0) {
|
||||
const partnerTracksParsed = partnerTracks.map(row => {
|
||||
const track = JSON.parse(row.track_json);
|
||||
return { ...track, played_at: row.played_at, duration_ms: track.duration_ms || 0 };
|
||||
});
|
||||
|
||||
partnerData = {
|
||||
totalTracks: partnerTracksParsed.length,
|
||||
totalListeningTime: partnerTracksParsed.reduce((sum, track) => sum + (track.duration_ms || 0), 0),
|
||||
topSongs: partnerTracksParsed.slice(0, 5),
|
||||
topArtists: partnerTracksParsed.slice(0, 5).map(track => track.artists?.[0]).filter(Boolean)
|
||||
};
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// Partner data not available
|
||||
}
|
||||
|
||||
// Calculate additional unique categories
|
||||
const uniqueCategories = {
|
||||
// Most played song this week
|
||||
songOfTheWeek: tracks.filter(track => {
|
||||
const weekAgo = Date.now() - (7 * 24 * 60 * 60 * 1000);
|
||||
return track.played_at >= weekAgo;
|
||||
}).reduce((acc, track) => {
|
||||
acc[track.id] = (acc[track.id] || 0) + 1;
|
||||
return acc;
|
||||
}, {} as Record<string, number>),
|
||||
|
||||
// Longest listening session (consecutive plays)
|
||||
longestSession: calculateLongestSession(tracks),
|
||||
|
||||
// Most diverse day (most unique artists in one day)
|
||||
mostDiverseDay: calculateMostDiverseDay(tracks),
|
||||
|
||||
// Late night listener (plays after 11 PM)
|
||||
lateNightListener: tracks.filter(track => new Date(track.played_at).getHours() >= 23).length,
|
||||
|
||||
// Early bird (plays before 6 AM)
|
||||
earlyBird: tracks.filter(track => new Date(track.played_at).getHours() < 6).length,
|
||||
|
||||
// Weekend warrior (plays on weekends)
|
||||
weekendWarrior: tracks.filter(track => {
|
||||
const day = new Date(track.played_at).getDay();
|
||||
return day === 0 || day === 6;
|
||||
}).length,
|
||||
|
||||
// Discovery rate (new artists discovered)
|
||||
discoveryRate: new Set(tracks.map(track => track.artists?.[0]?.id).filter(Boolean)).size,
|
||||
|
||||
// Average song length
|
||||
averageSongLength: tracks.length > 0 ? tracks.reduce((sum, track) => sum + (track.duration_ms || 0), 0) / tracks.length : 0,
|
||||
|
||||
// Most active month
|
||||
mostActiveMonth: getMostActiveMonth(tracks),
|
||||
|
||||
// Listening velocity (songs per day)
|
||||
listeningVelocity: calculateListeningVelocity(tracks, timeRange)
|
||||
};
|
||||
|
||||
// Get data collection start date
|
||||
const firstPlay = db.db.prepare('SELECT MIN(played_at) as first_play FROM recently_played WHERE user_id = ?').get(uid) as { first_play?: number } | undefined;
|
||||
const dataCollectionStart = firstPlay?.first_play || Date.now();
|
||||
|
||||
res.json({
|
||||
totalTracks: tracks.length,
|
||||
totalListeningTime,
|
||||
topSongs,
|
||||
topArtists,
|
||||
topGenres,
|
||||
listeningPatterns: {
|
||||
mostActiveHour,
|
||||
mostActiveDay,
|
||||
listeningStreak: streak
|
||||
},
|
||||
uniqueCategories,
|
||||
partnerData,
|
||||
dataCollectionStart,
|
||||
timeRange,
|
||||
generatedAt: Date.now()
|
||||
});
|
||||
|
||||
} catch (e: any) {
|
||||
console.error('Wrapped generation error:', e);
|
||||
res.status(500).json({ error: 'Failed to generate wrapped data', detail: e?.message });
|
||||
}
|
||||
});
|
||||
|
||||
// Get artist details with profile picture
|
||||
usersRouter.get('/:uid/artist/:artistId', requireAuth, async (req: AuthedRequest, res) => {
|
||||
try {
|
||||
const { uid, artistId } = req.params;
|
||||
if (!req.user) return res.status(403).json({ error: 'Forbidden' });
|
||||
if (req.user.uid !== uid) {
|
||||
const paired = db.db.prepare('SELECT 1 FROM friendships WHERE (user_a_id=? AND user_b_id=?) OR (user_a_id=? AND user_b_id=?)').get(req.user.uid, uid, uid, req.user.uid);
|
||||
if (!paired) return res.status(403).json({ error: 'Forbidden' });
|
||||
}
|
||||
|
||||
const accessToken = await ensureValidAccessToken(uid);
|
||||
const response = await axios.get(`https://api.spotify.com/v1/artists/${artistId}`, {
|
||||
headers: { Authorization: `Bearer ${accessToken}` }
|
||||
});
|
||||
|
||||
res.json(response.data);
|
||||
} catch (e: any) {
|
||||
console.error('Artist fetch error:', e);
|
||||
res.status(500).json({ error: 'Failed to fetch artist data', detail: e?.message });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
|
|||
BIN
spotify.db
BIN
spotify.db
Binary file not shown.
BIN
spotify.db-shm
BIN
spotify.db-shm
Binary file not shown.
BIN
spotify.db-wal
BIN
spotify.db-wal
Binary file not shown.
|
|
@ -13,6 +13,7 @@ import { LastListenedPage } from './pages/LastListenedPage';
|
|||
import { MixedPlaylistPage } from './pages/MixedPlaylistPage';
|
||||
import { MemoryLanePage } from './pages/MemoryLanePage';
|
||||
import LiveDashboardPage from './pages/LiveDashboardPage';
|
||||
import { WrappedPage } from './pages/WrappedPage';
|
||||
|
||||
function App() {
|
||||
const { currentUser, partnerUser, isLoading, theme } = useStore();
|
||||
|
|
@ -184,6 +185,7 @@ function App() {
|
|||
<Route path="/mixed-playlist" element={<MixedPlaylistPage />} />
|
||||
<Route path="/memory-lane" element={<MemoryLanePage />} />
|
||||
<Route path="/live" element={<LiveDashboardPage />} />
|
||||
<Route path="/wrapped" element={<WrappedPage />} />
|
||||
</>
|
||||
)}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ import {
|
|||
Menu,
|
||||
X,
|
||||
Settings,
|
||||
Trash2
|
||||
Trash2,
|
||||
Award
|
||||
} from 'lucide-react';
|
||||
import { useStore } from '../store/useStore';
|
||||
import { apiPost } from '../utils/api';
|
||||
|
|
@ -35,6 +36,7 @@ export const Navbar = () => {
|
|||
{ name: 'Last Listened', href: '/last-listened', icon: Music },
|
||||
{ name: 'Mixed Playlist', href: '/mixed-playlist', icon: PlayCircle },
|
||||
{ name: 'Memory Lane', href: '/memory-lane', icon: Sparkles },
|
||||
{ name: 'Wrapped', href: '/wrapped', icon: Award },
|
||||
];
|
||||
|
||||
const handleLogout = () => {
|
||||
|
|
|
|||
|
|
@ -127,12 +127,12 @@ export const LastListenedPage = () => {
|
|||
whileHover={{ scale: 1.02 }}
|
||||
className="bg-white/5 rounded-xl p-6 mb-6 border border-white/10"
|
||||
>
|
||||
<div className="flex items-center space-x-6">
|
||||
<div className="relative">
|
||||
<div className="flex items-center space-x-4 sm:space-x-6">
|
||||
<div className="relative flex-shrink-0">
|
||||
<img
|
||||
src={recentTrack.track.album.images[0]?.url || '/placeholder-album.png'}
|
||||
alt={recentTrack.track.album.name}
|
||||
className="w-20 h-20 rounded-lg object-cover"
|
||||
className="w-16 h-16 sm:w-20 sm:h-20 rounded-lg object-cover"
|
||||
/>
|
||||
{isPlaying && playingTrackId === recentTrack.track.id && (
|
||||
<div
|
||||
|
|
@ -339,12 +339,12 @@ export const LastListenedPage = () => {
|
|||
/>
|
||||
<div className="flex-1 min-w-0">
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="text-white font-medium truncate">{item.track.name}</span>
|
||||
<span className="text-white font-medium text-sm sm:text-base truncate">{item.track.name}</span>
|
||||
{sharedTimeline.overlaps.has(item.track.id) && (
|
||||
<span className="text-pink-400 text-sm">💕</span>
|
||||
<span className="text-pink-400 text-sm flex-shrink-0">💕</span>
|
||||
)}
|
||||
</div>
|
||||
<div className="text-white/70 text-sm truncate">{item.track.artists?.map((a: any) => a.name).join(', ')}</div>
|
||||
<div className="text-white/70 text-xs sm:text-sm truncate">{item.track.artists?.map((a: any) => a.name).join(', ')}</div>
|
||||
</div>
|
||||
<div className="text-white/50 text-xs w-32 text-right">
|
||||
{formatDate(new Date(item.played_at).toISOString())}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,21 @@ import { getSpotifyAuthUrl } from '../utils/spotify';
|
|||
|
||||
export const LoginPage = () => {
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [showMobileHelp, setShowMobileHelp] = useState(false);
|
||||
const [authUrlForModal, setAuthUrlForModal] = useState<string | null>(null);
|
||||
|
||||
const handleSpotifyLogin = () => {
|
||||
setIsLoading(true);
|
||||
window.location.href = getSpotifyAuthUrl();
|
||||
const ua = navigator.userAgent || navigator.vendor || (window as any).opera;
|
||||
const isIOS = /iPad|iPhone|iPod/.test(ua) || (navigator.platform === 'MacIntel' && (navigator as any).maxTouchPoints > 1);
|
||||
const isAndroid = /Android/.test(ua);
|
||||
const isMobile = isIOS || isAndroid;
|
||||
const isInAppBrowser = /(FBAN|FBAV|Instagram|Line\/|Twitter|TikTok|Snapchat|Pinterest)/i.test(ua);
|
||||
|
||||
const authUrl = getSpotifyAuthUrl({ forceDialog: !isMobile });
|
||||
|
||||
// Always stay in same tab
|
||||
window.location.href = authUrl;
|
||||
};
|
||||
|
||||
const features = [
|
||||
|
|
@ -144,6 +155,38 @@ export const LoginPage = () => {
|
|||
</p>
|
||||
</motion.div>
|
||||
</div>
|
||||
<MobileAuthHelpModal open={showMobileHelp} onClose={() => setShowMobileHelp(false)} authUrl={authUrlForModal} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
// Lightweight modal for mobile/in-app browsers
|
||||
function MobileAuthHelpModal({ open, onClose, authUrl }: { open: boolean; onClose: () => void; authUrl: string | null }) {
|
||||
if (!open || !authUrl) return null;
|
||||
const handleOpen = () => {
|
||||
const win = window.open(authUrl, '_blank', 'noopener,noreferrer');
|
||||
if (!win) window.location.href = authUrl;
|
||||
};
|
||||
const handleCopy = async () => {
|
||||
try {
|
||||
await navigator.clipboard.writeText(authUrl);
|
||||
alert('Link copied. Paste in Safari/Chrome to continue.');
|
||||
} catch {}
|
||||
};
|
||||
return (
|
||||
<div className="fixed inset-0 z-50 flex items-center justify-center px-4">
|
||||
<div className="absolute inset-0 bg-black/70" onClick={onClose} />
|
||||
<div className="relative z-10 w-full max-w-md glass-fluid rounded-2xl p-6 text-white">
|
||||
<h3 className="text-xl font-bold mb-2">Open Spotify Login</h3>
|
||||
<p className="text-white/80 text-sm mb-4">
|
||||
If this opened inside another app (Instagram, Facebook, Twitter), use your system browser to avoid password overlays.
|
||||
</p>
|
||||
<div className="grid grid-cols-1 gap-3">
|
||||
<button onClick={handleOpen} className="w-full bg-white/10 hover:bg-white/20 border border-white/20 rounded-xl py-3 font-medium">Open in new tab</button>
|
||||
<button onClick={handleCopy} className="w-full bg-white/10 hover:bg-white/20 border border-white/20 rounded-xl py-3 font-medium">Copy link</button>
|
||||
<button onClick={onClose} className="w-full bg-transparent text-white/70 underline py-2">Cancel</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -256,10 +256,14 @@ export const MemoryLanePage = () => {
|
|||
value={newMemory.type}
|
||||
onChange={(e) => setNewMemory({ ...newMemory, type: e.target.value as any })}
|
||||
className="w-full px-4 py-3 bg-white/10 border border-white/20 rounded-lg text-white focus:outline-none focus:border-spotify-green"
|
||||
style={{
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
||||
color: 'rgba(255, 255, 255, 0.9)'
|
||||
}}
|
||||
>
|
||||
<option value="milestone">Milestone</option>
|
||||
<option value="shared_track">Shared Track</option>
|
||||
<option value="playlist_created">Playlist Created</option>
|
||||
<option value="milestone" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Milestone</option>
|
||||
<option value="shared_track" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Shared Track</option>
|
||||
<option value="playlist_created" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Playlist Created</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ export const MixedPlaylistPage = () => {
|
|||
>
|
||||
<div className="flex items-start justify-between mb-4">
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className={`w-16 h-16 rounded-xl flex items-center justify-center overflow-hidden ${
|
||||
<div className={`w-16 h-16 rounded-xl flex items-center justify-center overflow-hidden flex-shrink-0 ${
|
||||
isNew ? 'bg-gradient-to-br from-spotify-green to-green-600' : 'bg-gradient-to-br from-purple-500 to-pink-500'
|
||||
}`}>
|
||||
{isNew ? (
|
||||
|
|
@ -574,14 +574,18 @@ export const MixedPlaylistPage = () => {
|
|||
className="w-full bg-white/10 text-white rounded-lg p-2 appearance-none focus:outline-none focus:ring-2 focus:ring-spotify-green"
|
||||
value={vibe}
|
||||
onChange={(e) => setVibe(e.target.value)}
|
||||
style={{
|
||||
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
||||
color: 'rgba(255, 255, 255, 0.9)'
|
||||
}}
|
||||
>
|
||||
<option value="">Auto</option>
|
||||
<option value="energetic">Energetic</option>
|
||||
<option value="chill">Chill</option>
|
||||
<option value="happy">Happy</option>
|
||||
<option value="sad">Sad</option>
|
||||
<option value="party">Party</option>
|
||||
<option value="focus">Focus</option>
|
||||
<option value="" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Auto</option>
|
||||
<option value="energetic" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Energetic</option>
|
||||
<option value="chill" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Chill</option>
|
||||
<option value="happy" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Happy</option>
|
||||
<option value="sad" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Sad</option>
|
||||
<option value="party" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Party</option>
|
||||
<option value="focus" style={{ backgroundColor: 'rgba(30, 30, 30, 0.95)', color: 'rgba(255, 255, 255, 0.9)' }}>Focus</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
|
|
|
|||
726
src/pages/WrappedPage.tsx
Normal file
726
src/pages/WrappedPage.tsx
Normal file
|
|
@ -0,0 +1,726 @@
|
|||
import { useState, useEffect } from 'react';
|
||||
import { motion, AnimatePresence } from 'framer-motion';
|
||||
import {
|
||||
Music,
|
||||
Clock,
|
||||
TrendingUp,
|
||||
Calendar,
|
||||
Play,
|
||||
Award,
|
||||
BarChart3,
|
||||
Sparkles,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
Moon,
|
||||
Sun,
|
||||
Zap,
|
||||
Target,
|
||||
Users,
|
||||
Heart,
|
||||
Star,
|
||||
Activity
|
||||
} from 'lucide-react';
|
||||
import { useStore } from '../store/useStore';
|
||||
import { apiGet } from '../utils/api';
|
||||
import { formatDuration } from '../utils/cn';
|
||||
import { getThemeClasses, getThemeHueShift } from '../utils/theme';
|
||||
import { WrappedData, WrappedSlide } from '../types';
|
||||
import DarkVeil from '../components/DarkVeil';
|
||||
import toast from 'react-hot-toast';
|
||||
|
||||
export const WrappedPage = () => {
|
||||
const { currentUser, partnerUser, theme } = useStore();
|
||||
const themeClasses = getThemeClasses(theme);
|
||||
const [wrappedData, setWrappedData] = useState<WrappedData | null>(null);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [currentSlide, setCurrentSlide] = useState(0);
|
||||
const [timeRange, setTimeRange] = useState('all');
|
||||
const [artistImages, setArtistImages] = useState<Record<string, string>>({});
|
||||
|
||||
// Generate slides from wrapped data
|
||||
const generateSlides = (data: WrappedData): WrappedSlide[] => {
|
||||
const slides: WrappedSlide[] = [];
|
||||
|
||||
// Intro slide with data collection start
|
||||
const startDate = new Date(data.dataCollectionStart);
|
||||
const daysSinceStart = Math.floor((Date.now() - data.dataCollectionStart) / (1000 * 60 * 60 * 24));
|
||||
const hoursListened = Math.floor(data.totalListeningTime / (1000 * 60 * 60));
|
||||
|
||||
slides.push({
|
||||
id: 'intro',
|
||||
type: 'intro',
|
||||
title: 'Your Music Wrapped',
|
||||
subtitle: `${data.timeRange === 'all' ? 'All Time' : data.timeRange.charAt(0).toUpperCase() + data.timeRange.slice(1)} Edition`,
|
||||
gradient: 'from-purple-500 via-pink-500 to-red-500',
|
||||
data: {
|
||||
totalTracks: data.totalTracks,
|
||||
hoursListened,
|
||||
daysSinceStart,
|
||||
startDate: startDate.toLocaleDateString()
|
||||
}
|
||||
});
|
||||
|
||||
// Data collection start slide
|
||||
slides.push({
|
||||
id: 'dataStart',
|
||||
type: 'intro',
|
||||
title: 'Your Musical Journey',
|
||||
subtitle: `Started ${startDate.toLocaleDateString()}`,
|
||||
gradient: 'from-blue-500 via-purple-500 to-pink-500',
|
||||
data: {
|
||||
hoursListened,
|
||||
daysSinceStart,
|
||||
averagePerDay: daysSinceStart > 0 ? Math.round(data.totalTracks / daysSinceStart) : 0
|
||||
}
|
||||
});
|
||||
|
||||
// Top Songs slide
|
||||
if (data.topSongs.length > 0) {
|
||||
slides.push({
|
||||
id: 'topSongs',
|
||||
type: 'topSongs',
|
||||
title: 'Your Top Songs',
|
||||
subtitle: `You played ${data.topSongs[0]?.playCount || 0} times`,
|
||||
gradient: 'from-green-400 via-blue-500 to-purple-600',
|
||||
data: data.topSongs.slice(0, 5)
|
||||
});
|
||||
}
|
||||
|
||||
// Top Artists slide with profile pictures
|
||||
if (data.topArtists.length > 0) {
|
||||
slides.push({
|
||||
id: 'topArtists',
|
||||
type: 'topArtists',
|
||||
title: 'Your Top Artists',
|
||||
subtitle: `${data.topArtists[0]?.name || 'Unknown'} was your #1`,
|
||||
gradient: 'from-yellow-400 via-red-500 to-pink-500',
|
||||
data: data.topArtists.slice(0, 5)
|
||||
});
|
||||
}
|
||||
|
||||
// Unique categories slides
|
||||
slides.push({
|
||||
id: 'listeningHabits',
|
||||
type: 'listeningPatterns',
|
||||
title: 'Your Listening Habits',
|
||||
subtitle: 'When you vibe the most',
|
||||
gradient: 'from-teal-400 via-green-500 to-blue-500',
|
||||
data: {
|
||||
mostActiveHour: data.listeningPatterns.mostActiveHour,
|
||||
mostActiveDay: data.listeningPatterns.mostActiveDay,
|
||||
listeningStreak: data.listeningPatterns.listeningStreak,
|
||||
lateNight: data.uniqueCategories.lateNightListener,
|
||||
earlyBird: data.uniqueCategories.earlyBird,
|
||||
weekendWarrior: data.uniqueCategories.weekendWarrior
|
||||
}
|
||||
});
|
||||
|
||||
// Discovery slide
|
||||
slides.push({
|
||||
id: 'discovery',
|
||||
type: 'listeningPatterns',
|
||||
title: 'Music Explorer',
|
||||
subtitle: 'Your discovery journey',
|
||||
gradient: 'from-indigo-500 via-purple-500 to-pink-500',
|
||||
data: {
|
||||
discoveryRate: data.uniqueCategories.discoveryRate,
|
||||
averageSongLength: data.uniqueCategories.averageSongLength,
|
||||
listeningVelocity: data.uniqueCategories.listeningVelocity
|
||||
}
|
||||
});
|
||||
|
||||
// Longest session slide
|
||||
if (data.uniqueCategories.longestSession.duration > 0) {
|
||||
slides.push({
|
||||
id: 'longestSession',
|
||||
type: 'listeningTime',
|
||||
title: 'Your Longest Session',
|
||||
subtitle: 'When you couldn\'t stop listening',
|
||||
gradient: 'from-orange-400 via-red-500 to-pink-500',
|
||||
data: {
|
||||
totalTime: data.uniqueCategories.longestSession.duration,
|
||||
totalTracks: Math.floor(data.uniqueCategories.longestSession.duration / (data.uniqueCategories.averageSongLength || 180000)), // Estimate tracks based on average song length
|
||||
averagePerTrack: data.uniqueCategories.averageSongLength || 180000
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Most diverse day slide
|
||||
if (data.uniqueCategories.mostDiverseDay.artistCount > 0) {
|
||||
slides.push({
|
||||
id: 'mostDiverseDay',
|
||||
type: 'listeningPatterns',
|
||||
title: 'Your Most Diverse Day',
|
||||
subtitle: 'When you explored the most',
|
||||
gradient: 'from-cyan-400 via-blue-500 to-indigo-600',
|
||||
data: {
|
||||
date: data.uniqueCategories.mostDiverseDay.date,
|
||||
artistCount: data.uniqueCategories.mostDiverseDay.artistCount
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Partner comparison slides
|
||||
if (data.partnerData) {
|
||||
slides.push({
|
||||
id: 'partnerComparison',
|
||||
type: 'listeningTime',
|
||||
title: 'You vs Your Partner',
|
||||
subtitle: 'Musical journey together',
|
||||
gradient: 'from-pink-400 via-purple-500 to-indigo-500',
|
||||
data: {
|
||||
yourTracks: data.totalTracks,
|
||||
partnerTracks: data.partnerData.totalTracks,
|
||||
yourTime: data.totalListeningTime,
|
||||
partnerTime: data.partnerData.totalListeningTime
|
||||
}
|
||||
});
|
||||
|
||||
// Shared artists
|
||||
const yourArtists = new Set(data.topArtists.slice(0, 10).map(a => a.id));
|
||||
const partnerArtists = new Set(data.partnerData.topArtists.map(a => a.id));
|
||||
const sharedArtists = Array.from(yourArtists).filter(id => partnerArtists.has(id));
|
||||
|
||||
if (sharedArtists.length > 0) {
|
||||
slides.push({
|
||||
id: 'sharedTaste',
|
||||
type: 'topArtists',
|
||||
title: 'Your Shared Taste',
|
||||
subtitle: `${sharedArtists.length} artists you both love`,
|
||||
gradient: 'from-green-400 via-teal-500 to-blue-500',
|
||||
data: { sharedArtists: sharedArtists.length }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Listening Time slide
|
||||
slides.push({
|
||||
id: 'listeningTime',
|
||||
type: 'listeningTime',
|
||||
title: 'Total Listening Time',
|
||||
subtitle: 'You\'ve been on a musical journey',
|
||||
gradient: 'from-orange-400 via-red-500 to-pink-500',
|
||||
data: {
|
||||
totalTime: data.totalListeningTime,
|
||||
totalTracks: data.totalTracks,
|
||||
averagePerTrack: data.totalTracks > 0 ? data.totalListeningTime / data.totalTracks : 0
|
||||
}
|
||||
});
|
||||
|
||||
// Outro slide
|
||||
slides.push({
|
||||
id: 'outro',
|
||||
type: 'outro',
|
||||
title: 'Thanks for Listening!',
|
||||
subtitle: 'Keep discovering amazing music',
|
||||
gradient: 'from-purple-500 via-pink-500 to-red-500',
|
||||
data: { generatedAt: data.generatedAt }
|
||||
});
|
||||
|
||||
return slides;
|
||||
};
|
||||
|
||||
const slides = wrappedData ? generateSlides(wrappedData) : [];
|
||||
|
||||
// Fetch artist images
|
||||
const fetchArtistImages = async (artists: any[]) => {
|
||||
if (!currentUser?.user?.id || !currentUser?.jwt) return;
|
||||
|
||||
const imagePromises = artists.map(async (artist) => {
|
||||
try {
|
||||
const response = await apiGet(`/users/${currentUser.user.id}/artist/${artist.id}`, currentUser.jwt);
|
||||
if (response.images && response.images.length > 0) {
|
||||
setArtistImages(prev => ({
|
||||
...prev,
|
||||
[artist.id]: response.images[0].url
|
||||
}));
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(`Failed to fetch image for artist ${artist.name}:`, error);
|
||||
}
|
||||
});
|
||||
|
||||
await Promise.all(imagePromises);
|
||||
};
|
||||
|
||||
const fetchWrappedData = async (range: string = 'all') => {
|
||||
if (!currentUser?.user?.id || !currentUser?.jwt) return;
|
||||
|
||||
setIsLoading(true);
|
||||
try {
|
||||
const response = await apiGet<WrappedData>(`/users/${currentUser.user.id}/wrapped?range=${range}`, currentUser.jwt);
|
||||
setWrappedData(response);
|
||||
setCurrentSlide(0);
|
||||
|
||||
// Fetch artist images
|
||||
if (response.topArtists && response.topArtists.length > 0) {
|
||||
fetchArtistImages(response.topArtists);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch wrapped data:', error);
|
||||
toast.error('Failed to load your music wrapped');
|
||||
} finally {
|
||||
setIsLoading(false);
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
fetchWrappedData(timeRange);
|
||||
}, [timeRange, currentUser?.user?.id, currentUser?.jwt]);
|
||||
|
||||
const nextSlide = () => {
|
||||
setCurrentSlide(prev => (prev + 1) % slides.length);
|
||||
};
|
||||
|
||||
const prevSlide = () => {
|
||||
setCurrentSlide(prev => (prev - 1 + slides.length) % slides.length);
|
||||
};
|
||||
|
||||
const formatTime = (ms: number) => {
|
||||
const hours = Math.floor(ms / (1000 * 60 * 60));
|
||||
const minutes = Math.floor((ms % (1000 * 60 * 60)) / (1000 * 60));
|
||||
return `${hours}h ${minutes}m`;
|
||||
};
|
||||
|
||||
const formatHour = (hour: number) => {
|
||||
if (hour === 0) return '12 AM';
|
||||
if (hour < 12) return `${hour} AM`;
|
||||
if (hour === 12) return '12 PM';
|
||||
return `${hour - 12} PM`;
|
||||
};
|
||||
|
||||
const renderSlide = (slide: WrappedSlide) => {
|
||||
const baseClasses = "w-full h-full flex flex-col items-center justify-center text-center p-3 sm:p-6 overflow-y-auto";
|
||||
|
||||
switch (slide.type) {
|
||||
case 'intro':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ scale: 0.5, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
transition={{ duration: 0.8, ease: "easeOut" }}
|
||||
className="relative z-10 space-y-6"
|
||||
>
|
||||
<Music className="w-16 h-16 sm:w-20 sm:h-20 lg:w-24 lg:h-24 mx-auto text-white/90" />
|
||||
<h1 className="text-3xl sm:text-5xl lg:text-6xl font-bold text-white mb-4">{slide.title}</h1>
|
||||
<p className="text-lg sm:text-xl lg:text-2xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
|
||||
{slide.data?.hoursListened && (
|
||||
<div className="text-2xl sm:text-4xl lg:text-5xl font-bold text-white mb-4">
|
||||
{slide.data.hoursListened} hours listened
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.daysSinceStart && (
|
||||
<div className="text-lg text-white/70">
|
||||
Since {slide.data.startDate} ({slide.data.daysSinceStart} days ago)
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.totalTracks && (
|
||||
<div className="text-2xl text-white/90">
|
||||
{slide.data.totalTracks} songs played
|
||||
</div>
|
||||
)}
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
case 'topSongs':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ y: 50, opacity: 0 }}
|
||||
animate={{ y: 0, opacity: 1 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="w-full max-w-3xl relative z-10"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-2">{slide.title}</h2>
|
||||
<p className="text-lg sm:text-lg lg:text-xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
|
||||
<div className="space-y-3">
|
||||
{slide.data?.map((song: any, index: number) => (
|
||||
<motion.div
|
||||
key={song.id}
|
||||
initial={{ x: -100, opacity: 0 }}
|
||||
animate={{ x: 0, opacity: 1 }}
|
||||
transition={{ delay: index * 0.2, duration: 0.5 }}
|
||||
className="flex items-center justify-between bg-white/10 backdrop-blur-md rounded-2xl p-4 border border-white/20"
|
||||
>
|
||||
<div className="flex items-center space-x-4">
|
||||
<div className="w-10 h-10 bg-white/20 rounded-full flex items-center justify-center text-white font-bold text-lg">
|
||||
{index + 1}
|
||||
</div>
|
||||
<img
|
||||
src={song.album?.images?.[0]?.url || '/placeholder-album.png'}
|
||||
alt={song.album?.name}
|
||||
className="w-12 h-12 rounded-lg object-cover"
|
||||
/>
|
||||
<div className="text-left">
|
||||
<h3 className="text-lg font-semibold text-white">{song.name}</h3>
|
||||
<p className="text-white/70 text-sm">{song.artists?.[0]?.name}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="text-right">
|
||||
<div className="text-white font-bold">{song.playCount} plays</div>
|
||||
<div className="text-white/70 text-sm">{formatDuration(song.duration_ms)}</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
case 'topArtists':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ y: 50, opacity: 0 }}
|
||||
animate={{ y: 0, opacity: 1 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="w-full max-w-4xl relative z-10"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-2">{slide.title}</h2>
|
||||
<p className="text-lg sm:text-lg lg:text-xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-4">
|
||||
{slide.data?.map((artist: any, index: number) => (
|
||||
<motion.div
|
||||
key={artist.id}
|
||||
initial={{ scale: 0.8, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
transition={{ delay: index * 0.1, duration: 0.5 }}
|
||||
className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20"
|
||||
>
|
||||
<div className="w-20 h-20 mx-auto mb-4 rounded-full overflow-hidden border-2 border-white/20">
|
||||
{artistImages[artist.id] ? (
|
||||
<img
|
||||
src={artistImages[artist.id]}
|
||||
alt={artist.name}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
) : (
|
||||
<div className="w-full h-full bg-white/20 flex items-center justify-center text-white font-bold text-xl">
|
||||
{index + 1}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<h3 className="text-xl font-bold text-white mb-2">{artist.name}</h3>
|
||||
<p className="text-white/70">{artist.playCount} plays</p>
|
||||
<p className="text-white/60 text-sm">{formatTime(artist.totalDuration)}</p>
|
||||
</motion.div>
|
||||
))}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
case 'listeningTime':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ scale: 0.5, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
transition={{ duration: 0.8, ease: "easeOut" }}
|
||||
className="space-y-6 relative z-10"
|
||||
>
|
||||
<Clock className="w-16 h-16 sm:w-20 sm:h-20 lg:w-24 lg:h-24 mx-auto text-white/90" />
|
||||
<h2 className="text-3xl sm:text-5xl lg:text-6xl font-bold text-white mb-4">{slide.title}</h2>
|
||||
<p className="text-lg sm:text-xl lg:text-2xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
|
||||
<div className="text-4xl sm:text-6xl lg:text-7xl font-bold text-white mb-8">
|
||||
{formatTime(slide.data?.totalTime || slide.data?.duration || 0)}
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-2 gap-6 text-center">
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 border border-white/20">
|
||||
<div className="text-3xl font-bold text-white">{slide.data?.totalTracks || 0}</div>
|
||||
<div className="text-white/70">Total Songs</div>
|
||||
</div>
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 border border-white/20">
|
||||
<div className="text-3xl font-bold text-white">
|
||||
{formatDuration(slide.data?.averagePerTrack || 0)}
|
||||
</div>
|
||||
<div className="text-white/70">Avg per Song</div>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
case 'listeningPatterns':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ y: 50, opacity: 0 }}
|
||||
animate={{ y: 0, opacity: 1 }}
|
||||
transition={{ duration: 0.6 }}
|
||||
className="w-full max-w-4xl relative z-10"
|
||||
>
|
||||
<h2 className="text-3xl sm:text-4xl lg:text-5xl font-bold text-white mb-2">{slide.title}</h2>
|
||||
<p className="text-lg sm:text-lg lg:text-xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
|
||||
<div className={`grid gap-6 justify-items-center ${
|
||||
// Check if this is a single-item slide (Most Diverse Day)
|
||||
slide.data?.artistCount !== undefined &&
|
||||
!slide.data?.mostActiveHour &&
|
||||
!slide.data?.mostActiveDay &&
|
||||
!slide.data?.listeningStreak &&
|
||||
!slide.data?.lateNight &&
|
||||
!slide.data?.earlyBird &&
|
||||
!slide.data?.weekendWarrior &&
|
||||
!slide.data?.discoveryRate &&
|
||||
!slide.data?.listeningVelocity &&
|
||||
!slide.data?.averageSongLength
|
||||
? 'grid-cols-1 justify-center'
|
||||
: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3'
|
||||
}`}>
|
||||
{slide.data?.mostActiveHour !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Clock className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{formatHour(slide.data.mostActiveHour)}
|
||||
</div>
|
||||
<div className="text-white/70">Most Active Hour</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.mostActiveDay && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Calendar className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.mostActiveDay}
|
||||
</div>
|
||||
<div className="text-white/70">Most Active Day</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.listeningStreak !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<TrendingUp className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.listeningStreak}
|
||||
</div>
|
||||
<div className="text-white/70">Day Streak</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.lateNight !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Moon className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.lateNight}
|
||||
</div>
|
||||
<div className="text-white/70">Late Night Plays</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.earlyBird !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Sun className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.earlyBird}
|
||||
</div>
|
||||
<div className="text-white/70">Early Bird Plays</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.weekendWarrior !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Activity className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.weekendWarrior}
|
||||
</div>
|
||||
<div className="text-white/70">Weekend Plays</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Discovery data for Music Explorer slide */}
|
||||
{slide.data?.discoveryRate !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Star className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.discoveryRate}
|
||||
</div>
|
||||
<div className="text-white/70">Artists Discovered</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.listeningVelocity !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Zap className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.listeningVelocity.toFixed(1)}
|
||||
</div>
|
||||
<div className="text-white/70">Songs per Day</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{slide.data?.averageSongLength !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Music className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{formatDuration(slide.data.averageSongLength)}
|
||||
</div>
|
||||
<div className="text-white/70">Avg Song Length</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Most Diverse Day data */}
|
||||
{slide.data?.artistCount !== undefined && (
|
||||
<div className="bg-white/10 backdrop-blur-md rounded-2xl p-6 text-center border border-white/20 w-full max-w-xs h-40 flex flex-col justify-center">
|
||||
<Users className="w-12 h-12 mx-auto text-white/90 mb-4" />
|
||||
<div className="text-2xl font-bold text-white mb-2">
|
||||
{slide.data.artistCount}
|
||||
</div>
|
||||
<div className="text-white/70">Artists on {slide.data.date}</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
case 'outro':
|
||||
return (
|
||||
<div className={`${baseClasses} relative`}>
|
||||
<motion.div
|
||||
initial={{ scale: 0.5, opacity: 0 }}
|
||||
animate={{ scale: 1, opacity: 1 }}
|
||||
transition={{ duration: 0.8, ease: "easeOut" }}
|
||||
className="space-y-6 relative z-10"
|
||||
>
|
||||
<Sparkles className="w-16 h-16 sm:w-20 sm:h-20 lg:w-24 lg:h-24 mx-auto text-white/90" />
|
||||
<h1 className="text-3xl sm:text-5xl lg:text-6xl font-bold text-white mb-4">{slide.title}</h1>
|
||||
<p className="text-lg sm:text-xl lg:text-2xl text-white/80 mb-8">{slide.subtitle}</p>
|
||||
<div className="text-lg text-white/60">
|
||||
Generated on {new Date(slide.data?.generatedAt || Date.now()).toLocaleDateString()}
|
||||
</div>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center relative">
|
||||
<DarkVeil hueShift={getThemeHueShift(theme)} />
|
||||
<motion.div
|
||||
initial={{ opacity: 0, scale: 0.8 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
className="glass-fluid rounded-3xl p-10 flex flex-col items-center space-y-6 relative z-20"
|
||||
>
|
||||
<div className="w-16 h-16 border-4 border-t-transparent rounded-full animate-spin" style={{ borderColor: `var(--theme-primary) var(--theme-primary) var(--theme-primary) transparent` }}></div>
|
||||
<p className="text-white font-medium text-lg">Generating your music wrapped...</p>
|
||||
</motion.div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (!wrappedData) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center relative">
|
||||
<DarkVeil hueShift={getThemeHueShift(theme)} />
|
||||
<div className="text-center relative z-20">
|
||||
<Music className="w-24 h-24 text-white/50 mx-auto mb-4" />
|
||||
<h2 className="text-2xl font-bold text-white mb-2">No Music Data</h2>
|
||||
<p className="text-white/70 mb-6">Start listening to music to generate your wrapped!</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="min-h-screen relative">
|
||||
<DarkVeil hueShift={getThemeHueShift(theme)} />
|
||||
|
||||
<div className="relative z-20">
|
||||
{/* Header */}
|
||||
<div className="fixed top-0 left-0 right-0 z-50 p-4 sm:p-6 bg-black/30 backdrop-blur-md border-b border-white/10">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="flex items-center space-x-4">
|
||||
<select
|
||||
value={timeRange}
|
||||
onChange={(e) => setTimeRange(e.target.value)}
|
||||
className="bg-white/10 backdrop-blur-md text-white rounded-lg px-3 py-1 border border-white/20"
|
||||
>
|
||||
<option value="all" className="bg-gray-800">All Time</option>
|
||||
<option value="year" className="bg-gray-800">This Year</option>
|
||||
<option value="month" className="bg-gray-800">This Month</option>
|
||||
<option value="week" className="bg-gray-800">This Week</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/* Slide Container */}
|
||||
<div className="relative w-full min-h-screen flex items-center justify-center p-2 sm:p-4 pt-20 sm:pt-24">
|
||||
<div className="w-full max-w-2xl sm:max-w-4xl h-[60vh] sm:h-[80vh] relative">
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div
|
||||
key={currentSlide}
|
||||
initial={{ opacity: 0, scale: 0.9, y: 20 }}
|
||||
animate={{ opacity: 1, scale: 1, y: 0 }}
|
||||
exit={{ opacity: 0, scale: 0.9, y: -20 }}
|
||||
transition={{ duration: 0.5, ease: "easeInOut" }}
|
||||
className="absolute inset-0 rounded-3xl overflow-hidden shadow-2xl overflow-y-auto"
|
||||
style={{
|
||||
background: `linear-gradient(135deg, ${themeClasses.cssVars?.primary || '#1db954'}20 0%, ${themeClasses.cssVars?.secondary || '#1ed760'}15 100%)`,
|
||||
backdropFilter: 'blur(25px) saturate(180%)',
|
||||
WebkitBackdropFilter: 'blur(25px) saturate(180%)',
|
||||
border: `1px solid ${themeClasses.cssVars?.primary || '#1db954'}40`,
|
||||
boxShadow: `0 25px 50px rgba(0,0,0,0.4), 0 0 0 1px ${themeClasses.cssVars?.primary || '#1db954'}30, inset 0 1px 0 rgba(255,255,255,0.1)`
|
||||
}}
|
||||
>
|
||||
{renderSlide(slides[currentSlide])}
|
||||
</motion.div>
|
||||
</AnimatePresence>
|
||||
|
||||
{/* Navigation */}
|
||||
{slides.length > 1 && (
|
||||
<>
|
||||
<button
|
||||
onClick={prevSlide}
|
||||
className="absolute left-4 top-1/2 transform -translate-y-1/2 bg-white/10 backdrop-blur-md hover:bg-white/20 text-white p-3 rounded-full transition-colors border border-white/20"
|
||||
>
|
||||
<ChevronLeft className="w-6 h-6" />
|
||||
</button>
|
||||
|
||||
<button
|
||||
onClick={nextSlide}
|
||||
className="absolute right-4 top-1/2 transform -translate-y-1/2 bg-white/10 backdrop-blur-md hover:bg-white/20 text-white p-3 rounded-full transition-colors border border-white/20"
|
||||
>
|
||||
<ChevronRight className="w-6 h-6" />
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
||||
{/* Slide Indicators */}
|
||||
<div className="absolute bottom-6 left-1/2 transform -translate-x-1/2 flex space-x-2">
|
||||
{slides.map((_, index) => (
|
||||
<button
|
||||
key={index}
|
||||
onClick={() => setCurrentSlide(index)}
|
||||
className={`w-3 h-3 rounded-full transition-colors ${
|
||||
index === currentSlide ? 'bg-white' : 'bg-white/30'
|
||||
}`}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
{/* Slide Counter */}
|
||||
<div className="absolute top-6 right-6 text-white/70 text-sm bg-white/10 backdrop-blur-md px-3 py-1 rounded-full border border-white/20">
|
||||
{currentSlide + 1} / {slides.length}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
@ -433,3 +433,53 @@ body {
|
|||
box-shadow: 0 0 0 0 var(--theme-primary);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dropdown styling fixes */
|
||||
select option {
|
||||
background-color: rgba(30, 30, 30, 0.95) !important;
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
border: none;
|
||||
padding: 8px 12px;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
select option:hover {
|
||||
background-color: var(--theme-primary) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
select option:checked,
|
||||
select option:selected {
|
||||
background-color: var(--theme-primary) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
select option:focus {
|
||||
background-color: var(--theme-primary) !important;
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
/* Additional select styling for consistency */
|
||||
select {
|
||||
background-color: rgba(255, 255, 255, 0.1) !important;
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
border: 1px solid rgba(255, 255, 255, 0.2) !important;
|
||||
}
|
||||
|
||||
select:focus {
|
||||
outline: none !important;
|
||||
border-color: var(--theme-primary) !important;
|
||||
box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.3) !important;
|
||||
}
|
||||
|
||||
/* Webkit-specific styling for better cross-browser support */
|
||||
select::-webkit-list-button {
|
||||
background-color: rgba(30, 30, 30, 0.95) !important;
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
}
|
||||
|
||||
/* Firefox-specific styling */
|
||||
select option {
|
||||
background: rgba(30, 30, 30, 0.95) !important;
|
||||
color: rgba(255, 255, 255, 0.9) !important;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,3 +105,46 @@ export interface MemoryLaneItem {
|
|||
date: Date;
|
||||
users: string[];
|
||||
}
|
||||
|
||||
export interface WrappedData {
|
||||
totalTracks: number;
|
||||
totalListeningTime: number;
|
||||
topSongs: (SpotifyTrack & { playCount: number; totalDuration: number })[];
|
||||
topArtists: (SpotifyArtist & { playCount: number; totalDuration: number })[];
|
||||
topGenres: { genre: string; count: number }[];
|
||||
listeningPatterns: {
|
||||
mostActiveHour: number;
|
||||
mostActiveDay: string;
|
||||
listeningStreak: number;
|
||||
};
|
||||
uniqueCategories: {
|
||||
songOfTheWeek: Record<string, number>;
|
||||
longestSession: { duration: number; startTime: number; endTime: number };
|
||||
mostDiverseDay: { date: string; artistCount: number };
|
||||
lateNightListener: number;
|
||||
earlyBird: number;
|
||||
weekendWarrior: number;
|
||||
discoveryRate: number;
|
||||
averageSongLength: number;
|
||||
mostActiveMonth: { month: string; count: number };
|
||||
listeningVelocity: number;
|
||||
};
|
||||
partnerData: {
|
||||
totalTracks: number;
|
||||
totalListeningTime: number;
|
||||
topSongs: any[];
|
||||
topArtists: any[];
|
||||
} | null;
|
||||
dataCollectionStart: number;
|
||||
timeRange: string;
|
||||
generatedAt: number;
|
||||
}
|
||||
|
||||
export interface WrappedSlide {
|
||||
id: string;
|
||||
type: 'intro' | 'topSongs' | 'topArtists' | 'topGenres' | 'listeningTime' | 'listeningPatterns' | 'outro';
|
||||
title: string;
|
||||
subtitle?: string;
|
||||
data?: any;
|
||||
gradient: string;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ console.log('🔍 Debug - Environment VITE_REDIRECT_URI:', (import.meta as any).
|
|||
|
||||
export const spotifyApi = new SpotifyWebApi();
|
||||
|
||||
export const getSpotifyAuthUrl = (): string => {
|
||||
export const getSpotifyAuthUrl = (options?: { forceDialog?: boolean }): string => {
|
||||
const forceDialog = options?.forceDialog ?? true;
|
||||
const scopes = [
|
||||
'user-read-private',
|
||||
'user-read-email',
|
||||
|
|
@ -33,7 +34,8 @@ export const getSpotifyAuthUrl = (): string => {
|
|||
response_type: 'code',
|
||||
redirect_uri: REDIRECT_URI,
|
||||
scope: scopes,
|
||||
show_dialog: 'true',
|
||||
// On mobile, avoid forcing the dialog to reduce login UI and password overlays
|
||||
show_dialog: forceDialog ? 'true' : 'false',
|
||||
});
|
||||
|
||||
const authUrl = `https://accounts.spotify.com/authorize?${params.toString()}`;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user