@tbox.cn/app-template-h5 1.0.0-alpha.1 → 1.0.0-alpha.7
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/._.gitignore +0 -0
- package/._.npmignore +0 -0
- package/._.nvmrc +0 -0
- package/._AGENTS.md +0 -0
- package/._LEGAL.md +0 -0
- package/._LICENSE +0 -0
- package/._README.md +0 -0
- package/._eslint.config.mjs +0 -0
- package/._package.json +0 -0
- package/._pnpm-lock.template.yaml +0 -0
- package/._pnpm-workspace.template.yaml +0 -0
- package/._tsconfig.base.json +0 -0
- package/.gitignore +2 -1
- package/.tbox/._app.json +0 -0
- package/.tbox/app.json +1 -1
- package/AGENTS.md +16 -10
- package/README.md +0 -1
- package/apps/._AGENTS.md +0 -0
- package/apps/AGENTS.md +2 -6
- package/apps/client/._index.html +0 -0
- package/apps/client/._package.json +0 -0
- package/apps/client/._tsconfig.json +0 -0
- package/apps/client/._vite.config.ts +0 -0
- package/apps/client/._vitest.config.ts +0 -0
- package/apps/client/package.json +3 -1
- package/apps/client/src/._app.config.ts +0 -0
- package/apps/client/src/._vite-env.d.ts +0 -0
- package/apps/client/src/app.config.ts +10 -0
- package/apps/client/src/pages/._page.tsx +0 -0
- package/apps/client/src/pages/page.tsx +9 -5
- package/apps/client/src/styles/._tailwind.css +0 -0
- package/apps/client/src/styles/tailwind.css +101 -0
- package/apps/client/vite.config.ts +2 -1
- package/apps/server/._package.json +0 -0
- package/apps/server/._tsconfig.json +0 -0
- package/apps/server/._tsup.config.ts +0 -0
- package/apps/server/._vitest.config.ts +0 -0
- package/apps/server/src/._app.ts +0 -0
- package/apps/server/src/._dev.ts +0 -0
- package/apps/server/src/._index.ts +0 -0
- package/apps/server/src/dev.ts +2 -2
- package/apps/server/src/functions/._greet.server.ts +0 -0
- package/apps/server/src/index.ts +2 -2
- package/apps/server/tests/._app.test.ts +0 -0
- package/modules/._.gitkeep +0 -0
- package/package.json +5 -7
- package/packages/shared/._AGENTS.md +0 -0
- package/packages/shared/._package.json +0 -0
- package/packages/shared/._tsconfig.json +0 -0
- package/packages/shared/src/._index.ts +0 -0
- package/pnpm-lock.template.yaml +529 -171
- package/pnpm-workspace.template.yaml +10 -8
- package/scripts/._build.sh +0 -0
- package/scripts/._check.mjs +0 -0
- package/scripts/._dev.sh +0 -0
- package/scripts/._generate.mjs +0 -0
- package/scripts/._start.sh +0 -0
- package/scripts/._stop.sh +0 -0
- package/apps/client/src/platform/bootstrap.ts +0 -11
- package/apps/client/src/platform/mount-page.tsx +0 -26
- package/apps/client/src/styles/base.css +0 -21
- package/scripts/agents-check.mjs +0 -23
- package/scripts/agents-sync.mjs +0 -9
|
@@ -22,6 +22,8 @@ catalog:
|
|
|
22
22
|
tsx: 4.23.11
|
|
23
23
|
vite: 6.4.3
|
|
24
24
|
vitest: 4.1.10
|
|
25
|
+
tailwindcss: 4.3.5
|
|
26
|
+
"@tailwindcss/vite": 4.3.5
|
|
25
27
|
react: 18.3.1
|
|
26
28
|
react-dom: 18.3.1
|
|
27
29
|
"@types/react": 18.3.31
|
|
@@ -29,14 +31,14 @@ catalog:
|
|
|
29
31
|
"@types/node": 24.13.3
|
|
30
32
|
express: 4.22.2
|
|
31
33
|
"@types/express": 4.17.25
|
|
32
|
-
"@tbox.cn/app-sdk-core": 1.0.0-alpha.
|
|
33
|
-
"@tbox.cn/app-sdk-client": 1.0.0-alpha.
|
|
34
|
-
"@tbox.cn/app-sdk-server": 1.0.0-alpha.
|
|
35
|
-
"@tbox.cn/app-build": 1.0.0-alpha.
|
|
36
|
-
"@tbox.cn/app-agent-sdk-server": 1.0.0-alpha.
|
|
37
|
-
"@tbox.cn/app-agent-sdk-client": 1.0.0-alpha.
|
|
38
|
-
"@tbox.cn/app-contracts": 1.0.0-alpha.
|
|
39
|
-
"@tbox.cn/app-contracts-mall": 1.0.0-alpha.
|
|
34
|
+
"@tbox.cn/app-sdk-core": 1.0.0-alpha.7
|
|
35
|
+
"@tbox.cn/app-sdk-client": 1.0.0-alpha.7
|
|
36
|
+
"@tbox.cn/app-sdk-server": 1.0.0-alpha.7
|
|
37
|
+
"@tbox.cn/app-build": 1.0.0-alpha.7
|
|
38
|
+
"@tbox.cn/app-agent-sdk-server": 1.0.0-alpha.7
|
|
39
|
+
"@tbox.cn/app-agent-sdk-client": 1.0.0-alpha.7
|
|
40
|
+
"@tbox.cn/app-contracts": 1.0.0-alpha.7
|
|
41
|
+
"@tbox.cn/app-contracts-mall": 1.0.0-alpha.7
|
|
40
42
|
eslint: 9.39.5
|
|
41
43
|
typescript-eslint: 8.67.0
|
|
42
44
|
eslint-plugin-react-hooks: 5.2.0
|
|
Binary file
|
|
Binary file
|
package/scripts/._dev.sh
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { configureRuntime, installGlobalErrorReporting } from '@tbox.cn/app-sdk-client';
|
|
2
|
-
import '../styles/base.css';
|
|
3
|
-
|
|
4
|
-
let bootstrapped = false;
|
|
5
|
-
|
|
6
|
-
export function bootstrap(): void {
|
|
7
|
-
if (bootstrapped) return;
|
|
8
|
-
bootstrapped = true;
|
|
9
|
-
configureRuntime({ apiBaseUrl: import.meta.env.VITE_API_URL as string | undefined });
|
|
10
|
-
installGlobalErrorReporting();
|
|
11
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { StrictMode, type ComponentType } from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { ErrorBoundary } from '@tbox.cn/app-sdk-client';
|
|
4
|
-
import { bootstrap } from './bootstrap';
|
|
5
|
-
|
|
6
|
-
export function mountPage(Page: ComponentType): void {
|
|
7
|
-
bootstrap();
|
|
8
|
-
const el = document.getElementById('root');
|
|
9
|
-
if (!el) return;
|
|
10
|
-
createRoot(el).render(
|
|
11
|
-
<StrictMode>
|
|
12
|
-
<ErrorBoundary
|
|
13
|
-
fallback={
|
|
14
|
-
<main style={{ padding: 24 }}>
|
|
15
|
-
<h1>页面暂时不可用</h1>
|
|
16
|
-
<button type="button" onClick={() => window.location.reload()}>
|
|
17
|
-
重新加载
|
|
18
|
-
</button>
|
|
19
|
-
</main>
|
|
20
|
-
}
|
|
21
|
-
>
|
|
22
|
-
<Page />
|
|
23
|
-
</ErrorBoundary>
|
|
24
|
-
</StrictMode>,
|
|
25
|
-
);
|
|
26
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
color-scheme: light;
|
|
3
|
-
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
|
4
|
-
color: #1f2329;
|
|
5
|
-
background: #f7f8fa;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
* {
|
|
9
|
-
box-sizing: border-box;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
html,
|
|
13
|
-
body,
|
|
14
|
-
#root {
|
|
15
|
-
min-height: 100%;
|
|
16
|
-
margin: 0;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
body {
|
|
20
|
-
margin: 0;
|
|
21
|
-
}
|
package/scripts/agents-check.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync } from 'node:fs';
|
|
2
|
-
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { composeAgents } from '@tbox.cn/app-build';
|
|
5
|
-
|
|
6
|
-
const root = process.cwd();
|
|
7
|
-
const modulesDir = path.join(root, 'modules');
|
|
8
|
-
const hasModules = existsSync(modulesDir) && readdirSync(modulesDir, { withFileTypes: true }).some((entry) => entry.isDirectory());
|
|
9
|
-
const composed = await composeAgents({ appKind: 'web', hasModules });
|
|
10
|
-
const targets = [
|
|
11
|
-
['AGENTS.md', composed.root],
|
|
12
|
-
['apps/AGENTS.md', composed.app],
|
|
13
|
-
];
|
|
14
|
-
if (composed.modules) targets.push(['modules/AGENTS.md', composed.modules]);
|
|
15
|
-
let failed = false;
|
|
16
|
-
for (const [file, expected] of targets) {
|
|
17
|
-
const actual = await readFile(path.join(root, file), 'utf8');
|
|
18
|
-
if (!actual.includes(expected)) {
|
|
19
|
-
console.error(`AGENTS drift: ${file}`);
|
|
20
|
-
failed = true;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (failed) process.exitCode = 1;
|
package/scripts/agents-sync.mjs
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { existsSync, readdirSync } from 'node:fs';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { syncAgents } from '@tbox.cn/app-build';
|
|
4
|
-
|
|
5
|
-
const root = process.cwd();
|
|
6
|
-
const modulesDir = path.join(root, 'modules');
|
|
7
|
-
const hasModules = existsSync(modulesDir) && readdirSync(modulesDir, { withFileTypes: true }).some((entry) => entry.isDirectory());
|
|
8
|
-
const written = await syncAgents({ root, appKind: 'web', hasModules, allowAppend: true });
|
|
9
|
-
for (const file of written) console.log(`✅ ${path.relative(root, file)}`);
|