mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Faster builds all around.
Summary: Building: - Builds no longer wait for tsc for either client, server, or test targets. All use esbuild which is very fast. - Build still runs tsc, but only to report errors. This may be turned off with `SKIP_TSC=1` env var. - Grist-core continues to build using tsc. - Esbuild requires ES6 module semantics. Typescript's esModuleInterop is turned on, so that tsc accepts and enforces correct usage. - Client-side code is watched and bundled by webpack as before (using esbuild-loader) Code changes: - Imports must now follow ES6 semantics: `import * as X from ...` produces a module object; to import functions or class instances, use `import X from ...`. - Everything is now built with isolatedModules flag. Some exports were updated for it. Packages: - Upgraded browserify dependency, and related packages (used for the distribution-building step). - Building the distribution now uses esbuild's minification. babel-minify is no longer used. Test Plan: Should have no behavior changes, existing tests should pass, and docker image should build too. Reviewers: georgegevoian Reviewed By: georgegevoian Subscribers: alexmojaki Differential Revision: https://phab.getgrist.com/D3506
This commit is contained in:
4
app/server/declarations.d.ts
vendored
4
app/server/declarations.d.ts
vendored
@@ -41,8 +41,8 @@ declare module "app-module-path" {
|
||||
|
||||
// version of pidusage that has correct ctime on linux
|
||||
declare module '@gristlabs/pidusage' {
|
||||
import * as pidusage from 'pidusage';
|
||||
export = pidusage;
|
||||
import pidusage from 'pidusage';
|
||||
export default pidusage;
|
||||
}
|
||||
|
||||
declare module "csv";
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
import {updateDb} from 'app/server/lib/dbUtils';
|
||||
import {FlexServer} from 'app/server/lib/FlexServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {main as mergedServerMain} from 'app/server/mergedServerMain';
|
||||
import {promisifyAll} from 'bluebird';
|
||||
import * as fse from 'fs-extra';
|
||||
|
||||
@@ -74,23 +74,23 @@ import {ICreateActiveDocOptions} from 'app/server/lib/ICreate';
|
||||
import {makeForkIds} from 'app/server/lib/idUtils';
|
||||
import {GRIST_DOC_SQL, GRIST_DOC_WITH_TABLE1_SQL} from 'app/server/lib/initialDocSql';
|
||||
import {ISandbox} from 'app/server/lib/ISandbox';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {LogMethods} from "app/server/lib/LogMethods";
|
||||
import {DocRequests} from 'app/server/lib/Requests';
|
||||
import {shortDesc} from 'app/server/lib/shortDesc';
|
||||
import {TableMetadataLoader} from 'app/server/lib/TableMetadataLoader';
|
||||
import {DocTriggers} from "app/server/lib/Triggers";
|
||||
import {fetchURL, FileUploadInfo, globalUploadSet, UploadInfo} from 'app/server/lib/uploads';
|
||||
import * as assert from 'assert';
|
||||
import assert from 'assert';
|
||||
import {Mutex} from 'async-mutex';
|
||||
import * as bluebird from 'bluebird';
|
||||
import {EventEmitter} from 'events';
|
||||
import {IMessage, MsgType} from 'grain-rpc';
|
||||
import * as imageSize from 'image-size';
|
||||
import imageSize from 'image-size';
|
||||
import * as moment from 'moment-timezone';
|
||||
import fetch from 'node-fetch';
|
||||
import {createClient, RedisClient} from 'redis';
|
||||
import * as tmp from 'tmp';
|
||||
import tmp from 'tmp';
|
||||
|
||||
import {ActionHistory} from './ActionHistory';
|
||||
import {ActionHistoryImpl} from './ActionHistoryImpl';
|
||||
|
||||
@@ -17,7 +17,7 @@ import {ParseFileResult, ParseOptions} from 'app/plugin/FileParserAPI';
|
||||
import {GristColumn, GristTable} from 'app/plugin/GristTable';
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {DocSession, OptDocSession} from 'app/server/lib/DocSession';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {globalUploadSet, moveUpload, UploadInfo} from 'app/server/lib/uploads';
|
||||
import {buildComparisonQuery} from 'app/server/lib/ExpandedQuery';
|
||||
import flatten = require('lodash/flatten');
|
||||
|
||||
@@ -19,7 +19,7 @@ import {DocStatus, IDocWorkerMap} from 'app/server/lib/DocWorkerMap';
|
||||
import {expressWrap} from 'app/server/lib/expressWrap';
|
||||
import {DocTemplate, GristServer} from 'app/server/lib/GristServer';
|
||||
import {getAssignmentId} from 'app/server/lib/idUtils';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {adaptServerUrl, addOrgToPathIfNeeded, pruneAPIResult, trustOrigin} from 'app/server/lib/requestUtils';
|
||||
import {ISendAppPageOptions} from 'app/server/lib/sendAppPage';
|
||||
|
||||
|
||||
@@ -14,13 +14,13 @@ import {RequestWithOrg} from 'app/server/lib/extractOrg';
|
||||
import {COOKIE_MAX_AGE, getAllowedOrgForSessionID, getCookieDomain,
|
||||
cookieName as sessionCookieName} from 'app/server/lib/gristSessions';
|
||||
import {makeId} from 'app/server/lib/idUtils';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {IPermitStore, Permit} from 'app/server/lib/Permit';
|
||||
import {allowHost, getOriginUrl, optStringParam} from 'app/server/lib/requestUtils';
|
||||
import * as cookie from 'cookie';
|
||||
import {NextFunction, Request, RequestHandler, Response} from 'express';
|
||||
import {IncomingMessage} from 'http';
|
||||
import * as onHeaders from 'on-headers';
|
||||
import onHeaders from 'on-headers';
|
||||
|
||||
export interface RequestWithLogin extends Request {
|
||||
sessionID: string;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {normalizeEmail} from 'app/common/emails';
|
||||
import {UserProfile} from 'app/common/LoginSessionAPI';
|
||||
import {SessionStore} from 'app/server/lib/gristSessions';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
import {Request} from 'express';
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ import {Authorizer} from 'app/server/lib/Authorizer';
|
||||
import {ScopedSession} from 'app/server/lib/BrowserSession';
|
||||
import type {Comm} from 'app/server/lib/Comm';
|
||||
import {DocSession} from 'app/server/lib/DocSession';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {LogMethods} from "app/server/lib/LogMethods";
|
||||
import {shortDesc} from 'app/server/lib/shortDesc';
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
import * as crypto from 'crypto';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment';
|
||||
import * as WebSocket from 'ws';
|
||||
|
||||
/// How many messages to accumulate for a disconnected client before booting it.
|
||||
|
||||
@@ -47,7 +47,7 @@ import {ScopedSession} from "app/server/lib/BrowserSession";
|
||||
import {Client, ClientMethod} from "app/server/lib/Client";
|
||||
import {Hosts, RequestWithOrg} from 'app/server/lib/extractOrg';
|
||||
import {GristLoginMiddleware} from 'app/server/lib/GristServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {localeFromRequest} from 'app/server/lib/ServerLocale';
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
import {Sessions} from 'app/server/lib/Sessions';
|
||||
|
||||
@@ -58,16 +58,16 @@ import {localeFromRequest} from "app/server/lib/ServerLocale";
|
||||
import {allowedEventTypes, isUrlAllowed, WebhookAction, WebHookSecret} from "app/server/lib/Triggers";
|
||||
import {handleOptionalUpload, handleUpload} from "app/server/lib/uploads";
|
||||
import * as assert from 'assert';
|
||||
import * as contentDisposition from 'content-disposition';
|
||||
import contentDisposition from 'content-disposition';
|
||||
import {Application, NextFunction, Request, RequestHandler, Response} from "express";
|
||||
import * as _ from "lodash";
|
||||
import * as LRUCache from 'lru-cache';
|
||||
import LRUCache from 'lru-cache';
|
||||
import * as moment from 'moment';
|
||||
import fetch from 'node-fetch';
|
||||
import * as path from 'path';
|
||||
import * as t from "ts-interface-checker";
|
||||
import {Checker} from "ts-interface-checker";
|
||||
import * as uuidv4 from "uuid/v4";
|
||||
import uuidv4 from "uuid/v4";
|
||||
|
||||
// Cap on the number of requests that can be outstanding on a single document via the
|
||||
// rest doc api. When this limit is exceeded, incoming requests receive an immediate
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as pidusage from '@gristlabs/pidusage';
|
||||
import pidusage from '@gristlabs/pidusage';
|
||||
import {Document} from 'app/gen-server/entity/Document';
|
||||
import {getScope} from 'app/server/lib/requestUtils';
|
||||
import * as bluebird from 'bluebird';
|
||||
@@ -27,7 +27,7 @@ import {GristServer} from 'app/server/lib/GristServer';
|
||||
import {IDocStorageManager} from 'app/server/lib/IDocStorageManager';
|
||||
import {makeForkIds, makeId} from 'app/server/lib/idUtils';
|
||||
import {checkAllegedGristDoc} from 'app/server/lib/serverUtils';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {ActiveDoc} from './ActiveDoc';
|
||||
import {PluginManager} from './PluginManager';
|
||||
import {getFileUploadInfo, globalUploadSet, makeAccessId, UploadInfo} from './uploads';
|
||||
|
||||
@@ -13,13 +13,13 @@ import { DocPluginData } from 'app/server/lib/DocPluginData';
|
||||
import { makeExceptionalDocSession } from 'app/server/lib/DocSession';
|
||||
import { FileParserElement } from 'app/server/lib/FileParserElement';
|
||||
import { GristServer } from 'app/server/lib/GristServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { SafePythonComponent } from 'app/server/lib/SafePythonComponent';
|
||||
import { UnsafeNodeComponent } from 'app/server/lib/UnsafeNodeComponent';
|
||||
import { promisifyAll } from 'bluebird';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import * as tmp from 'tmp';
|
||||
import tmp from 'tmp';
|
||||
|
||||
|
||||
promisifyAll(tmp);
|
||||
|
||||
@@ -3,7 +3,7 @@ import {SnapshotWindow} from 'app/common/Features';
|
||||
import {KeyedMutex} from 'app/common/KeyedMutex';
|
||||
import {KeyedOps} from 'app/common/KeyedOps';
|
||||
import {ExternalStorage} from 'app/server/lib/ExternalStorage';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as moment from 'moment-timezone';
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ import {GristObjCode} from "app/plugin/GristData";
|
||||
import {ActionHistoryImpl} from 'app/server/lib/ActionHistoryImpl';
|
||||
import {ExpandedQuery} from 'app/server/lib/ExpandedQuery';
|
||||
import {IDocStorageManager} from 'app/server/lib/IDocStorageManager';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import * as assert from 'assert';
|
||||
import log from 'app/server/lib/log';
|
||||
import assert from 'assert';
|
||||
import * as bluebird from 'bluebird';
|
||||
import * as fse from 'fs-extra';
|
||||
import {RunResult} from 'sqlite3';
|
||||
import * as _ from 'underscore';
|
||||
import * as util from 'util';
|
||||
import * as uuidv4 from "uuid/v4";
|
||||
import uuidv4 from "uuid/v4";
|
||||
import {OnDemandStorage} from './OnDemandActions';
|
||||
import {ISQLiteDB, MigrationHooks, OpenMode, quoteIdent, ResultRow, SchemaInfo, SQLiteDB} from './SQLiteDB';
|
||||
import chunk = require('lodash/chunk');
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import * as bluebird from 'bluebird';
|
||||
import * as chokidar from 'chokidar';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as moment from 'moment';
|
||||
import moment from 'moment';
|
||||
import * as path from 'path';
|
||||
|
||||
import {DocEntry, DocEntryTag} from 'app/common/DocListAPI';
|
||||
@@ -13,8 +13,8 @@ import * as docUtils from 'app/server/lib/docUtils';
|
||||
import {GristServer} from 'app/server/lib/GristServer';
|
||||
import {IDocStorageManager} from 'app/server/lib/IDocStorageManager';
|
||||
import {IShell} from 'app/server/lib/IShell';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import * as uuidv4 from "uuid/v4";
|
||||
import log from 'app/server/lib/log';
|
||||
import uuidv4 from "uuid/v4";
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,10 +10,10 @@ import {Comm} from 'app/server/lib/Comm';
|
||||
import {DocSession, docSessionFromRequest} from 'app/server/lib/DocSession';
|
||||
import {filterDocumentInPlace} from 'app/server/lib/filterUtils';
|
||||
import {IDocStorageManager} from 'app/server/lib/IDocStorageManager';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {getDocId, integerParam, optStringParam, stringParam} from 'app/server/lib/requestUtils';
|
||||
import {OpenMode, quoteIdent, SQLiteDB} from 'app/server/lib/SQLiteDB';
|
||||
import * as contentDisposition from 'content-disposition';
|
||||
import contentDisposition from 'content-disposition';
|
||||
import * as express from 'express';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as mimeTypes from 'mime-types';
|
||||
|
||||
@@ -6,7 +6,7 @@ import {FormatOptions, formatUnknown, IsRightTypeFunc} from 'app/common/ValueFor
|
||||
import {GristType} from 'app/plugin/GristData';
|
||||
import {decodeObject} from 'app/plugin/objtypes';
|
||||
import {Style} from 'exceljs';
|
||||
import * as moment from 'moment-timezone';
|
||||
import moment from 'moment-timezone';
|
||||
|
||||
interface WidgetOptions extends NumberFormatOptions {
|
||||
textColor?: 'string';
|
||||
|
||||
@@ -2,10 +2,10 @@ import {ApiError} from 'app/common/ApiError';
|
||||
import {createFormatter} from 'app/common/ValueFormatter';
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {ExportData, exportSection, exportTable, Filter} from 'app/server/lib/Export';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import * as bluebird from 'bluebird';
|
||||
import * as contentDisposition from 'content-disposition';
|
||||
import * as csv from 'csv';
|
||||
import contentDisposition from 'content-disposition';
|
||||
import csv from 'csv';
|
||||
import * as express from 'express';
|
||||
|
||||
export interface DownloadCSVOptions {
|
||||
|
||||
@@ -3,8 +3,8 @@ import {createExcelFormatter} from 'app/server/lib/ExcelFormatter';
|
||||
import {ExportData, exportDoc} from 'app/server/lib/Export';
|
||||
import {Alignment, Border, Fill, Workbook} from 'exceljs';
|
||||
import * as express from 'express';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import * as contentDisposition from 'content-disposition';
|
||||
import log from 'app/server/lib/log';
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
export interface DownloadXLSXOptions {
|
||||
filename: string;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {ObjMetadata, ObjSnapshot, ObjSnapshotWithMetadata} from 'app/common/DocSnapshot';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {createTmpDir} from 'app/server/lib/uploads';
|
||||
import {delay} from 'bluebird';
|
||||
import * as fse from 'fs-extra';
|
||||
|
||||
@@ -39,7 +39,7 @@ import {HostedStorageManager} from 'app/server/lib/HostedStorageManager';
|
||||
import {IBilling} from 'app/server/lib/IBilling';
|
||||
import {IDocStorageManager} from 'app/server/lib/IDocStorageManager';
|
||||
import {INotifier} from 'app/server/lib/INotifier';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {getLoginSystem} from 'app/server/lib/logins';
|
||||
import {IPermitStore} from 'app/server/lib/Permit';
|
||||
import {getAppPathTo, getAppRoot, getUnpackedAppRoot} from 'app/server/lib/places';
|
||||
@@ -59,12 +59,12 @@ import {addUploadRoute} from 'app/server/lib/uploads';
|
||||
import {buildWidgetRepository, IWidgetRepository} from 'app/server/lib/WidgetRepository';
|
||||
import axios from 'axios';
|
||||
import * as bodyParser from 'body-parser';
|
||||
import * as express from 'express';
|
||||
import express from 'express';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as http from 'http';
|
||||
import * as https from 'https';
|
||||
import mapValues = require('lodash/mapValues');
|
||||
import * as morganLogger from 'morgan';
|
||||
import morganLogger from 'morgan';
|
||||
import {AddressInfo} from 'net';
|
||||
import fetch from 'node-fetch';
|
||||
import * as path from 'path';
|
||||
|
||||
@@ -2,7 +2,7 @@ import {auth} from '@googleapis/oauth2';
|
||||
import {ApiError} from 'app/common/ApiError';
|
||||
import {parseSubdomain} from 'app/common/gristUrls';
|
||||
import {expressWrap} from 'app/server/lib/expressWrap';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {getOriginUrl, optStringParam, stringParam} from 'app/server/lib/requestUtils';
|
||||
import * as express from 'express';
|
||||
import {URL} from 'url';
|
||||
|
||||
@@ -2,7 +2,7 @@ import {drive} from '@googleapis/drive';
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {RequestWithLogin} from 'app/server/lib/Authorizer';
|
||||
import {makeXLSX} from 'app/server/lib/ExportXLSX';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {optStringParam} from 'app/server/lib/requestUtils';
|
||||
import {Request, Response} from 'express';
|
||||
import {PassThrough} from 'stream';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {Readable} from 'form-data';
|
||||
import {GaxiosError, GaxiosPromise} from 'gaxios';
|
||||
import {FetchError, Response as FetchResponse, Headers} from 'node-fetch';
|
||||
import {getGoogleAuth} from "app/server/lib/GoogleAuth";
|
||||
import * as contentDisposition from 'content-disposition';
|
||||
import contentDisposition from 'content-disposition';
|
||||
|
||||
const
|
||||
SPREADSHEETS_MIMETYPE = 'application/vnd.google-apps.spreadsheet',
|
||||
|
||||
@@ -31,7 +31,7 @@ import { compileAclFormula } from 'app/server/lib/ACLFormula';
|
||||
import { DocClients } from 'app/server/lib/DocClients';
|
||||
import { getDocSessionAccess, getDocSessionAltSessionId, getDocSessionUser,
|
||||
OptDocSession } from 'app/server/lib/DocSession';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { IPermissionInfo, PermissionInfo, PermissionSetWithContext } from 'app/server/lib/PermissionInfo';
|
||||
import { TablePermissionSetWithContext } from 'app/server/lib/PermissionInfo';
|
||||
import { integerParam } from 'app/server/lib/requestUtils';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {DocumentMetadata, HomeDBManager} from 'app/gen-server/lib/HomeDBManager';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
/**
|
||||
* HostedMetadataManager handles pushing document metadata changes to the Home database when
|
||||
|
||||
@@ -19,7 +19,7 @@ import {LogMethods} from "app/server/lib/LogMethods";
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
import * as fse from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import * as uuidv4 from "uuid/v4";
|
||||
import uuidv4 from "uuid/v4";
|
||||
import { OpenMode, SQLiteDB } from './SQLiteDB';
|
||||
|
||||
// Check for a valid document id.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {ISandboxOptions} from 'app/server/lib/NSandbox';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
export type ILogMeta = log.ILogMeta;
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import {arrayToString} from 'app/common/arrayToString';
|
||||
import * as marshal from 'app/common/marshal';
|
||||
import {ISandbox, ISandboxCreationOptions, ISandboxCreator} from 'app/server/lib/ISandbox';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {DirectProcessControl, ISandboxControl, NoProcessControl, ProcessInfo,
|
||||
SubprocessControl} from 'app/server/lib/SandboxControl';
|
||||
import * as sandboxUtil from 'app/server/lib/sandboxUtil';
|
||||
|
||||
@@ -5,7 +5,7 @@ import { ALL_PERMISSION_PROPS, emptyPermissionSet,
|
||||
import { ACLRuleCollection } from 'app/common/ACLRuleCollection';
|
||||
import { AclMatchInput, RuleSet, UserInfo } from 'app/common/GranularAccessClause';
|
||||
import { getSetMapValue } from 'app/common/gutil';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { mapValues } from 'lodash';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {FlexServer} from 'app/server/lib/FlexServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {PluginManager} from 'app/server/lib/PluginManager';
|
||||
import * as express from 'express';
|
||||
import * as mimeTypes from 'mime-types';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {DirectoryScanEntry, LocalPlugin} from 'app/common/plugin';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {readManifest} from 'app/server/lib/manifest';
|
||||
import {getAppPathTo} from 'app/server/lib/places';
|
||||
import * as fse from 'fs-extra';
|
||||
|
||||
@@ -11,7 +11,7 @@ import chunk = require('lodash/chunk');
|
||||
import fromPairs = require('lodash/fromPairs');
|
||||
import zipObject = require('lodash/zipObject');
|
||||
import * as fse from 'fs-extra';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
export class DocRequests {
|
||||
// Request responses are briefly cached in files only to handle multiple requests in a formula
|
||||
|
||||
@@ -70,11 +70,11 @@
|
||||
import {ErrorWithCode} from 'app/common/ErrorWithCode';
|
||||
import {timeFormat} from 'app/common/timeFormat';
|
||||
import * as docUtils from 'app/server/lib/docUtils';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
|
||||
import * as sqlite3 from '@gristlabs/sqlite3';
|
||||
import * as assert from 'assert';
|
||||
import assert from 'assert';
|
||||
import {each} from 'bluebird';
|
||||
import * as fse from 'fs-extra';
|
||||
import {RunResult} from 'sqlite3';
|
||||
|
||||
@@ -2,7 +2,7 @@ import {LocalPlugin} from 'app/common/plugin';
|
||||
import {BaseComponent, createRpcLogger} from 'app/common/PluginInstance';
|
||||
import {GristServer} from 'app/server/lib/GristServer';
|
||||
import {ISandbox} from 'app/server/lib/ISandbox';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {IMsgCustom, IMsgRpcCall} from 'grain-rpc';
|
||||
|
||||
// TODO safePython component should be able to call other components function
|
||||
|
||||
@@ -59,7 +59,7 @@ import * as saml2 from 'saml2-js';
|
||||
|
||||
import {expressWrap} from 'app/server/lib/expressWrap';
|
||||
import {GristLoginSystem, GristServer} from 'app/server/lib/GristServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {Permit} from 'app/server/lib/Permit';
|
||||
import {getOriginUrl} from 'app/server/lib/requestUtils';
|
||||
import {fromCallback} from 'app/server/lib/serverUtils';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { delay } from 'app/common/delay';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { Throttle } from 'app/server/lib/Throttle';
|
||||
|
||||
import * as pidusage from '@gristlabs/pidusage';
|
||||
import pidusage from '@gristlabs/pidusage';
|
||||
import * as childProcess from 'child_process';
|
||||
import * as util from 'util';
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@ import {
|
||||
} from 'app/common/ActionBundle';
|
||||
import {CALCULATING_USER_ACTIONS, DocAction, getNumRows, UserAction} from 'app/common/DocActions';
|
||||
import {allToken} from 'app/common/sharing';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {LogMethods} from "app/server/lib/LogMethods";
|
||||
import {shortDesc} from 'app/server/lib/shortDesc';
|
||||
import * as assert from 'assert';
|
||||
import assert from 'assert';
|
||||
import {Mutex} from 'async-mutex';
|
||||
import * as Deque from 'double-ended-queue';
|
||||
import Deque from 'double-ended-queue';
|
||||
import {ActionHistory, asActionGroup, getActionUndoInfo} from './ActionHistory';
|
||||
import {ActiveDoc} from './ActiveDoc';
|
||||
import {makeExceptionalDocSession, OptDocSession} from './DocSession';
|
||||
|
||||
@@ -5,7 +5,7 @@ import {Deps as ActiveDocDeps} from 'app/server/lib/ActiveDoc';
|
||||
import {Deps as DiscourseConnectDeps} from 'app/server/lib/DiscourseConnect';
|
||||
import {Deps as CommClientDeps} from 'app/server/lib/Client';
|
||||
import {Comm} from 'app/server/lib/Comm';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {IMessage, Rpc} from 'grain-rpc';
|
||||
import {Request} from 'express';
|
||||
import * as t from 'ts-interface-checker';
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
import * as pidusage from '@gristlabs/pidusage';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import pidusage from '@gristlabs/pidusage';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
/**
|
||||
* Parameters related to throttling.
|
||||
|
||||
@@ -9,7 +9,7 @@ import {CellDelta} from 'app/common/TabularDiff';
|
||||
import {summarizeAction} from 'app/server/lib/ActionSummary';
|
||||
import {ActiveDoc} from 'app/server/lib/ActiveDoc';
|
||||
import {makeExceptionalDocSession} from 'app/server/lib/DocSession';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {promisifyAll} from 'bluebird';
|
||||
import * as _ from 'lodash';
|
||||
import fetch from 'node-fetch';
|
||||
|
||||
@@ -2,7 +2,7 @@ import { ActionRouter } from 'app/common/ActionRouter';
|
||||
import { LocalPlugin } from 'app/common/plugin';
|
||||
import { BaseComponent, createRpcLogger, warnIfNotReady } from 'app/common/PluginInstance';
|
||||
import { GristAPI, RPC_GRISTAPI_INTERFACE } from 'app/plugin/GristAPI';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { getAppPathTo } from 'app/server/lib/places';
|
||||
import { makeLinePrefixer } from 'app/server/lib/sandboxUtil';
|
||||
import { exitPromise, timeoutReached } from 'app/server/lib/serverUtils';
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import {ICustomWidget} from 'app/common/CustomWidget';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import fetch from 'node-fetch';
|
||||
import {ApiError} from 'app/common/ApiError';
|
||||
import * as LRUCache from 'lru-cache';
|
||||
import LRUCache from 'lru-cache';
|
||||
|
||||
/**
|
||||
* Widget Repository returns list of available Custom Widgets.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
/**
|
||||
* WorkCoordinator is a helper to do work serially. It takes a doWork() callback which may either
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {RequestWithLogin} from 'app/server/lib/Authorizer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import * as express from 'express';
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as session from '@gristlabs/express-session';
|
||||
import session from '@gristlabs/express-session';
|
||||
import {parseSubdomain} from 'app/common/gristUrls';
|
||||
import {isNumber} from 'app/common/gutil';
|
||||
import {RequestWithOrg} from 'app/server/lib/extractOrg';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
export function reportTimeTaken<T>(locationLabel: string, callback: () => T): T {
|
||||
const start = Date.now();
|
||||
|
||||
@@ -5,7 +5,7 @@ import {DocScope, QueryResult, Scope} from 'app/gen-server/lib/HomeDBManager';
|
||||
import {getUserId, RequestWithLogin} from 'app/server/lib/Authorizer';
|
||||
import {RequestWithOrg} from 'app/server/lib/extractOrg';
|
||||
import {RequestWithGrist} from 'app/server/lib/GristServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {Permit} from 'app/server/lib/Permit';
|
||||
import {Request, Response} from 'express';
|
||||
import {URL} from 'url';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Various utilities and constants for communicating with the python sandbox.
|
||||
*/
|
||||
import * as MemBuffer from 'app/common/MemBuffer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import * as bluebird from 'bluebird';
|
||||
import bluebird from 'bluebird';
|
||||
import { ChildProcess } from 'child_process';
|
||||
import * as net from 'net';
|
||||
import * as path from 'path';
|
||||
import { ConnectionOptions } from 'typeorm';
|
||||
import * as uuidv4 from 'uuid/v4';
|
||||
import uuidv4 from 'uuid/v4';
|
||||
|
||||
import {EngineCode} from 'app/common/DocumentSettings';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import { OpenMode, SQLiteDB } from 'app/server/lib/SQLiteDB';
|
||||
import { getDocSessionAccessOrNull, getDocSessionUser, OptDocSession } from './DocSession';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {expressWrap} from 'app/server/lib/expressWrap';
|
||||
import {downloadFromGDrive, isDriveUrl} from 'app/server/lib/GoogleImport';
|
||||
import {GristServer, RequestWithGrist} from 'app/server/lib/GristServer';
|
||||
import {guessExt} from 'app/server/lib/guessExt';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
import {optStringParam} from 'app/server/lib/requestUtils';
|
||||
import {isPathWithin} from 'app/server/lib/serverUtils';
|
||||
import * as shutdown from 'app/server/lib/shutdown';
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
import {FlexServer, FlexServerOptions} from 'app/server/lib/FlexServer';
|
||||
import * as log from 'app/server/lib/log';
|
||||
import log from 'app/server/lib/log';
|
||||
|
||||
// Allowed server types. We'll start one or a combination based on the value of GRIST_SERVERS
|
||||
// environment variable.
|
||||
|
||||
Reference in New Issue
Block a user