mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 01:29:09 +00:00
feat(api): add /sync-from-legacy route (#192)
* feat(api): add /sync-from-legacy route * chore: remove extraneous dockerfile * chore: remove extraneous dockerfile build * chore: remove extraneous dockerfile build matrix
This commit is contained in:
parent
a983492154
commit
bfc96b0750
13 changed files with 209 additions and 6 deletions
5
packages/backend-emulator/main.js
Normal file → Executable file
5
packages/backend-emulator/main.js
Normal file → Executable file
|
@ -1,3 +1,4 @@
|
|||
#!/usr/bin/env node
|
||||
const path = require('path');
|
||||
require('dotenv').config({ path: path.resolve(__dirname, '../../.env') });
|
||||
const vm = require('vm');
|
||||
|
@ -11,7 +12,7 @@ const crypto = new Crypto();
|
|||
const fetch = require('node-fetch');
|
||||
const args = require('minimist')(process.argv.slice(2));
|
||||
|
||||
const basePath = args.basePath;
|
||||
const basePath = args.basePath || process.cwd();
|
||||
if (!basePath) {
|
||||
throw new Error('--basePath is not set.');
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ const rebuild = () =>
|
|||
|
||||
const watcher = chokidar.watch(path.resolve(__dirname, basePath), {
|
||||
ignoreInitial: true,
|
||||
ignore: '**/dist',
|
||||
ignore: '**/{dist,node_modules}',
|
||||
});
|
||||
|
||||
watcher.on('all', async (type, path) => {
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
{
|
||||
"name": "@roleypoly/worker-emulator",
|
||||
"version": "0.1.0",
|
||||
"bin": {
|
||||
"cfw-emulator": "./main.js"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "node main.js --build",
|
||||
"start": "node main.js"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue