@code.store/arcxp-sdk-ts 5.1.6 → 5.1.8

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/index.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import axios from 'axios';
2
2
  import * as rateLimit from 'axios-rate-limit';
3
3
  import axiosRetry from 'axios-retry';
4
+ import fs from 'node:fs';
5
+ import path from 'node:path';
6
+ import FormData from 'form-data';
4
7
  import * as ws from 'ws';
5
8
  import encode from 'base32-encode';
6
9
  import { v5 } from 'uuid';
@@ -221,6 +224,10 @@ class ArcDraft extends ArcAbstractAPI {
221
224
  const { data } = await this.client.get(`/redirect/${website}/${websiteUrl}`);
222
225
  return data;
223
226
  }
227
+ async deleteRedirect(website, websiteUrl) {
228
+ const { data } = await this.client.delete(`/redirect/${website}/${websiteUrl}`);
229
+ return data;
230
+ }
224
231
  async updateDraftRevision(id, payload, type = 'story') {
225
232
  const { data } = await this.client.put(`/${type}/${id}/revision/draft`, payload);
226
233
  return data;
@@ -271,12 +278,10 @@ class ArcIdentity extends ArcAbstractAPI {
271
278
  }
272
279
  }
273
280
 
274
- const importNodeModule = async (moduleId) => await import(moduleId);
275
281
  const modules = {
276
- // make it like that so static analyzer of webpack won't bundle it
277
- fs: () => importNodeModule('node:fs'),
278
- path: () => importNodeModule('node:path'),
279
- form_data: () => importNodeModule('form-data'),
282
+ fs: () => Promise.resolve(fs),
283
+ path: () => Promise.resolve(path),
284
+ form_data: () => Promise.resolve(FormData),
280
285
  };
281
286
 
282
287
  var platform = {