create-quadrokit 0.2.5 → 0.2.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/README.md +7 -5
- package/dist/index.mjs +66 -7
- package/package.json +1 -1
- package/template-common/tsconfig.app.json +4 -2
- package/{templates/ecommerce → template-common}/vite.config.ts +1 -0
- package/templates/README.md +5 -3
- package/templates/admin-shell/.cursor/rules/commitlint-conventional.mdc +0 -47
- package/templates/admin-shell/.env.example +0 -9
- package/templates/admin-shell/biome.json +0 -12
- package/templates/admin-shell/postcss.config.js +0 -6
- package/templates/admin-shell/src/vite-env.d.ts +0 -9
- package/templates/admin-shell/tsconfig.app.json +0 -16
- package/templates/admin-shell/tsconfig.base.json +0 -20
- package/templates/admin-shell/tsconfig.json +0 -4
- package/templates/admin-shell/tsconfig.node.json +0 -10
- package/templates/admin-shell/vite.config.ts +0 -25
- package/templates/dashboard/.cursor/rules/commitlint-conventional.mdc +0 -47
- package/templates/dashboard/.env.example +0 -9
- package/templates/dashboard/biome.json +0 -12
- package/templates/dashboard/postcss.config.js +0 -6
- package/templates/dashboard/src/vite-env.d.ts +0 -9
- package/templates/dashboard/tsconfig.app.json +0 -16
- package/templates/dashboard/tsconfig.base.json +0 -20
- package/templates/dashboard/tsconfig.json +0 -4
- package/templates/dashboard/tsconfig.node.json +0 -10
- package/templates/dashboard/vite.config.ts +0 -25
- package/templates/ecommerce/.cursor/rules/commitlint-conventional.mdc +0 -47
- package/templates/ecommerce/.env.example +0 -9
- package/templates/ecommerce/biome.json +0 -12
- package/templates/ecommerce/postcss.config.js +0 -6
- package/templates/ecommerce/src/vite-env.d.ts +0 -9
- package/templates/ecommerce/tsconfig.app.json +0 -16
- package/templates/ecommerce/tsconfig.base.json +0 -20
- package/templates/ecommerce/tsconfig.json +0 -4
- package/templates/ecommerce/tsconfig.node.json +0 -10
- package/templates/website/.cursor/rules/commitlint-conventional.mdc +0 -47
- package/templates/website/.env.example +0 -9
- package/templates/website/biome.json +0 -12
- package/templates/website/postcss.config.js +0 -6
- package/templates/website/src/vite-env.d.ts +0 -9
- package/templates/website/tsconfig.app.json +0 -16
- package/templates/website/tsconfig.base.json +0 -20
- package/templates/website/tsconfig.json +0 -4
- package/templates/website/tsconfig.node.json +0 -10
- package/templates/website/vite.config.ts +0 -25
package/README.md
CHANGED
|
@@ -16,27 +16,29 @@ bun create-quadrokit/src/index.ts --template dashboard --dir /path/to/my-app
|
|
|
16
16
|
| `--template <name>` | `dashboard` \| `website` \| `ecommerce` \| `admin-shell` |
|
|
17
17
|
| `--dir <path>` | Target directory relative to cwd (created; must be empty if it already exists) |
|
|
18
18
|
| `--name <name>` | Same as `--dir` (project folder name); ignored if `--dir` is set |
|
|
19
|
-
| `-y` / `--yes` | Non-interactive: requires `--template`; uses `quadro-<template>` as the directory unless `--dir` / `--name` is set; runs git init and install without prompting (override with `--no-git` / `--no-install`) |
|
|
19
|
+
| `-y` / `--yes` | Non-interactive: requires `--template`; uses `quadro-<template>` as the directory unless `--dir` / `--name` is set; copies `.env.example` → `.env`, runs git init and install without prompting (override with `--no-copy-env` / `--no-git` / `--no-install`) |
|
|
20
20
|
| `-h` / `--help` | Print usage and exit |
|
|
21
21
|
| `--keep-workspace` | Keep `workspace:*` in `package.json` (for development inside the QuadroKit monorepo only) |
|
|
22
22
|
| `--git` / `--no-git` | Initialize a git repo after scaffolding (skip the prompt) |
|
|
23
23
|
| `--install` / `--no-install` | Run `bun install` or `npm install` after scaffolding (skip the prompt) |
|
|
24
|
+
| `--copy-env` / `--no-copy-env` | Copy `.env.example` to `.env` after scaffolding (skip the prompt) |
|
|
24
25
|
|
|
25
26
|
The banner shows **create-quadrokit**’s package version (e.g. `v0.2.2`).
|
|
26
27
|
|
|
27
28
|
On start, the CLI prints a short **prerequisites** check (Node.js, Bun, Git). Node 18+ is required; Bun is optional (falls back to npm for installs). Git is only needed if you choose to init a repository.
|
|
28
29
|
|
|
29
|
-
Interactive mode: run without `--template` / `--dir` / `--name` to be prompted. If the project directory already exists and is **not empty**, you are asked again for a different name. You are then asked about **git** and **install
|
|
30
|
+
Interactive mode: run without `--template` / `--dir` / `--name` to be prompted. If the project directory already exists and is **not empty**, you are asked again for a different name. You are then asked whether to copy **`.env.example` → `.env`**, then about **git** and **install**, unless `-y` or the explicit flags above apply.
|
|
30
31
|
|
|
31
32
|
## What it does
|
|
32
33
|
|
|
33
34
|
1. Copies the chosen template from `create-quadrokit/templates/<name>` when installed from npm, or `packages/templates/<name>` when you run the CLI from the monorepo (skips `node_modules`, `dist`, `.quadrokit`, lockfiles).
|
|
34
|
-
2. Overlays **`template-common/`** (shared across all templates): `.env.example`, `tsconfig*.json`, `postcss.config.js`, `biome.json`, `src/vite-env.d.ts`, `.cursor/rules/commitlint-conventional.mdc`, etc. In the monorepo,
|
|
35
|
-
3. Rewrites `src/lib/quadro-client.ts` to import from
|
|
35
|
+
2. Overlays **`template-common/`** (shared across all templates): `.env.example`, `vite.config.ts`, `tsconfig*.json`, `postcss.config.js`, `biome.json`, `src/vite-env.d.ts`, `.cursor/rules/commitlint-conventional.mdc`, etc. In the monorepo, `packages/templates/*` receives the same overlay via `bun run sync:template-common` (root **postinstall** and `bun run build`); those paths are gitignored under `packages/templates/` so only `template-common/` is the source of truth in git.
|
|
36
|
+
3. Rewrites `src/lib/quadro-client.ts` to import from `@quadrokit/generated/client.gen.js` (alias in `vite.config.ts` / `tsconfig.app.json`).
|
|
36
37
|
4. Removes `@quadrokit/sample-client` and rewrites `workspace:*` on `@quadrokit/*` deps to `^<version>` matching **create-quadrokit**’s own `package.json` `version` (run `bun run version:set` at repo root to bump public packages) unless `--keep-workspace`.
|
|
37
38
|
5. Writes `QUADROKIT.md` with proxy and `quadrokit:generate` instructions. Does **not** copy `.quadrokit/generated` — run `bun run quadrokit:generate` after install.
|
|
38
39
|
6. Adds a root `.gitignore` (unless the template already shipped one).
|
|
39
|
-
7. Optionally
|
|
40
|
+
7. Optionally copies `.env.example` to `.env` (prompt, or defaults with `-y`; use `--no-copy-env` to skip).
|
|
41
|
+
8. Optionally runs `git init` and installs dependencies (`bun` if available, otherwise `npm`).
|
|
40
42
|
|
|
41
43
|
## Published usage (future)
|
|
42
44
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { spawnSync } from 'node:child_process';
|
|
3
3
|
import { readFileSync } from 'node:fs';
|
|
4
|
-
import { readdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { copyFile, readdir, readFile, stat, writeFile } from 'node:fs/promises';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { fileURLToPath } from 'node:url';
|
|
7
7
|
import prompts from 'prompts';
|
|
@@ -63,11 +63,14 @@ Options:
|
|
|
63
63
|
--dir <path> Project directory (relative to cwd; must not exist or be empty)
|
|
64
64
|
--name <name> Same as --dir when --dir is omitted
|
|
65
65
|
-y, --yes Non-interactive: requires --template; uses quadro-<template> as directory
|
|
66
|
-
unless --dir / --name; runs git init + install
|
|
66
|
+
unless --dir / --name; copies .env.example → .env, runs git init + install
|
|
67
|
+
(override with --no-copy-env / --no-git / --no-install)
|
|
67
68
|
--git Initialize a git repository (skips prompt)
|
|
68
69
|
--no-git Do not run git init
|
|
69
70
|
--install Install dependencies after scaffold (skips prompt)
|
|
70
71
|
--no-install Do not install dependencies
|
|
72
|
+
--copy-env Copy .env.example to .env (skips prompt)
|
|
73
|
+
--no-copy-env Do not copy .env.example to .env
|
|
71
74
|
--keep-workspace Keep workspace:* @quadrokit deps (monorepo development only)
|
|
72
75
|
-h, --help Show this help
|
|
73
76
|
|
|
@@ -130,6 +133,7 @@ function parseArgs(argv) {
|
|
|
130
133
|
/** `undefined` = prompt later (unless yes) */
|
|
131
134
|
let initGit;
|
|
132
135
|
let installDeps;
|
|
136
|
+
let copyEnvFile;
|
|
133
137
|
for (let i = 0; i < argv.length; i++) {
|
|
134
138
|
const a = argv[i];
|
|
135
139
|
if (a === '--template' && argv[i + 1]) {
|
|
@@ -159,11 +163,17 @@ function parseArgs(argv) {
|
|
|
159
163
|
else if (a === '--no-install') {
|
|
160
164
|
installDeps = false;
|
|
161
165
|
}
|
|
166
|
+
else if (a === '--copy-env') {
|
|
167
|
+
copyEnvFile = true;
|
|
168
|
+
}
|
|
169
|
+
else if (a === '--no-copy-env') {
|
|
170
|
+
copyEnvFile = false;
|
|
171
|
+
}
|
|
162
172
|
}
|
|
163
173
|
if (!dir && name) {
|
|
164
174
|
dir = name;
|
|
165
175
|
}
|
|
166
|
-
return { template, dir, keepWorkspace, yes, initGit, installDeps };
|
|
176
|
+
return { template, dir, keepWorkspace, yes, initGit, installDeps, copyEnvFile };
|
|
167
177
|
}
|
|
168
178
|
async function pathExists(p) {
|
|
169
179
|
try {
|
|
@@ -319,7 +329,7 @@ async function writeStandaloneBiome(dest, keepWorkspace) {
|
|
|
319
329
|
}
|
|
320
330
|
async function writeQuadroClientImport(dest) {
|
|
321
331
|
const p = path.join(dest, 'src', 'lib', 'quadro-client.ts');
|
|
322
|
-
const body = `import { createClient } from '
|
|
332
|
+
const body = `import { createClient } from '@quadrokit/generated/client.gen.js';
|
|
323
333
|
|
|
324
334
|
/** Same-origin \`/rest\` in dev (Vite proxy) and production (reverse proxy). */
|
|
325
335
|
export const quadro = createClient({ baseURL: '/rest' });
|
|
@@ -334,7 +344,7 @@ Created with **create-quadrokit** (template: \`${template}\`).
|
|
|
334
344
|
## Next steps
|
|
335
345
|
|
|
336
346
|
1. \`cd ${path.basename(dest)}\` and install dependencies (\`bun install\` or \`npm install\`).
|
|
337
|
-
2.
|
|
347
|
+
2. If \`.env\` is missing, copy \`.env.example\` to \`.env\`. Set \`VITE_4D_ORIGIN\` to your 4D web server (used for the dev proxy and as the default catalog origin for generate). The scaffold CLI can copy this file for you when asked.
|
|
338
348
|
|
|
339
349
|
3. Generate the typed REST client (required before \`dev\` / \`build\`). The CLI is \`quadrokit-client\` from \`@quadrokit/client\` (reads \`.env\` in the project cwd for defaults):
|
|
340
350
|
|
|
@@ -358,6 +368,22 @@ Production: serve the SPA and reverse-proxy \`/rest\` to 4D on the **same host**
|
|
|
358
368
|
`;
|
|
359
369
|
await writeFile(path.join(dest, 'QUADROKIT.md'), text, 'utf8');
|
|
360
370
|
}
|
|
371
|
+
/** Copy `.env.example` → `.env` when the latter does not exist. */
|
|
372
|
+
async function copyEnvExampleToEnv(dest) {
|
|
373
|
+
const from = path.join(dest, '.env.example');
|
|
374
|
+
const to = path.join(dest, '.env');
|
|
375
|
+
if (!(await pathExists(from))) {
|
|
376
|
+
console.warn(' ⚠️ .env.example missing — skipped env copy.\n');
|
|
377
|
+
return false;
|
|
378
|
+
}
|
|
379
|
+
if (await pathExists(to)) {
|
|
380
|
+
console.log(' ⚠️ .env already exists — skipped copying .env.example.\n');
|
|
381
|
+
return false;
|
|
382
|
+
}
|
|
383
|
+
await copyFile(from, to);
|
|
384
|
+
console.log(' ✅ Copied .env.example → .env\n');
|
|
385
|
+
return true;
|
|
386
|
+
}
|
|
361
387
|
async function writeGitignore(dest) {
|
|
362
388
|
const p = path.join(dest, '.gitignore');
|
|
363
389
|
if (await pathExists(p)) {
|
|
@@ -385,7 +411,7 @@ async function main() {
|
|
|
385
411
|
printHelp(readPackageVersion());
|
|
386
412
|
process.exit(0);
|
|
387
413
|
}
|
|
388
|
-
const { template: tArg, dir: dirArg, keepWorkspace, yes: yesFlag, initGit: gitFlag, installDeps: installFlag, } = parseArgs(argv);
|
|
414
|
+
const { template: tArg, dir: dirArg, keepWorkspace, yes: yesFlag, initGit: gitFlag, installDeps: installFlag, copyEnvFile: copyEnvFlag, } = parseArgs(argv);
|
|
389
415
|
printWelcome(readPackageVersion());
|
|
390
416
|
const prereqs = checkPrereqs();
|
|
391
417
|
printPrereqReport(prereqs);
|
|
@@ -427,6 +453,28 @@ async function main() {
|
|
|
427
453
|
await writeReadme(dest, template);
|
|
428
454
|
await writeGitignore(dest);
|
|
429
455
|
console.log(`\n 🎉 Project files are ready at ${'\u001b[1m'}${dest}${'\u001b[0m'}\n`);
|
|
456
|
+
let copyEnv = copyEnvFlag;
|
|
457
|
+
if (copyEnv === undefined) {
|
|
458
|
+
if (yesFlag) {
|
|
459
|
+
copyEnv = true;
|
|
460
|
+
}
|
|
461
|
+
else {
|
|
462
|
+
const envPrompt = await prompts({
|
|
463
|
+
type: 'confirm',
|
|
464
|
+
name: 'v',
|
|
465
|
+
message: 'Copy .env.example to .env?',
|
|
466
|
+
initial: true,
|
|
467
|
+
});
|
|
468
|
+
if (typeof envPrompt.v !== 'boolean') {
|
|
469
|
+
process.exit(1);
|
|
470
|
+
}
|
|
471
|
+
copyEnv = envPrompt.v;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
let envCopiedOk = false;
|
|
475
|
+
if (copyEnv) {
|
|
476
|
+
envCopiedOk = await copyEnvExampleToEnv(dest);
|
|
477
|
+
}
|
|
430
478
|
let initGit = gitFlag;
|
|
431
479
|
if (initGit === undefined) {
|
|
432
480
|
if (yesFlag) {
|
|
@@ -493,10 +541,21 @@ async function main() {
|
|
|
493
541
|
const pm = prereqs.bunOk ? 'bun' : 'npm';
|
|
494
542
|
const runDev = prereqs.bunOk ? 'bun run dev' : 'npm run dev';
|
|
495
543
|
const installLine = installDeps ? ` → ${runDev}` : ` → ${pm} install\n → ${runDev}`;
|
|
544
|
+
const hasEnvFile = await pathExists(path.join(dest, '.env'));
|
|
545
|
+
let envHint;
|
|
546
|
+
if (envCopiedOk || hasEnvFile) {
|
|
547
|
+
envHint = ` → Set VITE_4D_ORIGIN in .env (if needed)`;
|
|
548
|
+
}
|
|
549
|
+
else if (!copyEnv) {
|
|
550
|
+
envHint = ` → Copy .env.example → .env and set VITE_4D_ORIGIN`;
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
envHint = ` → Create .env from .env.example and set VITE_4D_ORIGIN`;
|
|
554
|
+
}
|
|
496
555
|
console.log(` 🚀🚀 Next steps
|
|
497
556
|
→ cd ${path.basename(dest)}
|
|
498
557
|
${installLine}
|
|
499
|
-
|
|
558
|
+
${envHint}
|
|
500
559
|
|
|
501
560
|
Happy building! ✨
|
|
502
561
|
`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "./tsconfig.base.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
+
"baseUrl": ".",
|
|
4
5
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
6
|
"useDefineForClassFields": true,
|
|
6
7
|
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
@@ -9,8 +10,9 @@
|
|
|
9
10
|
"jsx": "react-jsx",
|
|
10
11
|
"verbatimModuleSyntax": true,
|
|
11
12
|
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
13
|
+
"@/*": ["./src/*"],
|
|
14
|
+
"@quadrokit/generated/*": [".quadrokit/generated/*"]
|
|
13
15
|
}
|
|
14
16
|
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
17
|
+
"include": ["src/**/*.ts", "src/**/*.tsx", ".quadrokit/generated/**/*.ts"]
|
|
16
18
|
}
|
package/templates/README.md
CHANGED
|
@@ -11,17 +11,19 @@ Vite + React 19 + React Router 7 + **Tailwind 3.4** + **i18next** + **react-hook
|
|
|
11
11
|
|
|
12
12
|
## Monorepo
|
|
13
13
|
|
|
14
|
+
Shared config (Vite, TypeScript, Biome, PostCSS, `.env.example`, etc.) lives in **`../../create-quadrokit/template-common/`** and is copied into each template by **`bun run sync:template-common`** (runs on root **postinstall** and before template builds). Do not edit those files inside `packages/templates/<name>/`—change **`template-common`** and re-sync.
|
|
15
|
+
|
|
14
16
|
```bash
|
|
15
17
|
cd packages/templates/dashboard # or website / ecommerce / admin-shell
|
|
16
|
-
bun install # from repo root once
|
|
18
|
+
bun install # from repo root once (runs sync:template-common)
|
|
17
19
|
bun run dev
|
|
18
20
|
```
|
|
19
21
|
|
|
20
|
-
Copy [
|
|
22
|
+
Copy [`template-common/.env.example`](../../create-quadrokit/template-common/.env.example) to `.env` in the template directory and set `VITE_4D_ORIGIN`.
|
|
21
23
|
|
|
22
24
|
## Biome (per template)
|
|
23
25
|
|
|
24
|
-
Each template
|
|
26
|
+
Each template uses a `biome.json` (from `template-common`) with `"root": false` and `"extends": "//"` (Biome v2 monorepo pattern: inherit repo root, scope files to that template). `vcs.useIgnoreFile` is off so Biome does not require a `.gitignore` next to the template.
|
|
25
27
|
|
|
26
28
|
| Script | Purpose |
|
|
27
29
|
|--------|---------|
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Commit messages must follow Conventional Commits (commitlint @commitlint/config-conventional)
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Git commits (Conventional Commits / commitlint)
|
|
7
|
-
|
|
8
|
-
When proposing or writing **commit messages** (including one-line suggestions, full messages, or PR squash titles), use **Conventional Commits** compatible with **@commitlint/config-conventional**.
|
|
9
|
-
|
|
10
|
-
## Header format
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
<type>(<optional-scope>): <short description>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- **type** (pick one): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
|
17
|
-
- **scope** (optional): lowercase, short package or area (e.g. `client`, `templates`, `ui`, `create-quadrokit`)
|
|
18
|
-
- **description**: imperative mood, **lowercase**, **no trailing period**, **≤ ~72 characters** for the subject line
|
|
19
|
-
|
|
20
|
-
## Breaking changes
|
|
21
|
-
|
|
22
|
-
- Add `!` after type or scope: `feat(api)!: remove legacy login endpoint`
|
|
23
|
-
- Or explain in the body with a line starting with `BREAKING CHANGE:`
|
|
24
|
-
|
|
25
|
-
## Body and footer (when needed)
|
|
26
|
-
|
|
27
|
-
- Separate body from subject with a blank line.
|
|
28
|
-
- Wrap body at ~100 chars.
|
|
29
|
-
- Footer: `Refs: #123` / `Fixes: #123` if applicable.
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
feat(client): add entity set release helper
|
|
35
|
-
|
|
36
|
-
fix(templates): correct vite proxy target env var
|
|
37
|
-
|
|
38
|
-
chore: bump biome to 2.4.10
|
|
39
|
-
|
|
40
|
-
docs(readme): document ci:quick script
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Do not
|
|
44
|
-
|
|
45
|
-
- Vague subjects: `update`, `fix stuff`, `wip`
|
|
46
|
-
- End the subject line with a period
|
|
47
|
-
- Use title case for the description (use sentence case / lowercase)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
|
|
2
|
-
VITE_4D_ORIGIN=http://127.0.0.1:7080
|
|
3
|
-
|
|
4
|
-
# Generator only (quadrokit:generate): multipart accessKey → 4DAdminSID cookie for fetching /rest/$catalog.
|
|
5
|
-
# Not used by the browser runtime.
|
|
6
|
-
# QUADROKIT_ACCESS_KEY=
|
|
7
|
-
# QUADROKIT_LOGIN_URL=https://127.0.0.1:7443/api/login
|
|
8
|
-
# QUADROKIT_GENERATE_VERBOSE=1
|
|
9
|
-
# QUADROKIT_INSECURE_TLS=1
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"jsx": "react-jsx",
|
|
10
|
-
"verbatimModuleSyntax": true,
|
|
11
|
-
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"noEmit": true,
|
|
6
|
-
"moduleDetection": "force",
|
|
7
|
-
"types": ["node"]
|
|
8
|
-
},
|
|
9
|
-
"include": ["vite.config.ts", "tailwind.config.ts"]
|
|
10
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
4
|
-
|
|
5
|
-
export default defineConfig(({ mode }) => {
|
|
6
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
7
|
-
const target4d = env.VITE_4D_ORIGIN ?? 'http://127.0.0.1:7080'
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
plugins: [react()],
|
|
11
|
-
resolve: {
|
|
12
|
-
alias: {
|
|
13
|
-
'@': path.resolve(__dirname, 'src'),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
server: {
|
|
17
|
-
proxy: {
|
|
18
|
-
'/rest': {
|
|
19
|
-
target: target4d,
|
|
20
|
-
changeOrigin: true,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
})
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Commit messages must follow Conventional Commits (commitlint @commitlint/config-conventional)
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Git commits (Conventional Commits / commitlint)
|
|
7
|
-
|
|
8
|
-
When proposing or writing **commit messages** (including one-line suggestions, full messages, or PR squash titles), use **Conventional Commits** compatible with **@commitlint/config-conventional**.
|
|
9
|
-
|
|
10
|
-
## Header format
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
<type>(<optional-scope>): <short description>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- **type** (pick one): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
|
17
|
-
- **scope** (optional): lowercase, short package or area (e.g. `client`, `templates`, `ui`, `create-quadrokit`)
|
|
18
|
-
- **description**: imperative mood, **lowercase**, **no trailing period**, **≤ ~72 characters** for the subject line
|
|
19
|
-
|
|
20
|
-
## Breaking changes
|
|
21
|
-
|
|
22
|
-
- Add `!` after type or scope: `feat(api)!: remove legacy login endpoint`
|
|
23
|
-
- Or explain in the body with a line starting with `BREAKING CHANGE:`
|
|
24
|
-
|
|
25
|
-
## Body and footer (when needed)
|
|
26
|
-
|
|
27
|
-
- Separate body from subject with a blank line.
|
|
28
|
-
- Wrap body at ~100 chars.
|
|
29
|
-
- Footer: `Refs: #123` / `Fixes: #123` if applicable.
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
feat(client): add entity set release helper
|
|
35
|
-
|
|
36
|
-
fix(templates): correct vite proxy target env var
|
|
37
|
-
|
|
38
|
-
chore: bump biome to 2.4.10
|
|
39
|
-
|
|
40
|
-
docs(readme): document ci:quick script
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Do not
|
|
44
|
-
|
|
45
|
-
- Vague subjects: `update`, `fix stuff`, `wip`
|
|
46
|
-
- End the subject line with a period
|
|
47
|
-
- Use title case for the description (use sentence case / lowercase)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
|
|
2
|
-
VITE_4D_ORIGIN=http://127.0.0.1:7080
|
|
3
|
-
|
|
4
|
-
# Generator only (quadrokit:generate): multipart accessKey → 4DAdminSID cookie for fetching /rest/$catalog.
|
|
5
|
-
# Not used by the browser runtime.
|
|
6
|
-
# QUADROKIT_ACCESS_KEY=
|
|
7
|
-
# QUADROKIT_LOGIN_URL=https://127.0.0.1:7443/api/login
|
|
8
|
-
# QUADROKIT_GENERATE_VERBOSE=1
|
|
9
|
-
# QUADROKIT_INSECURE_TLS=1
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"jsx": "react-jsx",
|
|
10
|
-
"verbatimModuleSyntax": true,
|
|
11
|
-
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"noEmit": true,
|
|
6
|
-
"moduleDetection": "force",
|
|
7
|
-
"types": ["node"]
|
|
8
|
-
},
|
|
9
|
-
"include": ["vite.config.ts", "tailwind.config.ts"]
|
|
10
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
4
|
-
|
|
5
|
-
export default defineConfig(({ mode }) => {
|
|
6
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
7
|
-
const target4d = env.VITE_4D_ORIGIN ?? 'http://127.0.0.1:7080'
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
plugins: [react()],
|
|
11
|
-
resolve: {
|
|
12
|
-
alias: {
|
|
13
|
-
'@': path.resolve(__dirname, 'src'),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
server: {
|
|
17
|
-
proxy: {
|
|
18
|
-
'/rest': {
|
|
19
|
-
target: target4d,
|
|
20
|
-
changeOrigin: true,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
})
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Commit messages must follow Conventional Commits (commitlint @commitlint/config-conventional)
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Git commits (Conventional Commits / commitlint)
|
|
7
|
-
|
|
8
|
-
When proposing or writing **commit messages** (including one-line suggestions, full messages, or PR squash titles), use **Conventional Commits** compatible with **@commitlint/config-conventional**.
|
|
9
|
-
|
|
10
|
-
## Header format
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
<type>(<optional-scope>): <short description>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- **type** (pick one): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
|
17
|
-
- **scope** (optional): lowercase, short package or area (e.g. `client`, `templates`, `ui`, `create-quadrokit`)
|
|
18
|
-
- **description**: imperative mood, **lowercase**, **no trailing period**, **≤ ~72 characters** for the subject line
|
|
19
|
-
|
|
20
|
-
## Breaking changes
|
|
21
|
-
|
|
22
|
-
- Add `!` after type or scope: `feat(api)!: remove legacy login endpoint`
|
|
23
|
-
- Or explain in the body with a line starting with `BREAKING CHANGE:`
|
|
24
|
-
|
|
25
|
-
## Body and footer (when needed)
|
|
26
|
-
|
|
27
|
-
- Separate body from subject with a blank line.
|
|
28
|
-
- Wrap body at ~100 chars.
|
|
29
|
-
- Footer: `Refs: #123` / `Fixes: #123` if applicable.
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
feat(client): add entity set release helper
|
|
35
|
-
|
|
36
|
-
fix(templates): correct vite proxy target env var
|
|
37
|
-
|
|
38
|
-
chore: bump biome to 2.4.10
|
|
39
|
-
|
|
40
|
-
docs(readme): document ci:quick script
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Do not
|
|
44
|
-
|
|
45
|
-
- Vague subjects: `update`, `fix stuff`, `wip`
|
|
46
|
-
- End the subject line with a period
|
|
47
|
-
- Use title case for the description (use sentence case / lowercase)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
|
|
2
|
-
VITE_4D_ORIGIN=http://127.0.0.1:7080
|
|
3
|
-
|
|
4
|
-
# Generator only (quadrokit:generate): multipart accessKey → 4DAdminSID cookie for fetching /rest/$catalog.
|
|
5
|
-
# Not used by the browser runtime.
|
|
6
|
-
# QUADROKIT_ACCESS_KEY=
|
|
7
|
-
# QUADROKIT_LOGIN_URL=https://127.0.0.1:7443/api/login
|
|
8
|
-
# QUADROKIT_GENERATE_VERBOSE=1
|
|
9
|
-
# QUADROKIT_INSECURE_TLS=1
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"jsx": "react-jsx",
|
|
10
|
-
"verbatimModuleSyntax": true,
|
|
11
|
-
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"noEmit": true,
|
|
6
|
-
"moduleDetection": "force",
|
|
7
|
-
"types": ["node"]
|
|
8
|
-
},
|
|
9
|
-
"include": ["vite.config.ts", "tailwind.config.ts"]
|
|
10
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Commit messages must follow Conventional Commits (commitlint @commitlint/config-conventional)
|
|
3
|
-
alwaysApply: true
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Git commits (Conventional Commits / commitlint)
|
|
7
|
-
|
|
8
|
-
When proposing or writing **commit messages** (including one-line suggestions, full messages, or PR squash titles), use **Conventional Commits** compatible with **@commitlint/config-conventional**.
|
|
9
|
-
|
|
10
|
-
## Header format
|
|
11
|
-
|
|
12
|
-
```
|
|
13
|
-
<type>(<optional-scope>): <short description>
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
- **type** (pick one): `feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`, `build`, `ci`, `chore`, `revert`
|
|
17
|
-
- **scope** (optional): lowercase, short package or area (e.g. `client`, `templates`, `ui`, `create-quadrokit`)
|
|
18
|
-
- **description**: imperative mood, **lowercase**, **no trailing period**, **≤ ~72 characters** for the subject line
|
|
19
|
-
|
|
20
|
-
## Breaking changes
|
|
21
|
-
|
|
22
|
-
- Add `!` after type or scope: `feat(api)!: remove legacy login endpoint`
|
|
23
|
-
- Or explain in the body with a line starting with `BREAKING CHANGE:`
|
|
24
|
-
|
|
25
|
-
## Body and footer (when needed)
|
|
26
|
-
|
|
27
|
-
- Separate body from subject with a blank line.
|
|
28
|
-
- Wrap body at ~100 chars.
|
|
29
|
-
- Footer: `Refs: #123` / `Fixes: #123` if applicable.
|
|
30
|
-
|
|
31
|
-
## Examples
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
feat(client): add entity set release helper
|
|
35
|
-
|
|
36
|
-
fix(templates): correct vite proxy target env var
|
|
37
|
-
|
|
38
|
-
chore: bump biome to 2.4.10
|
|
39
|
-
|
|
40
|
-
docs(readme): document ci:quick script
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Do not
|
|
44
|
-
|
|
45
|
-
- Vague subjects: `update`, `fix stuff`, `wip`
|
|
46
|
-
- End the subject line with a period
|
|
47
|
-
- Use title case for the description (use sentence case / lowercase)
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
# Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
|
|
2
|
-
VITE_4D_ORIGIN=http://127.0.0.1:7080
|
|
3
|
-
|
|
4
|
-
# Generator only (quadrokit:generate): multipart accessKey → 4DAdminSID cookie for fetching /rest/$catalog.
|
|
5
|
-
# Not used by the browser runtime.
|
|
6
|
-
# QUADROKIT_ACCESS_KEY=
|
|
7
|
-
# QUADROKIT_LOGIN_URL=https://127.0.0.1:7443/api/login
|
|
8
|
-
# QUADROKIT_GENERATE_VERBOSE=1
|
|
9
|
-
# QUADROKIT_INSECURE_TLS=1
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
5
|
-
"useDefineForClassFields": true,
|
|
6
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
-
"moduleDetection": "force",
|
|
8
|
-
"noEmit": true,
|
|
9
|
-
"jsx": "react-jsx",
|
|
10
|
-
"verbatimModuleSyntax": true,
|
|
11
|
-
"paths": {
|
|
12
|
-
"@/*": ["./src/*"]
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"include": ["src/**/*.ts", "src/**/*.tsx"]
|
|
16
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"moduleResolution": "bundler",
|
|
7
|
-
"resolveJsonModule": true,
|
|
8
|
-
"strict": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"noEmit": true,
|
|
11
|
-
"jsx": "react-jsx",
|
|
12
|
-
"isolatedModules": true,
|
|
13
|
-
"verbatimModuleSyntax": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"esModuleInterop": true,
|
|
18
|
-
"allowSyntheticDefaultImports": true
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.base.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
|
5
|
-
"noEmit": true,
|
|
6
|
-
"moduleDetection": "force",
|
|
7
|
-
"types": ["node"]
|
|
8
|
-
},
|
|
9
|
-
"include": ["vite.config.ts", "tailwind.config.ts"]
|
|
10
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import path from 'node:path'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import { defineConfig, loadEnv } from 'vite'
|
|
4
|
-
|
|
5
|
-
export default defineConfig(({ mode }) => {
|
|
6
|
-
const env = loadEnv(mode, process.cwd(), '')
|
|
7
|
-
const target4d = env.VITE_4D_ORIGIN ?? 'http://127.0.0.1:7080'
|
|
8
|
-
|
|
9
|
-
return {
|
|
10
|
-
plugins: [react()],
|
|
11
|
-
resolve: {
|
|
12
|
-
alias: {
|
|
13
|
-
'@': path.resolve(__dirname, 'src'),
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
server: {
|
|
17
|
-
proxy: {
|
|
18
|
-
'/rest': {
|
|
19
|
-
target: target4d,
|
|
20
|
-
changeOrigin: true,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
}
|
|
25
|
-
})
|