neonctl 1.29.1 → 1.29.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 (184) hide show
  1. package/analytics.js +78 -0
  2. package/api.js +35 -0
  3. package/auth.js +101 -0
  4. package/{src/cli.ts → cli.js} +0 -1
  5. package/commands/auth.js +102 -0
  6. package/commands/auth.test.js +42 -0
  7. package/commands/branches.js +303 -0
  8. package/commands/branches.test.js +321 -0
  9. package/commands/connection_string.js +158 -0
  10. package/commands/connection_string.test.js +253 -0
  11. package/commands/databases.js +79 -0
  12. package/commands/databases.test.js +51 -0
  13. package/commands/help.test.js +11 -0
  14. package/{src/commands/index.ts → commands/index.js} +10 -11
  15. package/commands/ip_allow.js +135 -0
  16. package/commands/ip_allow.test.js +78 -0
  17. package/commands/operations.js +28 -0
  18. package/commands/operations.test.js +11 -0
  19. package/commands/projects.js +186 -0
  20. package/commands/projects.test.js +132 -0
  21. package/commands/roles.js +57 -0
  22. package/commands/roles.test.js +42 -0
  23. package/commands/set_context.js +22 -0
  24. package/commands/set_context.test.js +53 -0
  25. package/commands/user.js +15 -0
  26. package/config.js +11 -0
  27. package/context.js +48 -0
  28. package/env.js +6 -0
  29. package/errors.js +16 -0
  30. package/help.js +146 -0
  31. package/index.js +168 -0
  32. package/log.js +15 -0
  33. package/package.json +1 -1
  34. package/parameters.gen.js +322 -0
  35. package/pkg.js +3 -45
  36. package/test_utils/mock_server.js +16 -0
  37. package/test_utils/oauth_server.js +9 -0
  38. package/test_utils/test_cli_command.js +80 -0
  39. package/types.js +1 -0
  40. package/utils/enrichers.js +49 -0
  41. package/utils/formats.js +5 -0
  42. package/utils/formats.test.js +32 -0
  43. package/utils/middlewares.js +20 -0
  44. package/utils/point_in_time.js +50 -0
  45. package/utils/psql.js +24 -0
  46. package/utils/string.js +5 -0
  47. package/utils/ui.js +59 -0
  48. package/writer.js +87 -0
  49. package/writer.test.js +86 -0
  50. package/.bump +0 -1
  51. package/.editorconfig +0 -7
  52. package/.eslintrc.cjs +0 -15
  53. package/.github/workflows/commitlint.yml +0 -46
  54. package/.github/workflows/pr.yml +0 -25
  55. package/.github/workflows/release.yml +0 -30
  56. package/.husky/commit-msg +0 -4
  57. package/.husky/pre-commit +0 -4
  58. package/.nvmrc +0 -1
  59. package/.prettierignore +0 -3
  60. package/.prettierrc.json +0 -3
  61. package/.releaserc.json +0 -47
  62. package/LICENSE +0 -202
  63. package/commitlint.config.cjs +0 -7
  64. package/generateOptionsFromSpec.ts +0 -68
  65. package/jest/setup.js +0 -5
  66. package/jest.config.ts +0 -199
  67. package/mocks/bin/psql.cjs +0 -9
  68. package/mocks/main/projects/GET.js +0 -27
  69. package/mocks/main/projects/POST.js +0 -22
  70. package/mocks/main/projects/shared/GET.js +0 -16
  71. package/mocks/main/projects/test/DELETE.json +0 -7
  72. package/mocks/main/projects/test/GET.json +0 -13
  73. package/mocks/main/projects/test/PATCH.js +0 -18
  74. package/mocks/main/projects/test/branches/GET.json +0 -25
  75. package/mocks/main/projects/test/branches/POST.js +0 -83
  76. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/DELETE.json +0 -7
  77. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/GET.json +0 -9
  78. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/PATCH.js +0 -14
  79. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/databases/GET.json +0 -6
  80. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/databases/POST.js +0 -13
  81. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/databases/test_db/DELETE.json +0 -6
  82. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/endpoints/GET.json +0 -26
  83. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/endpoints/POST.json +0 -6
  84. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/roles/GET.json +0 -3
  85. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/roles/POST.js +0 -14
  86. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/roles/test_role/DELETE.json +0 -6
  87. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/roles/test_role/reveal_password/GET.json +0 -3
  88. package/mocks/main/projects/test/branches/br-cloudy-branch-12345678/set_as_primary/POST.json +0 -9
  89. package/mocks/main/projects/test/branches/br-numbered-branch-123456/GET.json +0 -10
  90. package/mocks/main/projects/test/branches/br-sunny-branch-123456/DELETE.json +0 -7
  91. package/mocks/main/projects/test/branches/br-sunny-branch-123456/GET.json +0 -10
  92. package/mocks/main/projects/test/branches/br-sunny-branch-123456/PATCH.js +0 -14
  93. package/mocks/main/projects/test/branches/br-sunny-branch-123456/databases/GET.json +0 -6
  94. package/mocks/main/projects/test/branches/br-sunny-branch-123456/databases/POST.js +0 -13
  95. package/mocks/main/projects/test/branches/br-sunny-branch-123456/databases/test_db/DELETE.json +0 -6
  96. package/mocks/main/projects/test/branches/br-sunny-branch-123456/endpoints/GET.json +0 -26
  97. package/mocks/main/projects/test/branches/br-sunny-branch-123456/endpoints/POST.json +0 -6
  98. package/mocks/main/projects/test/branches/br-sunny-branch-123456/restore/POST.js +0 -16
  99. package/mocks/main/projects/test/branches/br-sunny-branch-123456/roles/GET.json +0 -3
  100. package/mocks/main/projects/test/branches/br-sunny-branch-123456/roles/POST.js +0 -14
  101. package/mocks/main/projects/test/branches/br-sunny-branch-123456/roles/test_role/DELETE.json +0 -6
  102. package/mocks/main/projects/test/branches/br-sunny-branch-123456/roles/test_role/reveal_password/GET.json +0 -3
  103. package/mocks/main/projects/test/branches/br-sunny-branch-123456/set_as_primary/POST.json +0 -9
  104. package/mocks/main/projects/test/endpoints/GET.json +0 -9
  105. package/mocks/main/projects/test/endpoints/POST.js +0 -32
  106. package/mocks/main/projects/test/endpoints/test_endpoint_id/DELETE.json +0 -7
  107. package/mocks/main/projects/test/endpoints/test_endpoint_id/GET.json +0 -9
  108. package/mocks/main/projects/test/endpoints/test_endpoint_id/PATCH.js +0 -17
  109. package/mocks/main/projects/test/operations/GET.json +0 -22
  110. package/mocks/main/users/me/GET.json +0 -5
  111. package/mocks/restore/projects/test/branches/GET.json +0 -21
  112. package/mocks/restore/projects/test/branches/br-another-branch-123456/GET.json +0 -6
  113. package/mocks/restore/projects/test/branches/br-another-branch-123456/restore/POST.js +0 -13
  114. package/mocks/restore/projects/test/branches/br-any-branch-123456/GET.json +0 -6
  115. package/mocks/restore/projects/test/branches/br-parent-tots-123456/GET.json +0 -7
  116. package/mocks/restore/projects/test/branches/br-parent-tots-123456/restore/POST.js +0 -14
  117. package/mocks/restore/projects/test/branches/br-self-tolsn-123456/GET.json +0 -6
  118. package/mocks/restore/projects/test/branches/br-self-tolsn-123456/restore/POST.js +0 -15
  119. package/mocks/single_project/projects/GET.json +0 -10
  120. package/mocks/single_project/projects/test-project-123456/GET.json +0 -14
  121. package/mocks/single_project/projects/test-project-123456/branches/GET.json +0 -11
  122. package/mocks/single_project/projects/test-project-123456/branches/br-main-branch-123456/databases/GET.json +0 -3
  123. package/mocks/single_project/projects/test-project-123456/branches/br-main-branch-123456/endpoints/GET.json +0 -10
  124. package/mocks/single_project/projects/test-project-123456/branches/br-main-branch-123456/roles/GET.json +0 -3
  125. package/mocks/single_project/projects/test-project-123456/branches/br-main-branch-123456/roles/test_role/reveal_password/GET.json +0 -3
  126. package/rollup.config.js +0 -20
  127. package/snapshots/commands/branches.test.snap +0 -221
  128. package/snapshots/commands/connection_string.test.snap +0 -70
  129. package/snapshots/commands/databases.test.snap +0 -20
  130. package/snapshots/commands/ip_allow.test.snap +0 -55
  131. package/snapshots/commands/operations.test.snap +0 -17
  132. package/snapshots/commands/projects.test.snap +0 -141
  133. package/snapshots/commands/roles.test.snap +0 -19
  134. package/snapshots/commands/set_context.test.snap +0 -30
  135. package/snapshots/writer.test.snap +0 -60
  136. package/snapshotsResolver.cjs +0 -32
  137. package/src/analytics.ts +0 -95
  138. package/src/api.ts +0 -44
  139. package/src/auth.ts +0 -137
  140. package/src/commands/auth.test.ts +0 -62
  141. package/src/commands/auth.ts +0 -148
  142. package/src/commands/branches.test.ts +0 -354
  143. package/src/commands/branches.ts +0 -451
  144. package/src/commands/connection_string.test.ts +0 -250
  145. package/src/commands/connection_string.ts +0 -210
  146. package/src/commands/databases.test.ts +0 -55
  147. package/src/commands/databases.ts +0 -129
  148. package/src/commands/help.test.ts +0 -13
  149. package/src/commands/ip_allow.test.ts +0 -86
  150. package/src/commands/ip_allow.ts +0 -202
  151. package/src/commands/operations.test.ts +0 -13
  152. package/src/commands/operations.ts +0 -41
  153. package/src/commands/projects.test.ts +0 -147
  154. package/src/commands/projects.ts +0 -275
  155. package/src/commands/roles.test.ts +0 -46
  156. package/src/commands/roles.ts +0 -100
  157. package/src/commands/set_context.test.ts +0 -64
  158. package/src/commands/set_context.ts +0 -27
  159. package/src/commands/user.ts +0 -21
  160. package/src/config.ts +0 -22
  161. package/src/context.ts +0 -61
  162. package/src/env.ts +0 -7
  163. package/src/errors.ts +0 -24
  164. package/src/help.ts +0 -185
  165. package/src/index.ts +0 -180
  166. package/src/log.ts +0 -16
  167. package/src/parameters.gen.ts +0 -332
  168. package/src/pkg.ts +0 -9
  169. package/src/test_utils/mock_server.ts +0 -27
  170. package/src/test_utils/oauth_server.ts +0 -10
  171. package/src/test_utils/test_cli_command.ts +0 -117
  172. package/src/types.ts +0 -25
  173. package/src/utils/enrichers.ts +0 -73
  174. package/src/utils/formats.test.ts +0 -41
  175. package/src/utils/formats.ts +0 -11
  176. package/src/utils/middlewares.ts +0 -23
  177. package/src/utils/point_in_time.ts +0 -86
  178. package/src/utils/psql.ts +0 -29
  179. package/src/utils/string.ts +0 -8
  180. package/src/utils/ui.ts +0 -64
  181. package/src/writer.test.ts +0 -98
  182. package/src/writer.ts +0 -131
  183. package/tsconfig.json +0 -17
  184. /package/{src/callback.html → callback.html} +0 -0
@@ -1,7 +0,0 @@
1
- {
2
- "branch": {
3
- "id": "br-parent-tots-123456",
4
- "name": "parent-tots",
5
- "parent_id": "br-any-branch-123456"
6
- }
7
- }
@@ -1,14 +0,0 @@
1
- export default function (req, res) {
2
- expect(req.body).toMatchObject({
3
- source_branch_id: 'br-any-branch-123456',
4
- source_timestamp: '2021-01-01T00:00:00.000Z',
5
- });
6
-
7
- res.status(200).send({
8
- branch: {
9
- id: 'br-parent-tots-123456',
10
- name: 'parent-tots',
11
- last_reset_at: '2021-01-01T00:00:00Z',
12
- },
13
- });
14
- }
@@ -1,6 +0,0 @@
1
- {
2
- "branch": {
3
- "id": "br-self-tolsn-123456",
4
- "name": "self-tolsn-123456"
5
- }
6
- }
@@ -1,15 +0,0 @@
1
- export default function (req, res) {
2
- expect(req.body).toMatchObject({
3
- source_branch_id: 'br-self-tolsn-123456',
4
- source_lsn: '0/123ABC',
5
- preserve_under_name: 'backup',
6
- });
7
-
8
- res.status(200).send({
9
- branch: {
10
- id: 'br-self-tolsn-123456',
11
- name: 'self-tolsn',
12
- last_reset_at: '2021-01-01T00:00:00Z',
13
- },
14
- });
15
- }
@@ -1,10 +0,0 @@
1
- {
2
- "projects": [
3
- {
4
- "id": "test-project-123456",
5
- "name": "",
6
- "created_at": "2019-01-01T00:00:00.000Z",
7
- "updated_at": "2019-01-01T00:00:00.000Z"
8
- }
9
- ]
10
- }
@@ -1,14 +0,0 @@
1
- {
2
- "project": {
3
- "id": "test-project-123456",
4
- "name": "",
5
- "created_at": "2019-01-01T00:00:00.000Z",
6
- "updated_at": "2019-01-01T00:00:00.000Z",
7
- "settings": {
8
- "allowed_ips": {
9
- "ips": ["192.168.1.1"],
10
- "primary_branch_only": false
11
- }
12
- }
13
- }
14
- }
@@ -1,11 +0,0 @@
1
- {
2
- "branches": [
3
- {
4
- "id": "br-main-branch-123456",
5
- "name": "main",
6
- "primary": true,
7
- "created_at": "2021-01-01T00:00:00.000Z",
8
- "updated_at": "2021-01-01T00:00:00.000Z"
9
- }
10
- ]
11
- }
@@ -1,3 +0,0 @@
1
- {
2
- "databases": [{ "name": "db1", "owner_name": "user1" }]
3
- }
@@ -1,10 +0,0 @@
1
- {
2
- "endpoints": [
3
- {
4
- "id": "ep-test-endpoint-123456",
5
- "created_at": "2019-01-01T00:00:00Z",
6
- "type": "read_write",
7
- "branch_id": "br-main-branch-123456"
8
- }
9
- ]
10
- }
@@ -1,3 +0,0 @@
1
- {
2
- "roles": [{ "name": "test_role", "created_at": "2016-01-01T00:00:00Z" }]
3
- }
package/rollup.config.js DELETED
@@ -1,20 +0,0 @@
1
- import { nodeResolve } from '@rollup/plugin-node-resolve';
2
- import commonjs from '@rollup/plugin-commonjs';
3
- import json from '@rollup/plugin-json';
4
-
5
- export default {
6
- input: 'dist/cli.js',
7
- output: {
8
- dir: 'bundle',
9
- format: 'cjs',
10
- entryFileNames: '[name].cjs',
11
- chunkFileNames: '[name]-[hash].cjs',
12
- },
13
- plugins: [
14
- nodeResolve({
15
- exportConditions: ['node'],
16
- }),
17
- commonjs(),
18
- json(),
19
- ],
20
- };
@@ -1,221 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`branches add compute test 1`] = `
4
- "id: test_endpoint_id
5
- branch_id: br-sunny-branch-123456
6
- created_at: 2019-01-01T00:00:00Z
7
- type: read_only
8
- "
9
- `;
10
-
11
- exports[`branches create branch and connect with psql and psql args test 1`] = `
12
- "branch:
13
- id: br-new-branch-123456
14
- name: test_branch
15
- created_at: 2021-01-01T00:00:00.000Z
16
- endpoints:
17
- - id: ep-undefined-123456
18
- type: read_write
19
- created_at: 2021-01-01T00:00:00.000Z
20
- host: undefined.example.com
21
- connection_uris:
22
- - connection_uri: postgres://ep-undefined-123456.example.com:5432/test_project
23
- {"psql-cli-args":["postgres://ep-undefined-123456.example.com:5432/test_project","-c","SELECT 1"]}"
24
- `;
25
-
26
- exports[`branches create branch and connect with psql test 1`] = `
27
- "branch:
28
- id: br-new-branch-123456
29
- name: test_branch
30
- created_at: 2021-01-01T00:00:00.000Z
31
- endpoints:
32
- - id: ep-undefined-123456
33
- type: read_write
34
- created_at: 2021-01-01T00:00:00.000Z
35
- host: undefined.example.com
36
- connection_uris:
37
- - connection_uri: postgres://ep-undefined-123456.example.com:5432/test_project
38
- {"psql-cli-args":["postgres://ep-undefined-123456.example.com:5432/test_project"]}"
39
- `;
40
-
41
- exports[`branches create by default with r/w endpoint test 1`] = `
42
- "branch:
43
- id: br-new-branch-123456
44
- name: test_branch
45
- created_at: 2021-01-01T00:00:00.000Z
46
- endpoints:
47
- - id: ep-undefined-123456
48
- type: read_write
49
- created_at: 2021-01-01T00:00:00.000Z
50
- host: undefined.example.com
51
- connection_uris:
52
- - connection_uri: postgres://ep-undefined-123456.example.com:5432/test_project
53
- "
54
- `;
55
-
56
- exports[`branches create with parent by lsn test 1`] = `
57
- "id: br-new-branch-123456
58
- name: test_branch_with_parent_lsn
59
- parent_id: br-main-branch-123456
60
- created_at: 2021-01-01T00:00:00.000Z
61
- "
62
- `;
63
-
64
- exports[`branches create with parent by name test 1`] = `
65
- "id: br-new-branch-123456
66
- name: test_branch_with_parent_name
67
- parent_id: br-main-branch-123456
68
- created_at: 2021-01-01T00:00:00.000Z
69
- "
70
- `;
71
-
72
- exports[`branches create with parent by timestamp test 1`] = `
73
- "id: br-new-branch-123456
74
- name: test_branch_with_parent_timestamp
75
- parent_id: br-main-branch-123456
76
- created_at: 2021-01-01T00:00:00.000Z
77
- "
78
- `;
79
-
80
- exports[`branches create with readonly endpoint test 1`] = `
81
- "branch:
82
- id: br-new-branch-123456
83
- name: test_branch
84
- created_at: 2021-01-01T00:00:00.000Z
85
- endpoints:
86
- - id: ep-undefined-123456
87
- type: read_only
88
- created_at: 2021-01-01T00:00:00.000Z
89
- host: undefined.example.com
90
- connection_uris:
91
- - connection_uri: postgres://ep-undefined-123456.example.com:5432/test_project
92
- "
93
- `;
94
-
95
- exports[`branches create with suspend timeout test 1`] = `
96
- "id: br-new-branch-123456
97
- name: test_branch_with_suspend_timeout
98
- parent_id: br-main-branch-123456
99
- created_at: 2021-01-01T00:00:00.000Z
100
- suspend_timeout: 60
101
- "
102
- `;
103
-
104
- exports[`branches create without endpoint test 1`] = `
105
- "id: br-new-branch-123456
106
- name: test_branch
107
- created_at: 2021-01-01T00:00:00.000Z
108
- "
109
- `;
110
-
111
- exports[`branches delete by id test 1`] = `
112
- "id: br-sunny-branch-123456
113
- name: sunny-branch
114
- created_at: 2021-01-01T00:00:00.000Z
115
- "
116
- `;
117
-
118
- exports[`branches get by id test 1`] = `
119
- "name: test-branch-sunny
120
- id: br-sunny-branch-123456
121
- primary: true
122
- parent_id: br-parent-branch-123456
123
- created_at: 2019-01-01T00:00:00Z
124
- updated_at: 2019-01-01T00:00:00Z
125
- "
126
- `;
127
-
128
- exports[`branches get by id test 2`] = `
129
- "name: test-branch-cloudy
130
- id: br-cloudy-branch-12345678
131
- primary: true
132
- created_at: 2019-01-01T00:00:00Z
133
- updated_at: 2019-01-01T00:00:00Z
134
- "
135
- `;
136
-
137
- exports[`branches get by name test 1`] = `
138
- "name: test-branch-sunny
139
- id: br-sunny-branch-123456
140
- primary: true
141
- parent_id: br-parent-branch-123456
142
- created_at: 2019-01-01T00:00:00Z
143
- updated_at: 2019-01-01T00:00:00Z
144
- "
145
- `;
146
-
147
- exports[`branches get by name with numeric name test 1`] = `
148
- "name: "123"
149
- id: br-numbered-branch-123456
150
- primary: false
151
- parent_id: br-parent-branch-123456
152
- created_at: 2019-01-01T00:00:00Z
153
- updated_at: 2019-01-01T00:00:00Z
154
- "
155
- `;
156
-
157
- exports[`branches list test 1`] = `
158
- "- id: br-main-branch-123456
159
- name: main
160
- primary: true
161
- created_at: 2021-01-01T00:00:00.000Z
162
- updated_at: 2021-01-01T00:00:00.000Z
163
- - id: br-sunny-branch-123456
164
- name: test_branch
165
- parent_id: br-parent-branch-123456
166
- created_at: 2021-01-01T00:00:00.000Z
167
- updated_at: 2021-01-01T00:00:00.000Z
168
- - id: br-numbered-branch-123456
169
- name: "123"
170
- parent_id: br-parent-branch-123456
171
- created_at: 2021-01-01T00:00:00.000Z
172
- updated_at: 2021-01-01T00:00:00.000Z
173
- "
174
- `;
175
-
176
- exports[`branches rename test 1`] = `
177
- "name: new_test_branch
178
- created_at: 2021-01-01T00:00:00.000Z
179
- "
180
- `;
181
-
182
- exports[`branches reset branch to parent test 1`] = `
183
- "id: br-branch-123456
184
- name: test-branch
185
- source_branch_id: br-parent-branch-123456
186
- project_id: pr-project-123456
187
- created_at: 2020-01-01T00:00:00.000Z
188
- updated_at: 2020-01-01T00:00:00.000Z
189
- last_reset_at: 2020-01-01T00:00:00.000Z
190
- "
191
- `;
192
-
193
- exports[`branches restore branch to lsn test 1`] = `
194
- "id: br-self-tolsn-123456
195
- name: self-tolsn
196
- last_reset_at: 2021-01-01T00:00:00Z
197
- "
198
- `;
199
-
200
- exports[`branches restore to another branch head test 1`] = `
201
- "id: br-another-branch-123456
202
- name: another-branch
203
- last_reset_at: 2021-01-01T00:00:00Z
204
- "
205
- `;
206
-
207
- exports[`branches restore to parent branch timestamp by name test 1`] = `
208
- "id: br-parent-tots-123456
209
- name: parent-tots
210
- last_reset_at: 2021-01-01T00:00:00Z
211
- "
212
- `;
213
-
214
- exports[`branches set primary by id test 1`] = `
215
- "name: test-branch-sunny
216
- id: br-sunny-branch-123456
217
- primary: true
218
- created_at: 2019-01-01T00:00:00Z
219
- updated_at: 2019-01-01T00:00:00Z
220
- "
221
- `;
@@ -1,70 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`connection_string connection_string branch id 8 digits test 1`] = `
4
- "postgres://test_role:test_pwd@ep-lame-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=require
5
- "
6
- `;
7
-
8
- exports[`connection_string connection_string branch id test 1`] = `
9
- "postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=require
10
- "
11
- `;
12
-
13
- exports[`connection_string connection_string pooled test 1`] = `
14
- "postgres://test_role:test_pwd@ep-cool-king-930914-pooler.us-east-2.aws.neon.tech/test_db?sslmode=require
15
- "
16
- `;
17
-
18
- exports[`connection_string connection_string prisma pooled extended test 1`] = `
19
- "connection_string: postgres://test_role:test_pwd@ep-cool-king-930914-pooler.us-east-2.aws.neon.tech/test_db?connect_timeout=30&pool_timeout=30&pgbouncer=true&sslmode=require
20
- host: ep-cool-king-930914-pooler.us-east-2.aws.neon.tech
21
- role: test_role
22
- password: test_pwd
23
- database: test_db
24
- options: connect_timeout=30&pool_timeout=30&pgbouncer=true&sslmode=require
25
- "
26
- `;
27
-
28
- exports[`connection_string connection_string prisma pooled test 1`] = `
29
- "postgres://test_role:test_pwd@ep-cool-king-930914-pooler.us-east-2.aws.neon.tech/test_db?connect_timeout=30&pool_timeout=30&pgbouncer=true&sslmode=require
30
- "
31
- `;
32
-
33
- exports[`connection_string connection_string prisma test 1`] = `
34
- "postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?connect_timeout=30&sslmode=require
35
- "
36
- `;
37
-
38
- exports[`connection_string connection_string test 1`] = `
39
- "postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=require
40
- "
41
- `;
42
-
43
- exports[`connection_string connection_string with lsn test 1`] = `
44
- "postgres://test_role:test_pwd@br-sunny-branch-123456.us-east-2.aws.neon.tech/test_db?sslmode=require&options=neon_lsn%3A0%2F123456
45
- "
46
- `;
47
-
48
- exports[`connection_string connection_string with psql and psql args test 1`] = `"{"psql-cli-args":["postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=require","-c","SELECT 1"]}"`;
49
-
50
- exports[`connection_string connection_string with psql test 1`] = `"{"psql-cli-args":["postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=require"]}"`;
51
-
52
- exports[`connection_string connection_string with ssl verify full test 1`] = `
53
- "postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db?sslmode=verify-full
54
- "
55
- `;
56
-
57
- exports[`connection_string connection_string with timestamp test 1`] = `
58
- "postgres://test_role:test_pwd@br-sunny-branch-123456.us-east-2.aws.neon.tech/test_db?sslmode=require&options=neon_timestamp%3A2021-01-01T00%3A00%3A00Z
59
- "
60
- `;
61
-
62
- exports[`connection_string connection_string without any args should pass test 1`] = `
63
- "postgres://test_role:password@undefined/db1?sslmode=require
64
- "
65
- `;
66
-
67
- exports[`connection_string connection_string without ssl test 1`] = `
68
- "postgres://test_role:test_pwd@ep-cool-king-930914.us-east-2.aws.neon.tech/test_db
69
- "
70
- `;
@@ -1,20 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`databases create test 1`] = `
4
- "name: test_database
5
- "
6
- `;
7
-
8
- exports[`databases delete test 1`] = `
9
- "name: test_db
10
- owner_name: test_owner
11
- "
12
- `;
13
-
14
- exports[`databases list test 1`] = `
15
- "- name: db1
16
- owner_name: user1
17
- - name: db2
18
- owner_name: user2
19
- "
20
- `;
@@ -1,55 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`ip-allow Add IP allow test 1`] = `
4
- "id: test
5
- name: test_project
6
- IP_addresses:
7
- - 127.0.0.1
8
- - 192.168.10.1-192.168.10.15
9
- - 192.168.1.1
10
- primary_branch_only: true
11
- "
12
- `;
13
-
14
- exports[`ip-allow Remove IP allow test 1`] = `
15
- "id: test
16
- name: test_project
17
- IP_addresses: []
18
- primary_branch_only: false
19
- "
20
- `;
21
-
22
- exports[`ip-allow Reset IP allow test 1`] = `
23
- "id: test
24
- name: test_project
25
- IP_addresses: []
26
- primary_branch_only: false
27
- "
28
- `;
29
-
30
- exports[`ip-allow Reset IP allow to new list test 1`] = `
31
- "id: test
32
- name: test_project
33
- IP_addresses:
34
- - 192.168.2.2
35
- primary_branch_only: false
36
- "
37
- `;
38
-
39
- exports[`ip-allow list IP Allow with single-project test 1`] = `
40
- "id: test-project-123456
41
- name: ""
42
- IP_addresses:
43
- - 192.168.1.1
44
- primary_branch_only: false
45
- "
46
- `;
47
-
48
- exports[`ip-allow list IP allow test 1`] = `
49
- "id: test
50
- name: test_project
51
- IP_addresses:
52
- - 192.168.1.1
53
- primary_branch_only: false
54
- "
55
- `;
@@ -1,17 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`operations list test 1`] = `
4
- "- id: "1"
5
- action: suspend
6
- status: finished
7
- created_at: 2016-01-01T00:00:00Z
8
- - id: "2"
9
- action: suspend
10
- status: finished
11
- created_at: 2016-01-01T00:00:00Z
12
- - id: "3"
13
- action: start
14
- status: finished
15
- created_at: 2016-01-01T00:00:00Z
16
- "
17
- `;
@@ -1,141 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`projects create and connect with psql and psql args test 1`] = `
4
- "project:
5
- id: new-project-123456
6
- name: test_project
7
- created_at: 2021-01-01T00:00:00.000Z
8
- connection_uris:
9
- - connection_uri: postgres://localhost:5432/test_project
10
- {"psql-cli-args":["postgres://localhost:5432/test_project","-c","SELECT 1"]}"
11
- `;
12
-
13
- exports[`projects create and connect with psql test 1`] = `
14
- "project:
15
- id: new-project-123456
16
- name: test_project
17
- created_at: 2021-01-01T00:00:00.000Z
18
- connection_uris:
19
- - connection_uri: postgres://localhost:5432/test_project
20
- {"psql-cli-args":["postgres://localhost:5432/test_project"]}"
21
- `;
22
-
23
- exports[`projects create project with setting the context test 1`] = `
24
- "project:
25
- id: new-project-123456
26
- name: test_project
27
- created_at: 2021-01-01T00:00:00.000Z
28
- connection_uris:
29
- - connection_uri: postgres://localhost:5432/test_project
30
- "
31
- `;
32
-
33
- exports[`projects create test 1`] = `
34
- "project:
35
- id: new-project-123456
36
- name: test_project
37
- created_at: 2021-01-01T00:00:00.000Z
38
- connection_uris:
39
- - connection_uri: postgres://localhost:5432/test_project
40
- "
41
- `;
42
-
43
- exports[`projects create with database and role test 1`] = `
44
- "project:
45
- id: new-project-123456
46
- name: test_project
47
- created_at: 2021-01-01T00:00:00.000Z
48
- connection_uris:
49
- - connection_uri: postgres://localhost:5432/test_project
50
- "
51
- `;
52
-
53
- exports[`projects delete test 1`] = `
54
- "id: test
55
- name: test
56
- create_at: 2018-01-01T00:00:00.000Z
57
- "
58
- `;
59
-
60
- exports[`projects get test 1`] = `
61
- "id: test
62
- name: test_project
63
- created_at: 2019-01-01T00:00:00Z
64
- settings:
65
- allowed_ips:
66
- ips:
67
- - 192.168.1.1
68
- primary_branch_only: false
69
- "
70
- `;
71
-
72
- exports[`projects list test 1`] = `
73
- "projects:
74
- - id: 1
75
- name: Project_1
76
- created_at: 2019-01-01T00:00:00.000Z
77
- updated_at: 2019-01-01T00:00:00.000Z
78
- - id: 2
79
- name: Project_2
80
- created_at: 2019-01-01T00:00:00.000Z
81
- updated_at: 2019-01-01T00:00:00.000Z
82
- - id: 3
83
- name: Project_3
84
- created_at: 2019-01-01T00:00:00.000Z
85
- updated_at: 2019-01-01T00:00:00.000Z
86
- shared_with_me:
87
- - id: adj-noun-12401747
88
- region_id: aws-us-east-2
89
- name: Shared Project
90
- created_at: 2024-04-03T04:45:46Z
91
- updated_at: 2024-04-11T16:13:43Z
92
- "
93
- `;
94
-
95
- exports[`projects update ip allow primary only flag test 1`] = `
96
- "id: test
97
- name: test_project
98
- created_at: 2019-01-01T00:00:00Z
99
- settings:
100
- allowed_ips:
101
- ips:
102
- - 192.168.1.1
103
- primary_branch_only: false
104
- "
105
- `;
106
-
107
- exports[`projects update ip allow remove test 1`] = `
108
- "id: test
109
- name: test_project
110
- created_at: 2019-01-01T00:00:00Z
111
- settings:
112
- allowed_ips:
113
- ips: []
114
- primary_branch_only: false
115
- "
116
- `;
117
-
118
- exports[`projects update ip allow test 1`] = `
119
- "id: test
120
- name: test_project
121
- created_at: 2019-01-01T00:00:00Z
122
- settings:
123
- allowed_ips:
124
- ips:
125
- - 127.0.0.1
126
- - 192.168.1.2/22
127
- primary_branch_only: true
128
- "
129
- `;
130
-
131
- exports[`projects update name test 1`] = `
132
- "id: test
133
- name: test_project_new_name
134
- created_at: 2019-01-01T00:00:00Z
135
- settings:
136
- allowed_ips:
137
- ips:
138
- - 192.168.1.1
139
- primary_branch_only: false
140
- "
141
- `;
@@ -1,19 +0,0 @@
1
- // Jest Snapshot v1, https://goo.gl/fbAQLP
2
-
3
- exports[`roles create test 1`] = `
4
- "name: test_role
5
- created_at: 2019-01-01T00:00:00.000Z
6
- "
7
- `;
8
-
9
- exports[`roles delete test 1`] = `
10
- "name: test_role
11
- created_at: 2016-11-16T15:39:18.000Z
12
- "
13
- `;
14
-
15
- exports[`roles list test 1`] = `
16
- "- name: test_role
17
- created_at: 2016-01-01T00:00:00Z
18
- "
19
- `;