{"id":26334,"library":"rollup-plugin-screeps-world","title":"rollup-plugin-screeps-world","description":"A Rollup plugin for deploying code to the Screeps MMO game world. Version 1.0.4 is the latest stable release, updated sporadically. It automates uploading compiled JavaScript bundles to Screeps servers via the official API, with support for automatic branch naming from Git, source map uploading, and config file-based authentication. Unlike generic upload plugins, this is purpose-built for Screeps' unique upload protocol and branch system. It ships TypeScript types.","status":"active","version":"1.0.4","language":"javascript","source_language":"en","source_url":"https://github.com/screepers/rollup-plugin-screeps-world","tags":["javascript","rollup","screeps","world","typescript"],"install":[{"cmd":"npm install rollup-plugin-screeps-world","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-screeps-world","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-screeps-world","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM import required; CommonJS require will not work because the package is ESM-only.","wrong":"const screeps = require('rollup-plugin-screeps-world')","symbol":"default","correct":"import screeps from 'rollup-plugin-screeps-world'"},{"note":"The package also exports a named export `screepsWorld` which is identical to default. Prefer default for consistency.","wrong":"import screepsWorld from 'rollup-plugin-screeps-world'","symbol":"screepsWorld (named)","correct":"import { screepsWorld } from 'rollup-plugin-screeps-world'"},{"note":"Type import for TypeScript users. Only available in v1+. Not exported from CommonJS.","wrong":null,"symbol":"ScreepsPluginOptions (type)","correct":"import type { ScreepsPluginOptions } from 'rollup-plugin-screeps-world'"}],"quickstart":{"code":"import screeps from 'rollup-plugin-screeps-world';\nimport typescript from '@rollup/plugin-typescript';\n\nexport default {\n  input: 'src/main.ts',\n  output: {\n    dir: 'dist',\n    format: 'cjs',\n    entryFileNames: 'main.js',\n    sourcemap: true\n  },\n  plugins: [\n    typescript(),\n    screeps({\n      configFile: './screeps.json',\n      dryRun: false\n    })\n  ]\n};","lang":"typescript","description":"Shows a minimal Rollup config using TypeScript and the screeps plugin to upload the bundle to Screeps."},"warnings":[{"fix":"Use import syntax in your Rollup config and ensure your project uses ESM (type: module in package.json) or use a dynamic import.","message":"The plugin is ESM-only from v1.0.0. Using require() will fail.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Replace `token` with a config file or inline credentials.","message":"The option `token` is deprecated since v1.0.3. Use `configFile` or inline `email`/`password`.","severity":"deprecated","affected_versions":">=1.0.3"},{"fix":"Ensure both output file and .map file are present in the output directory, or set `sourcemap: false`.","message":"If `sourcemap: true` in Rollup output, the plugin expects source map as a separate file. If not provided, upload will fail silently.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Set a static branch name in config, or ensure your project is a git repository.","message":"The `branch` option set to `\"auto\"` relies on git branch name. If not in a git repo, it defaults to undefined, causing upload errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Change to import syntax: `import screeps from 'rollup-plugin-screeps-world'`","cause":"Using CommonJS require() on ESM-only package.","error":"Error: Unexpected token 'export'"},{"fix":"Use `import screeps from 'rollup-plugin-screeps-world'`","cause":"Using default import incorrectly (e.g., `{ screeps }` instead of `screeps`).","error":"TypeError: screeps is not a function"},{"fix":"Ensure the file exists at the specified path, or provide inline options.","cause":"The config file path is misconfigured or missing.","error":"Error: ENOENT: no such file or directory, open './screeps.json'"},{"fix":"Verify credentials in screeps.json or environment variables.","cause":"Wrong email or password in config file.","error":"Error: Invalid credentials (401)"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}