@ressjs/config 0.6.0-experimental.0 → 0.6.0-rc.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.
package/LICENSE ADDED
@@ -0,0 +1,69 @@
1
+ ress.js Proprietary License
2
+
3
+ Copyright (c) 2025-2026 gabrielspisso. All rights reserved.
4
+
5
+ This license applies to the ress.js packages (the "Software"), published on npm
6
+ under the @ressjs and @gzzy scopes, in every version released from 0.6.0-rc.0
7
+ onwards. Earlier versions were released under the MIT License and remain
8
+ available under those terms.
9
+
10
+ 1. GRANT
11
+ Subject to this license, the Licensor grants you a worldwide, non-exclusive,
12
+ non-transferable, non-sublicensable, royalty-free license to install and use
13
+ the Software, as distributed by the Licensor, to build, run and deploy your
14
+ own applications and services, including commercial ones, and to charge your
15
+ own customers for them.
16
+
17
+ 2. RESTRICTIONS
18
+ You may not:
19
+ a) fork, copy, or redistribute the Software, in whole or in part, except for
20
+ the portions that are necessarily included in the build output of your own
21
+ application in order to run it;
22
+ b) publish, distribute or make available a modified version of the Software
23
+ or any work derived from it. Modifications for your own internal use are
24
+ allowed, but they remain subject to this license;
25
+ c) use the Software, or any part of it, to build, offer or support a
26
+ framework, library, tool or service that competes with the Software;
27
+ d) sell, sublicense, rent or host the Software itself as a product or service
28
+ for third parties, as opposed to hosting your own application built with
29
+ it;
30
+ e) remove or alter copyright, license or attribution notices;
31
+ f) use the name "ress.js" or the Licensor's names or marks to endorse or
32
+ promote your products without written permission.
33
+
34
+ 3. SCAFFOLDING OUTPUT
35
+ Files that @ressjs/create-ress-app copies into your project (templates and
36
+ generated configuration) are yours: you may use, modify and distribute them
37
+ without restriction. This does not extend to the Software packages that the
38
+ generated project installs as dependencies.
39
+
40
+ 4. SUPPORT
41
+ The Software is provided without any obligation of support, maintenance or
42
+ updates. The Licensor may offer support, maintenance, training or consulting
43
+ under a separate paid agreement; that agreement does not change this license
44
+ unless it says so explicitly and is signed by the Licensor.
45
+
46
+ 5. OWNERSHIP
47
+ The Software is licensed, not sold. The Licensor retains all rights not
48
+ expressly granted here. Feedback and suggestions you send may be used by the
49
+ Licensor without obligation to you.
50
+
51
+ 6. TERMINATION
52
+ This license ends automatically if you breach it. On termination you must
53
+ stop using the Software and delete your copies. Sections 4 to 8 survive
54
+ termination.
55
+
56
+ 7. NO WARRANTY
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
59
+ PARTICULAR PURPOSE AND NON-INFRINGEMENT.
60
+
61
+ 8. LIMITATION OF LIABILITY
62
+ TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE LICENSOR WILL NOT BE LIABLE FOR
63
+ ANY INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, OR FOR LOSS OF
64
+ PROFITS, DATA OR BUSINESS, ARISING FROM THE USE OF OR INABILITY TO USE THE
65
+ SOFTWARE. THE LICENSOR'S TOTAL LIABILITY IS LIMITED TO THE AMOUNT YOU PAID
66
+ FOR THE SOFTWARE, WHICH MAY BE ZERO.
67
+
68
+ For other uses, including exceptions to section 2, contact the Licensor to
69
+ agree a separate license.
package/dist/layers.js CHANGED
@@ -100,15 +100,20 @@ async function safeReaddir(dir, withTypes) {
100
100
  return [];
101
101
  }
102
102
  }
103
+ /** Cuántas lecturas se hicieron: hace única la URL de cada una. */
104
+ let evaluations = 0;
103
105
  /**
104
106
  * Evalúa un archivo de configuración.
105
107
  *
106
- * En desarrollo el archivo cambia, así que la URL lleva una marca de tiempo: sin
107
- * ella el caché de módulos de Node devuelve la versión anterior y editar la
108
- * configuración no tiene ningún efecto.
108
+ * En desarrollo el archivo cambia, así que cada lectura usa una URL distinta: el
109
+ * caché de módulos de Node indexa por URL, y con la misma devuelve la versión
110
+ * anterior, de modo que editar la configuración no tendría ningún efecto. La URL
111
+ * no puede depender sólo del reloj: dos lecturas dentro del mismo tic (el
112
+ * watcher de Windows avisa dos veces por escritura) compartirían marca y la
113
+ * segunda recibiría el contenido viejo, sin que nada volviera a avisar.
109
114
  */
110
115
  async function evaluate(file) {
111
- const url = (0, node_url_1.pathToFileURL)(file).href + `?t=${Date.now()}`;
116
+ const url = (0, node_url_1.pathToFileURL)(file).href + `?t=${Date.now()}-${++evaluations}`;
112
117
  const module = (await import(/* @vite-ignore */ url));
113
118
  return module.default ?? module;
114
119
  }
@@ -42,6 +42,8 @@ function configServerOnlyGuard() {
42
42
  return null;
43
43
  throw new Error(`[ress] "${PACKAGE}" es de sólo servidor y lo importa ${importer ?? 'el punto de entrada'}, ` +
44
44
  'que forma parte del bundle de cliente.\n' +
45
+ 'Leerlo dentro de `getServerSideProps` está permitido: ress lo quita del navegador. ' +
46
+ 'Si llegaste acá, lo importa código que el componente usa (o renderiza).\n' +
45
47
  'Los valores que el navegador necesita se declaran en `publicEnv`.');
46
48
  },
47
49
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ressjs/config",
3
- "version": "0.6.0-experimental.0",
3
+ "version": "0.6.0-rc.1",
4
4
  "description": "Valores de configuración por entorno para ress.js. Sólo servidor, sin dependencias.",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
@@ -38,7 +38,7 @@
38
38
  "environment",
39
39
  "ressjs"
40
40
  ],
41
- "license": "MIT",
41
+ "license": "SEE LICENSE IN LICENSE",
42
42
  "devDependencies": {
43
43
  "typescript": "^5.9.3",
44
44
  "vitest": "^3.2.4"