@shipstatic/types 0.4.20 → 0.4.22
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/dist/index.d.ts +1 -1
- package/dist/index.js +13 -0
- package/package.json +1 -1
- package/src/index.ts +15 -0
package/dist/index.d.ts
CHANGED
|
@@ -417,7 +417,7 @@ export interface ConfigResponse {
|
|
|
417
417
|
* - Explicit allowlist (only approved formats, reject unknown)
|
|
418
418
|
* ============================================================================
|
|
419
419
|
*/
|
|
420
|
-
export declare const ALLOWED_MIME_TYPES: readonly ["text/html", "text/css", "text/plain", "text/markdown", "text/xml", "text/csv", "text/yaml", "text/vtt", "text/calendar", "text/javascript", "image/", "audio/", "video/", "font/", "application/javascript", "application/ecmascript", "application/x-javascript", "application/wasm", "application/json", "application/ld+json", "application/manifest+json", "application/xml", "application/xhtml+xml", "application/rss+xml", "application/atom+xml", "application/yaml", "application/pdf", "model/gltf+json", "model/gltf-binary", "application/mp4", "application/font-woff", "application/font-woff2", "application/x-font-woff", "application/x-woff", "application/vnd.ms-fontobject", "application/x-font-ttf", "application/x-font-truetype", "application/x-font-otf", "application/x-font-opentype"];
|
|
420
|
+
export declare const ALLOWED_MIME_TYPES: readonly ["text/html", "text/css", "text/plain", "text/markdown", "text/xml", "text/csv", "text/yaml", "text/vtt", "text/calendar", "text/javascript", "text/typescript", "text/tsx", "text/jsx", "text/x-scss", "text/x-sass", "text/x-less", "text/stylus", "text/x-vue", "text/x-svelte", "image/", "audio/", "video/", "font/", "application/javascript", "application/ecmascript", "application/x-javascript", "application/wasm", "application/json", "application/ld+json", "application/manifest+json", "application/source-map", "application/xml", "application/xhtml+xml", "application/rss+xml", "application/atom+xml", "application/yaml", "application/toml", "application/pdf", "model/gltf+json", "model/gltf-binary", "application/mp4", "application/font-woff", "application/font-woff2", "application/x-font-woff", "application/x-woff", "application/vnd.ms-fontobject", "application/x-font-ttf", "application/x-font-truetype", "application/x-font-otf", "application/x-font-opentype"];
|
|
421
421
|
/**
|
|
422
422
|
* Check if a MIME type is allowed for upload.
|
|
423
423
|
*
|
package/dist/index.js
CHANGED
|
@@ -283,6 +283,16 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
283
283
|
'text/calendar', // iCalendar (.ics) event files
|
|
284
284
|
// JavaScript (legacy MIME type, still widely used by ~50% of servers)
|
|
285
285
|
'text/javascript',
|
|
286
|
+
// Modern web development formats (uncompiled source)
|
|
287
|
+
'text/typescript', // TypeScript source (.ts)
|
|
288
|
+
'text/tsx', // TypeScript JSX (.tsx)
|
|
289
|
+
'text/jsx', // React JSX (.jsx)
|
|
290
|
+
'text/x-scss', // SCSS preprocessor
|
|
291
|
+
'text/x-sass', // Sass preprocessor
|
|
292
|
+
'text/x-less', // Less preprocessor
|
|
293
|
+
'text/stylus', // Stylus preprocessor
|
|
294
|
+
'text/x-vue', // Vue single-file components (.vue)
|
|
295
|
+
'text/x-svelte', // Svelte components (.svelte)
|
|
286
296
|
// =========================================================================
|
|
287
297
|
// MEDIA (prefix matching - covers all common subtypes)
|
|
288
298
|
// =========================================================================
|
|
@@ -307,6 +317,8 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
307
317
|
'application/json',
|
|
308
318
|
'application/ld+json', // JSON-LD for structured data / SEO (Schema.org, Open Graph)
|
|
309
319
|
'application/manifest+json', // PWA web app manifests
|
|
320
|
+
// Development tools
|
|
321
|
+
'application/source-map', // Source maps (.js.map, .css.map) for debugging
|
|
310
322
|
// XML and feeds
|
|
311
323
|
'application/xml',
|
|
312
324
|
'application/xhtml+xml', // XHTML - XML-compliant HTML (legacy sites)
|
|
@@ -314,6 +326,7 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
314
326
|
'application/atom+xml', // Atom feeds
|
|
315
327
|
// Configuration formats
|
|
316
328
|
'application/yaml', // YAML configs (static site generators)
|
|
329
|
+
'application/toml', // TOML configs (Cargo, Netlify, Rust projects)
|
|
317
330
|
// Documents
|
|
318
331
|
'application/pdf', // PDF documents
|
|
319
332
|
// =========================================================================
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -594,6 +594,17 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
594
594
|
// JavaScript (legacy MIME type, still widely used by ~50% of servers)
|
|
595
595
|
'text/javascript',
|
|
596
596
|
|
|
597
|
+
// Modern web development formats (uncompiled source)
|
|
598
|
+
'text/typescript', // TypeScript source (.ts)
|
|
599
|
+
'text/tsx', // TypeScript JSX (.tsx)
|
|
600
|
+
'text/jsx', // React JSX (.jsx)
|
|
601
|
+
'text/x-scss', // SCSS preprocessor
|
|
602
|
+
'text/x-sass', // Sass preprocessor
|
|
603
|
+
'text/x-less', // Less preprocessor
|
|
604
|
+
'text/stylus', // Stylus preprocessor
|
|
605
|
+
'text/x-vue', // Vue single-file components (.vue)
|
|
606
|
+
'text/x-svelte', // Svelte components (.svelte)
|
|
607
|
+
|
|
597
608
|
// =========================================================================
|
|
598
609
|
// MEDIA (prefix matching - covers all common subtypes)
|
|
599
610
|
// =========================================================================
|
|
@@ -627,6 +638,9 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
627
638
|
'application/ld+json', // JSON-LD for structured data / SEO (Schema.org, Open Graph)
|
|
628
639
|
'application/manifest+json', // PWA web app manifests
|
|
629
640
|
|
|
641
|
+
// Development tools
|
|
642
|
+
'application/source-map', // Source maps (.js.map, .css.map) for debugging
|
|
643
|
+
|
|
630
644
|
// XML and feeds
|
|
631
645
|
'application/xml',
|
|
632
646
|
'application/xhtml+xml', // XHTML - XML-compliant HTML (legacy sites)
|
|
@@ -635,6 +649,7 @@ export const ALLOWED_MIME_TYPES = [
|
|
|
635
649
|
|
|
636
650
|
// Configuration formats
|
|
637
651
|
'application/yaml', // YAML configs (static site generators)
|
|
652
|
+
'application/toml', // TOML configs (Cargo, Netlify, Rust projects)
|
|
638
653
|
|
|
639
654
|
// Documents
|
|
640
655
|
'application/pdf', // PDF documents
|