@taon-dev/i18n 21.0.35 → 21.0.42
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/VERIFIED-BUILD-DATA.jsonc +2 -2
- package/bin/start.js +37 -37
- package/browser/README.md +24 -24
- package/browser/fesm2022/i18n-browser.mjs +20 -12
- package/browser/fesm2022/i18n-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser/types/i18n-browser.d.ts +11 -7
- package/browser-prod/README.md +24 -24
- package/browser-prod/fesm2022/i18n-browser-prod.mjs +20 -12
- package/browser-prod/fesm2022/i18n-browser-prod.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/browser-prod/types/i18n-browser-prod.d.ts +11 -7
- package/full-dts/build-info._auto-generated_.d.ts +24 -0
- package/full-dts/env/env.angular-node-app.d.ts +68 -0
- package/full-dts/env/env.docs-webapp.d.ts +68 -0
- package/full-dts/env/env.electron-app.d.ts +68 -0
- package/full-dts/env/env.mobile-app.d.ts +68 -0
- package/full-dts/env/env.npm-lib-and-cli-tool.d.ts +68 -0
- package/full-dts/env/env.vscode-plugin.d.ts +68 -0
- package/full-dts/env/index.d.ts +6 -0
- package/full-dts/i18n/lib.translation.d.ts +4 -0
- package/full-dts/i18n/translation.ts.en-US.i18n.data.d.ts +17 -0
- package/full-dts/i18n/translation.ts.pl-PL.i18n.data.d.ts +17 -0
- package/full-dts/index._auto-generated_.d.ts +13 -0
- package/full-dts/index.d.ts +4 -0
- package/full-dts/local-translation.d.ts +67 -0
- package/full-dts/start-cli.d.ts +2 -0
- package/full-dts/translation-manager.d.ts +34 -0
- package/full-dts/translation.d.ts +48 -0
- package/full-dts/translation.models.d.ts +25 -0
- package/full-dts/utils-i18n-extract-gettext-translate-from-html.d.ts +4 -0
- package/full-dts/utils-i18n-extract-gettext-translate-from-html.test.d.ts +1 -0
- package/full-dts/utils-i18n-html.d.ts +9 -0
- package/full-dts/utils-i18n-html.test.d.ts +1 -0
- package/full-dts/utils-po-file-extracto-to-json.test.d.ts +1 -0
- package/full-dts/utils-po-file.d.ts +8 -0
- package/full-dts/utils-po-file.test.d.ts +1 -0
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/env/env.angular-node-app.d.ts +1 -0
- package/lib/env/env.angular-node-app.js +6 -2
- package/lib/env/env.angular-node-app.js.map +1 -1
- package/lib/env/env.docs-webapp.d.ts +1 -0
- package/lib/env/env.docs-webapp.js +6 -2
- package/lib/env/env.docs-webapp.js.map +1 -1
- package/lib/env/env.electron-app.d.ts +1 -0
- package/lib/env/env.electron-app.js +6 -2
- package/lib/env/env.electron-app.js.map +1 -1
- package/lib/env/env.mobile-app.d.ts +1 -0
- package/lib/env/env.mobile-app.js +6 -2
- package/lib/env/env.mobile-app.js.map +1 -1
- package/lib/env/env.npm-lib-and-cli-tool.d.ts +1 -0
- package/lib/env/env.npm-lib-and-cli-tool.js +6 -2
- package/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib/env/env.vscode-plugin.d.ts +1 -0
- package/lib/env/env.vscode-plugin.js +6 -2
- package/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib/i18n/lib.translation.d.ts +2 -2
- package/lib/i18n/translation.ts.en-US.i18n.data.js +3 -3
- package/lib/i18n/translation.ts.pl-PL.i18n.data.js +3 -3
- package/lib/index._auto-generated_.d.ts +1 -4
- package/lib/local-translation.d.ts +2 -2
- package/lib/package.json +1 -1
- package/lib/translation-manager.d.ts +2 -2
- package/lib/translation.d.ts +8 -5
- package/lib/translation.js +5 -1
- package/lib/translation.js.map +1 -1
- package/lib/translation.models.d.ts +2 -2
- package/lib/utils-i18n-extract-gettext-translate-from-html.d.ts +2 -2
- package/lib/utils-i18n-html.d.ts +2 -2
- package/lib/utils-po-file.d.ts +2 -2
- package/lib-esm/app/main-page/main-page.active.context.d.ts +0 -20
- package/lib-esm/app/main-page/main-page.active.context.js +1 -18
- package/lib-esm/app/main-page/main-page.active.context.js.map +1 -1
- package/lib-esm/app/main-page/main-page.container.d.ts +0 -0
- package/lib-esm/app/main-page/main-page.container.js +2 -0
- package/lib-esm/app/main-page/main-page.container.js.map +1 -0
- package/lib-esm/app/main-page/main-page.routes.d.ts +0 -0
- package/lib-esm/app/main-page/main-page.routes.js +2 -0
- package/lib-esm/app/main-page/main-page.routes.js.map +1 -0
- package/lib-esm/app.d.ts +0 -3
- package/lib-esm/app.electron.d.ts +0 -1
- package/lib-esm/app.electron.js +1 -1
- package/lib-esm/app.electron.js.map +1 -1
- package/lib-esm/app.hosts.d.ts +0 -147
- package/lib-esm/app.hosts.js +1 -216
- package/lib-esm/app.hosts.js.map +1 -1
- package/lib-esm/app.js +1 -459
- package/lib-esm/app.js.map +1 -1
- package/lib-esm/app.vscode.js +1 -54
- package/lib-esm/app.vscode.js.map +1 -1
- package/lib-esm/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib-esm/lib/build-info._auto-generated_.js +1 -1
- package/lib-esm/lib/env/env.angular-node-app.d.ts +1 -0
- package/lib-esm/lib/env/env.angular-node-app.js +3 -0
- package/lib-esm/lib/env/env.angular-node-app.js.map +1 -1
- package/lib-esm/lib/env/env.docs-webapp.d.ts +1 -0
- package/lib-esm/lib/env/env.docs-webapp.js +3 -0
- package/lib-esm/lib/env/env.docs-webapp.js.map +1 -1
- package/lib-esm/lib/env/env.electron-app.d.ts +1 -0
- package/lib-esm/lib/env/env.electron-app.js +3 -0
- package/lib-esm/lib/env/env.electron-app.js.map +1 -1
- package/lib-esm/lib/env/env.mobile-app.d.ts +1 -0
- package/lib-esm/lib/env/env.mobile-app.js +3 -0
- package/lib-esm/lib/env/env.mobile-app.js.map +1 -1
- package/lib-esm/lib/env/env.npm-lib-and-cli-tool.d.ts +1 -0
- package/lib-esm/lib/env/env.npm-lib-and-cli-tool.js +3 -0
- package/lib-esm/lib/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib-esm/lib/env/env.vscode-plugin.d.ts +1 -0
- package/lib-esm/lib/env/env.vscode-plugin.js +3 -0
- package/lib-esm/lib/env/env.vscode-plugin.js.map +1 -1
- package/lib-esm/lib/i18n/translation.ts.en-US.i18n.data.js +3 -3
- package/lib-esm/lib/i18n/translation.ts.pl-PL.i18n.data.js +3 -3
- package/lib-esm/lib/local-translation.js +23 -0
- package/lib-esm/lib/local-translation.js.map +1 -1
- package/lib-esm/lib/translation.d.ts +4 -0
- package/lib-esm/lib/translation.js +5 -1
- package/lib-esm/lib/translation.js.map +1 -1
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.js +146 -0
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.js.map +1 -1
- package/lib-esm/lib/utils-i18n-html.js +245 -0
- package/lib-esm/lib/utils-i18n-html.js.map +1 -1
- package/lib-prod/build-info._auto-generated_.d.ts +1 -1
- package/lib-prod/build-info._auto-generated_.js +1 -1
- package/lib-prod/env/env.angular-node-app.d.ts +1 -0
- package/lib-prod/env/env.angular-node-app.js +3 -0
- package/lib-prod/env/env.angular-node-app.js.map +1 -1
- package/lib-prod/env/env.docs-webapp.d.ts +1 -0
- package/lib-prod/env/env.docs-webapp.js +3 -0
- package/lib-prod/env/env.docs-webapp.js.map +1 -1
- package/lib-prod/env/env.electron-app.d.ts +1 -0
- package/lib-prod/env/env.electron-app.js +3 -0
- package/lib-prod/env/env.electron-app.js.map +1 -1
- package/lib-prod/env/env.mobile-app.d.ts +1 -0
- package/lib-prod/env/env.mobile-app.js +3 -0
- package/lib-prod/env/env.mobile-app.js.map +1 -1
- package/lib-prod/env/env.npm-lib-and-cli-tool.d.ts +1 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +3 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js.map +1 -1
- package/lib-prod/env/env.vscode-plugin.d.ts +1 -0
- package/lib-prod/env/env.vscode-plugin.js +3 -0
- package/lib-prod/env/env.vscode-plugin.js.map +1 -1
- package/lib-prod/i18n/translation.ts.en-US.i18n.data.js +3 -3
- package/lib-prod/i18n/translation.ts.pl-PL.i18n.data.js +3 -3
- package/lib-prod/local-translation.js.map +1 -1
- package/lib-prod/package.json +1 -1
- package/lib-prod/translation-manager.js.map +1 -1
- package/lib-prod/translation.d.ts +4 -0
- package/lib-prod/translation.js +5 -1
- package/lib-prod/translation.js.map +1 -1
- package/package.json +1 -1
- package/src.d.ts +1 -1
- package/websql/README.md +24 -24
- package/websql/fesm2022/i18n-websql.mjs +20 -12
- package/websql/fesm2022/i18n-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql/types/i18n-websql.d.ts +11 -7
- package/websql-prod/README.md +24 -24
- package/websql-prod/fesm2022/i18n-websql-prod.mjs +20 -12
- package/websql-prod/fesm2022/i18n-websql-prod.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/websql-prod/types/i18n-websql-prod.d.ts +11 -7
- package/lib/translate.directive.d.ts +0 -16
- package/lib/translate.pipe.d.ts +0 -10
- package/lib/translate.service.d.ts +0 -7
- package/lib/utils-i18n-extract-gettext-translate-from-html.test.d.ts +0 -1
- package/lib/utils-i18n-extract-gettext-translate-from-html.test.js +0 -324
- package/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +0 -1
- package/lib/utils-i18n-html.test.d.ts +0 -1
- package/lib/utils-i18n-html.test.js +0 -182
- package/lib/utils-i18n-html.test.js.map +0 -1
- package/lib/utils-po-file-extracto-to-json.test.d.ts +0 -1
- package/lib/utils-po-file-extracto-to-json.test.js +0 -147
- package/lib/utils-po-file-extracto-to-json.test.js.map +0 -1
- package/lib/utils-po-file.test.d.ts +0 -1
- package/lib/utils-po-file.test.js +0 -241
- package/lib/utils-po-file.test.js.map +0 -1
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.d.ts +0 -1
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js +0 -322
- package/lib-esm/lib/utils-i18n-extract-gettext-translate-from-html.test.js.map +0 -1
- package/lib-esm/lib/utils-i18n-html.test.d.ts +0 -1
- package/lib-esm/lib/utils-i18n-html.test.js +0 -180
- package/lib-esm/lib/utils-i18n-html.test.js.map +0 -1
- package/lib-esm/lib/utils-po-file-extracto-to-json.test.d.ts +0 -1
- package/lib-esm/lib/utils-po-file-extracto-to-json.test.js +0 -145
- package/lib-esm/lib/utils-po-file-extracto-to-json.test.js.map +0 -1
- package/lib-esm/lib/utils-po-file.test.d.ts +0 -1
- package/lib-esm/lib/utils-po-file.test.js +0 -239
- package/lib-esm/lib/utils-po-file.test.js.map +0 -1
- package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.d.ts +0 -1
- package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js +0 -322
- package/lib-prod/utils-i18n-extract-gettext-translate-from-html.test.js.map +0 -1
- package/lib-prod/utils-i18n-html.test.d.ts +0 -1
- package/lib-prod/utils-i18n-html.test.js +0 -180
- package/lib-prod/utils-i18n-html.test.js.map +0 -1
- package/lib-prod/utils-po-file-extracto-to-json.test.d.ts +0 -1
- package/lib-prod/utils-po-file-extracto-to-json.test.js +0 -145
- package/lib-prod/utils-po-file-extracto-to-json.test.js.map +0 -1
- package/lib-prod/utils-po-file.test.d.ts +0 -1
- package/lib-prod/utils-po-file.test.js +0 -239
- package/lib-prod/utils-po-file.test.js.map +0 -1
package/lib/translation.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { WritableSignal as WritableSignalType } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { UtilsI18n } from 'tnp-core';
|
|
3
|
+
import { UtilsI18n } from 'tnp-core/lib';
|
|
4
4
|
import { TranslationManager } from './translation-manager';
|
|
5
5
|
import { TaonTranslationsMapImport, TranslationParams } from './translation.models';
|
|
6
6
|
export declare class Translation {
|
|
@@ -9,10 +9,13 @@ export declare class Translation {
|
|
|
9
9
|
protected langImportMap: TaonTranslationsMapImport;
|
|
10
10
|
debug: boolean;
|
|
11
11
|
static manager: TranslationManager;
|
|
12
|
+
/**
|
|
13
|
+
* Example how to use it:
|
|
14
|
+
* const t = Translation.for('src/lib/translation.ts', {"src/lib/translation.ts":{"en-US":async () => (await import('./i18n/translation.ts.en-US.i18n.data')).default,"pl-PL":async () => (await import('./i18n/translation.ts.pl-PL.i18n.data')).default}} as any);
|
|
15
|
+
*/
|
|
12
16
|
static for(fileRelativePath: string, langImportMap: TaonTranslationsMapImport, opt?: {
|
|
13
17
|
debug?: boolean;
|
|
14
18
|
}): Translation;
|
|
15
|
-
cdr?: ChangeDetectorRef;
|
|
16
19
|
private lookup;
|
|
17
20
|
private readonly loadingSubjectSrc;
|
|
18
21
|
readonly isLoadingLang$: Observable<boolean>;
|
|
@@ -27,7 +30,7 @@ export declare class Translation {
|
|
|
27
30
|
gettext: (text: string, params?: TranslationParams, context?: string) => string;
|
|
28
31
|
private createSignal;
|
|
29
32
|
readonly signal: {
|
|
30
|
-
gettext: (text: string, params?: TranslationParams, context?: string) =>
|
|
33
|
+
gettext: (text: string, params?: TranslationParams, context?: string) => WritableSignalType<string>;
|
|
31
34
|
};
|
|
32
35
|
private createObservable;
|
|
33
36
|
readonly $: {
|
|
@@ -41,4 +44,4 @@ export declare class Translation {
|
|
|
41
44
|
private createLookup;
|
|
42
45
|
private key;
|
|
43
46
|
private interpolate;
|
|
44
|
-
}
|
|
47
|
+
}
|
package/lib/translation.js
CHANGED
|
@@ -13,6 +13,10 @@ class Translation {
|
|
|
13
13
|
debug;
|
|
14
14
|
static manager = translation_manager_1.TranslationManager.Instance;
|
|
15
15
|
//#region static for
|
|
16
|
+
/**
|
|
17
|
+
* Example how to use it:
|
|
18
|
+
* const t = Translation.for('src/lib/translation.ts', {"src/lib/translation.ts":{"en-US":async () => (await import('./i18n/translation.ts.en-US.i18n.data')).default,"pl-PL":async () => (await import('./i18n/translation.ts.pl-PL.i18n.data')).default}} as any);
|
|
19
|
+
*/
|
|
16
20
|
static for(fileRelativePath, langImportMap, opt) {
|
|
17
21
|
opt = opt || {};
|
|
18
22
|
return new Translation(fileRelativePath, Translation.manager.currentGlobalLanguage, langImportMap, !!opt.debug);
|
|
@@ -227,7 +231,7 @@ exports.Translation = Translation;
|
|
|
227
231
|
/*
|
|
228
232
|
// import {Translation} from 'taon'
|
|
229
233
|
|
|
230
|
-
const t = Translation.for(
|
|
234
|
+
const t = Translation.for('src/lib/translation.ts', {"src/lib/translation.ts":{"en-US":async () => (await import('./i18n/translation.ts.en-US.i18n.data')).default,"pl-PL":async () => (await import('./i18n/translation.ts.pl-PL.i18n.data')).default}} as any); // in runtime replaced with proper stuff
|
|
231
235
|
|
|
232
236
|
t.gettext('asdasd');
|
|
233
237
|
|
package/lib/translation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translation.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAUA,+BAAmD;AACnD,sCAA2D;AAE3D,+DAA2D;AAS3D,YAAY;AAEZ,2BAA2B;AAC3B,MAAa,WAAW;
|
|
1
|
+
{"version":3,"file":"translation.js","sourceRoot":"","sources":[""],"names":[],"mappings":";;;AAUA,+BAAmD;AACnD,sCAA2D;AAE3D,+DAA2D;AAS3D,YAAY;AAEZ,2BAA2B;AAC3B,MAAa,WAAW;IAiDV;IACA;IACA;IACH;IAnDT,MAAM,CAAC,OAAO,GAAG,wCAAkB,CAAC,QAAQ,CAAC;IAE7C,oBAAoB;IACpB;;;OAGG;IACH,MAAM,CAAC,GAAG,CACR,gBAAwB,EACxB,aAAwC,EACxC,GAEC;QAED,GAAG,GAAG,GAAG,IAAI,EAAE,CAAC;QAChB,OAAO,IAAI,WAAW,CACpB,gBAAgB,EAChB,WAAW,CAAC,OAAO,CAAC,qBAAqB,EACzC,aAAa,EACb,CAAC,CAAC,GAAG,CAAC,KAAK,CACZ,CAAC;IACJ,CAAC;IACD,YAAY;IAEZ,gBAAgB;IAElB,KAAK;IACL,KAAK;IACL,KAAK;IAGK,MAAM,GAAsB,EAAE,CAAC;I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,CAAC;gBAClC,IAAI,CAAC,GAAG,CAAC,WAAW;oBAAE,SAAS;gBAC/B,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;oBACpD,GAAG,CAAC,WAAW,CAAC;YACpB,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,YAAY;IAEZ,+BAA+B;IACvB,GAAG,CAAC,IAAY,EAAE,OAAO,GAAG,EAAE;QACpC,OAAO,GAAG,OAAO,SAAS,IAAI,EAAE,CAAC;IACnC,CAAC;IACD,YAAY;IAEZ,uCAAuC;IAC/B,WAAW,CAAC,IAAY,EAAE,MAAgC;QAChE,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAEzB,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,iCAAiC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YACxE,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC;YAC1B,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;;AArTH,kCAuTC;AACD,YAAY;AAEZ,iBAAiB;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA+BI;AACJ,YAAY"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UtilsI18n } from 'tnp-core';
|
|
1
|
+
import { UtilsI18n } from 'tnp-core/lib';
|
|
2
2
|
import type { Translation } from './translation';
|
|
3
3
|
export type TranslationLookup = Record<string, string>;
|
|
4
4
|
export type TranslationParams = Record<string, unknown> | null;
|
|
@@ -22,4 +22,4 @@ export interface TranslationBinding {
|
|
|
22
22
|
export interface Translatable {
|
|
23
23
|
t: Translation;
|
|
24
24
|
}
|
|
25
|
-
export {};
|
|
25
|
+
export {};
|
package/lib/utils-i18n-html.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UtilsI18n } from 'tnp-core';
|
|
1
|
+
import { UtilsI18n } from 'tnp-core/lib';
|
|
2
2
|
export declare namespace UtilsI18nHtml {
|
|
3
3
|
function extractGettextTranslateFromHtml(html: string, fileName?: string): UtilsI18n.GettextExtracted[];
|
|
4
4
|
function replaceTranslatePipieDirectiveTContext(html: string, options?: {
|
|
@@ -6,4 +6,4 @@ export declare namespace UtilsI18nHtml {
|
|
|
6
6
|
}): string;
|
|
7
7
|
function isAngularTsWithInlineHtml(content: string): boolean;
|
|
8
8
|
function replaceTranslatePipieDirectiveTContextInHtml(html: string): string;
|
|
9
|
-
}
|
|
9
|
+
}
|
package/lib/utils-po-file.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { UtilsI18n } from 'tnp-core';
|
|
1
|
+
import { UtilsI18n } from 'tnp-core/lib';
|
|
2
2
|
export declare namespace UtilsPoFile {
|
|
3
3
|
function generatePoFiles(files: UtilsI18n.GettextFile[], locales: UtilsI18n.CommonLocaleCode[], destinationAbsFolderPath: string): void;
|
|
4
4
|
function generatePoFileContent(files: UtilsI18n.GettextFile[], locale: UtilsI18n.CommonLocaleCode): string;
|
|
5
5
|
function extractPoToJson(poFileContent: string): UtilsI18n.GettextFile[];
|
|
6
6
|
function generateTranslationOverrideInterface(file: UtilsI18n.GettextFile, interfaceName: string, locale: UtilsI18n.CommonLocaleCode): string;
|
|
7
7
|
function mergeGettextFile(jsonContent1FromTsHtml: UtilsI18n.GettextFile, json2ContentFromPoFileModifedByUser?: UtilsI18n.GettextFile | null): UtilsI18n.GettextFile;
|
|
8
|
-
}
|
|
8
|
+
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export declare const MainPageActiveContext: {
|
|
2
|
-
readonly contextName: string;
|
|
3
|
-
readonly expressApp: import("express").Application;
|
|
4
|
-
readonly appId: string;
|
|
5
|
-
cloneAsRemote: (cloneOpt?: {
|
|
6
|
-
overrideRemoteHost?: string;
|
|
7
|
-
}) => any;
|
|
8
|
-
cloneAsNormal: (cloneOpt?: {
|
|
9
|
-
overrideHost?: string;
|
|
10
|
-
}) => any;
|
|
11
|
-
__ref(): Promise<import("taon/lib-esm").EndpointContext>;
|
|
12
|
-
readonly __refSync: import("taon/lib-esm").EndpointContext;
|
|
13
|
-
getClassInstance<T>(ctor: new (...args: any[]) => T): T;
|
|
14
|
-
getClass<T>(ctor: new (...args: any[]) => T): new (...args: any[]) => T;
|
|
15
|
-
initialize: (overrideOptions?: import("taon/lib-esm").Models.TaonInitializeParams) => Promise<import("taon/lib-esm").EndpointContext>;
|
|
16
|
-
readonly realtime: {
|
|
17
|
-
readonly client: import("taon/lib-esm").RealtimeClient;
|
|
18
|
-
readonly server: import("taon/lib-esm").RealtimeServer;
|
|
19
|
-
};
|
|
20
|
-
};
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
//
|
|
3
|
-
import { TaonBaseContext, createContext } from 'taon/lib-esm';
|
|
4
|
-
import { HOST_CONFIG } from '../../app.hosts';
|
|
5
|
-
// import { MIGRATIONS_CLASSES_FOR_MainPageActiveContext } from '@taon-dev/i18n/src';
|
|
6
|
-
//#endregion
|
|
7
|
-
export const MainPageActiveContext = createContext(() => ({
|
|
8
|
-
...HOST_CONFIG['MainPageActiveContext'],
|
|
9
|
-
contextName: 'MainPageActiveContext',
|
|
10
|
-
database: true,
|
|
11
|
-
// migrations: { ...MIGRATIONS_CLASSES_FOR_MainPageActiveContext },
|
|
12
|
-
contexts: { TaonBaseContext },
|
|
13
|
-
entities: {},
|
|
14
|
-
controllers: {},
|
|
15
|
-
repositories: {},
|
|
16
|
-
middlewares: {},
|
|
17
|
-
providers: {},
|
|
18
|
-
}));
|
|
1
|
+
/* skipping app files for release build */
|
|
19
2
|
//# sourceMappingURL=main-page.active.context.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main-page.active.context.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"main-page.active.context.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,0CAA0C"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-page.container.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,0CAA0C"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main-page.routes.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,0CAA0C"}
|
package/lib-esm/app.d.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function dummy1786370749011(): void;
|
package/lib-esm/app.electron.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
/* skipping app files for release build */
|
|
2
2
|
//# sourceMappingURL=app.electron.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.electron.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"app.electron.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,0CAA0C"}
|
package/lib-esm/app.hosts.d.ts
CHANGED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Your context backend port
|
|
3
|
-
*
|
|
4
|
-
*/
|
|
5
|
-
export declare const HOST_BACKEND_PORT_1: any;
|
|
6
|
-
/**
|
|
7
|
-
* Angular website url with normal/nodejs backend
|
|
8
|
-
*
|
|
9
|
-
*/
|
|
10
|
-
export declare const FRONTEND_NORMAL_APP_PORT_1: any;
|
|
11
|
-
/**
|
|
12
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
13
|
-
*/
|
|
14
|
-
export declare const CLIENT_DEV_NORMAL_APP_PORT_1: any;
|
|
15
|
-
/**
|
|
16
|
-
* Angular website url with websql backend
|
|
17
|
-
*
|
|
18
|
-
*/
|
|
19
|
-
export declare const FRONTEND_WEBSQL_APP_PORT_1: any;
|
|
20
|
-
/**
|
|
21
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
22
|
-
*/
|
|
23
|
-
export declare const CLIENT_DEV_WEBSQL_APP_PORT_1: any;
|
|
24
|
-
/**
|
|
25
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
26
|
-
*/
|
|
27
|
-
export declare const FRONTEND_NORMAL_ELECTRON_PORT_1 = 4212;
|
|
28
|
-
/**
|
|
29
|
-
* Backend url - use as "host" inside your context
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
export declare const HOST_URL_1: string;
|
|
33
|
-
/**
|
|
34
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
export declare const FRONTEND_HOST_URL_1: string;
|
|
38
|
-
/**
|
|
39
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
40
|
-
*/
|
|
41
|
-
export declare const FRONTEND_HOST_URL_ELECTRON_1: string;
|
|
42
|
-
/**
|
|
43
|
-
* Your context backend port
|
|
44
|
-
*
|
|
45
|
-
*/
|
|
46
|
-
export declare const HOST_BACKEND_PORT_2: any;
|
|
47
|
-
/**
|
|
48
|
-
* Angular website url with normal/nodejs backend
|
|
49
|
-
*
|
|
50
|
-
*/
|
|
51
|
-
export declare const FRONTEND_NORMAL_APP_PORT_2: any;
|
|
52
|
-
/**
|
|
53
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
54
|
-
*/
|
|
55
|
-
export declare const CLIENT_DEV_NORMAL_APP_PORT_2: any;
|
|
56
|
-
/**
|
|
57
|
-
* Angular website url with websql backend
|
|
58
|
-
*
|
|
59
|
-
*/
|
|
60
|
-
export declare const FRONTEND_WEBSQL_APP_PORT_2: any;
|
|
61
|
-
/**
|
|
62
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
63
|
-
*/
|
|
64
|
-
export declare const CLIENT_DEV_WEBSQL_APP_PORT_2: any;
|
|
65
|
-
/**
|
|
66
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
67
|
-
*/
|
|
68
|
-
export declare const FRONTEND_NORMAL_ELECTRON_PORT_2 = 4212;
|
|
69
|
-
/**
|
|
70
|
-
* Backend url - use as "host" inside your context
|
|
71
|
-
*
|
|
72
|
-
*/
|
|
73
|
-
export declare const HOST_URL_2: string;
|
|
74
|
-
/**
|
|
75
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
76
|
-
*
|
|
77
|
-
*/
|
|
78
|
-
export declare const FRONTEND_HOST_URL_2: string;
|
|
79
|
-
/**
|
|
80
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
81
|
-
*/
|
|
82
|
-
export declare const FRONTEND_HOST_URL_ELECTRON_2: string;
|
|
83
|
-
/**
|
|
84
|
-
* Your context backend port
|
|
85
|
-
* @deprecated use HOST_BACKEND_PORT_n instead
|
|
86
|
-
*/
|
|
87
|
-
export declare const HOST_BACKEND_PORT: any;
|
|
88
|
-
/**
|
|
89
|
-
* Angular website url with normal/nodejs backend
|
|
90
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT_n instead
|
|
91
|
-
*/
|
|
92
|
-
export declare const FRONTEND_NORMAL_APP_PORT: any;
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
95
|
-
*/
|
|
96
|
-
export declare const CLIENT_DEV_NORMAL_APP_PORT: any;
|
|
97
|
-
/**
|
|
98
|
-
* Angular website url with websql backend
|
|
99
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT_n instead
|
|
100
|
-
*/
|
|
101
|
-
export declare const FRONTEND_WEBSQL_APP_PORT: any;
|
|
102
|
-
/**
|
|
103
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
104
|
-
*/
|
|
105
|
-
export declare const CLIENT_DEV_WEBSQL_APP_PORT: any;
|
|
106
|
-
/**
|
|
107
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
108
|
-
*/
|
|
109
|
-
export declare const FRONTEND_NORMAL_ELECTRON_PORT = 4212;
|
|
110
|
-
/**
|
|
111
|
-
* Backend url - use as "host" inside your context
|
|
112
|
-
* @deprecated use HOST_URL_n instead
|
|
113
|
-
*/
|
|
114
|
-
export declare const HOST_URL: string;
|
|
115
|
-
/**
|
|
116
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
117
|
-
* @deprecated use FRONTEND_HOST_URL_n instead
|
|
118
|
-
*/
|
|
119
|
-
export declare const FRONTEND_HOST_URL: string;
|
|
120
|
-
/**
|
|
121
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
122
|
-
*/
|
|
123
|
-
export declare const FRONTEND_HOST_URL_ELECTRON: string;
|
|
124
|
-
export declare const HOST_CONFIG: {
|
|
125
|
-
/** Relative file path for context */
|
|
126
|
-
/** Name of context (var, let, const variable) inside *.ts file. */
|
|
127
|
-
I18NContext: {
|
|
128
|
-
activeContext: string;
|
|
129
|
-
contextName: string;
|
|
130
|
-
hostPortNumber: number;
|
|
131
|
-
host: string;
|
|
132
|
-
frontendHostPortNumber: number;
|
|
133
|
-
frontendHost: string;
|
|
134
|
-
appId: string;
|
|
135
|
-
};
|
|
136
|
-
/** Relative file path for context */
|
|
137
|
-
/** Name of context (var, let, const variable) inside *.ts file. */
|
|
138
|
-
MainPageActiveContext: {
|
|
139
|
-
activeContext: string;
|
|
140
|
-
contextName: string;
|
|
141
|
-
hostPortNumber: number;
|
|
142
|
-
host: string;
|
|
143
|
-
frontendHostPortNumber: number;
|
|
144
|
-
frontendHost: string;
|
|
145
|
-
appId: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
package/lib-esm/app.hosts.js
CHANGED
|
@@ -1,217 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { APP_ID, BUILD_BASE_HREF } from './lib/build-info._auto-generated_';
|
|
3
|
-
let isWebSQLMode = false;
|
|
4
|
-
//#region @backend
|
|
5
|
-
isWebSQLMode = false;
|
|
6
|
-
//#endregion
|
|
7
|
-
/* */
|
|
8
|
-
/* */
|
|
9
|
-
const nodeENV = (() => {
|
|
10
|
-
let env;
|
|
11
|
-
//#region @backend
|
|
12
|
-
env = process.env || {};
|
|
13
|
-
//#endregion
|
|
14
|
-
return env || {};
|
|
15
|
-
})();
|
|
16
|
-
const windowENV = (() => {
|
|
17
|
-
let env;
|
|
18
|
-
/* */
|
|
19
|
-
/* */
|
|
20
|
-
return env || {};
|
|
21
|
-
})();
|
|
22
|
-
const argsENV = (() => {
|
|
23
|
-
let env;
|
|
24
|
-
//#region @backend
|
|
25
|
-
env = require('minimist')(process.argv);
|
|
26
|
-
//#endregion
|
|
27
|
-
return env || {};
|
|
28
|
-
})();
|
|
29
|
-
const transformURL = (url) => {
|
|
30
|
-
if (!url) {
|
|
31
|
-
return url;
|
|
32
|
-
}
|
|
33
|
-
//#region @backend
|
|
34
|
-
if (url.startsWith('http://') || url.startsWith('https://')) {
|
|
35
|
-
return url;
|
|
36
|
-
}
|
|
37
|
-
return 'http://' + url; // by default backend is http
|
|
38
|
-
//#endregion
|
|
39
|
-
/* */
|
|
40
|
-
/* */
|
|
41
|
-
/* */
|
|
42
|
-
/* */
|
|
43
|
-
/* */
|
|
44
|
-
};
|
|
45
|
-
const ACTIVE_CONTEXT = nodeENV['ACTIVE_CONTEXT'] || argsENV['ACTIVE_CONTEXT'] || windowENV['ACTIVE_CONTEXT'] || null;
|
|
46
|
-
/**
|
|
47
|
-
* Your context backend port
|
|
48
|
-
*
|
|
49
|
-
*/
|
|
50
|
-
export const HOST_BACKEND_PORT_1 = (nodeENV['HOST_BACKEND_PORT_1']) || (windowENV['HOST_BACKEND_PORT_1']) || (argsENV['HOST_BACKEND_PORT_1']) || 4103;
|
|
51
|
-
/**
|
|
52
|
-
* Angular website url with normal/nodejs backend
|
|
53
|
-
*
|
|
54
|
-
*/
|
|
55
|
-
export const FRONTEND_NORMAL_APP_PORT_1 = (nodeENV['FRONTEND_NORMAL_APP_PORT_1']) || (windowENV['FRONTEND_NORMAL_APP_PORT_1']) || (argsENV['FRONTEND_NORMAL_APP_PORT_1']) || 4210;
|
|
56
|
-
/**
|
|
57
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
58
|
-
*/
|
|
59
|
-
export const CLIENT_DEV_NORMAL_APP_PORT_1 = FRONTEND_NORMAL_APP_PORT_1;
|
|
60
|
-
/**
|
|
61
|
-
* Angular website url with websql backend
|
|
62
|
-
*
|
|
63
|
-
*/
|
|
64
|
-
export const FRONTEND_WEBSQL_APP_PORT_1 = (nodeENV['FRONTEND_WEBSQL_APP_PORT_1']) || (windowENV['FRONTEND_WEBSQL_APP_PORT_1']) || (argsENV['FRONTEND_WEBSQL_APP_PORT_1']) || 4209;
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
67
|
-
*/
|
|
68
|
-
export const CLIENT_DEV_WEBSQL_APP_PORT_1 = FRONTEND_WEBSQL_APP_PORT_1;
|
|
69
|
-
/**
|
|
70
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
71
|
-
*/
|
|
72
|
-
export const FRONTEND_NORMAL_ELECTRON_PORT_1 = 4212;
|
|
73
|
-
// electron websql not supported yet
|
|
74
|
-
// export const FRONTEND_WEBSQL_ELECTRON_PORT_1 = undefined;
|
|
75
|
-
/**
|
|
76
|
-
* Backend url - use as "host" inside your context
|
|
77
|
-
*
|
|
78
|
-
*/
|
|
79
|
-
export const HOST_URL_1 = transformURL(nodeENV['HOST_URL_1']) || transformURL(windowENV['HOST_URL_1']) || transformURL(argsENV['HOST_URL_1']) || ('http://localhost:' + HOST_BACKEND_PORT_1);
|
|
80
|
-
/**
|
|
81
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
82
|
-
*
|
|
83
|
-
*/
|
|
84
|
-
export const FRONTEND_HOST_URL_1 = transformURL(nodeENV['FRONTEND_HOST_URL_1']) || transformURL(windowENV['FRONTEND_HOST_URL_1']) || transformURL(argsENV['FRONTEND_HOST_URL_1']) || ('http://localhost:' +
|
|
85
|
-
(isWebSQLMode ? FRONTEND_WEBSQL_APP_PORT_1 : FRONTEND_NORMAL_APP_PORT_1));
|
|
86
|
-
/**
|
|
87
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
88
|
-
*/
|
|
89
|
-
export const FRONTEND_HOST_URL_ELECTRON_1 = 'http://localhost:' + FRONTEND_NORMAL_ELECTRON_PORT_1;
|
|
90
|
-
// electron websql not supported yet
|
|
91
|
-
// export const FRONTEND_HOST_URL_ELECTRON_1 =
|
|
92
|
-
// 'http://localhost:' +
|
|
93
|
-
// (isWebSQLMode ? FRONTEND_WEBSQL_ELECTRON_PORT_1 : FRONTEND_NORMAL_ELECTRON_PORT_1);
|
|
94
|
-
/**
|
|
95
|
-
* Your context backend port
|
|
96
|
-
*
|
|
97
|
-
*/
|
|
98
|
-
export const HOST_BACKEND_PORT_2 = (nodeENV['HOST_BACKEND_PORT_2']) || (windowENV['HOST_BACKEND_PORT_2']) || (argsENV['HOST_BACKEND_PORT_2']) || 4104;
|
|
99
|
-
/**
|
|
100
|
-
* Angular website url with normal/nodejs backend
|
|
101
|
-
*
|
|
102
|
-
*/
|
|
103
|
-
export const FRONTEND_NORMAL_APP_PORT_2 = (nodeENV['FRONTEND_NORMAL_APP_PORT_2']) || (windowENV['FRONTEND_NORMAL_APP_PORT_2']) || (argsENV['FRONTEND_NORMAL_APP_PORT_2']) || 4210;
|
|
104
|
-
/**
|
|
105
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
106
|
-
*/
|
|
107
|
-
export const CLIENT_DEV_NORMAL_APP_PORT_2 = FRONTEND_NORMAL_APP_PORT_2;
|
|
108
|
-
/**
|
|
109
|
-
* Angular website url with websql backend
|
|
110
|
-
*
|
|
111
|
-
*/
|
|
112
|
-
export const FRONTEND_WEBSQL_APP_PORT_2 = (nodeENV['FRONTEND_WEBSQL_APP_PORT_2']) || (windowENV['FRONTEND_WEBSQL_APP_PORT_2']) || (argsENV['FRONTEND_WEBSQL_APP_PORT_2']) || 4209;
|
|
113
|
-
/**
|
|
114
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
115
|
-
*/
|
|
116
|
-
export const CLIENT_DEV_WEBSQL_APP_PORT_2 = FRONTEND_WEBSQL_APP_PORT_2;
|
|
117
|
-
/**
|
|
118
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
119
|
-
*/
|
|
120
|
-
export const FRONTEND_NORMAL_ELECTRON_PORT_2 = 4212;
|
|
121
|
-
// electron websql not supported yet
|
|
122
|
-
// export const FRONTEND_WEBSQL_ELECTRON_PORT_2 = undefined;
|
|
123
|
-
/**
|
|
124
|
-
* Backend url - use as "host" inside your context
|
|
125
|
-
*
|
|
126
|
-
*/
|
|
127
|
-
export const HOST_URL_2 = transformURL(nodeENV['HOST_URL_2']) || transformURL(windowENV['HOST_URL_2']) || transformURL(argsENV['HOST_URL_2']) || ('http://localhost:' + HOST_BACKEND_PORT_2);
|
|
128
|
-
/**
|
|
129
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
130
|
-
*
|
|
131
|
-
*/
|
|
132
|
-
export const FRONTEND_HOST_URL_2 = (!ACTIVE_CONTEXT ? FRONTEND_HOST_URL_1 : undefined) || transformURL(nodeENV['FRONTEND_HOST_URL_2']) || transformURL(windowENV['FRONTEND_HOST_URL_2']) || transformURL(argsENV['FRONTEND_HOST_URL_2']) || ('http://localhost:' +
|
|
133
|
-
(isWebSQLMode ? FRONTEND_WEBSQL_APP_PORT_2 : FRONTEND_NORMAL_APP_PORT_2));
|
|
134
|
-
/**
|
|
135
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
136
|
-
*/
|
|
137
|
-
export const FRONTEND_HOST_URL_ELECTRON_2 = 'http://localhost:' + FRONTEND_NORMAL_ELECTRON_PORT_2;
|
|
138
|
-
// electron websql not supported yet
|
|
139
|
-
// export const FRONTEND_HOST_URL_ELECTRON_2 =
|
|
140
|
-
// 'http://localhost:' +
|
|
141
|
-
// (isWebSQLMode ? FRONTEND_WEBSQL_ELECTRON_PORT_2 : FRONTEND_NORMAL_ELECTRON_PORT_2);
|
|
142
|
-
/**
|
|
143
|
-
* Your context backend port
|
|
144
|
-
* @deprecated use HOST_BACKEND_PORT_n instead
|
|
145
|
-
*/
|
|
146
|
-
export const HOST_BACKEND_PORT = (nodeENV['HOST_BACKEND_PORT']) || (windowENV['HOST_BACKEND_PORT']) || (argsENV['HOST_BACKEND_PORT']) || HOST_BACKEND_PORT_1;
|
|
147
|
-
/**
|
|
148
|
-
* Angular website url with normal/nodejs backend
|
|
149
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT_n instead
|
|
150
|
-
*/
|
|
151
|
-
export const FRONTEND_NORMAL_APP_PORT = (nodeENV['FRONTEND_NORMAL_APP_PORT']) || (windowENV['FRONTEND_NORMAL_APP_PORT']) || (argsENV['FRONTEND_NORMAL_APP_PORT']) || FRONTEND_NORMAL_APP_PORT_1;
|
|
152
|
-
/**
|
|
153
|
-
* @deprecated use FRONTEND_NORMAL_APP_PORT instead
|
|
154
|
-
*/
|
|
155
|
-
export const CLIENT_DEV_NORMAL_APP_PORT = FRONTEND_NORMAL_APP_PORT;
|
|
156
|
-
/**
|
|
157
|
-
* Angular website url with websql backend
|
|
158
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT_n instead
|
|
159
|
-
*/
|
|
160
|
-
export const FRONTEND_WEBSQL_APP_PORT = (nodeENV['FRONTEND_WEBSQL_APP_PORT']) || (windowENV['FRONTEND_WEBSQL_APP_PORT']) || (argsENV['FRONTEND_WEBSQL_APP_PORT']) || FRONTEND_WEBSQL_APP_PORT_1;
|
|
161
|
-
/**
|
|
162
|
-
* @deprecated use FRONTEND_WEBSQL_APP_PORT instead
|
|
163
|
-
*/
|
|
164
|
-
export const CLIENT_DEV_WEBSQL_APP_PORT = FRONTEND_WEBSQL_APP_PORT;
|
|
165
|
-
/**
|
|
166
|
-
* Electron/angular website url for electron app purpose (ipc backend)
|
|
167
|
-
*/
|
|
168
|
-
export const FRONTEND_NORMAL_ELECTRON_PORT = FRONTEND_NORMAL_ELECTRON_PORT_1;
|
|
169
|
-
// electron websql not supported yet
|
|
170
|
-
// export const FRONTEND_WEBSQL_ELECTRON_PORT = FRONTEND_WEBSQL_ELECTRON_PORT_1;
|
|
171
|
-
/**
|
|
172
|
-
* Backend url - use as "host" inside your context
|
|
173
|
-
* @deprecated use HOST_URL_n instead
|
|
174
|
-
*/
|
|
175
|
-
export const HOST_URL = transformURL(nodeENV['HOST_URL']) || transformURL(windowENV['HOST_URL']) || transformURL(argsENV['HOST_URL']) || ('http://localhost:' + HOST_BACKEND_PORT);
|
|
176
|
-
/**
|
|
177
|
-
* Frontend host url - use as "frontendHost" inside your context
|
|
178
|
-
* @deprecated use FRONTEND_HOST_URL_n instead
|
|
179
|
-
*/
|
|
180
|
-
export const FRONTEND_HOST_URL = transformURL(nodeENV['FRONTEND_HOST_URL']) || transformURL(windowENV['FRONTEND_HOST_URL']) || transformURL(argsENV['FRONTEND_HOST_URL']) || ('http://localhost:' +
|
|
181
|
-
(isWebSQLMode ? FRONTEND_WEBSQL_APP_PORT : FRONTEND_NORMAL_APP_PORT));
|
|
182
|
-
/**
|
|
183
|
-
* Frontend electron host url - use in app.electron.ts with win.loadURL(FRONTEND_HOST_URL_ELECTRON);
|
|
184
|
-
*/
|
|
185
|
-
export const FRONTEND_HOST_URL_ELECTRON = 'http://localhost:' + FRONTEND_NORMAL_ELECTRON_PORT;
|
|
186
|
-
// electron websql not supported yet
|
|
187
|
-
// export const FRONTEND_HOST_URL_ELECTRON =
|
|
188
|
-
// 'http://localhost:' +
|
|
189
|
-
// (isWebSQLMode ? FRONTEND_WEBSQL_ELECTRON_PORT : FRONTEND_NORMAL_ELECTRON_PORT);
|
|
190
|
-
export const HOST_CONFIG = {
|
|
191
|
-
/** Relative file path for context */
|
|
192
|
-
//'app.ts'
|
|
193
|
-
/** Name of context (var, let, const variable) inside *.ts file. */
|
|
194
|
-
'I18NContext': {
|
|
195
|
-
activeContext: ACTIVE_CONTEXT,
|
|
196
|
-
contextName: 'I18NContext',
|
|
197
|
-
hostPortNumber: Number(HOST_BACKEND_PORT_1),
|
|
198
|
-
host: HOST_URL_1 + BUILD_BASE_HREF,
|
|
199
|
-
frontendHostPortNumber: Number(FRONTEND_NORMAL_APP_PORT_1),
|
|
200
|
-
frontendHost: FRONTEND_HOST_URL_1 + BUILD_BASE_HREF,
|
|
201
|
-
appId: APP_ID,
|
|
202
|
-
},
|
|
203
|
-
/** Relative file path for context */
|
|
204
|
-
//'app/main-page/main-page.active.context.ts'
|
|
205
|
-
/** Name of context (var, let, const variable) inside *.ts file. */
|
|
206
|
-
'MainPageActiveContext': {
|
|
207
|
-
activeContext: ACTIVE_CONTEXT,
|
|
208
|
-
contextName: 'MainPageActiveContext',
|
|
209
|
-
hostPortNumber: Number(HOST_BACKEND_PORT_2),
|
|
210
|
-
host: HOST_URL_2 + BUILD_BASE_HREF,
|
|
211
|
-
frontendHostPortNumber: Number(FRONTEND_NORMAL_APP_PORT_2),
|
|
212
|
-
frontendHost: FRONTEND_HOST_URL_2 + BUILD_BASE_HREF,
|
|
213
|
-
appId: APP_ID,
|
|
214
|
-
}
|
|
215
|
-
};
|
|
216
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
1
|
+
/* skipping app files for release build */
|
|
217
2
|
//# sourceMappingURL=app.hosts.js.map
|
package/lib-esm/app.hosts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.hosts.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"app.hosts.js","sourceRoot":"","sources":[""],"names":[],"mappings":"AAAA,0CAA0C"}
|