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

@produck/duck-web

Package Overview
Dependencies
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@produck/duck-web - npm Package Compare versions

Comparing version 0.2.9 to 1.0.1

src/index.cjs

84

index.d.ts

@@ -1,67 +0,43 @@

import Duck from '@produck/duck'
import http from 'http'
import { RequestListener } from 'http';
import * as Duck from '@produck/duck';
import { Schema } from '@produck/mold';
declare namespace DuckWeb {
export interface ApplicationKit extends Duck.ProductKit {}
interface DuckWebInjection extends Duck.InstalledInjection {}
type Application = (...args: any[]) => RequestListener;
type Provider = (Kit: ApplicationKit) => Application;
interface DuckWebApplicationInjection extends DuckWebInjection {}
interface Descriptor {
id: string;
provider: Provider;
description?: string;
}
type Application = (options?: object) => http.RequestListener;
interface WebRegistry {
register: (descriptor: Descriptor) => void;
Application: (id: string, ...args: any[]) => RequestListener;
}
type ApplicationProvider = (
/**
* An isolating injection.
*
* [Duck.Base] <|-- [Duck.Installed] <|-- [DuckWeb]
* <|-- [DuckWeb.Application<app_id>]
*/
injection: DuckWebApplicationInjection
) => Application;
type Options = Array<Descriptor>;
interface Options {
export function Component(options: Options): Duck.Component;
/**
* Unique application id
*/
id: string;
/**
* The description of this Application
*/
description?: string;
/**
* The ApplicationProvider
*/
Application: ApplicationProvider;
declare module '@produck/duck' {
interface ProductKit {
Web: WebRegistry;
}
}
interface Web {
Application(
export function defineApplication(provider: Provider): Provider;
/**
* The registed Application name
*/
name: string,
/**
* Application Instancing Parameters
*/
...args: any[],
): http.RequestListener;
}
export namespace Options {
export const Schema: Schema<Options>;
export const DescriptorSchema: Schema<Descriptor>;
export function normalize(options: Options): Options;
export function normalizeDescriptor(descriptor: Descriptor): Descriptor;
}
declare module '@produck/duck' {
interface BaseInjection {
/**
* Web Application Factory Manager
*/
Web: DuckWeb.Web;
}
export namespace Preset {
export const Default: Provider;
export const RedirectHttps: Provider;
}
declare function DuckWeb(options: Array<DuckWeb.Options>): Duck.Component;
export = DuckWeb;
{
"name": "@produck/duck-web",
"version": "0.2.9",
"description": "",
"author": "ChaosLee <lichao@or-change.cn>",
"homepage": "https://github.com/produck/duck#readme",
"license": "MIT",
"main": "index.js",
"files": [
"/src",
"/index.js",
"/index.d.ts"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/produck/duck.git"
},
"types": "index.d.ts",
"scripts": {
"test": "mocha"
},
"bugs": {
"url": "https://github.com/produck/duck/issues"
},
"devDependencies": {
"mocha": "^8.3.2"
},
"dependencies": {
"@produck/duck": "^0.6.5",
"ajv": "^8.0.1",
"ajv-keywords": "^5.0.0",
"debug": "^4.3.1"
},
"gitHead": "4e0e460e3b10bea3d8fdfe64818b3be6e814db04"
"name": "@produck/duck-web",
"version": "1.0.1",
"description": "> TODO: description",
"author": "ChaosLee <chaos2lee@qq.com>",
"homepage": "https://github.com/produck/duck#readme",
"license": "MIT",
"main": "src/index.cjs",
"type": "module",
"exports": {
"import": "./src/index.mjs",
"require": "./src/index.cjs"
},
"types": "index.d.ts",
"files": [
"src",
"index.d.ts",
"tsconfig.json"
],
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "git+https://github.com/produck/duck.git"
},
"scripts": {
"build:extract": "node script/extract.mjs",
"build": "npm run build:extract && rollup -c script/rollup.config.mjs",
"prepublishOnly": " npm run build"
},
"bugs": {
"url": "https://github.com/produck/duck/issues"
},
"dependencies": {
"@produck/duck": "^1.0.1",
"@produck/mold": "^0.3.1",
"@types/node": "^18.11.16"
},
"devDependencies": {
"rollup": "^3.7.4",
"supertest": "^6.3.3"
},
"gitHead": "c9fc998fa7951d5e2058e7fa48c117a7b142cc2e"
}
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