@telia-ace/alliance-internal-node-utilities 1.0.1 → 1.0.2-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/auth/auth.middleware.d.ts +13 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/constants/index.d.ts +2 -0
- package/dist/distribution/cookie-policy.d.ts +2 -0
- package/dist/distribution/create-public-files.d.ts +1 -0
- package/dist/distribution/index.d.ts +1 -0
- package/dist/distribution/json-schemas.d.ts +7 -0
- package/dist/distribution/pkg-json.d.ts +13 -0
- package/dist/exceptions/alliance.exception.d.ts +7 -0
- package/dist/{exceptions.d.ts → exceptions/codes.d.ts} +12 -11
- package/dist/exceptions/exception.filter.d.ts +5 -0
- package/dist/exceptions/index.d.ts +3 -0
- package/dist/get-app-manifests.d.ts +2 -0
- package/dist/index.cjs +802 -5
- package/dist/index.d.ts +8 -6
- package/dist/index.mjs +783 -5
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/logging.module.d.ts +9 -0
- package/dist/{logging.d.ts → logging/logging.service.d.ts} +0 -9
- package/dist/slugify.d.ts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +19 -12
- /package/dist/{auth.d.ts → auth/tokens.d.ts} +0 -0
- /package/dist/{config.d.ts → constants/config.d.ts} +0 -0
- /package/dist/{constants.d.ts → constants/headers.d.ts} +0 -0
- /package/dist/{vite-plugin-css-import.d.ts → vite-css-import.plugin.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @telia-ace/alliance-internal-node-utilities
|
|
2
2
|
|
|
3
|
+
## 1.0.2-next.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9c6dc92: Added utility for creating public static files used in all Alliance portal distributions.
|
|
8
|
+
|
|
9
|
+
## 1.0.2-next.0
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 59f0d3f: Remove unnecessary scripts.
|
|
14
|
+
|
|
3
15
|
## 1.0.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
import type { RequestHandler } from 'express';
|
|
3
|
+
import { ConfigParams } from 'express-openid-connect';
|
|
4
|
+
type Settings = {
|
|
5
|
+
baseURL?: ConfigParams['baseURL'];
|
|
6
|
+
clientID?: ConfigParams['clientID'];
|
|
7
|
+
clientSecret?: ConfigParams['clientSecret'];
|
|
8
|
+
authRequired?: ConfigParams['authRequired'];
|
|
9
|
+
authorizationParams?: ConfigParams['authorizationParams'];
|
|
10
|
+
afterCallback?: ConfigParams['afterCallback'];
|
|
11
|
+
};
|
|
12
|
+
export declare function authMiddleware(configService: ConfigService, { baseURL, clientSecret, clientID, authRequired, authorizationParams, afterCallback, }?: Settings): RequestHandler;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createPublicDistributionFiles(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { createPublicDistributionFiles } from './create-public-files';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LooseObject } from '@/types';
|
|
2
|
+
type PkgJson = LooseObject & {
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
};
|
|
6
|
+
export type AlliancePortalDistPkgJson = PkgJson & {
|
|
7
|
+
alliance?: {
|
|
8
|
+
apps?: string[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare function getPkgJson(): AlliancePortalDistPkgJson;
|
|
12
|
+
export declare function getManifests(pkgJson: AlliancePortalDistPkgJson): Promise<LooseObject>;
|
|
13
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { HttpStatus } from '@nestjs/common';
|
|
2
2
|
export declare enum GatewayErrorCodes {
|
|
3
3
|
NoMatchingEndpoint = 10000,
|
|
4
4
|
NoObjectId = 10001,
|
|
@@ -16,18 +16,19 @@ export declare enum GatewayErrorCodes {
|
|
|
16
16
|
}
|
|
17
17
|
export declare enum DatabasesErrorCodes {
|
|
18
18
|
NoPublicKey = 11000,
|
|
19
|
-
NoAuthHeader = 11001
|
|
19
|
+
NoAuthHeader = 11001,
|
|
20
|
+
FailedFileStore = 11002,
|
|
21
|
+
FailedFileRead = 11003
|
|
20
22
|
}
|
|
21
23
|
export declare enum PortalErrorCodes {
|
|
22
24
|
NoObjectId = 12000
|
|
23
25
|
}
|
|
24
|
-
type ErrorCodes = GatewayErrorCodes | DatabasesErrorCodes | PortalErrorCodes;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
26
|
+
export type ErrorCodes = GatewayErrorCodes | DatabasesErrorCodes | PortalErrorCodes;
|
|
27
|
+
type AllianceErrors = {
|
|
28
|
+
[key in ErrorCodes]: {
|
|
29
|
+
httpCode: HttpStatus;
|
|
30
|
+
message: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export declare const allianceErrors: AllianceErrors;
|
|
33
34
|
export {};
|