Skip to content

Commit c1f8055

Browse files
committed
docs: add packageDocumentation
Signed-off-by: Rifa Achrinza <25147899+achrinza@users.noreply.github.com>
1 parent d6db3c5 commit c1f8055

File tree

26 files changed

+385
-12
lines changed

26 files changed

+385
-12
lines changed

extensions/authentication-passport/src/index.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,22 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* An adapter to plug in passport based strategies to the authentication system
8+
* in {@link @loopback/authentication# | @loopback/authentication @3.x }.
9+
*
10+
* @remarks
11+
* {@link @loopback/authentication# | @loopback/authentication @3.x } allows
12+
* users to register authentication strategies that implement the interface
13+
* `AuthenticationStrategy`.
14+
*
15+
* Since AuthenticationStrategy describes a strategy with different contracts
16+
* than the passport Strategy, and we'd like to support the existing 500+
17+
* community passport strategies, an adapter class is created in this package to
18+
* convert a passport strategy to the one that LoopBack 4 authentication system
19+
* wants.
20+
*
21+
* @packageDocumentation
22+
*/
23+
624
export * from './strategy-adapter';

extensions/health/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A component to report health status using
8+
* {@link https://github.com/CloudNativeJS/cloud-health | @cloudnative/health }.
9+
*
10+
* @packageDocumentation
11+
*/
12+
613
export * from './health.component';
714
export * from './keys';
815
export * from './types';

extensions/logging/src/decorators/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,11 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* This module contains a component provides logging facilities based on Winston
8+
* and Fluentd.
9+
*
10+
* @packageDocumentation
11+
*/
12+
613
export * from './logging.decorator';

extensions/logging/src/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A component provides logging facilities based on
8+
* {@link https://github.com/winstonjs/winston | Winston} and
9+
* {@link https://github.com/fluent/fluent-logger-node | Fluentd}.
10+
*/
11+
612
export * from './decorators';
713
export * from './keys';
814
export * from './logging.component';

extensions/metrics/src/index.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A component that reports metrics of Node.js, the LoopBack framework, and your
8+
* application to Prometheus.
9+
*
10+
* @packageDocumentation
11+
*/
12+
613
export * from 'prom-client';
714
export * from './keys';
815
export * from './metrics.component';

packages/authentication/src/index.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A LoopBack 4 component for authentication support.
8+
*
9+
* @remarks
10+
* The core logic for the authentication layer in LoopBack 4.
11+
*
12+
* It contains:
13+
*
14+
* - A decorator to express an authentication requirement on controller methods
15+
* - A provider to access method-level authentication metadata
16+
* - An action in the REST sequence to enforce authentication
17+
* - An extension point to discover all authentication strategies and handle
18+
* the delegation
19+
*
20+
* @packageDocumentation
21+
*/
22+
623
export * from './authentication.component';
724
export * from './decorators';
825
export * from './keys';

packages/authorization/src/index.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A LoopBack 4 component for authorization support (Role based, Permission
8+
* based, Vote based)
9+
*
10+
* @remarks
11+
* To read on key building blocks read through
12+
* {@link https://loopback.io/doc/en/lb4/Loopback-component-authorization.html |LoopBack authorization docs}
13+
*
14+
* @packageDocumentation
15+
*/
16+
617
export * from './authorization-component';
718
export * from './authorize-interceptor';
819
export * from './decorators/authorize';

packages/boot/src/index.ts

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,33 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* A convention based project Bootstrapper and Booters for LoopBack
8+
* Applications.
9+
*
10+
* @remarks
11+
* A Booter is a class that can be bound to an Application and is called to
12+
* perform a task before the Application is started. A Booter may have multiple
13+
* phases to complete its task. The task for a convention based Booter is to
14+
* discover and bind Artifacts (Controllers, Repositories, Models, etc.).
15+
*
16+
* An example task of a Booter may be to discover and bind all artifacts of a
17+
* given type.
18+
*
19+
* A Bootstrapper is needed to manage the Booters and execute them. This is
20+
* provided in this package. For ease of use, everything needed is packages
21+
* using a BootMixin. This Mixin will add convenience methods such as `boot` and
22+
* `booter`, as well as properties needed for Bootstrapper such as
23+
* `projectRoot`. The Mixin also adds the `BootComponent` to your `Application`
24+
* which binds the `Bootstrapper` and default `Booters` made available by this
25+
* package.
26+
*
27+
* @packageDocumentation
28+
*/
29+
30+
export * from './boot.component';
631
export * from './booters';
732
export * from './bootstrapper';
8-
export * from './boot.component';
933
export * from './keys';
1034
export * from './mixins';
1135
export * from './types';

packages/booter-lb3app/src/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,16 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* Boot a LoopBack 3 application and expose its REST API via LoopBack 4.
8+
*
9+
* @remarks
10+
* This package provides a way for LoopBack 3 developers to boot their LoopBack
11+
* 3 application, convert the application's Swagger spec into OpenAPI v3, and
12+
* then mount the application, including its spec, onto a target LoopBack 4
13+
* application.
14+
*
15+
* @pakageDocumentation
16+
*/
17+
618
export * from './lb3app.booter.component';

packages/context/src/index.ts

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
// This file is licensed under the MIT License.
44
// License text available at https://opensource.org/licenses/MIT
55

6+
/**
7+
* Facilities to manage artifacts and their dependencies using {@link Context}
8+
* in your Node.js applications. It can be used independent of the LoopBack
9+
* framework.
10+
*
11+
* @remarks
12+
* This package exposes TypeScript/JavaScript APIs and decorators to register
13+
* artifacts, declare dependencies, and resolve artifacts by keys. The
14+
* {@link Context} also serves as an IoC container to support dependency
15+
* injection.
16+
* Context and Binding are the two core concepts. A context is a registry of
17+
* bindings and each binding represents a resolvable artifact by the key.
18+
*
19+
* - Bindings can be fulfilled by a constant, a factory function, a class, or a
20+
* provider.
21+
* - Bindings can be grouped by tags and searched by tags.
22+
* - Binding scopes can be used to control how a resolved binding value is
23+
* shared.
24+
* - Bindings can be resolved synchronously or asynchronously.
25+
* - Provide {@link inject | @inject} and other variants of decorators to
26+
* express dependencies.
27+
* - Support Constructor, property, and method injections.
28+
* - Allow contexts to form a hierarchy to share or override bindings.
29+
*
30+
* @pakageDocumentation
31+
*/
32+
633
export * from '@loopback/metadata';
734
export * from './binding';
835
export * from './binding-config';
@@ -22,9 +49,9 @@ export * from './interception-proxy';
2249
export * from './interceptor';
2350
export * from './interceptor-chain';
2451
export * from './invocation';
52+
export * from './json-types';
2553
export * from './keys';
2654
export * from './provider';
2755
export * from './resolution-session';
2856
export * from './resolver';
2957
export * from './value-promise';
30-
export * from './json-types';

0 commit comments

Comments
 (0)