areaspawnr
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -1,55 +0,5 @@ | ||
const gulp = require("gulp"); | ||
const merge = require("merge2"); | ||
const mochaPhantomJS = require("gulp-mocha-phantomjs"); | ||
const runSequence = require("run-sequence"); | ||
const ts = require("gulp-typescript"); | ||
const tslint = require("gulp-tslint"); | ||
gulp.task("tslint", () => { | ||
return gulp | ||
.src(["src/**/*.ts", "!src/**/*.d.ts"]) | ||
.pipe(tslint()) | ||
.pipe(tslint.report("verbose")); | ||
require("gulp-shenanigans").initialize({ | ||
dependencies: ["ItemsHoldr", "MapsCreatr", "MapScreenr"], | ||
gulp: require("gulp"), | ||
packageName: "AreaSpawnr" | ||
}); | ||
gulp.task("tsc", () => { | ||
const tsProject = ts.createProject("tsconfig.json"); | ||
return tsProject | ||
.src() | ||
.pipe(ts(tsProject)) | ||
.js.pipe(gulp.dest("src")); | ||
}); | ||
gulp.task("test", () => { | ||
return gulp | ||
.src("test/unit/index.html") | ||
.pipe(mochaPhantomJS()); | ||
}); | ||
gulp.task("dist", function() { | ||
const tsProject = ts.createProject( | ||
"tsconfig.json", | ||
{ | ||
outFile: "dist/AreaSpawnr.js", | ||
removeComments: true | ||
}); | ||
const tsResult = tsProject | ||
.src() | ||
.pipe(ts(tsProject)); | ||
return merge([ | ||
tsResult.dts.pipe(gulp.dest("dist")), | ||
tsResult.js.pipe(gulp.dest("dist")) | ||
]); | ||
}); | ||
gulp.task("watch", ["default"], () => { | ||
gulp.watch("src/**/*.ts", ["default"]); | ||
}); | ||
gulp.task("default", ["tsc", "tslint", "dist"], cb => { | ||
runSequence(["test"], cb); | ||
}); |
{ | ||
"name": "areaspawnr", | ||
"description": "Loads GameStartr maps to spawn and unspawn areas on demand.", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"author": { | ||
@@ -17,20 +17,10 @@ "name": "Josh Goldberg", | ||
"license": "MIT", | ||
"dependencies": { | ||
"itemsholdr": "^0.5.0", | ||
"mapscreatr": "^0.5.0", | ||
"mapscreenr": "^0.5.0" | ||
}, | ||
"devDependencies": { | ||
"chai": "^3.5.0", | ||
"gulp": "^3.9.1", | ||
"gulp-mocha-phantomjs": "^0.11.0", | ||
"gulp-tslint": "^5.0.0", | ||
"gulp-typescript": "^2.13.4", | ||
"merge2": "^1.0.2", | ||
"mocha": "^2.4.5", | ||
"requirejs": "^2.2.0", | ||
"run-sequence": "^1.2.0", | ||
"tslint": "^3.10.2", | ||
"typescript": "^1.8.10" | ||
}, | ||
"dependencies": { | ||
"itemsholdr": "^0.4.2", | ||
"mapscreatr": "^0.4.1", | ||
"mapscreenr": "^0.4.1" | ||
"gulp-shenanigans": "^0.3.2" | ||
} | ||
} |
@@ -1,3 +0,3 @@ | ||
/// <reference path="../typings/mapscreatr/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/mapscreenr/MapScreenr.d.ts" /> | ||
/// <reference path="../typings/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/MapScreenr.d.ts" /> | ||
define(["require", "exports"], function (require, exports) { | ||
@@ -4,0 +4,0 @@ "use strict"; |
@@ -1,7 +0,4 @@ | ||
/// <reference path="../typings/mapscreatr/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/mapscreenr/MapScreenr.d.ts" /> | ||
/// <reference path="../typings/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/MapScreenr.d.ts" /> | ||
import { IArea, ILocation, IMap, IMapsCreatr, IPreThingsContainers } from "IMapsCreatr"; | ||
import { IMapScreenr } from "IMapScreenr"; | ||
import { IPreThing, IPreThingSettings } from "IPreThing"; | ||
import { IAreaSpawnr, IAreaSpawnrSettings, ICommandAdder } from "./IAreaSpawnr"; | ||
@@ -36,3 +33,3 @@ | ||
*/ | ||
private MapsCreator: IMapsCreatr; | ||
private MapsCreator: MapsCreatr.IMapsCreatr; | ||
@@ -42,3 +39,3 @@ /** | ||
*/ | ||
private MapScreener: IMapScreenr; | ||
private MapScreener: MapScreenr.IMapScreenr; | ||
@@ -53,3 +50,3 @@ /** | ||
*/ | ||
private mapCurrent: IMap; | ||
private mapCurrent: MapsCreatr.IMap; | ||
@@ -59,3 +56,3 @@ /** | ||
*/ | ||
private areaCurrent: IArea; | ||
private areaCurrent: MapsCreatr.IArea; | ||
@@ -65,3 +62,3 @@ /** | ||
*/ | ||
private locationEntered: ILocation; | ||
private locationEntered: MapsCreatr.ILocation; | ||
@@ -76,3 +73,3 @@ /** | ||
*/ | ||
private prethings: IPreThingsContainers; | ||
private prethings: MapsCreatr.IPreThingsContainers; | ||
@@ -82,3 +79,3 @@ /** | ||
*/ | ||
private onSpawn: (prething: IPreThing) => void; | ||
private onSpawn: (prething: MapsCreatr.IPreThing) => void; | ||
@@ -88,3 +85,3 @@ /** | ||
*/ | ||
private onUnspawn: (prething: IPreThing) => void; | ||
private onUnspawn: (prething: MapsCreatr.IPreThing) => void; | ||
@@ -94,3 +91,3 @@ /** | ||
*/ | ||
private stretches: (string | IPreThingSettings)[]; | ||
private stretches: (string | MapsCreatr.IPreThingSettings)[]; | ||
@@ -105,3 +102,3 @@ /** | ||
*/ | ||
private afters: (string | IPreThingSettings)[]; | ||
private afters: (string | MapsCreatr.IPreThingSettings)[]; | ||
@@ -148,3 +145,3 @@ /** | ||
*/ | ||
public getMapsCreator(): IMapsCreatr { | ||
public getMapsCreator(): MapsCreatr.IMapsCreatr { | ||
return this.MapsCreator; | ||
@@ -156,3 +153,3 @@ } | ||
*/ | ||
public getMapScreener(): IMapScreenr { | ||
public getMapScreener(): MapScreenr.IMapScreenr { | ||
return this.MapScreener; | ||
@@ -182,3 +179,3 @@ } | ||
*/ | ||
public getMap(name?: string): IMap { | ||
public getMap(name?: string): MapsCreatr.IMap { | ||
if (typeof name !== "undefined") { | ||
@@ -196,3 +193,3 @@ return this.MapsCreator.getMap(name); | ||
*/ | ||
public getMaps(): { [i: string]: IMap } { | ||
public getMaps(): { [i: string]: MapsCreatr.IMap } { | ||
return this.MapsCreator.getMaps(); | ||
@@ -204,3 +201,3 @@ } | ||
*/ | ||
public getArea(): IArea { | ||
public getArea(): MapsCreatr.IArea { | ||
return this.areaCurrent; | ||
@@ -220,3 +217,3 @@ } | ||
*/ | ||
public getLocation(location: string): ILocation { | ||
public getLocation(location: string): MapsCreatr.ILocation { | ||
return this.areaCurrent.map.locations[location]; | ||
@@ -228,3 +225,3 @@ } | ||
*/ | ||
public getLocationEntered(): ILocation { | ||
public getLocationEntered(): MapsCreatr.ILocation { | ||
return this.locationEntered; | ||
@@ -239,3 +236,3 @@ } | ||
*/ | ||
public getPreThings(): IPreThingsContainers { | ||
public getPreThings(): MapsCreatr.IPreThingsContainers { | ||
return this.prethings; | ||
@@ -254,3 +251,3 @@ } | ||
*/ | ||
public setMap(name: string, location?: string): IMap { | ||
public setMap(name: string, location?: string): MapsCreatr.IMap { | ||
// Get the newly current map from this.getMap normally | ||
@@ -281,3 +278,3 @@ this.mapCurrent = this.getMap(name); | ||
// Query the location from the current map and ensure it exists | ||
const location: ILocation = this.mapCurrent.locations[name]; | ||
const location: MapsCreatr.ILocation = this.mapCurrent.locations[name]; | ||
if (!location) { | ||
@@ -324,3 +321,3 @@ throw new Error(`Unknown location in setLocation: '${name}'.`); | ||
*/ | ||
public setStretches(stretchesRaw: (string | IPreThingSettings)[]): void { | ||
public setStretches(stretchesRaw: (string | MapsCreatr.IPreThingSettings)[]): void { | ||
this.stretches = stretchesRaw; | ||
@@ -339,3 +336,3 @@ | ||
*/ | ||
public setAfters(aftersRaw: (string | IPreThingSettings)[]): void { | ||
public setAfters(aftersRaw: (string | MapsCreatr.IPreThingSettings)[]): void { | ||
this.afters = aftersRaw; | ||
@@ -404,3 +401,3 @@ | ||
private applySpawnAction( | ||
callback: (prething: IPreThing) => void, | ||
callback: (prething: MapsCreatr.IPreThing) => void, | ||
status: boolean, | ||
@@ -419,3 +416,3 @@ direction: string, | ||
// Don't bother trying to spawn the group if it has no members | ||
const group: IPreThing[] = (this.prethings as any)[name][direction]; | ||
const group: MapsCreatr.IPreThing[] = (this.prethings as any)[name][direction]; | ||
if (group.length === 0) { | ||
@@ -434,3 +431,3 @@ continue; | ||
for (let i: number = start; i <= end; i += 1) { | ||
const prething: IPreThing = group[i]; | ||
const prething: MapsCreatr.IPreThing = group[i]; | ||
@@ -463,3 +460,3 @@ // For example: if status is true (spawned), don't spawn again | ||
direction: string, | ||
group: IPreThing[], | ||
group: MapsCreatr.IPreThing[], | ||
mid: number, | ||
@@ -499,3 +496,3 @@ top: number, | ||
direction: string, | ||
group: IPreThing[], | ||
group: MapsCreatr.IPreThing[], | ||
mid: number, | ||
@@ -502,0 +499,0 @@ top: number, |
@@ -1,5 +0,5 @@ | ||
/// <reference path="../typings/mapscreatr/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/mapscreenr/MapScreenr.d.ts" /> | ||
/// <reference path="../typings/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/MapScreenr.d.ts" /> | ||
define(["require", "exports"], function (require, exports) { | ||
"use strict"; | ||
}); |
@@ -1,9 +0,4 @@ | ||
/// <reference path="../typings/mapscreatr/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/mapscreenr/MapScreenr.d.ts" /> | ||
/// <reference path="../typings/MapsCreatr.d.ts" /> | ||
/// <reference path="../typings/MapScreenr.d.ts" /> | ||
import { IArea, ILocation, IMap, IMapsCreatr, IPreThingsContainers } from "IMapsCreatr"; | ||
import { IMapScreenr } from "IMapScreenr"; | ||
import { IPreThing, IPreThingSettings } from "IPreThing"; | ||
import { IAreaSpawnr, IAreaSpawnrSettings, ICommandAdder } from "./IAreaSpawnr"; | ||
/** | ||
@@ -17,3 +12,3 @@ * A Function to add a map command, such as an after or stretch. | ||
export interface ICommandAdder { | ||
(thing: string | IPreThingSettings, index: number): void; | ||
(thing: string | MapsCreatr.IPreThingSettings, index: number): void; | ||
} | ||
@@ -28,3 +23,3 @@ | ||
*/ | ||
MapsCreator: IMapsCreatr; | ||
MapsCreator: MapsCreatr.IMapsCreatr; | ||
@@ -34,3 +29,3 @@ /** | ||
*/ | ||
MapScreener: IMapScreenr; | ||
MapScreener: MapScreenr.IMapScreenr; | ||
@@ -40,3 +35,3 @@ /** | ||
*/ | ||
onSpawn?: (prething: IPreThing) => void; | ||
onSpawn?: (prething: MapsCreatr.IPreThing) => void; | ||
@@ -46,3 +41,3 @@ /** | ||
*/ | ||
onUnspawn?: (prething: IPreThing) => void; | ||
onUnspawn?: (prething: MapsCreatr.IPreThing) => void; | ||
@@ -79,3 +74,3 @@ /** | ||
*/ | ||
getMapsCreator(): IMapsCreatr; | ||
getMapsCreator(): MapsCreatr.IMapsCreatr; | ||
@@ -85,3 +80,3 @@ /** | ||
*/ | ||
getMapScreener(): IMapScreenr; | ||
getMapScreener(): MapScreenr.IMapScreenr; | ||
@@ -105,3 +100,3 @@ /** | ||
*/ | ||
getMap(name?: string): IMap; | ||
getMap(name?: string): MapsCreatr.IMap; | ||
@@ -113,3 +108,3 @@ /** | ||
*/ | ||
getMaps(): { [i: string]: IMap }; | ||
getMaps(): { [i: string]: MapsCreatr.IMap }; | ||
@@ -119,3 +114,3 @@ /** | ||
*/ | ||
getArea(): IArea; | ||
getArea(): MapsCreatr.IArea; | ||
@@ -131,3 +126,3 @@ /** | ||
*/ | ||
getLocation(location: string): ILocation; | ||
getLocation(location: string): MapsCreatr.ILocation; | ||
@@ -137,3 +132,3 @@ /** | ||
*/ | ||
getLocationEntered(): ILocation; | ||
getLocationEntered(): MapsCreatr.ILocation; | ||
@@ -146,3 +141,3 @@ /** | ||
*/ | ||
getPreThings(): IPreThingsContainers; | ||
getPreThings(): MapsCreatr.IPreThingsContainers; | ||
@@ -159,3 +154,3 @@ /** | ||
*/ | ||
setMap(name: string, location?: string): IMap; | ||
setMap(name: string, location?: string): MapsCreatr.IMap; | ||
@@ -177,3 +172,3 @@ /** | ||
*/ | ||
setStretches(stretchesRaw: (string | IPreThingSettings)[]): void; | ||
setStretches(stretchesRaw: (string | MapsCreatr.IPreThingSettings)[]): void; | ||
@@ -186,3 +181,3 @@ /** | ||
*/ | ||
setAfters(aftersRaw: (string | IPreThingSettings)[]): void; | ||
setAfters(aftersRaw: (string | MapsCreatr.IPreThingSettings)[]): void; | ||
@@ -189,0 +184,0 @@ /** |
@@ -7,7 +7,8 @@ { | ||
"declaration": true, | ||
"outDir": "dist" | ||
"outDir": "lib" | ||
}, | ||
"exclude": [ | ||
"node_modules" | ||
"files": [ | ||
"src/IAreaSpawnr.ts", | ||
"src/AreaSpawnr.ts" | ||
] | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
192011
1
27
4798
0
1
+ Addeditemsholdr@0.5.3(transitive)
+ Addedmapscreatr@0.5.5(transitive)
+ Addedmapscreenr@0.5.3(transitive)
+ Addedobjectmakr@0.5.3(transitive)
- Removeditemsholdr@0.4.2(transitive)
- Removedmapscreatr@0.4.1(transitive)
- Removedmapscreenr@0.4.1(transitive)
- Removedobjectmakr@0.4.2(transitive)
Updateditemsholdr@^0.5.0
Updatedmapscreatr@^0.5.0
Updatedmapscreenr@^0.5.0