dist/
# FIXME: ESM import parse error
-build-requirements.mjs
+build-requirements.js
# Build simulator
WORKDIR /usr/builder
-COPY .npmrc package.json pnpm-lock.yaml tsconfig.json rollup.config.mjs build-requirements.mjs skip-preinstall.cjs prepare.cjs ./
+COPY .npmrc package.json pnpm-lock.yaml tsconfig.json rollup.config.js build-requirements.js skip-preinstall.js prepare.js ./
COPY src ./src
COPY docker/config.json ./src/assets/config.json
COPY docker/idtags.json ./src/assets/idtags.json
"useTsNode": true
},
"scripts": {
- "preinstall": "node skip-preinstall.cjs || npx --yes only-allow pnpm",
- "prepare": "node prepare.cjs",
- "build-requirements": "node --no-warnings build-requirements.mjs",
+ "preinstall": "node skip-preinstall.js || npx --yes only-allow pnpm",
+ "prepare": "node prepare.js",
+ "build-requirements": "node --no-warnings build-requirements.js",
"start": "pnpm build && cross-env NODE_ENV=production node dist/start.js",
"start:dev": "pnpm build:dev && cross-env NODE_ENV=development node -r source-map-support/register dist/start.js",
"start:dev:debug": "pnpm build:dev && cross-env NODE_ENV=development node -r source-map-support/register --inspect dist/start.js",
-const { env } = require('node:process');
+import { env } from 'node:process';
+
+// eslint-disable-next-line n/no-unpublished-import
+import { install } from 'husky';
const isCIEnvironment = env.CI !== undefined;
const isCFEnvironment = env.VCAP_APPLICATION !== undefined;
if (isCFEnvironment === false && isCIEnvironment === false) {
- // eslint-disable-next-line n/no-unpublished-require
- require('husky').install();
+ install();
}
-const { env, exit } = require('node:process');
+import { env, exit } from 'node:process';
const skipPreinstall = env.SKIP_PREINSTALL || env.VCAP_APPLICATION !== undefined;
if (skipPreinstall) {