vatts 2.2.6 → 2.3.0-canary.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.
Files changed (70) hide show
  1. package/LICENSE +12 -12
  2. package/README.md +65 -65
  3. package/dist/builder.js +79 -42
  4. package/dist/frameworks/FrontCore.d.ts +34 -0
  5. package/dist/frameworks/FrontCore.js +128 -0
  6. package/dist/{vue → frameworks/builds}/vue.build.js +1 -1
  7. package/dist/frameworks/react/client.d.ts +8 -0
  8. package/dist/{react → frameworks/react}/client.js +14 -14
  9. package/dist/{react → frameworks/react/components}/Link.js +2 -2
  10. package/dist/frameworks/react/entry.client.d.ts +14 -0
  11. package/dist/frameworks/react/entry.client.js +211 -0
  12. package/dist/frameworks/react/react-elements.d.ts +10 -0
  13. package/dist/{react → frameworks/renderers}/renderer-react.d.ts +2 -2
  14. package/dist/{react → frameworks/renderers}/renderer-react.js +53 -86
  15. package/dist/{vue → frameworks/renderers}/renderer.vue.d.ts +2 -2
  16. package/dist/frameworks/renderers/renderer.vue.js +193 -0
  17. package/dist/frameworks/themes/BuildingPage.d.ts +1 -0
  18. package/dist/frameworks/themes/BuildingPage.js +312 -0
  19. package/dist/frameworks/themes/DefaultNotFound.d.ts +1 -0
  20. package/dist/frameworks/themes/DefaultNotFound.js +330 -0
  21. package/dist/frameworks/themes/ErrorModal.d.ts +1 -0
  22. package/dist/frameworks/themes/ErrorModal.js +345 -0
  23. package/dist/frameworks/themes/ServerError.d.ts +1 -0
  24. package/dist/frameworks/themes/ServerError.js +401 -0
  25. package/dist/frameworks/themes/VattsDevBadge.d.ts +1 -0
  26. package/dist/frameworks/themes/VattsDevBadge.js +232 -0
  27. package/dist/frameworks/vue/App.vue +149 -0
  28. package/dist/frameworks/vue/client.d.ts +9 -0
  29. package/dist/{vue → frameworks/vue}/client.js +13 -11
  30. package/dist/{vue → frameworks/vue/components}/Link.vue +38 -38
  31. package/dist/{vue → frameworks/vue/components}/image/Image.vue +128 -128
  32. package/dist/frameworks/vue/entry.client.js +75 -0
  33. package/dist/global/global.d.ts +179 -180
  34. package/dist/hotReload.js +77 -77
  35. package/dist/index.js +12 -1
  36. package/dist/loaders.js +15 -15
  37. package/dist/renderer.js +2 -2
  38. package/dist/renderers/common.js +3 -3
  39. package/dist/utils/core-go.js +2 -2
  40. package/dist/utils/utils.js +5 -5
  41. package/package.json +10 -26
  42. package/dist/react/BuildingPage.d.ts +0 -2
  43. package/dist/react/BuildingPage.js +0 -270
  44. package/dist/react/DefaultNotFound.d.ts +0 -2
  45. package/dist/react/DefaultNotFound.js +0 -248
  46. package/dist/react/DevIndicator.d.ts +0 -5
  47. package/dist/react/DevIndicator.js +0 -203
  48. package/dist/react/ErrorModal.d.ts +0 -20
  49. package/dist/react/ErrorModal.js +0 -266
  50. package/dist/react/client.d.ts +0 -8
  51. package/dist/react/entry.client.d.ts +0 -6
  52. package/dist/react/entry.client.js +0 -325
  53. package/dist/react/server-error.d.ts +0 -8
  54. package/dist/react/server-error.js +0 -346
  55. package/dist/vue/App.vue +0 -199
  56. package/dist/vue/BuildingPage.vue +0 -281
  57. package/dist/vue/DefaultNotFound.vue +0 -329
  58. package/dist/vue/DevIndicator.vue +0 -226
  59. package/dist/vue/ErrorModal.vue +0 -317
  60. package/dist/vue/client.d.ts +0 -9
  61. package/dist/vue/entry.client.js +0 -110
  62. package/dist/vue/renderer.vue.js +0 -387
  63. package/dist/vue/server-error.vue +0 -351
  64. /package/dist/{react → frameworks/builds}/react.build.d.ts +0 -0
  65. /package/dist/{react → frameworks/builds}/react.build.js +0 -0
  66. /package/dist/{vue → frameworks/builds}/vue.build.d.ts +0 -0
  67. /package/dist/{react → frameworks/react/components}/Link.d.ts +0 -0
  68. /package/dist/{react → frameworks/react/components}/image/Image.d.ts +0 -0
  69. /package/dist/{react → frameworks/react/components}/image/Image.js +0 -0
  70. /package/dist/{vue → frameworks/vue}/entry.client.d.ts +0 -0
@@ -1,180 +1,179 @@
1
- /*
2
- * This file is part of the Vatts.js Project.
3
- * Copyright (c) 2026 mfraz
4
- *
5
- * Licensed under the Apache License, Version 2.0 (the "License");
6
- * you may not use this file except in compliance with the License.
7
- * You may obtain a copy of the License at
8
- *
9
- * http://www.apache.org/licenses/LICENSE-2.0
10
- *
11
- * Unless required by applicable law or agreed to in writing, software
12
- * distributed under the License is distributed on an "AS IS" BASIS,
13
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- * See the License for the specific language governing permissions and
15
- * limitations under the License.
16
- */
17
-
18
- /**
19
- * Type declarations for asset imports
20
- * This allows TypeScript to understand imports of various file types
21
- */
22
-
23
- // Markdown files
24
- declare module "*.md" {
25
- const content: string;
26
- export default content;
27
- }
28
-
29
- // Images
30
- declare module "*.png" {
31
- const src: string;
32
- export default src;
33
- }
34
-
35
- declare module "*.jpg" {
36
- const src: string;
37
- export default src;
38
- }
39
-
40
- declare module "*.jpeg" {
41
- const src: string;
42
- export default src;
43
- }
44
-
45
- declare module "*.gif" {
46
- const src: string;
47
- export default src;
48
- }
49
-
50
- declare module "*.webp" {
51
- const src: string;
52
- export default src;
53
- }
54
-
55
- declare module "*.avif" {
56
- const src: string;
57
- export default src;
58
- }
59
-
60
- declare module "*.ico" {
61
- const src: string;
62
- export default src;
63
- }
64
-
65
- declare module "*.bmp" {
66
- const src: string;
67
- export default src;
68
- }
69
-
70
- declare module "*.tif" {
71
- const src: string;
72
- export default src;
73
- }
74
-
75
- declare module "*.tiff" {
76
- const src: string;
77
- export default src;
78
- }
79
-
80
- // SVG (with additional export for raw content)
81
- declare module "*.svg" {
82
- const src: string;
83
- export const svgContent: string;
84
- export default src;
85
- }
86
-
87
- // JSON files
88
- declare module "*.json" {
89
- const value: any;
90
- export default value;
91
- }
92
-
93
- // Text files
94
- declare module "*.txt" {
95
- const content: string;
96
- export default content;
97
- }
98
-
99
- // Fonts
100
- declare module "*.woff" {
101
- const src: string;
102
- export default src;
103
- }
104
-
105
- declare module "*.woff2" {
106
- const src: string;
107
- export default src;
108
- }
109
-
110
- declare module "*.ttf" {
111
- const src: string;
112
- export default src;
113
- }
114
-
115
- declare module "*.otf" {
116
- const src: string;
117
- export default src;
118
- }
119
-
120
- declare module "*.eot" {
121
- const src: string;
122
- export default src;
123
- }
124
-
125
- // Audio files
126
- declare module "*.mp3" {
127
- const src: string;
128
- export default src;
129
- }
130
-
131
- declare module "*.wav" {
132
- const src: string;
133
- export default src;
134
- }
135
-
136
- declare module "*.ogg" {
137
- const src: string;
138
- export default src;
139
- }
140
-
141
- declare module "*.m4a" {
142
- const src: string;
143
- export default src;
144
- }
145
-
146
- declare module "*.aac" {
147
- const src: string;
148
- export default src;
149
- }
150
-
151
- declare module "*.flac" {
152
- const src: string;
153
- export default src;
154
- }
155
-
156
- // Video files
157
- declare module "*.mp4" {
158
- const src: string;
159
- export default src;
160
- }
161
-
162
- declare module "*.webm" {
163
- const src: string;
164
- export default src;
165
- }
166
-
167
- declare module "*.ogv" {
168
- const src: string;
169
- export default src;
170
- }
171
-
172
- /* eslint-disable */
173
- declare module '*.vue' {
174
- // Usamos import('vue') para não transformar o arquivo em um módulo
175
- const component: import('vue').DefineComponent<{}, {}, any>
176
- export default component
177
- }
178
- declare module '*.css';
179
- declare module '*.scss';
180
- declare module '*.sass';
1
+ /*
2
+ * This file is part of the Vatts.js Project.
3
+ * Copyright (c) 2026 mfraz
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ /**
18
+ * Type declarations for asset imports
19
+ * This allows TypeScript to understand imports of various file types
20
+ */
21
+
22
+ // Markdown files
23
+ declare module "*.md" {
24
+ const content: string;
25
+ export default content;
26
+ }
27
+
28
+ // Images
29
+ declare module "*.png" {
30
+ const src: string;
31
+ export default src;
32
+ }
33
+
34
+ declare module "*.jpg" {
35
+ const src: string;
36
+ export default src;
37
+ }
38
+
39
+ declare module "*.jpeg" {
40
+ const src: string;
41
+ export default src;
42
+ }
43
+
44
+ declare module "*.gif" {
45
+ const src: string;
46
+ export default src;
47
+ }
48
+
49
+ declare module "*.webp" {
50
+ const src: string;
51
+ export default src;
52
+ }
53
+
54
+ declare module "*.avif" {
55
+ const src: string;
56
+ export default src;
57
+ }
58
+
59
+ declare module "*.ico" {
60
+ const src: string;
61
+ export default src;
62
+ }
63
+
64
+ declare module "*.bmp" {
65
+ const src: string;
66
+ export default src;
67
+ }
68
+
69
+ declare module "*.tif" {
70
+ const src: string;
71
+ export default src;
72
+ }
73
+
74
+ declare module "*.tiff" {
75
+ const src: string;
76
+ export default src;
77
+ }
78
+
79
+ // SVG (with additional export for raw content)
80
+ declare module "*.svg" {
81
+ const src: string;
82
+ export const svgContent: string;
83
+ export default src;
84
+ }
85
+
86
+ // JSON files
87
+ declare module "*.json" {
88
+ const value: any;
89
+ export default value;
90
+ }
91
+
92
+ // Text files
93
+ declare module "*.txt" {
94
+ const content: string;
95
+ export default content;
96
+ }
97
+
98
+ // Fonts
99
+ declare module "*.woff" {
100
+ const src: string;
101
+ export default src;
102
+ }
103
+
104
+ declare module "*.woff2" {
105
+ const src: string;
106
+ export default src;
107
+ }
108
+
109
+ declare module "*.ttf" {
110
+ const src: string;
111
+ export default src;
112
+ }
113
+
114
+ declare module "*.otf" {
115
+ const src: string;
116
+ export default src;
117
+ }
118
+
119
+ declare module "*.eot" {
120
+ const src: string;
121
+ export default src;
122
+ }
123
+
124
+ // Audio files
125
+ declare module "*.mp3" {
126
+ const src: string;
127
+ export default src;
128
+ }
129
+
130
+ declare module "*.wav" {
131
+ const src: string;
132
+ export default src;
133
+ }
134
+
135
+ declare module "*.ogg" {
136
+ const src: string;
137
+ export default src;
138
+ }
139
+
140
+ declare module "*.m4a" {
141
+ const src: string;
142
+ export default src;
143
+ }
144
+
145
+ declare module "*.aac" {
146
+ const src: string;
147
+ export default src;
148
+ }
149
+
150
+ declare module "*.flac" {
151
+ const src: string;
152
+ export default src;
153
+ }
154
+
155
+ // Video files
156
+ declare module "*.mp4" {
157
+ const src: string;
158
+ export default src;
159
+ }
160
+
161
+ declare module "*.webm" {
162
+ const src: string;
163
+ export default src;
164
+ }
165
+
166
+ declare module "*.ogv" {
167
+ const src: string;
168
+ export default src;
169
+ }
170
+
171
+ /* eslint-disable */
172
+ declare module '*.vue' {
173
+ // Usamos import('vue') para não transformar o arquivo em um módulo
174
+ const component: import('vue').DefineComponent<{}, {}, any>
175
+ export default component
176
+ }
177
+ declare module '*.css';
178
+ declare module '*.scss';
179
+ declare module '*.sass';
package/dist/hotReload.js CHANGED
@@ -439,83 +439,83 @@ class HotReloadManager {
439
439
  deadClients.forEach(ws => this.cleanupClient(ws));
440
440
  }
441
441
  getClientScript() {
442
- return `
443
- <script>
444
- (function() {
445
- if (typeof window !== 'undefined') {
446
- let ws;
447
- let reconnectAttempts = 0;
448
- let isConnected = false;
449
-
450
- function dispatch(name, detail) {
451
- try { window.dispatchEvent(new CustomEvent(name, { detail: detail || {} })); } catch(e) {}
452
- }
453
-
454
- function connect() {
455
- const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
456
- const port = protocol === "wss:" ? "${helpers_1.config?.ssl?.http3Port}" : "${helpers_1.config?.port}"
457
- const wsUrl = protocol + '//' + window.location.hostname + ':' + port + '/hweb-hotreload/';
458
-
459
- if (ws && (ws.readyState === WebSocket.CONNECTING || ws.readyState === WebSocket.OPEN)) return;
460
-
461
- try {
462
- ws = new WebSocket(wsUrl);
463
- ws.onopen = function() {
464
- console.log('\\u001b[32m[vatts]\\u001b[0m Hot-reload connected');
465
- isConnected = true;
466
- reconnectAttempts = 0;
467
- ws.send(JSON.stringify({ type: 'status-request', ts: Date.now() }));
468
- };
469
-
470
- ws.onmessage = function(event) {
471
- try {
472
- const message = JSON.parse(event.data);
473
- switch(message.type) {
474
- case 'build-start':
475
- window.__VATTS_HOT_RELOAD__ = { state: 'reloading', payload: message.data, ts: Date.now() };
476
- dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
477
- break;
478
- case 'frontend-reload':
479
- case 'backend-api-reload':
480
- case 'server-ready':
481
- console.log('[vatts] Changes applied, reloading page...');
482
- dispatch('vatts:hmr-ready', { files: message.data?.files });
483
-
484
- window.__VATTS_HOT_RELOAD__ = { state: 'idle', payload: { success: true }, ts: Date.now() };
485
- dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
486
-
487
- setTimeout(() => window.location.reload(), 150);
488
- break;
489
- case 'build-error':
490
- window.__VATTS_HOT_RELOAD__ = { state: 'build-error', payload: message.data, ts: Date.now() };
491
- dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
492
- dispatch('vatts:build-error', message.data);
493
- console.error('[vatts] Build Error:', message.data);
494
- break;
495
- case 'build-complete':
496
- window.__VATTS_HOT_RELOAD__ = { state: 'idle', payload: { build: 'ok' }, ts: Date.now() };
497
- dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
498
- dispatch('vatts:build-ok', { ts: Date.now() });
499
- break;
500
- }
501
- } catch (e) {
502
- console.error('[vatts] Error processing msg:', e);
503
- }
504
- };
505
-
506
- ws.onclose = function(event) {
507
- isConnected = false;
508
- if (event.code === 1000) return;
509
- setTimeout(connect, Math.min(1000 * Math.pow(1.5, reconnectAttempts++), 30000));
510
- };
511
- } catch (error) { setTimeout(connect, 1000); }
512
- }
513
-
514
- document.addEventListener('visibilitychange', function() { if (!document.hidden && !isConnected) { reconnectAttempts = 0; connect(); } });
515
- connect();
516
- }
517
- })();
518
- </script>
442
+ return `
443
+ <script>
444
+ (function() {
445
+ if (typeof window !== 'undefined') {
446
+ let ws;
447
+ let reconnectAttempts = 0;
448
+ let isConnected = false;
449
+
450
+ function dispatch(name, detail) {
451
+ try { window.dispatchEvent(new CustomEvent(name, { detail: detail || {} })); } catch(e) {}
452
+ }
453
+
454
+ function connect() {
455
+ const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
456
+ const port = protocol === "wss:" ? "${helpers_1.config?.ssl?.http3Port}" : "${helpers_1.config?.port}"
457
+ const wsUrl = protocol + '//' + window.location.hostname + ':' + port + '/hweb-hotreload/';
458
+
459
+ if (ws && (ws.readyState === WebSocket.CONNECTING || ws.readyState === WebSocket.OPEN)) return;
460
+
461
+ try {
462
+ ws = new WebSocket(wsUrl);
463
+ ws.onopen = function() {
464
+ console.log('\\u001b[32m[vatts]\\u001b[0m Hot-reload connected');
465
+ isConnected = true;
466
+ reconnectAttempts = 0;
467
+ ws.send(JSON.stringify({ type: 'status-request', ts: Date.now() }));
468
+ };
469
+
470
+ ws.onmessage = function(event) {
471
+ try {
472
+ const message = JSON.parse(event.data);
473
+ switch(message.type) {
474
+ case 'build-start':
475
+ window.__VATTS_HOT_RELOAD__ = { state: 'reloading', payload: message.data, ts: Date.now() };
476
+ dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
477
+ break;
478
+ case 'frontend-reload':
479
+ case 'backend-api-reload':
480
+ case 'server-ready':
481
+ console.log('[vatts] Changes applied, reloading page...');
482
+ dispatch('vatts:hmr-ready', { files: message.data?.files });
483
+
484
+ window.__VATTS_HOT_RELOAD__ = { state: 'idle', payload: { success: true }, ts: Date.now() };
485
+ dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
486
+
487
+ setTimeout(() => window.location.reload(), 150);
488
+ break;
489
+ case 'build-error':
490
+ window.__VATTS_HOT_RELOAD__ = { state: 'build-error', payload: message.data, ts: Date.now() };
491
+ dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
492
+ dispatch('vatts:build-error', message.data);
493
+ console.error('[vatts] Build Error:', message.data);
494
+ break;
495
+ case 'build-complete':
496
+ window.__VATTS_HOT_RELOAD__ = { state: 'idle', payload: { build: 'ok' }, ts: Date.now() };
497
+ dispatch('vatts:hotreload', window.__VATTS_HOT_RELOAD__);
498
+ dispatch('vatts:build-ok', { ts: Date.now() });
499
+ break;
500
+ }
501
+ } catch (e) {
502
+ console.error('[vatts] Error processing msg:', e);
503
+ }
504
+ };
505
+
506
+ ws.onclose = function(event) {
507
+ isConnected = false;
508
+ if (event.code === 1000) return;
509
+ setTimeout(connect, Math.min(1000 * Math.pow(1.5, reconnectAttempts++), 30000));
510
+ };
511
+ } catch (error) { setTimeout(connect, 1000); }
512
+ }
513
+
514
+ document.addEventListener('visibilitychange', function() { if (!document.hidden && !isConnected) { reconnectAttempts = 0; connect(); } });
515
+ connect();
516
+ }
517
+ })();
518
+ </script>
519
519
  `;
520
520
  }
521
521
  clearBackendCache(filePath) {
package/dist/index.js CHANGED
@@ -723,7 +723,18 @@ function vatts(options) {
723
723
  // Se o stream já começou, não dá pra enviar erro 500 limpo.
724
724
  // O renderAsStream tenta lidar com isso no onError.
725
725
  if (!rawRes.headersSent) {
726
- genericRes.status(500).text('Internal server error');
726
+ const { getServerErrorHtml } = require("./frameworks/themes/ServerError");
727
+ // Gera o HTML bonitão passando o erro real
728
+ const errorHtml = getServerErrorHtml({
729
+ title: 'Critical SSR Error',
730
+ error: error,
731
+ requestUrl: pathname,
732
+ hint: 'The page crashed before or during the rendering process on the server.'
733
+ });
734
+ // Configura a resposta como HTML e envia a tela de erro
735
+ rawRes.statusCode = 500;
736
+ rawRes.setHeader('Content-Type', 'text/html; charset=utf-8');
737
+ rawRes.end(errorHtml);
727
738
  }
728
739
  }
729
740
  };
package/dist/loaders.js CHANGED
@@ -211,21 +211,21 @@ function registerLoaders(options = {}) {
211
211
  }
212
212
  }
213
213
  // 4. Montagem do Código Final (ESM Virtual)
214
- finalEsm = `
215
- ${scriptContent}
216
- ${templateContent}
217
-
218
- // Anexa a função de renderização SSR ao componente principal
219
- if (typeof _sfc_main !== 'undefined') {
220
- if (typeof ssrRender !== 'undefined') {
221
- _sfc_main.ssrRender = ssrRender;
222
- }
223
- if (typeof render !== 'undefined') {
224
- _sfc_main.render = render;
225
- }
226
- }
227
-
228
- export default _sfc_main;
214
+ finalEsm = `
215
+ ${scriptContent}
216
+ ${templateContent}
217
+
218
+ // Anexa a função de renderização SSR ao componente principal
219
+ if (typeof _sfc_main !== 'undefined') {
220
+ if (typeof ssrRender !== 'undefined') {
221
+ _sfc_main.ssrRender = ssrRender;
222
+ }
223
+ if (typeof render !== 'undefined') {
224
+ _sfc_main.render = render;
225
+ }
226
+ }
227
+
228
+ export default _sfc_main;
229
229
  `;
230
230
  // 5. Transformação final para CommonJS (Node.js) via Esbuild
231
231
  const result = esbuild.transformSync(finalEsm, {
package/dist/renderer.js CHANGED
@@ -9,11 +9,11 @@ const framework_1 = require("./api/framework");
9
9
  async function renderAsStream(params) {
10
10
  if (framework_1.cachedFramework === 'react') {
11
11
  // Import dinâmico garante que o código do React só seja avaliado se necessário
12
- const { render } = await import("./react/renderer-react.js");
12
+ const { render } = await import("./frameworks/renderers/renderer-react.js");
13
13
  return await render(params);
14
14
  }
15
15
  else {
16
- const { renderVue } = await import("./vue/renderer.vue.js");
16
+ const { renderVue } = await import("./frameworks/renderers/renderer.vue.js");
17
17
  return await renderVue(params);
18
18
  }
19
19
  }
@@ -236,9 +236,9 @@ function generateMetaTags(metadata) {
236
236
  if (metadata.canonical)
237
237
  tags.push(`<link rel="canonical" href="${metadata.canonical}">`);
238
238
  if (metadata.faviconDark) {
239
- tags.push(`
240
- <link rel="icon" href="${metadata.favicon}" media="(prefers-color-scheme: light)">
241
- <link rel="icon" href="${metadata.faviconDark}" media="(prefers-color-scheme: dark)">
239
+ tags.push(`
240
+ <link rel="icon" href="${metadata.favicon}" media="(prefers-color-scheme: light)">
241
+ <link rel="icon" href="${metadata.faviconDark}" media="(prefers-color-scheme: dark)">
242
242
  `);
243
243
  }
244
244
  else if (metadata.favicon) {
@@ -16,8 +16,8 @@ class CoreGoManager {
16
16
  versionFilePath;
17
17
  constructor(currentVattsVersion, customBinDir) {
18
18
  this.currentVattsVersion = currentVattsVersion;
19
- this.registryUrl = "https://s31.gama.int.mfraz.ovh/vatts/registry.json";
20
- this.s3BaseUrl = "https://s31.gama.int.mfraz.ovh/vatts/";
19
+ this.registryUrl = "https://s3-server.br-1.mfraz.ovh/vatts-go/registry.json";
20
+ this.s3BaseUrl = "https://s3-server.br-1.mfraz.ovh/vatts-go/";
21
21
  // Pasta onde o binário será salvo (padrão: mesma pasta desse script, mas pode ser node_modules)
22
22
  this.binDir = customBinDir || node_path_1.default.join(__dirname, '..', '..', 'core-go-bin');
23
23
  this.versionFilePath = node_path_1.default.join(this.binDir, "core-go.version.json");
@@ -59,10 +59,10 @@ async function showTitle() {
59
59
  message = `${console_1.Colors.FgGreen} You are on the latest version${console_1.Colors.FgMagenta}`;
60
60
  }
61
61
  // JS STICK LETTERS
62
- console.log(`${console_1.Colors.Bright + console_1.Colors.FgCyan}
63
- ${console_1.Colors.Bright + console_1.Colors.FgCyan} ___ ___ __ ${console_1.Colors.FgWhite} __
64
- ${console_1.Colors.Bright + console_1.Colors.FgCyan} \\ / /\\ | | /__\`${console_1.Colors.FgWhite} | /__\` ${console_1.Colors.Bright + console_1.Colors.FgCyan}Vatts${console_1.Colors.FgWhite}.js ${console_1.Colors.FgGray}(v${currentVersion}) - mfraz
65
- ${console_1.Colors.Bright + console_1.Colors.FgCyan} \\/ /~~\\ | | .__/ .${console_1.Colors.FgWhite} \\__/ .__/ ${message}
66
-
62
+ console.log(`${console_1.Colors.Bright + console_1.Colors.FgCyan}
63
+ ${console_1.Colors.Bright + console_1.Colors.FgCyan} ___ ___ __ ${console_1.Colors.FgWhite} __
64
+ ${console_1.Colors.Bright + console_1.Colors.FgCyan} \\ / /\\ | | /__\`${console_1.Colors.FgWhite} | /__\` ${console_1.Colors.Bright + console_1.Colors.FgCyan}Vatts${console_1.Colors.FgWhite}.js ${console_1.Colors.FgGray}(v${currentVersion}) - mfraz
65
+ ${console_1.Colors.Bright + console_1.Colors.FgCyan} \\/ /~~\\ | | .__/ .${console_1.Colors.FgWhite} \\__/ .__/ ${message}
66
+
67
67
  `);
68
68
  }