npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@turist/ship-board

v0.1.0

Published

Board a project to Ship.

Downloads

1

Readme

ship-board

Upload Ship projects to OneDrive or SharePoint Online.

This app requires another Application registration in Azure AD. Luckily it's pretty simple.

  1. Choose whatever name that suits you.
  2. Add Files.ReadWrite.All, Sites.ReadWrite.All, and User.Read delegated permissions.
  3. Add a web platform with a redirect URL to http://localhost. This is safe and it won't be actually utilized for anything, but it's just a requirement for the device code auth flow for whatever reason.
  4. It might be necessary to set the default client type to public. This is slightly confusing because now you'll see that this is a required mode for auth flows that don't use the redirect URL. However, the redirect URL is still MANDATORY for those same flows.
  5. Grab all the info required by the config.

Configuration

ship-board can be configured with either environment variables or with a config file, or mix of both. If both configuration methods are mixed then the environment variables that have truthy values will take precedence over properties set in the config file. The default config file name is ship-config.json and it can be changed from src/config.ts.

| Env | Description | |-----------------------|-------------------------------| | TENANT | Tenant FQDN | | AUTHORITY_HOST_URL | Authority URL | | CLIENT_ID | Client ID | | SPO_ROOT | Path to Ship's root folder | | DOMAIN | Domain folder name |

{
  "tenant": "YOU.onmicrosoft.com",
  "authorityHostUrl": "https://login.microsoftonline.com",
  "clientId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "spoRoot": "/sites/root/drive/root:%2Fship-demo",
  "domain": "test.com"
}

By default the config file and a file called .ignore will be ignored, and thus won't be uploaded. As the name suggests, the .ignore file can be used to configure additional ignore patterns in .git style.

Boarding to a Ship

First you need to decide how you want to feed to configuration to ship-board, i.e. either using env, a config file, or both.

If you are using node.js/npm/yarn for your project you might want to consider installing ship-board as a dev dependency.

Once configured, uploading a project is fairly easy. In fact, there is only one step (assuming yarn):

$ yarn ship-board

If you instead decide to install ship-board globally with npm then you can run:

ship-board

Oh, and the command also accepts an argument, that's the directory to be uploaded:

ship-board ./path/to/my/cool/website

FAQ

Why doesn't it support application authentication with a secret?

This would be really cool but currently AAD/Graph API/OneDrive doesn't allow fine grained access control. This means that you would be giving the whatever app secret token write access to all your files. I don't want you to risk your data.

However, we are lucky and Microsoft is working on this: https://microsoftgraph.uservoice.com/forums/920506-microsoft-graph-feature-requests/suggestions/37796059-restrict-permissions-to-app-only-azure-ad-applicat?page=1&per_page=20

Once that is implemented then alternative authentication methods will be implemented into ship-board.

How to run this in a CI or GitHub action?

See above.

Is this a deploy tool?

No, this is a specialized file uploader for OneDrive and SharePoint Online. A deploy tool typically sets up a domain name, server configuration, or whatever people consider as making a deployment of something. This tool does none of those for you. ship-board is comparable to an FTP client.