create-quadrokit 0.2.1 → 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 +65 -34
  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 other `workspace:*` deps to published semver (`@quadrokit/client` → `^0.2.1`, other `@quadrokit/*` → `^0.2.0`) 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,9 +1,11 @@
1
1
  #!/usr/bin/env node
2
2
  import { spawnSync } from 'node:child_process';
3
- import { cp, mkdir, readdir, readFile, stat, writeFile } from 'node:fs/promises';
3
+ import { readFileSync } from 'node:fs';
4
+ import { readdir, readFile, stat, writeFile } from 'node:fs/promises';
4
5
  import path from 'node:path';
5
6
  import { fileURLToPath } from 'node:url';
6
7
  import prompts from 'prompts';
8
+ import { copyTree, TEMPLATE_COPY_SKIP } from './copy-tree.mjs';
7
9
  const MIN_NODE_MAJOR = 18;
8
10
  function cmdVersion(cmd, args) {
9
11
  const r = spawnSync(cmd, args, { encoding: 'utf8', shell: false });
@@ -123,43 +125,41 @@ async function pathExists(p) {
123
125
  return false;
124
126
  }
125
127
  }
126
- const SKIP_TEMPLATE_NAMES = new Set([
127
- 'node_modules',
128
- 'dist',
129
- '.turbo',
130
- '.quadrokit',
131
- 'bun.lock',
132
- 'bun.lockb',
133
- 'package-lock.json',
134
- 'pnpm-lock.yaml',
135
- 'yarn.lock',
136
- ]);
137
128
  async function copyTemplate(src, dest) {
138
- await mkdir(dest, { recursive: true });
139
- const entries = await readdir(src, { withFileTypes: true });
140
- for (const e of entries) {
141
- if (SKIP_TEMPLATE_NAMES.has(e.name)) {
142
- continue;
143
- }
144
- const from = path.join(src, e.name);
145
- const to = path.join(dest, e.name);
146
- if (e.isDirectory()) {
147
- await copyTemplate(from, to);
148
- }
149
- else {
150
- await cp(from, to);
151
- }
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;
152
137
  }
138
+ await copyTree(common, dest, { skipNames: TEMPLATE_COPY_SKIP });
139
+ }
140
+ /** Caret range for published @quadrokit/* deps (matches create-quadrokit release line). */
141
+ function quadrokitPublishedSemverRange() {
142
+ try {
143
+ const raw = readFileSync(path.join(packageRoot(), 'package.json'), 'utf8');
144
+ const v = JSON.parse(raw).version;
145
+ if (v)
146
+ return `^${v}`;
147
+ }
148
+ catch {
149
+ /* ignore */
150
+ }
151
+ return '^0.0.0';
153
152
  }
154
153
  function rewriteWorkspaceDeps(pkg) {
154
+ const range = quadrokitPublishedSemverRange();
155
155
  for (const key of ['dependencies', 'devDependencies']) {
156
156
  const deps = pkg[key];
157
157
  if (!deps) {
158
158
  continue;
159
159
  }
160
160
  for (const name of Object.keys(deps)) {
161
- if (deps[name] === 'workspace:*') {
162
- deps[name] = name === '@quadrokit/client' ? '^0.2.1' : '^0.2.0';
161
+ if (deps[name] === 'workspace:*' && name.startsWith('@quadrokit/')) {
162
+ deps[name] = range;
163
163
  }
164
164
  }
165
165
  }
@@ -175,6 +175,10 @@ async function patchPackageJson(dest, projectName, keepWorkspace) {
175
175
  if (!keepWorkspace) {
176
176
  rewriteWorkspaceDeps(pkg);
177
177
  }
178
+ const scripts = pkg.scripts;
179
+ if (scripts) {
180
+ scripts['quadrokit:generate'] = 'quadrokit-client generate';
181
+ }
178
182
  await writeFile(pkgPath, `${JSON.stringify(pkg, null, 2)}\n`, 'utf8');
179
183
  }
180
184
  /** Standalone Biome config for projects outside the monorepo (no `extends` to repo root). */
@@ -219,25 +223,50 @@ Created with **create-quadrokit** (template: \`${template}\`).
219
223
  ## Next steps
220
224
 
221
225
  1. \`cd ${path.basename(dest)}\` and install dependencies (\`bun install\` or \`npm install\`).
222
- 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):
223
229
 
224
230
  \`\`\`bash
225
231
  bun run quadrokit:generate
226
232
  \`\`\`
227
233
 
228
- 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\`).
229
235
 
230
- \`\`\`bash
231
- QUADROKIT_CATALOG_URL='http://localhost:7080/rest/\\$catalog' QUADROKIT_CATALOG_TOKEN='…' bun run quadrokit:generate
232
- \`\`\`
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).
233
242
 
234
- 3. Copy \`.env.example\` to \`.env\` and set \`VITE_4D_ORIGIN\` to your 4D web server.
235
243
  4. \`bun run dev\` — the dev server proxies \`/rest\` to \`VITE_4D_ORIGIN\` so **4DSID_** cookies stay same-origin.
236
244
 
237
245
  Production: serve the SPA and reverse-proxy \`/rest\` to 4D on the **same host** as the UI.
238
246
  `;
239
247
  await writeFile(path.join(dest, 'QUADROKIT.md'), text, 'utf8');
240
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
+ }
241
270
  async function main() {
242
271
  const argv = process.argv.slice(2);
243
272
  const { template: tArg, dir: dirArg, keepWorkspace, initGit: gitFlag, installDeps: installFlag, } = parseArgs(argv);
@@ -283,6 +312,7 @@ async function main() {
283
312
  process.exit(1);
284
313
  }
285
314
  await copyTemplate(src, dest);
315
+ await injectTemplateCommon(dest);
286
316
  await writeStandaloneBiome(dest, keepWorkspace);
287
317
  await patchPackageJson(dest, path
288
318
  .basename(dest)
@@ -290,6 +320,7 @@ async function main() {
290
320
  .toLowerCase() || 'quadro-app', keepWorkspace);
291
321
  await writeQuadroClientImport(dest);
292
322
  await writeReadme(dest, template);
323
+ await writeGitignore(dest);
293
324
  console.log(`\n 🎉 Project files are ready at ${'\u001b[1m'}${dest}${'\u001b[0m'}\n`);
294
325
  let initGit = gitFlag;
295
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.1",
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,