@produck/duck-web
Advanced tools
Comparing version 0.2.9 to 1.0.1
@@ -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" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
10435
3
258
0
Yes
2
1
+ Added@produck/mold@^0.3.1
+ Added@types/node@^18.11.16
+ Added@produck/compose@0.1.11(transitive)
+ Added@produck/duck@1.1.3(transitive)
+ Added@produck/idiom@0.4.1(transitive)
+ Added@produck/kit@0.1.9(transitive)
+ Added@produck/mold@0.3.1(transitive)
+ Added@produck/ow@0.1.2(transitive)
+ Added@types/node@18.19.74(transitive)
+ Addedsemver@7.7.1(transitive)
+ Addedundici-types@5.26.5(transitive)
- Removedajv@^8.0.1
- Removedajv-keywords@^5.0.0
- Removeddebug@^4.3.1
- Removed@produck/duck@0.6.5(transitive)
- Removedajv@8.17.1(transitive)
- Removedajv-keywords@5.1.0(transitive)
- Removeddebug@4.4.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-uri@3.0.6(transitive)
- Removedjson-schema-traverse@1.0.0(transitive)
- Removedms@2.1.3(transitive)
- Removedrequire-from-string@2.0.2(transitive)
Updated@produck/duck@^1.0.1