@shipstatic/types 0.1.12 → 0.1.13
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 +19 -0
- package/package.json +1 -1
- package/src/index.ts +22 -0
package/dist/index.d.ts
CHANGED
|
@@ -237,3 +237,22 @@ export declare function validateApiUrl(apiUrl: string): void;
|
|
|
237
237
|
* Validate subdomain format (deployment pattern)
|
|
238
238
|
*/
|
|
239
239
|
export declare function validateSubdomain(input: string): boolean;
|
|
240
|
+
/**
|
|
241
|
+
* Request payload for SPA check endpoint
|
|
242
|
+
*/
|
|
243
|
+
export interface SPACheckRequest {
|
|
244
|
+
/** Array of files with paths and sizes */
|
|
245
|
+
files: Array<{
|
|
246
|
+
path: string;
|
|
247
|
+
size: number;
|
|
248
|
+
}>;
|
|
249
|
+
/** Raw HTML content of index.html file */
|
|
250
|
+
index: string;
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Response from SPA check endpoint
|
|
254
|
+
*/
|
|
255
|
+
export interface SPACheckResponse {
|
|
256
|
+
/** Whether the project is detected as a Single Page Application */
|
|
257
|
+
isSPA: boolean;
|
|
258
|
+
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -440,4 +440,26 @@ export function validateApiUrl(apiUrl: string): void {
|
|
|
440
440
|
export function validateSubdomain(input: string): boolean {
|
|
441
441
|
// Deployment subdomain format: word-word-7chars (e.g. "happy-cat-abc1234")
|
|
442
442
|
return /^[a-z]+-[a-z]+-[a-z0-9]{7}$/i.test(input);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// =============================================================================
|
|
446
|
+
// SPA CHECK TYPES
|
|
447
|
+
// =============================================================================
|
|
448
|
+
|
|
449
|
+
/**
|
|
450
|
+
* Request payload for SPA check endpoint
|
|
451
|
+
*/
|
|
452
|
+
export interface SPACheckRequest {
|
|
453
|
+
/** Array of files with paths and sizes */
|
|
454
|
+
files: Array<{ path: string; size: number }>;
|
|
455
|
+
/** Raw HTML content of index.html file */
|
|
456
|
+
index: string;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
/**
|
|
460
|
+
* Response from SPA check endpoint
|
|
461
|
+
*/
|
|
462
|
+
export interface SPACheckResponse {
|
|
463
|
+
/** Whether the project is detected as a Single Page Application */
|
|
464
|
+
isSPA: boolean;
|
|
443
465
|
}
|