@rxap/environment 16.0.0-dev.11 → 16.0.0-dev.13
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 +10 -0
- package/README.md +1 -1
- package/esm2022/lib/environment/environment.component.mjs +3 -3
- package/esm2022/lib/environment/environment.component.module.mjs +4 -4
- package/esm2022/lib/update-environment.mjs +2 -2
- package/fesm2022/rxap-environment.mjs +8 -8
- package/fesm2022/rxap-environment.mjs.map +1 -1
- package/package.json +23 -25
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [16.0.0-dev.13](https://gitlab.com/rxap/packages/compare/@rxap/environment@16.0.0-dev.12...@rxap/environment@16.0.0-dev.13) (2023-09-12)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- refactor the build.json concept ([7193cef](https://gitlab.com/rxap/packages/commit/7193cef9ffe76efdfedcd6e6d82e947c1be9c15b))
|
|
11
|
+
|
|
12
|
+
# [16.0.0-dev.12](https://gitlab.com/rxap/packages/compare/@rxap/environment@16.0.0-dev.11...@rxap/environment@16.0.0-dev.12) (2023-09-07)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @rxap/environment
|
|
15
|
+
|
|
6
16
|
# [16.0.0-dev.11](https://gitlab.com/rxap/packages/compare/@rxap/environment@16.0.0-dev.10...@rxap/environment@16.0.0-dev.11) (2023-09-03)
|
|
7
17
|
|
|
8
18
|
**Note:** Version bump only for package @rxap/environment
|
package/README.md
CHANGED
|
@@ -7,10 +7,10 @@ export class EnvironmentComponent {
|
|
|
7
7
|
this.environment = environment;
|
|
8
8
|
this.show = false;
|
|
9
9
|
}
|
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
11
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
10
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponent, deps: [{ token: RXAP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
11
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: EnvironmentComponent, isStandalone: true, selector: "rxap-environment", host: { classAttribute: "rxap-environment" }, ngImport: i0, template: "<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
12
12
|
}
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
13
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponent, decorators: [{
|
|
14
14
|
type: Component,
|
|
15
15
|
args: [{ selector: 'rxap-environment', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-environment' }, standalone: true, imports: [NgIf, DatePipe], template: "<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\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"] }]
|
|
16
16
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -14,11 +14,11 @@ export class EnvironmentComponentModule {
|
|
|
14
14
|
],
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
18
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
19
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
18
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, imports: [EnvironmentComponent], exports: [EnvironmentComponent] }); }
|
|
19
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule }); }
|
|
20
20
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, decorators: [{
|
|
22
22
|
type: NgModule,
|
|
23
23
|
args: [{
|
|
24
24
|
imports: [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Loads the build.json and adds all keys to the environment object
|
|
3
3
|
*/
|
|
4
|
-
export async function UpdateEnvironment(environment, url = '
|
|
4
|
+
export async function UpdateEnvironment(environment, url = 'build.json') {
|
|
5
5
|
await fetch(url)
|
|
6
6
|
.then((response) => {
|
|
7
7
|
if (!response.ok) {
|
|
@@ -13,4 +13,4 @@ export async function UpdateEnvironment(environment, url = '/build.json') {
|
|
|
13
13
|
.catch(error => console.error(error.message));
|
|
14
14
|
console.debug(`environment: '${environment.name}'`, environment);
|
|
15
15
|
}
|
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
16
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBkYXRlLWVudmlyb25tZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvYW5ndWxhci9lbnZpcm9ubWVudC9zcmMvbGliL3VwZGF0ZS1lbnZpcm9ubWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxLQUFLLFVBQVUsaUJBQWlCLENBQUMsV0FBd0IsRUFBRSxHQUFHLEdBQUcsWUFBWTtJQUNsRixNQUFNLEtBQUssQ0FBQyxHQUFHLENBQUM7U0FDYixJQUFJLENBQUMsQ0FBQyxRQUFRLEVBQUUsRUFBRTtRQUNqQixJQUFJLENBQUMsUUFBUSxDQUFDLEVBQUUsRUFBRTtZQUNoQixNQUFNLElBQUksS0FBSyxDQUFDLDJCQUEyQixDQUFDLENBQUM7U0FDOUM7UUFDRCxPQUFPLFFBQVEsQ0FBQyxJQUFJLEVBQUUsQ0FBQztJQUN6QixDQUFDLENBQUM7U0FDRCxJQUFJLENBQUMsQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDLE1BQU0sQ0FBQyxNQUFNLENBQUMsV0FBVyxFQUFFLEtBQUssQ0FBQyxDQUFDO1NBQ2xELEtBQUssQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUM7SUFDaEQsT0FBTyxDQUFDLEtBQUssQ0FBQyxpQkFBa0IsV0FBVyxDQUFDLElBQUssR0FBRyxFQUFFLFdBQVcsQ0FBQyxDQUFDO0FBQ3JFLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBFbnZpcm9ubWVudCB9IGZyb20gJy4vZW52aXJvbm1lbnQnO1xuXG4vKipcbiAqIExvYWRzIHRoZSBidWlsZC5qc29uIGFuZCBhZGRzIGFsbCBrZXlzIHRvIHRoZSBlbnZpcm9ubWVudCBvYmplY3RcbiAqL1xuZXhwb3J0IGFzeW5jIGZ1bmN0aW9uIFVwZGF0ZUVudmlyb25tZW50KGVudmlyb25tZW50OiBFbnZpcm9ubWVudCwgdXJsID0gJ2J1aWxkLmpzb24nKSB7XG4gIGF3YWl0IGZldGNoKHVybClcbiAgICAudGhlbigocmVzcG9uc2UpID0+IHtcbiAgICAgIGlmICghcmVzcG9uc2Uub2spIHtcbiAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdDb3VsZCBub3QgbG9hZCBidWlsZC5qc29uJyk7XG4gICAgICB9XG4gICAgICByZXR1cm4gcmVzcG9uc2UuanNvbigpO1xuICAgIH0pXG4gICAgLnRoZW4oKGJ1aWxkKSA9PiBPYmplY3QuYXNzaWduKGVudmlyb25tZW50LCBidWlsZCkpXG4gICAgLmNhdGNoKGVycm9yID0+IGNvbnNvbGUuZXJyb3IoZXJyb3IubWVzc2FnZSkpO1xuICBjb25zb2xlLmRlYnVnKGBlbnZpcm9ubWVudDogJyR7IGVudmlyb25tZW50Lm5hbWUgfSdgLCBlbnZpcm9ubWVudCk7XG59XG4iXX0=
|
|
@@ -9,10 +9,10 @@ class EnvironmentComponent {
|
|
|
9
9
|
this.environment = environment;
|
|
10
10
|
this.show = false;
|
|
11
11
|
}
|
|
12
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
13
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.
|
|
12
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponent, deps: [{ token: RXAP_ENVIRONMENT }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: EnvironmentComponent, isStandalone: true, selector: "rxap-environment", host: { classAttribute: "rxap-environment" }, ngImport: i0, template: "<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\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: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
14
14
|
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponent, decorators: [{
|
|
16
16
|
type: Component,
|
|
17
17
|
args: [{ selector: 'rxap-environment', changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'rxap-environment' }, standalone: true, imports: [NgIf, DatePipe], template: "<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\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"] }]
|
|
18
18
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
@@ -32,11 +32,11 @@ class EnvironmentComponentModule {
|
|
|
32
32
|
],
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.
|
|
36
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.
|
|
37
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.
|
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
36
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, imports: [EnvironmentComponent], exports: [EnvironmentComponent] }); }
|
|
37
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule }); }
|
|
38
38
|
}
|
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.
|
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: EnvironmentComponentModule, decorators: [{
|
|
40
40
|
type: NgModule,
|
|
41
41
|
args: [{
|
|
42
42
|
imports: [
|
|
@@ -49,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.4", ngImpor
|
|
|
49
49
|
/**
|
|
50
50
|
* Loads the build.json and adds all keys to the environment object
|
|
51
51
|
*/
|
|
52
|
-
async function UpdateEnvironment(environment, url = '
|
|
52
|
+
async function UpdateEnvironment(environment, url = 'build.json') {
|
|
53
53
|
await fetch(url)
|
|
54
54
|
.then((response) => {
|
|
55
55
|
if (!response.ok) {
|
|
@@ -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/environment/environment.component.module.ts","../../../../../packages/angular/environment/src/lib/update-environment.ts","../../../../../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/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 {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\nimport { RXAP_ENVIRONMENT } from './tokens';\nimport { Environment } from '../environment';\nimport {\n DatePipe,\n NgIf,\n} from '@angular/common';\n\n@Component({\n selector: 'rxap-environment',\n templateUrl: './environment.component.html',\n styleUrls: [ './environment.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { class: 'rxap-environment' },\n standalone: true,\n imports: [ NgIf, DatePipe ],\n})\nexport class EnvironmentComponent {\n\n public show = false;\n\n constructor(\n @Inject(RXAP_ENVIRONMENT)\n public readonly environment: Environment,\n ) {\n }\n\n}\n","<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport { EnvironmentComponent } from './environment.component';\nimport { Environment } from '../environment';\nimport { RXAP_ENVIRONMENT } from './tokens';\n\n\n@NgModule({\n imports: [\n EnvironmentComponent,\n ],\n exports: [ EnvironmentComponent ],\n})\nexport class EnvironmentComponentModule {\n\n public static set(environment: Environment): ModuleWithProviders<EnvironmentComponentModule> {\n return {\n ngModule: EnvironmentComponentModule,\n providers: [\n {\n provide: RXAP_ENVIRONMENT,\n useValue: environment,\n },\n ],\n };\n }\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 = '
|
|
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/environment/environment.component.module.ts","../../../../../packages/angular/environment/src/lib/update-environment.ts","../../../../../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/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 {\n ChangeDetectionStrategy,\n Component,\n Inject,\n} from '@angular/core';\nimport { RXAP_ENVIRONMENT } from './tokens';\nimport { Environment } from '../environment';\nimport {\n DatePipe,\n NgIf,\n} from '@angular/common';\n\n@Component({\n selector: 'rxap-environment',\n templateUrl: './environment.component.html',\n styleUrls: [ './environment.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n // eslint-disable-next-line @angular-eslint/no-host-metadata-property\n host: { class: 'rxap-environment' },\n standalone: true,\n imports: [ NgIf, DatePipe ],\n})\nexport class EnvironmentComponent {\n\n public show = false;\n\n constructor(\n @Inject(RXAP_ENVIRONMENT)\n public readonly environment: Environment,\n ) {\n }\n\n}\n","<button (click)=\"show = !show\" class=\"collapse-button\">\n <span *ngIf=\"show; else hidden\" i18n>Hide build info</span>\n <ng-template #hidden>\n <span i18n>Show build info</span>\n </ng-template>\n</button>\n\n<table *ngIf=\"show\">\n <tr *ngIf=\"environment.name\">\n <th>Environment</th>\n <td>{{environment.name}}</td>\n </tr>\n <tr>\n <th>Production</th>\n <td>{{environment.production}}</td>\n </tr>\n <tr *ngIf=\"environment.serviceWorker !== undefined\">\n <th>Service Worker</th>\n <td>{{environment.serviceWorker}}</td>\n </tr>\n <tr *ngIf=\"environment.release\">\n <th>Release</th>\n <td>{{environment.release}}</td>\n </tr>\n <tr *ngIf=\"environment.commit\">\n <th>Commit</th>\n <td>{{environment.commit}}</td>\n </tr>\n <tr *ngIf=\"environment.timestamp\">\n <th>Timestamp</th>\n <td>{{environment.timestamp | date:'HH:mm dd.MM.yy'}}</td>\n </tr>\n <tr *ngIf=\"environment.branch\">\n <th>Branch</th>\n <td>{{environment.branch}}</td>\n </tr>\n <tr *ngIf=\"environment.tag\">\n <th>Tag</th>\n <td>{{environment.tag}}</td>\n </tr>\n <ng-content></ng-content>\n</table>\n","import {\n ModuleWithProviders,\n NgModule,\n} from '@angular/core';\nimport { EnvironmentComponent } from './environment.component';\nimport { Environment } from '../environment';\nimport { RXAP_ENVIRONMENT } from './tokens';\n\n\n@NgModule({\n imports: [\n EnvironmentComponent,\n ],\n exports: [ EnvironmentComponent ],\n})\nexport class EnvironmentComponentModule {\n\n public static set(environment: Environment): ModuleWithProviders<EnvironmentComponentModule> {\n return {\n ngModule: EnvironmentComponentModule,\n providers: [\n {\n provide: RXAP_ENVIRONMENT,\n useValue: environment,\n },\n ],\n };\n }\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","import { Environment } from './environment';\n\nexport function DetermineProductionEnvironmentName(environment: Environment) {\n 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): string {\n\n if (environment.tag) {\n return environment.tag;\n } else if (environment.branch) {\n return environment.branch;\n }\n return 'local-development';\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAGa,gBAAgB,GAAG,IAAI,cAAc,CAAc,kBAAkB;;MCmBrE,oBAAoB,CAAA;AAI/B,IAAA,WAAA,CAEkB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QAJnC,IAAI,CAAA,IAAA,GAAG,KAAK,CAAC;KAMnB;AARU,IAAA,SAAA,IAAA,CAAA,IA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.json
CHANGED
|
@@ -1,45 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
+
"version": "16.0.0-dev.13",
|
|
2
3
|
"name": "@rxap/environment",
|
|
3
|
-
"
|
|
4
|
-
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^16.1.4",
|
|
6
|
-
"@angular/core": "^16.1.4"
|
|
7
|
-
},
|
|
8
|
-
"sideEffects": false,
|
|
4
|
+
"license": "GPL-3.0-or-later",
|
|
9
5
|
"dependencies": {
|
|
10
6
|
"tslib": "2.6.2"
|
|
11
7
|
},
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@angular/core": "16.1.4",
|
|
10
|
+
"@angular/localize": "16.1.4",
|
|
11
|
+
"@angular/common": "16.1.4"
|
|
15
12
|
},
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "Merzough Münker",
|
|
15
|
+
"email": "mmuenker@digitaix.com"
|
|
16
|
+
},
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://gitlab.com/rxap/packages/-/issues",
|
|
19
|
+
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https:/gitlab.com/rxap/packages/packages/angular/environment",
|
|
16
22
|
"keywords": [
|
|
17
|
-
"rxap",
|
|
18
23
|
"angular",
|
|
24
|
+
"angular-environment",
|
|
25
|
+
"environment",
|
|
19
26
|
"ngx",
|
|
20
27
|
"packages",
|
|
21
|
-
"
|
|
22
|
-
"angular-environment"
|
|
28
|
+
"rxap"
|
|
23
29
|
],
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
"email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
|
|
30
|
+
"publishConfig": {
|
|
31
|
+
"access": "public",
|
|
32
|
+
"directory": "../../../dist/packages/angular/environment"
|
|
28
33
|
},
|
|
29
|
-
"license": "GPL-3.0-or-later",
|
|
30
34
|
"repository": {
|
|
31
35
|
"type": "git",
|
|
32
36
|
"url": "https://gitlab.com/rxap/packages.git",
|
|
33
37
|
"directory": "packages/angular/environment"
|
|
34
38
|
},
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
"email": "mmuenker@digitaix.com"
|
|
38
|
-
},
|
|
39
|
-
"nx-migrations": {
|
|
40
|
-
"packageGroup": []
|
|
41
|
-
},
|
|
42
|
-
"gitHead": "b6e1ecbccc89aae6de3dc72b0206374dbaa44e69",
|
|
39
|
+
"sideEffects": false,
|
|
40
|
+
"gitHead": "6679f090af3b55900bfeb02de0ed8f1febfdbb8b",
|
|
43
41
|
"module": "fesm2022/rxap-environment.mjs",
|
|
44
42
|
"typings": "index.d.ts",
|
|
45
43
|
"exports": {
|