mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-17 17:36:08 +08:00
ui: update graphiql
This commit is contained in:
1 parent
bebeb1b201
commit
c4dced87ff
12 files changed
+41
-298
No files matched your search
+6
-2
@@ -4,6 +4,8 @@
|
||||
import { execSync, ExecSyncOptions } from 'child_process';
|
||||
import { existsSync, readFileSync, writeFileSync } from 'fs';
|
||||
import net from 'net';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
|
||||
const exec = (command: string, args?: ExecSyncOptions) => {
|
||||
try {
|
||||
@@ -217,6 +219,8 @@ function rollbackResolveField() {
|
||||
return true;
|
||||
}
|
||||
|
||||
const tmpFile = path.join(os.tmpdir(), `${Math.random().toString()}.js`);
|
||||
|
||||
const Steps = () => [
|
||||
{
|
||||
init: 'install.preparing',
|
||||
@@ -315,12 +319,12 @@ connect-timeout = 10`);
|
||||
operations: [
|
||||
'pm2 start mongod',
|
||||
() => sleep(3000),
|
||||
() => writeFileSync('/tmp/createUser.js', `db.createUser(${JSON.stringify({
|
||||
() => writeFileSync(tmpFile, `db.createUser(${JSON.stringify({
|
||||
user: 'hydro',
|
||||
pwd: password,
|
||||
roles: [{ role: 'readWrite', db: 'hydro' }],
|
||||
})})`),
|
||||
['mongo 127.0.0.1:27017/hydro /tmp/createUser.js', { retry: true }],
|
||||
[`mongo 127.0.0.1:27017/hydro ${tmpFile}`, { retry: true }],
|
||||
() => writeFileSync(`${process.env.HOME}/.hydro/config.json`, JSON.stringify({
|
||||
host: '127.0.0.1',
|
||||
port: 27017,
|
||||
|
||||
Reference in new issue
Block a user