@forge/sql 0.0.1-experimental-cb959b2 → 0.0.1-experimental-c8ed390

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/out/sql.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE9D,qBAAa,SAAS;YACN,WAAW;IAYnB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,EAAE,MAAM,SAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAI9B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAO9C;AAED,eAAO,MAAM,GAAG,WAAkB,CAAC"}
1
+ {"version":3,"file":"sql.d.ts","sourceRoot":"","sources":["../src/sql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAY,MAAM,eAAe,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAG9D,qBAAa,SAAS;YACN,WAAW;IAcnB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,GAAE,aAAkB,EAAE,MAAM,SAAQ,GAAG,OAAO,CAAC,MAAM,CAAC;IAQ5F,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,YAAY;IAI9B,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAO9C;AAED,eAAO,MAAM,GAAG,WAAkB,CAAC"}
package/out/sql.js CHANGED
@@ -1,19 +1,22 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sql = exports.SqlClient = void 0;
4
- const api_1 = require("@forge/api");
4
+ const tslib_1 = require("tslib");
5
+ const node_fetch_1 = tslib_1.__importDefault(require("node-fetch"));
5
6
  const response_handler_1 = require("./utils/response-handler");
6
7
  const sql_statement_1 = require("./sql-statement");
8
+ const fetch_1 = require("@forge/api/out/api/fetch");
7
9
  class SqlClient {
8
10
  async sendRequest(path, options) {
9
- const response = await (0, api_1.__fetchProduct)({ provider: 'none', remote: 'sql' })(path, {
10
- ...options,
11
+ const url = `https://sql/${path}`;
12
+ options = (0, fetch_1.addMagicAgent)(options);
13
+ options.redirect = 'follow';
14
+ options.headers = {
15
+ ...options.headers,
11
16
  redirect: 'follow',
12
- headers: {
13
- ...options?.headers,
14
- 'Content-Type': 'application/json'
15
- }
16
- });
17
+ 'Content-Type': 'application/json'
18
+ };
19
+ const response = await (0, node_fetch_1.default)(url, options);
17
20
  return response;
18
21
  }
19
22
  async storageApi(query, params = [], method = 'all') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/sql",
3
- "version": "0.0.1-experimental-cb959b2",
3
+ "version": "0.0.1-experimental-c8ed390",
4
4
  "description": "Forge SQL package",
5
5
  "author": "Atlassian",
6
6
  "license": "UNLICENSED",
@@ -21,6 +21,6 @@
21
21
  "node-fetch": "2.7.0"
22
22
  },
23
23
  "dependencies": {
24
- "@forge/api": "^3.9.1-experimental-cb959b2"
24
+ "@forge/api": "^3.9.1-experimental-c8ed390"
25
25
  }
26
26
  }