How to use the just-task-logger.logger.error function in just-task-logger

To help you get started, we’ve selected a few just-task-logger 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 microsoft / just / packages / just-task / src / package / findDependents.ts View on Github external
];

    return deps
      .map(dep => {
        // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
        const depPackageJson = resolveCwd(path.join(dep, 'package.json'))!;

        if (!depPackageJson) {
          return null;
        }

        return { name: dep, path: path.dirname(fs.realpathSync(depPackageJson)) };
      })
      .filter(p => p && p.path.indexOf('node_modules') === -1 && isChildOf(p.path, gitRoot)) as DepInfo[];
  } catch (e) {
    logger.error(`Invalid package.json detected at ${packageJsonFile} `, e);
    return [];
  }
}
github microsoft / backfill / packages / backfill / src / config.ts View on Github external
try {
    const parsedOptions = JSON.parse(options);

    if (
      typeof parsedOptions.connectionString !== "string" ||
      typeof parsedOptions.container !== "string"
    ) {
      throw new Error("Incorrect blob storage configuration");
    }

    return {
      provider: "azure-blob",
      options: { ...parsedOptions }
    };
  } catch (e) {
    logger.error(e.message);
    throw new Error("Invalid blob storage options");
  }
}
github microsoft / just / packages / just-task / src / enableTypeScript.ts View on Github external
transpileOnly,
      skipProject: true,
      compilerOptions: {
        target: 'esnext',
        module: 'commonjs',
        strict: false,
        skipLibCheck: true,
        skipDefaultLibCheck: true,
        moduleResolution: 'node',
        allowJs: true,
        esModuleInterop: true
      },
      files: ['just.config.ts']
    });
  } else {
    logger.error(`In order to use TypeScript with just.config.ts, you need to install "ts-node" module:

  npm install -D ts-node

or

  yarn add -D ts-node

`);
  }
}
github microsoft / backfill / packages / backfill / src / config.ts View on Github external
try {
    const parsedOptions = JSON.parse(options);

    if (
      typeof parsedOptions.npmPackageName !== "string" ||
      typeof parsedOptions.registryUrl !== "string"
    ) {
      throw new Error("Incorrect npm storage configuration");
    }

    return {
      provider: "npm",
      options: { ...parsedOptions }
    };
  } catch (e) {
    logger.error(e.message);
    throw new Error("Invalid npm storage options");
  }
}

just-task-logger

Logger for Just scripts and tasks

MIT
Latest version published 2 years ago

Package Health Score

69 / 100
Full package analysis

Similar packages