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.
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "my-app"
3
3
  version = "1.0.0"
4
- requires-python = ">=3.10"
4
+ requires-python = ">=3.11"
5
5
  dependencies = []
6
6
 
7
7
  [tool.uv]
@@ -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
@@ -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
- class="w-10 h-10 text-red-600"
6
- viewBox="0 0 24 24"
7
- fill="none"
8
- xmlns="http://www.w3.org/2000/svg"
9
- aria-hidden
10
- >
11
- <path
12
- 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"
13
- stroke="currentColor"
14
- stroke-width="1.5"
15
- stroke-linecap="round"
16
- stroke-linejoin="round"
17
- />
18
- <path
19
- d="M12 8v4"
20
- stroke="currentColor"
21
- stroke-width="1.5"
22
- stroke-linecap="round"
23
- stroke-linejoin="round"
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
- href="/"
48
- 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"
49
- >Home</a
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
- id="toggleTraceBtn"
60
- class="inline-block px-3 py-1.5 bg-transparent border border-gray-200 rounded text-sm text-black"
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" class="mt-4" hidden="{!showTrace}">
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
- class="px-2 py-1 text-xs bg-gray-100 border rounded text-black"
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
- class="px-2 py-1 text-xs bg-gray-100 border rounded text-black"
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
- id="tracePre"
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
- const [showTrace, setShowTrace] = pp.state(false);
100
- const [showCopyTrace, setShowCopyTrace] = pp.state(false);
78
+ <script>
79
+ const [showTrace, setShowTrace] = pp.state(false);
80
+ const [showCopyTrace, setShowCopyTrace] = pp.state(false);
101
81
 
102
- function reloadPage() {
103
- window.location.reload();
104
- }
82
+ function reloadPage() {
83
+ window.location.reload();
84
+ }
105
85
 
106
- function copyTrace() {
107
- const tracePre = document.getElementById("tracePre");
108
- navigator.clipboard.writeText(tracePre.innerText);
86
+ function copyTrace() {
87
+ const tracePre = document.getElementById("tracePre");
88
+ navigator.clipboard.writeText(tracePre.innerText);
109
89
 
110
- setShowCopyTrace(true);
111
- setTimeout(() => {
112
- setShowCopyTrace(false);
113
- }, 2000);
114
- }
90
+ setShowCopyTrace(true);
91
+ setTimeout(() => {
92
+ setShowCopyTrace(false);
93
+ }, 2000);
94
+ }
115
95
 
116
- function downloadTrace() {
117
- const tracePre = document.getElementById("tracePre");
118
- const blob = new Blob([tracePre.innerText], {
119
- type: "text/plain",
120
- });
121
- const url = URL.createObjectURL(blob);
122
- const a = document.createElement("a");
123
- a.href = url;
124
- a.download = "error_trace.txt";
125
- document.body.appendChild(a);
126
- a.click();
127
- document.body.removeChild(a);
128
- URL.revokeObjectURL(url);
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>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-caspian-app",
3
- "version": "0.2.0-beta.2",
3
+ "version": "0.2.0-beta.21",
4
4
  "description": "Scaffold a new Caspian project (FastAPI-powered reactive Python framework).",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",