taon 19.0.47 → 19.0.49

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.
Files changed (52) hide show
  1. package/README.md +160 -160
  2. package/bin/start.js +279 -279
  3. package/bin/taon +6 -6
  4. package/bin/taon-debug +5 -5
  5. package/bin/taon-debug-brk +5 -5
  6. package/browser/README.md +24 -24
  7. package/browser/fesm2022/taon.mjs +259 -192
  8. package/browser/fesm2022/taon.mjs.map +1 -1
  9. package/browser/lib/constants.d.ts +2 -1
  10. package/browser/lib/endpoint-context.d.ts +22 -1
  11. package/browser/lib/helpers/class-helpers.d.ts +0 -1
  12. package/browser/lib/realtime/realtime-core.d.ts +2 -2
  13. package/browser/lib/realtime/realtime-server.d.ts +2 -2
  14. package/browser/package.json +1 -1
  15. package/lib/build-info._auto-generated_.d.ts +2 -1
  16. package/lib/build-info._auto-generated_.js +3 -2
  17. package/lib/build-info._auto-generated_.js.map +1 -1
  18. package/lib/constants.d.ts +1 -0
  19. package/lib/constants.js +2 -1
  20. package/lib/constants.js.map +1 -1
  21. package/lib/endpoint-context.d.ts +22 -1
  22. package/lib/endpoint-context.js +108 -49
  23. package/lib/endpoint-context.js.map +1 -1
  24. package/lib/env.d.ts +2 -0
  25. package/lib/env.js +7 -0
  26. package/lib/env.js.map +1 -0
  27. package/lib/helpers/class-helpers.d.ts +0 -1
  28. package/lib/helpers/class-helpers.js +13 -14
  29. package/lib/helpers/class-helpers.js.map +1 -1
  30. package/lib/realtime/realtime-core.d.ts +2 -2
  31. package/lib/realtime/realtime-core.js +6 -5
  32. package/lib/realtime/realtime-core.js.map +1 -1
  33. package/lib/realtime/realtime-server.d.ts +2 -2
  34. package/lib/realtime/realtime-server.js +22 -22
  35. package/lib/realtime/realtime-server.js.map +1 -1
  36. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js +2 -2
  37. package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
  38. package/lib/storage.d.ts +1 -0
  39. package/lib/storage.js +6 -0
  40. package/lib/storage.js.map +1 -0
  41. package/lib/ui/index.js +2 -2
  42. package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
  43. package/package.json +1 -1
  44. package/websql/README.md +24 -24
  45. package/websql/fesm2022/taon.mjs +286 -223
  46. package/websql/fesm2022/taon.mjs.map +1 -1
  47. package/websql/lib/constants.d.ts +2 -1
  48. package/websql/lib/endpoint-context.d.ts +22 -1
  49. package/websql/lib/helpers/class-helpers.d.ts +0 -1
  50. package/websql/lib/realtime/realtime-core.d.ts +2 -2
  51. package/websql/lib/realtime/realtime-server.d.ts +2 -2
  52. package/websql/package.json +1 -1
@@ -5,4 +5,5 @@ import { InjectionToken } from '@angular/core';
5
5
  import type { TaonContext } from './create-context';
6
6
  declare let TAON_CONTEXT: InjectionToken<TaonContext>;
7
7
  declare let CURRENT_HOST_BACKEND_PORT: InjectionToken<number>;
8
- export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT };
8
+ export { TAON_CONTEXT, CURRENT_HOST_BACKEND_PORT };
9
+ export declare const apiPrefix = "api";
@@ -32,7 +32,7 @@ export declare class EndpointContext {
32
32
  private readonly classInstancesByNameObj;
33
33
  private readonly objWithClassesInstancesArr;
34
34
  readonly activeRoutes: {
35
- routePath: string;
35
+ expressPath: string;
36
36
  method: Models.Http.Rest.HttpMethod;
37
37
  }[];
38
38
  repos: Map<string, Repository<any>>;
@@ -105,6 +105,27 @@ export declare class EndpointContext {
105
105
  initClasses(): Promise<void>;
106
106
  isActiveOn(classInstance: object): boolean;
107
107
  get uri(): URL;
108
+ get uriPort(): string | undefined;
109
+ get uriProtocol(): string | undefined;
110
+ /**
111
+ * Examples
112
+ * http://localhost:3000
113
+ * https://localhost (from localhost:80) *
114
+ */
115
+ get uriOrigin(): string | undefined;
116
+ /**
117
+ * Exampels
118
+ * http://localhost:3000/path/to/somewhere
119
+ * https://localhost/path/to/somewhere (from localhost:80)
120
+ */
121
+ get uriPathname(): string | undefined;
122
+ /**
123
+ * Examples
124
+ * http://localhost:3000/path/to/somewhere -> '/path/to/somewhere'
125
+ * http://localhost:3000 -> '' #
126
+ * https://localhost/path/to/ -> '/path/to/somewhere' # remove last slash
127
+ */
128
+ get uriPathnameOrNothingIfRoot(): string;
108
129
  /**
109
130
  * Port from uri as number
110
131
  * @returns {Number | undefined}
@@ -15,5 +15,4 @@ export declare namespace ClassHelpers {
15
15
  const getControllerConfig: (target: Function) => Models.ControllerConfig | undefined;
16
16
  const getMethodsNames: (classOrClassInstance: any, allMethodsNames?: any[]) => string[];
17
17
  const getControllerConfigs: (target: Function, configs?: Models.ControllerConfig[], callerTarget?: Function) => Models.RuntimeControllerConfig[];
18
- const getCalculatedPathFor: (target: Function) => string;
19
18
  }
@@ -1,11 +1,11 @@
1
1
  // @ts-nocheck
2
+ import { Server } from 'socket.io';
3
+ import { DefaultEventsMap } from 'socket.io/dist/typed-events';
2
4
  import { Socket as SocketClient } from 'socket.io-client';
3
5
  import type { EndpointContext } from '../endpoint-context';
4
6
  import { RealtimeClient } from './realtime-client';
5
7
  import { RealtimeServer } from './realtime-server';
6
8
  import type { RealtimeStrategy } from './realtime-strategy';
7
- import { DefaultEventsMap } from 'socket.io/dist/typed-events';
8
- import { Server } from 'socket.io';
9
9
  /**
10
10
  * Realtime class
11
11
  * - mock (when browser-browser)
@@ -1,7 +1,7 @@
1
1
  // @ts-nocheck
2
- import { RealtimeCore } from './realtime-core';
3
- import type { BaseEntity } from '../base-classes/base-entity';
4
2
  import { Observable } from 'rxjs';
3
+ import type { BaseEntity } from '../base-classes/base-entity';
4
+ import { RealtimeCore } from './realtime-core';
5
5
  export declare class RealtimeServer {
6
6
  private core;
7
7
  constructor(core: RealtimeCore);
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "taon/websql",
3
- "version": "19.0.47",
3
+ "version": "19.0.49",
4
4
  "module": "fesm2022/taon.mjs",
5
5
  "typings": "index.d.ts",
6
6
  "exports": {