Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

appcd-default-plugins

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

appcd-default-plugins

A psuedo package that bundles all default appcd plugins.

  • 4.2.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

appcd-default-plugins

A psuedo package that attempts to install the latest major versions of all default appcd plugins into the user's appcd home directrory (e.g. "~/.appcelerator/appcd/plugins") postinstall and optionally at runtime.

Visit https://github.com/appcelerator/appc-daemon for more information.

Report issues to GitHub issues. Official issue tracker in JIRA.

Usage

import { installDefaultPlugins } from 'appcd-default-plugins';

await installDefaultPlugins('/path/to/plugins/dir');

Details

appcd-default-plugins deploys two strategies for installing the default appcd plugins: post-install and at runtime.

Post-install is the ideal time to install the default plugins, however if the user installs as root (e.g. sudo), then npm will drop permissions and the post-install script will be unable to write to the plugins directory. In this case, the permission error is suppressed allowing the install to complete.

appcd-default-plugins leverages lerna and yarn to create a local workspace for the purpose of optimizing a hoisted node_modules directory.

Since downloading and installing a plugin and its dependencies is an expensive operation, it will only install a plugin from npm if there are no installed plugins that satisfy the plugin's specs. Likewise, it will only invoke lerna if a plugin was installed or a plugin was removed/invalidated.

The installDefaultPlugins() function performs a number of steps to attempt to install the default plugins:

  1. Determine if the plugins directory is writable.
  2. Locate the yarn and lerna scripts.
  3. Detect existing list of workspaces that were created during postinstall or previous appcd start.
  4. Detect existing installed plugins.
    • Invalid plugins are quarantine in a /path/to/plugins/invalid directory.
  5. Detect an global yarn links.
    • Symlink any new yarn links.
  6. Loop over the list of default appcd plugins and figure out what needs to be installed.
  7. Install the missing appcd plugins.
  8. Assuming one or more plugins where installed or the list of workspaces has changed, then:
    • Rewrite every plugin's package name in their respective package.json files to make lerna/yarn happy.
    • Write the main package.json and lerna.json files.
    • Execute lerna bootstrap which in turn executes yarn.
    • Revert the plugin package names.

This project is open source under the Apache Public License v2 and is developed by Axway, Inc and the community. Please read the LICENSE file included in this distribution for more information.

FAQs

Package last updated on 03 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc