Skip to content

Commit e0459e9

Browse files
committed
CI Updates
1 parent 820ce1d commit e0459e9

File tree

8 files changed

+3454
-3526
lines changed

8 files changed

+3454
-3526
lines changed

.circleci/config.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Publish
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
11+
id-token: write
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v4
15+
with:
16+
node-version: 16
17+
registry-url: https://registry.npmjs.org/
18+
- run: pnpm test
19+
- run: pnpm publish
20+
env:
21+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/test.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
id-token: write
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 16
21+
- run: pnpm test

lib/services/autoSpawn/backend.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ module.exports = (config) => {
2525
if (!auto) {
2626
objectsToInsert.push({
2727
type: 'spawn',
28-
room: room,
28+
room,
2929
x,
3030
y,
31-
name: name,
31+
name,
3232
user: user._id.toString(),
3333
store: { energy: C.SPAWN_ENERGY_START },
3434
storeCapacityResource: { energy: C.SPAWN_ENERGY_CAPACITY },
@@ -61,18 +61,18 @@ module.exports = (config) => {
6161
}
6262
await db['rooms.objects'].removeWhere({
6363
$and: [
64-
{ room: room },
64+
{ room },
6565
{ user: { $ne: null } },
6666
{ type: { $in: [...Object.keys(C.CONSTRUCTION_COST), 'creep'] } }
6767
]
6868
})
6969
await db['rooms.objects'].update({
70-
$and: [{ room: room }, { type: 'controller' }, { level: 0 }]
70+
$and: [{ room }, { type: 'controller' }, { level: 0 }]
7171
}, {
7272
$set: { user: '' + user._id, level: 1, progress: 0, downgradeTime: null, safeMode: gameTime + 20000, autoSpawn: auto }
7373
})
7474
await db['rooms.objects'].update({
75-
$and: [{ room: room }, { type: 'source' }]
75+
$and: [{ room }, { type: 'source' }]
7676
}, {
7777
$set: { invaderHarvested: 0 }
7878
})

lib/services/warpath/battledetect.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class BattleDetect {
199199
continue
200200
}
201201
userData[creep.user] = {
202-
username: username,
202+
username,
203203
owner: false,
204204
boosts: false,
205205
heal: 0,
@@ -272,7 +272,7 @@ class BattleDetect {
272272
userData[roomObjects.controller[0].user] = {
273273
owner: true,
274274
boosts: false,
275-
username: username,
275+
username,
276276
heal: 0,
277277
work: 0,
278278
attack: 0,
@@ -291,7 +291,7 @@ class BattleDetect {
291291
userData[roomObjects.controller[0].reservation.user] = {
292292
owner: false,
293293
reserver: true,
294-
username: username,
294+
username,
295295
boosts: false,
296296
heal: 0,
297297
work: 0,

package.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
"2npm": "publish"
99
},
1010
"devDependencies": {
11-
"@screeps/backend": "^3.2.3",
11+
"@screeps/backend": "^3.2.6",
1212
"publish": "^0.6.0",
13-
"standard": "*"
13+
"standard": "^17.1.2"
1414
},
1515
"screeps_mod": true,
1616
"keywords": [
@@ -20,14 +20,19 @@
2020
"author": "Alina Shumann",
2121
"license": "MIT",
2222
"dependencies": {
23-
"axios": "^0.19.0",
24-
"body-parser": "^1.19.0",
23+
"axios": "^1.9.0",
24+
"body-parser": "^2.2.0",
2525
"lodash": "^4.17.21",
26-
"ramda": "^0.27.1",
26+
"ramda": "^0.30.1",
2727
"screepsmod-admin-utils-ui": "^0.4.0",
2828
"yamljs": "^0.3.0"
2929
},
3030
"peerDependencies": {
3131
"@screeps/backend": ">=3.2.3"
32+
},
33+
"standard": {
34+
"ignore": [
35+
"ui"
36+
]
3237
}
3338
}

0 commit comments

Comments
 (0)