create-caspian-app 0.2.0-beta.2 → 0.2.0-beta.21
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/dist/.github/copilot-instructions.md +88 -0
- package/dist/AGENTS.md +105 -0
- package/dist/CLAUDE.md +1 -0
- package/dist/index.js +1 -2
- package/dist/main.py +6 -0
- package/dist/public/js/pp-reactive-v2.js +1 -1
- package/dist/pyproject.toml +1 -1
- package/dist/settings/files-list.ts +8 -0
- package/dist/src/app/error.html +66 -85
- package/package.json +1 -1
package/dist/pyproject.toml
CHANGED
|
@@ -17,10 +17,18 @@ const getAllFiles = (dirPath: string): string[] => {
|
|
|
17
17
|
|
|
18
18
|
const items = readdirSync(dirPath);
|
|
19
19
|
items.forEach((item) => {
|
|
20
|
+
if (item === "__pycache__") {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
|
|
20
24
|
const fullPath = join(dirPath, item);
|
|
21
25
|
if (statSync(fullPath).isDirectory()) {
|
|
22
26
|
files.push(...getAllFiles(fullPath));
|
|
23
27
|
} else {
|
|
28
|
+
if (fullPath.endsWith(".pyc")) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
|
|
24
32
|
const relativePath = `.${sep}${relative(
|
|
25
33
|
join(__dirname, ".."),
|
|
26
34
|
fullPath
|
package/dist/src/app/error.html
CHANGED
|
@@ -1,34 +1,26 @@
|
|
|
1
1
|
<div class="container py-10">
|
|
2
2
|
<div class="max-w-2xl mx-auto bg-white shadow-sm rounded p-6">
|
|
3
3
|
<div class="flex items-start gap-4">
|
|
4
|
-
<svg
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
/>
|
|
25
|
-
<path
|
|
26
|
-
d="M12 16h.01"
|
|
27
|
-
stroke="currentColor"
|
|
28
|
-
stroke-width="1.5"
|
|
29
|
-
stroke-linecap="round"
|
|
30
|
-
stroke-linejoin="round"
|
|
31
|
-
/>
|
|
4
|
+
<svg class="w-10 h-10 text-red-600"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
fill="none"
|
|
7
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
8
|
+
aria-hidden>
|
|
9
|
+
<path d="M11.001 2a1 1 0 0 1 .998 0L21 7v9a3 3 0 0 1-3 3H6a3 3 0 0 1-3-3V7l8.001-5z"
|
|
10
|
+
stroke="currentColor"
|
|
11
|
+
stroke-width="1.5"
|
|
12
|
+
stroke-linecap="round"
|
|
13
|
+
stroke-linejoin="round" />
|
|
14
|
+
<path d="M12 8v4"
|
|
15
|
+
stroke="currentColor"
|
|
16
|
+
stroke-width="1.5"
|
|
17
|
+
stroke-linecap="round"
|
|
18
|
+
stroke-linejoin="round" />
|
|
19
|
+
<path d="M12 16h.01"
|
|
20
|
+
stroke="currentColor"
|
|
21
|
+
stroke-width="1.5"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="round" />
|
|
32
24
|
</svg>
|
|
33
25
|
|
|
34
26
|
<div class="flex-1">
|
|
@@ -43,23 +35,16 @@
|
|
|
43
35
|
<p class="mt-3 text-sm text-gray-700">[[error_message]]</p>
|
|
44
36
|
|
|
45
37
|
<div class="mt-4 flex flex-wrap gap-2">
|
|
46
|
-
<a
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
>
|
|
51
|
-
<button
|
|
52
|
-
class="inline-block px-3 py-1.5 bg-blue-600 text-white rounded text-sm"
|
|
53
|
-
onclick="reloadPage()"
|
|
54
|
-
>
|
|
38
|
+
<a href="/"
|
|
39
|
+
class="inline-block px-3 py-1.5 bg-gray-100 border border-gray-200 rounded text-sm text-gray-800 hover:bg-gray-200">Home</a>
|
|
40
|
+
<button class="inline-block px-3 py-1.5 bg-blue-600 text-white rounded text-sm"
|
|
41
|
+
onclick="reloadPage()">
|
|
55
42
|
Reload
|
|
56
43
|
</button>
|
|
57
44
|
[% if error_trace %]
|
|
58
|
-
<button
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
onclick="setShowTrace(showTrace => !showTrace)"
|
|
62
|
-
>
|
|
45
|
+
<button id="toggleTraceBtn"
|
|
46
|
+
class="inline-block px-3 py-1.5 bg-transparent border border-gray-200 rounded text-sm text-black"
|
|
47
|
+
onclick="setShowTrace(showTrace => !showTrace)">
|
|
63
48
|
{showTrace ? "Hide details" : "Show details"}
|
|
64
49
|
</button>
|
|
65
50
|
[% endif %]
|
|
@@ -68,63 +53,59 @@
|
|
|
68
53
|
</div>
|
|
69
54
|
|
|
70
55
|
[% if error_trace %]
|
|
71
|
-
<div id="traceArea"
|
|
56
|
+
<div id="traceArea"
|
|
57
|
+
class="mt-4"
|
|
58
|
+
hidden="{!showTrace}">
|
|
72
59
|
<div class="flex items-center justify-between mb-2">
|
|
73
60
|
<div class="text-xs text-gray-500">Error details (soft copy)</div>
|
|
74
61
|
<div class="flex gap-2">
|
|
75
|
-
<button
|
|
76
|
-
|
|
77
|
-
onclick="copyTrace()"
|
|
78
|
-
>
|
|
62
|
+
<button class="px-2 py-1 text-xs bg-gray-100 border rounded text-black"
|
|
63
|
+
onclick="copyTrace()">
|
|
79
64
|
{showCopyTrace ? "Copied" : "Copy"}
|
|
80
65
|
</button>
|
|
81
|
-
<button
|
|
82
|
-
|
|
83
|
-
onclick="downloadTrace()"
|
|
84
|
-
>
|
|
66
|
+
<button class="px-2 py-1 text-xs bg-gray-100 border rounded text-black"
|
|
67
|
+
onclick="downloadTrace()">
|
|
85
68
|
Download
|
|
86
69
|
</button>
|
|
87
70
|
</div>
|
|
88
71
|
</div>
|
|
89
|
-
<pre
|
|
90
|
-
|
|
91
|
-
class="p-4 bg-gray-100 rounded overflow-auto text-xs text-black"
|
|
92
|
-
>[[error_trace]]</pre>
|
|
72
|
+
<pre id="tracePre"
|
|
73
|
+
class="p-4 bg-gray-100 rounded overflow-auto text-xs text-black">[[error_trace]]</pre>
|
|
93
74
|
</div>
|
|
94
75
|
[% endif %]
|
|
95
76
|
</div>
|
|
96
|
-
</div>
|
|
97
77
|
|
|
98
|
-
<script>
|
|
99
|
-
|
|
100
|
-
|
|
78
|
+
<script>
|
|
79
|
+
const [showTrace, setShowTrace] = pp.state(false);
|
|
80
|
+
const [showCopyTrace, setShowCopyTrace] = pp.state(false);
|
|
101
81
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
82
|
+
function reloadPage() {
|
|
83
|
+
window.location.reload();
|
|
84
|
+
}
|
|
105
85
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
86
|
+
function copyTrace() {
|
|
87
|
+
const tracePre = document.getElementById("tracePre");
|
|
88
|
+
navigator.clipboard.writeText(tracePre.innerText);
|
|
109
89
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
90
|
+
setShowCopyTrace(true);
|
|
91
|
+
setTimeout(() => {
|
|
92
|
+
setShowCopyTrace(false);
|
|
93
|
+
}, 2000);
|
|
94
|
+
}
|
|
115
95
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
</script>
|
|
96
|
+
function downloadTrace() {
|
|
97
|
+
const tracePre = document.getElementById("tracePre");
|
|
98
|
+
const blob = new Blob([tracePre.innerText], {
|
|
99
|
+
type: "text/plain",
|
|
100
|
+
});
|
|
101
|
+
const url = URL.createObjectURL(blob);
|
|
102
|
+
const a = document.createElement("a");
|
|
103
|
+
a.href = url;
|
|
104
|
+
a.download = "error_trace.txt";
|
|
105
|
+
document.body.appendChild(a);
|
|
106
|
+
a.click();
|
|
107
|
+
document.body.removeChild(a);
|
|
108
|
+
URL.revokeObjectURL(url);
|
|
109
|
+
}
|
|
110
|
+
</script>
|
|
111
|
+
</div>
|