Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(() => {
temp.track()
env = Object.assign({}, process.env)
if (isTruthy(env.GOROOT)) {
delete env.GOROOT
}
environmentFn = () => {
return env
}
readyFn = () => { return true }
platform = process.platform
if (process.arch === 'arm') {
arch = 'arm'
} else if (process.arch === 'ia32') {
// Ugh, Atom is 32-bit on Windows... for now.
if (platform === 'win32') {
arch = 'amd64'
} else {
run: function(options, done) {
const Artifactor = require("@truffle/artifactor");
const Resolver = require("@truffle/resolver");
const Migrate = require("@truffle/migrate");
const Contracts = require("@truffle/workflow-compile");
const Provider = require("@truffle/provider");
const { Environment } = require("@truffle/environment");
const Config = require("@truffle/config");
const temp = require("temp").track();
const { promisify } = require("util");
const promisifiedCopy = promisify(require("../copy"));
const conf = Config.detect(options);
Contracts.compile(conf)
.then(async () => {
await Provider.testConnection(conf);
await Environment.detect(conf);
const {
dryRunOnly,
dryRunAndMigrations
} = command.determineDryRunSettings(conf, options);
if (dryRunOnly) {
import { FileController } from "../utils/filecontroller";
import { ByteWriter } from "../utils/bytewriter";
import { VsCodeUtils } from "../utils/vscodeutils";
import { Logger } from "../utils/logger";
import { Constants, ChangeListStatus, CvsFileStatusCode } from "../utils/constants";
import { Credential } from "../credentialstore/credential";
import { BuildConfigItem } from "../remoterun/configexplorer";
import { CvsSupportProvider } from "../remoterun/cvsprovider";
import { CheckinInfo, MappingFileContent, RestHeader, QueuedBuild } from "../utils/interfaces";
import { CvsLocalResource } from "../entities/cvsresource";
import { AsyncWriteStream } from "../utils/writestream";
import * as path from "path";
import * as fs from "fs";
import * as xml2js from "xml2js";
import * as request from "request";
const temp = require("temp").track();
export class CustomPatchSender extends XmlRpcProvider implements PatchSender {
private readonly CHECK_FREQUENCY_MS : number = 10000;
/**
* @returns true in case of success, otherwise false.
*/
public async remoteRun(creds: Credential, configs: BuildConfigItem[], cvsProvider: CvsSupportProvider): Promise {
//We might not have userId at the moment
if (!creds.userId) {
await this.authenticateIfRequired(creds);
}
const patchAbsPath : string = await this.preparePatch(cvsProvider);
const checkInInfo : CheckinInfo = await cvsProvider.getRequiredCheckinInfo();
const patchDestinationUrl : string = `${creds.serverURL}/uploadChanges.html?userId=${creds.userId}&description="${checkInInfo.message}"&commitType=0`;
try {
import AkiroBuilder from "../../../../lib/akiro/builders/nodejs/akiroBuilder.js";
import sinon from "sinon";
import temp from "temp";
import packageJson from "../../../../../package.json";
import fileSystem from "fs-extra";
import createMockExec from "../../../helpers/mockExec.js";
import createMockTemp from "../../../helpers/mockTemp.js";
import glob from "glob";
import unzip from "unzip2";
import path from "path";
temp.track();
describe("AkiroBuilder(event, context)", () => {
let event,
context,
akiroBuilder,
nodeModulesDirectoryPath,
temporaryDirectoryPath,
mockExec,
mockNpmPath,
mockTemp,
mockAWS,
mockS3;
beforeEach((done) => {
private getTempDir(): string {
temp.track();
return temp.mkdirSync("application-");
}
}
/** @babel */
import {GitRepositoryAsync} from 'atom'
import fs from 'fs'
import path from 'path'
import temp from 'temp'
import PushPullViewModel from '../../lib/git/push-pull/push-pull-view-model'
import GitService from '../../lib/git/git-service'
import GitStore from '../../lib/git/git-store'
import {copyRepository, stagePath} from './git-helpers'
temp.track()
async function cloneRepository () {
const baseRepo = copyRepository()
const cloneOptions = new GitRepositoryAsync.Git.CloneOptions()
cloneOptions.bare = 1
cloneOptions.local = 1
const parentRepoPath = temp.mkdirSync('git-parent-fixture-')
await GitRepositoryAsync.Git.Clone.clone(baseRepo, parentRepoPath, cloneOptions)
const clonedPath = temp.mkdirSync('git-cloned-fixture-')
cloneOptions.bare = 0
await GitRepositoryAsync.Git.Clone.clone(parentRepoPath, clonedPath, cloneOptions)
return {parentRepositoryPath: parentRepoPath, clonedRepositoryPath: clonedPath}
}
beforeEach(done => {
temp.track();
config = {};
akiro = new Akiro(config);
temp.mkdir("akiro_build", (error, tempDirectoryPath) => {
filePath = `${tempDirectoryPath}/akiro.packager.zip`;
akiro.build(filePath, done);
});
});
import Akiro from "../../lib/akiro.js";
import ConanAwsLambdaPlugin from "conan-aws-lambda";
import MockConan from "../helpers/mockConan.js";
import path from "path";
import temp from "temp";
import sinon from "sinon";
import fileSystem from "fs-extra";
import createMockExec from "../helpers/mockExec.js";
import glob from "glob";
import Async from "flowsync";
temp.track();
describe("akiro.initialize(iamRoleName, callback)", () => {
let config,
akiro,
callback,
lambdaName,
lambdaRole,
lambdaFilePath,
handlerFilePath,
temporaryDirectoryPath,
mockConan,
mockConanLambda,
mockTemp,
mockExec;
/**
* This task builds OpenLayers with the Closure Compiler.
*/
var path = require('path');
var async = require('async');
var closure = require('closure-util');
var fs = require('fs-extra');
var nomnom = require('nomnom');
var temp = require('temp').track();
var exec = require('child_process').exec;
var generateExports = require('./generate-exports');
var log = closure.log;
var root = path.join(__dirname, '..');
var umdWrapper = ';(function (root, factory) {\n' +
' if (typeof exports === "object") {\n' +
' module.exports = factory();\n' +
' } else if (typeof define === "function" && define.amd) {\n' +
' define([], factory);\n' +
' } else {\n' +
' root.ol = factory();\n' +
' }\n' +
'}(this, function () {\n' +
import Akiro from "../../../lib/akiro.js";
import temp from "temp";
import sinon from "sinon";
import Async from "flowsync";
import fileSystem from "fs-extra";
import path from "path";
temp.track();
describe("akiro.package(packageDetails, outputDirectoryPath, callback)", () => {
let config,
akiro,
error,
packageDetails,
cacheDirectoryPath,
outputDirectoryPath,
asyncZipFileName,
asyncZipFilePath,
mockAsync,
mockAWS,