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