@tailor-platform/sdk 1.12.0 → 1.13.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.
@@ -148,16 +148,17 @@ Generates seed data configuration files for database initialization.
148
148
  ### Configuration
149
149
 
150
150
  ```typescript
151
- ["@tailor-platform/seed", { distPath: "./seed" }][
152
- // With executable script
153
- ("@tailor-platform/seed", { distPath: "./seed", machineUserName: "admin" })
154
- ];
151
+ // Basic configuration
152
+ ["@tailor-platform/seed", { distPath: "./seed" }];
153
+
154
+ // With default machine user
155
+ ["@tailor-platform/seed", { distPath: "./seed", machineUserName: "admin" }];
155
156
  ```
156
157
 
157
- | Option | Type | Description |
158
- | ----------------- | -------- | -------------------------------------------------- |
159
- | `distPath` | `string` | Output directory path (required) |
160
- | `machineUserName` | `string` | Machine user name for executable script (optional) |
158
+ | Option | Type | Description |
159
+ | ----------------- | -------- | -------------------------------------------------------- |
160
+ | `distPath` | `string` | Output directory path (required) |
161
+ | `machineUserName` | `string` | Default machine user name (can be overridden at runtime) |
161
162
 
162
163
  ### Output
163
164
 
@@ -165,27 +166,31 @@ Generates a seed directory structure:
165
166
 
166
167
  ```
167
168
  seed/
168
- ├── config.yaml # Entity dependencies configuration
169
169
  ├── data/
170
170
  │ ├── User.jsonl # Seed data files (JSONL format)
171
+ │ ├── User.schema.ts # lines-db schema definitions
171
172
  │ └── Product.jsonl
172
- ├── graphql/
173
- │ ├── User.graphql # GraphQL mutation files
174
- │ └── Product.graphql
175
- ├── mapping/
176
- │ ├── User.yaml # GraphQL Ingest mapping files
177
- │ └── Product.yaml
178
- ├── schema.ts # lines-db schema definitions
179
- └── exec.mjs # Executable script (if machineUserName provided)
173
+ └── exec.mjs # Executable script
180
174
  ```
181
175
 
182
176
  ### Usage
183
177
 
184
- If `machineUserName` is provided, an executable script is generated:
178
+ Run the generated executable script:
185
179
 
186
180
  ```bash
187
- # Run seed data import
181
+ # With machine user from config
188
182
  node seed/exec.mjs
183
+
184
+ # Specify machine user at runtime (required if not configured, or to override)
185
+ node seed/exec.mjs --machine-user admin
186
+
187
+ # Short form
188
+ node seed/exec.mjs -m admin
189
+
190
+ # With other options
191
+ node seed/exec.mjs -m admin --truncate --yes
189
192
  ```
190
193
 
194
+ The `--machine-user` option is required at runtime if `machineUserName` is not configured in the generator options.
195
+
191
196
  The generated files are compatible with gql-ingest for bulk data import.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tailor-platform/sdk",
3
- "version": "1.12.0",
3
+ "version": "1.13.0",
4
4
  "description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
5
5
  "license": "MIT",
6
6
  "repository": {