@rxap/environment 19.2.0 → 21.0.1-dev.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 +15 -0
- package/compodoc/changelog.html +12 -0
- package/compodoc/components/EnvironmentComponent.html +56 -36
- package/compodoc/dependencies.html +3 -3
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +73 -73
- package/docs/html/classes/EnvironmentComponent.html +2 -2
- package/docs/html/functions/DetermineProductionEnvironmentName.html +1 -1
- package/docs/html/functions/DetermineReleaseName.html +1 -1
- package/docs/html/functions/IsNotReleaseVersion.html +1 -1
- package/docs/html/functions/ProvideEnvironment.html +1 -1
- package/docs/html/functions/UpdateEnvironment.html +2 -2
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/Environment.html +11 -11
- package/docs/html/modules.html +1 -1
- package/docs/html/types/AnySchema.html +1 -1
- package/docs/html/variables/RXAP_ENVIRONMENT.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/EnvironmentComponent.md +3 -3
- package/docs/markdown/functions/DetermineProductionEnvironmentName.md +2 -2
- package/docs/markdown/functions/DetermineReleaseName.md +2 -2
- package/docs/markdown/functions/IsNotReleaseVersion.md +2 -2
- package/docs/markdown/functions/ProvideEnvironment.md +2 -2
- package/docs/markdown/functions/UpdateEnvironment.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/Environment.md +18 -18
- package/docs/markdown/type-aliases/AnySchema.md +2 -2
- package/docs/markdown/variables/RXAP_ENVIRONMENT.md +2 -2
- package/docs/wiki/Class.EnvironmentComponent.md +2 -2
- package/docs/wiki/Function.DetermineProductionEnvironmentName.md +1 -1
- package/docs/wiki/Function.DetermineReleaseName.md +1 -1
- package/docs/wiki/Function.IsNotReleaseVersion.md +1 -1
- package/docs/wiki/Function.ProvideEnvironment.md +1 -1
- package/docs/wiki/Function.UpdateEnvironment.md +1 -1
- package/docs/wiki/Interface.Environment.md +17 -17
- package/docs/wiki/TypeAlias.AnySchema.md +1 -1
- package/docs/wiki/Variable.RXAP_ENVIRONMENT.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-environment.mjs +9 -19
- package/fesm2022/rxap-environment.mjs.map +1 -1
- package/package.json +10 -9
- package/{lib/environment.d.ts → types/rxap-environment.d.ts} +32 -2
- package/index.d.ts +0 -8
- package/lib/determine-production-environment-name.d.ts +0 -2
- package/lib/determine-release-name.d.ts +0 -2
- package/lib/environment/environment.component.d.ts +0 -7
- package/lib/environment/tokens.d.ts +0 -3
- package/lib/is-not-release-version.d.ts +0 -2
- package/lib/provide-environment.d.ts +0 -5
- package/lib/update-environment.d.ts +0 -5
|
@@ -1,21 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import { DatePipe } from '@angular/common';
|
|
2
3
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, inject,
|
|
4
|
-
|
|
4
|
+
import { InjectionToken, inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
5
5
|
const RXAP_ENVIRONMENT = new InjectionToken('rxap-environment');
|
|
6
|
-
|
|
7
|
-
class EnvironmentComponent {
|
|
6
|
+
let EnvironmentComponent = class EnvironmentComponent {
|
|
8
7
|
constructor() {
|
|
9
8
|
this.environment = inject(RXAP_ENVIRONMENT);
|
|
10
9
|
}
|
|
11
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
12
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
13
|
-
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: EnvironmentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: EnvironmentComponent, isStandalone: true, selector: "rxap-environment", host: { classAttribute: "rxap-environment" }, ngImport: i0, template: "<div class=\"p-4\">\n <h2 class=\"text-xl font-bold pb-2\">{{ environment.app }}</h2>\n <table class=\"table-auto\">\n @if (environment.name) {\n <tr>\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n }\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n @if (environment.serviceWorker !== undefined) {\n <tr>\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n }\n @if (environment.release) {\n <tr>\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n }\n @if (environment.commit) {\n <tr>\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n }\n @if (environment.timestamp) {\n <tr>\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'dd.MM.yy HH:mm:ss'}}</td>\n </tr>\n }\n @if (environment.branch) {\n <tr>\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n }\n @if (environment.tag) {\n <tr>\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n }\n <ng-content></ng-content>\n </table>\n</div>\n", styles: [".collapse-button{background-color:transparent;margin:8px 8px 20px;border:none;cursor:pointer;width:calc(100% - 16px)}table th{text-align:left;padding-right:16px}table th,table td{font-size:75%}\n"], dependencies: [{ kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
|
+
};
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: EnvironmentComponent, decorators: [{
|
|
15
14
|
type: Component,
|
|
16
|
-
args: [{ selector: 'rxap-environment', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-environment' }, imports: [
|
|
15
|
+
args: [{ selector: 'rxap-environment', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-environment' }, imports: [DatePipe], template: "<div class=\"p-4\">\n <h2 class=\"text-xl font-bold pb-2\">{{ environment.app }}</h2>\n <table class=\"table-auto\">\n @if (environment.name) {\n <tr>\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n }\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n @if (environment.serviceWorker !== undefined) {\n <tr>\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n }\n @if (environment.release) {\n <tr>\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n }\n @if (environment.commit) {\n <tr>\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n }\n @if (environment.timestamp) {\n <tr>\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'dd.MM.yy HH:mm:ss'}}</td>\n </tr>\n }\n @if (environment.branch) {\n <tr>\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n }\n @if (environment.tag) {\n <tr>\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n }\n <ng-content></ng-content>\n </table>\n</div>\n", styles: [".collapse-button{background-color:transparent;margin:8px 8px 20px;border:none;cursor:pointer;width:calc(100% - 16px)}table th{text-align:left;padding-right:16px}table th,table td{font-size:75%}\n"] }]
|
|
17
16
|
}] });
|
|
18
|
-
|
|
19
17
|
function DetermineProductionEnvironmentName(environment) {
|
|
20
18
|
if (environment.tier) {
|
|
21
19
|
return environment.tier;
|
|
@@ -33,7 +31,6 @@ function DetermineProductionEnvironmentName(environment) {
|
|
|
33
31
|
}
|
|
34
32
|
return undefined;
|
|
35
33
|
}
|
|
36
|
-
|
|
37
34
|
function DetermineReleaseName(environment, defaultReleaseName = 'local-development') {
|
|
38
35
|
if (environment.tag) {
|
|
39
36
|
return environment.tag;
|
|
@@ -43,7 +40,6 @@ function DetermineReleaseName(environment, defaultReleaseName = 'local-developme
|
|
|
43
40
|
}
|
|
44
41
|
return defaultReleaseName;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
function IsNotReleaseVersion(environment) {
|
|
48
44
|
if (!environment.tag) {
|
|
49
45
|
return true;
|
|
@@ -60,14 +56,12 @@ function IsNotReleaseVersion(environment) {
|
|
|
60
56
|
}
|
|
61
57
|
return false;
|
|
62
58
|
}
|
|
63
|
-
|
|
64
59
|
function ProvideEnvironment(environment) {
|
|
65
60
|
return {
|
|
66
61
|
provide: RXAP_ENVIRONMENT,
|
|
67
62
|
useValue: environment,
|
|
68
63
|
};
|
|
69
64
|
}
|
|
70
|
-
|
|
71
65
|
/**
|
|
72
66
|
* Loads the build.json and adds all keys to the environment object
|
|
73
67
|
*/
|
|
@@ -83,13 +77,9 @@ async function UpdateEnvironment(environment, url = 'build.json') {
|
|
|
83
77
|
.catch(error => console.error(error.message));
|
|
84
78
|
console.debug(`environment: '${environment.name}'`, environment);
|
|
85
79
|
}
|
|
86
|
-
|
|
87
80
|
// region environment
|
|
88
81
|
// endregion
|
|
89
|
-
|
|
90
82
|
/**
|
|
91
83
|
* Generated bundle index. Do not edit.
|
|
92
84
|
*/
|
|
93
|
-
|
|
94
85
|
export { DetermineProductionEnvironmentName, DetermineReleaseName, EnvironmentComponent, IsNotReleaseVersion, ProvideEnvironment, RXAP_ENVIRONMENT, UpdateEnvironment };
|
|
95
|
-
//# sourceMappingURL=rxap-environment.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-environment.mjs","sources":["../../../../../packages/angular/environment/src/lib/environment/tokens.ts","../../../../../packages/angular/environment/src/lib/environment/environment.component.ts","../../../../../packages/angular/environment/src/lib/environment/environment.component.html","../../../../../packages/angular/environment/src/lib/determine-production-environment-name.ts","../../../../../packages/angular/environment/src/lib/determine-release-name.ts","../../../../../packages/angular/environment/src/lib/is-not-release-version.ts","../../../../../packages/angular/environment/src/lib/provide-environment.ts","../../../../../packages/angular/environment/src/lib/update-environment.ts","../../../../../packages/angular/environment/src/index.ts","../../../../../packages/angular/environment/src/rxap-environment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Environment } from '../environment';\n\nexport const RXAP_ENVIRONMENT = new InjectionToken<Environment>('rxap-environment');\n","import {
|
|
1
|
+
{"version":3,"file":"rxap-environment.mjs","sources":["../../../../../packages/angular/environment/src/lib/environment/tokens.ts","../../../../../packages/angular/environment/src/lib/environment/environment.component.ts","../../../../../packages/angular/environment/src/lib/environment/environment.component.html","../../../../../packages/angular/environment/src/lib/determine-production-environment-name.ts","../../../../../packages/angular/environment/src/lib/determine-release-name.ts","../../../../../packages/angular/environment/src/lib/is-not-release-version.ts","../../../../../packages/angular/environment/src/lib/provide-environment.ts","../../../../../packages/angular/environment/src/lib/update-environment.ts","../../../../../packages/angular/environment/src/index.ts","../../../../../packages/angular/environment/src/rxap-environment.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Environment } from '../environment';\n\nexport const RXAP_ENVIRONMENT = new InjectionToken<Environment>('rxap-environment');\n","import { DatePipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n inject,\n} from '@angular/core';\nimport { Showcase } from '@ng-prism/core';\nimport { Environment } from '../environment';\nimport { RXAP_ENVIRONMENT } from './tokens';\n\n@Showcase({\n title: 'Environment',\n category: 'Environment',\n description: 'Shows the build information of the running app. The values are read from the `RXAP_ENVIRONMENT` token, which the styleguide host provides with demo data.',\n status: 'stable',\n variants: [\n { name: 'Default' },\n ],\n})\n@Component({\n selector: 'rxap-environment',\n templateUrl: './environment.component.html',\n styleUrls: ['./environment.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n \n host: { class: 'rxap-environment' },\n imports: [DatePipe]\n})\nexport class EnvironmentComponent {\n\n public readonly environment: Environment = inject(RXAP_ENVIRONMENT);\n\n}\n","<div class=\"p-4\">\n <h2 class=\"text-xl font-bold pb-2\">{{ environment.app }}</h2>\n <table class=\"table-auto\">\n @if (environment.name) {\n <tr>\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n }\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n @if (environment.serviceWorker !== undefined) {\n <tr>\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n }\n @if (environment.release) {\n <tr>\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n }\n @if (environment.commit) {\n <tr>\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n }\n @if (environment.timestamp) {\n <tr>\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'dd.MM.yy HH:mm:ss'}}</td>\n </tr>\n }\n @if (environment.branch) {\n <tr>\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n }\n @if (environment.tag) {\n <tr>\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n }\n <ng-content></ng-content>\n </table>\n</div>\n","import { Environment } from './environment';\n\nexport function DetermineProductionEnvironmentName(environment: Environment) {\n if (environment.tier) {\n return environment.tier;\n } else if (environment.tag) {\n const tagMatch = environment.tag.match(/^v\\d+\\.\\d+\\.\\d+(-([^.]+)\\.\\d+)?$/);\n if (!tagMatch) {\n return undefined;\n }\n // if the tage has a chanel/digest use this as environment name\n return tagMatch[2] ?? 'production';\n } else if (environment.branch) {\n return environment.branch;\n }\n return undefined;\n}\n","import { Environment } from './environment';\n\nexport function DetermineReleaseName(environment: Environment, defaultReleaseName = 'local-development'): string {\n\n if (environment.tag) {\n return environment.tag;\n } else if (environment.branch) {\n return environment.branch;\n }\n return defaultReleaseName;\n\n}\n","import { Environment } from './environment';\n\nexport function IsNotReleaseVersion(environment: Environment): boolean {\n if (!environment.tag) {\n return true;\n }\n if (environment.tier !== 'production') {\n return true;\n }\n const tagMatch = environment.tag.match(/^v\\d+\\.\\d+\\.\\d+(-([^.]+)\\.\\d+)?$/);\n if (!tagMatch) {\n return true;\n }\n if (tagMatch[2]) {\n return true;\n }\n return false;\n}\n","import { Environment } from './environment';\nimport { RXAP_ENVIRONMENT } from './environment/tokens';\n\nexport function ProvideEnvironment(environment: Environment) {\n return {\n provide: RXAP_ENVIRONMENT,\n useValue: environment,\n };\n}\n","import { Environment } from './environment';\n\n/**\n * Loads the build.json and adds all keys to the environment object\n */\nexport async function UpdateEnvironment(environment: Environment, url = 'build.json') {\n await fetch(url)\n .then((response) => {\n if (!response.ok) {\n throw new Error('Could not load build.json');\n }\n return response.json();\n })\n .then((build) => Object.assign(environment, build))\n .catch(error => console.error(error.message));\n console.debug(`environment: '${ environment.name }'`, environment);\n}\n","// region environment\nexport * from './lib/environment/environment.component';\nexport * from './lib/environment/tokens';\n// endregion\n\n// region \nexport * from './lib/determine-production-environment-name';\nexport * from './lib/determine-release-name';\nexport * from './lib/environment';\nexport * from './lib/is-not-release-version';\nexport * from './lib/provide-environment';\nexport * from './lib/update-environment';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAGa,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB;;ACyB3E,IAAM,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAgB,MAAM,CAAC,gBAAgB,CAAC;AAEpE,IAAA;8GAJY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC5BjC,ytCAoDA,EAAA,MAAA,EAAA,CAAA,qMAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,ED1Bc,QAAQ,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,EAA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,OAAO,CAAC,KAAK,CAAC,CAAA,cAAA,EAAkB,WAAW,CAAC,IAAK,CAAA,CAAA,CAAG,EAAE,WAAW,CAAC;AACpE;;AChBA;AAYA;;ACZA;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "21.0.1-dev.1",
|
|
3
3
|
"name": "@rxap/environment",
|
|
4
4
|
"description": "Provides utilities and components for managing application environments in Angular, including determining environment names, release versions, and providing environment-specific configurations. It offers a component to display environment information and functions to update the environment with build details. The package also includes an init generator for setting up peer dependencies.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "
|
|
7
|
+
"@nx/devkit": "22.7.5",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
11
|
+
"@angular/common": "^21.2.9",
|
|
12
|
+
"@angular/core": "^21.2.9"
|
|
13
13
|
},
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "Merzough Münker",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"packageGroup": [
|
|
35
35
|
{
|
|
36
36
|
"package": "@angular/common",
|
|
37
|
-
"version": "
|
|
37
|
+
"version": "21.2.9"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"package": "@angular/core",
|
|
41
|
-
"version": "
|
|
41
|
+
"version": "21.2.9"
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
},
|
|
@@ -54,15 +54,16 @@
|
|
|
54
54
|
"schematics": "./generators.json",
|
|
55
55
|
"sideEffects": false,
|
|
56
56
|
"module": "fesm2022/rxap-environment.mjs",
|
|
57
|
-
"typings": "
|
|
57
|
+
"typings": "types/rxap-environment.d.ts",
|
|
58
58
|
"exports": {
|
|
59
59
|
"./package.json": {
|
|
60
60
|
"default": "./package.json"
|
|
61
61
|
},
|
|
62
62
|
".": {
|
|
63
|
-
"types": "./
|
|
63
|
+
"types": "./types/rxap-environment.d.ts",
|
|
64
64
|
"default": "./fesm2022/rxap-environment.mjs"
|
|
65
65
|
},
|
|
66
66
|
"./theme": "./theme.css"
|
|
67
|
-
}
|
|
67
|
+
},
|
|
68
|
+
"type": "module"
|
|
68
69
|
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
type AnySchema = {
|
|
2
5
|
validateAsync: (...args: any[]) => any;
|
|
3
6
|
};
|
|
4
|
-
|
|
7
|
+
interface Environment {
|
|
5
8
|
/**
|
|
6
9
|
* The name of the app
|
|
7
10
|
*/
|
|
@@ -78,3 +81,30 @@ export interface Environment {
|
|
|
78
81
|
};
|
|
79
82
|
[key: string]: any;
|
|
80
83
|
}
|
|
84
|
+
|
|
85
|
+
declare class EnvironmentComponent {
|
|
86
|
+
readonly environment: Environment;
|
|
87
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentComponent, never>;
|
|
88
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EnvironmentComponent, "rxap-environment", never, {}, {}, never, ["*"], true, never>;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare const RXAP_ENVIRONMENT: InjectionToken<Environment>;
|
|
92
|
+
|
|
93
|
+
declare function DetermineProductionEnvironmentName(environment: Environment): string | undefined;
|
|
94
|
+
|
|
95
|
+
declare function DetermineReleaseName(environment: Environment, defaultReleaseName?: string): string;
|
|
96
|
+
|
|
97
|
+
declare function IsNotReleaseVersion(environment: Environment): boolean;
|
|
98
|
+
|
|
99
|
+
declare function ProvideEnvironment(environment: Environment): {
|
|
100
|
+
provide: i0.InjectionToken<Environment>;
|
|
101
|
+
useValue: Environment;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Loads the build.json and adds all keys to the environment object
|
|
106
|
+
*/
|
|
107
|
+
declare function UpdateEnvironment(environment: Environment, url?: string): Promise<void>;
|
|
108
|
+
|
|
109
|
+
export { DetermineProductionEnvironmentName, DetermineReleaseName, EnvironmentComponent, IsNotReleaseVersion, ProvideEnvironment, RXAP_ENVIRONMENT, UpdateEnvironment };
|
|
110
|
+
export type { AnySchema, Environment };
|
package/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './lib/environment/environment.component';
|
|
2
|
-
export * from './lib/environment/tokens';
|
|
3
|
-
export * from './lib/determine-production-environment-name';
|
|
4
|
-
export * from './lib/determine-release-name';
|
|
5
|
-
export * from './lib/environment';
|
|
6
|
-
export * from './lib/is-not-release-version';
|
|
7
|
-
export * from './lib/provide-environment';
|
|
8
|
-
export * from './lib/update-environment';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Environment } from '../environment';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class EnvironmentComponent {
|
|
4
|
-
readonly environment: Environment;
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<EnvironmentComponent, never>;
|
|
6
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EnvironmentComponent, "rxap-environment", never, {}, {}, never, ["*"], true, never>;
|
|
7
|
-
}
|