Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ on: [push]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Build and Test
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20
cache: yarn
- name: yarn
run: |
yarn
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,30 @@
},
"scripts": {
"cli": "node bin/index.js",
"lint": "ts-standard src rollup.config.js --fix",
"build": "rollup -c",
"lint": "ts-standard src rollup.config.mjs --fix",
"build": "rollup -c rollup.config.mjs",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also add "type": "module" in package.json

"prepublish": "yarn lint && yarn build"
},
"dependencies": {
"archiver": "^5.3.0",
"form-data": "^4.0.0",
"open": "^8.2.1",
"yargs": "^17.1.1"
"archiver": "^7.0.1",
"form-data": "^4.0.5",
"open": "^11.0.0",
"yargs": "^18.0.0"
},
"devDependencies": {
"@babel/core": "^7.15.0",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@types/archiver": "^5.1.1",
"@types/yargs": "^17.0.2",
"rollup": "^2.56.2",
"rollup-plugin-typescript2": "^0.35.0",
"ts-standard": "^10.0.0",
"tslib": "^2.5.3",
"typescript": "^4.4.2"
"@babel/core": "^7.29.0",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@types/archiver": "^7.0.0",
"@types/yargs": "^17.0.35",
"rollup": "^4.59.0",
"rollup-plugin-typescript2": "^0.36.0",
"ts-standard": "^12.0.2",
"tslib": "^2.8.1",
"typescript": "^5.9.3"
},
"engines": {
"node": ">=12"
"node": ">=20"
}
}
File renamed without changes.
2 changes: 1 addition & 1 deletion src/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export async function auth (force = false): Promise<Config> {
return await new Promise<Config>((resolve, reject) => {
const configDir = getConfigDir()
const configPath = join(configDir, 'auth.json')
let config: Config|undefined
let config: Config | undefined

if (!force) {
try {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { createZip } from './zipfile'
import { postToP4D } from './p4d'
import { Config } from './config'

async function upload (gameId: string, buildDir: string, filename: string, name: string, notes: string|undefined, makePublic: boolean, disableImageCompression: boolean): Promise<void> {
async function upload (gameId: string, buildDir: string, filename: string, name: string, notes: string | undefined, makePublic: boolean, disableImageCompression: boolean): Promise<void> {
await createZip(filename, buildDir)

const notesWithPostfix = ((notes ?? '') + '\n\nUploaded using poki-cli').trim()
Expand Down
4 changes: 2 additions & 2 deletions src/p4d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Response {
data: string
}

async function doit (gameId: string, filename: string, name: string, notes: string|undefined, makePublic: boolean, disableImageCompression: boolean, config: Config): Promise<Response> {
async function doit (gameId: string, filename: string, name: string, notes: string | undefined, makePublic: boolean, disableImageCompression: boolean, config: Config): Promise<Response> {
return await new Promise<Response>((resolve, reject) => {
if (config.access_token === undefined) {
return reject(new Error('No access token found'))
Expand Down Expand Up @@ -84,7 +84,7 @@ interface P4dData {
id: number
}

export async function postToP4D (gameId: string, filename: string, name: string, notes: string|undefined, makePublic: boolean, disableImageCompression: boolean): Promise<P4dData> {
export async function postToP4D (gameId: string, filename: string, name: string, notes: string | undefined, makePublic: boolean, disableImageCompression: boolean): Promise<P4dData> {
let config = await auth()
let response = await doit(gameId, filename, name, notes, makePublic, disableImageCompression, config)

Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"compilerOptions": {
"strict": true,
"esModuleInterop": true
"esModuleInterop": true,
"moduleResolution": "node",
"skipLibCheck": true
}
}
Loading