@spider-cloud/spider-client 0.0.69 → 0.0.70

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/dist/config.d.ts CHANGED
@@ -128,6 +128,10 @@ export type WebAutomation = {
128
128
  };
129
129
  export type WebAutomationMap = Record<string, WebAutomation[]>;
130
130
  export type ExecutionScriptsMap = Record<string, string>;
131
+ export declare enum RedirectPolicy {
132
+ Loose = "Loose",
133
+ Strict = "Strict"
134
+ }
131
135
  /**
132
136
  * Represents the options available for making a spider request.
133
137
  */
@@ -316,6 +320,10 @@ export interface SpiderParams {
316
320
  * Perform custom Javascript tasks on a url or url path. You need to make your `request` `chrome` or `smart`.
317
321
  */
318
322
  execution_scripts?: ExecutionScriptsMap;
323
+ /**
324
+ * The redirect policy for HTTP request. Set the value to Loose to allow all.
325
+ */
326
+ redirect_policy?: RedirectPolicy;
319
327
  }
320
328
  export type SpiderCoreResponse = {
321
329
  content?: string;
package/dist/config.js CHANGED
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setBaseUrl = exports.APISchema = exports.APIRoutes = exports.ApiVersion = exports.Collection = void 0;
3
+ exports.setBaseUrl = exports.APISchema = exports.APIRoutes = exports.ApiVersion = exports.Collection = exports.RedirectPolicy = void 0;
4
+ // The HTTP redirect policy to use. Loose allows all domains and Strict only allows relative requests to the domain.
5
+ var RedirectPolicy;
6
+ (function (RedirectPolicy) {
7
+ RedirectPolicy["Loose"] = "Loose";
8
+ RedirectPolicy["Strict"] = "Strict";
9
+ })(RedirectPolicy || (exports.RedirectPolicy = RedirectPolicy = {}));
4
10
  // records that you can query
5
11
  var Collection;
6
12
  (function (Collection) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spider-cloud/spider-client",
3
- "version": "0.0.69",
3
+ "version": "0.0.70",
4
4
  "description": "Isomorphic Javascript SDK for Spider Cloud services",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test __tests__/*test.ts",