@iebh/tera-fy 2.3.10 → 2.3.12

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 (82) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/api.md +8 -11
  3. package/dist/plugin.vue2.es2019.js +28 -27
  4. package/dist/terafy.bootstrapper.es2019.js +2 -2
  5. package/dist/terafy.bootstrapper.js +2 -2
  6. package/dist/terafy.es2019.js +5 -5
  7. package/dist/terafy.js +5 -5
  8. package/eslint.config.js +4 -66
  9. package/lib/{projectFile.ts → projectFile.js} +52 -76
  10. package/lib/syncro/{entities.ts → entities.js} +14 -83
  11. package/lib/syncro/{keyed.ts → keyed.js} +46 -68
  12. package/lib/syncro/{syncro.ts → syncro.js} +104 -136
  13. package/lib/{terafy.bootstrapper.ts → terafy.bootstrapper.js} +20 -30
  14. package/lib/{terafy.client.ts → terafy.client.js} +85 -84
  15. package/lib/{terafy.proxy.ts → terafy.proxy.js} +12 -26
  16. package/lib/{terafy.server.ts → terafy.server.js} +204 -229
  17. package/package.json +20 -39
  18. package/plugins/{base.ts → base.js} +3 -5
  19. package/plugins/{firebase.ts → firebase.js} +22 -21
  20. package/plugins/{vite.ts → vite.js} +3 -3
  21. package/plugins/{vue2.ts → vue2.js} +8 -10
  22. package/plugins/{vue3.ts → vue3.js} +7 -10
  23. package/utils/mixin.js +15 -0
  24. package/utils/{pathTools.ts → pathTools.js} +8 -9
  25. package/widgets/tera-file-select.vue +1 -1
  26. package/dist/lib/projectFile.d.ts +0 -190
  27. package/dist/lib/projectFile.js +0 -305
  28. package/dist/lib/projectFile.js.map +0 -1
  29. package/dist/lib/syncro/entities.d.ts +0 -34
  30. package/dist/lib/syncro/entities.js +0 -212
  31. package/dist/lib/syncro/entities.js.map +0 -1
  32. package/dist/lib/syncro/keyed (Rhino's conflicted copy 2026-05-10).js +0 -287
  33. package/dist/lib/syncro/keyed.d.ts +0 -95
  34. package/dist/lib/syncro/keyed.js +0 -288
  35. package/dist/lib/syncro/keyed.js (Rhino's conflicted copy 2026-05-10).map +0 -1
  36. package/dist/lib/syncro/keyed.js.map +0 -1
  37. package/dist/lib/syncro/syncro (Rhino's conflicted copy 2026-05-10).js +0 -765
  38. package/dist/lib/syncro/syncro.d (Rhino's conflicted copy 2026-05-10).ts +0 -336
  39. package/dist/lib/syncro/syncro.d.ts +0 -343
  40. package/dist/lib/syncro/syncro.js +0 -771
  41. package/dist/lib/syncro/syncro.js (Rhino's conflicted copy 2026-05-10).map +0 -1
  42. package/dist/lib/syncro/syncro.js.map +0 -1
  43. package/dist/lib/terafy.bootstrapper.d.ts +0 -42
  44. package/dist/lib/terafy.bootstrapper.js +0 -129
  45. package/dist/lib/terafy.bootstrapper.js.map +0 -1
  46. package/dist/lib/terafy.client.d.ts +0 -555
  47. package/dist/lib/terafy.client.js +0 -1153
  48. package/dist/lib/terafy.client.js.map +0 -1
  49. package/dist/lib/terafy.proxy.d.ts +0 -66
  50. package/dist/lib/terafy.proxy.js +0 -130
  51. package/dist/lib/terafy.proxy.js.map +0 -1
  52. package/dist/lib/terafy.server.d.ts +0 -697
  53. package/dist/lib/terafy.server.js +0 -2062
  54. package/dist/lib/terafy.server.js.map +0 -1
  55. package/dist/plugin.vue2.es2019 (Rhino's conflicted copy 2026-05-10).js +0 -1271
  56. package/dist/plugins/base.d.ts +0 -20
  57. package/dist/plugins/base.js +0 -22
  58. package/dist/plugins/base.js.map +0 -1
  59. package/dist/plugins/firebase.d.ts +0 -62
  60. package/dist/plugins/firebase.js +0 -123
  61. package/dist/plugins/firebase.js.map +0 -1
  62. package/dist/plugins/vite.d.ts +0 -12
  63. package/dist/plugins/vite.js +0 -22
  64. package/dist/plugins/vite.js.map +0 -1
  65. package/dist/plugins/vue2.d.ts +0 -67
  66. package/dist/plugins/vue2.js +0 -104
  67. package/dist/plugins/vue2.js.map +0 -1
  68. package/dist/plugins/vue3.d.ts +0 -63
  69. package/dist/plugins/vue3.js +0 -93
  70. package/dist/plugins/vue3.js.map +0 -1
  71. package/dist/utils/mixin.d.ts +0 -11
  72. package/dist/utils/mixin.js +0 -15
  73. package/dist/utils/mixin.js.map +0 -1
  74. package/dist/utils/pDefer.d.ts +0 -16
  75. package/dist/utils/pDefer.js +0 -19
  76. package/dist/utils/pDefer.js.map +0 -1
  77. package/dist/utils/pathTools.d.ts +0 -70
  78. package/dist/utils/pathTools.js +0 -120
  79. package/dist/utils/pathTools.js.map +0 -1
  80. package/tsconfig.json +0 -30
  81. package/utils/mixin.ts +0 -18
  82. package/utils/pDefer.ts +0 -27
@@ -2,20 +2,6 @@ import {create as createDomain} from 'node:domain';
2
2
  import detectPort from 'detect-port';
3
3
  import Proxy from 'http-proxy';
4
4
 
5
- // Define options interface based on JSDoc and settings
6
- interface TeraProxyOptions {
7
- force?: boolean;
8
- autoStart?: boolean;
9
- host?: string;
10
- port?: number;
11
- targetProtocol?: string;
12
- targetHost?: string;
13
- targetPort?: number;
14
- portConflict?: 'ignore' | 'throw';
15
- // eslint-disable-next-line no-unused-vars
16
- onLog?: (level: 'INFO' | 'WARN', ...msg: any[]) => void;
17
- }
18
-
19
5
  export class TeraProxy {
20
6
  /**
21
7
  * Setup a local loopback proxy for TERA-tools.com
@@ -41,8 +27,8 @@ export class TeraProxy {
41
27
  targetProtocol: 'https',
42
28
  targetHost: 'dev.tera-tools.com',
43
29
  targetPort: 443,
44
- portConflict: 'ignore' as 'ignore' | 'throw', // Add type assertion for stricter checking if needed elsewhere
45
- onLog: (level: 'INFO' | 'WARN', ...msg: any[]) => console.log(...msg),
30
+ portConflict: 'ignore',
31
+ onLog: (level, ...msg) => console.log(...msg),
46
32
  }
47
33
 
48
34
 
@@ -50,7 +36,7 @@ export class TeraProxy {
50
36
  * Eventual proxy server when the plugin has booted
51
37
  * @type {ProxyServer}
52
38
  */
53
- proxyServer: Proxy | undefined;
39
+ proxyServer;
54
40
 
55
41
 
56
42
  /**
@@ -77,10 +63,10 @@ export class TeraProxy {
77
63
  port: this.settings.targetPort,
78
64
  },
79
65
  }))
80
- .then(()=> new Promise<void>((resolve, reject) => {
66
+ .then(()=> new Promise((resolve, reject) => {
81
67
  // Wrap listener in a domain so we can correctly catch EADDRINUSE
82
68
  const domain = createDomain();
83
- domain.on('error', (err: Error & { code?: string }) => { // Add type to err
69
+ domain.on('error', err => {
84
70
  if (err.code == 'EADDRINUSE') {
85
71
  reject('PORT-CONFLICT');
86
72
  } else {
@@ -89,10 +75,10 @@ export class TeraProxy {
89
75
  });
90
76
  // Run the server creation and listening within the domain
91
77
  domain.run(() => {
92
- if (!this.proxyServer) return reject(new Error('Proxy server not initialized')); // Guard against undefined proxyServer
78
+ if (!this.proxyServer) return reject(new Error('Proxy server not initialized'));
93
79
  this.proxyServer.listen(this.settings.port, this.settings.host)
94
80
  // Handle errors on the proxy server itself, although domain should catch listen errors
95
- this.proxyServer.on('error', (err: Error & { code?: string }) => {
81
+ this.proxyServer.on('error', err => {
96
82
  if (err.code == 'EADDRINUSE') {
97
83
  reject('PORT-CONFLICT');
98
84
  } else {
@@ -122,15 +108,15 @@ export class TeraProxy {
122
108
  */
123
109
  stop() {
124
110
  return Promise.resolve()
125
- .then(()=> this.proxyServer && new Promise<void>(resolve => this.proxyServer!.close(()=> resolve()))) // Use non-null assertion if sure it exists here
111
+ .then(()=> this.proxyServer && new Promise(resolve => this.proxyServer.close(()=> resolve())))
126
112
  }
127
113
 
128
114
 
129
- constructor(options?: TeraProxyOptions) { // Add type annotation and make optional
115
+ constructor(options) {
130
116
  if (options) Object.assign(this.settings, options);
131
117
 
132
118
  // Auto start?
133
- if (this.settings.autoStart) this.start().catch(err => { // Use resolved settings.autoStart
119
+ if (this.settings.autoStart) this.start().catch(err => {
134
120
  this.settings.onLog('WARN', 'Proxy auto-start failed:', err);
135
121
  });
136
122
  }
@@ -143,6 +129,6 @@ export class TeraProxy {
143
129
  * @param {Object} [options] Options to pass to the Proxy module
144
130
  * @returns {TeraProxy} A TeraProxy instance
145
131
  */
146
- export default function(options?: TeraProxyOptions) { // Add type annotation and make optional
132
+ export default function(options) {
147
133
  return new TeraProxy(options);
148
- }
134
+ }