Dep update
This commit is contained in:
14
node_modules/screeps-api/.babelrc
generated
vendored
14
node_modules/screeps-api/.babelrc
generated
vendored
@ -1,14 +0,0 @@
|
||||
{
|
||||
"presets": [
|
||||
["env",{
|
||||
"modules":false,
|
||||
"targets":{
|
||||
node: 6
|
||||
}
|
||||
}]
|
||||
],
|
||||
"plugins": [
|
||||
"transform-async-to-generator",
|
||||
"external-helpers"
|
||||
]
|
||||
}
|
2
node_modules/screeps-api/.circleci/config.yml
generated
vendored
2
node_modules/screeps-api/.circleci/config.yml
generated
vendored
@ -3,7 +3,7 @@ jobs:
|
||||
build:
|
||||
working_directory: ~/repo
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
- image: circleci/node:12
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
|
4
node_modules/screeps-api/.npmignore
generated
vendored
4
node_modules/screeps-api/.npmignore
generated
vendored
@ -1,4 +0,0 @@
|
||||
*.sublime-*
|
||||
node_modules
|
||||
auth.js
|
||||
src
|
2
node_modules/screeps-api/FUNDING.yml
generated
vendored
Normal file
2
node_modules/screeps-api/FUNDING.yml
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
patreon: ags131
|
||||
github: [ags131]
|
4
node_modules/screeps-api/README.md
generated
vendored
4
node_modules/screeps-api/README.md
generated
vendored
@ -20,7 +20,7 @@ User/pass auth will stop working February 1, 2018!
|
||||
|
||||
As of 1.7.0, a small CLI program (`screeps-api`) is included.
|
||||
|
||||
Server config is specified via a `.screeps.yml` file conforming to the [Unified Credentials File format](https://github.com/screepers/screepers-standards/blob/34bd4e6e5c8250fa0794d915d9f78d3c45326076/SS3-Unified_Credentials_File.md) (Pending [screepers-standard PR #8](https://github.com/screepers/screepers-standards/pull/8))
|
||||
Server config is specified via a `.screeps.yml` file conforming to the [Unified Credentials File format](https://github.com/screepers/screepers-standards/blob/master/SS3-Unified_Credentials_File.md)
|
||||
|
||||
```
|
||||
screeps-api
|
||||
@ -107,7 +107,7 @@ api.socket.connect()
|
||||
// data: { ... }
|
||||
// }
|
||||
api.socket.on('connected',()=>{
|
||||
// Do stuff after conntected
|
||||
// Do stuff after connected
|
||||
})
|
||||
api.socket.on('auth',(event)=>{
|
||||
event.data.status contains either 'ok' or 'failed'
|
||||
|
4
node_modules/screeps-api/auth.example.js
generated
vendored
4
node_modules/screeps-api/auth.example.js
generated
vendored
@ -1,4 +0,0 @@
|
||||
module.exports = {
|
||||
email: 'not.mine@email.com',
|
||||
password: 'notMyPassword',
|
||||
};
|
47
node_modules/screeps-api/bin/screeps-api.js
generated
vendored
47
node_modules/screeps-api/bin/screeps-api.js
generated
vendored
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env node
|
||||
const program = require('commander')
|
||||
const { Command } = require('commander')
|
||||
const { ScreepsAPI } = require('../')
|
||||
const fs = require('fs')
|
||||
const util = require('util')
|
||||
@ -8,15 +8,15 @@ const path = require('path')
|
||||
const readFile = util.promisify(fs.readFile)
|
||||
const writeFile = util.promisify(fs.writeFile)
|
||||
|
||||
async function init (opts) {
|
||||
return ScreepsAPI.fromConfig(opts.parent.server)
|
||||
async function init(opts) {
|
||||
return ScreepsAPI.fromConfig(opts.server)
|
||||
}
|
||||
|
||||
async function json (data) {
|
||||
async function json(data) {
|
||||
process.stdout.write(JSON.stringify(data))
|
||||
}
|
||||
|
||||
async function out (data, opts) {
|
||||
async function out(data, opts) {
|
||||
data = await data
|
||||
data = (data && data.data) || data
|
||||
if (process.stdout.isTTY) {
|
||||
@ -26,18 +26,29 @@ async function out (data, opts) {
|
||||
}
|
||||
}
|
||||
|
||||
async function run () {
|
||||
program
|
||||
.version(require('../package.json').version)
|
||||
.option('--server <server>', 'Server config to use', 'main')
|
||||
async function run() {
|
||||
const program = new Command()
|
||||
|
||||
/** @param {string} name */
|
||||
const commandBase = (name, args = '') => {
|
||||
const command = new Command(name)
|
||||
command
|
||||
.arguments(args)
|
||||
.option('--server <server>', 'Server config to use', 'main')
|
||||
program.addCommand(command)
|
||||
return command
|
||||
}
|
||||
|
||||
program
|
||||
.command('raw <cmd> [args...]')
|
||||
.version(require('../package.json').version)
|
||||
|
||||
commandBase('raw', '<cmd> [args...]')
|
||||
.description('Execute raw API call')
|
||||
.action(async function (cmd, args, opts) {
|
||||
try {
|
||||
const api = await init(opts)
|
||||
const path = cmd.split('.')
|
||||
/** @type {function} */
|
||||
let fn = api.raw
|
||||
for (const part of path) {
|
||||
fn = fn[part]
|
||||
@ -46,14 +57,13 @@ async function run () {
|
||||
console.log('Invalid cmd')
|
||||
return
|
||||
}
|
||||
out(fn(...args))
|
||||
out(fn.apply(api, args))
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
}
|
||||
})
|
||||
|
||||
program
|
||||
.command('memory [path]')
|
||||
commandBase('memory', '[path]')
|
||||
.description(`Get Memory contents`)
|
||||
.option('--set <file>', 'Sets the memory path to the contents of file')
|
||||
.option('--allow-root', 'Allows writing without path')
|
||||
@ -82,8 +92,7 @@ async function run () {
|
||||
}
|
||||
})
|
||||
|
||||
const seg = program
|
||||
.command('segment <segment>')
|
||||
commandBase('segment', '<segment>')
|
||||
.description(`Get segment contents. Use 'all' to get all)`)
|
||||
.option('--set <file>', 'Sets the segment content to the contents of file')
|
||||
.option('-s --shard <shard>', 'Shard to read from', 'shard0')
|
||||
@ -116,8 +125,7 @@ async function run () {
|
||||
}
|
||||
})
|
||||
|
||||
program
|
||||
.command('download')
|
||||
commandBase('download')
|
||||
.description(`Download code`)
|
||||
.option('-b --branch <branch>', 'Code branch', 'default')
|
||||
.option('-d --dir <dir>', 'Directory to save in (defaults to outputing in console)')
|
||||
@ -144,8 +152,7 @@ async function run () {
|
||||
}
|
||||
})
|
||||
|
||||
program
|
||||
.command('upload <files...>')
|
||||
commandBase('upload', '<files...>')
|
||||
.description(`Upload code`)
|
||||
.option('-b --branch <branch>', 'Code branch', 'default')
|
||||
.action(async function (files, opts) {
|
||||
@ -176,7 +183,7 @@ async function run () {
|
||||
program.outputHelp()
|
||||
}
|
||||
|
||||
program.parse(process.argv)
|
||||
await program.parseAsync()
|
||||
}
|
||||
|
||||
run().then(data => {
|
||||
|
20374
node_modules/screeps-api/dist/ScreepsAPI.cjs.js
generated
vendored
20374
node_modules/screeps-api/dist/ScreepsAPI.cjs.js
generated
vendored
File diff suppressed because it is too large
Load Diff
20368
node_modules/screeps-api/dist/ScreepsAPI.es.js
generated
vendored
20368
node_modules/screeps-api/dist/ScreepsAPI.es.js
generated
vendored
File diff suppressed because it is too large
Load Diff
20375
node_modules/screeps-api/dist/ScreepsAPI.iife.js
generated
vendored
20375
node_modules/screeps-api/dist/ScreepsAPI.iife.js
generated
vendored
File diff suppressed because it is too large
Load Diff
1537
node_modules/screeps-api/dist/ScreepsAPI.js
generated
vendored
Normal file
1537
node_modules/screeps-api/dist/ScreepsAPI.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
20378
node_modules/screeps-api/dist/ScreepsAPI.umd.js
generated
vendored
20378
node_modules/screeps-api/dist/ScreepsAPI.umd.js
generated
vendored
File diff suppressed because it is too large
Load Diff
8
node_modules/screeps-api/dist/types/ConfigManager.d.ts
generated
vendored
Normal file
8
node_modules/screeps-api/dist/types/ConfigManager.d.ts
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
export class ConfigManager {
|
||||
refresh(): Promise<void>;
|
||||
_config: any;
|
||||
getServers(): Promise<string[]>;
|
||||
getConfig(): Promise<any>;
|
||||
path: any;
|
||||
loadConfig(file: any): Promise<any>;
|
||||
}
|
1091
node_modules/screeps-api/dist/types/RawAPI.d.ts
generated
vendored
Normal file
1091
node_modules/screeps-api/dist/types/RawAPI.d.ts
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
286
node_modules/screeps-api/dist/types/ScreepsAPI.d.ts
generated
vendored
Normal file
286
node_modules/screeps-api/dist/types/ScreepsAPI.d.ts
generated
vendored
Normal file
@ -0,0 +1,286 @@
|
||||
export class ScreepsAPI extends RawAPI {
|
||||
static fromConfig(server?: string, config?: boolean, opts?: {}): Promise<ScreepsAPI>;
|
||||
constructor(opts: any);
|
||||
rateLimits: {
|
||||
global: {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
GET: {
|
||||
'/api/game/room-terrain': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/code': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/memory': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/memory-segment': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/market/orders-index': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/market/orders': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/market/my-orders': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/market/stats': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/user/money-history': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
};
|
||||
POST: {
|
||||
'/api/user/console': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/game/map-stats': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/code': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/set-active-branch': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/memory': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
'/api/user/memory-segment': {
|
||||
limit: any;
|
||||
period: any;
|
||||
remaining: any;
|
||||
reset: number;
|
||||
toReset: number;
|
||||
};
|
||||
};
|
||||
};
|
||||
socket: Socket;
|
||||
getRateLimit(method: any, path: any): any;
|
||||
get rateLimitResetUrl(): string;
|
||||
me(): Promise<{
|
||||
_id: any;
|
||||
username: any;
|
||||
badge: import("./RawAPI").Badge;
|
||||
gcl: any;
|
||||
}>;
|
||||
_user: {
|
||||
_id: any;
|
||||
username: any;
|
||||
badge: import("./RawAPI").Badge;
|
||||
gcl: any;
|
||||
};
|
||||
tokenInfo(): Promise<any>;
|
||||
_tokenInfo: any;
|
||||
userID(): Promise<any>;
|
||||
get history(): (room: string, tick: number, shard?: string) => any;
|
||||
get authmod(): () => any;
|
||||
get version(): () => {
|
||||
ok: 1;
|
||||
package: number;
|
||||
protocol: number;
|
||||
serverData: {
|
||||
customObjectTypes: any;
|
||||
historyChunkSize: number;
|
||||
features: any;
|
||||
shards: string[];
|
||||
};
|
||||
users: number;
|
||||
};
|
||||
get time(): (shard?: string) => {
|
||||
ok: number;
|
||||
time: number;
|
||||
};
|
||||
get leaderboard(): {
|
||||
list(limit: number, mode: "world" | "power", offset: number, season: string): {
|
||||
ok: any;
|
||||
list: [{
|
||||
_id: any;
|
||||
season: any;
|
||||
user: any;
|
||||
score: any;
|
||||
rank: any;
|
||||
}];
|
||||
count: any;
|
||||
users: {
|
||||
<user>(): any;
|
||||
's _id>: { _id, username, badge: { type, color1, color2, color3, param, flip }, gcl } } }}': any;
|
||||
};
|
||||
};
|
||||
find(username: string, mode?: string, season?: string): {
|
||||
ok: any;
|
||||
_id: any;
|
||||
season: any;
|
||||
user: any;
|
||||
score: any;
|
||||
rank: any;
|
||||
};
|
||||
seasons(): {
|
||||
ok: any;
|
||||
seasons: [{
|
||||
_id: any;
|
||||
name: any;
|
||||
date: any;
|
||||
}];
|
||||
};
|
||||
};
|
||||
get market(): {
|
||||
ordersIndex(shard?: string): {
|
||||
ok: 1;
|
||||
list: [{
|
||||
_id: string;
|
||||
count: number;
|
||||
}];
|
||||
};
|
||||
myOrders(): {
|
||||
ok: number;
|
||||
list: [{
|
||||
_id: any;
|
||||
created: any;
|
||||
user: any;
|
||||
active: any;
|
||||
type: any;
|
||||
amount: any;
|
||||
remainingAmount: any;
|
||||
resourceType: any;
|
||||
price: any;
|
||||
totalAmount: any;
|
||||
roomName: any;
|
||||
}];
|
||||
};
|
||||
orders(resourceType: string, shard?: string): {
|
||||
ok: number;
|
||||
list: [{
|
||||
_id: any;
|
||||
created: any;
|
||||
user: any;
|
||||
active: any;
|
||||
type: any;
|
||||
amount: any;
|
||||
remainingAmount: any;
|
||||
resourceType: any;
|
||||
price: any;
|
||||
totalAmount: any;
|
||||
roomName: any;
|
||||
}];
|
||||
};
|
||||
stats(resourceType: any, shard?: string): any;
|
||||
};
|
||||
get registerUser(): (username: string, email: string, password: string, modules: any) => any;
|
||||
get code(): {
|
||||
get(branch: string): any;
|
||||
set(branch: string, modules: any, _hash: any): any;
|
||||
};
|
||||
get memory(): {
|
||||
get(path: string, shard?: string): string;
|
||||
set(path: string, value: any, shard?: string): {
|
||||
ok: any;
|
||||
result: {
|
||||
ok: any;
|
||||
n: any;
|
||||
};
|
||||
ops: [{
|
||||
user: any;
|
||||
expression: any;
|
||||
hidden: any;
|
||||
}];
|
||||
data: any;
|
||||
insertedCount: any;
|
||||
insertedIds: any;
|
||||
};
|
||||
segment: {
|
||||
get(segment: number, shard?: string): {
|
||||
ok: any;
|
||||
data: string;
|
||||
};
|
||||
set(segment: number, data: any, shard?: string): any;
|
||||
};
|
||||
};
|
||||
get segment(): {
|
||||
get(segment: number, shard?: string): {
|
||||
ok: any;
|
||||
data: string;
|
||||
};
|
||||
set(segment: number, data: any, shard?: string): any;
|
||||
};
|
||||
get console(): (expression: any, shard?: string) => {
|
||||
ok: any;
|
||||
result: {
|
||||
ok: any;
|
||||
n: any;
|
||||
};
|
||||
ops: [{
|
||||
user: any;
|
||||
expression: any;
|
||||
_id: any;
|
||||
}];
|
||||
insertedCount: any;
|
||||
insertedIds: [<mongodb, id>() => any];
|
||||
};
|
||||
}
|
||||
import { RawAPI } from "./RawAPI";
|
||||
import { Socket } from "./Socket";
|
31
node_modules/screeps-api/dist/types/Socket.d.ts
generated
vendored
Normal file
31
node_modules/screeps-api/dist/types/Socket.d.ts
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
export class Socket extends EventEmitter {
|
||||
constructor(ScreepsAPI: any);
|
||||
api: any;
|
||||
opts: {
|
||||
reconnect: boolean;
|
||||
resubscribe: boolean;
|
||||
keepAlive: boolean;
|
||||
maxRetries: number;
|
||||
maxRetryDelay: number;
|
||||
};
|
||||
keepAliveInter: NodeJS.Timeout;
|
||||
reset(): void;
|
||||
authed: boolean;
|
||||
connected: boolean;
|
||||
reconnecting: boolean;
|
||||
__queue: any[];
|
||||
__subQueue: any[];
|
||||
__subs: {};
|
||||
connect(opts?: {}): Promise<any>;
|
||||
ws: any;
|
||||
reconnect(): Promise<void>;
|
||||
disconnect(): void;
|
||||
sleep(time: any): Promise<any>;
|
||||
handleMessage(msg: any): void;
|
||||
gzip(bool: any): Promise<void>;
|
||||
send(data: any): Promise<void>;
|
||||
auth(token: any): Promise<any>;
|
||||
subscribe(path: any, cb: any): Promise<void>;
|
||||
unsubscribe(path: any): Promise<void>;
|
||||
}
|
||||
import { EventEmitter } from "events";
|
1
node_modules/screeps-api/dist/types/index.d.ts
generated
vendored
Normal file
1
node_modules/screeps-api/dist/types/index.d.ts
generated
vendored
Normal file
@ -0,0 +1 @@
|
||||
export * from "./ScreepsAPI.js";
|
2
node_modules/screeps-api/dist/types/ws-browser.d.ts
generated
vendored
Normal file
2
node_modules/screeps-api/dist/types/ws-browser.d.ts
generated
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
declare const _exports: any;
|
||||
export = _exports;
|
2
node_modules/screeps-api/docs/Endpoints.md
generated
vendored
2
node_modules/screeps-api/docs/Endpoints.md
generated
vendored
@ -132,7 +132,7 @@ are the ones listed below.
|
||||
|
||||
- `https://screeps.com/api/user/world-status`
|
||||
- `{ ok, status }`
|
||||
- `status` is usually "normal"; it's unknown what else it can be
|
||||
- `status` can be `"lost"`, `"empty"` or `"normal"`, lost is when you loose all your spawns, empty is when you have respawned and not placed your spawn yet.;
|
||||
|
||||
- `https://screeps.com/api/user/world-start-room`
|
||||
- `{ ok, room: [ <room name> ] }`
|
||||
|
1
node_modules/screeps-api/index.js
generated
vendored
1
node_modules/screeps-api/index.js
generated
vendored
@ -1 +0,0 @@
|
||||
module.exports = require('./dist/ScreepsAPI.cjs.js')
|
54
node_modules/screeps-api/package.json
generated
vendored
54
node_modules/screeps-api/package.json
generated
vendored
@ -1,16 +1,18 @@
|
||||
{
|
||||
"name": "screeps-api",
|
||||
"version": "1.7.2",
|
||||
"version": "1.16.1",
|
||||
"description": "",
|
||||
"repository": "screepers/node-screeps-api",
|
||||
"main": "dist/ScreepsAPI.cjs.js",
|
||||
"module": "dist/ScreepsAPI.es.js",
|
||||
"main": "dist/ScreepsAPI.js",
|
||||
"module": "src/index.js",
|
||||
"scripts": {
|
||||
"build": "rollup -c",
|
||||
"prepublish": "npm run build",
|
||||
"lint": "standard src test",
|
||||
"test": "mocha",
|
||||
"2npm": "publish"
|
||||
"prepublishOnly": "npm run build",
|
||||
"lint": "standard src/**/*.js",
|
||||
"lint-fix": "standard src/**/*.js --fix",
|
||||
"test_": "mocha",
|
||||
"test": "echo Tests disabled, TODO: FIX THIS!",
|
||||
"2npm": "publish-if-not-published"
|
||||
},
|
||||
"author": "Adam Shumann",
|
||||
"license": "ISC",
|
||||
@ -18,34 +20,28 @@
|
||||
"screeps-api": "bin/screeps-api.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"commander": "^2.15.1",
|
||||
"bluebird": "^3.5.0",
|
||||
"fetch-ponyfill": "^6.0.2",
|
||||
"node-fetch": "^2.1.2",
|
||||
"ws": "^5.2.0",
|
||||
"axios": "^0.28.0",
|
||||
"commander": "^7.2.0",
|
||||
"debug": "^4.1.1",
|
||||
"ws": "^7.4.4",
|
||||
"yamljs": "^0.3.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"bufferutil": "^3.0.5",
|
||||
"utf-8-validate": "^4.0.2"
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": "^5.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-transform-async-to-generator": "^6.24.1",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"lodash": "^4.17.4",
|
||||
"mocha": "^3.5.0",
|
||||
"publish": "^0.6.0",
|
||||
"rollup": "^0.45.2",
|
||||
"rollup-plugin-babel": "^2.7.1",
|
||||
"rollup-plugin-commonjs": "^8.0.2",
|
||||
"rollup-plugin-node-builtins": "^2.1.2",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-watch": "^4.3.1",
|
||||
"standard": "*"
|
||||
"lodash": "^4.17.11",
|
||||
"mocha": "^8.3.2",
|
||||
"publish-if-not-published": "^2.0.0",
|
||||
"rollup": "^2.44.0",
|
||||
"rollup-plugin-typescript2": "^0.30.0",
|
||||
"standard": "*",
|
||||
"tslib": "^2.2.0",
|
||||
"typescript": "^4.2.4"
|
||||
},
|
||||
"browser": {
|
||||
"ws": "./src/ws-browser.js"
|
||||
}
|
||||
},
|
||||
"types": "dist/types/index.d.ts"
|
||||
}
|
||||
|
41
node_modules/screeps-api/rollup.config.js
generated
vendored
41
node_modules/screeps-api/rollup.config.js
generated
vendored
@ -1,32 +1,25 @@
|
||||
import resolve from 'rollup-plugin-node-resolve'
|
||||
import builtins from 'rollup-plugin-node-builtins'
|
||||
import commonjs from 'rollup-plugin-commonjs'
|
||||
import babel from 'rollup-plugin-babel'
|
||||
import typescript from 'rollup-plugin-typescript2'
|
||||
|
||||
export default {
|
||||
entry: 'src/index.js',
|
||||
input: {
|
||||
ScreepsAPI: 'src/index.js'
|
||||
},
|
||||
output: {
|
||||
dir: 'dist',
|
||||
format: 'cjs',
|
||||
exports: 'named',
|
||||
preferConst: true,
|
||||
globals: {
|
||||
ws: 'WebSocket'
|
||||
},
|
||||
},
|
||||
// external(id){
|
||||
// return !!require('./package.json').dependencies[id];
|
||||
// },
|
||||
globals: {
|
||||
ws: 'WebSocket',
|
||||
'node-fetch': 'fetch'
|
||||
},
|
||||
external: ['ws', 'fs', 'node-fetch'],
|
||||
moduleName: 'ScreepsAPI',
|
||||
targets: [
|
||||
{ dest: 'dist/ScreepsAPI.iife.js', format: 'iife' },
|
||||
{ dest: 'dist/ScreepsAPI.umd.js', format: 'umd' },
|
||||
{ dest: 'dist/ScreepsAPI.cjs.js', format: 'cjs' },
|
||||
{ dest: 'dist/ScreepsAPI.es.js', format: 'es' }
|
||||
],
|
||||
external: ['ws', 'fs', 'axios', 'bluebird', 'yamljs', 'url', 'events', 'zlib', 'path','debug', 'util'],
|
||||
plugins: [
|
||||
builtins(),
|
||||
commonjs(),
|
||||
resolve({
|
||||
module: true,
|
||||
preferBuiltins: true
|
||||
}),
|
||||
babel()
|
||||
typescript({
|
||||
useTsconfigDeclarationDir: true
|
||||
})
|
||||
]
|
||||
}
|
||||
|
10
node_modules/screeps-api/tsconfig.json
generated
vendored
Normal file
10
node_modules/screeps-api/tsconfig.json
generated
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"declaration": true,
|
||||
"declarationDir": "dist/types",
|
||||
"rootDir": "src",
|
||||
"allowJs": true,
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules/**/*"]
|
||||
}
|
4274
node_modules/screeps-api/yarn.lock
generated
vendored
4274
node_modules/screeps-api/yarn.lock
generated
vendored
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user