@forge/sql 2.4.3-next.0 → 2.5.0-next.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.
@@ -139,35 +139,18 @@ describe('SqlClient', () => {
139
139
  });
140
140
  });
141
141
  describe('_provision', () => {
142
- it('should work if the response is a 201', async () => {
142
+ it('should do nothing', async () => {
143
143
  const mockResponse = new Response(JSON.stringify({ success: true }), {
144
144
  status: 201,
145
145
  statusText: 'OK'
146
146
  });
147
147
  mockFetch.mockResolvedValue(mockResponse);
148
- await sqlClient._provision();
149
- expect(mockFetch).toHaveBeenCalledWith('/api/v1/provision', expect.objectContaining({ method: 'POST' }));
150
- });
151
- it('should work if the response is a 204', async () => {
152
- const mockResponse = new Response(undefined, {
153
- status: 204,
154
- statusText: 'OK'
155
- });
156
- mockFetch.mockResolvedValue(mockResponse);
157
- await sqlClient._provision();
158
- expect(mockFetch).toHaveBeenCalledWith('/api/v1/provision', expect.objectContaining({ method: 'POST' }));
159
- });
160
- it('should throw an error if the response is not 201 or 204', async () => {
161
- const mockResponse = new Response('Server Error', {
162
- status: 500,
163
- statusText: 'Bad Request'
164
- });
165
- mockFetch.mockResolvedValue(mockResponse);
166
- await expect(sqlClient._provision()).rejects.toThrow('Unexpected error in provision request');
148
+ await expect(sqlClient._provision()).resolves.toBeUndefined();
149
+ expect(mockFetch).not.toHaveBeenCalled();
167
150
  });
168
151
  });
169
152
  describe('executeDDL', () => {
170
- it('should return a valid Result object when DDL query gexecuted successfully', async () => {
153
+ it('should return a valid Result object when DDL query executed successfully', async () => {
171
154
  const mockResponse = {
172
155
  ok: true,
173
156
  status: 200,
package/out/sql.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAgC,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI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UAAU,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAGrE;AAED,eAAO,MAAM,GAAG,WAAkB,CAAC"}
package/out/sql.js CHANGED
@@ -47,10 +47,7 @@ class SqlClient {
47
47
  return await this.prepare(query, exports.SQL_API_ENDPOINTS.EXECUTE).execute();
48
48
  }
49
49
  async _provision() {
50
- const response = await this.sendRequest('/api/v1/provision', {
51
- method: 'POST'
52
- });
53
- await (0, error_handling_1.checkResponseError)(response, 'Unexpected error in provision request');
50
+ return;
54
51
  }
55
52
  async executeDDL(query) {
56
53
  return await this.prepare(query, exports.SQL_API_ENDPOINTS.EXECUTE_DDL).execute();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/sql",
3
- "version": "2.4.3-next.0",
3
+ "version": "2.5.0-next.1",
4
4
  "description": "Forge SQL sdk",
5
5
  "author": "Atlassian",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",