versacompiler 2.5.0 → 2.6.0

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 (49) hide show
  1. package/dist/compiler/compile-worker-pool.js +12 -0
  2. package/dist/compiler/compile.js +97 -17
  3. package/dist/compiler/error-reporter.js +12 -0
  4. package/dist/compiler/integrity-validator.js +12 -0
  5. package/dist/compiler/linter.js +12 -0
  6. package/dist/compiler/minify.js +12 -0
  7. package/dist/compiler/minifyTemplate.js +12 -0
  8. package/dist/compiler/module-resolution-optimizer.js +13 -1
  9. package/dist/compiler/parser.js +12 -0
  10. package/dist/compiler/performance-monitor.js +12 -0
  11. package/dist/compiler/pipeline/build-pipeline.js +12 -0
  12. package/dist/compiler/pipeline/core-plugins.js +12 -0
  13. package/dist/compiler/pipeline/module-graph.js +12 -0
  14. package/dist/compiler/pipeline/plugin-driver.js +12 -0
  15. package/dist/compiler/pipeline/types.js +12 -0
  16. package/dist/compiler/tailwindcss.js +12 -0
  17. package/dist/compiler/transform-optimizer.js +12 -0
  18. package/dist/compiler/transformTStoJS.js +38 -5
  19. package/dist/compiler/transforms.js +12 -0
  20. package/dist/compiler/typescript-compiler.js +12 -0
  21. package/dist/compiler/typescript-error-parser.js +12 -0
  22. package/dist/compiler/typescript-manager.js +12 -0
  23. package/dist/compiler/typescript-sync-validator.js +12 -0
  24. package/dist/compiler/typescript-worker-pool.js +12 -0
  25. package/dist/compiler/typescript-worker.js +12 -0
  26. package/dist/compiler/vuejs.js +41 -15
  27. package/dist/config.js +12 -0
  28. package/dist/hrm/VueHRM.js +132 -7
  29. package/dist/hrm/errorScreen.js +12 -0
  30. package/dist/hrm/getInstanciaVue.js +12 -0
  31. package/dist/hrm/initHRM.js +117 -9
  32. package/dist/hrm/versaHMR.js +317 -0
  33. package/dist/main.js +21 -2
  34. package/dist/servicios/browserSync.js +119 -4
  35. package/dist/servicios/file-watcher.js +104 -15
  36. package/dist/servicios/logger.js +12 -0
  37. package/dist/servicios/readConfig.js +13 -1
  38. package/dist/servicios/versacompile.config.types.js +12 -0
  39. package/dist/utils/excluded-modules.js +12 -0
  40. package/dist/utils/module-resolver.js +12 -0
  41. package/dist/utils/promptUser.js +12 -0
  42. package/dist/utils/proxyValidator.js +12 -0
  43. package/dist/utils/resolve-bin.js +12 -0
  44. package/dist/utils/utils.js +12 -0
  45. package/dist/utils/vue-types-setup.js +14 -2
  46. package/dist/wrappers/eslint-node.js +12 -0
  47. package/dist/wrappers/oxlint-node.js +12 -0
  48. package/dist/wrappers/tailwind-node.js +12 -0
  49. package/package.json +4 -3
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import * as process from 'node:process';
2
14
  // Función para obtener ProgressManager (lazy import para evitar dependencias circulares)
3
15
  let getProgressManager = null;
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import { normalize, relative, resolve } from 'node:path';
2
14
  import * as process from 'node:process';
3
15
  import { env } from 'node:process';
@@ -439,7 +451,7 @@ export default defineConfig({
439
451
  },
440
452
  resolve: {
441
453
  alias: {
442
- '/dist': 'src',
454
+ '/dist/public': 'src',
443
455
  '/dist/public': 'public',
444
456
  },
445
457
  },
@@ -1,2 +1,14 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  export const defineConfig = (config) => config;
2
14
  //# sourceMappingURL=versacompile.config.types.js.map
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  /**
2
14
  * Lista centralizada de módulos excluidos de la resolución automática
3
15
  * Estos módulos se mantienen con su importación original sin transformar
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  // Opción con librería 'resolve' (npm install resolve)
2
14
  import fs, { readFileSync } from 'node:fs';
3
15
  import { dirname, join, relative } from 'node:path';
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import process, { stdin as input, stdout as output } from 'node:process';
2
14
  import * as readline from 'node:readline/promises';
3
15
  import { logger } from '../servicios/logger.js';
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import { get as httpGet } from 'node:http';
2
14
  import { get as httpsGet } from 'node:https';
3
15
  import { URL } from 'node:url';
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import * as path from 'node:path';
2
14
  import * as process from 'node:process';
3
15
  import * as fs from 'fs-extra';
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  /**
2
14
  * Converts a 24-hour time string to a 12-hour time string with AM/PM.
3
15
  *
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  /**
2
14
  * Utilidad para configurar automáticamente los tipos de Vue en proyectos
3
15
  * Facilita la integración de tipado robusto para archivos Vue
@@ -81,8 +93,8 @@ const createProjectTsConfig = async (projectRoot, options) => {
81
93
  // Paths para tipos
82
94
  baseUrl: '.',
83
95
  paths: {
84
- '/dist/*': ['src/*'],
85
- '/dist/types/*': ['src/types/*'],
96
+ '/dist/public/*': ['src/*'],
97
+ '/dist/public/types/*': ['src/types/*'],
86
98
  },
87
99
  types: [
88
100
  'node',
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import * as path from 'node:path';
2
14
  import { cwd } from 'node:process'; // Añadir importación de cwd
3
15
  import { execa } from 'execa';
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import { execa } from 'execa';
2
14
  import { resolveBin } from '../utils/resolve-bin.js';
3
15
  export class OxlintNode {
@@ -1,3 +1,15 @@
1
+ /* VersaCompiler HMR shim [dev] */
2
+ if (typeof window !== 'undefined' && window.__versaHMR) {
3
+ (() => {
4
+ const _id = new URL(import.meta.url).pathname;
5
+ import.meta.hot = {
6
+ accept(cb) { window.__versaHMR.accept(_id, typeof cb === 'function' ? cb : () => {}); },
7
+ invalidate() { window.__versaHMR._invalidate?.(_id); },
8
+ dispose(cb) { window.__versaHMR._onDispose?.(_id, cb); },
9
+ get data() { return window.__versaHMR._getHotData?.(_id) ?? {}; },
10
+ };
11
+ })();
12
+ }
1
13
  import { execa } from 'execa';
2
14
  import { resolveBin } from '../utils/resolve-bin.js';
3
15
  export class TailwindNode {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "versacompiler",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Una herramienta para compilar y minificar archivos .vue, .js y .ts para proyectos de Vue 3 con soporte para TypeScript.",
5
5
  "keywords": [
6
6
  "compiler",
@@ -61,7 +61,8 @@
61
61
  "test:ui": "vitest --ui",
62
62
  "test:coverage": "vitest run --coverage",
63
63
  "lint": "oxlint --fix --config .oxlintrc.json",
64
- "lint:eslint": "eslint --ext .js,.ts,.vue src/ --fix"
64
+ "lint:eslint": "eslint --ext .js,.ts,.vue src/ --fix",
65
+ "fmt": "oxfmt --write --config .oxfmtrc.json ."
65
66
  },
66
67
  "dependencies": {
67
68
  "@vue/compiler-dom": "^3.5.31",
@@ -114,7 +115,7 @@
114
115
  "eslint-plugin-promise": "^7.2.1",
115
116
  "eslint-plugin-unicorn": "^64.0.0",
116
117
  "eslint-plugin-vue": "^10.8.0",
117
- "oxfmt": "^0.42.0",
118
+ "oxfmt": "^0.43.0",
118
119
  "oxlint": "^1.57.0",
119
120
  "pinia": "^3.0.4",
120
121
  "prettier": "3.8.1",