New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

vue-bundle-renderer

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-bundle-renderer - npm Package Compare versions

Comparing version 0.4.0-0 to 0.4.0-1

dist/runtime.cjs

81

dist/index.d.ts
import { Manifest } from 'vite';
import { M as Manifest$1 } from './types-b3d834cd.js';
export { M as Manifest, R as ResourceMeta, d as defineManifest } from './types-b3d834cd.js';
interface ParsedResource {
path: string;
isModule: boolean;
asType: 'audio' | 'document' | 'embed' | 'fetch' | 'font' | 'image' | 'object' | 'script' | 'style' | 'track' | 'worker' | 'video' | null;
contentType: string | null;
}
declare type LinkAttributes = {
rel: string | null;
href: string;
as?: string | null;
type?: string | null;
crossorigin?: '' | null;
};
declare function normalizeViteManifest(manifest: Manifest | Manifest$1): Manifest$1;
interface ModuleDependencies {
scripts: Record<string, ParsedResource>;
styles: Record<string, ParsedResource>;
preload: Record<string, ParsedResource>;
prefetch: Record<string, ParsedResource>;
declare type Identifier = string;
declare type OutputPath = string;
interface WebpackClientManifest {
publicPath: string;
all: Array<OutputPath>;
initial: Array<OutputPath>;
async: Array<OutputPath>;
modules: Record<Identifier, Array<number>>;
hasNoCssVersion?: {
[file: string]: boolean;
};
}
interface SSRContext {
renderResourceHints?: Function;
renderScripts?: Function;
renderStyles?: Function;
modules?: Set<string>;
_registeredComponents?: Set<string>;
_requestDependencies?: ModuleDependencies;
[key: string]: any;
}
interface RenderOptions {
shouldPrefetch?: (resource: ParsedResource) => boolean;
shouldPreload?: (resource: ParsedResource) => boolean;
buildAssetsURL?: (id: string) => string;
manifest: Manifest;
}
interface RendererContext extends Required<RenderOptions> {
_dependencies: Record<string, ModuleDependencies>;
_dependencySets: Record<string, ModuleDependencies>;
_parsedResources: Record<string, ParsedResource>;
_entrypoints: string[];
updateManifest: (manifest: Manifest) => void;
}
declare function createRendererContext({ manifest, buildAssetsURL, shouldPrefetch, shouldPreload }: RenderOptions): RendererContext;
declare function getModuleDependencies(id: string, rendererContext: RendererContext): ModuleDependencies;
declare function getAllDependencies(ids: Set<string>, rendererContext: RendererContext): ModuleDependencies;
declare function getRequestDependencies(ssrContext: SSRContext, rendererContext: RendererContext): ModuleDependencies;
declare function renderStyles(ssrContext: SSRContext, rendererContext: RendererContext): string;
declare function getResources(ssrContext: SSRContext, rendererContext: RendererContext): LinkAttributes[];
declare function renderResourceHints(ssrContext: SSRContext, rendererContext: RendererContext): string;
declare function renderResourceHeaders(ssrContext: SSRContext, rendererContext: RendererContext): Record<string, string>;
declare function getPreloadLinks(ssrContext: SSRContext, rendererContext: RendererContext): LinkAttributes[];
declare function getPrefetchLinks(ssrContext: SSRContext, rendererContext: RendererContext): LinkAttributes[];
declare function renderScripts(ssrContext: SSRContext, rendererContext: RendererContext): string;
declare type RenderFunction = (ssrContext: SSRContext, rendererContext: RendererContext) => any;
declare function createRenderer(createApp: any, renderOptions: RenderOptions & {
renderToString: Function;
}): {
rendererContext: RendererContext;
renderToString(ssrContext: SSRContext): Promise<{
html: any;
renderResourceHeaders: () => Record<string, string>;
renderResourceHints: () => string;
renderStyles: () => string;
renderScripts: () => string;
}>;
};
declare function normalizeWebpackManifest(manifest: WebpackClientManifest): Manifest$1;
export { ModuleDependencies, RenderFunction, RenderOptions, RendererContext, SSRContext, createRenderer, createRendererContext, getAllDependencies, getModuleDependencies, getPrefetchLinks, getPreloadLinks, getRequestDependencies, getResources, renderResourceHeaders, renderResourceHints, renderScripts, renderStyles };
export { normalizeViteManifest, normalizeWebpackManifest };
{
"name": "vue-bundle-renderer",
"version": "0.4.0-0",
"version": "0.4.0-1",
"description": "Bundle Renderer for Vue 3.0",

@@ -12,5 +12,5 @@ "repository": "nuxt-contrib/vue-bundle-renderer",

},
"./legacy": {
"require": "./dist/legacy.cjs",
"import": "./dist/legacy.mjs"
"./runtime": {
"require": "./dist/runtime.cjs",
"import": "./dist/runtime.mjs"
}

@@ -23,3 +23,3 @@ },

"dist",
"legacy.d.ts"
"runtime.d.ts"
],

@@ -33,2 +33,3 @@ "dependencies": {

"eslint": "latest",
"expect-type": "^0.13.0",
"standard-version": "latest",

@@ -48,4 +49,4 @@ "typescript": "latest",

"release": "pnpm test && pnpm build && standard-version && git push --follow-tags && pnpm publish",
"test": "pnpm lint && pnpm vitest run --coverage"
"test": "pnpm lint && pnpm vitest run --coverage && tsc --noEmit"
}
}

@@ -25,15 +25,21 @@ # Vue Bundle Renderer

```ts
import { createRenderer } from 'vue-bundle-renderer'
import { createRenderer } from 'vue-bundle-renderer/runtime'
declare function createRenderer(createApp:, renderOptions: RenderOptions)
declare function createRenderer(createApp, renderOptions: RenderOptions)
```
### `normalizeClientManifest`
### `normalizeViteManifest`
If using a webpack manifest, you should normalize it with this function before passing it to `createRenderer`.
```ts
import { normalizeViteManifest } from 'vue-bundle-renderer'
declare function normalizeViteManifest(manifest: ViteManifest)
```
### `normalizeWebpackManifest`
```ts
import { normalizeClientManifest } from 'vue-bundle-renderer/legacy'
import { normalizeWebpackManifest } from 'vue-bundle-renderer'
declare function normalizeClientManifest(manifest: ClientManifest | LegacyClientManifest)
declare function normalizeWebpackManifest(manifest: ViteManifest)
```

@@ -40,0 +46,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc