powersync 0.9.2 → 0.9.4

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 (141) hide show
  1. package/README.md +103 -74
  2. package/bin/dev.js +7 -1
  3. package/dist/api/BaseDeployCommand.d.ts +39 -0
  4. package/dist/api/BaseDeployCommand.js +230 -0
  5. package/dist/api/BaseDeployCommand.js.map +1 -0
  6. package/dist/api/build-service-yaml.d.ts +29 -0
  7. package/dist/api/build-service-yaml.js +246 -0
  8. package/dist/api/build-service-yaml.js.map +1 -0
  9. package/dist/api/cloud/create-cloud-instance.js +1 -0
  10. package/dist/api/cloud/create-cloud-instance.js.map +1 -0
  11. package/dist/api/cloud/create-cloud-template.d.ts +15 -0
  12. package/dist/api/cloud/create-cloud-template.js +33 -0
  13. package/dist/api/cloud/create-cloud-template.js.map +1 -0
  14. package/dist/api/cloud/fetch-cloud-config.js +1 -0
  15. package/dist/api/cloud/fetch-cloud-config.js.map +1 -0
  16. package/dist/api/cloud/fetch-cloud-sync-rules-content.js +6 -7
  17. package/dist/api/cloud/fetch-cloud-sync-rules-content.js.map +1 -0
  18. package/dist/api/cloud/test-connection.js +3 -3
  19. package/dist/api/cloud/test-connection.js.map +1 -0
  20. package/dist/api/cloud/validate-cloud-link-config.js +1 -0
  21. package/dist/api/cloud/validate-cloud-link-config.js.map +1 -0
  22. package/dist/api/cloud/wait-for-operation.js +1 -0
  23. package/dist/api/cloud/wait-for-operation.js.map +1 -0
  24. package/dist/api/cloud/write-cloud-link.js +1 -0
  25. package/dist/api/cloud/write-cloud-link.js.map +1 -0
  26. package/dist/api/display-status.js +1 -0
  27. package/dist/api/display-status.js.map +1 -0
  28. package/dist/api/ide/configure-vscode-ide.js +1 -0
  29. package/dist/api/ide/configure-vscode-ide.js.map +1 -0
  30. package/dist/api/login-server.js +1 -0
  31. package/dist/api/login-server.js.map +1 -0
  32. package/dist/api/parse-local-cloud-service-config.d.ts +13 -0
  33. package/dist/api/parse-local-cloud-service-config.js +35 -0
  34. package/dist/api/parse-local-cloud-service-config.js.map +1 -0
  35. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.js +7 -8
  36. package/dist/api/self-hosted/fetch-self-hosted-sync-rules-content.js.map +1 -0
  37. package/dist/api/validations/ValidationTestDefinition.d.ts +23 -0
  38. package/dist/api/validations/ValidationTestDefinition.js +10 -0
  39. package/dist/api/validations/ValidationTestDefinition.js.map +1 -0
  40. package/dist/api/validations/ValidationsRunner.d.ts +35 -0
  41. package/dist/api/validations/ValidationsRunner.js +82 -0
  42. package/dist/api/validations/ValidationsRunner.js.map +1 -0
  43. package/dist/api/validations/cloud-validations.d.ts +15 -0
  44. package/dist/api/validations/cloud-validations.js +120 -0
  45. package/dist/api/validations/cloud-validations.js.map +1 -0
  46. package/dist/api/validations/self-hosted-validations.d.ts +7 -0
  47. package/dist/api/validations/self-hosted-validations.js +25 -0
  48. package/dist/api/validations/self-hosted-validations.js.map +1 -0
  49. package/dist/api/validations/validation-flags.d.ts +38 -0
  50. package/dist/api/validations/validation-flags.js +77 -0
  51. package/dist/api/validations/validation-flags.js.map +1 -0
  52. package/dist/api/validations/validation-utils.d.ts +46 -0
  53. package/dist/api/validations/validation-utils.js +154 -0
  54. package/dist/api/validations/validation-utils.js.map +1 -0
  55. package/dist/api/validations/validations.d.ts +15 -0
  56. package/dist/api/validations/validations.js +102 -0
  57. package/dist/api/validations/validations.js.map +1 -0
  58. package/dist/commands/configure/ide.js +1 -0
  59. package/dist/commands/configure/ide.js.map +1 -0
  60. package/dist/commands/configure/index.js +1 -0
  61. package/dist/commands/configure/index.js.map +1 -0
  62. package/dist/commands/deploy/index.d.ts +5 -41
  63. package/dist/commands/deploy/index.js +69 -279
  64. package/dist/commands/deploy/index.js.map +1 -0
  65. package/dist/commands/deploy/service-config.d.ts +3 -7
  66. package/dist/commands/deploy/service-config.js +30 -7
  67. package/dist/commands/deploy/service-config.js.map +1 -0
  68. package/dist/commands/deploy/sync-config.d.ts +5 -8
  69. package/dist/commands/deploy/sync-config.js +43 -20
  70. package/dist/commands/deploy/sync-config.js.map +1 -0
  71. package/dist/commands/destroy.d.ts +0 -4
  72. package/dist/commands/destroy.js +2 -2
  73. package/dist/commands/destroy.js.map +1 -0
  74. package/dist/commands/fetch/config.d.ts +0 -4
  75. package/dist/commands/fetch/config.js +2 -2
  76. package/dist/commands/fetch/config.js.map +1 -0
  77. package/dist/commands/fetch/index.js +1 -0
  78. package/dist/commands/fetch/index.js.map +1 -0
  79. package/dist/commands/fetch/instances.js +1 -0
  80. package/dist/commands/fetch/instances.js.map +1 -0
  81. package/dist/commands/fetch/status.d.ts +0 -5
  82. package/dist/commands/fetch/status.js +2 -2
  83. package/dist/commands/fetch/status.js.map +1 -0
  84. package/dist/commands/generate/index.js +1 -0
  85. package/dist/commands/generate/index.js.map +1 -0
  86. package/dist/commands/generate/schema.d.ts +3 -6
  87. package/dist/commands/generate/schema.js +5 -5
  88. package/dist/commands/generate/schema.js.map +1 -0
  89. package/dist/commands/generate/token.d.ts +0 -5
  90. package/dist/commands/generate/token.js +2 -2
  91. package/dist/commands/generate/token.js.map +1 -0
  92. package/dist/commands/init/cloud.d.ts +0 -3
  93. package/dist/commands/init/cloud.js +21 -18
  94. package/dist/commands/init/cloud.js.map +1 -0
  95. package/dist/commands/init/index.js +1 -0
  96. package/dist/commands/init/index.js.map +1 -0
  97. package/dist/commands/init/self-hosted.d.ts +0 -3
  98. package/dist/commands/init/self-hosted.js +29 -6
  99. package/dist/commands/init/self-hosted.js.map +1 -0
  100. package/dist/commands/link/cloud.d.ts +0 -1
  101. package/dist/commands/link/cloud.js +3 -3
  102. package/dist/commands/link/cloud.js.map +1 -0
  103. package/dist/commands/link/index.js +1 -0
  104. package/dist/commands/link/index.js.map +1 -0
  105. package/dist/commands/link/self-hosted.d.ts +0 -1
  106. package/dist/commands/link/self-hosted.js +3 -3
  107. package/dist/commands/link/self-hosted.js.map +1 -0
  108. package/dist/commands/login.js +1 -0
  109. package/dist/commands/login.js.map +1 -0
  110. package/dist/commands/logout.js +1 -0
  111. package/dist/commands/logout.js.map +1 -0
  112. package/dist/commands/migrate/index.js +1 -0
  113. package/dist/commands/migrate/index.js.map +1 -0
  114. package/dist/commands/migrate/sync-rules.d.ts +0 -5
  115. package/dist/commands/migrate/sync-rules.js +4 -4
  116. package/dist/commands/migrate/sync-rules.js.map +1 -0
  117. package/dist/commands/pull/index.js +1 -0
  118. package/dist/commands/pull/index.js.map +1 -0
  119. package/dist/commands/pull/instance.d.ts +1 -4
  120. package/dist/commands/pull/instance.js +26 -12
  121. package/dist/commands/pull/instance.js.map +1 -0
  122. package/dist/commands/status.js +1 -0
  123. package/dist/commands/status.js.map +1 -0
  124. package/dist/commands/stop.d.ts +0 -4
  125. package/dist/commands/stop.js +2 -2
  126. package/dist/commands/stop.js.map +1 -0
  127. package/dist/commands/validate.d.ts +4 -8
  128. package/dist/commands/validate.js +50 -128
  129. package/dist/commands/validate.js.map +1 -0
  130. package/dist/help.js +1 -0
  131. package/dist/help.js.map +1 -0
  132. package/dist/index.js +1 -0
  133. package/dist/index.js.map +1 -0
  134. package/oclif.manifest.json +263 -161
  135. package/package.json +11 -10
  136. package/templates/cloud/powersync/service.template.yaml +164 -0
  137. package/templates/self-hosted/base/powersync/service.template.yaml +209 -0
  138. package/dist/api/run-validation-tests.d.ts +0 -63
  139. package/dist/api/run-validation-tests.js +0 -202
  140. package/templates/cloud/powersync/service.yaml +0 -174
  141. package/templates/self-hosted/base/powersync/service.yaml +0 -243
package/README.md CHANGED
@@ -239,7 +239,7 @@ $ npm install -g powersync
239
239
  $ powersync COMMAND
240
240
  running command...
241
241
  $ powersync (--version)
242
- powersync/0.9.2 linux-x64 node-v24.14.0
242
+ powersync/0.9.4 linux-x64 node-v24.15.0
243
243
  $ powersync --help [COMMAND]
244
244
  USAGE
245
245
  $ powersync COMMAND
@@ -388,7 +388,7 @@ EXAMPLES
388
388
  $ powersync configure ide
389
389
  ```
390
390
 
391
- _See code: [src/commands/configure/ide.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/configure/ide.ts)_
391
+ _See code: [src/commands/configure/ide.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/configure/ide.ts)_
392
392
 
393
393
  ## `powersync deploy`
394
394
 
@@ -397,16 +397,22 @@ _See code: [src/commands/configure/ide.ts](https://github.com/powersync-ja/power
397
397
  ```
398
398
  USAGE
399
399
  $ powersync deploy [--deploy-timeout <value>] [--directory <value>] [--instance-id <value> --project-id
400
- <value>] [--org-id <value>]
400
+ <value>] [--org-id <value>] [--sync-config-file-path <value>] [--skip-validations <value> | --validate-only <value>]
401
401
 
402
402
  FLAGS
403
- --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while polling
404
- status (default 300 seconds).
403
+ --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while polling
404
+ status (default 300 seconds).
405
+ --skip-validations=<value> Comma-separated list of validation tests to skip. Options: configuration, connections,
406
+ sync-config. Example: --skip-validations="configuration"
407
+ --validate-only=<value> Comma-separated list of validation tests to run, skipping all others. Options:
408
+ configuration, connections, sync-config. Example: --validate-only="configuration"
405
409
 
406
410
  PROJECT FLAGS
407
- --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
408
- required if multiple powersync config files are present in subdirectories of the current working
409
- directory.
411
+ --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync".
412
+ This is required if multiple powersync config files are present in subdirectories of
413
+ the current working directory.
414
+ --sync-config-file-path=<value> [Optional] Override the path to a sync config file. When set, this file is used
415
+ instead of sync-config.yaml in the project directory.
410
416
 
411
417
  CLOUD_PROJECT FLAGS
412
418
  --instance-id=<value> PowerSync Cloud instance ID. Manually passed if the current context has not been linked.
@@ -428,7 +434,7 @@ EXAMPLES
428
434
  $ powersync deploy --instance-id=<id> --project-id=<id>
429
435
  ```
430
436
 
431
- _See code: [src/commands/deploy/index.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/deploy/index.ts)_
437
+ _See code: [src/commands/deploy/index.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/deploy/index.ts)_
432
438
 
433
439
  ## `powersync deploy service-config`
434
440
 
@@ -437,11 +443,15 @@ _See code: [src/commands/deploy/index.ts](https://github.com/powersync-ja/powers
437
443
  ```
438
444
  USAGE
439
445
  $ powersync deploy service-config [--deploy-timeout <value>] [--directory <value>] [--instance-id <value> --project-id
440
- <value>] [--org-id <value>]
446
+ <value>] [--org-id <value>] [--skip-validations <value> | --validate-only <value>]
441
447
 
442
448
  FLAGS
443
- --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while polling
444
- status (default 300 seconds).
449
+ --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while polling
450
+ status (default 300 seconds).
451
+ --skip-validations=<value> Comma-separated list of validation tests to skip. Options: configuration, connections.
452
+ Example: --skip-validations="configuration"
453
+ --validate-only=<value> Comma-separated list of validation tests to run, skipping all others. Options:
454
+ configuration, connections. Example: --validate-only="configuration"
445
455
 
446
456
  PROJECT FLAGS
447
457
  --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
@@ -465,7 +475,7 @@ EXAMPLES
465
475
  $ powersync deploy service-config --instance-id=<id> --project-id=<id>
466
476
  ```
467
477
 
468
- _See code: [src/commands/deploy/service-config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/deploy/service-config.ts)_
478
+ _See code: [src/commands/deploy/service-config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/deploy/service-config.ts)_
469
479
 
470
480
  ## `powersync deploy sync-config`
471
481
 
@@ -474,18 +484,20 @@ _See code: [src/commands/deploy/service-config.ts](https://github.com/powersync-
474
484
  ```
475
485
  USAGE
476
486
  $ powersync deploy sync-config [--deploy-timeout <value>] [--directory <value>] [--instance-id <value> --project-id
477
- <value>] [--org-id <value>] [--sync-config-file-path <value>]
487
+ <value>] [--org-id <value>] [--sync-config-file-path <value>] [--skip-validations <value> | ]
478
488
 
479
489
  FLAGS
480
- --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while
481
- polling status (default 300 seconds).
482
- --sync-config-file-path=<value> Path to a sync config file. If provided, this file will be validated and deployed
483
- instead of the default sync-config.yaml.
490
+ --deploy-timeout=<value> [default: 300] Seconds to wait after scheduling a deploy before timing out while polling
491
+ status (default 300 seconds).
492
+ --skip-validations=<value> Comma-separated list of validation tests to skip. Options: sync-config. Example:
493
+ --skip-validations="sync-config"
484
494
 
485
495
  PROJECT FLAGS
486
- --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
487
- required if multiple powersync config files are present in subdirectories of the current working
488
- directory.
496
+ --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync".
497
+ This is required if multiple powersync config files are present in subdirectories of
498
+ the current working directory.
499
+ --sync-config-file-path=<value> [Optional] Override the path to a sync config file. When set, this file is used
500
+ instead of sync-config.yaml in the project directory.
489
501
 
490
502
  CLOUD_PROJECT FLAGS
491
503
  --instance-id=<value> PowerSync Cloud instance ID. Manually passed if the current context has not been linked.
@@ -504,7 +516,7 @@ EXAMPLES
504
516
  $ powersync deploy sync-config --instance-id=<id> --project-id=<id>
505
517
  ```
506
518
 
507
- _See code: [src/commands/deploy/sync-config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/deploy/sync-config.ts)_
519
+ _See code: [src/commands/deploy/sync-config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/deploy/sync-config.ts)_
508
520
 
509
521
  ## `powersync destroy`
510
522
 
@@ -512,8 +524,8 @@ _See code: [src/commands/deploy/sync-config.ts](https://github.com/powersync-ja/
512
524
 
513
525
  ```
514
526
  USAGE
515
- $ powersync destroy [--confirm yes] [--directory <value>] [--instance-id <value> --project-id <value>]
516
- [--org-id <value>]
527
+ $ powersync destroy [--directory <value>] [--instance-id <value> --project-id <value>] [--org-id <value>]
528
+ [--confirm yes]
517
529
 
518
530
  FLAGS
519
531
  --confirm=<option> Set to "yes" to confirm destruction of the instance.
@@ -541,7 +553,7 @@ EXAMPLES
541
553
  $ powersync destroy --confirm=yes
542
554
  ```
543
555
 
544
- _See code: [src/commands/destroy.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/destroy.ts)_
556
+ _See code: [src/commands/destroy.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/destroy.ts)_
545
557
 
546
558
  ## `powersync docker configure`
547
559
 
@@ -579,7 +591,7 @@ EXAMPLES
579
591
  $ powersync docker configure --database=postgres --storage=postgres
580
592
  ```
581
593
 
582
- _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/docker/configure.ts)_
594
+ _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/docker/configure.ts)_
583
595
 
584
596
  ## `powersync docker reset`
585
597
 
@@ -608,7 +620,7 @@ EXAMPLES
608
620
  $ powersync docker reset
609
621
  ```
610
622
 
611
- _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/docker/reset.ts)_
623
+ _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/docker/reset.ts)_
612
624
 
613
625
  ## `powersync docker start`
614
626
 
@@ -636,7 +648,7 @@ EXAMPLES
636
648
  $ powersync docker start
637
649
  ```
638
650
 
639
- _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/docker/start.ts)_
651
+ _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/docker/start.ts)_
640
652
 
641
653
  ## `powersync docker stop`
642
654
 
@@ -678,7 +690,7 @@ EXAMPLES
678
690
  $ powersync docker stop --project-name=powersync_myapp --remove
679
691
  ```
680
692
 
681
- _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/docker/stop.ts)_
693
+ _See code: [@powersync/cli-plugin-docker](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/docker/stop.ts)_
682
694
 
683
695
  ## `powersync edit config`
684
696
 
@@ -720,7 +732,7 @@ EXAMPLES
720
732
  $ powersync edit config --directory ./powersync
721
733
  ```
722
734
 
723
- _See code: [@powersync/cli-plugin-config-edit](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/edit/config.ts)_
735
+ _See code: [@powersync/cli-plugin-config-edit](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/edit/config.ts)_
724
736
 
725
737
  ## `powersync fetch config`
726
738
 
@@ -728,8 +740,8 @@ _See code: [@powersync/cli-plugin-config-edit](https://github.com/powersync-ja/p
728
740
 
729
741
  ```
730
742
  USAGE
731
- $ powersync fetch config [--output json|yaml] [--directory <value>] [--instance-id <value> --project-id <value>]
732
- [--org-id <value>]
743
+ $ powersync fetch config [--directory <value>] [--instance-id <value> --project-id <value>] [--org-id <value>]
744
+ [--output json|yaml]
733
745
 
734
746
  FLAGS
735
747
  --output=<option> [default: yaml] Output format: yaml or json.
@@ -757,7 +769,7 @@ EXAMPLES
757
769
  $ powersync fetch config --output=json
758
770
  ```
759
771
 
760
- _See code: [src/commands/fetch/config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/fetch/config.ts)_
772
+ _See code: [src/commands/fetch/config.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/fetch/config.ts)_
761
773
 
762
774
  ## `powersync fetch instances`
763
775
 
@@ -785,7 +797,7 @@ EXAMPLES
785
797
  $ powersync fetch instances --project-id=<id> --output=json
786
798
  ```
787
799
 
788
- _See code: [src/commands/fetch/instances.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/fetch/instances.ts)_
800
+ _See code: [src/commands/fetch/instances.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/fetch/instances.ts)_
789
801
 
790
802
  ## `powersync fetch status`
791
803
 
@@ -793,8 +805,8 @@ Show instance diagnostics (connections, sync config, replication).
793
805
 
794
806
  ```
795
807
  USAGE
796
- $ powersync fetch status [--output human|json|yaml] [--api-url <value> | --instance-id <value> | --org-id
797
- <value> | --project-id <value>] [--directory <value>]
808
+ $ powersync fetch status [--api-url <value> | --instance-id <value> | --org-id <value> | --project-id <value>]
809
+ [--directory <value>] [--output human|json|yaml]
798
810
 
799
811
  FLAGS
800
812
  --output=<option> [default: human] Output format: human-readable, json, or yaml.
@@ -830,7 +842,7 @@ EXAMPLES
830
842
  $ powersync fetch status --instance-id=<id> --project-id=<id>
831
843
  ```
832
844
 
833
- _See code: [src/commands/fetch/status.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/fetch/status.ts)_
845
+ _See code: [src/commands/fetch/status.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/fetch/status.ts)_
834
846
 
835
847
  ## `powersync generate schema`
836
848
 
@@ -838,12 +850,14 @@ Generate client schema file from instance schema and sync config.
838
850
 
839
851
  ```
840
852
  USAGE
841
- $ powersync generate schema --output dart|dotNet|js|jsLegacy|kotlin|swift|ts --output-path <value> [--api-url
842
- <value> | --instance-id <value> | --org-id <value> | --project-id <value>] [--directory <value>]
853
+ $ powersync generate schema --output dart|dotNet|dotNetClass|js|jsLegacy|kotlin|swift|ts --output-path <value>
854
+ [--api-url <value> | --instance-id <value> | --org-id <value> | --project-id <value>] [--directory <value>]
855
+ [--sync-config-file-path <value>]
843
856
 
844
857
  FLAGS
845
- --output=<option> (required) [default: type] Output type: dart, dotNet, js, jsLegacy, kotlin, swift, ts
846
- <options: dart|dotNet|js|jsLegacy|kotlin|swift|ts>
858
+ --output=<option> (required) [default: type] Output type: dart, dotNet, dotNetClass, js, jsLegacy, kotlin, swift,
859
+ ts
860
+ <options: dart|dotNet|dotNetClass|js|jsLegacy|kotlin|swift|ts>
847
861
  --output-path=<value> (required) Path to output the schema file.
848
862
 
849
863
  SELF_HOSTED_PROJECT FLAGS
@@ -851,9 +865,11 @@ SELF_HOSTED_PROJECT FLAGS
851
865
  --instance-id). Resolved: flag → cli.yaml → API_URL.
852
866
 
853
867
  PROJECT FLAGS
854
- --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
855
- required if multiple powersync config files are present in subdirectories of the current working
856
- directory.
868
+ --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync".
869
+ This is required if multiple powersync config files are present in subdirectories of
870
+ the current working directory.
871
+ --sync-config-file-path=<value> [Optional] Override the path to a sync config file. When set, this file is used
872
+ instead of sync-config.yaml in the project directory.
857
873
 
858
874
  CLOUD_PROJECT FLAGS
859
875
  --instance-id=<value> [Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud
@@ -874,7 +890,7 @@ EXAMPLES
874
890
  $ powersync generate schema --output=dart --output-path=lib/schema.dart --instance-id=<id> --project-id=<id>
875
891
  ```
876
892
 
877
- _See code: [src/commands/generate/schema.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/generate/schema.ts)_
893
+ _See code: [src/commands/generate/schema.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/generate/schema.ts)_
878
894
 
879
895
  ## `powersync generate token`
880
896
 
@@ -882,8 +898,8 @@ Generate a development JWT for client connections.
882
898
 
883
899
  ```
884
900
  USAGE
885
- $ powersync generate token --subject <value> [--expires-in-seconds <value>] [--kid <value>] [--api-url <value> |
886
- --instance-id <value> | --org-id <value> | --project-id <value>] [--directory <value>]
901
+ $ powersync generate token --subject <value> [--api-url <value> | --instance-id <value> | --org-id <value> |
902
+ --project-id <value>] [--directory <value>] [--expires-in-seconds <value>] [--kid <value>]
887
903
 
888
904
  FLAGS
889
905
  --expires-in-seconds=<value> [default: 43200] Expiration time in seconds. Default is 43,200 (12 hours).
@@ -920,7 +936,7 @@ EXAMPLES
920
936
  $ powersync generate token --subject=user-123 --expires-in-seconds=3600
921
937
  ```
922
938
 
923
- _See code: [src/commands/generate/token.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/generate/token.ts)_
939
+ _See code: [src/commands/generate/token.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/generate/token.ts)_
924
940
 
925
941
  ## `powersync help [COMMAND]`
926
942
 
@@ -966,7 +982,7 @@ EXAMPLES
966
982
  $ powersync init cloud --directory=powersync
967
983
  ```
968
984
 
969
- _See code: [src/commands/init/cloud.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/init/cloud.ts)_
985
+ _See code: [src/commands/init/cloud.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/init/cloud.ts)_
970
986
 
971
987
  ## `powersync init self-hosted`
972
988
 
@@ -993,7 +1009,7 @@ EXAMPLES
993
1009
  $ powersync init self-hosted --directory=powersync
994
1010
  ```
995
1011
 
996
- _See code: [src/commands/init/self-hosted.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/init/self-hosted.ts)_
1012
+ _See code: [src/commands/init/self-hosted.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/init/self-hosted.ts)_
997
1013
 
998
1014
  ## `powersync link cloud`
999
1015
 
@@ -1001,8 +1017,8 @@ _See code: [src/commands/init/self-hosted.ts](https://github.com/powersync-ja/po
1001
1017
 
1002
1018
  ```
1003
1019
  USAGE
1004
- $ powersync link cloud --project-id <value> [--create] [--instance-id <value>] [--org-id <value>] [--directory
1005
- <value>]
1020
+ $ powersync link cloud --project-id <value> [--directory <value>] [--instance-id <value>] [--org-id <value>]
1021
+ [--create]
1006
1022
 
1007
1023
  FLAGS
1008
1024
  --create Create a new Cloud instance in the given org and project, then link. Do not supply
@@ -1032,7 +1048,7 @@ EXAMPLES
1032
1048
  $ powersync link cloud --instance-id=<id> --project-id=<project-id> --org-id=<org-id>
1033
1049
  ```
1034
1050
 
1035
- _See code: [src/commands/link/cloud.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/link/cloud.ts)_
1051
+ _See code: [src/commands/link/cloud.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/link/cloud.ts)_
1036
1052
 
1037
1053
  ## `powersync link self-hosted`
1038
1054
 
@@ -1060,7 +1076,7 @@ EXAMPLES
1060
1076
  $ powersync link self-hosted --api-url=https://powersync.example.com
1061
1077
  ```
1062
1078
 
1063
- _See code: [src/commands/link/self-hosted.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/link/self-hosted.ts)_
1079
+ _See code: [src/commands/link/self-hosted.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/link/self-hosted.ts)_
1064
1080
 
1065
1081
  ## `powersync login`
1066
1082
 
@@ -1081,7 +1097,7 @@ EXAMPLES
1081
1097
  $ powersync login
1082
1098
  ```
1083
1099
 
1084
- _See code: [src/commands/login.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/login.ts)_
1100
+ _See code: [src/commands/login.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/login.ts)_
1085
1101
 
1086
1102
  ## `powersync logout`
1087
1103
 
@@ -1101,7 +1117,7 @@ EXAMPLES
1101
1117
  $ powersync logout
1102
1118
  ```
1103
1119
 
1104
- _See code: [src/commands/logout.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/logout.ts)_
1120
+ _See code: [src/commands/logout.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/logout.ts)_
1105
1121
 
1106
1122
  ## `powersync migrate sync-rules`
1107
1123
 
@@ -1109,8 +1125,8 @@ Migrates Sync Rules to Sync Streams
1109
1125
 
1110
1126
  ```
1111
1127
  USAGE
1112
- $ powersync migrate sync-rules [--input-file <value>] [--output-file <value>] [--api-url <value> | --instance-id
1113
- <value> | --org-id <value> | --project-id <value>] [--directory <value>]
1128
+ $ powersync migrate sync-rules [--api-url <value> | --instance-id <value> | --org-id <value> | --project-id <value>]
1129
+ [--directory <value>] [--input-file <value>] [--output-file <value>]
1114
1130
 
1115
1131
  FLAGS
1116
1132
  --input-file=<value> Path to the input sync rules file. Defaults to the project sync-config.yaml file.
@@ -1138,7 +1154,7 @@ DESCRIPTION
1138
1154
  Migrates Sync Rules to Sync Streams
1139
1155
  ```
1140
1156
 
1141
- _See code: [src/commands/migrate/sync-rules.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/migrate/sync-rules.ts)_
1157
+ _See code: [src/commands/migrate/sync-rules.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/migrate/sync-rules.ts)_
1142
1158
 
1143
1159
  ## `powersync plugins`
1144
1160
 
@@ -1437,6 +1453,12 @@ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/
1437
1453
  ```
1438
1454
  USAGE
1439
1455
  $ powersync pull instance [--directory <value>] [--instance-id <value> --project-id <value>] [--org-id <value>]
1456
+ [--overwrite]
1457
+
1458
+ FLAGS
1459
+ --overwrite Overwrite existing service.yaml and sync-config.yaml if they exist. By default, if these files already
1460
+ exist, the fetched configs will be written to service-fetched.yaml and sync-fetched.yaml to avoid
1461
+ overwriting local changes.
1440
1462
 
1441
1463
  PROJECT FLAGS
1442
1464
  --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
@@ -1464,7 +1486,7 @@ EXAMPLES
1464
1486
  $ powersync pull instance --instance-id=<id> --project-id=<id> --org-id=<org-id>
1465
1487
  ```
1466
1488
 
1467
- _See code: [src/commands/pull/instance.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/pull/instance.ts)_
1489
+ _See code: [src/commands/pull/instance.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/pull/instance.ts)_
1468
1490
 
1469
1491
  ## `powersync status`
1470
1492
 
@@ -1472,8 +1494,8 @@ Show instance diagnostics (connections, sync config, replication).
1472
1494
 
1473
1495
  ```
1474
1496
  USAGE
1475
- $ powersync status [--output human|json|yaml] [--api-url <value> | --instance-id <value> | --org-id
1476
- <value> | --project-id <value>] [--directory <value>]
1497
+ $ powersync status [--api-url <value> | --instance-id <value> | --org-id <value> | --project-id <value>]
1498
+ [--directory <value>] [--output human|json|yaml]
1477
1499
 
1478
1500
  FLAGS
1479
1501
  --output=<option> [default: human] Output format: human-readable, json, or yaml.
@@ -1509,7 +1531,7 @@ EXAMPLES
1509
1531
  $ powersync status --instance-id=<id> --project-id=<id>
1510
1532
  ```
1511
1533
 
1512
- _See code: [src/commands/status.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/status.ts)_
1534
+ _See code: [src/commands/status.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/status.ts)_
1513
1535
 
1514
1536
  ## `powersync stop`
1515
1537
 
@@ -1517,8 +1539,8 @@ _See code: [src/commands/status.ts](https://github.com/powersync-ja/powersync-cl
1517
1539
 
1518
1540
  ```
1519
1541
  USAGE
1520
- $ powersync stop [--confirm yes] [--directory <value>] [--instance-id <value> --project-id <value>]
1521
- [--org-id <value>]
1542
+ $ powersync stop [--directory <value>] [--instance-id <value> --project-id <value>] [--org-id <value>]
1543
+ [--confirm yes]
1522
1544
 
1523
1545
  FLAGS
1524
1546
  --confirm=<option> Set to "yes" to confirm stopping the instance.
@@ -1546,7 +1568,7 @@ EXAMPLES
1546
1568
  $ powersync stop --confirm=yes
1547
1569
  ```
1548
1570
 
1549
- _See code: [src/commands/stop.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/stop.ts)_
1571
+ _See code: [src/commands/stop.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/stop.ts)_
1550
1572
 
1551
1573
  ## `powersync validate`
1552
1574
 
@@ -1554,21 +1576,28 @@ Validate config schema, connections, and sync config before deploy.
1554
1576
 
1555
1577
  ```
1556
1578
  USAGE
1557
- $ powersync validate [--output human|json|yaml] [--api-url <value> | --instance-id <value> | --org-id
1558
- <value> | --project-id <value>] [--directory <value>]
1579
+ $ powersync validate [--api-url <value> | --instance-id <value> | --org-id <value> | --project-id <value>]
1580
+ [--directory <value>] [--sync-config-file-path <value>] [--output human|json|yaml] [--skip-validations <value> |
1581
+ --validate-only <value>]
1559
1582
 
1560
1583
  FLAGS
1561
- --output=<option> [default: human] Output format: human-readable, json, or yaml.
1562
- <options: human|json|yaml>
1584
+ --output=<option> [default: human] Output format: human-readable, json, or yaml.
1585
+ <options: human|json|yaml>
1586
+ --skip-validations=<value> Comma-separated list of validation tests to skip. Options: configuration, connections,
1587
+ sync-config. Example: --skip-validations="configuration"
1588
+ --validate-only=<value> Comma-separated list of validation tests to run, skipping all others. Options:
1589
+ configuration, connections, sync-config. Example: --validate-only="configuration"
1563
1590
 
1564
1591
  SELF_HOSTED_PROJECT FLAGS
1565
1592
  --api-url=<value> [Self-hosted] PowerSync API URL. When set, context is treated as self-hosted (exclusive with
1566
1593
  --instance-id). Resolved: flag → cli.yaml → API_URL.
1567
1594
 
1568
1595
  PROJECT FLAGS
1569
- --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync". This is
1570
- required if multiple powersync config files are present in subdirectories of the current working
1571
- directory.
1596
+ --directory=<value> [default: powersync] Directory containing PowerSync config. Defaults to "powersync".
1597
+ This is required if multiple powersync config files are present in subdirectories of
1598
+ the current working directory.
1599
+ --sync-config-file-path=<value> [Optional] Override the path to a sync config file. When set, this file is used
1600
+ instead of sync-config.yaml in the project directory.
1572
1601
 
1573
1602
  CLOUD_PROJECT FLAGS
1574
1603
  --instance-id=<value> [Cloud] PowerSync Cloud instance ID (BSON ObjectID). When set, context is treated as cloud
@@ -1591,6 +1620,6 @@ EXAMPLES
1591
1620
  $ powersync validate --api-url=https://powersync.example.com
1592
1621
  ```
1593
1622
 
1594
- _See code: [src/commands/validate.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.2/src/commands/validate.ts)_
1623
+ _See code: [src/commands/validate.ts](https://github.com/powersync-ja/powersync-cli/blob/v0.9.4/src/commands/validate.ts)_
1595
1624
 
1596
1625
  <!-- commandsstop -->
package/bin/dev.js CHANGED
@@ -11,12 +11,18 @@ setCliClientHeaders({
11
11
  'user-agent': `POWERSYNC_CLI/${packageJSON.version}`
12
12
  });
13
13
 
14
+ // Ensure pnpm scripts run in the shell's original cwd (pnpm sets INIT_CWD for this).
15
+ if (process.env.INIT_CWD && process.env.INIT_CWD !== process.cwd()) {
16
+ process.chdir(process.env.INIT_CWD);
17
+ }
18
+
14
19
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
15
20
 
16
21
  await execute({
17
22
  development: true,
18
- dir: import.meta.url,
23
+ // Force oclif to ignore the baked manifest so it resolves commands from TS via tsx.
19
24
  loadOptions: {
25
+ ignoreManifest: true,
20
26
  root: path.resolve(__dirname, '..')
21
27
  }
22
28
  });
@@ -0,0 +1,39 @@
1
+ import { CloudInstanceCommand } from '@powersync/cli-core';
2
+ import { ServiceCloudConfigDecoded } from '@powersync/cli-schemas';
3
+ import { routes } from '@powersync/management-types';
4
+ export default abstract class BaseDeployCommand extends CloudInstanceCommand {
5
+ static baseFlags: {
6
+ 'instance-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
7
+ 'org-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
8
+ 'project-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
9
+ directory: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'deploy-timeout': import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
11
+ };
12
+ protected deployAll(params: {
13
+ cloudConfigState: routes.InstanceConfigResponse;
14
+ deployTimeoutMs: number;
15
+ updateSyncConfig: boolean;
16
+ }): Promise<void>;
17
+ protected deployInstanceConfig(params: {
18
+ cloudConfigState: routes.InstanceConfigResponse;
19
+ updateSyncConfig: boolean;
20
+ }): Promise<routes.DeployInstanceResponse>;
21
+ protected loadCloudConfigState(): Promise<routes.InstanceConfigResponse>;
22
+ parseLocalConfig(projectDirectory: string, useRawConfig?: boolean): ServiceCloudConfigDecoded;
23
+ protected provision(params: {
24
+ cloudConfigState: routes.InstanceConfigResponse;
25
+ deployTimeoutMs: number;
26
+ indentationLevel: number;
27
+ }): Promise<void>;
28
+ protected validateServiceConfig(params: {
29
+ cloudConfigState: routes.InstanceConfigResponse;
30
+ }): Promise<void>;
31
+ protected waitForDeployCompletion(params: {
32
+ deployResult: routes.DeployInstanceResponse;
33
+ indentation?: string;
34
+ logCompletionMessage?: boolean;
35
+ logScheduledMessage?: boolean;
36
+ timeoutMs: number;
37
+ }): Promise<void>;
38
+ protected withDeploy(timeoutMs: number, fn: () => Promise<routes.DeployInstanceResponse>): Promise<void>;
39
+ }