Skip to content

Commit 45afe15

Browse files
committed
CR fixes
1 parent 4779642 commit 45afe15

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

app/components/Terminal/Install.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,16 +183,17 @@ const copyDevInstallCommand = () =>
183183
>{{ i > 0 ? ' ' : '' }}{{ part }}</span
184184
></code
185185
>
186-
<button
186+
<ButtonBase
187187
type="button"
188-
class="px-2 py-0.5 font-mono text-xs text-fg-muted bg-bg-subtle/80 border border-border rounded transition-colors duration-200 opacity-0 group-hover/devinstallcmd:opacity-100 hover:(text-fg border-border-hover) active:scale-95 focus-visible:opacity-100 focus-visible:outline-accent/70 select-none"
188+
size="small"
189+
class="text-fg-muted bg-bg-subtle/80 border-border opacity-0 group-hover/devinstallcmd:opacity-100 active:scale-95 focus-visible:opacity-100 select-none"
189190
:aria-label="$t('package.get_started.copy_dev_command')"
190191
@click.stop="copyDevInstallCommand"
191192
>
192193
<span aria-live="polite">{{
193194
devInstallCopied ? $t('common.copied') : $t('common.copy')
194195
}}</span>
195-
</button>
196+
</ButtonBase>
196197
</div>
197198
</template>
198199

i18n/schema.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,12 @@
667667
"copy_command": {
668668
"type": "string"
669669
},
670+
"copy_dev_command": {
671+
"type": "string"
672+
},
673+
"dev_dependency_hint": {
674+
"type": "string"
675+
},
670676
"view_types": {
671677
"type": "string"
672678
}

server/api/registry/analysis/[...pkg].get.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import { parseRepoUrl } from '#shared/utils/git-providers'
2525
import { encodePackageName } from '#shared/utils/npm'
2626
import { getLatestVersion, getLatestVersionBatch } from 'fast-npm-meta'
2727

28+
interface AnalysisPackageJson extends ExtendedPackageJson {
29+
readme?: string
30+
}
31+
2832
export default defineCachedEventHandler(
2933
async event => {
3034
// Parse package name and optional version from path
@@ -42,7 +46,7 @@ export default defineCachedEventHandler(
4246
// Fetch package data
4347
const encodedName = encodePackageName(packageName)
4448
const versionSuffix = version ? `/${version}` : '/latest'
45-
const pkg = await $fetch<ExtendedPackageJson>(
49+
const pkg = await $fetch<AnalysisPackageJson>(
4650
`${NPM_REGISTRY}/${encodedName}${versionSuffix}`,
4751
)
4852

shared/utils/package-analysis.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ export interface ExtendedPackageJson {
3434
dependencies?: Record<string, string>
3535
devDependencies?: Record<string, string>
3636
peerDependencies?: Record<string, string>
37-
readme?: string
38-
readmeFilename?: string
3937
/** npm maintainers (returned by registry API) */
4038
maintainers?: Array<{ name: string; email?: string }>
4139
/** Repository info (returned by registry API) */

0 commit comments

Comments
 (0)