expose __ from embark-i18n

This commit is contained in:
Pascal Precht 2019-05-07 12:34:07 +02:00
parent 8255ddb80d
commit b1eb7ac442
No known key found for this signature in database
GPG Key ID: 0EE28D8D6FD85D7D
81 changed files with 118 additions and 49 deletions

View File

@ -44,6 +44,7 @@
"@babel/runtime-corejs2": "7.3.1",
"colors": "1.3.2",
"embark-async-wrapper": "^4.0.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
import {Embark} /* supplied by @types/embark in packages/embark-typings */ from "embark";
import { __ } from "embark-i18n";
import {checkIsAvailable, dockerHostSwap, findNextPort} from "embark-utils";
import {__} from "i18n";
import Server from "./server";

View File

@ -2,12 +2,12 @@ import bodyParser from "body-parser";
import "colors";
import cors from "cors";
import {Embark, Plugins} /* supplied by @types/embark in packages/embark-typings */ from "embark";
import { __ } from "embark-i18n";
import express, {NextFunction, Request, Response} from "express";
import expressWs from "express-ws";
import findUp from "find-up";
import helmet from "helmet";
import * as http from "http";
import {__} from "i18n";
import * as path from "path";
import * as ws from "ws";

View File

@ -47,6 +47,7 @@
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"keccakjs": "0.2.3",
"uuid": "3.3.2"

View File

@ -1,4 +1,5 @@
const uuid = require('uuid/v4');
import { __ } from 'embark-i18n';
const {copyToClipboard} = require("embark-utils");
const keccak = require('keccakjs');

View File

@ -51,6 +51,7 @@
"async": "2.6.1",
"ejs": "2.6.1",
"embark-core": "^4.1.0-beta.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import {joinPath} from 'embark-utils';
import { transform } from "@babel/core";
const async = require('async');

View File

@ -42,7 +42,8 @@
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"embark-async-wrapper": "^4.0.0"
"embark-async-wrapper": "^4.0.0",
"embark-i18n": "^4.1.0-beta.0"
},
"devDependencies": {
"@babel/cli": "7.2.3",

View File

@ -1,5 +1,5 @@
import {Callback, CompilerPluginObject, Embark, Plugins} /* supplied by @types/embark in packages/embark-typings */ from "embark";
import {__} from "i18n";
import { __ } from "embark-i18n";
const async = require("embark-async-wrapper");

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,4 +1,5 @@
const async = require('async');
import { __ } from 'embark-i18n';
import { getAddressToContract, getTransactionParams, hexToNumber } from 'embark-utils';
class ConsoleListener {

View File

@ -51,8 +51,8 @@
"async": "2.6.1",
"chalk": "2.4.2",
"embark-core": "^4.1.0-beta.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"i18n": "0.8.3",
"json-stringify-safe": "5.0.1"
},
"devDependencies": {

View File

@ -2,8 +2,8 @@ import { waterfall } from "async";
import chalk from "chalk";
import { Callback, Embark, Events } /* supplied by @types/embark in packages/embark-typings */ from "embark";
import constants from "embark-core/constants.json";
import { __ } from "embark-i18n";
import { escapeHtml, exit, jsonFunctionReplacer } from "embark-utils";
import { __ } from "i18n";
import stringify from "json-stringify-safe";
import { dirname } from "path";
import Suggestions from "./suggestions";

View File

@ -50,6 +50,7 @@
"async": "2.6.1",
"clone-deep": "4.0.0",
"embark-core": "^4.1.0-beta.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const cloneDeep = require('clone-deep');
const constants = require('embark-core/constants');

View File

@ -47,7 +47,8 @@
"extends": "../../.eslintrc.json"
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1"
"@babel/runtime-corejs2": "7.3.1",
"embark-i18n": "^4.1.0-beta.0"
},
"devDependencies": {
"@babel/cli": "7.2.3",

View File

@ -1,3 +1,5 @@
import { __ } from 'embark-i18n';
const ProcessState = {
Stopped: 'stopped',
Starting: 'starting',

View File

@ -50,6 +50,7 @@
"async": "2.6.1",
"clone-deep": "4.0.0",
"embark-core": "^4.1.0-beta.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
import {AddressUtils, toChecksumAddress} from 'embark-utils';
const {ZERO_ADDRESS} = AddressUtils;

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const ContractDeployer = require('./contract_deployer.js');
const cloneDeep = require('clone-deep');

View File

@ -50,6 +50,7 @@
"@babel/runtime-corejs2": "7.3.1",
"async": "^2.6.1",
"embarkjs": "^4.1.0-beta.0",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"eth-ens-namehash": "2.0.8"
},

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import {joinPath, hashTo32ByteHexString, soliditySha3, recursiveMerge, AddressUtils} from 'embark-utils';
const namehash = require('eth-ens-namehash');
const async = require('async');

View File

@ -1,6 +1,6 @@
# `embark-i18n`
i18n support for Embark
> i18n support for Embark
Visit [embark.status.im](https://embark.status.im/) to get started with
[Embark](https://github.com/embark-framework/embark).

View File

@ -16,7 +16,8 @@
"solidity"
],
"files": [
"dist"
"dist",
"locales"
],
"license": "MIT",
"repository": {
@ -26,14 +27,13 @@
},
"main": "./dist/index.js",
"scripts": {
"build": "cross-env BABEL_ENV=node babel src --extensions \".js,.ts\" --out-dir dist --root-mode upward --source-maps",
"build": "cross-env BABEL_ENV=node babel src --extensions \".ts\" --out-dir dist --root-mode upward --source-maps",
"ci": "npm run qa",
"clean": "npm run reset",
"lint": "npm-run-all lint:*",
"lint:ts": "tslint -c tslint.json \"src/**/*.ts\"",
"package": "npm pack",
"// qa": "npm-run-all lint typecheck build package",
"qa": "npm-run-all lint build package",
"qa": "npm-run-all lint typecheck build package",
"reset": "npx rimraf dist embark-*.tgz package",
"start": "npm run watch",
"typecheck": "tsc",
@ -50,8 +50,8 @@
"devDependencies": {
"@babel/cli": "7.2.3",
"@babel/core": "7.2.2",
"@types/i18n": "0.8.3",
"cross-env": "5.2.0",
"eslint": "5.7.0",
"npm-run-all": "4.1.5",
"rimraf": "2.6.3",
"tslint": "5.16.0",

View File

@ -19,10 +19,12 @@ enum SupportedLanguage {
const DEFAULT_LANGUAGE = SupportedLanguage.En;
const i18nEmbark = { __: () => {}};
i18n.configure({
directory: path.join(__dirname, "../", "locales"),
locales: Object.values(SupportedLanguage),
register: global,
register: i18nEmbark,
syncFiles: false,
updateFiles: false,
});
@ -46,3 +48,5 @@ export const setOrDetectLocale = (locale: Maybe<string>) => {
};
i18n.setLocale(DEFAULT_LANGUAGE);
export const __ = i18nEmbark.__;

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"colors": "1.3.2",
"embark-i18n": "^4.1.0-beta.0",
"live-plugin-manager-git-fix": "0.12.1"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
var Npm = require('./npm.js');
class LibraryManager {

View File

@ -38,6 +38,7 @@
},
"dependencies": {
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const { runCmd } = require('embark-utils');
const async = require('async');

View File

@ -42,6 +42,7 @@
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0"
},
"devDependencies": {

View File

@ -1,6 +1,6 @@
import Ajv from "ajv";
import { Logger } /* supplied by @types/embark in packages/embark-typings */ from "embark";
import {__} from "i18n";
import { __ } from "embark-i18n";
export enum Framework {
React = "react",

View File

@ -1,6 +1,6 @@
import { Embark } /* supplied by @types/embark in packages/embark-typings */ from "embark";
import { __ } from "embark-i18n";
import Handlebars from "handlebars";
import {__} from "i18n";
import * as path from "path";
import { Builder } from "../../builder";
import { CommandOptions } from "../../commandOptions";

View File

@ -1,6 +1,6 @@
import { Contract, Embark } /* supplied by @types/embark in packages/embark-typings */ from "embark";
import { __ } from "embark-i18n";
import Handlebars from "handlebars";
import {__} from "i18n";
import * as path from "path";
import { ABIDefinition } from "web3/eth/abi";
import { Builder } from "../../builder";

View File

@ -1,6 +1,6 @@
import Ajv from "ajv";
import { Logger } /* supplied by @types/embark in packages/embark-typings */ from "embark";
import {__} from "i18n";
import { __ } from "embark-i18n";
import { schema } from "./schema";
const fs = require("fs");

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"viz.js": "1.8.2"
},
"devDependencies": {

View File

@ -1,5 +1,6 @@
/* global __ module require */
import { __ } from 'embark-i18n';
const stringReplaceAsync = require('string-replace-async');
const async = require('async');
const {callbackify} = require('util');

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"mocha": "5.2.0"
},

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const Mocha = require('mocha');
const path = require('path');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import { deconstructUrl, prepareContractsConfig, AccountParser } from 'embark-utils';
const async = require('async');

View File

@ -50,9 +50,9 @@
"clipboardy": "1.2.3",
"colors": "1.3.2",
"ethereumjs-wallet": "0.6.0",
"embark-i18n": "^4.1.0-beta.0",
"follow-redirects": "1.5.7",
"fuzzy": "0.1.3",
"i18n": "0.8.3",
"merge": "1.2.1",
"multihashes": "0.4.14",
"ora": "2.1.0",

View File

@ -1,4 +1,4 @@
import { __ } from 'i18n';
import { __ } from 'embark-i18n';
const bip39 = require("bip39");
const hdkey = require('ethereumjs-wallet/hdkey');
const ethereumjsWallet = require('ethereumjs-wallet');

View File

@ -1,4 +1,4 @@
import { __ } from "i18n";
import { __ } from "embark-i18n";
import { balanceRegex } from "./constants";
const Web3EthAbi = require("web3-eth-abi");
const web3 = require("web3");

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"embark-async-wrapper": "^4.0.0",
"embark-i18n": "^4.1.0-beta.0",
"shelljs": "0.5.3"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require("embark-async-wrapper");
const shelljs = require('shelljs');
const path = require('path');

View File

@ -47,6 +47,7 @@
},
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"embark-i18n": "^4.1.0-beta.0",
"chokidar": "2.0.4"
},
"devDependencies": {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
let chokidar = require('chokidar');
let path = require('path');

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"express": "4.16.3",
"express-http-proxy": "1.5.1",

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import {joinPath, canonicalHost, checkIsAvailable, findNextPort} from 'embark-utils';
var Server = require('./server.js');
const opn = require('opn');

View File

@ -1,5 +1,6 @@
const async = require('async');
let serveStatic = require('serve-static');
import { __ } from 'embark-i18n';
import {canonicalHost, defaultHost, dockerHostSwap} from 'embark-utils';
const expressWebSocket = require('express-ws');
const express = require('express');

View File

@ -48,6 +48,7 @@
"dependencies": {
"@babel/runtime-corejs2": "7.3.1",
"async": "2.6.1",
"embark-i18n": "^4.1.0-beta.0",
"embark-utils": "^4.1.0-beta.0",
"embarkjs-whisper": "^4.1.0-beta.0",
"rxjs": "6.4.0"

View File

@ -1,5 +1,6 @@
/* global __ __dirname module require setTimeout */
/* global __dirname module require setTimeout */
import { __ } from 'embark-i18n';
import {canonicalHost, defaultHost} from 'embark-utils';
let Web3 = require('web3');
const {parallel} = require('async');

View File

@ -1,4 +1,4 @@
import * as i18n from 'embark-i18n';
import { __, setOrDetectLocale } from 'embark-i18n';
const program = require('commander');
const EmbarkController = require('./cmd_controller.js');
const fs = require('../lib/core/fs.js');
@ -54,7 +54,7 @@ class Cmd {
.option('--locale [locale]', __('language to use (default: en)'))
.option('--template <name/url>', __('download a template using a known name or a git host URL'))
.action(function(name, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
const contractsOnly = options.simple || options.contractsOnly;
@ -94,7 +94,7 @@ class Cmd {
.option('--template <name/url>', __('download a demo template using a known name or a git host URL'))
.description(__('create a working dapp with a SimpleStorage contract'))
.action(function(options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
if(options.template) {
const hostedGitInfo = require('hosted-git-info');
const hgi = hostedGitInfo.fromUrl(options.template);
@ -118,7 +118,7 @@ class Cmd {
.option('--pipeline [pipeline]', __('webpack config to use (default: production)'))
.description(__('deploy and build dapp at ') + 'dist/ (default: development)')
.action(function(env, _options) {
i18n.setOrDetectLocale(_options.locale);
setOrDetectLocale(_options.locale);
_options.env = env || 'development';
_options.logFile = _options.logfile; // fix casing
_options.logLevel = _options.loglevel; // fix casing
@ -145,7 +145,7 @@ class Cmd {
.option('--no-single-use-auth-token', __('disable the single use of token in cockpit'))
.description(__('run dapp (default: %s)', 'development'))
.action(function(env, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.run({
env: env || 'development',
serverPort: options.port,
@ -174,7 +174,7 @@ class Cmd {
.option('--no-single-use-auth-token', __('disable the single use of token in cockpit'))
.description(__('Start the Embark console'))
.action(function(env, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.console({
env: env || 'development',
client: options.client,
@ -194,7 +194,7 @@ class Cmd {
.option('--locale [locale]', __('language to use (default: en)'))
.description(__('run blockchain server (default: %s)', 'development'))
.action(function(env, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json',
interceptLogs: false
@ -216,7 +216,7 @@ class Cmd {
.option('--locale [locale]', __('language to use (default: en)'))
.action(function(env, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.initConfig(env || 'development', {
embarkConfig: 'embark.json',
interceptLogs: false
@ -261,7 +261,7 @@ class Cmd {
options.outputHelp();
process.exit(1);
}
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.runTests({
file,
solc: options.solc,
@ -286,7 +286,7 @@ class Cmd {
.option('--pipeline [pipeline]', __('webpack config to use (default: production)'))
.description(__('Upload your dapp to a decentralized storage') + '.')
.action(function(env, _options) {
i18n.setOrDetectLocale(_options.locale);
setOrDetectLocale(_options.locale);
if (env === "ipfs" || env === "swarm") {
console.warn(("did you mean " + "embark upload".bold + " ?").underline);
console.warn("In embark 3.1 forwards, the correct command is embark upload <environment> and the provider is configured in config/storage.js");
@ -310,7 +310,7 @@ class Cmd {
.option('--output [svgfile]', __('filepath to output SVG graph to (default: %s)', fs.diagramPath()))
.description(__('generates documentation based on the smart contracts configured'))
.action(function(env, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.graph({
env: env || 'development',
logFile: options.logfile,
@ -330,7 +330,7 @@ class Cmd {
.option('--overwrite', 'Overwrite existing files. (default: false)')
.description(__('Generates a contract and a function tester for you\nExample: ContractName field1:uint field2:address --contract-language solidity --framework react'))
.action(function(contractOrFile, fields, options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
options.env = 'development';
options.logFile = options.logfile; // fix casing
options.logLevel = options.loglevel; // fix casing
@ -350,7 +350,7 @@ class Cmd {
.option('--locale [locale]', __('language to use (default: en)'))
.description(__('resets embarks state on this dapp including clearing cache'))
.action(function(options) {
i18n.setOrDetectLocale(options.locale);
setOrDetectLocale(options.locale);
embark.initConfig('development', {
embarkConfig: 'embark.json', interceptLogs: false
});

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
let async = require('async');
const constants = require('embark-core/constants');
const Logger = require('embark-logger');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const { getWindowSize } = require('../../lib/utils/utils.js');
let Monitor = require('./monitor.js');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
let blessed = require("neo-blessed");
const REPL = require('./repl.js');
const stream = require('stream');

View File

@ -5,6 +5,7 @@ const path = require('path');
const deepEqual = require('deep-equal');
const web3 = require('web3');
const constants = require('embark-core/constants');
import { __ } from 'embark-i18n';
import {
buildUrlFromConfig,
canonicalHost,

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import { ProcessManager } from 'embark-core';
const async = require('async');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
var EventEmitter = require('events');
const cloneDeep = require('lodash.clonedeep');

View File

@ -1,4 +1,4 @@
import {__} from "i18n";
import { __ } from "embark-i18n";
import * as path from "path";
import { ImportRemapping, prepareForCompilation } from "../utils/solidity/remapImports";

View File

@ -1,4 +1,5 @@
const utils = require('../utils/utils.js');
import { __ } from 'embark-i18n';
import {joinPath} from 'embark-utils';
const constants = require('embark-core/constants');
const fs = require('./fs.js');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('../utils/async_extend.js');
const deepEqual = require('deep-equal');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const Web3 = require('web3');
const async = require('async');
const Provider = require('./provider.js');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const { AccountParser } = require('embark-utils');
const fundAccount = require('./fundAccount');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const DevTxs = require('./dev_txs');
const ProcessLogsApi = require('embark-process-logs-api');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const {spawn, exec} = require('child_process');
const path = require('path');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import { ProcessLauncher } from 'embark-core';
import {joinPath} from 'embark-utils';
const constants = require('embark-core/constants');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const {exec, spawn} = require('child_process');
const fs = require('../../core/fs');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const utils = require('../../utils/utils.js');
const {normalizeInput, buildUrlFromConfig} = require('embark-utils');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const async = require('async');
const fs = require('../../core/fs.js');
const path = require('path');

View File

@ -1,7 +1,8 @@
/* global Buffer __ exports require */
/* global Buffer exports require */
require('./httpProxyOverride');
const Asm = require('stream-json/Assembler');
import { __ } from 'embark-i18n';
import {canonicalHost, timer} from 'embark-utils';
const constants = require('embark-core/constants');
const {Duplex} = require('stream');

View File

@ -1,5 +1,5 @@
import "colors";
import {__} from "i18n";
import { __ } from "embark-i18n";
import DebuggerManager from "./debugger_manager";
const NO_DEBUG_SESSION = __("No debug session active. Activate one with `debug`");

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import { sha3 } from 'embark-utils';
class DeployTracker {

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const UploadIPFS = require('./upload.js');
const utils = require('../../utils/utils.js');
const IpfsApi = require('ipfs-api');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
require('colors');
let async = require('async');
let shelljs = require('shelljs');

View File

@ -1,6 +1,7 @@
const path = require('path');
const async = require('async');
const utils = require('../../utils/utils.js');
import { __ } from 'embark-i18n';
import {joinPath, LongRunningProcessTimer} from 'embark-utils';
import { ProcessLauncher } from 'embark-core';
const constants = require('embark-core/constants');

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
import { ProcessLauncher } from 'embark-core';
import {joinPath} from 'embark-utils';
let currentSolcVersion = require('../../../../package.json').dependencies.solc;

View File

@ -1,3 +1,5 @@
import { __ } from 'embark-i18n';
class Storage {
constructor(embark, options){
this.embark = embark;

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const shellJs = require('shelljs');
import {joinPath, canonicalHost, buildUrlFromConfig} from 'embark-utils';
import { ProcessLauncher } from 'embark-core';

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const UploadSwarm = require('./upload.js');
const SwarmAPI = require('swarm-api');
// TODO: not great, breaks module isolation

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
require('colors');
let async = require('async');
@ -27,26 +28,26 @@ class Swarm {
console.log(("=== " + __("DApp available at") + ` https://swarm-gateways.net/bzz:/${dir_hash}/index.html`).green);
if(self.env === 'development') {
console.log(("\n=== " +
"Blockchain must be running".bold +
"Blockchain must be running".bold +
" ===").yellow);
console.log((
"embark run".italic +
__(" or ") +
"embark blockchain".italic +
"embark run".italic +
__(" or ") +
"embark blockchain".italic +
__(" must be running when the site is loaded to interact with the blockchain.\n")
).yellow);
console.log(("=== " +
"Usage with the public gateway".bold +
console.log(("=== " +
"Usage with the public gateway".bold +
" ===").yellow);
console.log((
__("If you wish to load your development site from the public gateway (swarm-gateways.net), you will need to first update your CORS settings (") +
"config/blockchain.js > wsOrigins".italic +
"config/blockchain.js > wsOrigins".italic +
__(" and ") +
"config/blockchain.js > rpcCorsDomain".italic +
__(") to allow ") +
"swarm-gateways.net".underline +
__(". If these were set to 'auto', they would now need to be set to ") +
"https://swarm-gateways.net,http://localhost:8000,http://localhost:8500,embark".underline +
__(") to allow ") +
"swarm-gateways.net".underline +
__(". If these were set to 'auto', they would now need to be set to ") +
"https://swarm-gateways.net,http://localhost:8000,http://localhost:8500,embark".underline +
".\n").yellow);
}

View File

@ -1,3 +1,4 @@
import { __ } from 'embark-i18n';
const findUp = require('find-up');
const fs = require('../core/fs.js');
const hostedGitInfo = require('hosted-git-info');