@shipstatic/types 0.4.2 → 0.4.3
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 +3 -3
- package/dist/index.js +8 -8
- package/package.json +1 -1
- package/src/index.ts +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -668,10 +668,10 @@ export interface RateLimitData {
|
|
|
668
668
|
timestamp: number;
|
|
669
669
|
}
|
|
670
670
|
/**
|
|
671
|
-
* Generate deployment URL from deployment ID and
|
|
671
|
+
* Generate deployment URL from deployment ID and base domain
|
|
672
672
|
*/
|
|
673
|
-
export declare function generateDeploymentUrl(deployment: string,
|
|
673
|
+
export declare function generateDeploymentUrl(deployment: string, baseDomain?: string): string;
|
|
674
674
|
/**
|
|
675
675
|
* Generate domain URL based on whether it's internal (subdomain) or external (custom domain)
|
|
676
676
|
*/
|
|
677
|
-
export declare function generateDomainUrl(
|
|
677
|
+
export declare function generateDomainUrl(domainName: string, baseDomain?: string): string;
|
package/dist/index.js
CHANGED
|
@@ -281,21 +281,21 @@ export const FileValidationStatus = {
|
|
|
281
281
|
// URL GENERATION UTILITIES
|
|
282
282
|
// =============================================================================
|
|
283
283
|
/**
|
|
284
|
-
* Generate deployment URL from deployment ID and
|
|
284
|
+
* Generate deployment URL from deployment ID and base domain
|
|
285
285
|
*/
|
|
286
|
-
export function generateDeploymentUrl(deployment,
|
|
287
|
-
const domain =
|
|
286
|
+
export function generateDeploymentUrl(deployment, baseDomain) {
|
|
287
|
+
const domain = baseDomain || 'shipstatic.com';
|
|
288
288
|
return `https://${deployment}.${domain}`;
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
291
|
* Generate domain URL based on whether it's internal (subdomain) or external (custom domain)
|
|
292
292
|
*/
|
|
293
|
-
export function generateDomainUrl(
|
|
293
|
+
export function generateDomainUrl(domainName, baseDomain) {
|
|
294
294
|
// If domain contains dots, it's an external domain
|
|
295
|
-
if (
|
|
296
|
-
return `https://${
|
|
295
|
+
if (domainName.includes('.')) {
|
|
296
|
+
return `https://${domainName}`;
|
|
297
297
|
}
|
|
298
298
|
// Otherwise it's an internal subdomain
|
|
299
|
-
const
|
|
300
|
-
return `https://${
|
|
299
|
+
const domain = baseDomain || 'shipstatic.com';
|
|
300
|
+
return `https://${domainName}.${domain}`;
|
|
301
301
|
}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1003,23 +1003,23 @@ export interface RateLimitData {
|
|
|
1003
1003
|
// =============================================================================
|
|
1004
1004
|
|
|
1005
1005
|
/**
|
|
1006
|
-
* Generate deployment URL from deployment ID and
|
|
1006
|
+
* Generate deployment URL from deployment ID and base domain
|
|
1007
1007
|
*/
|
|
1008
|
-
export function generateDeploymentUrl(deployment: string,
|
|
1009
|
-
const domain =
|
|
1008
|
+
export function generateDeploymentUrl(deployment: string, baseDomain?: string): string {
|
|
1009
|
+
const domain = baseDomain || 'shipstatic.com';
|
|
1010
1010
|
return `https://${deployment}.${domain}`;
|
|
1011
1011
|
}
|
|
1012
1012
|
|
|
1013
1013
|
/**
|
|
1014
1014
|
* Generate domain URL based on whether it's internal (subdomain) or external (custom domain)
|
|
1015
1015
|
*/
|
|
1016
|
-
export function generateDomainUrl(
|
|
1016
|
+
export function generateDomainUrl(domainName: string, baseDomain?: string): string {
|
|
1017
1017
|
// If domain contains dots, it's an external domain
|
|
1018
|
-
if (
|
|
1019
|
-
return `https://${
|
|
1018
|
+
if (domainName.includes('.')) {
|
|
1019
|
+
return `https://${domainName}`;
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
1022
|
// Otherwise it's an internal subdomain
|
|
1023
|
-
const
|
|
1024
|
-
return `https://${
|
|
1023
|
+
const domain = baseDomain || 'shipstatic.com';
|
|
1024
|
+
return `https://${domainName}.${domain}`;
|
|
1025
1025
|
}
|