Updates the site dependencies.

@param bool $preferLock
@param bool $preferSource
@param bool $noScripts
197867
protected function updateDependencies($preferLock, $preferSource, $noScripts)
    {
        $pmOptions = [
            'prefer-source' => $preferSource,
            'prefer-dist' => !$preferSource,
            'no-scripts' => $noScripts,
        ];

        if ($preferLock === true) {
            $this->packageManager->install($pmOptions);
        } else {
            $this->packageManager->update($pmOptions);
        }
    }
275242
protected function updateComposerJson(array $requires, array $devRequires, int $type): void
    {
        $this->io->writeError('Updating composer.json');

        if ($type === self::ADD) {
            $jsonManipulator = new JsonManipulator(\file_get_contents($this->jsonFile->getPath()));
            $sortPackages    = $this->composer->getConfig()->get('sort-packages') ?? false;

            foreach ($requires as $name => $version) {
                $jsonManipulator->addLink('require', $name, $version, $sortPackages);
            }

            foreach ($devRequires as $name => $version) {
                $jsonManipulator->addLink('require-dev', $name, $version, $sortPackages);
            }

            \file_put_contents($this->jsonFile->getPath(), $jsonManipulator->getContents());
        } elseif ($type === self::REMOVE) {
            $jsonFileContent = $this->jsonFile->read();

            foreach ($requires as $packageName => $version) {
                unset($jsonFileContent['require'][$packageName]);
            }

            foreach ($devRequires as $packageName => $version) {
                unset($jsonFileContent['require-dev'][$packageName]);
            }

            $this->jsonFile->write($jsonFileContent);
        }
    }
951848
public static function updateReversal($id, $reversalId, $params = null, $opts = null)
    {
        return self::_updateNestedResource($id, static::PATH_REVERSALS, $reversalId, $params, $opts);
    }
87602
@PATCH
    @Timed
    public void updateResource(@Suspended final AsyncResponse response, @Context final Request request,
            @Context final UriInfo uriInfo, @Context final HttpHeaders headers,
            @Context final SecurityContext secContext, final String body) {
        final TrellisRequest req = new TrellisRequest(request, uriInfo, headers, secContext);
        final String urlBase = getBaseUrl(req);
        final IRI identifier = rdf.createIRI(TRELLIS_DATA_PREFIX + req.getPath());
        final PatchHandler patchHandler = new PatchHandler(req, body, trellis, defaultJsonLdProfile, urlBase);

        getParent(identifier).thenCombine(trellis.getResourceService().get(identifier), patchHandler::initialize)
            .thenCompose(patchHandler::updateResource).thenCompose(patchHandler::updateMemento)
            .thenApply(ResponseBuilder::build).exceptionally(this::handleException).thenApply(response::resume);
    }
1274011
def update_resources(self, dstpath, names=None, languages=None):
        
        UpdateManifestResourcesFromXML(dstpath, self.toprettyxml(), names, 
                                       languages)
1338422
private void addInstalledExtension(DefaultInstalledExtension installedExtension, String namespace)
    {
        addCachedExtension(installedExtension);

        boolean isValid = installedExtension.isValid(namespace);

        // Register the extension in the installed extensions for the provided namespace
        addInstalledFeatureToCache(installedExtension.getId(), namespace, installedExtension, isValid);

        // Add virtual extensions
        for (ExtensionId feature : installedExtension.getExtensionFeatures()) {
            addInstalledFeatureToCache(feature, namespace, installedExtension, isValid);
        }

        if (this.updateBackwardDependencies) {
            // Recalculate backward dependencies index
            updateMissingBackwardDependencies();
        }
    }
114996
function updateSource(zipFile, project) {
	return project.updateZip(zipFile)
	.catch((error) => {
		console.error("Project source with ID: " + project.id + " couldn't be updated.");
		console.trace(error);
		throw error;
	});
}
733732
public static function addScriptCode($scriptCode, $dependantResourceUrls = [])
    {
        $dependantResourceUrls = array_unique($dependantResourceUrls);

        self::$resources[] = [$scriptCode, $dependantResourceUrls];
    }
1128193
private static void lockBoth(Lock sourceWriteLock, Lock destWriteLock) {
    while (true) {
      sourceWriteLock.lock();
      if (destWriteLock.tryLock()) {
        return;
      } else {
        sourceWriteLock.unlock();
      }

      destWriteLock.lock();
      if (sourceWriteLock.tryLock()) {
        return;
      } else {
        destWriteLock.unlock();
      }
    }
  }
58563
function setDependencies(\assegai\Server $server, ModuleContainer $modules)
	{
        $this->server = $server;
        $this->modules = $modules;
	}
827788
public function cookiesUpdate(
        $name,
        $value,
        $expires = null,
        $path = '/',
        $domain = null,
        $secure = false,
        $httpOnly = false
    )
    {
        return new Context\Cookies\Update(
            $name,
            $value,
            $expires,
            $path,
            $domain,
            $secure,
            $httpOnly
        );    
    }
374810
protected function applyDependencies($sources, \Traversable $dependencies, callable $insert)
    {
        foreach ($dependencies as $query => $subDependencies) {
            $joinedCode = '';
            foreach ($subDependencies as $file) {
                $joinedCode .= $insert($file);
            }
            $sources = str_replace($query, $joinedCode, $sources);
        }

        return $sources;
    }
438346
public static function updateSource($id, $sourceId, $params = null, $opts = null)
    {
        return self::_updateNestedResource($id, static::PATH_SOURCES, $sourceId, $params, $opts);
    }
46570
function updateAssociatedDomains(preferences) {
    const domainList = [];
    const prefix = "applinks:";
    const linkDomains = preferences.linkDomain;

    for (let i = 0; i < linkDomains.length; i++) {
      const linkDomain = linkDomains[i];

      // add link domain to associated domain
      domainList.push(prefix + linkDomain);

      // app.link link domains need -alternate associated domains as well (for Deep Views)
      if (linkDomain.indexOf("app.link") !== -1) {
        const first = linkDomain.split(".")[0];
        const second = linkDomain.split(".")[1];
        const rest = linkDomain
          .split(".")
          .slice(2)
          .join(".");
        const alternate = `${first}-alternate`;

        domainList.push(`${prefix + alternate}.${second}.${rest}`);
      }
    }

    return domainList;
  }
388433
public function addVersion(string $code, string $namespace, bool $default = false)
    {
        $this->supportedVersions[$code] = $namespace;

        if (is_null($this->defaultVersion) || $default === true) {
            $this->setDefaultVersion($code);
        }

        return $this;
    }
508478
@Override
    public void updateSourceText(Dim.SourceInfo sourceInfo) {
        RunProxy proxy = new RunProxy(this, RunProxy.UPDATE_SOURCE_TEXT);
        proxy.sourceInfo = sourceInfo;
        SwingUtilities.invokeLater(proxy);
    }
481938
private function installRequires(Request $request, array $links, $dev = false)
    {
        foreach ($links as $link) {
            $this->logger->info($dev
                ? "Adding dev dependency <comment>{$link}</comment>"
                : "Adding dependency <comment>{$link}</comment>"
            );
            $request->install($link->getTarget(), $link->getConstraint());
        }
    }