@earbug/db-models 0.0.62 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dockerignore +10 -0
- package/.github/workflows/publish.yaml +303 -0
- package/.nvmrc +1 -0
- package/Dockerfile.generate +19 -0
- package/model_options.json +3 -0
- package/models/AccessControlPreference.ts +53 -0
- package/models/AffinityRelationshipType.ts +96 -0
- package/models/AffinityTier.ts +131 -0
- package/models/AppUser.ts +577 -0
- package/models/AppUserDevice.ts +101 -0
- package/models/AppUserDeviceClassicBackup20260906.ts +66 -0
- package/models/AppUserFollowRelation.ts +128 -0
- package/models/AppUserPlatformRelation.ts +150 -0
- package/models/CanonAlbum.ts +229 -0
- package/models/CanonAlbumExternalReferenceRelation.ts +92 -0
- package/models/CanonAlbumGenreRelation.ts +86 -0
- package/models/CanonAlbumLabelRelation.ts +86 -0
- package/models/CanonAlbumTrackRelation.ts +92 -0
- package/models/CanonArtist.ts +356 -0
- package/models/CanonArtistAlbumRelation.ts +92 -0
- package/models/CanonArtistExternalReferenceRelation.ts +92 -0
- package/models/CanonArtistGenreRelation.ts +86 -0
- package/models/CanonArtistMemberRelation.ts +86 -0
- package/models/CanonArtistTrackRelation.ts +92 -0
- package/models/CanonGenre.ts +273 -0
- package/models/CanonGenreExternalReferenceRelation.ts +92 -0
- package/models/CanonLabel.ts +129 -0
- package/models/CanonLabelExternalReferenceRelation.ts +92 -0
- package/models/CanonMember.ts +130 -0
- package/models/CanonMemberExternalReferenceRelation.ts +99 -0
- package/models/CanonToPlatformAlbumRelation.ts +92 -0
- package/models/CanonToPlatformArtistRelation.ts +92 -0
- package/models/CanonToPlatformGenreRelation.ts +86 -0
- package/models/CanonToPlatformTrackRelation.ts +92 -0
- package/models/CanonTrack.ts +232 -0
- package/models/ConfigParam.ts +62 -0
- package/models/ExternalReference.ts +201 -0
- package/models/FeedConfig.ts +65 -0
- package/models/FeedContentType.ts +124 -0
- package/models/GuestUser.ts +137 -0
- package/models/JukeboxAccessType.ts +60 -0
- package/models/JukeboxCanonGenreRelation.ts +108 -0
- package/models/JukeboxInvite.ts +125 -0
- package/models/JukeboxQueueEntry.ts +247 -0
- package/models/JukeboxQueueMode.ts +60 -0
- package/models/JukeboxSession.ts +334 -0
- package/models/JukeboxSessionArtistAffinity.ts +136 -0
- package/models/JukeboxSessionGenreAffinity.ts +136 -0
- package/models/JukeboxStatus.ts +58 -0
- package/models/JukeboxTerminationCondition.ts +60 -0
- package/models/JukeboxType.ts +60 -0
- package/models/JukeboxUser.ts +182 -0
- package/models/JukeboxUserType.ts +58 -0
- package/models/KnexMigrations.ts +60 -0
- package/models/KnexMigrationsLock.ts +48 -0
- package/models/MerchItem.ts +198 -0
- package/models/MerchOrchestration.ts +130 -0
- package/models/MerchPlatform.ts +95 -0
- package/models/MerchType.ts +89 -0
- package/models/MetricsDaily.ts +79 -0
- package/models/MetricsEvent.ts +124 -0
- package/models/NewsArticle.ts +177 -0
- package/models/NewsPlatform.ts +76 -0
- package/models/NewsSite.ts +75 -0
- package/models/Notification.ts +214 -0
- package/models/NotificationType.ts +66 -0
- package/models/PauseStatusType.ts +58 -0
- package/models/Platform.ts +189 -0
- package/models/PlatformAlbum.ts +398 -0
- package/models/PlatformAlbumGenreRelation.ts +86 -0
- package/models/PlatformAlbumTrackRelation.ts +92 -0
- package/models/PlatformArtist.ts +358 -0
- package/models/PlatformArtistAlbumRelation.ts +92 -0
- package/models/PlatformArtistGenreRelation.ts +86 -0
- package/models/PlatformArtistTrackRelation.ts +92 -0
- package/models/PlatformGenre.ts +194 -0
- package/models/PlatformTrack.ts +339 -0
- package/models/PlatformTrackGenreRelation.ts +86 -0
- package/models/PlatformUserAlbum.ts +152 -0
- package/models/PlatformUserAlbumTrack.ts +138 -0
- package/models/PlatformUserPlaylist.ts +260 -0
- package/models/PlatformUserPlaylistArtistAffinity.ts +136 -0
- package/models/PlatformUserPlaylistGenreAffinity.ts +136 -0
- package/models/PlatformUserPlaylistTrack.ts +162 -0
- package/models/PlaybackStatus.ts +47 -0
- package/models/PlaybackStatusType.ts +58 -0
- package/models/RadioShow.ts +209 -0
- package/models/RadioShowGenres.ts +107 -0
- package/models/RadioShowMedia.ts +181 -0
- package/models/RadioShowPlacement.ts +115 -0
- package/models/RadioShowPublishRequests.ts +86 -0
- package/models/State.ts +86 -0
- package/models/TrackDeletionReason.ts +58 -0
- package/models/UnmatchedAlbum.ts +66 -0
- package/models/UnmatchedArtist.ts +81 -0
- package/models/UserAbuseReports.ts +232 -0
- package/models/UserAffinity.ts +117 -0
- package/models/UserArtistAffinity.ts +136 -0
- package/models/UserBookmarks.ts +235 -0
- package/models/UserComments.ts +271 -0
- package/models/UserContacts.ts +155 -0
- package/models/UserEngagementFactor.ts +109 -0
- package/models/UserGenreAffinity.ts +136 -0
- package/models/UserLikes.ts +235 -0
- package/models/UserMessages.ts +189 -0
- package/models/Versus.ts +438 -0
- package/models/VersusAccessType.ts +66 -0
- package/models/VersusCoCreator.ts +111 -0
- package/models/VersusCreatorScope.ts +66 -0
- package/models/VersusEndMode.ts +66 -0
- package/models/VersusEndTimerDuration.ts +81 -0
- package/models/VersusEndVoteThreshold.ts +67 -0
- package/models/VersusEntityKind.ts +79 -0
- package/models/VersusOption.ts +258 -0
- package/models/VersusPublishIssue.ts +146 -0
- package/models/VersusQuestion.ts +123 -0
- package/models/VersusQuestionVariableType.ts +66 -0
- package/models/VersusVote.ts +99 -0
- package/models/VersusVotingListType.ts +66 -0
- package/models/VersusVotingMode.ts +66 -0
- package/models/index.ts +3 -0
- package/models/init-models.ts +1259 -0
- package/models/initDb.ts +72 -0
- package/models/rdsCaBundle.ts +5 -0
- package/package.json +2 -5
- package/scripts/generate-and-upload.mjs +123 -0
- package/scripts/update-rds-ca-bundle.mjs +44 -0
- package/tsconfig.json +52 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Regenerates models/rdsCaBundle.ts from AWS's public RDS global truststore.
|
|
2
|
+
//
|
|
3
|
+
// Run this after AWS rotates the RDS CA bundle and commit the regenerated file:
|
|
4
|
+
// npm run update-rds-ca
|
|
5
|
+
//
|
|
6
|
+
// The bundle is embedded as a string (rather than shipped as a .pem and read
|
|
7
|
+
// with fs) so it survives consumers that bundle this package (e.g. tsup/esbuild)
|
|
8
|
+
// and run in distroless images with no extra files copied.
|
|
9
|
+
|
|
10
|
+
import { writeFileSync } from "node:fs";
|
|
11
|
+
import { dirname, join } from "node:path";
|
|
12
|
+
import { fileURLToPath } from "node:url";
|
|
13
|
+
|
|
14
|
+
const SOURCE_URL =
|
|
15
|
+
"https://truststore.pki.rds.amazonaws.com/global/global-bundle.pem";
|
|
16
|
+
|
|
17
|
+
const response = await fetch(SOURCE_URL);
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
throw new Error(
|
|
20
|
+
`Failed to download RDS CA bundle from ${SOURCE_URL}: ${response.status} ${response.statusText}`,
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const pem = await response.text();
|
|
25
|
+
if (!pem.includes("BEGIN CERTIFICATE")) {
|
|
26
|
+
throw new Error("Downloaded RDS CA bundle does not look like a PEM file.");
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const outPath = join(
|
|
30
|
+
dirname(fileURLToPath(import.meta.url)),
|
|
31
|
+
"..",
|
|
32
|
+
"models",
|
|
33
|
+
"rdsCaBundle.ts",
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const contents = `// AUTO-GENERATED — do not edit by hand. Regenerate with: npm run update-rds-ca
|
|
37
|
+
// Source: ${SOURCE_URL}
|
|
38
|
+
// Downloaded: ${new Date().toISOString()}
|
|
39
|
+
|
|
40
|
+
export const RDS_GLOBAL_CA_BUNDLE: string = ${JSON.stringify(pem)};
|
|
41
|
+
`;
|
|
42
|
+
|
|
43
|
+
writeFileSync(outPath, contents);
|
|
44
|
+
console.log(`Wrote ${outPath} (${pem.length} bytes of PEM).`);
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
|
|
2
|
+
{
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"target": "es6",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"outDir": "dist",
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"esModuleInterop": true
|
|
10
|
+
},
|
|
11
|
+
"include": ["models/*"],
|
|
12
|
+
"exclude": ["node_modules"]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
// {
|
|
16
|
+
// "compilerOptions": {
|
|
17
|
+
// "rootDirs": ["models"],
|
|
18
|
+
// "outDir": "dist",
|
|
19
|
+
// "lib": ["ES6"],
|
|
20
|
+
// "target": "ES6",
|
|
21
|
+
// "declaration": true,
|
|
22
|
+
// "module": "nodenext",
|
|
23
|
+
// "esModuleInterop": true,
|
|
24
|
+
// }
|
|
25
|
+
// }
|
|
26
|
+
|
|
27
|
+
// // {
|
|
28
|
+
// // "compilerOptions": {
|
|
29
|
+
// // "target": "ES2022", // Targeting modern JavaScript features supported in Node.js 20
|
|
30
|
+
// // "lib": ["ES2022"], // Include necessary libraries
|
|
31
|
+
// // "module": "esnext", // Node.js modules are typically CommonJS
|
|
32
|
+
// // "moduleResolution": "Node", // Use Node.js module resolution strategy
|
|
33
|
+
// // "esModuleInterop": true, // Enables compatibility with CommonJS modules
|
|
34
|
+
// // "strict": true, // Enable all strict type-checking options
|
|
35
|
+
// // "skipLibCheck": true, // Skip type checking of declaration files
|
|
36
|
+
// // "forceConsistentCasingInFileNames": true, // Ensure consistent casing in imports
|
|
37
|
+
// // "noImplicitReturns": true, // Ensure all code paths return a value
|
|
38
|
+
// // "noFallthroughCasesInSwitch": true, // Ensure switch cases don't fall through
|
|
39
|
+
// // "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export
|
|
40
|
+
// // "resolveJsonModule": true, // Allow importing JSON files
|
|
41
|
+
// // "isolatedModules": true, // Ensure that each file can be safely transpiled without relying on other files
|
|
42
|
+
// // "outDir": "./dist", // Redirect output structure to the `dist` directory
|
|
43
|
+
// // "rootDir": "./src", // Specify the root directory of input files
|
|
44
|
+
// // "baseUrl": "./", // Base directory for non-relative module imports
|
|
45
|
+
// // "paths": {
|
|
46
|
+
// // "*": ["node_modules/*"]
|
|
47
|
+
// // },
|
|
48
|
+
// // "types": ["node"] // Include node types by default
|
|
49
|
+
// // },
|
|
50
|
+
// // "include": ["src/**/*.ts"], // Include all TypeScript files in the src directory
|
|
51
|
+
// // "exclude": ["node_modules", "dist"] // Exclude these directories from the compilation process
|
|
52
|
+
// // }
|