How to use the jscrambler.default.downloadSourceMaps function in jscrambler

To help you get started, we’ve selected a few jscrambler examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github jscrambler / jscrambler / packages / ember-cli-jscrambler / jscrambler-plugin.js View on Github external
return new Promise((resolve, reject) =>
          jscrambler.downloadSourceMaps(
            Object.assign({}, jscrambler.config, {stream: false, protectionId}),
            (res, error) => {
              if (error) {
                console.error(error);
                return reject(error);
              }
              
              return this.processSourceMaps(res, this.outputPath, resolve);
            }
          ));
      }
github jscrambler / jscrambler / packages / jscrambler-webpack-plugin / src / index.js View on Github external
processResult(protectionId, compilation, callback) {
    const results = this.protectionResult;

    for (const result of results) {
      compilation.assets[result.filename] = {
        source() {
          return result.content;
        },
        size() {
          return result.content.length;
        }
      };
    }

    if (sourceMaps) {
      client.downloadSourceMaps(
        Object.assign({}, client.config, {stream: false, protectionId}),
        res => this.processSourceMaps(res, compilation, callback)
      );

      return;
    }

    callback();
  }
}

jscrambler

Jscrambler API client.

MIT
Latest version published 3 days ago

Package Health Score

84 / 100
Full package analysis