uniweb 0.88.0 → 0.88.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uniweb",
|
|
3
|
-
"version": "0.88.
|
|
3
|
+
"version": "0.88.1",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,15 +43,15 @@
|
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
44
|
"@uniweb/core": "^0.38.0",
|
|
45
45
|
"@uniweb/content-writer": "^0.3.4",
|
|
46
|
-
"@uniweb/
|
|
47
|
-
"@uniweb/runtime": "^0.29.5",
|
|
46
|
+
"@uniweb/semantic-parser": "^1.5.1",
|
|
48
47
|
"@uniweb/kit": "^0.20.0",
|
|
49
|
-
"@uniweb/
|
|
48
|
+
"@uniweb/schemas": "^0.13.0",
|
|
49
|
+
"@uniweb/runtime": "^0.29.5"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@uniweb/
|
|
52
|
+
"@uniweb/build": "^0.80.3",
|
|
53
53
|
"@uniweb/semantic-parser": "^1.5.1",
|
|
54
|
-
"@uniweb/
|
|
54
|
+
"@uniweb/content-reader": "^1.2.8"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|
|
57
57
|
"@uniweb/build": {
|
package/src/framework-index.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-10-09T02:
|
|
3
|
+
"generatedAt": "2026-10-09T02:55:55.375Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/api": {
|
|
6
6
|
"version": "0.7.0"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"version": "0.1.2"
|
|
55
55
|
},
|
|
56
56
|
"@uniweb/templates": {
|
|
57
|
-
"version": "0.18.
|
|
57
|
+
"version": "0.18.6"
|
|
58
58
|
},
|
|
59
59
|
"@uniweb/theming": {
|
|
60
60
|
"version": "0.2.0"
|
|
@@ -6,8 +6,14 @@
|
|
|
6
6
|
* was checked only when a caller passed the CLI's version, and none ever
|
|
7
7
|
* did. An official template now comes from the release its CLI was
|
|
8
8
|
* published with (resolver.js), so it cannot be newer than that CLI.
|
|
9
|
-
* - Unwrapping
|
|
10
|
-
*
|
|
9
|
+
* - Unwrapping a package folder that keeps its code under `src/` — the layout of
|
|
10
|
+
* the v0.7 releases (`foundation/src/foundation.js`). Such a folder is now
|
|
11
|
+
* REFUSED, naming the fix (validateTemplate). ⛔ The unwrap went in 0.88.0
|
|
12
|
+
* with a note that the official templates were flat, but its condition was any
|
|
13
|
+
* `src/main.js` too, and `extensions/effects/` still relied on it: 0.88.0
|
|
14
|
+
* copied that folder nested, and every project made from `extensions` failed
|
|
15
|
+
* to build, saying only that it found no section types. The template is flat
|
|
16
|
+
* since templates 0.18.6.
|
|
11
17
|
*/
|
|
12
18
|
|
|
13
19
|
import fs from 'node:fs/promises'
|
|
@@ -30,7 +36,8 @@ export const ErrorCodes = {
|
|
|
30
36
|
MISSING_TEMPLATE_JSON: 'MISSING_TEMPLATE_JSON',
|
|
31
37
|
INVALID_TEMPLATE_JSON: 'INVALID_TEMPLATE_JSON',
|
|
32
38
|
MISSING_CONTENT_DIR: 'MISSING_CONTENT_DIR',
|
|
33
|
-
MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD'
|
|
39
|
+
MISSING_REQUIRED_FIELD: 'MISSING_REQUIRED_FIELD',
|
|
40
|
+
NESTED_PACKAGE_CODE: 'NESTED_PACKAGE_CODE'
|
|
34
41
|
}
|
|
35
42
|
|
|
36
43
|
/**
|
|
@@ -83,6 +90,23 @@ export async function validateTemplate(templateRoot) {
|
|
|
83
90
|
)
|
|
84
91
|
}
|
|
85
92
|
|
|
93
|
+
// A foundation or extension folder is copied over the package the CLI
|
|
94
|
+
// scaffolds, as it is. Code kept under src/ would land beside the scaffold's
|
|
95
|
+
// own empty sections/, and the project would fail to build saying only that it
|
|
96
|
+
// found no section types — so it stops here, saying what to move.
|
|
97
|
+
for (const { type, name, dir } of contentDirs) {
|
|
98
|
+
if (type !== 'foundation' && type !== 'extension') continue
|
|
99
|
+
if (['main.js', 'foundation.js'].some((file) => existsSync(path.join(dir, 'src', file)))) {
|
|
100
|
+
throw new ValidationError(
|
|
101
|
+
`The template's ${name}/ keeps its code in ${name}/src/, a layout this CLI does not scaffold. ` +
|
|
102
|
+
`A foundation or extension folder holds main.js, sections/ and styles.css at its root: ` +
|
|
103
|
+
`move ${name}/src/'s contents up into ${name}/.`,
|
|
104
|
+
ErrorCodes.NESTED_PACKAGE_CODE,
|
|
105
|
+
{ dir }
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
86
110
|
return {
|
|
87
111
|
...metadata,
|
|
88
112
|
format: 2,
|