How to use the kras.defaultConfig.injectors function in kras

To help you get started, we’ve selected a few kras 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 smapiot / piral / src / packages / piral-cli / src / apps / debug-piral.ts View on Github external
}

  if (krasConfig.ssl === undefined) {
    krasConfig.ssl = undefined;
  }

  if (krasConfig.map === undefined) {
    krasConfig.map = {};
  }

  if (krasConfig.api === undefined) {
    krasConfig.api = '/manage-mock-server';
  }

  if (krasConfig.injectors === undefined) {
    krasConfig.injectors = defaultConfig.injectors;
  }

  if (fresh) {
    await clearCache(root, cacheDir);
  }

  await setStandardEnvs({
    target: dirname(entryFiles),
    dependencies: externals,
    piral: name,
  });

  modifyBundlerForPiral(Bundler.prototype, dirname(entryFiles));

  const bundler = new Bundler(
    entryFiles,
github smapiot / piral / src / packages / piral-cli / src / apps / debug-pilet.ts View on Github external
}

  if (krasConfig.ssl === undefined) {
    krasConfig.ssl = undefined;
  }

  if (krasConfig.map === undefined) {
    krasConfig.map = {};
  }

  if (krasConfig.api === undefined) {
    krasConfig.api = '/manage-mock-server';
  }

  if (krasConfig.injectors === undefined) {
    krasConfig.injectors = defaultConfig.injectors;
  }

  if (fresh) {
    await clearCache(root, cacheDir);
  }

  await setStandardEnvs({
    target: targetDir,
    piral: appPackage.name,
    dependencies: externals,
  });

  modifyBundlerForPilet(Bundler.prototype, externals, targetDir);

  const bundler = new Bundler(
    entryModule,

kras

Efficient server proxying and mocking in Node.js.

MIT
Latest version published 3 months ago

Package Health Score

62 / 100
Full package analysis

Similar packages