@rxap/environment 21.0.1 → 22.0.0-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 +14 -0
- package/compodoc/architecture.html +222 -0
- package/compodoc/changelog.html +57 -5
- package/compodoc/components/EnvironmentComponent.html +87 -22
- package/compodoc/dependencies.html +84 -15
- package/compodoc/index.html +46 -5
- package/compodoc/interfaces/Environment.html +860 -671
- package/compodoc/js/architecture-graph.js +288 -0
- package/compodoc/js/libs/bootstrap-native.js +4 -2
- package/compodoc/js/libs/jszip.min.js +13 -0
- package/compodoc/js/libs/svg-pan-zoom.min.js +3 -3
- package/compodoc/js/libs/tablesort.min.js +3 -3
- package/compodoc/js/libs/tablesort.number.min.js +3 -3
- package/compodoc/js/libs/vis-network.min.js +78 -0
- package/compodoc/js/menu-wc.js +25 -12
- package/compodoc/js/menu.js +10 -11
- package/compodoc/js/routes/routes_index.js +1 -0
- package/compodoc/js/routes.js +142 -34
- package/compodoc/js/search/search-lunr.js +6 -8
- package/compodoc/js/search/search.js +118 -66
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/js/tabs.js +98 -15
- package/compodoc/js/tree.js +44 -7
- package/compodoc/license.html +48 -6
- package/compodoc/llms.txt +66 -0
- package/compodoc/miscellaneous/functions.html +63 -16
- package/compodoc/miscellaneous/typealiases.html +47 -5
- package/compodoc/miscellaneous/variables.html +58 -5
- package/compodoc/modules.html +44 -3
- package/compodoc/overview.html +54 -3
- package/compodoc/properties.html +45 -4
- package/compodoc/routes.html +227 -0
- package/compodoc/styles/compodoc.css +365 -44
- package/compodoc/styles/dark.css +16 -0
- package/compodoc/template-playground/default-templates.json +192 -0
- package/compodoc/template-playground/hbs-render.service.ts +217 -0
- package/compodoc/template-playground/main.ts +9 -0
- package/compodoc/template-playground/template-editor.service.ts +173 -0
- package/compodoc/template-playground/template-playground.component.ts +614 -0
- package/compodoc/template-playground/template-playground.module.ts +29 -0
- package/compodoc/template-playground/zip-export.service.ts +86 -0
- package/compodoc/template-playground-app/app.js +1389 -0
- package/compodoc/template-playground-app/index.html +462 -0
- package/docs/documentation.json +306 -343
- package/docs/html/assets/highlight.css +1 -1
- package/docs/html/assets/icons.js +1 -1
- package/docs/html/assets/icons.svg +1 -1
- package/docs/html/assets/main.js +5 -5
- package/docs/html/assets/search.js +1 -1
- package/docs/html/assets/style.css +265 -228
- package/docs/html/classes/EnvironmentComponent.html +70 -3
- package/docs/html/functions/DetermineProductionEnvironmentName.html +42 -1
- package/docs/html/functions/DetermineReleaseName.html +43 -1
- package/docs/html/functions/IsNotReleaseVersion.html +42 -1
- package/docs/html/functions/ProvideEnvironment.html +42 -1
- package/docs/html/functions/UpdateEnvironment.html +45 -2
- package/docs/html/hierarchy.html +29 -0
- package/docs/html/index.html +40 -4
- package/docs/html/interfaces/Environment.html +188 -27
- package/docs/html/modules.html +52 -1
- package/docs/html/types/AnySchema.html +55 -1
- package/docs/html/variables/RXAP_ENVIRONMENT.html +33 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/EnvironmentComponent.md +6 -6
- package/docs/markdown/functions/DetermineProductionEnvironmentName.md +4 -4
- package/docs/markdown/functions/DetermineReleaseName.md +4 -4
- package/docs/markdown/functions/IsNotReleaseVersion.md +2 -2
- package/docs/markdown/functions/ProvideEnvironment.md +2 -2
- package/docs/markdown/functions/UpdateEnvironment.md +4 -4
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/Environment.md +63 -59
- package/docs/markdown/type-aliases/AnySchema.md +7 -5
- package/docs/markdown/variables/RXAP_ENVIRONMENT.md +2 -2
- package/docs/wiki/Class.EnvironmentComponent.md +5 -5
- package/docs/wiki/Function.DetermineProductionEnvironmentName.md +3 -3
- package/docs/wiki/Function.DetermineReleaseName.md +3 -3
- package/docs/wiki/Function.IsNotReleaseVersion.md +1 -1
- package/docs/wiki/Function.ProvideEnvironment.md +1 -1
- package/docs/wiki/Function.UpdateEnvironment.md +3 -3
- package/docs/wiki/Interface.Environment.md +62 -58
- package/docs/wiki/TypeAlias.AnySchema.md +6 -4
- package/docs/wiki/Variable.RXAP_ENVIRONMENT.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-environment.mjs +68 -51
- package/fesm2022/rxap-environment.mjs.map +1 -1
- package/package.json +7 -7
- package/types/rxap-environment.d.ts +92 -100
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
# Interface: Environment
|
|
4
4
|
|
|
5
|
-
Defined in: [environment.ts:3](https://gitlab.com/rxap/packages/-/blob/
|
|
5
|
+
Defined in: [environment.ts:3](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L3)
|
|
6
6
|
|
|
7
7
|
## Indexable
|
|
8
8
|
|
|
9
|
-
\[`key`: `string`\]: `any`
|
|
9
|
+
> \[`key`: `string`\]: `any`
|
|
10
10
|
|
|
11
11
|
## Properties
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@ Defined in: [environment.ts:3](https://gitlab.com/rxap/packages/-/blob/61502283d
|
|
|
14
14
|
|
|
15
15
|
> **app**: `string`
|
|
16
16
|
|
|
17
|
-
Defined in: [environment.ts:7](https://gitlab.com/rxap/packages/-/blob/
|
|
17
|
+
Defined in: [environment.ts:7](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L7)
|
|
18
18
|
|
|
19
19
|
The name of the app
|
|
20
20
|
|
|
@@ -22,9 +22,9 @@ The name of the app
|
|
|
22
22
|
|
|
23
23
|
### branch?
|
|
24
24
|
|
|
25
|
-
> `optional` **branch
|
|
25
|
+
> `optional` **branch?**: `string` \| `null`
|
|
26
26
|
|
|
27
|
-
Defined in: [environment.ts:35](https://gitlab.com/rxap/packages/-/blob/
|
|
27
|
+
Defined in: [environment.ts:35](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L35)
|
|
28
28
|
|
|
29
29
|
The current branch
|
|
30
30
|
|
|
@@ -32,9 +32,9 @@ The current branch
|
|
|
32
32
|
|
|
33
33
|
### commit?
|
|
34
34
|
|
|
35
|
-
> `optional` **commit
|
|
35
|
+
> `optional` **commit?**: `string` \| `null`
|
|
36
36
|
|
|
37
|
-
Defined in: [environment.ts:27](https://gitlab.com/rxap/packages/-/blob/
|
|
37
|
+
Defined in: [environment.ts:27](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L27)
|
|
38
38
|
|
|
39
39
|
The current commit
|
|
40
40
|
|
|
@@ -42,61 +42,65 @@ The current commit
|
|
|
42
42
|
|
|
43
43
|
### config?
|
|
44
44
|
|
|
45
|
-
> `optional` **config
|
|
45
|
+
> `optional` **config?**: `string` \| \{ `fromLocalStorage?`: `boolean`; `fromUrlParam?`: `string` \| `boolean`; `schema?`: [`AnySchema`](../wiki/TypeAlias.AnySchema); `static?`: `Record`\<`string`, `any`\>; `strategy?`: `string`; `url?`: `string` \| `string`[] \| ((`environment`) => `string` \| `string`[]); \}
|
|
46
46
|
|
|
47
|
-
Defined in: [environment.ts:66](https://gitlab.com/rxap/packages/-/blob/
|
|
47
|
+
Defined in: [environment.ts:66](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L66)
|
|
48
48
|
|
|
49
|
-
####
|
|
49
|
+
#### Union Members
|
|
50
50
|
|
|
51
51
|
`string`
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
##### Type Literal
|
|
56
|
+
|
|
57
|
+
\{ `fromLocalStorage?`: `boolean`; `fromUrlParam?`: `string` \| `boolean`; `schema?`: [`AnySchema`](../wiki/TypeAlias.AnySchema); `static?`: `Record`\<`string`, `any`\>; `strategy?`: `string`; `url?`: `string` \| `string`[] \| ((`environment`) => `string` \| `string`[]); \}
|
|
54
58
|
|
|
55
|
-
|
|
59
|
+
##### fromLocalStorage?
|
|
56
60
|
|
|
57
|
-
> `optional` **fromLocalStorage
|
|
61
|
+
> `optional` **fromLocalStorage?**: `boolean`
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
##### fromUrlParam?
|
|
60
64
|
|
|
61
|
-
> `optional` **fromUrlParam
|
|
65
|
+
> `optional` **fromUrlParam?**: `string` \| `boolean`
|
|
62
66
|
|
|
63
|
-
|
|
67
|
+
##### schema?
|
|
64
68
|
|
|
65
|
-
> `optional` **schema
|
|
69
|
+
> `optional` **schema?**: [`AnySchema`](../wiki/TypeAlias.AnySchema)
|
|
66
70
|
|
|
67
|
-
|
|
71
|
+
##### static?
|
|
68
72
|
|
|
69
|
-
> `optional` **static
|
|
73
|
+
> `optional` **static?**: `Record`\<`string`, `any`\>
|
|
70
74
|
|
|
71
75
|
static config values
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
##### strategy?
|
|
74
78
|
|
|
75
|
-
> `optional` **strategy
|
|
79
|
+
> `optional` **strategy?**: `string`
|
|
76
80
|
|
|
77
|
-
|
|
81
|
+
##### url?
|
|
78
82
|
|
|
79
|
-
> `optional` **url
|
|
83
|
+
> `optional` **url?**: `string` \| `string`[] \| ((`environment`) => `string` \| `string`[])
|
|
80
84
|
|
|
81
85
|
***
|
|
82
86
|
|
|
83
87
|
### moduleFederation?
|
|
84
88
|
|
|
85
|
-
> `optional` **moduleFederation
|
|
89
|
+
> `optional` **moduleFederation?**: `object`
|
|
86
90
|
|
|
87
|
-
Defined in: [environment.ts:47](https://gitlab.com/rxap/packages/-/blob/
|
|
91
|
+
Defined in: [environment.ts:47](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L47)
|
|
88
92
|
|
|
89
93
|
#### manifest?
|
|
90
94
|
|
|
91
|
-
> `optional` **manifest
|
|
95
|
+
> `optional` **manifest?**: `string` \| `Record`\<`string`, `string`\>
|
|
92
96
|
|
|
93
97
|
***
|
|
94
98
|
|
|
95
99
|
### name?
|
|
96
100
|
|
|
97
|
-
> `optional` **name
|
|
101
|
+
> `optional` **name?**: `string`
|
|
98
102
|
|
|
99
|
-
Defined in: [environment.ts:11](https://gitlab.com/rxap/packages/-/blob/
|
|
103
|
+
Defined in: [environment.ts:11](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L11)
|
|
100
104
|
|
|
101
105
|
The name of the environment
|
|
102
106
|
|
|
@@ -104,21 +108,21 @@ The name of the environment
|
|
|
104
108
|
|
|
105
109
|
### openApi?
|
|
106
110
|
|
|
107
|
-
> `optional` **openApi
|
|
111
|
+
> `optional` **openApi?**: `object`
|
|
108
112
|
|
|
109
|
-
Defined in: [environment.ts:80](https://gitlab.com/rxap/packages/-/blob/
|
|
113
|
+
Defined in: [environment.ts:80](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L80)
|
|
110
114
|
|
|
111
115
|
#### load?
|
|
112
116
|
|
|
113
|
-
> `optional` **load
|
|
117
|
+
> `optional` **load?**: `boolean` \| \{ `openApiUrl?`: `string`; \}
|
|
114
118
|
|
|
115
119
|
***
|
|
116
120
|
|
|
117
121
|
### origin?
|
|
118
122
|
|
|
119
|
-
> `optional` **origin
|
|
123
|
+
> `optional` **origin?**: `string`
|
|
120
124
|
|
|
121
|
-
Defined in: [environment.ts:78](https://gitlab.com/rxap/packages/-/blob/
|
|
125
|
+
Defined in: [environment.ts:78](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L78)
|
|
122
126
|
|
|
123
127
|
***
|
|
124
128
|
|
|
@@ -126,7 +130,7 @@ Defined in: [environment.ts:78](https://gitlab.com/rxap/packages/-/blob/61502283
|
|
|
126
130
|
|
|
127
131
|
> **production**: `boolean`
|
|
128
132
|
|
|
129
|
-
Defined in: [environment.ts:15](https://gitlab.com/rxap/packages/-/blob/
|
|
133
|
+
Defined in: [environment.ts:15](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L15)
|
|
130
134
|
|
|
131
135
|
The app is compiled from code in the production branch
|
|
132
136
|
|
|
@@ -134,9 +138,9 @@ The app is compiled from code in the production branch
|
|
|
134
138
|
|
|
135
139
|
### release?
|
|
136
140
|
|
|
137
|
-
> `optional` **release
|
|
141
|
+
> `optional` **release?**: `string` \| `null`
|
|
138
142
|
|
|
139
|
-
Defined in: [environment.ts:23](https://gitlab.com/rxap/packages/-/blob/
|
|
143
|
+
Defined in: [environment.ts:23](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L23)
|
|
140
144
|
|
|
141
145
|
The current app release
|
|
142
146
|
|
|
@@ -144,53 +148,53 @@ The current app release
|
|
|
144
148
|
|
|
145
149
|
### sentry?
|
|
146
150
|
|
|
147
|
-
> `optional` **sentry
|
|
151
|
+
> `optional` **sentry?**: `object`
|
|
148
152
|
|
|
149
|
-
Defined in: [environment.ts:51](https://gitlab.com/rxap/packages/-/blob/
|
|
153
|
+
Defined in: [environment.ts:51](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L51)
|
|
150
154
|
|
|
151
155
|
#### debug?
|
|
152
156
|
|
|
153
|
-
> `optional` **debug
|
|
157
|
+
> `optional` **debug?**: `boolean`
|
|
154
158
|
|
|
155
159
|
#### dsn?
|
|
156
160
|
|
|
157
|
-
> `optional` **dsn
|
|
161
|
+
> `optional` **dsn?**: `string`
|
|
158
162
|
|
|
159
163
|
#### enabled?
|
|
160
164
|
|
|
161
|
-
> `optional` **enabled
|
|
165
|
+
> `optional` **enabled?**: `boolean`
|
|
162
166
|
|
|
163
167
|
#### integrations?
|
|
164
168
|
|
|
165
|
-
> `optional` **integrations
|
|
169
|
+
> `optional` **integrations?**: `object`
|
|
166
170
|
|
|
167
171
|
##### integrations.BrowserTracing?
|
|
168
172
|
|
|
169
|
-
> `optional` **BrowserTracing
|
|
173
|
+
> `optional` **BrowserTracing?**: `object`
|
|
170
174
|
|
|
171
175
|
##### integrations.BrowserTracing.tracePropagationTargets?
|
|
172
176
|
|
|
173
|
-
> `optional` **tracePropagationTargets
|
|
177
|
+
> `optional` **tracePropagationTargets?**: `string`[]
|
|
174
178
|
|
|
175
179
|
##### integrations.httpClient?
|
|
176
180
|
|
|
177
|
-
> `optional` **httpClient
|
|
181
|
+
> `optional` **httpClient?**: `object`
|
|
178
182
|
|
|
179
183
|
##### integrations.httpClient.failedRequestStatusCodes?
|
|
180
184
|
|
|
181
|
-
> `optional` **failedRequestStatusCodes
|
|
185
|
+
> `optional` **failedRequestStatusCodes?**: (`number` \| \[`number`, `number`\])[]
|
|
182
186
|
|
|
183
187
|
##### integrations.httpClient.failedRequestTargets?
|
|
184
188
|
|
|
185
|
-
> `optional` **failedRequestTargets
|
|
189
|
+
> `optional` **failedRequestTargets?**: (`string` \| `RegExp`)[]
|
|
186
190
|
|
|
187
191
|
***
|
|
188
192
|
|
|
189
193
|
### serviceWorker?
|
|
190
194
|
|
|
191
|
-
> `optional` **serviceWorker
|
|
195
|
+
> `optional` **serviceWorker?**: `boolean`
|
|
192
196
|
|
|
193
|
-
Defined in: [environment.ts:19](https://gitlab.com/rxap/packages/-/blob/
|
|
197
|
+
Defined in: [environment.ts:19](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L19)
|
|
194
198
|
|
|
195
199
|
Where the service worker is active or not
|
|
196
200
|
|
|
@@ -198,21 +202,21 @@ Where the service worker is active or not
|
|
|
198
202
|
|
|
199
203
|
### slug?
|
|
200
204
|
|
|
201
|
-
> `optional` **slug
|
|
205
|
+
> `optional` **slug?**: `object`
|
|
202
206
|
|
|
203
|
-
Defined in: [environment.ts:43](https://gitlab.com/rxap/packages/-/blob/
|
|
207
|
+
Defined in: [environment.ts:43](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L43)
|
|
204
208
|
|
|
205
209
|
#### name?
|
|
206
210
|
|
|
207
|
-
> `optional` **name
|
|
211
|
+
> `optional` **name?**: `string`
|
|
208
212
|
|
|
209
213
|
***
|
|
210
214
|
|
|
211
215
|
### tag?
|
|
212
216
|
|
|
213
|
-
> `optional` **tag
|
|
217
|
+
> `optional` **tag?**: `string` \| `null`
|
|
214
218
|
|
|
215
|
-
Defined in: [environment.ts:39](https://gitlab.com/rxap/packages/-/blob/
|
|
219
|
+
Defined in: [environment.ts:39](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L39)
|
|
216
220
|
|
|
217
221
|
The current tag
|
|
218
222
|
|
|
@@ -220,16 +224,16 @@ The current tag
|
|
|
220
224
|
|
|
221
225
|
### tier?
|
|
222
226
|
|
|
223
|
-
> `optional` **tier
|
|
227
|
+
> `optional` **tier?**: `string`
|
|
224
228
|
|
|
225
|
-
Defined in: [environment.ts:41](https://gitlab.com/rxap/packages/-/blob/
|
|
229
|
+
Defined in: [environment.ts:41](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L41)
|
|
226
230
|
|
|
227
231
|
***
|
|
228
232
|
|
|
229
233
|
### timestamp?
|
|
230
234
|
|
|
231
|
-
> `optional` **timestamp
|
|
235
|
+
> `optional` **timestamp?**: `string` \| `number` \| `null`
|
|
232
236
|
|
|
233
|
-
Defined in: [environment.ts:31](https://gitlab.com/rxap/packages/-/blob/
|
|
237
|
+
Defined in: [environment.ts:31](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L31)
|
|
234
238
|
|
|
235
239
|
The build timestamp
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
# Type Alias: AnySchema
|
|
4
4
|
|
|
5
|
-
> **AnySchema
|
|
5
|
+
> **AnySchema** = `object`
|
|
6
6
|
|
|
7
|
-
Defined in: [environment.ts:1](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [environment.ts:1](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L1)
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## Properties
|
|
10
10
|
|
|
11
|
-
### validateAsync
|
|
11
|
+
### validateAsync
|
|
12
12
|
|
|
13
13
|
> **validateAsync**: (...`args`) => `any`
|
|
14
14
|
|
|
15
|
+
Defined in: [environment.ts:1](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment.ts#L1)
|
|
16
|
+
|
|
15
17
|
#### Parameters
|
|
16
18
|
|
|
17
19
|
##### args
|
|
@@ -4,4 +4,4 @@
|
|
|
4
4
|
|
|
5
5
|
> `const` **RXAP\_ENVIRONMENT**: `InjectionToken`\<[`Environment`](../wiki/Interface.Environment)\>
|
|
6
6
|
|
|
7
|
-
Defined in: [environment/tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/
|
|
7
|
+
Defined in: [environment/tokens.ts:4](https://gitlab.com/rxap/packages/-/blob/947fa470d880611063dad4f2b0b1c759b5b07f1b/packages/angular/environment/src/lib/environment/tokens.ts#L4)
|
package/docs/wiki/globals.md
CHANGED
|
@@ -1,85 +1,102 @@
|
|
|
1
|
-
import { __decorate } from
|
|
2
|
-
import { DatePipe } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
const RXAP_ENVIRONMENT = new InjectionToken(
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { DatePipe } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, InjectionToken, inject } from "@angular/core";
|
|
5
|
+
const RXAP_ENVIRONMENT = new InjectionToken("rxap-environment");
|
|
6
6
|
let EnvironmentComponent = class EnvironmentComponent {
|
|
7
7
|
constructor() {
|
|
8
8
|
this.environment = inject(RXAP_ENVIRONMENT);
|
|
9
9
|
}
|
|
10
|
-
static {
|
|
11
|
-
|
|
10
|
+
static {
|
|
11
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
12
|
+
minVersion: "12.0.0",
|
|
13
|
+
version: "22.3.0",
|
|
14
|
+
ngImport: i0,
|
|
15
|
+
type: EnvironmentComponent,
|
|
16
|
+
deps: [],
|
|
17
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
static {
|
|
21
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
22
|
+
minVersion: "17.0.0",
|
|
23
|
+
version: "22.3.0",
|
|
24
|
+
type: EnvironmentComponent,
|
|
25
|
+
isStandalone: true,
|
|
26
|
+
selector: "rxap-environment",
|
|
27
|
+
host: { classAttribute: "rxap-environment" },
|
|
28
|
+
ngImport: i0,
|
|
29
|
+
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",
|
|
30
|
+
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"],
|
|
31
|
+
dependencies: [{
|
|
32
|
+
kind: "pipe",
|
|
33
|
+
type: DatePipe,
|
|
34
|
+
name: "date"
|
|
35
|
+
}],
|
|
36
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
37
|
+
});
|
|
38
|
+
}
|
|
12
39
|
};
|
|
13
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
41
|
+
minVersion: "12.0.0",
|
|
42
|
+
version: "22.3.0",
|
|
43
|
+
ngImport: i0,
|
|
44
|
+
type: EnvironmentComponent,
|
|
45
|
+
decorators: [{
|
|
14
46
|
type: Component,
|
|
15
|
-
args: [{
|
|
16
|
-
|
|
47
|
+
args: [{
|
|
48
|
+
selector: "rxap-environment",
|
|
49
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
+
host: { class: "rxap-environment" },
|
|
51
|
+
imports: [DatePipe],
|
|
52
|
+
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",
|
|
53
|
+
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"]
|
|
54
|
+
}]
|
|
55
|
+
}]
|
|
56
|
+
});
|
|
17
57
|
function DetermineProductionEnvironmentName(environment) {
|
|
18
|
-
if (environment.tier)
|
|
58
|
+
if (environment.tier)
|
|
19
59
|
return environment.tier;
|
|
20
|
-
}
|
|
21
60
|
else if (environment.tag) {
|
|
22
61
|
const tagMatch = environment.tag.match(/^v\d+\.\d+\.\d+(-([^.]+)\.\d+)?$/);
|
|
23
|
-
if (!tagMatch)
|
|
24
|
-
return
|
|
25
|
-
|
|
26
|
-
// if the tage has a chanel/digest use this as environment name
|
|
27
|
-
return tagMatch[2] ?? 'production';
|
|
62
|
+
if (!tagMatch)
|
|
63
|
+
return;
|
|
64
|
+
return tagMatch[2] ?? "production";
|
|
28
65
|
}
|
|
29
|
-
else if (environment.branch)
|
|
66
|
+
else if (environment.branch)
|
|
30
67
|
return environment.branch;
|
|
31
|
-
}
|
|
32
|
-
return undefined;
|
|
33
68
|
}
|
|
34
|
-
function DetermineReleaseName(environment, defaultReleaseName =
|
|
35
|
-
if (environment.tag)
|
|
69
|
+
function DetermineReleaseName(environment, defaultReleaseName = "local-development") {
|
|
70
|
+
if (environment.tag)
|
|
36
71
|
return environment.tag;
|
|
37
|
-
|
|
38
|
-
else if (environment.branch) {
|
|
72
|
+
else if (environment.branch)
|
|
39
73
|
return environment.branch;
|
|
40
|
-
}
|
|
41
74
|
return defaultReleaseName;
|
|
42
75
|
}
|
|
43
76
|
function IsNotReleaseVersion(environment) {
|
|
44
|
-
if (!environment.tag)
|
|
77
|
+
if (!environment.tag)
|
|
45
78
|
return true;
|
|
46
|
-
|
|
47
|
-
if (environment.tier !== 'production') {
|
|
79
|
+
if (environment.tier !== "production")
|
|
48
80
|
return true;
|
|
49
|
-
}
|
|
50
81
|
const tagMatch = environment.tag.match(/^v\d+\.\d+\.\d+(-([^.]+)\.\d+)?$/);
|
|
51
|
-
if (!tagMatch)
|
|
82
|
+
if (!tagMatch)
|
|
52
83
|
return true;
|
|
53
|
-
|
|
54
|
-
if (tagMatch[2]) {
|
|
84
|
+
if (tagMatch[2])
|
|
55
85
|
return true;
|
|
56
|
-
}
|
|
57
86
|
return false;
|
|
58
87
|
}
|
|
59
88
|
function ProvideEnvironment(environment) {
|
|
60
89
|
return {
|
|
61
90
|
provide: RXAP_ENVIRONMENT,
|
|
62
|
-
useValue: environment
|
|
91
|
+
useValue: environment
|
|
63
92
|
};
|
|
64
93
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
await fetch(url)
|
|
70
|
-
.then((response) => {
|
|
71
|
-
if (!response.ok) {
|
|
72
|
-
throw new Error('Could not load build.json');
|
|
73
|
-
}
|
|
94
|
+
async function UpdateEnvironment(environment, url = "build.json") {
|
|
95
|
+
await fetch(url).then((response) => {
|
|
96
|
+
if (!response.ok)
|
|
97
|
+
throw new Error("Could not load build.json");
|
|
74
98
|
return response.json();
|
|
75
|
-
})
|
|
76
|
-
.then((build) => Object.assign(environment, build))
|
|
77
|
-
.catch(error => console.error(error.message));
|
|
99
|
+
}).then((build) => Object.assign(environment, build)).catch((error) => console.error(error.message));
|
|
78
100
|
console.debug(`environment: '${environment.name}'`, environment);
|
|
79
101
|
}
|
|
80
|
-
// region environment
|
|
81
|
-
// endregion
|
|
82
|
-
/**
|
|
83
|
-
* Generated bundle index. Do not edit.
|
|
84
|
-
*/
|
|
85
102
|
export { DetermineProductionEnvironmentName, DetermineReleaseName, EnvironmentComponent, IsNotReleaseVersion, ProvideEnvironment, RXAP_ENVIRONMENT, UpdateEnvironment };
|
|
@@ -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"
|
|
1
|
+
{"version":3,"file":"rxap-environment.mjs","names":[],"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"],"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"],"mappings":";;;;;AAGA,MAAa,mBAAmB,IAAI,eAA4B,kBAAkB;ACyB3E,IAAM,uBAAN,MAAM,qBAAoB;CAA1B,cAAA;EAEW,KAAA,cAA2B,OAAO,gBAAgB;CAEnE;CAJY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAoB,cAAA;GAAA,UAAA;GAAA,MAAA,EAAA,gBAAA,mBAAA;GAAA,UAAA;GAAA,UC5BjC;GAoDA,QAAA,CAAA,qMAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MD1Bc;IAAQ,MAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAET,uBAAoB,WAAA,CAlBhC,SAAS;CACR,OAAO;CACP,UAAU;CACV,aAAa;CACb,QAAQ;CACR,UAAU,CACR,EAAE,MAAM,UAAS,CAClB;AACF,CAAA,CAUY,GAAA,oBAAoB;AAApB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAThC,MAAA;EACa,MAAA,CAAA;GAAA,UAAA;GAAkB,iBAGX,wBAAwB;GAAM,MAEzC,EAAE,OAAO,mBAAkB;GAAE,SAC1B,CAAC,QAAQ;GAAC,UAAA;GAAA,QAAA,CAAA,qMAAA;EAAA,CAAA;;;AExBvB,SAAgB,mCAAmC,aAAwB;CACzE,IAAI,YAAY,MACd,OAAO,YAAY;MACd,IAAI,YAAY,KAAK;EAC1B,MAAM,WAAW,YAAY,IAAI,MAAM,kCAAkC;EACzE,IAAI,CAAC,UACH;EAGF,OAAO,SAAS,MAAM;CACxB,OAAO,IAAI,YAAY,QACrB,OAAO,YAAY;AAGvB;ACdA,SAAgB,qBAAqB,aAA0B,qBAAqB,qBAAmB;CAErG,IAAI,YAAY,KACd,OAAO,YAAY;MACd,IAAI,YAAY,QACrB,OAAO,YAAY;CAErB,OAAO;AAET;ACTA,SAAgB,oBAAoB,aAAwB;CAC1D,IAAI,CAAC,YAAY,KACf,OAAO;CAET,IAAI,YAAY,SAAS,cACvB,OAAO;CAET,MAAM,WAAW,YAAY,IAAI,MAAM,kCAAkC;CACzE,IAAI,CAAC,UACH,OAAO;CAET,IAAI,SAAS,IACX,OAAO;CAET,OAAO;AACT;ACdA,SAAgB,mBAAmB,aAAwB;CACzD,OAAO;EACL,SAAS;EACT,UAAU;CACX;AACH;ACHA,eAAsB,kBAAkB,aAA0B,MAAM,cAAY;CAClF,MAAM,MAAM,GAAG,CAAC,CACb,MAAM,aAAY;EACjB,IAAI,CAAC,SAAS,IACZ,MAAM,IAAI,MAAM,2BAA2B;EAE7C,OAAO,SAAS,KAAI;CACtB,CAAC,CAAC,CACD,MAAM,UAAU,OAAO,OAAO,aAAa,KAAK,CAAC,CAAC,CAClD,OAAM,UAAS,QAAQ,MAAM,MAAM,OAAO,CAAC;CAC9C,QAAQ,MAAM,iBAAkB,YAAY,KAAK,IAAK,WAAW;AACnE"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "22.0.0-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": "
|
|
8
|
-
"tslib": "2.
|
|
7
|
+
"@nx/devkit": "24.0.6",
|
|
8
|
+
"tslib": "2.9.1"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
11
|
+
"@angular/common": "^22.0.0",
|
|
12
|
+
"@angular/core": "^22.0.0"
|
|
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": "22.3.0"
|
|
38
38
|
},
|
|
39
39
|
{
|
|
40
40
|
"package": "@angular/core",
|
|
41
|
-
"version": "
|
|
41
|
+
"version": "22.3.0"
|
|
42
42
|
}
|
|
43
43
|
]
|
|
44
44
|
},
|