create-restforge-skills 0.1.1 → 0.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-restforge-skills",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "Install the RESTForge Agent Skill into Claude Code, Cursor, and other skills-compatible clients.",
5
5
  "type": "commonjs",
6
6
  "bin": {
@@ -29,7 +29,7 @@ RESTForge is a deterministic, definition-first generator with two output tracks:
29
29
  endpoints. One SDF produces identical DDL; one RDF payload produces an
30
30
  identical endpoint module on every execution.
31
31
  - **Frontend track** — UDF defines the frontend application. One UDF payload
32
- produces identical HTML/JS/CSS via `restforge-designer`, plugin-driven,
32
+ produces identical HTML/JS/CSS via `npx restforge-designer`, plugin-driven,
33
33
  no build step required.
34
34
 
35
35
  The agent interacts with the platform **exclusively through MCP tools**. The
@@ -63,8 +63,10 @@ Verify readiness before planning or producing anything:
63
63
  generator and yields slower, non-deterministic output.
64
64
  2. **Backend work** → confirm the project and config are ready with
65
65
  `runtime_detect_project`, then the `setup_validate_config` gate.
66
- 3. **Frontend work** → the Designer tools pre-check that `restforge-designer` is
67
- on PATH; if it is missing, surface that before proceeding.
66
+ 3. **Frontend work** → the Designer tools pre-check that `npx restforge-designer`
67
+ can run (its binary is bundled in `@restforgejs/platform`, so it is available
68
+ once the project is created with `npx create-restforge-app` / the platform is
69
+ installed); if it cannot run, surface that before proceeding.
68
70
 
69
71
  If a prerequisite is missing, report it as the next step — do not improvise around it.
70
72
 
@@ -80,11 +82,18 @@ project, start from the step that matches the current state — do not re-run
80
82
  earlier steps that already succeeded.
81
83
 
82
84
  ```
83
- 1. setup_create_folder
84
- Create a new project folder at the specified location.
85
-
86
- 2. setup_install_package
87
- Install @restforgejs/platform into the project folder.
85
+ 1. npx create-restforge-app <name> ── PRIMARY ── human-run scaffolder
86
+ One shot: creates the project folder, runs
87
+ npm install @restforgejs/platform (local), and bundles the designer
88
+ binary. This is the dominant way to start a new project.
89
+ Granular alternative (agent scaffolds step by step):
90
+ setup_create_folder → create the project folder.
91
+
92
+ 2. setup_install_package (granular path only)
93
+ Install @restforgejs/platform into the folder. SKIP when the project
94
+ was created with create-restforge-app (already installed). Plain
95
+ 'npm install @restforgejs/platform' stays valid but is not the
96
+ primary entry point.
88
97
 
89
98
  3. setup_init_config
90
99
  Write config/db-connection.env from the default template.
@@ -253,12 +262,14 @@ Adds (or removes) an **embedded** login / signup / forget-password overlay
253
262
  `/api/<project>/rfx_auth`. This is independent of the `vanilla-js-auth` plugin.
254
263
 
255
264
  ```
256
- designer_auth_create (wraps: restforge-designer auth --create --project=<name>)
257
- designer_auth_remove (wraps: restforge-designer auth --remove --project=<name> --force)
265
+ designer_auth_create (wraps: npx restforge-designer auth --create --project=<name>)
266
+ designer_auth_remove (wraps: npx restforge-designer auth --remove --project=<name> --force)
258
267
  ```
259
268
 
260
269
  `create` writes the auth pages + `js/rfx_auth.js` and injects a guard into existing
261
- pages; `remove` deletes them. Idempotent. `restforge-designer` must be on PATH.
270
+ pages; `remove` deletes them. Idempotent. Runs via `npx restforge-designer`
271
+ (bundled in `@restforgejs/platform`; available once the project was created with
272
+ `npx create-restforge-app` / the platform is installed).
262
273
  → references/auth.md § Frontend
263
274
 
264
275
  Do not combine the two mechanisms on one app: if an app already has plugin auth
@@ -364,6 +375,17 @@ branch still obeys the Grounding-First Rules above.
364
375
  - **Master-detail (composite CRUD)** → add `details[]` to the RDF payload;
365
376
  generates `/create-composite`, `/update-composite`, `/read-composite`.
366
377
  → references/rdf-advanced.md § Master-Detail
378
+ - **Excel export** → `/export` works by default (falls back to
379
+ `SELECT {fields} FROM tableName`); customise the columns/filter with
380
+ `exportQuery` in the RDF payload. Tune `EXPORT_FILE_EXPIRY` / `EXPORT_CHUNK_SIZE`
381
+ in config. Ground `exportQuery` via `codegen_get_query_declarative_catalog`.
382
+ → references/rdf-advanced.md § Data Source Resolution
383
+ - **Excel import (.xlsx)** → add `importConfig` (sheet, startRow, strategy,
384
+ upsertKey, columns header→fieldName, optional lookup) to the RDF payload;
385
+ generates `/import-preview` (validates, returns a diff) and `/import-commit`
386
+ (applies). → references/rdf-advanced.md § Import Config
387
+ - Activate on an existing project: edit the payload to add `importConfig`
388
+ (and/or `exportQuery`) → `codegen_validate_payload` → `codegen_create_endpoint`.
367
389
 
368
390
  ### Soft-delete vs hard-delete
369
391
 
@@ -373,6 +395,31 @@ branch still obeys the Grounding-First Rules above.
373
395
  - Soft-delete is supported on PostgreSQL only (Phase 1).
374
396
  - Tables with composite UNIQUE constraints are incompatible with soft-delete.
375
397
 
398
+ ### Data seeding / migration (rows, not schema)
399
+
400
+ Move table **rows** through SDF-driven envelope files. This is for data, never
401
+ for schema — use the dbschema tools for structure.
402
+
403
+ **Default output location:** `data-storage/<schema>/<table>.json`, relative to the
404
+ project cwd. The `data-storage` folder is the default of the `storagePath` param
405
+ (CLI `--storage-path <folder>`); override it to write elsewhere. The SDF read from
406
+ is `schemaPath` (CLI `--schema-path`, default `schema`).
407
+
408
+ - **Export / dump / snapshot / back up rows** → `data_pull`. Scope is exactly one
409
+ of `table`, `schema`, or `allSchemas`. Only tables registered in the SDF can be
410
+ pulled. `force: true` overwrites existing envelope files. Optional `limit`,
411
+ `batchSize`, `config` (falls back to the default set via `config set-default`,
412
+ i.e. `.restforge/defaults.json`), `schemaPath`, `storagePath`.
413
+ - **Import / load / seed / restore rows** → `data_push`. Same file names as
414
+ `data_pull`, so pulled files push back directly. Scope is exactly one of `table`,
415
+ `schema`, or `allSchemas`; for `schema`/`allSchemas` tables load in FK
416
+ parent→child order.
417
+ - **Move data between databases** → `data_pull` from the source, then `data_push`
418
+ into the target (`config` selects the env per side).
419
+ - ⚠ `data_push` is **APPEND-ONLY** (batch INSERT, no upsert/replace). Running it
420
+ twice inserts the rows twice. Confirm with the user before pushing into a
421
+ database that may already hold those rows.
422
+
376
423
  ### Frontend page type
377
424
 
378
425
  - **Standard CRUD page** → `pageType: "crud"` (default) with `apiPath`,
@@ -1,8 +1,8 @@
1
1
  # Reference: Auth Extension
2
2
 
3
3
  > **Offline mirror.** This file mirrors the auth commands of the installed
4
- > RESTForge platform and Designer (`restforge project auth`, `restforge-designer
5
- > auth`). The live tools/CLI are authoritative — when this file and them disagree,
4
+ > RESTForge platform and Designer (`restforge project auth`, `npx
5
+ > restforge-designer auth`). The live tools/CLI are authoritative — when this file and them disagree,
6
6
  > trust the tools, then update this file.
7
7
 
8
8
  **This file documents the auth EXTENSION — auth WITHOUT RBAC.** It is one of two
@@ -70,11 +70,11 @@ Embedded login / signup / forget-password overlay (`rfx_auth`), mounted at route
70
70
  `/api/<project>/rfx_auth`. Independent of the `vanilla-js-auth` plugin.
71
71
 
72
72
  MCP tools: `designer_auth_create`, `designer_auth_remove` — wrap
73
- `restforge-designer auth --create | --remove`.
73
+ `npx restforge-designer auth --create | --remove`.
74
74
 
75
75
  ```
76
- restforge-designer auth --create --project=<name> [options]
77
- restforge-designer auth --remove --project=<name> [--frontend-path <path>] --force
76
+ npx restforge-designer auth --create --project=<name> [options]
77
+ npx restforge-designer auth --remove --project=<name> [--frontend-path <path>] --force
78
78
  ```
79
79
 
80
80
  `--create` and `--remove` are mutually exclusive; exactly one is required.
@@ -113,7 +113,10 @@ injected automatically when `designer_generate` creates pages later.
113
113
  3. Strips the auth guard from all `*.html` pages (other content untouched).
114
114
  4. Removes the `embeddedAuth` key from `payload/app-config.json` (other keys kept).
115
115
 
116
- **Prerequisites:** the `restforge-designer` binary is installed and on PATH.
116
+ **Prerequisites:** the Designer is invoked via `npx restforge-designer` and is
117
+ bundled inside the `@restforgejs/platform` package; the prerequisite is that
118
+ `@restforgejs/platform` is installed in the project (e.g. a project created with
119
+ `npx create-restforge-app`), not a standalone binary on PATH.
117
120
 
118
121
  Both are idempotent. **`--remove` is destructive** — confirm project name and
119
122
  intent with the user before running (MCP always passes `--force`).
@@ -138,5 +141,5 @@ separate mechanisms. If the user needs RBAC, only plugin auth provides it.
138
141
  |---|---|---|
139
142
  | Backend: "package not installed" precondition | `@restforgejs/platform` missing in the project | Install the package, then re-run |
140
143
  | Backend: project does not exist / DB not reachable | Auth runs against an existing project + live DB | Create the project + endpoints first; verify DB config |
141
- | Frontend: "Designer not on PATH" precondition | `restforge-designer` binary missing | Install RESTForge Designer and ensure it is on PATH |
144
+ | Frontend: Designer (`npx restforge-designer`) cannot run | `@restforgejs/platform` (which bundles the Designer) missing in the project | Install `@restforgejs/platform` in the project (e.g. via `npx create-restforge-app`), then re-run |
142
145
  | Frontend: files already exist, not overwritten | Auth already installed | Use `--overwrite` (create) only if you intend to replace |