(
specifier: string,
version: string,
peerDependencies: {[dependency: string]: string},
)
| 72 | }; |
| 73 | |
| 74 | export const getPublishedImportUrl = ( |
| 75 | specifier: string, |
| 76 | version: string, |
| 77 | peerDependencies: {[dependency: string]: string}, |
| 78 | ): string | undefined => { |
| 79 | const [mainModule, ...subModules] = specifier.split('/'); |
| 80 | const dependencyVersion = |
| 81 | mainModule == 'tinybase' ? version : peerDependencies[mainModule]; |
| 82 | if (dependencyVersion == null) { |
| 83 | return; |
| 84 | } |
| 85 | return `https://esm.sh/${mainModule}@${dependencyVersion}${ |
| 86 | subModules.length == 0 ? '' : '/' + subModules.join('/') |
| 87 | }`; |
| 88 | }; |
| 89 | |
| 90 | const getEntryFileName = (files: {[path: string]: string}): string => |
| 91 | ['src/main.js', 'src/main.jsx', 'index.js', 'index.jsx'].find( |
no outgoing calls
no test coverage detected
searching dependent graphs…