@mintlify/common 1.0.475 → 1.0.476
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/mdx/getS3ImageUri.d.ts +4 -0
- package/dist/mdx/getS3ImageUri.js +12 -0
- package/dist/mdx/index.d.ts +1 -0
- package/dist/mdx/index.js +1 -0
- package/dist/mdx/plugins/remark/index.d.ts +0 -1
- package/dist/mdx/plugins/remark/index.js +0 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +6 -2
- package/dist/mdx/plugins/remark/remarkReplaceAllImages.d.ts +0 -6
- package/dist/mdx/plugins/remark/remarkReplaceAllImages.js +0 -48
|
@@ -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
|
+
};
|
package/dist/mdx/index.d.ts
CHANGED
package/dist/mdx/index.js
CHANGED
|
@@ -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';
|