create-quadrokit 0.2.2 → 0.2.3

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.
Files changed (34) hide show
  1. package/README.md +6 -4
  2. package/dist/copy-tree.mjs +33 -0
  3. package/dist/index.mjs +48 -32
  4. package/dist/inject-quadrokit-generate.mjs +10 -0
  5. package/package.json +4 -2
  6. package/template-common/.cursor/rules/commitlint-conventional.mdc +47 -0
  7. package/template-common/.env.example +7 -0
  8. package/template-common/biome.json +12 -0
  9. package/template-common/postcss.config.js +6 -0
  10. package/template-common/src/vite-env.d.ts +9 -0
  11. package/template-common/tsconfig.app.json +16 -0
  12. package/template-common/tsconfig.base.json +20 -0
  13. package/template-common/tsconfig.json +4 -0
  14. package/template-common/tsconfig.node.json +10 -0
  15. package/templates/admin-shell/.env.example +5 -0
  16. package/templates/admin-shell/package.json +1 -1
  17. package/templates/admin-shell/tsconfig.app.json +1 -1
  18. package/templates/admin-shell/tsconfig.base.json +20 -0
  19. package/templates/admin-shell/tsconfig.node.json +1 -1
  20. package/templates/dashboard/.env.example +5 -0
  21. package/templates/dashboard/package.json +1 -1
  22. package/templates/dashboard/tsconfig.app.json +1 -1
  23. package/templates/dashboard/tsconfig.base.json +20 -0
  24. package/templates/dashboard/tsconfig.node.json +1 -1
  25. package/templates/ecommerce/.env.example +5 -0
  26. package/templates/ecommerce/package.json +1 -1
  27. package/templates/ecommerce/tsconfig.app.json +1 -1
  28. package/templates/ecommerce/tsconfig.base.json +20 -0
  29. package/templates/ecommerce/tsconfig.node.json +1 -1
  30. package/templates/website/.env.example +5 -0
  31. package/templates/website/package.json +1 -1
  32. package/templates/website/tsconfig.app.json +1 -1
  33. package/templates/website/tsconfig.base.json +20 -0
  34. package/templates/website/tsconfig.node.json +1 -1
package/README.md CHANGED
@@ -26,10 +26,12 @@ Interactive mode: run without `--template` / `--dir` to be prompted for those; y
26
26
  ## What it does
27
27
 
28
28
  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).
29
- 2. Rewrites `src/lib/quadro-client.ts` to import from `../../.quadrokit/generated/client.gen.js`.
30
- 3. 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`.
31
- 4. Writes `QUADROKIT.md` with proxy and `quadrokit:generate` instructions. Does **not** copy `.quadrokit/generated` run `bun run quadrokit:generate` after install.
32
- 5. Optionally runs `git init` and installs dependencies (`bun` if available, otherwise `npm`).
29
+ 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, run `bun run sync:template-common` before template `build`/`typecheck` (also runs as part of root `bun run build`).
30
+ 3. Rewrites `src/lib/quadro-client.ts` to import from `../../.quadrokit/generated/client.gen.js`.
31
+ 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`.
32
+ 5. Writes `QUADROKIT.md` with proxy and `quadrokit:generate` instructions. Does **not** copy `.quadrokit/generated` — run `bun run quadrokit:generate` after install.
33
+ 6. Adds a root `.gitignore` (unless the template already shipped one).
34
+ 7. Optionally runs `git init` and installs dependencies (`bun` if available, otherwise `npm`).
33
35
 
34
36
  ## Published usage (future)
35
37
 
@@ -0,0 +1,33 @@
1
+ import { cp, mkdir, readdir } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ /** Names skipped when copying templates or template-common (lockfiles, build output). */
4
+ export const TEMPLATE_COPY_SKIP = new Set([
5
+ 'node_modules',
6
+ 'dist',
7
+ '.turbo',
8
+ '.quadrokit',
9
+ 'bun.lock',
10
+ 'bun.lockb',
11
+ 'package-lock.json',
12
+ 'pnpm-lock.yaml',
13
+ 'yarn.lock',
14
+ ]);
15
+ export async function copyTree(src, dest, options = {}) {
16
+ const skip = options.skipNames ?? TEMPLATE_COPY_SKIP;
17
+ const { dereference = false } = options;
18
+ await mkdir(dest, { recursive: true });
19
+ const entries = await readdir(src, { withFileTypes: true });
20
+ for (const e of entries) {
21
+ if (skip.has(e.name)) {
22
+ continue;
23
+ }
24
+ const from = path.join(src, e.name);
25
+ const to = path.join(dest, e.name);
26
+ if (e.isDirectory()) {
27
+ await copyTree(from, to, options);
28
+ }
29
+ else {
30
+ await cp(from, to, { force: true, dereference });
31
+ }
32
+ }
33
+ }
package/dist/index.mjs CHANGED
@@ -1,10 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from 'node:child_process';
3
3
  import { readFileSync } from 'node:fs';
4
- import { cp, mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
4
+ import { 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';
8
+ import { copyTree, TEMPLATE_COPY_SKIP } from './copy-tree.mjs';
8
9
  const MIN_NODE_MAJOR = 18;
9
10
  function cmdVersion(cmd, args) {
10
11
  const r = spawnSync(cmd, args, { encoding: 'utf8', shell: false });
@@ -124,33 +125,17 @@ async function pathExists(p) {
124
125
  return false;
125
126
  }
126
127
  }
127
- const SKIP_TEMPLATE_NAMES = new Set([
128
- 'node_modules',
129
- 'dist',
130
- '.turbo',
131
- '.quadrokit',
132
- 'bun.lock',
133
- 'bun.lockb',
134
- 'package-lock.json',
135
- 'pnpm-lock.yaml',
136
- 'yarn.lock',
137
- ]);
138
128
  async function copyTemplate(src, dest) {
139
- await mkdir(dest, { recursive: true });
140
- const entries = await readdir(src, { withFileTypes: true });
141
- for (const e of entries) {
142
- if (SKIP_TEMPLATE_NAMES.has(e.name)) {
143
- continue;
144
- }
145
- const from = path.join(src, e.name);
146
- const to = path.join(dest, e.name);
147
- if (e.isDirectory()) {
148
- await copyTemplate(from, to);
149
- }
150
- else {
151
- await cp(from, to);
152
- }
129
+ await copyTree(src, dest, { skipNames: TEMPLATE_COPY_SKIP });
130
+ }
131
+ /** Overlay shared files from template-common (same as monorepo packages/templates sync). */
132
+ async function injectTemplateCommon(dest) {
133
+ const common = path.join(packageRoot(), 'template-common');
134
+ if (!(await pathExists(common))) {
135
+ console.warn(' ⚠️ template-common missing skipping common file overlay.');
136
+ return;
153
137
  }
138
+ await copyTree(common, dest, { skipNames: TEMPLATE_COPY_SKIP });
154
139
  }
155
140
  /** Caret range for published @quadrokit/* deps (matches create-quadrokit release line). */
156
141
  function quadrokitPublishedSemverRange() {
@@ -190,6 +175,10 @@ async function patchPackageJson(dest, projectName, keepWorkspace) {
190
175
  if (!keepWorkspace) {
191
176
  rewriteWorkspaceDeps(pkg);
192
177
  }
178
+ const scripts = pkg.scripts;
179
+ if (scripts) {
180
+ scripts['quadrokit:generate'] = 'quadrokit-client generate';
181
+ }
193
182
  await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf8');
194
183
  }
195
184
  /** Standalone Biome config for projects outside the monorepo (no `extends` to repo root). */
@@ -234,25 +223,50 @@ Created with **create-quadrokit** (template: \`${template}\`).
234
223
  ## Next steps
235
224
 
236
225
  1. \`cd ${path.basename(dest)}\` and install dependencies (\`bun install\` or \`npm install\`).
237
- 2. Generate the typed REST client (required before \`dev\` / \`build\`):
226
+ 2. Copy \`.env.example\` to \`.env\` and set \`VITE_4D_ORIGIN\` to your 4D web server (used for the dev proxy and as the default catalog origin for generate).
227
+
228
+ 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):
238
229
 
239
230
  \`\`\`bash
240
231
  bun run quadrokit:generate
241
232
  \`\`\`
242
233
 
243
- This uses \`assets/catalog.placeholder.json\` by default (demo catalog from QuadroKit). Point at your live 4D catalog:
234
+ Same as \`quadrokit-client generate\`. One-off (no local install): \`bunx -p @quadrokit/client quadrokit-client generate\` (or \`bunx quadrokit-client generate\`).
244
235
 
245
- \`\`\`bash
246
- QUADROKIT_CATALOG_URL='http://localhost:7080/rest/\\$catalog' QUADROKIT_CATALOG_TOKEN='…' bun run quadrokit:generate
247
- \`\`\`
236
+ Default catalog URL: \`\${VITE_4D_ORIGIN}/rest/\\$catalog\`, or \`http://127.0.0.1:7080/rest/\\$catalog\` if unset. Generator-only \`.env\` keys (not used by the browser):
237
+
238
+ - \`QUADROKIT_ACCESS_KEY\` — multipart \`accessKey\` to \`/api/login\`; then \`4DAdminSID\` for the catalog request.
239
+ - \`QUADROKIT_LOGIN_URL\` — full login URL if not \`\${catalog origin}/api/login\`.
240
+
241
+ Flags: \`--url\`, \`--access-key\`, \`--login-url\`, \`--token\` / \`QUADROKIT_CATALOG_TOKEN\` (Bearer).
248
242
 
249
- 3. Copy \`.env.example\` to \`.env\` and set \`VITE_4D_ORIGIN\` to your 4D web server.
250
243
  4. \`bun run dev\` — the dev server proxies \`/rest\` to \`VITE_4D_ORIGIN\` so **4DSID_** cookies stay same-origin.
251
244
 
252
245
  Production: serve the SPA and reverse-proxy \`/rest\` to 4D on the **same host** as the UI.
253
246
  `;
254
247
  await writeFile(path.join(dest, 'QUADROKIT.md'), text, 'utf8');
255
248
  }
249
+ async function writeGitignore(dest) {
250
+ const p = path.join(dest, '.gitignore');
251
+ if (await pathExists(p)) {
252
+ return;
253
+ }
254
+ const body = `node_modules
255
+ dist
256
+ .DS_Store
257
+ *.log
258
+ *.local
259
+ .env
260
+ .env.*.local
261
+
262
+ # Vite / tsc
263
+ *.tsbuildinfo
264
+
265
+ # Optional: do not commit generated REST client (see QUADROKIT.md)
266
+ # .quadrokit/generated/
267
+ `;
268
+ await writeFile(p, body, 'utf8');
269
+ }
256
270
  async function main() {
257
271
  const argv = process.argv.slice(2);
258
272
  const { template: tArg, dir: dirArg, keepWorkspace, initGit: gitFlag, installDeps: installFlag, } = parseArgs(argv);
@@ -298,6 +312,7 @@ async function main() {
298
312
  process.exit(1);
299
313
  }
300
314
  await copyTemplate(src, dest);
315
+ await injectTemplateCommon(dest);
301
316
  await writeStandaloneBiome(dest, keepWorkspace);
302
317
  await patchPackageJson(dest, path
303
318
  .basename(dest)
@@ -305,6 +320,7 @@ async function main() {
305
320
  .toLowerCase() || 'quadro-app', keepWorkspace);
306
321
  await writeQuadroClientImport(dest);
307
322
  await writeReadme(dest, template);
323
+ await writeGitignore(dest);
308
324
  console.log(`\n 🎉 Project files are ready at ${'\u001b[1m'}${dest}${'\u001b[0m'}\n`);
309
325
  let initGit = gitFlag;
310
326
  if (initGit === undefined) {
@@ -0,0 +1,10 @@
1
+ import { mkdir, readFile, writeFile } from 'node:fs/promises';
2
+ import path from 'node:path';
3
+ /** Copy the shared generate runner into the new project (TypeScript; run with `bun`). */
4
+ export async function injectQuadrokitGenerateScript(dest, createPackageRoot) {
5
+ const srcPath = path.join(createPackageRoot, 'scaffold-scripts', 'quadrokit-generate.ts');
6
+ const body = await readFile(srcPath, 'utf8');
7
+ const outDir = path.join(dest, 'scripts');
8
+ await mkdir(outDir, { recursive: true });
9
+ await writeFile(path.join(outDir, 'quadrokit-generate.ts'), body, 'utf8');
10
+ }
package/package.json CHANGED
@@ -1,18 +1,20 @@
1
1
  {
2
2
  "name": "create-quadrokit",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Scaffold a QuadroKit Vite + React app from a template",
5
5
  "type": "module",
6
6
  "bin": "./dist/index.mjs",
7
7
  "files": [
8
8
  "dist",
9
9
  "templates",
10
+ "template-common",
10
11
  "biome.monorepo.json"
11
12
  ],
12
13
  "scripts": {
13
14
  "build": "tsc -p tsconfig.build.json && bun ../scripts/rename-dist-js-to-mjs.ts dist",
14
15
  "typecheck": "tsc -p tsconfig.json --noEmit",
15
- "prepublishOnly": "bun run scripts/sync-for-publish.ts && bun run build"
16
+ "prepublishOnly": "bun run scripts/sync-template-common-into-packages.ts && bun run scripts/sync-for-publish.ts && bun run build",
17
+ "sync:template-common": "bun run scripts/sync-template-common-into-packages.ts"
16
18
  },
17
19
  "dependencies": {
18
20
  "prompts": "^2.4.2"
@@ -0,0 +1,47 @@
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)
@@ -0,0 +1,7 @@
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
@@ -0,0 +1,12 @@
1
+ {
2
+ "root": false,
3
+ "extends": "//",
4
+ "vcs": {
5
+ "enabled": true,
6
+ "clientKind": "git",
7
+ "useIgnoreFile": false
8
+ },
9
+ "files": {
10
+ "includes": ["**", "!**/node_modules", "!**/dist", "!**/.quadrokit"]
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ tailwindcss: {},
4
+ autoprefixer: {},
5
+ },
6
+ }
@@ -0,0 +1,9 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ interface ImportMetaEnv {
4
+ readonly VITE_4D_ORIGIN?: string
5
+ }
6
+
7
+ interface ImportMeta {
8
+ readonly env: ImportMetaEnv
9
+ }
@@ -0,0 +1,16 @@
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
+ }
@@ -0,0 +1,20 @@
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
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "files": [],
3
+ "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }]
4
+ }
@@ -0,0 +1,10 @@
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,2 +1,7 @@
1
1
  # Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
2
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
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "quadrokit:generate": "node scripts/quadrokit-generate.mjs",
7
+ "quadrokit:generate": "quadrokit-client generate",
8
8
  "dev": "vite",
9
9
  "build": "tsc -b && vite build",
10
10
  "preview": "vite preview",
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
5
  "useDefineForClassFields": true,
@@ -0,0 +1,20 @@
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,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
5
  "noEmit": true,
@@ -1,2 +1,7 @@
1
1
  # Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
2
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
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "quadrokit:generate": "node scripts/quadrokit-generate.mjs",
7
+ "quadrokit:generate": "quadrokit-client generate",
8
8
  "dev": "vite",
9
9
  "build": "tsc -b && vite build",
10
10
  "preview": "vite preview",
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
5
  "useDefineForClassFields": true,
@@ -0,0 +1,20 @@
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,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
5
  "noEmit": true,
@@ -1,2 +1,7 @@
1
1
  # Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
2
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
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "quadrokit:generate": "node scripts/quadrokit-generate.mjs",
7
+ "quadrokit:generate": "quadrokit-client generate",
8
8
  "dev": "vite",
9
9
  "build": "tsc -b && vite build",
10
10
  "preview": "vite preview",
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
5
  "useDefineForClassFields": true,
@@ -0,0 +1,20 @@
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,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
5
  "noEmit": true,
@@ -1,2 +1,7 @@
1
1
  # Origin of your 4D web server (REST). The Vite dev server proxies /rest here.
2
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
@@ -4,7 +4,7 @@
4
4
  "private": true,
5
5
  "type": "module",
6
6
  "scripts": {
7
- "quadrokit:generate": "node scripts/quadrokit-generate.mjs",
7
+ "quadrokit:generate": "quadrokit-client generate",
8
8
  "dev": "vite",
9
9
  "build": "tsc -b && vite build",
10
10
  "preview": "vite preview",
@@ -1,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
5
  "useDefineForClassFields": true,
@@ -0,0 +1,20 @@
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,5 +1,5 @@
1
1
  {
2
- "extends": "../../../tsconfig.base.json",
2
+ "extends": "./tsconfig.base.json",
3
3
  "compilerOptions": {
4
4
  "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
5
  "noEmit": true,