kintone-migrator 0.19.0 → 0.20.1
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 +12 -5
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -217,22 +217,29 @@ All commands support `--app <name>` and `--all` for [multi-app mode](#multi-app-
|
|
|
217
217
|
Initializes a project from a kintone space. Fetches all apps in the specified space, generates a `kintone-migrator.yaml` config file with `files` object format, and captures all domain configurations for each app.
|
|
218
218
|
|
|
219
219
|
```bash
|
|
220
|
-
kintone-migrator init
|
|
221
|
-
kintone-migrator init
|
|
220
|
+
kintone-migrator init --space-id 1
|
|
221
|
+
kintone-migrator init -s 1 --yes # Skip confirmation prompts
|
|
222
|
+
kintone-migrator init -s 1 --dry-run # Preview without writing files
|
|
223
|
+
kintone-migrator init -s 1 -o ./myproject # Output to a specific directory
|
|
222
224
|
```
|
|
223
225
|
|
|
224
226
|
| Option | Description |
|
|
225
227
|
|---|---|
|
|
226
|
-
|
|
|
228
|
+
| `--space-id`, `-s` | kintone space ID (required, must be numeric) |
|
|
227
229
|
| `--domain`, `-d` | kintone domain |
|
|
228
230
|
| `--api-token`, `-t` | API token |
|
|
229
231
|
| `--username`, `-u` | Username |
|
|
230
232
|
| `--password`, `-p` | Password |
|
|
231
233
|
| `--guest-space-id`, `-g` | Guest space ID |
|
|
232
|
-
| `--output`, `-o` | Output
|
|
234
|
+
| `--output`, `-o` | Output directory |
|
|
233
235
|
| `--yes`, `-y` | Skip confirmation prompts |
|
|
236
|
+
| `--dry-run`, `-n` | Preview what would be created without writing any files |
|
|
234
237
|
|
|
235
|
-
The generated config uses the `files` object format with all domain file paths pre-configured. For each app, schema, view, settings, notification, report, action, process, field-acl, app-acl, record-acl, admin-notes, and plugin configurations are captured.
|
|
238
|
+
The generated config uses the `files` object format with all domain file paths pre-configured. For each app, schema, seed, customize, view, settings, notification, report, action, process, field-acl, app-acl, record-acl, admin-notes, and plugin configurations are captured.
|
|
239
|
+
|
|
240
|
+
App names in the generated config are resolved with the following priority: app code > app name > `app-{appId}`. Duplicate names are automatically suffixed (e.g., `-2`, `-3`). File paths follow the `<appName>/<domain>.yaml` convention (e.g., `customer/schema.yaml`).
|
|
241
|
+
|
|
242
|
+
Authentication settings are intentionally omitted from the generated config to avoid committing credentials to version control. Set `KINTONE_API_TOKEN` or `KINTONE_USERNAME` + `KINTONE_PASSWORD` environment variables, or add `auth` to the config file manually.
|
|
236
243
|
|
|
237
244
|
### `schema` -- Form Schema Management
|
|
238
245
|
|
package/dist/index.mjs
CHANGED
|
@@ -1783,20 +1783,20 @@ function resolveSingleApp(config, appName) {
|
|
|
1783
1783
|
function buildAppFilePaths(appName, baseDir) {
|
|
1784
1784
|
const prefix = (path) => baseDir ? join(baseDir, path) : path;
|
|
1785
1785
|
return {
|
|
1786
|
-
schema: prefix(
|
|
1787
|
-
seed: prefix(
|
|
1788
|
-
customize: prefix(
|
|
1789
|
-
view: prefix(
|
|
1790
|
-
settings: prefix(
|
|
1791
|
-
notification: prefix(
|
|
1792
|
-
report: prefix(
|
|
1793
|
-
action: prefix(
|
|
1794
|
-
process: prefix(
|
|
1795
|
-
fieldAcl: prefix(
|
|
1796
|
-
appAcl: prefix(
|
|
1797
|
-
recordAcl: prefix(
|
|
1798
|
-
adminNotes: prefix(
|
|
1799
|
-
plugin: prefix(
|
|
1786
|
+
schema: prefix(`${appName}/schema.yaml`),
|
|
1787
|
+
seed: prefix(`${appName}/seed.yaml`),
|
|
1788
|
+
customize: prefix(`${appName}/customize.yaml`),
|
|
1789
|
+
view: prefix(`${appName}/view.yaml`),
|
|
1790
|
+
settings: prefix(`${appName}/settings.yaml`),
|
|
1791
|
+
notification: prefix(`${appName}/notification.yaml`),
|
|
1792
|
+
report: prefix(`${appName}/report.yaml`),
|
|
1793
|
+
action: prefix(`${appName}/action.yaml`),
|
|
1794
|
+
process: prefix(`${appName}/process.yaml`),
|
|
1795
|
+
fieldAcl: prefix(`${appName}/field-acl.yaml`),
|
|
1796
|
+
appAcl: prefix(`${appName}/app-acl.yaml`),
|
|
1797
|
+
recordAcl: prefix(`${appName}/record-acl.yaml`),
|
|
1798
|
+
adminNotes: prefix(`${appName}/admin-notes.yaml`),
|
|
1799
|
+
plugin: prefix(`${appName}/plugin.yaml`)
|
|
1800
1800
|
};
|
|
1801
1801
|
}
|
|
1802
1802
|
|