fix: type as module
This commit is contained in:
parent
2d8c26f156
commit
234530ed60
|
@ -2,7 +2,8 @@
|
|||
"name": "piston-api",
|
||||
"version": "3.2.0",
|
||||
"description": "API for piston - a high performance code execution engine",
|
||||
"main": "src/index.js",
|
||||
"module": "src/index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"run": "node src/index.js"
|
||||
},
|
||||
|
|
|
@ -3,8 +3,8 @@ import { Router } from 'express';
|
|||
import { EventEmitter } from 'events';
|
||||
|
||||
import { get_latest_runtime_matching_language_version, runtimes as _runtimes } from '../runtime';
|
||||
import Job from '../job';
|
||||
import package_ from '../package';
|
||||
import Job from '../job.js';
|
||||
import package_ from '../package.js';
|
||||
import { create } from 'logplease'
|
||||
|
||||
const logger = create('api/v2', {});
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
import { create, setLogLevel } from 'logplease';
|
||||
import express from 'express';
|
||||
import expressWs from 'express-ws';
|
||||
import * as globals from './globals';
|
||||
import config from './config';
|
||||
import * as globals from './globals.js';
|
||||
import config from './config.js';
|
||||
import { join } from 'path';
|
||||
import { readdir } from 'fs/promises';
|
||||
import { existsSync, mkdirSync, chmodSync } from 'fs';
|
||||
import { urlencoded, json } from 'body-parser';
|
||||
import { load_package } from './runtime';
|
||||
import { load_package } from './runtime.js';
|
||||
|
||||
const logger = create('index', {});
|
||||
const app = express();
|
||||
|
|
|
@ -4,8 +4,8 @@ const logger = create('job');
|
|||
import { v4 as uuidv4 } from 'uuid';
|
||||
import { spawn } from 'child_process';
|
||||
import { join, relative, dirname } from 'path';
|
||||
import config from './config';
|
||||
import * as globals from './globals';
|
||||
import config from './config.js';
|
||||
import * as globals from './globals.js';
|
||||
import { mkdir, chown, writeFile, readdir, stat as _stat, rm } from 'fs/promises';
|
||||
import { readdirSync, readFileSync } from 'fs';
|
||||
import wait_pid from 'waitpid';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { create } from 'logplease';
|
||||
import { parse, satisfies, rcompare } from 'semver';
|
||||
import config from './config';
|
||||
import { platform } from './globals';
|
||||
import config from './config.js';
|
||||
import { platform } from './globals.js';
|
||||
import { readFileSync, existsSync } from 'fs';
|
||||
import { join } from 'path';
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"checkJs": true,
|
||||
"resolveJsonModule": true,
|
||||
"target": "ES2022",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "nodenext",
|
||||
"allowSyntheticDefaultImports": true,
|
||||
// we dont have any thing to compile just yet
|
||||
"noEmit": true
|
||||
|
|
Loading…
Reference in New Issue