@mintlify/common 1.0.475 → 1.0.477

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.
@@ -0,0 +1,4 @@
1
+ export declare const getS3ImageUri: (imagePath: string, subdomain: string, filePath: string, basePath: string | undefined, opts?: {
2
+ bucketName?: string;
3
+ region?: string;
4
+ }) => string;
@@ -0,0 +1,12 @@
1
+ import path from 'path';
2
+ import { removeBasePath } from '../fs/removeBasePath.js';
3
+ import { getS3URI } from '../services/aws.js';
4
+ export const getS3ImageUri = (imagePath, subdomain, filePath, basePath, opts = {}) => {
5
+ if (imagePath.startsWith('/')) {
6
+ const path = removeBasePath(imagePath, basePath);
7
+ return getS3URI(subdomain, path, opts);
8
+ }
9
+ const beforeFilePath = path.join(filePath, '../');
10
+ const relativePath = removeBasePath(path.join(beforeFilePath, imagePath), basePath);
11
+ return getS3URI(subdomain, relativePath, opts);
12
+ };
@@ -5,3 +5,4 @@ export * from './plugins/index.js';
5
5
  export * from './lib/index.js';
6
6
  export * from './getMDXOptions.js';
7
7
  export * from './astUtils.js';
8
+ export * from './getS3ImageUri.js';
package/dist/mdx/index.js CHANGED
@@ -5,3 +5,4 @@ export * from './plugins/index.js';
5
5
  export * from './lib/index.js';
6
6
  export * from './getMDXOptions.js';
7
7
  export * from './astUtils.js';
8
+ export * from './getS3ImageUri.js';
@@ -4,7 +4,6 @@ export * from './remarkRemoveImports.js';
4
4
  export * from './remarkExtractTableOfContents.js';
5
5
  export * from './remarkMdxRemoveUnusedVariables.js';
6
6
  export * from './remarkMdxRemoveUnknownJsx/index.js';
7
- export * from './remarkReplaceAllImages.js';
8
7
  export * from './remarkMermaid.js';
9
8
  export * from './remarkMdxRemoveJs.js';
10
9
  export * from './remarkExtractChangelogFilters.js';
@@ -4,7 +4,6 @@ export * from './remarkRemoveImports.js';
4
4
  export * from './remarkExtractTableOfContents.js';
5
5
  export * from './remarkMdxRemoveUnusedVariables.js';
6
6
  export * from './remarkMdxRemoveUnknownJsx/index.js';
7
- export * from './remarkReplaceAllImages.js';
8
7
  export * from './remarkMermaid.js';
9
8
  export * from './remarkMdxRemoveJs.js';
10
9
  export * from './remarkExtractChangelogFilters.js';