kintone-migrator 0.12.4 → 0.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.
Files changed (3) hide show
  1. package/README.md +528 -1
  2. package/dist/index.mjs +7446 -2364
  3. package/package.json +7 -29
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # kintone-migrator
2
2
 
3
- A CLI tool for managing kintone apps as code -- form schemas, seed data, JS/CSS customizations, and field access permissions.
3
+ A CLI tool for declaratively managing kintone app configurations as code -- form schemas, views, access permissions, process management, notifications, and more.
4
4
 
5
5
  ## Quick Start
6
6
 
@@ -123,6 +123,26 @@ Commands are organized into domain groups:
123
123
  | `customize` | `apply` | Apply JS/CSS customizations |
124
124
  | `field-acl` | `apply` | Apply field access permissions |
125
125
  | `field-acl` | `capture` | Save current field permissions to file |
126
+ | `view` | `apply` | Apply view (list) settings |
127
+ | `view` | `capture` | Save current view settings to file |
128
+ | `app-acl` | `apply` | Apply app-level access permissions |
129
+ | `app-acl` | `capture` | Save current app permissions to file |
130
+ | `record-acl` | `apply` | Apply record-level access permissions |
131
+ | `record-acl` | `capture` | Save current record permissions to file |
132
+ | `process` | `apply` | Apply process management (workflow) settings |
133
+ | `process` | `capture` | Save current process management settings to file |
134
+ | `settings` | `apply` | Apply general app settings |
135
+ | `settings` | `capture` | Save current general settings to file |
136
+ | `notification` | `apply` | Apply notification settings |
137
+ | `notification` | `capture` | Save current notification settings to file |
138
+ | `report` | `apply` | Apply graph/report settings |
139
+ | `report` | `capture` | Save current report settings to file |
140
+ | `action` | `apply` | Apply action settings |
141
+ | `action` | `capture` | Save current action settings to file |
142
+ | `admin-notes` | `apply` | Apply admin notes |
143
+ | `admin-notes` | `capture` | Save current admin notes to file |
144
+ | `plugin` | `apply` | Apply plugin settings |
145
+ | `plugin` | `capture` | Save current plugin settings to file |
126
146
 
127
147
  All commands support `--app <name>` and `--all` for [multi-app mode](#multi-app-project-config). Commands that modify data (`schema migrate`, `schema override`, `seed apply --clean`, `customize apply`) support `--yes` / `-y` to skip confirmation prompts.
128
148
 
@@ -260,6 +280,236 @@ kintone-migrator field-acl capture
260
280
  kintone-migrator field-acl capture --field-acl-file my-field-acl.yaml
261
281
  ```
262
282
 
283
+ ### `view` -- View (List) Settings
284
+
285
+ #### `view apply`
286
+
287
+ Applies view settings from a YAML config file.
288
+
289
+ ```bash
290
+ kintone-migrator view apply
291
+ kintone-migrator view apply --view-file my-views.yaml
292
+ ```
293
+
294
+ #### `view capture`
295
+
296
+ Captures the current view settings and saves them to a YAML file.
297
+
298
+ ```bash
299
+ kintone-migrator view capture
300
+ ```
301
+
302
+ | Option | Environment Variable | Description |
303
+ |---|---|---|
304
+ | `--view-file` | `VIEW_FILE_PATH` | View file path (default: `views.yaml`, multi-app: `view/<appName>.yaml`) |
305
+
306
+ ### `app-acl` -- App Access Permissions
307
+
308
+ #### `app-acl apply`
309
+
310
+ Applies app-level access permissions from a YAML config file.
311
+
312
+ ```bash
313
+ kintone-migrator app-acl apply
314
+ kintone-migrator app-acl apply --app-acl-file my-app-acl.yaml
315
+ ```
316
+
317
+ #### `app-acl capture`
318
+
319
+ Captures the current app access permissions and saves them to a YAML file.
320
+
321
+ ```bash
322
+ kintone-migrator app-acl capture
323
+ ```
324
+
325
+ | Option | Environment Variable | Description |
326
+ |---|---|---|
327
+ | `--app-acl-file` | `APP_ACL_FILE_PATH` | App ACL file path (default: `app-acl.yaml`, multi-app: `app-acl/<appName>.yaml`) |
328
+
329
+ ### `record-acl` -- Record Access Permissions
330
+
331
+ #### `record-acl apply`
332
+
333
+ Applies record-level access permissions from a YAML config file.
334
+
335
+ ```bash
336
+ kintone-migrator record-acl apply
337
+ kintone-migrator record-acl apply --record-acl-file my-record-acl.yaml
338
+ ```
339
+
340
+ #### `record-acl capture`
341
+
342
+ Captures the current record access permissions and saves them to a YAML file.
343
+
344
+ ```bash
345
+ kintone-migrator record-acl capture
346
+ ```
347
+
348
+ | Option | Environment Variable | Description |
349
+ |---|---|---|
350
+ | `--record-acl-file` | `RECORD_ACL_FILE_PATH` | Record ACL file path (default: `record-acl.yaml`, multi-app: `record-acl/<appName>.yaml`) |
351
+
352
+ ### `process` -- Process Management (Workflow)
353
+
354
+ #### `process apply`
355
+
356
+ Applies process management settings (statuses, actions, assignees) from a YAML config file.
357
+
358
+ ```bash
359
+ kintone-migrator process apply
360
+ kintone-migrator process apply --process-file my-process.yaml
361
+ ```
362
+
363
+ #### `process capture`
364
+
365
+ Captures the current process management settings and saves them to a YAML file.
366
+
367
+ ```bash
368
+ kintone-migrator process capture
369
+ ```
370
+
371
+ | Option | Environment Variable | Description |
372
+ |---|---|---|
373
+ | `--process-file` | `PROCESS_FILE_PATH` | Process management file path (default: `process.yaml`, multi-app: `process/<appName>.yaml`) |
374
+
375
+ ### `settings` -- General Settings
376
+
377
+ #### `settings apply`
378
+
379
+ Applies general app settings (name, description, icon, theme, etc.) from a YAML config file.
380
+
381
+ ```bash
382
+ kintone-migrator settings apply
383
+ kintone-migrator settings apply --settings-file my-settings.yaml
384
+ ```
385
+
386
+ #### `settings capture`
387
+
388
+ Captures the current general settings and saves them to a YAML file.
389
+
390
+ ```bash
391
+ kintone-migrator settings capture
392
+ ```
393
+
394
+ | Option | Environment Variable | Description |
395
+ |---|---|---|
396
+ | `--settings-file` | `SETTINGS_FILE_PATH` | General settings file path (default: `settings.yaml`, multi-app: `settings/<appName>.yaml`) |
397
+
398
+ ### `notification` -- Notification Settings
399
+
400
+ #### `notification apply`
401
+
402
+ Applies notification settings (general, per-record, reminder) from a YAML config file.
403
+
404
+ ```bash
405
+ kintone-migrator notification apply
406
+ kintone-migrator notification apply --notification-file my-notification.yaml
407
+ ```
408
+
409
+ #### `notification capture`
410
+
411
+ Captures the current notification settings and saves them to a YAML file.
412
+
413
+ ```bash
414
+ kintone-migrator notification capture
415
+ ```
416
+
417
+ | Option | Environment Variable | Description |
418
+ |---|---|---|
419
+ | `--notification-file` | `NOTIFICATION_FILE_PATH` | Notification file path (default: `notification.yaml`, multi-app: `notification/<appName>.yaml`) |
420
+
421
+ ### `report` -- Graph/Report Settings
422
+
423
+ #### `report apply`
424
+
425
+ Applies graph and report settings from a YAML config file.
426
+
427
+ ```bash
428
+ kintone-migrator report apply
429
+ kintone-migrator report apply --report-file my-reports.yaml
430
+ ```
431
+
432
+ #### `report capture`
433
+
434
+ Captures the current report settings and saves them to a YAML file.
435
+
436
+ ```bash
437
+ kintone-migrator report capture
438
+ ```
439
+
440
+ | Option | Environment Variable | Description |
441
+ |---|---|---|
442
+ | `--report-file` | `REPORT_FILE_PATH` | Report file path (default: `reports.yaml`, multi-app: `report/<appName>.yaml`) |
443
+
444
+ ### `action` -- Action Settings
445
+
446
+ #### `action apply`
447
+
448
+ Applies action settings (record copy actions) from a YAML config file.
449
+
450
+ ```bash
451
+ kintone-migrator action apply
452
+ kintone-migrator action apply --action-file my-actions.yaml
453
+ ```
454
+
455
+ #### `action capture`
456
+
457
+ Captures the current action settings and saves them to a YAML file.
458
+
459
+ ```bash
460
+ kintone-migrator action capture
461
+ ```
462
+
463
+ | Option | Environment Variable | Description |
464
+ |---|---|---|
465
+ | `--action-file` | `ACTION_FILE_PATH` | Action file path (default: `actions.yaml`, multi-app: `action/<appName>.yaml`) |
466
+
467
+ ### `admin-notes` -- Admin Notes
468
+
469
+ #### `admin-notes apply`
470
+
471
+ Applies admin notes from a YAML config file.
472
+
473
+ ```bash
474
+ kintone-migrator admin-notes apply
475
+ kintone-migrator admin-notes apply --admin-notes-file my-notes.yaml
476
+ ```
477
+
478
+ #### `admin-notes capture`
479
+
480
+ Captures the current admin notes and saves them to a YAML file.
481
+
482
+ ```bash
483
+ kintone-migrator admin-notes capture
484
+ ```
485
+
486
+ | Option | Environment Variable | Description |
487
+ |---|---|---|
488
+ | `--admin-notes-file` | `ADMIN_NOTES_FILE_PATH` | Admin notes file path (default: `admin-notes.yaml`, multi-app: `admin-notes/<appName>.yaml`) |
489
+
490
+ ### `plugin` -- Plugin Settings
491
+
492
+ #### `plugin apply`
493
+
494
+ Applies plugin settings (enable/disable installed plugins) from a YAML config file.
495
+
496
+ ```bash
497
+ kintone-migrator plugin apply
498
+ kintone-migrator plugin apply --plugin-file my-plugins.yaml
499
+ ```
500
+
501
+ #### `plugin capture`
502
+
503
+ Captures the current plugin settings and saves them to a YAML file.
504
+
505
+ ```bash
506
+ kintone-migrator plugin capture
507
+ ```
508
+
509
+ | Option | Environment Variable | Description |
510
+ |---|---|---|
511
+ | `--plugin-file` | `PLUGIN_FILE_PATH` | Plugin file path (default: `plugins.yaml`, multi-app: `plugin/<appName>.yaml`) |
512
+
263
513
  ## File Formats
264
514
 
265
515
  ### Schema File
@@ -360,6 +610,283 @@ rights:
360
610
 
361
611
  For details, see [Field Permission Specification](./spec/domains/fieldPermission.md).
362
612
 
613
+ ### View File
614
+
615
+ Defines view (list) settings. Views are identified by name.
616
+
617
+ ```yaml
618
+ views:
619
+ 一覧:
620
+ type: LIST
621
+ index: 0
622
+ fields:
623
+ - customer_name
624
+ - customer_code
625
+ - status
626
+ filterCond: status in ("active")
627
+ sort: customer_code asc
628
+ pager: true
629
+ device: ANY
630
+ カレンダー:
631
+ type: CALENDAR
632
+ index: 1
633
+ date: scheduled_date
634
+ title: customer_name
635
+ ```
636
+
637
+ View types: `LIST`, `CALENDAR`, `CUSTOM`. For details, see [View Specification](./spec/domains/view.md).
638
+
639
+ ### App ACL File
640
+
641
+ Defines app-level access permissions.
642
+
643
+ ```yaml
644
+ rights:
645
+ - entity:
646
+ type: USER
647
+ code: admin_user
648
+ includeSubs: false
649
+ appEditable: true
650
+ recordViewable: true
651
+ recordAddable: true
652
+ recordEditable: true
653
+ recordDeletable: true
654
+ recordImportable: true
655
+ recordExportable: true
656
+ - entity:
657
+ type: GROUP
658
+ code: general_staff
659
+ includeSubs: false
660
+ appEditable: false
661
+ recordViewable: true
662
+ recordAddable: true
663
+ recordEditable: true
664
+ recordDeletable: false
665
+ recordImportable: false
666
+ recordExportable: false
667
+ ```
668
+
669
+ For details, see [App Permission Specification](./spec/domains/appPermission.md).
670
+
671
+ ### Record ACL File
672
+
673
+ Defines record-level access permissions with filter conditions.
674
+
675
+ ```yaml
676
+ rights:
677
+ - filterCond: status in ("active")
678
+ entities:
679
+ - entity:
680
+ type: USER
681
+ code: admin_user
682
+ viewable: true
683
+ editable: true
684
+ deletable: true
685
+ includeSubs: false
686
+ - entity:
687
+ type: GROUP
688
+ code: general_staff
689
+ viewable: true
690
+ editable: false
691
+ deletable: false
692
+ includeSubs: false
693
+ ```
694
+
695
+ For details, see [Record Permission Specification](./spec/domains/recordPermission.md).
696
+
697
+ ### Process Management File
698
+
699
+ Defines workflow statuses and actions.
700
+
701
+ ```yaml
702
+ enable: true
703
+ states:
704
+ 未処理:
705
+ index: 0
706
+ assignee:
707
+ type: ONE
708
+ entities:
709
+ - type: CREATOR
710
+ 処理中:
711
+ index: 1
712
+ assignee:
713
+ type: ONE
714
+ entities:
715
+ - type: USER
716
+ code: manager
717
+ 完了:
718
+ index: 2
719
+ assignee:
720
+ type: ONE
721
+ entities: []
722
+ actions:
723
+ - name: 処理開始
724
+ from: 未処理
725
+ to: 処理中
726
+ filterCond: ""
727
+ type: PRIMARY
728
+ - name: 完了にする
729
+ from: 処理中
730
+ to: 完了
731
+ filterCond: ""
732
+ type: PRIMARY
733
+ ```
734
+
735
+ For details, see [Process Management Specification](./spec/domains/processManagement.md).
736
+
737
+ ### General Settings File
738
+
739
+ Defines general app settings. All fields are optional -- only specified fields are updated.
740
+
741
+ ```yaml
742
+ name: 顧客管理
743
+ description: 顧客情報を管理するアプリ
744
+ icon:
745
+ type: PRESET
746
+ key: APP006
747
+ theme: WHITE
748
+ titleField:
749
+ selectionMode: MANUAL
750
+ code: customer_name
751
+ enableThumbnails: true
752
+ enableBulkDeletion: false
753
+ enableComments: true
754
+ numberPrecision:
755
+ digits: 16
756
+ decimalPlaces: 4
757
+ roundingMode: HALF_EVEN
758
+ firstMonthOfFiscalYear: 4
759
+ ```
760
+
761
+ For details, see [General Settings Specification](./spec/domains/generalSettings.md).
762
+
763
+ ### Notification File
764
+
765
+ Defines notification settings (general notifications, per-record notifications, and reminders).
766
+
767
+ ```yaml
768
+ general:
769
+ notifyToCommenter: true
770
+ notifications:
771
+ - entity:
772
+ type: USER
773
+ code: admin_user
774
+ recordAdded: true
775
+ recordEdited: true
776
+ commentAdded: true
777
+ statusChanged: true
778
+ fileImported: false
779
+ perRecord:
780
+ - filterCond: priority in ("high")
781
+ title: 高優先度レコードの更新
782
+ targets:
783
+ - entity:
784
+ type: USER
785
+ code: manager
786
+ reminder:
787
+ timezone: Asia/Tokyo
788
+ notifications:
789
+ - code: deadline
790
+ daysLater: -1
791
+ time: "09:00"
792
+ filterCond: status not in ("完了")
793
+ title: 締切日リマインダー
794
+ targets:
795
+ - entity:
796
+ type: FIELD_ENTITY
797
+ code: creator
798
+ ```
799
+
800
+ For details, see [Notification Specification](./spec/domains/notification.md).
801
+
802
+ ### Report File
803
+
804
+ Defines graph and report settings. Reports are identified by name.
805
+
806
+ ```yaml
807
+ reports:
808
+ 月別売上:
809
+ chartType: COLUMN
810
+ chartMode: NORMAL
811
+ index: 0
812
+ groups:
813
+ - code: order_date
814
+ per: MONTH
815
+ aggregations:
816
+ - type: SUM
817
+ code: amount
818
+ filterCond: ""
819
+ sorts:
820
+ - by: GROUP1
821
+ order: ASC
822
+ 担当者別件数:
823
+ chartType: PIE
824
+ index: 1
825
+ groups:
826
+ - code: assignee
827
+ aggregations:
828
+ - type: COUNT
829
+ filterCond: status in ("active")
830
+ sorts:
831
+ - by: TOTAL
832
+ order: DESC
833
+ ```
834
+
835
+ Chart types: `BAR`, `COLUMN`, `PIE`, `LINE`, `PIVOT_TABLE`, `TABLE`, `AREA`, `SPLINE`, `SPLINE_AREA`. For details, see [Report Specification](./spec/domains/report.md).
836
+
837
+ ### Action File
838
+
839
+ Defines record copy action settings. Actions are identified by name.
840
+
841
+ ```yaml
842
+ actions:
843
+ 案件コピー:
844
+ index: 0
845
+ destApp:
846
+ app: "20"
847
+ mappings:
848
+ - srcType: FIELD
849
+ srcField: customer_name
850
+ destField: customer_name
851
+ - srcType: RECORD_URL
852
+ destField: source_url
853
+ entities:
854
+ - type: USER
855
+ code: admin_user
856
+ filterCond: status in ("approved")
857
+ ```
858
+
859
+ For details, see [Action Specification](./spec/domains/action.md).
860
+
861
+ ### Admin Notes File
862
+
863
+ Defines admin notes content.
864
+
865
+ ```yaml
866
+ content: |
867
+ <h2>アプリ管理メモ</h2>
868
+ <p>このアプリは顧客管理用です。</p>
869
+ includeInTemplateAndDuplicates: true
870
+ ```
871
+
872
+ For details, see [Admin Notes Specification](./spec/domains/adminNotes.md).
873
+
874
+ ### Plugin File
875
+
876
+ Defines plugin enable/disable settings.
877
+
878
+ ```yaml
879
+ plugins:
880
+ - id: djmhffjlbojgcbnahicgdjiahbegolkj
881
+ name: 条件分岐プラグイン
882
+ enabled: true
883
+ - id: pafgcfghlmjicbadmkohfoihfkblahhe
884
+ name: カレンダーPlusプラグイン
885
+ enabled: false
886
+ ```
887
+
888
+ For details, see [Plugin Specification](./spec/domains/plugin.md).
889
+
363
890
  ## License
364
891
 
365
892
  MIT