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

@workadventure/upload-maps

v1.7.0

Published

It is a package for uploading map in self hosted version.

Downloads

623

Readme

🚀 Map Upload package for WorkAdventure

visitors

This package is designed to help you upload maps to the map storage of WorkAdventure.

🔧 Installation

To install this package, use the following command:

npm install @workadventure/upload-maps

📄 Usage

This guide will walk you through the process of uploading your custom map to the map storage. You can also refer to the WorkAdventure documentation for more details.

To use this package, import it into your project and run the command in your terminal:

npm run upload

It will ask you a few questions:

  1. Map Storage URL (stored in MAP_STORAGE_URL in the .env file)

    For SaaS users, you can find it in the admin panel under Developers -> API keys / Zapier.

  2. API Key (stored in MAP_STORAGE_API_KEY in the .env.secret file)

    For SaaS users, you can generate this in the admin panel, under Developers -> API keys / Zapier.

  3. Upload Directory (stored in UPLOAD_DIRECTORY in the .env file)

    If you have GitHub and forked the repository, the directory will default to your GitHub username and repository name. Otherwise, specify a custom name.

Alternatively, you can use flags to upload your map, though the secret variables won't be saved in the .env or .env.secret files. Available flags include:

  • -u: Map storage URL
  • -k: API Key
  • -d: Upload directory

Example:

npm run upload -- -u your-map-storage-url -k your-api-key -d your-directory

After answering these questions, the script will start to upload your maps. You need to see something like this at the end: Upload done successfully!.

🛠️ How it works

When you run npm run upload, the following steps are executed:

  1. Build Phase:

    • Tilesets are optimized and chunked, removing any unused tiles.
    • Scripts in the map are compiled (from TypeScript to JavaScript) and bundled into a single file.
    • The result is written in the dist directory.
    • The public directory content is copied to the dist directory.
  2. Upload Phase:

    • A ZIP file of the dist directory is created and sent to the WorkAdventure map-storage server.
    • The server unzips and stores the files in your configured directory, creating .wam files for each .tmj file if needed.

[!TIP] You can skip the build phase and only upload the current state of your project with the command: npm run upload-only

[!WARNING] The WorkAdventure server only stores the built map you upload. It does not store your original files. To update your map, make sure to keep the original files locally. If you need to make changes, update your files and run the upload command again.

❓ Need Help

If you have any questions or need further assistance, don't hesitate to ask either by email or Discord!