Socket
Socket
Sign inDemoInstall

fastify-renderer

Package Overview
Dependencies
278
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.4.0

6

node/index.d.ts
/// <reference types="node" />
import '@fastify/accepts';
import '@fastify/middie';
import { FastifyInstance } from 'fastify';
import 'fastify-accepts';
import 'middie';
import { InlineConfig, SSROptions } from 'vite';

@@ -20,4 +20,4 @@ import { FastifyRendererOptions, FastifyRendererPlugin } from './Plugin';

}
declare const FastifyRenderer: import("fastify").FastifyPluginAsync<FastifyRendererOptions, import("http").Server>;
declare const FastifyRenderer: import("fastify").FastifyPluginAsync<FastifyRendererOptions, import("http").Server, import("fastify").FastifyTypeProviderDefault>;
export default FastifyRenderer;
export declare const build: (fastify: FastifyInstance) => Promise<void>;

@@ -7,7 +7,8 @@ "use strict";

exports.build = void 0;
require("fastify-accepts");
/* eslint-disable @typescript-eslint/require-await */
require("@fastify/accepts");
require("@fastify/middie");
const static_1 = __importDefault(require("@fastify/static"));
const fastify_plugin_1 = __importDefault(require("fastify-plugin"));
const fastify_static_1 = __importDefault(require("fastify-static"));
const fs_1 = require("fs");
require("middie");
const path_1 = __importDefault(require("path"));

@@ -115,3 +116,3 @@ const vite_1 = require("vite");

// in production, this will actually serve the files that vite has built for the client
void instance.register(fastify_static_1.default, {
void instance.register(static_1.default, {
root: plugin.clientOutDir,

@@ -158,5 +159,5 @@ });

}, {
fastify: '3.x',
fastify: '4.x',
name: 'fastify-renderer',
dependencies: ['fastify-accepts', 'middie'],
dependencies: ['@fastify/accepts', 'middie'],
});

@@ -163,0 +164,0 @@ module.exports = exports = FastifyRenderer;

@@ -1,2 +0,2 @@

import 'middie';
import '@fastify/middie';
import { InlineConfig } from 'vite';

@@ -3,0 +3,0 @@ import { Template } from './DocumentTemplate';

@@ -8,4 +8,4 @@ "use strict";

/* eslint-disable @typescript-eslint/require-await */
require("@fastify/middie");
const fs_1 = __importDefault(require("fs"));
require("middie");
const path_1 = __importDefault(require("path"));

@@ -12,0 +12,0 @@ const ReactRenderer_1 = require("./renderers/react/ReactRenderer");

/// <reference types="node" />
import { ContextConfigDefault, FastifyInstance, FastifyReply, FastifyRequest, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerBase, RawServerDefault, RequestGenericInterface } from 'fastify';
import { ContextConfigDefault, FastifyInstance, FastifyLoggerInstance, FastifyReply, FastifyRequest, FastifySchema, FastifyTypeProvider, FastifyTypeProviderDefault, RawReplyDefaultExpression, RawRequestDefaultExpression, RawServerBase, RawServerDefault } from 'fastify';
import { RouteGenericInterface } from 'fastify/types/route';
import { FastifyRequestType, ResolveFastifyRequestType } from 'fastify/types/type-provider';
import { IncomingMessage, Server, ServerResponse } from 'http';

@@ -43,8 +45,8 @@ import { ReactElement } from 'react';

}
interface RouteShorthandMethod<RawServer extends RawServerBase = RawServerDefault, RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>, RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>, Props = any> {
<RequestGeneric extends RequestGenericInterface = RequestGenericInterface, ContextConfig = ContextConfigDefault>(path: string, opts: RouteShorthandOptions<RawServer, RawRequest, RawReply, RequestGeneric, ContextConfig> & {
interface RouteShorthandMethod<RawServer extends RawServerBase = RawServerDefault, RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>, RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>, TypeProvider extends FastifyTypeProvider = FastifyTypeProviderDefault, Props = any> {
<RouteGeneric extends RouteGenericInterface = RouteGenericInterface, ContextConfig = ContextConfigDefault, SchemaCompiler = FastifySchema, RequestType extends FastifyRequestType = ResolveFastifyRequestType<TypeProvider, SchemaCompiler, RouteGeneric>, Logger extends FastifyLoggerInstance = FastifyLoggerInstance>(path: string, opts: RouteShorthandOptions<RawServer, RawRequest, RawReply, RouteGeneric, ContextConfig, SchemaCompiler, TypeProvider, RequestType, Logger> & {
render: string;
}, // this creates an overload that only applies these different types if the handler is for rendering
handler: ServerRenderer<Props>): FastifyInstance<RawServer, RawRequest, RawReply>;
handler: ServerRenderer<Props>): FastifyInstance<RawServer, RawRequest, RawReply, Logger, TypeProvider>;
}
}
{
"name": "fastify-renderer",
"version": "0.3.1",
"version": "0.4.0",
"description": "Simple, high performance client side app renderer for Fastify.",

@@ -60,18 +60,17 @@ "exports": {

"dependencies": {
"@fastify/accepts": "^4.0.0",
"@fastify/middie": "^8.0.0",
"@fastify/static": "^6.4.0",
"@opentelemetry/api": "^1.1.0",
"@vitejs/plugin-react-refresh": "^1.3.6",
"fastify-accepts": "^2.1.0",
"fastify-express": "^0.3.3",
"fastify-plugin": "^3.0.1",
"fastify-static": "^4.6.1",
"http-errors": "^1.8.1",
"middie": "^5.4.0",
"path-to-regexp": "^6.2.1",
"sanitize-filename": "^1.6.3",
"stream-template": "^0.0.10",
"vite": "^2.9.14",
"vite": "^2.9.15",
"wouter": "^2.7.5"
},
"peerDependencies": {
"fastify": "^3.13.0",
"fastify": "^4.2.0",
"react": "experimental",

@@ -81,3 +80,3 @@ "react-dom": "experimental"

"devDependencies": {
"@swc/core": "^1.2.220",
"@swc/core": "^1.2.242",
"@swc/jest": "^0.2.22",

@@ -90,4 +89,4 @@ "@types/connect": "^3.4.35",

"@types/sanitize-filename": "^1.6.3",
"@typescript-eslint/eslint-plugin": "^5.31.0",
"@typescript-eslint/parser": "^5.31.0",
"@typescript-eslint/eslint-plugin": "^5.34.0",
"@typescript-eslint/parser": "^5.34.0",
"eslint": "^7.32.0",

@@ -97,5 +96,5 @@ "eslint-config-prettier": "^8.5.0",

"eslint-plugin-prettier": "^3.4.1",
"eslint-plugin-react": "^7.30.1",
"eslint-plugin-react": "^7.31.7",
"eslint-plugin-react-hooks": "^4.6.0",
"fastify": "^3.29.0",
"fastify": "^4.2.0",
"gitpkg": "^1.0.0-beta.2",

@@ -105,3 +104,3 @@ "jest": "^28.1.3",

"npm-run-all": "^4.1.5",
"pino-pretty": "^4.8.0",
"pino-pretty": "^8.1.0",
"prettier": "^2.7.1",

@@ -108,0 +107,0 @@ "prettier-plugin-organize-imports": "^2.3.4",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc